/**
 * Estilos Personalizados para Portal de Informes
 */

@import url('https://fonts.googleapis.com/css2?family=Oxygen:wght@300;400;700&display=swap');

/* Variables personalizadas */
:root {
    --primary-color: #005cad;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --dark-bg: #212529;
}

.bg-primary{
    background-color: #005cad !important;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Body */
body {
    font-family: "Oxygen", sans-serif;
    font-weight: 300;
    font-style: normal;
    background-color: #f5f5f5;
}

h1, h2, h3, h4, h5, h6, p, a, span, div {
    font-family: "Oxygen", sans-serif;
    font-weight: 300;
    font-style: normal;
}

strong {
    font-weight: 700 !important;
}

/* Navbar personalizado */
.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.navbar-brand i {
    margin-right: 8px;
}

.nav-link {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    transition: all 0.3s ease;
}

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

.nav-link i {
    margin-right: 5px;
}

.dropdown-item {
    font-size: 1.1rem;
}

/* Dropdown del navbar */
.navbar .dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 200px;
}

.navbar .dropdown-menu-dark {
    background-color: #004a8c;
}

.navbar .dropdown-item {
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.navbar .dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar .dropdown-item i {
    margin-right: 8px;
}

.navbar .dropdown-toggle::after {
    margin-left: 8px;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

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

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Hero Section */
.bg-light {
    background-color: var(--light-bg) !important;
}

.rounded-3 {
    border-radius: 1rem !important;
}

/* Footer */
.footer-custom {
    background: #005cad;
}

.footer-links a {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-custom .social-icons a {
    transition: all 0.3s ease;
}

.footer-custom .social-icons a:hover {
    transform: scale(1.2);
}

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Display headings */
.display-5 {
    font-weight: 700;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .col-md-8 {
        font-size: 1rem;
    }
    
    .navbar-brand img + img,
    .container > img:last-child {
        display: none;
    }
    
    .navbar-collapse {
        margin-top: 15px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Utility classes */
.text-sm {
    font-size: 1rem;
}

.text-md {
    font-size: 1.5rem;
}

.text-decoration-none:hover {
    text-decoration: underline !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* ============================================
   ESTILOS DE AUTENTICACIÓN
   ============================================ */

/* Página de autenticación */
.auth-page {
    align-items: center;
    padding: 60px 20px 40px;
}

/* Tarjeta de autenticación */
.auth-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 48px;
    width: 100%;
    max-width: 600px;
    animation: slideUp 0.5s ease-out;
    border: 1px solid #e1e5e9;
    margin: 0 auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Encabezado de autenticación */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 10px;
}

.auth-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Formularios de autenticación */
.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 0.95rem;
}

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.auth-form input::placeholder {
    color: #aaa;
}

/* Botones */
.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
}

.btn-primary {
    background: #005cad;
    border: none;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #004a8c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 92, 173, 0.3);
}

/* Alertas */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
}

/* Pie de autenticación */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-footer p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ============================================
   ESTILOS DEL DASHBOARD
   ============================================ */

/* Nueva estética inspirada en la pantalla de login */
.dashboard-page {
    background: #f5f5f5;
}

.dashboard-card {
    border-radius: 24px;
    overflow: hidden;
}

.bg-gradient-dashboard {
    background: #005cad;
}

.bg-gradient-dashboard p,
.bg-gradient-dashboard h2 {
    color: rgba(255, 255, 255, 0.9);
}

.stat-card {
    border-radius: 18px;
    padding: 1.8rem 1rem;
    background: white;
}

.stat-number {
    font-size: 2.3rem;
    color: #0d6efd;
}

.section-card {
    border-radius: 18px;
    padding: 1.5rem;
    background: white;
}

.section-card h3 {
    border-bottom: none;
}

.section-card .btn {
    min-width: 150px;
}

/* Ajustes responsivos */
@media (max-width: 992px) {
    .dashboard-card {
        border-radius: 20px;
    }
}

/* Navbar del Dashboard */
.navbar {
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-brand h1 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-user span {
    color: white;
    font-size: 0.95rem;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Contenedor del Dashboard */
.dashboard-container {
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    padding: 25px 0;
}

.sidebar h3 {
    padding: 0 25px;
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li a {
    display: block;
    padding: 14px 25px;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar li a:hover,
.sidebar li a.active {
    background: rgba(0, 92, 173, 0.1);
    color: #005cad;
    border-left-color: #005cad;
}

/* Contenido Principal */
.main-content {
    flex: 1;
    padding: 30px;
    background: #f5f7fa;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h2 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.dashboard-header p {
    color: #666;
    font-size: 1rem;
}

/* Grid de Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 3rem;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 92, 173, 0.1);
    border-radius: 15px;
}

.stat-info h3 {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-number {
    color: #333;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* Contenido del Dashboard */
.dashboard-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.content-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.content-card h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.content-card p {
    color: #666;
    line-height: 1.6;
}

/* Acciones Rápidas */
.quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px 0;
    }
    
    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
    }
    
    .sidebar li a {
        padding: 10px 15px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    
    .navbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   CARRUSEL
   ============================================ */

.carousel h3 {
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.carousel p {
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
    .carousel h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .carousel h3 {
        font-size: 1.5rem;
        text-shadow: -4px 2px 4px rgba(0, 0, 0, 0.9);
    }
}

/* ============================================
   CHECKBOXES
   ============================================ */

.checkbox-label {
    font-size: 0.95rem;
}

.checkbox-label:hover {
    font-weight: 500;
}

@media (max-width: 768px) {
    .checkbox-label {
        font-size: 1rem;
    }
}

/* ============================================
   VALIDACIÓN DE FORMULARIOS
   ============================================ */

/* Ocultar íconos de validación en inputs */
.was-validated .form-control:valid,
.form-control.is-valid {
    background-image: none !important;
    border-color: #e1e5e9 !important;
}

.was-validated .form-control:valid:focus,
.form-control.is-valid:focus {
    border-color: #005cad !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 92, 173, 0.25) !important;
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    background-image: none !important;
}

/* Ocultar íconos de validación en form-floating */
.was-validated .form-floating .form-control:valid,
.form-floating .form-control.is-valid {
    background-image: none !important;
}

.was-validated .form-floating .form-control:invalid,
.form-floating .form-control.is-invalid {
    background-image: none !important;
}
