/* ReportOps Console — design tokens + base styles */
:root {
  /* Surfaces — warm-neutral, very subtle saturation */
  --bg: #f7f6f3;
  --bg-elev: #ffffff;
  --bg-sunken: #efece6;
  --sidebar-bg: #1a1815;
  --sidebar-fg: #d8d4cb;
  --sidebar-muted: #8a847a;
  --sidebar-hover: #2a2622;
  --sidebar-active: #36322c;

  /* Text */
  --fg: #1a1815;
  --fg-muted: #6b6760;
  --fg-subtle: #95918a;
  --fg-faint: #b8b4ac;

  /* Borders */
  --border: #e6e2d9;
  --border-strong: #d4cfc4;
  --border-subtle: #ede9e0;

  /* Accent — muted indigo */
  --accent: #4f46c2;
  --accent-fg: #ffffff;
  --accent-soft: #ecebf7;
  --accent-border: #c9c6ec;

  /* Status */
  --ok: #1f7a3a;
  --ok-bg: #e6f3ea;
  --ok-border: #b8d9c2;

  --fail: #b3261e;
  --fail-bg: #fbe9e7;
  --fail-border: #ebbab4;

  --warn: #9a6700;
  --warn-bg: #fbf3dd;
  --warn-border: #e8d39c;

  --run: #1456a8;
  --run-bg: #e3eef9;
  --run-border: #b5cee7;

  --idle: #6b6760;
  --idle-bg: #ece9e2;
  --idle-border: #d4cfc4;

  /* Shape */
  --r-sm: 4px;
  --r: 6px;
  --r-md: 8px;
  --r-lg: 12px;

  /* Shadow */
  --shadow-sm: 0 1px 1px rgba(20,18,14,.04);
  --shadow: 0 1px 2px rgba(20,18,14,.06), 0 4px 12px rgba(20,18,14,.04);
  --shadow-lg: 0 4px 12px rgba(20,18,14,.08), 0 16px 40px rgba(20,18,14,.08);

  /* Type */
  --font-sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font: inherit; color: inherit; }

#root { height: 100%; }

/* Layout shell ============================================================ */
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100vh;
  overflow: hidden;
}
.sidebar {
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid #000;
  overflow: hidden;
}
.sidebar__brand {
  padding: 16px 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #2a2622;
}
.brand-mark {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #6a61d8, #4f46c2);
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: -.02em;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.2);
}
.brand-logo {
  height: 22px;
  width: auto;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}
.brand-name { font-weight: 600; letter-spacing: -.01em; color: #fff; }
.brand-sub { font-size: 11px; color: var(--sidebar-muted); font-family: var(--font-mono); }

.sidebar__nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 8px 16px;
}
.nav-section {
  margin-top: 14px;
  padding: 0 8px 4px;
  font-size: 10px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--sidebar-muted);
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--sidebar-fg);
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); }
.nav-item.is-active { background: var(--sidebar-active); color: #fff; }
.nav-item.is-active::before {
  content: ''; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 2px;
  background: var(--accent); border-radius: 2px;
}
.nav-item__icon {
  width: 16px; height: 16px;
  display: inline-grid; place-items: center;
  color: var(--sidebar-muted);
  flex: 0 0 16px;
}
.nav-item.is-active .nav-item__icon { color: #fff; }
.nav-item__badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #2a2622;
  color: var(--sidebar-fg);
  min-width: 18px;
  text-align: center;
}
.nav-item__badge.is-alert { background: var(--fail); color: #fff; }
.sidebar__user {
  border-top: 1px solid #2a2622;
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
}
.avatar {
  width: 28px; height: 28px; border-radius: 999px;
  background: linear-gradient(135deg, #c2b9a3, #8a8270);
  color: #1a1815;
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .02em;
}
.user-meta { line-height: 1.2; }
.user-name { color: #fff; font-size: 12.5px; font-weight: 500; }
.user-role { color: var(--sidebar-muted); font-size: 11px; }

/* Main column ============================================================= */
.main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.topbar {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  gap: 16px;
}
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-muted); }
.crumbs__sep { color: var(--fg-faint); }
.crumbs__cur { color: var(--fg); font-weight: 500; }
.topbar__spacer { flex: 1; }
.topbar__search {
  display: flex; align-items: center; gap: 8px;
  width: 260px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-elev);
  color: var(--fg-muted);
  margin-left: auto;
}
.topbar__icon-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--fg-muted);
  cursor: pointer;
}
.topbar__icon-btn:hover { background: var(--bg); color: var(--fg); }
.topbar__env {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--warn-bg);
  color: var(--warn);
  border: 1px solid var(--warn-border);
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 80px;
}

/* Headings and meta ======================================================= */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 20px;
}
.page-head h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.page-head__sub {
  color: var(--fg-muted);
  font-size: 13px;
}
.page-head__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Cards =================================================================== */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.card__title {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -.005em;
}
.card__sub {
  color: var(--fg-muted);
  font-size: 12px;
}
.card__actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
}
.card__body { padding: 14px; }
.card__body--flush { padding: 0; }

/* Stat cards ============================================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.stat__label {
  color: var(--fg-muted);
  font-size: 11.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat__value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-feature-settings: 'tnum';
  line-height: 1.1;
}
.stat__meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--fg-muted);
}
.stat__delta-up { color: var(--ok); }
.stat__delta-down { color: var(--fail); }
.stat__dot {
  width: 8px; height: 8px; border-radius: 999px;
  display: inline-block;
}

/* Buttons ================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--r);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
}
.btn:hover { background: var(--bg); }
.btn--sm { padding: 3px 8px; font-size: 12px; }
.btn--primary {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: var(--accent);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);
}
.btn--primary:hover { background: #443ba8; }
.btn--danger {
  background: var(--fail);
  border-color: var(--fail);
  color: #fff;
}
.btn--ghost { border-color: transparent; background: transparent; color: var(--fg-muted); }
.btn--ghost:hover { background: var(--bg-sunken); color: var(--fg); }
.btn--icon { padding: 5px; }

/* Status pills ============================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid;
  letter-spacing: .01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill__dot {
  width: 6px; height: 6px; border-radius: 999px;
}
.pill--ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-border); }
.pill--ok .pill__dot { background: var(--ok); }
.pill--fail { color: var(--fail); background: var(--fail-bg); border-color: var(--fail-border); }
.pill--fail .pill__dot { background: var(--fail); }
.pill--warn { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-border); }
.pill--warn .pill__dot { background: var(--warn); }
.pill--run { color: var(--run); background: var(--run-bg); border-color: var(--run-border); }
.pill--run .pill__dot { background: var(--run); animation: pulse 1.4s infinite; }
.pill--idle { color: var(--idle); background: var(--idle-bg); border-color: var(--idle-border); }
.pill--idle .pill__dot { background: var(--idle); }
.pill--accent { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
.pill--accent .pill__dot { background: var(--accent); }

@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.85); }
}

/* Tables ================================================================== */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.table th {
  text-align: left;
  font-weight: 500;
  color: var(--fg-muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
  font-size: 11.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: 0; }
.table tr.is-clickable { cursor: pointer; }
.table tr.is-clickable:hover td { background: var(--bg-sunken); }
.table tr.is-selected td { background: var(--accent-soft); }
.table .col-num { text-align: right; font-family: var(--font-mono); font-feature-settings: 'tnum'; }
.table .col-mono { font-family: var(--font-mono); font-size: 12px; }
.table .col-actions { text-align: right; white-space: nowrap; }

.cell-strong { font-weight: 500; color: var(--fg); }
.cell-muted { color: var(--fg-muted); }
.cell-mono { font-family: var(--font-mono); font-size: 12px; }

/* Filter bar ============================================================== */
.filter-bar {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  flex-wrap: wrap;
}
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  padding: 4px 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--fg);
}
.filter-chip:hover { background: var(--bg-sunken); }
.filter-chip__label { color: var(--fg-muted); }
.filter-chip__value { font-weight: 500; }
.filter-chip__count {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0 5px;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-size: 12.5px;
}
.search-input:focus { outline: 1px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }

/* Tabs ==================================================================== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
  background: var(--bg-elev);
}
.tab {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--fg); }
.tab.is-active { color: var(--fg); border-bottom-color: var(--accent); }
.tab__count {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-faint);
}

/* Timeline ================================================================ */
.timeline {
  position: relative;
  padding-left: 18px;
}
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px;
  width: 1px; background: var(--border-strong);
}
.timeline__item {
  position: relative;
  padding: 6px 0 10px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.timeline__item::before {
  content: ''; position: absolute; left: -14px; top: 10px;
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--bg-elev);
  border: 2px solid var(--idle);
}
.timeline__item.is-ok::before { border-color: var(--ok); background: var(--ok); }
.timeline__item.is-fail::before { border-color: var(--fail); background: var(--fail); }
.timeline__item.is-run::before { border-color: var(--run); background: var(--run); }
.timeline__item.is-warn::before { border-color: var(--warn); background: var(--warn); }
.timeline__time {
  flex: 0 0 64px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding-top: 1px;
}
.timeline__body { flex: 1; font-size: 12.5px; }
.timeline__msg { color: var(--fg); }
.timeline__meta { color: var(--fg-muted); font-size: 11.5px; margin-top: 1px; font-family: var(--font-mono); }

/* Console ================================================================= */
.console {
  background: #0f0d0a;
  color: #d8d4cb;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: var(--r);
  overflow: auto;
  max-height: 320px;
  white-space: pre-wrap;
  word-break: break-word;
}
.console .c-ok { color: #6cc28a; }
.console .c-warn { color: #d8b96a; }
.console .c-fail { color: #e08a86; }
.console .c-dim { color: #8a847a; }
.console .c-key { color: #a4a0f0; }

/* Two-col detail ========================================================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}
.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

/* KV list ================================================================= */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; font-size: 12.5px; }
.kv dt { color: var(--fg-muted); }
.kv dd { margin: 0; color: var(--fg); font-family: var(--font-mono); font-size: 12px; }

/* Folder tree ============================================================= */
.tree { font-size: 12.5px; }
.tree__item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
}
.tree__item:hover { background: var(--bg-sunken); }
.tree__item.is-active { background: var(--accent-soft); color: var(--accent); }
.tree__caret { width: 10px; color: var(--fg-faint); transition: transform .15s; }
.tree__caret.is-open { transform: rotate(90deg); }
.tree__icon { color: var(--fg-muted); width: 14px; height: 14px; }
.tree__item.is-active .tree__icon { color: var(--accent); }
.tree__count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--fg-faint); }
.tree__group { padding-left: 16px; }

/* Modal =================================================================== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,18,14,.36);
  backdrop-filter: blur(1px);
  display: grid; place-items: center;
  z-index: 50;
  padding: 24px;
}
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: 560px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
.modal--lg { width: 760px; }
.modal__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal__title { font-weight: 600; font-size: 14px; }
.modal__body { padding: 16px 18px; overflow-y: auto; }
.modal__foot {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  background: var(--bg-sunken);
  border-bottom-left-radius: var(--r-lg);
  border-bottom-right-radius: var(--r-lg);
}

/* Form controls =========================================================== */
.field { margin-bottom: 12px; }
.field__label {
  display: block;
  font-size: 11.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--fg-muted);
  margin-bottom: 5px;
}
.field__hint {
  font-size: 11.5px;
  color: var(--fg-muted);
  margin-top: 4px;
}
.input, .select, .textarea {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-elev);
  font-size: 13px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: 2px solid var(--accent-soft);
  outline-offset: 0;
  border-color: var(--accent);
}
.textarea { resize: vertical; min-height: 64px; font-family: var(--font-sans); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; padding: 6px 0; cursor: pointer; }
.checkbox input { margin: 3px 0 0; accent-color: var(--accent); }
.checkbox__title { font-weight: 500; }
.checkbox__sub { color: var(--fg-muted); font-size: 12px; }

/* Misc ==================================================================== */
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.spacer { flex: 1; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--fg-muted); }
.tnum { font-feature-settings: 'tnum'; }
.row { display: flex; gap: 8px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; }
.right { margin-left: auto; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--fg-muted);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.sparkline { display: flex; align-items: flex-end; gap: 2px; height: 24px; }
.sparkline__bar { width: 4px; background: var(--accent-soft); border-radius: 1px; }
.sparkline__bar.is-fail { background: var(--fail-bg); border: 1px solid var(--fail-border); }
.sparkline__bar.is-ok { background: var(--accent); }
.sparkline__bar.is-warn { background: var(--warn, #f59e0b); }

/* File preview ============================================================ */
.preview-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
  font-size: 12px;
}
.preview-toolbar .mono { font-size: 12px; }

.csv-table {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 11.5px;
  border-collapse: collapse;
}
.csv-table th, .csv-table td {
  padding: 5px 8px;
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  text-align: left;
}
.csv-table th {
  background: var(--bg-sunken);
  font-weight: 500;
  position: sticky;
  top: 0;
  z-index: 1;
}
.csv-table td.is-warn { background: var(--warn-bg); color: var(--warn); }
.csv-table td.is-empty { background: var(--fail-bg); color: var(--fail); }
.csv-table .row-num { color: var(--fg-faint); text-align: right; user-select: none; }

/* Calendar ================================================================ */
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal__h {
  font-size: 10.5px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--fg-muted);
  letter-spacing: .04em;
  padding: 4px 6px;
}
.cal__day {
  aspect-ratio: 1.2 / 1;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 4px 6px;
  background: var(--bg-elev);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  position: relative;
}
.cal__day:hover { border-color: var(--accent); }
.cal__day.is-other { color: var(--fg-faint); background: var(--bg); }
.cal__day.is-today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal__date {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11px;
}
.cal__dots {
  display: flex; gap: 2px; flex-wrap: wrap; margin-top: auto;
}
.cal__dot {
  width: 5px; height: 5px; border-radius: 999px;
}

/* Reports library ========================================================= */
.report-view-switch {
  display: flex;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  background: var(--bg-sunken);
}
.report-view-switch a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  white-space: nowrap;
}
.report-view-switch a:hover { background: var(--bg-sunken); color: var(--fg); }
.report-view-switch a.is-active {
  background: var(--bg-elev);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}
.reports-folder-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 480px;
  border-top: 1px solid var(--border);
}
.reports-folder-layout__tree {
  border-right: 1px solid var(--border);
  padding: 10px;
  overflow-y: auto;
  max-height: 70vh;
}
.reports-folder-layout__main { min-width: 0; display: flex; flex-direction: column; }
.reports-folder-pathbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
  font-size: 12px;
  color: var(--fg-muted);
  font-family: var(--font-mono);
}
.card--reports-flush { padding: 0; overflow: hidden; }
.tree details > summary {
  list-style: none;
  cursor: pointer;
}
.tree details > summary::-webkit-details-marker { display: none; }
.tree details[open] > summary .tree__caret { transform: rotate(90deg); }
.tree a.tree__item { text-decoration: none; color: inherit; }
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 14px 0 14px;
}
.calendar-nav__title { font-weight: 600; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4cfc4; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #b8b4ac; }
.sidebar ::-webkit-scrollbar-thumb { background: #3a342c; border-color: var(--sidebar-bg); }
