/* ==========================================================================
   Reports Dashboard - ECS-OPM Visual System
   ========================================================================== */

/* Badge en tarjeta de Gráficos de Reportes (magenta cristalino) */
.reports-dashboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    flex-shrink: 0;
    padding: 0.28rem 0.75rem;
    border: 1px solid rgba(206, 50, 105, 0.32);
    border-radius: 999px;
    background: rgba(206, 50, 105, 0.08);
    color: var(--ecs-color-primary, #ce3269);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.reports-dashboard-badge .material-symbols-outlined {
    font-size: 0.95rem;
    line-height: 1;
}

.reports-dashboard-badge:hover,
.reports-dashboard-badge:focus-visible {
    border-color: var(--ecs-color-primary, #ce3269);
    background: rgba(206, 50, 105, 0.16);
    color: var(--ecs-color-primary, #ce3269);
    outline: none;
}

/* Modalidades para el calendario de sesiones */
.cal-mod-presencial .calendar-event-dot { background: #ce3269; }
.cal-mod-enlinea .calendar-event-dot { background: #2563eb; }
.cal-mod-alterno .calendar-event-dot { background: #d97706; }

/* Descripción / cálculo debajo del título del widget */
.reports-dashboard-widget-desc {
    display: block;
    margin-top: 0.45rem;
    color: #777586;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
}

/* Widget 5: Horas de educación completadas */
.reports-widget-horas-frame,
.reports-widget-mejoramiento-frame {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    height: 20rem;
    padding: 1.25rem 1.5rem;
    box-sizing: border-box;
    gap: 0.75rem;
}

.reports-widget-horas-chart,
.reports-widget-mejoramiento-chart {
    position: relative;
    width: 100%;
    height: 13rem;
    min-height: 0;
}

.reports-widget-horas-chart canvas,
.reports-widget-mejoramiento-chart canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Grilla de métricas de Widget 6 */
.reports-mejoramiento-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    width: 100%;
}

/* Contenedor centralizado para gráficos de dona (Widgets 1, 2, 3, 4, 7, etc.) */
.reports-donut-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 13rem;
    height: 13rem;
    max-width: 100%;
    margin: 0 auto;
    flex-shrink: 0;
}

.reports-donut-container canvas {
    display: block;
    width: 13rem !important;
    height: 13rem !important;
}

.reports-donut-center {
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.15;
}

.reports-donut-pct {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #171622;
}

.reports-donut-label {
    margin-top: 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #777586;
}

/* Botón de pantalla completa / proyección para el calendario global */
.dashboard-calendar-fullscreen-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.85rem;
    border: 1px solid rgba(206, 50, 105, 0.35);
    border-radius: 999px;
    background: #fff;
    color: var(--ecs-color-primary, #ce3269);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.dashboard-calendar-fullscreen-btn:hover,
.dashboard-calendar-fullscreen-btn:focus-visible {
    background: #fff5f8;
    border-color: var(--ecs-color-primary, #ce3269);
    outline: none;
}

/* Modo pantalla completa / proyección para el calendario global */
#widget-calendario-global.is-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    z-index: 99999 !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    background: #f4f4f6 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

#widget-calendario-global.is-fullscreen > header {
    flex: 0 0 auto;
    padding: 0.6rem 1.5rem !important;
    background: #ffffff;
    border-bottom: 1px solid rgba(214, 212, 216, 0.72);
}

#widget-calendario-global.is-fullscreen .calendar-wrapper {
    flex: 1 1 0%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0.5rem 1.5rem 0.4rem !important;
    overflow: hidden;
}

#widget-calendario-global.is-fullscreen .calendar-header {
    flex: 0 0 auto;
    margin-bottom: 0.35rem;
}

#widget-calendario-global.is-fullscreen .calendar-weekday {
    height: 1.4rem;
    line-height: 1.4rem;
    font-size: 0.72rem;
    font-weight: 800;
}

#widget-calendario-global.is-fullscreen .calendar-grid {
    flex: 1 1 0%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    grid-template-rows: auto repeat(var(--cal-rows, 5), minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0;
    overflow: hidden;
}

#widget-calendario-global.is-fullscreen .calendar-day {
    min-height: 0 !important;
    height: 100% !important;
    padding: 0.35rem 0.45rem !important;
    background: #fff;
    border-radius: 0.7rem !important;
    border: 1px solid rgba(214, 212, 216, 0.85);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#widget-calendario-global.is-fullscreen .calendar-day-num {
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.74rem;
    flex: 0 0 auto;
}

#widget-calendario-global.is-fullscreen .calendar-events {
    flex: 1 1 0%;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.2rem;
    padding-right: 0.1rem;
}

#widget-calendario-global > footer {
    flex: 0 0 auto;
    padding: 1rem 1.5rem !important;
    background: #ffffff;
    border-top: 1px solid rgba(214, 212, 216, 0.72);
}

#widget-calendario-global.is-fullscreen > footer {
    flex: 0 0 auto;
    padding: 0.85rem 1.5rem !important;
    background: #ffffff;
    border-top: 1px solid rgba(214, 212, 216, 0.72);
}

/* Tarjetas de sesión modernas y armónicas (Estilo ECS) */
.calendar-session-card {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    padding: 0.38rem 0.52rem;
    border-radius: 0.6rem;
    background: #ffffff;
    border: 1px solid #e3e2e6;
    border-left-width: 3.5px;
    cursor: pointer;
    text-align: left;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    box-sizing: border-box;
}

.calendar-session-card:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

/* Modality variants: left border line & subtle background tint */
.calendar-session-card.mod-presencial {
    border-left-color: #ce3269;
    background: #fffbfa;
}
.calendar-session-card.mod-presencial:hover {
    border-color: #f9cad8;
    border-left-color: #ce3269;
}

.calendar-session-card.mod-enlinea {
    border-left-color: #2563eb;
    background: #f8fbff;
}
.calendar-session-card.mod-enlinea:hover {
    border-color: #bfdbfe;
    border-left-color: #2563eb;
}

.calendar-session-card.mod-alterno {
    border-left-color: #d97706;
    background: #fffdf7;
}
.calendar-session-card.mod-alterno:hover {
    border-color: #fde68a;
    border-left-color: #d97706;
}

/* Encabezado superior de la tarjeta: Modalidad + AR + Hora */
.session-card-top {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
    min-width: 0;
}

.session-card-mod-label {
    font-size: 0.62rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex-shrink: 1;
}

.mod-presencial .session-card-mod-label { color: #ce3269; }
.mod-enlinea .session-card-mod-label { color: #2563eb; }
.mod-alterno .session-card-mod-label { color: #d97706; }

.session-card-time {
    margin-left: auto;
    font-size: 0.62rem;
    font-weight: 600;
    color: #77717f;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

/* Título del adiestramiento */
.session-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: #17131c;
    line-height: 1.2;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Fila de metadatos inferior */
.session-card-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    font-size: 0.65rem;
    color: #646173;
    font-weight: 600;
    line-height: 1;
}

.session-card-id {
    color: #77717f;
    font-weight: 700;
}

.session-card-enrolled {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.session-card-enrolled .material-symbols-outlined {
    font-size: 0.76rem !important;
    width: 0.76rem !important;
    height: 0.76rem !important;
    line-height: 1 !important;
}

/* Tarjeta en modo pantalla completa / proyección */
#widget-calendario-global.is-fullscreen .calendar-session-card {
    padding: 0.4rem 0.55rem;
    border-radius: 0.6rem;
    gap: 0.22rem;
    border-left-width: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

#widget-calendario-global.is-fullscreen .session-card-title {
    font-size: 0.76rem;
    font-weight: 750;
    color: #17131c;
}

#widget-calendario-global.is-fullscreen .session-card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.3rem;
    font-size: 0.67rem;
    color: #524d5b;
    font-weight: 600;
}

#widget-calendario-global.is-fullscreen .session-card-instructor {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.67rem;
    color: #524d5b;
    line-height: 1.15;
}

#widget-calendario-global.is-fullscreen .session-card-instructor .material-symbols-outlined,
#widget-calendario-global.is-fullscreen .session-card-meta-row .material-symbols-outlined {
    font-size: 0.78rem !important;
    width: 0.78rem !important;
    height: 0.78rem !important;
    line-height: 1 !important;
    color: #77717f;
}

/* Sistema de Badges para Modalidad y Acomodo Razonable */
.dashboard-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.3rem !important;
    padding: 0.14rem 0.48rem !important;
    border-radius: 9999px !important;
    font-size: 0.65rem !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.dashboard-badge-presencial {
    background: #fdf2f5 !important;
    color: #ce3269 !important;
    border: 1px solid #f9cad8 !important;
}

.dashboard-badge-enlinea {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

.dashboard-badge-alterno {
    background: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.dashboard-badge-dot {
    display: inline-block !important;
    width: 0.38rem !important;
    height: 0.38rem !important;
    border-radius: 9999px !important;
    flex-shrink: 0 !important;
}

.dashboard-badge-presencial .dashboard-badge-dot {
    background: #ce3269 !important;
}

.dashboard-badge-enlinea .dashboard-badge-dot {
    background: #2563eb !important;
}

.dashboard-badge-alterno .dashboard-badge-dot {
    background: #d97706 !important;
}

/* Insignia de Acomodo Razonable (AR) */
.dashboard-badge-ar {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.15rem !important;
    padding: 0.1rem 0.38rem !important;
    border-radius: 9999px !important;
    background: #fff7ed !important;
    color: #c2410c !important;
    border: 1px solid #fed7aa !important;
    font-size: 0.62rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

.dashboard-badge-ar .material-symbols-outlined {
    font-size: 0.72rem !important;
    width: 0.72rem !important;
    height: 0.72rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

/* Botón indicador: "+N más" */
.calendar-more-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0.16rem 0.35rem !important;
    border-radius: 0.4rem !important;
    background: #f4f3f6 !important;
    color: #5d5867 !important;
    border: 1px dashed #cfcdd6 !important;
    font-size: 0.64rem !important;
    font-weight: 750 !important;
    cursor: pointer !important;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
    text-align: center !important;
    line-height: 1.15 !important;
    box-sizing: border-box !important;
}

.calendar-more-badge:hover {
    background: #fdf2f5 !important;
    color: #ce3269 !important;
    border-color: #f9cad8 !important;
}

/* Items dentro del modal de lista del día */
.calendar-day-modal-item {
    padding: 0.75rem 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(214, 212, 216, 0.75);
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.calendar-day-modal-item:hover {
    border-color: var(--ecs-color-primary, #ce3269);
    box-shadow: 0 2px 8px rgba(206, 50, 105, 0.08);
}

/* Modal de detalle de sesión */
.calendar-session-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(23, 19, 28, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.calendar-session-modal-card {
    background: #ffffff;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 34rem;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(214, 212, 216, 0.85);
    animation: calModalFadeIn 0.18s ease-out;
}

@keyframes calModalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}




