/* ===========================================
   AUTH — Clean dark login/register page
   =========================================== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
    --auth-bg: #090909;
    --auth-surface: #111111;
    --auth-surface2: #161616;
    --auth-border: #1e1e1e;
    --auth-border-hover: #2a2a2a;
    --auth-text: #e2e2e2;
    --auth-text2: #888;
    --auth-text3: #555;
    --auth-gold: #D4AF37;
    --auth-gold-dim: rgba(212,175,55,.12);
    --auth-red: #f87171;
    --auth-green: #34d399;
    --auth-radius: 12px;
    --auth-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
    height: 100%;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: var(--auth-font);
    -webkit-font-smoothing: antialiased;
}

/* --- Page layout: centered card --- */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    position: relative;
}

/* subtle radial glow behind card */
.auth-page::before {
    content: '';
    position: fixed;
    top: 30%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(212,175,55,.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.auth-back {
    position: fixed;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--auth-text3);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    z-index: 10;
    transition: color .15s;
}

.auth-back:hover { color: var(--auth-text); }
.auth-back svg { flex-shrink: 0; }

/* --- Card --- */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: 16px;
    padding: 40px 36px 36px;
    position: relative;
    z-index: 1;
    box-shadow: 0 24px 80px rgba(0,0,0,.4);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.5px;
}

.auth-logo-text span {
    color: var(--auth-gold);
}

.auth-logo-sub {
    font-size: 13px;
    color: var(--auth-text3);
    margin-top: 4px;
}

/* --- Tabs --- */
.auth-tabs {
    display: flex;
    background: var(--auth-bg);
    border-radius: 10px;
    padding: 3px;
    margin-bottom: 28px;
    gap: 0;
}

.msc-auth-tab {
    flex: 1;
    padding: 9px 0;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--auth-text3);
    cursor: pointer;
    font-family: var(--auth-font);
    transition: all .15s;
}

.msc-auth-tab:hover { color: var(--auth-text2); }

.msc-auth-tab.active {
    background: var(--auth-surface2);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* --- Banners --- */
.msc-auth-banners {
    margin-bottom: 16px;
}

.msc-banner {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.msc-banner-error {
    background: rgba(248,113,113,.08);
    border: 1px solid rgba(248,113,113,.2);
    color: var(--auth-red);
}

.msc-banner-info {
    background: var(--auth-gold-dim);
    border: 1px solid rgba(212,175,55,.2);
    color: var(--auth-gold);
}

/* --- Panels --- */
.msc-auth-panel {
    animation: authFadeIn .2s ease;
}

.msc-auth-panel.hidden { display: none; }

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Panel header */
.msc-panel-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.msc-ph-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.msc-ph-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: -.3px;
}

.msc-ph-sub {
    font-size: 13px;
    color: var(--auth-text2);
    margin: 0;
    line-height: 1.4;
}

.msc-panel-intro {
    font-size: 13px;
    color: var(--auth-text2);
    line-height: 1.5;
    margin-bottom: 20px;
}

.msc-panel-intro p { margin: 0 0 6px; }

/* --- Form fields --- */
.msc-form { display: flex; flex-direction: column; gap: 0; }

.msc-field {
    margin-bottom: 18px;
}

.msc-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--auth-text2);
    margin-bottom: 7px;
    letter-spacing: .3px;
}

.msc-field label small {
    font-weight: 400;
    color: var(--auth-text3);
}

.msc-field input[type="email"],
.msc-field input[type="text"],
.msc-field input[type="password"] {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: var(--auth-bg);
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    color: var(--auth-text);
    font-size: 14px;
    font-family: var(--auth-font);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.msc-field input:focus {
    border-color: var(--auth-gold);
    box-shadow: 0 0 0 3px var(--auth-gold-dim);
}

.msc-field input::placeholder { color: var(--auth-text3); }

/* Password wrap */
.msc-pass-wrap {
    position: relative;
    display: flex;
}

.msc-pass-wrap input { padding-right: 44px; flex: 1; }

.msc-pass-toggle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    display: grid;
    place-items: center;
    background: transparent;
    border: none;
    color: var(--auth-text3);
    cursor: pointer;
    transition: color .15s;
}

.msc-pass-toggle:hover { color: var(--auth-text); }

.msc-pass-ico { display: block; width: 18px; height: 18px; }
.msc-pass-ico svg { width: 100%; height: 100%; }

/* Grid for register */
.msc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}

/* Consent checkbox */
.msc-consent { margin-bottom: 20px; }

.msc-consent-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    color: var(--auth-text2);
    cursor: pointer;
    line-height: 1.5;
}

.msc-consent-line input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: var(--auth-gold);
    flex-shrink: 0;
    cursor: pointer;
}

.msc-consent-line a {
    color: var(--auth-gold);
    text-decoration: none;
}

.msc-consent-line a:hover { text-decoration: underline; }

/* Password strength */
.msc-pass-strength {
    margin-bottom: 16px;
}

.msc-ps-bar {
    height: 3px;
    background: var(--auth-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.msc-ps-bar span {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left;
    transform: scaleX(0.14);
    border-radius: 2px;
    transition: transform .3s, background .3s;
    background: var(--auth-red);
}

.msc-pass-strength[data-score="1"] .msc-ps-bar span { background: #ef4444; }
.msc-pass-strength[data-score="2"] .msc-ps-bar span { background: #f59e0b; }
.msc-pass-strength[data-score="3"] .msc-ps-bar span { background: #22c55e; }
.msc-pass-strength[data-score="4"] .msc-ps-bar span { background: var(--auth-green); }

.msc-ps-label {
    font-size: 11px;
    color: var(--auth-text3);
}

/* --- Actions --- */
.msc-actions { margin-top: 4px; }

.msc-btn {
    display: block;
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--auth-font);
    cursor: pointer;
    transition: all .15s;
}

.msc-btn-primary {
    background: var(--auth-gold);
    color: #000;
}

.msc-btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 16px rgba(212,175,55,.2);
    transform: translateY(-1px);
}

.msc-btn-primary:active { transform: scale(.98); }

.w-100 { width: 100%; }

.msc-alt-links {
    text-align: center;
    margin-top: 14px;
    font-size: 12px;
    color: var(--auth-text3);
}

.msc-alt-links a {
    color: var(--auth-text2);
    text-decoration: none;
    transition: color .12s;
}

.msc-alt-links a:hover { color: var(--auth-gold); }

/* --- Feedback --- */
.msc-feedback {
    margin-top: 14px;
    font-size: 13px;
    min-height: 20px;
    text-align: center;
    transition: color .15s;
}

.msc-feedback.msc-error { color: var(--auth-red); }
.msc-feedback.msc-ok { color: var(--auth-green); }

/* --- CapsLock indicator --- */
.msc-caps-indicator {
    position: absolute;
    right: 46px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #f59e0b;
    background: rgba(245,158,11,.12);
    padding: 2px 6px;
    border-radius: 3px;
    display: none;
    pointer-events: none;
}

.msc-caps-indicator.on.visible { display: block; }

.msc-pass-has-indicator { position: relative; }

/* --- Footer --- */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
}

.auth-footer-links {
    font-size: 12px;
    color: var(--auth-text3);
    margin: 0;
}

.auth-footer-links a {
    color: var(--auth-text2);
    text-decoration: none;
    transition: color .12s;
}

.auth-footer-links a:hover { color: var(--auth-gold); }

.auth-footer-copy {
    font-size: 11px;
    color: var(--auth-text3);
    margin: 10px 0 0;
}

.auth-footer-copy a {
    color: var(--auth-gold);
    text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .auth-card { padding: 28px 20px 24px; border-radius: 12px; }
    .auth-back { top: 16px; left: 16px; }
    .msc-grid-2 { grid-template-columns: 1fr; }
    .msc-grid-2 .msc-field { grid-column: auto !important; }
}
