/* SG4 ERP - Custom Styles */

/* =========== THEME VARIABLES =========== */
:root, [data-theme="light"] {
    --sidebar-width: 260px;
    --sidebar-bg: #1a1f2e;
    --sidebar-text: #c8cdd8;
    --sidebar-hover: rgba(255,255,255,0.08);
    --sidebar-active: #3b82f6;
    --topbar-height: 56px;
    --body-bg: #f0f2f5;
    --body-color: #212529;
    --card-bg: #fff;
    --card-border: none;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.07);
    --header-bg: #fff;
    --table-hover: rgba(59,130,246,0.04);
    --table-border: #dee2e6;
    --table-head-color: #6c757d;
    --input-bg: #fff;
    --input-border: #ced4da;
    --input-color: #212529;
    --muted-color: #6c757d;
    --label-color: #374151;
    --dropdown-bg: #fff;
    --dropdown-border: rgba(0,0,0,0.15);
    --modal-bg: #fff;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
}

/* Dark theme CSS vars (used by SG4 custom components) */

/* =========== DARK THEME OVERRIDES =========== */
/* Bootstrap 5.3 handles most dark mode via data-bs-theme="dark" */
/* Below are SG4-specific overrides for our custom components */

/* -- Sidebar -- */
[data-theme="dark"] .sidebar { background-color: #0d1117 !important; box-shadow: 2px 0 10px rgba(0,0,0,0.5); }
[data-theme="dark"] .sidebar-brand { background: rgba(59,130,246,0.1); }

/* -- Navbar -- */
[data-theme="dark"] .navbar,
[data-theme="dark"] .navbar.bg-white,
[data-theme="dark"] .navbar.navbar-light { background-color: #161b22 !important; border-bottom-color: #30363d !important; }
[data-theme="dark"] .navbar .navbar-brand,
[data-theme="dark"] .navbar .btn,
[data-theme="dark"] .navbar .dropdown-toggle { color: #e6edf3 !important; }

/* -- Main content area -- */
[data-theme="dark"] .main-content { background-color: #0d1117 !important; }

/* -- Cards -- */
[data-theme="dark"] .card { background-color: #161b22 !important; box-shadow: 0 2px 8px rgba(0,0,0,0.3); border-color: #30363d !important; }
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-header.bg-white { background-color: #1c2128 !important; border-bottom-color: #30363d !important; color: #e6edf3 !important; }
[data-theme="dark"] .card-body { background-color: #161b22; color: #e6edf3; }
[data-theme="dark"] .card-footer { background-color: #1c2128 !important; border-top-color: #30363d !important; }

/* -- Bootstrap utility overrides -- */
[data-theme="dark"] .bg-white { background-color: #161b22 !important; }
[data-theme="dark"] .bg-light { background-color: #21262d !important; }
[data-theme="dark"] .bg-opacity-10 { --bs-bg-opacity: 0.15; }
[data-theme="dark"] .text-dark { color: #e6edf3 !important; }
[data-theme="dark"] .text-muted { color: #8b949e !important; }
[data-theme="dark"] .border { border-color: #30363d !important; }
[data-theme="dark"] .border-bottom { border-bottom-color: #30363d !important; }
[data-theme="dark"] .shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important; }

/* -- Tables -- */
[data-theme="dark"] .table { --bs-table-bg: transparent; color: #e6edf3; }
[data-theme="dark"] .table thead th { color: #8b949e; border-bottom-color: #30363d !important; }
[data-theme="dark"] .table td, [data-theme="dark"] .table th { border-color: #30363d; }
[data-theme="dark"] .table-hover tbody tr:hover { background-color: rgba(59,130,246,0.08) !important; }
[data-theme="dark"] .table-light { background-color: #21262d !important; color: #e6edf3 !important; }
[data-theme="dark"] .table-bordered { border-color: #30363d; }
[data-theme="dark"] tr.row-vencido { background-color: rgba(220,53,69,0.1) !important; }
[data-theme="dark"] tr.row-vencendo { background-color: rgba(255,193,7,0.08) !important; }
[data-theme="dark"] .table-danger { background-color: rgba(220,53,69,0.1) !important; }

/* -- Forms -- */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select { background-color: #0d1117 !important; border-color: #30363d !important; color: #e6edf3 !important; }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus { background-color: #0d1117 !important; border-color: #3b82f6 !important; color: #e6edf3 !important; box-shadow: 0 0 0 0.2rem rgba(59,130,246,0.25) !important; }
[data-theme="dark"] .form-control::placeholder { color: #6e7681; }
[data-theme="dark"] .form-label { color: #c9d1d9; }
[data-theme="dark"] .form-check-label { color: #e6edf3; }
[data-theme="dark"] .input-group-text { background-color: #21262d !important; border-color: #30363d !important; color: #8b949e !important; }

/* -- Dropdowns -- */
[data-theme="dark"] .dropdown-menu { background-color: #1c2128 !important; border-color: #30363d !important; }
[data-theme="dark"] .dropdown-item { color: #e6edf3 !important; }
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus { background-color: #30363d !important; color: #fff !important; }
[data-theme="dark"] .dropdown-divider { border-color: #30363d; }
[data-theme="dark"] .dropdown-header { color: #8b949e !important; }

/* -- Modals -- */
[data-theme="dark"] .modal-content { background-color: #161b22 !important; border-color: #30363d !important; color: #e6edf3; }
[data-theme="dark"] .modal-header { border-bottom-color: #30363d !important; }
[data-theme="dark"] .modal-footer { border-top-color: #30363d !important; }
[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(2); }

/* -- Lists -- */
[data-theme="dark"] .list-group-item { background-color: #161b22 !important; border-color: #30363d !important; color: #e6edf3; }
[data-theme="dark"] .list-group-item-action:hover { background-color: #1c2128 !important; }
[data-theme="dark"] .list-group-item-danger { background-color: rgba(220,53,69,0.15) !important; color: #e6edf3 !important; }
[data-theme="dark"] .list-group-item-warning { background-color: rgba(255,193,7,0.12) !important; color: #e6edf3 !important; }

/* -- Tabs & Pills -- */
[data-theme="dark"] .nav-tabs { border-bottom-color: #30363d !important; }
[data-theme="dark"] .nav-tabs .nav-link { color: #8b949e; }
[data-theme="dark"] .nav-tabs .nav-link.active { background-color: #161b22 !important; color: #e6edf3 !important; border-color: #30363d #30363d #161b22 !important; }
[data-theme="dark"] .subnav-pills .nav-link { color: #8b949e; }
[data-theme="dark"] .subnav-pills .nav-link:hover { background: rgba(255,255,255,.06); color: #e6edf3; }

/* -- Alerts -- */
[data-theme="dark"] .alert-warning { background-color: rgba(255,193,7,0.15) !important; border-color: rgba(255,193,7,0.3) !important; color: #ffc107 !important; }
[data-theme="dark"] .alert-success { background-color: rgba(25,135,84,0.15) !important; border-color: rgba(25,135,84,0.3) !important; color: #198754 !important; }
[data-theme="dark"] .alert-danger { background-color: rgba(220,53,69,0.15) !important; border-color: rgba(220,53,69,0.3) !important; color: #dc3545 !important; }

/* -- Misc -- */
[data-theme="dark"] .badge.bg-light { background-color: #21262d !important; color: #e6edf3 !important; }
[data-theme="dark"] .progress { background-color: #21262d; }
[data-theme="dark"] pre { background-color: #0d1117 !important; color: #e6edf3; }
[data-theme="dark"] .page-link { background-color: #161b22; border-color: #30363d; color: #e6edf3; }
[data-theme="dark"] .page-link:hover { background-color: #21262d; }
[data-theme="dark"] .page-item.active .page-link { background-color: #3b82f6; border-color: #3b82f6; }
[data-theme="dark"] .stat-card .stat-label { color: #8b949e; }
[data-theme="dark"] hr { border-color: #30363d; }

/* -- Catch-all: any remaining bg-white/bg-light in dark mode -- */
[data-theme="dark"] [class*="bg-white"]:not(.btn):not(.badge):not(.nav-link) { background-color: #161b22 !important; }
[data-theme="dark"] .card .bg-white { background-color: #1c2128 !important; }
[data-theme="dark"] .bg-opacity-10 { background-color: transparent !important; }
[data-theme="dark"] .rounded-circle.bg-primary.bg-opacity-10,
[data-theme="dark"] .rounded-circle.bg-success.bg-opacity-10,
[data-theme="dark"] .rounded-circle.bg-warning.bg-opacity-10,
[data-theme="dark"] .rounded-circle.bg-danger.bg-opacity-10,
[data-theme="dark"] .rounded-circle.bg-info.bg-opacity-10 { background-color: rgba(255,255,255,0.06) !important; }
[data-theme="dark"] .table-responsive { color: #e6edf3; }
[data-theme="dark"] .border-start { border-left-color: inherit !important; }
[data-theme="dark"] .tab-content .card { border-color: #30363d !important; }
[data-theme="dark"] small.text-muted { color: #6e7681 !important; }
[data-theme="dark"] .fw-semibold { color: #e6edf3; }
[data-theme="dark"] code { color: #f0883e; }
[data-theme="dark"] .breadcrumb-item a { color: #58a6ff; }
[data-theme="dark"] .form-check-input { background-color: #0d1117; border-color: #30363d; }
[data-theme="dark"] .form-check-input:checked { background-color: #3b82f6; border-color: #3b82f6; }
[data-theme="dark"] .accordion-button { background-color: #1c2128 !important; color: #e6edf3 !important; }
[data-theme="dark"] .accordion-body { background-color: #161b22; color: #e6edf3; }
[data-theme="dark"] .offcanvas { background-color: #161b22 !important; color: #e6edf3; }
[data-theme="dark"] .toast { background-color: #1c2128 !important; color: #e6edf3; }

/* -- CRM Kanban dark mode -- */
[data-theme="dark"] .crm-board { background-color: #0d1117 !important; }
[data-theme="dark"] .crm-column { background-color: #161b22 !important; }
[data-theme="dark"] .crm-card { background-color: #1c2128 !important; border-color: #30363d !important; color: #e6edf3 !important; }
[data-theme="dark"] .crm-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.4) !important; }
[data-theme="dark"] .crm-card-title { color: #e6edf3 !important; }
[data-theme="dark"] .crm-card-empresa { color: #8b949e !important; }
[data-theme="dark"] .crm-card-valor { color: #e6edf3 !important; }
[data-theme="dark"] .crm-card-footer { background: rgba(255,255,255,0.03) !important; }
[data-theme="dark"] .crm-card-badges { color: #8b949e !important; }
[data-theme="dark"] .crm-add-card { color: #8b949e !important; background: transparent !important; }
[data-theme="dark"] .crm-add-card:hover { background: rgba(255,255,255,0.05) !important; color: #e6edf3 !important; }
[data-theme="dark"] .crm-col-footer { background-color: #21262d !important; color: #8b949e !important; }

/* -- Sales quotes/orders forms dark -- */
[data-theme="dark"] .tab-pane .card { background-color: #161b22 !important; }
[data-theme="dark"] .tab-content > .tab-pane .card-header { background-color: #1c2128 !important; }

/* -- Follow-up badges dark -- */
[data-theme="dark"] .follow-past { background: rgba(220,53,69,0.2) !important; color: #f87171 !important; }
[data-theme="dark"] .follow-today { background: rgba(255,193,7,0.15) !important; color: #fbbf24 !important; }
[data-theme="dark"] .follow-future { background: rgba(34,197,94,0.15) !important; color: #4ade80 !important; }

/* -- Generic catch-all for inline bg styles in dark -- */
[data-theme="dark"] .card-body .bg-light,
[data-theme="dark"] .p-3.bg-light,
[data-theme="dark"] .border.rounded.bg-light { background-color: #21262d !important; }
[data-theme="dark"] .table-bordered td,
[data-theme="dark"] .table-bordered th { border-color: #30363d !important; }
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) { background-color: rgba(255,255,255,0.02) !important; }
[data-theme="dark"] .btn-outline-secondary { color: #8b949e; border-color: #30363d; }
[data-theme="dark"] .btn-outline-secondary:hover { background-color: #21262d; color: #e6edf3; }
[data-theme="dark"] .btn-outline-primary { color: #58a6ff; border-color: #1f6feb; }
[data-theme="dark"] .btn-outline-primary:hover { background-color: #1f6feb; color: #fff; }
[data-theme="dark"] .btn-outline-info { color: #3bc9db; border-color: #3bc9db; }
[data-theme="dark"] .btn-outline-success { color: #3fb950; border-color: #3fb950; }
[data-theme="dark"] .btn-outline-danger { color: #f85149; border-color: #f85149; }
[data-theme="dark"] .btn-outline-warning { color: #d29922; border-color: #d29922; }

/* -- Bootstrap table contextual classes in dark mode -- */
[data-theme="dark"] .table-light,
[data-theme="dark"] .table-light > th,
[data-theme="dark"] .table-light > td,
[data-theme="dark"] thead.table-light,
[data-theme="dark"] thead.table-light th { background-color: #21262d !important; color: #8b949e !important; border-color: #30363d !important; --bs-table-bg: #21262d !important; --bs-table-color: #8b949e !important; }

[data-theme="dark"] .table-danger,
[data-theme="dark"] .table-danger > th,
[data-theme="dark"] .table-danger > td,
[data-theme="dark"] tr.table-danger { background-color: rgba(220,53,69,0.15) !important; color: #f87171 !important; --bs-table-bg: rgba(220,53,69,0.15) !important; --bs-table-color: #f87171 !important; }

[data-theme="dark"] .table-warning,
[data-theme="dark"] .table-warning > th,
[data-theme="dark"] .table-warning > td,
[data-theme="dark"] tr.table-warning { background-color: rgba(255,193,7,0.12) !important; color: #fbbf24 !important; --bs-table-bg: rgba(255,193,7,0.12) !important; --bs-table-color: #fbbf24 !important; }

[data-theme="dark"] .table-success,
[data-theme="dark"] .table-success > th,
[data-theme="dark"] .table-success > td,
[data-theme="dark"] tr.table-success { background-color: rgba(25,135,84,0.15) !important; color: #4ade80 !important; --bs-table-bg: rgba(25,135,84,0.15) !important; --bs-table-color: #4ade80 !important; }

[data-theme="dark"] .table-info,
[data-theme="dark"] .table-info > th,
[data-theme="dark"] .table-info > td,
[data-theme="dark"] tr.table-info { background-color: rgba(13,202,240,0.12) !important; color: #67e8f9 !important; --bs-table-bg: rgba(13,202,240,0.12) !important; --bs-table-color: #67e8f9 !important; }

[data-theme="dark"] .table-secondary,
[data-theme="dark"] .table-secondary > th,
[data-theme="dark"] .table-secondary > td,
[data-theme="dark"] tr.table-secondary { background-color: rgba(108,117,125,0.15) !important; color: #8b949e !important; --bs-table-bg: rgba(108,117,125,0.15) !important; }

[data-theme="dark"] .table-primary,
[data-theme="dark"] .table-primary > th,
[data-theme="dark"] .table-primary > td,
[data-theme="dark"] tr.table-primary { background-color: rgba(59,130,246,0.15) !important; color: #93c5fd !important; --bs-table-bg: rgba(59,130,246,0.15) !important; }

[data-theme="dark"] .table-active,
[data-theme="dark"] tr.table-active { background-color: rgba(255,255,255,0.05) !important; --bs-table-bg: rgba(255,255,255,0.05) !important; }

/* -- Force all thead in dark to be dark -- */
[data-theme="dark"] thead th,
[data-theme="dark"] thead td { background-color: #21262d !important; color: #8b949e !important; border-color: #30363d !important; }

/* -- Tfoot -- */
[data-theme="dark"] tfoot td,
[data-theme="dark"] tfoot th { background-color: #1c2128 !important; color: #e6edf3 !important; border-color: #30363d !important; }

/* Light theme: sidebar stays dark, navbar stays light */
[data-theme="light"] .sidebar { background-color: #1a1f2e; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.9rem;
}
[data-theme="light"] body { background-color: #f0f2f5; }
[data-theme="dark"] body { background-color: #0d1117 !important; color: #e6edf3; }

/* =========== SIDEBAR =========== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 20px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    letter-spacing: 1px;
    background: rgba(59,130,246,0.15);
}

.sidebar-nav {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.sidebar-section {
    padding: 14px 20px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.35);
}

.sidebar-item {
    margin: 1px 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
    gap: 12px;
    font-size: 0.88rem;
}

.sidebar-link:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
}

.sidebar-link.active {
    background-color: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
}

.sidebar-link.active i {
    color: #fff !important;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* =========== SIDEBAR ACCORDION =========== */
.sidebar-group {}

.sidebar-group-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    margin: 1px 8px;
    width: calc(100% - 16px);
    color: var(--sidebar-text);
    text-decoration: none;
    border: none; background: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    gap: 12px;
    font-size: 0.88rem;
    font-family: inherit;
    text-align: left;
}
.sidebar-group-toggle:hover {
    background-color: var(--sidebar-hover);
    color: #fff;
}
.sidebar-group-toggle.group-active {
    color: #fff;
    font-weight: 600;
}
.sidebar-group-toggle i.group-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.sidebar-group-toggle .group-label { flex: 1; }
.sidebar-group-toggle .chevron {
    font-size: 0.65rem;
    transition: transform 0.25s ease;
    opacity: 0.5;
}
.sidebar-group.open > .sidebar-group-toggle .chevron {
    transform: rotate(90deg);
    opacity: 0.8;
}

.sidebar-group-items {
    list-style: none;
    padding: 0 0 4px 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    opacity: 0;
}
.sidebar-group.open > .sidebar-group-items {
    max-height: 500px;
    opacity: 1;
}

.sidebar-group-items .sidebar-link {
    padding: 7px 14px 7px 46px;
    font-size: 0.84rem;
}
.sidebar-group-items .sidebar-link i {
    font-size: 0.8rem;
    width: 16px;
}

/* =========== NAVBAR =========== */
.navbar {
    right: 0;
    height: var(--topbar-height);
    border-bottom: 1px solid #e9ecef;
}

/* =========== MAIN CONTENT =========== */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
}

/* =========== CARDS =========== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    border-left: 4px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.stat-card.stat-danger  { border-left-color: #dc3545; }
.stat-card.stat-success { border-left-color: #198754; }
.stat-card.stat-warning { border-left-color: #fd7e14; }
.stat-card.stat-info    { border-left-color: #0dcaf0; }
.stat-card.stat-primary { border-left-color: #3b82f6; }

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.icon-danger  { background: rgba(220,53,69,0.1);   color: #dc3545; }
.stat-icon.icon-success { background: rgba(25,135,84,0.1);   color: #198754; }
.stat-icon.icon-warning { background: rgba(253,126,20,0.1);  color: #fd7e14; }
.stat-icon.icon-info    { background: rgba(13,202,240,0.1);  color: #0dcaf0; }
.stat-icon.icon-primary { background: rgba(59,130,246,0.1);  color: #3b82f6; }

.stat-card .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========== TABLES =========== */
.table-hover tbody tr:hover {
    background-color: rgba(59,130,246,0.04);
}

.table thead th {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    border-bottom: 2px solid #dee2e6;
}

/* Row highlighting */
tr.row-vencido {
    background-color: rgba(220, 53, 69, 0.06) !important;
}

tr.row-vencendo {
    background-color: rgba(255, 193, 7, 0.10) !important;
}

/* =========== BADGES =========== */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* =========== BUTTONS =========== */
.btn-sm {
    font-size: 0.78rem;
}

/* =========== FORMS =========== */
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59,130,246,0.15);
}

/* =========== BREADCRUMB =========== */
.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 0.82rem;
}

/* =========== VALUE COLORS =========== */
.text-entrada { color: #198754; font-weight: 600; }
.text-saida   { color: #dc3545; font-weight: 600; }

/* =========== INLINE DELETE FORMS =========== */
form.form-delete-inline { display:inline; margin:0; padding:0; }

/* =========== MODULE SUB-NAV PILLS =========== */
.subnav-pills .nav-link {
    color: #555; font-size: .88rem; font-weight: 500;
    border-radius: 8px; padding: .45rem .9rem;
    transition: background .2s, color .2s;
}
.subnav-pills .nav-link:hover { background: rgba(0,0,0,.05); color: #222; }
/* Color themes */
.subnav-pills.pills-info    .nav-link.active { background: #0dcaf0; color: #fff; }
.subnav-pills.pills-primary .nav-link.active { background: #3b82f6; color: #fff; }
.subnav-pills.pills-success .nav-link.active { background: #198754; color: #fff; }
.subnav-pills.pills-warning .nav-link.active { background: #fd7e14; color: #fff; }
.subnav-pills.pills-danger  .nav-link.active { background: #dc3545; color: #fff; }
.subnav-pills.pills-secondary .nav-link.active { background: #6c757d; color: #fff; }

/* =========== RESPONSIVE =========== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    .navbar {
        left: 0 !important;
    }
    .stat-card .stat-value {
        font-size: 1.1rem;
    }
}
