/* ====================================================
   VotoElect - Sistema de Voto Electrónico
   Estilos personalizados
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Paleta de colores principal */
    --primary: #0d6efd;
    --primary-dark: #0b5ed7;
    --primary-gradient: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    --secondary: #6c757d;
    --success: #198754;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    
    /* Colores de fondo */
    --bg-main: #f0f2f5;
    --bg-sidebar: #0d1b2a;
    --bg-sidebar-hover: #1b2838;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f9ff;
    
    /* Tipografía */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 20px rgba(13,110,253,0.15);
    
    /* Bordes */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Sidebar */
    --sidebar-width: 260px;
    
    /* Transiciones */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-main);
    color: #1a1a2e;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ====================================================
   Scrollbar personalizado
   ==================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

/* ====================================================
   Layout principal - Admin
   ==================================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ====================================================
   Sidebar
   ==================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-smooth);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-brand .brand-icon {
    font-size: 2.5rem;
    margin-bottom: 6px;
    display: block;
}

.sidebar-brand h4 {
    font-weight: 700;
    font-size: 1.2rem;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.sidebar-brand small {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    display: block;
    margin-top: 2px;
}

.sidebar-menu {
    padding: 15px 0;
    flex: 1;
}

.sidebar-menu .menu-category {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.3);
    padding: 15px 20px 8px;
    font-weight: 600;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-menu a:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
    border-left-color: var(--primary);
}

.sidebar-menu a.active {
    background: rgba(13,110,253,0.12);
    color: #fff;
    border-left-color: var(--primary);
}

.sidebar-menu a .icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 0;
    transition: color var(--transition-fast);
}

.sidebar-footer a:hover {
    color: var(--danger);
}

/* ====================================================
   Main content
   ==================================================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    background: var(--bg-card);
    padding: 12px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar .page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
}

.topbar .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.topbar .btn-toggle-sidebar {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #333;
    padding: 5px;
}

/* Content area */
.content-area {
    padding: 25px 30px;
    flex: 1;
}

/* ====================================================
   Cards Estadísticas (Vibrant Gradient Cards)
   ==================================================== */
.stat-card {
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: none;
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.25);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -25px;
    right: -25px;
    width: 110px;
    height: 110px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    pointer-events: none;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card:hover::after {
    transform: scale(1.25);
    background: rgba(255, 255, 255, 0.18);
}

/* Card 1: Azul / Océano */
.stat-card.card-blue,
.stat-card.stat-card-blue,
.stat-card:has(.stat-icon.blue) {
    background: linear-gradient(135deg, #0d6efd 0%, #1d4ed8 50%, #0284c7 100%);
    box-shadow: 0 10px 25px -4px rgba(13, 110, 253, 0.38);
}
.stat-card.card-blue:hover,
.stat-card.stat-card-blue:hover,
.stat-card:has(.stat-icon.blue):hover {
    box-shadow: 0 14px 30px -2px rgba(13, 110, 253, 0.5);
}

/* Card 2: Verde / Esmeralda */
.stat-card.card-green,
.stat-card.stat-card-green,
.stat-card:has(.stat-icon.green) {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #0d9488 100%);
    box-shadow: 0 10px 25px -4px rgba(16, 185, 129, 0.38);
}
.stat-card.card-green:hover,
.stat-card.stat-card-green:hover,
.stat-card:has(.stat-icon.green):hover {
    box-shadow: 0 14px 30px -2px rgba(16, 185, 129, 0.5);
}

/* Card 3: Púrpura / Violeta */
.stat-card.card-purple,
.stat-card.stat-card-purple,
.stat-card:has(.stat-icon.purple) {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 50%, #7c3aed 100%);
    box-shadow: 0 10px 25px -4px rgba(139, 92, 246, 0.38);
}
.stat-card.card-purple:hover,
.stat-card.stat-card-purple:hover,
.stat-card:has(.stat-icon.purple):hover {
    box-shadow: 0 14px 30px -2px rgba(139, 92, 246, 0.5);
}

/* Card 4: Naranja / Atardecer */
.stat-card.card-orange,
.stat-card.stat-card-orange,
.stat-card:has(.stat-icon.orange) {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #eab308 100%);
    box-shadow: 0 10px 25px -4px rgba(249, 115, 22, 0.38);
}
.stat-card.card-orange:hover,
.stat-card.stat-card-orange:hover,
.stat-card:has(.stat-icon.orange):hover {
    box-shadow: 0 14px 30px -2px rgba(249, 115, 22, 0.5);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.22) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.stat-card .stat-number {
    font-size: 1.9rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    position: relative;
    z-index: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    letter-spacing: 0.2px;
    position: relative;
    z-index: 1;
}

/* ====================================================
   Card genérica
   ==================================================== */
.card-custom {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
    overflow: hidden;
}

.card-custom .card-header-custom {
    padding: 16px 22px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.01);
}

.card-custom .card-header-custom h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.card-custom .card-body-custom {
    padding: 22px;
}

/* ====================================================
   Tablas 
   ==================================================== */
.table-custom {
    width: 100%;
    border-collapse: collapse;
}

.table-custom thead th {
    background: #f8f9ff;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: #555;
    padding: 12px 15px;
    border-bottom: 2px solid rgba(13,110,253,0.1);
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    font-size: 0.85rem;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background: var(--bg-card-hover);
}

/* ====================================================
   Botones
   ==================================================== */
.btn-primary-custom {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
    color: #fff;
}

.btn-sm-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.8rem;
}

.btn-sm-action.edit {
    background: rgba(13,110,253,0.1);
    color: var(--primary);
}
.btn-sm-action.edit:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sm-action.delete {
    background: rgba(220,53,69,0.1);
    color: var(--danger);
}
.btn-sm-action.delete:hover {
    background: var(--danger);
    color: #fff;
}

/* ====================================================
   Badges / Estado
   ==================================================== */
.badge-estado {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-estado.pendiente { background: rgba(255,193,7,0.15); color: #856404; }
.badge-estado.activa { background: rgba(25,135,84,0.15); color: var(--success); }
.badge-estado.finalizada { background: rgba(13,110,253,0.15); color: var(--primary); }
.badge-estado.cancelada { background: rgba(220,53,69,0.15); color: var(--danger); }

/* ====================================================
   Formularios
   ==================================================== */
.form-floating-custom .form-control,
.form-floating-custom .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(0,0,0,0.1);
    padding: 10px 14px;
    font-size: 0.88rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-floating-custom .form-control:focus,
.form-floating-custom .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,110,253,0.12);
}

/* ====================================================
   Modales
   ==================================================== */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--primary-gradient);
    color: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 16px 22px;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: 1rem;
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 14px 22px;
}

/* ====================================================
   Login Page
   ==================================================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, #0f172a 0%, #1e1b4b 60%, #090d16 100%);
    position: relative;
    padding: 30px 15px;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.18) 0%, transparent 70%);
    top: -150px;
    left: -100px;
    border-radius: 50%;
    pointer-events: none;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(102, 16, 242, 0.15) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    border-radius: 50%;
    pointer-events: none;
}

/* Tarjeta Dividida en 2 Columnas */
.login-split-card {
    width: 100%;
    max-width: 940px;
    background: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    min-height: 460px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Columna Izquierda: Institución Educativa */
.login-split-left {
    flex: 1.1;
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #1e1b4b 100%);
    color: #ffffff;
    padding: 32px 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.login-split-left::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.inst-logo-container {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    padding: 10px;
}

.inst-logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.inst-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.4px;
    line-height: 1.25;
    margin-bottom: 8px;
    color: #ffffff;
}

.inst-lema-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.78rem;
    font-weight: 600;
    color: #38bdf8;
    margin-bottom: 18px;
}

.inst-info-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.inst-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: #cbd5e1;
}

.inst-info-item i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.inst-security-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.inst-chip {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.6);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.inst-chip i {
    color: #10b981;
}

/* Columna Derecha: Formulario de Login */
.login-split-right {
    flex: 1;
    background: #ffffff;
    padding: 32px 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-sys-logo {
    max-height: 80px;
    max-width: 220px;
    object-fit: contain;
    margin: 0 auto 8px auto;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

.login-form-title {
    font-weight: 800;
    font-size: 1.4rem;
    color: #0f172a;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.login-form-subtitle {
    font-size: 0.82rem;
    color: #64748b;
    margin-bottom: 18px;
}

.input-group-custom {
    position: relative;
    margin-bottom: 14px;
}

.input-group-custom .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    z-index: 5;
    transition: color 0.2s ease;
}

.input-group-custom .form-control {
    padding-left: 42px;
    padding-right: 14px;
    height: 44px;
    border-radius: var(--radius-md);
    border: 1.5px solid #e2e8f0;
    font-size: 0.88rem;
    background: #f8fafc;
    color: #0f172a;
    transition: all 0.25s ease;
}

.input-group-custom .form-control:focus {
    background: #ffffff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

.input-group-custom .form-control:focus + .input-icon,
.input-group-custom:focus-within .input-icon {
    color: #0d6efd;
}

.btn-login-submit {
    width: 100%;
    height: 44px;
    background: linear-gradient(135deg, #0d6efd 0%, #4f46e5 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px -4px rgba(13, 110, 253, 0.35);
    margin-top: 6px;
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #4338ca 100%);
    box-shadow: 0 12px 25px -4px rgba(13, 110, 253, 0.5);
    transform: translateY(-2px);
    color: #ffffff;
}

/* Responsive Split Screen */
@media (max-width: 868px) {
    .login-split-card {
        flex-direction: column;
        max-width: 480px;
    }

    .login-split-left {
        padding: 30px 25px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .login-split-right {
        padding: 35px 25px;
    }

    .inst-title {
        font-size: 1.4rem;
    }
}

.login-card .login-icon {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 6px;
    display: block;
}

.login-card h2 {
    text-align: center;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-card p {
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    margin-bottom: 20px;
}

.login-card .mb-3 {
    margin-bottom: 0.75rem !important;
}

.login-card .form-control {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 9px 14px;
    font-size: 0.88rem;
}

.login-card .form-control::placeholder {
    color: rgba(255,255,255,0.35);
}

.login-card .form-control:focus {
    background: rgba(255,255,255,0.12);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,110,253,0.2);
    color: #fff;
}

.login-card .form-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.login-card .btn-login {
    width: 100%;
    background: var(--primary-gradient);
    border: none;
    padding: 10px;
    border-radius: var(--radius-md);
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 6px;
}

.login-card .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13,110,253,0.3);
}

/* ====================================================
   Votación - Interfaz de votante
   ==================================================== */
.voting-wrapper {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, #eef2ff 0%, #f8fafc 60%, #f1f5f9 100%);
}

.voting-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 14px 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.voting-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.voting-header .brand-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.voting-header .brand h5 {
    margin: 0;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.voting-content {
    max-width: 1000px;
    margin: 25px auto 40px;
    padding: 0 20px;
}

/* ====================================================
   Hero Banner de Votación
   ==================================================== */
.hero-section-voting {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e1b4b 100%);
    border-radius: var(--radius-xl);
    padding: 32px 36px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.35);
    margin-bottom: 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-section-voting::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(13, 110, 253, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section-voting::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 20%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 14px;
}

.pulse-dot-green {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.25;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: #94a3b8;
    font-size: 0.92rem;
    max-width: 600px;
    margin-bottom: 0;
}

.hero-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.hero-chip-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.5);
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hero-chip-item i {
    color: #38bdf8;
}

/* ====================================================
   Tarjeta de Elección Profesional (.election-card-modern)
   ==================================================== */
.election-card-modern {
    background: #ffffff;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.election-card-modern:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -10px rgba(13, 110, 253, 0.18), 0 8px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: rgba(13, 110, 253, 0.3);
}

.election-card-accent-bar {
    height: 5px;
    background: linear-gradient(90deg, #0d6efd 0%, #6610f2 50%, #06b6d4 100%);
    width: 100%;
}

.election-card-body {
    padding: 28px 26px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.election-icon-box {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    border: 1px solid rgba(199, 210, 254, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #4338ca;
    margin-bottom: 18px;
    box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.15);
    transition: transform 0.3s ease;
}

.election-card-modern:hover .election-icon-box {
    transform: scale(1.08) rotate(-3deg);
    background: linear-gradient(135deg, #4f46e5 0%, #0d6efd 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px -6px rgba(13, 110, 253, 0.35);
}

.election-title {
    font-weight: 800;
    font-size: 1.25rem;
    color: #0f172a;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.election-description {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 20px;
    max-width: 90%;
}

.election-meta-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 500;
}

.election-meta-box i {
    color: #0d6efd;
    font-size: 0.95rem;
}

.status-badge-active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 30px;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.btn-vote-now {
    width: 100%;
    background: linear-gradient(135deg, #0d6efd 0%, #4f46e5 100%);
    color: #ffffff !important;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.3);
}

.btn-vote-now:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #4338ca 100%);
    box-shadow: 0 8px 22px rgba(13, 110, 253, 0.45);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-vote-now i.arrow-icon {
    transition: transform 0.3s ease;
}

.btn-vote-now:hover i.arrow-icon {
    transform: translateX(4px);
}

/* Tarjetas Ficha por Lista (Voto por Lista) */
.list-card {
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 24px;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.list-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0d6efd 0%, #6610f2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.list-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px -8px rgba(13, 110, 253, 0.15);
    border-color: rgba(13, 110, 253, 0.4);
}

.list-card:hover::before {
    opacity: 1;
}

.list-card.selected {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.2), 0 20px 40px -10px rgba(13, 110, 253, 0.25) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
    transform: translateY(-4px) scale(1.01);
}

.list-card.selected::before {
    opacity: 1;
    height: 5px;
}

.list-card.selected::after {
    content: '✓ SELECCIONADO';
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #0d6efd 0%, #4f46e5 100%);
    color: #ffffff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
    z-index: 5;
}

.list-card-header {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 14px;
}

.list-card-logo-box {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
    border-radius: 10px;
    overflow: hidden !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
    flex-shrink: 0 !important;
}

.list-card-logo-img {
    max-width: 44px !important;
    max-height: 44px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.list-candidate-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    background: rgba(248, 250, 252, 0.85);
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid rgba(226, 232, 240, 0.7);
    transition: background var(--transition-normal);
}

.list-card:hover .list-candidate-item {
    background: rgba(255, 255, 255, 0.95);
}

.list-candidate-avatar {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    max-width: 42px !important;
    max-height: 42px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex-shrink: 0 !important;
}

/* Tarjetas de candidatos */
.candidate-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 16px 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 2px solid rgba(0,0,0,0.06);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.candidate-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: rgba(13,110,253,0.3);
}

.candidate-card.selected {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(13,110,253,0.18), var(--shadow-md) !important;
    background: rgba(13,110,253,0.02);
}

.candidate-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 2px 6px rgba(13,110,253,0.4);
    z-index: 5;
}

/* Encabezado Símbolo / Logo de la Lista */
.candidate-header-party {
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
    margin-bottom: 8px;
    width: 100%;
}

.party-symbol-box {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    border-radius: 8px;
    overflow: hidden !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
    flex-shrink: 0 !important;
}

.party-logo-img {
    max-width: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.party-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
}

.party-number-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* Foto Candidato */
.candidate-photo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 8px 0 10px 0;
    width: 100%;
}

.candidate-photo {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px !important;
    min-height: 80px !important;
    max-width: 80px !important;
    max-height: 80px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transition: transform var(--transition-normal);
    flex-shrink: 0 !important;
}

.candidate-card:hover .candidate-photo {
    transform: scale(1.05);
}

.candidate-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.6rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.candidate-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: #1e293b;
    line-height: 1.25;
}

.candidate-lista-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 600;
}

.candidate-proposals {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
}

/* Voto en blanco */
.blank-vote-card {
    background: #f8f9fa;
    border: 2px dashed rgba(0,0,0,0.15);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.blank-vote-card:hover {
    border-color: var(--secondary);
    background: #eee;
}

.blank-vote-card.selected {
    border-color: var(--primary);
    border-style: solid;
    background: rgba(13,110,253,0.03);
}

/* Cargo section */
.cargo-section {
    margin-bottom: 35px;
}

.cargo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cargo-title .cargo-number {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

/* Confirmación de voto */
.vote-confirmation {
    text-align: center;
    padding: 60px 30px;
}

.vote-confirmation .check-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(25,135,84,0.1);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease;
}

.vote-confirmation h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}

.vote-confirmation .hash-code {
    background: #f0f2f5;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-family: monospace;
    font-size: 0.8rem;
    word-break: break-all;
    max-width: 500px;
    margin: 15px auto;
    color: #555;
}

/* ====================================================
   Gráficos de resultados
   ==================================================== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.result-bar {
    height: 30px;
    border-radius: var(--radius-sm);
    transition: width 1s ease;
    position: relative;
}

.result-bar::after {
    content: attr(data-pct);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-weight: 700;
    font-size: 0.78rem;
}

.winner-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #333;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ====================================================
   Animaciones
   ==================================================== */
@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-in-delay-3 { animation-delay: 0.3s; opacity: 0; }
.animate-in-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ====================================================
   DataTables override
   ==================================================== */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-radius: var(--radius-sm) !important;
    border: 1.5px solid rgba(0,0,0,0.1) !important;
    padding: 6px 12px !important;
    font-size: 0.85rem !important;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(13,110,253,0.12) !important;
    outline: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
    border-radius: var(--radius-sm) !important;
}

/* ====================================================
   Responsive
   ==================================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .topbar .btn-toggle-sidebar {
        display: block;
    }

    .content-area {
        padding: 15px;
    }

    .login-card {
        margin: 15px;
        padding: 30px 25px;
    }

    .stat-card .stat-number {
        font-size: 1.4rem;
    }

    .voting-content {
        padding: 0 10px;
    }
}

@media (max-width: 576px) {
    .topbar {
        padding: 10px 15px;
    }

    .topbar .page-title {
        font-size: 0.95rem;
    }
}

/* ====================================================
   Overlay para sidebar en móvil
   ==================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* ====================================================
   Alertas flash personalizadas
   ==================================================== */
.alert-flash {
    border-radius: var(--radius-md);
    border: none;
    padding: 14px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    animation: fadeInUp 0.4s ease;
}

/* ====================================================
   Color swatch
   ==================================================== */
.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid rgba(0,0,0,0.1);
}

/* ====================================================
   Empty state
   ==================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h5 {
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.85rem;
}
