:root {
    color-scheme: light;
    --bg: #f4f6fa;
    --panel: #ffffff;
    --text: #172033;
    --muted: #6b7280;
    --primary: #315efb;
    --primary-dark: #2448c7;
    --border: #e3e7ef;
    --danger-bg: #fff0f0;
    --danger: #b42318;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, .button-link { border: 0; border-radius: 8px; background: var(--primary); color: #fff; padding: 10px 18px; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button-link:hover { background: var(--primary-dark); }
.secondary { background: #eef1f7; color: #334155; }
.secondary:hover { background: #dfe5ef; }
.muted, .hint { color: var(--muted); }
.hint { margin: 10px 0 0; font-size: 13px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #eef3ff, #f8f9fc); }
.login-card { width: min(420px, 100%); background: var(--panel); padding: 36px; border-radius: 16px; box-shadow: 0 18px 60px rgba(40, 54, 90, .12); }
.login-card h1 { margin: 16px 0 6px; font-size: 24px; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; color: white; background: var(--primary); font-weight: 700; }
label { display: grid; gap: 7px; font-size: 14px; color: #374151; }
.login-card form { display: grid; gap: 18px; margin-top: 26px; }
input, select { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 11px 12px; background: #fff; color: var(--text); }
input:focus, select:focus { outline: 2px solid rgba(49, 94, 251, .18); border-color: var(--primary); }
.alert { margin-top: 18px; padding: 11px 13px; border-radius: 8px; color: var(--danger); background: var(--danger-bg); font-size: 14px; }
.topbar { min-height: 64px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; background: var(--panel); border-bottom: 1px solid var(--border); }
.topbar > div { display: flex; gap: 18px; align-items: center; }
.container { max-width: 1280px; margin: 26px auto; padding: 0 20px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.filters form { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
.filters label { min-width: 180px; }
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.cards article { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.cards span { color: var(--muted); font-size: 13px; }
.cards strong { display: block; margin-top: 10px; font-size: 25px; }
.table-panel { padding: 0; overflow: hidden; margin-top: 18px; }
.section-title { padding: 16px 18px; font-weight: 700; border-bottom: 1px solid var(--border); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 850px; }
th, td { text-align: right; padding: 14px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { background: #f8fafc; color: #475569; font-size: 13px; }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
tbody tr:hover { background: #fafbff; }
tbody tr:last-child td { border-bottom: 0; }

@media (max-width: 900px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar { padding: 0 16px; }
    .topbar .muted { display: none; }
}

@media (max-width: 520px) {
    .login-card { padding: 26px 22px; }
    .cards { grid-template-columns: 1fr; }
    .filters form > * { width: 100%; }
}
