:root {
    --primary: #2c5f8a;
    --primary-dark: #0a2a44;
    --primary-light: #3a7ca5;
    --accent: #ffc107;
    --success: #28a745;
    --danger: #dc3545;
}

/* ===================================
   FONDO PRINCIPAL
=================================== */
body {
    background: linear-gradient(135deg, #e8f0f8 0%, #d4e4f0 100%) !important;
    font-family: 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
}

/* ===================================
   NAVBAR
=================================== */
.navbar-ministerio {
    background: linear-gradient(95deg, #0a2a44 0%, #1a4d7a 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    padding: 12px 24px !important;
}

.navbar-ministerio .navbar-brand {
    color: white !important;
    font-weight: 700 !important;
}

.navbar-ministerio .text-white {
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 8px 16px !important;
    border-radius: 40px !important;
}

/* ===================================
   SIDEBAR - AZUL OSCURO
=================================== */
.sidebar {
    background: linear-gradient(145deg, #0a2a44 0%, #0f3a5c 100%) !important;
    min-height: calc(100vh - 60px) !important;
    overflow-y: auto !important;
}

.sidebar-header {
    padding: 25px 20px !important;
    text-align: center !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.sidebar-logo {
    width: 100px !important;
    margin-bottom: 12px !important;
}

.sidebar-header h5 {
    color: white !important;
    font-weight: 700 !important;
}

.sidebar-header small {
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 0.7rem !important;
}

/* Items del menú */
.sidebar .nav-link {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 20px !important;
    margin: 4px 12px !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: all 0.25s ease !important;
}

.sidebar .nav-link i {
    width: 22px !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateX(5px) !important;
    color: white !important;
}

.sidebar .nav-link:hover i {
    color: #ffc107 !important;
}

.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.12) !important;
    border-left: 3px solid #ffc107 !important;
    color: white !important;
    font-weight: 600 !important;
}

/* Títulos de sección */
.sidebar strong,
.sidebar .section-title {
    display: block !important;
    padding: 12px 20px 6px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
}

/* Botón salir */
.sidebar .nav-link.text-danger:hover {
    background: rgba(220, 53, 69, 0.2) !important;
}

/* ===================================
   CONTENIDO PRINCIPAL
=================================== */
.container-fluid {
    padding: 0 !important;
}

.main-content {
    padding: 25px 30px !important;
    min-height: calc(100vh - 60px) !important;
}

/* ===================================
   TARJETAS MODERNAS (funciona en TODO el sistema)
=================================== */
.card {
    border: none !important;
    border-radius: 24px !important;
    transition: all 0.3s ease !important;
    background: white !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15) !important;
}

.card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 5px !important;
    background: linear-gradient(90deg, #2c5f8a, #3a7ca5, #ffc107) !important;
}

.card-body {
    padding: 30px 20px !important;
    text-align: center !important;
}

.card-body h2 {
    font-size: 3rem !important;
    font-weight: 800 !important;
    margin: 0 0 10px 0 !important;
    background: linear-gradient(135deg, #2c5f8a, #1a4d7a) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
}

.card-body strong,
.card-body .stat-label {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #6c7a8e !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* ===================================
   TARJETAS CON ICONOS
=================================== */
.stat-icon-wrapper,
.card-icon {
    width: 55px !important;
    height: 55px !important;
    background: linear-gradient(135deg, #e8f0f8, #d4e4f0) !important;
    border-radius: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 15px auto !important;
}

.stat-icon-wrapper i,
.card-icon i {
    font-size: 28px !important;
    color: #2c5f8a !important;
}

/* ===================================
   TÍTULOS DE PÁGINA
=================================== */
.page-title,
h2:first-of-type {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: #1a2c3e !important;
    margin-bottom: 25px !important;
    padding-left: 5px !important;
    border-left: 4px solid #2c5f8a !important;
}

/* ===================================
   ALERTA MODERNA
=================================== */
.alert-info {
    background: linear-gradient(135deg, #e8f4f8 0%, #d4eaf2 100%) !important;
    border: none !important;
    border-radius: 20px !important;
    color: #1a4d7a !important;
    padding: 20px 25px !important;
    border-left: 5px solid #2c5f8a !important;
    margin-top: 25px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

/* ===================================
   SEPARADOR
=================================== */
hr {
    margin: 35px 0 !important;
    border: none !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent) !important;
}

/* ===================================
   TABLAS
=================================== */
.table {
    background: white !important;
    border-radius: 20px !important;
    overflow: hidden !important;
}

.table thead th {
    background: #f8fafd !important;
    color: #2c5f8a !important;
    font-weight: 700 !important;
    padding: 15px !important;
}

/* ===================================
   FORMULARIOS
=================================== */
.form-control, .form-select {
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 10px 15px !important;
}

.form-control:focus, .form-select:focus {
    border-color: #3a7ca5 !important;
    box-shadow: 0 0 0 3px rgba(58,124,165,0.1) !important;
}

/* ===================================
   BOTONES
=================================== */
.btn-primary {
    background: linear-gradient(135deg, #2c5f8a, #3a7ca5) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
}

.btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(44,95,138,0.3) !important;
}

/* ===================================
   RESPONSIVE
=================================== */
@media (max-width: 768px) {
    .main-content {
        padding: 15px !important;
    }
    .card-body {
        padding: 20px 15px !important;
    }
    .card-body h2 {
        font-size: 2rem !important;
    }
}