/* Redesign 2026-10-15, second handover: auth. Built from tokens.css; shared components live in ui.css. */

/* ═══════════════════════════════════════════════════════════════════════
   The auth masthead: brand and one link (Prijava.dc.html, ResetLozinke*).
   ═══════════════════════════════════════════════════════════════════════ */
.authhead { background: var(--navy-900); color: #fff; }
.authhead__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); max-width: calc(1040px + 2 * var(--space-4)); min-height: 72px; margin: 0 auto; padding: 0 var(--space-4); }
.authhead__brand, .authhead__brand:visited { display: inline-flex; align-items: center; min-height: 44px; color: #fff; font: 800 24px/1 var(--font-sans); letter-spacing: -0.02em; text-decoration: none; }
.authhead__link, .authhead__link:visited { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 0 var(--space-2); color: #fff; font: 700 15px/1 var(--font-sans); text-decoration: none; }
.authhead__brand:hover, .authhead__link:hover { color: #fff; text-decoration: underline; }
@media (max-width: 700px) {
    body.has-appbar .authhead { display: none; }
    .authhead__inner { min-height: 56px; }
    .authhead__brand { font-size: 20px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Prijava and Novi račun: the lot in the aside, the phone strip, tabs.
   ═══════════════════════════════════════════════════════════════════════ */
/* The design's frame: brand, aside and card share 200 to 1240 at 1440 wide,
   aside 420 + gap 32 + card 560, left aligned under the brand. Registration
   uses the same columns (no wider variant). */
.authpage { margin-top: var(--space-12); }
@media (min-width: 1001px) {
    .authpage, .authpage.authpage--wide { grid-template-columns: 420px minmax(0, 560px); justify-content: start; max-width: 1040px; margin-left: auto; margin-right: auto; }
}
.authmain { min-width: 0; }

/* Tabs: bold, the selected one heavier on its white pill. */
.authpage .authtabs__tab, .authpage .authtabs__tab:visited { font-weight: 700; }
.authpage .authtabs__tab.is-current { font-weight: 800; }

/* Inline text links reach 44px tall through padding that negative margins
   take back, so the line and the label row keep the design's height. */
.authcard__alt a, body .authpage .regcard__foot a, .authpage .accswitch label a { display: inline-block; padding: 13px 0; margin: -13px 0; }
.authpage .authform__labelrow { align-items: flex-end; margin-bottom: var(--space-2); }
.authpage .authform__labelrow label { margin-bottom: 0; }
.authform__labelrow .authform__forgot { display: inline-block; padding: 18px 0 9px; margin: -18px 0 -9px; line-height: 17px; }

/* Novi račun: the old panel inside the card is flattened, so the form sits
   straight in the card (desktop) or on the ground (phone). */
.authpage .accpanel.regcard { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.authpage .regcard__head { padding: 0; margin: 0 0 var(--space-5); border: 0; background: none; }
.authpage .regform { padding: 0; }
.authpage .regform__actions { padding-bottom: 0; }
body .authpage .regcard__foot { padding: 0; border: 0; background: none; }

/* Privatni | Poslovni korisnik: the same segmented control as the tabs. */
.authpage .segswitch { gap: var(--space-1); padding: var(--space-1); border: 0; border-radius: var(--radius-md); background: var(--ground); }
.authpage .segswitch__opt, .authpage .segswitch__opt:visited { display: flex; flex-direction: column; justify-content: center; min-height: 44px; padding: 6px 8px; border: 0; border-radius: var(--radius-sm); color: var(--ink-2); }
.authpage .segswitch__opt:hover { background: none; color: var(--ink); text-decoration: none; }
.authpage .segswitch__opt--current, .authpage .segswitch__opt--current:visited, .authpage .segswitch__opt--current:hover { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-float); }
.authpage .segswitch__name { font: 700 15px/1.25 var(--font-sans); }
.authpage .segswitch__opt--current .segswitch__name { font-weight: 800; }
.authpage .segswitch__note { color: var(--muted); font: 500 12px/1.3 var(--font-sans); opacity: 1; }
.authpage .segswitch__explain { margin: var(--space-2) 0 0; color: var(--muted); font: 500 13px/1.45 var(--font-sans); }

/* Checkboxes: a 44px input whose drawn box is 20px; the negative margin keeps
   the row's layout, the label stays clickable as well. */
.authpage .accswitch { align-items: center; min-height: 44px; padding: 0; }
.authpage .accswitch label { padding: var(--space-2) 0; }
.authpage .accswitch input[type="checkbox"] { -webkit-appearance: none; appearance: none; display: grid; place-content: center; flex: none; width: 44px; height: 44px; margin: -12px; background: none; border: 0; cursor: pointer; }
.authpage .accswitch input[type="checkbox"]::before { content: ""; width: 20px; height: 20px; box-sizing: border-box; border: 1.5px solid var(--border-strong); border-radius: 4px; background: var(--surface) no-repeat center / 14px 14px; }
.authpage .accswitch input[type="checkbox"]:checked::before { border-color: var(--blue-700); background-color: var(--blue-700); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.authpage .accswitch input[type="checkbox"]:focus { outline: none; }
.authpage .accswitch input[type="checkbox"]:focus-visible::before { outline: 2px solid var(--blue-700); outline-offset: 2px; }
.authpage .accswitch input[aria-invalid="true"]::before { border-color: var(--red-700); }
.authpage .authaside__kicker { margin-bottom: var(--space-4); }
.authpage .authaside__back { margin-top: var(--space-6); }
.authpage .authcard__title, body .authpage .regpage .pagehead { margin: 0 0 var(--space-5); }
.authcard__alert { margin-bottom: var(--space-4); }

.authlot { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-4); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .07); }
.authlot__thumb { flex: none; width: 72px; height: 72px; border-radius: var(--radius-md); object-fit: cover; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.authlot__thumb .tone__icon { width: 30px; height: 30px; }
.authlot__text { min-width: 0; }
.authlot__title { margin: 0 0 var(--space-1); color: #fff; font: 800 15px/1.35 var(--font-sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.authlot__max { margin: 0 0 2px; color: #D6DEE8; font: 500 13px/1.4 var(--font-sans); }
.authlot__max strong { color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.authlot__ends { margin: 0; color: var(--peach-200); font: 700 13px/1.4 var(--font-sans); white-space: nowrap; }

.authstrip { display: none; }

/* Password rule chips that tick as the visitor types, and the match line. */
.pwrules { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.pwrules__rule { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font: 600 13px/1.3 var(--font-sans); }
.pwrules__rule::before { content: ""; flex: none; width: 16px; height: 16px; box-sizing: border-box; border: 1.5px solid var(--border-strong); border-radius: 50%; background: var(--surface) no-repeat center / 10px 10px; }
.pwrules__rule.is-met { color: var(--green-700) !important; }
.pwrules__rule.is-met::before { border-color: var(--green-600) !important; background-color: var(--green-600) !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.pwmatch { margin: var(--space-2) 0 0; font: 600 13px/1.3 var(--font-sans); color: var(--muted); }
.pwmatch.is-met { color: var(--green-700) !important; }
.pwmatch.is-wrong { color: var(--red-700) !important; }

/* "Prikaži" as a word (password_visibility_controller.js, show-text). */
.pwfield .pwtoggle.pwtoggle--text { color: var(--blue-700); font: 700 14px/1 var(--font-sans); }
.pwfield .pwtoggle.pwtoggle--text:hover { color: var(--navy-900); text-decoration: underline; }
.pwfield .pwtoggle.pwtoggle--text[aria-pressed="true"] { color: var(--blue-700); }

.authform__errors:empty { display: none; }
.authform__errors ul, .authform ul:not(.pwrules) { margin: var(--space-2) 0 0; padding: 0; list-style: none; color: var(--red-700); font: 600 13px/1.4 var(--font-sans); }
.authform input[aria-invalid="true"] { border-color: var(--red-700); }
.authform__hint { margin: var(--space-2) 0 0; color: var(--muted); font: 500 13px/1.4 var(--font-sans); }

/* The registration form inside the auth card: one orange button, full width. */
body .authpage .regform__actions { display: block; }

@media (max-width: 1000px) {
    .authpage { margin-top: var(--space-6); }
}
@media (max-width: 700px) {
    /* PrijavaMobile: no benefits panel; the lot strip sits above the form. */
    .authpage { margin: var(--space-4) auto var(--space-8); gap: 0; }
    .authpage .authaside { display: none; }
    .authstrip { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); padding: var(--space-3); border-radius: var(--radius-lg); background: var(--navy-900); color: #fff; }
    .authstrip .authlot__thumb { width: 48px; height: 48px; border-radius: var(--radius-sm); }
    .authstrip .authlot__thumb .tone__icon { width: 22px; height: 22px; }
    .authstrip__text { min-width: 0; }
    .authstrip__kicker { margin: 0 0 2px; color: var(--peach-200); font: 800 13px/1.3 var(--font-sans); }
    .authstrip__line { display: flex; flex-wrap: wrap; margin: 0; color: #fff; font: 500 14px/1.35 var(--font-sans); white-space: nowrap; }
    .authstrip__title { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
    .authstrip__max { flex: none; }
    /* The phone strip: title on one line, "Vaš maksimum: 720,00 €" under it. */
    .authstrip__sep { display: none; }
    .authstrip__max { flex-basis: 100%; }
    /* The flattened registration panel, on the page ground. */
    .authpage .accpanel, .authpage .regcard__head, body .authpage .regcard__foot { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
    .authpage .segswitch { background: #E9EDF2; }
    .authstrip__line strong { font-weight: 800; }
    /* The phone form sits on the page ground, not in a card. */
    .authpage .authcard, body .authpage .regpage { padding: 0; border: 0; border-radius: 0; background: none; }
    .authpage .authcard__title, body .authpage .regpage .pagehead { font-size: 26px; line-height: 32px; }
    .authpage .authtabs { background: #E9EDF2; }
    .authtabs__tab.is-current { box-shadow: none; background: var(--blue-100) !important; border-color: var(--blue-700) !important; color: var(--blue-700) !important; }
}

/* ═══════════════════════════════════════════════════════════════════════
   One card: password reset and e-mail confirmation (ResetLozinke*.dc.html).
   ═══════════════════════════════════════════════════════════════════════ */
.authsolo { max-width: 480px; margin: 56px auto var(--space-12); }
.authbox { padding: var(--space-8); }
.authicon { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; }
.authicon svg { width: 28px; height: 28px; }
.authicon--lock { background: var(--blue-100); color: var(--blue-700); }
.authicon--mail { background: var(--green-100); color: var(--green-700); }
.authicon--mail_error { background: var(--red-100); color: var(--red-700); }
.authicon--clock { background: var(--amber-100); color: var(--amber-800); }
.authicon--done { background: var(--green-100); color: #fff; }
.authicon--done svg { width: 24px; height: 24px; box-sizing: content-box; padding: 10px; border-radius: 50%; background: var(--green-600); }
.authbox__title { margin: var(--space-6) 0 var(--space-4); font: 800 28px/34px var(--font-sans); letter-spacing: -0.02em; color: var(--ink); }
.authbox__subtitle { margin: var(--space-6) 0 var(--space-3); font: 800 17px/1.3 var(--font-sans); color: var(--ink); }
.authbox__body { margin: 0 0 var(--space-5); color: var(--ink-2); font: 500 15px/1.55 var(--font-sans); }
.authbox__body strong { color: var(--ink); font-weight: 800; overflow-wrap: anywhere; }
.authbox__note { margin: 0; color: var(--muted); font: 500 13px/1.45 var(--font-sans); }
.authbox__links { margin: var(--space-3) 0 0; text-align: center; }
.authbox__links .btn--link { font: 700 15px/1 var(--font-sans); }
.authbox__foot { margin: var(--space-4) 0 0; color: var(--muted); font: 500 14px/1.4 var(--font-sans); }
.authbox__foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.authbox .authform + .authbox__links { margin-top: var(--space-3); }

@media (max-width: 700px) {
    .authsolo { margin: var(--space-6) auto var(--space-8); }
    .authbox { padding: var(--space-6) var(--space-5); border-radius: var(--radius-lg); }
    .authbox__title { font-size: 24px; line-height: 30px; margin-top: var(--space-5); }
}

@media (prefers-reduced-motion: reduce) {
    .authhead *, .authpage *, .authsolo * { transition: none !important; animation: none !important; }
}
.authbox .btn:disabled { opacity: 1; cursor: default; color: var(--muted) !important; border-color: var(--border-strong) !important; background: var(--surface) !important; }
.authform input::placeholder { color: var(--muted); opacity: 1; }
