.calendar-card { min-width: 260px; }
.calendar-header { font-weight: 700; letter-spacing:.02em; }
.calendar-table { width:100%; table-layout: fixed; font-size: .92rem; }
.calendar-table th, .calendar-table td { text-align:center; padding:.25rem; }
.calendar-table td { height: 2rem; vertical-align: middle; border-radius:.35rem; }
.calendar-table .muted { color:#6c757d; }
.badge-legend { width: 1.1rem; height: 1.1rem; display:inline-block; border-radius:.2rem; margin-right:.5rem; vertical-align:middle; outline:1.5px solid rgba(0,0,0,.25); outline-offset:-2px;}
.day-sunday { color: #dc3545; }
.day-holiday  {
    background: var(--bs-danger); /* #dc3545 en Bootstrap 5 */
    color: #fff !important;       /* fuerza blanco incluso si es domingo (.text-danger) */
}
.day-start {outline:1.5px solid rgba(0,0,0,.25); outline-offset:-2px;}
.day-tribunal { background: #f3dcde !important;}
.day-strike { background: #D3D3D3 !important;}
.day-upmweek {background-color: #b1a2c2;}
.day-english {background-color: #fcbd92}
.day-closure {background-color: #6331a2; color: #fff;}
.event-outline { outline:1.5px solid rgba(0,0,0,.25); outline-offset:-2px; }
.day-special  { background:#d8c5ff; }      /* light purple */
.day-today    { outline:2px solid #0d6efd; outline-offset:-2px; }
.day-period-enrollment { background:#e9ecef; } /* gris claro (similar a bg-light) */
.day-period-teaching   { background:#dbe9ff; } /* azul muy suave */
.day-period-exams1     { background:#e7f7d7; } /* verde suave */
.day-period-exams2     { background:#fff4b8; } /* amarillo suave */
.day-period-any        { background: #e9ecef; } /* genérico (mismo gris) */
.legend { position:sticky; top:1rem; }
/* position container for the superscript */
.calendar-table td { position: relative; }
.sup-e {
    position: absolute; top: 2px; right: 4px;
    font-size: .65rem; line-height: 1; font-weight: 600;
}
/* Legend table look & feel */
.legend-card .card-body { padding: 0; }
.legend-table { width: 100%; }
.legend-table td { vertical-align: middle; }
.legend-title { padding: .5rem .75rem; font-size: .92rem}
.legend-date  { text-align: center; white-space: nowrap; width: 7.5rem; font-size: .92rem ; border-radius: .35rem;}

/* Reuse the same event background classes you already have */
.legend-date.day-holiday  { background: var(--bs-danger); color:#fff !important; }
.legend-date.day-start    { outline:1.5px solid rgba(0,0,0,.25); outline-offset:-2px; }
.legend-date.day-tribunal { background: #f3dcde; }
.legend-date.day-strike { background: #D3D3D3; }
.legend-date.day-upmweek  { background: #b1a2c2;}
.legend-date.day-english  { background: #fcbd92 }
.legend-date.day-closure  { background-color: #6331a2; color: #fff; }

/* table look (Bootstrap base + compacto) */
.legend-wrap .table      { margin: 0; }    /* remove default margins */
.legend-wrap .table-sm   { --bs-table-bg: transparent; }