/* ============================================================
   SPATIAL VIEW
   Three-column household finance snapshot.
   Uses the app's existing .card, table th/td, and colour
   token system. Only calendar-specific styles live here.
   ============================================================ */

/* ── Glass table rows — matches app's components/tables.css tbody tr ── */

.sp-tr {
  background: rgba(255,255,255,0.025);
  border-radius: 8px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.sp-tr:hover {
  background: rgba(255,255,255,0.042);
  transform: translateY(-1px);
}

.sp-tr td:first-child { border-radius: 8px 0 0 8px; }
.sp-tr td:last-child  { border-radius: 0 8px 8px 0; }

[data-theme="light"] .sp-tr {
  background: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.50);
}

[data-theme="light"] .sp-tr:hover {
  background: rgba(255,255,255,0.65);
}

/* ── Layout ──────────────────────────────────────────────────── */

.sp-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.sp-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Calendar ────────────────────────────────────────────────── */

.sp-cal-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 4px;
}

.sp-cal-dh {
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: 3px;
}

.sp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.sp-cal-cell {
  min-height: 52px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 5px 3px 4px;
  transition: background 0.15s ease;
}

.sp-cal-empty {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}

/* Past days — number visible but clearly dimmed */
.sp-cal-past .sp-cal-num {
  color: rgba(168,168,196,0.22);
}

/* Today — green highlight */
.sp-cal-today {
  background: rgba(52,211,153,0.10);
  border-color: rgba(52,211,153,0.28);
}

.sp-cal-today .sp-cal-num {
  color: var(--accent-green);
  font-weight: 800;
}

/* Day number */
.sp-cal-num {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Pacing signal */
.sp-cal-pacing {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 3px;
}

/* ── Light mode ──────────────────────────────────────────────── */

[data-theme="light"] .sp-cal-cell {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.06);
}

[data-theme="light"] .sp-cal-empty {
  background: transparent;
  border-color: transparent;
}

[data-theme="light"] .sp-cal-past .sp-cal-num {
  color: rgba(28,28,30,0.18);
}

[data-theme="light"] .sp-cal-today {
  background: rgba(5,150,105,0.10);
  border-color: rgba(5,150,105,0.30);
}

[data-theme="light"] .sp-cal-today .sp-cal-num {
  color: var(--accent-green);
}

[data-theme="light"] .sp-cal-num {
  color: rgba(28,28,30,0.55);
}
