*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --red: #d60000;
    --red-hover: #b80000;
    --bg: #0d0d0d;
    --surface: #111;
    --card: #111;
    --border: #2b2b2b;
    --text: #f5f5f5;
    --text-muted: #a7a7a7;
    --green: #12a56b;
}

html, body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 900; letter-spacing: -.04em; margin-bottom: 12px; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }

.page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s;
}

.btn:hover:not(:disabled) {
    opacity: 0.85;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.sm {
    padding: 6px 14px;
    font-size: 0.825rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field input,
.field textarea {
    padding: 10px 13px;
    background: #0d0d0d;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    border-color: #555;
}

.field label {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #cfcfcf;
}

.field-optional {
    font-size: 11px;
    color: #555;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.auth-forgot { text-align: right; margin: -8px 0 18px; font-size: 13px; color: var(--text-muted); }
.auth-forgot a { color: var(--text-muted); }
.auth-forgot a:hover { color: #fff; }

/* Auth page */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 40px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #050505;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 36px;
}

.auth-card.wide {
    max-width: 680px;
}

.auth-logo {
    font-size: 28px;
    font-weight: 1000;
    letter-spacing: -.08em;
    margin-bottom: 28px;
}

.logo-eio { color: var(--red); }
.logo-sub { color: #555; font-size: 18px; letter-spacing: -.04em; }

.auth-card h1 {
    font-size: 24px;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: #777;
    margin-bottom: 28px;
}

.auth-card .btn {
    width: 100%;
    margin-top: 8px;
}

.auth-switch { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--text-muted); }
.auth-switch a { color: var(--red); font-weight: 700; }

.alert-error {
    background: rgba(214, 0, 0, 0.1);
    border: 1px solid rgba(214, 0, 0, 0.3);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    color: #f87171;
    margin-bottom: 16px;
}

.alert-success {
    background: rgba(18, 165, 107, 0.1);
    border: 1px solid rgba(18, 165, 107, 0.3);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
    color: #34d399;
    margin-bottom: 16px;
}

.validation-message { font-size: 12px; color: #f87171; margin-top: 2px; }

@media (max-width: 600px) {
    .field-row { grid-template-columns: 1fr; }
    .auth-card { padding: 28px 20px; }
}

/* ?? Form fields (account pages) ???????????????????? */
.field-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field-group--short { max-width: 200px; }
.field-hint-inline { font-size: 11px; font-weight: 400; color: var(--text-muted); text-transform: none; letter-spacing: 0; }
.field-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.field-input { background: #0d0d0d; border: 1px solid var(--border); border-radius: 8px; color: var(--text); padding: 11px 14px; font-size: 15px; font-family: inherit; width: 100%; transition: border-color .15s; }
.field-input:focus { outline: none; border-color: #555; }
.field-textarea { resize: vertical; min-height: 80px; }
.field-file { font-size: 13px; color: var(--text-muted); }
.field-hint { font-size: 12px; color: var(--text-muted); }
.field-error { font-size: 12px; color: #ff7b7b; margin-top: 2px; }

/* ?? Auth alerts ????????????????????????????????????? */
.auth-alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 20px; }
.auth-alert--error { background: #2d0a0a; border: 1px solid var(--red); color: #ff7b7b; }
.auth-alert--success { background: #0a2d1a; border: 1px solid var(--green); color: #5fdc9e; }
.auth-alert--warning { background: #2d2000; border: 1px solid #92400e; color: #fbbf24; }
.auth-description { color: var(--text-muted); margin: 0 0 20px; font-size: 14px; line-height: 1.6; }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-submit:disabled { opacity: .5; cursor: not-allowed; }

/* 🏷 Badges ⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛ */
.badge { display: inline-block; border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.badge.green { background: rgba(18,165,107,.15); color: #34d399; }
.badge.red { background: rgba(214,0,0,.12); color: #f87171; }
.badge.yellow { background: rgba(234,179,8,.15); color: #facc15; }
.badge.dark { background: rgba(255,255,255,.08); color: #cfcfcf; }

/* ⬜ Ghost button ⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛⬛ */
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn.ghost:hover:not(:disabled) { opacity: 1; border-color: #555; }


/* ?? 2FA key display ????????????????????????????????? */
.totp-key, .totp-uri { display: block; background: #111; border: 1px solid var(--border); border-radius: 6px; padding: 10px 14px; font-size: 13px; word-break: break-all; color: var(--text-muted); margin-top: 4px; }

/* ?? Danger button ??????????????????????????????????? */
.btn.danger { background: #7f1d1d; }
.btn.danger:hover:not(:disabled) { background: #991b1b; opacity: 1; }
