/* css/estilos.css */

/* --- CONFIGURACIÓN GENERAL --- */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #18bc9c;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --border-color: #bdc3c7;
    --text-color: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: var(--text-color);
    margin: 0;
    padding: 20px;
}

/* --- CABECERA (HEADER) --- */
.header-container {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.welcome-msg {
    font-weight: bold;
    color: #18bc9c;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--secondary-color);
}

/* Formulario inline de Login */
.login-inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.login-inline-form input {
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    outline: none;
    font-size: 0.9em;
}

/* --- BOTONES --- */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
    background-color: #7f8c8d;
    color: white;
}

.btn:active {
    transform: scale(0.98);
}

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

.btn-danger { background-color: var(--danger-color); color: white; }
.btn-danger:hover { background-color: #c0392b; }

.btn-success { background-color: #2ecc71; color: white; }
.btn-success:hover { background-color: #27ae60; }

/* --- CONTROLES DE LA SEMANA --- */
.semana-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.semana-titulo {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
}

.btn-nav {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
}

.btn-nav:hover {
    background-color: #34495e;
}

/* --- REJILLA Y TABLAS (CALENDARIO) --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
    margin-bottom: 30px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

th, td {
    padding: 12px;
    text-align: center;
    border-radius: 4px;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.hora-col {
    background-color: #34495e;
    width: 80px;
}

.hora-cell {
    background-color: var(--light-bg);
    font-weight: bold;
    color: var(--primary-color);
}

/* ESTADOS DE LAS CELDAS */
.celda-pasada {
    background-color: #f2f2f2;
    color: #95a5a6;
    font-size: 0.85em;
    cursor: not-allowed;
}

.celda-disponible {
    display: block;
    background-color: #e8f8f5;
    color: #117a65;
    text-decoration: none;
    font-weight: bold;
    padding: 8px;
    border: 1px solid #a3e4d7;
    border-radius: 4px;
    transition: all 0.2s;
}

.celda-disponible:hover {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.celda-propia {
    background-color: #ebf5fb;
    color: #2980b9;
    border: 1px solid #aed6f1;
    font-weight: bold;
    padding: 8px;
    border-radius: 4px;
}

.celda-ocupada {
    background-color: #fdebd0;
    color: #e67e22;
    border: 1px solid #f9e79f;
    font-weight: bold;
    padding: 8px;
    border-radius: 4px;
}

.celda-clase {
    background-color: #fadbd8;
    color: var(--danger-color);
    border: 1px solid #f5b7b1;
    font-weight: bold;
    padding: 8px;
    border-radius: 4px;
}

/* --- PANEL DE ADMINISTRACIÓN (DASHBOARD) --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 8px;
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 0.9em;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

/* Badges de Estado */
.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
}
.badge-activo { background-color: #d4edda; color: #155724; }
.badge-baneado { background-color: #f8d7da; color: #721c24; }

/* Banners de error generales */
.error-banner {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-weight: bold;
    border-left: 5px solid var(--danger-color);
}

.celda-mantenimiento {
    background-color: #f2f4f4;
    color: #7f8c8d;
    border: 1px solid #d5dbdb;
    padding: 6px;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    font-size: 0.9em;
}