:root {
    --bg: #0f172a;
    --card: #111827;
    --muted: #94a3b8;
    --text: #e2e8f0;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --border: #1f2937;
    --success: #10b981;
    --danger: #ef4444;
}

* { box-sizing: border-box; }
body.login-page {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 20% 20%, rgba(59,130,246,0.15), transparent 30%),
                radial-gradient(circle at 80% 0%, rgba(16,185,129,0.12), transparent 30%),
                var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    width: 100%;
    max-width: 1100px;
}
.login-column {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}
.login-wrapper.single {
    grid-template-columns: minmax(0, 480px);
    max-width: 560px;
    justify-content: center;
}

.login-card, .side-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.login-brand-left { display: flex; align-items: center; gap: 12px; }
.logo-chip {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
}
.logo-chip img {
    max-width: 46px;
    max-height: 46px;
    object-fit: contain;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 700; font-size: 18px; }
.brand-subtitle { color: var(--muted); font-size: 14px; font-weight: 600; }
.cobrand { color: var(--muted); font-size: 12px; }
.cobrand-foot {
    margin-top: 12px;
    text-align: right;
}
.cobrand-out {
    text-align: right;
    margin-top: 8px;
    color: var(--muted);
    align-self: flex-end;
}

.login-form .form-group { margin-bottom: 14px; }
.login-form label { font-weight: 600; font-size: 13px; margin-bottom: 6px; display: block; }
.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"],
.login-form input[type="number"] {
    width: 100%;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    color: var(--text);
    height: 44px;
    border-radius: 8px;
    padding: 0 12px;
}
.login-form input:focus {
    outline: 2px solid rgba(59,130,246,0.4);
    border-color: var(--primary);
}
.btn-primary {
    background: linear-gradient(120deg, var(--primary), #7c3aed);
    border: none;
    height: 44px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(59,130,246,0.25);
}
.btn-primary:hover { background: linear-gradient(120deg, var(--primary-hover), #6d28d9); }

.login-meta {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.forgot-link { color: var(--muted); }
.forgot-link:hover { color: #fff; text-decoration: none; }

.login-side { display: flex; align-items: stretch; }
.side-card { width: 100%; }
.side-card h4 { margin: 0 0 12px 0; font-size: 15px; }
.side-scroll { max-height: 360px; overflow: auto; padding-right: 6px; }
.notice-title { font-weight: 600; margin-bottom: 6px; }
.notice-body { color: var(--muted); font-size: 13px; line-height: 1.4; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }

.alert { border-radius: 8px; padding: 12px 14px; margin-bottom: 12px; }
.alert-danger { background: rgba(239,68,68,0.12); color: #fecdd3; border: 1px solid rgba(239,68,68,0.3); }
.alert-success { background: rgba(16,185,129,0.12); color: #bbf7d0; border: 1px solid rgba(16,185,129,0.3); }

.captcha-group .captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.refresh-captcha { padding: 6px 10px; color: var(--muted); }
.refresh-captcha:hover { color: #fff; }

@media (max-width: 1024px) {
    .login-wrapper { grid-template-columns: 1fr; }
    .login-side { order: -1; }
}

@media (max-width: 640px) {
    body.login-page { padding: 12px; }
    .login-card, .side-card { padding: 18px; }
    .login-brand { flex-direction: column; align-items: flex-start; }
    .cobrand { margin-top: 4px; }
}
