/**
 * Echo911 CRM – Dark Theme
 * Neutral charcoal – no blue-tinted backgrounds.
 * Palette: Body #141414  Cards #1e1e1e  Sidebar #181818  Header #1a1a1a
 * Primary accent: Green #22c55e  |  Danger/Error: Red #dd4b39  |  Muted links: #9ca3af
 */

/* ==========================================================================
   Dark Theme – Neutral dark (no navy-blue tint)
   ========================================================================== */

[data-pc-theme="dark"] {
    --bs-body-bg: #141414;
    --bs-body-color: #d1d5db;
    --bs-primary: #22c55e;
    --bs-primary-rgb: 34, 197, 94;
    --bs-border-color: #2d2d2d;
    --bs-card-bg: #1e1e1e;
}

[data-pc-theme="dark"] body {
    background-color: #141414 !important;
    color: #d1d5db !important;
    font-size: 14px !important;
}

/* --- Main Content Layout --- */
[data-pc-theme="dark"] .pc-container {
    background-color: #141414 !important;
    min-height: calc(100vh - 70px);
}
[data-pc-theme="dark"] .pc-content {
    background-color: #141414 !important;
    padding: 20px;
}
@media (max-width: 1024px) {
    [data-pc-theme="dark"] .pc-content {
        padding: 12px;
    }
}
/* Ensure no horizontal scrolling on body */
body, html {
    overflow-x: hidden;
}

/* --- Cards --- */
[data-pc-theme="dark"] .card {
    background-color: #1e1e1e !important;
    border: 1px solid #2d2d2d !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
}
[data-pc-theme="dark"] .card .card-header {
    background-color: #252525 !important;
    border-bottom: 1px solid #2d2d2d !important;
    color: #f0f0f0 !important;
    padding: 10px 15px !important;
}
[data-pc-theme="dark"] .card .card-header h5 {
    font-size: 15px !important;
    margin: 0 !important;
}
[data-pc-theme="dark"] .card .card-body {
    background-color: #1e1e1e !important;
    color: #d1d5db !important;
}
[data-pc-theme="dark"] .card .card-footer {
    background-color: #252525 !important;
    border-top: 1px solid #2d2d2d !important;
}

/* --- Sidebar – neutral dark, not blue --- */
[data-pc-theme="dark"] .pc-sidebar {
    background-color: #1a1a1a !important;
    border-right: 1px solid #2d2d2d !important;
}
[data-pc-theme="dark"] .pc-sidebar .navbar-wrapper,
[data-pc-theme="dark"] .pc-sidebar .navbar-content,
[data-pc-theme="dark"] .pc-sidebar .m-header {
    background-color: #1a1a1a !important;
}
[data-pc-theme="dark"] .pc-sidebar .pc-link {
    color: #9ca3af !important;
    transition: background 0.15s, color 0.15s;
}
[data-pc-theme="dark"] .pc-sidebar .pc-link .pc-micon i {
    color: #6b7280 !important;
}
/* Active & hover: white text, subtle dark bg, green left border */
[data-pc-theme="dark"] .pc-sidebar .pc-navbar > .pc-item.active > .pc-link,
[data-pc-theme="dark"] .pc-sidebar .pc-navbar > .pc-item.pc-trigger > .pc-link,
[data-pc-theme="dark"] .pc-sidebar .pc-navbar > .pc-item > .pc-link:hover {
    color: #ffffff !important;
    background-color: rgba(255,255,255,0.06) !important;
    border-left: 3px solid #22c55e !important;
}
[data-pc-theme="dark"] .pc-sidebar .pc-navbar > .pc-item.active > .pc-link .pc-micon i,
[data-pc-theme="dark"] .pc-sidebar .pc-navbar > .pc-item.pc-trigger > .pc-link .pc-micon i,
[data-pc-theme="dark"] .pc-sidebar .pc-navbar > .pc-item > .pc-link:hover .pc-micon i {
    color: #ffffff !important;
}
[data-pc-theme="dark"] .pc-sidebar .pc-submenu .pc-item.active > .pc-link {
    color: #e5e7eb !important;
    font-weight: 600 !important;
}
[data-pc-theme="dark"] .pc-sidebar .pc-submenu .pc-item > .pc-link:hover {
    color: #ffffff !important;
}
[data-pc-theme="dark"] .pc-sidebar .pc-mtext {
    color: inherit !important;
    font-size: 0.9rem !important;
}
[data-pc-theme="dark"] .pc-sidebar .pc-caption {
    background-color: #141414 !important;
    color: #6b7280 !important;   /* Was #4b5563 (~2.2:1) → now #6b7280 (~3.5:1) */
    font-size: 0.75rem !important;
    padding: 8px 15px !important;
}
[data-pc-theme="dark"] .pc-sidebar .pc-caption label {
    color: #6b7280 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* --- Header – neutral dark with red accent --- */
[data-pc-theme="dark"] .pc-header {
    background-color: #1a1a1a !important;
    border-bottom: 1px solid #2d2d2d !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
}
[data-pc-theme="dark"] .pc-header .pc-head-link {
    color: #9ca3af !important;
}
[data-pc-theme="dark"] .pc-header .pc-head-link:hover {
    color: #ffffff !important;
    background-color: rgba(255,255,255,0.07) !important;
}
[data-pc-theme="dark"] .pc-header .header-search .form-control {
    background-color: #252525 !important;
    border-color: #3a3a3a !important;
    color: #d1d5db !important;
}

/* --- Headings --- */
[data-pc-theme="dark"] h1, [data-pc-theme="dark"] h2, [data-pc-theme="dark"] h3,
[data-pc-theme="dark"] h4, [data-pc-theme="dark"] h5, [data-pc-theme="dark"] h6,
[data-pc-theme="dark"] .h1, [data-pc-theme="dark"] .h2, [data-pc-theme="dark"] .h3,
[data-pc-theme="dark"] .h4, [data-pc-theme="dark"] .h5, [data-pc-theme="dark"] .h6 {
    color: #f0f0f0 !important;
    font-weight: 600 !important;
}

/* --- Dropdown menus --- */
[data-pc-theme="dark"] .dropdown-menu {
    background-color: #252525 !important;
    border: 1px solid #3a3a3a !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5) !important;
}
[data-pc-theme="dark"] .dropdown-item {
    color: #d1d5db !important;
}
[data-pc-theme="dark"] .dropdown-item:hover,
[data-pc-theme="dark"] .dropdown-item:focus {
    background-color: #333333 !important;
    color: #ffffff !important;
}

/* --- Modals --- */
[data-pc-theme="dark"] .modal-content {
    background-color: #1e1e1e !important;
    border: 1px solid #3a3a3a !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6) !important;
}
[data-pc-theme="dark"] .modal-header {
    background-color: #252525 !important;
    border-bottom: 1px solid #2d2d2d !important;
}
[data-pc-theme="dark"] .modal-footer {
    background-color: #252525 !important;
    border-top: 1px solid #2d2d2d !important;
}

/* --- Tables --- */
[data-pc-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #222222;
    --bs-table-hover-bg: #2a2a2a;
    color: #d1d5db !important;
    border-color: #2d2d2d !important;
    font-size: 0.9rem !important;
}
[data-pc-theme="dark"] .table thead th {
    background-color: #252525 !important;
    border-color: #2d2d2d !important;
    border-bottom: 2px solid #3a3a3a !important;
    color: #9ca3af !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
[data-pc-theme="dark"] .table td {
    border-color: #2d2d2d !important;
    color: #d1d5db !important;
    vertical-align: middle;
}
[data-pc-theme="dark"] .table tbody tr:hover {
    background-color: #2a2a2a !important;
}
/* table-light (used in tfoot summaries) */
[data-pc-theme="dark"] .table-light,
[data-pc-theme="dark"] .table-light > th,
[data-pc-theme="dark"] .table-light > td,
[data-pc-theme="dark"] tfoot.table-light td,
[data-pc-theme="dark"] tfoot.table-light th {
    --bs-table-bg: #252525 !important;
    background-color: #252525 !important;
    color: #d1d5db !important;
    border-color: #2d2d2d !important;
}

/* --- Forms --- */
[data-pc-theme="dark"] .form-control,
[data-pc-theme="dark"] .form-select {
    background-color: #252525 !important;
    border-color: #3a3a3a !important;
    color: #d1d5db !important;
    font-size: 0.9rem !important;
}
[data-pc-theme="dark"] .form-control:focus,
[data-pc-theme="dark"] .form-select:focus {
    background-color: #2a2a2a !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.15) !important;
}
[data-pc-theme="dark"] .form-control::placeholder {
    color: #6b7280 !important;
}
[data-pc-theme="dark"] .form-label {
    color: #d1d5db !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
}
[data-pc-theme="dark"] .form-check-input {
    background-color: #252525 !important;
    border-color: #3a3a3a !important;
}
[data-pc-theme="dark"] .input-group-text {
    background-color: #252525 !important;
    border-color: #3a3a3a !important;
    color: #9ca3af !important;
}

/* --- Borders --- */
[data-pc-theme="dark"] .border {
    border-color: #2d2d2d !important;
}
[data-pc-theme="dark"] .border-bottom,
[data-pc-theme="dark"] .border-top {
    border-color: #2d2d2d !important;
}
[data-pc-theme="dark"] .border-secondary {
    border-color: #2d2d2d !important;
}

/* --- Tabs --- */
[data-pc-theme="dark"] .nav-tabs {
    border-color: #2d2d2d !important;
}
[data-pc-theme="dark"] .nav-tabs .nav-link {
    color: #9ca3af !important;  /* brighter than #6b7280 – WCAG AA on #1a1a1a */
    font-size: 0.9rem !important;
}
[data-pc-theme="dark"] .nav-tabs .nav-link:hover {
    color: #e2e8f0 !important;
    border-color: transparent !important;
}
[data-pc-theme="dark"] .nav-tabs .nav-link.active {
    color: #ffffff !important;
    background-color: #1e1e1e !important;
    border-color: #2d2d2d #2d2d2d #1e1e1e !important;
    font-weight: 600 !important;
}

/* --- Nav pills (sub-tabs inside Billing / Profile) --- */
[data-pc-theme="dark"] .nav-pills .nav-link {
    color: #d1d5db !important;          /* High-contrast readable white-ish on dark bg */
    background-color: #2a2a2a !important;
    border: 1px solid #3a3a3a !important;
    border-radius: 4px !important;
    font-size: 0.85rem !important;
    padding: 0.4rem 0.85rem !important;
    margin-right: 0.25rem !important;
    transition: background 0.15s, color 0.15s !important;
}
[data-pc-theme="dark"] .nav-pills .nav-link:hover {
    color: #ffffff !important;
    background-color: #363636 !important;
    border-color: #4a4a4a !important;
}
[data-pc-theme="dark"] .nav-pills .nav-link.active,
[data-pc-theme="dark"] .nav-pills .show > .nav-link {
    color: #ffffff !important;          /* White text on green — passes WCAG AA (4.7:1) */
    background-color: #16a34a !important; /* Darker green for higher contrast than #22c55e */
    border-color: #15803d !important;
    font-weight: 600 !important;
}
/* Badges inside nav-pills are clearly visible */
[data-pc-theme="dark"] .nav-pills .nav-link .badge {
    opacity: 1 !important;
}
[data-pc-theme="dark"] .nav-pills .nav-link.active .badge.bg-secondary {
    background-color: rgba(255,255,255,0.25) !important;
    color: #ffffff !important;
}

/* --- Text / utilities --- */
/* #6b7280 on #1e1e1e = ~3.4:1 contrast – too dim for labels/captions.
   Bumped to #9ca3af (~5.4:1) which passes WCAG AA for normal text.      */
[data-pc-theme="dark"] .text-muted {
    color: #9ca3af !important;
}

/* --- Badges --- */
[data-pc-theme="dark"] .badge {
    font-size: 0.75rem !important;
    padding: 0.35em 0.6em !important;
}
[data-pc-theme="dark"] .badge.bg-light {
    background-color: #333333 !important;
    color: #d1d5db !important;
}

/* --- List groups --- */
[data-pc-theme="dark"] .list-group-item {
    background-color: #1e1e1e !important;
    border-color: #2d2d2d !important;
    color: #d1d5db !important;
    font-size: 0.9rem !important;
}

/* --- DataTables --- */
[data-pc-theme="dark"] .dataTables_wrapper {
    color: #d1d5db !important;
}
[data-pc-theme="dark"] .dataTables_wrapper .dataTables_length label,
[data-pc-theme="dark"] .dataTables_wrapper .dataTables_filter label {
    color: #9ca3af !important;
    font-size: 0.875rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.4rem !important;
    margin-bottom: 0 !important;
}
[data-pc-theme="dark"] .dataTables_wrapper .dataTables_length select,
[data-pc-theme="dark"] .dataTables_wrapper .dataTables_filter input {
    background-color: #252525 !important;
    border: 1px solid #3a3a3a !important;
    color: #d1d5db !important;
    border-radius: 3px !important;
    padding: 4px 8px !important;
    font-size: 0.875rem !important;
    width: auto !important;
    display: inline-block !important;
}
[data-pc-theme="dark"] .dataTables_wrapper .dataTables_info {
    color: #6b7280 !important;
    font-size: 0.875rem !important;
}
[data-pc-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #9ca3af !important;
    background: #252525 !important;
    border: 1px solid #3a3a3a !important;
    border-radius: 3px !important;
    margin: 0 2px !important;
}
[data-pc-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #3a3a3a !important;
    color: #ffffff !important;
    border-color: #4a4a4a !important;
}
[data-pc-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #22c55e !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
    font-weight: bold;
}
[data-pc-theme="dark"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #4b5563 !important;
    background: #1e1e1e !important;
    border-color: #2d2d2d !important;
}
[data-pc-theme="dark"] .dt-buttons .btn,
[data-pc-theme="dark"] .dt-buttons .dt-button {
    background-color: #252525 !important;
    background-image: none !important;
    color: #9ca3af !important;
    border: 1px solid #3a3a3a !important;
    border-radius: 6px !important;
}
[data-pc-theme="dark"] .dt-buttons .btn:hover,
[data-pc-theme="dark"] .dt-buttons .dt-button:hover {
    background-color: #3a3a3a !important;
    color: #ffffff !important;
    border-color: #4a4a4a !important;
}

/* --- Buttons (all variants) --- */

/* Filled buttons */
[data-pc-theme="dark"] .btn {
    font-size: 0.875rem !important;
    border-radius: 3px !important;
}
[data-pc-theme="dark"] .btn-primary {
    background-color: #22c55e !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-primary:hover {
    background-color: #16a34a !important;
    border-color: #15803d !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-secondary {
    background-color: #333333 !important;
    border-color: #3a3a3a !important;
    color: #d1d5db !important;
}
[data-pc-theme="dark"] .btn-secondary:hover {
    background-color: #3a3a3a !important;
    border-color: #4a4a4a !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-success {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: #ffffff !important; /* Better contrast than dark text */
}
[data-pc-theme="dark"] .btn-success:hover {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
}
[data-pc-theme="dark"] .btn-danger {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-danger:hover {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
}
[data-pc-theme="dark"] .btn-warning {
    background-color: #eab308 !important;
    border-color: #eab308 !important;
    color: #1c1917 !important;
}
[data-pc-theme="dark"] .btn-warning:hover {
    background-color: #ca8a04 !important;
    border-color: #ca8a04 !important;
}
[data-pc-theme="dark"] .btn-info {
    background-color: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-info:hover {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
}
[data-pc-theme="dark"] .btn-dark {
    background-color: #1a1a1a !important;
    border-color: #2d2d2d !important;
    color: #d1d5db !important;
}
[data-pc-theme="dark"] .btn-dark:hover {
    background-color: #252525 !important;
    border-color: #3a3a3a !important;
}
[data-pc-theme="dark"] .btn-light {
    background-color: #333333 !important;
    border-color: #3a3a3a !important;
    color: #d1d5db !important;
}
[data-pc-theme="dark"] .btn-light:hover {
    background-color: #3a3a3a !important;
    border-color: #4a4a4a !important;
    color: #ffffff !important;
}

/* Outline buttons */
[data-pc-theme="dark"] .btn-outline-primary {
    color: #4ade80 !important;
    border-color: #22c55e !important;
    background: transparent !important;
}
[data-pc-theme="dark"] .btn-outline-primary:hover {
    background-color: #22c55e !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-outline-secondary {
    color: #9ca3af !important;
    border-color: #3a3a3a !important;
    background: transparent !important;
}
[data-pc-theme="dark"] .btn-outline-secondary:hover {
    background-color: #3a3a3a !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-outline-success {
    color: #4ade80 !important;
    border-color: #4ade80 !important;
    background: transparent !important;
}
[data-pc-theme="dark"] .btn-outline-success:hover {
    background-color: #22c55e !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-outline-danger {
    color: #f87171 !important;
    border-color: #f87171 !important;
    background: transparent !important;
}
[data-pc-theme="dark"] .btn-outline-danger:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-outline-warning {
    color: #facc15 !important;
    border-color: #facc15 !important;
    background: transparent !important;
}
[data-pc-theme="dark"] .btn-outline-warning:hover {
    background-color: #eab308 !important;
    color: #1c1917 !important;
}
[data-pc-theme="dark"] .btn-outline-info {
    color: #38bdf8 !important;
    border-color: #38bdf8 !important;
    background: transparent !important;
}
[data-pc-theme="dark"] .btn-outline-info:hover {
    background-color: #0ea5e9 !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-outline-dark {
    color: #9ca3af !important;
    border-color: #3a3a3a !important;
    background: transparent !important;
}
[data-pc-theme="dark"] .btn-outline-dark:hover {
    background-color: #252525 !important;
    color: #ffffff !important;
}
[data-pc-theme="dark"] .btn-outline-light {
    color: #e2e8f0 !important;
    border-color: #64748b !important;
    background: transparent !important;
}
[data-pc-theme="dark"] .btn-outline-light:hover {
    background-color: #475569 !important;
    color: #ffffff !important;
}

/* Link button */
[data-pc-theme="dark"] .btn-link {
    color: #60a5fa !important;
    background: transparent !important;
}
[data-pc-theme="dark"] .btn-link:hover {
    color: #93c5fd !important;
}

/* Close / dismiss buttons */
[data-pc-theme="dark"] .btn-close {
    filter: invert(1) !important;
}

/* --- Pagination --- */
[data-pc-theme="dark"] .pagination .page-link {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
    font-size: 1rem !important;
}
[data-pc-theme="dark"] .pagination .page-item.active .page-link {
    background-color: #22c55e !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}

/* --- Footer --- */
[data-pc-theme="dark"] .footer-wrapper {
    background-color: #0f172a !important;
    border-top: 1px solid #334155 !important;
    color: #94a3b8 !important;
}

/* --- SweetAlert2 --- */
[data-pc-theme="dark"] .swal2-popup {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}
[data-pc-theme="dark"] .swal2-title {
    color: #ffffff !important;
}
.echo-toast-compact {
    padding: 0.5rem 0.75rem !important;
    width: auto !important;
    min-width: 250px !important;
    max-width: 350px !important;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.2) !important;
}
.echo-toast-compact .swal2-title {
    font-size: 0.9rem !important;
    margin: 0 0.5rem !important;
    line-height: 1.2 !important;
}
.echo-toast-compact .swal2-icon {
    transform: scale(0.6) !important;
    margin: 0 !important;
}
.echo-toast-compact .swal2-timer-progress-bar {
    height: 3px !important;
}

/* --- Breadcrumbs --- */
[data-pc-theme="dark"] .breadcrumb-item,
[data-pc-theme="dark"] .breadcrumb-item a {
    color: #94a3b8 !important;
    font-size: 1rem !important;
}
[data-pc-theme="dark"] .breadcrumb-item.active {
    color: #e2e8f0 !important;
}

/* --- Stat card bg-opacity tints --- */
[data-pc-theme="dark"] .bg-primary.bg-opacity-10 { background-color: rgba(34,197,94,0.12) !important; }
[data-pc-theme="dark"] .bg-success.bg-opacity-10 { background-color: rgba(34,197,94,0.12) !important; }
[data-pc-theme="dark"] .bg-warning.bg-opacity-10 { background-color: rgba(243,156,18,0.15) !important; }
[data-pc-theme="dark"] .bg-danger.bg-opacity-10  { background-color: rgba(239,68,68,0.12) !important; }
[data-pc-theme="dark"] .bg-info.bg-opacity-10    { background-color: rgba(0,192,239,0.12) !important; }

/* --- Links in dark mode ---
   Body links are light (~5.4:1 on #1e1e1e) — readable and distinct from muted text.
   Table links are brighter white for scannability.                                    */
[data-pc-theme="dark"] a {
    color: #c4cad4 !important;  /* Light silver-white – ~6:1 on #1e1e1e, distinct from muted */
}
[data-pc-theme="dark"] a:hover {
    color: #ffffff !important;
}
[data-pc-theme="dark"] .table a {
    color: #e2e8f0 !important;
    font-weight: 500 !important;
}
[data-pc-theme="dark"] .table a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}
/* Sidebar links keep their own muted palette – don't inherit the above */
[data-pc-theme="dark"] .pc-sidebar a,
[data-pc-theme="dark"] .pc-sidebar a:hover {
    color: inherit !important;
}
/* Nav tab/pill links keep their own colors */
[data-pc-theme="dark"] .nav a,
[data-pc-theme="dark"] .nav a:hover {
    color: inherit !important;
}
/* Footer links */
[data-pc-theme="dark"] .footer-wrapper a {
    color: #9ca3af !important;
}
/* Dropdown item links */
[data-pc-theme="dark"] .dropdown-menu a {
    color: #d1d5db !important;
}

/* --- Alerts (dark mode) --- */
[data-pc-theme="dark"] .alert-light {
    background-color: #252525 !important;
    border-color: #3a3a3a !important;
    color: #d1d5db !important;
}
[data-pc-theme="dark"] .alert-info {
    background-color: rgba(14, 165, 233, 0.15) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    color: #7dd3fc !important;
}
[data-pc-theme="dark"] .alert-warning {
    background-color: rgba(234, 179, 8, 0.15) !important;
    border-color: rgba(234, 179, 8, 0.3) !important;
    color: #fde68a !important;
}
[data-pc-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
}
[data-pc-theme="dark"] .alert-success {
    background-color: rgba(34, 197, 94, 0.15) !important;
    border-color: rgba(34, 197, 94, 0.3) !important;
    color: #86efac !important;
}

/* --- Definition lists (dt/dd) --- */
[data-pc-theme="dark"] dt {
    color: #9ca3af !important;
}
[data-pc-theme="dark"] dd {
    color: #e5e7eb !important;
}

/* --- Misc utilities --- */
[data-pc-theme="dark"] .bg-body { background-color: #141414 !important; }
[data-pc-theme="dark"] .bg-light { background-color: #252525 !important; }
[data-pc-theme="dark"] .text-dark { color: #d1d5db !important; }
[data-pc-theme="dark"] .text-muted { color: #9ca3af !important; }  /* Unified – see above */
[data-pc-theme="dark"] .border { border-color: #2d2d2d !important; }
[data-pc-theme="dark"] .border-bottom { border-color: #2d2d2d !important; }
[data-pc-theme="dark"] .border-secondary { border-color: #2d2d2d !important; }

/* --- Badge contrast in dark mode --- */
/* bg-secondary badges: Bootstrap default is a gray, but ensure text is legible */
[data-pc-theme="dark"] .badge.bg-secondary {
    background-color: #374151 !important;
    color: #e5e7eb !important;
}
/* bg-dark badge – make distinguishable from bg-secondary */
[data-pc-theme="dark"] .badge.bg-dark {
    background-color: #111827 !important;
    color: #d1d5db !important;
    border: 1px solid #374151 !important;
}
/* Ensure bg-info badge text is readable (white on teal) */
[data-pc-theme="dark"] .badge.bg-info {
    background-color: #0891b2 !important;
    color: #ffffff !important;
}
/* Ensure bg-primary badge text is readable (white on green) */
[data-pc-theme="dark"] .badge.bg-primary {
    background-color: #16a34a !important;  /* Darker green — more contrast than #22c55e */
    color: #ffffff !important;
}
/* bg-success stays as green, use same darker shade */
[data-pc-theme="dark"] .badge.bg-success {
    background-color: #16a34a !important;
    color: #ffffff !important;
}
/* bg-warning — dark text on yellow is best for contrast */
[data-pc-theme="dark"] .badge.bg-warning {
    background-color: #d97706 !important;   /* amber-600 – darker than yellow, good contrast */
    color: #ffffff !important;
}
/* bg-danger */
[data-pc-theme="dark"] .badge.bg-danger {
    background-color: #dc2626 !important;
    color: #ffffff !important;
}

/* --- Inline code & pre blocks (dark mode) ---
   Bootstrap default: color: #e685b5 (pinkish-red) — unreadable on dark bg.
   Override to a legible cyan-white.                                          */
[data-pc-theme="dark"] code {
    color: #7dd3fc !important;          /* sky-300 — light blue, 6.2:1 on #1e1e1e */
    background-color: #1c2533 !important;
    border-radius: 3px !important;
    padding: 0.1em 0.35em !important;
    font-size: 0.85em !important;
}
[data-pc-theme="dark"] pre {
    background-color: #111827 !important;
    color: #e2e8f0 !important;
    border: 1px solid #2d2d2d !important;
    border-radius: 4px !important;
}
[data-pc-theme="dark"] pre code {
    background-color: transparent !important;
    padding: 0 !important;
    color: inherit !important;
}

/* Custom utility classes */
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.hover-primary:hover { color: var(--bs-primary) !important; }

/* --- Auth pages --- */
.auth-main {
    background-color: #141414 !important;
}
.auth-wrapper .card {
    background-color: #1e1e1e !important;
    border: 1px solid #2d2d2d !important;
}
/* Kill Admindek default auth background circles */
.auth-bg,
.auth-bg .r {
    display: none !important;
}
[data-pc-theme="dark"] .auth-main {
    background-color: #141414 !important;
}

/* --- Recent Activity List / Timeline styling --- */
[data-pc-theme="dark"] .last-no-border:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   Light Theme – WHMCS Classic Style
   Base: #ecf0f5  Cards: #ffffff  Sidebar: #222d32 (slate) Header: #dd4b39 (red)
   ========================================================================== */

/* --- Auth pages --- */
html[data-pc-theme="light"] .auth-main {
    background-color: #ecf0f5 !important;
}
html[data-pc-theme="light"] .auth-wrapper .card {
    background-color: #ffffff !important;
    border: 0 !important;
    border-top: 3px solid #d2d6de !important;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1) !important;
}

/* --- CSS custom properties --- */
html[data-pc-theme="light"] {
    --bs-body-bg: #ecf0f5;
    --bs-body-color: #333333;
    --bs-primary: #3c8dbc;
    --bs-primary-rgb: 60, 141, 188;
    --bs-border-color: #f4f4f4;
    --bs-card-bg: #ffffff;
}
html[data-pc-theme="light"] body {
    background-color: #ecf0f5 !important;
    color: #333333 !important;
    font-size: 14px !important;
    font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}

/* --- Content area --- */
html[data-pc-theme="light"] .pc-content {
    background-color: #ecf0f5 !important;
    padding: 15px !important;
}

/* --- Cards (WHMCS widget style) --- */
html[data-pc-theme="light"] .card {
    background-color: #ffffff !important;
    border: 0 !important;
    border-top: 3px solid #d2d6de !important;
    border-radius: 3px !important;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1) !important;
    margin-bottom: 20px !important;
}
html[data-pc-theme="light"] .card .card-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #f4f4f4 !important;
    color: #444444 !important;
    padding: 10px 15px !important;
}
html[data-pc-theme="light"] .card .card-header h5 {
    font-size: 16px !important;
    margin: 0 !important;
}
html[data-pc-theme="light"] .card .card-body {
    background-color: #ffffff !important;
    color: #333333 !important;
    padding: 15px !important;
}
html[data-pc-theme="light"] .card .card-footer {
    background-color: #ffffff !important;
    border-top: 1px solid #f4f4f4 !important;
}

/* --- Sidebar – Dark Slate --- */
html[data-pc-theme="light"] .pc-sidebar {
    background-color: #222d32 !important;
    border-right: none !important;
}
html[data-pc-theme="light"] .pc-sidebar .navbar-wrapper,
html[data-pc-theme="light"] .pc-sidebar .navbar-content {
    background-color: #222d32 !important;
}
html[data-pc-theme="light"] .pc-sidebar .m-header {
    background-color: #dd4b39 !important; /* Match header red */
}
html[data-pc-theme="light"] .pc-sidebar .pc-link {
    color: #b8c7ce !important;
    padding: 12px 15px !important;
}
html[data-pc-theme="light"] .pc-sidebar .pc-link .pc-micon i {
    color: #b8c7ce !important;
}
html[data-pc-theme="light"] .pc-sidebar .pc-navbar > .pc-item.active > .pc-link,
html[data-pc-theme="light"] .pc-sidebar .pc-navbar > .pc-item > .pc-link:hover {
    color: #ffffff !important;
    background-color: #1e282c !important;
    border-left: 3px solid #3c8dbc !important;
}
html[data-pc-theme="light"] .pc-sidebar .pc-navbar > .pc-item.active > .pc-link .pc-micon i,
html[data-pc-theme="light"] .pc-sidebar .pc-navbar > .pc-item > .pc-link:hover .pc-micon i {
    color: #ffffff !important;
}
html[data-pc-theme="light"] .pc-sidebar .pc-mtext {
    color: inherit !important;
}
html[data-pc-theme="light"] .pc-sidebar .pc-caption {
    color: #4b646f !important;
    background-color: #1a2226 !important;
    padding: 10px 25px 10px 15px !important;
}
html[data-pc-theme="light"] .pc-sidebar .pc-caption label {
    color: #4b646f !important;
    font-size: 12px !important;
}
/* Sidebar logo area – show white logo in light mode too since sidebar is dark */
html[data-pc-theme="light"] .pc-sidebar .logo-light {
    display: none !important;
}
html[data-pc-theme="light"] .pc-sidebar .logo-dark-theme {
    display: inline-block !important;
}

/* --- Header --- */
html[data-pc-theme="light"] .pc-header {
    background-color: #dd4b39 !important; /* WHMCS red */
    border-bottom: none !important;
    color: #ffffff !important;
}
html[data-pc-theme="light"] .pc-header .pc-head-link {
    color: #ffffff !important;
}
html[data-pc-theme="light"] .pc-header .pc-head-link:hover {
    color: #ffffff !important;
    background-color: rgba(0,0,0,0.1) !important;
}
html[data-pc-theme="light"] .pc-header .header-search .form-control {
    background-color: rgba(255,255,255,0.2) !important;
    border-color: transparent !important;
    color: #ffffff !important;
}

/* --- Headings --- */
html[data-pc-theme="light"] h1, html[data-pc-theme="light"] h2, html[data-pc-theme="light"] h3,
html[data-pc-theme="light"] h4, html[data-pc-theme="light"] h5, html[data-pc-theme="light"] h6,
html[data-pc-theme="light"] .h1, html[data-pc-theme="light"] .h2, html[data-pc-theme="light"] .h3,
html[data-pc-theme="light"] .h4, html[data-pc-theme="light"] .h5, html[data-pc-theme="light"] .h6 {
    color: #1e293b !important;
}

/* --- Dropdown menus --- */
html[data-pc-theme="light"] .dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #d2d6de !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}
html[data-pc-theme="light"] .dropdown-item {
    color: #333333 !important;
}
html[data-pc-theme="light"] .dropdown-item:hover,
html[data-pc-theme="light"] .dropdown-item:focus {
    background-color: #f4f4f4 !important;
    color: #333333 !important;
}

/* --- Modals --- */
html[data-pc-theme="light"] .modal-content {
    background-color: #ffffff !important;
    border: 1px solid #d2d6de !important;
    border-radius: 3px !important;
}
html[data-pc-theme="light"] .modal-header {
    background-color: #f4f4f4 !important;
    border-bottom: 1px solid #d2d6de !important;
    color: #444444 !important;
}
html[data-pc-theme="light"] .modal-body {
    color: #333333 !important;
}
html[data-pc-theme="light"] .modal-footer {
    background-color: #f4f4f4 !important;
    border-top: 1px solid #d2d6de !important;
}

/* --- Tables --- */
html[data-pc-theme="light"] .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #f1f3f8;
    --bs-table-hover-bg: #e8ecf4;
    color: #2d3748 !important;
    border-color: #d5dbe3 !important;
}
html[data-pc-theme="light"] .table thead th {
    background-color: #e8ecf4 !important;
    border-color: #d5dbe3 !important;
    color: #1e293b !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}
html[data-pc-theme="light"] .table td {
    border-color: #e2e7ed !important;
    color: #2d3748 !important;
}
html[data-pc-theme="light"] .table tbody tr:hover {
    background-color: #e8ecf4 !important;
}
html[data-pc-theme="light"] .table-responsive {
    border: 1px solid #d5dbe3;
    border-radius: 6px;
}

/* --- Forms --- */
html[data-pc-theme="light"] .form-control,
html[data-pc-theme="light"] .form-select {
    background-color: #ffffff !important;
    border: 1px solid #d2d6de !important;
    color: #333333 !important;
    border-radius: 0 !important;
}
html[data-pc-theme="light"] .form-control:focus,
html[data-pc-theme="light"] .form-select:focus {
    background-color: #ffffff !important;
    border-color: #3c8dbc !important;
    box-shadow: none !important;
}
html[data-pc-theme="light"] .form-control::placeholder {
    color: #999999 !important;
}
html[data-pc-theme="light"] .form-label {
    color: #333333 !important;
    font-weight: bold !important;
}
html[data-pc-theme="light"] .form-check-input {
    border-color: #d2d6de !important;
}
html[data-pc-theme="light"] .form-check-label {
    color: #333333 !important;
}
html[data-pc-theme="light"] .input-group-text {
    background-color: #f4f4f4 !important;
    border-color: #d2d6de !important;
    color: #444444 !important;
    border-radius: 0 !important;
}

/* --- Button CSS variable reset (kills template dark-mode overrides) --- */
html[data-pc-theme="light"] body,
html[data-pc-theme="light"] {
    --bs-btn-bg: transparent;
    --bs-btn-color: #333333;
    --bs-btn-border-color: #d2d6de;
    --bs-btn-hover-bg: #e1e3e9;
    --bs-btn-hover-color: #333333;
    --bs-btn-hover-border-color: #adadad;
    --bs-btn-active-bg: #d4d4d4;
    --bs-btn-active-color: #333333;
    --bs-secondary-bg: #f4f4f4;
    --bs-secondary-rgb: 244, 244, 244;
    --bs-secondary: #f4f4f4;
}

/* --- Buttons (all variants, high-specificity) --- */
html[data-pc-theme="light"] .btn-outline-secondary {
    background-color: transparent !important;
    background-image: none !important;
    color: #444444 !important;
    border: 1px solid #d2d6de !important;
}
html[data-pc-theme="light"] .btn-outline-secondary:hover {
    background-color: #e1e3e9 !important;
    color: #333333 !important;
    border-color: #adadad !important;
}
html[data-pc-theme="light"] .btn-outline-secondary:focus,
html[data-pc-theme="light"] .btn-outline-secondary:active,
html[data-pc-theme="light"] .btn-outline-secondary.active {
    background-color: #d4d4d4 !important;
    color: #333333 !important;
    border-color: #8c8c8c !important;
    box-shadow: none !important;
}

/* DataTables export buttons */
html[data-pc-theme="light"] .dt-buttons .btn,
html[data-pc-theme="light"] .dt-buttons .dt-button,
html[data-pc-theme="light"] div.dt-buttons > .dt-button,
html[data-pc-theme="light"] .dataTables_wrapper .dt-buttons .btn {
    background-color: #ffffff !important;
    background-image: none !important;
    color: #444444 !important;
    border: 1px solid #d2d6de !important;
    border-radius: 3px !important;
    font-size: 0.8125rem !important;
    padding: 5px 12px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}
html[data-pc-theme="light"] .dt-buttons .btn:hover,
html[data-pc-theme="light"] .dt-buttons .dt-button:hover,
html[data-pc-theme="light"] div.dt-buttons > .dt-button:hover,
html[data-pc-theme="light"] .dataTables_wrapper .dt-buttons .btn:hover {
    background-color: #e1e3e9 !important;
    color: #333333 !important;
    border-color: #adadad !important;
}
html[data-pc-theme="light"] .dt-buttons .btn:focus,
html[data-pc-theme="light"] .dt-buttons .dt-button:focus {
    box-shadow: none !important;
}

/* Outline variants */
html[data-pc-theme="light"] .btn-outline-primary {
    background-color: transparent !important;
    background-image: none !important;
    color: #3c8dbc !important;
    border: 1px solid #3c8dbc !important;
}
html[data-pc-theme="light"] .btn-outline-primary:hover {
    background-color: #3c8dbc !important;
    color: #ffffff !important;
}

/* Filled button variants (WHMCS colors) */
html[data-pc-theme="light"] .btn {
    border-radius: 3px !important;
    box-shadow: none !important;
    font-weight: 500 !important;
}
html[data-pc-theme="light"] .btn-primary {
    background-color: #3c8dbc !important;
    border-color: #367fa9 !important;
    color: #ffffff !important;
}
html[data-pc-theme="light"] .btn-primary:hover {
    background-color: #367fa9 !important;
    border-color: #204d74 !important;
}
html[data-pc-theme="light"] .btn-secondary {
    background-color: #f4f4f4 !important;
    border-color: #ddd !important;
    color: #444 !important;
}
html[data-pc-theme="light"] .btn-secondary:hover {
    background-color: #e5e5e5 !important;
    border-color: #ddd !important;
}
html[data-pc-theme="light"] .btn-success {
    background-color: #00a65a !important;
    border-color: #008d4c !important;
    color: #ffffff !important;
}
html[data-pc-theme="light"] .btn-success:hover {
    background-color: #008d4c !important;
    border-color: #005931 !important;
}
html[data-pc-theme="light"] .btn-danger {
    background-color: #dd4b39 !important;
    border-color: #d73925 !important;
    color: #ffffff !important;
}
html[data-pc-theme="light"] .btn-danger:hover {
    background-color: #d73925 !important;
    border-color: #ac2925 !important;
}
html[data-pc-theme="light"] .btn-warning {
    background-color: #f39c12 !important;
    border-color: #e08e0b !important;
    color: #ffffff !important;
}
html[data-pc-theme="light"] .btn-warning:hover {
    background-color: #e08e0b !important;
    border-color: #c87f0a !important;
}
html[data-pc-theme="light"] .btn-info {
    background-color: #00c0ef !important;
    border-color: #00acd6 !important;
    color: #ffffff !important;
}
html[data-pc-theme="light"] .btn-info:hover {
    background-color: #00acd6 !important;
    border-color: #269abc !important;
}
html[data-pc-theme="light"] .btn-dark {
    background-color: #222d32 !important;
    border-color: #1e282c !important;
    color: #ffffff !important;
}
html[data-pc-theme="light"] .btn-light {
    background-color: #e8ecf4 !important;
    border-color: #d5dbe3 !important;
    color: #334155 !important;
}
html[data-pc-theme="light"] .btn-light:hover {
    background-color: #d5dbe3 !important;
    border-color: #c1c9d4 !important;
    color: #1e293b !important;
}

/* Link button */
html[data-pc-theme="light"] .btn-link {
    color: #0d6efd !important;
    background: transparent !important;
}
html[data-pc-theme="light"] .btn-link:hover {
    color: #0b5ed7 !important;
}

/* Close / dismiss buttons */
html[data-pc-theme="light"] .btn-close {
    filter: none !important;
    opacity: 0.6;
}
html[data-pc-theme="light"] .btn-close:hover {
    opacity: 1;
}

/* --- Breadcrumb / page header --- */
html[data-pc-theme="light"] .page-header {
    color: #1e293b !important;
}
html[data-pc-theme="light"] .page-header .page-block {
    background-color: transparent !important;
}
html[data-pc-theme="light"] .breadcrumb-item,
html[data-pc-theme="light"] .breadcrumb-item a {
    color: #64748b !important;
}
html[data-pc-theme="light"] .breadcrumb-item.active {
    color: #1e293b !important;
}

/* --- Badges --- */
html[data-pc-theme="light"] .badge.bg-light {
    background-color: #e8ecf4 !important;
    color: #1e293b !important;
    border: 1px solid #d5dbe3 !important;
}
html[data-pc-theme="light"] .badge.bg-dark {
    background-color: #334155 !important;
}

/* --- Text --- */
html[data-pc-theme="light"] .text-muted {
    color: #64748b !important;
}
html[data-pc-theme="light"] a {
    color: #0d6efd;
}
html[data-pc-theme="light"] a:hover {
    color: #0b5ed7;
}

/* --- Borders --- */
html[data-pc-theme="light"] .border {
    border-color: #d5dbe3 !important;
}
html[data-pc-theme="light"] .border-bottom {
    border-color: #d5dbe3 !important;
}
html[data-pc-theme="light"] .border-top {
    border-color: #d5dbe3 !important;
}

/* --- Tabs --- */
html[data-pc-theme="light"] .nav-tabs {
    border-color: #d5dbe3 !important;
}
html[data-pc-theme="light"] .nav-tabs .nav-link {
    color: #64748b !important;
}
html[data-pc-theme="light"] .nav-tabs .nav-link:hover {
    color: #0d6efd !important;
    border-color: transparent !important;
}
html[data-pc-theme="light"] .nav-tabs .nav-link.active {
    color: #0d6efd !important;
    background-color: #f8f9fc !important;
    border-color: #d5dbe3 #d5dbe3 #f8f9fc !important;
    font-weight: 600;
}
html[data-pc-theme="light"] .tab-content {
    color: #2d3748 !important;
}

/* --- Nav pills --- */
html[data-pc-theme="light"] .nav-pills .nav-link {
    color: #334155 !important;
    background-color: #f1f3f8 !important;
    border: 1px solid #d5dbe3 !important;
    border-radius: 4px !important;
    font-size: 0.85rem !important;
    padding: 0.4rem 0.85rem !important;
    margin-right: 0.25rem !important;
}
html[data-pc-theme="light"] .nav-pills .nav-link:hover {
    background-color: #e8ecf4 !important;
    color: #1e293b !important;
    border-color: #c1cad4 !important;
}
html[data-pc-theme="light"] .nav-pills .nav-link.active,
html[data-pc-theme="light"] .nav-pills .show > .nav-link {
    background-color: #367fa9 !important;  /* WHMCS blue – readable white text (5.1:1) */
    border-color: #2d6d93 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}
html[data-pc-theme="light"] .nav-pills .nav-link.active .badge.bg-secondary {
    background-color: rgba(255,255,255,0.3) !important;
    color: #ffffff !important;
}

/* --- Alerts --- */
html[data-pc-theme="light"] .alert-info {
    background-color: #dbeafe !important;
    border-color: #93c5fd !important;
    color: #1e40af !important;
}
html[data-pc-theme="light"] .alert-warning {
    background-color: #fef3c7 !important;
    border-color: #fcd34d !important;
    color: #92400e !important;
}
html[data-pc-theme="light"] .alert-danger {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b !important;
}
html[data-pc-theme="light"] .alert-success {
    background-color: #dcfce7 !important;
    border-color: #86efac !important;
    color: #166534 !important;
}

/* --- List groups --- */
html[data-pc-theme="light"] .list-group-item {
    background-color: #f8f9fc !important;
    border-color: #d5dbe3 !important;
    color: #2d3748 !important;
}
html[data-pc-theme="light"] .list-group-item:hover {
    background-color: #e8ecf4 !important;
}

/* --- DataTables – full coverage (high-specificity) --- */
html[data-pc-theme="light"] .dataTables_wrapper {
    color: #333333 !important;
}
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_length label,
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_filter label {
    color: #333333 !important;
}
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_length select,
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_filter input {
    background-color: #ffffff !important;
    border: 1px solid #d2d6de !important;
    color: #333333 !important;
    border-radius: 3px !important;
    padding: 4px 10px !important;
}
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_filter input:focus {
    border-color: #3c8dbc !important;
    box-shadow: none !important;
    outline: none;
}
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_info {
    color: #666666 !important;
}
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_paginate {
    color: #333333 !important;
}
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #333333 !important;
    background: #fafafa !important;
    border: 1px solid #d2d6de !important;
    border-radius: 3px !important;
    margin: 0 2px !important;
}
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e1e3e9 !important;
    color: #333333 !important;
    border-color: #adadad !important;
}
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #3c8dbc !important;
    color: #ffffff !important;
    border-color: #367fa9 !important;
    font-weight: bold;
}
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html[data-pc-theme="light"] .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    color: #999999 !important;
    background: #f4f4f4 !important;
    border-color: #d2d6de !important;
    cursor: default !important;
}
html[data-pc-theme="light"] table.dataTable thead .sorting:after,
html[data-pc-theme="light"] table.dataTable thead .sorting_asc:after,
html[data-pc-theme="light"] table.dataTable thead .sorting_desc:after {
    opacity: 0.6;
}
html[data-pc-theme="light"] .dataTables_empty {
    color: #666666 !important;
}

/* --- Pagination (non-DataTables) --- */
html[data-pc-theme="light"] .pagination .page-link {
    background-color: #fafafa !important;
    border-color: #d2d6de !important;
    color: #333333 !important;
}
html[data-pc-theme="light"] .pagination .page-item.active .page-link {
    background-color: #3c8dbc !important;
    border-color: #367fa9 !important;
    color: #ffffff !important;
}
html[data-pc-theme="light"] .pagination .page-link:hover {
    background-color: #e1e3e9 !important;
    color: #333333 !important;
}

/* --- Tooltip / Popover --- */
html[data-pc-theme="light"] .tooltip-inner {
    background-color: #333333 !important;
    color: #ffffff !important;
}
html[data-pc-theme="light"] .popover {
    background-color: #ffffff !important;
    border-color: #d2d6de !important;
}

/* --- Accordion --- */
html[data-pc-theme="light"] .accordion-item {
    background-color: #ffffff !important;
    border-color: #d2d6de !important;
}
html[data-pc-theme="light"] .accordion-button {
    background-color: #f4f4f4 !important;
    color: #444444 !important;
}
html[data-pc-theme="light"] .accordion-button:not(.collapsed) {
    background-color: #e1e3e9 !important;
    color: #333333 !important;
}

/* --- Progress bars --- */
html[data-pc-theme="light"] .progress {
    background-color: #f4f4f4 !important;
    border-radius: 3px !important;
}

/* --- SweetAlert2 --- */
html[data-pc-theme="light"] .swal2-popup {
    background-color: #ffffff !important;
    color: #333333 !important;
    border-radius: 3px !important;
}
html[data-pc-theme="light"] .swal2-title {
    color: #444444 !important;
}
html[data-pc-theme="light"] .swal2-html-container {
    color: #666666 !important;
}

/* --- Notifier toasts --- */
html[data-pc-theme="light"] .notifier {
    color: #333333 !important;
}

/* --- Footer --- */
html[data-pc-theme="light"] .footer-wrapper {
    background-color: #ffffff !important;
    border-top: 1px solid #d2d6de !important;
    color: #444444 !important;
    padding: 15px !important;
}

/* --- Inline code & pre blocks (light mode) --- */
html[data-pc-theme="light"] code {
    color: #0f5c8a !important;          /* dark blue — 5.5:1 on white bg */
    background-color: #e8f0f7 !important;
    border-radius: 3px !important;
    padding: 0.1em 0.35em !important;
    font-size: 0.85em !important;
}
html[data-pc-theme="light"] pre {
    background-color: #f4f7fb !important;
    color: #1e293b !important;
    border: 1px solid #d5dbe3 !important;
    border-radius: 4px !important;
}
html[data-pc-theme="light"] pre code {
    background-color: transparent !important;
    padding: 0 !important;
    color: inherit !important;
}

/* --- Loader --- */
html[data-pc-theme="light"] .loader-bg {
    background: #ecf0f5;
}

/* --- Scrollbar --- */
html[data-pc-theme="light"] ::-webkit-scrollbar-track {
    background: #ecf0f5;
}
html[data-pc-theme="light"] ::-webkit-scrollbar-thumb {
    background: #d2d6de;
    border-radius: 0px;
}
html[data-pc-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #b8c7ce;
}

/* --- ApexCharts --- */
html[data-pc-theme="light"] .apexcharts-tooltip {
    background: #f8f9fc !important;
    border-color: #d5dbe3 !important;
    color: #2d3748 !important;
}
html[data-pc-theme="light"] .apexcharts-xaxis-label,
html[data-pc-theme="light"] .apexcharts-yaxis-label {
    fill: #64748b !important;
}

/* --- Choices.js --- */
html[data-pc-theme="light"] .choices__inner {
    background-color: #ffffff !important;
    border-color: #c1c9d4 !important;
}
html[data-pc-theme="light"] .choices__list--dropdown {
    background-color: #f8f9fc !important;
    border-color: #d5dbe3 !important;
}

/* --- CKEditor --- */
html[data-pc-theme="light"] .ck.ck-editor__main > .ck-editor__editable {
    background-color: #ffffff !important;
    color: #2d3748 !important;
}
html[data-pc-theme="light"] .ck.ck-toolbar {
    background-color: #f1f3f8 !important;
    border-color: #d5dbe3 !important;
}

/* --- Misc bg utilities --- */
html[data-pc-theme="light"] .bg-body {
    background-color: #eef1f6 !important;
}
html[data-pc-theme="light"] .bg-light {
    background-color: #e8ecf4 !important;
}
html[data-pc-theme="light"] .text-dark {
    color: #1e293b !important;
}

/* --- Stats cards on dashboard (bg-opacity) --- */
html[data-pc-theme="light"] .bg-primary.bg-opacity-10 { background-color: rgba(13,110,253,0.1) !important; }
html[data-pc-theme="light"] .bg-success.bg-opacity-10 { background-color: rgba(25,135,84,0.1) !important; }
html[data-pc-theme="light"] .bg-warning.bg-opacity-10 { background-color: rgba(255,193,7,0.1) !important; }
html[data-pc-theme="light"] .bg-danger.bg-opacity-10  { background-color: rgba(220,53,69,0.1) !important; }
html[data-pc-theme="light"] .bg-info.bg-opacity-10    { background-color: rgba(13,202,240,0.1) !important; }

/* --- Custom Widget Headers (WHMCS Style) --- */
html[data-pc-theme="light"] .card-header.whmcs-primary { border-top: 3px solid #3c8dbc !important; }
html[data-pc-theme="light"] .card-header.whmcs-success { border-top: 3px solid #00a65a !important; }
html[data-pc-theme="light"] .card-header.whmcs-warning { border-top: 3px solid #f39c12 !important; }
html[data-pc-theme="light"] .card-header.whmcs-danger { border-top: 3px solid #dd4b39 !important; }
html[data-pc-theme="light"] .card-header.whmcs-info { border-top: 3px solid #00c0ef !important; }

/* ========== End Light Theme ========== */

/* Loader */
[data-pc-theme="dark"] .loader-bg {
    background: #000000;
}

/* Scrollbar */
[data-pc-theme="dark"] ::-webkit-scrollbar-track {
    background: #141414;
}
[data-pc-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 3px;
}
[data-pc-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #444444;
}

/* Logo swap: show/hide based on theme */
[data-pc-theme="dark"] .logo-light {
    display: none !important;
}
[data-pc-theme="dark"] .logo-dark-theme {
    display: inline-block !important;
}
/* Light mode: show light logo in header/content areas, but keep white logo in sidebar (dark navy bg) */
html[data-pc-theme="light"] .logo-dark-theme {
    display: none !important;
}
html[data-pc-theme="light"] .logo-light {
    display: inline-block !important;
}
html[data-pc-theme="light"] .pc-sidebar .logo-light {
    display: none !important;
}
html[data-pc-theme="light"] .pc-sidebar .logo-dark-theme {
    display: inline-block !important;
}

/* ─── Mobile Breakpoints ───────────────────────────────── */
@media (max-width: 991.98px) {
    [data-pc-theme="dark"] .pc-container {
        margin-left: 0;
    }
    html[data-pc-theme="light"] .pc-container {
        margin-left: 0;
    }
}
