/**
 * Personal OS — Bootstrap 5.3 override + components layer
 * ─────────────────────────────────────────────────────────
 * This file simulates what the production Sass build would emit:
 *   1.  Token CSS custom properties (mirrors Bootstrap's --bs-* vars where they exist)
 *   2.  Overrides of Bootstrap defaults that conflict with the design brief
 *   3.  Custom components Bootstrap has no equivalent for
 *
 * In production:  scss/main.scss → tokens → overrides → bootstrap → components.
 * In this prototype we load Bootstrap's compiled CSS first, then this file,
 * with selectors specific enough to win.
 */

/* ───────────────────────────────────────────────
   1.  TOKENS — dark mode (default)
   ─────────────────────────────────────────────── */
:root,
[data-bs-theme="dark"] {
  /* Surfaces */
  --bg-canvas:    #0E0F12;
  --bg-surface:   #16181D;
  --bg-surface-2: #1D2027;
  --bg-surface-3: #262A33;

  /* Borders */
  --border-subtle:  #23262E;
  --border-default: #2E323C;

  /* Text */
  --text-primary:   #F1F0E1;
  --text-secondary: #A8ABB4;
  --text-tertiary:  #6B6F78;
  --text-disabled:  #454853;

  /* Accents */
  --accent-slate: #506385;
  --accent-amber: #C8923A;

  /* Status */
  --status-success: #6FA388;
  --status-warning: #D6A24E;
  --status-danger:  #C9614F;
  --status-info:    #7A93C2;

  /* Pillars */
  --pillar-health: #6FA388;
  --pillar-wealth: #C8923A;
  --pillar-wisdom: #506385;
  --pillar-love:   #B07A8A;
  --pillar-life:   #A87C5C;

  /* Type */
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-sans:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Archivo", var(--font-sans);

  /* Bootstrap overrides via custom props */
  --bs-body-bg:           var(--bg-canvas);
  --bs-body-color:        var(--text-primary);
  --bs-body-font-family:  var(--font-sans);
  --bs-body-font-size:    0.875rem;
  --bs-body-line-height:  1.5;

  --bs-primary:           var(--accent-slate);
  --bs-primary-rgb:       80, 99, 133;
  --bs-success:           var(--status-success);
  --bs-warning:           var(--status-warning);
  --bs-danger:            var(--status-danger);
  --bs-info:              var(--status-info);

  --bs-border-color:        var(--border-subtle);
  --bs-border-radius:       0.75rem;
  --bs-border-radius-sm:    0.375rem;
  --bs-border-radius-lg:    1rem;
  --bs-border-radius-pill:  999px;

  --bs-link-color:          var(--accent-slate);
  --bs-link-hover-color:    #6c80a4;

  --bs-focus-ring-width:    2px;
  --bs-focus-ring-opacity:  0.6;
  --bs-focus-ring-color:    rgba(80, 99, 133, 0.6);

  --bs-emphasis-color:      var(--text-primary);
  --bs-secondary-color:     var(--text-secondary);
  --bs-tertiary-color:      var(--text-tertiary);
  --bs-secondary-bg:        var(--bg-surface-2);
  --bs-tertiary-bg:         var(--bg-surface-3);
}

/* ───────────────────────────────────────────────
   2.  TOKENS — light mode (parallel)
   ─────────────────────────────────────────────── */
[data-bs-theme="light"] {
  --bg-canvas:    #F4F3EC;
  --bg-surface:   #FFFFFF;
  --bg-surface-2: #F9F8F1;
  --bg-surface-3: #F0EFE7;

  --border-subtle:  #E6E4D8;
  --border-default: #D0CDBE;

  --text-primary:   #15171C;
  --text-secondary: #4D5159;
  --text-tertiary:  #7A7E87;
  --text-disabled:  #B0B3BA;

  --accent-slate: #3F5275;
  --accent-amber: #A8782A;

  --bs-body-bg:        var(--bg-canvas);
  --bs-body-color:     var(--text-primary);
  --bs-primary:        var(--accent-slate);
  --bs-primary-rgb:    63, 82, 117;
  --bs-secondary-bg:   var(--bg-surface-2);
  --bs-tertiary-bg:    var(--bg-surface-3);
  --bs-emphasis-color: var(--text-primary);
}

/* ───────────────────────────────────────────────
   3.  RESET + BODY
   ─────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-disabled); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}

/* ───────────────────────────────────────────────
   4.  CARD OVERRIDES
   ─────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--bs-border-radius);
  box-shadow: none !important;          /* §5.5: never drop shadows on cards */
  transition: background 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card-body { padding: 1.5rem; }                           /* 24px */
.card .card-body.p-compact { padding: 1rem; }             /* 16px */
.card .card-body.p-hero    { padding: 2rem; }             /* 32px */

/* Hero / focus card — surface-2 plus accent left rail */
.card-focus {
  background: var(--bg-surface-2);
  border-radius: var(--bs-border-radius-lg);
  border-left: 3px solid var(--accent-slate);
}
.card-focus.card-focus-amber { border-left-color: var(--accent-amber); }

/* ───────────────────────────────────────────────
   5.  BUTTON OVERRIDES
   ─────────────────────────────────────────────── */
.btn {
  --bs-btn-padding-y: 0.625rem;
  --bs-btn-padding-x: 1rem;
  --bs-btn-font-weight: 500;
  --bs-btn-border-radius: var(--bs-border-radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  letter-spacing: 0;
  background-image: none !important;     /* §1: no gradients-as-décor */
  box-shadow: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn:focus-visible {
  outline: 2px solid rgba(80, 99, 133, 0.6);
  outline-offset: 2px;
  box-shadow: none !important;
}
.btn-sm { --bs-btn-padding-y: 0.375rem; --bs-btn-padding-x: 0.75rem; font-size: 0.8125rem; }
.btn-lg { --bs-btn-padding-y: 0.75rem;  --bs-btn-padding-x: 1.25rem; font-size: 1rem; }

.btn-primary {
  --bs-btn-bg: var(--accent-slate);
  --bs-btn-border-color: var(--accent-slate);
  --bs-btn-hover-bg: #5d7297;
  --bs-btn-hover-border-color: #5d7297;
  --bs-btn-active-bg: #455674;
  --bs-btn-active-border-color: #455674;
  --bs-btn-color: var(--text-primary);
  --bs-btn-hover-color: var(--text-primary);
  --bs-btn-active-color: var(--text-primary);
}

.btn-outline-secondary {
  --bs-btn-color: var(--text-primary);
  --bs-btn-border-color: var(--border-default);
  --bs-btn-hover-bg: var(--bg-surface-2);
  --bs-btn-hover-border-color: var(--border-default);
  --bs-btn-hover-color: var(--text-primary);
  --bs-btn-active-bg: var(--bg-surface-2);
  --bs-btn-active-color: var(--text-primary);
}

.btn-link, .btn-ghost {
  --bs-btn-color: var(--text-secondary);
  --bs-btn-hover-color: var(--text-primary);
  --bs-btn-hover-bg: var(--bg-surface-2);
  --bs-btn-border-color: transparent;
  text-decoration: none;
}

.btn-destructive {
  --bs-btn-color: var(--status-danger);
  --bs-btn-bg: transparent;
  --bs-btn-border-color: var(--status-danger);
  --bs-btn-hover-bg: rgba(201, 97, 79, 0.18);
  --bs-btn-hover-color: var(--status-danger);
  --bs-btn-hover-border-color: var(--status-danger);
}

/* ───────────────────────────────────────────────
   6.  INPUT / FORM OVERRIDES
   ─────────────────────────────────────────────── */
.form-control, .form-select {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-default);
  border-radius: var(--bs-border-radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  transition: border-color 160ms, box-shadow 160ms;
}
.form-control::placeholder { color: var(--text-tertiary); }
.form-control:focus, .form-select:focus {
  background: var(--bg-surface-2);
  border-color: var(--accent-slate);
  box-shadow: 0 0 0 2px rgba(80, 99, 133, 0.6);
  color: var(--text-primary);
}
.form-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}
.form-text { color: var(--text-tertiary); font-size: 0.8125rem; }

/* ───────────────────────────────────────────────
   7.  TABLE OVERRIDES
   ─────────────────────────────────────────────── */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-secondary);
  --bs-table-border-color: var(--border-subtle);
  --bs-table-hover-bg: var(--bg-surface-2);
  --bs-table-hover-color: var(--text-primary);
  margin-bottom: 0;
}
.table > :not(caption) > * > * {
  padding: 0 1rem;
  background: transparent;
  vertical-align: middle;
}
.table thead th {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-default);
  padding-bottom: 0.75rem;
}
.table tbody td {
  height: 3rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table .num,
.table th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table .col-primary { color: var(--text-primary); font-weight: 500; }

/* ───────────────────────────────────────────────
   8.  MODAL OVERRIDES
   ─────────────────────────────────────────────── */
.modal-content {
  background: var(--bg-surface-3);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--bs-border-radius-lg);
}
.modal-backdrop {
  --bs-backdrop-bg: rgba(0, 0, 0, 0.55);
  --bs-backdrop-opacity: 1;
}
.modal-backdrop.show { backdrop-filter: blur(8px); }       /* §5.5 */

/* ───────────────────────────────────────────────
   9.  TYPE UTILITIES
   ─────────────────────────────────────────────── */
.display-xl,
.display-lg,
.display-md {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}
.display-xl { font-size: 3.75rem; line-height: 1.05; letter-spacing: -0.02em; }
.display-lg { font-size: 2.5rem;  line-height: 1.1;  letter-spacing: -0.01em; }
.display-md { font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.01em; }

.heading-lg { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin: 0; }
.heading-md { font-family: var(--font-display); font-size: 1rem;    font-weight: 600; line-height: 1.4; margin: 0; }

.label-md, .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0;
}
.label-sm {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0;
}

.body-md { font-family: var(--font-sans); font-size: 0.875rem; line-height: 1.5; }
.body-sm { font-family: var(--font-sans); font-size: 0.8125rem; line-height: 1.5; color: var(--text-secondary); }

.num,
.kpi-num,
.tnum { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.kpi-num {
  font-size: 2.5rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.text-secondary { color: var(--text-secondary) !important; }
.text-tertiary  { color: var(--text-tertiary)  !important; }
.text-disabled  { color: var(--text-disabled)  !important; }

.text-success { color: var(--status-success) !important; }
.text-warning { color: var(--status-warning) !important; }
.text-danger  { color: var(--status-danger)  !important; }
.text-info    { color: var(--status-info)    !important; }

/* ───────────────────────────────────────────────
   10. PILLS  — replaces .badge for status
   ─────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  height: 1.5rem;
  padding: 0 0.625rem;
  border-radius: var(--bs-border-radius-pill);
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill-success { color: var(--status-success); background: rgba(111, 163, 136, 0.18); }
.pill-warning { color: var(--status-warning); background: rgba(214, 162,  78, 0.18); }
.pill-danger  { color: var(--status-danger);  background: rgba(201,  97,  79, 0.18); }
.pill-info    { color: var(--status-info);    background: rgba(122, 147, 194, 0.18); }
.pill .pill-dot {
  width: 6px; height: 6px; border-radius: 999px; background: currentColor;
  flex-shrink: 0;
}

/* ───────────────────────────────────────────────
   11. PILLAR ACCENT BARS / TAGS
   ─────────────────────────────────────────────── */
.pillar-health { --pillar: var(--pillar-health); }
.pillar-wealth { --pillar: var(--pillar-wealth); }
.pillar-wisdom { --pillar: var(--pillar-wisdom); }
.pillar-love   { --pillar: var(--pillar-love); }
.pillar-life   { --pillar: var(--pillar-life); }

.pillar-bar     { border-left: 3px solid var(--pillar); }
.pillar-bar-top { border-top:  3px solid var(--pillar); }

.pillar-tag {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pillar);
}
.pillar-row {
  display: flex;
  align-items: stretch;
  background: var(--bg-surface-2);
  border-radius: var(--bs-border-radius-sm);
  overflow: hidden;
  min-height: 2.5rem;
}
.pillar-row .pillar-row-bar { width: 3px; background: var(--pillar); flex-shrink: 0; }
.pillar-row .pillar-row-body { flex: 1; padding: 0.5rem 1rem; display: flex; align-items: center; gap: 0.75rem; }

/* ───────────────────────────────────────────────
   12. APP FRAME — sidebar + topbar
   ─────────────────────────────────────────────── */
.app-frame {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.sidebar-brand .brand-mark {
  width: 1.75rem; height: 1.75rem; border-radius: 0.5rem;
  background: var(--accent-slate); display: grid; place-items: center;
  color: var(--text-primary); font-family: var(--font-display); font-weight: 700; font-size: 0.875rem;
}
.sidebar-brand .brand-name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}
.sidebar-brand .brand-name small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-top: 2px;
}

.nav-group { padding: 0.5rem 0.75rem; }
.nav-group-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 0.75rem 0.75rem 0.5rem;
  margin: 0;
}
.nav-item-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: var(--bs-border-radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  position: relative;
  border-left: 3px solid transparent;
  margin-left: -3px;                                  /* keep alignment when active */
  transition: background 160ms, color 160ms;
}
.nav-item-link svg { width: 18px; height: 18px; stroke-width: 1.5; flex-shrink: 0; }
.nav-item-link:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.nav-item-link.active {
  color: var(--text-primary);
  background: rgba(80, 99, 133, 0.08);
  border-left-color: var(--accent-slate);
}
.nav-item-link.active svg { color: var(--accent-slate); }
.nav-item-link.is-pillar.active { border-left-color: var(--pillar, var(--accent-slate)); }
.nav-item-link.is-pillar svg    { color: var(--pillar, var(--text-tertiary)); }

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  height: 3.5rem;                                     /* 56px */
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  flex-shrink: 0;
  background: var(--bg-canvas);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .search {
  flex: 1; max-width: 28rem;
  position: relative;
}
.topbar .search svg {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-tertiary); stroke-width: 1.5;
}
.topbar .search .form-control { padding-left: 2.25rem; height: 2.25rem; }
.topbar .topbar-meta {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text-tertiary); letter-spacing: 0.04em;
}
.topbar .icon-btn {
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
  border-radius: var(--bs-border-radius-sm);
  background: transparent; border: 1px solid transparent;
  color: var(--text-secondary); cursor: pointer;
}
.topbar .icon-btn:hover { background: var(--bg-surface-2); color: var(--text-primary); }
.topbar .icon-btn svg { width: 18px; height: 18px; stroke-width: 1.5; }

.app-content {
  flex: 1; padding: 1.5rem;
  max-width: 1440px; width: 100%; margin: 0 auto;
}

.page-header { margin-bottom: 1.5rem; }
.page-header .heading { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; color: var(--text-primary); margin: 0 0 0.25rem; }
.page-header .meta    { font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); margin: 0; }

/* ───────────────────────────────────────────────
   13. CHART / SPARKLINE basics
   ─────────────────────────────────────────────── */
.spark { display: block; width: 100%; height: 32px; }
.chart svg { display: block; width: 100%; height: 100%; }
.chart-axis { color: var(--text-tertiary); font-family: var(--font-mono); font-size: 10px; }

.legend { display: flex; gap: 1rem; margin-top: 0.75rem; flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 0.375rem; font-family: var(--font-mono); font-size: 0.6875rem; color: var(--text-tertiary); letter-spacing: 0.04em; text-transform: uppercase; }
.legend-swatch { width: 10px; height: 2px; border-radius: 1px; }
.legend-swatch.dashed { background-image: linear-gradient(90deg, currentColor 60%, transparent 60%); background-size: 4px 2px; height: 2px; }

/* ───────────────────────────────────────────────
   14. PROGRESS BAR (lightweight)
   ─────────────────────────────────────────────── */
.bar-track {
  height: 4px; background: var(--bg-surface-3); border-radius: 2px; overflow: hidden;
}
.bar-fill { height: 100%; border-radius: 2px; background: var(--accent-slate); }

/* ───────────────────────────────────────────────
   15. TIME BLOCKS
   ─────────────────────────────────────────────── */
.block-row {
  display: grid; grid-template-columns: 64px 1fr; gap: 0.75rem; align-items: stretch;
  margin-bottom: 0.5rem;
}
.block-row .time {
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-tertiary);
  padding-top: 0.625rem;
}
.time-block {
  background: var(--bg-surface-2);
  border-radius: var(--bs-border-radius-sm);
  border-left: 3px solid var(--pillar, var(--accent-slate));
  padding: 0.625rem 0.875rem;
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.time-block .name { font-size: 0.875rem; color: var(--text-primary); }
.time-block .label-tag {
  font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--pillar, var(--text-tertiary));
}
.time-block.one-task {
  background: rgba(200, 146, 58, 0.08);
  border: 1px solid var(--accent-amber);
  border-left: 3px solid var(--accent-amber);
}
.time-block.one-task .label-tag { color: var(--accent-amber); }

/* ───────────────────────────────────────────────
   16. WEEK ROCKS GRID
   ─────────────────────────────────────────────── */
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.5rem; }
.week-cell {
  background: var(--bg-surface-2);
  border-radius: var(--bs-border-radius-sm);
  padding: 0.75rem;
  min-height: 7rem;
  border-top: 2px solid transparent;
  min-width: 0;
  overflow: hidden;
}
.week-cell.is-today { border-top-color: var(--accent-slate); }
.week-cell .day-label {
  font-family: var(--font-mono); font-size: 0.6875rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-tertiary); margin: 0 0 0.5rem;
  white-space: nowrap;
}
.week-cell.is-today .day-label { color: var(--accent-slate); }
.week-cell .rock {
  background: var(--bg-surface-3);
  border-radius: 4px;
  padding: 0.375rem 0.5rem;
  margin-bottom: 0.3125rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-primary);
  border-left: 2px solid var(--accent-amber);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.week-cell .empty { font-size: 0.75rem; color: var(--text-disabled); }

/* ───────────────────────────────────────────────
   17. CALENDAR
   ─────────────────────────────────────────────── */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow {
  font-family: var(--font-mono); font-size: 0.625rem; color: var(--text-tertiary);
  text-align: center; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 0;
}
.cal-day {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  position: relative;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text-secondary);
  border-radius: 999px;
}
.cal-day.is-other { color: var(--text-disabled); }
.cal-day.is-today {
  background: var(--accent-slate); color: var(--text-primary);
}
.cal-day.has-event::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 999px; background: var(--accent-amber);
}

/* ───────────────────────────────────────────────
   18. CHECKLIST INBOX
   ─────────────────────────────────────────────── */
.checklist .item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.checklist .item:last-child { border-bottom: 0; }
.checklist .check {
  width: 16px; height: 16px;
  border: 1px solid var(--border-default); border-radius: 4px;
  flex-shrink: 0; cursor: pointer; background: transparent;
}
.checklist .item .text { font-size: 0.8125rem; color: var(--text-secondary); }

/* ───────────────────────────────────────────────
   19. WISHLIST ROW
   ─────────────────────────────────────────────── */
.wishlist .item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}
.wishlist .item:last-child { border-bottom: 0; }
.wishlist .item .marker { width: 3px; height: 1.25rem; background: var(--pillar); border-radius: 1px; flex-shrink: 0; }
.wishlist .item .text { flex: 1; font-size: 0.8125rem; color: var(--text-primary); }
.wishlist .item.is-done .text { text-decoration: line-through; color: var(--text-disabled); }
.wishlist .item .tag { font-family: var(--font-mono); font-size: 0.625rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pillar); }

/* ───────────────────────────────────────────────
   20. KPI CARD HELPERS
   ─────────────────────────────────────────────── */
.kpi-card .kpi-eyebrow { margin-bottom: 0.75rem; }
.kpi-card .kpi-delta {
  margin-top: 0.5rem; font-family: var(--font-mono);
  font-size: 0.75rem; color: var(--text-tertiary);
}
.delta-up   { color: var(--status-success); }
.delta-down { color: var(--status-danger); }

/* ───────────────────────────────────────────────
   21. MISC
   ─────────────────────────────────────────────── */
hr { border-color: var(--border-subtle); opacity: 1; }
a { color: var(--accent-slate); }
a:hover { color: #6c80a4; }

.divider { height: 1px; background: var(--border-subtle); margin: 0.75rem 0; }

/* Spacing utilities — 4px scale (selected) */
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }
.p-6  { padding: 1.5rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mt-6 { margin-top: 1.5rem !important; }

/* ───────────────────────────────────────────────
   22. RESPONSIVE
   ─────────────────────────────────────────────── */

/* Sidebar overlay — shown on mobile when sidebar is open */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
  backdrop-filter: blur(4px);
}
.sidebar-overlay.show { display: block; }

/* Hamburger button — hidden on desktop, shown on mobile */
.topbar-hamburger { display: none !important; }

/* Mobile breakpoint (≤ 991 px — phones and tablets including iPad) */
@media (max-width: 991.98px) {

  /* Single-column frame — sidebar no longer occupies a grid column */
  .app-frame {
    grid-template-columns: 1fr;
  }

  /* Sidebar slides in from the left as a fixed overlay */
  .sidebar {
    width: 240px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
    align-self: auto;
  }
  .sidebar.open {
    transform: translateX(0);
  }

  /* Show hamburger; hide date to save topbar space */
  .topbar-hamburger { display: grid !important; }
  .topbar-meta      { display: none; }

  /* Week grid: give each cell a minimum width and let it scroll */
  .week-grid {
    grid-template-columns: repeat(7, minmax(7rem, 1fr));
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }
}
