/* SIGECAM - Estilos adicionales sobre Tabler */

.hidden { display: none !important; }

.login-box .card { border: none; box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15); }

#map-container { min-height: 400px; }

#mapa-comuna {
    background: #e9ecef;
    min-height: 350px;
    width: 100%;
}

/* Asegurar que el mapa Leaflet no quede bajo el sidebar */
.leaflet-container { z-index: 1; }

.section { animation: fadeIn 0.25s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SIDEBAR - Color personalizado azul oscuro
   ============================================ */
.navbar-vertical {
    background: #0b1d40 !important;
    border-right: 1px solid rgba(255,255,255,0.08);
}

.navbar-vertical .navbar-brand,
.navbar-vertical .navbar-brand a,
.navbar-vertical .navbar-brand span {
    color: #ffffff !important;
}

.navbar-vertical .nav-link {
    color: rgba(255,255,255,0.75) !important;
}

.navbar-vertical .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,0.08) !important;
}

.navbar-vertical .nav-link.active {
    background: rgba(59, 130, 246, 0.25) !important;
    color: #60a5fa !important;
    border-left: 3px solid #60a5fa;
}

.navbar-vertical .nav-link-icon {
    color: inherit !important;
}

.navbar-vertical .navbar-toggler-icon {
    filter: invert(1);
}

/* ============================================
   HEADER - Gris suave con acento institucional
   ============================================ */
.page-header {
    background: #f1f5f9 !important;
    border-bottom: 2px solid #1e40af;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.page-header .page-title {
    color: #1e3a8a;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    border-left: 4px solid #1e40af;
    padding-left: 0.75rem;
}

.page-header #user-name {
    color: #334155;
    font-weight: 600;
}

.page-header #user-rol {
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   CARDS Y COMPONENTES
   ============================================ */
.card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    border: 1px solid rgba(0,0,0,0.04);
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.card-header .card-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1e293b;
}

/* ============================================
   TABLAS
   ============================================ */
.table-vcenter tbody tr {
    transition: background 0.15s ease;
}

.table-vcenter tbody tr:hover {
    background: #f8fafc;
}

.table-vcenter th {
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #64748b;
    background: #f8fafc;
}

/* ============================================
   BADGES Y PROGRESS
   ============================================ */
.badge {
    font-weight: 500;
    letter-spacing: 0.3px;
}

.progress-sm {
    height: 6px;
}

.progress-bar {
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* ============================================
   BOTONES GHOST
   ============================================ */
.btn-ghost-primary:hover {
    background: #eff6ff;
    color: #2563eb;
}

.btn-ghost-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* ============================================
   LIST GROUP ACCESO RAPIDO
   ============================================ */
.list-group-item-action:hover {
    background: #f8fafc;
}

.list-group-item-action .badge {
    font-size: 0.7rem;
    padding: 0.25em 0.6em;
}

/* ============================================
   FORMULARIOS
   ============================================ */
.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ============================================
   LOGIN
   ============================================ */
.login-box .card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

.login-box .form-control-lg {
    border-radius: 0.5rem;
}
