:root {
    --bg: radial-gradient(circle at top left, #103a37, #050b12 48%, #02040a);
    --panel: rgba(255,255,255,.09);
    --border: rgba(205,255,245,.16);
    --text: #eafff8;
    --muted: rgba(234,255,248,.68);
    --green: #34f27b;
    --cyan: #27d8ff;
    --red: #ff4d57;
    --yellow: #ffd23f;
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: .88fr 1.12fr;
    gap: 18px;
    align-items: stretch;
}

.auth-brand,
.auth-card {
    border: 1px solid var(--border);
    background: var(--panel);
    backdrop-filter: blur(24px) saturate(160%);
    border-radius: 28px;
    box-shadow: 0 26px 80px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.06);
}

.auth-brand {
    padding: 34px;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: "";
    position: absolute;
    inset: auto -20% -30% -20%;
    height: 240px;
    background: radial-gradient(circle, rgba(52,242,123,.24), transparent 60%);
}

.auth-logo {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    margin-bottom: 22px;
    box-shadow: 0 18px 50px rgba(52,242,123,.24);
}

.auth-brand h1,
.auth-card h2 {
    margin: 0 0 12px;
    letter-spacing: -.04em;
    line-height: 1.05;
}

.auth-brand h1 { font-size: clamp(32px, 5vw, 54px); }
.auth-card h2 { font-size: 28px; }

.auth-brand p,
.auth-card p,
.auth-note {
    color: var(--muted);
    line-height: 1.65;
}

.auth-card { padding: 28px; }

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin: 18px 0;
}

.auth-tabs button,
.auth-btn,
.auth-secondary,
.auth-link-btn {
    border: 1px solid var(--border);
    border-radius: 15px;
    color: var(--text);
    background: rgba(255,255,255,.09);
    padding: 12px 14px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    transition: .22s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-tabs button.active,
.auth-btn {
    background: linear-gradient(135deg, var(--green), #16c978);
    color: #062512;
    border-color: rgba(255,255,255,.22);
}

.auth-tabs button:hover,
.auth-btn:hover,
.auth-secondary:hover,
.auth-link-btn:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.16);
}

.auth-btn:hover { background: linear-gradient(135deg, #67ffa0, #18d486); }

.auth-panel { display: none; }
.auth-panel.active { display: block; }

.form-group { margin-bottom: 14px; }
label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 900;
}

input {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.08);
    color: var(--text);
    border-radius: 15px;
    padding: 13px 14px;
    outline: none;
    font-weight: 800;
}

input:focus {
    border-color: rgba(52,242,123,.42);
    box-shadow: 0 0 0 4px rgba(52,242,123,.10);
}

.face-box {
    border: 1px solid var(--border);
    background: rgba(0,0,0,.18);
    border-radius: 20px;
    padding: 14px;
    margin: 14px 0;
}

#faceVideo {
    width: 100%;
    max-height: 260px;
    border-radius: 16px;
    background: rgba(0,0,0,.32);
    object-fit: cover;
}

#facePreview {
    width: 180px;
    border-radius: 14px;
    display: none;
    margin-top: 10px;
    border: 1px solid var(--border);
}

.auth-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.auth-status {
    margin: 12px 0;
    padding: 11px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    color: var(--muted);
    line-height: 1.45;
}
.auth-status.success { color: var(--green); background: rgba(52,242,123,.10); }
.auth-status.error { color: #ffb4b9; background: rgba(255,77,87,.12); }
.auth-status.warning { color: var(--yellow); background: rgba(255,210,63,.10); }

.auth-footer {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--muted);
}

.alert {
    border-radius: 15px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.09);
}
.alert.error { color: #ffb4b9; border-color: rgba(255,77,87,.26); }
.alert.success { color: var(--green); border-color: rgba(52,242,123,.26); }

@media (max-width: 820px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { padding: 26px; }
}


.auth-footer-stack {
    display: grid;
    gap: 10px;
    align-items: start;
}

.alert.info {
    color: #8bd7ff;
    border-color: rgba(39,216,255,.28);
    background: rgba(39,216,255,.10);
    word-break: break-word;
}

.auth-card input[type="email"] {
    width: 100%;
}


/* MultiSync Mac Glass Auth */
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background:
        radial-gradient(circle at 12% 12%, rgba(10,132,255,.18), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(48,209,88,.12), transparent 25%),
        linear-gradient(145deg, #071019, #0a1822 52%, #0e2630);
}

.auth-shell {
    width: min(1060px, calc(100vw - 28px));
    min-height: min(680px, calc(100dvh - 28px));
    margin: 14px auto;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15,25,35,.64);
    box-shadow: 0 46px 110px rgba(0,0,0,.46);
    backdrop-filter: blur(34px) saturate(150%);
    -webkit-backdrop-filter: blur(34px) saturate(150%);
}

.auth-brand {
    background:
        linear-gradient(160deg, rgba(100,210,255,.10), rgba(191,90,242,.045)),
        rgba(255,255,255,.025);
}

.auth-logo {
    filter: drop-shadow(0 12px 22px rgba(0,0,0,.24));
}

.auth-brand h1,
.auth-card h2 {
    letter-spacing: -.035em;
}

.auth-card {
    background: rgba(255,255,255,.025);
}

.auth-card input {
    min-height: 43px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 11px;
    background: rgba(255,255,255,.055);
    font-weight: 550;
}

.auth-card input:focus {
    border-color: rgba(100,210,255,.62);
    box-shadow: 0 0 0 3px rgba(100,210,255,.12);
}

.auth-btn {
    min-height: 43px;
    border-radius: 11px;
    color: #041721;
    background: linear-gradient(180deg, #8be0ff, #64d2ff);
    box-shadow: 0 8px 20px rgba(100,210,255,.17), inset 0 1px 0 rgba(255,255,255,.50);
}

.auth-link-btn {
    border-radius: 9px;
}

@media (max-width: 720px) {
    .auth-shell {
        width: 100%;
        min-height: 100dvh;
        margin: 0;
        border: 0;
        border-radius: 0;
    }
}
