/* WDP APS Monitor - same colours, cards and fonts as the WDP APS dashboard. */
:root {
  --wdp-blue:#0079c0; --wdp-dark:#00456e; --line:#e0e0e0; --line-2:#c9ced3;
  --good:#0ca30c; --good-ink:#1a7f1a; --warn-ink:#9a5b00; --crit:#d03b3b; --crit-ink:#c02626;
  --bg:#e8eef3; --side:#f4f6f8; --ink:#000; --ink-2:#35333a;
  --sans:"proxima-nova","Proxima Nova",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --head:"ff-good-headline-web-pro-ext","proxima-nova",system-ui,"Segoe UI",sans-serif;
  --side-w:240px;
}
* { box-sizing:border-box; }
html, body { margin:0; padding:0; }
body { font-family:var(--sans); font-size:14px; color:var(--ink); background:var(--bg); }
body::before { content:""; position:fixed; inset:0 0 auto 0; height:5px; background:var(--wdp-blue);
  z-index:10; }
a { color:var(--wdp-blue); }

/* sidebar */
.side { position:fixed; top:0; bottom:0; left:0; width:var(--side-w); background:var(--side);
  border-right:1px solid var(--line-2); overflow-y:auto; padding-top:5px; }
.brand { padding:66px 8px 22px; text-align:center; border-bottom:1px solid var(--line-2);
  margin-bottom:10px; }
.brand-name { font-family:var(--head); font-size:34px; font-weight:700; line-height:1.15;
  color:var(--wdp-dark); margin-bottom:10px; }
.brand-ai { font-family:Georgia,"Times New Roman",serif; }
.brand-product { display:block; font-size:25px; margin-top:4px; }
.brand-title { font-family:var(--head); font-size:16px; font-weight:600; letter-spacing:.02em;
  color:var(--ink-2); }
.nav a { display:block; text-align:center; padding:13px 20px; font-size:15px; color:var(--ink);
  text-decoration:none; border-left:3px solid transparent; }
.nav a:hover { background:#e4eaef; }
.nav a.on { background:#d2e5f3; border-left-color:var(--wdp-blue); color:var(--wdp-dark);
  font-weight:600; }

/* main */
.main { margin-left:var(--side-w); padding:30px 24px 48px; }
.wrap { max-width:1500px; margin:0 auto; }
.page-head { text-align:center; margin:18px 0 18px; }
.page-head h1 { margin:0; font-family:var(--head); font-size:24px; font-weight:700; }
.page-head p { margin:4px 0 0; font-size:13px; color:var(--ink-2); }

.card { background:#fff; border:1px solid var(--line); border-radius:6px; padding:20px 22px;
  box-shadow:0 1px 2px rgba(0,0,0,.04); margin-bottom:16px; min-width:0; }
.card-title { margin:0 0 8px; text-align:center; color:var(--wdp-dark); font-family:var(--head);
  font-size:13.5px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.card-sub { text-align:center; font-size:12px; margin:-4px 0 12px; color:var(--ink-2); }
.cols { display:grid; grid-template-columns:3fr 2fr; gap:16px; }
.cols > .card { margin-bottom:0; }
.cols + * { margin-top:16px; }

.kpis { display:grid; gap:16px; margin-bottom:16px;
  grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); }
.kpi { background:#fff; border:1px solid var(--line); border-top:3px solid var(--wdp-blue);
  border-radius:6px; padding:22px 16px 18px; text-align:center; box-shadow:0 1px 2px rgba(0,0,0,.04); }
.kpi-value { font-family:var(--head); color:var(--wdp-dark); font-size:34px; font-weight:700;
  line-height:1.1; letter-spacing:-.01em; }
.kpi-value.sm { font-size:20px; padding:8px 0 6px; }
.kpi-label { font-size:13px; margin-top:6px; }
.kpi.good { border-top-color:var(--good); } .kpi.good .kpi-value { color:var(--good-ink); }
.kpi.crit { border-top-color:var(--crit); } .kpi.crit .kpi-value { color:var(--crit-ink); }

.note { background:#eff6fb; border:1px solid #b3d4ec; border-radius:8px; padding:10px 14px;
  margin:0 0 16px; font-size:13px; display:flex; gap:10px; }
.note .tag { flex:none; color:var(--wdp-blue); font-weight:700; font-size:11px; letter-spacing:.06em;
  text-transform:uppercase; padding-top:2px; }
.note.warn { background:#fff8e8; border-color:#fde2a8; } .note.warn .tag { color:var(--warn-ink); }
.note.good { background:#effaef; border-color:#bfe3bf; } .note.good .tag { color:var(--good-ink); }
.note.crit { background:#fdeeee; border-color:#f3c0c0; } .note.crit .tag { color:var(--crit-ink); }

/* tables */
.tbl-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:6px; }
table { border-collapse:collapse; width:100%; font-size:13px; }
th, td { padding:9px 10px; border-bottom:1px solid #eceef0; text-align:left; white-space:nowrap; }
th { background:#f4f6f8; font-weight:500; color:var(--ink-2); border-right:1px solid #e6e8ea; }
td { border-right:1px solid #f0f1f2; }
tr:last-child td { border-bottom:none; }
td.num { text-align:right; }
td.wrap-cell { white-space:normal; min-width:280px; }
.ok { color:var(--good-ink); font-weight:600; }
.bad { color:var(--crit-ink); font-weight:600; }
.mid { color:var(--warn-ink); font-weight:600; }
.bar { display:flex; align-items:center; gap:8px; min-width:150px; }
.bar span { flex:1; height:6px; background:#e7ebef; border-radius:3px; overflow:hidden; }
.bar span i { display:block; height:100%; background:var(--wdp-blue); }
.bar b { font-weight:400; font-size:12px; min-width:52px; text-align:right; }

/* forms */
form.filters { display:grid; gap:14px; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr));
  align-items:end; }
label { display:block; font-size:13px; margin-bottom:6px; }
select, input[type=text], input[type=password], input[type=date] { width:100%; height:38px;
  padding:0 10px; border:1px solid var(--line-2); border-radius:3px; background:#fff;
  font:inherit; font-size:14px; }
button, .btn { height:38px; padding:0 18px; border-radius:3px; font:inherit; font-weight:600;
  background:var(--wdp-blue); color:#fff; border:1px solid transparent; cursor:pointer;
  text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }
button:hover, .btn:hover { background:var(--wdp-dark); }
.btn.ghost { background:#fff; color:var(--wdp-blue); border-color:var(--wdp-blue); }
.btn.ghost:hover { background:var(--wdp-blue); color:#fff; }
.chips { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0 0; }
.chips a { padding:6px 14px; border:1px solid var(--line-2); border-radius:16px; text-decoration:none;
  color:var(--ink); font-size:13px; background:#fff; }
.chips a.on { border-color:var(--wdp-blue); background:#d2e5f3; color:var(--wdp-dark); font-weight:600; }
pre.log { margin:0; max-height:560px; overflow:auto; background:#f7f8fa; border:1px solid var(--line);
  border-radius:6px; padding:12px 14px; font:12px/1.5 Consolas,"Courier New",monospace;
  white-space:pre; }
.chart-box { position:relative; height:340px; }
.chart-box.sm { height:200px; }

/* login */
.login-page .main { margin-left:0; }
.login { max-width:420px; margin:10vh auto 0; }
.login form > div { margin-bottom:14px; }
.login button { width:100%; }
.err { color:var(--crit-ink); font-size:13px; margin:0 0 12px; text-align:center; }

/* small windows / high zoom: thinner sidebar, still always shown */
@media (max-width: 768px) {
  :root { --side-w:220px; }
  .brand { padding-top:50px; }
  .brand-name { font-size:28px; } .brand-product { font-size:21px; } .brand-title { font-size:14px; }
  .main { padding:24px 14px 40px; }
  .cols { grid-template-columns:1fr; }
}
