:root {
    --accent: #1f3864;
    --accent-soft: #d9e2f3;
    --surface: #ffffff;
    --bg: #f4f5f7;
    --text: #0b0b0b;
    --muted: #52514e;
    --border: #e1e0db;
    --series: #2a78d6;
    --good: #0ca30c;
    --warning: #fab219;
    --critical: #d03b3b;
    --info: #2a78d6;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
a { color: var(--series); }
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 12px 24px; background: var(--accent); color: #fff; }
.topbar .brand { color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; }
.topbar nav { display: flex; gap: 16px; }
.topbar nav a { color: #dfe6f3; text-decoration: none; }
.topbar nav a:hover { color: #fff; }
.topbar nav { align-items: center; }
.nav-section { position: relative; }
.nav-head { background: none; border: 0; padding: 4px 0; color: #dfe6f3; font: inherit; font-weight: 600; cursor: pointer; }
.nav-head::after { content: " ▾"; font-size: 11px; }
.nav-section.active .nav-head, .nav-head:hover { color: #fff; }
.nav-section.active .nav-head { border-bottom: 2px solid #fff; }
.nav-menu { display: none; position: absolute; top: 100%; left: -12px; z-index: 10; min-width: 190px; padding: 6px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15); }
.nav-section:hover .nav-menu, .nav-section:focus-within .nav-menu { display: block; }
.topbar nav .nav-menu a { display: block; padding: 7px 14px; color: var(--text); white-space: nowrap; }
.topbar nav .nav-menu a:hover { background: var(--accent-soft); color: var(--accent); }
.topbar nav .nav-menu a.current { color: var(--accent); font-weight: 600; }
.topbar nav .nav-sep { margin-left: 8px; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.3); }
.badge-demo { margin-left: auto; background: var(--warning); color: #3b2a00; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font-size: 22px; margin: 0 0 4px; color: var(--accent); }
h2 { font-size: 17px; margin: 32px 0 12px; color: var(--accent); }
.sub { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 16px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
select, input[type=month], input[type=password], input[type=text] { width: 100%; max-width: 420px; padding: 8px 10px; border: 1px solid #c9c8c2; border-radius: 6px; font: inherit; background: #fff; }
.check { display: flex; gap: 8px; align-items: center; font-weight: normal; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 6px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.15); }
.btn-ghost { background: #fff; color: var(--accent); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn[disabled].btn-unavailable { cursor: not-allowed; }        /* disabled because the feature is unavailable, not busy */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.alert-error { background: #fdecec; border-color: #f3b9b9; color: #7a1c1c; }
.alert-warn { background: #fff6e0; border-color: #f5d790; color: #5c4300; }
.muted { color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.kpi .v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: 12.5px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:hover td { background: #fafaf8; }
.status { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.status-good { color: #087a08; }
.status-warning { color: #9a6a00; }
.status-warning::before { background: var(--warning); }
.status-critical { color: var(--critical); }
.status-info { color: var(--info); }
.status-nodata { color: var(--muted); }
.chart-box { position: relative; height: 300px; }
.chart-title { font-weight: 600; margin: 0 0 2px; }
.chart-note { color: var(--muted); font-size: 12.5px; margin: 0 0 10px; }
.summary-text { font-size: 15px; line-height: 1.65; }
.list-reports td { white-space: nowrap; }
.progress { display: none; margin-top: 12px; color: var(--muted); }
form.busy .progress { display: block; }
.lang-toggle { float: right; display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); margin-top: 4px; }
.lang-toggle a { padding: 5px 14px; font-size: 13px; text-decoration: none; color: var(--muted); }
.lang-toggle a.active { background: var(--accent); color: #fff; font-weight: 600; }
.alert-info { background: #eaf2fc; border-color: #b9d3f3; color: #123e6e; }
.inline-form { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.inline-form select { width: auto; }
.progress-bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; max-width: 420px; }
.progress-bar > div { height: 100%; background: var(--series); }
#monthly tr.is-customer td { background: #f7f8fa; }

/* Login / account */
.auth-box { max-width: 380px; margin: 48px auto 0; }
.auth-box h1 { text-align: center; }
.auth-box input { width: 100%; box-sizing: border-box; }
.auth-box .btn { width: 100%; justify-content: center; }
