/* ============================================================
   OBSEPIO CAPITAL — INVESTOR PORTAL STYLES
   Extends shared/css/base.css
   ============================================================ */

/* ============================================================
   LAYOUT OVERRIDES
   ============================================================ */
.content { max-width: 1600px; }

/* ============================================================
   LANGUAGE SWITCH (investor portal only)
   ============================================================ */
.lang-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.lang-switch button {
  padding: 0.3125rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 999px;
  letter-spacing: 0.05em;
  transition: color var(--transition), background var(--transition);
  min-height: 28px;
}
.lang-switch button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.2);
}

/* ============================================================
   CHART CONTROLS (pill-style chart type switcher)
   ============================================================ */
.chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.chart-type-pills {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.chart-pill {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.875rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.chart-pill:hover { color: var(--text); }
.chart-pill.active { background: var(--primary); color: #fff; }

/* ============================================================
   TRANSACTIONS TABLE
   ============================================================ */
.tx-table { width: 100%; font-size: 0.875rem; }
.tx-table thead th {
  position: sticky; top: 0;
  background: var(--surface);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.6875rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tx-table tbody tr { transition: background var(--transition); }
.tx-table tbody tr:nth-child(even) { background: var(--surface-2); }
.tx-table tbody tr:hover { background: var(--surface-3); }
.tx-table td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
.tx-table tbody tr:first-child td { border-top: 0; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num.pos { color: var(--success); }
.num.neg { color: var(--error); }

/* Mobile transaction cards */
.tx-cards { display: none; flex-direction: column; gap: 0.625rem; }
.tx-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
  box-shadow: var(--shadow);
}
.tx-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.tx-card-date { font-size: 0.75rem; color: var(--text-muted); }
.tx-card-row { display: flex; justify-content: space-between; margin-top: 4px; font-size: 0.8125rem; }
.tx-card-row .label { color: var(--text-muted); }

/* ============================================================
   SUMMARY COMPONENTS (overview dashboard)
   ============================================================ */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem 1.25rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.summary-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.summary-card-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}
.summary-card-title-icon [data-lucide] { width: 0.875rem; height: 0.875rem; }
.summary-card-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.summary-main-block { padding: 0.25rem 0; }
.summary-main-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.summary-main-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.summary-main-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.625rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.summary-pct-badge {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.summary-pct-badge.positive { color: var(--success); background: var(--success-bg); border-color: transparent; }
.summary-pct-badge.negative { color: var(--error);   background: var(--error-bg);   border-color: transparent; }

.summary-divider { height: 1px; background: var(--border); }

/* Split stat row (two metrics side by side with a centre divider) */
.summary-stat-row {
  display: flex;
}
.summary-stat {
  flex: 1;
  min-width: 0;
  padding: 0.25rem 0;
}
.summary-stat + .summary-stat {
  padding-left: 1rem;
  margin-left: 1rem;
  border-left: 1px solid var(--border);
}
.summary-stat-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.summary-stat-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.summary-stat-value--lg { font-size: 1.25rem; }
.summary-stat-value.positive { color: var(--success); }
.summary-stat-value.negative { color: var(--error); }

.summary-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.summary-row-label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-width: 0;
}
.summary-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.summary-row-icon [data-lucide] { width: 0.7rem; height: 0.7rem; }
.summary-row-icon.in  { background: var(--success-bg); color: var(--success); }
.summary-row-icon.out { background: var(--warning-bg); color: var(--warning); }
.summary-row-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}
.summary-row-value.positive { color: var(--success); }
.summary-row-value.negative { color: var(--error); }

/* Transaction detail rows (shares card) */
.summary-tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  background: var(--surface-2);
  border-radius: var(--radius);
}
.summary-tx-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.summary-tx-shares {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}
.summary-tx-count {
  font-size: 0.6875rem;
  color: var(--text-faint);
  margin-top: 1px;
}
.summary-tx-avg {
  text-align: right;
  flex-shrink: 0;
}
.summary-tx-avg-label {
  font-size: 0.625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1px;
}
.summary-tx-avg-value {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

/* Performance metrics grid inside summary card */
.summary-perf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  flex: 1;
}
.summary-perf-item {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 0.625rem 0.75rem;
}
.summary-perf-label {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.summary-perf-item--accent {
  background: var(--primary-soft);
}
.summary-perf-item--accent .summary-perf-label { color: var(--primary); }
.summary-perf-item--accent .summary-perf-value { font-size: 1.125rem; }
.summary-perf-value {
  font-family: var(--mono);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
}
.summary-perf-value.positive { color: var(--success); }
.summary-perf-value.negative { color: var(--error); }

/* Skeleton */
.sk-summary-card { height: 230px; border-radius: var(--radius-lg); }

/* ============================================================
   SUMMARY & CHART RESPONSIVE
   ============================================================ */
@media (max-width: 1023px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  #sum-card-performance { grid-column: 1 / -1; }
  .summary-perf-grid { grid-template-columns: repeat(3, 1fr); }
  .chart-controls { gap: 0.5rem; }
}

@media (max-width: 767px) {
  .summary-grid { grid-template-columns: 1fr; }
  #sum-card-performance { grid-column: auto; }
  .summary-perf-grid { grid-template-columns: repeat(3, 1fr); }
  .summary-main-value { font-size: 1.375rem; }
  .tx-table-wrap { display: none; }
  .tx-cards      { display: flex; }
  .lang-switch button { padding: 0.25rem 0.5625rem; font-size: 0.6875rem; }
}

/* ============================================================
   KEY FACTS
   ============================================================ */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

/* Top grid: Strategy 4 / General Performance 4 / Highlights 2 */
#facts-grid-top {
  grid-template-columns: 4fr 4fr 2fr;
}

.facts-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow), inset 0 2px 0 var(--primary-soft);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.facts-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), inset 0 2px 0 oklch(from var(--primary) l c h / 0.35);
}

.facts-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.facts-card-title [data-lucide] {
  width: 1.625rem;
  height: 1.625rem;
  padding: 0.3125rem;
  background: var(--primary-soft);
  border-radius: calc(var(--radius) - 1px);
  box-sizing: border-box;
  flex-shrink: 0;
  stroke-width: 1.75;
}

.facts-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4375rem 0.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  border-radius: calc(var(--radius) - 2px);
  margin-inline: -0.5rem;
  transition: background var(--transition);
}
.facts-row:last-child { border-bottom: 0; }
.facts-row:hover { background: var(--surface-2); }

.facts-label  { font-size: 0.8125rem; color: var(--text-muted); flex-shrink: 0; }
.facts-value  {
  font-size: 0.875rem; font-weight: 500; color: var(--text);
  text-align: right;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.facts-value.highlight {
  color: var(--primary);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.facts-value.positive  { color: var(--success); }
.facts-value.negative  { color: var(--error); }
.facts-value.neutral   { font-family: var(--font); font-variant-numeric: normal; }

/* ============================================================
   FEE TABLE
   ============================================================ */
.fee-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; margin-top: 0.25rem; }
.fee-table thead th {
  font-size: 0.6875rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.5rem 0.875rem; text-align: left;
  border-bottom: 2px solid var(--border);
  background: var(--surface-2);
}
.fee-table tbody td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top; line-height: 1.4;
}
.fee-table tbody tr:last-child td { border-bottom: 0; }
.fee-table tbody tr:hover td { background: var(--surface-2); }
.fee-table .fee-cat {
  font-weight: 600; color: var(--primary);
  font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em;
  background: var(--primary-soft) !important;
  padding-top: 0.5rem; padding-bottom: 0.5rem;
}
.fee-amount {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  color: var(--text); font-weight: 600; white-space: nowrap;
}

/* ============================================================
   PERFORMANCE HIGHLIGHTS
   ============================================================ */
.perf-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  margin-top: 0.25rem;
}
.perf-stat {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  text-align: center;
}
.perf-stat-label {
  font-size: 0.6875rem; font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}
.perf-stat-value { font-family: var(--mono); font-size: 1.25rem; font-weight: 500; }
.perf-stat-value.positive { color: var(--success); }

@media (max-width: 1199px) {
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .facts-grid > .facts-card:last-child { grid-column: 1 / -1; }
  .facts-grid > .facts-card:last-child .summary-perf-grid { grid-template-columns: repeat(3, 1fr); }
  /* Top grid collapses to 2 equal cols at this breakpoint */
  #facts-grid-top { grid-template-columns: 1fr 1fr; }
  #facts-grid-top > .facts-card:last-child { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .facts-grid { grid-template-columns: 1fr; }
  .facts-grid > .facts-card:last-child { grid-column: auto; }
  #facts-grid-top { grid-template-columns: 1fr; }
  #facts-grid-top > .facts-card:last-child { grid-column: auto; }
  .perf-stats { grid-template-columns: 1fr !important; }
}

/* ============================================================
   DOCUMENT FOLDERS
   ============================================================ */
.doc-folders {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Section divider (Personal / Fund) */
.doc-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.doc-section:last-child { margin-bottom: 0; }

.doc-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  margin-bottom: 0.25rem;
}
.doc-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--surface-2);
  border-radius: var(--radius);
  color: var(--primary);
  flex-shrink: 0;
}
.doc-section-icon svg { width: 1.25rem; height: 1.25rem; }
.doc-section-title {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.doc-folder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}
.doc-folder:hover {
  border-color: var(--border-strong);
}

.doc-folder-header {
  width: 100%;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background var(--transition);
  user-select: none;
  -webkit-user-select: none;
}
.doc-folder-header:hover {
  background: var(--surface-2);
}
.doc-folder-header:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.doc-folder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}
.doc-folder-icon svg { width: 1.25rem; height: 1.25rem; }

.doc-folder-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-folder-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.1875rem 0.625rem;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.doc-folder-chevron {
  color: var(--text-faint);
  flex-shrink: 0;
  transition: transform var(--transition);
}
.doc-folder-chevron svg { width: 1rem; height: 1rem; display: block; }
.doc-folder.open .doc-folder-chevron { transform: rotate(180deg); }

/* Upload button inside the folder header row */
.doc-folder-upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  height: auto;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}
.doc-folder-upload-btn:hover {
  background: var(--primary);
  color: #fff;
}
.doc-folder-upload-btn svg { width: 0.875rem; height: 0.875rem; flex-shrink: 0; }

/* Empty folder hint text */
.doc-folder-empty {
  font-size: 0.8125rem;
  color: var(--text-faint);
  padding: 0.25rem 0;
  margin: 0;
}

.doc-folder-body {
  border-top: 1px solid var(--border);
  padding: 1rem 1.125rem;
}

.doc-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

/* Cards inside a folder: lighter shadow, no outer border (folder provides it) */
.doc-folder-body .doc-card {
  box-shadow: none;
  background: var(--surface-2);
}
.doc-folder-body .doc-card:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}

/* Folder header skeleton */
.sk-folder-header {
  height: 56px;
  border-radius: var(--radius-lg);
  margin-bottom: 0.5rem;
}

@media (max-width: 767px) {
  .doc-folder-header { padding: 0.75rem 0.875rem; font-size: 0.875rem; }
  .doc-folder-body   { padding: 0.75rem 0.875rem; }
  .doc-grid-inner    { grid-template-columns: 1fr; }
}

/* ============================================================
   RETURNS HEATMAP
   ============================================================ */
.returns-heatmap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.25rem;
}
.returns-heatmap table {
  border-collapse: separate;
  border-spacing: 2px;
  width: 100%;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.returns-heatmap th,
.returns-heatmap td {
  padding: 0.3rem 0.45rem;
  text-align: center;
  white-space: nowrap;
}
.returns-heatmap td { border-radius: 3px; }
.returns-heatmap .hm-th-year {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.6875rem;
  padding-right: 0.75rem;
  background: transparent;
  border-radius: 0;
}
.returns-heatmap .hm-th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.6875rem;
  background: transparent;
}
.returns-heatmap .hm-ytd-head {
  color: var(--text);
  border-left: 1px solid var(--border);
  padding-left: 0.6rem;
}
.returns-heatmap .hm-ytd {
  font-weight: 700;
  border-radius: 3px;
  border-left: 1px solid var(--border);
}
.returns-heatmap .hm-empty {
  color: var(--text-faint, var(--text-muted));
  opacity: 0.4;
  background: transparent !important;
}

/* ============================================================
   CHART PRIMARY HTML TOOLTIP
   ============================================================ */
.chart-primary-tip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 10px 12px;
  min-width: 150px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.cpt-title {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.03em;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}
.cpt-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cpt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
}
.cpt-label { color: var(--text-muted); }
.cpt-value  { font-weight: 600; color: var(--text); }

/* ============================================================
   CHART TRANSACTION SIDE TOOLTIP
   ============================================================ */
.chart-tx-tip {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 10px 12px;
  min-width: 150px;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.ctx-entry + .ctx-entry {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.ctx-title {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}
.ctx-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  margin-bottom: 2px;
}
.ctx-row span:first-child { color: var(--text-muted); }
.ctx-row span:last-child  { color: var(--text); font-weight: 500; }
.ctx-date {
  font-family: var(--font);
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}


/* ============================================================
   UPLOAD MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: oklch(0 0 0 / 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  animation: fade-in 150ms var(--ease);
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: calc(100dvh - 3rem);
  display: flex;
  flex-direction: column;
  animation: modal-in 200ms var(--ease);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-body .form-field { margin-bottom: 1rem; }
.modal-body .form-field:last-child { margin-bottom: 0; }
.modal-body select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23797876' stroke-width='1.5'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
}
.upload-zone input[type="file"] { display: none; }
.upload-zone-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.upload-zone-label [data-lucide] { width: 1.5rem; height: 1.5rem; color: var(--text-faint); }
.upload-zone-filename {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 500;
}

@media (max-width: 600px) {
  .modal-card { max-width: 100%; }
}

