/*
 * MG Finance — Brand color overrides
 * Las variables :root se inyectan desde el layout blade (dinámico desde cache)
 *   --brand-primary : #0A4895  (navbar, menú activo, botones)
 *   --brand-dark    : #051F44  (header sidebar/logo)
 *   --brand-mid     : --brand-primary (alias)
 *   --brand-accent  : #E86A0C  (tabs activos, highlights)
 */

/* ─── Navbar — mismo color que navbar-header (oscuro) ───────── */
.header-navbar,
.header-navbar.floating-nav,
nav.header-navbar {
    background: var(--brand-dark) !important;
    background-color: var(--brand-dark) !important;
    background-image: none !important;
    box-shadow: 0 4px 20px 0 rgba(5, 31, 68, 0.4) !important;
}
.header-navbar .navbar-container .nav-link,
.header-navbar .navbar-container .nav-link i,
.header-navbar .navbar-container svg,
.header-navbar .bookmark-wrapper .nav-link,
.header-navbar .user-nav .user-name,
.header-navbar .user-nav .user-status {
    color: #fff !important;
}

/* ─── Sidebar header (logo) → azul oscuro ───────────────────── */
.main-menu .navbar-header {
    background: var(--brand-dark) !important;
}
.main-menu .navbar-header .brand-text {
    color: #fff !important;
}

/* ─── Iconos toggle collapse del menú ───────────────────────── */
.main-menu .modern-nav-toggle svg,
.main-menu .modern-nav-toggle i,
.main-menu .toggle-icon,
.main-menu .collapse-toggle-icon {
    color: #fff !important;
    stroke: #fff !important;
}

/* ─── Menú activo — mismo azul que navbar ───────────────────── */
.main-menu.menu-light .navigation > li.active > a,
.main-menu.menu-light .navigation > li.active > a:hover {
    background: linear-gradient(118deg, var(--brand-primary), var(--brand-primary)) !important;
    box-shadow: 0 0 10px 1px rgba(10, 72, 149, 0.5) !important;
    color: #fff !important;
}
.main-menu.menu-light .navigation > li.active > a span,
.main-menu.menu-light .navigation > li.active > a i,
.main-menu.menu-light .navigation > li.active > a svg {
    color: #fff !important;
}
.main-menu.menu-light .navigation > li > a:hover {
    color: var(--brand-primary) !important;
}

/* ─── Botones primarios ─────────────────────────────────────── */
.btn-primary,
.btn-primary:not(:disabled):not(.disabled) {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--brand-dark) !important;
    border-color: var(--brand-dark) !important;
    color: #fff !important;
}
.btn-outline-primary {
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    background-color: var(--brand-primary) !important;
    color: #fff !important;
}

/* ─── text-primary → azul de marca ─────────────────────────── */
.text-primary {
    color: var(--brand-primary) !important;
}

/* ─── Badges ────────────────────────────────────────────────── */
.badge-primary {
    background-color: var(--brand-primary) !important;
    color: #fff !important;
}

/* ─── Form focus ────────────────────────────────────────────── */
.form-control:focus {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 3px 10px 0 rgba(10, 72, 149, 0.15) !important;
}

/* ─── Nav Tabs ──────────────────────────────────────────────── */
.nav-tabs,
.nav.nav-tabs,
.nav.nav-tabs.shadow {
    border-bottom: none !important;
    box-shadow: none !important;
}
.nav-tabs .nav-link {
    color: var(--brand-primary) !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: 0 !important;
    font-weight: 500;
    border-radius: 0 !important;
}
.nav-tabs .nav-link:hover {
    color: var(--brand-accent) !important;
    background: rgba(232, 106, 12, 0.06) !important;
    border-bottom-color: var(--brand-accent) !important;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-link.active:focus,
.nav-tabs .nav-link.active:hover {
    background-color: var(--brand-accent) !important;
    border-bottom: 2px solid var(--brand-accent) !important;
    color: #fff !important;
    box-shadow: none !important;
    outline: none !important;
    font-weight: 600;
    border-radius: 4px 4px 0 0 !important;
}

/* ─── Nav Pills ─────────────────────────────────────────────── */
.nav-pills .nav-link.active {
    background-color: var(--brand-primary) !important;
    box-shadow: 0 4px 18px -4px rgba(10, 72, 149, 0.65) !important;
    color: #fff !important;
}

/* ─── Progress bars ─────────────────────────────────────────── */
.progress-bar {
    background-color: var(--brand-primary) !important;
}

/* ─── Checkboxes / Radios ───────────────────────────────────── */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

/* ─── Pagination ────────────────────────────────────────────── */
.page-item.active .page-link {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}
.page-link {
    color: var(--brand-primary) !important;
}
.page-link:hover {
    color: var(--brand-dark) !important;
}

/* ─── DataTables paginación ─────────────────────────────────── */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--brand-primary) !important;
    color: #fff !important;
    border-color: var(--brand-primary) !important;
    border-radius: 4px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:not(.current):hover {
    background: var(--brand-primary) !important;
    color: #fff !important;
    border-color: var(--brand-primary) !important;
    border-radius: 4px;
}

/* ─── Scroll-to-top ─────────────────────────────────────────── */
.btn.scroll-top {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}
