/* ============================================================
   DESIGN TOKENS
   Tema: blue/white modern SaaS dashboard, light mode saja.
   Sidebar collapsible di semua halaman admin.
   ============================================================ */
:root {
  /* Base */
  --bg: #f9fafb;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel-border: #e5e7eb;
  --hairline: #f3f4f6;

  /* Text */
  --text: #111827;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;

  /* Status accents */
  --status-good: #16a34a;
  --status-good-dim: #dcfce7;
  --status-warn: #ea580c;
  --status-warn-dim: #ffedd5;
  --status-critical: #dc2626;
  --status-critical-dim: #fee2e2;
  --accent: #3b82f6;      /* blue-500 */
  --accent-2: #2563eb;    /* blue-600, hover/darker */
  --accent-dim: #eff6ff;  /* blue-50, bg untuk item aktif */
  --accent-soft: #dbeafe; /* blue-100 */

  /* Type */
  --font-display: 'IBM Plex Sans', 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Roboto Mono', ui-monospace, monospace;

  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1.25rem;
}

/* Tema form staff (dipakai di body.theme-field) - kontras tinggi untuk lapangan/outdoor */
body.theme-field {
  --bg: #f9fafb;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel-border: #e5e7eb;
  --hairline: #f3f4f6;
  --text: #111827;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Layout shells (v2: sidebar collapsible) ---------- */
.app-shell-v2 {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--surface);
  border-right: 1px solid var(--panel-border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: 76px; }

.sidebar-logo-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 16px; margin-bottom: 14px;
  border-bottom: 1px solid var(--panel-border);
}
.sidebar-logo-box {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px -3px rgba(59,130,246,0.5);
}
.sidebar-logo-box svg { width: 18px; height: 18px; }
.sidebar-brand-text { overflow: hidden; white-space: nowrap; }
.sidebar-brand-text .name { font-size: 0.92rem; font-weight: 700; color: var(--text); display: block; line-height: 1.3; }
.sidebar-brand-text .plan { font-size: 0.72rem; color: var(--text-muted); display: block; }

.sidebar-section-label {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-dim); padding: 10px 12px 6px; white-space: nowrap; overflow: hidden;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  height: 42px; padding: 0 13px; border-radius: 8px;
  color: var(--text-muted); text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  white-space: nowrap; overflow: hidden;
  border-left: 2px solid transparent;
  transition: background .15s, color .15s;
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link:hover { background: var(--bg); color: var(--text); }
.sidebar-link.active {
  background: var(--accent-dim); color: var(--accent-2);
  font-weight: 600; border-left-color: var(--accent);
}
.sidebar.collapsed .sidebar-link { justify-content: center; padding: 0; }
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-collapse-btn span { display: none; }

.sidebar-collapse-btn {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 13px; width: 100%;
  border: none; border-top: 1px solid var(--panel-border);
  margin-top: 8px; padding-top: 14px;
  background: none; color: var(--text-muted);
  cursor: pointer; font-family: inherit; font-size: 0.85rem;
}
.sidebar-collapse-btn:hover { color: var(--text); }
.sidebar-collapse-btn svg { width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.25s; }
.sidebar.collapsed .sidebar-collapse-btn { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar.collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }

.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.top-header {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 28px; background: var(--surface);
  border-bottom: 1px solid var(--panel-border);
}
.top-header .user-chip {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--text-muted); margin-left: 4px; padding-left: 10px;
  border-left: 1px solid var(--panel-border);
}

@media (max-width: 860px) {
  .sidebar { position: fixed; z-index: 40; left: 0; }
  .sidebar:not(.collapsed) { box-shadow: 8px 0 24px -8px rgba(0,0,0,0.25); }
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }

.content {
  flex: 1;
  padding: 24px 28px 60px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}
.page-header h1 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  margin: 0;
  color: var(--text);
}
.page-header .subdate {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Cards / panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--hairline);
}
.panel-header h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: normal;
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-header .badge-date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--panel-border);
}
.panel-body { padding: 20px; }

/* Tables */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
table.data-table th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--panel-border);
  font-weight: 500;
}
table.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
table.data-table tr:hover td { background: var(--surface); }

/* Forms (shared) */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.error-text { color: var(--status-critical); font-size: 0.85rem; margin-top: 8px; }
.success-text { color: var(--status-good); font-size: 0.85rem; margin-top: 8px; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Chart canvas container */
.chart-box { position: relative; height: 220px; }

/* ---------- Dashboard: baris minggu yang bisa diklik ---------- */
.wk-row-clickable { cursor: pointer; }
.wk-row-clickable:hover td { background: var(--surface); }

/* ---------- Dashboard: modal detail report per Grup + Minggu ---------- */
.wk-modal-overlay {
  position: fixed; inset: 0; background: #000000b3;
  display: flex; align-items: center; justify-content: center;
  z-index: 55; padding: 20px;
}
.wk-modal {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  width: 100%; max-width: 720px; max-height: 84vh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.wk-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--hairline);
}
.wk-modal-header h3 { font-size: 1rem; font-weight: 600; color: var(--text); margin: 0; }
.wk-modal-body { padding: 6px 20px; overflow-y: auto; }

.wk-report-card { display:grid; grid-template-columns: 160px 1fr; gap:14px; align-items:start; padding:14px 0; border-bottom:1px solid var(--hairline); }
.wk-report-card:last-child { border-bottom:none; }
.wk-report-photos { display:flex; flex-wrap:wrap; gap:6px; width:160px; }
.wk-report-photos img { width:50px; height:50px; object-fit:cover; border-radius:8px; border:1px solid var(--panel-border); cursor:pointer; }
.wk-no-photo { width:70px; height:70px; border-radius:8px; border:1px dashed var(--panel-border); display:flex; align-items:center; justify-content:center; color:var(--text-dim); font-size:0.65rem; text-align:center; }
.wk-report-meta { font-size:0.76rem; color:var(--text-muted); margin-bottom:4px; }
.wk-report-path { font-size:0.84rem; color:var(--accent); margin-bottom:4px; }
.wk-report-desc { font-size:0.86rem; margin-bottom:6px; }
.wk-report-time { font-size:0.76rem; color:var(--text-muted); }
.wk-report-time .wk-downtime-badge { display:inline-block; margin-left:6px; padding:2px 8px; border-radius:20px; background:var(--status-critical-dim); color:var(--status-critical); font-size:0.7rem; font-weight:600; }
.wk-manual-badge { display:inline-block; margin-left:6px; padding:2px 8px; border-radius:20px; background:var(--status-warn-dim); color:var(--status-warn); font-size:0.7rem; font-weight:600; }

/* Scrollbar tweak */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--panel-border); border-radius: 6px; }

/* ============================================================
   DASHBOARD REVAMP
   Layout terinspirasi referensi desain (header besar + kartu
   ringkasan + panel list/detail berdampingan), warna & komponen
   tetap memakai palet biru/putih situs ini (var(--accent) dkk).
   ============================================================ */

.db-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.db-header-text h1 { font-size: 1.7rem; font-weight: 700; margin: 0 0 4px; color: var(--text); }
.db-header-sub { margin: 0; color: var(--text-muted); font-size: 0.88rem; }
.db-header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pill-select-group { display: flex; gap: 8px; }
.pill-select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--panel-border);
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
}
.pill-select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn-primary-lg {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #ffffff; border: none;
  padding: 11px 20px; border-radius: 999px;
  font-weight: 600; font-size: 0.86rem; text-decoration: none;
  cursor: pointer; box-shadow: 0 6px 16px -6px rgba(37,99,235,0.5);
  transition: filter .15s, transform .15s; white-space: nowrap;
}
.btn-primary-lg:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary-lg svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---------- Stat cards (4 kartu ringkasan) ---------- */
@media (max-width: 720px) {
  .content { padding: 16px; }
  .db-header { flex-direction: column; }
}

/* ============================================================
   SHEET DASHBOARD (tampilan ala spreadsheet "DASBOARD READINESS")
   Bungkus semua dalam .sheet-wrap yang menimpa design tokens jadi
   tema navy gelap. Komponen lama (.panel, .data-table, .pill-select,
   dst) otomatis ikut gelap karena semuanya sudah pakai var(--...).
   ============================================================ */
.sheet-wrap {
  /* Tema terang, dipetakan langsung dari palet default situs (:root)
     supaya dashboard menyatu dengan sisa halaman, bukan kotak gelap
     yang berdiri sendiri. */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --panel: #ffffff;
  --panel-border: #e2e8f0;
  --hairline: #eef1f7;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --status-good: #16a34a;
  --status-good-dim: #dcfce7;
  --status-warn: #ea580c;
  --status-warn-dim: #ffedd5;
  --status-critical: #dc2626;
  --status-critical-dim: #fee2e2;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-dim: #eff6ff;
  --accent-soft: #dbeafe;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 22px;
}
.sheet-wrap .db-header-text h1 { color: var(--text); }
.sheet-wrap .btn-ghost { color: var(--text-muted); border-color: var(--panel-border); }

.sheet-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(15,23,42,0.06);
  transition: box-shadow .15s, transform .15s;
}
.sheet-panel:hover { box-shadow: 0 6px 16px -8px rgba(15,23,42,0.12); transform: translateY(-1px); }
.sheet-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 10px;
  flex-wrap: wrap;
  min-height: 22px;
  margin-bottom: 14px;
}
.sheet-bars .sheet-panel-head h3 { flex: 1 1 100%; }
.sheet-panel-head h3 {
  margin: 0;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.3;
}
.sheet-chart-box { position: relative; flex: 1; min-height: 170px; }
.sheet-chart-box[data-empty="1"] canvas { opacity: 0; }
.sheet-chart-box[data-empty="1"]::after {
  content: "Belum ada data kerusakan bulan ini";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 24px; text-align: center;
  font-size: 0.74rem; color: var(--text-dim); line-height: 1.4;
}

/* Grid utama: bar besar kiri (JUMLAH/SERVICEABLE) + 3 kolom kanan */
.sheet-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  gap: 16px;
  margin-bottom: 20px;
}
.sheet-bars { grid-column: 1; grid-row: 1 / span 3; min-width: 0; }
.sheet-bars .sheet-chart-box { min-height: 480px; }

/* Panel drill-down: muncul saat salah satu bar/segmen di chart "Jumlah Unit
   per Grup" diklik, menampilkan kode-kode unit sesuai grup + kategori
   (JUMLAH / SERVICEABLE / UNSERVICEABLE) yang diklik. */
.units-bar-detail {
  margin-top: 14px;
  border-top: 1px dashed var(--panel-border);
  padding-top: 12px;
  animation: unitsBarDetailIn .15s ease-out;
}
@keyframes unitsBarDetailIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.units-bar-detail-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 10px;
}
.units-bar-detail-title {
  font-size: 0.78rem; font-weight: 700; color: var(--text);
}
.units-bar-detail-title .mono { color: var(--text-muted); font-weight: 500; }
.units-bar-detail-close {
  border: none; background: transparent; cursor: pointer;
  color: var(--text-dim); font-size: 1rem; line-height: 1; padding: 2px 6px;
  border-radius: 6px;
}
.units-bar-detail-close:hover { background: var(--hairline); color: var(--text); }
.units-bar-detail-empty { font-size: 0.75rem; color: var(--text-dim); }
.units-bar-detail-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 160px; overflow-y: auto;
}
.unit-chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 9px;
  border-radius: 20px;
  background: var(--hairline);
  color: var(--text);
  border: 1px solid var(--panel-border);
  white-space: nowrap;
}
.unit-chip[data-status="serviceable"] { background: var(--status-good-dim); color: #15803d; border-color: transparent; }
.unit-chip[data-status="unserviceable"] { background: var(--status-critical-dim); color: var(--status-critical); border-color: transparent; }

/* Fix: canvas Chart.js secara alami punya ukuran intrinsik yang bisa
   mendorong grid track lebih lebar dari container (grid item default
   min-width:auto = max-content anak-anaknya). Tanpa min-width:0 di
   sepanjang rantai grid/flex ini, panel di kanan (mis. Laporan
   Kerusakan) akan meluber keluar dari .sheet-wrap dan bikin layout
   terlihat tidak presisi / tidak simetris. */
.sheet-panel, .sheet-chart-box, .sheet-chart-box canvas {
  min-width: 0;
  max-width: 100%;
}

/* Baris 1: 3 mini chart SLA (lebar sama) + 1 donut Laporan Kerusakan
   (sedikit lebih lebar karena butuh ruang untuk legend di kanan). Semua
   panel di baris ini punya tinggi & chart-box yang seragam lewat class
   .sheet-chart-box--sm, bukan inline style, supaya selalu sejajar rapi. */
.sheet-row1 {
  grid-column: 2; grid-row: 1; min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr);
  gap: 16px;
  align-items: stretch;
}
.sheet-row1 .sheet-panel { height: 100%; }
.sheet-chart-box--sm { min-height: 190px; }

.sheet-row2 { grid-column: 2; grid-row: 2; min-width: 0; }
.sheet-row2 .sheet-chart-box { min-height: 280px; }

.sheet-row3 {
  grid-column: 2; grid-row: 3; min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.sheet-row3 .sheet-panel { height: 100%; }
.sheet-chart-box--md { min-height: 200px; }

@media (max-width: 1200px) {
  .sheet-grid { grid-template-columns: minmax(0, 1fr); }
  .sheet-bars { grid-row: auto; }
  .sheet-bars .sheet-chart-box { min-height: 380px; }
  .sheet-row1, .sheet-row2, .sheet-row3 { grid-column: 1; }
  .sheet-row1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-row3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .sheet-row1 { grid-template-columns: minmax(0, 1fr); }
  .sheet-wrap { padding: 14px; border-radius: 16px; }
  .sheet-grid { gap: 12px; }
}

/* ============================================================
   REKAP PERFORMANCE - tampilan gaya spreadsheet (Excel-like)
   Meniru sheet "REKAP PERUNIT": kolom harian (Frequency/Down Time/
   Actual Operating Hours/Availability) + blok MINGGU 1-4 + TOTAL
   BULAN INI, dengan kolom "No" & "Unit" dibekukan (frozen) di kiri
   dan baris header dibekukan di atas, persis seperti freeze pane Excel.
   ============================================================ */
.rp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.rp-toolbar-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-toolbar-filters label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-right: 2px; }
.rp-group-select { min-width: 220px; }

.rp-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 0.72rem; color: var(--text-muted); margin: -4px 0 14px; }
.rp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rp-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.rp-sheet-wrap {
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--surface);
  max-height: 74vh;
  position: relative;
}
table.rp-table {
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  white-space: nowrap;
}
table.rp-table th, table.rp-table td {
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 5px 8px;
  text-align: center;
}
table.rp-table thead th {
  position: sticky;
  background: #eef2f7;
  z-index: 3;
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  font-weight: 600;
}
table.rp-table thead tr.rp-head-1 th { top: 0; height: 30px; }
table.rp-table thead tr.rp-head-2 th { top: 30px; height: 26px; }
table.rp-table thead th.rp-th-week { background: #e0e9fb; color: var(--accent-2); }
table.rp-table thead th.rp-th-month { background: #fef3c7; color: #92400e; }

table.rp-table td.rp-col-no, table.rp-table th.rp-col-no {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--surface);
  font-family: var(--font-display);
}
table.rp-table td.rp-col-unit, table.rp-table th.rp-col-unit {
  position: sticky;
  left: 44px;
  z-index: 2;
  background: var(--surface);
  text-align: left;
  white-space: normal;
  font-family: var(--font-display);
  min-width: 168px;
  max-width: 200px;
}
table.rp-table thead th.rp-col-no, table.rp-table thead th.rp-col-unit { z-index: 5; }
table.rp-table tbody tr:nth-child(even) td.rp-col-no,
table.rp-table tbody tr:nth-child(even) td.rp-col-unit { background: #fbfcfe; }
table.rp-table tbody tr:hover td { background: #f1f5fb; }
table.rp-table tbody tr:hover td.rp-col-no,
table.rp-table tbody tr:hover td.rp-col-unit { background: #eaf1fc; }

.rp-unit-name { font-weight: 600; color: var(--text); display: block; font-size: 0.78rem; }
.rp-unit-sub { font-size: 0.68rem; color: var(--text-dim); display: block; }

.rp-cell-freq { background: rgba(242,199,102,0.16); font-weight: 600; }
.rp-cell-downtime { background: rgba(239,91,87,0.10); }
.rp-cell-actual { background: rgba(52,211,153,0.14); font-weight: 600; }
.rp-cell-avail { font-weight: 700; }
.rp-cell-dim { color: var(--text-dim); font-style: italic; }

.rp-status-good { color: var(--status-good); }
.rp-status-warn { color: var(--status-warn); }
.rp-status-critical { color: var(--status-critical); }

tr.rp-total-row td { background: #f8fafc; font-weight: 700; border-top: 2px solid var(--panel-border); }
tr.rp-total-row td.rp-col-no, tr.rp-total-row td.rp-col-unit { background: #f1f5fb; }

.rp-empty-note { padding: 30px 20px; text-align: center; color: var(--text-dim); font-size: 0.85rem; }

@media (max-width: 900px) {
  .rp-group-select { min-width: 160px; }
}
