/* ==========================================
   1. VARIABLES Y CONFIGURACIÓN GLOBAL
   ========================================== */
:root {
    /* Colores Institucionales */
    --bg-body: #f3f6f9;
    --primary: #0d6efd;     /* Azul default */
    --plaga: #0d6efd;      /* Azul */
    --ambiental: #198754;   /* Verde */
    --animal: #dc3545;      /* Rojo */
    --text-muted: #6c757d;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-body);
    font-family: var(--font-family);
    color: #333;
    overflow-x: hidden; /* Evitar scroll horizontal */
}

/* Utilidades generales */
.text-sm { font-size: 0.875rem; }
.fw-bold { font-weight: 700 !important; }
.rounded-15 { border-radius: 15px; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

/* ==========================================
   2. ESTILOS PÁGINA DE INICIO (Index)
   ========================================== */
.hero-banner {
    background: linear-gradient(135deg, #004085 0%, #0056b3 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    margin-bottom: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.service-card {
    border: none;
    background: white;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    padding: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--card-shadow-hover);
}

.icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background-color: #e7f1ff;
}

/* ==========================================
   3. ESTILOS DE FORMULARIOS (Públicos)
   ========================================== */
.form-card {
    border: none;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
    background: white;
    overflow: hidden;
}

.form-card .card-header {
    background-color: white;
    border-bottom: 2px solid #0d6efd;
    font-weight: bold;
    color: #333;
    padding: 15px 20px;
}

/* MAPA */
#map {
    height: 300px;
    width: 100%;
    border-radius: 8px;
    z-index: 10;
    position: relative;
    border: 1px solid #ddd;
}

.leaflet-container { 
    z-index: 10 !important; 
    background: #ddd;
}

/* ==========================================
   4. ESTILOS DEL DASHBOARD (ADMIN - TEMA MODERNO)
   ========================================== */

/* Fondo del Dashboard */
body#dashboard-page {
    background-color: #f4f6f9;
    background-image: radial-gradient(#e9ecef 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Navbar Flotante */
body#dashboard-page .navbar {
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    background: linear-gradient(90deg, #0d6efd 0%, #0043a8 100%);
    border: none;
}

/* Tarjetas con Efecto Glass */
body#dashboard-page .modern-card {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.03);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

body#dashboard-page .modern-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transform: translateY(-3px);
}

/* Tarjetas de Estadísticas con Gradientes */
body#dashboard-page .stats-gradient-card {
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Colores de Gradientes */
body#dashboard-page .bg-gradient-primary { background: linear-gradient(135deg, #0d6efd 0%, #3b8bfa 100%); }
body#dashboard-page .bg-gradient-success { background: linear-gradient(135deg, #198754 0%, #4ac483 100%); }
body#dashboard-page .bg-gradient-danger { background: linear-gradient(135deg, #dc3545 0%, #fa7a85 100%); }
body#dashboard-page .bg-gradient-dark { background: linear-gradient(135deg, #343a40 0%, #6c757d 100%); }

/* Tipografía de Estadísticas */
body#dashboard-page .stats-gradient-card .big-number {
    font-size: 3rem;
    font-weight: 800;
    opacity: 0.9;
    line-height: 1;
}
body#dashboard-page .stats-gradient-card .stat-label {
    font-weight: 500;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

/* Estilos de Tabla Moderna */
body#dashboard-page .table-modern {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

body#dashboard-page .table-modern thead th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 15px;
}

body#dashboard-page .table-modern tbody tr {
    transition: background-color 0.2s;
    border-bottom: 1px solid #f1f3f5;
}

body#dashboard-page .table-modern tbody tr:hover {
    background-color: #f8f9fa;
}

body#dashboard-page .table-modern td {
    padding: 15px;
    vertical-align: middle;
    border-top: none;
    color: #555;
}

/* Avatar Moderno Dashboard */
body#dashboard-page .avatar-new {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #e2e6ea;
    color: #495057;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Botones de Acción Dashboard */
body#dashboard-page .btn-action {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
    background: white;
    color: #6c757d;
    transition: all 0.2s;
    text-decoration: none;
}
body#dashboard-page .btn-action:hover {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* ==========================================
   5. RESPONSIVIDAD (Móvil)
   ========================================== */
@media (max-width: 768px) {
    .hero-banner { padding: 40px 10px; }
    .icon-box { width: 60px; height: 60px; font-size: 2rem; }
    #map { height: 250px; } /* Mapa más pequeño en móviles */
}
/* -----------------------------------------------------------
   MEJORAS VISUALES FORMULARIOS (Añadir al style.css)
   ----------------------------------------------------------- */

/* Encabezado Azul Unificado */
.form-header-blue {
    background: linear-gradient(90deg, #0d6efd 0%, #0043a8 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.2);
}

/* Estilo de Inputs más grandes */
.form-control-lg-custom {
    padding: 0.7rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ced4da;
}

.form-control-lg-custom:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Botón de subir archivo con borde punteado */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}
.file-upload-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}
.custom-file-upload {
    border: 2px dashed #ccc;
    display: block;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    background-color: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
}
.custom-file-upload:hover {
    border-color: #0d6efd;
    background-color: #e7f1ff;
}