/* =========================================================
   Prijava / registracija (stranica i prozor) + pravna dokumenta
   ========================================================= */

/* tabovi kao „pilula” */
.seg.seg-pill { display: grid; grid-template-columns: 1fr 1fr; gap: 0; background: #eef1f6; border: 0; border-radius: 14px; padding: 4px; margin-bottom: 22px; }
.seg.seg-pill button { height: 46px; border: 0; border-radius: 11px; margin: 0; font-size: 15px; font-weight: 700; color: var(--muted); border-bottom: 0; transition: background .2s, color .2s, box-shadow .2s; }
.seg.seg-pill button.active { background: #fff; color: var(--bordo); box-shadow: 0 2px 8px rgba(13,21,38,.1); }
.auth-pane { gap: 0; }
.auth-pane > * + * { margin-top: 14px; }
.auth-pane .divider { margin: 18px 0 4px; }

/* polja */
.af .lbl { margin-bottom: 7px; }
.af-lbl { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.af-lbl a { font-weight: 600; }
.af-in { position: relative; }
.af-in > svg.lucide:first-child { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.af-in .input { padding-left: 44px; }
.af .input { height: 52px; border-radius: 12px; font-size: 15.5px; background: #fbfcfe; }
.af .input:focus { background: #fff; }
.af-in:has(.pw-eye) .input { padding-right: 52px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.pw-eye:hover { background: #eef1f6; color: var(--bordo); }
.pw-eye svg.lucide { width: 19px; height: 19px; }
.af-grid { gap: 14px; }

/* jačina lozinke */
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; height: 5px; background: none; margin: 10px 0 8px; overflow: visible; }
.pw-meter i { display: block; height: 5px; border-radius: 5px; background: var(--line); transition: background .25s; }
.pw-meter[data-level="1"] i:nth-child(-n+1) { background: var(--red); }
.pw-meter[data-level="2"] i:nth-child(-n+2) { background: #f59e0b; }
.pw-meter[data-level="3"] i:nth-child(-n+3) { background: #84cc16; }
.pw-meter[data-level="4"] i { background: var(--ok); }
.pw-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pw-rules li { font-size: 12px; font-weight: 600; color: var(--muted); padding: 3px 9px 3px 7px; border-radius: 30px; background: #eef1f6; display: inline-flex; align-items: center; gap: 5px; transition: .2s; }
.pw-rules li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.pw-rules li.ok { background: var(--ok-50); color: var(--ok); }
.pw-rules li.ok::before { background: var(--ok); }

/* izbor uloge — kartice jedna ispod druge */
.auth-step { margin: 0 0 -2px; font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.role-pick.role-stack { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.role-opt { display: grid !important; grid-template-columns: 48px minmax(0, 1fr) 22px; gap: 14px; align-items: center; padding: 14px 16px !important; border: 1.5px solid var(--line) !important; border-radius: 14px !important; background: #fff; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.role-opt:hover { border-color: var(--line-2) !important; }
.role-opt input { position: absolute; opacity: 0; pointer-events: none; width: 1px !important; height: 1px !important; }
.ro-ic { width: 48px; height: 48px; border-radius: 12px; background: #eef1f6; color: var(--bordo); display: grid; place-items: center; transition: .2s; }
.ro-ic svg.lucide { width: 22px; height: 22px; }
.ro-txt b { display: block; font-size: 15.5px; color: var(--ink); }
.ro-txt small { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.ro-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); position: relative; transition: .2s; }
.role-opt:has(input:checked) { border-color: var(--bordo) !important; background: var(--brand-50) !important; box-shadow: 0 0 0 3px rgba(20,33,61,.08); }
.role-opt:has(input:checked) .ro-ic { background: var(--bordo); color: #fff; }
.role-opt:has(input:checked) .ro-radio { border-color: var(--bordo); background: var(--bordo); }
.role-opt:has(input:checked) .ro-radio::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.role-opt:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 2px; }
.auth-hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: #fff4e0; color: #7a4a00; font-size: 13.5px; line-height: 1.5; }
.auth-hint[hidden] { display: none; }
.auth-hint svg.lucide { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.auth-hint a { color: #7a4a00; font-weight: 800; text-decoration: underline; }

/* saglasnost: čekiranje, pa ispod pravila i privatnost */
.consent { border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; transition: border-color .2s; }
.consent.ok { border-color: var(--ok); }
.consent .check { padding: 12px 16px; margin: 0; min-height: 50px; font-size: 14px; align-items: center; }
.consent-check { font-weight: 700; color: var(--ink); }
.consent-check input, .consent-opt input { width: 20px !important; height: 20px !important; flex-shrink: 0; }
.consent-links { display: grid; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbfcfe; }
.consent-links a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; min-height: 48px; color: var(--ink-2); font-size: 14px; font-weight: 600; }
.consent-links a + a { border-top: 1px dashed var(--line); }
.consent-links a:hover { background: var(--brand-50); color: var(--bordo); }
.consent-links svg.lucide { width: 17px; height: 17px; color: var(--bordo); flex-shrink: 0; }
.consent-links .cl-arrow { margin-left: auto; color: var(--line-2); width: 16px; height: 16px; }
.consent-opt { color: var(--muted); font-size: 13.5px !important; }

[data-register]:disabled { background: #cfd6e2; color: #fff; cursor: not-allowed; box-shadow: none; }
.auth-note { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #eef1f6; font-size: 13.5px; color: var(--ink-2); }
.auth-note svg.lucide { width: 18px; height: 18px; color: var(--bordo); flex-shrink: 0; }
.auth-note a { font-weight: 700; }
.auth-switch { text-align: center; font-size: 14px; color: var(--muted); margin: 16px 0 0 !important; }
.auth-switch button { border: 0; background: none; color: var(--red); font: inherit; font-weight: 800; cursor: pointer; padding: 6px 2px; }
.auth-sub { color: #c3cde0; font-size: 16px; margin: 6px 0 0; }
.google-btn { border-radius: 12px; }

/* prozor za prijavu — na telefonu izlazi odozdo preko celog ekrana */
.modal-grab { display: none; }
.modal .modal-main { padding: 34px 34px 28px; }
@media (max-width: 860px) {
  .modal-bg { padding: 0; place-items: end stretch; }
  .modal { width: 100%; max-height: 94dvh; border-radius: 22px 22px 0 0; animation: sheetUp .3s cubic-bezier(.2,.8,.2,1); }
  @keyframes sheetUp { from { transform: translateY(40%); opacity: .4; } }
  .modal .modal-main { max-height: 94dvh; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); }
  .modal-grab { display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 0 auto 14px; }
  .modal .close { top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; background: #eef1f6; border: 0; }
  .modal .seg-pill { margin-right: 48px; }
}

/* stranica /prijava na telefonu: kompaktno zaglavlje + forma kao kartica */
@media (max-width: 860px) {
  .auth-page { display: block; min-height: 0; background: var(--bg); }
  .auth-photo { min-height: 0; display: block !important; padding: 34px 20px 64px; }
  .auth-photo-inner { padding: 0; }
  .auth-photo h2 { font-size: 26px; margin: 0; }
  .auth-photo .eyebrow { margin-bottom: 8px; }
  .auth-quote { display: none; }
  .auth-form { display: block; padding: 0 12px 36px; background: transparent; margin-top: -40px; position: relative; }
  .auth-box { width: 100%; max-width: 520px; margin: 0 auto; background: #fff; border-radius: 20px; padding: 18px 16px 22px; box-shadow: 0 20px 50px -18px rgba(13,21,38,.35); }
  .af-grid { grid-template-columns: 1fr !important; }
  .role-opt { grid-template-columns: 44px minmax(0, 1fr) 22px; padding: 12px 14px !important; gap: 12px; }
  .ro-ic { width: 44px; height: 44px; }
  .ro-txt b { font-size: 15px; }
  .ro-txt small { font-size: 12.5px; }
}
@media (max-height: 500px) and (orientation: landscape) { .auth-photo { display: none !important; } .auth-form { margin-top: 0; padding-top: 16px; } }
@media (min-width: 861px) {
  .auth-box { width: min(460px, 100%); }
  .auth-form { padding: 56px 32px; }
}

/* ---------- Pravila i privatnost ---------- */
.legal-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; padding: 36px 0 72px; align-items: start; }
.legal-tabs { position: sticky; top: 100px; display: grid; gap: 6px; }
.legal-tabs a { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px; color: var(--ink-2); font-weight: 700; font-size: 14.5px; border: 1px solid transparent; }
.legal-tabs a svg.lucide { width: 18px; height: 18px; color: var(--bordo); }
.legal-tabs a:hover { background: #fff; border-color: var(--line); }
.legal-tabs a.active { background: #fff; border-color: var(--line); box-shadow: var(--shadow); color: var(--bordo); }
.legal-doc { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 36px 40px; max-width: none; }
.legal-doc h2 { margin-top: 0; }
.legal-doc h3 { font-size: 17px; margin: 28px 0 8px; }
.legal-doc[hidden] { display: none; }
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; gap: 16px; padding: 16px 0 48px; }
  .legal-tabs { position: sticky; top: 64px; z-index: 5; grid-template-columns: 1fr 1fr; background: var(--bg); padding: 8px 0; }
  .legal-tabs a { justify-content: center; font-size: 13.5px; padding: 11px 8px; background: #fff; border-color: var(--line); }
  .legal-doc { padding: 22px 18px; }
}
.auth-pane > .role-pick { margin-top: 10px; }

/* ---------- Zaboravljena lozinka i pozivnica (isti raspored kao prijava) ---------- */
.auth-photo-alt { background-image: url("https://upload.wikimedia.org/wikipedia/commons/thumb/b/b7/Surveyor_on_site.jpg/1280px-Surveyor_on_site.jpg"); }
.auth-photo-invite { background-image: url("https://upload.wikimedia.org/wikipedia/commons/thumb/f/f7/Total_station_overlooking_a_residential_development.jpg/1280px-Total_station_overlooking_a_residential_development.jpg"); }
.auth-steps { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.auth-steps li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: #c3cde0; font-weight: 600; }
.auth-steps li span { width: 32px; height: 32px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); display: grid; place-items: center; font-size: 14px; font-weight: 800; flex-shrink: 0; }
.auth-steps li span svg.lucide { width: 16px; height: 16px; }
.auth-steps li.cur { color: #fff; }
.auth-steps li.cur span { background: var(--red); border-color: var(--red); color: #fff; }
.auth-steps li.done span { background: var(--ok); border-color: var(--ok); color: #fff; }
.auth-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; }
.auth-dots i { width: 28px; height: 5px; border-radius: 5px; background: var(--line); transition: background .3s; }
.auth-dots i.on { background: var(--red); }
.auth-ic { width: 60px; height: 60px; border-radius: 18px; background: var(--brand-50); color: var(--bordo); display: grid; place-items: center; }
.auth-ic svg.lucide { width: 28px; height: 28px; }
.auth-ic.ok { background: var(--ok-50); color: var(--ok); }
.auth-ic.big { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto; animation: pop .4s cubic-bezier(.2,.8,.2,1.4); }
.auth-ic.big svg.lucide { width: 38px; height: 38px; stroke-width: 2.6; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.auth-h { font-family: var(--display); font-size: 24px; letter-spacing: -.02em; margin: 6px 0 0 !important; }
.auth-p { color: var(--muted); font-size: 15.5px; margin: 6px 0 0 !important; }
.auth-done { text-align: center; }
.auth-back { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 12px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700; color: var(--ink-2); cursor: pointer; border-radius: 10px; }
.auth-back:hover { background: #eef1f6; color: var(--bordo); }
.auth-back svg.lucide { width: 17px; height: 17px; }
.af.has-error .input { border-color: var(--red); box-shadow: 0 0 0 3px var(--danger-50); }
.af.has-error::after { content: "Unesite ispravnu e-mail adresu"; display: block; color: var(--red-2); font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.pw-match { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13.5px; font-weight: 700; }
.pw-match[hidden] { display: none; }
.pw-match svg.lucide { width: 16px; height: 16px; }
.pw-match.ok { color: var(--ok); }
.pw-match.bad { color: var(--red-2); }
.invite-firm { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfe; margin-bottom: 18px; }
.invite-firm .gcard-logo { width: 64px; height: 64px; }
.invite-firm b { display: flex; align-items: center; gap: 5px; font-size: 16px; line-height: 1.3; }
.invite-firm span:not(.verified) { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
[data-resend]:disabled { opacity: 1; color: var(--muted); background: #f5f7fb; cursor: default; }
@media (max-width: 860px) {
  .auth-steps { display: none; }
  .auth-h { font-size: 21px; }
  .auth-ic { width: 52px; height: 52px; border-radius: 16px; }
}
