:root{
    --bg:#0d1110;
    --panel:rgba(18,23,21,.84);
    --text:#f7efe2;
    --muted:#c9bbab;
    --line:rgba(255,255,255,.16);
    --gold:#d5b06f;
    --gold2:#f1d48e;
    --red:#f06b70;
    font-family:-apple-system, BlinkMacSystemFont, "SF Pro Text", "Noto Sans TC", "PingFang TC", Arial, sans-serif;
}

*{box-sizing:border-box}
html,body{width:100%;height:100%;margin:0;background:var(--bg);overflow:hidden}
body{
    display:grid;
    place-items:center;
    padding:22px;
    color:var(--text);
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    background:
        linear-gradient(90deg, rgba(13,17,16,.90), rgba(13,17,16,.62)),
        url("/static/img/login-stone.svg") center/cover,
        radial-gradient(circle at 15% 10%, rgba(213,176,111,.26), transparent 30%),
        linear-gradient(135deg, #0d1110, #17201d 48%, #090b0a);
}

body::after{
    content:"";
    position:fixed;
    inset:0;
    pointer-events:none;
    opacity:.28;
    background:
        linear-gradient(118deg, transparent 0 38%, rgba(241,212,142,.18) 39%, transparent 40%),
        repeating-linear-gradient(130deg, rgba(255,255,255,.05) 0 1px, transparent 1px 22px);
}

.login-shell{
    position:relative;
    z-index:2;
    width:min(980px,100%);
    display:grid;
    grid-template-columns:1.1fr 420px;
    gap:22px;
    align-items:stretch;
}

.login-shell.single{
    grid-template-columns:minmax(0,420px);
    justify-content:center;
}

.brand-panel,
.login-card{
    border:1px solid var(--line);
    border-radius:10px;
    background:linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.045)), var(--panel);
    box-shadow:0 28px 90px rgba(0,0,0,.42);
    backdrop-filter:blur(18px);
}

.brand-panel{
    min-height:520px;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    padding:34px;
    overflow:hidden;
}

.brand-kicker{
    color:var(--gold);
    font-size:13px;
    font-weight:900;
    letter-spacing:.2em;
}

h1,h2,p{margin:0}

.brand-panel h1{
    margin-top:12px;
    font-size:84px;
    line-height:.95;
    letter-spacing:0;
}

.brand-panel p{
    margin-top:14px;
    max-width:420px;
    color:var(--muted);
    font-size:20px;
    line-height:1.5;
}

.signal-list{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-top:28px;
}

.signal-list span{
    padding:9px 12px;
    border:1px solid var(--line);
    border-radius:999px;
    color:#fff;
    background:rgba(255,255,255,.07);
    font-size:13px;
    font-weight:800;
}

.login-card{
    position:relative;
    padding:28px;
    align-self:center;
}

.login-card::before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    width:100%;
    height:3px;
    border-radius:10px 10px 0 0;
    background:linear-gradient(90deg,var(--gold2),#9f6f35);
}

.logo{
    display:block;
    width:72px;
    height:72px;
    object-fit:contain;
    margin:0 auto 18px;
    border-radius:16px;
    box-shadow:0 16px 42px rgba(0,0,0,.34);
}

h2{
    color:#fff;
    text-align:center;
    font-size:30px;
    font-weight:900;
}

.sub{
    margin:8px 0 25px;
    color:var(--muted);
    text-align:center;
    font-size:14px;
}

.input-wrap{margin-bottom:15px}
label{
    display:block;
    margin-bottom:8px;
    color:#f4eadb;
    font-size:13px;
    font-weight:900;
}

input{
    width:100%;
    min-height:48px;
    padding:12px 13px;
    border:1px solid var(--line);
    border-radius:8px;
    outline:none;
    background:rgba(5,8,8,.58);
    color:var(--text);
    font:inherit;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

input::placeholder{color:rgba(247,239,226,.40)}
input:focus{
    border-color:rgba(213,176,111,.72);
    box-shadow:0 0 0 3px rgba(213,176,111,.15);
}

button,
.button-link{
    width:100%;
    min-height:48px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    margin-top:6px;
    padding:12px 14px;
    border:1px solid rgba(255,255,255,.18);
    border-radius:8px;
    background:linear-gradient(135deg,var(--gold2),#b7863f);
    color:#16110a;
    text-decoration:none;
    font:inherit;
    font-weight:950;
    cursor:pointer;
    box-shadow:0 15px 34px rgba(183,134,63,.22);
}

button:hover,.button-link:hover{filter:saturate(1.08) brightness(1.03)}
button:disabled{opacity:.55;cursor:not-allowed}

.error{
    min-height:20px;
    margin-top:12px;
    color:#ffe2e2;
    text-align:center;
    font-size:13px;
}

.toast-stack{
    position:fixed;
    z-index:10;
    top:18px;
    right:18px;
    width:min(360px,calc(100vw - 36px));
    display:grid;
    gap:10px;
}

.toast{
    min-height:44px;
    padding:11px 14px;
    border:1px solid rgba(240,107,112,.45);
    border-radius:8px;
    background:rgba(24,10,12,.95);
    color:#ffdede;
    box-shadow:0 18px 54px rgba(0,0,0,.34);
    transition:opacity .18s ease, transform .18s ease;
}

@media (max-width:820px){
    body{overflow:auto}
    .login-shell{grid-template-columns:1fr}
    .brand-panel{min-height:270px}
    .brand-panel h1{font-size:58px}
}

@media (max-width:520px){
    body{padding:14px}
    .brand-panel,.login-card{border-radius:8px}
    .brand-panel,.login-card{padding:21px}
    .brand-panel h1{font-size:48px}
    h2{font-size:26px}
}
