:root {
    color-scheme: dark;
    --ink: #f5f2eb;
    --muted: #a8a59e;
    --line: rgba(255,255,255,.12);
    --glass: rgba(18,19,22,.68);
    --glass-strong: rgba(15,16,19,.86);
    --gold: #c8ab70;
    --gold-strong: #e0c78d;
    --danger: #ffb9b0;
    --success: #b9ddc6;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--ink);
    font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at 12% 12%, rgba(200,171,112,.16), transparent 30%),
        radial-gradient(circle at 86% 82%, rgba(89,98,122,.24), transparent 34%),
        linear-gradient(135deg, #08090b 0%, #111319 48%, #08090c 100%);
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .34;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}
.auth-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 38px 22px;
}
.auth-shell {
    width: min(960px, 100%);
    min-height: 610px;
    display: grid;
    grid-template-columns: minmax(300px, .9fr) minmax(390px, 1.1fr);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 32px;
    background: rgba(255,255,255,.045);
    box-shadow: 0 40px 110px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.08);
    backdrop-filter: blur(28px) saturate(135%);
    -webkit-backdrop-filter: blur(28px) saturate(135%);
}
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 38px;
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,.09);
    background: linear-gradient(160deg, rgba(255,255,255,.085), rgba(255,255,255,.018));
}
.auth-brand::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    left: -90px;
    bottom: -130px;
    border: 1px solid rgba(200,171,112,.25);
    border-radius: 50%;
    box-shadow: 0 0 80px rgba(200,171,112,.09);
}
.brand-lockup { position: relative; z-index: 1; }
.brand-logo {
    width: 136px;
    height: auto;
    aspect-ratio: 1;
    display: block;
    object-fit: cover;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,.24);
    box-shadow: 0 20px 50px rgba(0,0,0,.32);
}
.brand-name {
    margin-top: 26px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: .95;
    font-weight: 850;
    letter-spacing: -.055em;
}
.brand-name span { color: var(--gold-strong); }
.brand-caption {
    margin-top: 16px;
    max-width: 270px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}
.brand-meta {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.brand-meta span {
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 999px;
    color: #cbc7be;
    background: rgba(0,0,0,.15);
    font-size: 11px;
}
.auth-panel {
    display: flex;
    align-items: center;
    padding: 52px clamp(34px, 6vw, 68px);
    background: rgba(9,10,12,.22);
}
.auth-content { width: 100%; max-width: 420px; margin: 0 auto; }
.auth-eyebrow {
    margin-bottom: 16px;
    color: var(--gold-strong);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.auth-title {
    margin: 0;
    color: #fff;
    font-size: 34px;
    line-height: 1.16;
    letter-spacing: -.04em;
}
.auth-subtitle {
    margin: 10px 0 28px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
}
.auth-mode-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    margin: -10px 0 18px;
    padding: 5px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    background: rgba(255,255,255,.035);
}
.auth-mode-tabs a {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #8f929a;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}
.auth-mode-tabs a.active { color: #17130d; background: linear-gradient(135deg, #ead39e, #b89659); }
.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    font-size: 13px;
    line-height: 1.55;
    background: rgba(255,255,255,.05);
}
.alert.error { color: var(--danger); border-color: rgba(255,111,97,.22); background: rgba(174,52,43,.12); }
.alert.notice { color: var(--success); border-color: rgba(111,194,142,.22); background: rgba(46,126,77,.12); }
.auth-field + .auth-field { margin-top: 15px; }
.auth-field label {
    display: block;
    margin-bottom: 7px;
    color: #c3c0b8;
    font-size: 12px;
    font-weight: 650;
}
.auth-input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 14px;
    outline: none;
    color: #fff;
    background: rgba(255,255,255,.055);
    font: inherit;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.auth-input::placeholder { color: #686b72; }
.auth-input:focus {
    border-color: rgba(224,199,141,.62);
    background: rgba(255,255,255,.075);
    box-shadow: 0 0 0 4px rgba(200,171,112,.09);
}
.auth-submit, .auth-secondary {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    text-decoration: none;
    cursor: pointer;
}
.auth-submit {
    margin-top: 20px;
    border: 1px solid #e5cb94;
    color: #17130d;
    background: linear-gradient(135deg, #ead39e, #b89659);
    box-shadow: 0 14px 30px rgba(185,145,78,.22);
}
.auth-submit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.auth-secondary {
    margin-top: 11px;
    border: 1px solid rgba(255,255,255,.12);
    color: #e6e3dc;
    background: rgba(255,255,255,.045);
}
.auth-secondary:hover { border-color: rgba(224,199,141,.38); background: rgba(255,255,255,.07); }
.auth-foot {
    margin: 18px 0 0;
    color: #7f828a;
    font-size: 11px;
    line-height: 1.7;
    text-align: center;
}
.auth-foot a { color: #d9c18d; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }
@media (max-width: 760px) {
    .auth-page { padding: 16px; align-items: start; }
    .auth-shell { min-height: 0; grid-template-columns: 1fr; border-radius: 24px; }
    .auth-brand { min-height: auto; padding: 22px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
    .brand-lockup { display: flex; align-items: center; gap: 16px; }
    .brand-logo { width: 72px; border-radius: 18px; }
    .brand-name { margin-top: 0; font-size: 29px; }
    .brand-caption { margin-top: 6px; font-size: 11px; line-height: 1.5; }
    .brand-meta { display: none; }
    .auth-panel { padding: 30px 22px 32px; }
    .auth-title { font-size: 28px; }
    .auth-subtitle { margin-bottom: 22px; }
}
@media (max-width: 390px) {
    .auth-page { padding: 0; }
    .auth-shell { min-height: 100vh; border: 0; border-radius: 0; }
    .auth-brand { padding: 20px; }
    .auth-panel { padding: 26px 20px 32px; align-items: flex-start; }
}
