/* ============================================================
   Panel-Dashboard · Calendar view · Real Flow AI · Sprint 3
   Vista week view + lista + modales
   Reutiliza tokens de _styles.css
   ============================================================ */

/* ===== CALENDAR HEADER ===== */
.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: 8px;
}

.cal-week-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  min-width: 220px;
}

.cal-nav {
  display: flex;
  gap: 4px;
}

.cal-nav-btn {
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 120ms ease;
}

.cal-nav-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.cal-nav-btn.today { background: var(--orange); border-color: var(--orange); color: white; }
.cal-nav-btn.today:hover { background: var(--orange-bright); }

.cal-spacer { flex: 1; }

.cal-filter {
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  min-width: 180px;
}

.cal-filter:focus { border-color: var(--orange); outline: none; }

.cal-view-toggle {
  display: flex;
  gap: 0;
  border: 0.5px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
}

.cal-view-toggle button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 120ms ease;
}

.cal-view-toggle button.on {
  background: var(--bg-panel);
  color: var(--text);
}

.cal-view-toggle button:hover:not(.on) { color: var(--text); }

.btn-add {
  background: var(--orange);
  color: white;
  border: none;
  padding: 7px 14px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms ease;
}

.btn-add:hover { background: var(--orange-bright); }

/* ===== STATS BAR ===== */
.cal-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .cal-stats { grid-template-columns: repeat(2, 1fr); }
}

.cal-stat {
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}

.cal-stat-num {
  font-size: 24px;
  font-weight: 600;
  font-feature-settings: "tnum";
  line-height: 1.1;
  color: var(--text);
}

.cal-stat-num.g { color: var(--green); }
.cal-stat-num.r { color: var(--coral-bright); }
.cal-stat-num.y { color: var(--amber); }
.cal-stat-num.p { color: var(--purple); }

.cal-stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== WEEK GRID ===== */
.cal-week {
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cal-grid {
  display: grid;
  grid-template-columns: 56px repeat(7, 1fr);
  grid-template-rows: 56px repeat(20, 28px);
  position: relative;
  font-size: 12px;
}

/* Header row */
.cal-grid > .cal-corner {
  background: var(--bg-primary);
  border-bottom: 0.5px solid var(--border);
  border-right: 0.5px solid var(--border);
}

.cal-grid > .cal-day-head {
  background: var(--bg-primary);
  border-bottom: 0.5px solid var(--border);
  border-right: 0.5px solid var(--border);
  padding: 8px 6px;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
}

.cal-grid > .cal-day-head:last-child { border-right: none; }

.cal-grid > .cal-day-head.today {
  background: var(--orange-bg);
  color: var(--orange-bright);
}

.cal-day-name {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.cal-day-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 1px;
}

.cal-day-head.today .cal-day-num { color: var(--orange-bright); }

/* Time column (hour labels) */
.cal-time-cell {
  background: var(--bg-primary);
  color: var(--text-dim);
  font-family: ui-monospace, monospace;
  font-size: 10px;
  padding: 2px 6px 0 0;
  text-align: right;
  border-right: 0.5px solid var(--border);
  border-top: 0.5px dashed var(--border-soft);
}

.cal-time-cell.half {
  border-top: none;
  color: transparent;
}

/* Day cells background */
.cal-cell {
  border-right: 0.5px solid var(--border-soft);
  border-top: 0.5px dashed var(--border-soft);
  background: var(--bg-panel);
  cursor: pointer;
  transition: background 80ms ease;
}

.cal-cell.half { border-top: none; }

.cal-cell:hover { background: var(--bg-subtle); }

.cal-cell.last-col { border-right: none; }

.cal-cell.today { background: rgba(249, 115, 22, 0.04); }
.cal-cell.today:hover { background: rgba(249, 115, 22, 0.10); }

/* Now indicator · solo columna de hoy · debajo de citas */
.cal-now-line {
  position: absolute;
  height: 1px;
  background: var(--coral);
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
}
.cal-now-line::before {
  content: '';
  position: absolute;
  left: 0; top: -3px;
  width: 7px; height: 7px;
  background: var(--coral);
  border-radius: 50%;
}

/* ===== APPOINTMENTS ===== */
.cal-appt {
  margin: 1px 2px;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1.25;
  cursor: pointer;
  overflow: hidden;
  z-index: 2;
  position: relative;
  border-left: 3px solid;
  background: var(--bg-elevated);
  transition: filter 120ms ease, transform 80ms ease;
}

.cal-appt:hover { filter: brightness(1.2); transform: translateX(1px); }

.cal-appt-time {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.cal-appt-title {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-appt-sub {
  color: var(--text-muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-appt.pending   { background: var(--amber-bg); border-left-color: var(--amber); }
.cal-appt.confirmed { background: var(--green-bg); border-left-color: var(--green); }
.cal-appt.completed { background: var(--bg-elevated); border-left-color: var(--text-dim); opacity: 0.7; }
.cal-appt.cancelled { background: var(--coral-bg); border-left-color: var(--coral); text-decoration: line-through; opacity: 0.6; }
.cal-appt.no_show   { background: var(--coral-bg); border-left-color: var(--coral-bright); }

/* Blocked slots */
.cal-blocked {
  background: repeating-linear-gradient(
    45deg,
    var(--bg-deep),
    var(--bg-deep) 6px,
    var(--bg-elevated) 6px,
    var(--bg-elevated) 12px
  );
  margin: 1px 2px;
  padding: 3px 6px;
  border-radius: 4px;
  border-left: 3px solid var(--text-dim);
  font-size: 10px;
  color: var(--text-muted);
  z-index: 1;
  cursor: default;
  overflow: hidden;
}

.cal-blocked-label {
  color: var(--text-dim);
  font-style: italic;
}

/* ===== LIST VIEW ===== */
.cal-list {
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cal-list-day-header {
  background: var(--bg-primary);
  padding: 10px 16px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 0.5px solid var(--border);
}

.cal-list-day-header.today { color: var(--orange-bright); }

.cal-list-row {
  display: grid;
  grid-template-columns: 80px 1fr 200px 140px 100px;
  gap: 16px;
  padding: 12px 16px;
  align-items: center;
  border-bottom: 0.5px solid var(--border-soft);
  cursor: pointer;
  transition: background 120ms ease;
}

.cal-list-row:hover { background: var(--bg-subtle); }
.cal-list-row:last-child { border-bottom: none; }

.cal-list-row.crit { border-left: 3px solid var(--coral); }
.cal-list-row.cancelled { opacity: 0.5; }

.cal-list-time {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.cal-list-customer {
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-list-customer .phone {
  color: var(--text-dim);
  font-size: 12px;
  font-family: ui-monospace, monospace;
  margin-left: 6px;
}

.cal-list-service {
  font-size: 13px;
  color: var(--text-muted);
}

.cal-list-assignee {
  font-size: 13px;
  color: var(--text-muted);
}

.cal-list-status-tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  text-align: center;
}

.cal-list-status-tag.pending   { background: var(--amber-bg); color: var(--amber); }
.cal-list-status-tag.confirmed { background: var(--green-bg); color: var(--green); }
.cal-list-status-tag.completed { background: var(--bg-elevated); color: var(--text-muted); }
.cal-list-status-tag.cancelled { background: var(--coral-bg); color: var(--coral-bright); }
.cal-list-status-tag.no_show   { background: var(--coral-bg); color: var(--coral-bright); }

@media (max-width: 768px) {
  .cal-list-row {
    grid-template-columns: 60px 1fr 100px;
    gap: 8px;
  }
  .cal-list-service, .cal-list-assignee { display: none; }
}

/* ===== MODAL ===== */
.cal-modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6, 14, 26, 0.7);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.cal-modal-backdrop.hidden { display: none; }

.cal-modal {
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.cal-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--border);
}

.cal-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.cal-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  transition: all 120ms ease;
}

.cal-modal-close:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.cal-form-row {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.cal-form-row.dual {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cal-form-row label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.cal-form-row input,
.cal-form-row select,
.cal-form-row textarea {
  background: var(--bg-deep);
  border: 0.5px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 120ms ease;
}

.cal-form-row input:focus,
.cal-form-row select:focus,
.cal-form-row textarea:focus {
  border-color: var(--orange);
}

.cal-form-row textarea { min-height: 60px; resize: vertical; }

.cal-modal-status-strip {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.cal-status-btn {
  background: transparent;
  border: 0.5px solid var(--border);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: all 120ms ease;
}

.cal-status-btn:hover { color: var(--text); }

.cal-status-btn.on.pending   { background: var(--amber-bg); color: var(--amber); border-color: var(--amber); }
.cal-status-btn.on.confirmed { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.cal-status-btn.on.completed { background: var(--bg-elevated); color: var(--text); border-color: var(--text-muted); }
.cal-status-btn.on.cancelled { background: var(--coral-bg); color: var(--coral-bright); border-color: var(--coral); }
.cal-status-btn.on.no_show   { background: var(--coral-bg); color: var(--coral-bright); border-color: var(--coral-bright); }

.cal-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 0.5px solid var(--border);
}

.cal-modal-footer-right {
  display: flex;
  gap: 8px;
}

.btn-secondary {
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  color: var(--text-muted);
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 120ms ease;
}

.btn-secondary:hover { color: var(--text); border-color: var(--border-strong); }

.btn-primary {
  background: var(--orange);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms ease;
}

.btn-primary:hover { background: var(--orange-bright); }

.btn-danger {
  background: transparent;
  color: var(--coral-bright);
  border: 0.5px solid var(--coral);
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: all 120ms ease;
}

.btn-danger:hover { background: var(--coral-bg); }

.cal-modal-info {
  background: var(--bg-deep);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.cal-modal-info strong {
  color: var(--text);
  font-weight: 500;
}

.cal-modal-info .src-bot { color: var(--purple); }
.cal-modal-info .src-manual { color: var(--cyan); }

.cal-modal-error {
  background: var(--coral-bg);
  border: 0.5px solid var(--coral);
  color: var(--coral-bright);
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 13px;
  margin-bottom: 12px;
}

.cal-modal-error.hidden { display: none; }

/* ===== Nav links ===== */
.panel-nav {
  display: flex;
  gap: 8px;
  margin: 12px 16px 0;
}

.panel-nav-link {
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  text-decoration: none;
  transition: all 120ms ease;
}

.panel-nav-link:hover { color: var(--text); }

.panel-nav-link.on {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

/* ===== Empty state for list ===== */
.cal-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-muted);
}

.cal-empty .emoji {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.6;
}

/* ============================================================
   OUT-OF-HOURS BAND · citas que caen fuera del horario laboral
   ============================================================ */

.cal-out-of-hours {
  background: var(--amber-bg);
  border: 0.5px solid var(--amber);
  border-left: 3px solid var(--amber);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.cal-ooh-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cal-ooh-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--amber);
}

.cal-ooh-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 2px 8px;
  border-radius: 8px;
}

.cal-ooh-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cal-ooh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-left: 3px solid var(--amber);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms ease, transform 80ms ease;
}

.cal-ooh-chip:hover {
  background: var(--bg-subtle);
  transform: translateY(-1px);
}

.cal-ooh-chip.confirmed { border-left-color: var(--green); }
.cal-ooh-chip.completed { border-left-color: var(--text-dim); opacity: 0.7; }
.cal-ooh-chip.cancelled { border-left-color: var(--coral); text-decoration: line-through; opacity: 0.6; }
.cal-ooh-chip.no_show   { border-left-color: var(--coral-bright); }

.cal-ooh-day {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-ooh-time {
  font-family: ui-monospace, monospace;
  color: var(--amber);
  font-weight: 500;
}

.cal-ooh-customer {
  color: var(--text);
}

/* ============================================================
   MONTH VIEW · grid 7 cols × 6 rows
   ============================================================ */

.cal-month {
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.cal-month-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--bg-primary);
  border-bottom: 0.5px solid var(--border);
}

.cal-month-head-cell {
  padding: 10px 6px;
  text-align: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  border-right: 0.5px solid var(--border);
}

.cal-month-head-cell:last-child { border-right: none; }

.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(96px, 1fr);
}

.cal-month-cell {
  border-right: 0.5px solid var(--border-soft);
  border-bottom: 0.5px solid var(--border-soft);
  padding: 6px 8px;
  cursor: pointer;
  transition: background 80ms ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 96px;
  position: relative;
  overflow: hidden;
}

.cal-month-cell:hover { background: var(--bg-subtle); }

.cal-month-cell.outside { opacity: 0.35; }

.cal-month-cell.today {
  background: rgba(249, 115, 22, 0.06);
}

.cal-month-cell.today:hover { background: rgba(249, 115, 22, 0.12); }

.cal-month-cell-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-feature-settings: "tnum";
}

.cal-month-cell.today .cal-month-cell-num {
  color: var(--orange-bright);
}

.cal-month-cell.outside .cal-month-cell-num {
  color: var(--text-dim);
  font-weight: 400;
}

.cal-month-cell-count {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 8px;
  background: var(--bg-elevated);
}

.cal-month-cell-count.has { color: var(--text); background: var(--orange-bg); }

.cal-month-cell-num-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cal-month-cell-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.cal-month-mini-appt {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  border-left: 2px solid;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg-elevated);
}

.cal-month-mini-appt.pending   { background: var(--amber-bg); border-left-color: var(--amber); color: var(--amber); }
.cal-month-mini-appt.confirmed { background: var(--green-bg); border-left-color: var(--green); color: var(--green); }
.cal-month-mini-appt.completed { background: var(--bg-elevated); border-left-color: var(--text-dim); color: var(--text-muted); }
.cal-month-mini-appt.cancelled { background: var(--coral-bg); border-left-color: var(--coral); color: var(--coral-bright); text-decoration: line-through; }
.cal-month-mini-appt.no_show   { background: var(--coral-bg); border-left-color: var(--coral-bright); color: var(--coral-bright); }

.cal-month-more {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1px;
}

@media (max-width: 768px) {
  .cal-month-grid { grid-auto-rows: minmax(60px, 1fr); }
  .cal-month-cell { min-height: 60px; padding: 4px 5px; }
  .cal-month-mini-appt { display: none; }
  .cal-month-more { display: none; }
}

/* ============================================================
   YEAR VIEW · 12 mini-meses con heatmap por día
   ============================================================ */

.cal-year {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 1024px) { .cal-year { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .cal-year { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .cal-year { grid-template-columns: 1fr; } }

.cal-year-month {
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.cal-year-month-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cal-year-month-name:hover { color: var(--orange-bright); }

.cal-year-month-name.current { color: var(--orange-bright); }

.cal-year-month-total {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  font-feature-settings: "tnum";
}

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

.cal-year-mini-head {
  font-size: 9px;
  color: var(--text-dim);
  text-align: center;
  padding: 1px 0;
}

.cal-year-mini-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--bg-deep);
  font-size: 9px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 80ms ease;
  border: 0.5px solid transparent;
}

.cal-year-mini-cell.outside { background: transparent; color: transparent; cursor: default; }

.cal-year-mini-cell:hover:not(.outside) {
  transform: scale(1.15);
  z-index: 2;
  border-color: var(--text-muted);
}

.cal-year-mini-cell.today {
  border-color: var(--orange);
  font-weight: 600;
  color: var(--orange-bright);
}

/* Heatmap density */
.cal-year-mini-cell.lvl-0 { background: var(--bg-deep); color: var(--text-dim); }
.cal-year-mini-cell.lvl-1 { background: rgba(249, 115, 22, 0.15); color: var(--text-muted); }
.cal-year-mini-cell.lvl-2 { background: rgba(249, 115, 22, 0.35); color: var(--text); }
.cal-year-mini-cell.lvl-3 { background: rgba(249, 115, 22, 0.60); color: white; }
.cal-year-mini-cell.lvl-4 { background: var(--orange); color: white; font-weight: 600; }

.cal-year-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--bg-panel);
  border: 0.5px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.cal-year-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-block;
}

