/* Quizest — Sign in (on top of super/app.css for colours, buttons and toasts) */

body.auth { min-height: 100vh; background: var(--bg); }
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

/* ---------- brand side ---------- */
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 40px 48px; color: #fff;
    background: radial-gradient(600px 420px at 85% 10%, rgba(56, 189, 248, .35), transparent 60%), radial-gradient(520px 420px at 0% 100%, rgba(236, 72, 153, .3), transparent 60%), linear-gradient(150deg, #1e1b4b, #312e81 45%, #4f46e5); }
.auth-art::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.aa-brand { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.aa-brand img { display: block; width: 260px; height: auto; margin: -14px 0 0 -16px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .25)); }
.aa-brand.sm img { width: 150px; margin: -8px 0 -8px -10px; filter: none; }
.aa-brand.sm .on-dark, [data-theme="dark"] .aa-brand.sm .on-light { display: none; }
[data-theme="dark"] .aa-brand.sm .on-dark { display: block; }
.aa-copy { position: relative; z-index: 1; margin-top: auto; }
.aa-copy h1 { font-size: clamp(2rem, 3.2vw, 2.8rem); font-weight: 900; letter-spacing: -1px; line-height: 1.1; margin: 0; background: none; -webkit-text-fill-color: #fff; color: #fff; }
.aa-copy h1 span { background: linear-gradient(90deg, #fde68a, #f9a8d4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.aa-copy p { margin: 14px 0 0; font-size: 1rem; opacity: .85; max-width: 440px; }
.aa-cards { position: relative; z-index: 1; height: 220px; margin: 34px 0 26px; max-width: 460px; }
.aa-card { position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(10px); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .5); animation: float 6s ease-in-out infinite; }
.aa-card small { display: block; font-size: .66rem; opacity: .75; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; } .aa-card b { display: block; font-size: .92rem; } .aa-card em { font-style: normal; font-size: .74rem; opacity: .85; }
.aa-card.c1 { top: 0; left: 0; } .aa-card.c2 { top: 70px; right: 0; animation-delay: -2s; } .aa-card.c3 { bottom: 0; left: 40px; animation-delay: -4s; }
.aa-card .dot { width: 10px; height: 10px; border-radius: 50%; background: #fb7185; box-shadow: 0 0 0 4px rgba(251, 113, 133, .3); }
.aa-card .ring { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#34d399 82%, rgba(255, 255, 255, .2) 0); }
.aa-card .ring b { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #3730a3; font-size: .72rem; }
.aa-card > .fa-fire { font-size: 1.4rem; color: #fbbf24; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.aa-points { position: relative; z-index: 1; list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .86rem; opacity: .9; }
.aa-points i { width: 22px; color: #a5b4fc; }

/* ---------- form side ---------- */
.auth-side { display: flex; flex-direction: column; align-items: center; padding: 24px 24px 30px; }
.auth-top { display: flex; align-items: center; width: 100%; max-width: 440px; margin-bottom: auto; }
.auth-card { width: 100%; max-width: 440px; margin: 30px 0; padding: 30px 30px 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .35); }
.auth-card.in { animation: cardIn .3s ease; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.auth-card h2 { font-size: 1.5rem; font-weight: 900; letter-spacing: -.5px; margin: 0; background: none; -webkit-text-fill-color: currentColor; color: var(--text); }
.a-sub { margin: 6px 0 18px; font-size: .86rem; color: var(--text-2); }
.a-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 18px; }
.a-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border: 0; border-radius: 11px; background: none; color: var(--muted); font-weight: 700; font-size: .84rem; }
.a-tabs button.on { background: var(--surface); color: var(--primary); box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .18); }
.fl { margin-bottom: 14px; }
.fl label { display: block; font-size: .78rem; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.auth-card .form-control { height: 48px; border-radius: 12px; font-size: .95rem; }
.up { text-transform: uppercase; letter-spacing: .06em; }
.pw-wrap { position: relative; } .pw-wrap .form-control { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--muted); border-radius: 9px; }
.pw-eye:hover { color: var(--text); background: var(--surface-2); }
.caps { margin-top: 6px; font-size: .74rem; font-weight: 700; color: var(--amber); } .caps i { margin-right: 6px; }
.org-chip { display: flex; align-items: center; gap: 10px; margin: -6px 0 14px; padding: 9px 12px; border-radius: 12px; font-size: .8rem; border: 1px solid var(--border); }
.org-chip.ok { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 35%, var(--border)); } .org-chip.ok > i { color: var(--green); margin-left: auto; }
.org-chip.warn { background: var(--amber-soft); } .org-chip.warn > i { color: var(--amber); margin-left: auto; }
.org-chip.bad { background: var(--surface-2); color: var(--text-2); } .org-chip.bad > i { color: var(--muted); }
.org-chip b { font-size: .86rem; } .org-chip small { font-size: .72rem; color: var(--text-2); }
.oc-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-size: .72rem; font-weight: 900; color: #fff; background: linear-gradient(135deg, #818cf8, #4f46e5); }
.oc-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; background: #fff; }
.a-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 2px 0 18px; }
.a-check { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-2); cursor: pointer; margin: 0; }
.a-check .form-check-input { margin: 0; }
.a-link { border: 0; background: none; padding: 0; color: var(--primary); font-size: .82rem; font-weight: 700; }
.a-link:hover { text-decoration: underline; }
.a-go { width: 100%; height: 50px; justify-content: center; font-size: .95rem; border-radius: 14px; gap: 8px; }
.a-go:disabled { opacity: .6; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.a-err { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 14px; border-radius: 12px; background: var(--rose-soft); color: var(--text); font-size: .82rem; border: 1px solid color-mix(in srgb, var(--rose) 35%, var(--border)); animation: shake .35s; }
.a-err i { color: var(--rose); margin-top: 3px; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.a-foot { margin: 18px 0 0; font-size: .76rem; color: var(--muted); text-align: center; }
.a-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 14px; }
.a-ic.amber { background: var(--amber-soft); color: var(--amber); } .a-ic.violet { background: var(--violet-soft); color: var(--violet); } .a-ic.blue { background: var(--primary-soft); color: var(--primary); } .a-ic.green { background: var(--green-soft); color: var(--green); }
.a-note { display: flex; gap: 10px; padding: 10px 12px; margin: 0 0 16px; border-radius: 12px; background: var(--surface-2); font-size: .8rem; color: var(--text-2); }
form + .a-note { margin-top: 16px; }
.a-note i { color: var(--primary); margin-top: 3px; }
.a-back { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; border: 0; background: none; color: var(--text-2); font-size: .84rem; font-weight: 600; padding: 8px; border-radius: 10px; }
.a-back:hover { background: var(--surface-2); color: var(--text); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 4px 0 12px; }
.otp .form-control { height: 56px !important; text-align: center; font-size: 1.4rem; font-weight: 800; padding: 0; font-variant-numeric: tabular-nums; }
.a-resend { text-align: center; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: -6px 0 4px; }
.pw-meter span { height: 5px; border-radius: 4px; background: var(--surface-3); }
.pw-meter .s1 { background: var(--rose); } .pw-meter .s2 { background: var(--amber); } .pw-meter .s3 { background: #84cc16; } .pw-meter .s4 { background: var(--green); }
.a-hint { font-size: .74rem; color: var(--muted); margin-bottom: 14px; }
.a-done { text-align: center; padding: 20px 0 8px; }
.a-ok { width: 72px; height: 72px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.8rem; color: #fff; background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 12px 30px -10px #059669; margin-bottom: 14px; animation: pop .4s ease; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.a-bar { height: 5px; border-radius: 4px; background: var(--surface-3); overflow: hidden; margin: 18px auto 0; max-width: 200px; }
.a-bar span { display: block; height: 100%; width: 0; background: var(--primary); animation: fill 1.4s ease forwards; }
@keyframes fill { to { width: 100%; } }

/* help + demo */
.auth-help { width: 100%; max-width: 440px; margin-top: auto; font-size: .78rem; color: var(--muted); text-align: center; }
.auth-help a { color: var(--text-2); font-weight: 600; }
.demo { margin-top: 14px; text-align: left; border: 1px dashed var(--border); border-radius: 14px; padding: 10px 12px; background: var(--surface); }
.demo summary { cursor: pointer; font-weight: 700; color: var(--text-2); list-style: none; } .demo summary::-webkit-details-marker { display: none; } .demo summary i { color: var(--amber); margin-right: 8px; }
.demo-list { display: grid; gap: 4px; margin-top: 10px; }
.demo-list button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--text); }
.demo-list button:hover { background: var(--primary-soft); }
.demo-list i { width: 18px; color: var(--primary); } .demo-list b { display: block; font-size: .8rem; } .demo-list small { font-size: .7rem; color: var(--muted); }
.demo-k { display: block; margin-top: 8px; font-size: .72rem; }

@media (max-width: 991.98px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .auth-side { background: radial-gradient(500px 300px at 100% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%), var(--bg); }
}
@media (max-width: 575.98px) {
    .auth-side { padding: 16px 14px 24px; }
    .auth-card { padding: 22px 18px 20px; border-radius: 20px; margin: 18px 0; }
    .auth-card h2 { font-size: 1.3rem; }
    .otp { gap: 6px; } .otp .form-control { height: 50px !important; font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) { .aa-card, .auth-card.in, .a-err, .a-ok { animation: none; } }
.up::placeholder { text-transform: none; letter-spacing: 0; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; }
.otp .form-control.is-invalid, .otp .form-control.is-valid { background-image: none; padding: 0; }
