:root {
    --brand: var(--lb-azul, #2c4a5e);
    --brand-2: var(--lb-azul-hover, #1e3648);
    --soft: var(--lb-papel-oscuro, #f4f1ea);
    --card: var(--lb-blanco, #ffffff);
    --muted: #6c757d;
    --border: var(--lb-borde, #dedcd3);
    --shadow: 0 18px 60px rgba(36, 33, 29, 0.12);
    --shadow2: 0 10px 30px rgba(36, 33, 29, 0.08);
    --radius: 18px;
}

[data-bs-theme="dark"] {
    --soft: #0b1220;
    --card: #111827;
    --muted: #94a3b8;
    --border: #253043;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    --shadow2: 0 10px 30px rgba(0, 0, 0, 0.28);
}

html,
#sidebar {
    view-transition-name: none !important;
}

body {
    background: var(--soft);
    color: #0f172a;
}

[data-bs-theme="dark"] body {
    color: #e5e7eb;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 280px;
    background: #fff;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 40;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    transition: width 0.18s ease;
}

[data-bs-theme="dark"] .sidebar {
    background: #111827;
}
[data-bs-theme="dark"] .sidebar .brand {
    background: #111827;
}

.sidebar .brand {
    padding: 18px 18px 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 10px;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
}

.brand .logo {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: var(--shadow2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand .title {
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0;
    line-height: 1.1;
    font-size: 1.05rem;
}

.brand .subtitle {
    color: var(--muted);
    font-size: 0.82rem;
}

.nav-section-title {
    padding: 14px 18px 8px;
    color: #94a3b8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 6px 12px;
    border-radius: 14px;
    color: #0f172a;
    text-decoration: none;
    border: 1px solid transparent;
}

[data-bs-theme="dark"] .side-link {
    color: #e5e7eb;
}

.side-link:hover {
    background: #f2f6ff;
    border-color: #e6eeff;
    color: #0f172a;
}

[data-bs-theme="dark"] .side-link:hover {
    background: #1f2937;
    border-color: #334155;
    color: #f8fafc;
}

.side-link.active {
    background: rgba(44, 74, 94, 0.11);
    border-color: rgba(44, 74, 94, 0.24);
    color: var(--brand);
    font-weight: 700;
}

.side-link i {
    font-size: 1.05rem;
    width: 1.05rem;
    height: 1.05rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.side-link-child,
.collapse > .side-link {
    margin-left: 22px;
    padding-left: 14px;
    opacity: 0.92;
}

/* Grupo colapsable anidado (toggles dentro de grupos) */
.side-link-toggle {
    margin-left: 22px;
    padding-left: 14px;
    opacity: 0.96;
}

/* Tercer nivel de indentación dentro de colapsables */
.side-link-grandchild,
.collapse > .side-link-grandchild {
    margin-left: 44px;
    padding-left: 14px;
    opacity: 0.92;
}

.side-link [class*="bi-chevron-down"] {
    transition: transform 0.16s ease;
}

.side-link[aria-expanded="true"] [class*="bi-chevron-down"] {
    transform: rotate(180deg);
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(246, 248, 251, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

[data-bs-theme="dark"] .topbar {
    background: rgba(11, 18, 32, 0.88);
}

.topbar-inner {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.search {
    width: min(520px, 100%);
}

.search .form-control {
    border-radius: 14px;
    padding: 10px 12px;
}

.card-soft {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow2);
}

[data-bs-theme="dark"] .card-soft {
    color: #e5e7eb;
}

.page,
.page.page-ready,
.page.page-leave {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

main.fade-in,
.page .fade-in,
.page .fade-in-up {
    animation: none !important;
}

.modal {
    --bs-modal-zindex: 2000;
    z-index: var(--bs-modal-zindex);
}

.modal-backdrop {
    --bs-backdrop-zindex: 1990;
    z-index: var(--bs-backdrop-zindex);
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        left: -320px;
        z-index: 1050;
        transition: left 0.18s ease;
        box-shadow: var(--shadow);
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 23, 0.4);
        z-index: 1040;
    }

    .sidebar-backdrop.show {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Unificación visual sobre estilos heredados de app.css. */
:root {
    --action: var(--lb-terracota, #b1522a);
    --action-hover: #934120;
    --gray-900: var(--lb-tinta, #24211d);
    --gray-700: #4f4b45;
    --gray-500: #777168;
    --gray-200: var(--lb-borde, #dedcd3);
    --white: var(--lb-blanco, #ffffff);
}

.btn-brand {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    box-shadow: none;
}

.btn-brand:hover,
.btn-brand:focus-visible {
    background-color: var(--brand-2);
    border-color: var(--brand-2);
    color: #fff;
    transform: none;
    box-shadow: none;
}

.btn-outline-brand {
    color: var(--brand);
    border-color: var(--brand);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus-visible {
    color: #fff;
    background-color: var(--brand);
    border-color: var(--brand);
}

.card-dashboard,
.dashboard-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow2);
}

.card-dashboard:hover,
.card-dashboard .card:hover,
.dashboard-card:hover {
    transform: none;
    box-shadow: 0 12px 28px rgba(36, 33, 29, 0.12);
}

[data-bs-theme="dark"] .card-dashboard,
[data-bs-theme="dark"] .dashboard-card,
[data-bs-theme="dark"] .card-dashboard .card-header {
    background: var(--card);
    color: #e5e7eb;
    border-color: var(--border);
}

/* ============================================================
   SIDEBAR WRAPPERS — identical to .side-link
   ============================================================ */
.side-link-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 6px 12px;
    border-radius: 14px;
    color: #0f172a;
    text-decoration: none;
    border: 1px solid transparent;
}
.side-link-wrapper:hover {
    background: #f2f6ff;
    border-color: #e6eeff;
    color: #0f172a;
}
[data-bs-theme="dark"] .side-link-wrapper {
    color: #e5e7eb;
}
[data-bs-theme="dark"] .side-link-wrapper:hover {
    background: #1f2937;
    border-color: #334155;
    color: #f8fafc;
}
.side-link-wrapper.active-wrap {
    background: rgba(44, 74, 94, 0.11);
    border-color: rgba(44, 74, 94, 0.24);
    color: var(--brand);
    font-weight: 700;
}
.side-link-cat {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    font-size: 0.9rem;
}
.side-link-cat i:first-child {
    font-size: 1.05rem;
}
.side-link-wrapper .side-link-toggle {
    background: none;
    border: none;
    padding: 0 8px;
    color: inherit;
    cursor: pointer;
    opacity: 0.6;
    display: flex;
    align-items: center;
}
.side-link-wrapper .side-link-toggle:hover {
    opacity: 1;
}
.side-link-wrapper .side-link-toggle i {
    transition: transform 0.16s ease;
    font-size: 0.75rem;
}
.side-link-wrapper .side-link-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* ============================================================
   COLLAPSIBLE SIDEBAR
   ============================================================ */
.sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: none;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.18s ease;
}
.sidebar-toggle-btn:hover {
    background: var(--soft);
    color: var(--brand);
}
.sidebar-toggle-btn i {
    font-size: 0.9rem;
    transition: transform 0.18s ease;
}
.sidebar.collapsed {
    width: 0;
    border-right-width: 0;
    overflow: hidden;
}
[data-inpec-section] {
    display: none !important;
}

/* ============================================================
   CATEGORY QUICK-ACCESS PANEL
   ============================================================ */
.cat-panel {
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
[data-bs-theme="dark"] .cat-panel {
    background: var(--card);
}
.cat-panel-inner {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 12px;
    min-height: 46px;
}
.cat-panel-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand);
    text-decoration: none;
    white-space: nowrap;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
}
.cat-panel-brand:hover {
    text-decoration: underline;
}
.cat-panel-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
}
.cat-panel-tabs::-webkit-scrollbar {
    display: none;
}
.cat-panel-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.cat-panel-tab:hover {
    color: var(--brand);
}
.cat-panel-tab.active {
    color: var(--brand);
    font-weight: 600;
}

/* ============================================================
   DASHBOARD NAV BAR
   ============================================================ */
.dash-nav {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 60px;
    z-index: 39;
    padding: 0 12px;
}
[data-bs-theme="dark"] .dash-nav {
    background: var(--card);
}
.dash-nav nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.dash-nav nav::-webkit-scrollbar {
    display: none;
}
.dash-tab {
    display: inline-flex;
    align-items: center;
    padding: 12px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    background: transparent;
    transition:
        color 0.15s ease,
        border-color 0.15s ease;
    flex-shrink: 0;
}
.dash-tab:hover {
    color: var(--brand);
}
.dash-tab.active {
    color: var(--brand);
    font-weight: 600;
    border-bottom-color: var(--brand);
}
#dashNavMore .btn-link {
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    padding: 12px 14px;
}
#dashNavMore .btn-link:hover {
    color: var(--brand);
}
#dashNavMore .dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow2);
}
[data-bs-theme="dark"] #dashNavMore .dropdown-menu {
    background: var(--card);
}
#dashNavMobile {
    display: none;
}
@media (max-width: 767.98px) {
    .dash-nav {
        display: none !important;
    }
    #dashNavMobile {
        display: block;
    }
}

/* ============================================================
   SIDEBAR FOOTER
   ============================================================ */
.sidebar-footer {
    margin-top: auto;
    padding: 8px 0 12px;
    border-top: 1px solid var(--border);
}
.sidebar-footer .side-link {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 991.98px) {
    .sidebar.collapsed {
        width: 280px !important;
        border-right-width: 1px;
    }
    .sidebar-footer {
        padding-bottom: 24px;
    }
}
@media (max-width: 767.98px) {
    .cat-panel-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 4px 0;
    }
    .cat-panel-brand {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 8px 16px;
    }
    .cat-panel-tabs {
        padding: 4px 8px;
    }
}

[data-bs-theme="dark"] .dataTables_wrapper {
    color: #e5e7eb;
}
[data-bs-theme="dark"] table.dataTable {
    color: #e5e7eb;
    border-color: #374151;
}
[data-bs-theme="dark"] table.dataTable thead th {
    background: #1f2937;
    color: #e5e7eb;
    border-color: #374151;
}
[data-bs-theme="dark"] table.dataTable tbody td {
    border-color: #374151;
}
[data-bs-theme="dark"]
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button {
    color: #e5e7eb !important;
}
[data-bs-theme="dark"]
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button.current {
    background: var(--brand) !important;
    color: #fff !important;
}

/* Dark mode extras for new components */
[data-bs-theme="dark"] .side-link-wrapper.active-wrap {
    background: rgba(30, 60, 90, 0.35);
    border-color: rgba(30, 60, 90, 0.5);
}
[data-bs-theme="dark"] .cat-panel-tab:hover {
    color: #e5e7eb;
}
[data-bs-theme="dark"] .cat-panel-tab.active {
    color: #e5e7eb;
}
[data-bs-theme="dark"] .cat-panel-brand {
    color: #e5e7eb;
}
[data-bs-theme="dark"] .cat-panel-brand:hover {
    color: #fff;
}
[data-bs-theme="dark"] .sidebar-toggle-btn {
    background: #1f2937;
    color: #94a3b8;
    border-color: #374151;
}
[data-bs-theme="dark"] .sidebar-toggle-btn:hover {
    background: #374151;
    color: #e5e7eb;
}
[data-bs-theme="dark"] .side-link-cat {
    color: inherit;
}

/* ═══════════════════════════════════════════
   DARK MODE — COMPLETIONS
   ═══════════════════════════════════════════ */
[data-bs-theme="dark"] .card-dashboard:hover,
[data-bs-theme="dark"] .dashboard-card:hover {
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.5) !important;
}
[data-bs-theme="dark"] .breadcrumb {
    background-color: #1f2937 !important;
    color: #e5e7eb;
}
[data-bs-theme="dark"] .breadcrumb .breadcrumb-item.active {
    color: #9ca3af !important;
}
[data-bs-theme="dark"] .breadcrumb .breadcrumb-item a {
    color: #93c5fd !important;
}
[data-bs-theme="dark"] .breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #6b7280;
}

/* ═══════════════════════════════════════════
   DASHBOARD BREADCRUMB — mirrors .cat-panel-tab styling
   ═══════════════════════════════════════════ */
.breadcrumb-simple {
    padding: 12px 18px;
    background: var(--bs-body-bg, #fbfaf6);
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 1rem;
}
.breadcrumb-simple-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    min-height: 28px;
}
.breadcrumb-simple a {
    text-decoration: none;
}
.breadcrumb-simple .breadcrumb-home,
.breadcrumb-simple .breadcrumb-link {
    color: var(--brand);
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}
.breadcrumb-simple .breadcrumb-home {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.breadcrumb-simple .breadcrumb-home:hover,
.breadcrumb-simple .breadcrumb-link:hover {
    color: var(--brand-2);
    background: rgba(44, 74, 94, 0.08);
}
.breadcrumb-simple .breadcrumb-crumb {
    color: var(--muted);
    padding: 2px 6px;
}
.breadcrumb-simple .breadcrumb-current {
    font-weight: 500;
    color: var(--ink, #24211d);
    padding: 2px 6px;
}
.breadcrumb-simple .breadcrumb-sep {
    color: var(--muted);
    opacity: 0.5;
    font-weight: 600;
}
[data-bs-theme="dark"] .breadcrumb-simple {
    background: var(--bs-body-bg, #1a1d20);
    border-bottom-color: #253043;
    color: var(--muted);
}
[data-bs-theme="dark"] .breadcrumb-simple .breadcrumb-crumb {
    color: #e5e7eb;
}
[data-bs-theme="dark"] .breadcrumb-simple .breadcrumb-home,
[data-bs-theme="dark"] .breadcrumb-simple .breadcrumb-link,
[data-bs-theme="dark"] .breadcrumb-simple .breadcrumb-current {
    color: #93c5fd;
}
[data-bs-theme="dark"] .breadcrumb-simple .breadcrumb-current {
    color: #e5e7eb;
}
[data-bs-theme="dark"] .breadcrumb-simple .breadcrumb-home:hover,
[data-bs-theme="dark"] .breadcrumb-simple .breadcrumb-link:hover {
    color: #bfdbfe;
    background: rgba(147, 197, 253, 0.12);
}
[data-bs-theme="dark"] .breadcrumb-simple .breadcrumb-sep {
    color: #9ca3af;
}
[data-bs-theme="dark"] .section-title {
    color: #93c5fd !important;
}
[data-bs-theme="dark"] .section-subtitle {
    color: #9ca3af !important;
}
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #111827 !important;
    border-color: #253043 !important;
}
[data-bs-theme="dark"] .dropdown-item {
    color: #e5e7eb !important;
}
[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #1f2937 !important;
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .dropdown-item.text-danger {
    color: #f87171 !important;
}
[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: #9ca3af;
    --bs-btn-border-color: #4b5563;
}
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    --bs-btn-color: #fff;
    --bs-btn-bg: #4b5563;
    --bs-btn-border-color: #4b5563;
}
[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #93c5fd;
    --bs-btn-border-color: #3b82f6;
}
[data-bs-theme="dark"] .btn-outline-primary:hover {
    --bs-btn-color: #fff;
    --bs-btn-bg: #3b82f6;
    --bs-btn-border-color: #3b82f6;
}
[data-bs-theme="dark"] .btn-outline-danger {
    --bs-btn-color: #fca5a5;
    --bs-btn-border-color: #ef4444;
}
[data-bs-theme="dark"] .btn-outline-danger:hover {
    --bs-btn-color: #fff;
    --bs-btn-bg: #ef4444;
    --bs-btn-border-color: #ef4444;
}
[data-bs-theme="dark"] .dropdown-divider {
    border-color: #253043 !important;
}
[data-bs-theme="dark"] .badge.bg-light {
    background-color: #1f2937 !important;
    color: #e5e7eb !important;
    border-color: #374151 !important;
}
[data-bs-theme="dark"] .badge.bg-light.text-dark {
    color: #e5e7eb !important;
}
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] thead.table-light {
    --bs-table-bg: #1f2937 !important;
    --bs-table-color: #e5e7eb !important;
    --bs-table-border-color: #374151 !important;
}
[data-bs-theme="dark"] .nav-tabs {
    border-bottom-color: #374151;
}
[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #9ca3af;
}
[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
    border-color: #374151 #374151 transparent;
}
[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #111827;
    color: #e5e7eb;
    border-color: #374151 #374151 #111827;
}
[data-bs-theme="dark"] .page-link {
    background-color: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}
[data-bs-theme="dark"] .page-link:hover {
    background-color: #374151;
    color: #f8fafc;
}
[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: #2563eb;
    border-color: #2563eb;
}
[data-bs-theme="dark"] .page-item.disabled .page-link {
    background-color: #1f2937;
    border-color: #374151;
    color: #6b7280;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background-color: #1f2937 !important;
    color: #e5e7eb !important;
    border: 1px solid #374151 !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length label,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter label {
    color: #e5e7eb;
}
[data-bs-theme="dark"]
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button {
    color: #e5e7eb !important;
    background: transparent !important;
    border: 1px solid #374151;
}
[data-bs-theme="dark"]
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button.current {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #2563eb !important;
}
[data-bs-theme="dark"]
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button.current:hover {
    background: #1d4ed8 !important;
    color: #fff !important;
}
[data-bs-theme="dark"]
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button:hover {
    background: #374151 !important;
    color: #f8fafc !important;
    border-color: #4b5563 !important;
}
[data-bs-theme="dark"]
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button.disabled {
    color: #6b7280 !important;
}
[data-bs-theme="dark"]
    .dataTables_wrapper
    .dataTables_paginate
    .paginate_button.disabled:hover {
    background: transparent !important;
    color: #6b7280 !important;
    border-color: #374151;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_info {
    color: #9ca3af !important;
}
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_processing {
    background: rgba(0, 0, 0, 0.7);
    color: #e5e7eb;
}
[data-bs-theme="dark"] table.dataTable tbody tr {
    background-color: transparent;
}
[data-bs-theme="dark"] table.dataTable.stripe tbody tr.odd > *,
[data-bs-theme="dark"] table.dataTable.display tbody tr.odd > * {
    box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.025) !important;
}
[data-bs-theme="dark"] table.dataTable.hover tbody tr:hover > *,
[data-bs-theme="dark"] table.dataTable.display tbody tr:hover > * {
    box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.06) !important;
}
[data-bs-theme="dark"] table.dataTable thead th {
    border-bottom-color: #374151 !important;
}
[data-bs-theme="dark"] table.dataTable.no-footer {
    border-bottom-color: #374151 !important;
}

[data-bs-theme="dark"] .lb-navbar {
    background: #111827;
}
[data-bs-theme="dark"] .lb-card,
[data-bs-theme="dark"] .lb-card-producto,
[data-bs-theme="dark"] .lb-card-categoria {
    background: #111827;
    border-color: #374151;
}
[data-bs-theme="dark"] .lb-section--alt {
    background-color: #111827;
}
[data-bs-theme="dark"] .lb-section--verde {
    background-color: #2d4a30;
}
[data-bs-theme="dark"] .lb-footer {
    background: #111827;
    border-top-color: #374151;
}
[data-bs-theme="dark"] .lb-empty,
[data-bs-theme="dark"] .lb-breadcrumb {
    color: #94a3b8;
}
[data-bs-theme="dark"] .lb-breadcrumb a {
    color: var(--bs-link-color, #93c5fd);
}
[data-bs-theme="dark"] .glass-effect {
    background: #111827;
    border-color: #374151;
}
[data-bs-theme="dark"] .card-accent-top {
    background: #111827;
}
[data-bs-theme="dark"] .bg-dot-pattern {
    background-color: #111827;
}
[data-bs-theme="dark"] .lb-section__title {
    color: #f1f5f9;
}
[data-bs-theme="dark"] .lb-section__lead {
    color: #94a3b8;
}
[data-bs-theme="dark"] .lb-divider {
    border-top-color: #374151;
}
[data-bs-theme="dark"] .btn-secondary {
    background-color: #4b5563 !important;
    border-color: #4b5563 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .btn-secondary:hover {
    background-color: #374151 !important;
    border-color: #374151 !important;
}
[data-bs-theme="dark"] .btn-outline-secondary {
    color: #d1d5db !important;
    border-color: #6b7280 !important;
    background: transparent !important;
}
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #4b5563 !important;
    border-color: #4b5563 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .btn-outline-primary {
    color: #93c5fd !important;
    border-color: #3b82f6 !important;
    background: transparent !important;
}
[data-bs-theme="dark"] .btn-outline-primary:hover {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .btn-outline-danger {
    color: #fca5a5 !important;
    border-color: #ef4444 !important;
    background: transparent !important;
}
[data-bs-theme="dark"] .btn-outline-danger:hover {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .lb-btn--ghost {
    color: #d1d5db !important;
}
[data-bs-theme="dark"] .lb-btn--ghost:hover {
    background-color: #1f2937 !important;
    color: #f1f5f9 !important;
}
[data-bs-theme="dark"] body {
    color: var(--bs-body-color, #e5e7eb);
    background-color: var(--bs-body-bg, #1a1d20);
}
[data-bs-theme="dark"] .btn-outline-dark {
    color: #d1d5db !important;
    border-color: #6b7280 !important;
    background: transparent !important;
}
[data-bs-theme="dark"] .btn-outline-dark:hover {
    background-color: #4b5563 !important;
    border-color: #4b5563 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .btn-outline-success {
    color: #86efac !important;
    border-color: #22c55e !important;
    background: transparent !important;
}
[data-bs-theme="dark"] .btn-outline-success:hover {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .btn-outline-info {
    color: #fde68a !important;
    border-color: #eab308 !important;
    background: transparent !important;
}
[data-bs-theme="dark"] .btn-outline-info:hover {
    background-color: #eab308 !important;
    border-color: #eab308 !important;
    color: #000 !important;
}
[data-bs-theme="dark"] .btn-outline-warning {
    color: #fde68a !important;
    border-color: #eab308 !important;
    background: transparent !important;
}
[data-bs-theme="dark"] .btn-outline-warning:hover {
    background-color: #eab308 !important;
    border-color: #eab308 !important;
    color: #000 !important;
}
[data-bs-theme="dark"] .btn-light {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #e5e7eb !important;
}
[data-bs-theme="dark"] .btn-light:hover {
    background-color: #4b5563 !important;
    border-color: #6b7280 !important;
    color: #f8fafc !important;
}
[data-bs-theme="dark"] .bg-white {
    background-color: #1f2937 !important;
    color: #e5e7eb;
}
[data-bs-theme="dark"] .bg-light {
    background-color: #1f2937 !important;
    color: #e5e7eb;
}
[data-bs-theme="dark"] .text-dark {
    color: #e5e7eb !important;
}
[data-bs-theme="dark"] .border-light {
    border-color: #374151 !important;
}
[data-bs-theme="dark"] .shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

[data-bs-theme="dark"] {
    --bs-body-color: #e5e7eb;
    --bs-body-bg: #1a1d20;
    --bs-border-color: #374151;
    --bs-link-color: #93c5fd;
    --bs-link-hover-color: #b9d8fd;
    --bs-heading-color: #f1f5f9;
    --bs-secondary: #9ca3af;
    --bs-success: #6bb875;
    --bs-info: #f5c262;
    --bs-warning: #f5c262;
    --bs-danger: #f87171;
    --bs-light: #374151;
    --bs-dark: #f8f9fa;
    --brand: #93c5fd;
    --brand-2: #60a5fa;
    --action: #f87171;
    --action-hover: #ef4444;
}
/* Tablas con theme oscuro */
[data-bs-theme="dark"] .table-modern thead {
    background-color: #1f2937 !important;
}
[data-bs-theme="dark"] .card-dashboard {
    background-color: #111827 !important;
}
[data-bs-theme="dark"] .card-dashboard .card-header {
    background-color: #111827 !important;
    border-bottom-color: #374151 !important;
}
[data-bs-theme="dark"] .text-muted {
    color: #9ca3af !important;
}
[data-bs-theme="dark"] .process-lead {
    color: #e5e7eb !important;
}
[data-bs-theme="dark"] .process-sub,
.step-desc {
    color: #9ca3af !important;
}
[data-bs-theme="dark"] .step-title {
    color: #e5e7eb !important;
}
[data-bs-theme="dark"] .side-link.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.sidebar-sep {
    border: none;
    border-top: 1px solid var(--border);
    margin: 8px 16px;
}

/* SuperAdmin & Support dark mode */
[data-bs-theme="dark"] .superadmin-hero,
[data-bs-theme="dark"] .super-card,
[data-bs-theme="dark"] .super-kpi {
    background: #111827;
    border-color: #374151;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
}
[data-bs-theme="dark"] .super-kpi-value {
    color: #e5e7eb;
}
[data-bs-theme="dark"] .super-kpi-icon {
    background: #1e3a5f;
    color: #60a5fa;
}
[data-bs-theme="dark"] .metric-box {
    background: #1f2937;
    border-color: #374151;
}
[data-bs-theme="dark"] .table-box {
    background: #111827;
    border-color: #374151;
}
[data-bs-theme="dark"] .empty-state {
    background: #1f2937;
    border-color: #374151;
}
[data-bs-theme="dark"] .recent-list .list-group-item:hover {
    background: #1f2937;
}
[data-bs-theme="dark"] .super-kpi:hover,
[data-bs-theme="dark"] .metric-box:hover,
[data-bs-theme="dark"] .table-box:hover {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.35);
}
[data-bs-theme="dark"] .saas-action-card {
    background: #111827;
    border-color: #374151;
}
[data-bs-theme="dark"] .saas-action-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 0.6rem 1.2rem rgba(0, 0, 0, 0.3);
}
[data-bs-theme="dark"] .kpi-link:hover {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.3) !important;
}
[data-bs-theme="dark"] .ticket-item {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #374151 !important;
}
[data-bs-theme="dark"] .ticket-item:hover {
    background: #1f2937 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3) !important;
}
[data-bs-theme="dark"] .ticket-item.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .empty-box {
    background: #111827 !important;
    border-color: #374151 !important;
    color: #9ca3af !important;
}
[data-bs-theme="dark"] .chat-card {
    background: #111827 !important;
    border-color: #374151 !important;
}
[data-bs-theme="dark"] .chat-header {
    background: #1f2937 !important;
    border-bottom-color: #374151 !important;
}
[data-bs-theme="dark"] .chat-body {
    background: #111827 !important;
}
[data-bs-theme="dark"] .chat-message.agent .chat-bubble,
[data-bs-theme="dark"] .chat-message.client .chat-bubble {
    background: #1f2937 !important;
    color: #e5e7eb !important;
}
[data-bs-theme="dark"] .chat-message.user .chat-bubble,
[data-bs-theme="dark"] .chat-message.admin .chat-bubble {
    background: #60a5fa !important;
    color: #0f172a !important;
}
[data-bs-theme="dark"] .chat-meta {
    color: #9ca3af !important;
}

/* SuperAdmin & Support dark mode */
[data-bs-theme="dark"] .superadmin-hero,
[data-bs-theme="dark"] .super-card,
[data-bs-theme="dark"] .super-kpi {
    background: #111827;
    border-color: #374151;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
}
[data-bs-theme="dark"] .super-kpi-value {
    color: #e5e7eb;
}
[data-bs-theme="dark"] .super-kpi-icon {
    background: #1e3a5f;
    color: #60a5fa;
}
[data-bs-theme="dark"] .metric-box {
    background: #1f2937;
    border-color: #374151;
}
[data-bs-theme="dark"] .table-box {
    background: #111827;
    border-color: #374151;
}
[data-bs-theme="dark"] .empty-state {
    background: #1f2937;
    border-color: #374151;
}
[data-bs-theme="dark"] .recent-list .list-group-item:hover {
    background: #1f2937;
}
[data-bs-theme="dark"] .super-kpi:hover,
[data-bs-theme="dark"] .metric-box:hover,
[data-bs-theme="dark"] .table-box:hover {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.35);
}
[data-bs-theme="dark"] .saas-action-card {
    background: #111827;
    border-color: #374151;
}
[data-bs-theme="dark"] .saas-action-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 0.6rem 1.2rem rgba(0, 0, 0, 0.3);
}
[data-bs-theme="dark"] .kpi-link:hover {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.3) !important;
}
[data-bs-theme="dark"] .ticket-item {
    background: #111827 !important;
    color: #e5e7eb !important;
    border-color: #374151 !important;
}
[data-bs-theme="dark"] .ticket-item:hover {
    background: #1f2937 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3) !important;
}
[data-bs-theme="dark"] .ticket-item.active {
    background: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .empty-box {
    background: #111827 !important;
    border-color: #374151 !important;
    color: #9ca3af !important;
}
[data-bs-theme="dark"] .chat-card {
    background: #111827 !important;
    border-color: #374151 !important;
}
[data-bs-theme="dark"] .chat-header {
    background: #1f2937 !important;
    border-bottom-color: #374151 !important;
}
[data-bs-theme="dark"] .chat-body {
    background: #111827 !important;
}
[data-bs-theme="dark"] .chat-message.agent .chat-bubble,
[data-bs-theme="dark"] .chat-message.client .chat-bubble {
    background: #1f2937 !important;
    color: #e5e7eb !important;
}
[data-bs-theme="dark"] .chat-message.user .chat-bubble,
[data-bs-theme="dark"] .chat-message.admin .chat-bubble {
    background: #60a5fa !important;
    color: #0f172a !important;
}
[data-bs-theme="dark"] .chat-meta {
    color: #9ca3af !important;
}

/* ============================================================
   SIDEBAR NAV (estructura semántica ul/li)
   ============================================================ */
.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav > li {
    margin: 6px 12px;
    border-radius: 14px;
}

.sidebar-nav > .nav-section-title {
    padding: 14px 18px 8px;
}

/* Sidebar footer (Perfil/Salir) */
.sidebar-footer {
    margin-top: auto;
    padding: 8px 0 12px;
    border-top: 1px solid var(--border);
}
.sidebar-footer .side-link {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Sidebar legal / session indicator */
.sidebar-legal {
    padding: 18px;
}
