/* 
 * ==========================================
 * Premium Dark Mode Stylesheet for Perfex CRM
 * ==========================================
 */

html.dark,
html.dark body,
html.dark #wrapper {
    background-color: #0f172a !important; /* Slate 900 */
    color: #cbd5e1 !important; /* Slate 300 */
}

/* Headings and primary text */
html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6,
html.dark .text-neutral-800,
html.dark .tw-text-neutral-800,
html.dark .bold {
    color: #f8fafc !important; /* Slate 50 */
}

/* Secondary & muted text colors */
html.dark p,
html.dark span,
html.dark label,
html.dark .text-neutral-700,
html.dark .tw-text-neutral-700 {
    color: #cbd5e1 !important; /* Slate 300 */
}

html.dark .text-muted,
html.dark .text-neutral-500,
html.dark .tw-text-neutral-500,
html.dark .text-neutral-600,
html.dark .tw-text-neutral-600,
html.dark .control-label {
    color: #94a3b8 !important; /* Slate 400 */
}

/* Base Link Styles */
html.dark a,
html.dark #wrapper a:not(.btn),
html.dark table a,
html.dark .table a,
html.dark tbody td a {
    color: #818cf8 !important; /* Light Indigo */
    text-decoration: none;
}
html.dark a:hover,
html.dark a:focus,
html.dark #wrapper a:not(.btn):hover,
html.dark table a:hover,
html.dark .table a:hover,
html.dark tbody td a:hover {
    color: #a5b4fc !important; /* Lighter Indigo on hover */
    text-decoration: underline;
}

/* Top Navbar / Header styling */
html.dark #header {
    background-color: #1e293b !important; /* Slate 800 */
    border-bottom: 1px solid #334155 !important; /* Slate 700 */
}
html.dark #header nav {
    background-color: #1e293b !important;
}
html.dark #header .navbar-nav > li > a {
    color: #cbd5e1 !important;
}
html.dark #header .navbar-nav > li > a:hover {
    color: #f8fafc !important;
    background-color: #334155 !important;
}
html.dark #search_input {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
}
html.dark #search_input::placeholder {
    color: #64748b !important;
}

/* Sidebar styling */
html.dark .sidebar,
html.dark aside#menu {
    background-color: #111827 !important; /* AIOS dark sidebar */
    border-right: 1px solid #1e293b !important;
}
html.dark aside#menu #side-menu li a {
    color: #94a3b8 !important;
}
html.dark aside#menu #side-menu li a:hover,
html.dark aside#menu #side-menu li.active a,
html.dark aside#menu #side-menu li.active {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}
html.dark aside#menu #side-menu li ul.nav-second-level {
    background-color: #0d1321 !important;
}
html.dark .sidebar-user-profile a {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

/* Card, Panel, Widget, Stats styling */
html.dark .panel,
html.dark .panel-body,
html.dark .card,
html.dark .tw-bg-white,
html.dark .bg-white,
html.dark .widget,
html.dark .top_stats_wrapper {
    background-color: #1e293b !important; /* Slate 800 */
    border: 1px solid #334155 !important; /* Slate 700 */
    color: #cbd5e1 !important;
}
html.dark .panel-default,
html.dark .panel-heading {
    background-color: #182235 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}
html.dark .top_stats_wrapper {
    padding: 15px !important;
    border-radius: 8px !important;
}

/* Tailwind utility backgrounds override to dark cards */
html.dark .tw-bg-neutral-50,
html.dark .tw-bg-neutral-100,
html.dark .tw-bg-slate-50,
html.dark .tw-bg-slate-100,
html.dark .tw-bg-gray-50,
html.dark .tw-bg-gray-100,
html.dark .tw-bg-zinc-50,
html.dark .tw-bg-zinc-100 {
    background-color: #1e293b !important;
}

/* Form inputs & controls & input groups */
html.dark .form-control,
html.dark input[type="text"],
html.dark input[type="search"],
html.dark input[type="number"],
html.dark input[type="password"],
html.dark input[type="email"],
html.dark input[type="url"],
html.dark input[type="date"],
html.dark select,
html.dark textarea {
    background-color: #0f172a !important; /* Slate 900 */
    border: 1px solid #334155 !important; /* Slate 700 */
    color: #f8fafc !important;
}
html.dark .form-control:focus,
html.dark select:focus,
html.dark textarea:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25) !important;
}
html.dark .bootstrap-select button {
    background-color: #0f172a !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
}

/* Input group addons (search icon backgrounds, etc.) */
html.dark .input-group-addon,
html.dark .input-group-btn,
html.dark .input-group-text {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}

/* Buttons styling (Dashboard Options, Export, custom actions) */
html.dark .btn-default,
html.dark .btn-light,
html.dark button.btn-default,
html.dark a.btn-default {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
}
html.dark .btn-default:hover,
html.dark .btn-default:focus,
html.dark button.btn-default:hover,
html.dark a.btn-default:hover {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

/* DataTable specific buttons (Export / Refresh / PDF etc.) */
html.dark .dt-button,
html.dark .buttons-collection,
html.dark .buttons-html5,
html.dark .buttons-print,
html.dark .dt-buttons a {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #f8fafc !important;
    background-image: none !important;
}
html.dark .dt-button:hover,
html.dark .dt-buttons a:hover {
    background-color: #334155 !important;
    border-color: #475569 !important;
}

/* Tables styling */
html.dark .table,
html.dark table {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}
html.dark th,
html.dark thead th {
    background-color: #182235 !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}
html.dark td,
html.dark table tbody td {
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
html.dark .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #182235 !important;
}

/* Pagination controls (DataTables) */
html.dark .dataTables_paginate .paginate_button {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}
html.dark .dataTables_paginate .paginate_button:hover {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}
html.dark .dataTables_paginate .paginate_button.current,
html.dark .dataTables_paginate .paginate_button.current:hover {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #fff !important;
}
html.dark .dataTables_paginate .paginate_button.disabled,
html.dark .dataTables_paginate .paginate_button.disabled:hover {
    background-color: #1e293b !important;
    color: #64748b !important;
    opacity: 0.5;
}

/* Tabs & horizontal tabs containers styling */
html.dark .nav-tabs,
html.dark .horizontal-tabs,
html.dark .nav-tabs-horizontal {
    background-color: #182235 !important;
    border-bottom: 2px solid #334155 !important;
    border-radius: 6px !important;
}
html.dark .nav-tabs > li > a {
    color: #94a3b8 !important;
    background-color: transparent !important;
    border: none !important;
}
html.dark .nav-tabs > li.active > a,
html.dark .nav-tabs > li.active > a:hover,
html.dark .nav-tabs > li.active > a:focus {
    color: #f8fafc !important;
    background-color: #0f172a !important;
    border-bottom: 3px solid #6366f1 !important;
}

/* Dropdown menus styling */
html.dark .dropdown-menu {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
}
html.dark .dropdown-menu > li > a {
    color: #cbd5e1 !important;
}
html.dark .dropdown-menu > li > a:hover,
html.dark .dropdown-menu > li.active > a {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

/* Modals styling */
html.dark .modal-content {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}
html.dark .modal-header,
html.dark .modal-footer {
    border-color: #334155 !important;
    background-color: #182235 !important;
}

/* Alerts and statuses */
html.dark .alert {
    border-width: 1px !important;
    background-image: none !important;
}
html.dark .alert-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    color: #fca5a5 !important;
}
html.dark .alert-warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
    color: #fcd34d !important;
}
html.dark .alert-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: #6ee7b7 !important;
}
html.dark .alert-info {
    background-color: rgba(59, 130, 246, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.25) !important;
    color: #93c5fd !important;
}

/* Custom badge elements & default labels */
html.dark .label-default,
html.dark .badge-default {
    background-color: #334155 !important;
    color: #cbd5e1 !important;
    border: 1px solid #475569 !important;
}

/* Horizontal rule override */
html.dark hr {
    border-top: 1px solid #334155 !important;
}

/* Custom CSS classes for Dark Toggle hover states */
html.dark .header-dark-mode-toggle a {
    color: #fbbf24 !important; /* Amber / Sun icon color */
}
.header-dark-mode-toggle a {
    color: #64748b; /* Slate 500 / Moon icon color default */
}
.header-dark-mode-toggle a:hover {
    color: #475569;
}
html.dark .header-dark-mode-toggle a:hover {
    color: #f59e0b !important;
}

/* Dashboard options panel styling */
html.dark .screen-options-area {
    background-color: #1e293b !important; /* Slate 800 */
    border-bottom: 1px solid #334155 !important; /* Slate 700 */
    color: #cbd5e1 !important;
}
html.dark .screen-options-area label,
html.dark .screen-options-area span,
html.dark .screen-options-area a {
    color: #cbd5e1 !important;
}
html.dark .screen-options-area h4 {
    color: #f8fafc !important;
}

/* FullCalendar styling overrides */
html.dark .fc-other-month,
html.dark .fc-day-other,
html.dark td.fc-day-other,
html.dark .fc-disabled-day,
html.dark .fc-nonbusiness,
html.dark .fc-cell-shaded,
html.dark .fc-bg {
    background-color: #0f172a !important; /* Slate 900 */
}
html.dark .fc-unthemed th,
html.dark .fc-unthemed td,
html.dark .fc-unthemed thead,
html.dark .fc-unthemed tbody,
html.dark .fc-unthemed .fc-divider,
html.dark .fc-unthemed .fc-row,
html.dark .fc-unthemed .fc-content {
    border-color: #334155 !important;
}
html.dark .fc-button,
html.dark .fc-button-primary {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
    background-image: none !important;
}
html.dark .fc-button:hover,
html.dark .fc-button-primary:hover {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}
html.dark .fc-button-active,
html.dark .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    color: #fff !important;
}

/* Page content layouts & spacers */
html.dark .content,
html.dark #content,
html.dark .wrapper,
html.dark .main-content {
    background-color: #0f172a !important; /* Slate 900 */
}

/* Invoice item editor table row */
html.dark tr.main,
html.dark tr.main td,
html.dark table.items tr.main td {
    background-color: #1e293b !important; /* Slate 800 */
    color: #cbd5e1 !important;
    border-color: #334155 !important;
}

/* Bottom action toolbar (Save, Draft, etc.) */
html.dark .btn-bottom-toolbar,
html.dark .btn-bottom-pusher,
html.dark .footer-btn-group,
html.dark .panel-footer {
    background-color: #1e293b !important; /* Slate 800 */
    border-top: 1px solid #334155 !important;
}

/* Bootstrap Status Labels overrides */
html.dark .label-default {
    background-color: #334155 !important;
    color: #cbd5e1 !important;
    border: 1px solid #475569 !important;
}
html.dark .label-danger {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}
html.dark .label-warning {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fcd34d !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}
html.dark .label-success {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}
html.dark .label-info {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
}
html.dark .label-primary {
    background-color: rgba(99, 102, 241, 0.15) !important;
    color: #a5b4fc !important;
    border: 1px solid rgba(99, 102, 241, 0.3) !important;
}

/* Kanban / Milestone Task card states */
html.dark li.task,
html.dark .milestone-column li.kan-ban-col-wrapper {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
}
html.dark li.overdue-task,
html.dark li.overdue-task .panel-body,
html.dark .overdue-task {
    background-color: #1e293b !important; /* Keep clean slate background */
    border: 1px solid #334155 !important;
    border-left: 4px solid #ef4444 !important; /* Add red accent border on left */
}
html.dark li.overdue-task a,
html.dark li.overdue-task .task_milestone,
html.dark li.overdue-task h4 a,
html.dark li.overdue-task span,
html.dark li.overdue-task p {
    color: #cbd5e1 !important; /* Normal readable text color */
}
html.dark li.overdue-task a:hover,
html.dark li.overdue-task .task_milestone:hover {
    color: #f8fafc !important;
}

/* Project header status badge override (overrides database color in dark mode) */
html.dark .project_status {
    background-color: #334155 !important;
    border: 1px solid #475569 !important;
    color: #cbd5e1 !important;
}

/* Kanban board columns & panel_s containers styling */
html.dark .panel_s,
html.dark .kan-ban-col,
html.dark .kan-ban-col-wrapper,
html.dark .kan-ban-content-wrapper,
html.dark .kan-ban-content,
html.dark .status,
html.dark .milestone-column {
    background-color: #182235 !important; /* Slightly darker slate-blue for columns */
    border-color: #334155 !important;
}
html.dark .kan-ban-col-wrapper {
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
}
html.dark .panel_s {
    border: none !important;
    box-shadow: none !important;
}

/* List group elements & well containers styling */
html.dark .list-group-item {
    background-color: #1e293b !important; /* Slate 800 */
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}
html.dark .list-group-item:hover,
html.dark .list-group-item:focus {
    background-color: #334155 !important;
    color: #f8fafc !important;
}
html.dark .well {
    background-color: #182235 !important; /* Slate 850 */
    border: 1px solid #334155 !important;
    color: #cbd5e1 !important;
}

/* Leads Kanban redesign: compact status columns with a clear visual hierarchy. */
.leads-kanban-redesign {
    --leads-board-bg: #f1f5f9;
    --leads-column-bg: #f8fafc;
    --leads-card-bg: #ffffff;
    --leads-border: #e2e8f0;
    --leads-muted: #64748b;
    padding: 14px 8px 18px;
    border-radius: 14px;
    background: var(--leads-board-bg);
}
.leads-kanban-redesign .kanban-leads-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px 14px;
    color: var(--leads-muted);
    font-size: 13px;
}
.leads-kanban-redesign .kanban-leads-sort .bold {
    color: #334155;
    font-weight: 600;
}
.leads-kanban-redesign .kanban-leads-sort a {
    padding: 4px 8px;
    border-radius: 6px;
    color: #475569;
    transition: background .15s ease, color .15s ease;
}
.leads-kanban-redesign .kanban-leads-sort a:hover,
.leads-kanban-redesign .kanban-leads-sort a:focus {
    background: #e2e8f0;
    color: #0f172a;
}
.leads-kanban-redesign .leads-kanban-board {
    display: flex;
    gap: 14px;
    width: max-content;
    min-width: 100%;
    padding: 0 2px 6px;
}
.leads-kanban-redesign #kan-ban {
    display: flex;
    gap: 14px;
    min-width: 100%;
}
.leads-kanban-redesign .kan-ban-col {
    float: none;
    flex: 0 0 310px;
    width: 310px;
    padding: 0;
    margin: 0;
}
.leads-kanban-redesign .kan-ban-col-wrapper {
    overflow: hidden;
    height: 100%;
    min-height: 470px;
    border: 1px solid var(--leads-border);
    border-radius: 12px;
    background: var(--leads-column-bg);
    box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}
.leads-kanban-redesign .panel_s {
    height: 100%;
    border: 0;
    background: transparent;
}
.leads-kanban-redesign .lead-kanban-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 62px;
    padding: 12px 13px;
    border: 0;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: var(--lead-status-color, #64748b);
}
.leads-kanban-redesign .lead-kanban-heading-main {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
}
.leads-kanban-redesign .lead-kanban-heading .heading {
    overflow: hidden;
    color: inherit;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.leads-kanban-redesign .lead-kanban-drag-handle {
    margin-right: 5px;
    color: var(--lead-status-color, #64748b);
    cursor: grab;
}
.leads-kanban-redesign .lead-kanban-heading-value {
    flex: 0 0 auto;
    color: rgba(255,255,255,.9);
    font-size: 12px;
    white-space: nowrap;
}
.leads-kanban-redesign .lead-kanban-heading-count {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15,23,42,.22);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}
.leads-kanban-redesign .lead-kanban-heading-count small {
    color: rgba(255,255,255,.82);
    font-size: 10px;
    font-weight: 500;
}
.leads-kanban-redesign .lead-kanban-heading .kanban-color-picker {
    flex: 0 0 auto;
    color: #fff;
}
.leads-kanban-redesign .lead-kanban-content-wrapper,
.leads-kanban-redesign .kan-ban-content,
.leads-kanban-redesign .status {
    min-height: 405px;
    background: transparent;
}
.leads-kanban-redesign .status {
    padding: 12px;
}
.leads-kanban-redesign .lead-kan-ban {
    margin: 0;
    padding: 0;
}
.leads-kanban-redesign .lead-kan-ban > .lead-kanban-card-body,
.leads-kanban-redesign .lead-kan-ban .lead-body {
    border: 0;
}
.leads-kanban-redesign li.lead-kan-ban {
    position: relative;
    margin: 0 0 10px;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--leads-border);
    border-radius: 10px;
    background: var(--leads-card-bg);
    box-shadow: 0 2px 7px rgba(15, 23, 42, .05);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.leads-kanban-redesign li.lead-kan-ban:hover {
    border-color: color-mix(in srgb, var(--lead-status-color, #64748b) 55%, #cbd5e1);
    box-shadow: 0 7px 18px rgba(15, 23, 42, .10);
    transform: translateY(-1px);
}
.leads-kanban-redesign li.lead-kan-ban:before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    content: '';
    background: var(--lead-status-color, #64748b);
}
.leads-kanban-redesign .lead-kanban-card-body {
    padding: 13px 13px 12px 17px;
}
.leads-kanban-redesign .lead-name {
    align-items: center;
    min-height: 30px;
    padding-right: 20px;
}
.leads-kanban-redesign .lead-name .staff-profile-image-xs {
    width: 26px;
    height: 26px;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .15);
}
.leads-kanban-redesign .lead-kanban-card-indicator {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin: 0 7px 0 2px;
    border-radius: 50%;
    background: var(--lead-status-color, #64748b);
}
.leads-kanban-redesign .lead-name a:last-child {
    min-width: 0;
    color: #1d4ed8;
}
.leads-kanban-redesign .lead-name a:last-child span {
    margin: 0;
    font-size: 14px;
    font-weight: 650;
}
.leads-kanban-redesign .lead-kanban-card-meta {
    align-items: flex-start;
    gap: 8px;
    margin-top: 8px;
}
.leads-kanban-redesign .lead-kanban-card-detail {
    color: #475569;
    line-height: 1.55;
}
.leads-kanban-redesign .lead-kanban-card-detail i {
    width: 16px;
    color: var(--lead-status-color, #64748b);
    text-align: center;
}
.leads-kanban-redesign .lead-kanban-date {
    display: inline-block;
    color: #64748b;
    font-size: 11px;
    line-height: 1.45;
}
.leads-kanban-redesign .lead-kanban-date .bold {
    color: #334155;
}
.leads-kanban-redesign .kanban-tags {
    gap: 4px;
    margin-top: 8px;
}
.leads-kanban-redesign .kanban-load-more {
    margin-top: 12px;
}
.leads-kanban-redesign .kanban-load-more a {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    background: rgba(255,255,255,.6);
}
.leads-kanban-redesign .kanban-empty {
    padding: 58px 12px 20px;
    color: #94a3b8;
}
.leads-kanban-redesign .kanban-empty h4 {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}
.leads-kanban-redesign .kanban-empty h4 i {
    color: var(--lead-status-color, #94a3b8);
    font-size: 22px;
}
html.dark .leads-kanban-redesign {
    --leads-board-bg: #0f172a;
    --leads-column-bg: #182235;
    --leads-card-bg: #1e293b;
    --leads-border: #334155;
    --leads-muted: #94a3b8;
}
html.dark .leads-kanban-redesign .kanban-leads-sort .bold,
html.dark .leads-kanban-redesign .kanban-leads-sort a,
html.dark .leads-kanban-redesign .lead-kanban-heading .heading,
html.dark .leads-kanban-redesign .lead-kanban-heading-count,
html.dark .leads-kanban-redesign .lead-kanban-card-detail,
html.dark .leads-kanban-redesign .lead-kanban-date .bold {
    color: #e2e8f0;
}
html.dark .leads-kanban-redesign .lead-kanban-heading {
    background: var(--lead-status-color, #64748b);
}
html.dark .leads-kanban-redesign .lead-kanban-heading-value,
html.dark .leads-kanban-redesign .lead-kanban-heading-count small,
html.dark .leads-kanban-redesign .lead-kanban-date {
    color: rgba(255,255,255,.82);
}
html.dark .leads-kanban-redesign .lead-kanban-heading-count {
    background: rgba(15,23,42,.28);
}
html.dark .leads-kanban-redesign .lead-name a:last-child {
    color: #93c5fd;
}
html.dark .leads-kanban-redesign .kanban-load-more a {
    border-color: #475569;
    color: #94a3b8;
    background: rgba(15,23,42,.25);
}
@media (max-width: 767px) {
    .leads-kanban-redesign .kanban-leads-sort {
        flex-wrap: wrap;
    }
    .leads-kanban-redesign .kan-ban-col {
        flex-basis: min(86vw, 310px);
        width: min(86vw, 310px);
    }
}

/* Fallback for cached/legacy Leads page wrappers: keep the saved status color visible. */
.kan-ban-tab .lead-kanban-heading {
    background: var(--lead-status-color, #64748b) !important;
    color: #fff !important;
    border: 0 !important;
}
.kan-ban-tab .kan-ban-col-wrapper,
.kan-ban-tab .kan-ban-content-wrapper,
.kan-ban-tab .kan-ban-content,
.kan-ban-tab .status {
    background: #f3f4f6 !important;
}
.kan-ban-tab .lead-kanban-heading .heading,
.kan-ban-tab .lead-kanban-heading-value,
.kan-ban-tab .lead-kanban-heading-count {
    color: #fff !important;
}
.kan-ban-tab .lead-kanban-heading-count {
    background: rgba(15,23,42,.22) !important;
}
html.dark .kan-ban-tab .lead-kanban-heading {
    background: var(--lead-status-color, #64748b) !important;
    color: #f8fafc !important;
}
html.dark .kan-ban-tab .lead-kanban-heading .heading,
html.dark .kan-ban-tab .lead-kanban-heading-value,
html.dark .kan-ban-tab .lead-kanban-heading-count {
    color: #fff !important;
}
html.dark .kan-ban-tab .lead-kanban-heading-count {
    background: rgba(15,23,42,.28) !important;
}






/* ==========================================================================
   AIOS 360 branding REMOVED (2026-07-04).
   The platform is now brand-NEUTRAL: no hard-coded primary/link/accent colours
   here. ALL admin colour (buttons, links, sidebar, tables, modals, general) is
   managed per-install by the theme_style module (Setup -> Theme Style), so each
   tenant — and the master — controls its own look. The tailwind primary ramp and
   style.min.css were reverted to Perfex defaults; the theme_style green button
   default was removed. Previous olive block preserved in custom.css.bak-preolive.
   ========================================================================== */
/* Sidebar expand/collapse caret: use the NATIVE FontAwesome glyph exactly like
   Bixlr ERP (style.min.css `.sidebar .fa.arrow:before{content:"\f104"}` + FA6).
   No custom override here — a previous triangle override suppressed the working
   native glyph. Kept identical to Bixlr so the caret renders the same way. */

/* Compact typography for Setup navigation, including nested labels. */
.admin #setup-menu > li > a,
.admin #setup-menu .nav-second-level a,
.admin #setup-menu .menu-text,
.admin #setup-menu .sub-menu-text,
.admin #setup-menu .customizer-heading {
    font-size: 13px !important;
}
