/**
 * ICM Frontend Global Styles
 * Usa herencia de variables de idi-lms-theme para coherencia B2B
 */

/* Ocultar solo el footer público dentro del Command Center */
body:has(.idi-admin-shell) .idi-site-footer {
    display: none !important;
}

:root {
    /* Fallbacks en caso de que idi-lms-theme no esté activo */
    --icm-primary: var(--idi-theme-primary, #0284c7);
    --icm-primary-hover: var(--idi-theme-primary-hover, #0369a1);
    --icm-text: var(--idi-theme-text, #0f172a);
    --icm-muted: var(--idi-theme-muted, #64748b);
    --icm-bg: var(--idi-theme-bg, #f8fafc);
    --icm-border: var(--idi-theme-border, #e2e8f0);
    --icm-shadow: var(--idi-theme-shadow, 0 4px 15px rgba(0,0,0,0.05));
    --icm-radius: var(--idi-theme-radius, 8px);
    --icm-font: 'Outfit', sans-serif;
    
    --icm-success-bg: #dcfce7;
    --icm-success-text: #166534;
    --icm-error-bg: #fee2e2;
    --icm-error-text: #991b1b;
}

/* ==========================================================================
   Bases y Tipografía
   ========================================================================== */
.icm-wrapper, .icm-sidebar, .icm-form-wrapper, .icm-portal-grid, .contenedor-tabla-responsive {
    font-family: var(--icm-font);
    color: var(--icm-text);
}

/* Alertas */
.icm-alert { padding: 15px; border-radius: var(--icm-radius); margin-bottom: 20px; font-family: var(--icm-font); }
.icm-success { background: var(--icm-success-bg); color: var(--icm-success-text); border: 1px solid #bbf7d0; }
.icm-error { background: var(--icm-error-bg); color: var(--icm-error-text); border: 1px solid #fecaca; }

/* Botones Generales */
.icm-btn-primary { 
    background: var(--icm-primary); 
    color: white; 
    border: none; 
    padding: 12px 24px; 
    border-radius: 6px; 
    font-weight: 600; 
    cursor: pointer; 
    width: 100%; 
    font-size: 16px; 
    font-family: var(--icm-font);
    transition: 0.2s;
}
.icm-btn-primary:hover { background: var(--icm-primary-hover); transform: translateY(-2px); }

/* ==========================================================================
   Sidebar Global
   ========================================================================== */
.icm-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 260px;
    height: 100vh;
    background-color: #1e293b; /* Dark Mode strictly for sidebar */
    color: #f8fafc;
    z-index: 999999;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 15px rgba(0,0,0,0.1);
}

.icm-sidebar.active { left: 0; }

.icm-sidebar-header { padding: 25px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.icm-sidebar-header h3 { margin: 0 0 5px 0; color: white; font-size: 1.2rem; }
.icm-user-role { font-size: 0.7rem; background: var(--icm-primary); color: white; padding: 2px 6px; border-radius: 4px; font-weight: bold; }

.icm-sidebar-menu { list-style: none; padding: 15px 0; margin: 0; flex-grow: 1; overflow-y: auto; }
.icm-sidebar-menu li a {
    display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: #cbd5e1;
    text-decoration: none; font-size: 0.95rem; transition: 0.2s;
}
.icm-sidebar-menu li a:hover { background: #334155; color: white; border-left: 3px solid var(--icm-primary); }
.icm-menu-separator { padding: 15px 20px 5px; font-size: 0.75rem; text-transform: uppercase; color: #64748b; letter-spacing: 1px; }

.icm-sidebar-footer { padding: 20px; border-top: 1px solid rgba(255,255,255,0.1); }
.icm-logout-btn { display: flex; align-items: center; gap: 10px; color: #f87171; text-decoration: none; font-size: 0.9rem; }
.icm-logout-btn:hover { color: #fca5a5; }

/* Cajas Agrupadoras (Ej: Menu Pacientes Naranja) */
.icm-sidebar-box { margin: 0 15px 15px 15px; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.icm-box-orange { background-color: #f97316; /* Naranja */ }
.icm-box-blue { background-color: #2e355b; /* Azul Marino/Índigo corporativo */ }
.icm-sidebar-menu li.icm-sidebar-box { padding: 10px; margin: 0 15px 15px 15px; } /* Override default li padding */
.icm-box-item { 
    background: #ffffff; 
    color: #0f172a !important; 
    padding: 10px 15px !important; 
    border-radius: 4px; 
    text-decoration: none; 
    font-size: 0.95rem; 
    display: flex; 
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    width: 100%;
    border: none;
    cursor: pointer;
    font-family: var(--icm-font);
}
.icm-box-item:hover { background: #f1f5f9; border-left: none !important; color: #0f172a !important; }
.icm-box-title { font-weight: 600; cursor: default; }
.icm-box-title:hover { background: #ffffff; }

/* Submenús Dropdown */
.icm-has-submenu { position: relative; }
.icm-submenu { 
    display: none; 
    background: #fafafa; 
    border-radius: 4px; 
    margin-top: 4px; 
    flex-direction: column; 
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.icm-has-submenu.active .icm-submenu { display: flex; }
.icm-submenu a {
    padding: 10px 15px 10px 30px; /* Sangría a la izquierda */
    color: #475569 !important;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}
.icm-submenu a:last-child { border-bottom: none; }
.icm-submenu a:hover { background: #f1f5f9; color: #0f172a !important; }



/* ==========================================================================
   Top Header (Barra Superior Fina)
   ========================================================================== */
.icm-topbar {
    position: fixed; top: 0; left: 0; width: 100%; height: 50px;
    background: #ffffff; border-bottom: 1px solid #e2e8f0;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 20px; z-index: 999990; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    font-family: var(--icm-font); color: #0f172a;
}
.icm-topbar-left, .icm-topbar-right { display: flex; align-items: center; gap: 15px; }
.icm-topbar-toggle {
    background: transparent; border: none; color: #475569;
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 4px; transition: 0.2s;
}
.icm-topbar-toggle:hover { background: #f1f5f9; color: #0f172a; }
.icm-topbar-brand { font-weight: 500; font-size: 1.1rem; display: flex; align-items: center; }
.icm-topbar-user { font-size: 0.85rem; font-weight: 500; color: #475569; display: flex; align-items: center; gap: 5px; }
.icm-topbar-logout { color: #ef4444; text-decoration: none; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 4px; }
.icm-topbar-logout:hover { background: #fee2e2; }

body.icm-sidebar-open { padding-left: 260px; }

/* ==========================================================================
   Responsive Sidebar Rules & Layout Spacing
   ========================================================================== */
@media (max-width: 768px) {
    body.icm-sidebar-open { padding-left: 0; overflow: hidden; }
}

@media (min-width: 769px) {
    .icm-sidebar { left: 0 !important; }
    body.icm-sidebar-open { padding-left: 260px !important; }
    .icm-topbar-toggle { display: none !important; }
    
    /* Dar "aire" al contenedor grande de la derecha */
    body.icm-sidebar-open #primary.site-main {
        padding: 40px 60px !important;
        max-width: 1600px;
        margin: 0 auto;
        box-sizing: border-box;
    }
    
    body.icm-sidebar-open .entry-header {
        margin-bottom: 30px;
    }

    body.icm-sidebar-open .entry-title {
        font-size: 2.2rem;
        color: #0f172a;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
}

@media (min-width: 769px) {
    .icm-sidebar { left: 0 !important; }
    body.icm-sidebar-open { padding-left: 260px !important; }
    .icm-topbar-toggle { display: none !important; }
}

/* ==========================================================================
   Dashboard Global (Premium UI)
   ========================================================================== */
.icm-dashboard-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: var(--icm-font);
}

.icm-dashboard-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.icm-dashboard-hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.icm-hero-text {
    max-width: 600px;
    z-index: 2;
}

.icm-greeting-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icm-hero-text h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.icm-hero-text p {
    font-size: 1.1rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

.icm-hero-icon {
    background: rgba(255, 255, 255, 0.05);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    animation: icm-float 6s ease-in-out infinite;
}

.icm-hero-icon .dashicons {
    font-size: 50px;
    width: 50px;
    height: 50px;
    color: #ef4444;
}

.icm-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.icm-dashboard-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid rgba(15, 23, 42, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icm-dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}

.icm-card-icon-header {
    margin-bottom: 20px;
}

.icm-card-icon-header .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #3b82f6;
}

.icm-card-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    color: #0f172a;
}

.icm-card-content p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
}

.icm-nav-tips {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 15px;
}

.icm-nav-tips li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
    color: #334155;
    transition: background 0.2s;
}

.icm-nav-tips li:hover {
    background: #f1f5f9;
}

.icm-nav-tips .dashicons {
    color: #64748b;
}

.icm-dashboard-status-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.icm-status-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border: 1px solid rgba(15, 23, 42, 0.05);
    transition: transform 0.2s;
}

.icm-status-item:hover {
    transform: translateX(5px);
}

.icm-status-icon {
    width: 45px; height: 45px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.icm-bg-green { background: #dcfce7; color: #16a34a; }
.icm-bg-blue { background: #dbeafe; color: #2563eb; }
.icm-bg-purple { background: #f3e8ff; color: #9333ea; }

.icm-status-text h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    color: #0f172a;
}

.icm-status-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}

@keyframes icm-float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.icm-pulse {
    animation: icm-pulse-anim 2s infinite;
}

@keyframes icm-pulse-anim {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 900px) {
    .icm-dashboard-grid { grid-template-columns: 1fr; }
    .icm-dashboard-hero { flex-direction: column; text-align: center; gap: 30px; }
    .icm-hero-text h1 { font-size: 2rem; }
}

/* ==========================================================================
   Formularios
   ========================================================================== */
.icm-form-wrapper { background: #fff; padding: 30px; border-radius: var(--icm-radius); box-shadow: var(--icm-shadow); margin-bottom: 20px; }
.icm-form-wrapper h3 { margin-top: 0; color: var(--icm-text); margin-bottom: 20px; font-weight: 600; }
.icm-form fieldset { border: 1px solid var(--icm-border); border-radius: var(--icm-radius); padding: 20px; margin-bottom: 25px; }
.icm-form legend { font-weight: bold; color: var(--icm-primary); padding: 0 10px; }
.icm-form-row { margin-bottom: 15px; }
.icm-form-row label { display: block; margin-bottom: 5px; font-weight: 500; color: var(--icm-text); font-size: 14px; }
.icm-form-row input[type="text"], .icm-form-row input[type="email"], .icm-form-row input[type="url"], .icm-form-row input[type="file"], .icm-form-row input[type="number"], .icm-form-row input[type="datetime-local"], .icm-form-row select, .icm-form-row textarea { 
    width: 100%; padding: 10px; border: 1px solid var(--icm-border); border-radius: 6px; font-family: var(--icm-font); color: var(--icm-text); box-sizing: border-box; transition: 0.2s;
}
.icm-form-row input:focus, .icm-form-row select:focus, .icm-form-row textarea:focus { border-color: var(--icm-primary); outline: none; box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1); }
.icm-form-row textarea { resize: vertical; min-height: 100px; }
.icm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ==========================================================================
   Tablas
   ========================================================================== */
.icm-admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.icm-admin-header h3 { margin: 0; color: var(--icm-text); font-weight: 600; }
.contenedor-tabla-responsive { width: 100%; overflow-x: auto; margin-bottom: 20px; border: 1px solid var(--icm-border); border-radius: var(--icm-radius); background-color: #fff; }
.tabla-pacientes-cebra { width: 100%; min-width: 700px; border-collapse: separate; border-spacing: 0; border: none; overflow: hidden; }
.tabla-pacientes-cebra th { background-color: var(--icm-bg); text-align: left; padding: 15px; color: var(--icm-muted); font-weight: 600; font-size: 13px; text-transform: uppercase; border-bottom: 1px solid var(--icm-border); }
.tabla-pacientes-cebra td { padding: 12px 15px; border-bottom: 1px solid var(--icm-bg); color: var(--icm-text); vertical-align: middle; }
.tabla-pacientes-cebra tbody tr:hover { background-color: var(--icm-bg); }

.badge-rol { padding: 4px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.badge-jefe { background: #fef08a; color: #854d0e; }
.badge-normal { background: #e0f2fe; color: #0369a1; }
.badge-estado { padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; text-transform: uppercase; }
.estado-activa { background-color: var(--icm-success-bg); color: var(--icm-success-text); }
.estado-pendiente { background-color: #fef08a; color: #854d0e; }
.estado-cancelada { background-color: var(--icm-error-bg); color: var(--icm-error-text); }

.acciones-flex { display: flex; gap: 6px; }
.btn-accion { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; text-decoration: none; transition: 0.2s; }
.btn-crear { background: var(--icm-primary); color: #fff; }
.btn-crear:hover { background: var(--icm-primary-hover); color: #fff; transform: translateY(-1px); }
.btn-editar { background: var(--icm-bg); color: var(--icm-muted); border: 1px solid var(--icm-border); }
.btn-editar:hover { background: var(--icm-border); color: var(--icm-text); }

/* Tablas Específicas de Materiales */
.icm-table-materiales { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--icm-border); font-size: 14px; font-family: var(--icm-font); }
.icm-table-materiales th { background: #f1f5f9; color: #475569; font-weight: 600; text-transform: uppercase; font-size: 12px; padding: 15px; text-align: left; border-bottom: 2px solid #cbd5e1; border-right: 1px solid var(--icm-border); }
.icm-table-materiales td { padding: 15px; border-bottom: 1px solid var(--icm-border); border-right: 1px solid var(--icm-border); vertical-align: middle; color: var(--icm-text); }
.icm-table-materiales tr:nth-child(even) { background: #f8fafc; }
.icm-mat-title { font-weight: 600; color: var(--icm-text); margin-bottom: 4px; display: block; font-size: 15px; }
.icm-mat-date { font-size: 12px; color: var(--icm-muted); }
.icm-mat-assigned { font-weight: 600; color: var(--icm-primary); }
.icm-mat-general { font-style: italic; color: var(--icm-muted); }
.icm-badge-origen { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.icm-badge-paciente { background: var(--icm-success-bg); color: var(--icm-success-text); }
.icm-badge-biblioteca { background: #f3e8ff; color: #9333ea; }
.icm-btn-video { background: var(--icm-primary); color: #fff; border-radius: 4px; padding: 6px 12px; text-decoration: none; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; transition: 0.2s; border: none; cursor: pointer; }
.icm-btn-video:hover { background: var(--icm-primary-hover); color: #fff; transform: translateY(-1px); }
.icm-mat-icon { font-size: 24px; color: var(--icm-primary); }

/* ==========================================================================
   Historial (Línea de tiempo)
   ========================================================================== */
.icm-history-wrap { font-family: var(--icm-font); color: var(--icm-text); }
.icm-history-wrap h3 { font-size: 24px; color: var(--icm-text); margin-bottom: 30px; border-bottom: 2px solid var(--icm-border); padding-bottom: 10px; }
.icm-timeline { position: relative; padding-left: 30px; margin-top: 20px; }
.icm-timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--icm-border); }
.icm-timeline-item { position: relative; margin-bottom: 40px; }
.icm-timeline-marker { position: absolute; left: -30px; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--icm-primary); border: 3px solid #ffffff; box-shadow: 0 0 0 2px var(--icm-bg); }
.icm-timeline-date { font-size: 13px; color: var(--icm-muted); margin-bottom: 8px; font-weight: 500; }
.icm-timeline-content { background: #ffffff; border: 1px solid var(--icm-border); border-radius: var(--icm-radius); padding: 20px; box-shadow: var(--icm-shadow); }
.icm-card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--icm-bg); padding-bottom: 15px; margin-bottom: 15px; }
.icm-card-header h4 { margin: 0; color: var(--icm-text); font-size: 18px; }
.icm-btn-edit { display: inline-flex; align-items: center; gap: 5px; background: var(--icm-bg); color: var(--icm-primary); padding: 6px 12px; border-radius: 6px; font-size: 13px; text-decoration: none; font-weight: 600; transition: all 0.2s; }
.icm-btn-edit:hover { background: var(--icm-border); }
.icm-badge-done { background: var(--icm-success-bg); color: var(--icm-success-text); padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.icm-badge-suspended { background: var(--icm-error-bg); color: var(--icm-error-text); padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.icm-badge-absent { background: #fef9c3; color: #854d0e; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.icm-data-block { margin-bottom: 15px; }
.icm-data-block strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--icm-muted); margin-bottom: 5px; }
.icm-data-block p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--icm-text); background: var(--icm-bg); padding: 12px; border-radius: 8px; border: 1px solid var(--icm-border); }
.icm-data-block.notes p { background: #fffbeb; border-color: #fde68a; }
.icm-no-data { color: var(--icm-muted) !important; font-style: italic; background: transparent !important; border: none !important; padding: 0 !important; }
.icm-grid-data { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* ==========================================================================
   Portales (Documentos y Materiales)
   ========================================================================== */
.icm-empty-state { padding: 30px; text-align: center; background: var(--icm-bg); border: 1px dashed var(--icm-muted); border-radius: var(--icm-radius); color: var(--icm-muted); }
.icm-portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.icm-doc-card { display: flex; align-items: center; background: #fff; border: 1px solid var(--icm-border); padding: 15px; border-radius: var(--icm-radius); transition: 0.3s; box-shadow: var(--icm-shadow); }
.icm-doc-card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px rgba(0,0,0,0.08); border-color: var(--icm-primary); }
.doc-icon { background: #eff6ff; color: var(--icm-primary); width: 50px; height: 50px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-right: 15px; }
.doc-icon .dashicons { font-size: 24px; width: 24px; height: 24px; }
.doc-info { flex-grow: 1; }
.doc-info h4 { margin: 0 0 5px 0; font-size: 15px; color: var(--icm-text); font-weight: 600; }
.doc-context { font-size: 12px; color: var(--icm-muted); background: var(--icm-bg); padding: 2px 6px; border-radius: 4px; }
.doc-download-btn { background: var(--icm-bg); color: var(--icm-muted); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; text-decoration: none; transition: 0.2s; }
.doc-download-btn:hover { background: var(--icm-primary); color: #fff; }

.icm-portal-grid-mat { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 25px; }
.icm-mat-card { background: #fff; border: 1px solid var(--icm-border); border-radius: var(--icm-radius); overflow: hidden; box-shadow: var(--icm-shadow); display: flex; flex-direction: column; }
.mat-video-container { position: relative; padding-bottom: 56.25%; height: 0; background: #000; }
.mat-video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.mat-text-header { background: var(--icm-bg); padding: 40px 20px; text-align: center; color: var(--icm-muted); font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mat-text-header .dashicons { font-size: 40px; width: 40px; height: 40px; color: #94a3b8; }
.mat-info { padding: 20px; flex-grow: 1; }
.mat-info h4 { margin: 0 0 10px 0; font-size: 16px; color: var(--icm-text); font-weight: 600; }
.mat-info p { margin: 0; font-size: 14px; color: var(--icm-muted); line-height: 1.6; }

/* ==========================================================================
   Dashboard Global
   ========================================================================== */
/* ==========================================================================
   Dashboard Global
   ========================================================================== */
.icm-dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.icm-dashboard-card { background: #fff; border: 1px solid var(--icm-border); padding: 25px; border-radius: var(--icm-radius); text-align: center; box-shadow: var(--icm-shadow); transition: 0.3s; text-decoration: none; display: block; color: var(--icm-text); }
.icm-dashboard-card:hover { transform: translateY(-5px); border-color: var(--icm-primary); box-shadow: 0 10px 20px rgba(0,0,0,0.06); }
.icm-card-icon { font-size: 40px; color: var(--icm-primary); margin-bottom: 15px; display: inline-block; }
.icm-dashboard-card h3 { margin: 0 0 10px 0; font-size: 18px; font-weight: 600; }
.icm-dashboard-card p { margin: 0; color: var(--icm-muted); font-size: 14px; }

/* ==========================================================================
   Modales y Toggles (Calendario y Vistas)
   ========================================================================== */
.icm-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 9999; opacity: 0; transition: opacity 0.3s ease; }
.icm-modal-overlay.active { display: flex; opacity: 1; }
.icm-modal-box { background: #fff; width: 90%; max-width: 600px; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.2); transform: translateY(-20px); transition: transform 0.3s ease; }
.icm-modal-overlay.active .icm-modal-box { transform: translateY(0); }
.icm-modal-header { background: var(--icm-primary); color: white; padding: 20px 25px; position: relative; }
.icm-modal-header h3 { margin: 0 0 5px 0; font-size: 22px; font-weight: 600; }
.icm-modal-header p { margin: 0; font-size: 14px; opacity: 0.9; }
.icm-modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; color: white; font-size: 24px; cursor: pointer; opacity: 0.7; }
.icm-modal-close:hover { opacity: 1; }
.icm-modal-body { padding: 25px; }
.icm-modal-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--icm-border); padding-bottom: 15px; }
.icm-modal-tab-btn { padding: 8px 16px; border-radius: 20px; border: 1px solid var(--icm-border); background: var(--icm-bg); color: var(--icm-muted); cursor: pointer; font-weight: 500; font-size: 14px; transition: all 0.2s; }
.icm-modal-tab-btn.active { background: var(--icm-primary); color: white; border-color: var(--icm-primary); }
.icm-modal-content-pane { display: none; font-size: 15px; color: var(--icm-text); line-height: 1.6; min-height: 100px; }
.icm-modal-content-pane.active { display: block; }
.icm-modal-footer { margin-top: 20px; text-align: right; }
.icm-modal-footer a { color: var(--icm-primary); text-decoration: none; font-weight: 600; font-size: 14px; }
.icm-modal-footer a:hover { text-decoration: underline; }
.icm-view-toggles { display: flex; gap: 10px; margin-bottom: 20px; background: white; padding: 10px; border-radius: var(--icm-radius); box-shadow: var(--icm-shadow); }
.icm-view-btn { padding: 10px 20px; border: none; background: var(--icm-bg); color: var(--icm-text); border-radius: 8px; cursor: pointer; font-weight: 600; transition: all 0.2s; display: flex; align-items: center; gap: 8px; }
.icm-view-btn.active { background: var(--icm-primary); color: white; }
.icm-view-container { display: none; background: white; padding: 20px; border-radius: var(--icm-radius); box-shadow: var(--icm-shadow); }
.icm-view-container.active { display: block; }
