/* «Calendario»: mes y semana en escritorio, agenda en el teléfono. */
.cal-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-nav, .cal-filters, .cal-modes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cal-title { display: inline-block; margin-left: 6px; font-family: var(--font-display); }
.cal-title::first-letter, .cal-agenda h3::first-letter { text-transform: uppercase; }
.cal-filters select { width: auto; max-width: 190px; min-height: 32px; padding: 4px 8px; }
.cal-legend { margin: 0 0 8px; }
.cal-month { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 6px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 112px; padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-out { background: var(--surface-2); }
.cal-out .cal-num { color: var(--muted); opacity: 0.6; }
.cal-num { font-size: 12px; padding: 0 2px; }
.cal-today { background: var(--area-soft); }
.cal-over { outline: 2px dashed var(--area); outline-offset: -2px; }
.cal-item { box-sizing: border-box; display: flex; gap: 4px; width: 100%; min-width: 0; padding: 1px 5px; border-radius: 4px; border-left: 3px solid var(--muted); background: var(--surface-2); font-size: 12px; line-height: 18px; cursor: pointer; }
.cal-item:focus-visible { outline: 2px solid var(--area); }
.cal-item[draggable] { cursor: grab; }
.cal-item time { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.cal-item span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-pending { border-left-color: var(--area); background: var(--area-soft); }
.cal-running { border-left-color: var(--warm-ink); background: var(--warm-soft); }
.cal-done { border-left-color: var(--ok); background: var(--ok-soft); }
.cal-failed { border-left-color: var(--danger); background: var(--danger-soft); }
.cal-uncertain { border-left-color: var(--warm-ink); background: var(--warm-soft); border-left-style: dashed; }
.cal-skipped { opacity: 0.6; }
.cal-more { all: unset; cursor: pointer; font-size: 12px; color: var(--muted); padding: 0 5px; }
.cal-more:hover { color: var(--ink); text-decoration: underline; }
.cal-week { table-layout: fixed; width: 100%; min-width: 780px; }
.cal-week th:first-child { width: 56px; }
.cal-week th[scope="row"] { font-weight: 400; color: var(--muted); font-size: 12px; vertical-align: top; }
.cal-week td { height: 34px; padding: 2px; vertical-align: top; border-left: 1px solid var(--line); }
.cal-week td .cal-item + .cal-item { margin-top: 2px; }
.cal-info { display: grid; grid-template-columns: 80px 1fr; gap: 2px 10px; margin: 0 0 8px; }
.cal-info dt { color: var(--muted); }
.cal-info dd { margin: 0; }
.cal-text { white-space: pre-wrap; padding: 8px; border: 1px solid var(--line); border-radius: 6px; }
.cal-agenda section { margin-bottom: 12px; }
.cal-agenda h3 { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
.cal-row { all: unset; box-sizing: border-box; display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-bottom-width: 0; cursor: pointer; }
.cal-row:first-of-type { border-radius: 8px 8px 0 0; }
.cal-row:last-of-type { border-radius: 0 0 8px 8px; border-bottom-width: 1px; }
.cal-row:only-of-type { border-radius: 8px; }
.cal-row:focus-visible { outline: 2px solid var(--area); outline-offset: -2px; }
.cal-row time { flex: none; font-variant-numeric: tabular-nums; }
.cal-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-row-main strong, .cal-row-main small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cal-row-main small { color: var(--muted); }
@media (max-width: 860px) {
  .cal-filters { width: 100%; }
  .cal-filters select { flex: 1 1 45%; max-width: none; min-width: 0; }
}
.cal-flag { flex: none; font-size: 10px; line-height: 1.5; color: var(--muted); }
.cal-img-failed { color: var(--danger); font-weight: 600; }
.cal-img-pending, .cal-img-generating, .cal-img-unconfirmed { color: var(--warm-ink); }
.cal-row-main small { white-space: normal; }
