/* Wahive Dashboard UI — Clean SaaS (extends auth design tokens) */

:root {
    --wahive-green: #ff6600;
    --wahive-green-hover: #e55a00;
    --wahive-green-light: #fff4eb;
    --wahive-green-muted: #fff8f2;
    --wahive-orange: #ff6600;
    --wahive-orange-hover: #e55a00;
    --wahive-orange-light: #fff4eb;
    --wahive-orange-muted: #fff8f2;
    --wahive-orange-gradient: linear-gradient(135deg, #ff8533 0%, #ff6600 45%, #e55a00 100%);
    --wahive-text: #0a0a0a;
    --wahive-text-muted: #737373;
    --wahive-border: #e5e5e5;
    --wahive-surface: #ffffff;
    --wahive-bg: #f4f4f5;
    --wahive-radius: 12px;
    --wahive-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --wahive-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --wahive-sidebar-width: 240px;
    --wahive-sidebar-collapsed: 64px;
    --wahive-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Base overrides when logged in */
body.wahive-ui {
    font-family: var(--wahive-font);
    background: var(--wahive-bg) !important;
}

body.wahive-ui .main-content {
    background: var(--wahive-bg);
}

/* ── Sidebar ── */
body.wahive-ui #sidenav-main.wahive-sidebar {
    background: var(--wahive-surface) !important;
    border-right: 1px solid var(--wahive-border);
    box-shadow: none;
    width: var(--wahive-sidebar-width);
    z-index: 110 !important;
    max-width: var(--wahive-sidebar-width);
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (min-width: 768px) {
    body.wahive-ui .navbar-vertical.navbar-expand-md.fixed-left {
        max-width: var(--wahive-sidebar-width) !important;
    }

    body.wahive-ui.lw-minimized-menu .navbar-vertical.navbar-expand-md {
        z-index: 110 !important;
    }
}

body.wahive-ui #sidenav-main .navbar-collapse::before {
    display: none !important;
    content: none !important;
    margin: 0 !important;
}

body.wahive-ui #sidenav-main .container-fluid,
body.wahive-ui #sidenav-main .navbar-collapse,
body.wahive-ui #sidenav-main > .container-fluid > span {
    background: var(--wahive-surface) !important;
}

body.wahive-ui #sidenav-main.wahive-sidebar {
    transition: width 0.2s ease, box-shadow 0.2s ease;
}

body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar {
    width: var(--wahive-sidebar-collapsed);
}

body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:hover,
body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:focus-within {
    width: var(--wahive-sidebar-width);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
    z-index: 120 !important;
}

body.wahive-ui:not(.lw-minimized-menu) .main-content {
    margin-left: var(--wahive-sidebar-width) !important;
}

body.wahive-ui.lw-minimized-menu .navbar-vertical.navbar-expand-md.fixed-left + .main-content {
    margin-left: var(--wahive-sidebar-collapsed) !important;
}

body.wahive-ui #sidenav-main .navbar-nav .nav-link {
    color: var(--wahive-text-muted) !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1rem !important;
    border-radius: 8px;
    margin: 2px 0.75rem;
    transition: background 0.15s, color 0.15s;
}

/* Flat admin nav — same look as React settings hub */
body.wahive-ui #sidenav-main .navbar-nav .wahive-admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-left: 3px solid transparent;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0.6rem 1rem 0.6rem calc(1rem - 3px) !important;
    font-size: 0.9rem;
}

body.wahive-ui #sidenav-main .navbar-nav .wahive-admin-nav-link .nav-link-text {
    flex: 1;
    min-width: 0;
}

body.wahive-ui #sidenav-main .navbar-nav .wahive-admin-nav-link i {
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
}

body.wahive-ui #sidenav-main .navbar-nav .wahive-admin-nav-link:hover {
    background: var(--wahive-orange-muted, #fff4eb) !important;
    color: var(--wahive-orange) !important;
}

body.wahive-ui #sidenav-main .navbar-nav .wahive-admin-nav-link:hover .nav-link-text,
body.wahive-ui #sidenav-main .navbar-nav .wahive-admin-nav-link:hover i {
    color: var(--wahive-orange) !important;
}

body.wahive-ui #sidenav-main .navbar-nav .wahive-admin-nav-link.active {
    background: var(--wahive-orange-muted, #fff4eb) !important;
    color: var(--wahive-orange) !important;
    border-left-color: var(--wahive-orange);
    font-weight: 600;
}

body.wahive-ui #sidenav-main .navbar-nav .wahive-admin-nav-link.active .nav-link-text,
body.wahive-ui #sidenav-main .navbar-nav .wahive-admin-nav-link.active i {
    color: var(--wahive-orange) !important;
}

body.wahive-ui #sidenav-main .wahive-nav-section {
    padding: 0.75rem 1rem 0.25rem;
    margin: 0;
    pointer-events: none;
    list-style: none;
}

body.wahive-ui #sidenav-main .wahive-nav-section .wahive-nav-section-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wahive-text-muted);
    padding: 0;
    opacity: 1;
}

body.wahive-ui #sidenav-main .navbar-nav .nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 0.625rem;
    color: var(--wahive-text-muted);
    font-size: 0.9375rem;
}

body.wahive-ui #sidenav-main .navbar-nav .nav-link .lw-sidebar-nav-badge {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.2em 0.55em;
    flex-shrink: 0;
}

body.wahive-ui #sidenav-main .navbar-nav .nav-link:hover:not(.wahive-admin-nav-link) {
    background: var(--wahive-bg);
    color: var(--wahive-text) !important;
}

body.wahive-ui #sidenav-main .navbar-nav .nav-link.active,
body.wahive-ui #sidenav-main .navbar-nav .active > .nav-link {
    background: var(--wahive-orange-muted) !important;
    color: var(--wahive-orange) !important;
}

body.wahive-ui #sidenav-main .navbar-nav .nav-link.active i,
body.wahive-ui #sidenav-main .navbar-nav .active > .nav-link i {
    color: var(--wahive-orange);
}

body.wahive-ui #sidenav-main .navbar-nav .nav-link.active::before {
    display: none !important;
}

body.wahive-ui #sidenav-main .lw-expandable-nav .nav .nav-link {
    padding-left: 2.5rem !important;
    font-size: 0.8125rem;
}

/* Sidebar section groups — collapsible */
body.wahive-ui #sidenav-main .wahive-nav-group {
    width: 100%;
}

body.wahive-ui #sidenav-main .wahive-nav-group:first-child .wahive-nav-section-toggle {
    margin-top: 0.25rem;
}

body.wahive-ui #sidenav-main .wahive-nav-section-toggle {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem 0.35rem !important;
    margin: 0.75rem 0.75rem 0.15rem !important;
    border-radius: 8px;
    cursor: pointer;
    background: transparent !important;
    color: var(--wahive-text-muted) !important;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

body.wahive-ui #sidenav-main .wahive-nav-section-toggle:hover {
    background: var(--wahive-bg) !important;
    color: var(--wahive-text) !important;
}

body.wahive-ui #sidenav-main .wahive-nav-section-toggle .wahive-nav-section-label {
    flex: 1;
    padding: 0;
    opacity: 0.85;
}

body.wahive-ui #sidenav-main .wahive-nav-section-chevron {
    font-size: 0.625rem;
    opacity: 0.65;
    transition: transform 0.2s ease;
}

body.wahive-ui #sidenav-main .wahive-nav-section-toggle:not(.collapsed) .wahive-nav-section-chevron {
    transform: rotate(180deg);
}

body.wahive-ui #sidenav-main .wahive-nav-group-list {
    margin: 0;
    padding: 0;
}

body.wahive-ui #sidenav-main .wahive-nav-group-list .nav-item .nav-link {
    padding-left: 1rem !important;
}

@media (min-width: 768px) {
    body.wahive-ui #sidenav-main > .container-fluid > span {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.35rem;
        padding-right: 0.5rem;
    }
}

body.wahive-ui #sidenav-main .wahive-sidebar-toggle {
    border: 1px solid var(--wahive-border);
    background: var(--wahive-bg);
    color: var(--wahive-text-muted);
    border-radius: 8px;
    width: 2rem;
    height: 2rem;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.wahive-ui #sidenav-main .wahive-sidebar-toggle:hover {
    background: var(--wahive-orange-muted);
    color: var(--wahive-orange);
    border-color: #ffd6b3;
}

body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .wahive-nav-section-toggle {
    display: none !important;
}

body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .wahive-nav-group-items,
body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .wahive-nav-group-items.collapse {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
}

body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .wahive-sidebar-toggle {
    display: none !important;
}

body.wahive-ui #sidenav-main .wahive-nav-subsection {
    margin-top: 0.5rem;
    pointer-events: none;
}

body.wahive-ui #sidenav-main .wahive-nav-subsection:first-child {
    margin-top: 0.25rem;
}

body.wahive-ui #sidenav-main .wahive-nav-subsection-label {
    display: block;
    padding: 0.25rem 1rem 0.125rem 2.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wahive-text-muted);
    opacity: 0.65;
}

body.wahive-ui #sidenav-main .navbar-nav .nav-link[data-toggle=collapse]::after {
    margin-left: auto;
}

/* List bulk selection toolbar */
.lw-list-selection-bar {
    background: var(--wahive-bg, #f4f4f5);
    border: 1px solid var(--wahive-border, #e5e5e5);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.lw-list-selection-bar .lw-list-select-all {
    cursor: pointer;
    user-select: none;
    color: var(--wahive-text-muted, #737373);
}

.lw-list-selection-bar .lw-list-select-all:hover {
    color: var(--wahive-text, #0a0a0a);
}

.lw-list-selection-bar .lw-selection-count {
    font-size: 0.75rem;
    min-width: 1.5rem;
}

.lw-list-selection-bar .lw-list-bulk-actions {
    gap: 0.5rem;
    margin-left: auto;
}

.lw-list-selection-bar .lw-list-bulk-actions .btn,
.lw-list-selection-bar .lw-list-bulk-actions .dropdown-toggle {
    margin: 0;
    border-radius: 8px !important;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
}

body.wahive-brand .lw-list-selection-bar .btn-warning {
    background: var(--wahive-orange, #ff6600) !important;
    border-color: var(--wahive-orange, #ff6600) !important;
    color: #fff !important;
}

body.wahive-brand .lw-list-selection-bar .btn-warning:hover {
    background: var(--wahive-orange-hover, #e55a00) !important;
    border-color: var(--wahive-orange-hover, #e55a00) !important;
}

body.wahive-brand .lw-list-selection-bar .btn-danger {
    background: #e11d48 !important;
    border-color: #e11d48 !important;
}

table[lwDataTable] th.lw-select-col,
table[lwDataTable] td:first-child + td {
    width: 44px;
    text-align: center;
    vertical-align: middle;
}

table[lwDataTable] .lw-row-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .wahive-nav-section,
body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .wahive-nav-subsection {
    display: none;
}

body.wahive-ui #sidenav-main .navbar-brand-img {
    max-height: 56px;
    min-height: auto;
}

body.wahive-ui #sidenav-main .navbar-brand {
    padding: 1.25rem 1rem;
    margin: 0;
}

body.wahive-ui #sidenav-main > .container-fluid > span {
    display: block;
}

/* Minimized sidebar — center icons, prevent clipping from legacy app.css rules */
@media (min-width: 768px) {
    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar {
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar > .container-fluid {
        width: 100% !important;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main .navbar-nav {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .navbar-brand {
        padding: 1rem 0 !important;
        margin: 0;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .lw-sidebar-logo-small {
        margin-left: 8px !important;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .navbar-nav .nav-link {
        padding: 0.625rem 0 !important;
        padding-left: 0 !important;
        margin: 2px 0.375rem;
        font-size: 0;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .navbar-nav .nav-link i,
    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .navbar-nav .nav-link .fa {
        font-size: 0.9375rem;
        margin-right: 0 !important;
        width: 20px;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .navbar-nav .nav-link .nav-link-text,
    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .navbar-nav .nav-link span:not(.badge) {
        display: none;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .navbar-nav .nav-link .lw-sidebar-nav-badge {
        position: absolute;
        top: 2px;
        right: 6px;
        font-size: 0.625rem !important;
        line-height: 1.2;
        padding: 2px 5px;
        min-width: 16px;
        margin: 0 !important;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .lw-expandable-nav {
        display: none !important;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:hover .navbar-nav .nav-link,
    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:focus-within .navbar-nav .nav-link {
        padding: 0.625rem 1rem !important;
        padding-left: 1rem !important;
        margin: 2px 0.75rem;
        font-size: 0.875rem;
        justify-content: flex-start;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:hover .navbar-nav .nav-link i,
    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:focus-within .navbar-nav .nav-link i {
        margin-right: 0.625rem !important;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:hover .navbar-nav .nav-link .nav-link-text,
    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:focus-within .navbar-nav .nav-link span:not(.badge) {
        display: inline;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:hover .navbar-nav .nav-link .lw-sidebar-nav-badge,
    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:focus-within .navbar-nav .nav-link .lw-sidebar-nav-badge {
        position: static;
        font-size: 0.6875rem !important;
        margin-left: auto !important;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:hover .wahive-nav-section,
    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:focus-within .wahive-nav-section {
        display: list-item !important;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:hover .wahive-admin-nav-link,
    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:focus-within .wahive-admin-nav-link {
        justify-content: flex-start;
        padding: 0.6rem 1rem 0.6rem calc(1rem - 3px) !important;
        margin: 0 !important;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .wahive-admin-nav-link {
        padding: 0.625rem 0 !important;
        margin: 2px 0.375rem !important;
        border-left-color: transparent !important;
        justify-content: center;
    }

    body.wahive-ui.lw-minimized-menu #sidenav-main.wahive-sidebar:not(:hover):not(:focus-within) .wahive-admin-nav-link.active {
        background: var(--wahive-orange-muted, #fff4eb) !important;
    }
}

/* ── Top navbar ── */
body.wahive-ui #navbar-main.wahive-topbar {
    background: var(--wahive-surface) !important;
    border-bottom: 1px solid var(--wahive-border);
    box-shadow: none;
    backdrop-filter: none;
    min-height: 56px;
    padding-top: 0;
    padding-bottom: 0;
}

body.wahive-ui #navbar-main.wahive-topbar .h4 {
    color: var(--wahive-text) !important;
    font-size: 0.9375rem !important;
    font-weight: 600;
    text-transform: none !important;
    letter-spacing: -0.01em;
}

body.wahive-ui #navbar-main .nav-link {
    color: var(--wahive-text-muted) !important;
    font-size: 0.875rem;
}

body.wahive-ui #navbar-main .dropdown-menu {
    border: 1px solid var(--wahive-border);
    border-radius: var(--wahive-radius);
    box-shadow: var(--wahive-shadow-md);
}

body.wahive-ui .main-content #navbar-main {
    position: sticky !important;
    top: 0;
    z-index: 100;
    margin-left: 0 !important;
    width: 100% !important;
    padding-left: 1rem !important;
}

body.wahive-ui:not(.lw-minimized-menu) .main-content #navbar-main {
    padding-left: 1.5rem !important;
}

body.wahive-ui.lw-minimized-menu .main-content #navbar-main {
    padding-left: 1rem !important;
}

/* ── Page header ── */
body.wahive-ui .wahive-page-header {
    padding: 1.5rem var(--wahive-page-padding-x) 0.5rem !important;
    background: transparent !important;
}

/* ── Page content spacing ── */
body.wahive-ui .main-content > .container-fluid,
body.wahive-ui .main-content > .container,
body.wahive-ui .main-content .wahive-dash-section > .container-fluid {
    padding-left: var(--wahive-page-padding-x) !important;
    padding-right: var(--wahive-page-padding-x) !important;
}

body.wahive-ui .main-content {
    padding-bottom: var(--wahive-space-6);
}

/* Reset legacy negative top margins from old page header layout */
body.wahive-ui .main-content > .container-fluid[class*="mt-"][class*="--"],
body.wahive-ui .main-content > .container[class*="mt-"][class*="--"] {
    margin-top: 0 !important;
}

body.wahive-ui .wahive-page-header .lw-page-title,
body.wahive-ui .wahive-page-header h1 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: var(--wahive-text) !important;
    letter-spacing: -0.02em;
    margin: 0 !important;
}

/* ── KPI bento grid ── */
.wahive-dash-section {
    padding: 0 0 var(--wahive-space-6);
}

body.wahive-ui .main-content > .wahive-dash-section {
    padding-top: var(--wahive-page-padding-y);
}

.wahive-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
    .wahive-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .wahive-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.wahive-kpi-card {
    background: var(--wahive-surface);
    border: 1px solid var(--wahive-border);
    border-radius: var(--wahive-radius);
    padding: 1.25rem;
    box-shadow: var(--wahive-shadow);
    transition: box-shadow 0.15s;
    min-height: auto !important;
}

.wahive-kpi-card:hover {
    box-shadow: var(--wahive-shadow-md);
}

.wahive-kpi-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.wahive-kpi-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--wahive-text-muted);
    margin: 0 0 0.375rem;
    text-transform: none;
    letter-spacing: 0;
}

.wahive-kpi-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--wahive-text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.wahive-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.wahive-kpi-icon--green { background: var(--wahive-orange-light); color: var(--wahive-orange); }
.wahive-kpi-icon--blue { background: #dbeafe; color: #2563eb; }
.wahive-kpi-icon--amber { background: #fef3c7; color: #d97706; }
.wahive-kpi-icon--purple { background: #ede9fe; color: #7c3aed; }
.wahive-kpi-icon--rose { background: #ffe4e6; color: #e11d48; }

.wahive-kpi-foot {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
}

.wahive-kpi-foot a {
    color: var(--wahive-orange);
    font-weight: 500;
    text-decoration: none;
}

.wahive-kpi-foot a:hover {
    text-decoration: underline;
}

/* Remove old header padding from cards include */
body.wahive-ui .header.pb-5,
body.wahive-ui .header.pt-md-7 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

body.wahive-ui .header .container-fluid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ── Dashboard cards ── */
body.wahive-ui .wahive-panel {
    background: var(--wahive-surface);
    border: 1px solid var(--wahive-border);
    border-radius: var(--wahive-radius);
    box-shadow: var(--wahive-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

body.wahive-ui .wahive-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--wahive-border);
}

body.wahive-ui .wahive-panel-header h2,
body.wahive-ui .wahive-panel-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wahive-text);
}

body.wahive-ui .wahive-panel-header h2 i,
body.wahive-ui .wahive-panel-header h3 i {
    margin-right: 0.5rem;
    color: var(--wahive-orange, #ff6600);
}

body.wahive-ui .wahive-panel-header .wahive-panel-sub {
    font-size: 0.8125rem;
    color: var(--wahive-text-muted);
    font-weight: 400;
    margin-top: 0.125rem;
}

body.wahive-ui .wahive-panel-body {
    padding: 1.5rem;
}

body.wahive-ui .wahive-panel .chart {
    height: 280px;
    position: relative;
}

body.wahive-ui .wahive-btn-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 10px;
    background: var(--wahive-orange-gradient);
    color: #fff;
    border: none;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(255, 102, 0, 0.3);
}

body.wahive-ui .wahive-btn-sm:hover {
    background: var(--wahive-orange-hover);
    color: #fff;
    text-decoration: none;
}

/* Modern table */
body.wahive-ui .wahive-table {
    width: 100%;
    border-collapse: collapse;
}

body.wahive-ui .wahive-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wahive-text-muted);
    padding: 0.75rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--wahive-border);
    background: var(--wahive-bg);
}

body.wahive-ui .wahive-table td {
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--wahive-border);
    color: var(--wahive-text);
}

body.wahive-ui .wahive-table tbody tr:last-child td {
    border-bottom: none;
}

body.wahive-ui .wahive-table tbody tr:hover {
    background: var(--wahive-bg);
}

body.wahive-ui .wahive-table a {
    color: var(--wahive-text);
    font-weight: 500;
    text-decoration: none;
}

body.wahive-ui .wahive-table a:hover {
    color: var(--wahive-orange);
}

body.wahive-ui .wahive-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
}

body.wahive-ui .wahive-badge--success {
    background: var(--wahive-orange-light);
    color: #c2410c;
}

body.wahive-ui .wahive-badge--muted {
    background: #f4f4f5;
    color: var(--wahive-text-muted);
}

/* Alerts */
body.wahive-ui .wahive-alert-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--wahive-radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
    border: 1px solid;
}

body.wahive-ui .wahive-alert-banner--danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

body.wahive-ui .wahive-alert-banner--warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

body.wahive-ui .wahive-alert-banner i {
    margin-top: 0.125rem;
}

body.wahive-ui .wahive-alert-banner .wahive-btn-sm {
    margin-top: 0.5rem;
}

/* Setup checklist */
.wahive-setup-card {
    background: var(--wahive-surface);
    border: 1px solid var(--wahive-border);
    border-radius: var(--wahive-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--wahive-shadow);
}

.wahive-setup-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--wahive-text);
}

.wahive-setup-card > p {
    font-size: 0.875rem;
    color: var(--wahive-text-muted);
    margin: 0 0 1.25rem;
}

.wahive-setup-progress {
    height: 6px;
    background: var(--wahive-border);
    border-radius: 3px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.wahive-setup-progress-bar {
    height: 100%;
    background: var(--wahive-orange-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.wahive-setup-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wahive-setup-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--wahive-border);
    background: var(--wahive-bg);
    transition: background 0.15s;
}

.wahive-setup-item.done {
    background: var(--wahive-orange-muted);
    border-color: #ffd6b3;
}

.wahive-setup-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--wahive-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.6875rem;
    color: transparent;
    background: var(--wahive-surface);
}

.wahive-setup-item.done .wahive-setup-check {
    background: var(--wahive-orange);
    border-color: var(--wahive-orange);
    color: #fff;
}

.wahive-setup-content {
    flex: 1;
    min-width: 0;
}

.wahive-setup-content strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wahive-text);
}

.wahive-setup-content span,
.wahive-setup-content a {
    font-size: 0.8125rem;
    color: var(--wahive-text-muted);
}

.wahive-setup-content a {
    color: var(--wahive-orange);
    font-weight: 500;
    text-decoration: none;
}

.wahive-setup-content a:hover {
    text-decoration: underline;
}

.wahive-setup-action {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--wahive-orange);
    text-decoration: none;
    white-space: nowrap;
}

.wahive-setup-action:hover {
    text-decoration: underline;
}

/* Breadcrumb */
body.wahive-ui .lw-breadcrumb-container {
    background: transparent !important;
    padding: 0 0 1rem !important;
    font-size: 0.875rem;
}

body.wahive-ui .lw-breadcrumb-container .breadcrumb-item a {
    color: var(--wahive-orange) !important;
}

body.wahive-ui .lw-breadcrumb-container .breadcrumb-item {
    color: var(--wahive-text-muted) !important;
}

/* General card cleanup inside wahive-ui */
body.wahive-ui .card {
    border-radius: var(--wahive-radius) !important;
    border: 1px solid var(--wahive-border) !important;
    box-shadow: var(--wahive-shadow) !important;
    backdrop-filter: none !important;
    background: var(--wahive-surface) !important;
}

body.wahive-ui .card.card-stats {
    min-height: auto !important;
}

body.wahive-ui .btn.btn-primary,
body.wahive-ui .btn.btn-success {
    background: var(--wahive-orange) !important;
    border-color: var(--wahive-orange) !important;
}

body.wahive-ui .btn.btn-primary:hover,
body.wahive-ui .btn.btn-success:hover {
    background: var(--wahive-orange-hover) !important;
    border-color: var(--wahive-orange-hover) !important;
}

body.wahive-ui .alert.alert-danger {
    border-radius: var(--wahive-radius);
}

/* ══════════════════════════════════════════
   Global Wahive brand overrides (all pages)
   ══════════════════════════════════════════ */

body.wahive-brand {
    --wahive-orange-ring: rgba(255, 102, 0, 0.15);
}

/* Light / system-default page background (explicit dark uses html[data-theme="dark"] below) */
html[data-theme="light"] body.wahive-brand.lw-authenticated-page,
html[data-theme="light"] body.wahive-brand.lw-guest-page,
html[data-theme="system_default"] body.wahive-brand.lw-authenticated-page,
html[data-theme="system_default"] body.wahive-brand.lw-guest-page {
    background: var(--wahive-bg, #fafafa) !important;
    background-image: none !important;
}

/* Logo sizing */
body.wahive-brand .wahive-brand-logo {
    max-height: 56px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

body.wahive-brand .wahive-brand-logo-sm,
body.wahive-brand .lw-sidebar-logo-small.wahive-brand-logo {
    max-height: 44px;
    max-width: 44px;
}

body.wahive-brand .wahive-sidebar-brand {
    padding: 1rem 0.75rem 1.25rem !important;
}

/* Links & titles */
body.wahive-brand a:not(.btn):not(.nav-link):not(.dropdown-item):not(.wahive-btn):not(.page-link) {
    color: var(--wahive-orange, #ff6600);
}

body.wahive-brand a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    color: var(--wahive-orange-hover, #e55a00);
}

body.wahive-brand .lw-page-title,
body.wahive-brand .wahive-page-heading {
    color: var(--wahive-text, #1a1a1a) !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

body.wahive-brand .wahive-page-heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--wahive-orange-gradient, linear-gradient(90deg, #ff8533, #ff6600));
    border-radius: 2px;
    margin-top: 0.5rem;
}

body.wahive-brand .text-primary,
body.wahive-brand .text-success {
    color: var(--wahive-orange, #ff6600) !important;
}

/* Light mode navbar — scoped so dark theme is not forced back to white */
html[data-theme="light"] body.wahive-brand #navbar-main,
html[data-theme="light"] body.wahive-brand .main-content .navbar-top,
html[data-theme="system_default"] body.wahive-brand #navbar-main,
html[data-theme="system_default"] body.wahive-brand .main-content .navbar-top {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--wahive-border, #e5e5e5) !important;
    backdrop-filter: none !important;
}

html[data-theme="light"] body.wahive-brand #navbar-main .h4,
html[data-theme="light"] body.wahive-brand #navbar-main .nav-link,
html[data-theme="system_default"] body.wahive-brand #navbar-main .h4,
html[data-theme="system_default"] body.wahive-brand #navbar-main .nav-link {
    color: var(--wahive-text-muted, #6b7280) !important;
}

/* Buttons */
body.wahive-brand .btn-primary,
body.wahive-brand .btn-success,
body.wahive-brand .btn.btn-primary,
body.wahive-brand .btn.btn-success {
    background: var(--wahive-orange-gradient, linear-gradient(135deg, #ff8533, #ff6600, #e55a00)) !important;
    border-color: var(--wahive-orange, #ff6600) !important;
    color: #fff !important;
    border-radius: 10px !important;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(255, 102, 0, 0.25);
}

body.wahive-brand .btn-primary:hover,
body.wahive-brand .btn-success:hover,
body.wahive-brand .btn.btn-primary:hover,
body.wahive-brand .btn.btn-success:hover {
    background: var(--wahive-orange-hover, #e55a00) !important;
    border-color: var(--wahive-orange-hover, #e55a00) !important;
    color: #fff !important;
}

body.wahive-brand .btn-outline-primary,
body.wahive-brand .btn-outline-success {
    color: var(--wahive-orange, #ff6600) !important;
    border-color: var(--wahive-orange, #ff6600) !important;
    border-radius: 10px !important;
}

body.wahive-brand .btn-outline-primary:hover,
body.wahive-brand .btn-outline-success:hover {
    background: var(--wahive-orange-muted, #fff8f2) !important;
    color: var(--wahive-orange-hover, #e55a00) !important;
}

/* Form controls */
body.wahive-brand .form-control:focus,
body.wahive-brand .lw-form-field:focus {
    border-color: var(--wahive-orange, #ff6600) !important;
    box-shadow: 0 0 0 3px var(--wahive-orange-ring) !important;
}

body.wahive-brand .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--wahive-orange, #ff6600) !important;
    border-color: var(--wahive-orange, #ff6600) !important;
}

/* Pagination & tabs */
body.wahive-brand .page-item.active .page-link {
    background-color: var(--wahive-orange, #ff6600) !important;
    border-color: var(--wahive-orange, #ff6600) !important;
}

/* ── Page tabs (unified — overrides legacy green/teal from custom-styles) ── */
body.wahive-brand .nav-tabs:not(.lw-chat-nav-tabs) {
    border-bottom: 1px solid var(--wahive-border, #e5e5e5);
    margin-left: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0;
    padding: 0;
}

body.wahive-brand .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link {
    padding: 0.625rem 1.25rem !important;
    font-size: 0.875rem !important;
    font-weight: 500;
    background-color: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    color: var(--wahive-text-muted, #737373) !important;
    margin-right: 0.25rem;
}

body.wahive-brand .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link:hover {
    color: var(--wahive-text, #0a0a0a) !important;
    background-color: var(--wahive-bg, #f4f4f5) !important;
    border-bottom-color: transparent !important;
}

body.wahive-brand .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link.active {
    background-color: transparent !important;
    color: var(--wahive-orange, #ff6600) !important;
    border: none !important;
    border-bottom: 2px solid var(--wahive-orange, #ff6600) !important;
    font-weight: 600;
}

body.wahive-brand .wahive-tabs-wrapper {
    margin-bottom: 1.5rem;
}

body.wahive-brand .wahive-tabs-wrapper .wahive-page-tabs {
    margin-bottom: 0;
}

body.wahive-brand .wahive-tab-panel {
    background: var(--wahive-surface, #ffffff);
    border: 1px solid var(--wahive-border, #e5e5e5);
    border-top: none;
    border-radius: 0 0 var(--wahive-radius, 12px) var(--wahive-radius, 12px);
    padding: 1rem 1.25rem;
}

body.wahive-brand .wahive-tabs-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
}

body.wahive-brand .wahive-tabs-with-actions {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--wahive-border, #e5e5e5);
    margin-bottom: 0;
}

body.wahive-brand .wahive-tabs-with-actions .nav-tabs {
    border-bottom: none;
    flex: 1 1 auto;
}

body.wahive-brand .wahive-tabs-with-actions .wahive-tabs-toolbar {
    padding-bottom: 0.5rem;
    padding-right: 0.25rem;
}

body.wahive-brand .wahive-tabs-wrapper .wahive-tabs-with-actions {
    border-bottom: none;
}

body.wahive-brand .wahive-tabs-wrapper .wahive-tabs-with-actions + .wahive-tab-panel,
body.wahive-brand .wahive-tabs-wrapper .wahive-page-tabs + .wahive-tab-panel {
    border-top: none;
}

/* Theme tokens — explicit values so light/dark switches fully reset */
html[data-theme="light"] {
    --wahive-text: #0a0a0a;
    --wahive-text-muted: #737373;
    --wahive-border: #e5e5e5;
    --wahive-surface: #ffffff;
    --wahive-bg: #f4f4f5;
    --wahive-orange-light: #fff4eb;
    --wahive-orange-muted: #fff8f2;
    --wahive-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --wahive-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    color-scheme: light;
}

html[data-theme="system_default"] {
    --wahive-text: #0a0a0a;
    --wahive-text-muted: #737373;
    --wahive-border: #e5e5e5;
    --wahive-surface: #ffffff;
    --wahive-bg: #f4f4f5;
    --wahive-orange-light: #fff4eb;
    --wahive-orange-muted: #fff8f2;
    --wahive-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --wahive-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    color-scheme: light dark;
}

/* Dark theme — explicit dark + system dark preference */
html[data-theme="dark"] {
    --wahive-text: #f0f0f0;
    --wahive-text-muted: #a3a3a3;
    --wahive-border: #3a3a42;
    --wahive-surface: #1c1c24;
    --wahive-bg: #141419;
    --wahive-orange-light: rgba(255, 102, 0, 0.18);
    --wahive-orange-muted: rgba(255, 102, 0, 0.14);
    --wahive-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    --wahive-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system_default"] {
        --wahive-text: #f0f0f0;
        --wahive-text-muted: #a3a3a3;
        --wahive-border: #3a3a42;
        --wahive-surface: #1c1c24;
        --wahive-bg: #141419;
        --wahive-orange-light: rgba(255, 102, 0, 0.18);
        --wahive-orange-muted: rgba(255, 102, 0, 0.14);
        --wahive-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
        --wahive-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
        color-scheme: dark;
    }
}

html[data-theme="dark"] body.wahive-brand,
html[data-theme="dark"] body.wahive-brand.lw-authenticated-page,
html[data-theme="dark"] body.wahive-brand.lw-guest-page,
html[data-theme="dark"] body.wahive-ui,
html[data-theme="dark"] body.wahive-ui .main-content {
    background: var(--wahive-bg) !important;
    background-image: none !important;
    color: var(--wahive-text);
}

html[data-theme="dark"] body.wahive-brand #navbar-main,
html[data-theme="dark"] body.wahive-brand .main-content .navbar-top,
html[data-theme="dark"] body.wahive-brand .navbar-horizontal.navbar-top,
html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main.wahive-sidebar,
html[data-theme="dark"] body.wahive-brand.wahive-ui .navbar.lw-sidebar-container,
html[data-theme="dark"] body.wahive-ui #sidenav-main .container-fluid,
html[data-theme="dark"] body.wahive-ui #sidenav-main .navbar-collapse,
html[data-theme="dark"] body.wahive-ui #sidenav-main > .container-fluid > span {
    background: var(--wahive-surface) !important;
    background-color: var(--wahive-surface) !important;
    border-color: var(--wahive-border) !important;
}

html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link,
html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link .fa,
html[data-theme="dark"] body.wahive-ui #sidenav-main .navbar-nav .nav-link,
html[data-theme="dark"] body.wahive-ui #sidenav-main .navbar-nav .nav-link i,
html[data-theme="dark"] body.wahive-ui #navbar-main .nav-link,
html[data-theme="dark"] body.wahive-ui #navbar-main .h4 {
    color: var(--wahive-text-muted) !important;
}

html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link.active,
html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .active > .nav-link {
    background: var(--wahive-orange-muted) !important;
    color: var(--wahive-orange) !important;
}

html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link.active .fa,
html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .active > .nav-link .fa {
    color: var(--wahive-orange) !important;
}

html[data-theme="dark"] body.wahive-ui #sidenav-main .navbar-nav .nav-link:hover:not(.wahive-admin-nav-link) {
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-brand .lw-page-title,
html[data-theme="dark"] body.wahive-brand .wahive-page-heading,
html[data-theme="dark"] body.wahive-ui .wahive-page-header .lw-page-title,
html[data-theme="dark"] body.wahive-ui .wahive-page-header h1,
html[data-theme="dark"] body.wahive-ui .wahive-panel-header h2,
html[data-theme="dark"] body.wahive-ui .wahive-panel-header h3,
html[data-theme="dark"] body.wahive-brand .h1,
html[data-theme="dark"] body.wahive-brand .h2,
html[data-theme="dark"] body.wahive-brand .h3,
html[data-theme="dark"] body.wahive-brand .h4,
html[data-theme="dark"] body.wahive-brand .h5,
html[data-theme="dark"] body.wahive-brand .h6,
html[data-theme="dark"] body.wahive-brand h1,
html[data-theme="dark"] body.wahive-brand h2,
html[data-theme="dark"] body.wahive-brand h3,
html[data-theme="dark"] body.wahive-brand h4,
html[data-theme="dark"] body.wahive-brand h5,
html[data-theme="dark"] body.wahive-brand h6,
html[data-theme="dark"] body.wahive-brand .text-dark {
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-ui .card,
html[data-theme="dark"] body.wahive-brand .card,
html[data-theme="dark"] .wahive-kpi-card,
html[data-theme="dark"] .wahive-setup-card,
html[data-theme="dark"] body.wahive-ui .wahive-panel,
html[data-theme="dark"] body.wahive-brand .card-header,
html[data-theme="dark"] body.wahive-brand fieldset,
html[data-theme="dark"] body.wahive-brand fieldset legend {
    background: var(--wahive-surface) !important;
    background-color: var(--wahive-surface) !important;
    border-color: var(--wahive-border) !important;
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-brand .card-body,
html[data-theme="dark"] body.wahive-brand .card-footer,
html[data-theme="dark"] body.wahive-ui .wahive-panel-body {
    color: var(--wahive-text);
}

html[data-theme="dark"] body.wahive-brand p,
html[data-theme="dark"] body.wahive-brand span:not(.badge):not(.btn),
html[data-theme="dark"] body.wahive-brand label,
html[data-theme="dark"] body.wahive-brand .form-control-label,
html[data-theme="dark"] body.wahive-brand .text-muted,
html[data-theme="dark"] body.wahive-brand .text-secondary,
html[data-theme="dark"] body.wahive-brand .text-black,
html[data-theme="dark"] body.wahive-brand .campaign-text-color {
    color: var(--wahive-text-muted) !important;
}

html[data-theme="dark"] body.wahive-brand .table td,
html[data-theme="dark"] body.wahive-brand .table th,
html[data-theme="dark"] body.wahive-ui .wahive-table td,
html[data-theme="dark"] body.wahive-ui .wahive-table th,
html[data-theme="dark"] body.wahive-brand .dataTables_wrapper,
html[data-theme="dark"] body.wahive-brand .dataTables_info,
html[data-theme="dark"] body.wahive-brand .dataTables_length label,
html[data-theme="dark"] body.wahive-brand .dataTables_filter label {
    color: var(--wahive-text) !important;
    border-color: var(--wahive-border) !important;
}

html[data-theme="dark"] body.wahive-brand .thead-light th,
html[data-theme="dark"] body.wahive-ui .wahive-table th {
    background: #222228 !important;
    color: var(--wahive-text-muted) !important;
}

html[data-theme="dark"] body.wahive-brand .table tbody tr:hover,
html[data-theme="dark"] body.wahive-ui .wahive-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04) !important;
}

html[data-theme="dark"] body.wahive-brand i.fa,
html[data-theme="dark"] body.wahive-brand i.fas,
html[data-theme="dark"] body.wahive-brand i.far,
html[data-theme="dark"] body.wahive-brand i.fab,
html[data-theme="dark"] body.wahive-brand i.ni,
html[data-theme="dark"] body.wahive-brand .btn i {
    color: inherit;
}

html[data-theme="dark"] body.wahive-brand .btn-default,
html[data-theme="dark"] body.wahive-brand .btn-secondary,
html[data-theme="dark"] body.wahive-brand .btn-light {
    background-color: #3a3a42 !important;
    border-color: #4a4a52 !important;
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-brand .form-control,
html[data-theme="dark"] body.wahive-brand .selectize-input,
html[data-theme="dark"] body.wahive-brand .input-group-text {
    background-color: #222228 !important;
    border-color: var(--wahive-border) !important;
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-brand .dropdown-menu,
html[data-theme="dark"] body.wahive-ui #navbar-main .dropdown-menu {
    background-color: var(--wahive-surface) !important;
    border-color: var(--wahive-border) !important;
}

html[data-theme="dark"] body.wahive-brand .dropdown-item {
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-brand .dropdown-item:hover {
    background-color: rgba(255, 102, 0, 0.15) !important;
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-brand .modal-content,
html[data-theme="dark"] body.wahive-brand .modal-body,
html[data-theme="dark"] body.wahive-brand .modal-header,
html[data-theme="dark"] body.wahive-brand .modal-footer {
    background-color: var(--wahive-surface) !important;
    color: var(--wahive-text) !important;
    border-color: var(--wahive-border) !important;
}

html[data-theme="dark"] body.wahive-brand .page-link {
    background-color: #222228 !important;
    border-color: var(--wahive-border) !important;
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-brand.wahive-ui .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link {
    color: var(--wahive-text-muted) !important;
}

html[data-theme="dark"] body.wahive-brand.wahive-ui .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link:hover {
    color: var(--wahive-text) !important;
    background-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] body.wahive-brand.wahive-ui .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link.active {
    color: var(--wahive-orange, #ff6600) !important;
    background-color: transparent !important;
}

html[data-theme="dark"] body.wahive-brand .wahive-tab-panel {
    background: var(--wahive-surface) !important;
    border-color: var(--wahive-border) !important;
    color: var(--wahive-text);
}

html[data-theme="dark"] body.wahive-brand .lw-list-selection-bar {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: var(--wahive-border) !important;
}

html[data-theme="dark"] .lw-template-picker-list {
    background: var(--wahive-surface) !important;
}

html[data-theme="dark"] .lw-template-picker-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .lw-template-select-btn {
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-ui .wahive-kpi-icon--blue {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
}

html[data-theme="dark"] body.wahive-ui .wahive-kpi-icon--amber {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
}

html[data-theme="dark"] body.wahive-ui .wahive-kpi-icon--purple {
    background: rgba(124, 58, 237, 0.2);
    color: #a78bfa;
}

html[data-theme="dark"] body.wahive-ui .wahive-kpi-icon--rose {
    background: rgba(225, 29, 72, 0.2);
    color: #fb7185;
}

html[data-theme="dark"] body.wahive-ui .wahive-badge--muted {
    background: #2a2a32;
    color: var(--wahive-text-muted);
}

html[data-theme="dark"] body.wahive-ui .wahive-setup-item {
    background: #222228;
    border-color: var(--wahive-border);
}

html[data-theme="dark"] body.wahive-ui .wahive-setup-check {
    background: var(--wahive-surface);
    border-color: var(--wahive-border);
}

html[data-theme="dark"] body.wahive-brand .card.lw-subscription-cards .card-header:first-child {
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-brand .list-group-item {
    background-color: var(--wahive-surface) !important;
    border-color: var(--wahive-border) !important;
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-brand #sidenav-main .wahive-nav-section-label,
html[data-theme="dark"] body.wahive-brand #sidenav-main .wahive-nav-subsection-label {
    color: var(--wahive-text-muted) !important;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system_default"] body.wahive-brand {
        background: var(--wahive-bg) !important;
        background-image: none !important;
        color: var(--wahive-text);
    }

    html[data-theme="dark"] body.wahive-brand.lw-authenticated-page,
    html[data-theme="dark"] body.wahive-brand.lw-guest-page,
    html[data-theme="system_default"] body.wahive-brand.lw-authenticated-page,
    html[data-theme="system_default"] body.wahive-brand.lw-guest-page {
        background: var(--wahive-bg) !important;
        background-image: none !important;
    }

    html[data-theme="dark"] body.wahive-ui,
    html[data-theme="dark"] body.wahive-ui .main-content,
    html[data-theme="system_default"] body.wahive-ui,
    html[data-theme="system_default"] body.wahive-ui .main-content {
        background: var(--wahive-bg) !important;
        color: var(--wahive-text);
    }

    html[data-theme="dark"] body.wahive-brand #navbar-main,
    html[data-theme="dark"] body.wahive-brand .main-content .navbar-top,
    html[data-theme="dark"] body.wahive-brand .navbar-horizontal.navbar-top,
    html[data-theme="system_default"] body.wahive-brand #navbar-main,
    html[data-theme="system_default"] body.wahive-brand .main-content .navbar-top,
    html[data-theme="system_default"] body.wahive-brand .navbar-horizontal.navbar-top {
        background: var(--wahive-surface) !important;
        background-color: var(--wahive-surface) !important;
        border-bottom-color: var(--wahive-border) !important;
    }

    html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main.wahive-sidebar,
    html[data-theme="dark"] body.wahive-brand.wahive-ui .navbar.lw-sidebar-container,
    html[data-theme="dark"] body.wahive-ui #sidenav-main .container-fluid,
    html[data-theme="dark"] body.wahive-ui #sidenav-main .navbar-collapse,
    html[data-theme="dark"] body.wahive-ui #sidenav-main > .container-fluid > span,
    html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main.wahive-sidebar,
    html[data-theme="system_default"] body.wahive-brand.wahive-ui .navbar.lw-sidebar-container,
    html[data-theme="system_default"] body.wahive-ui #sidenav-main .container-fluid,
    html[data-theme="system_default"] body.wahive-ui #sidenav-main .navbar-collapse,
    html[data-theme="system_default"] body.wahive-ui #sidenav-main > .container-fluid > span {
        background: var(--wahive-surface) !important;
        background-color: var(--wahive-surface) !important;
        border-color: var(--wahive-border) !important;
    }

    html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link,
    html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link .fa,
    html[data-theme="dark"] body.wahive-ui #sidenav-main .navbar-nav .nav-link,
    html[data-theme="dark"] body.wahive-ui #sidenav-main .navbar-nav .nav-link i,
    html[data-theme="dark"] body.wahive-ui #navbar-main .nav-link,
    html[data-theme="dark"] body.wahive-ui #navbar-main .h4,
    html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link,
    html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link .fa,
    html[data-theme="system_default"] body.wahive-ui #sidenav-main .navbar-nav .nav-link,
    html[data-theme="system_default"] body.wahive-ui #sidenav-main .navbar-nav .nav-link i,
    html[data-theme="system_default"] body.wahive-ui #navbar-main .nav-link,
    html[data-theme="system_default"] body.wahive-ui #navbar-main .h4 {
        color: var(--wahive-text-muted) !important;
    }

    html[data-theme="dark"] body.wahive-ui #sidenav-main .navbar-nav .nav-link:hover:not(.wahive-admin-nav-link),
    html[data-theme="system_default"] body.wahive-ui #sidenav-main .navbar-nav .nav-link:hover:not(.wahive-admin-nav-link) {
        background: rgba(255, 255, 255, 0.06) !important;
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-brand .lw-page-title,
    html[data-theme="dark"] body.wahive-brand .wahive-page-heading,
    html[data-theme="dark"] body.wahive-ui .wahive-page-header .lw-page-title,
    html[data-theme="dark"] body.wahive-ui .wahive-page-header h1,
    html[data-theme="dark"] body.wahive-ui .wahive-panel-header h2,
    html[data-theme="dark"] body.wahive-ui .wahive-panel-header h3,
    html[data-theme="system_default"] body.wahive-brand .lw-page-title,
    html[data-theme="system_default"] body.wahive-brand .wahive-page-heading,
    html[data-theme="system_default"] body.wahive-ui .wahive-page-header .lw-page-title,
    html[data-theme="system_default"] body.wahive-ui .wahive-page-header h1,
    html[data-theme="system_default"] body.wahive-ui .wahive-panel-header h2,
    html[data-theme="system_default"] body.wahive-ui .wahive-panel-header h3 {
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-ui .card,
    html[data-theme="dark"] body.wahive-brand .card,
    html[data-theme="dark"] .wahive-kpi-card,
    html[data-theme="dark"] .wahive-setup-card,
    html[data-theme="dark"] body.wahive-ui .wahive-panel,
    html[data-theme="system_default"] body.wahive-ui .card,
    html[data-theme="system_default"] body.wahive-brand .card,
    html[data-theme="system_default"] .wahive-kpi-card,
    html[data-theme="system_default"] .wahive-setup-card,
    html[data-theme="system_default"] body.wahive-ui .wahive-panel {
        background: var(--wahive-surface) !important;
        border-color: var(--wahive-border) !important;
        color: var(--wahive-text);
    }

    html[data-theme="dark"] body.wahive-brand .card-header,
    html[data-theme="dark"] body.wahive-brand fieldset,
    html[data-theme="dark"] body.wahive-brand fieldset legend,
    html[data-theme="system_default"] body.wahive-brand .card-header,
    html[data-theme="system_default"] body.wahive-brand fieldset,
    html[data-theme="system_default"] body.wahive-brand fieldset legend {
        background-color: var(--wahive-surface) !important;
        border-color: var(--wahive-border) !important;
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-brand .card-body,
    html[data-theme="dark"] body.wahive-brand .card-footer,
    html[data-theme="dark"] body.wahive-ui .wahive-panel-body,
    html[data-theme="system_default"] body.wahive-brand .card-body,
    html[data-theme="system_default"] body.wahive-brand .card-footer,
    html[data-theme="system_default"] body.wahive-ui .wahive-panel-body {
        color: var(--wahive-text);
    }

    html[data-theme="dark"] body.wahive-brand p,
    html[data-theme="dark"] body.wahive-brand span:not(.badge):not(.btn),
    html[data-theme="dark"] body.wahive-brand label,
    html[data-theme="dark"] body.wahive-brand .form-control-label,
    html[data-theme="dark"] body.wahive-brand .text-muted,
    html[data-theme="dark"] body.wahive-brand .text-secondary,
    html[data-theme="dark"] body.wahive-brand .text-black,
    html[data-theme="dark"] body.wahive-brand .campaign-text-color,
    html[data-theme="system_default"] body.wahive-brand p,
    html[data-theme="system_default"] body.wahive-brand span:not(.badge):not(.btn),
    html[data-theme="system_default"] body.wahive-brand label,
    html[data-theme="system_default"] body.wahive-brand .form-control-label,
    html[data-theme="system_default"] body.wahive-brand .text-muted,
    html[data-theme="system_default"] body.wahive-brand .text-secondary,
    html[data-theme="system_default"] body.wahive-brand .text-black,
    html[data-theme="system_default"] body.wahive-brand .campaign-text-color {
        color: var(--wahive-text-muted) !important;
    }

    html[data-theme="dark"] body.wahive-brand .h1,
    html[data-theme="dark"] body.wahive-brand .h2,
    html[data-theme="dark"] body.wahive-brand .h3,
    html[data-theme="dark"] body.wahive-brand .h4,
    html[data-theme="dark"] body.wahive-brand .h5,
    html[data-theme="dark"] body.wahive-brand .h6,
    html[data-theme="dark"] body.wahive-brand h1,
    html[data-theme="dark"] body.wahive-brand h2,
    html[data-theme="dark"] body.wahive-brand h3,
    html[data-theme="dark"] body.wahive-brand h4,
    html[data-theme="dark"] body.wahive-brand h5,
    html[data-theme="dark"] body.wahive-brand h6,
    html[data-theme="dark"] body.wahive-brand .text-dark,
    html[data-theme="system_default"] body.wahive-brand .h1,
    html[data-theme="system_default"] body.wahive-brand .h2,
    html[data-theme="system_default"] body.wahive-brand .h3,
    html[data-theme="system_default"] body.wahive-brand .h4,
    html[data-theme="system_default"] body.wahive-brand .h5,
    html[data-theme="system_default"] body.wahive-brand .h6,
    html[data-theme="system_default"] body.wahive-brand h1,
    html[data-theme="system_default"] body.wahive-brand h2,
    html[data-theme="system_default"] body.wahive-brand h3,
    html[data-theme="system_default"] body.wahive-brand h4,
    html[data-theme="system_default"] body.wahive-brand h5,
    html[data-theme="system_default"] body.wahive-brand h6,
    html[data-theme="system_default"] body.wahive-brand .text-dark {
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-brand .table td,
    html[data-theme="dark"] body.wahive-brand .table th,
    html[data-theme="dark"] body.wahive-ui .wahive-table td,
    html[data-theme="dark"] body.wahive-ui .wahive-table th,
    html[data-theme="dark"] body.wahive-brand .dataTables_wrapper,
    html[data-theme="dark"] body.wahive-brand .dataTables_info,
    html[data-theme="dark"] body.wahive-brand .dataTables_length label,
    html[data-theme="dark"] body.wahive-brand .dataTables_filter label,
    html[data-theme="system_default"] body.wahive-brand .table td,
    html[data-theme="system_default"] body.wahive-brand .table th,
    html[data-theme="system_default"] body.wahive-ui .wahive-table td,
    html[data-theme="system_default"] body.wahive-ui .wahive-table th,
    html[data-theme="system_default"] body.wahive-brand .dataTables_wrapper,
    html[data-theme="system_default"] body.wahive-brand .dataTables_info,
    html[data-theme="system_default"] body.wahive-brand .dataTables_length label,
    html[data-theme="system_default"] body.wahive-brand .dataTables_filter label {
        color: var(--wahive-text) !important;
        border-color: var(--wahive-border) !important;
    }

    html[data-theme="dark"] body.wahive-brand .thead-light th,
    html[data-theme="dark"] body.wahive-ui .wahive-table th,
    html[data-theme="system_default"] body.wahive-brand .thead-light th,
    html[data-theme="system_default"] body.wahive-ui .wahive-table th {
        background: #222228 !important;
        color: var(--wahive-text-muted) !important;
    }

    html[data-theme="dark"] body.wahive-brand .table tbody tr:hover,
    html[data-theme="dark"] body.wahive-ui .wahive-table tbody tr:hover,
    html[data-theme="system_default"] body.wahive-brand .table tbody tr:hover,
    html[data-theme="system_default"] body.wahive-ui .wahive-table tbody tr:hover {
        background: rgba(255, 255, 255, 0.04) !important;
    }

    html[data-theme="dark"] body.wahive-brand i.fa,
    html[data-theme="dark"] body.wahive-brand i.fas,
    html[data-theme="dark"] body.wahive-brand i.far,
    html[data-theme="dark"] body.wahive-brand i.fab,
    html[data-theme="dark"] body.wahive-brand i.ni,
    html[data-theme="dark"] body.wahive-brand .btn i,
    html[data-theme="system_default"] body.wahive-brand i.fa,
    html[data-theme="system_default"] body.wahive-brand i.fas,
    html[data-theme="system_default"] body.wahive-brand i.far,
    html[data-theme="system_default"] body.wahive-brand i.fab,
    html[data-theme="system_default"] body.wahive-brand i.ni,
    html[data-theme="system_default"] body.wahive-brand .btn i {
        color: inherit;
    }

    html[data-theme="dark"] body.wahive-brand .btn-default,
    html[data-theme="dark"] body.wahive-brand .btn-secondary,
    html[data-theme="dark"] body.wahive-brand .btn-light,
    html[data-theme="system_default"] body.wahive-brand .btn-default,
    html[data-theme="system_default"] body.wahive-brand .btn-secondary,
    html[data-theme="system_default"] body.wahive-brand .btn-light {
        background-color: #3a3a42 !important;
        border-color: #4a4a52 !important;
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-brand .form-control,
    html[data-theme="dark"] body.wahive-brand .selectize-input,
    html[data-theme="dark"] body.wahive-brand .input-group-text,
    html[data-theme="system_default"] body.wahive-brand .form-control,
    html[data-theme="system_default"] body.wahive-brand .selectize-input,
    html[data-theme="system_default"] body.wahive-brand .input-group-text {
        background-color: #222228 !important;
        border-color: var(--wahive-border) !important;
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-brand .dropdown-menu,
    html[data-theme="dark"] body.wahive-ui #navbar-main .dropdown-menu,
    html[data-theme="system_default"] body.wahive-brand .dropdown-menu,
    html[data-theme="system_default"] body.wahive-ui #navbar-main .dropdown-menu {
        background-color: var(--wahive-surface) !important;
        border-color: var(--wahive-border) !important;
    }

    html[data-theme="dark"] body.wahive-brand .dropdown-item,
    html[data-theme="system_default"] body.wahive-brand .dropdown-item {
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-brand .dropdown-item:hover,
    html[data-theme="system_default"] body.wahive-brand .dropdown-item:hover {
        background-color: rgba(255, 102, 0, 0.15) !important;
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-brand .modal-content,
    html[data-theme="dark"] body.wahive-brand .modal-body,
    html[data-theme="dark"] body.wahive-brand .modal-header,
    html[data-theme="dark"] body.wahive-brand .modal-footer,
    html[data-theme="system_default"] body.wahive-brand .modal-content,
    html[data-theme="system_default"] body.wahive-brand .modal-body,
    html[data-theme="system_default"] body.wahive-brand .modal-header,
    html[data-theme="system_default"] body.wahive-brand .modal-footer {
        background-color: var(--wahive-surface) !important;
        color: var(--wahive-text) !important;
        border-color: var(--wahive-border) !important;
    }

    html[data-theme="dark"] body.wahive-brand .page-link,
    html[data-theme="system_default"] body.wahive-brand .page-link {
        background-color: #222228 !important;
        border-color: var(--wahive-border) !important;
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-brand.wahive-ui .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link,
    html[data-theme="system_default"] body.wahive-brand.wahive-ui .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link {
        color: var(--wahive-text-muted) !important;
    }

    html[data-theme="dark"] body.wahive-brand.wahive-ui .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link:hover,
    html[data-theme="system_default"] body.wahive-brand.wahive-ui .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link:hover {
        color: var(--wahive-text) !important;
        background-color: rgba(255, 255, 255, 0.06) !important;
    }

    html[data-theme="dark"] body.wahive-brand.wahive-ui .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link.active,
    html[data-theme="system_default"] body.wahive-brand.wahive-ui .nav-tabs:not(.lw-chat-nav-tabs) .nav-item .nav-link.active {
        color: var(--wahive-orange, #ff6600) !important;
        background-color: transparent !important;
    }

    html[data-theme="dark"] body.wahive-brand .wahive-tab-panel,
    html[data-theme="system_default"] body.wahive-brand .wahive-tab-panel {
        background: var(--wahive-surface) !important;
        border-color: var(--wahive-border) !important;
        color: var(--wahive-text);
    }

    html[data-theme="dark"] body.wahive-brand .lw-list-selection-bar,
    html[data-theme="system_default"] body.wahive-brand .lw-list-selection-bar {
        background: rgba(255, 255, 255, 0.04) !important;
        border-color: var(--wahive-border) !important;
    }

    html[data-theme="dark"] .lw-template-picker-list,
    html[data-theme="system_default"] .lw-template-picker-list {
        background: var(--wahive-surface) !important;
    }

    html[data-theme="dark"] .lw-template-picker-item:hover,
    html[data-theme="system_default"] .lw-template-picker-item:hover {
        background: rgba(255, 255, 255, 0.06) !important;
    }

    html[data-theme="dark"] .lw-template-select-btn,
    html[data-theme="system_default"] .lw-template-select-btn {
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-ui .wahive-kpi-icon--blue,
    html[data-theme="system_default"] body.wahive-ui .wahive-kpi-icon--blue {
        background: rgba(37, 99, 235, 0.2);
        color: #60a5fa;
    }

    html[data-theme="dark"] body.wahive-ui .wahive-kpi-icon--amber,
    html[data-theme="system_default"] body.wahive-ui .wahive-kpi-icon--amber {
        background: rgba(217, 119, 6, 0.2);
        color: #fbbf24;
    }

    html[data-theme="dark"] body.wahive-ui .wahive-kpi-icon--purple,
    html[data-theme="system_default"] body.wahive-ui .wahive-kpi-icon--purple {
        background: rgba(124, 58, 237, 0.2);
        color: #a78bfa;
    }

    html[data-theme="dark"] body.wahive-ui .wahive-kpi-icon--rose,
    html[data-theme="system_default"] body.wahive-ui .wahive-kpi-icon--rose {
        background: rgba(225, 29, 72, 0.2);
        color: #fb7185;
    }

    html[data-theme="dark"] body.wahive-ui .wahive-badge--muted,
    html[data-theme="system_default"] body.wahive-ui .wahive-badge--muted {
        background: #2a2a32;
        color: var(--wahive-text-muted);
    }

    html[data-theme="dark"] body.wahive-ui .wahive-setup-item,
    html[data-theme="system_default"] body.wahive-ui .wahive-setup-item {
        background: #222228;
        border-color: var(--wahive-border);
    }

    html[data-theme="dark"] body.wahive-ui .wahive-setup-check,
    html[data-theme="system_default"] body.wahive-ui .wahive-setup-check {
        background: var(--wahive-surface);
        border-color: var(--wahive-border);
    }

    html[data-theme="dark"] body.wahive-brand .card.lw-subscription-cards .card-header:first-child,
    html[data-theme="system_default"] body.wahive-brand .card.lw-subscription-cards .card-header:first-child {
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-brand .list-group-item,
    html[data-theme="system_default"] body.wahive-brand .list-group-item {
        background-color: var(--wahive-surface) !important;
        border-color: var(--wahive-border) !important;
        color: var(--wahive-text) !important;
    }

    html[data-theme="dark"] body.wahive-brand #sidenav-main .wahive-nav-section-label,
    html[data-theme="dark"] body.wahive-brand #sidenav-main .wahive-nav-subsection-label,
    html[data-theme="system_default"] body.wahive-brand #sidenav-main .wahive-nav-section-label,
    html[data-theme="system_default"] body.wahive-brand #sidenav-main .wahive-nav-subsection-label {
        color: var(--wahive-text-muted) !important;
    }
}

/* Tables */
body.wahive-brand table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
body.wahive-brand table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    background-color: var(--wahive-orange, #ff6600) !important;
}

/* Dropdowns & alerts */
body.wahive-brand .dropdown-item.active,
body.wahive-brand .dropdown-item:active {
    background-color: var(--wahive-orange, #ff6600) !important;
}

/* Theme mode dropdown — override custom primary teal on hover/active */
body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option {
    color: var(--wahive-text, #334155) !important;
    background-color: transparent !important;
}

body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option::before {
    background-color: transparent !important;
}

body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option:hover,
body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option:focus {
    background-color: var(--wahive-brand-subtle, #fff8f2) !important;
    color: var(--wahive-brand, #ff6600) !important;
}

body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option.active,
body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option.active:hover,
body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option.active:focus,
body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option.active:active {
    background-color: var(--wahive-brand, #ff6600) !important;
    border-color: var(--wahive-brand, #ff6600) !important;
    color: #fff !important;
}

body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option.active i,
body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option.active .text-yellow {
    color: #fff !important;
}

html[data-theme="dark"] body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option {
    color: var(--wahive-text) !important;
}

html[data-theme="dark"] body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option:hover,
html[data-theme="dark"] body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option:focus {
    background-color: rgba(255, 102, 0, 0.15) !important;
    color: var(--wahive-brand, #ff6600) !important;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system_default"] body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option {
        color: var(--wahive-text) !important;
    }

    html[data-theme="system_default"] body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option:hover,
    html[data-theme="system_default"] body.wahive-brand .wahive-theme-dropdown-menu .dropdown-item.lw-theme-mode-option:focus {
        background-color: rgba(255, 102, 0, 0.15) !important;
        color: var(--wahive-brand, #ff6600) !important;
    }
}

body.wahive-brand div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm {
    background-color: var(--wahive-orange, #ff6600) !important;
}

body.wahive-brand .alert-success {
    background: var(--wahive-brand-subtle, #fff8f2) !important;
    border-color: #ffd6b3 !important;
    color: var(--wahive-brand-hover, #e55a00) !important;
}

body.wahive-brand .bg-success {
    background-color: var(--wahive-brand, #ff6600) !important;
}

body.wahive-brand div:where(.swal2-icon).swal2-success {
    border-color: var(--wahive-brand, #ff6600) !important;
    color: var(--wahive-brand, #ff6600) !important;
}

body.wahive-brand div:where(.swal2-icon).swal2-success [class^='swal2-success-line'] {
    background-color: var(--wahive-brand, #ff6600) !important;
}

body.wahive-brand div:where(.swal2-icon).swal2-success .swal2-success-ring {
    border-color: rgba(255, 102, 0, 0.3) !important;
}

body.wahive-brand .noty_type__success {
    background-color: var(--wahive-brand, #ff6600) !important;
    border-color: var(--wahive-brand-hover, #e55a00) !important;
}

/* Badges */
body.wahive-brand .badge-success,
body.wahive-brand .badge-primary {
    background-color: var(--wahive-orange, #ff6600) !important;
}

/* Guest navbar — light / system default only */
html[data-theme="light"] body.wahive-brand .navbar-horizontal.navbar-top,
html[data-theme="system_default"] body.wahive-brand .navbar-horizontal.navbar-top {
    background: #fff !important;
    border-bottom: 1px solid var(--wahive-border, #e5e5e5);
    box-shadow: none !important;
}

html[data-theme="light"] body.wahive-brand .navbar-horizontal .navbar-nav .nav-link,
html[data-theme="system_default"] body.wahive-brand .navbar-horizontal .navbar-nav .nav-link {
    color: var(--wahive-text-muted, #6b7280) !important;
    font-weight: 500;
}

html[data-theme="light"] body.wahive-brand .navbar-horizontal .navbar-nav .nav-link:hover,
html[data-theme="light"] body.wahive-brand .navbar-horizontal .navbar-nav .nav-link-inner--text.text-danger,
html[data-theme="system_default"] body.wahive-brand .navbar-horizontal .navbar-nav .nav-link:hover,
html[data-theme="system_default"] body.wahive-brand .navbar-horizontal .navbar-nav .nav-link-inner--text.text-danger {
    color: var(--wahive-orange, #ff6600) !important;
}

body.wahive-brand .wahive-guest-brand .wahive-brand-logo {
    max-height: 56px;
}

/* Cards & modals */
body.wahive-brand .card {
    border-radius: 14px !important;
}

body.wahive-brand .card-header {
    border-radius: 14px 14px 0 0 !important;
}

body.wahive-brand fieldset legend {
    border-radius: 10px !important;
}

/* Sidebar — light / system default only (dark overrides below) */
html[data-theme="light"] body.wahive-brand.wahive-ui #sidenav-main.wahive-sidebar,
html[data-theme="light"] body.wahive-brand.wahive-ui .navbar.lw-sidebar-container,
html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main.wahive-sidebar,
html[data-theme="system_default"] body.wahive-brand.wahive-ui .navbar.lw-sidebar-container {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

html[data-theme="light"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link,
html[data-theme="light"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link .fa,
html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link,
html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link .fa {
    color: var(--wahive-text-muted, #6b7280) !important;
}

html[data-theme="light"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link.active,
html[data-theme="light"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .active > .nav-link,
html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link.active,
html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .active > .nav-link {
    background: var(--wahive-orange-muted, #fff8f2) !important;
    color: var(--wahive-orange, #ff6600) !important;
}

html[data-theme="light"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link.active .fa,
html[data-theme="light"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .active > .nav-link .fa,
html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .nav-link.active .fa,
html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main .navbar-nav .active > .nav-link .fa {
    color: var(--wahive-orange, #ff6600) !important;
}

/* Chat accent colors */
body.wahive-brand .card.lw-whatsapp-chat-block-container .lw-whatsapp-chat-window .conversation-compose .send .circle {
    background-color: var(--wahive-orange, #ff6600) !important;
    border-color: var(--wahive-orange-hover, #e55a00) !important;
}

body.wahive-brand .badge-success.rounded-pill {
    background-color: var(--wahive-orange, #ff6600) !important;
}

/* Progress */
body.wahive-brand .progress-bar {
    background-color: var(--wahive-orange, #ff6600) !important;
}

/* Minimized sidebar active indicator */
body.wahive-brand.lw-minimized-menu .navbar-vertical.navbar-expand-md .navbar-nav .nav-link.active:before {
    border-left-color: var(--wahive-orange, #ff6600) !important;
}

/* Campaign template picker */
html[data-theme="light"] .lw-template-picker-list,
html[data-theme="system_default"] .lw-template-picker-list {
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
}

.lw-template-picker-item:last-child {
    border-bottom: none !important;
}

html[data-theme="light"] .lw-template-picker-item:hover,
html[data-theme="system_default"] .lw-template-picker-item:hover {
    background: #f8f9fa;
}

html[data-theme="light"] .lw-template-select-btn,
html[data-theme="system_default"] .lw-template-select-btn {
    color: #32325d;
    font-weight: 500;
    text-decoration: none;
    white-space: normal;
}

html[data-theme="light"] .lw-template-select-btn:hover,
html[data-theme="system_default"] .lw-template-select-btn:hover {
    color: var(--wahive-orange, #ff6600);
    text-decoration: none;
}

/* Dark shell overrides (explicit dark always; system follows OS in media query below) */
html[data-theme="dark"] body.wahive-brand .navbar-horizontal.navbar-top,
html[data-theme="dark"] body.wahive-brand.wahive-ui #sidenav-main.wahive-sidebar,
html[data-theme="dark"] body.wahive-brand.wahive-ui .navbar.lw-sidebar-container,
html[data-theme="dark"] body.wahive-brand #navbar-main,
html[data-theme="dark"] body.wahive-brand .main-content .navbar-top {
    background: var(--wahive-surface) !important;
    background-color: var(--wahive-surface) !important;
    border-color: var(--wahive-border) !important;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system_default"] body.wahive-brand .navbar-horizontal.navbar-top,
    html[data-theme="system_default"] body.wahive-brand.wahive-ui #sidenav-main.wahive-sidebar,
    html[data-theme="system_default"] body.wahive-brand.wahive-ui .navbar.lw-sidebar-container,
    html[data-theme="system_default"] body.wahive-brand #navbar-main,
    html[data-theme="system_default"] body.wahive-brand .main-content .navbar-top {
        background: var(--wahive-surface) !important;
        background-color: var(--wahive-surface) !important;
        border-color: var(--wahive-border) !important;
    }
}

/* Alert URL / helper text readability */
body.wahive-brand .alert code {
    color: inherit !important;
    word-break: break-all;
    background-color: rgba(0, 0, 0, 0.06);
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
}

body.wahive-brand .alert .text-muted,
body.wahive-brand .alert small.text-muted {
    color: inherit !important;
    opacity: 0.85;
}

html[data-theme="dark"] body.wahive-brand .alert code {
    background-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] body.wahive-brand .alert-info {
    color: #b8e8f0 !important;
    background-color: rgba(17, 205, 239, 0.15) !important;
    border-color: rgba(17, 205, 239, 0.35) !important;
}

html[data-theme="dark"] body.wahive-brand .alert-info code {
    background-color: rgba(0, 0, 0, 0.25);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system_default"] body.wahive-brand .alert code {
        background-color: rgba(255, 255, 255, 0.08);
    }

    html[data-theme="system_default"] body.wahive-brand .alert-info {
        color: #b8e8f0 !important;
        background-color: rgba(17, 205, 239, 0.15) !important;
        border-color: rgba(17, 205, 239, 0.35) !important;
    }

    html[data-theme="system_default"] body.wahive-brand .alert-info code {
        background-color: rgba(0, 0, 0, 0.25);
    }
}

/* Dashboard widgets */
.wahive-dash-widgets {
    margin-top: 0.5rem;
}

.wahive-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.875rem;
}

.wahive-quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 0.75rem;
    border: 1px solid var(--wahive-border);
    border-radius: 10px;
    background: var(--wahive-bg);
    text-decoration: none;
    color: var(--wahive-text);
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.wahive-quick-action:hover {
    background: var(--wahive-orange-muted);
    border-color: #ffd6b3;
    color: var(--wahive-text);
    text-decoration: none;
    transform: translateY(-1px);
}

.wahive-quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.wahive-quick-action-label {
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.wahive-usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.wahive-usage-item {
    padding: 1rem;
    border: 1px solid var(--wahive-border);
    border-radius: 10px;
    background: var(--wahive-bg);
}

.wahive-usage-item--warning {
    border-color: #fbbf24;
    background: #fffbeb;
}

.wahive-usage-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.wahive-usage-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wahive-text);
}

.wahive-usage-value {
    font-size: 0.8125rem;
    color: var(--wahive-text-muted);
    white-space: nowrap;
}

.wahive-usage-item .wahive-setup-progress {
    margin-bottom: 0;
}
