/* Thundera Shell v2 — app / system / admin kit. Load after tokens.css, shell.css and ui.css
 * (buttons, badges, cards, skeletons live in ui.css). Behaviour: system.js.
 * Frame + collapsible sidebar, page header, stats, panels, tables, forms, tabs, alerts,
 * empty states, dialogs, charts. Guide: https://thundera.eu/docs/shell#system */

/* ── App frame + sidebar ── */
.th-frame { display: grid; grid-template-columns: var(--th-sidebar-w) minmax(0, 1fr); min-height: calc(100dvh - var(--th-bar-h)); transition: grid-template-columns var(--th-dur-3) var(--th-ease); }
.th-frame[data-collapsed] { grid-template-columns: var(--th-sidebar-w-collapsed) minmax(0, 1fr); }
.th-sidebar {
  position: sticky; top: calc(var(--th-bar-h) + env(safe-area-inset-top, 0px)); align-self: start; z-index: var(--th-z-sticky);
  height: calc(100dvh - var(--th-bar-h) - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column;
  background: var(--th-bg-2); border-right: 1px solid var(--th-border); overflow: hidden;
}
.th-side-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 10px; scrollbar-width: thin; }
.th-side-head { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-bottom: 1px solid var(--th-border); font-weight: var(--th-fw-semibold); white-space: nowrap; }
.th-side-group + .th-side-group { margin-top: 18px; }
.th-side-title { padding: 0 10px 6px; font: var(--th-fw-semibold) var(--th-fs-2xs)/1.4 var(--th-font-sans); letter-spacing: var(--th-tracking-wide); text-transform: uppercase; color: var(--th-text-3); white-space: nowrap; overflow: hidden; }
.th-side-link {
  position: relative; display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 10px; border-radius: var(--th-radius-sm);
  color: var(--th-text-2); font-size: var(--th-fs-sm); font-weight: var(--th-fw-medium); white-space: nowrap; text-decoration: none !important; width: 100%;
  background: none; border: 0; cursor: pointer; text-align: left; font-family: inherit; transition: background-color var(--th-dur-1), color var(--th-dur-1);
}
.th-side-link svg { width: 18px; height: 18px; flex: none; color: var(--th-text-3); }
.th-side-link:hover { background: var(--th-hover); color: var(--th-text); }
.th-side-link[aria-current], .th-side-link[aria-selected="true"] { background: var(--brand-soft); color: var(--th-text); }
.th-side-link[aria-current] svg, .th-side-link[aria-selected="true"] svg { color: var(--brand-accent); }
.th-side-link[aria-current]::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-grad); }
.th-side-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.th-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--th-radius-full); display: inline-grid; place-items: center; font-size: 11px; font-weight: var(--th-fw-semibold); background: var(--th-surface-3); color: var(--th-text-2); }
.th-side-foot { padding: 10px; border-top: 1px solid var(--th-border); }
.th-frame[data-collapsed] .th-side-label, .th-frame[data-collapsed] .th-side-title, .th-frame[data-collapsed] .th-count, .th-frame[data-collapsed] .th-side-head span { display: none; }
.th-frame[data-collapsed] .th-side-link { justify-content: center; padding: 0; }
.th-frame[data-collapsed] .th-side-group + .th-side-group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--th-border); }
.th-frame[data-collapsed] [data-th-sidebar-toggle] svg { transform: scaleX(-1); }
.th-frame-main { min-width: 0; padding: clamp(20px, 3vw, 36px) max(var(--th-gutter), env(safe-area-inset-right, 0px)) 64px; }
.th-frame-main > .th-page { max-width: 1280px; margin: 0 auto; }
.th-side-toggle-m { display: none; }
@media (max-width: 899.98px) {
  .th-frame, .th-frame[data-collapsed] { grid-template-columns: minmax(0, 1fr); }
  .th-sidebar { position: fixed; left: 0; top: calc(var(--th-bar-h) + env(safe-area-inset-top, 0px)); bottom: 0; height: auto; width: min(300px, 86vw); z-index: var(--th-z-drawer); transform: translateX(-102%); transition: transform var(--th-dur-3) var(--th-ease); box-shadow: var(--th-shadow-4); }
  .th-frame[data-side-open] .th-sidebar { transform: none; }
  .th-frame[data-side-open]::after { content: ""; position: fixed; inset: calc(var(--th-bar-h) + env(safe-area-inset-top, 0px)) 0 0; z-index: calc(var(--th-z-drawer) - 1); background: var(--th-overlay); }
  .th-frame[data-collapsed] .th-side-label, .th-frame[data-collapsed] .th-side-title, .th-frame[data-collapsed] .th-count, .th-frame[data-collapsed] .th-side-head span { display: revert; }
  .th-frame[data-collapsed] .th-side-link { justify-content: flex-start; padding: 0 10px; }
  .th-side-toggle-d { display: none !important; }
  .th-side-toggle-m { display: inline-flex; }
}

/* ── Page header ── */
.th-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: clamp(20px, 3vw, 32px); }
.th-page-head > div:first-child { min-width: 0; flex: 1 1 320px; }
.th-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; font-size: var(--th-fs-xs); color: var(--th-text-3); }
.th-crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.th-crumbs li + li::before { content: "/"; color: var(--th-border-3); }
.th-crumbs a { color: var(--th-text-2); text-decoration: none; }
.th-crumbs a:hover { color: var(--th-text); }
.th-crumbs [aria-current] { color: var(--th-text); }
.th-page-title { font-size: var(--th-fs-2xl); font-weight: var(--th-fw-bold); letter-spacing: var(--th-tracking-tight); line-height: 1.2; }
.th-page-desc { margin-top: 6px; color: var(--th-text-2); max-width: 70ch; }
.th-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.th-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.th-toolbar .th-grow { flex: 1 1 220px; }

/* ── Stats ── */
.th-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 14px; margin-bottom: 24px; }
.th-stat { position: relative; padding: 18px 20px; border-radius: var(--th-radius-lg); background: var(--th-surface-1); border: 1px solid var(--th-border); overflow: hidden; }
.th-stat-label { display: flex; align-items: center; gap: 8px; color: var(--th-text-2); font-size: var(--th-fs-sm); font-weight: var(--th-fw-medium); }
.th-stat-label svg { width: 16px; height: 16px; color: var(--th-text-3); }
.th-stat-value { margin-top: 10px; font: var(--th-fw-bold) var(--th-fs-2xl)/1.1 var(--th-font-sans); letter-spacing: var(--th-tracking-tight); font-variant-numeric: tabular-nums; }
.th-stat-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: var(--th-fs-xs); color: var(--th-text-3); }
.th-delta { display: inline-flex; align-items: center; gap: 2px; font-weight: var(--th-fw-semibold); font-variant-numeric: tabular-nums; }
.th-delta-up { color: var(--th-success-text); }
.th-delta-down { color: var(--th-danger-text); }
.th-delta-up::before { content: "▲"; font-size: .7em; }
.th-delta-down::before { content: "▼"; font-size: .7em; }
.th-spark { position: absolute; right: 14px; bottom: 14px; width: 96px; height: 32px; color: var(--brand-accent); opacity: .85; }

/* ── Panels ── */
.th-panel { border-radius: var(--th-radius-lg); background: var(--th-surface-1); border: 1px solid var(--th-border); }
.th-panel + .th-panel, .th-grid-2 + .th-panel, .th-panel + .th-grid-2 { margin-top: 16px; }
.th-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--th-border); }
.th-panel-head h2, .th-panel-head h3 { font-size: var(--th-fs-md); font-weight: var(--th-fw-semibold); letter-spacing: -.01em; }
.th-panel-head p { color: var(--th-text-3); font-size: var(--th-fs-xs); margin-top: 2px; }
.th-panel-body { padding: 20px; }
.th-panel-body-flush { padding: 0; }
.th-panel-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--th-border); background: var(--th-bg-2); border-radius: 0 0 var(--th-radius-lg) var(--th-radius-lg); }
.th-grid-2 > .th-panel, .th-grid-3 > .th-panel { margin-top: 0; }
.th-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.th-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.th-kv { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 20px; margin: 0; font-size: var(--th-fs-sm); }
.th-kv dt { color: var(--th-text-3); }
.th-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ── Tables ── */
.th-table-wrap { position: relative; overflow: auto; max-height: var(--th-table-max, none); border-radius: var(--th-radius-lg); border: 1px solid var(--th-border); background: var(--th-surface-1); }
.th-panel .th-table-wrap { border: 0; border-radius: 0 0 var(--th-radius-lg) var(--th-radius-lg); }
.th-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--th-fs-sm); }
.th-table th { position: sticky; top: 0; z-index: 1; padding: 10px 16px; text-align: left; white-space: nowrap; font-size: var(--th-fs-xs); font-weight: var(--th-fw-semibold); letter-spacing: .02em; color: var(--th-text-3); background: var(--th-surface-2); border-bottom: 1px solid var(--th-border-2); }
.th-table td { padding: 12px 16px; border-bottom: 1px solid var(--th-border); vertical-align: middle; }
.th-table tbody tr:last-child td { border-bottom: 0; }
.th-table tbody tr { transition: background-color var(--th-dur-1); }
.th-table tbody tr:hover { background: var(--th-hover); }
.th-table tbody tr[aria-selected="true"] { background: var(--brand-soft); }
.th-table .th-num { text-align: right; font-variant-numeric: tabular-nums; }
.th-table .th-actions-cell { text-align: right; white-space: nowrap; }
.th-table th[aria-sort] { cursor: pointer; }
.th-table th[aria-sort="ascending"]::after { content: " ↑"; } .th-table th[aria-sort="descending"]::after { content: " ↓"; }
.th-cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.th-cell-main strong { display: block; font-weight: var(--th-fw-semibold); }
.th-cell-main small { display: block; color: var(--th-text-3); font-size: var(--th-fs-xs); }
@media (max-width: 639.98px) {
  .th-table-stack thead { display: none; }
  .th-table-stack, .th-table-stack tbody, .th-table-stack tr, .th-table-stack td { display: block; width: 100%; }
  .th-table-stack tr { padding: 10px 14px; border-bottom: 1px solid var(--th-border); }
  .th-table-stack tbody tr:last-child { border-bottom: 0; }
  .th-table-stack td { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border: 0; text-align: right; }
  .th-table-stack td::before { content: attr(data-label); flex: none; color: var(--th-text-3); font-size: var(--th-fs-xs); font-weight: var(--th-fw-semibold); text-align: left; }
  .th-table-stack td.th-num, .th-table-stack td.th-actions-cell { text-align: right; }
}
.th-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--th-border); color: var(--th-text-3); font-size: var(--th-fs-xs); }

/* ── Forms ── */
.th-form { display: grid; gap: 18px; }
.th-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 18px; }
.th-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.th-label { font-size: var(--th-fs-sm); font-weight: var(--th-fw-medium); color: var(--th-text); }
.th-label .th-req { color: var(--th-danger-text); margin-left: 2px; }
.th-hint { font-size: var(--th-fs-xs); color: var(--th-text-3); }
.th-error-text { font-size: var(--th-fs-xs); color: var(--th-danger-text); }
.th-input, .th-select, .th-textarea {
  width: 100%; min-height: 40px; padding: 9px 12px; border-radius: var(--th-radius-sm); border: 1px solid var(--th-border-2);
  background: var(--th-surface-2); color: var(--th-text); font: var(--th-fs-sm)/1.4 var(--th-font-sans); outline: none;
  -webkit-appearance: none; appearance: none; transition: border-color var(--th-dur-1), box-shadow var(--th-dur-1), background-color var(--th-dur-1);
}
.th-textarea { min-height: 96px; resize: vertical; line-height: var(--th-lh-normal); }
.th-input::placeholder, .th-textarea::placeholder { color: var(--th-text-3); }
.th-input:hover, .th-select:hover, .th-textarea:hover { border-color: var(--th-border-3); }
.th-input:focus, .th-select:focus, .th-textarea:focus { border-color: var(--brand-accent); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--th-surface-1); }
.th-input[aria-invalid="true"], .th-select[aria-invalid="true"], .th-textarea[aria-invalid="true"], .th-input:user-invalid { border-color: var(--th-red); box-shadow: 0 0 0 3px var(--th-danger-soft); }
.th-input:disabled, .th-select:disabled, .th-textarea:disabled { opacity: .55; cursor: not-allowed; }
.th-select { padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808a99' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.th-input-group { display: flex; align-items: stretch; }
.th-input-group > * { border-radius: 0; }
.th-input-group > :first-child { border-radius: var(--th-radius-sm) 0 0 var(--th-radius-sm); }
.th-input-group > :last-child { border-radius: 0 var(--th-radius-sm) var(--th-radius-sm) 0; }
.th-input-group > .th-addon { display: grid; place-items: center; padding: 0 12px; background: var(--th-surface-3); border: 1px solid var(--th-border-2); color: var(--th-text-3); font-size: var(--th-fs-sm); white-space: nowrap; }
.th-input-group > .th-addon:first-child { border-right: 0; } .th-input-group > .th-addon:last-child { border-left: 0; }
.th-check { display: inline-flex; align-items: flex-start; gap: 10px; font-size: var(--th-fs-sm); cursor: pointer; }
.th-check input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 1px 0 0; border-radius: 5px; border: 1px solid var(--th-border-3); background: var(--th-surface-2); display: grid; place-items: center; cursor: pointer; transition: background-color var(--th-dur-1), border-color var(--th-dur-1); }
.th-check input[type="radio"] { border-radius: 50%; }
.th-check input::after { content: ""; width: 5px; height: 9px; border: solid var(--brand-on); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); opacity: 0; }
.th-check input[type="radio"]::after { width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--brand-on); transform: none; }
.th-check input:checked { background: var(--brand-accent); border-color: var(--brand-accent); }
.th-check input:checked::after { opacity: 1; }
.th-check input:focus-visible, .th-switch input:focus-visible { outline: none; box-shadow: var(--th-ring); }
.th-switch { display: inline-flex; align-items: center; gap: 10px; font-size: var(--th-fs-sm); cursor: pointer; }
.th-switch input { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 38px; height: 22px; margin: 0; border-radius: 999px; background: var(--th-surface-4); cursor: pointer; transition: background-color var(--th-dur-2) var(--th-ease); }
.th-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform var(--th-dur-2) var(--th-ease); }
.th-switch input:checked { background: var(--brand-accent); }
.th-switch input:checked::after { transform: translateX(16px); }
.th-switch input:disabled { opacity: .5; cursor: not-allowed; }
.th-fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.th-fieldset legend { padding: 0; margin-bottom: 4px; font-size: var(--th-fs-sm); font-weight: var(--th-fw-medium); }
.th-setting { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--th-border); }
.th-setting:last-child { border-bottom: 0; }
.th-setting h3 { font-size: var(--th-fs-sm); font-weight: var(--th-fw-semibold); }
.th-setting p { color: var(--th-text-3); font-size: var(--th-fs-xs); margin-top: 2px; }

/* ── Tabs ── */
.th-tabs { display: flex; gap: 2px; margin-bottom: 20px; border-bottom: 1px solid var(--th-border); overflow-x: auto; scrollbar-width: none; }
.th-tabs::-webkit-scrollbar { display: none; }
.th-tab { position: relative; height: 42px; padding: 0 14px; border: 0; background: none; color: var(--th-text-2); font: var(--th-fw-medium) var(--th-fs-sm) var(--th-font-sans); white-space: nowrap; cursor: pointer; text-decoration: none !important; display: inline-flex; align-items: center; gap: 8px; }
.th-tab:hover { color: var(--th-text); }
.th-tab[aria-selected="true"], .th-tab[aria-current] { color: var(--th-text); }
.th-tab[aria-selected="true"]::after, .th-tab[aria-current]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand-grad); }
.th-tab:focus-visible { outline: none; box-shadow: inset var(--th-ring); border-radius: var(--th-radius-sm); }
.th-tabs-pill { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--th-border); border-radius: var(--th-radius-md); background: var(--th-surface-2); }
.th-tabs-pill .th-tab { height: 32px; border-radius: var(--th-radius-sm); }
.th-tabs-pill .th-tab[aria-selected="true"] { background: var(--th-surface-4); box-shadow: var(--th-shadow-1); }
.th-tabs-pill .th-tab::after { display: none; }

/* ── Status pills, empty states (alerts live in ui.css) ── */
.th-status { display: inline-flex; align-items: center; gap: 7px; font-size: var(--th-fs-sm); font-weight: var(--th-fw-medium); white-space: nowrap; }
.th-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--th-text-3); }
.th-status-ok::before { background: var(--th-green); box-shadow: 0 0 0 3px var(--th-success-soft); }
.th-status-warn::before { background: var(--th-amber); box-shadow: 0 0 0 3px var(--th-warning-soft); }
.th-status-bad::before { background: var(--th-red); box-shadow: 0 0 0 3px var(--th-danger-soft); }
.th-status-info::before { background: var(--th-sky); box-shadow: 0 0 0 3px var(--th-info-soft); }
.th-empty-state { display: grid; justify-items: center; gap: 10px; padding: clamp(36px, 6vw, 64px) 24px; text-align: center; }
.th-empty-state .th-icon { width: 52px; height: 52px; border-radius: 16px; margin-bottom: 6px; }
.th-empty-state h3 { font-size: var(--th-fs-md); font-weight: var(--th-fw-semibold); }
.th-empty-state p { max-width: 44ch; color: var(--th-text-2); font-size: var(--th-fs-sm); }
.th-empty-state .th-row { margin-top: 8px; justify-content: center; }
.th-skel-line { height: 12px; margin: 8px 0; }
.th-skel-title { height: 22px; width: 40%; margin-bottom: 14px; }
.th-skel-block { height: 120px; }

/* ── Dialog (<dialog class="th-dialog">) ── */
.th-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--th-border-2); border-radius: var(--th-radius-xl); background: var(--th-surface-1); color: var(--th-text); box-shadow: var(--th-shadow-4); overflow: hidden; }
.th-dialog[open] { display: flex; flex-direction: column; animation: th-dialog-in var(--th-dur-3) var(--th-ease); }
.th-dialog::backdrop { background: var(--th-overlay); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: th-fade var(--th-dur-3) var(--th-ease); }
.th-dialog-lg { width: min(860px, calc(100vw - 24px)); }
.th-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.th-dialog-head h2 { font-size: var(--th-fs-lg); font-weight: var(--th-fw-semibold); }
.th-dialog-head p { margin-top: 4px; color: var(--th-text-2); font-size: var(--th-fs-sm); }
.th-dialog-body { padding: 8px 22px 20px; overflow: auto; }
.th-dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--th-border); background: var(--th-bg-2); }
.th-close { display: inline-grid; place-items: center; width: 32px; height: 32px; margin: -4px -6px 0 0; border: 0; border-radius: var(--th-radius-sm); background: none; color: var(--th-text-3); cursor: pointer; }
.th-close:hover { background: var(--th-hover); color: var(--th-text); }
.th-close svg { width: 18px; height: 18px; }
@keyframes th-dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes th-fade { from { opacity: 0; } }
@media (max-width: 599.98px) { .th-dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--th-radius-xl) var(--th-radius-xl) 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); } }

/* ── Charts ── */
.th-chart { position: relative; width: 100%; aspect-ratio: var(--th-chart-ratio, 16 / 6); min-height: 180px; }
.th-chart, .th-legend { --th-chart-1: var(--brand-1); --th-chart-2: var(--brand-2); --th-chart-3: var(--th-sky); --th-chart-4: var(--th-green); --th-chart-5: var(--th-amber); --th-chart-6: var(--th-violet); --th-chart-grid: var(--th-border); --th-chart-axis: var(--th-text-3); }
.th-chart > svg, .th-chart > canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.th-chart .th-grid-line { stroke: var(--th-chart-grid); }
.th-chart text { fill: var(--th-chart-axis); font: 11px var(--th-font-sans); }
.th-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: var(--th-fs-xs); color: var(--th-text-2); }
.th-legend span { display: inline-flex; align-items: center; gap: 6px; }
.th-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--th-chart-1)); }
.th-bars { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.th-bars > i { flex: 1; min-height: 2px; height: var(--v, 10%); border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--brand-1), color-mix(in srgb, var(--brand-1) 35%, transparent)); }
.th-meter { height: 8px; border-radius: 999px; background: var(--th-surface-3); overflow: hidden; }
.th-meter > i { display: block; height: 100%; width: var(--v, 0%); border-radius: inherit; background: var(--brand-grad); }
.th-meter[data-level="warn"] > i { background: var(--th-amber); } .th-meter[data-level="bad"] > i { background: var(--th-red); }
