:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #dbe2ea;
    --brand: #1d4ed8;
    --brand-dark: #0f172a;
    --success-bg: #ecfdf3;
    --success-text: #166534;
    --error-bg: #fef2f2;
    --error-text: #991b1b;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, .btn { border: 0; background: var(--brand-dark); color: #fff; padding: 12px 16px; border-radius: 10px; cursor: pointer; font-weight: 700; }
.btn-secondary { background: #e5e7eb; color: #111827; }
.btn-link { border: 0; background: transparent; color: var(--brand); padding: 0; cursor: pointer; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #cfd6e4; border-radius: 10px; font-size: 14px; background: #fff; }
textarea { min-height: 96px; resize: vertical; }
label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar { background: #0f172a; color: #fff; padding: 24px; }
.content { padding: 24px; }
.brand h1 { margin: 6px 0 0; font-size: 24px; }
.brand-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #93c5fd; font-weight: 700; }
.userbox { margin: 22px 0; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.08); }
.nav { display: grid; gap: 8px; }
.nav a { color: #fff; padding: 10px 12px; border-radius: 10px; }
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.topbar { margin-bottom: 18px; }
.topbar h2 { margin: 0; }
.card { background: var(--panel); border-radius: 16px; padding: 20px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05); margin-bottom: 18px; }
.notice { padding: 12px 14px; border-radius: 10px; margin-bottom: 12px; }
.notice.success { background: var(--success-bg); color: var(--success-text); }
.notice.error { background: var(--error-bg); color: var(--error-text); }
.filters, .inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters input, .filters select { max-width: 320px; }
.grid { display: grid; gap: 16px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 16px; }
.stats { background: var(--panel); border-radius: 16px; padding: 18px; box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05); }
.stats-total { background: #dbeafe; }
.stats .label { color: var(--muted); font-size: 14px; }
.stats .value { font-size: 28px; font-weight: 700; margin-top: 8px; }
.stats-total-card { padding: 0; background: transparent; box-shadow: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.badge { display: inline-block; padding: 6px 10px; border-radius: 999px; background: #e5e7eb; font-size: 12px; font-weight: 700; }
.cols-2 { display: grid; grid-template-columns: 1fr 1.5fr; gap: 18px; }
.field { margin-bottom: 12px; }
.checkbox { display: flex; align-items: center; gap: 10px; font-weight: 400; }
.checkbox input { width: auto; }
.small, .muted { color: var(--muted); }
.report-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.report-header h2 { margin: 8px 0 4px; }
.report-total { font-size: 28px; font-weight: 700; }
.metric { background: #f8fafc; border-radius: 12px; padding: 14px; }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
.login-box h1 { margin: 0 0 8px; }
.login-box .muted { margin: 0 0 20px; }
@media (max-width: 1000px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { padding-bottom: 12px; }
    .stats-grid, .metrics-grid, .cols-2 { grid-template-columns: 1fr; }
}
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .shell { display: block; }
    .content { padding: 0; }
    body { background: #fff; }
    .card { box-shadow: none; margin: 0; padding: 0; }
}
