:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #122033;
    --muted: #68778c;
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --border: #dbe4f0;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
body { margin:0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background:var(--bg); color:var(--text); }
a { color: inherit; text-decoration: none; }
.topbar { position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:24px; padding:14px 24px; background:rgba(255,255,255,.9); border-bottom:1px solid var(--border); backdrop-filter: blur(14px); }
.brand { display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:-.02em; }
.brand-mark { display:grid; place-items:center; width:36px; height:36px; border-radius:14px; background:linear-gradient(135deg,#1e3a8a,#38bdf8); color:#fff; }
.nav { display:flex; gap:12px; flex:1; flex-wrap:wrap; }
.nav a { padding:8px 10px; border-radius:10px; color:var(--muted); font-weight:600; }
.nav a:hover { background:#eef4ff; color:var(--primary); }
.userbox { display:flex; align-items:center; gap:10px; font-size:14px; color:var(--muted); }
.page { max-width:1400px; margin:0 auto; padding:28px 20px 60px; }
.hero { display:flex; justify-content:space-between; gap:20px; align-items:flex-end; margin-bottom:22px; }
.hero h1 { margin:0; font-size: clamp(28px, 4vw, 48px); letter-spacing:-.04em; }
.hero p { color:var(--muted); }
.eyebrow { color:var(--primary)!important; text-transform:uppercase; font-size:12px; font-weight:800; letter-spacing:.14em; margin:0 0 8px; }
.card, .auth-card { background:var(--card); border:1px solid var(--border); border-radius:24px; box-shadow:var(--shadow); padding:22px; }
.auth-card { max-width:440px; margin:60px auto; }
.grid { display:grid; gap:20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi-grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap:16px; margin-bottom:20px; }
.kpi { background:#fff; border:1px solid var(--border); border-radius:22px; padding:22px; box-shadow:var(--shadow); }
.kpi span { color:var(--muted); font-weight:700; }
.kpi strong { display:block; font-size:38px; margin-top:10px; }
.toolbar, .filterbar, .inline-form, .mini-form { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.filterbar { background:#fff; border:1px solid var(--border); border-radius:18px; padding:14px; margin-bottom:18px; }
label { display:block; margin:12px 0 6px; font-weight:700; font-size:14px; }
input, select, textarea { width:100%; border:1px solid var(--border); border-radius:14px; padding:11px 12px; font:inherit; background:#fff; color:var(--text); }
.toolbar input, .toolbar select, .filterbar input, .filterbar select, .mini-form input { width:auto; min-width:150px; }
textarea { resize:vertical; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:0; border-radius:14px; padding:11px 15px; font-weight:800; cursor:pointer; transition:.15s; }
.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:hover { background:var(--primary-dark); }
.btn-light { background:#eef4ff; color:#1d4ed8; }
.btn.full { width:100%; margin-top:16px; }
.alert { padding:12px 16px; border-radius:14px; margin-bottom:16px; font-weight:700; }
.alert-success { background:#dcfce7; color:#166534; }
.alert-danger { background:#fee2e2; color:#991b1b; }
.table-wrap { overflow:auto; }
.data-table { width:100%; border-collapse:collapse; min-width:850px; }
.data-table th { text-align:left; font-size:12px; text-transform:uppercase; color:var(--muted); letter-spacing:.08em; border-bottom:1px solid var(--border); padding:12px; }
.data-table td { border-bottom:1px solid var(--border); padding:13px 12px; vertical-align:top; }
.data-table.compact { min-width:0; font-size:13px; }
.badge, .status-pill { display:inline-flex; align-items:center; padding:5px 9px; border-radius:999px; background:#e0f2fe; color:#075985; font-size:12px; font-weight:800; }
.status-pill { background:#dcfce7; color:#166534; font-size:14px; }
.muted, .muted-badge { color:var(--muted); }
.notice { padding:14px 16px; border-left:4px solid var(--primary); background:#eef4ff; border-radius:14px; margin-top:12px; }
.metar { white-space:pre-wrap; background:#0f172a; color:#e2e8f0; padding:14px; border-radius:16px; }
.history-item, .note-card { padding:14px 0; border-bottom:1px solid var(--border); }
.split { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.score { width:82px; height:82px; border-radius:24px; display:grid; place-items:center; font-size:28px; font-weight:900; background:#e0f2fe; color:#075985; }
.score small { display:block; font-size:10px; text-align:center; line-height:1; }
.score-high, .score-very-high { background:#fee2e2; color:#991b1b; }
.score-moderate { background:#fef3c7; color:#92400e; }
.button-grid { display:flex; flex-wrap:wrap; gap:12px; }
.footer { display:flex; justify-content:space-between; gap:16px; padding:24px; color:var(--muted); border-top:1px solid var(--border); }
@media (max-width: 900px) {
    .topbar, .hero, .footer { flex-direction:column; align-items:flex-start; }
    .grid.two, .kpi-grid { grid-template-columns:1fr; }
    .userbox { width:100%; justify-content:space-between; }
}
