/* ═══════════════════════════════════════════════════════
   PIGABIMA — Design System
   Motorcycle Insurance Installment Platform
   ═══════════════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --bg: #eae5d8;
  --surface: #ffffff;
  --surface2: #f4eee1;
  --surface3: #e2dac9;
  --surface4: #d0c7b4;
  --border: rgba(0,0,0,0.08);
  --border2: rgba(0,0,0,0.14);
  --border3: rgba(0,0,0,0.22);
  --text: #1a1a18;
  --text2: #4a4846;
  --text3: #7a7876;
  --text4: #a09e9a;
  --accent: #e8611a;
  --accent2: #c44d0c;
  --accent-dim: rgba(232,97,26,0.07);
  --accent-dim2: rgba(232,97,26,0.12);
  --green: #1a8a55;
  --green-dim: rgba(26,138,85,0.07);
  --green2: #24b873;
  --amber: #a6700c;
  --amber-dim: rgba(166,112,12,0.07);
  --red: #c92c2c;
  --red-dim: rgba(201,44,44,0.06);
  --blue: #1c72cd;
  --blue-dim: rgba(28,114,205,0.06);
  --purple: #7240c9;
  --purple-dim: rgba(114,64,201,0.06);
  --mono: 'DM Mono', 'Consolas', 'Courier New', monospace;
  --sans: 'DM Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --display: 'Syne', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow: 0 8px 32px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.02);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.02);
  --transition: 0.15s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════ */
.shell { display: grid; grid-template-columns: 230px 1fr; grid-template-rows: 100vh; height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; z-index: 10; }
.main { display: flex; flex-direction: column; overflow: hidden; }

/* ═══════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════ */
.sidebar-logo { padding: 22px 20px 18px; border-bottom: 1px solid var(--border); }
.logo-wordmark { font-family: var(--display); font-size: 19px; font-weight: 800; letter-spacing: -0.03em; color: var(--text); }
.logo-wordmark span { color: var(--accent); }
.logo-tag { font-size: 10px; color: var(--text3); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 2px; font-family: var(--mono); }

.sidebar-scroll { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--surface3) transparent; }
.sidebar-scroll::-webkit-scrollbar { width: 3px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }

.nav-section { padding: 14px 12px 0; }
.nav-section-label { font-size: 9px; color: var(--text3); letter-spacing: 0.14em; text-transform: uppercase; font-family: var(--mono); padding: 0 8px; margin-bottom: 6px; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: var(--text2); font-size: 13px; font-weight: 400; transition: all var(--transition); margin-bottom: 1px; position: relative; user-select: none; }
.nav-item:hover { background: var(--surface2); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent2); }
.nav-item.active::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 2.5px; height: 60%; background: var(--accent); border-radius: 0 2px 2px 0; }
.nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; font-size: 10px; font-weight: 500; padding: 1px 6px; border-radius: 100px; font-family: var(--mono); }
.nav-badge.amber { background: var(--amber); }
.nav-badge.green { background: var(--green); }
.nav-badge.blue { background: var(--blue); }
.nav-item.nav-special { border: 1px solid rgba(74,158,245,0.18); background: rgba(74,158,245,0.06); }
.nav-item.nav-special:hover { background: rgba(74,158,245,0.1); }
.nav-item[data-role-min] { display: flex; }
.nav-item.role-hidden { display: none; }

.sidebar-footer { padding: 14px 16px; border-top: 1px solid var(--border); }
.admin-chip { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px; border-radius: 8px; transition: background var(--transition); }
.admin-chip:hover { background: var(--surface2); }
.admin-av { width: 32px; height: 32px; border-radius: 8px; background: var(--accent-dim); border: 1px solid var(--accent-dim2); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 12px; font-weight: 700; color: var(--accent2); flex-shrink: 0; }
.admin-name { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.2; }
.admin-role { font-size: 10px; color: var(--text3); font-family: var(--mono); }

/* ═══════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════ */
.topbar { padding: 0 28px; height: 54px; border-bottom: none; display: flex; align-items: center; gap: 14px; flex-shrink: 0; background: var(--accent); color: #ffffff; }
.topbar-title { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: #ffffff; }
.topbar-breadcrumb { font-size: 12px; color: rgba(255, 255, 255, 0.7); font-family: var(--mono); }
.topbar-spacer { flex: 1; }
.topbar-search { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; padding: 7px 12px; font-size: 13px; color: #ffffff; width: 240px; transition: border-color var(--transition); }
.topbar-search svg { color: rgba(255, 255, 255, 0.8); }
.topbar-search:focus-within { border-color: #ffffff; }
.topbar-search input { background: none; border: none; outline: none; color: #ffffff; font-size: 13px; font-family: var(--sans); width: 100%; }
.topbar-search input::placeholder { color: rgba(255, 255, 255, 0.6); }
.topbar-btn { width: 34px; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.2); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #ffffff; transition: all var(--transition); position: relative; }
.topbar-btn:hover { background: rgba(255, 255, 255, 0.25); color: #ffffff; }
.topbar-btn svg { width: 17px; height: 17px; }
.topbar-btn .dot { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; background: var(--red); border-radius: 50%; border: 1.5px solid var(--accent); }

/* ═══════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════ */
.content { flex: 1; overflow-y: auto; padding: 24px 28px 40px; scrollbar-width: thin; scrollbar-color: var(--surface3) transparent; }
.content::-webkit-scrollbar { width: 4px; }
.content::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 2px; }

.page { display: none; }
.page.active { display: block; }

/* ═══════════════════════════════════════
   KPI CARDS
   ═══════════════════════════════════════ */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.kpi-row.cols-5 { grid-template-columns: repeat(5, 1fr); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; transition: border-color 0.2s; cursor: default; }
.kpi:hover { border-color: var(--border2); }
.kpi-label { font-size: 11px; color: var(--text3); letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--mono); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.kpi-label svg { width: 14px; height: 14px; }
.kpi-val { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.kpi-val.sm { font-size: 22px; }
.kpi-val.xs { font-size: 18px; }
.kpi-sub { font-size: 11px; color: var(--text3); margin-top: 6px; font-family: var(--mono); }
.kpi-sub .up { color: var(--green); }
.kpi-sub .dn { color: var(--red); }
.kpi.blue-theme { background: rgba(28, 114, 205, 0.12); border-color: rgba(28, 114, 205, 0.3); }
.kpi.blue-theme .kpi-label { color: #105ba3; }
.kpi.blue-theme .kpi-val { color: #105ba3; }

.kpi.purple-theme { background: rgba(114, 64, 201, 0.12); border-color: rgba(114, 64, 201, 0.3); }
.kpi.purple-theme .kpi-label { color: #512b94; }
.kpi.purple-theme .kpi-val { color: #512b94; }

.kpi.green-theme { background: rgba(26, 138, 85, 0.12); border-color: rgba(26, 138, 85, 0.3); }
.kpi.green-theme .kpi-label { color: #0f5434; }
.kpi.green-theme .kpi-val { color: #0f5434; }

.kpi.amber-theme { background: rgba(166, 112, 12, 0.12); border-color: rgba(166, 112, 12, 0.3); }
.kpi.amber-theme .kpi-label { color: #6e4905; }
.kpi.amber-theme .kpi-val { color: #6e4905; }

.kpi.accent-theme { background: rgba(232, 97, 26, 0.12); border-color: rgba(232, 97, 26, 0.3); }
.kpi.accent-theme .kpi-label { color: #a33e08; }
.kpi.accent-theme .kpi-val { color: #a33e08; }

.kpi.red-theme { background: rgba(201, 44, 44, 0.12); border-color: rgba(201, 44, 44, 0.3); }
.kpi.red-theme .kpi-label { color: #911d1d; }
.kpi.red-theme .kpi-val { color: #911d1d; }

.kpi.clickable { cursor: pointer; }
.kpi.clickable:hover { border-color: var(--accent); transform: translateY(-1px); }

/* ═══════════════════════════════════════
   GRID LAYOUTS
   ═══════════════════════════════════════ */
.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 14px; margin-bottom: 20px; }
.two-col-equal { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.four-col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.gap-20 { gap: 20px; }

/* ═══════════════════════════════════════
   PANELS
   ═══════════════════════════════════════ */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  padding: 22px 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
/* Increase spacing for panels containing creation/action buttons */
.panel:has(.btn-primary),
.panel:has(button[type="submit"]) {
  padding: 30px 32px;
  margin-bottom: 32px;
}
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-title { font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.panel-subtitle { font-size: 12px; color: var(--text3); font-family: var(--mono); }
.panel-actions { display: flex; gap: 8px; align-items: center; }
.panel-action { font-size: 12px; color: var(--accent2); cursor: pointer; font-family: var(--mono); }
.panel-action:hover { text-decoration: underline; }
.panel-body { padding: 0; } /* Set body padding to 0 since panel parent handles it */
.panel-body.no-pad { padding: 0; }
.panel-footer { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }

/* ═══════════════════════════════════════
   TABLES
   ═══════════════════════════════════════ */
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 16px; text-align: left; font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--mono); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); position: sticky; top: 0; z-index: 1; }
td { padding: 11px 16px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.015); }
tr.selected td { background: var(--accent-dim); }
.td-name { font-weight: 500; color: var(--text); }
.td-mono { font-family: var(--mono); font-size: 12px; color: var(--text2); }
.td-muted { color: var(--text3); font-size: 12px; }
.td-link { color: var(--accent2); cursor: pointer; font-weight: 500; }
.td-link:hover { text-decoration: underline; }
.td-actions { display: flex; gap: 6px; }
td .action-btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface2); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text3); transition: all var(--transition); }
td .action-btn:hover { border-color: var(--border2); color: var(--text); }
td .action-btn svg { width: 14px; height: 14px; }
.table-empty { padding: 48px 20px; text-align: center; color: var(--text3); font-size: 13px; }
.table-empty svg { width: 40px; height: 40px; color: var(--text4); margin-bottom: 12px; }

/* ═══════════════════════════════════════
   PILLS / BADGES
   ═══════════════════════════════════════ */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 100px; font-size: 11px; font-weight: 500; font-family: var(--mono); white-space: nowrap; }
.pill-green { background: var(--green-dim); color: var(--green); }
.pill-amber { background: var(--amber-dim); color: var(--amber); }
.pill-red { background: var(--red-dim); color: var(--red); }
.pill-blue { background: var(--blue-dim); color: var(--blue); }
.pill-purple { background: var(--purple-dim); color: var(--purple); }
.pill-gray { background: rgba(255,255,255,0.06); color: var(--text2); }
.pill-accent { background: var(--accent-dim); color: var(--accent2); }
.pill-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ═══════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════ */
.prog-row { display: flex; align-items: center; gap: 8px; }
.prog-track { flex: 1; height: 4px; background: var(--surface3); border-radius: 100px; overflow: hidden; }
.prog-track.h6 { height: 6px; }
.prog-fill { height: 100%; border-radius: 100px; transition: width 0.4s ease; }
.prog-fill.green { background: var(--green); }
.prog-fill.amber { background: var(--amber); }
.prog-fill.red { background: var(--red); }
.prog-fill.accent { background: var(--accent); }
.prog-fill.blue { background: var(--blue); }
.prog-pct { font-family: var(--mono); font-size: 11px; color: var(--text3); min-width: 32px; text-align: right; }

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn { padding: 8px 16px; border-radius: 8px; font-family: var(--sans); font-size: 13px; font-weight: 500; cursor: pointer; border: none; transition: all var(--transition); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent2); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover:not(:disabled) { background: var(--green2); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover:not(:disabled) { opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover:not(:disabled) { border-color: var(--border2); color: var(--text); background: var(--surface2); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-lg { padding: 11px 22px; font-size: 14px; }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; }
.btn-icon.sm { width: 28px; height: 28px; }
.btn-group { display: flex; gap: 8px; }

/* ═══════════════════════════════════════
   FORMS
   ═══════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; color: var(--text2); margin-bottom: 6px; font-family: var(--mono); letter-spacing: 0.02em; }
.form-label .required { color: var(--red); margin-left: 2px; }
.form-input, .form-select, .form-textarea { width: 100%; padding: 9px 13px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 13px; font-family: var(--sans); transition: border-color var(--transition); outline: none; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text3); }
.form-input.error, .form-select.error { border-color: var(--red); }
.form-error { font-size: 11px; color: var(--red); margin-top: 4px; font-family: var(--mono); }
.form-hint { font-size: 11px; color: var(--text3); margin-top: 4px; font-family: var(--mono); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235a5856' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-select option { background: var(--surface2); color: var(--text); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.form-section-title { font-family: var(--display); font-size: 13px; font-weight: 600; margin-bottom: 14px; color: var(--text); padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--border); margin-top: 8px; }

/* ═══════════════════════════════════════
   MODAL / DIALOG
   ═══════════════════════════════════════ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); z-index: 100; display: none; align-items: center; justify-content: center; animation: fadeIn 0.15s ease; }
.modal-overlay.active { display: flex; }
.modal { background: var(--surface); border: 1px solid var(--border2); border-radius: 14px; width: 90%; max-width: 560px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: var(--shadow); animation: scaleIn 0.2s ease; }
.modal.wide { max-width: 720px; }
.modal.narrow { max-width: 420px; }
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.modal-title { font-family: var(--display); font-size: 16px; font-weight: 700; }
.modal-close { width: 30px; height: 30px; border-radius: 6px; border: none; background: var(--surface2); color: var(--text3); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition); font-size: 20px; line-height: 1; padding: 0; }
.modal-close:hover { background: var(--surface3); color: var(--text); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-shrink: 0; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* ═══════════════════════════════════════
   TABS
   ═══════════════════════════════════════ */
.tab-bar { display: flex; gap: 4px; background: var(--surface2); padding: 4px; border-radius: 10px; margin-bottom: 20px; width: fit-content; }
.tab-item { padding: 7px 16px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--text2); transition: all var(--transition); display: flex; align-items: center; gap: 7px; user-select: none; }
.tab-item:hover { color: var(--text); }
.tab-item.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.tab-item svg { width: 15px; height: 15px; }
.tab-item .tab-count { font-size: 10px; background: var(--surface3); padding: 1px 6px; border-radius: 100px; font-family: var(--mono); }
.tab-page { display: none; }
.tab-page.active { display: block; }

/* ═══════════════════════════════════════
   FILTER ROW
   ═══════════════════════════════════════ */
.filter-row { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filter-chip { padding: 5px 13px; border-radius: 100px; font-size: 12px; cursor: pointer; border: 1px solid var(--border); color: var(--text2); background: var(--surface); transition: all var(--transition); font-family: var(--mono); user-select: none; }
.filter-chip:hover { border-color: var(--border2); color: var(--text); }
.filter-chip.active { background: var(--accent-dim); border-color: rgba(232,97,26,0.35); color: var(--accent2); }
.filter-spacer { flex: 1; }
.filter-input { padding: 5px 12px; border-radius: 100px; font-size: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: var(--sans); outline: none; width: 180px; }
.filter-input:focus { border-color: var(--accent); }
.filter-select { padding: 5px 12px; border-radius: 100px; font-size: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-family: var(--mono); outline: none; appearance: none; padding-right: 24px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%235a5856' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }

/* ═══════════════════════════════════════
   CHARTS
   ═══════════════════════════════════════ */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding-bottom: 4px; }
.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.bar { width: 100%; border-radius: 4px 4px 0 0; transition: opacity var(--transition); cursor: pointer; min-height: 4px; }
.bar:hover { opacity: 0.8; }
.bar-lbl { font-size: 10px; color: var(--text3); font-family: var(--mono); }
.chart-legend { display: flex; gap: 14px; padding: 10px 0 0; }
.legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text3); font-family: var(--mono); }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 20px; padding: 8px 0; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.donut-legend-color { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.donut-legend-label { color: var(--text2); flex: 1; }
.donut-legend-val { font-family: var(--mono); font-size: 11px; color: var(--text3); }

/* ═══════════════════════════════════════
   ACTIVITY LIST
   ═══════════════════════════════════════ */
.activity-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.act-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.act-icon svg { width: 15px; height: 15px; }
.act-info { flex: 1; min-width: 0; }
.act-title { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-meta { font-size: 11px; color: var(--text3); margin-top: 2px; font-family: var(--mono); }
.act-val { font-family: var(--mono); font-size: 12px; color: var(--text2); flex-shrink: 0; }

/* ═══════════════════════════════════════
   AGENT / ITEM CARDS
   ═══════════════════════════════════════ */
.item-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; transition: border-color var(--transition); cursor: pointer; }
.item-card:hover { border-color: var(--border2); }
.item-card:last-child { margin-bottom: 0; }
.item-card-av { width: 38px; height: 38px; border-radius: 8px; background: var(--surface3); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 13px; font-weight: 700; color: var(--text2); flex-shrink: 0; }
.item-card-info { flex: 1; min-width: 0; }
.item-card-name { font-size: 13px; font-weight: 500; color: var(--text); }
.item-card-meta { font-size: 11px; color: var(--text3); font-family: var(--mono); margin-top: 1px; }
.item-card-right { text-align: right; }
.item-card-val { font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--text); }
.item-card-sub { font-size: 10px; color: var(--text3); font-family: var(--mono); }

/* ═══════════════════════════════════════
   MINI STATS
   ═══════════════════════════════════════ */
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-stat { background: var(--surface2); border-radius: 8px; padding: 12px 14px; }
.mini-stat-val { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1; }
.mini-stat-lbl { font-size: 11px; color: var(--text3); font-family: var(--mono); margin-top: 4px; }

/* ═══════════════════════════════════════
   ALERT BAND
   ═══════════════════════════════════════ */
.alert-band { border-radius: 10px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; margin-bottom: 16px; font-size: 13px; }
.alert-band svg { width: 17px; height: 17px; flex-shrink: 0; }
.alert-band.amber { background: rgba(232,162,26,0.08); border: 1px solid rgba(232,162,26,0.2); }
.alert-band.amber svg, .alert-band.amber strong { color: var(--amber); }
.alert-band.red { background: rgba(232,64,64,0.06); border: 1px solid rgba(232,64,64,0.2); }
.alert-band.red svg, .alert-band.red strong { color: var(--red); }
.alert-band.green { background: rgba(45,184,122,0.06); border: 1px solid rgba(45,184,122,0.2); }
.alert-band.green svg, .alert-band.green strong { color: var(--green); }
.alert-band.blue { background: rgba(74,158,245,0.06); border: 1px solid rgba(74,158,245,0.18); }
.alert-band.blue svg, .alert-band.blue strong { color: var(--blue); }
.alert-band-action { margin-left: auto; font-size: 12px; color: var(--accent2); cursor: pointer; font-family: var(--mono); flex-shrink: 0; }

/* ═══════════════════════════════════════
   DEFINITE ASSURANCE STATUS STRIP
   ═══════════════════════════════════════ */
.da-status-strip { display: flex; align-items: center; gap: 14px; background: rgba(74,158,245,0.06); border: 1px solid rgba(74,158,245,0.18); border-radius: 10px; padding: 12px 18px; margin-bottom: 20px; flex-wrap: wrap; }
.da-logo-badge { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.da-logo-icon { width: 36px; height: 36px; border-radius: 9px; background: rgba(74,158,245,0.12); border: 1px solid rgba(74,158,245,0.25); display: flex; align-items: center; justify-content: center; color: var(--blue); }
.da-logo-icon svg { width: 18px; height: 18px; }
.da-logo-name { font-size: 13px; font-weight: 600; color: var(--text); }
.da-logo-sub { font-size: 11px; color: var(--text3); font-family: var(--mono); }
.da-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }
.da-stat { text-align: center; flex: 1; min-width: 80px; }
.da-stat-val { font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--text); }
.da-stat-label { font-size: 10px; color: var(--text3); font-family: var(--mono); margin-top: 2px; }
.da-action { margin-left: auto; flex-shrink: 0; }

/* ═══════════════════════════════════════
   CONNECTION CARDS
   ═══════════════════════════════════════ */
.conn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.conn-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.conn-card.live { border-color: rgba(45,184,122,0.3); background: rgba(45,184,122,0.03); }
.conn-card.warn { border-color: rgba(232,162,26,0.3); background: rgba(232,162,26,0.03); }
.conn-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.conn-card-title { font-size: 13px; font-weight: 600; color: var(--text); }
.conn-endpoint { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 13px; font-family: var(--mono); font-size: 11px; color: var(--text2); margin-bottom: 10px; word-break: break-all; }
.conn-endpoint span { color: var(--blue); }
.conn-meta { display: flex; justify-content: space-between; font-size: 11px; font-family: var(--mono); color: var(--text3); }
.conn-meta .ok { color: var(--green); }
.conn-meta .warn { color: var(--amber); }

/* Sync cards */
.sync-schedule { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.sync-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.sync-card-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.sync-card-icon svg { width: 16px; height: 16px; }
.sync-card-title { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.sync-card-meta { font-size: 11px; color: var(--text3); font-family: var(--mono); line-height: 1.5; }

/* ═══════════════════════════════════════
   REMITTANCE
   ═══════════════════════════════════════ */
.remit-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-bottom: 24px; }
.remit-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.remit-row:last-child { border-bottom: none; }
.remit-row-left { flex: 1; }
.remit-row-title { font-size: 13px; color: var(--text); font-weight: 500; }
.remit-row-meta { font-size: 11px; color: var(--text3); font-family: var(--mono); margin-top: 2px; }
.remit-row-amount { font-family: var(--display); font-size: 17px; font-weight: 700; color: var(--text); margin-right: 16px; }

/* ═══════════════════════════════════════
   DOCUMENT CARDS
   ═══════════════════════════════════════ */
.doc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; transition: border-color var(--transition); cursor: pointer; }
.doc-card:hover { border-color: var(--border2); }
.doc-icon { width: 44px; height: 52px; border-radius: 8px; background: var(--surface2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text3); flex-shrink: 0; position: relative; }
.doc-icon svg { width: 22px; height: 22px; }
.doc-icon .doc-badge { position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--green); display: flex; align-items: center; justify-content: center; font-size: 9px; color: #fff; }
.doc-info { flex: 1; }
.doc-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.doc-meta { font-size: 12px; color: var(--text3); font-family: var(--mono); line-height: 1.6; }
.doc-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ═══════════════════════════════════════
   STEPPER / TIMELINE
   ═══════════════════════════════════════ */
.stepper { display: flex; align-items: flex-start; gap: 0; margin-bottom: 24px; padding: 0 10px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.step-connector { position: absolute; top: 14px; left: 50%; width: 100%; height: 2px; background: var(--surface3); z-index: 0; }
.step:last-child .step-connector { display: none; }
.step-connector.done { background: var(--green); }
.step-connector.active { background: linear-gradient(90deg, var(--green) 50%, var(--surface3) 50%); }
.step-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--surface3); border: 2px solid var(--surface3); display: flex; align-items: center; justify-content: center; z-index: 1; position: relative; }
.step-dot svg { width: 14px; height: 14px; color: var(--text3); }
.step-dot.done { background: var(--green-dim); border-color: var(--green); }
.step-dot.done svg { color: var(--green); }
.step-dot.active { background: var(--accent-dim); border-color: var(--accent); animation: pulse 2s infinite; }
.step-dot.active svg { color: var(--accent2); }
.step-label { font-size: 11px; color: var(--text3); margin-top: 8px; text-align: center; font-family: var(--mono); max-width: 90px; }
.step-label.done { color: var(--green); }
.step-label.active { color: var(--accent2); }

@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232,97,26,0.3); } 50% { box-shadow: 0 0 0 6px rgba(232,97,26,0); } }

/* ═══════════════════════════════════════
   INSTALLMENT CALENDAR
   ═══════════════════════════════════════ */
.install-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }
.install-day { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 8px; text-align: center; min-height: 56px; cursor: default; transition: border-color var(--transition); }
.install-day:hover { border-color: var(--border2); }
.install-day .day-num { font-size: 11px; color: var(--text3); font-family: var(--mono); margin-bottom: 4px; }
.install-day .day-amt { font-size: 13px; font-weight: 600; font-family: var(--display); }
.install-day.met { border-color: rgba(45,184,122,0.3); background: rgba(45,184,122,0.05); }
.install-day.met .day-amt { color: var(--green); }
.install-day.partial { border-color: rgba(232,162,26,0.3); background: rgba(232,162,26,0.05); }
.install-day.partial .day-amt { color: var(--amber); }
.install-day.missed { border-color: rgba(232,64,64,0.2); background: rgba(232,64,64,0.03); }
.install-day.missed .day-amt { color: var(--red); }
.install-day.overpaid { border-color: rgba(74,158,245,0.3); background: rgba(74,158,245,0.05); }
.install-day.overpaid .day-amt { color: var(--blue); }
.install-day.future { opacity: 0.4; }
.install-day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* ═══════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════ */
.settings-section { margin-bottom: 28px; }
.settings-section-title { font-family: var(--display); font-size: 14px; font-weight: 600; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 16px; }
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 13px; color: var(--text); }
.setting-desc { font-size: 11px; color: var(--text3); margin-top: 2px; font-family: var(--mono); }
.toggle { width: 36px; height: 20px; background: var(--surface3); border-radius: 100px; cursor: pointer; position: relative; transition: background 0.2s; flex-shrink: 0; }
.toggle.on { background: var(--accent); }
.toggle-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform 0.2s; }
.toggle.on .toggle-knob { transform: translateX(16px); }

/* ═══════════════════════════════════════
   USSD PHONE SIMULATOR
   ═══════════════════════════════════════ */
.ussd-container { display: flex; gap: 24px; align-items: flex-start; }
.ussd-phone { width: 320px; flex-shrink: 0; }
.ussd-frame { background: #1a1a1a; border-radius: 32px; padding: 12px; border: 2px solid var(--border2); box-shadow: 0 12px 48px rgba(0,0,0,0.5); }
.ussd-notch { width: 100px; height: 4px; background: var(--surface3); border-radius: 100px; margin: 4px auto 8px; }
.ussd-screen { background: #000; border-radius: 20px; min-height: 460px; padding: 20px 16px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.ussd-header { text-align: center; margin-bottom: 16px; }
.ussd-carrier { font-size: 11px; color: var(--green); font-family: var(--mono); }
.ussd-time { font-size: 13px; color: var(--text); font-weight: 600; }
.ussd-dialog { background: var(--surface2); border-radius: 12px; padding: 16px; margin-bottom: 12px; flex: 1; overflow-y: auto; }
.ussd-dialog-title { font-size: 12px; color: var(--accent2); font-family: var(--mono); margin-bottom: 8px; font-weight: 600; }
.ussd-dialog-content { font-size: 13px; color: var(--text); line-height: 1.7; white-space: pre-line; }
.ussd-input-row { display: flex; gap: 8px; }
.ussd-input { flex: 1; background: var(--surface2); border: 1px solid var(--border2); border-radius: 10px; padding: 10px 14px; color: var(--text); font-size: 14px; font-family: var(--sans); outline: none; }
.ussd-input:focus { border-color: var(--accent); }
.ussd-send { width: 44px; height: 44px; border-radius: 10px; background: var(--accent); border: none; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.ussd-send:hover { background: var(--accent2); }
.ussd-send svg { width: 18px; height: 18px; }
.ussd-home { width: 40px; height: 40px; border-radius: 50%; background: var(--surface3); border: none; margin: 10px auto 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ussd-home svg { width: 16px; height: 16px; color: var(--text3); }
.ussd-log { flex: 1; }
.ussd-log-item { padding: 10px 14px; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; font-size: 12px; font-family: var(--mono); color: var(--text2); }
.ussd-log-item .log-dir { color: var(--accent2); font-weight: 500; margin-right: 6px; }
.ussd-log-item .log-time { color: var(--text3); margin-left: 8px; }

/* ═══════════════════════════════════════
   TOAST
   ═══════════════════════════════════════ */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--surface2); border: 1px solid var(--border2); border-radius: 10px; padding: 12px 18px; display: flex; align-items: center; gap: 10px; font-size: 13px; z-index: 999; transform: translateY(80px); opacity: 0; transition: all 0.3s ease; box-shadow: var(--shadow); max-width: 360px; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast svg { width: 17px; height: 17px; flex-shrink: 0; }
.toast.success svg { color: var(--green); }
.toast.error svg { color: var(--red); }
.toast.info svg { color: var(--blue); }
.toast.warning svg { color: var(--amber); }

/* ═══════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════ */
.login-page { height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); position: relative; overflow: hidden; }
.login-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, rgba(232,97,26,0.08) 0%, transparent 60%), radial-gradient(ellipse at 70% 80%, rgba(74,158,245,0.05) 0%, transparent 50%); }
.login-card { position: relative; width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border2); border-radius: 16px; padding: 36px 32px; box-shadow: var(--shadow); z-index: 1; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .logo-wordmark { font-size: 28px; }
.login-logo .logo-tag { font-size: 11px; margin-top: 4px; }
.login-title { font-family: var(--display); font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 4px; }
.login-subtitle { text-align: center; font-size: 13px; color: var(--text3); margin-bottom: 24px; }
.login-form .form-group { margin-bottom: 18px; }
.login-btn { width: 100%; padding: 12px; font-size: 14px; font-weight: 600; }
.login-footer { text-align: center; margin-top: 20px; font-size: 12px; color: var(--text3); }
.login-footer a { color: var(--accent2); }
.login-role-select { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 20px; }
.login-role-opt { padding: 12px; border: 1px solid var(--border); border-radius: 10px; text-align: center; cursor: pointer; transition: all var(--transition); }
.login-role-opt:hover { border-color: var(--border2); }
.login-role-opt.selected { border-color: var(--accent); background: var(--accent-dim); }
.login-role-opt svg { width: 20px; height: 20px; color: var(--text3); margin-bottom: 4px; display: block; margin-left: auto; margin-right: auto; }
.login-role-opt.selected svg { color: var(--accent2); }
.login-role-opt .role-name { font-size: 12px; font-weight: 600; color: var(--text); }
.login-role-opt .role-desc { font-size: 10px; color: var(--text3); font-family: var(--mono); margin-top: 2px; }

/* ═══════════════════════════════════════
   DETAIL VIEW / PROFILE
   ═══════════════════════════════════════ */
.detail-header { display: flex; align-items: flex-start; gap: 20px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 20px; }
.detail-avatar { width: 56px; height: 56px; border-radius: 12px; background: var(--accent-dim); border: 1px solid var(--accent-dim2); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--accent2); flex-shrink: 0; }
.detail-info { flex: 1; min-width: 0; }
.detail-name { font-family: var(--display); font-size: 20px; font-weight: 700; margin-bottom: 2px; }
.detail-sub { font-size: 12px; color: var(--text3); font-family: var(--mono); }
.detail-stats { display: flex; gap: 20px; margin-top: 10px; }
.detail-stat-item { text-align: center; }
.detail-stat-val { font-family: var(--display); font-size: 18px; font-weight: 700; }
.detail-stat-label { font-size: 10px; color: var(--text3); font-family: var(--mono); }
.detail-actions { flex-shrink: 0; display: flex; gap: 8px; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.info-item { padding: 10px 16px; border-bottom: 1px solid var(--border); }
.info-item:nth-child(odd) { border-right: 1px solid var(--border); }
.info-label { font-size: 11px; color: var(--text3); font-family: var(--mono); margin-bottom: 2px; }
.info-value { font-size: 13px; color: var(--text); font-weight: 500; }

/* ═══════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════ */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; }
.pagination-info { font-size: 12px; color: var(--text3); font-family: var(--mono); }
.pagination-btns { display: flex; gap: 4px; }
.page-btn { width: 30px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text2); font-size: 12px; font-family: var(--mono); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.page-btn:hover { border-color: var(--border2); color: var(--text); }
.page-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent2); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* ═══════════════════════════════════════
   RECONCILIATION
   ═══════════════════════════════════════ */
.recon-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 20px; }
.recon-match { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface2); border-radius: 8px; margin-bottom: 8px; }
.recon-match .match-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.recon-match .match-icon svg { width: 15px; height: 15px; }
.recon-match-info { flex: 1; }
.recon-match-title { font-size: 13px; font-weight: 500; }
.recon-match-meta { font-size: 11px; color: var(--text3); font-family: var(--mono); }

/* ═══════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════ */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state svg { width: 48px; height: 48px; color: var(--text4); margin-bottom: 16px; }
.empty-state-title { font-family: var(--display); font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.empty-state-desc { font-size: 13px; color: var(--text3); margin-bottom: 16px; }

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page.active .kpi,
.page.active .panel,
.page.active .alert-band,
.page.active .da-status-strip,
.page.active .detail-header {
  animation: fadeUp 0.25s ease both;
}
.page.active .kpi:nth-child(1) { animation-delay: 0.03s; }
.page.active .kpi:nth-child(2) { animation-delay: 0.06s; }
.page.active .kpi:nth-child(3) { animation-delay: 0.09s; }
.page.active .kpi:nth-child(4) { animation-delay: 0.12s; }
.page.active .kpi:nth-child(5) { animation-delay: 0.15s; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 18px; height: 18px; border: 2px solid var(--surface3); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 1200px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .conn-grid { grid-template-columns: 1fr; }
  .sync-schedule { grid-template-columns: repeat(2, 1fr); }
  .remit-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.mobile-open { display: flex; position: fixed; inset: 0; z-index: 50; width: 260px; }
  .topbar-search { display: none; }
}
@media (max-width: 600px) {
  .content { padding: 16px; }
  .kpi-row { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .install-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ═══════════════════════════════════════
   PRINT
   ═══════════════════════════════════════ */
@media print {
  .sidebar, .topbar, .toast, .modal-overlay { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .content { overflow: visible; }
  body { background: #fff; color: #000; }
  .panel, .kpi { border-color: #ddd; }
}
