:root {
  --bg: #f7fbf8;
  --bg2: #ffffff;
  --text: #0b1a12;
  --muted: rgba(11, 26, 18, 0.62);
  --line: rgba(11, 26, 18, 0.10);
  --shadow: 0 18px 48px rgba(11, 26, 18, 0.10);

  --green: #0f8a4b;
  --green2: #0bbf64;
  --green-ink: #08341d;
  --green-wash: rgba(15, 138, 75, 0.10);
  --danger: #cc2d2d;

  --chart-text: rgba(11, 26, 18, 0.70);
  --chart-grid: rgba(11, 26, 18, 0.08);
  --chart-legend: rgba(11, 26, 18, 0.78);
  --chart-green-fill: rgba(15, 138, 75, 0.22);
  --chart-green-fill-soft: rgba(15, 138, 75, 0.10);
  --chart-green-border: rgba(15, 138, 75, 0.85);
  --chart-danger-border: rgba(204, 45, 45, 0.85);
  --chart-neutral-border: rgba(11, 26, 18, 0.70);
  --chart-primary: rgba(20, 128, 90, 0.98);
  --chart-primary-fill: rgba(20, 128, 90, 0.16);
  --chart-compare-1: rgba(122, 153, 70, 0.95);
  --chart-compare-2: rgba(70, 170, 163, 0.95);
  --empty-text: rgba(11, 26, 18, 0.62);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 12% 12%, rgba(11, 191, 100, 0.10), transparent 65%),
    radial-gradient(900px 620px at 92% 18%, rgba(15, 138, 75, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

code {
  background: rgba(11, 26, 18, 0.06);
  border: 1px solid rgba(11, 26, 18, 0.08);
  padding: 2px 6px;
  border-radius: 8px;
}

.app {
  display: grid;
  grid-template-columns: 270px 1fr;
  grid-template-rows: 76px 1fr;
  min-height: 100vh;
}

.sidebar {
  grid-row: 1 / span 2;
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(10px);
  padding: 18px 14px;
  overflow-y: auto;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 10px 14px;
  border-bottom: 1px solid rgba(11, 26, 18, 0.08);
}
.brand-logo-shell {
  width: 100%;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: 0;
}
.brand-logo-full {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 220ms ease;
}
.brand-text {
  width: 100%;
  display: flex;
  justify-content: center;
}
.brand-text .tag {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
  text-align: center;
}

.nav { padding: 14px 6px; display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  color: rgba(11, 26, 18, 0.86);
  border: 1px solid transparent;
}
.nav-item:hover {
  border-color: rgba(15, 138, 75, 0.20);
  background: rgba(15, 138, 75, 0.06);
}
.nav-item.active {
  background: var(--green-wash);
  border-color: rgba(15, 138, 75, 0.30);
  color: var(--green-ink);
  font-weight: 650;
}

.side-foot {
  position: absolute;
  bottom: 16px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 10px;
}

.side-link {
  flex: 1;
  text-align: center;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(11, 26, 18, 0.12);
  text-decoration: none;
  color: rgba(11, 26, 18, 0.82);
  background: rgba(255, 255, 255, 0.72);
}
.side-link:hover { border-color: rgba(15, 138, 75, 0.30); }

.topbar {
  grid-column: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}
.top-left h1 { margin: 0; font-size: 18px; letter-spacing: 0.2px; }
.top-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.crumb { margin-top: 4px; font-size: 12px; color: var(--muted); }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.range { display: flex; gap: 10px; align-items: center; }
.range-lbl {
  color: rgba(11, 26, 18, 0.62);
  font-weight: 800;
}
.sep { color: rgba(11, 26, 18, 0.40); }
input[type="date"]{
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(11, 26, 18, 0.14);
  background: rgba(255, 255, 255, 0.90);
  color: rgba(11, 26, 18, 0.90);
}

.inp, .sel {
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(11, 26, 18, 0.14);
  background: rgba(255, 255, 255, 0.90);
  color: rgba(11, 26, 18, 0.90);
  min-width: 160px;
}
.sel-sm {
  padding: 8px 10px;
  min-width: 220px;
}
.inp { min-width: 220px; }

.btn {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(11, 26, 18, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: rgba(11, 26, 18, 0.86);
  cursor: pointer;
}
.btn:hover { border-color: rgba(15, 138, 75, 0.34); }
.btn-primary {
  border-color: rgba(15, 138, 75, 0.45);
  background: linear-gradient(135deg, rgba(15, 138, 75, 0.14), rgba(11, 191, 100, 0.12));
  color: var(--green-ink);
  font-weight: 650;
}
.theme-toggle {
  min-width: 136px;
  font-weight: 700;
}

.content {
  grid-column: 2;
  padding: 18px 22px 34px;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(11, 26, 18, 0.14);
  background: rgba(255, 255, 255, 0.88);
  color: rgba(11, 26, 18, 0.86);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.mobile-nav-overlay {
  display: none;
}

.status { color: var(--muted); min-height: 18px; margin-bottom: 12px; }
.warn { color: var(--danger); margin: 0; font-size: 12px; }

.panel {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(11, 26, 18, 0.10);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.hint { font-size: 12px; color: var(--muted); max-width: 520px; }
.chart-delta-hint { margin-bottom: 8px; min-height: 18px; }
h2 { margin: 0; font-size: 14px; letter-spacing: 0.2px; }

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.cards-owner {
  grid-template-columns: repeat(5, 1fr);
}
.card {
  border-radius: 16px;
  border: 1px solid rgba(15, 138, 75, 0.18);
  background: linear-gradient(180deg, rgba(15, 138, 75, 0.10), rgba(255,255,255,0.74));
  padding: 14px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 138, 75, 0.30);
  box-shadow: 0 12px 28px rgba(11, 26, 18, 0.10);
}
.card .k { color: rgba(11, 26, 18, 0.62); font-size: 12px; }
.card .v { font-size: 22px; margin-top: 8px; font-weight: 750; color: rgba(8, 52, 29, 0.92); }
.card-deltas {
  margin-top: 8px;
  display: grid;
  gap: 2px;
}
.card-deltas:empty { display: none; }
.delta-line {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.delta-line .arr { font-size: 14px; font-weight: 800; line-height: 1; }
.delta-line .arr.up { color: rgba(15, 138, 75, 0.92); }
.delta-line .arr.down { color: rgba(204, 45, 45, 0.92); }
.delta-line b { color: rgba(11, 26, 18, 0.86); }
.plan-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(11, 26, 18, 0.10);
  margin-top: 10px;
  overflow: hidden;
}
.plan-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: rgba(15, 138, 75, 0.86);
  transition: width 220ms ease, background-color 220ms ease;
}
.plan-green { background: rgba(15, 138, 75, 0.88); }
.plan-yellow { background: rgba(223, 173, 30, 0.92); }
.plan-red { background: rgba(204, 45, 45, 0.88); }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.dashboard-revenue-wrap {
  margin-bottom: 12px;
}
.dashboard-revenue-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.panel-centered {
  max-width: 1320px;
  margin: 0 auto;
}

.pie-compact-wrap {
  max-width: 460px;
  margin: 0 auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(11, 26, 18, 0.10);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.80);
}
.table-collapsible {
  max-height: 620px;
  overflow: auto;
  transition: max-height 320ms ease;
}
.table-collapsible.expanded {
  max-height: 1800px;
}
thead { background: rgba(15, 138, 75, 0.08); }
th, td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(11, 26, 18, 0.08);
  vertical-align: top;
  font-size: 13px;
}
th { color: rgba(11, 26, 18, 0.76); font-weight: 700; }
.table-filter-row th {
  background: rgba(15, 138, 75, 0.04);
  padding: 7px 8px;
}
.table-filter-input,
.table-filter-select {
  width: 100%;
  min-width: 110px;
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 12px;
}
th.sortable-th {
  cursor: pointer;
  user-select: none;
}
th.sortable-th:hover {
  color: rgba(8, 52, 29, 0.95);
}
.clickable-hint {
  margin: 8px 2px 8px;
  font-size: 12px;
  color: rgba(8, 52, 29, 0.68);
}
td { color: rgba(11, 26, 18, 0.86); }
.table-row-clickable {
  cursor: pointer;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.table-row-clickable:hover {
  background: rgba(15, 138, 75, 0.12);
  box-shadow: inset 0 0 0 1px rgba(15, 138, 75, 0.30);
}
.table-row-clickable.row-expanded {
  background: rgba(15, 138, 75, 0.14);
  box-shadow: inset 3px 0 0 rgba(15, 138, 75, 0.75);
}

.table-row-clickable.row-expandable td:first-child {
  position: relative;
  padding-right: 34px;
  font-weight: 650;
}

.table-row-clickable.row-expandable td:first-child::after {
  content: "▸";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(15, 138, 75, 0.74);
  font-size: 13px;
  transition: transform 180ms ease, color 180ms ease;
}

.table-row-clickable.row-expandable:hover td:first-child::after {
  color: rgba(15, 138, 75, 0.92);
}

.table-row-clickable.row-expandable.row-expanded td:first-child::after {
  transform: translateY(-50%) rotate(90deg);
  color: rgba(15, 138, 75, 0.95);
}
.list-item.list-item-openable {
  position: relative;
  padding-right: 28px;
}
.list-item.list-item-openable::after {
  content: "↗";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: rgba(15, 138, 75, 0.72);
  transition: color 180ms ease, transform 180ms ease;
}
.list-item.list-item-openable:hover::after {
  color: rgba(15, 138, 75, 0.95);
  transform: translateY(-50%) translateX(1px);
}

.inline-detail-row td {
  padding: 0;
  border-bottom: 1px solid rgba(11, 26, 18, 0.08);
  background: rgba(15, 138, 75, 0.04);
}

.inline-expander {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  transition: max-height 320ms ease, opacity 260ms ease, transform 260ms ease, padding 260ms ease;
  padding: 0 12px;
}

.inline-expander.open {
  max-height: 1200px;
  opacity: 1;
  transform: translateY(0);
  padding: 12px;
}
.inline-expander.pnl-inline {
  max-height: 0;
}
.inline-expander.pnl-inline.open {
  max-height: 700px;
}
.pnl-inline-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 10px;
}

.inline-expander-head {
  font-size: 15px;
  font-weight: 750;
  margin-bottom: 10px;
  color: var(--green-ink);
}

.inline-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.inline-kpi {
  border: 1px solid rgba(15, 138, 75, 0.20);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.inline-kpi span {
  font-size: 12px;
  color: var(--muted);
}

.inline-kpi b {
  font-size: 16px;
  color: var(--green-ink);
}

.inline-list-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.inline-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.inline-list-card {
  border: 1px solid rgba(11, 26, 18, 0.10);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
  padding: 10px;
}

.inline-list-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.inline-list-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid rgba(11, 26, 18, 0.07);
  font-size: 12px;
}

.inline-list-row:first-child {
  border-top: 0;
}

.inline-list-empty {
  color: var(--muted);
  font-size: 12px;
}

.list { display: grid; gap: 8px; }
.list-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(11, 26, 18, 0.10);
  background: rgba(255, 255, 255, 0.80);
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}
.list-item:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 138, 75, 0.24);
  background: rgba(255, 255, 255, 0.92);
}
.list-item .t { font-weight: 650; }
.list-item .n { color: rgba(11, 26, 18, 0.70); }

.anim-pop {
  animation: popIn 240ms ease;
}

@keyframes popIn {
  from {
    opacity: 0.25;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.metrics-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  border: 1px solid rgba(11, 26, 18, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.70);
  padding: 12px 12px 10px;
}

.metric-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}
.metric-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.1px;
}

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters .inp, .filters .sel {
  min-width: 170px;
}
.filters input[type="date"] { min-width: 160px; }
.filters .hint { max-width: unset; }
.pill {
  border: 1px solid rgba(11, 26, 18, 0.12);
  background: rgba(255, 255, 255, 0.76);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
}
.pill-ok {
  border-color: rgba(15, 138, 75, 0.30);
  background: rgba(15, 138, 75, 0.08);
  color: var(--green-ink);
}

.seg {
  display: inline-flex;
  border-radius: 12px;
  border: 1px solid rgba(11, 26, 18, 0.14);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
}
.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(11, 26, 18, 0.78);
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 650;
}
.seg-btn + .seg-btn { border-left: 1px solid rgba(11, 26, 18, 0.10); }
.seg-btn.active {
  background: rgba(15, 138, 75, 0.12);
  color: rgba(8, 52, 29, 0.92);
}

.preview {
  margin-top: 12px;
  white-space: pre-wrap;
  overflow-x: auto;
  background: rgba(11, 26, 18, 0.04);
  border: 1px solid rgba(11, 26, 18, 0.10);
  border-radius: 14px;
  padding: 12px;
  font-size: 12px;
}

.p { margin: 0; color: rgba(11, 26, 18, 0.76); }
.ul { margin: 0; padding-left: 18px; color: rgba(11, 26, 18, 0.76); }

.hidden { display: none; }

.slide-panel {
  max-height: 0;
  opacity: 0;
  transform: translateY(-10px);
  overflow: hidden;
  pointer-events: none;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  margin-top: 0 !important;
  transition:
    max-height 360ms ease,
    opacity 260ms ease,
    transform 260ms ease,
    padding 260ms ease,
    border-width 260ms ease,
    margin-top 260ms ease;
}

.slide-panel.open {
  max-height: 2600px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  padding-top: 16px;
  padding-bottom: 16px;
  border-width: 1px;
  margin-top: 12px !important;
}

body.theme-dark {
  --bg: #0d1511;
  --bg2: #141f19;
  --text: #e7f3ed;
  --muted: rgba(239, 249, 244, 0.86);
  --line: rgba(190, 223, 206, 0.16);
  --shadow: 0 18px 46px rgba(0, 0, 0, 0.35);
  --green-ink: #d8f3e5;
  --green-wash: rgba(40, 170, 105, 0.26);
  --danger: #ff8f8f;
  --chart-text: rgba(250, 255, 252, 0.98);
  --chart-grid: rgba(231, 243, 237, 0.22);
  --chart-legend: rgba(255, 255, 255, 1);
  --chart-green-fill: rgba(60, 190, 125, 0.28);
  --chart-green-fill-soft: rgba(60, 190, 125, 0.18);
  --chart-green-border: rgba(96, 219, 154, 0.96);
  --chart-danger-border: rgba(255, 126, 126, 0.95);
  --chart-neutral-border: rgba(241, 251, 246, 0.96);
  --chart-primary: rgba(102, 221, 174, 1);
  --chart-primary-fill: rgba(102, 221, 174, 0.22);
  --chart-compare-1: rgba(182, 214, 120, 1);
  --chart-compare-2: rgba(122, 222, 214, 1);
  --empty-text: rgba(248, 255, 251, 0.92);
}

body.theme-dark {
  background:
    radial-gradient(1200px 700px at 12% 12%, rgba(65, 170, 118, 0.14), transparent 65%),
    radial-gradient(900px 620px at 92% 18%, rgba(48, 142, 96, 0.16), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}
body.theme-dark code {
  background: rgba(231, 243, 237, 0.10);
  border-color: rgba(231, 243, 237, 0.14);
}
body.theme-dark .sidebar {
  background: rgba(20, 32, 26, 0.84);
}
body.theme-dark .brand {
  border-bottom-color: rgba(231, 243, 237, 0.10);
}
body.theme-dark .brand-logo-shell {
  background: transparent;
  border: 0;
}
body.theme-dark .brand-logo-full {
  filter: none;
  transform: none;
  transform-origin: center center;
}
body.theme-dark .nav-item {
  color: rgba(231, 243, 237, 0.88);
}
body.theme-dark .nav-item:hover {
  border-color: rgba(96, 219, 154, 0.34);
  background: rgba(60, 190, 125, 0.16);
}
body.theme-dark .nav-item.active {
  border-color: rgba(96, 219, 154, 0.46);
  color: #e5ffef;
}
body.theme-dark .side-link,
body.theme-dark .topbar,
body.theme-dark .panel,
body.theme-dark .metric-card,
body.theme-dark table,
body.theme-dark .list-item,
body.theme-dark .seg,
body.theme-dark .pill,
body.theme-dark .inp,
body.theme-dark .sel,
body.theme-dark input[type="date"],
body.theme-dark .btn {
  background: rgba(20, 31, 25, 0.90);
  color: rgba(231, 243, 237, 0.90);
  border-color: rgba(231, 243, 237, 0.16);
}
body.theme-dark .btn:hover {
  border-color: rgba(96, 219, 154, 0.48);
}
body.theme-dark .btn-primary {
  background: linear-gradient(135deg, rgba(60, 190, 125, 0.26), rgba(21, 94, 62, 0.28));
  color: #e7fbed;
  border-color: rgba(96, 219, 154, 0.56);
}
body.theme-dark .mobile-menu-btn {
  background: rgba(20, 31, 25, 0.92);
  color: rgba(236, 248, 242, 0.96);
  border-color: rgba(231, 243, 237, 0.22);
}
body.theme-dark .card {
  border-color: rgba(96, 219, 154, 0.30);
  background: linear-gradient(180deg, rgba(60, 190, 125, 0.18), rgba(20, 31, 25, 0.90));
}
body.theme-dark .card .k { color: rgba(236, 249, 242, 0.86); }
body.theme-dark .card .v { color: rgba(243, 255, 248, 0.99); }
body.theme-dark .card-deltas { color: rgba(233, 246, 239, 0.94); }
body.theme-dark .delta-line { color: rgba(233, 246, 239, 0.94); }
body.theme-dark .delta-line b { color: rgba(246, 255, 250, 0.99); }
body.theme-dark .delta-line .arr.up { color: rgba(98, 236, 164, 0.98); }
body.theme-dark .delta-line .arr.down { color: rgba(255, 142, 142, 0.98); }
body.theme-dark .plan-progress { background: rgba(231, 243, 237, 0.16); }
body.theme-dark thead {
  background: rgba(60, 190, 125, 0.17);
}
body.theme-dark th,
body.theme-dark td {
  border-bottom-color: rgba(231, 243, 237, 0.10);
}
body.theme-dark th { color: rgba(231, 243, 237, 0.78); }
body.theme-dark td,
body.theme-dark .list-item .n,
body.theme-dark .range-lbl,
body.theme-dark .sep,
body.theme-dark .p,
body.theme-dark .ul {
  color: rgba(231, 243, 237, 0.88);
}
body.theme-dark .hint,
body.theme-dark .crumb,
body.theme-dark .status {
  color: rgba(236, 248, 242, 0.86);
}
body.theme-dark .chart-delta-hint {
  color: rgba(240, 251, 245, 0.92);
}
body.theme-dark .list-item .t {
  color: rgba(244, 255, 249, 0.97);
}
body.theme-dark .inline-expander {
  background: rgba(18, 29, 23, 0.94);
}
body.theme-dark .inline-expander-head {
  color: rgba(242, 255, 248, 0.99);
}
body.theme-dark .inline-kpi {
  background: rgba(19, 31, 25, 0.96);
  border-color: rgba(115, 224, 172, 0.36);
}
body.theme-dark .inline-kpi span {
  color: rgba(224, 243, 234, 0.92);
}
body.theme-dark .inline-kpi b {
  color: rgba(247, 255, 251, 1);
}
body.theme-dark .inline-list-card {
  background: rgba(19, 31, 25, 0.95);
  border-color: rgba(231, 243, 237, 0.18);
}
body.theme-dark .inline-list-title {
  color: rgba(244, 255, 249, 0.98);
}
body.theme-dark .inline-list-row {
  border-top-color: rgba(231, 243, 237, 0.12);
  color: rgba(236, 248, 242, 0.95);
}
body.theme-dark .inline-list-empty {
  color: rgba(231, 243, 237, 0.84);
}
body.theme-dark .preview {
  background: rgba(231, 243, 237, 0.06);
  border-color: rgba(231, 243, 237, 0.14);
}
body.theme-dark .seg-btn {
  color: rgba(231, 243, 237, 0.82);
}
body.theme-dark .seg-btn + .seg-btn {
  border-left-color: rgba(231, 243, 237, 0.15);
}
body.theme-dark .seg-btn.active {
  background: rgba(60, 190, 125, 0.26);
  color: #ecfff3;
}
body.theme-dark input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.1);
}

@media (max-width: 980px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .inline-charts-grid { grid-template-columns: 1fr; }
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .sidebar {
    grid-row: 1 / span 2;
    position: fixed;
    top: 0;
    left: 0;
    width: min(84vw, 320px);
    height: 100vh;
    z-index: 90;
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }
  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }
  .mobile-nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(5, 12, 9, 0.45);
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }
  body.mobile-nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }
  .topbar { grid-column: 1; padding: 12px 14px; gap: 10px; align-items: flex-start; }
  .top-left { width: 100%; }
  .top-left h1 { font-size: 17px; }
  .crumb { display: none; }
  .top-actions { width: 100%; justify-content: flex-start; gap: 8px; }
  .range { width: 100%; gap: 6px; }
  .range input[type="date"] { min-width: 0; width: 100%; }
  .theme-toggle { min-width: 124px; }
  .content { grid-column: 1; padding: 12px 10px 20px; }
  .cards { grid-template-columns: 1fr; }
  .cards-owner { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .dashboard-revenue-grid { grid-template-columns: 1fr; }
  .panel { padding: 12px; }
  .panel-head { flex-wrap: wrap; }
  .pnl-inline-wrap { grid-template-columns: 1fr; }
  .inline-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-list-grid { grid-template-columns: 1fr; }
  .row { gap: 8px; }
  .inp, .sel { min-width: 0; width: 100%; }
  .btn { padding: 10px 11px; }
  .seg-btn { padding: 9px 10px; font-size: 13px; }
  table { display: block; overflow-x: auto; width: 100%; }
  table thead, table tbody, table tr { white-space: nowrap; }
  th, td { font-size: 12px; padding: 8px 8px; }
  .side-foot { position: relative; bottom: auto; left: auto; right: auto; margin-top: 12px; }
}

@media (max-width: 560px) {
  .inline-kpi-grid { grid-template-columns: 1fr; }
  .top-actions .btn { width: 100%; }
  .top-actions .theme-toggle { width: 100%; }
  .range { flex-wrap: wrap; }
  .range-lbl { min-width: 12px; }
}
