/* ═══════════════════════════════════════════════════════════════
   HAMRO WORKPLACE — CALENDAR
   ═══════════════════════════════════════════════════════════════ */

/* ── Color tokens ──────────────────────────────────────────────── */
.event-meeting   { --ev-color: #3b82f6; --ev-bg: rgba(59,130,246,.10); }
.event-task      { --ev-color: #8b5cf6; --ev-bg: rgba(139,92,246,.10); }
.event-milestone { --ev-color: #f59e0b; --ev-bg: rgba(245,158,11,.10); }
.event-holiday   { --ev-color: #14b8a6; --ev-bg: rgba(20,184,166,.10); }
.event-leave     { --ev-color: #22c55e; --ev-bg: rgba(34,197,94,.10); }
.risk-high       { --ev-color: #f97316; --ev-bg: rgba(249,115,22,.10); }
.risk-critical   { --ev-color: #ef4444; --ev-bg: rgba(239,68,68,.10); }

/* ── Page shell ────────────────────────────────────────────────── */
.content-area:has(.cal-shell) {
  max-width: none;
  padding: 18px 24px 24px;
}
.cal-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Cal header ────────────────────────────────────────────────── */
.cal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cal-header-left { flex: 1 1 auto; min-width: 0; }
.cal-header-left h1 { font-size: 22px; font-weight: 900; margin: 0; line-height: 1.2; }
.cal-header-left .eyebrow { margin-bottom: 2px; }
.cal-header-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: none; }

.cal-nav-group { display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.cal-nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 7px; border: none;
  background: none; cursor: pointer; color: var(--muted);
  transition: background .1s, color .1s; text-decoration: none;
}
.cal-nav-btn:hover { background: rgba(109,93,252,.08); color: var(--purple); }
.cal-nav-btn:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.cal-today-btn {
  padding: 0 10px; font-size: 11px; font-weight: 700;
  color: var(--ink); width: auto;
}
.cal-view-switch {
  display: flex; gap: 2px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 3px;
}
.cal-view-btn {
  padding: 5px 13px; border-radius: 7px; font-size: 11px; font-weight: 700;
  color: var(--muted); text-decoration: none; transition: all .1s;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.cal-view-btn i { width: 12px; height: 12px; flex: none; }
.cal-view-btn:hover { color: var(--ink); background: rgba(109,93,252,.06); }
.cal-view-btn:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.cal-view-btn.active { background: var(--purple); color: #fff; }

/* ── Filter bar ────────────────────────────────────────────────── */
.cal-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 14px;
}
.cal-filters label { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.cal-filters select,
.cal-filters input[type="date"] {
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 11px; color: var(--ink); background: var(--bg);
  outline: none; cursor: pointer; transition: border-color .1s;
}
.cal-filters select:focus,
.cal-filters input[type="date"]:focus { border-color: var(--purple); }
.cal-filter-sep { width: 1px; height: 18px; background: var(--line); flex: none; }
.cal-filters .btn { min-height: 28px; font-size: 11px; padding: 0 12px; }

/* ── Stats row ─────────────────────────────────────────────────── */
.cal-stats {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.cal-stat {
  flex: 1 1 0; min-width: 90px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px;
}
.cal-stat strong { font-size: 22px; font-weight: 900; line-height: 1; color: var(--ink); }
.cal-stat span { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cal-stat.accent strong { color: var(--purple); }

/* ── Body grid ─────────────────────────────────────────────────── */
.cal-body {
  display: grid;
  grid-template-columns: 220px 1fr 240px;
  gap: 14px;
  align-items: start;
  min-height: 0;
}

/* ── Left sidebar ──────────────────────────────────────────────── */
.cal-sidebar {
  display: flex; flex-direction: column; gap: 12px;
}

/* Mini month ── */
.cal-mini {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; overflow: hidden;
}
.cal-mini-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.cal-mini-header strong { font-size: 12px; font-weight: 800; color: var(--ink); }
.cal-mini-nav {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px; border: none;
  background: none; cursor: pointer; color: var(--muted);
  text-decoration: none; transition: background .1s;
}
.cal-mini-nav:hover { background: rgba(109,93,252,.08); color: var(--purple); }
.cal-mini-nav:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.cal-mini-nav i { width: 11px; height: 11px; }
.cal-mini-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.cal-mini-weekdays span { font-size: 8px; font-weight: 800; color: var(--muted); text-align: center; text-transform: uppercase; }
.cal-mini-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px;
}
.cal-mini-day {
  font-size: 10px; text-align: center; padding: 4px 1px;
  border-radius: 5px; cursor: pointer; color: var(--ink);
  text-decoration: none; transition: background .08s;
  position: relative; line-height: 1;
}
.cal-mini-day:hover { background: rgba(109,93,252,.09); }
.cal-mini-day:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }
.cal-mini-day.is-muted { color: var(--muted); }
.cal-mini-day.is-today {
  background: var(--purple); color: #fff; border-radius: 50%;
  width: 22px; height: 22px; margin: auto;
  display: grid; place-items: center;
}
.cal-mini-day.is-focus { background: rgba(109,93,252,.12); font-weight: 700; }
.cal-mini-day.has-events::after {
  content: ''; display: block; width: 3px; height: 3px;
  border-radius: 50%; background: var(--purple);
  margin: 1px auto 0;
}
.cal-mini-day.is-holiday { color: #14b8a6; }
.cal-mini-day.is-leave::before {
  content: ''; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 3px; border-radius: 50%; background: #22c55e;
}

/* Legend ── */
.cal-legend {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.cal-legend h3 { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.cal-legend-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--ink); margin-bottom: 5px;
}
.cal-legend-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--ev-color, #8b5cf6);
}
.cal-legend-item.event-meeting .cal-legend-dot  { background: #3b82f6; }
.cal-legend-item.event-task .cal-legend-dot      { background: #8b5cf6; }
.cal-legend-item.event-milestone .cal-legend-dot { background: #f59e0b; }
.cal-legend-item.event-holiday .cal-legend-dot   { background: #14b8a6; }
.cal-legend-item.event-leave .cal-legend-dot     { background: #22c55e; }

/* Risk intel ── */
.cal-risk-panel {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.cal-risk-panel h3 { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.cal-risk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cal-risk-chip {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 6px; border-radius: 10px; border: 1px solid var(--line);
  text-align: center;
}
.cal-risk-chip strong { font-size: 18px; font-weight: 900; line-height: 1; }
.cal-risk-chip small { font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.cal-risk-chip.low    { border-color: rgba(34,197,94,.3);  background: rgba(34,197,94,.05);  }
.cal-risk-chip.low    strong { color: #16a34a; }
.cal-risk-chip.medium { border-color: rgba(245,158,11,.3); background: rgba(245,158,11,.05); }
.cal-risk-chip.medium strong { color: #d97706; }
.cal-risk-chip.high   { border-color: rgba(249,115,22,.3); background: rgba(249,115,22,.05); }
.cal-risk-chip.high   strong { color: #ea580c; }
.cal-risk-chip.critical { border-color: rgba(239,68,68,.3); background: rgba(239,68,68,.05); }
.cal-risk-chip.critical strong { color: #dc2626; }

/* ── Main calendar panel ───────────────────────────────────────── */
.cal-main {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; min-width: 0;
}
.cal-main-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--line);
}
.cal-main-header h2 { font-size: 13px; font-weight: 800; margin: 0; }
.cal-main-header p { font-size: 11px; color: var(--muted); margin: 0; }

/* Month grid ── */
.cal-weekday-row {
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.cal-weekday-row span {
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  color: var(--muted); text-align: center; padding: 8px 4px;
  letter-spacing: .05em;
}
.cal-month-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
}
.cal-day {
  min-height: 100px; border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 6px 6px 4px;
  transition: background .1s;
  position: relative;
}
.cal-day:nth-child(7n) { border-right: none; }
.cal-day.is-muted { background: rgba(0,0,0,.012); }
.cal-day.is-muted .cal-day-num { color: var(--muted); opacity: .5; }
.cal-day.is-today .cal-day-num {
  background: var(--purple); color: #fff;
  border-radius: 50%; width: 22px; height: 22px;
  display: grid; place-items: center;
}
.cal-day.is-focus { background: rgba(109,93,252,.025); }
.cal-day.is-holiday { background: rgba(20,184,166,.06); }
.cal-day.is-leave   { background: rgba(34,197,94,.05); }
.cal-day.is-holiday.is-leave { background: linear-gradient(135deg, rgba(20,184,166,.06), rgba(34,197,94,.05)); }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cal-day-num {
  font-size: 11px; font-weight: 800; color: var(--ink);
  width: 22px; height: 22px; display: grid; place-items: center;
  text-decoration: none;
}
.cal-day-num:hover { background: rgba(109,93,252,.08); border-radius: 50%; color: var(--purple); }
.cal-day-count { font-size: 9px; color: var(--muted); font-weight: 700; }
.cal-day-events { display: flex; flex-direction: column; gap: 2px; }
.cal-event-pill {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 5px 2px 4px; border-radius: 4px;
  background: var(--ev-bg, rgba(139,92,246,.10));
  border-left: 2px solid var(--ev-color, #8b5cf6);
  color: var(--ev-color, #8b5cf6);
  font-size: 10px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; text-decoration: none;
  transition: filter .1s;
  max-width: 100%;
}
.cal-event-pill:hover { filter: brightness(.92); }
.cal-event-pill i { width: 9px; height: 9px; flex: none; }
.cal-event-pill .pill-time { font-size: 9px; font-weight: 800; opacity: .75; flex: none; }
.cal-event-pill .pill-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.cal-more-link {
  font-size: 9px; font-weight: 800; color: var(--muted);
  text-decoration: none; padding: 1px 4px;
  border-radius: 4px; transition: color .1s, background .1s;
  display: inline-block; margin-top: 1px;
}
.cal-more-link:hover { color: var(--purple); background: rgba(109,93,252,.07); }

/* ── Week view ─────────────────────────────────────────────────── */
.cal-week-header {
  display: grid;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.cal-week-day-col {
  border-right: 1px solid var(--line);
  padding: 8px 10px;
  text-align: center;
}
.cal-week-day-col:last-child { border-right: none; }
.cal-week-day-col .wk-name { font-size: 9px; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; }
.cal-week-day-col .wk-num {
  font-size: 18px; font-weight: 900; color: var(--ink);
  width: 32px; height: 32px; display: grid; place-items: center; margin: 2px auto 0;
  border-radius: 50%;
}
.cal-week-day-col.is-today .wk-num { background: var(--purple); color: #fff; }
.cal-week-day-col.is-focus { background: rgba(109,93,252,.04); }
.cal-allday-row {
  display: grid; border-bottom: 1px solid var(--line);
}
.cal-allday-cell {
  border-right: 1px solid var(--line); padding: 4px 6px;
  display: flex; flex-direction: column; gap: 2px; min-height: 28px;
}
.cal-allday-cell:last-child { border-right: none; }
.cal-allday-label {
  grid-column: 1; display: flex; align-items: center; justify-content: flex-end;
  padding: 4px 8px; font-size: 9px; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
}
.cal-time-grid { display: flex; overflow-y: auto; max-height: 520px; }
.cal-time-labels { display: flex; flex-direction: column; flex: none; width: 44px; padding-top: 1px; }
.cal-time-label {
  height: 52px; display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 4px 8px 0 0; font-size: 9px; color: var(--muted); font-weight: 700;
  flex: none;
}
.cal-time-cols { display: grid; flex: 1; min-width: 0; }
.cal-time-col-day { display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.cal-time-col-day:last-child { border-right: none; }
.cal-time-slot {
  height: 52px; border-bottom: 1px solid var(--line); flex: none;
  padding: 2px 4px; display: flex; flex-direction: column; gap: 2px;
  position: relative;
}
.cal-time-slot.is-now::before {
  content: ''; position: absolute; left: 0; right: 0;
  height: 2px; background: var(--purple);
  top: var(--now-offset, 0%); z-index: 1;
}

/* ── Day view ──────────────────────────────────────────────────── */
.cal-day-view .cal-time-cols { grid-template-columns: 1fr; }
.cal-day-allday { border-bottom: 1px solid var(--line); padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 4px; }

/* ── Right sidebar (upcoming) ──────────────────────────────────── */
.cal-upcoming {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden;
}
.cal-upcoming-header { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); }
.cal-upcoming-header h3 { font-size: 13px; font-weight: 800; margin: 0 0 2px; color: var(--ink); }
.cal-upcoming-header p { font-size: 11px; color: var(--muted); margin: 0; }
.cal-upcoming-list { display: flex; flex-direction: column; }
.cal-upcoming-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  text-decoration: none; transition: background .08s;
  background: var(--ev-bg, rgba(139,92,246,.07));
}
.cal-upcoming-item:last-child { border-bottom: none; }
.cal-upcoming-item:hover { filter: brightness(.96); }
.cal-upcoming-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ev-color, #8b5cf6); flex: none; margin-top: 5px;
}
.cal-upcoming-body { min-width: 0; flex: 1; }
.cal-upcoming-body strong { font-size: 13px; font-weight: 700; display: block; color: var(--ev-color, #6d5dfc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-upcoming-body small { font-size: 11px; color: var(--ink); opacity: .55; font-weight: 500; }

/* ── Agenda (focus) panel ──────────────────────────────────────── */
.cal-agenda { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cal-agenda-header { padding: 12px 14px 10px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.cal-agenda-header h3 { font-size: 12px; font-weight: 800; margin: 0; }
.cal-agenda-count { font-size: 10px; background: rgba(109,93,252,.1); color: var(--purple); font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.cal-agenda-day { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cal-agenda-day:last-child { border-bottom: none; }
.cal-agenda-day-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-agenda-day-header strong { font-size: 11px; font-weight: 800; color: var(--ink); }
.cal-agenda-day-header span { font-size: 9px; color: var(--muted); }
.cal-agenda-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px; text-decoration: none;
  transition: background .08s; margin-bottom: 2px;
}
.cal-agenda-item:hover { background: rgba(109,93,252,.05); }
.cal-agenda-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ev-bg, rgba(139,92,246,.10));
  color: var(--ev-color, #8b5cf6);
  display: grid; place-items: center; flex: none;
}
.cal-agenda-icon i { width: 13px; height: 13px; }
.cal-agenda-body { flex: 1; min-width: 0; }
.cal-agenda-body strong { font-size: 11px; font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.cal-agenda-body small { font-size: 10px; color: var(--muted); }
.cal-agenda-risk { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: 999px; flex: none; }
.risk-low .cal-agenda-risk     { background: rgba(34,197,94,.1);  color: #16a34a; }
.risk-medium .cal-agenda-risk  { background: rgba(245,158,11,.1); color: #d97706; }
.risk-high .cal-agenda-risk    { background: rgba(249,115,22,.1); color: #ea580c; }
.risk-critical .cal-agenda-risk{ background: rgba(239,68,68,.1);  color: #dc2626; }

/* ── Event popover ─────────────────────────────────────────────── */
.cal-popover {
  position: fixed; z-index: 9000;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; padding: 0;
  box-shadow: 0 16px 40px rgba(15,23,42,.18);
  min-width: 240px; max-width: 300px;
  overflow: hidden;
  animation: calPopIn .12s ease;
}
@keyframes calPopIn { from { opacity:0; transform:scale(.95) translateY(4px); } to { opacity:1; transform:none; } }
.cal-popover-header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}
.cal-popover-title { font-size: 12px; font-weight: 800; color: var(--ink); line-height: 1.4; flex: 1; min-width: 0; }
.cal-popover-close {
  width: 20px; height: 20px; border-radius: 5px; border: none;
  background: none; cursor: pointer; color: var(--muted); flex: none;
  display: grid; place-items: center; transition: background .1s;
}
.cal-popover-close:hover { background: rgba(109,93,252,.08); color: var(--purple); }
.cal-popover-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.cal-popover-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.cal-popover-row i { width: 12px; height: 12px; flex: none; }
.cal-popover-row strong { color: var(--ink); }
.cal-popover-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px; font-size: 9px; font-weight: 800;
  background: var(--ev-bg, rgba(139,92,246,.1));
  color: var(--ev-color, #8b5cf6);
}
.cal-popover-badge i { width: 10px; height: 10px; }
.cal-popover-footer { padding: 10px 14px; border-top: 1px solid var(--line); }
.cal-popover-footer .btn { width: 100%; justify-content: center; min-height: 30px; font-size: 11px; }

/* ── Empty state ───────────────────────────────────────────────── */
.cal-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 40px 20px; text-align: center; color: var(--muted);
}
.cal-empty i { width: 40px; height: 40px; opacity: .3; }
.cal-empty p { font-size: 12px; margin: 0; max-width: 200px; line-height: 1.6; }

/* ── Dark mode ─────────────────────────────────────────────────── */
html[data-theme-mode="dark"] .cal-day.is-muted     { background: rgba(255,255,255,.012); }
html[data-theme-mode="dark"] .cal-day.is-holiday   { background: rgba(20,184,166,.08); }
html[data-theme-mode="dark"] .cal-day.is-leave     { background: rgba(34,197,94,.07); }
html[data-theme-mode="dark"] .cal-day.is-focus     { background: rgba(109,93,252,.06); }
html[data-theme-mode="dark"] .cal-week-day-col.is-focus { background: rgba(109,93,252,.08); }
html[data-theme-mode="dark"] .cal-main             { background: #111827; border-color: #263145; }
html[data-theme-mode="dark"] .cal-sidebar > *      { background: #111827; border-color: #263145; }
html[data-theme-mode="dark"] .cal-upcoming         { background: #111827; border-color: #263145; }
html[data-theme-mode="dark"] .cal-upcoming-item:hover { background: rgba(255,255,255,.04); }
html[data-theme-mode="dark"] .cal-agenda           { background: #111827; border-color: #263145; }
html[data-theme-mode="dark"] .cal-popover          { background: #1e293b; border-color: #334155; box-shadow: 0 16px 40px rgba(0,0,0,.4); }
html[data-theme-mode="dark"] .cal-filters          { background: #111827; border-color: #263145; }
html[data-theme-mode="dark"] .cal-filters select,
html[data-theme-mode="dark"] .cal-filters input[type="date"] { background: #0f172a; border-color: #263145; color: #e5e7eb; }
html[data-theme-mode="dark"] .cal-stat             { background: #111827; border-color: #263145; }
html[data-theme-mode="dark"] .cal-nav-group        { background: #111827; border-color: #263145; }
html[data-theme-mode="dark"] .cal-view-switch      { background: #111827; border-color: #263145; }
html[data-theme-mode="dark"] .cal-weekday-row      { background: #0f172a; border-color: #1e293b; }
html[data-theme-mode="dark"] .cal-time-slot        { border-color: #1e293b; }
html[data-theme-mode="dark"] .cal-time-label       { color: #4b5563; }
html[data-theme-mode="dark"] .cal-day              { border-color: #1e293b; }
html[data-theme-mode="dark"] .cal-upcoming-item    { border-color: #1e293b; }
html[data-theme-mode="dark"] .cal-upcoming-body strong { color: var(--ev-color, var(--purple)); }
html[data-theme-mode="dark"] .cal-upcoming-body small  { color: #94a3b8; opacity: 1; }
html[data-theme-mode="dark"] .cal-agenda-day       { border-color: #1e293b; }

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cal-body { grid-template-columns: 200px 1fr 200px; gap: 10px; }
}
@media (max-width: 900px) {
  .cal-body { grid-template-columns: 1fr; }
  .cal-sidebar { display: none; }
  .cal-right-col { display: none; }
}
@media (max-width: 640px) {
  .cal-header { flex-direction: column; align-items: flex-start; }
  .cal-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .cal-day { min-height: 60px; }
  .cal-event-pill .pill-time { display: none; }
}
