/* VARIABLES GLOBALES */
:root {
    --primary-blue: #3471b0;
    --accent-yellow: #fbc531;
    --white: #ffffff;
    --text-dark: #2d3436;
    --bg-light: #e9ecef;
}

/* RESET GENERAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CONTENEDOR PRINCIPAL */
.app-container {
    display: flex;
    width: 95vw;
    height: 90vh;
    background: var(--white);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

/* --- DISEÑO LADO IZQUIERDO --- */
.design-side {
    flex: 1.3;
    background-color: var(--primary-blue);
    padding: 60px;
    display: flex;
    flex-direction: column;
    position: relative;
    color: var(--white);
}

.star {
    position: absolute;
    color: var(--accent-yellow);
    opacity: 0.8;
}
.star-top { top: 30px; left: 30px; font-size: 50px; }
.star-bottom { bottom: 40px; right: 40px; font-size: 85px; }

.design-side h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    z-index: 2;
}

.design-side h1 span {
    color: var(--accent-yellow);
}

.subtitle {
    margin-top: 20px;
    font-size: 1.1rem;
    font-weight: 300;
    max-width: 80%;
    opacity: 0.9;
    z-index: 2;
}

/* IMAGEN DEBAJO DE LAS LETRAS */
.image-placeholder {
    margin-top: 35px;
    width: 100%;
    flex-grow: 1;
    border-radius: 20px;
    /* CAMBIA ESTA URL POR TU IMAGEN */
    background-image: url('https://images.unsplash.com/photo-1523240715181-014b9e81883e?auto=format&fit=crop&w=800&q=80');
    background-size: cover;
    background-position: center;
    border: 5px solid rgba(255,255,255,0.15);
    z-index: 2;
}

.footer-link {
    margin-top: 25px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    z-index: 2;
    letter-spacing: 1px;
}

/* --- PANEL LADO DERECHO --- */
.login-side {
    flex: 1;
    background: #fdfdfd;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.bruner-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    color: var(--primary-blue);
    margin-bottom: 50px;
    font-weight: 800;
    letter-spacing: -1px;
}

.login-box {
    width: 100%;
    max-width: 380px;
}

.login-box h2 {
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    text-align: center;
}

.login-box p {
    color: #636e72;
    text-align: center;
    margin-bottom: 40px;
    font-size: 0.95rem;
}

/* BOTONES DE ACCESO */
.btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px;
    margin-bottom: 20px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.btn-student {
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 10px 20px rgba(52, 113, 176, 0.25);
}

.btn-student:hover {
    transform: scale(1.02) translateY(-5px);
    background-color: #2980b9;
}

.btn-admin {
    background-color: #fff;
    color: var(--primary-blue);
    border: 2px solid #e2e8f0;
}

.btn-admin:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-blue);
    transform: scale(1.02) translateY(-3px);
}

.btn .icon {
    font-size: 2rem;
    margin-right: 15px;
}

.btn .text-container b {
    display: block;
    line-height: 1.2;
}

.btn .text-container span {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.8;
}

/* RESPONSIVIDAD */
@media (max-width: 1024px) {
    .app-container { flex-direction: column; height: auto; margin: 20px; }
    .design-side { padding: 30px; }
    .design-side h1 { font-size: 2.2rem; }
    .image-placeholder { height: 250px; margin-top: 20px; }
}

/* --- NUEVA ESTRUCTURA DASHBOARD --- */

.admin-layout {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f0f2f5;
}

/* El bloque azul centrado y arriba */
.main-header-banner {
    width: 100%;
    max-width: 1200px;
    background-color: var(--primary-blue);
    color: white;
    padding: 50px 20px;
    text-align: center;
    border-radius: 0 0 40px 40px; /* Redondeado solo abajo */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.banner-content p {
    font-size: 0.9rem;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.banner-content h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
}

/* Contenedor de las fichas */
.dashboard-grid-container {
    width: 100%;
    max-width: 1100px;
    padding: 0 20px 60px 20px;
}

.user-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: #636e72;
}

.user-bar a {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
}

/* Grid de 2x2 para las fichas debajo del banner */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.fich-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2d3436;
    transition: all 0.3s ease;
    border: 1px solid #edf2f7;
}

.fich-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: var(--primary-blue);
}

.fich-icon {
    width: 70px;
    height: 70px;
    background: #f8f9fa;
    border-radius: 15px;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.fich-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.fich-info p {
    font-size: 0.85rem;
    color: #7f8c8d;
    line-height: 1.4;
}

/* Responsive móvil */
@media (max-width: 800px) {
    .cards-grid { grid-template-columns: 1fr; }
    .banner-content h1 { font-size: 1.6rem; }
}

/* ============================================================
   ESTILOS GLOBALES - ELECCIONES COLEGIO BRUNER 2026
   ============================================================ */

:root {
    --primary-blue: #3471b0;     /* Azul institucional de tu imagen */
    --accent-yellow: #fbc531;   /* Amarillo de las estrellas */
    --glow-blue: rgba(52, 113, 176, 0.5);
    --white: #ffffff;
    --bg-light: #f0f2f5;
    --text-dark: #2d3436;
    --text-gray: #636e72;
}

/* 1. SECCIÓN: LOGINS (ESTUDIANTE Y ADMIN) 
   Diseño con borde azul luminoso (Glow Effect) */
   
.login-body-bg {
    background-color: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

/* VERSÍON SUAVE DEL BRILLO (SOFT GLOW) */
.card-login-glow {
    background: var(--white);
    padding: 50px;
    border-radius: 25px;
    text-align: center;
    width: 100%;
    max-width: 420px;
    
    /* BORDE AZUL MÁS DELGADO */
    border: 1.5px solid rgba(52, 113, 176, 0.3);
    
    /* BRILLO SUAVE: Menos intensidad, más difuminado */
    box-shadow: 0 10px 40px rgba(52, 113, 176, 0.15), 
                0 0 20px rgba(52, 113, 176, 0.05);
                
    transition: all 0.4s ease;
}

/* Efecto al pasar el mouse un poco más notable pero controlado */
.card-login-glow:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue);
    box-shadow: 0 15px 50px rgba(52, 113, 176, 0.2);
}

.input-bruner {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    border: 2px solid #edf2f7;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.input-bruner:focus {
    border-color: var(--primary-blue);
}

.btn-bruner-primary {
    width: 100%;
    padding: 16px;
    margin-top: 20px;
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-bruner-primary:hover {
    background-color: #2980b9;
}

/* 2. SECCIÓN: DASHBOARD ADMINISTRADOR 
   Diseño de Banner Superior y Fichas Horizontales */

.admin-banner-header {
    width: 100%;
    max-width: 1200px;
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 45px 20px;
    text-align: center;
    border-radius: 0 0 40px 40px; /* Bordes redondeados solo abajo */
    margin: 0 auto 40px auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.admin-banner-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    margin: 0;
}

.admin-banner-header p {
    font-size: 0.85rem;
    letter-spacing: 3px;
    opacity: 0.8;
    text-transform: uppercase;
}

.grid-dashboard-horizontal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

.ficha-admin {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    border: 1px solid #edf2f7;
    transition: all 0.3s ease;
}

.ficha-admin:hover {
    transform: translateY(-8px);
    border-color: var(--primary-blue);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.ficha-icon {
    width: 70px;
    height: 70px;
    background: #f8f9fa;
    border-radius: 15px;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
}

.ficha-text h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.ficha-text p {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.4;
}

/* 3. SECCIÓN: UTILIDADES */

.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }

.btn-logout-small {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid #e74c3c;
    padding: 5px 15px;
    border-radius: 8px;
    transition: 0.3s;
}

.btn-logout-small:hover {
    background: #e74c3c;
    color: white;
}

/* Responsivo para celulares */
@media (max-width: 800px) {
    .grid-dashboard-horizontal { grid-template-columns: 1fr; }
    .admin-banner-header h1 { font-size: 1.6rem; }
}

/* --- TABLAS DE DATOS BRUNER --- */
.container-admin {
    max-width: 1100px;
    margin: 30px auto;
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.table-bruner {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table-bruner th {
    background: var(--primary-blue);
    color: white;
    padding: 15px;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
}

.table-bruner td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #444;
}

.status-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-voted { background: #dcfce7; color: #166534; }
.status-pending { background: #fee2e2; color: #991b1b; }


/* ============================================================
   AJUSTES PARA PADRÓN (BASADO EN ESTRUCTURA DASHBOARD)
   ============================================================ */

/* Quitar el efecto hover a las tarjetas que contienen formularios */
.fich-card.no-hover {
    cursor: default;
    transform: none !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
}

.border-dashed {
    border: 2px dashed #3471b0 !important;
}

/* Inputs estilo Dashboard */
.input-dashboard {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

.btn-dashboard {
    background-color: #3471b0;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-dashboard.btn-green { background-color: #2ecc71; }
.btn-dashboard:hover { opacity: 0.9; }

/* Tabla Estilizada */
.table-container-full {
    margin-top: 30px;
    display: block !important; /* Forzar que ocupe el ancho */
    width: 100%;
    box-sizing: border-box;
}

.table-dashboard {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table-dashboard th {
    background: #f8fafc;
    color: #3471b0;
    text-align: left;
    padding: 12px;
    border-bottom: 2px solid #3471b0;
    font-size: 0.85rem;
}

.table-dashboard td {
    padding: 12px;
    border-bottom: 1px solid #f1f2f6;
    font-size: 0.9rem;
}

/* Pills de estado */
.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}
.status-pill.pending { background: #fef3c7; color: #92400e; }
.status-pill.voted { background: #d1fae5; color: #065f46; }

.badge-total {
    background: #3471b0;
    color: white;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
}


/* --- Mejoras para la Tabla y Paginación --- */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f2f6;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #636e72;
    margin-right: 8px;
}

.control-group select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #dfe6e9;
    background: #fff;
    cursor: pointer;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination a {
    text-decoration: none;
    color: #3471b0;
    padding: 8px 15px;
    border-radius: 8px;
    background: #f1f2f6;
    font-weight: 600;
    font-size: 0.8rem;
    transition: 0.3s;
}

.pagination a.active {
    background: #3471b0;
    color: white;
}

.pagination a:hover:not(.active) {
    background: #dfe6e9;
}

.badge-total {
    background: #3471b0;
    color: white;
    padding: 6px 15px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
}

/* --- Botón de Edición --- */
.btn-edit {
    color: #3471b0; /* Azul del colegio */
    font-size: 1.1rem;
    padding: 8px;
    border-radius: 6px;
    background: #f1f2f6;
    text-decoration: none;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-edit:hover {
    background-color: #3471b0;
    color: white;
    transform: scale(1.1);
}

/* Ajuste de la tabla para que no se vea apretado */
.table-dashboard td {
    vertical-align: middle;
}

/* Botón Acción Editar */
.btn-edit {
    color: #3471b0;
    font-size: 0.9rem;
    padding: 6px 9px;
    border-radius: 8px;
    background: #f1f2f6;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid #dfe6e9;
}

.btn-edit:hover { background: #3471b0; color: white; }

/* Botón Inhabilitar (Rojo) */
.btn-status-off {
    color: #e74c3c;
    background: #fdf2f2;
    padding: 6px 9px;
    border-radius: 8px;
    border: 1px solid #fadbd8;
    transition: 0.3s;
}

.btn-status-off:hover { background: #e74c3c; color: white; }

/* Botón Habilitar (Verde) */
.btn-status-on {
    color: #2ecc71;
    background: #f0fdf4;
    padding: 6px 9px;
    border-radius: 8px;
    border: 1px solid #d1fae5;
    transition: 0.3s;
}

.btn-status-on:hover { background: #2ecc71; color: white; }

/* Estilo para filas inhabilitadas */
tr[style*="opacity: 0.5"] td {
    color: #b2bec3;
}

/* ============================================================
   RESPONSIVE DESIGN (MÓVILES Y TABLETS)
   ============================================================ */

/* Para Tablets (Pantallas menores a 1024px) */
@media (max-width: 1024px) {
    .dashboard-grid-container {
        margin: -50px auto 30px auto;
        padding: 0 15px;
    }
    
    .txt-elecciones {
        font-size: 1.8rem;
    }
}

/* Para Celulares (Pantallas menores a 768px) */
@media (max-width: 768px) {
    /* 1. El banner reduce su tamaño */
    .main-header-banner {
        padding: 40px 10px 100px 10px;
    }
    
    .txt-elecciones {
        font-size: 1.4rem;
    }

    /* 2. Las tarjetas pasan de 2 columnas a 1 sola */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* 3. La barra de usuario se vuelve vertical si es necesario */
    .user-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* 4. HACER LA TABLA DESLIZABLE (Súper importante) */
    .table-container-full {
        overflow-x: auto; /* Permite scroll lateral */
        padding: 15px;
    }

    .table-dashboard {
        min-width: 600px; /* Evita que las columnas se aplasten demasiado */
    }

    /* 5. Ajustes de controles de tabla */
    .table-controls {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .badge-total {
        align-self: flex-end;
    }
}

/* Ajuste para formularios en móviles */
@media (max-width: 480px) {
    .card-content-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .card-icon-bg {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Estilo para el buscador */
.search-box {
    position: relative;
    flex-grow: 1; /* Hace que el buscador tome el espacio central */
    margin: 0 30px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #b2bec3;
}

.search-box input {
    width: 100%;
    padding: 8px 10px 8px 35px;
    border: 1px solid #dfe6e9;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: 0.3s;
}

.search-box input:focus {
    border-color: #3471b0;
    box-shadow: 0 0 8px rgba(52, 113, 176, 0.1);
}

/* Responsivo: En móvil el buscador ocupa su propia línea */
@media (max-width: 768px) {
    .search-box {
        margin: 10px 0;
        width: 100%;
    }
}

