/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Encabezado */
header {
    background-color: #2271b3;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main content */
main {
    min-height: 60vh;
    margin-bottom: 2rem;
}

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

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

small {
    color: #666;
    font-size: 0.85rem;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #2271b3;
    color: white;
}

.btn-primary:hover {
    background-color: #1b5c95;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Mensajes */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid #c3e6cb;
}

/* Tarjetas de dashboard */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.card h3 {
    margin-bottom: 1rem;
    color: #2271b3;
}

.card .score, .card .count {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2271b3;
    margin-bottom: 0.5rem;
}

.card .status {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 4px;
}

.card .status.approved {
    background-color: #d4edda;
    color: #155724;
}

.card .status.pending {
    background-color: #fff3cd;
    color: #856404;
}

/* Tablas */
table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

tr:hover {
    background-color: #f8f9fa;
}

.status-badge {
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.si {
    background-color: #d4edda;
    color: #155724;
}


.status-badge.no {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.pendiente {
    background-color: #fff3cd;
    color: #856404;
}

.status-badge.aprobado {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.rechazado {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.pendiente_aprobacion_previa {
    background-color: #cce5ff;
    color: #004085;
}

/* Formulario de login */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
}

.login-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.5rem;
    color: #2271b3;
    margin-bottom: 0.5rem;
}

.login-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

.login-info p {
    margin-bottom: 0.5rem;
}

/* Sección de bienvenida */
.welcome-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.welcome-section h2 {
    color: #2271b3;
    margin-bottom: 0.5rem;
}

/* Acciones */
.actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Detalles de solicitud */
.detalle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detalle-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
}

.detalle-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #2271b3;
}

/* Formulario de revisión */
.review-form {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Pie de página */
footer {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid #ddd;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .actions {
        flex-direction: column;
    }
}



/* Estilos adicionales para el formulario de registro */

/* Mensaje de éxito */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

/* Estilos para campos select */
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    font-size: 16px;
    color: #333;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-group select:focus {
    outline: none;
    border-color: #2271b3;
    box-shadow: 0 0 5px rgba(34, 113, 179, 0.3);
}

/* Estilos para campos de número */
.form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    background-color: white;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: #2271b3;
    box-shadow: 0 0 5px rgba(34, 113, 179, 0.3);
}

/* Estilos para texto pequeño de ayuda */
.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Enlaces dentro de login-info */
.login-info a {
    color: #2271b3;
    text-decoration: none;
    font-weight: 500;
}

.login-info a:hover {
    text-decoration: underline;
    color: #1a5a8a;
}

/* Ajuste para formularios más largos */
.login-container {
    max-height: 90vh;
    overflow-y: auto;
}

/* Espaciado mejorado para formularios largos */
@media (max-height: 800px) {
    .login-header h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .login-header p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
}


/* Estilos adicionales para el formulario de registro */

/* Estilos para CAPTCHA */
.captcha-group {
    margin-bottom: 20px;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.captcha-question {
    background-color: #f8f9fa;
    border: 2px solid #2271b3;
    border-radius: 5px;
    padding: 12px 16px;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: bold;
    color: #2271b3;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.captcha-input {
    flex: 1;
    min-width: 80px;
    max-width: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
}

.captcha-input:focus {
    outline: none;
    border-color: #2271b3;
    box-shadow: 0 0 5px rgba(34, 113, 179, 0.3);
}

.captcha-refresh {
    background-color: #2271b3;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-refresh:hover {
    background-color: #1a5a8a;
}

.captcha-refresh:active {
    transform: scale(0.98);
}

/* Responsive para CAPTCHA */
@media (max-width: 480px) {
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .captcha-question {
        margin-bottom: 10px;
        min-width: auto;
    }
    
    .captcha-input {
        max-width: none;
        margin-bottom: 10px;
    }
    
    .captcha-refresh {
        align-self: center;
        width: 45px;
    }
}

/* Mensaje de éxito */
.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 12px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

/* Estilos para campos select */
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    font-size: 16px;
    color: #333;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-group select:focus {
    outline: none;
    border-color: #2271b3;
    box-shadow: 0 0 5px rgba(34, 113, 179, 0.3);
}

/* Estilos para campos de número */
.form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    color: #333;
    background-color: white;
}

.form-group input[type="number"]:focus {
    outline: none;
    border-color: #2271b3;
    box-shadow: 0 0 5px rgba(34, 113, 179, 0.3);
}

/* Estilos para texto pequeño de ayuda */
.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Enlaces dentro de login-info */
.login-info a {
    color: #2271b3;
    text-decoration: none;
    font-weight: 500;
}

.login-info a:hover {
    text-decoration: underline;
    color: #1a5a8a;
}

/* Ajuste para formularios más largos */
.login-container {
    max-height: 90vh;
    overflow-y: auto;
}

/* Espaciado mejorado para formularios largos */
@media (max-height: 800px) {
    .login-header h1 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .login-header p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
}


.btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 123, 255, 0.4);
}



.metrics-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    border-left: 5px solid #3a8fd6;
}

.metrics-section h3 {
    color: #3a8fd6;
    margin-bottom: 0.5rem;
}

.metrics-section p {
    color: #4a5568; /* gris elegante para texto */
}

.metrics-section a {
    color: #3a8fd6;
    font-weight: bold;
    text-decoration: none;
}

.metrics-section a:hover {
    text-decoration: underline;
}


