:root {
    /* Colores principales */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary: #475569;
    --success: #16a34a;
    --warning: #ca8a04;
    --danger: #dc2626;
    --info: #0891b2;
    
    /* Colores de fondo */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* Colores de texto */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    
    /* Bordes */
    --border-color: #e2e8f0;
    --border-radius: 0.5rem;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.main-content {
    padding: 2rem 0;
}

/* Navbar */
.navbar {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.navbar-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Cards */
.card {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-white);
}

.btn-secondary:hover {
    filter: brightness(90%);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid currentColor;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--text-white);
}

/* Formularios */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background-color: var(--bg-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

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

.alert-warning {
    background-color: #fef9c3;
    color: var(--warning);
}

.alert-danger {
    background-color: #fee2e2;
    color: var(--danger);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

.badge-success {
    background-color: #dcfce7;
    color: var(--success);
}

.badge-warning {
    background-color: #fef9c3;
    color: var(--warning);
}

/* Utilidades */
.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Demo Banner */
.demo-banner {
    background-color: var(--warning);
    color: var(--text-white);
    text-align: center;
    padding: 0.5rem;
    font-weight: 500;
}

/* Iconos Material */
.material-icons {
    font-size: 1.25rem;
    vertical-align: middle;
}

/* Estilos para imágenes de candidatos */
.candidate-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem;
    border: 3px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.candidate-card {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background-color: var(--bg-tertiary);
}

.candidate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.candidate-card:hover .candidate-image {
    border-color: var(--primary);
    transform: scale(1.05);
}

.candidate-radio:checked + .candidate-image {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.candidate-radio:focus + .candidate-image {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.candidate-card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    padding: 2rem 1.5rem;
}

.candidate-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.candidate-radio:checked + .candidate-image {
    border-color: var(--primary);
    transform: scale(1.05);
}

.candidate-radio:checked ~ .card-title {
    color: var(--primary);
}

.candidate-radio:focus + .candidate-image {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.candidate-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidatos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.candidate-icon {
    font-size: 48px;
    color: var(--text-secondary);
}

/* Versión mini para tablas */
.candidato-mini-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Estilos para la tarjeta de candidato */
.candidato-card {
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.candidato-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.candidato-info {
    margin-top: 1rem;
}

.candidato-info h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.candidato-info p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .card {
        margin: 0.5rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }

    .candidate-image {
        width: 80px;
        height: 80px;
    }

    .candidato-mini-img {
        width: 32px;
        height: 32px;
    }
}
