/* Auth screens (.au-) and first-run onboarding (.ob-). */

/* ---------- Split layout ---------- */
.au { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(440px, 1fr) minmax(0, 1.1fr); background: var(--surface); }
.au-side { display: flex; flex-direction: column; padding: 28px 44px; min-width: 0; }
.au-logo { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: var(--text); text-decoration: none !important; }
.au-mark { width: 30px; height: 28px; }
.au-card { width: 100%; max-width: 400px; margin: auto; padding: 36px 0; display: flex; flex-direction: column; gap: 16px; }
.au-card.is-wide { max-width: 480px; }
.au-in { animation: au-in 220ms var(--ease); }
@keyframes au-in { from { opacity: 0; transform: translateY(6px); } }
.au-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.au-sub { color: var(--text-2); font-size: 14px; margin-top: -6px; }
.au-foot { display: flex; gap: 18px; font-size: 12px; color: var(--text-3); }
.au-foot a { color: var(--text-3); }

/* ---------- Form pieces ---------- */
.au-google { gap: 10px; font-weight: 600; }
.au-google .ico { width: 18px; height: 18px; }
.au-or { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12.5px; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.au-pass { position: relative; }
.au-pass .input { padding-right: 42px; }
.au-pass [data-reveal] { position: absolute; right: 4px; top: 4px; }
.au-check { cursor: pointer; align-items: flex-start; }
.au-check .cbx { margin-top: 2px; }
.au-flash { animation: au-flash 700ms var(--ease); }
@keyframes au-flash { 0%, 40% { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); } }
.au-alert { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); font-size: 13px; line-height: 1.45; color: var(--text); }
.au-alert > .ico { margin-top: 1px; }
.au-alert.is-error { background: var(--danger-soft); } .au-alert.is-error > .ico { color: var(--danger); }
.au-alert.is-lock { background: var(--warning-soft); } .au-alert.is-lock > .ico { color: var(--warning); }
.au-alert.is-info { background: var(--brand-soft); } .au-alert.is-info > .ico { color: var(--brand-text); }
.au-demo { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 1px dashed color-mix(in srgb, var(--brand) 45%, transparent); background: color-mix(in srgb, var(--brand-soft) 60%, transparent); border-radius: var(--r-md); text-align: left; color: var(--text); transition: background var(--dur) var(--ease), border-color var(--dur); }
.au-demo:hover { border-color: var(--brand); background: var(--brand-soft); }
.au-demo > .ico { color: var(--brand-text); }
.au-demo > .ico:first-child { width: 18px; height: 18px; }
.au-demo b { display: block; font-size: 13.5px; font-weight: 600; }
.au-demo small { display: block; color: var(--text-2); font-size: 12px; }
.au-switch { text-align: center; font-size: 13.5px; color: var(--text-2); }
.au-link { align-self: center; font-size: 13px; font-weight: 500; color: var(--brand-text); }
.au-link:hover { text-decoration: underline; }
.au-back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 13px; color: var(--text-2); }
.au-badge { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-text); }
.au-badge.is-ok { background: var(--success-soft); color: var(--success); }
.au-center { text-align: center; }

/* OTP */
.au-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.au-otp .input { height: 56px; padding: 0; text-align: center; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; border-radius: var(--r-md); }
.au-otp .input:nth-child(4) { margin-left: 8px; }
.au-otp-meta { display: flex; align-items: center; gap: 8px; margin-top: -6px; font-size: 12.5px; color: var(--text-3); }
.au-totp { width: 16px; height: 16px; transform: rotate(-90deg); }
.au-totp circle { fill: none; stroke: var(--line-strong); stroke-width: 3; }
.au-totp [data-arc] { stroke: var(--brand); stroke-dasharray: 50.27; transition: stroke-dashoffset 1s linear; }
.au-rc { font-size: 16px; letter-spacing: .06em; }

/* Password strength */
.au-meter { display: flex; align-items: center; gap: 10px; margin-top: -8px; font-size: 12px; color: var(--text-3); }
.au-bars { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.au-bars i { height: 4px; border-radius: 4px; background: var(--surface-3); transition: background var(--dur); }
.au-meter[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.au-meter[data-level="2"] i:nth-child(-n+2) { background: var(--warning); }
.au-meter[data-level="3"] i:nth-child(-n+3) { background: var(--brand); }
.au-meter[data-level="4"] i { background: var(--success); }
.au-meter[data-level="1"] span { color: var(--danger); } .au-meter[data-level="4"] span { color: var(--success); }
.au-rules { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: -8px; font-size: 12px; color: var(--text-3); }
.au-rules li { display: inline-flex; align-items: center; gap: 4px; transition: color var(--dur); }
.au-rules li.is-ok { color: var(--success); }
.au-terms.is-invalid .cbx { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }

/* Welcome wizard */
.au-steps { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.au-steps i { width: 28px; height: 4px; border-radius: 4px; background: var(--surface-3); transition: background var(--dur); }
.au-steps i.is-on { background: var(--brand); }
.au-steps span { margin-left: 6px; }
.au-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.au-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); text-align: left; transition: border-color var(--dur), box-shadow var(--dur), background var(--dur); }
.au-choice:hover { border-color: var(--brand); }
.au-choice.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); background: color-mix(in srgb, var(--brand-soft) 50%, var(--surface)); }
.au-choice b { font-size: 14px; }
.au-choice small { color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.au-choice-lg { padding: 18px; gap: 4px; }
.au-choice-ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 8px; background: var(--surface-3); color: var(--text-2); transition: background var(--dur), color var(--dur); }
.au-choice.is-on .au-choice-ico { background: var(--brand); color: #fff; }
.au-option { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: var(--r-md); cursor: pointer; transition: border-color var(--dur), box-shadow var(--dur); }
.au-option.is-on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.au-option .radio { margin-top: 3px; }
.au-option b { display: block; font-size: 14px; }
.au-option small { display: block; font-size: 12.5px; }
.au-ready { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--brand-soft); }
.au-ready-mark { width: 40px; height: 38px; flex: none; }
.au-ready b { display: block; } .au-ready small { color: var(--text-2); font-size: 12.5px; }
.au-nav { margin-top: 6px; }

/* ---------- Brand side: product-true preview on charcoal ---------- */
.au-brand { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 44px; padding: 56px clamp(32px, 5vw, 76px); overflow: hidden; background-color: var(--side-bg); background-image: radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px); background-size: 22px 22px; color: #fff; }
.au-brand-copy h2 { max-width: 470px; font-size: clamp(24px, 2.3vw, 32px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: #fff; }
.au-brand-copy p { max-width: 440px; margin-top: 12px; font-size: 15px; color: var(--side-text); }
.au-stage { position: relative; width: 100%; max-width: 560px; height: 370px; }
.au-stage::before { content: ""; position: absolute; inset: 10% 5% 0 20%; background: rgba(14, 162, 222, .22); filter: blur(70px); border-radius: 50%; }
.au-mock { position: absolute; background: var(--surface); color: var(--text); border-radius: var(--r-lg); box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); }
.au-mock-list { left: 0; top: 0; width: 84%; padding: 14px 6px 8px; animation: au-float-in 500ms var(--ease) both; }
.au-mhead { display: flex; align-items: center; gap: 8px; padding: 0 10px 10px; margin-bottom: 4px; font-size: 14px; border-bottom: 1px solid var(--line); }
.au-mrow { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 10px; border-radius: var(--r-sm); font-size: 13.5px; }
.au-mrow + .au-mrow { border-top: 1px solid var(--line); border-radius: 0; }
.au-mtitle { flex: 1; transition: color var(--dur); }
.au-mrow.is-anim .drop-check { animation: drop-pop 360ms var(--ease) 1.6s; }
.au-mrow.is-anim .dc-shape { animation: au-fill 260ms var(--ease) 1.6s forwards; }
.au-mrow.is-anim .dc-tick { animation: au-tick 300ms var(--ease) 1.72s forwards; }
.au-mrow.is-anim .au-mtitle { animation: au-strike 1ms 1.8s forwards; }
@keyframes au-fill { to { fill: var(--brand); stroke: var(--brand); } }
@keyframes au-tick { to { stroke-dashoffset: 0; stroke: #fff; } }
@keyframes au-strike { to { color: var(--text-3); text-decoration: line-through; } }
.au-mock-card { right: 0; top: 168px; width: 52%; padding: 10px; background: var(--surface-2); animation: au-float-in 500ms var(--ease) 120ms both; }
.au-mcol { display: flex; justify-content: space-between; padding: 2px 4px 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.au-kcard { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-drag); transform: rotate(-2deg); }
.au-kcard p { font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.au-mock-timer { left: 6%; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border-radius: var(--r-pill); animation: au-float-in 500ms var(--ease) 240ms both; }
.au-mock-timer svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.au-mock-timer circle { fill: none; stroke-width: 4; }
.au-ring-bg { stroke: var(--surface-3); }
.au-ring-fg { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 100.5; stroke-dashoffset: 26; }
.au-mock-timer b { display: block; font-size: 16px; line-height: 1.1; }
.au-mock-timer small { font-size: 11.5px; color: var(--text-2); }
@keyframes au-float-in { from { opacity: 0; transform: translateY(14px); } }

@media (max-width: 1100px) { .au { grid-template-columns: minmax(400px, 1fr) minmax(0, .9fr); } .au-mock-card { display: none; } .au-mock-list { width: 100%; } }
@media (max-width: 860px) {
  .au { grid-template-columns: 1fr; }
  .au-brand { display: none; }
  .au-side { padding: 18px 20px; }
  .au-card { padding: 28px 0; }
  .au-title { font-size: 23px; }
  .au-otp { gap: 6px; } .au-otp .input { height: 50px; } .au-otp .input:nth-child(4) { margin-left: 4px; }
  .au-choices { grid-template-columns: 1fr; }
}

/* ---------- Onboarding welcome modal ---------- */
.ob-modal .modal-body { padding-top: 24px; }
.ob-hero { display: flex; align-items: flex-start; gap: 16px; }
.ob-mark { width: 52px; height: 48px; flex: none; }
.ob-title { margin-bottom: 6px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.ob-hero p { font-size: 13.5px; }
.ob-steps { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
.ob-steps li { display: flex; align-items: flex-start; gap: 12px; padding: 9px 10px; border-radius: var(--r-md); }
.ob-steps li:hover { background: var(--hover); }
.ob-num { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); font-size: 12px; font-weight: 700; }
.ob-steps b { display: block; font-size: 13.5px; font-weight: 600; }
.ob-steps small { display: block; font-size: 12.5px; color: var(--text-2); }
.ob-steps li.is-done .ob-num { background: var(--brand); color: #fff; }
.ob-steps li.is-done b { color: var(--text-3); text-decoration: line-through; }

/* ---------- Floating checklist ---------- */
.ob-chip { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px; border-radius: var(--r-pill); background: var(--side-bg); color: #fff; box-shadow: var(--shadow-3), inset 0 0 0 1px rgba(255, 255, 255, .12); font-size: 13px; font-weight: 600; transition: transform var(--dur) var(--ease); }
.ob-chip:hover { transform: translateY(-1px); }
.ob-chip b { color: #7fd3f3; font-weight: 600; }
.ob-chip.is-all b { color: #5fd3a8; }
.ob-ring { width: 20px; height: 20px; transform: rotate(-90deg); }
.ob-ring circle { fill: none; stroke-width: 3; }
.ob-ring circle:first-child { stroke: rgba(255, 255, 255, .18); }
.ob-ring circle + circle { stroke: var(--brand); stroke-dasharray: 50.27; stroke-linecap: round; transition: stroke-dashoffset 400ms var(--ease); }
.ob-panel { width: 320px; max-width: calc(100vw - 28px); overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-3); animation: menu-in 160ms var(--ease); }
.ob-panel-head { display: flex; align-items: center; gap: 4px; padding: 12px 8px 8px 14px; }
.ob-panel-head b { display: block; font-size: 14px; }
.ob-panel-head small { display: block; font-size: 12px; color: var(--text-2); }
.ob-prog { height: 4px; margin: 0 14px 6px; }
.ob-list { max-height: min(300px, 42vh); overflow-y: auto; padding: 4px 6px; }
.ob-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px; border-radius: var(--r-md); text-align: left; }
.ob-item:hover { background: var(--hover); }
.ob-tick { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--line-strong); border-radius: 50%; color: var(--text-2); }
.ob-item.is-done .ob-tick { background: var(--brand); border-color: var(--brand); color: #fff; }
.ob-item-title { display: block; font-size: 13px; font-weight: 500; }
.ob-item.is-done .ob-item-title { color: var(--text-3); text-decoration: line-through; }
.ob-item small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.ob-panel-foot { padding: 8px 12px 12px; }
.ob-burst { position: fixed; right: 90px; bottom: 170px; z-index: 130; pointer-events: none; }
.ob-burst span { position: absolute; width: 18px; height: 17px; transform: rotate(var(--a)) scale(var(--s)); animation: ob-burst 1.2s var(--ease) forwards; }
.ob-burst-mark { width: 100%; height: 100%; }
@keyframes ob-burst { to { transform: rotate(var(--a)) translateY(calc(var(--d) * -1)) scale(var(--s)); opacity: 0; } }
