/* Theme variables */
.theme-dark {
  --bg: #0b0c10;
  --fg: #e5e5e5;
  --header-bg: #111217;
  --border: #22242c;
  --thead: #9fb3c8;
  --row-alt: #0e1016;
  --muted: rgba(229,229,229,0.65);
  --statusbar-bg: #0e1016;
  --badge-ok-bg: #113d2b;
  --badge-ok-fg: #8be8b0;
  --badge-err-bg: #4a1a1a;
  --badge-err-fg: #ff9b9b;
  --error-bg: #4a1a1a;
  --error-fg: #ffcccc;
  --error-border: #7a2a2a;
  --scale: 1;
  --cols: 1;
}

.theme-light {
  --bg: #f7f8fa;
  --fg: #101214;
  --header-bg: #ffffff;
  --border: #d6d9de;
  --thead: #42526e;
  --row-alt: #ffffff;
  --muted: rgba(16,18,20,0.6);
  --statusbar-bg: #ffffff;
  --badge-ok-bg: #e3fcef;
  --badge-ok-fg: #006644;
  --badge-err-bg: #ffebe6;
  --badge-err-fg: #bf2600;
  --error-bg: #ffebe6;
  --error-fg: #8f2b20;
  --error-border: #ffd2cc;
  --scale: 1;
  --cols: 1;
}

html, body {
  margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
}
.wrap { display:flex; flex-direction:column; height:100%; }
header { padding: 16px 24px; background: var(--header-bg); border-bottom: 2px solid var(--border); display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; }
header .title { font-size: 40px; font-weight: 700; letter-spacing: 0.5px; }
header .subtitle { font-size: 18px; opacity: .8; margin-top: 4px; }
.head-right { display:flex; align-items:center; gap: 12px; }
.control { font-size: 14px; color: var(--thead); }
.control select { margin-left: 6px; font-size: 14px; padding: 4px 8px; background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: 4px; }
.content { flex:1; padding: 12px 24px 24px; display:flex; flex-direction:column; }
.filters { color: var(--thead); margin: 6px 0 8px; display:flex; gap: 16px; align-items:center; flex-wrap: wrap; }
.filters img { height: 52px; vertical-align: middle; margin-left: 6px; }
.filter-only-exceeding { background: var(--badge-err-bg); color: var(--badge-err-fg); font-weight: 700; padding: 5px 12px; border-radius: 999px; }
table { width:100%; border-collapse: collapse; table-layout: fixed; }
thead th { text-align:left; font-size: calc(22px * var(--scale)); color: var(--thead); padding: 10px 12px; border-bottom: 2px solid var(--border); }
thead th.sorted-asc::after { content: " \25B2"; /* ▲ */ color: var(--thead); opacity: 0.9; font-size: 18px; }
thead th.sorted-desc::after { content: " \25BC"; /* ▼ */ color: var(--thead); opacity: 0.9; font-size: 18px; }
tbody td { font-size: calc(28px * var(--scale)); padding: 14px 12px; border-bottom: 1px solid var(--border); }
tbody tr:nth-child(odd) { background: var(--row-alt); }

.muted { color: var(--muted); }
.center { text-align:center; }
.temp { font-variant-numeric: tabular-nums; }
.temp-bad { background: var(--badge-err-bg); color: var(--badge-err-fg); font-weight: 700; }
.statusbar { padding: 10px 16px; background: var(--statusbar-bg); border-top: 2px solid var(--border); display:flex; justify-content:space-between; font-size: 16px; }
.badge { display:inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.badge-ok { background: var(--badge-ok-bg); color: var(--badge-ok-fg); }
.badge-err { background: var(--badge-err-bg); color: var(--badge-err-fg); }
#error { position:fixed; right:16px; top:16px; padding:10px 14px; background: var(--error-bg); color: var(--error-fg); border:1px solid var(--error-border); border-radius: 6px; display:none; }
.empty { text-align:center; padding: 40px; font-size: 26px; color: var(--thead); }
.objtype{ vertical-align: middle;height: calc(55px * var(--scale));width: calc(55px * var(--scale));margin-top: calc(-30px * var(--scale));  margin-bottom: calc(-30px * var(--scale));margin-right: 8px;}

/* Multi-column layout container */
.multi-container { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 16px; align-items: start; }
.multi-container table { width: 100%; }
thead th { white-space: nowrap; }
tbody td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
