/* 
 * Estilos del Sistema de Votación Escolar
 */

/* Variables de color */
:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --secondary: #6c757d;
    --success: #198754;
    --success-light: #d1e7dd;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #0dcaf0;
    --light: #f8f9fa;
    --dark: #212529;
    --body-bg: #f5f7fa;
}

/* Estilos generales */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--body-bg);
    min-height: 100vh;
}

.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Cards */
.card {
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

/* Iconos en cajas */
.icon-box {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tablas */
.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: var(--secondary);
}

.table td {
    vertical-align: middle;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Botones */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* Formularios */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 0.625rem 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

/* Input groups */
.input-group-text {
    border-radius: 8px;
    background-color: var(--light);
    border: 1px solid #ced4da;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 600;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: var(--success-light);
    color: var(--success);
}

/* Progress bars */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    border-radius: 10px;
    transition: width 0.6s ease;
}

/* Candidate cards */
.candidate-card {
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.candidate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.candidate-card.selected {
    border-color: var(--success);
    background-color: #f0fdf4;
}

.candidate-card .selected-indicator {
    color: var(--success);
}

/* Logo container */
.logo-container {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    padding: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        font-size: 1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Loading spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Tabs */
.nav-tabs .nav-link {
    border: none;
    color: var(--secondary);
    font-weight: 500;
    padding: 1rem 1.5rem;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    background-color: white;
    border-bottom: 3px solid var(--primary);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
