:root {
    color-scheme: dark;
    --bg: #080b12;
    --panel: #101621;
    --panel-soft: #151d2a;
    --line: #283449;
    --text: #f5f7fb;
    --muted: #9ca9bb;
    --accent: #00cbcb;
    --accent-dark: #05a1a1;
    --danger: #ff6b74;
    --shadow: 0 28px 80px rgba(0, 0, 0, .35);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 46%) 1fr; }
.brand-panel { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 92px); display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(145deg, #101722, #0b2b30); }
.brand-panel::before { content: ""; position: absolute; width: 540px; height: 540px; right: -230px; bottom: -220px; border: 1px solid rgba(0,203,203,.25); border-radius: 50%; box-shadow: 0 0 0 80px rgba(0,203,203,.04), 0 0 0 160px rgba(0,203,203,.025); }
.brand-panel > * { position: relative; z-index: 1; }
.brand-mark { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; background: var(--accent); color: #05110d; font-weight: 900; letter-spacing: -3px; font-size: 28px; box-shadow: 0 18px 46px rgba(0,203,203,.2); }
.brand-mark.small { width: 42px; height: 42px; border-radius: 13px; font-size: 16px; letter-spacing: -1px; flex: 0 0 auto; }
.eyebrow { margin: 0 0 18px; color: rgba(255,255,255,.66); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.eyebrow.accent { color: var(--accent); }
.brand-panel h1 { margin: 0; max-width: 660px; font-size: clamp(42px, 5vw, 78px); line-height: .98; letter-spacing: -.055em; }
.brand-copy { max-width: 580px; margin: 28px 0 0; color: #bdc9d4; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.6; }
.brand-foot { margin: 0; color: #7f918e; font-size: 13px; }
.form-panel { display: grid; place-items: center; padding: 44px 28px; }
.form-wrap { width: min(100%, 460px); }
.mobile-brand { display: none; align-items: center; gap: 12px; color: var(--text); font-weight: 800; }
.form-heading { margin-bottom: 34px; }
.form-heading h2 { margin: 0 0 12px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.035em; }
.form-heading p:last-child { margin: 0; color: var(--muted); line-height: 1.55; }
.auth-form { display: grid; gap: 13px; }
.auth-form label { color: #d8dee7; font-size: 14px; font-weight: 700; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.label-row a { font-size: 13px; }
input[type="email"], input[type="password"], input[type="text"] { width: 100%; min-height: 52px; border: 1px solid var(--line); border-radius: 13px; padding: 0 15px; background: var(--panel); color: var(--text); outline: none; transition: .2s ease; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,203,203,.1); }
.check-row { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; color: var(--muted) !important; font-weight: 500 !important; }
.check-row input { width: 17px; height: 17px; accent-color: var(--accent); }
.button { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 13px; padding: 0 20px; cursor: pointer; font-weight: 800; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); text-decoration: none; }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button.primary { background: var(--accent); color: #03130e; }
.button.primary:hover:not(:disabled) { background: #00e3c7; }
.button.secondary { border-color: var(--line); background: var(--panel); color: var(--text); }
.button.compact { min-height: 40px; padding: 0 15px; font-size: 13px; }
.separator { display: flex; align-items: center; gap: 12px; margin: 28px 0 20px; color: #687589; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.separator::before, .separator::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.passkey-icon { font-size: 24px; line-height: 0; color: var(--accent); }
.helper { min-height: 20px; margin: 10px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.helper.success { color: var(--accent); }
.helper.error { color: var(--danger); }
.privacy-note { margin: 30px 0 0; color: #647083; font-size: 12px; line-height: 1.55; text-align: center; }
.notice { margin-bottom: 24px; border: 1px solid; border-radius: 12px; padding: 13px 15px; font-size: 14px; line-height: 1.45; }
.notice.success { border-color: rgba(0,203,203,.3); background: rgba(0,203,203,.08); color: #80e3e3; }
.notice.error { border-color: rgba(255,107,116,.3); background: rgba(255,107,116,.08); color: #ffadb2; }
.text-button { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 8px; }
.text-button.centered { text-align: center; }

.app-body { background: #080b12; }
.app-header { height: 76px; padding: 0 clamp(20px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(8,11,18,.88); backdrop-filter: blur(16px); }
.app-brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.app-brand:hover { text-decoration: none; }
.app-brand > span:last-child { display: grid; }
.app-brand strong { font-size: 15px; }
.app-brand small { color: var(--muted); font-size: 11px; }
.app-user { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 14px; }
.dashboard-shell, .settings-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: clamp(42px, 7vw, 86px) 0; }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.dashboard-heading h1, .settings-shell h1 { margin: 0; font-size: clamp(38px, 5vw, 62px); letter-spacing: -.05em; }
.dashboard-heading p:last-child, .settings-intro { color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.metric-card, .status-card, .settings-card, .info-grid article { border: 1px solid var(--line); background: var(--panel); border-radius: 18px; }
.metric-card { padding: 24px; display: grid; gap: 10px; }
.metric-card span, .metric-card small { color: var(--muted); }
.metric-card strong { font-size: 38px; }
.status-card { margin-top: 18px; padding: 28px; display: flex; align-items: center; gap: 20px; }
.status-card h2, .settings-card h2 { margin: 0 0 8px; }
.status-card p, .settings-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.status-icon { width: 50px; height: 50px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(0,203,203,.12); color: var(--accent); font-size: 24px; }
.settings-shell { max-width: 880px; }
.settings-intro { max-width: 650px; margin-bottom: 34px; line-height: 1.6; }
.settings-card { padding: clamp(24px, 4vw, 38px); }
.register-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-top: 26px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.info-grid article { padding: 20px; display: grid; gap: 8px; }
.info-grid span { color: var(--muted); font-size: 13px; line-height: 1.45; }

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .brand-panel { display: none; }
    .mobile-brand { display: flex; margin-bottom: 54px; }
    .form-panel { min-height: 100vh; }
    .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .form-panel { align-items: start; padding: 28px 20px 44px; }
    .mobile-brand { margin-bottom: 42px; }
    .app-header { height: auto; min-height: 72px; padding: 14px 18px; }
    .app-user > span { display: none; }
    .dashboard-heading { align-items: flex-start; flex-direction: column; }
    .metric-grid, .info-grid { grid-template-columns: 1fr; }
    .register-row { grid-template-columns: 1fr; }
    .status-card { align-items: flex-start; }
}
