/* =====================================================================
   CHAX theme for the stock admin layout (layouts/admin.blade.php).
   Brings every admin page onto the Conversations design tokens: navy
   sidebar, action blue, light app background, Inter, 12-16px cards.
   Rules are prefixed with `html body.chax-theme` so they win over the
   built-in colour presets (body.theme-1 ... body.theme-10, custom-color).
   Remove the link in layouts/admin.blade.php to switch it off.
   ===================================================================== */

:root {
    --hd-navy: #082654;
    --hd-nav-from: #0B2E5E;
    --hd-nav-to: #164B89;
    --hd-blue: #0866FF;
    --hd-blue-hover: #0054D6;
    --hd-blue-soft: #E8F1FF;
    --hd-blue-line: #CFE0FF;
    --hd-bg: #F4F7FC;
    --hd-card: #FFFFFF;
    --hd-border: #E2E8F0;
    --hd-text: #101828;
    --hd-text-2: #475467;
    --hd-text-3: #667085;
    --hd-success: #16A34A;
    --hd-warning: #F59E0B;
    --hd-error: #DC2626;
    --hd-font: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --hd-focus: 0 0 0 3px rgba(8, 102, 255, .22);
    --hd-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    /* stock theme variable used by custom-color.css and a few widgets */
    --color-customColor: #0866FF;
}

/* ---------- Base ---------- */
html body.chax-theme {
    --theme-color: var(--hd-blue) !important; /* custom.css presets use this everywhere */
    background: var(--hd-bg);
    color: var(--hd-text);
    font-family: var(--hd-font);
}
html body.chax-theme h1, html body.chax-theme h2, html body.chax-theme h3,
html body.chax-theme h4, html body.chax-theme h5, html body.chax-theme h6,
html body.chax-theme .h1, html body.chax-theme .h2, html body.chax-theme .h3,
html body.chax-theme .h4, html body.chax-theme .h5, html body.chax-theme .h6,
html body.chax-theme .btn, html body.chax-theme .form-control, html body.chax-theme .form-select,
html body.chax-theme .table, html body.chax-theme .dropdown-menu, html body.chax-theme .modal {
    font-family: var(--hd-font);
}
html body.chax-theme a { color: var(--hd-blue-text); }
html body.chax-theme a:hover { color: var(--hd-blue-hover); }
html body.chax-theme .text-primary { color: var(--hd-blue-text) !important; }
html body.chax-theme .bg-primary { background: var(--hd-blue) !important; }
html body.chax-theme .text-muted { color: var(--hd-text-3) !important; }

/* ---------- Sidebar ---------- */
html body.chax-theme .dash-sidebar,
html body.chax-theme .dash-sidebar.light-sidebar,
html body.chax-theme .dash-sidebar.transprent-bg {
    background: linear-gradient(180deg, var(--hd-nav-from) 0%, var(--hd-nav-to) 100%) !important;
    border-right: 0;
    box-shadow: none;
}
html body.chax-theme .dash-sidebar .navbar-wrapper { background: transparent; }
html body.chax-theme .dash-sidebar .m-header { background: transparent; border-bottom: 0; }
html body.chax-theme .dash-sidebar .m-header .b-brand img { filter: brightness(0) invert(1); }
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item > .dash-link,
html body.chax-theme .dash-sidebar.light-sidebar .dash-navbar > .dash-item > .dash-link {
    color: #E4ECF8;
    border-radius: 10px;
    font-weight: 500;
    background: transparent;
    box-shadow: none;
}
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item > .dash-link .dash-micon,
html body.chax-theme .dash-sidebar.light-sidebar .dash-navbar > .dash-item > .dash-link .dash-micon {
    background: transparent;
    box-shadow: none;
    color: #E4ECF8;
}
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item > .dash-link i,
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item > .dash-link svg,
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item > .dash-link .dash-arrow {
    color: #E4ECF8;
    stroke: currentColor;
}
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item:hover > .dash-link,
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item:focus > .dash-link,
html body.chax-theme .dash-sidebar.light-sidebar .dash-navbar > .dash-item:hover > .dash-link,
html body.chax-theme .dash-sidebar.light-sidebar .dash-navbar > .dash-item:focus > .dash-link {
    background: rgba(255, 255, 255, .08) !important;
    color: #fff;
    box-shadow: none !important;
}
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item.active > .dash-link,
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item:active > .dash-link,
html body.chax-theme .dash-sidebar.light-sidebar .dash-navbar > .dash-item.active > .dash-link,
html body.chax-theme .dash-sidebar.light-sidebar .dash-navbar > .dash-item:active > .dash-link {
    background: var(--hd-blue) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(8, 102, 255, .35) !important;
}
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item.active > .dash-link i,
html body.chax-theme .dash-sidebar .dash-navbar > .dash-item.active > .dash-link .dash-micon,
html body.chax-theme .dash-sidebar.light-sidebar .dash-navbar > .dash-item.active > .dash-link i,
html body.chax-theme .dash-sidebar.light-sidebar .dash-navbar > .dash-item.active > .dash-link .dash-micon {
    color: #fff !important;
    background: transparent !important;
}
/* Submenus */
html body.chax-theme .dash-sidebar .dash-item .dash-submenu,
html body.chax-theme .dash-sidebar.light-sidebar .dash-item .dash-submenu { background: transparent; }
html body.chax-theme .dash-sidebar .dash-item .dash-submenu .dash-item > .dash-link,
html body.chax-theme .dash-sidebar.light-sidebar .dash-item .dash-submenu .dash-item > .dash-link {
    color: #C9D6EA;
}
html body.chax-theme .dash-sidebar .dash-item .dash-submenu .dash-item > .dash-link:hover,
html body.chax-theme .dash-sidebar .dash-item .dash-submenu .dash-item.active > .dash-link,
html body.chax-theme .dash-sidebar.light-sidebar .dash-item .dash-submenu .dash-item > .dash-link:hover,
html body.chax-theme .dash-sidebar.light-sidebar .dash-item .dash-submenu .dash-item.active > .dash-link {
    color: #fff !important;
    font-weight: 600;
}
html body.chax-theme .dash-sidebar .dash-item .dash-submenu .dash-item > .dash-link::before,
html body.chax-theme .dash-sidebar.light-sidebar .dash-item .dash-submenu .dash-item > .dash-link::before {
    background: #C9D6EA;
}
html body.chax-theme .dash-sidebar .dash-item .dash-submenu .dash-item.active > .dash-link::before { background: var(--hd-card); }
html body.chax-theme .dash-sidebar .animate-charcter { color: #fff; background: #5B4BDB; -webkit-text-fill-color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; }

/* ---------- Header ---------- */
html body.chax-theme .dash-header,
html body.chax-theme .dash-header.transprent-bg { background: transparent; box-shadow: none; }
html body.chax-theme .dash-header .dash-head-link {
    background: var(--hd-card);
    border: 1px solid var(--hd-border);
    border-radius: 10px;
    color: var(--hd-text) !important;
    box-shadow: var(--hd-shadow-sm);
}
html body.chax-theme .dash-header .dash-head-link > i:not(.nocolor),
html body.chax-theme .dash-header .drp-language .drp-text { color: var(--hd-text-2) !important; }
html body.chax-theme .dash-header .drp-company .theme-avtar { background: var(--hd-blue-soft); color: var(--hd-blue-text); }

/* Page header */
html body.chax-theme .page-header .page-header-title h4,
html body.chax-theme .page-header .page-header-title .h4 {
    color: var(--hd-navy);
    font-size: 26px;
    font-weight: 700 !important;
    letter-spacing: -.01em;
}
html body.chax-theme .page-header .breadcrumb .breadcrumb-item,
html body.chax-theme .page-header .breadcrumb .breadcrumb-item a { color: var(--hd-text-3); font-size: 13px; }

/* ---------- Cards, tables ---------- */
html body.chax-theme .card {
    background: var(--hd-card);
    border: 1px solid var(--hd-border);
    border-radius: 14px;
    box-shadow: var(--hd-shadow-sm);
}
html body.chax-theme .card .card-header { background: transparent; border-bottom: 1px solid var(--hd-border); }
html body.chax-theme .card .card-header h5,
html body.chax-theme .card .card-header .h5 { color: var(--hd-text); font-weight: 600; }
html body.chax-theme .card .card-header h5::after,
html body.chax-theme .card .card-header .h5::after { background: var(--hd-blue); }
html body.chax-theme .table thead th,
html body.chax-theme .dataTable-table thead th {
    background: var(--hd-surface-2);
    color: var(--hd-text-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    border-bottom: 1px solid var(--hd-border);
}
html body.chax-theme .table td { color: var(--hd-text); border-color: var(--hd-line-soft); }
html body.chax-theme .table tbody tr:hover td { background: var(--hd-hover); }

/* ---------- Buttons & badges ---------- */
html body.chax-theme .btn { border-radius: 8px; }
html body.chax-theme .btn-primary,
html body.chax-theme .btn-check:checked + .btn-primary,
html body.chax-theme .btn-check:active + .btn-primary {
    background: var(--hd-blue) !important;
    border-color: var(--hd-blue-text) !important;
    color: #fff !important;
}
html body.chax-theme .btn-primary:hover,
html body.chax-theme .btn-primary:focus,
html body.chax-theme .btn-primary:active {
    background: var(--hd-blue-hover) !important;
    border-color: var(--hd-blue-hover) !important;
    box-shadow: var(--hd-focus);
}
html body.chax-theme .btn-outline-primary { color: var(--hd-blue-text) !important; border-color: var(--hd-blue-text) !important; background: transparent; }
html body.chax-theme .btn-outline-primary:hover { background: var(--hd-blue) !important; color: #fff !important; }
html body.chax-theme .btn-light-primary,
html body.chax-theme .badge.bg-light-primary,
html body.chax-theme .bg-light-primary {
    background: var(--hd-blue-soft) !important;
    color: var(--hd-blue-text) !important;
    border-color: var(--hd-blue-soft) !important;
}
html body.chax-theme .btn-light-primary:hover { background: var(--hd-blue) !important; color: #fff !important; }
html body.chax-theme .badge { border-radius: 6px; font-weight: 600; }
html body.chax-theme .badge.bg-primary { background: var(--hd-blue) !important; color: #fff; }
html body.chax-theme .bg-success, html body.chax-theme .badge.bg-success { background-color: var(--hd-success) !important; }
html body.chax-theme .bg-warning, html body.chax-theme .badge.bg-warning { background-color: var(--hd-warning) !important; }
html body.chax-theme .bg-danger, html body.chax-theme .badge.bg-danger { background-color: var(--hd-error) !important; }

/* ---------- Forms ---------- */
html body.chax-theme .form-control,
html body.chax-theme .form-select,
html body.chax-theme .custom-select,
html body.chax-theme .dataTable-input,
html body.chax-theme .dataTable-selector {
    border: 1px solid var(--hd-border);
    border-radius: 9px;
    color: var(--hd-text);
}
html body.chax-theme .form-control:focus,
html body.chax-theme .form-select:focus,
html body.chax-theme .custom-select:focus,
html body.chax-theme .dataTable-input:focus,
html body.chax-theme .dataTable-selector:focus {
    border-color: var(--hd-blue-text) !important;
    box-shadow: var(--hd-focus) !important;
}
html body.chax-theme .form-check-input:checked,
html body.chax-theme .form-check .form-check-input.input-primary:checked {
    background-color: var(--hd-blue-text) !important;
    border-color: var(--hd-blue-text) !important;
}
html body.chax-theme .form-check-input:focus { border-color: var(--hd-blue-text); box-shadow: var(--hd-focus); }
html body.chax-theme .form-range::-webkit-slider-thumb { background: var(--hd-blue); }
html body.chax-theme .form-label { color: var(--hd-text-2); font-weight: 500; }

/* ---------- Navigation widgets ---------- */
html body.chax-theme .nav-pills .nav-link.active,
html body.chax-theme .nav-pills .show > .nav-link { background: var(--hd-blue) !important; color: #fff !important; }
html body.chax-theme .nav-pills .nav-link { color: var(--hd-text-2); }
html body.chax-theme .nav-tabs .nav-link.active { color: var(--hd-blue-text) !important; border-bottom-color: var(--hd-blue-text) !important; }
html body.chax-theme .list-group-item.active {
    background: var(--hd-blue-soft) !important;
    color: var(--hd-blue-text) !important;
    border-color: var(--hd-blue-soft) !important;
}
html body.chax-theme .list-group-item-action:hover { background: var(--hd-hover); }
html body.chax-theme .page-item.active .page-link,
html body.chax-theme .dataTable-pagination .active a {
    background: var(--hd-blue) !important;
    border-color: var(--hd-blue-text) !important;
    color: #fff !important;
}
html body.chax-theme .progress-bar { background-color: var(--hd-blue-text) !important; }
html body.chax-theme .alert-primary { background: var(--hd-blue-soft); border-color: var(--hd-blue-line); color: var(--hd-navy); }
html body.chax-theme .alert-primary .alert-link { color: var(--hd-blue-text); }
html body.chax-theme .dropdown-menu { border: 1px solid var(--hd-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .14); }
html body.chax-theme .dropdown-item:active, html body.chax-theme .dropdown-item.active { background: var(--hd-blue-soft); color: var(--hd-blue-text); }

/* ---------- Modals ---------- */
html body.chax-theme .modal-content { border: 0; border-radius: 14px; box-shadow: 0 12px 32px rgba(16, 24, 40, .14); }
html body.chax-theme .modal-title { font-weight: 600; color: var(--hd-text); }

/* ---------- Footer ---------- */
html body.chax-theme .dash-footer { background: transparent; color: var(--hd-text-3); }

/* ---------- Leftovers from custom.css / stock widgets ---------- */
html body.chax-theme .table thead th a,
html body.chax-theme .dataTable-table thead th a,
html body.chax-theme .dataTable-sorter { color: var(--hd-text-2) !important; }
html body.chax-theme .swal-button--danger,
html body.chax-theme .btn-primary-subtle { background-color: var(--hd-blue-text) !important; border-color: var(--hd-blue-text) !important; }
html body.chax-theme .enable_module { border-color: var(--hd-blue-text) !important; }
html body.chax-theme .border-primary { border-color: var(--hd-blue-text) !important; }
html body.chax-theme .dash-sidebar .animate-charcter {
    display: inline-block !important; width: auto; margin-top: 4px;
    background: #5B4BDB !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
    animation: none !important; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600;
}

/* Plain links: the presets use `body.theme-N a:not([class])` (more specific). */
html body.chax-theme a:not([class]) { color: var(--hd-blue-text); }
html body.chax-theme a:not([class]):hover { color: var(--hd-blue-hover); }
/* Checked outline toggles (e.g. Settings > storage type). */
html body.chax-theme .btn-check:checked + .btn-outline-primary,
html body.chax-theme .btn-check:active + .btn-outline-primary,
html body.chax-theme .btn-outline-primary.active {
    background: var(--hd-blue) !important; border-color: var(--hd-blue-text) !important; color: #fff !important;
}
/* Customer pages: active item in the top navigation. */
html body.chax-front .custom-header .nav-item.active > .nav-link,
html body.chax-front .custom-header .nav-link:hover { color: var(--hd-blue-text) !important; }

/* ---------- Shared navigation on stock admin pages ----------
   layouts/admin renders layouts/partials/hd-sidebar (styled by
   chax-helpdesk.css); place it where the stock 255px sidebar was. */
html body.chax-theme { --hd-nav-current: var(--hd-nav-w); }
html body.chax-theme.hd-nav-collapsed { --hd-nav-current: var(--hd-nav-w-collapsed); }
html body.chax-theme .hd-nav {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1030;
    width: var(--hd-nav-current);
    transition: width var(--hd-ease);
}
html body.chax-theme .dash-header { left: var(--hd-nav-current) !important; width: auto !important; right: 0; transition: left var(--hd-ease); }
html body.chax-theme .dash-container,
html body.chax-theme .dash-footer { margin-left: var(--hd-nav-current) !important; transition: margin-left var(--hd-ease); }
html body.chax-theme .hd-nav-text, html body.chax-theme .hd-nav-group-label { font-family: var(--hd-font); }
html body.chax-theme .hd-nav-link:hover { text-decoration: none; }
@media (max-width: 1023.98px) {
    html body.chax-theme .hd-nav { width: 250px; }
    html body.chax-theme .dash-header { left: 0 !important; }
    html body.chax-theme .dash-container,
    html body.chax-theme .dash-footer { margin-left: 0 !important; }
}

/* =====================================================================
   Dashboard (admin/dashboard/index.blade.php) — CHAX UI 2026-11-28
   ===================================================================== */
html body.chax-theme .chax-page-subtitle { margin: 4px 0 0; font-size: 14px; color: var(--hd-text-2); }
html body.chax-theme .page-header .breadcrumb:empty { display: none; }
.chax-dash-range {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 12px;
    background: var(--hd-card); border: 1px solid var(--hd-border); border-radius: 10px; box-shadow: var(--hd-shadow-sm);
}
.chax-dash-range .ti { font-size: 18px; color: var(--hd-text-2); }
.chax-dash-range select {
    border: 0; background: transparent; font: 600 14px var(--hd-font); color: var(--hd-text); padding-right: 4px; cursor: pointer;
}
.chax-dash-range select:focus { outline: none; }
.chax-dash-range:focus-within { border-color: var(--hd-blue-text); box-shadow: var(--hd-focus); }

.chax-dash { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; padding-bottom: 12px; font-family: var(--hd-font); color: var(--hd-text); }
.chax-dash-row { display: grid; gap: 18px; }
.chax-dash-top { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.45fr); }
.chax-dash-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.chax-dash-3 { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.chax-dash-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chax-dash-period { margin: -8px 0 0; font-size: 12.5px; color: var(--hd-text-3); }

/* Quick actions */
.chax-quick {
    position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    min-height: 170px; padding: 26px 26px; border-radius: 18px; color: #fff;
    background:
        radial-gradient(circle at 85% 110%, rgba(64, 140, 255, .55) 0, rgba(64, 140, 255, 0) 55%),
        radial-gradient(circle at 60% -20%, rgba(80, 120, 255, .35) 0, rgba(80, 120, 255, 0) 50%),
        linear-gradient(135deg, #0B2E5E 0%, #123E7A 55%, #164B89 100%);
    box-shadow: 0 10px 28px rgba(8, 38, 84, .25);
}
.chax-quick h2 { margin: 0 0 8px; font-size: 24px; font-weight: 700; color: #fff; letter-spacing: -.01em; }
.chax-quick p { margin: 0 0 18px; max-width: 360px; font-size: 14px; line-height: 1.5; color: rgba(255, 255, 255, .82); }
.chax-quick-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.chax-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 10px;
    font: 600 14px var(--hd-font); text-decoration: none !important; transition: background var(--hd-ease, .17s), border-color .17s;
}
.chax-btn .ti { font-size: 18px; }
.chax-btn-primary { background: var(--hd-blue); color: #fff !important; box-shadow: 0 6px 16px rgba(8, 102, 255, .4); }
.chax-btn-primary:hover { background: var(--hd-blue-hover); }
.chax-btn-ghost { border: 1px solid rgba(255, 255, 255, .35); color: #fff !important; background: rgba(255, 255, 255, .06); }
.chax-btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.chax-quick-art { position: relative; width: 130px; height: 110px; flex-shrink: 0; }
.chax-quick-tile {
    position: absolute; right: 6px; top: 18px; display: inline-flex; align-items: center; justify-content: center;
    width: 96px; height: 72px; border-radius: 16px; transform: rotate(-12deg);
    background: linear-gradient(135deg, #6FA8FF, #3B6BFF); box-shadow: 0 12px 24px rgba(0, 20, 80, .35), inset 0 1px 0 rgba(255,255,255,.4);
    color: #fff; font-size: 38px;
}
.chax-quick-tile-back { right: 30px; top: 4px; opacity: .55; transform: rotate(-22deg); background: linear-gradient(135deg, #8DB9FF, #4F7BFF); font-size: 30px; }

/* KPI cards */
.chax-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.chax-kpi {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 18px 18px 16px; background: var(--hd-card); border: 1px solid var(--hd-border); border-radius: 16px;
    box-shadow: var(--hd-shadow-sm); color: var(--hd-text) !important; text-decoration: none !important;
    transition: box-shadow .17s, border-color .17s;
}
.chax-kpi-link:hover { border-color: var(--hd-blue-line); box-shadow: 0 6px 18px rgba(16, 24, 40, .08); }
.chax-kpi-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 12px;
    border-radius: 12px; font-size: 21px;
}
.tone-blue { background: var(--hd-blue-soft); color: var(--hd-blue-text); }
.tone-green { background: var(--hd-success-soft); color: #16A34A; }
.tone-teal { background: var(--hd-success-soft); color: #0E9F6E; }
.tone-purple { background: var(--hd-purple-soft); color: #7C3AED; }
.chax-kpi-value { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; }
.chax-kpi-label { font-size: 14px; font-weight: 500; color: var(--hd-text-2); }
.chax-kpi-note { margin-top: 6px; font-size: 12px; color: var(--hd-text-3); }
.chax-delta {
    display: inline-flex; align-items: center; gap: 3px; margin-top: 8px; padding: 2px 8px; border-radius: 999px;
    font-size: 12px; font-weight: 700;
}
.chax-delta .ti { font-size: 13px; }
.chax-delta.is-good { background: var(--hd-success-soft); color: var(--hd-success-text); }
.chax-delta.is-bad { background: var(--hd-error-soft); color: var(--hd-error-text); }

/* Panels */
.chax-panel {
    padding: 18px 20px 20px; background: var(--hd-card); border: 1px solid var(--hd-border); border-radius: 16px; box-shadow: var(--hd-shadow-sm);
    min-width: 0;
}
.chax-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.chax-panel-head > .ti { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; background: var(--hd-blue-soft); color: var(--hd-blue-text); font-size: 18px; }
.chax-panel-head h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--hd-text); }
.chax-panel-head h3 small { font-size: 13px; font-weight: 500; color: var(--hd-text-3); margin-left: 4px; }
.chax-link { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--hd-border); border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--hd-blue-text) !important; text-decoration: none !important; }
.chax-link:hover { background: var(--hd-blue-soft); }
.chax-empty { margin: 30px 0; text-align: center; color: var(--hd-text-3); font-size: 14px; }

.chax-donut-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: center; gap: 18px; }
.chax-donut { min-height: 220px; }
.chax-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.chax-legend li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.chax-legend-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--hd-text); }
.chax-legend-val { font-weight: 700; white-space: nowrap; }
.chax-legend-val small { font-weight: 500; color: var(--hd-text-3); font-size: 13px; }
.chax-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* Agent table */
.chax-table-wrap { overflow-x: auto; }
.chax-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.chax-table th { padding: 10px 12px; background: var(--hd-surface-2); color: var(--hd-text-2); font-size: 12.5px; font-weight: 600; text-align: left; border-bottom: 1px solid var(--hd-border); white-space: nowrap; }
.chax-table td { padding: 10px 12px; border-bottom: 1px solid var(--hd-line-soft); vertical-align: middle; }
.chax-table tr:last-child td { border-bottom: 0; }
.chax-agent { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.chax-avatar { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 12px; font-weight: 700; }
.chax-num { font-variant-numeric: tabular-nums; }
.chax-num-link { color: var(--hd-blue-text); font-weight: 600; }
.chax-muted { color: var(--hd-text-3); }
.chax-time-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.chax-time-pill .ti { font-size: 14px; }
.chax-time-pill.is-good { background: var(--hd-success-soft); color: var(--hd-success-text); }
.chax-time-pill.is-warn { background: var(--hd-warning-soft); color: var(--hd-warning-text); }
.chax-time-pill.is-bad { background: var(--hd-error-soft); color: var(--hd-error-text); }

/* Segmented control */
.chax-seg { margin-left: auto; display: inline-flex; padding: 3px; border: 1px solid var(--hd-border); border-radius: 10px; background: var(--hd-card); }
.chax-seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font: 600 13px var(--hd-font); color: var(--hd-text); cursor: pointer; }
.chax-seg button[aria-selected="true"] { background: var(--hd-blue); color: #fff; }
.chax-seg button:focus-visible { outline: none; box-shadow: var(--hd-focus); }

.chax-kpi-wide { flex-direction: row; align-items: center; gap: 14px; padding: 18px 20px; }
.chax-kpi-wide .chax-kpi-icon { margin-bottom: 0; }
.chax-kpi-wide > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.chax-kpi-wide .chax-kpi-value { font-size: 26px; }
.chax-kpi-wide .chax-delta { margin-top: 0; align-self: center; }

@media (max-width: 1399.98px) {
    .chax-dash-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1199.98px) {
    .chax-dash-2, .chax-dash-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
    .chax-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .chax-dash-times { grid-template-columns: minmax(0, 1fr); }
    .chax-donut-wrap { grid-template-columns: minmax(0, 1fr); }
    .chax-quick-art { display: none; }
}
.chax-dash h2, .chax-dash h3 { text-transform: none !important; }

/* =====================================================================
   Dark mode corrections for stock components (style-dark.css gaps)
   ===================================================================== */
html[data-theme="dark"] body.chax-theme { background: var(--hd-bg); color: var(--hd-text); }
html[data-theme="dark"] body .text-secondary,
html[data-theme="dark"] body .text-muted { color: var(--hd-text-3) !important; }
html[data-theme="dark"] body .text-dark,
html[data-theme="dark"] body .text-body { color: var(--hd-text) !important; }
html[data-theme="dark"] body .input-group-text { background: var(--hd-surface-2); color: var(--hd-text-2); border-color: var(--hd-border); }
html[data-theme="dark"] body .form-control,
html[data-theme="dark"] body .form-select,
html[data-theme="dark"] body .custom-select,
html[data-theme="dark"] body .dataTable-input,
html[data-theme="dark"] body .dataTable-selector,
html[data-theme="dark"] body .select2-container--default .select2-selection { background-color: var(--hd-surface-2); color: var(--hd-text); border-color: var(--hd-border); }
html[data-theme="dark"] body .form-control::placeholder { color: var(--hd-text-3); }
html[data-theme="dark"] body .form-control:disabled,
html[data-theme="dark"] body .form-control[readonly] { background-color: var(--hd-hover); color: var(--hd-text-2); }
html[data-theme="dark"] body .card,
html[data-theme="dark"] body .modal-content,
html[data-theme="dark"] body .dropdown-menu,
html[data-theme="dark"] body .list-group-item { background-color: var(--hd-card); color: var(--hd-text); border-color: var(--hd-border); }
html[data-theme="dark"] body .modal-header,
html[data-theme="dark"] body .modal-footer,
html[data-theme="dark"] body .card .card-header,
html[data-theme="dark"] body .card .card-footer { border-color: var(--hd-border); background: transparent; }
html[data-theme="dark"] body .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }
html[data-theme="dark"] body .dropdown-item { color: var(--hd-text); }
html[data-theme="dark"] body .dropdown-item:hover,
html[data-theme="dark"] body .dropdown-item:focus { background: var(--hd-hover); color: var(--hd-text); }
html[data-theme="dark"] body .table,
html[data-theme="dark"] body .table td,
html[data-theme="dark"] body .dataTable-table td { color: var(--hd-text); border-color: var(--hd-line-soft); background: transparent; }
html[data-theme="dark"] body .table thead th,
html[data-theme="dark"] body .dataTable-table thead th { background: var(--hd-surface-2); color: var(--hd-text-2); border-color: var(--hd-border); }
html[data-theme="dark"] body .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: rgba(255, 255, 255, .02); color: var(--hd-text); }
html[data-theme="dark"] body .bg-light,
html[data-theme="dark"] body .bg-white { background-color: var(--hd-surface-2) !important; color: var(--hd-text); }
html[data-theme="dark"] body .border,
html[data-theme="dark"] body .border-bottom,
html[data-theme="dark"] body .border-top { border-color: var(--hd-border) !important; }
html[data-theme="dark"] body .btn-secondary,
html[data-theme="dark"] body .btn-light { background: var(--hd-hover) !important; border-color: var(--hd-border) !important; color: var(--hd-text) !important; }
html[data-theme="dark"] body .btn-outline-primary { color: var(--hd-blue-text) !important; border-color: var(--hd-blue-text) !important; }
html[data-theme="dark"] body .nav-pills .nav-link:not(.active),
html[data-theme="dark"] body .nav-tabs .nav-link:not(.active) { color: var(--hd-text-2); }
html[data-theme="dark"] body .nav-tabs { border-color: var(--hd-border); }
html[data-theme="dark"] body .page-link { background: var(--hd-card); border-color: var(--hd-border); color: var(--hd-text); }
html[data-theme="dark"] body .alert-primary { color: var(--hd-text); }
html[data-theme="dark"] body .badge.bg-light-primary,
html[data-theme="dark"] body .bg-light-primary { color: var(--hd-blue-text) !important; }
html[data-theme="dark"] body .note-editor.note-frame,
html[data-theme="dark"] body .note-editable,
html[data-theme="dark"] body .note-toolbar { background: var(--hd-surface-2) !important; color: var(--hd-text) !important; border-color: var(--hd-border) !important; }
html[data-theme="dark"] body .note-btn { background: transparent !important; color: var(--hd-text-2) !important; border-color: var(--hd-border) !important; }
html[data-theme="dark"] body .dash-header .dash-head-link { background: var(--hd-card); border-color: var(--hd-border); }
html[data-theme="dark"] body .page-header .page-header-title h4 { color: var(--hd-navy); }
html[data-theme="dark"] body hr { border-color: var(--hd-border); opacity: 1; }
/* Customer pages (layouts/auth) */
html[data-theme="dark"] body.chax-front { background: var(--hd-bg); }
html[data-theme="dark"] body.chax-front .custom-header,
html[data-theme="dark"] body.chax-front .card,
html[data-theme="dark"] body.chax-front .login-form,
html[data-theme="dark"] body.chax-front footer p,
html[data-theme="dark"] body.chax-front .copyright { background: var(--hd-card) !important; color: var(--hd-text); border-color: var(--hd-border); }
html[data-theme="dark"] body.chax-front .custom-header .nav-link { color: var(--hd-text) !important; }
html[data-theme="dark"] body.chax-front .custom-header .nav-item.active > .nav-link { color: var(--hd-blue-text) !important; }
html[data-theme="dark"] body.chax-front h1, html[data-theme="dark"] body.chax-front h2, html[data-theme="dark"] body.chax-front h3,
html[data-theme="dark"] body.chax-front h4, html[data-theme="dark"] body.chax-front h5, html[data-theme="dark"] body.chax-front label { color: var(--hd-text); }
html[data-theme="dark"] body.chax-front .mobile-menu-btn svg path { fill: var(--hd-text); }
html[data-theme="dark"] body .category-item { background: var(--hd-surface-2); color: var(--hd-text); border-color: var(--hd-border); }
html[data-theme="dark"] body .category-item span { color: var(--hd-text); }
html[data-theme="dark"] body.chax-front .custom-header .logo-col img { filter: brightness(0) invert(1); }
html[data-theme="dark"] body.chax-front .footer-row,
html[data-theme="dark"] body.chax-front .footer-row p { background: var(--hd-card) !important; color: var(--hd-text-2) !important; border-color: var(--hd-border); }
html[data-theme="dark"] body.chax-front .drp-text { color: var(--hd-text-2) !important; }
/* Status badges with white text: fills deep enough for AA in both themes. */
html body.chax-theme .badge.bg-success, html body.chax-theme .btn-success { background-color: #15803D !important; border-color: #15803D !important; color: #fff !important; }
html body.chax-theme .badge.bg-danger, html body.chax-theme .btn-danger { background-color: #C81E1E !important; border-color: #C81E1E !important; color: #fff !important; }
html body.chax-theme .badge.bg-warning { color: #1F1300 !important; }
html body.chax-theme .badge.bg-info { background-color: #0E7490 !important; color: #fff !important; }
