/* ===================== MÀN HÌNH ĐĂNG NHẬP (.au-) ===================== */
.app-auth { position: fixed; inset: 0; overflow: auto; background: var(--bg); }
.au-root { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); }

/* ---------- Cột giới thiệu ---------- */
.au-hero { position: relative; overflow: hidden; color: #fff; display: flex; align-items: center; padding: 48px 56px;
  background: linear-gradient(145deg, hsl(var(--accent-h) calc(var(--accent-s) * 0.7) 38%), hsl(calc(var(--accent-h) + 40) calc(var(--accent-s) * 0.7) 28%)); }
.au-hero__orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; animation: au-float 14s ease-in-out infinite; }
.au-hero__orb--1 { width: 360px; height: 360px; background: hsl(calc(var(--accent-h) + 60) calc(var(--accent-s) * 0.9) 62%); top: -90px; left: -80px; }
.au-hero__orb--2 { width: 300px; height: 300px; background: hsl(calc(var(--accent-h) - 30) calc(var(--accent-s) * 0.9) 62%); bottom: -70px; right: -40px; animation-delay: -5s; }
.au-hero__orb--3 { width: 200px; height: 200px; background: #fff; opacity: .16; top: 45%; left: 55%; animation-delay: -9s; }
@keyframes au-float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(24px, -30px) scale(1.08); } }
.au-hero__inner { position: relative; max-width: 520px; display: flex; flex-direction: column; gap: 18px; z-index: 1; }
.au-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.au-brand__logo { width: 48px; height: 48px; border-radius: 15px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .3); }
.au-brand__name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.au-hero__title { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; }
.au-hero__lead { font-size: var(--fs-lg); opacity: .88; line-height: 1.5; max-width: 460px; }

.au-mock { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .26); border-radius: 22px; padding: 14px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); max-width: 400px; }
.au-mock__bar { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.au-mock__bar small { display: block; opacity: .75; font-size: var(--fs-xs); }
.au-mock__avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: rgba(255, 255, 255, .26); }
.au-mock__feed { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; min-height: 196px; justify-content: flex-end; }
.au-mock__msg { max-width: 82%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: rgba(255, 255, 255, .92); color: #1a2036; font-size: var(--fs-sm); animation: au-in .35s var(--ease); display: flex; flex-direction: column; }
.au-mock__msg.is-me { align-self: flex-end; background: rgba(20, 28, 70, .55); color: #fff; border-radius: 14px 14px 4px 14px; }
.au-mock__msg.is-bot { background: #fff3c4; }
.au-mock__name { font-size: 11px; font-weight: 700; opacity: .65; }
.au-mock__typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .6); }
.au-mock__typing.is-me { align-self: flex-end; }
.au-mock__typing span { width: 6px; height: 6px; border-radius: 50%; background: #5a6482; animation: au-dot 1s infinite; }
.au-mock__typing span:nth-child(2) { animation-delay: .15s; } .au-mock__typing span:nth-child(3) { animation-delay: .3s; }
@keyframes au-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes au-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

.au-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.au-feature { display: none; align-items: center; gap: 12px; }
.au-feature.is-active { display: flex; animation: au-in .4s var(--ease); }
.au-feature__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); flex: none; }
.au-feature__txt { display: flex; flex-direction: column; }
.au-feature__txt span { font-size: var(--fs-sm); opacity: .82; }
.au-dots { display: flex; gap: 6px; }
.au-dot { width: 8px; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .4); transition: width var(--dur), background var(--dur); }
.au-dot.is-active { width: 24px; background: #fff; }

/* ---------- Cột biểu mẫu ---------- */
.au-panel { display: flex; flex-direction: column; min-height: 100vh; padding: 20px 28px 28px; background: var(--bg); }
.au-panel__top { display: flex; align-items: center; gap: 8px; }
.au-spacer { flex: 1; }
.au-pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
button.au-pill:hover { background: var(--surface-2); color: var(--text); }
.au-pill--mode { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.au-panel__center { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; padding: 24px 0; }
.au-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 26px; box-shadow: var(--shadow-2); padding: 28px; }
.au-legal { max-width: 420px; text-align: center; font-size: var(--fs-xs); color: var(--text-3); }

.au-tabs { display: flex; padding: 4px; border-radius: var(--r-pill); background: var(--surface-2); margin-bottom: 22px; }
.au-tab { flex: 1; height: 38px; border-radius: var(--r-pill); font-weight: 700; color: var(--text-2); transition: all var(--dur-fast); }
.au-tab.is-active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-1); }
.au-title { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.02em; }
.au-sub { margin: 6px 0 20px; color: var(--text-2); font-size: var(--fs-sm); line-height: 1.5; }
.au-form { display: flex; flex-direction: column; gap: 14px; }
.au-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.au-link { color: var(--accent); font-weight: 600; font-size: var(--fs-sm); }
.au-link:hover { text-decoration: underline; }
.au-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-sm); margin-bottom: 14px; }
.au-back:hover { color: var(--text); }
.au-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-2); cursor: pointer; }
.au-check input { width: 17px; height: 17px; accent-color: var(--accent); }
.au-submit { margin-top: 4px; }
.au-submit.is-busy { opacity: .7; }

/* ---------- Ô nhập có nhãn nổi ---------- */
.au-field { display: flex; flex-direction: column; gap: 5px; }
.au-field__shell { display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1.5px solid transparent; transition: border-color var(--dur-fast), background var(--dur-fast), box-shadow var(--dur-fast); }
.au-field__shell:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px hsl(var(--accent-h) calc(var(--accent-s) * 0.9) 60% / .16); }
.au-field.is-invalid .au-field__shell { border-color: var(--danger); background: var(--danger-soft); }
.au-field__icon { color: var(--text-3); display: inline-flex; }
.au-field__shell:focus-within .au-field__icon { color: var(--accent); }
.au-field__box { position: relative; flex: 1; min-width: 0; height: 100%; }
.au-input { position: absolute; inset: 0; width: 100%; padding: 20px 0 4px; border: 0; background: transparent; outline: 0; color: var(--text); font-size: var(--fs-md); }
.au-field__label { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; transition: all var(--dur-fast) var(--ease); transform-origin: left; }
.au-input:focus + .au-field__label, .au-input:not(:placeholder-shown) + .au-field__label { top: 13px; transform: translateY(-50%) scale(.78); color: var(--accent); font-weight: 600; }
.au-field.is-invalid .au-input:focus + .au-field__label, .au-field.is-invalid .au-input:not(:placeholder-shown) + .au-field__label { color: var(--danger); }
.au-field__status { display: inline-flex; color: var(--text-3); }
.au-field.is-invalid .au-field__status { color: var(--danger); }
.au-field.is-valid .au-field__status { color: var(--success); }
.au-field__toggle { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; color: var(--text-3); }
.au-field__toggle:hover { background: var(--hover); color: var(--text); }
.au-field__msg { min-height: 0; font-size: var(--fs-xs); color: var(--text-3); padding: 0 4px; }
.au-field__msg:empty { display: none; }
.au-field__msg.is-error { color: var(--danger); }
.au-field__msg.is-success { color: var(--success); }

.au-meter { display: flex; align-items: center; gap: 10px; margin-top: -6px; }
.au-meter__bar { display: flex; gap: 4px; flex: 1; }
.au-meter__seg { height: 5px; flex: 1; border-radius: 3px; background: var(--surface-3); transition: background var(--dur); }
.au-meter[data-score="1"] .au-meter__seg.is-on { background: var(--danger); }
.au-meter[data-score="2"] .au-meter__seg.is-on { background: var(--warning); }
.au-meter[data-score="3"] .au-meter__seg.is-on { background: #7cb342; }
.au-meter[data-score="4"] .au-meter__seg.is-on { background: var(--success); }
.au-meter__label { font-size: var(--fs-xs); color: var(--text-2); min-width: 64px; text-align: right; }

.au-banner { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: var(--r-md); font-size: var(--fs-sm); line-height: 1.45; }
.au-banner.is-error { background: var(--danger-soft); color: var(--danger); }
.au-banner.is-success { background: hsl(142 60% 40% / .14); color: var(--success); }
.au-banner.is-info { background: var(--accent-soft); color: var(--accent); }
.au-or { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--text-3); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.au-google { width: 100%; height: 46px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: var(--r-md); border: 1px solid var(--border-strong); font-weight: 600; background: var(--surface); }
.au-google:hover { background: var(--surface-2); }
.au-google__g { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); color: #fff; font-size: 12px; font-weight: 800; }

.au-demo { margin-top: 22px; padding: 14px; border-radius: var(--r-lg); background: var(--accent-soft); }
.au-demo__head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.au-demo__text { margin: 4px 0 10px; font-size: var(--fs-xs); color: var(--text-2); }
.au-demo__list { display: flex; flex-wrap: wrap; gap: 8px; }
.au-demo__item { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); font-weight: 600; }
.au-demo__item:hover:not(:disabled) { border-color: var(--accent); }
.au-demo__avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-text); font-size: 12px; background: linear-gradient(135deg, var(--accent-2), var(--accent-strong)); }

@media (max-width: 900px) {
  .au-root { grid-template-columns: 1fr; }
  .au-hero { display: none; }
  .au-panel { padding: 14px 16px 20px; min-height: 100dvh; }
  .au-card { padding: 22px 18px; border-radius: 22px; }
}

/* ===================== ONBOARDING (.ob) ===================== */
.ob-modal { max-width: 560px !important; }
.ob { display: flex; flex-direction: column; min-height: 520px; padding: 22px 26px 22px; }
.ob__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ob__bar .kit-progress { flex: 1; }
.ob__count { font-size: var(--fs-xs); color: var(--text-3); font-weight: 700; }
.ob__body { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.ob__hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 6px; }
.ob__hero-ic { width: 72px; height: 72px; border-radius: 24px; display: grid; place-items: center; color: var(--accent-text); background: linear-gradient(135deg, var(--accent-2), var(--accent-strong)); box-shadow: var(--shadow-2); margin-bottom: 6px; }
.ob__hero h2 { font-size: var(--fs-xl); letter-spacing: -.02em; }
.ob__hero p { color: var(--text-2); max-width: 400px; }
.ob__list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ob__list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); }
.ob__list .kit-icon { color: var(--success); }
.ob__foot { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.ob__spacer { flex: 1; }
.ob__profile { display: flex; gap: 20px; align-items: flex-start; }
.ob__avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ob__fields { flex: 1; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ob__label { font-weight: 700; font-size: var(--fs-sm); color: var(--text-2); }
.ob__choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ob__choice { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border-radius: var(--r-lg); border: 2px solid var(--border); font-weight: 600; color: var(--text-2); }
.ob__choice:hover { border-color: var(--border-strong); }
.ob__choice.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.ob__accents { display: flex; gap: 12px; flex-wrap: wrap; }
.ob__accent { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-1); transition: transform var(--dur-fast); }
.ob__accent:hover { transform: scale(1.1); }
.ob__accent.is-active { outline: 3px solid var(--text); outline-offset: 2px; }
.ob__results { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.ob__person { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-md); }
.ob__person:hover { background: var(--hover); }
.ob__person-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ob__person-txt small { color: var(--text-3); }
.ob__hint { color: var(--text-3); font-size: var(--fs-sm); text-align: center; }
.ob__center { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.ob__tips { display: grid; gap: 8px; }
.ob__tip { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); }
.ob__tip .kit-icon { color: var(--accent); }
@media (max-width: 560px) { .ob { padding: 18px 16px; min-height: 0; } .ob__profile { flex-direction: column; align-items: stretch; } .ob__avatar-wrap { flex-direction: row; justify-content: center; } }

/* Cột giới thiệu kiểu cổ điển */
html[data-accent="classic"] .au-hero { background: linear-gradient(145deg, #3a3f4b, #1b1e25); }
html[data-accent="classic"] .au-hero__orb { opacity: .18; }

/* Cột giới thiệu riêng của Tám Chat: gradient xanh, tím, hồng */
html[data-accent="tam"] .au-hero { background: linear-gradient(135deg, #3b6bff 0%, #7c5cff 48%, #e056b0 100%); }
html[data-accent="tam"] .au-hero__orb--1 { background: #6ea8ff; }
html[data-accent="tam"] .au-hero__orb--2 { background: #ff7ac6; }
html[data-accent="tam"] .au-hero__orb { opacity: .45; }
html[data-accent="tam"] .au-brand__logo { background: rgba(255, 255, 255, .24); }
