/* =========================================================================
   TWB Fault Desk — design system
   Operate surface: scanned, not admired. Built on one ink/paper pair, one
   brand navy, and status colour used only where it carries meaning.
   ========================================================================= */

:root {
  --paper: #f2f5f9;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #edf1f7;
  --ink: #0e1a29;
  --ink-2: #44536a;
  --ink-3: #64748b;
  --line: #dbe2ec;
  --line-strong: #c3cdda;

  --navy: #123a63;
  --navy-hover: #0e2f52;
  --navy-tint: #e8eff8;
  --signal: #0f766e;
  --signal-tint: #e3f3f1;

  --st-new: #1d4ed8;
  --st-new-bg: #e8eefe;
  --st-progress: #a35709;
  --st-progress-bg: #fdf1e0;
  --st-await: #6d28d9;
  --st-await-bg: #f0ebfe;
  --st-resolved: #157347;
  --st-resolved-bg: #e5f4ec;
  --st-closed: #475569;
  --st-closed-bg: #eef1f6;

  --pr-low: #52627a;
  --pr-low-bg: #eef1f6;
  --pr-medium: #0b6ea8;
  --pr-medium-bg: #e6f2fa;
  --pr-high: #b4490f;
  --pr-high-bg: #fdece1;
  --pr-critical: #b3261e;
  --pr-critical-bg: #fdeaea;

  --danger: #b3261e;
  --danger-tint: #fdecea;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-pop: 0 10px 30px -12px rgba(14, 26, 41, 0.28), 0 2px 6px -2px rgba(14, 26, 41, 0.12);
  --shadow-drawer: -18px 0 40px -24px rgba(14, 26, 41, 0.4);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --rail: 236px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b131d;
    --surface: #121c28;
    --surface-2: #16212e;
    --surface-3: #1c2937;
    --ink: #eaf1f8;
    --ink-2: #a9b7c8;
    --ink-3: #8595a8;
    --line: #253345;
    --line-strong: #33455c;

    --navy: #7db3ef;
    --navy-hover: #9cc6f6;
    --navy-tint: #16283c;
    --signal: #5eead4;
    --signal-tint: #12302e;

    --st-new: #93b4ff;
    --st-new-bg: #16233a;
    --st-progress: #f0b866;
    --st-progress-bg: #2b2317;
    --st-await: #c0a6fb;
    --st-await-bg: #221d38;
    --st-resolved: #74d0a0;
    --st-resolved-bg: #14291f;
    --st-closed: #a6b4c6;
    --st-closed-bg: #1b242f;

    --pr-low: #a6b4c6;
    --pr-low-bg: #1b242f;
    --pr-medium: #7cc0e8;
    --pr-medium-bg: #14242f;
    --pr-high: #f0a072;
    --pr-high-bg: #2d1f16;
    --pr-critical: #f2908a;
    --pr-critical-bg: #2e1917;

    --danger: #f2908a;
    --danger-tint: #2e1917;
    --shadow-pop: 0 12px 32px -14px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.021em; line-height: 1.22; font-weight: 650; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 0.95rem; }
p { margin: 0 0 0.75em; }
p:last-child { margin-bottom: 0; }
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
  border-radius: 4px;
}

.boot {
  display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center;
  min-height: 100vh; color: var(--ink-3);
}
.boot__mark {
  font-weight: 800; letter-spacing: 0.06em; font-size: 1.05rem;
  background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 10px;
}
.boot__text { font-size: 0.875rem; }
@media (prefers-color-scheme: dark) { .boot__mark { color: #0b131d; } }

/* ------------------------------------------------------------------ shell */

.app { min-height: 100vh; display: flex; flex-direction: column; }

.appbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 18px;
  padding: 0 22px;
  min-height: 62px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 0.72rem; letter-spacing: 0.04em;
}
@media (prefers-color-scheme: dark) { .brand__mark { color: #0b131d; } }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 650; font-size: 0.9rem; letter-spacing: -0.01em; }
.brand__sub { font-size: 0.72rem; color: var(--ink-3); letter-spacing: 0.03em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav__item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px;
  font-size: 0.875rem; font-weight: 550; color: var(--ink-2);
  border: 1px solid transparent; background: none; cursor: pointer;
  white-space: nowrap; font-family: inherit;
}
.nav__item:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav__item[aria-current="page"] { background: var(--navy-tint); color: var(--navy); border-color: var(--line); }
.nav__count {
  font-size: 0.72rem; font-variant-numeric: tabular-nums;
  background: var(--surface-3); border-radius: 999px; padding: 1px 7px; color: var(--ink-2);
}

.appbar__spacer { flex: 1 1 auto; }
.appbar__actions { display: flex; align-items: center; gap: 10px; flex: none; }

.userchip {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 6px 4px 12px; cursor: pointer;
  font-family: inherit; font-size: 0.82rem; color: var(--ink);
}
.userchip:hover { background: var(--surface-3); }
.userchip__avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: var(--navy-tint); color: var(--navy);
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 700;
}

.menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 218px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-pop); padding: 6px; z-index: 40;
}
.menu__head { padding: 9px 11px 11px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu__name { font-weight: 600; font-size: 0.9rem; }
.menu__mail { font-size: 0.78rem; color: var(--ink-3); word-break: break-all; }
.menu button, .menu a {
  display: flex; width: 100%; align-items: center; gap: 9px;
  padding: 9px 11px; border: 0; border-radius: var(--radius-sm);
  background: none; text-align: left; font: inherit; font-size: 0.875rem;
  color: var(--ink); cursor: pointer;
}
.menu button:hover, .menu a:hover { background: var(--surface-2); text-decoration: none; }
.menu__danger { color: var(--danger) !important; }

/* --------------------------------------------------------------- surfaces */

.page { flex: 1 1 auto; width: 100%; max-width: 1220px; margin: 0 auto; padding: 26px 22px 72px; }
.page--narrow { max-width: 780px; }

.appbar, .page { animation: rise 0.34s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .appbar, .page { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.page__title { display: flex; flex-direction: column; gap: 3px; }
.page__lede { color: var(--ink-2); font-size: 0.9rem; }

.panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.panel__body { padding: 18px; }
.panel__body--flush { padding: 0; }
.panel__foot { padding: 13px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.spread { display: flex; gap: 18px; align-items: flex-start; }
@media (max-width: 900px) { .spread { flex-direction: column; } }
.spread__main { flex: 1 1 auto; min-width: 0; }
.spread__side { flex: 0 0 320px; width: 320px; }
@media (max-width: 900px) { .spread__side { flex: 1 1 auto; width: 100%; } }

.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; }

/* ------------------------------------------------------------------ atoms */

/* Status + priority chips: colour means something here, so it is confined. */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.005em;
  white-space: nowrap; border: 1px solid transparent;
}
.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip--new { color: var(--st-new); background: var(--st-new-bg); }
.chip--in_progress { color: var(--st-progress); background: var(--st-progress-bg); }
.chip--awaiting_info { color: var(--st-await); background: var(--st-await-bg); }
.chip--resolved { color: var(--st-resolved); background: var(--st-resolved-bg); }
.chip--closed { color: var(--st-closed); background: var(--st-closed-bg); }
.chip--low { color: var(--pr-low); background: var(--pr-low-bg); }
.chip--medium { color: var(--pr-medium); background: var(--pr-medium-bg); }
.chip--high { color: var(--pr-high); background: var(--pr-high-bg); }
.chip--critical { color: var(--pr-critical); background: var(--pr-critical-bg); }
.chip--plain { color: var(--ink-2); background: var(--surface-3); }
.chip--internal { color: var(--st-await); background: var(--st-await-bg); }

.ref { font-family: var(--mono); font-size: 0.8rem; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 15px; border-radius: var(--radius-sm);
  font: inherit; font-size: 0.875rem; font-weight: 600;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: background 0.14s var(--ease), border-color 0.14s var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-hover); border-color: var(--navy-hover); }
@media (prefers-color-scheme: dark) { .btn--primary { color: #0b131d; } }
.btn--ghost { border-color: transparent; background: none; }
.btn--ghost:hover { background: var(--surface-2); }
.btn--sm { padding: 6px 11px; font-size: 0.8rem; }
.btn--block { width: 100%; }
.btn--busy { position: relative; color: transparent !important; }
.btn--busy::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  color: var(--ink-3); animation: spin 0.7s linear infinite;
}
.btn--primary.btn--busy::after { color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field__label { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); letter-spacing: 0.01em; }
.field__hint { font-size: 0.78rem; color: var(--ink-3); }
.field__error { font-size: 0.78rem; color: var(--danger); font-weight: 550; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], select, textarea {
  font: inherit; font-size: 0.9rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 9px 11px; width: 100%;
  transition: border-color 0.14s var(--ease), box-shadow 0.14s var(--ease);
}
textarea { min-height: 118px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 17px) 51%, calc(100% - 12px) 51%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-tint); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }

.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.formgrid .field--wide { grid-column: 1 / -1; }
@media (max-width: 620px) { .formgrid { grid-template-columns: 1fr; } }

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 13px; border-radius: var(--radius-sm);
  font-size: 0.86rem; background: var(--danger-tint); color: var(--danger);
  font-weight: 550;
}
.alert--info { background: var(--navy-tint); color: var(--navy); }
.alert--ok { background: var(--signal-tint); color: var(--signal); }

.empty { padding: 44px 22px; text-align: center; }
.empty__title { font-weight: 600; margin-bottom: 5px; }
.empty__text { color: var(--ink-2); font-size: 0.9rem; max-width: 46ch; margin: 0 auto 16px; }

.skeleton { background: var(--surface-3); border-radius: 6px; height: 12px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ------------------------------------------------------------- fault list */

.filters {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.filters .search { position: relative; flex: 1 1 210px; min-width: 170px; }
.filters select { width: auto; min-width: 132px; font-size: 0.84rem; padding: 7px 30px 7px 10px; }
.filters input { font-size: 0.84rem; padding: 7px 11px; }

.faultlist { display: flex; flex-direction: column; }
.fault {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 18px; padding: 15px 18px;
  border-bottom: 1px solid var(--line); cursor: pointer;
  background: var(--surface); border-left: 0; transition: background 0.12s var(--ease);
}
.fault:last-child { border-bottom: 0; }
.fault:hover { background: var(--surface-2); }
.fault__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fault__title { font-weight: 600; font-size: 0.94rem; letter-spacing: -0.01em; }
.fault__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink-3); }
.fault__side { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; justify-content: center; }
.fault__when { font-size: 0.76rem; color: var(--ink-3); white-space: nowrap; }
.fault--new .fault__title::after { content: ""; }
@media (max-width: 640px) {
  .fault { grid-template-columns: 1fr; }
  .fault__side { flex-direction: row; align-items: center; justify-content: flex-start; }
}

.sep { color: var(--line-strong); }
.assignee { display: inline-flex; align-items: center; gap: 6px; }
.assignee__avatar {
  width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3);
  display: grid; place-items: center; font-size: 0.62rem; font-weight: 700; color: var(--ink-2);
}

/* ---------------------------------------------------------- fault detail */

.detail__head { display: flex; flex-direction: column; gap: 9px; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.detail__title { font-size: 1.28rem; }
.detail__facts { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; color: var(--ink-3); }
.detail__body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.94rem; }

.dl { display: grid; grid-template-columns: 1fr; gap: 0; }
.dl__row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: center; }
.dl__row:last-child { border-bottom: 0; }
.dl__key { font-size: 0.78rem; color: var(--ink-3); font-weight: 600; }
.dl__val { font-size: 0.86rem; overflow-wrap: anywhere; }
.dl__val select { font-size: 0.84rem; padding: 6px 28px 6px 9px; }

.timeline { display: flex; flex-direction: column; gap: 0; }
.tl { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 13px; padding: 14px 0 2px; }
.tl__gutter { display: flex; flex-direction: column; align-items: center; }
.tl__dot {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 0.66rem; font-weight: 700;
  background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line);
}
.tl__thread { flex: 1 1 auto; width: 1px; background: var(--line); margin-top: 5px; min-height: 8px; }
.tl__activity .tl__dot { background: var(--navy-tint); color: var(--navy); }
.tl__comment .tl__dot { background: var(--surface); border-color: var(--line-strong); }
.tl__internal .tl__dot { background: var(--st-await-bg); color: var(--st-await); border-color: transparent; }
.tl__body { padding-bottom: 10px; min-width: 0; }
.tl__who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.tl__name { font-weight: 620; font-size: 0.86rem; }
.tl__when { font-size: 0.76rem; color: var(--ink-3); }
.tl__text { font-size: 0.9rem; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.tl__system { font-size: 0.84rem; color: var(--ink-2); }
.tl__quote { border-radius: var(--radius-sm); background: var(--surface-2); padding: 10px 12px; font-size: 0.88rem; }
.tl--note .tl__quote { background: var(--st-await-bg); color: var(--ink); }

.composer { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.composer textarea { border: 0; border-radius: 0; box-shadow: none !important; min-height: 92px; }
.composer__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 0.83rem; color: var(--ink-2); }
.checkbox input { width: auto; }

.attachments { display: flex; flex-direction: column; gap: 8px; }
.attachment {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2);
  font-size: 0.83rem;
}
.attachment__name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment__size { color: var(--ink-3); font-size: 0.76rem; font-variant-numeric: tabular-nums; }
.dropzone {
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  padding: 14px; text-align: center; font-size: 0.83rem; color: var(--ink-2);
  background: var(--surface-2); cursor: pointer;
}
.dropzone:hover { border-color: var(--navy); color: var(--ink); }
.picked { list-style: none; margin: 9px 0 0; padding: 0; font-size: 0.8rem; color: var(--ink-2); }
.picked li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }

/* ------------------------------------------------------------------- auth */

.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth__aside { display: none; } }
.auth__aside {
  background: var(--navy); color: #eef4fb; padding: 46px 48px;
  display: flex; flex-direction: column; justify-content: space-between;
}
@media (prefers-color-scheme: dark) { .auth__aside { background: #10233a; } }
.auth__mark { font-weight: 800; letter-spacing: 0.05em; background: rgba(255,255,255,0.12); padding: 7px 11px; border-radius: 9px; font-size: 0.8rem; align-self: flex-start; }
.auth__pitch { max-width: 30ch; }
.auth__pitch h1 { font-size: 2.05rem; letter-spacing: -0.03em; margin-bottom: 14px; color: #fff; }
.auth__pitch p { color: #c6d7ea; font-size: 0.95rem; line-height: 1.6; }
.auth__points { display: flex; flex-direction: column; gap: 11px; margin-top: 26px; list-style: none; padding: 0; }
.auth__points li { display: flex; gap: 10px; font-size: 0.88rem; color: #dbe7f4; }
.auth__points svg { flex: none; margin-top: 3px; }
.auth__fine { font-size: 0.76rem; color: #9fb6d0; }
.auth__panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth__form { width: 100%; max-width: 384px; }
.auth__switch { font-size: 0.86rem; color: var(--ink-2); text-align: center; margin-top: 18px; }

/* ----------------------------------------------------------------- toasts */

.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 90; display: flex; flex-direction: column; gap: 9px; max-width: min(380px, calc(100vw - 40px)); }
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px;
  box-shadow: var(--shadow-pop); font-size: 0.875rem;
  animation: toast-in 0.28s var(--ease) both;
}
.toast--error { border-color: var(--danger); color: var(--danger); }
.toast--ok { border-color: var(--signal); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- utility */

.muted { color: var(--ink-3); }
.small { font-size: 0.82rem; }
.tiny { font-size: 0.75rem; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; text-align: left; cursor: pointer; font: inherit; color: inherit;
  display: flex; flex-direction: column; gap: 2px;
}
.statcard:hover { border-color: var(--line-strong); background: var(--surface-2); }
.statcard[aria-pressed="true"] { border-color: var(--navy); background: var(--navy-tint); }
.statcard__label { font-size: 0.78rem; color: var(--ink-2); font-weight: 550; }
.statcard__value { font-size: 1.45rem; font-weight: 680; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.statcard--static { cursor: default; }
.statcard--static:hover { border-color: var(--line); background: var(--surface); }

table.table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
table.table th {
  text-align: left; font-size: 0.74rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 650; padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
table.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.table tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover { background: var(--surface-2); }
.scrollx { overflow-x: auto; }

.meter { display: flex; gap: 5px; align-items: center; }
.meter__bar { height: 5px; border-radius: 3px; background: var(--navy); }
