/* ═══════════════════════════════════════════════════════════════
   CONTROL DE HORAS - COORDINADORES
   Instituto CEC - 2026
   ═══════════════════════════════════════════════════════════════ */

:root {
    --primary: #4f46e5;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f3f4f6;
    --dark: #1f2937;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f8fafc;
    color: #334155;
}

.container { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HEADER
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.page-header {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-left { display: flex; align-items: center; gap: 20px; }
.header-title h1 { font-size: 24px; margin-bottom: 5px; color: var(--dark); }
.header-title .subtitle { color: #64748b; font-size: 14px; }
.user-info { color: #64748b; font-size: 14px; }

.btn-back {
    background: var(--light);
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-back:hover { background: #e2e8f0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ACTION BAR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.action-bar {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.week-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-date {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

.week-range {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.action-right { display: flex; gap: 10px; }

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #4338ca; }

.btn-secondary { background: var(--secondary); color: white; }
.btn-secondary:hover { background: #059669; }

.btn-success { background: var(--info); color: white; }
.btn-success:hover { background: #2563eb; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SUMMARY CARDS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.card-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.card-icon.green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.card-icon.orange { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }

.card-content h3 { font-size: 28px; margin-bottom: 5px; color: var(--dark); }
.card-content p { color: #64748b; font-size: 14px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SEARCH BAR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.search-bar {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar i { color: #94a3b8; }

.search-bar input {
    flex: 1;
    border: none;
    font-size: 14px;
    outline: none;
}

.btn-clear {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
}

.btn-clear:hover { color: var(--danger); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TABLE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.coordinadores-table {
    width: 100%;
    border-collapse: collapse;
}

.coordinadores-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.coordinadores-table th {
    padding: 15px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.coordinadores-table td {
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.coordinadores-table tbody tr:hover {
    background: #f8fafc;
}

.coord-info strong { display: block; margin-bottom: 3px; color: var(--dark); }
.coord-info small { color: #94a3b8; font-size: 12px; }

.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-normal { background: #d1fae5; color: #059669; }
.badge-alto { background: #fed7aa; color: #ea580c; }
.badge-critico { background: #fecaca; color: #dc2626; }

.btn-icon {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--light);
    color: var(--primary);
}

.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.text-success { color: var(--secondary); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MODALES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-large { max-width: 800px; }
.modal-xlarge { max-width: 1200px; }

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--light);
    color: var(--dark);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FORM
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #64748b;
}

.section-title {
    font-size: 16px;
    color: var(--dark);
    margin: 20px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light);
}

.separator-line {
    height: 1px;
    background: #e2e8f0;
    margin: 20px 0;
}

.summary-box {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.summary-box h4 {
    font-size: 14px;
    margin-bottom: 15px;
    color: var(--dark);
}

.summary-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.week-info {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #64748b;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DETALLE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.detalle-container {
    padding: 10px;
}

.detalle-total {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    text-align: center;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.detalle-total h2 {
    font-size: 48px;
    margin-bottom: 5px;
}

.detalle-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.detalle-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--dark);
}

.detalle-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.detalle-table th {
    background: #f1f5f9;
    padding: 10px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
}

.detalle-table td {
    padding: 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-right {
        flex-direction: column;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .coordinadores-table {
        font-size: 12px;
    }
    
    .coordinadores-table th,
    .coordinadores-table td {
        padding: 10px 8px;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 10px;
    }
}
