/*
  =============================================================================
  PROYECTO: SEGTACO - Plataforma Corporativa | Coodescor
  ARCHIVO: styles.css
  DESCRIPCIÓN: Hoja de estilos principal con diseño esqueumórfico, paleta de colores 
               corporativa (60-30-10), tipografía Inter, scroll vertical/horizontal
               del contenedor de minuta y soporte completo para dispositivos móviles.
  =============================================================================
*/

:root {
    /* Regla 60-30-10 */
    /* 60% Dominante - Fondos y Estructura Light / Dark Moderado */
    --navy-dark: #1e293b;       /* Slate-800 */
    --navy-sidebar: #334155;    /* Slate-700 */
    --bg-body: #f1f5f9;         /* Slate-100 para dar mejor contraste esqueumórfico */
    --surface: #ffffff;
    --border: #cbd5e1;
    --text-main: #1e293b;
    --text-muted: #64748b;

    /* 30% Secundario - Azul Corporativo */
    --secondary: #0284c7;
    --secondary-hover: #0369a1;

    /* 10% Acento - Verde Mango */
    --accent: #84cc16;
    --accent-hover: #65a30d;
    --accent-light: #ecfccb;
    --accent-text: #1a2e05;

    /* Estados de Alerta */
    --danger-bg: #fef2f2;
    --danger-text: #991b1b;
    --warning-bg: #fffbeb;
    --warning-text: #92400e;
    --success-bg: #ecfccb;
    --success-text: #3f6212;

    /* Colores de Estados de Ocupación */
    --status-disponible: #84cc16;
    --status-pausa: #f59e0b;
    --status-bano: #06b6d4;
    --status-reunion: #a855f7;
    --status-ausente: #94a3b8;

    /* Degradados y Relieves Esqueumórficos Generales */
    --btn-accent-grad: linear-gradient(180deg, #a3e635 0%, #84cc16 50%, #65a30d 100%);
    --btn-accent-hover: linear-gradient(180deg, #84cc16 0%, #65a30d 100%);
    --btn-sec-grad: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    --surface-grad: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.9);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Inter', 'Segoe UI', sans-serif; 
}

body { 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    display: flex; 
    height: 100vh; 
    overflow: hidden; 
}

/* --- SIDEBAR ESQUEUMÓRFICO --- */
aside {
    width: 270px;
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.15);
    z-index: 10;
    transition: transform 0.3s ease;
}

.brand-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brand-text h1 { 
    font-size: 1.1rem; 
    font-weight: 800; 
    letter-spacing: -0.3px; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.brand-text span { 
    font-size: 0.72rem; 
    color: #cbd5e1; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}

.nav-menu { 
    padding: 1rem 0.75rem; 
    list-style: none; 
    flex: 1; 
    overflow-y: auto; 
}

.nav-item { margin-bottom: 0.35rem; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.9rem;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.nav-link:hover { 
    background-color: rgba(255, 255, 255, 0.08); 
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-link.active { 
    background: var(--btn-accent-grad); 
    color: var(--accent-text); 
    font-weight: 800; 
    border: 1px solid #65a30d;
    box-shadow: 
        0 3px 6px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* --- SECCIÓN DE USUARIO Y OCUPACIÓN EN SIDEBAR --- */
.user-profile-sidebar {
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
}

.sidebar-label { 
    color: #94a3b8; 
    font-size: 0.68rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem; 
}

.status-container {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background-color: rgba(15, 23, 42, 0.6);
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s ease;
}

.status-container:focus-within {
    border-color: rgba(255, 255, 255, 0.25);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--status-disponible);
    box-shadow: 0 0 8px var(--status-disponible);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.status-select {
    background: transparent;
    border: none;
    color: #f1f5f9;
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    width: 100%;
    padding-right: 0.5rem;
}

.status-select option { 
    background-color: var(--navy-dark); 
    color: #ffffff; 
}

.shortcut-hint {
    margin-top: 0.5rem;
    font-size: 0.68rem;
    color: #64748b;
    text-align: center;
}

/* --- CONTENEDOR PRINCIPAL --- */
.wrapper { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    overflow-y: auto; 
    width: 100%;
}

topbar {
    background: var(--surface-grad);
    min-height: 64px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.topbar-title { 
    font-size: 1.25rem; 
    font-weight: 800; 
    color: var(--navy-dark); 
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.topbar-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }

/* Botones Esqueumórficos */
.btn-primary {
    background: var(--btn-accent-grad);
    color: var(--accent-text);
    border: 1px solid #65a30d;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.btn-primary:hover { 
    background: var(--btn-accent-hover); 
    color: #ffffff; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    box-shadow: 
        0 6px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: var(--btn-sec-grad);
    color: var(--navy-dark);
    border: 1px solid var(--border);
    padding: 0.55rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.btn-secondary:hover { 
    background: #e2e8f0; 
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
}

.btn-secondary:active {
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.12);
}

main { padding: 1.5rem; flex: 1; width: 100%; }

/* --- DASHBOARD Y TARJETAS EN RELIEVE --- */
.dash-filter-bar {
    background: var(--surface-grad);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-soft);
    flex-wrap: wrap;
}

.profile-card {
    background: var(--surface-grad);
    border-radius: 12px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    box-shadow: var(--shadow-soft);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 1px 1px rgba(255,255,255,0.3);
    border: 2px solid var(--surface);
    flex-shrink: 0;
}

.profile-info h3 { font-size: 1.2rem; color: var(--navy-dark); font-weight: 800; }
.profile-info p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }
.profile-tags { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }

.profile-tag { 
    font-size: 0.75rem; 
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%); 
    padding: 0.25rem 0.65rem; 
    border-radius: 6px; 
    font-weight: 700; 
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* --- TABLAS Y TABLERO --- */
.tab-content { display: none; }
.tab-content.active { display: block; }

.filter-card {
    background: var(--surface-grad);
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-soft);
}

/* --- CONTENEDOR Y ENCABEZADO FIJO DE TABLA MINUTA --- */
#tablaContenedorMinuta,
#tablaContenedor,
.tabla-contenedor,
.table-responsive {
    width: 100%;
    max-height: 550px;             /* Establece el límite vertical deseado */
    overflow-y: auto !important;   /* Activa el scroll vertical */
    overflow-x: auto !important;   /* Mantiene el scroll horizontal */
    position: relative;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    -webkit-overflow-scrolling: touch;
}

/* Asegura que la tabla no fuerce al contenedor a crecer ilimitadamente */
.data-table,
.minuta-tabla {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
}

/* Encabezado fijo (Sticky Header) al hacer scroll vertical */
#tablaMinuta thead th,
.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8fafc !important; /* Evita transparentar las filas tras el header */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.data-table th, .data-table td {
    padding: 0.9rem 1.2rem;
    text-align: left;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table th { 
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); 
    font-weight: 700; 
    color: var(--navy-dark); 
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

/* --- AJUSTES Y RECONFIGURACIÓN DE LA TABLA MINUTA --- */
.minuta-tabla {
    table-layout: fixed;
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.minuta-tabla th, 
.minuta-tabla td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    padding: 8px;
}

/* Soporte / Agarre de cambio de tamaño siempre visible */
.resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px; /* Área táctil de agarre */
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Línea visible central (soporte) */
.resizer::before {
    content: '';
    width: 2px;
    height: 60%;
    background-color: var(--border, #cbd5e1);
    border-radius: 1px;
    transition: background-color 0.2s ease, width 0.2s ease;
}

/* Puntos o indicador de agarre visual central */
.resizer::after {
    content: '⋮';
    position: absolute;
    font-size: 10px;
    color: var(--text-muted, #64748b);
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.2s ease, color 0.2s ease;
}

/* Estado al pasar el mouse o al arrastrar */
.resizer:hover::before,
.resizer.resizing::before {
    background-color: var(--secondary, #0284c7);
    width: 4px;
}

.resizer:hover::after,
.resizer.resizing::after {
    color: var(--secondary, #0284c7);
    opacity: 1;
}

/* KPIS ESQUEUMÓRFICOS */
.kpi-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    gap: 1.25rem; 
    margin-bottom: 1.5rem; 
}

.kpi-card { 
    background: var(--surface-grad); 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 1.25rem; 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
    box-shadow: var(--shadow-soft);
}

.kpi-icon { 
    width: 50px; 
    height: 50px; 
    border-radius: 10px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.35rem; 
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid var(--border);
    box-shadow: 
        inset 0 1px 0 rgba(255,255,255,0.9),
        0 2px 4px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.kpi-data h3 { font-size: 1.6rem; font-weight: 800; color: var(--navy-dark); line-height: 1; }
.kpi-data p { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.35rem; font-weight: 600; }

/* TABLERO KANBAN */
.board { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 1.5rem; 
    align-items: start; 
}

.column { 
    background-color: #e2e8f0; 
    border-radius: 12px; 
    border: 1px solid var(--border); 
    padding: 1rem; 
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.column-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1rem; 
    padding-bottom: 0.75rem; 
    border-bottom: 2px solid #cbd5e1; 
}

.column-title { 
    font-size: 0.875rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    color: var(--navy-dark); 
    display: flex; 
    align-items: center; 
    gap: 0.5rem; 
}

.badge-count { 
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%); 
    color: var(--navy-dark); 
    padding: 0.2rem 0.65rem; 
    border-radius: 12px; 
    font-size: 0.75rem; 
    font-weight: 800; 
    border: 1px solid #94a3b8;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.task-card { 
    background: var(--surface-grad); 
    border-radius: 10px; 
    border: 1px solid var(--border); 
    padding: 1rem; 
    margin-bottom: 0.85rem; 
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px -2px rgba(0, 0, 0, 0.12);
}

.priority-badge { 
    display: inline-block; 
    font-size: 0.7rem; 
    font-weight: 800; 
    padding: 0.2rem 0.55rem; 
    border-radius: 6px; 
    margin-bottom: 0.6rem; 
    text-transform: uppercase; 
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 1px 2px rgba(0,0,0,0.05);
}

.p-Alta { background-color: var(--danger-bg); color: var(--danger-text); border: 1px solid #fca5a5; }
.p-Media { background-color: var(--warning-bg); color: var(--warning-text); border: 1px solid #fcd34d; }
.p-Baja { background-color: var(--success-bg); color: var(--success-text); border: 1px solid #bef264; }

.task-title { font-size: 0.95rem; font-weight: 700; color: var(--navy-dark); margin-bottom: 0.4rem; }
.task-desc { font-size: 0.825rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.4; }
.task-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.775rem; color: var(--text-muted); padding-top: 0.75rem; border-top: 1px solid #f1f5f9; }

.btn-action { 
    background: var(--btn-sec-grad); 
    border: 1px solid var(--border); 
    color: var(--text-muted); 
    padding: 0.3rem 0.65rem; 
    border-radius: 6px; 
    font-size: 0.75rem; 
    font-weight: 600;
    cursor: pointer; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-action:hover {
    color: var(--navy-dark);
    border-color: #94a3b8;
}

/* --- NOTIFICACIONES POP-UP --- */
#notificationContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
    max-width: calc(100vw - 40px);
}

.toast-notification {
    width: 340px;
    max-width: 100%;
    background: var(--surface-grad);
    border-left: 5px solid var(--accent);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 
        0 12px 20px -5px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- LOGO BRANDING --- */
.brand-icon {
    width: 50px;
    height: 50px;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-link { text-decoration: none; display: inline-block; }
.brand-link:hover span { color: #ffffff; text-decoration: underline; }

/* --- MODAL BASE Y ESTRUCTURA --- */
.modal.fade.show { 
    display: flex !important; 
}

.modal { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(30, 41, 59, 0.6); 
    backdrop-filter: blur(4px); 
    justify-content: center; 
    align-items: center; 
    z-index: 1055; 
    padding: 1rem;
}

.modal-backdrop {
    z-index: 1050;
}

.modal-content { 
    background: var(--surface-grad); 
    border-radius: 14px; 
    width: 95% !important;        
    max-width: 1280px !important; 
    max-height: 94vh; 
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    border: 1px solid var(--border); 
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.modal-content > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.modal-header { 
    padding: 1rem 1.5rem; 
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); 
    border-bottom: 1px solid var(--border); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    flex-shrink: 0;
}

.modal-header h3 {
    color: var(--navy-dark);
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body { 
    padding: 1.25rem 1.5rem; 
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-grid-horizontal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

.modal-col {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.1rem;
    box-shadow: var(--shadow-soft);
}

.modal-col-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 0.5px;
    margin-bottom: 0.85rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed var(--border);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Formularios dentro del Modal */
.form-group { margin-bottom: 0.85rem; }
.form-group label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--navy-dark); margin-bottom: 0.3rem; }

.form-control { 
    width: 100%; 
    padding: 0.55rem 0.75rem; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    font-size: 0.85rem; 
    background: #fcfcfc;
    box-shadow: var(--shadow-inset);
    transition: all 0.2s ease;
}

.form-control:focus { 
    background: #ffffff;
    border-color: var(--secondary); 
    box-shadow: 
        inset 0 1px 2px rgba(0,0,0,0.05),
        0 0 0 3px rgba(2, 132, 199, 0.2); 
}

.preview-box {
    width: 100%;
    height: 120px;
    resize: vertical;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--navy-dark);
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem;
    box-shadow: var(--shadow-inset);
    outline: none;
}

.modal-footer {
    padding: 0.85rem 1.5rem;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* --- TOOLTIP ESQUEUMÓRFICO Y DINÁMICO --- */
.custom-tooltip-container {
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    width: max-content;
    max-width: 320px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: var(--navy-dark, #0f172a);
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border, #cbd5e1);
    box-shadow: 
        0 10px 18px -3px rgba(0, 0, 0, 0.18),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.custom-tooltip-container::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: var(--border, #cbd5e1) transparent transparent transparent;
}

div[style*="position: relative"]:hover > .custom-tooltip-container {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* --- BADGES E INDICADORES --- */
.badge-indicador {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

.badge-festivo { background-color: #fee2e2; border: 1px solid #ef4444; }
.badge-pendiente-baja { background-color: #fef9c3; border: 1px solid #eab308; }
.badge-pendiente-alta { background-color: #ffe4e6; border: 1px solid #f43f5e; }
.badge-completada { background-color: #dcfce7; border: 1px solid #22c55e; }


/* =============================================================================
   REGLAS ADAPTATIVAS (RESPONSIVE DESIGN PARA MÓVILES Y TABLETS)
   ============================================================================= */

@media (max-width: 768px) {
    body {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    aside {
        width: 100%;
        box-shadow: none;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    }

    .nav-menu {
        max-height: 180px;
    }

    topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        height: auto;
        padding: 1rem;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
    }

    main {
        padding: 1rem;
    }

    .profile-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .board {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 0.5rem;
    }

    .modal-content {
        width: 100% !important;
        max-height: 98vh;
        border-radius: 10px;
    }

    .modal-grid-horizontal {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer button {
        width: 100%;
    }

    .custom-tooltip-container {
        display: none !important;
    }
}

