/* ======================================================================
   CaptureWizard — AUTH add-ons
   Extends the existing .auth-wrap/.auth-card/.btn-google/.or-div/.auth-alt
   classes in styles.css. New components only; never modifies styles.css.
   Prefix: .au-
   ====================================================================== */

/* slim top bar above the auth card */
.au-top { position:absolute; top:0; left:0; right:0; display:flex; align-items:center; justify-content:space-between; padding:18px 24px; }
.au-top .brand-name { font-size:17px; }
.au-back { display:inline-flex; align-items:center; gap:7px; font-size:13.5px; font-weight:600; color:var(--muted); }
.au-back:hover { color:var(--ink); }
.au-back svg { width:16px; height:16px; }

.auth-wrap { position:relative; }

/* wider card option for 2FA / OTP */
.auth-card.au-wide { max-width:460px; }

/* labels + fields already styled by styles.css (.field/.input).
   Add: password field with reveal toggle */
.au-pass { position:relative; }
.au-pass .input { padding-right:44px; }
.au-eye { position:absolute; right:6px; top:50%; transform:translateY(-50%); width:32px; height:32px; border:none; background:none; cursor:pointer; color:var(--faint); display:flex; align-items:center; justify-content:center; border-radius:8px; }
.au-eye:hover { color:var(--text-2); background:var(--soft); }
.au-eye svg { width:18px; height:18px; }

/* inline field meta row (label + helper link) */
.au-label-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:7px; }
.au-label-row label { margin:0; }
.au-label-row a { font-size:12.5px; font-weight:700; color:var(--teal-deep); }
.au-label-row a:hover { text-decoration:underline; }

/* password strength meter */
.au-strength { margin-top:10px; }
.au-strength-bars { display:flex; gap:6px; }
.au-strength-bars span { flex:1; height:5px; border-radius:3px; background:#E6ECEA; transition:background .2s ease; }
.au-strength[data-score="1"] .au-strength-bars span:nth-child(-n+1),
.au-strength[data-score="2"] .au-strength-bars span:nth-child(-n+2),
.au-strength[data-score="3"] .au-strength-bars span:nth-child(-n+3),
.au-strength[data-score="4"] .au-strength-bars span:nth-child(-n+4) { background:var(--meter,#16A34A); }
.au-strength[data-score="1"] { --meter:var(--coral); }
.au-strength[data-score="2"] { --meter:var(--amber-2); }
.au-strength[data-score="3"] { --meter:#3FB36F; }
.au-strength[data-score="4"] { --meter:#16A34A; }
.au-strength-meta { display:flex; align-items:center; justify-content:space-between; margin-top:7px; font-size:12px; }
.au-strength-label { font-weight:700; color:var(--muted); }
.au-strength[data-score="1"] .au-strength-label { color:var(--coral); }
.au-strength[data-score="2"] .au-strength-label { color:var(--rust-2); }
.au-strength[data-score="3"] .au-strength-label,
.au-strength[data-score="4"] .au-strength-label { color:#16A34A; }
.au-strength-hint { color:var(--faint); }

/* checkbox row (terms, remember me) */
.au-check { display:flex; align-items:flex-start; gap:10px; cursor:pointer; font-size:13px; color:var(--text-2); line-height:1.5; }
.au-check input { position:absolute; opacity:0; width:0; height:0; }
.au-box { width:18px; height:18px; border-radius:6px; border:1.5px solid #CBD6D2; flex-shrink:0; margin-top:1px; display:flex; align-items:center; justify-content:center; transition:.15s ease; background:#fff; }
.au-box svg { width:12px; height:12px; color:#fff; opacity:0; }
.au-check input:checked + .au-box { background:var(--teal); border-color:var(--teal); }
.au-check input:checked + .au-box svg { opacity:1; }
.au-check input:focus-visible + .au-box { box-shadow:0 0 0 3px rgba(7,183,155,.2); }
.au-check a { color:var(--teal-deep); font-weight:700; }
.au-check a:hover { text-decoration:underline; }

.au-row-between { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:2px 0 4px; }

/* field error + success states */
.field.has-error .input { border-color:var(--coral); }
.field.has-error .input:focus { box-shadow:0 0 0 3px rgba(255,111,97,.16); }
.au-field-msg { display:flex; align-items:center; gap:6px; font-size:12.5px; margin-top:7px; }
.au-field-msg.err { color:#D6453B; }
.au-field-msg.ok { color:#16A34A; }
.au-field-msg svg { width:14px; height:14px; flex-shrink:0; }

/* alert banner (server-side errors / notices) — extends styles.css .notice idea */
.au-alert { display:flex; gap:11px; align-items:flex-start; border-radius:12px; padding:13px 15px; font-size:13.5px; line-height:1.5; margin-bottom:20px; }
.au-alert svg { width:18px; height:18px; flex-shrink:0; margin-top:1px; }
.au-alert strong { font-weight:700; }
.au-alert.err { background:#FFEDEA; border:1px solid #FAD2CB; color:#9B3024; }
.au-alert.err svg { color:var(--coral); }
.au-alert.err strong { color:#7E251B; }
.au-alert.warn { background:var(--tint-amber); border:1px solid #F3E6D2; color:#7A4A12; }
.au-alert.warn svg { color:var(--amber-2); }
.au-alert.info { background:var(--tint-teal); border:1px solid #CDEFE6; color:var(--teal-deep); }
.au-alert.info svg { color:var(--teal); }

/* OTP / 6-digit code boxes */
.au-otp { display:flex; gap:10px; justify-content:center; margin:6px 0 4px; }
.au-otp input { width:48px; height:56px; text-align:center; font-family:var(--font-display); font-size:24px; font-weight:700; color:var(--ink); border:1.5px solid #DCE6E3; border-radius:12px; background:#fff; transition:.15s ease; }
.au-otp input:focus { outline:none; border-color:var(--teal); box-shadow:0 0 0 3px rgba(7,183,155,.16); }
.au-otp.is-error input { border-color:var(--coral); }
@media (max-width:420px){ .au-otp input { width:42px; height:50px; font-size:21px; } .au-otp { gap:7px; } }

/* big status icon (verify / success states) */
.au-status-ic { width:72px; height:72px; border-radius:20px; display:flex; align-items:center; justify-content:center; margin:0 auto 18px; }
.au-status-ic svg { width:34px; height:34px; }
.au-status-ic.teal { background:var(--tint-teal); color:var(--teal); }
.au-status-ic.green { background:#E6F6EA; color:#16A34A; }
.au-status-ic.amber { background:var(--tint-amber); color:var(--rust-2); }
.au-status-ic.coral { background:#FFEDEA; color:var(--coral); }

/* email chip echo ("we sent a link to x") */
.au-email-chip { display:inline-flex; align-items:center; gap:8px; font-family:var(--font-mono); font-size:13px; color:var(--ink); background:var(--soft); border:1px solid var(--border); border-radius:10px; padding:8px 13px; margin:2px 0 4px; }
.au-email-chip svg { width:15px; height:15px; color:var(--teal); }

/* resend / countdown line */
.au-resend { font-size:13px; color:var(--muted); }
.au-resend a, .au-resend button { color:var(--teal-deep); font-weight:700; background:none; border:none; cursor:pointer; font-size:13px; font-family:inherit; padding:0; }
.au-resend a:hover, .au-resend button:hover { text-decoration:underline; }
.au-resend .muted { color:var(--faint); }

/* divider helper already in styles.css (.or-div) */

/* avatar preview for account-link page */
.au-link-id { display:flex; align-items:center; gap:12px; background:var(--surface-2); border:1px solid var(--border); border-radius:14px; padding:13px 15px; margin-bottom:18px; }
.au-link-id .av { width:42px; height:42px; border-radius:50%; flex-shrink:0; background:linear-gradient(135deg,var(--violet),var(--blue)); }
.au-link-id .meta { line-height:1.35; min-width:0; }
.au-link-id .nm { font-size:14px; font-weight:700; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.au-link-id .em { font-family:var(--font-mono); font-size:12px; color:var(--muted); }
.au-link-id .g-badge { margin-left:auto; width:26px; height:26px; border-radius:50%; background:#fff; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.au-link-id .g-badge .g-dot { width:15px; height:15px; }

.au-foot-note { text-align:center; font-size:12px; color:var(--faint); margin-top:18px; line-height:1.5; }
.au-foot-note a { color:var(--muted); font-weight:700; }
.au-foot-note a:hover { color:var(--ink); }
