/* ── Portal Theme Design System (Insight: dark sidebar + light canvas) ── */
:root {
    /* Light content canvas */
    --pbi-bg: #f4f7fa;
    --pbi-canvas: #ffffff;
    --pbi-surface: #eef3f9;
    --pbi-text: #122033;
    --pbi-text-secondary: #5d6f86;
    --pbi-border: #d4deea;
    --pbi-border-light: rgba(18, 32, 51, 0.08);
    --pbi-header-bg: #ffffff;
    /* Dark navy sidebar */
    --pbi-menu-bg: linear-gradient(180deg, #101a2b 0%, #0b1422 100%);
    --pbi-menu-text: #b6c3d6;
    --pbi-menu-text-strong: #ffffff;
    --pbi-menu-border: rgba(255, 255, 255, 0.08);
    --pbi-menu-hover: rgba(59, 130, 246, 0.16);
    --bx-menu-width: 280px;

    /* Brand / accent — solid blue */
    --pbi-teal: #3b82f6;
    --pbi-teal-soft: rgba(59, 130, 246, 0.14);
    --pbi-teal-strong: #2563eb;
    --pbi-navy: #1d4ed8;
    --pbi-orange: #fb923c;
    --pbi-grey: #7b8798;
    --pbi-yellow: #f4c430;
    --pbi-green: #22c55e;
    --pbi-red: #f04343;

    --pbi-hover: #e8eef7;
    --pbi-selected: rgba(59, 130, 246, 0.14);
    --pbi-radius: 12px;
    --pbi-radius-sm: 8px;
    --pbi-space: 24px;
    --pbi-shadow: 0 10px 28px rgba(18, 32, 51, 0.08);
    --pbi-page-glow: rgba(59, 130, 246, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Segoe UI', sans-serif;
}

.page__toolbar {
    display: none !important;
}

.page__workarea {
    padding-top: 20px;
}

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    font-size: 13px;
    background: var(--pbi-bg);
    color: var(--pbi-text);
    padding: 0;
}

a {
    color: var(--pbi-teal);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--pbi-teal);
    text-decoration: underline;
}

/* Ensure links in tables always use the brand teal color and are uppercase */
.bx-table a,
.bx-table tbody td a {
    color: var(--pbi-teal) !important;
    text-decoration: none !important;
    text-transform: uppercase !important;
}

.bx-table a:hover,
.bx-table tbody td a:hover {
    text-decoration: underline !important;
}

/* ── Page wrapper ── */
.bx-page {
    background:
        radial-gradient(ellipse 70% 40% at 100% 0%, var(--pbi-page-glow), transparent 55%),
        var(--pbi-bg);
    min-height: 100vh;
    padding: var(--pbi-space);
    position: relative;
}

#bx-filter-form {
    position: relative;
    z-index: 30;
}

.bx-ms-wrap:has(.bx-ms-dropdown.open) {
    z-index: 31;
}

.settings-icon-btn {
    display: none !important;
}

.settings-icon-btn svg path:first-child {
    fill: var(--pbi-text-secondary);
}

.settings-icon-btn:hover svg path:first-child {
    fill: var(--pbi-teal);
}

@media (max-width: 767px) {
    .settings-icon-btn {
        top: 12px;
        right: 15px;
    }
}

.bx-title {
    font-size: 20px;
    font-weight: 700;
    color: #122033;
    margin: 0;
    line-height: 1.25;
    font-family: 'Inter', 'Roboto', 'Segoe UI', sans-serif;
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.bx-title::before {
    display: none !important;
}

.bx-title .hr-kpi-crumb-sep,
.bx-title .hr-kpi-crumb-current {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.bx-title .hr-kpi-crumb-sep {
    color: #7d8590;
    font-weight: 500;
}

.bx-title .hr-kpi-crumb-current {
    font-weight: 700;
    color: #122033;
}

.bx-title.is-kpi::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300AEEF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 14l4-4'/><path d='M3.34 19a10 10 0 1 1 17.32 0'/></svg>");
}

.bx-title.is-services::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300AEEF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z'/><path d='m22 12.57-8.58 3.91a2 2 0 0 1-1.66 0L2.6 12.57'/><path d='m22 17.57-8.58 3.91a2 2 0 0 1-1.66 0L2.6 17.57'/></svg>");
}

.bx-title.is-dashboard::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300AEEF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='7' height='9'></rect><rect x='14' y='3' width='7' height='5'></rect><rect x='14' y='12' width='7' height='9'></rect><rect x='3' y='16' width='7' height='5'></rect></svg>");
}

.bx-title.is-partners::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300AEEF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'></path><circle cx='9' cy='7' r='4'></circle><path d='M23 21v-2a4 4 0 0 0-3-3.87'></path><path d='M16 3.13a4 4 0 0 1 0 7.75'></path></svg>");
}

.bx-title.is-companies::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300AEEF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 21h18'></path><path d='M5 21V7l8-4v18'></path><path d='M19 21V11l-6-4'></path><path d='M9 9v.01'></path><path d='M9 12v.01'></path><path d='M9 15v.01'></path><path d='M9 18v.01'></path></svg>");
}

.bx-title.is-history::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300AEEF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 3v5h5'></path><path d='M3.05 13A9 9 0 1 0 6 5.3L3 8'></path><path d='M12 7v5l4 2'></path></svg>");
}

.bx-title.is-profile::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300AEEF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'></path><circle cx='12' cy='7' r='4'></circle></svg>");
}

.portal-impersonation-alarm {
    position: fixed;
    bottom: 0;
    left: var(--bx-menu-width, 280px);
    right: 0;
    width: auto;
    z-index: 10060;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    min-height: 56px;
    padding: 12px 18px;
    color: #fff7ed;
    background: linear-gradient(90deg, #b45309 0%, #dc2626 45%, #b45309 100%);
    background-size: 200% 100%;
    border-top: 2px solid rgba(255, 237, 213, 0.55);
    box-shadow: 0 -10px 28px rgba(220, 38, 38, 0.35);
    animation: portal-impersonation-alarm-bg 2.4s ease-in-out infinite, portal-impersonation-alarm-in 0.45s ease-out both;
    overflow: hidden;
}

.portal-impersonation-alarm__pulse {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.22) 50%, transparent 80%);
    transform: translateX(-120%);
    animation: portal-impersonation-alarm-shine 2.2s linear infinite;
    pointer-events: none;
}

.portal-impersonation-alarm__icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.22);
    color: #fff7ed;
    animation: portal-impersonation-alarm-blink 1s ease-in-out infinite;
    flex-shrink: 0;
}

.portal-impersonation-alarm__text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 220px;
}

.portal-impersonation-alarm__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.92;
}

.portal-impersonation-alarm__who {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.portal-impersonation-alarm__email {
    font-weight: 600;
    opacity: 0.9;
}

.portal-impersonation-alarm__action {
    position: relative;
    z-index: 1;
    margin-left: auto;
}

.portal-impersonation-alarm__btn {
    border: 1px solid rgba(255, 247, 237, 0.55);
    background: rgba(0, 0, 0, 0.28);
    color: #fff7ed;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.portal-impersonation-alarm__btn:hover {
    background: rgba(0, 0, 0, 0.42);
    transform: translateY(-1px);
}

body.has-impersonation-alarm .bx-page,
body.has-impersonation-alarm .bx-page.has-impersonation-alarm {
    padding-bottom: 84px !important;
}

@keyframes portal-impersonation-alarm-bg {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes portal-impersonation-alarm-shine {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

@keyframes portal-impersonation-alarm-blink {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 247, 237, 0.45); }
    50% { transform: scale(1.08); box-shadow: 0 0 0 10px rgba(255, 247, 237, 0); }
}

@keyframes portal-impersonation-alarm-in {
    from { transform: translateY(110%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 1000px) {
    .portal-impersonation-alarm {
        left: 0;
    }
}

.portal-logout-confirm {
    z-index: 10070;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    background: rgba(0, 0, 0, 0.62) !important;
}

.portal-logout-confirm__dialog {
    max-width: 420px !important;
    margin-top: 0 !important;
    border-radius: 14px !important;
}

.portal-logout-confirm__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.bx-title-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 4px 0 8px !important;
    gap: 12px 24px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    transition: none;
    position: relative;
    z-index: 100;
}

.bx-title-meta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
    margin-left: auto;
}

.bx-title-updated {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-height: 36px;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(34, 160, 107, 0.12);
    color: #2d7a4d;
    line-height: 1.15;
    text-align: center;
}

.bx-title-updated__label,
.bx-title-updated__time {
    font-size: 12px;
    font-weight: 600;
    color: inherit;
}

body.light-theme .bx-title {
    color: #122033 !important;
}

body.light-theme .bx-title-wrap {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Header Actions / Controls */
.bx-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--pbi-text, #f3f4f6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.bx-header-btn svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.bx-header-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.bx-header-btn:hover svg {
    transform: rotate(15deg);
}

.bx-header-btn:active {
    transform: scale(0.97);
}

.bx-header-btn.bx-header-btn-icon {
    width: 38px;
    padding: 0;
}

body.light-theme .bx-header-btn {
    background: #ffffff;
    color: var(--pbi-text, #252423);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .bx-header-btn:hover {
    background: var(--pbi-surface);
    color: #000000;
    border-color: rgba(0, 0, 0, 0.18);
}

.bx-title-wrap .bx-dashboard-metrics {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 0;
    flex: 1;
    width: 100%;
    justify-content: flex-start;
}

.bx-title-wrap .bx-metric-card {
    padding: 8px 16px;
    flex: 1;
    min-width: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}


.bx-title-wrap .bx-metric-card.blue .bx-metric-icon { color: var(--pbi-teal); }
.bx-title-wrap .bx-metric-card.red .bx-metric-icon { color: var(--pbi-red); }
.bx-title-wrap .bx-metric-card.green .bx-metric-icon { color: var(--pbi-green); }

.bx-title-wrap .bx-metric-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.light-theme .bx-title-wrap .bx-metric-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

body.light-theme .bx-title-wrap .bx-metric-card:hover {
    background: #fdfdfd !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06) !important;
}

.bx-title-wrap .bx-metric-icon svg {
    width: 18px;
    height: 18px;
}

.bx-title-wrap .bx-metric-info {
    display: flex;
    flex-direction: column;
}

.bx-title-wrap .bx-metric-label {
    font-size: 10px;
    margin-bottom: 0;
}

.bx-title-wrap .bx-metric-value {
    font-size: 14px;
    font-weight: 600;
}

.bx-title-wrap .bx-metric-unit {
    font-size: 11px;
}

.bx-title-period {
    font-size: 12px;
    font-weight: 500;
    color: var(--pbi-teal);
    background: rgba(31, 182, 255, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(31, 182, 255, 0.25);
    transition: all 0.2s ease;
}

.bx-title-period svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Menu (Infoexpert Header Style) ── */
.bx-sticky-container {
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: -20px -20px 20px -20px;
    padding: 20px 20px 0 20px;
    background: var(--pbi-bg);
}

/* Legacy top-nav shell — overridden by the fixed sidebar block below */
.bx-menu {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--pbi-canvas);
    border-bottom: 1px solid var(--pbi-border);
    margin-bottom: 20px;
    padding: 0;
    height: auto;
    box-shadow: none;
}

.bx-menu-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    margin-right: 20px;
    transition: opacity 0.2s ease;
}

.bx-menu-logo:hover {
    opacity: 0.85;
}

.bx-menu-item {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    color: var(--pbi-teal-strong);
    /* Infoexpert Sapphire Blue */
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 0px;
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    position: relative;
    transition: color 0.3s ease, border-color 0.3s ease;
    letter-spacing: 0.5px;
}

.bx-menu-item:hover {
    color: var(--pbi-teal);
    /* Infoexpert Cadet Blue */
    background: transparent;
}

.bx-menu-item.active {
    color: var(--pbi-teal-strong);
    font-weight: 500;
    border-bottom-color: var(--pbi-teal-strong);
    background: transparent;
}

/* ── Menu Dropdown (Hover) ── */
.bx-menu-item-container {
    position: relative;
    height: 100%;
}

.bx-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--pbi-surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    padding: 8px 0;
    z-index: 100;
}

.bx-menu-item-container:hover .bx-menu-dropdown {
    display: flex;
    flex-direction: column;
}

.bx-menu-dropdown-item {
    padding: 5px 20px;
    display: flex;
    align-items: center;
    color: var(--pbi-teal-strong);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    font-family: 'Roboto', 'Segoe UI', sans-serif;
}

.bx-menu-dropdown-item:hover {
    background: var(--pbi-surface);
    color: var(--pbi-teal);
}

/* ── Submenu (Infoexpert Style) ── */
.bx-submenu {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: -20px;
    /* counteract the margin-bottom of bx-menu */
    margin-bottom: 20px;
    padding: 0 30px;
    height: 45px;
    background: var(--pbi-surface);
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

/* Beautiful thin scrollbar for the submenu */
.bx-submenu::-webkit-scrollbar {
    height: 4px;
}

.bx-submenu::-webkit-scrollbar-track {
    background: transparent;
}

.bx-submenu::-webkit-scrollbar-thumb {
    background: #c6cdd3;
    border-radius: 4px;
}

.bx-submenu::-webkit-scrollbar-thumb:hover {
    background: #a1aab3;
}

.bx-submenu-item {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    font-size: 13px;
    color: var(--pbi-teal-strong);
    font-weight: 500;
    text-decoration: none;
    padding: 0 10px;
    height: 100%;
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
    flex-shrink: 0;
}

.bx-submenu-item:hover {
    color: var(--pbi-teal);
    background: transparent;
}

.bx-submenu-item.active {
    color: var(--pbi-teal-strong);
    border-bottom-color: var(--pbi-teal);
    background: transparent;
}

/* ── Card container (Power BI Tile) ── */
.bx-card {
    background: var(--pbi-canvas);
    border-radius: var(--pbi-radius);
    opacity: 1;
    border: 1px solid var(--pbi-border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    overflow: visible;
    padding: 18px 18px 16px;
}

/* ── Table (Power BI Matrix Visual) ── */
.bx-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

/* Header */
.bx-table thead tr {
    border-bottom: none;
}

.bx-table thead th {
    padding: 12px 14px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--pbi-text-secondary);
    white-space: nowrap;
    user-select: none;
    background: var(--pbi-canvas);
    border-bottom: 2px solid var(--pbi-border);
    border-right: none;
}

.bx-table thead th:first-child {
    width: 36px;
    text-align: center;
    padding-left: 14px;
}

/* Sorting arrows */
.bx-table thead th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 25px !important;
}

.bx-table thead th.sortable:hover {
    background-color: var(--pbi-selected);
}

/* Body rows */
.bx-table tbody tr {
    border-bottom: 1px solid var(--pbi-border);
    transition: background 0.15s;
    cursor: pointer;
}

.bx-table tbody tr:nth-child(even) {
    background-color: transparent;
}

.bx-table tbody tr:nth-child(odd) {
    background-color: var(--pbi-canvas);
}

.bx-table tbody tr:hover {
    background-color: var(--pbi-hover);
}

.bx-table tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    color: var(--pbi-text);
    font-size: 13px;
    border-right: none;
    text-align: center;
}

.bx-table tbody td:first-child {
    text-align: center;
    width: 36px;
    padding-left: 14px;
}

.bx-table .bx-table thead th:first-child,
.bx-table .bx-table tbody td:first-child {
    width: auto;
}

/* Checkbox */
.bx-checkbox {
    width: 16px;
    height: 16px;
    border: 2px solid var(--pbi-border);
    border-radius: 2px;
    display: inline-block;
    cursor: pointer;
}

/* Blue link */
.bx-link {
    color: var(--pbi-teal);
    text-decoration: none;
    font-weight: 600;
}

.bx-link:hover {
    text-decoration: underline;
}

/* Sub-text below link */
.bx-sub {
    color: var(--pbi-text-secondary);
    font-size: 11px;
    margin-top: 2px;
}

/* Cell truncation */
.bx-cell-overflow {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty state */
.bx-empty {
    padding: 40px;
    text-align: center;
    color: var(--pbi-text-secondary);
    font-size: 14px;
}

/* ── Filter bar (Slicers Pane Style) ── */
.bx-filter-bar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    overflow: visible;
}

/* ── Custom multi-select ── */
.bx-ms-wrap {
    position: relative;
    min-width: 220px;
    max-width: 240px;
}

.bx-ms-control {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 4px;
    height: 36px;
    padding: 0 32px 0 8px;
    border: 1px solid var(--pbi-border);
    border-radius: 2px;
    background: var(--pbi-canvas);
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
}

.bx-form-textarea {
    display: block;
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    background: var(--pbi-canvas);
    color: var(--pbi-text);
    width: 100%;
    margin-top: 10px;
    min-height: 120px;
    position: relative;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bx-ms-control:hover {
    border-color: var(--pbi-text-secondary);
}

.bx-ms-control.open {
    border-color: var(--pbi-teal);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Placeholder */
.bx-ms-placeholder {
    color: var(--pbi-text-secondary);
    font-size: 13px;
    line-height: 34px;
    white-space: nowrap;
}

/* Chevron arrow */
.bx-ms-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--pbi-text-secondary);
    transition: transform 0.2s;
    pointer-events: none;
}

.bx-ms-control.open .bx-ms-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Pills */
.bx-ms-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f4fc;
    color: var(--pbi-teal);
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    max-width: 180px;
    white-space: nowrap;
    flex-shrink: 0;
}

.bx-ms-tag-remove {
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    color: var(--pbi-teal);
}

.bx-ms-tag-remove:hover {
    color: var(--pbi-red);
}

/* Dropdown panel */
.bx-ms-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 100%;
    background: var(--pbi-canvas);
    border: 1px solid var(--pbi-border);
    border-radius: 2px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    overflow: hidden;
}

.bx-ms-dropdown.open {
    display: block;
}

/* Search inside dropdown */
.bx-ms-search {
    padding: 8px 10px;
    border-bottom: 1px solid var(--pbi-border-light);
}

.bx-ms-search input {
    width: 100%;
    border: 1px solid var(--pbi-border);
    border-radius: 2px;
    padding: 5px 8px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.bx-ms-search input:focus {
    border-color: var(--pbi-teal);
}

/* Option list */
.bx-ms-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 0;
}

.bx-ms-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 13px;
    color: var(--pbi-text);
    transition: background 0.1s;
}

.bx-ms-option:hover {
    background: var(--pbi-hover);
}

.bx-ms-option.selected {
    background: var(--pbi-selected);
}

.bx-ms-option input[type=checkbox] {
    accent-color: var(--pbi-teal);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Filter button */
.bx-filter-btn {
    height: 33px !important;
    padding: 0 18px;
    background: var(--pbi-teal);
    color: #fff;
    border: none;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.bx-filter-btn:hover {
    background: var(--pbi-teal-strong);
}

.bx-filter-clear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 33px !important;
    padding: 0 15px;
    background: var(--pbi-teal);
    color: #fff;
    border-radius: 2px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
}

.bx-filter-clear-btn:hover {
    background: var(--pbi-teal-strong);
}

/* ── Form elements ── */
.bx-form-group {
    margin-bottom: 20px;
}

.bx-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pbi-text-secondary);
    margin-bottom: 8px;
}

.bx-form-input {
    width: 100%;
    max-width: 450px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: var(--pbi-text);
    background: var(--pbi-canvas);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.bx-form-input:focus {
    border-color: var(--pbi-teal);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.bx-form-select {
    width: 100%;
    max-width: 450px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    color: var(--pbi-text);
    outline: none;
    background: var(--pbi-canvas);
    cursor: pointer;
}

.bx-form-select:focus {
    border-color: var(--pbi-teal);
}

.bx-form-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    margin-top: 5px;
}

.bx-form-checkbox-wrap input {
    accent-color: var(--pbi-teal);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.bx-form-help {
    font-size: 12px;
    color: var(--pbi-text-secondary);
    margin-top: 6px;
    max-width: 450px;
    line-height: 1.4;
}

.bx-form-buttons {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 1px solid var(--pbi-border-light);
}

.bx-card-form {
    padding: 25px;
}

/* ── Month & Year Filter ── */
.bx-filter-dropdown-select {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--pbi-border);
    border-radius: 2px;
    font-size: 13px;
    font-family: inherit;
    color: var(--pbi-text-secondary);
    background: var(--pbi-canvas);
    outline: none;
    cursor: pointer;
    min-width: 100px;
}

.bx-filter-dropdown-select:hover {
    border-color: var(--pbi-text);
}

.bx-filter-date-input {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--pbi-border);
    border-radius: 2px;
    font-size: 13px;
    font-family: inherit;
    color: var(--pbi-text-secondary);
    background: var(--pbi-canvas);
    outline: none;
    cursor: pointer;
}

.bx-filter-date-input:focus {
    border-color: var(--pbi-teal);
}

/* ── Dashboard (Metrics / KPIs - Up to 5 per row with vertical scroll for >5) ── */
.bx-dashboard-metrics,
.bx-metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-height: 150px;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 2px 4px 6px 2px;
}
.bx-dashboard-metrics::-webkit-scrollbar,
.bx-metrics-grid::-webkit-scrollbar {
    width: 6px;
}
.bx-dashboard-metrics::-webkit-scrollbar-thumb,
.bx-metrics-grid::-webkit-scrollbar-thumb {
    background: rgba(31, 182, 255, 0.4);
    border-radius: 4px;
}
@media (max-width: 1200px) {
    .bx-dashboard-metrics,
    .bx-metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

.bx-metric-card {
    background: var(--pbi-canvas);
    padding: 16px 20px;
    border-radius: 4px;
    border: none;
    box-shadow: 0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108);
    border-top: 3px solid var(--pbi-teal);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.bx-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease-in-out;
    pointer-events: none;
}

.bx-metric-card:hover::before {
    left: 150%;
}

.bx-metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.15), 0 2px 4px 0 rgba(0, 0, 0, 0.12);
}

.bx-metric-icon {
    display: none;
}

.bx-metric-card .bx-metric-icon svg {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bx-metric-card:hover .bx-metric-icon svg {
    transform: scale(1.15) translateY(-3px);
}

.bx-metric-card.blue {
    border-top-color: var(--pbi-teal);
}

.bx-metric-card.green {
    border-top-color: var(--pbi-green);
}

.bx-metric-card.orange {
    border-top-color: var(--pbi-orange);
}

.bx-metric-card.red {
    border-top-color: var(--pbi-red);
}

.bx-metric-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--pbi-text-secondary);
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.bx-metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--pbi-text);
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.bx-metric-unit {
    font-size: 14px;
    color: var(--pbi-text-secondary);
    font-weight: 400;
}

.bx-card-title {
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--pbi-text);
    border-bottom: 1px solid var(--pbi-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--pbi-canvas);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.bx-card-title-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.bx-export-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.bx-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid var(--pbi-border);
    border-radius: 2px;
    background: var(--pbi-canvas);
    color: var(--pbi-text);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
}

.bx-export-btn:hover {
    background: var(--pbi-hover);
    color: var(--pbi-text);
    border-color: var(--pbi-text-secondary);
}

.bx-export-btn:disabled,
.bx-export-btn.is-loading {
    opacity: 0.6;
    cursor: wait;
}

.bx-export-btn--pdf {
    background: var(--pbi-teal);
    color: #fff;
    border-color: var(--pbi-teal);
}

.bx-export-btn--pdf:hover {
    background: var(--pbi-teal-strong);
    border-color: var(--pbi-teal-strong);
}

.bx-export-btn--graph {
    background: #f39c12;
    color: #fff;
    border-color: #f39c12;
}

.bx-export-btn--graph:hover {
    background: #d98c10;
    border-color: #d98c10;
}

/* Off-screen clone for PDF export */
.bx-pdf-export-root {
    position: fixed;
    left: -200000px;
    top: 0;
    z-index: -1;
    background: #fff;
    padding: 16px 20px;
    overflow: visible !important;
    box-sizing: border-box;
    font-family: 'Roboto', 'Segoe UI', sans-serif;
}

.bx-pdf-export-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
}

.bx-pdf-export-title .bx-sub {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--pbi-text-secondary);
    margin-top: 4px;
}

.bx-pdf-export-root table {
    border-collapse: collapse !important;
    background: #fff;
}

.bx-pdf-export-root th,
.bx-pdf-export-root td {
    border: 1px solid #ccc !important;
    padding: 6px 8px !important;
    color: #333 !important;
    background: #fff !important;
    white-space: nowrap;
}

.bx-pdf-export-root tr[style*="background"] th,
.bx-pdf-export-root tr[style*="background"] td {
    background: #f0f0f0 !important;
    font-weight: 600;
}

/* ── Dashboard Charts ── */
.bx-dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.bx-chart-card {
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.bx-chart-container {
    flex: 1;
    padding: 20px;
    position: relative;
    min-height: 250px;
}

@media (max-width: 768px) {
    .bx-dashboard-charts {
        grid-template-columns: 1fr;
    }
}

/* ── Horizontal table scroll arrows ── */
.bx-table-scroll {
    position: relative;
}

.bx-table-scroll__viewport {
    overflow-x: auto;
    overflow-y: visible;
}

.bx-table-scroll__btn {
    position: fixed;
    top: 60%;
    z-index: 500;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 56px;
    border: 1px solid var(--pbi-border);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--pbi-teal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

.bx-table-scroll--overflow .bx-table-scroll__btn {
    opacity: 0.45;
    pointer-events: auto;
}

.bx-table-scroll--overflow:hover .bx-table-scroll__btn:not(:disabled),
.bx-table-scroll__btn:hover:not(:disabled) {
    opacity: 1;
}

.bx-table-scroll__btn:hover:not(:disabled) {
    background: var(--pbi-teal);
    color: #fff;
    border-color: var(--pbi-teal);
}

.bx-table-scroll__btn:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.bx-table-scroll__btn--left {
    left: 0.5%;
}

.bx-table-scroll__btn--right {
    right: 0.5%;
}

/* Specific overrides for the Plan-Fact Report scroll buttons */
.bx-table-scroll-plan-fact .bx-table-scroll__btn {
    position: fixed !important;
    top: 50%;
    transition: opacity 0.2s ease;
}

.bx-table-scroll-plan-fact .bx-table-scroll__btn--right {
    right: auto !important;
}

.ck-powered-by {
    display: none !important;
}

.bx-form-checkbox-wrap span {
    padding-bottom: 10px;
}

/* CKEditor Height Adjustment */
.ck-editor__editable_inline {
    min-height: 300px;
}

/* ==================== TABLE CONTROLS & MODAL CSS ==================== */
.col-resizer {
    position: absolute;
    right: -3px;
    top: 0;
    height: 100%;
    width: 6px;
    cursor: col-resize;
    user-select: none;
    background: transparent;
    z-index: 10;
    transition: background 0.2s ease;
}

.col-resizer:hover,
th.resizing .col-resizer {
    background: var(--pbi-teal);
}

th.resizing {
    background: var(--pbi-hover);
}

/* Column Drag and Drop Styles */
.draggable-col {
    cursor: grab;
}

.draggable-col:active {
    cursor: grabbing;
}

th.dragging {
    opacity: 0.45;
    background: var(--pbi-hover) !important;
    border: 1px dashed var(--pbi-border) !important;
}

th.drag-over-left {
    box-shadow: inset 4px 0 0 0 var(--pbi-teal) !important;
    background: rgba(2, 132, 199, 0.05) !important;
}

th.drag-over-right {
    box-shadow: inset -4px 0 0 0 var(--pbi-teal) !important;
    background: rgba(2, 132, 199, 0.05) !important;
}

.sortable-col {
    position: relative;
    user-select: none;
}

.sortable-col::after {
    content: "⇅";
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    color: var(--pbi-border);
    opacity: 0;
    transition: all 0.2s ease;
}

.sortable-col:hover::after {
    opacity: 1;
    color: var(--pbi-text-secondary);
}

.sortable-col.sort-asc::after {
    content: "▲";
    opacity: 1;
    color: var(--pbi-teal);
}

.sortable-col.sort-desc::after {
    content: "▼";
    opacity: 1;
    color: var(--pbi-teal);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal {
    background: var(--pbi-canvas);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 24px;
    max-width: 600px;
    width: 100%;
    margin-top: 60px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    max-height: 100vh;
    overflow-y: auto;
    border: 1px solid var(--pbi-border);
}

/* Modal and child elements theme override to prevent white background */
.modal,
.modal-content,
#history-modal .modal-header,
#history-modal .modal-body,
#escalate-modal .modal-content,
#chartModal>div,
#chartValueCheckboxes {
    background-color: var(--pbi-canvas) !important;
    background: var(--pbi-canvas) !important;
    color: var(--pbi-text) !important;
    border-color: var(--pbi-border) !important;
}

#chartModal h3 {
    color: var(--pbi-text) !important;
}

#chartTypeSelect,
#chartLabelSelect {
    background-color: var(--pbi-canvas) !important;
    color: var(--pbi-text) !important;
    border: 1px solid var(--pbi-border) !important;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pbi-border-light);
}

.modal-header h2 {
    margin: 0;
    font-size: 16px;
    color: var(--pbi-text);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.modal-header h2 i {
    color: var(--pbi-teal);
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--pbi-text-secondary);
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--pbi-hover);
    color: var(--pbi-text);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-footer button,
.modal-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    border: none;
    border-radius: 4px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-footer button[type="submit"] {
    background: var(--pbi-teal);
    color: #fff;
}

.modal-footer button[type="submit"]:hover {
    background: var(--pbi-teal-strong);
}

.modal-footer a {
    background: var(--pbi-hover);
    color: var(--pbi-text);
    text-decoration: none;
    border: 1px solid var(--pbi-border);
}

.modal-footer a:hover {
    background: var(--pbi-selected);
    color: var(--pbi-text);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.nice-list {
    list-style: none;
    padding: 20px;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    background: var(--pbi-canvas);
}

.list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--pbi-border-light);
    border-radius: 4px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.list-item:hover {
    background-color: var(--pbi-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Thumbnail */
.item-img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: contain;
    flex-shrink: 0;
    background: #f3f3f3;
    border: 1px solid var(--pbi-border-light);
}

/* Content */
.item-content {
    flex: 1;
    min-width: 0;
}

.item-title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--pbi-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-desc {
    margin: 0;
    font-size: 12px;
    color: var(--pbi-text-secondary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status Tag */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s;
}

.status-checking {
    background: #e8f4fc;
    color: var(--pbi-teal);
    border: 1px dashed var(--pbi-teal);
    animation: statusPulse 1.5s infinite ease-in-out;
}

.status-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Spinner animation */
.status-spinner {
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: statusRotate 0.75s linear infinite;
}

@keyframes statusRotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(0.96);
    }
}

.company-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 20px;
    align-items: start;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.active {
    background-color: #e2f0d9;
    color: #385723;
}

.status-badge.inactive {
    background-color: #fce4d6;
    color: #c65911;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    font-weight: 600;
    text-decoration: none;
}

.btn-edit {
    background-color: var(--pbi-teal);
    color: white;
}

.btn-edit:hover {
    background-color: var(--pbi-teal-strong);
}

.btn-delete {
    background-color: var(--pbi-red);
    color: white;
}

.btn-delete:hover {
    background-color: #8a0000;
}

.btn-cancel {
    background-color: var(--pbi-hover);
    color: var(--pbi-text);
    border-color: var(--pbi-border);
}

.btn-cancel:hover {
    background-color: var(--pbi-selected);
}

.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 13px;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.status-toggle-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Language Switcher Styles */
.lang-switcher-container {
    margin-left: auto;
    display: flex;
    align-items: center;
    padding-right: 20px;
}

.lang-switcher {
    display: flex;
    background-color: #eef2f4;
    border-radius: 20px;
    padding: 3px;
    gap: 4px;
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 13px;
}

.lang-btn {
    text-decoration: none;
    padding: 4px 14px;
    border-radius: 16px;
    color: #535c69;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.lang-btn:hover {
    background-color: #e0e6e9;
    color: #333;
}

.lang-btn.active {
    background-color: var(--pbi-teal);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(31, 182, 255, 0.3);
}

.lang-btn.active:hover {
    background-color: var(--pbi-teal-strong);
    color: #ffffff;
}

/* ── Sticky Columns for Plan-Fact Report ── */
.sticky-col-1,
.sticky-col-2,
.sticky-col-3,
.sticky-col-4,
.sticky-col-5,
.sticky-col-6,
.sticky-col-7,
.sticky-col-1-3 {
    position: sticky !important;
    z-index: 2;
}

.sticky-col-1 {
    left: 0px;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
}

.sticky-col-2 {
    left: 40px;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

.sticky-col-3 {
    left: 240px;
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

.sticky-col-4 {
    left: 340px;
    width: 130px;
    min-width: 130px;
    max-width: 130px;
}

.sticky-col-5 {
    left: 470px;
    width: 130px;
    min-width: 130px;
    max-width: 130px;
}

.sticky-col-6 {
    left: 600px;
    width: 130px;
    min-width: 130px;
    max-width: 130px;
}

.sticky-col-7 {
    left: 730px;
    width: 130px;
    min-width: 130px;
    max-width: 130px;
    border-right: 2px solid #d1d5db !important;
}

.sticky-col-1-3 {
    left: 0px;
    width: 340px;
    min-width: 340px;
    max-width: 340px;
}

/* Sticky Header Cells (higher z-index to overlay scrollable body) */
.bx-table thead th.sticky-col-1,
.bx-table thead th.sticky-col-2,
.bx-table thead th.sticky-col-3,
.bx-table thead th.sticky-col-4,
.bx-table thead th.sticky-col-5,
.bx-table thead th.sticky-col-6,
.bx-table thead th.sticky-col-7 {
    background-color: var(--pbi-canvas, #ffffff) !important;
    z-index: 3;
}

/* Alternate row backgrounds for sticky cells */
.bx-table tbody tr:nth-child(odd) td.sticky-col-1,
.bx-table tbody tr:nth-child(odd) td.sticky-col-2,
.bx-table tbody tr:nth-child(odd) td.sticky-col-3,
.bx-table tbody tr:nth-child(odd) td.sticky-col-4,
.bx-table tbody tr:nth-child(odd) td.sticky-col-5,
.bx-table tbody tr:nth-child(odd) td.sticky-col-6,
.bx-table tbody tr:nth-child(odd) td.sticky-col-7 {
    background-color: var(--pbi-canvas, #ffffff) !important;
}

.bx-table tbody tr:nth-child(even) td.sticky-col-1,
.bx-table tbody tr:nth-child(even) td.sticky-col-2,
.bx-table tbody tr:nth-child(even) td.sticky-col-3,
.bx-table tbody tr:nth-child(even) td.sticky-col-4,
.bx-table tbody tr:nth-child(even) td.sticky-col-5,
.bx-table tbody tr:nth-child(even) td.sticky-col-6,
.bx-table tbody tr:nth-child(even) td.sticky-col-7 {
    background-color: #ffffff !important;
}

/* Hover highlights for sticky cells */
.bx-table tbody tr:hover td.sticky-col-1,
.bx-table tbody tr:hover td.sticky-col-2,
.bx-table tbody tr:hover td.sticky-col-3,
.bx-table tbody tr:hover td.sticky-col-4,
.bx-table tbody tr:hover td.sticky-col-5,
.bx-table tbody tr:hover td.sticky-col-6,
.bx-table tbody tr:hover td.sticky-col-7,
.bx-table tbody tr:hover td.sticky-col-1-3 {
    background-color: var(--pbi-hover, var(--pbi-border)) !important;
}

/* Highlighted/Total row style overrides */
.bx-table tbody tr[style*="background"] td.sticky-col-1-3,
.bx-table tbody tr[style*="background"] td.sticky-col-4,
.bx-table tbody tr[style*="background"] td.sticky-col-5,
.bx-table tbody tr[style*="background"] td.sticky-col-6,
.bx-table tbody tr[style*="background"] td.sticky-col-7 {
    background-color: #e8f0fe !important;
}

/* ─── DARK THEME LAYOUT & SIDEBAR OVERRIDES (Infoexpert Dashboard Theme) ─── */

body {
    background-color: var(--pbi-bg) !important;
    color: var(--pbi-text) !important;
}

/* Sidebar Navigation */
.bx-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: var(--bx-menu-width, 280px) !important;
    height: 100vh !important;
    background: var(--pbi-menu-bg) !important;
    border-right: 1px solid var(--pbi-border) !important;
    border-bottom: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding: 20px 16px 16px !important;
    z-index: 1001 !important;
    margin: 0 !important;
    box-shadow: 8px 0 28px rgba(2, 8, 23, 0.35) !important;
    box-sizing: border-box !important;
}

.bx-menu-logo {
    max-width: 180px !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.bx-brand-mark {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 4px !important;
    margin: 0 0 16px 0 !important;
    padding: 0 0 0 12px !important;
    text-decoration: none !important;
    line-height: 1 !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
}

.bx-brand-mark:hover {
    text-decoration: none !important;
}

.bx-brand-mark__primary {
    font-family: 'Inter', 'Roboto', sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    letter-spacing: -0.01em !important;
    color: #ffffff !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
}

.bx-brand-mark__secondary {
    font-family: 'Inter', 'Roboto', sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.28em !important;
    color: #3ba0b3 !important;
    white-space: nowrap !important;
    padding-top: 0 !important;
    line-height: 1 !important;
    display: block !important;
    text-transform: uppercase !important;
}

.bx-brand-mark--logo {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
}

.bx-brand-mark__logo {
    display: none !important;
}

.bx-menu-items-scroll {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 14px 0 8px !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    border-top: 1px solid var(--pbi-border-light) !important;
    box-sizing: border-box !important;
    align-self: stretch !important;
}

/* Custom Scrollbar for Sidebar menu items */
.bx-menu-items-scroll::-webkit-scrollbar {
    width: 4px;
}

.bx-menu-items-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.bx-menu-items-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.bx-menu-items-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.bx-menu-item-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 4px 0 !important;
    position: relative !important;
    height: auto !important;
    align-self: stretch !important;
}

.bx-menu-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: none !important;
    padding: 10px 10px 10px 12px !important;
    color: var(--pbi-menu-text, #b6c3d6) !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
    border-bottom: none !important;
    transition: background-color 0.18s ease, color 0.18s ease !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 40px !important;
    gap: 10px !important;
    text-align: left !important;
    margin: 0 !important;
}

.bx-menu-item:hover {
    background-color: var(--pbi-menu-hover, rgba(59, 130, 246, 0.16)) !important;
    color: var(--pbi-menu-text-strong, #ffffff) !important;
}

/* Selected Menu item — page main color */
.bx-menu-item.active {
    background: var(--section-accent, var(--pbi-teal, #3b82f6)) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.bx-menu-item svg {
    margin-right: 0 !important;
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    fill: none !important;
    flex-shrink: 0 !important;
}

/* Hide left-menu icons and count badges (keep chevrons for expandable items) */
.bx-menu-item > svg:not(.bx-menu-chevron),
.bx-menu-item > .portal-service-type-icon,
.bx-menu-dropdown-item > svg,
.bx-menu-dropdown-item > .portal-service-type-icon,
.bx-menu-count {
    display: none !important;
}

.bx-menu-label {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: left !important;
}

.bx-menu-count {
    flex: 0 0 auto !important;
    min-width: 20px !important;
    height: 20px !important;
    padding: 0 7px !important;
    border-radius: 999px !important;
    background: rgba(59, 130, 246, 0.2) !important;
    color: #93c5fd !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 20px !important;
    text-align: center !important;
    letter-spacing: 0.01em !important;
}

.bx-menu-item.active .bx-menu-count,
.bx-menu-item:hover .bx-menu-count {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* Accordion Sidebar Dropdown */
.bx-menu-dropdown {
    display: none !important;
    /* Hide by default */
    position: static !important;
    flex-direction: column !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 6px 0 6px 15px !important;
    /* indentation */
    width: 100% !important;
    gap: 4px !important;
    box-sizing: border-box !important;
}

/* Show dropdown inline when the container has class "active" */
.bx-menu-item-container.active .bx-menu-dropdown,
.bx-menu-item-container.always-open .bx-menu-dropdown {
    display: flex !important;
}

.bx-menu-item-container.always-open > .bx-menu-item .bx-menu-chevron {
    transform: rotate(180deg);
}

.bx-menu-dropdown-item {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 5px 10px !important;
    color: #9ca3af !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    white-space: normal !important;
    /* Wrap long report titles if needed */
    line-height: 1.3 !important;
}

.bx-menu-dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.bx-menu-dropdown-item.active {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    font-weight: 500 !important;
    border-left: 2px solid var(--pbi-teal) !important;
    border-radius: 0 6px 6px 0 !important;
    padding-left: 12px !important;
}

.bx-menu-dropdown-item svg {
    width: 14px !important;
    height: 14px !important;
    margin-right: 8px !important;
    stroke: currentColor !important;
    fill: none !important;
    flex-shrink: 0 !important;
}

/* Language Switcher */
.lang-switcher-container {
    padding: 10px 0 !important;
    width: auto !important;
    margin-left: -12px !important;
    margin-right: -12px !important;
    box-sizing: border-box !important;
}

.lang-switcher {
    display: flex !important;
    background: rgba(2, 132, 199, 0.04) !important;
    padding: 2px !important;
    border-radius: 30px !important;
    border: 1px solid var(--pbi-teal) !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.lang-btn {
    flex: 1 !important;
    text-align: center !important;
    padding: 6px 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--pbi-teal) !important;
    text-decoration: none !important;
    border-radius: 30px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    letter-spacing: 0.4px !important;
    min-height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.lang-btn:hover {
    color: #ffffff !important;
    background-color: rgba(2, 132, 199, 0.15) !important;
}

.lang-btn.active {
    background-color: var(--pbi-teal) !important;
    color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(31, 182, 255, 0.3) !important;
}

/* User Profile card at sidebar bottom */
.bx-user-profile {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 8px 12px 2px 12px !important;
    border-top: none !important;
    margin-top: 0 !important;
    width: 100% !important;
    max-width: none !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
}

.bx-user-profile-main {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    text-decoration: none !important;
    color: inherit !important;
    border-radius: 8px !important;
    padding: 2px 0 !important;
    transition: background-color 0.15s ease !important;
}

.bx-user-profile-main:hover {
    background: rgba(31, 182, 255, 0.08) !important;
    text-decoration: none !important;
}

.bx-user-profile-main:hover .bx-user-name {
    color: var(--pbi-teal) !important;
}

.bx-user-logout-form {
    margin: 0 !important;
    flex: 0 0 auto !important;
}

.bx-user-logout-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    border: 1px solid var(--pbi-border) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    color: var(--pbi-text-secondary) !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

.bx-user-logout-btn:hover {
    color: #fff !important;
    background: rgba(239, 68, 68, 0.18) !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
}

.bx-user-avatar {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid var(--pbi-teal) !important;
}

body.has-impersonation-alarm .bx-user-avatar,
body.has-impersonation-alarm .bx-user-avatar-placeholder {
    border: 3px solid #dc2626 !important;
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.5);
    animation: portal-impersonation-avatar-ring 1.2s ease-in-out infinite;
}

@keyframes portal-impersonation-avatar-ring {
    0%, 100% {
        border-color: #b45309 !important;
        box-shadow: 0 0 0 0 rgba(180, 83, 9, 0.55);
    }
    50% {
        border-color: #dc2626 !important;
        box-shadow: 0 0 0 7px rgba(220, 38, 38, 0);
    }
}

.bx-user-avatar-placeholder {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background-color: var(--pbi-teal) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
}

.bx-user-info {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.bx-user-name {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.bx-user-role {
    font-size: 11px !important;
    color: #9ca3af !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Main layout shifts — keep in sync with .bx-menu width */
.bx-page {
    margin-left: var(--bx-menu-width, 280px) !important;
    width: calc(100% - var(--bx-menu-width, 280px)) !important;
    max-width: none !important;
    padding: 28px 32px 36px !important;
    background:
        radial-gradient(ellipse 70% 40% at 100% 0%, rgba(59, 130, 246, 0.05), transparent 55%),
        var(--pbi-bg) !important;
    min-height: 100vh !important;
}

/* Disable sticky horizontal header wrapper when sidebar is active */
.bx-page:has(.bx-menu) .bx-sticky-container {
    position: static !important;
    margin: 0 0 25px 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Submenu horizontal tab bar styling */
.bx-submenu {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 0 25px 0 !important;
    padding: 6px !important;
    height: auto !important;
    background-color: var(--pbi-canvas) !important;
    border: 1px solid var(--pbi-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
}

.bx-submenu-item {
    font-size: 13px !important;
    color: #9ca3af !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    border-bottom: none !important;
    display: inline-flex !important;
    align-items: center !important;
    height: auto !important;
    transition: all 0.2s ease !important;
}

.bx-submenu-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
}

.bx-submenu-item.active {
    background-color: var(--pbi-teal) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(31, 182, 255, 0.2) !important;
}

.bx-submenu-item svg {
    margin-right: 6px !important;
    stroke: currentColor !important;
    fill: none !important;
}

/* Cards Redesign (Glass/Neon dark theme) */
.bx-card,
.bx-metric-card,
.chart-card,
.bx-table-container,
.bx-dashboard-metrics .bx-metric-card {
    background-color: var(--pbi-canvas) !important;
    border: 1px solid var(--pbi-border) !important;
    border-top: none !important;
    border-radius: 12px !important;
    box-shadow: 0 1.6px 3.6px rgba(18, 32, 51, 0.06) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.bx-metric-card::before {
    display: none !important;
}

.bx-metric-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(18, 32, 51, 0.1) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}



.bx-title-period {
    background: transparent !important;
    border: none !important;
    color: #7d8590 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 0 !important;
    white-space: nowrap !important;
}

/* Forms & Filter Inputs */
.bx-filters,
.bx-filter-bar {
    background-color: var(--pbi-canvas) !important;
    border: 1px solid var(--pbi-border) !important;
    padding: 15px !important;
    border-radius: 8px !important;
}

.bx-filter-input,
.bx-filter-date-input,
.bx-ms-control {
    background-color: #ffffff !important;
    border: 1px solid var(--pbi-border) !important;
    color: var(--pbi-text) !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
}

.bx-filter-input:focus,
.bx-filter-date-input:focus,
.bx-ms-control.open {
    border-color: var(--pbi-teal) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.bx-btn-primary {
    background-color: var(--pbi-teal) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 8px 18px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.bx-btn-primary:hover {
    background-color: var(--pbi-teal-strong) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28) !important;
}

/* Tables styling */
.bx-table {
    background: transparent !important;
}

.bx-table thead th {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: var(--pbi-text-secondary) !important;
    font-weight: 600 !important;
    border-bottom: 2px solid var(--pbi-border) !important;
    padding: 14px 16px !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
}

.bx-table tbody tr {
    border-bottom: 1px solid var(--pbi-border) !important;
}

.bx-table tbody tr:nth-child(odd) {
    background-color: transparent !important;
}

.bx-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.01) !important;
}

.bx-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

.bx-table tbody td {
    padding: 12px 16px !important;
    color: var(--pbi-text) !important;
    font-size: 13px !important;
    border-bottom: none !important;
}

/* Sticky columns in tables */
.bx-table thead th.sticky-col-1,
.bx-table thead th.sticky-col-2,
.bx-table thead th.sticky-col-3,
.bx-table thead th.sticky-col-4,
.bx-table thead th.sticky-col-5,
.bx-table thead th.sticky-col-6,
.bx-table thead th.sticky-col-7,
.bx-table tbody tr td.sticky-col-1,
.bx-table tbody tr td.sticky-col-2,
.bx-table tbody tr td.sticky-col-3,
.bx-table tbody tr td.sticky-col-4,
.bx-table tbody tr td.sticky-col-5,
.bx-table tbody tr td.sticky-col-6,
.bx-table tbody tr td.sticky-col-7 {
    background-color: var(--pbi-canvas) !important;
    color: var(--pbi-text) !important;
}

.bx-table tbody tr:nth-child(even) td.sticky-col-1,
.bx-table tbody tr:nth-child(even) td.sticky-col-2,
.bx-table tbody tr:nth-child(even) td.sticky-col-3,
.bx-table tbody tr:nth-child(even) td.sticky-col-4,
.bx-table tbody tr:nth-child(even) td.sticky-col-5,
.bx-table tbody tr:nth-child(even) td.sticky-col-6,
.bx-table tbody tr:nth-child(even) td.sticky-col-7 {
    background-color: var(--pbi-surface) !important;
}

.bx-table tbody tr:hover td.sticky-col-1,
.bx-table tbody tr:hover td.sticky-col-2,
.bx-table tbody tr:hover td.sticky-col-3,
.bx-table tbody tr:hover td.sticky-col-4,
.bx-table tbody tr:hover td.sticky-col-5,
.bx-table tbody tr:hover td.sticky-col-6,
.bx-table tbody tr:hover td.sticky-col-7 {
    background-color: #1c283c !important;
    /* var(--pbi-hover) */
}

/* Custom multi-select Tags */
.bx-ms-tag {
    background-color: rgba(31, 182, 255, 0.15) !important;
    color: var(--pbi-teal) !important;
    border: 1px solid rgba(31, 182, 255, 0.3) !important;
}

.bx-ms-tag-remove {
    color: var(--pbi-teal) !important;
}

.bx-ms-tag-remove:hover {
    color: var(--pbi-red) !important;
}

/* Chart titles / typography overrides */
.chart-title,
.chart-card h3,
.bx-card h3 {
    color: #ffffff !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
}

/* Metrics and titles text colors */
.bx-metric-label {
    color: var(--pbi-text-secondary) !important;
}

.bx-metric-value {
    color: #ffffff !important;
}

/* Close settings buttons and other widgets */
.settings-icon-btn svg path:first-child {
    fill: #ffffff !important;
}

.settings-icon-btn:hover svg path:first-child {
    fill: var(--pbi-teal) !important;
}

/* ─── LIGHT/DARK THEME TOGGLE & DUAL MODES ─── */

.bx-user-profile {
    margin-top: auto !important;
}

.bx-menu-bottom {
    margin-top: auto !important;
    flex: 0 0 auto !important;
    align-self: stretch !important;
    width: 100% !important;
    max-width: none !important;
    padding: 8px 0 10px !important;
    border-top: none !important;
    border-bottom: 1px solid var(--pbi-border) !important;
    box-sizing: border-box !important;
}

.bx-menu-bottom .bx-menu-item-container {
    margin-bottom: 0 !important;
}

.bx-menu-ai-btn {
    width: 100% !important;
    max-width: none !important;
    min-height: 42px !important;
    padding: 10px 12px !important;
    justify-content: flex-start !important;
    text-align: left !important;
    border-radius: 10px !important;
    border: 1px solid color-mix(in srgb, var(--pbi-teal, #1fb6ff) 45%, transparent) !important;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--pbi-teal, #1fb6ff) 22%, transparent), color-mix(in srgb, var(--pbi-navy, #2563eb) 16%, transparent)) !important;
    color: var(--pbi-text, #eef3fb) !important;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.16) !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

.bx-menu-ai-btn svg {
    color: var(--pbi-teal, #1fb6ff) !important;
    stroke: currentColor !important;
    flex-shrink: 0 !important;
}

.bx-menu-ai-btn:hover {
    transform: translateY(-1px) !important;
    border-color: var(--pbi-teal, #1fb6ff) !important;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--pbi-teal, #1fb6ff) 34%, transparent), color-mix(in srgb, var(--pbi-navy, #2563eb) 24%, transparent)) !important;
    box-shadow: 0 10px 22px rgba(2, 132, 199, 0.24) !important;
    color: #fff !important;
}

.bx-menu-ai-btn.active,
.bx-menu-item-container.active > .bx-menu-ai-btn {
    border-color: var(--pbi-teal, #1fb6ff) !important;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--pbi-teal, #1fb6ff) 42%, transparent), color-mix(in srgb, var(--pbi-navy, #2563eb) 28%, transparent)) !important;
    color: #fff !important;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--pbi-teal, #1fb6ff) 35%, transparent), 0 10px 22px rgba(2, 132, 199, 0.28) !important;
}

.bx-menu-ai-btn.active svg,
.bx-menu-item-container.active > .bx-menu-ai-btn svg {
    color: #fff !important;
}

.sidebar-switchers {
    margin-top: 0 !important;
    padding: 8px 12px 12px 12px !important;
    border-top: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: none !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
}

/* Theme toggle removed — single fixed Insight design */
.theme-toggle-icon {
    display: none !important;
}

.theme-toggle-icon:hover {
    border-color: var(--pbi-teal) !important;
    background: rgba(31, 182, 255, 0.1) !important;
}

.theme-toggle-icon .theme-icon {
    width: 14px !important;
    height: 14px !important;
    display: none !important;
}

body:not(.light-theme) .theme-toggle-icon .theme-icon-moon {
    display: block !important;
}

body.light-theme .theme-toggle-icon .theme-icon-sun {
    display: block !important;
}

.theme-toggle-container,
.theme-switcher,
.theme-btn,
.theme-toggle-btn {
    display: none !important;
}

.sidebar-switchers .lang-switcher {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    padding: 3px !important;
    margin: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    border-radius: 999px !important;
    border: 1px solid var(--pbi-menu-border, rgba(255, 255, 255, 0.08)) !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

.sidebar-switchers .lang-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 23px !important;
    padding: 0 6px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.02em !important;
    line-height: 1 !important;
    text-decoration: none !important;
    color: var(--pbi-menu-text, #b6c3d6) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.sidebar-switchers .lang-btn:hover {
    color: var(--pbi-menu-text-strong, #ffffff) !important;
    background: var(--pbi-menu-hover, rgba(59, 130, 246, 0.16)) !important;
}

.sidebar-switchers .lang-btn.active {
    color: #ffffff !important;
    background: var(--pbi-teal) !important;
}

/* Chart surfaces follow theme canvas */
html:not(.light-theme) .chart-card,
html:not(.light-theme) .bx-chart-container,
html:not(.light-theme) .bx-card:has(canvas),
html:not(.light-theme) .bx-metric-card:has(canvas),
html:not(.light-theme) canvas,
body:not(.light-theme) .chart-card,
body:not(.light-theme) .bx-chart-container,
body:not(.light-theme) .bx-card:has(canvas),
body:not(.light-theme) .bx-metric-card:has(canvas),
body:not(.light-theme) canvas {
    background-color: var(--pbi-canvas) !important;
    border: 1px solid var(--pbi-border) !important;
}

/* Single fixed theme — light canvas tokens (sidebar stays dark via --pbi-menu-*) */
html.light-theme,
body.light-theme {
    --pbi-bg: #f4f7fa;
    --pbi-canvas: #ffffff;
    --pbi-surface: #eef3f9;
    --pbi-text: #122033;
    --pbi-text-secondary: #5d6f86;
    --pbi-border: #d4deea;
    --pbi-border-light: rgba(18, 32, 51, 0.08);
    --pbi-header-bg: #ffffff;
    --pbi-menu-bg: linear-gradient(180deg, #101a2b 0%, #0b1422 100%);
    --pbi-menu-text: #b6c3d6;
    --pbi-menu-text-strong: #ffffff;
    --pbi-menu-border: rgba(255, 255, 255, 0.08);
    --pbi-menu-hover: rgba(59, 130, 246, 0.16);
    --pbi-hover: #e8eef7;
    --pbi-selected: rgba(59, 130, 246, 0.14);
    --pbi-shadow: 0 10px 28px rgba(18, 32, 51, 0.08);
    --pbi-teal: #3b82f6;
    --pbi-teal-soft: rgba(59, 130, 246, 0.14);
    --pbi-teal-strong: #2563eb;
    --pbi-page-glow: rgba(59, 130, 246, 0.06);
}

/* Sidebar stays dark on the fixed light-canvas theme */
body.light-theme .bx-menu {
    background: var(--pbi-menu-bg) !important;
    border-bottom: none !important;
    border-right: 1px solid var(--pbi-menu-border) !important;
    box-shadow: 8px 0 28px rgba(2, 8, 23, 0.28) !important;
}

body.light-theme .bx-menu-item {
    color: var(--pbi-menu-text) !important;
}

body.light-theme .bx-menu-item:hover {
    background-color: var(--pbi-menu-hover) !important;
    color: var(--pbi-menu-text-strong) !important;
}

body.light-theme .bx-menu-item.active {
    background: var(--section-accent, var(--pbi-teal)) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.light-theme .bx-menu-dropdown-item {
    color: var(--pbi-menu-text) !important;
}

body.light-theme .bx-menu-dropdown-item:hover {
    background-color: var(--pbi-menu-hover) !important;
    color: var(--pbi-menu-text-strong) !important;
}

body.light-theme .bx-menu-dropdown-item.active {
    background- rgba(59, 130, 246, 0.22) !important;
    color: #ffffff !important;
    border-left: 2px solid var(--pbi-teal) !important;
}

body.light-theme .bx-submenu {
    background-color: #121c2e !important;
    border: 1px solid var(--pbi-menu-border) !important;
    box-shadow: 0 10px 24px rgba(2, 8, 23, 0.35) !important;
}

body.light-theme .bx-submenu-item {
    color: var(--pbi-menu-text) !important;
}

body.light-theme .bx-submenu-item:hover {
    background-color: var(--pbi-menu-hover) !important;
    color: var(--pbi-menu-text-strong) !important;
}

body.light-theme .bx-submenu-item.active {
    background-color: var(--pbi-teal) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}

body.light-theme .bx-menu-bottom {
    border-bottom-color: var(--pbi-menu-border) !important;
}

body.light-theme .bx-menu-ai-btn {
    color: var(--pbi-menu-text-strong) !important;
    border-color: color-mix(in srgb, var(--pbi-teal, #3b82f6) 45%, transparent) !important;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--pbi-teal, #3b82f6) 28%, transparent), color-mix(in srgb, var(--pbi-navy, #1d4ed8) 22%, transparent)) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.18) !important;
}

body.light-theme .bx-menu-ai-btn:hover,
body.light-theme .bx-menu-ai-btn.active,
body.light-theme .bx-menu-item-container.active > .bx-menu-ai-btn {
    color: #fff !important;
    border-color: var(--pbi-teal, #3b82f6) !important;
    background:
        linear-gradient(135deg, var(--pbi-teal, #3b82f6), var(--pbi-navy, #1d4ed8)) !important;
}

body.light-theme .sidebar-switchers {
    border-top-color: var(--pbi-menu-border) !important;
}

body.light-theme .theme-toggle-icon {
    display: none !important;
}

body.light-theme .bx-user-profile {
    border-top: 1px solid var(--pbi-menu-border) !important;
}

body.light-theme .bx-user-name {
    color: var(--pbi-menu-text-strong) !important;
}

body.light-theme .bx-user-role {
    color: var(--pbi-menu-text) !important;
}

body.light-theme .lang-switcher-container {
    border-top: none !important;
}

body.light-theme .sidebar-switchers .lang-switcher {
    background: transparent !important;
    border: 1px solid var(--pbi-menu-border) !important;
    box-shadow: none !important;
}

body.light-theme .sidebar-switchers .lang-btn {
    color: var(--pbi-menu-text) !important;
}

body.light-theme .sidebar-switchers .lang-btn:hover {
    color: var(--pbi-menu-text-strong) !important;
    background-color: var(--pbi-menu-hover) !important;
}

body.light-theme .sidebar-switchers .lang-btn.active {
    background-color: var(--pbi-teal) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body.light-theme .bx-user-avatar {
    border-color: var(--pbi-teal) !important;
}

body.light-theme .bx-user-avatar-placeholder {
    background-color: var(--pbi-teal) !important;
}

body.light-theme .bx-menu-count {
    background: rgba(59, 130, 246, 0.2) !important;
    color: #93c5fd !important;
}

body.light-theme .bx-menu-item.active .bx-menu-count,
body.light-theme .bx-menu-item:hover .bx-menu-count {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

body.light-theme .bx-title {
    color: #122033 !important;
}

body.light-theme .bx-title-period {
    background: transparent !important;
    border: none !important;
    color: #7d8590 !important;
}

body.light-theme .bx-card,
body.light-theme .bx-metric-card,
body.light-theme .chart-card,
body.light-theme .bx-table-container,
body.light-theme .bx-dashboard-metrics .bx-metric-card {
    background-color: var(--pbi-canvas) !important;
    border: 1px solid var(--pbi-border) !important;
    box-shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .bx-metric-label {
    color: var(--pbi-text-secondary) !important;
}

body.light-theme .bx-metric-value {
    color: var(--pbi-text) !important;
}

body.light-theme .chart-title,
body.light-theme .chart-card h3,
body.light-theme .bx-card h3 {
    color: var(--pbi-text) !important;
}

body.light-theme .settings-icon-btn svg path:first-child {
    fill: var(--pbi-text-secondary) !important;
}

body.light-theme .settings-icon-btn:hover svg path:first-child {
    fill: var(--pbi-teal) !important;
}

body.light-theme .bx-table thead th {
    background-color: var(--pbi-surface) !important;
    color: var(--pbi-text-secondary) !important;
    border-bottom: 2px solid var(--pbi-border) !important;
}

body.light-theme .bx-table tbody tr {
    border-bottom: 1px solid var(--pbi-border) !important;
}

body.light-theme .bx-table tbody tr:hover {
    background-color: var(--pbi-hover) !important;
}

body.light-theme .bx-table tbody td {
    color: var(--pbi-text) !important;
}

/* Light theme sticky table cells */
body.light-theme .bx-table thead th.sticky-col-1,
body.light-theme .bx-table thead th.sticky-col-2,
body.light-theme .bx-table thead th.sticky-col-3,
body.light-theme .bx-table thead th.sticky-col-4,
body.light-theme .bx-table thead th.sticky-col-5,
body.light-theme .bx-table thead th.sticky-col-6,
body.light-theme .bx-table thead th.sticky-col-7,
body.light-theme .bx-table tbody tr td.sticky-col-1,
body.light-theme .bx-table tbody tr td.sticky-col-2,
body.light-theme .bx-table tbody tr td.sticky-col-3,
body.light-theme .bx-table tbody tr td.sticky-col-4,
body.light-theme .bx-table tbody tr td.sticky-col-5,
body.light-theme .bx-table tbody tr td.sticky-col-6,
body.light-theme .bx-table tbody tr td.sticky-col-7 {
    background-color: var(--pbi-canvas) !important;
    color: var(--pbi-text) !important;
}

body.light-theme .bx-table tbody tr:nth-child(even) td.sticky-col-1,
body.light-theme .bx-table tbody tr:nth-child(even) td.sticky-col-2,
body.light-theme .bx-table tbody tr:nth-child(even) td.sticky-col-3,
body.light-theme .bx-table tbody tr:nth-child(even) td.sticky-col-4,
body.light-theme .bx-table tbody tr:nth-child(even) td.sticky-col-5,
body.light-theme .bx-table tbody tr:nth-child(even) td.sticky-col-6,
body.light-theme .bx-table tbody tr:nth-child(even) td.sticky-col-7 {
    background-color: var(--pbi-surface) !important;
}

body.light-theme .bx-table tbody tr:hover td.sticky-col-1,
body.light-theme .bx-table tbody tr:hover td.sticky-col-2,
body.light-theme .bx-table tbody tr:hover td.sticky-col-3,
body.light-theme .bx-table tbody tr:hover td.sticky-col-4,
body.light-theme .bx-table tbody tr:hover td.sticky-col-5,
body.light-theme .bx-table tbody tr:hover td.sticky-col-6,
body.light-theme .bx-table tbody tr:hover td.sticky-col-7 {
    background-color: var(--pbi-hover) !important;
}

body.light-theme .bx-ms-tag {
    background-color: var(--pbi-teal-soft) !important;
    color: var(--pbi-teal) !important;
    border: 1px solid rgba(2, 132, 199, 0.22) !important;
}

body.light-theme .bx-ms-tag-remove {
    color: var(--pbi-teal) !important;
}

body.light-theme .bx-ms-tag-remove:hover {
    color: var(--pbi-red) !important;
}

/* CKEditor Dark Mode */
.ck.ck-editor__main>.ck-editor__editable {
    background: var(--pbi-canvas) !important;
    border-color: var(--pbi-border) !important;
    color: var(--pbi-text) !important;
}

.ck.ck-toolbar {
    background: var(--pbi-bg) !important;
    border-color: var(--pbi-border) !important;
}

.ck.ck-button {
    color: var(--pbi-text) !important;
}

.ck.ck-button:hover {
    background: var(--pbi-hover) !important;
}

.ck.ck-button.ck-on {
    background: var(--pbi-selected) !important;
}

/* CKEditor Light Mode */
body.light-theme .ck.ck-editor__main>.ck-editor__editable {
    background: var(--pbi-canvas) !important;
    border-color: var(--pbi-border) !important;
    color: var(--pbi-text) !important;
}

body.light-theme .ck.ck-toolbar {
    background: var(--pbi-surface) !important;
    border-color: var(--pbi-border) !important;
}

body.light-theme .ck.ck-button {
    color: var(--pbi-text-secondary) !important;
}

body.light-theme .ck.ck-button:hover {
    background: var(--pbi-hover) !important;
}

body.light-theme .ck.ck-button.ck-on {
    background: var(--pbi-selected) !important;
}

.bx-table-container {
    overflow-x: auto;
    max-width: 100%;
}

/* Dark mode edit buttons fix */
[data-theme='dark'] .btn-edit,
[data-theme='dark'] .btn-edit-inline {
    color: #ffffff !important;
}


/* Dark mode bx-table links color */
[data-theme='dark'] .bx-table a:not(.btn-sm),
[data-theme='dark'] .bx-table tbody td a:not(.btn-sm) {
    color: #ffffff !important;
}


/* Dark mode bx-table links color (reports implementation) */
body:not(.light-theme) .bx-table a:not(.btn-sm),
body:not(.light-theme) .bx-table tbody td a:not(.btn-sm) {
    color: #ffffff !important;
}

/* ── Floating Modern Scroll Navigation Widget (Up/Down Arrows) ── */
.bx-scroll-nav {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.95);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.3s ease;
}

.bx-scroll-nav.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.bx-scroll-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--pbi-canvas) 82%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--pbi-border-light);
    color: var(--pbi-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
                0 0 0 1px rgba(0, 0, 0, 0.2);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
    padding: 0;
    margin: 0;
}

.bx-scroll-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.25s ease, stroke 0.25s ease;
    stroke-width: 2.2;
}

.bx-scroll-btn:hover {
    background: rgba(31, 182, 255, 0.15);
    border-color: rgba(31, 182, 255, 0.5);
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(31, 182, 255, 0.35),
                0 0 15px rgba(31, 182, 255, 0.2);
    transform: translateY(-2px) scale(1.06);
}

.bx-scroll-btn:active {
    transform: translateY(1px) scale(0.95);
    box-shadow: 0 4px 12px rgba(31, 182, 255, 0.2);
}

.bx-scroll-btn--top:hover svg {
    transform: translateY(-2px);
}

.bx-scroll-btn--bottom:hover svg {
    transform: translateY(2px);
}

/* Light Theme Styling for Scroll Nav */
body.light-theme .bx-scroll-btn {
    background: color-mix(in srgb, var(--pbi-canvas) 90%, transparent);
    border: 1px solid var(--pbi-border);
    color: var(--pbi-teal);
    box-shadow: var(--pbi-shadow);
}

body.light-theme .bx-scroll-btn:hover {
    background: var(--pbi-teal);
    color: #ffffff;
    border-color: var(--pbi-teal);
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.35);
}

@media (max-width: 768px) {
    .bx-scroll-nav {
        bottom: 18px;
        right: 18px;
        gap: 8px;
    }
    .bx-scroll-btn {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }
    .bx-scroll-btn svg {
        width: 17px;
        height: 17px;
    }
}

/* AI Analytics layout: keep chat usable beside portal left nav */
.ai-layout-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.ai-chat-app,
.ai-chat-card,
.ai-chat-input-bar,
.ai-chat-input-box,
.ai-chat-textarea,
.ai-prompt-grid {
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
}
.ai-prompt-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)) !important;
}
@media (max-width: 1400px) {
    .ai-history-sidebar:not(.open),
    .ai-history-sidebar.collapsed {
        position: fixed !important;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh !important;
        z-index: 101;
        transform: translateX(-110%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        flex: 0 0 0 !important;
        width: 300px !important;
        margin: 0 !important;
        border: none !important;
    }
    .ai-history-sidebar.open {
        position: fixed !important;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh !important;
        z-index: 101;
        transform: translateX(0) !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        width: 300px !important;
        flex: 0 0 0 !important;
    }
    .ai-layout-wrapper { gap: 0 !important; }
    .ai-chat-app { width: 100% !important; min-width: 0 !important; }
}
body.light-theme .ai-title-copy .bx-title,
body.light-theme .ai-welcome-title {
    background: none !important;
    -webkit-text-fill-color: var(--pbi-text, #122033) !important;
    color: var(--pbi-text, #122033) !important;
}
