/* Asset Manager — one stylesheet, no framework. Light/dark via tokens. */
:root {
  color-scheme: light;
  --page: #eef1f4;
  --surface: #ffffff;
  --raised: #f7f9fb;
  --ink: #15212c;
  --ink-2: #4e5d6b;
  --muted: #7c8a97;
  --line: #dce2e8;
  --line-2: #c8d1da;
  --accent: #2346a8;
  --accent-ink: #ffffff;
  --accent-soft: #e5ebf8;
  --good: #0a7d0a;
  --good-soft: #e3f4e3;
  --warn: #9a6400;
  --warn-soft: #fdf1d8;
  --bad: #b8302f;
  --bad-soft: #fbe6e5;
  --grid: #e5e9ee;
  --base: #c3ccd5;
  --muted-mark: #a8b3be;
  --focus: #2a78d6;
  --shadow: 0 1px 2px rgba(21, 33, 44, .06), 0 2px 8px rgba(21, 33, 44, .04);
  --radius: 8px;
  --radius-s: 5px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0f151b; --surface: #161e26; --raised: #1b252e; --ink: #e5ebf1; --ink-2: #a9b6c2;
    --muted: #7d8b98; --line: #26323d; --line-2: #33414e; --accent: #7c9bf0; --accent-ink: #0f151b;
    --accent-soft: #1f2b45; --good: #4cc04c; --good-soft: #15301a; --warn: #e0a33a; --warn-soft: #33270f;
    --bad: #ef7372; --bad-soft: #3a1b1d; --grid: #222d37; --base: #3a4855; --muted-mark: #56636f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0f151b; --surface: #161e26; --raised: #1b252e; --ink: #e5ebf1; --ink-2: #a9b6c2;
  --muted: #7d8b98; --line: #26323d; --line-2: #33414e; --accent: #7c9bf0; --accent-ink: #0f151b;
  --accent-soft: #1f2b45; --good: #4cc04c; --good-soft: #15301a; --warn: #e0a33a; --warn-soft: #33270f;
  --bad: #ef7372; --bad-soft: #3a1b1d; --grid: #222d37; --base: #3a4855; --muted-mark: #56636f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink); font: 14px/1.5 var(--sans);
  font-feature-settings: "tnum" 0;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 22px; font-weight: 650; }
h2 { font-size: 15px; font-weight: 650; }
h3 { font-size: 13px; font-weight: 650; }
p { margin: 0 0 .6em; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--surface); border-right: 1px solid var(--line); padding: 16px 12px 24px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 6px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.brand b { display: block; font-size: 14px; line-height: 1.1; }
.brand span { font-size: 11.5px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav .group { font-size: 11.5px; color: var(--muted); padding: 10px 10px 4px; }
.nav a {
  display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 6px; color: var(--ink-2);
  font-weight: 500;
}
.nav a:hover { background: var(--raised); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav a svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 8px; font-size: 12px; }
.who { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.who:hover { text-decoration: none; }
.who .av { width: 26px; height: 26px; }
.who b { font-weight: 600; display: block; line-height: 1.1; }
.who small { color: var(--muted); }
.side-foot form { margin: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.linkbtn:hover { color: var(--ink); text-decoration: underline; }

.mobilebar { display: none; }
.main { padding: 22px 28px 60px; min-width: 0; max-width: 1480px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.head p { margin: 4px 0 0; color: var(--ink-2); }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.crumb a { color: var(--muted); }

/* ---------------------------------------------------------------- surfaces */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel > .ph { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 14px 16px 0; flex-wrap: wrap; }
.panel > .pb { padding: 12px 16px 16px; }
.panel + .panel { margin-top: 16px; }
.grid > .panel + .panel, .grid > * + .panel { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.stack > * + * { margin-top: 16px; }

/* ---------------------------------------------------------------- buttons & inputs */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 6px;
  font: 500 13px/1 var(--sans); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--raised); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line-2)); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--raised); color: var(--ink); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=date],
input[type=search], select, textarea, input:not([type]) {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 6px;
  background: var(--surface); color: var(--ink); font: 14px var(--sans);
}
textarea { height: auto; padding: 8px 10px; line-height: 1.45; resize: vertical; }
textarea.code { font-family: var(--mono); font-size: 12.5px; }
select { padding-right: 28px; }
select[multiple] { height: auto; padding: 4px; }
input[type=color] { width: 44px; height: 34px; padding: 2px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); vertical-align: -3px; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--focus) 55%, transparent); outline-offset: 0; border-color: var(--focus); }

.form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 16px; }
.form .f { grid-column: span 6; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form .f.w12 { grid-column: span 12; } .form .f.w4 { grid-column: span 4; } .form .f.w3 { grid-column: span 3; }
.form .f.w2 { grid-column: span 2; } .form .f.w8 { grid-column: span 8; }
.form label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.form .help { font-size: 12px; color: var(--muted); }
.form .err { font-size: 12px; color: var(--bad); }
.form .f.has-err input, .form .f.has-err select { border-color: var(--bad); }
.form fieldset { grid-column: span 12; border: 0; padding: 0; margin: 6px 0 0; display: contents; }
.form .legend { grid-column: span 12; font-weight: 650; font-size: 13px; padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; display: flex; gap: 8px; align-items: baseline; }
.form .legend:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form .legend span { font-weight: 400; color: var(--muted); font-size: 12px; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; list-style: none; padding: 0; margin: 0; }
.checks label { font-weight: 400; color: var(--ink); display: flex; gap: 8px; align-items: flex-start; }
.form .f > div > div, .form .f ul { list-style: none; padding: 0; margin: 2px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; }
.form .f ul li label, .form .f > div > div label { font-weight: 400; color: var(--ink); display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.nonfield { background: var(--bad-soft); color: var(--bad); padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; }

/* ---------------------------------------------------------------- messages */
.msgs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.msg { padding: 9px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.msg.success { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); background: var(--good-soft); }
.msg.error { border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); background: var(--bad-soft); }
.msg.warning { border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); }

/* ---------------------------------------------------------------- chips, tags, badges */
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 7px; border-radius: 4px;
  font-size: 12px; font-weight: 500; background: var(--raised); color: var(--ink-2); border: 1px solid var(--line);
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
a.chip:hover { text-decoration: none; border-color: var(--line-2); color: var(--ink); }
.chip i, .dot { width: 8px; height: 8px; border-radius: 2px; flex: none; display: inline-block; }
.dot { border-radius: 50%; }
.tag { --c: var(--muted); background: color-mix(in srgb, var(--c) 13%, var(--surface)); border-color: color-mix(in srgb, var(--c) 30%, var(--surface)); color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; white-space: nowrap; color: var(--ink-2); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.active::before { background: var(--good); }
.status.stopped::before { background: var(--muted); box-shadow: inset 0 0 0 2px var(--surface); outline: 1.5px solid var(--muted); width: 5px; height: 5px; }
.status.to_cancel { color: var(--warn); } .status.to_cancel::before { background: var(--warn); border-radius: 1px; }
.status.cancelled { color: var(--muted); text-decoration: line-through; } .status.cancelled::before { background: var(--line-2); }
.status.missing { color: var(--bad); } .status.missing::before { background: var(--bad); border-radius: 1px; transform: rotate(45deg); }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.badge.root { background: var(--ink); color: var(--surface); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.good { background: var(--good-soft); color: var(--good); }
.av {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 10px; font-weight: 700;
  background: var(--accent-soft); color: var(--accent); border: 2px solid var(--surface); flex: none;
}
.avs { display: inline-flex; } .avs .av + .av { margin-left: -6px; }

/* spec plate: the asset's hardware label */
.plate { display: inline-flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; font-size: 12px; white-space: nowrap; background: var(--surface); }
.plate span { padding: 1px 6px; color: var(--ink); font-variant-numeric: tabular-nums; }
.plate span + span { border-left: 1px solid var(--line-2); }
.plate span em { font-style: normal; color: var(--muted); margin-left: 3px; }
.plate.lg { font-size: 14px; border-radius: 6px; }
.plate.lg span { padding: 6px 14px; }
.plate.lg span em { display: block; margin: 0; font-size: 11.5px; }

/* ---------------------------------------------------------------- tables */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
.t th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap; background: var(--surface); position: sticky; top: 0; z-index: 1;
}
.t th.right, .t td.right { text-align: right; }
.t th a.sort { color: var(--muted); }
.t th a.sort:hover { color: var(--ink); }
.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--raised); }
.t td.stripe { padding: 0; width: 4px; }
.t td.stripe i { display: block; width: 3px; height: 26px; border-radius: 2px; background: var(--c, var(--line-2)); margin-left: 6px; }
.t .name { font-weight: 600; color: var(--ink); }
.t .name:hover { color: var(--accent); }
.t .sub { font-size: 12px; color: var(--muted); display: block; margin-top: 1px; }
.t tfoot td { font-weight: 650; border-top: 1px solid var(--line-2); border-bottom: 0; }
.t .ki { width: 16px; height: 16px; color: var(--muted); }
.t.compact td { padding: 6px 10px; }
.t .sel { width: 28px; }
.t td.ncol { min-width: 190px; }
.t .sub .status { font-size: 12px; }
.t td.pcol { max-width: 210px; }
.t td.pcol .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ips { display: flex; flex-direction: column; gap: 1px; }
.ips span { font-family: var(--mono); font-size: 12px; }

.ki { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }

/* ---------------------------------------------------------------- filter bar */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px; }
.filters input[type=search] { width: 260px; flex: 0 1 260px; }
.filters select { width: auto; max-width: 180px; height: 32px; font-size: 13px; }
.filters .grow { flex: 1; }
.active-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px 12px; align-items: center; font-size: 12.5px; }
.active-filters a.chip::after { content: "×"; margin-left: 3px; color: var(--muted); }
details.more > summary { list-style: none; cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
.more-panel { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 12px 12px; }

.bulkbar {
  position: sticky; bottom: 12px; z-index: 5; display: none; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--ink); color: var(--surface);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.bulkbar.show { display: flex; }
.bulkbar select, .bulkbar input { width: auto; height: 30px; background: var(--surface); color: var(--ink); }
.bulkbar .btn { height: 30px; }

.pager { display: flex; gap: 6px; justify-content: space-between; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ---------------------------------------------------------------- dashboard */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; }
.hero .figure { padding: 18px 20px; border-right: 1px solid var(--line); }
.hero .figure .label { color: var(--ink-2); font-size: 13px; }
.hero .figure .big { font-size: 40px; font-weight: 650; letter-spacing: -.025em; line-height: 1.1; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.hero .figure .big small { font-size: 16px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.hero .figure .line { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-2); font-size: 13px; align-items: center; }
.delta.up { color: var(--bad); } .delta.down { color: var(--good); }
.hero .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hero .facts > a, .hero .facts > div { padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--ink); }
.hero .facts > *:nth-child(odd) { border-right: 1px solid var(--line); }
.hero .facts > *:nth-last-child(-n+2) { border-bottom: 0; }
.hero .facts a:hover { background: var(--raised); text-decoration: none; }
.hero .facts b { font-size: 22px; font-weight: 650; display: block; line-height: 1.15; font-variant-numeric: tabular-nums; }
.hero .facts span { font-size: 12.5px; color: var(--ink-2); }
.hero .facts .warnfig b { color: var(--warn); }
.hero .facts .badfig b { color: var(--bad); }
.spark { width: 120px; height: 32px; } .spark path { fill: none; stroke: var(--accent); stroke-width: 2; } .spark circle { fill: var(--accent); }

.composition { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--surface); margin: 14px 0 10px; }
.composition span { display: block; height: 100%; min-width: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bar { display: grid; grid-template-columns: minmax(90px, 150px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; color: var(--ink); }
.bar:hover { text-decoration: none; } a.bar:hover .bn { color: var(--accent); }
.bar .bn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.bar .track { height: 8px; background: var(--grid); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 4px; background: var(--c, var(--accent)); }
.bar .bv { font-variant-numeric: tabular-nums; text-align: right; min-width: 70px; }
.bar .bv small { color: var(--muted); display: block; font-size: 11px; line-height: 1.1; }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .grid.base { stroke: var(--base); }
.chart .tick { fill: var(--muted); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chart .tick.yr { font-size: 10.5px; fill: var(--muted); opacity: .8; }
.chart .hit { fill: transparent; }
.chart .col:hover .hit, .chart .col:focus .hit { fill: var(--raised); }
.chart .col:focus { outline: none; }
.chart rect, .chart path { shape-rendering: geometricPrecision; }
.tip {
  position: fixed; z-index: 50; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2);
  border-radius: 6px; padding: 8px 10px; font-size: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .14); min-width: 170px; display: none;
}
.tip strong { display: block; margin-bottom: 4px; }
.tip .tr { display: flex; align-items: center; gap: 6px; } .tip .tr b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; font-weight: 600; }
.tip .tr i { width: 8px; height: 8px; border-radius: 2px; }
.tip .tr em { font-style: normal; color: var(--ink-2); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow a { color: var(--ink); font-weight: 600; }
.list .grow small { display: block; color: var(--muted); }
.due { font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: var(--raised); color: var(--ink-2); white-space: nowrap; }
.due.soon { background: var(--warn-soft); color: var(--warn); }
.due.now { background: var(--bad-soft); color: var(--bad); }
.empty { padding: 26px 16px; text-align: center; color: var(--ink-2); }
.empty p { margin: 0 0 10px; }

/* ---------------------------------------------------------------- asset detail */
.ahead { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ahead .tab { width: 6px; align-self: stretch; border-radius: 3px; background: var(--c); }
.ahead .ttl { flex: 1; min-width: 240px; }
.ahead .ttl h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ahead .ttl .line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ahead .price { text-align: right; }
.ahead .price b { font-size: 26px; font-weight: 650; display: block; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.ahead .price span { color: var(--ink-2); font-size: 12.5px; }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 13.5px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 13px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.timeline .when { color: var(--muted); font-size: 12px; }
.chg { font-size: 12px; color: var(--ink-2); margin-top: 2px; }
.chg del { color: var(--muted); }
.chg ins { text-decoration: none; color: var(--ink); }

/* ---------------------------------------------------------------- import preview */
.counts { display: flex; gap: 8px; flex-wrap: wrap; }
.counts span { padding: 6px 12px; border-radius: 6px; background: var(--raised); border: 1px solid var(--line); font-size: 13px; }
.counts b { font-variant-numeric: tabular-nums; margin-right: 4px; }
.act { font-size: 11.5px; font-weight: 650; padding: 1px 7px; border-radius: 4px; white-space: nowrap; }
.act.create { background: var(--good-soft); color: var(--good); }
.act.update { background: var(--accent-soft); color: var(--accent); }
.act.same { background: var(--raised); color: var(--muted); }
.act.error { background: var(--bad-soft); color: var(--bad); }
.act.missing { background: var(--warn-soft); color: var(--warn); }

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .box { width: 100%; max-width: 380px; }
.auth .brand { justify-content: center; margin-bottom: 18px; }
.auth .panel { padding: 22px; }
.auth h1 { font-size: 18px; margin-bottom: 4px; }
.auth .lead { color: var(--ink-2); margin-bottom: 16px; }
.auth form { display: flex; flex-direction: column; gap: 12px; }
.auth label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; flex-direction: column; gap: 5px; }
.auth .btn { height: 36px; }
.otp { font: 600 22px var(--mono) !important; letter-spacing: .3em; text-align: center; height: 46px !important; }
.qr { display: grid; place-items: center; padding: 12px; background: #fff; border-radius: 8px; border: 1px solid var(--line); margin: 6px 0 10px; }
.qr svg { width: 200px; height: 200px; }
.secret { font-family: var(--mono); font-size: 13px; background: var(--raised); padding: 8px 10px; border-radius: 6px; text-align: center; word-break: break-all; user-select: all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font-family: var(--mono); font-size: 14px; margin: 10px 0 14px; padding: 12px; background: var(--raised); border-radius: 6px; text-align: center; user-select: all; }
.steps { margin: 0 0 12px; padding-left: 20px; color: var(--ink-2); }
.steps li { margin-bottom: 4px; }
.err-box { background: var(--bad-soft); color: var(--bad); padding: 8px 10px; border-radius: 6px; font-size: 13px; }
.note-box { background: var(--raised); color: var(--ink-2); padding: 8px 10px; border-radius: 6px; font-size: 13px; }

/* ---------------------------------------------------------------- cards (projects, providers) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--line-2)); }
.card h2 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.card h2 a { color: var(--ink); }
.card .fig { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.card .teams { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.card .teams a { display: flex; justify-content: space-between; color: var(--ink-2); padding: 3px 0; border-top: 1px dashed var(--line); }
.card .foot { display: flex; gap: 8px; margin-top: 10px; }

.section-title { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; }
.section-title:first-child { margin-top: 0; }
.section-title i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.section-title span { color: var(--muted); font-size: 12.5px; }

.foot-ver { margin-top: 30px; font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; position: fixed; inset: 0; z-index: 40; height: 100vh; width: min(300px, 86vw); box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  #nav-toggle:checked ~ .shell .side { display: flex; }
  #nav-toggle:checked ~ .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 39; }
  .mobilebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; z-index: 30; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .mobilebar label { cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--line-2); border-radius: 6px; }
  .mobilebar svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.8; stroke-linecap: round; }
  .mobilebar .brand { padding: 0; }
  .main { padding: 16px 16px 60px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .figure { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero .figure .big { font-size: 34px; }
  .form .f, .form .f.w4, .form .f.w3, .form .f.w2, .form .f.w8 { grid-column: span 12; }
  .form .f.half-m { grid-column: span 6; }
  .filters input[type=search] { flex: 1 1 100%; width: 100%; }
  .filters select { flex: 1 1 calc(50% - 8px); max-width: none; }
  /* asset table becomes cards */
  table.t.cardify thead { display: none; }
  table.t.cardify, .t.cardify tbody, .t.cardify tr, .t.cardify td { display: block; width: 100%; }
  .t.cardify tr { position: relative; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--line); }
  .t.cardify td { border: 0; padding: 2px 0; }
  .t.cardify td.stripe { position: absolute; left: 4px; top: 10px; bottom: 10px; width: 4px; }
  .t.cardify td.stripe i { height: 100%; margin: 0; }
  .t.cardify td.sel { position: absolute; right: 12px; top: 12px; width: auto; }
  .t.cardify td[data-l]::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12px; }
  .t.cardify td.hide-m { display: none; }
  .t.cardify tbody tr:hover td { background: transparent; }
  .t.cardify tfoot { display: block; }
  .bar { grid-template-columns: minmax(80px, 110px) minmax(0, 1fr) auto; }
  .ahead .price { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .side, .mobilebar, .actions, .filters, .bulkbar { display: none !important; } .shell { display: block; } }
