/* Theme tokens. Both palettes are the ViewSonic ProAV CDE system; the light set is the
   same accents re-grounded on white so the view can follow the Azure DevOps theme.
   theme.js sets data-theme on <html>. */

:root[data-theme="dark"] {
  --canvas: #000000;
  --surface: #2A2A2A;
  --surface-2: #333333;
  --well: #1F1F1F;
  --outline: #666666;
  --outline-soft: #4D4D4D;
  --grid: rgba(255, 255, 255, 0.14);
  --grid-soft: rgba(255, 255, 255, 0.08);
  --fg-1: #FFFFFF;
  --fg-2: #E9E9E9;
  --fg-3: #CFCFCF;
  --fg-4: #999999;
  --fg-5: #666666;
  --band-q: #1E2E5C;
  --band-q-fg: #94C3E7;
  --band-m: #147AC8;
  --band-m-fg: #FFFFFF;
  --band-w: #5E80ED;
  --band-w-fg: #FFFFFF;
  --band-d: #2F3E6D;
  --band-d-fg: #FFFFFF;
  --band-d-off: #4D4D4D;
  --band-n: #333333;
  --chip: rgba(255, 255, 255, 0.16);
  --focus: #86A1F4;
  --link: #BCCEFE;
}

:root[data-theme="light"] {
  --canvas: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F5F6F8;
  --well: #FAFBFC;
  --outline: #C8CDD4;
  --outline-soft: #E4E7EB;
  --grid: rgba(0, 0, 0, 0.14);
  --grid-soft: rgba(0, 0, 0, 0.07);
  --fg-1: #1F1F1F;
  --fg-2: #333333;
  --fg-3: #4D4D4D;
  --fg-4: #666666;
  --fg-5: #999999;
  --band-q: #DDE4F5;
  --band-q-fg: #1E2E5C;
  --band-m: #147AC8;
  --band-m-fg: #FFFFFF;
  --band-w: #94C3E7;
  --band-w-fg: #10365A;
  --band-d: #E8EEF7;
  --band-d-fg: #1F1F1F;
  --band-d-off: #E4E7EB;
  --band-n: #F5F6F8;
  --chip: rgba(0, 0, 0, 0.08);
  --focus: #147AC8;
  --link: #035A9E;
}

:root {
  --primary: #147AC8;
  --primary-pressed: #035A9E;
  --primary-ink: #94C3E7;
  --secondary: #2F3E6D;
  --tertiary: #86A1F4;
  --tertiary-variant: #5E80ED;
  --warning: #C52703;
  --danger: #DB0025;
  --success: #638C2A;
  --r-4: 4px;
  --r-8: 8px;
  --r-pill: 9999px;
  --left-col: 340px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--surface);
  color: var(--fg-1);
  font-family: Inter, "Segoe UI", "Noto Sans", system-ui, sans-serif;
  font-size: 13px;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--tertiary); text-decoration: underline; }

button {
  font: inherit;
  color: var(--fg-1);
  background: transparent;
  border: 1px solid var(--outline);
  border-radius: var(--r-pill);
  height: 30px;
  padding: 0 13px;
  cursor: pointer;
  white-space: nowrap;
}
button:hover { border-color: var(--focus); background: var(--surface-2); }
button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

input[type="text"], input[type="number"], select {
  font: inherit;
  color: var(--fg-1);
  background: var(--surface-2);
  border: 1px solid var(--outline);
  border-radius: var(--r-8);
  height: 30px;
  padding: 0 10px;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(134, 161, 244, 0.35);
}

.seg { display: flex; border: 1px solid var(--outline); border-radius: var(--r-8); overflow: hidden; }
.seg button {
  border: 0;
  border-radius: 0;
  height: 30px;
  padding: 0 11px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-3);
}
.seg button[aria-pressed="true"] { background: var(--primary); color: #FFFFFF; }

.scroll { overflow: auto; }
.scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll::-webkit-scrollbar-track { background: transparent; }
.scroll::-webkit-scrollbar-thumb { background: var(--outline); border-radius: var(--r-pill); }

.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--r-4);
  padding: 2px 7px;
  background: var(--chip);
  color: var(--fg-1);
}
.chip.danger { background: var(--danger); color: #FFFFFF; }
.chip.warn { background: var(--warning); color: #FFFFFF; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--outline);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--fg-4);
}
.state h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--fg-2); }
.state p { margin: 0; font-size: 12px; max-width: 34ch; line-height: 1.5; }
