:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4cc9f0;
    --warning-color: #f72585;
    --info-color: #4895ef;
    --dark-color: #1d1b1b;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
    
    --transition-speed: 0.3s;
}

/* Estilos base */
body {
    font-family: var(--font-primary);
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

/* Navbar moderno */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1rem 2rem;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
    color: white !important;
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-md);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Tarjetas modernas */
.card {
    border: none;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    background: white;
    overflow: hidden;
}


.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem 1.5rem;
}

/* Botones modernos */
.btn {
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 500;
    transition: all var(--transition-speed);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Formularios modernos */
.form-control {
    border-radius: var(--border-radius-md);
    padding: 0.8rem 1rem;
    border: 2px solid #eee;
    transition: all var(--transition-speed);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

/* Contenedores principales */
.main-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar moderno */
#sidebar {
    position: sticky;
    top: 1rem;
    margin-bottom: 1rem;
}

#sidebar .card-header {
    padding: 1rem;
}

#sidebar .card-header .badge {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

#sidebar .list-group-item {
    border: none;
    padding: 0.75rem 1rem;
    background: transparent;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

#sidebar .list-group-item:last-child {
    border-bottom: none;
}

#sidebar .list-group-item:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

#sidebar .list-group-item .badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    background-color: var(--primary-color);
    color: white;
}

@media (max-width: 768px) {
    #sidebar {
        position: sticky;
        top: 1rem;
        margin-top: 1rem;
    }
}

/* Pizarra moderna */
.pizarra {
    background-color: var(--dark-color);
    min-height: 100vh;
    color: white;
    padding: 2rem;
}

/* Progreso y badges */
.progress {
    height: 1.2rem;
    border-radius: var(--border-radius-lg);
    background-color: #eee;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(135deg, var(--success-color), var(--info-color));
    transition: width 1s ease;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-lg);
    font-weight: 500;
}

/* Indicador de voto en la pizarra */
.voto-badge {
    width: 1.5rem;
    height: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.voto-badge i {
    font-size: 1rem;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .main-container {
        padding: 1rem;
        margin-bottom: 100px;
    }
    
    .text-gradient {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .icon-container {
        width: 35px;
        height: 35px;
        margin-right: 0.75rem;
    }
    
    #sidebar {
        position: sticky;
        top: 1rem;
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .main-container {
        padding: 0.75rem;
    }
    
    .text-gradient {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .icon-container {
        width: 30px;
        height: 30px;
        margin-right: 0.5rem;
    }
}

/* Utilidades */
.shadow-hover {
    transition: box-shadow var(--transition-speed);
}

.shadow-hover:hover {
    box-shadow: var(--shadow-lg);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
}

/* Tabla moderna */
.table {
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: #f8f9fa;
    color: var(--dark-color);
    font-weight: 500;
    border: none;
    padding: 1rem;
}

.table tbody tr {
    transition: background-color var(--transition-speed);
}

.table tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

/* Modal moderno */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 2rem;
}

/* Notificaciones y alertas */
.alert {
    border: none;
    border-radius: var(--border-radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.alert-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

/* Iconos y elementos visuales */
.icon-container {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    margin-right: 1rem;
}

/* Efectos de hover */
.hover-lift {
    transition: transform var(--transition-speed);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.sidebar-text {
    white-space: nowrap;
    font-size: 0.95rem !important;
    margin-right: auto;
}

/* Modo oscuro básico */
body.dark-mode {
    background-color: #121212;
    color: var(--light-color);
}

body.dark-mode .card,
body.dark-mode .navbar,
body.dark-mode .modal-content {
    background-color: #1e1e1e;
    color: var(--light-color);
}

body.dark-mode .card-header,
body.dark-mode .navbar,
body.dark-mode .modal-header {
    background: linear-gradient(135deg, #333, #555);
}
