/* ==========================================================
   PANEL GENERAL
   ========================================================== */

body {
    background: #0f172a;
    color: #fff;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px;
}


/* ==========================================================
   HEADER SUPERIOR DEL PANEL (debajo de cabecera navideña)
   ========================================================== */

.panel-header {
    background: #020617;
    position: sticky;
    top: 72px; /* deja espacio para cabecera navideña */
    z-index: 20;
    border-bottom: 1px solid #020617; /* invisible */
}

@media (min-width: 768px) {
    .panel-header {
        top: 80px;
    }
}

/* Contenedor alineado con los logos navideños */
.panel-header-inner {
    width: 100%;
    margin: 0;                /* ya no centramos el bloque */
    padding: 8px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;  /* "Bienvenido" a la izquierda, botón a la derecha */
}

/* Bloque "Bienvenido, Neto" */
.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    color: #e5e7eb;
}

.user-sub {
    font-size: 12px;
    color: #9ca3af;
}

/* Rol */
.rol-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 6px;
    margin-left: 6px;
    font-weight: 600;
}

.rol-admin {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.rol-profe {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

/* Botón Cerrar sesión */
.logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid #fca5a5;
    background: rgba(248, 113, 113, 0.08);
    color: #fecaca;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.logout-btn:hover {
    background: rgba(248, 113, 113, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(248, 113, 113, 0.25);
}

/* ============================================
   MÓVIL — ajustes correctos
   ============================================ */
@media (max-width: 640px) {

    .panel-header-inner {
        padding: 8px 12px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .user-info {
        max-width: 65%;
    }

    .logout-btn {
        padding: 4px 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    main {
        padding: 20px 12px;
    }
}


/* ==========================================================
   TARJETAS DE RESUMEN
   ========================================================== */

.tarjeta-resumen-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tarjeta-resumen {
    flex: 1;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(6px);
}

.tarjeta-resumen h2 {
    font-size: 42px;
    margin: 10px 0 0 0;
}


/* ==========================================================
   TARJETAS DE PROFESORES
   ========================================================== */

.profe-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.profe-card h3 {
    margin: 0 0 8px 0;
}

.profe-card small {
    display: block;
    color: #b0b8c5;
    margin-bottom: 12px;
}

.boton-ver-mesas {
    display: inline-block;
    background: #2563eb;
    padding: 8px 20px;
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.boton-ver-mesas:hover {
    background: #1d4ed8;
}


/* ==========================================================
   MESAS (dentro de panel-mesas.php)
   ========================================================== */

.mesas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.mesa-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    backdrop-filter: blur(6px);
}



/* ==========================================================
   FIN
   ========================================================== */
   
   /* ==========================================================
   NUEVO DASHBOARD VISUAL
   ========================================================== */

/* Ajuste textos cabecera */
.dashboard-header { margin-bottom: 32px; }
.dashboard-header h1 { margin-bottom: 4px; font-size: 2rem; background: linear-gradient(to right, #fff, #94a3b8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.text-muted { color: #64748b; margin: 0; }
.section-divider h2 { font-size: 1.25rem; margin: 40px 0 20px 0; color: #e2e8f0; border-left: 4px solid #3b82f6; padding-left: 12px; }

/* GRID DE ESTADÍSTICAS SUPERIORES */
.resumen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.8));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.2); }

.stat-icon {
    font-size: 2rem;
    background: rgba(255,255,255,0.05);
    width: 60px; height: 60px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px;
}

.stat-info { display: flex; flex-direction: column; }
.stat-label { font-size: 0.85rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-number { font-size: 1.8rem; font-weight: 700; color: #fff; }

/* Colores específicos stats */
.stat-card.ocupados .stat-number { color: #fbbf24; } /* Amarillo */
.stat-card.libres .stat-number { color: #4ade80; } /* Verde */

/* GRID DE PROFESORES */
.profesores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.profe-card-modern {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.profe-card-modern:hover {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-color: #475569;
    transform: translateY(-2px);
}

/* Cabecera de la tarjeta */
.card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.avatar-circle {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.profe-info h3 { margin: 0; font-size: 1.1rem; color: #f1f5f9; }
.status-badge {
    font-size: 0.75rem;
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Cuerpo de la tarjeta y Barra de Progreso */
.card-body { padding: 20px; }

.progress-track {
    height: 8px;
    background: #0f172a;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

.mini-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #cbd5e1;
}

/* Pie de tarjeta (Botón) */
.card-footer {
    padding: 16px 20px;
    background: rgba(0,0,0,0.1);
    margin-top: auto; /* Empuja al fondo */
}

.btn-ver {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-ver:hover { background: #3b82f6; color: white; }

/* Estados desactivados */
.profe-card-modern.disabled { opacity: 0.6; }
.profe-card-modern.disabled .avatar-circle { background: #475569; }
.btn-ver.disabled { background: transparent; color: #64748b; cursor: not-allowed; border: 1px solid #334155; }