body { font-family: Arial, sans-serif; margin: 16px; color:#1f2328; }
.page { display:block; }
.topline { display:flex; gap:14px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.pill { background:#f2f2f2; padding:4px 8px; border-radius:999px; font-size:12px; }
.pill.mini { font-size:11px; padding:3px 7px; }
.muted { color:#666; font-size:12px; }

.cache-box { border:1px solid #e6e6e6; border-radius:10px; padding:12px 14px; margin:10px 0 18px; background:#fff; }
.progress { height:8px; background:#f2f2f2; border-radius:999px; overflow:hidden; margin:8px 0; }
.progress div { height:100%; background:#111827; }
.cache-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:8px; }

.stats-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap:12px; margin: 10px 0 18px; }
.stat-card { border:1px solid #e6e6e6; border-radius:10px; padding:12px 14px; background:#fff; }
.stat-label { font-size:12px; color:#666; margin-bottom:6px; }
.stat-value { font-size:22px; font-weight:700; }
.stat-up { color:#1a7f37; }
.stat-down { color:#cf222e; }

.filters { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; margin: 12px 0 18px; }
.field { display:flex; flex-direction:column; gap:4px; }
.field-multi select { min-width:180px; }
.field-checks { min-width:170px; }
.field-checks .check { display:block; margin:2px 0; font-size:13px; color:#333; }
label { font-size:12px; color:#333; display:block; }
select, input { padding:8px; font-size:14px; border:1px solid #d0d7de; border-radius:8px; background:#fff; }
button, .btn-secondary { padding:9px 12px; font-size:14px; cursor:pointer; border-radius:8px; border:1px solid #d0d7de; text-decoration:none; display:inline-block; }
button { background:#111827; color:#fff; border-color:#111827; }
.btn-secondary { background:#fff; color:#111827; }
.btn-secondary.danger { color:#cf222e; border-color:#f0b8bd; }
.actions { display:flex; gap:10px; align-items:flex-end; }

.hintline { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin: 0 0 10px; font-size:12px; color:#666; }
.table-actions { display:flex; gap:12px; align-items:center; margin: 10px 0; }

.table-wrap { overflow:auto; border:1px solid #e6e6e6; border-radius:10px; }
table { border-collapse: collapse; width:100%; min-width: 1180px; }
th, td { border-bottom:1px solid #eee; padding:8px 10px; white-space:nowrap; }
thead th { position:sticky; top:0; background:#f7f7f7; z-index:3; border-bottom:1px solid #e3e3e3; }

th.sticky1, td.sticky1 { position:sticky; left:0; z-index:4; background:#fff; border-right:1px solid #eee; }
th.sticky2, td.sticky2 { position:sticky; left:72px; z-index:4; background:#fff; border-right:1px solid #eee; max-width:420px; overflow:hidden; text-overflow:ellipsis; }
th.sticky3, td.sticky3 { position:sticky; left:420px; z-index:4; background:#fff; border-right:1px solid #eee; }
thead th.sticky1, thead th.sticky2, thead th.sticky3 { background:#f7f7f7; }

td.num, th.num { text-align:right; }
td.zero { color:#bbb; }
.sort-col a { color:inherit; text-decoration:none; }
.sort-col a:hover { text-decoration:underline; }

.delta-head .subhead { display:block; font-size:11px; color:#666; font-weight:400; margin-top:2px; }
.delta-up { color:#1a7f37; font-weight:700; }
.delta-down { color:#cf222e; font-weight:700; }
.delta-flat { color:#6b7280; }

.type-select { padding:5px 6px; font-size:12px; max-width:140px; }

td.heat {
  background:
    linear-gradient(
      0deg,
      rgba(33, 110, 57, calc(var(--heat) / 140)) 0%,
      rgba(33, 110, 57, calc(var(--heat) / 140)) 100%
    );
}

tr.brand td { background:#eaf3ff; }
tr.brand td.sticky1, tr.brand td.sticky2, tr.brand td.sticky3 { background:#eaf3ff; font-weight:600; }
tr.brand td.heat {
  background:
    linear-gradient(
      0deg,
      rgba(33, 110, 57, calc(var(--heat) / 140)) 0%,
      rgba(33, 110, 57, calc(var(--heat) / 140)) 100%
    ),
    #eaf3ff;
}

.btn-primary {
  padding:9px 12px;
  font-size:14px;
  cursor:pointer;
  border-radius:8px;
  border:1px solid #111827;
  text-decoration:none;
  display:inline-block;
  background:#111827;
  color:#fff;
}
.autobuild-note {
  margin-top:8px;
  padding:8px 10px;
  border-radius:8px;
  background:#fff7d6;
  border:1px solid #f0d98a;
  font-size:13px;
}
