﻿body {
    --vestex-sidebar-bg: #004e64;
    --vestex-main-bg: #337183;
    --vestex-topbar-bg: #2b6674;
}

/* Quiet registration/change information on entity cards. */
.vx-record-audit {
    flex-basis: 12rem;
    min-width: 0;
    font-size: 0.75rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

/* Subtle alphabetical previous/next navigation on entity cards. */
.vx-alpha-navigation {
    display: flex;
    justify-content: flex-end;
    gap: 0.15rem;
    margin-top: auto;
    padding-top: 0.35rem;
}

.vx-alpha-navigation .vx-alpha-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 0.72rem;
    opacity: 0.38;
    text-decoration: none;
    transition: opacity 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.vx-alpha-navigation a.vx-alpha-nav-link:hover,
.vx-alpha-navigation a.vx-alpha-nav-link:focus {
    color: var(--bs-secondary-color, #495057);
    background: rgba(108, 117, 125, 0.09);
    opacity: 0.8;
    outline: none;
}

.vx-alpha-navigation .vx-alpha-nav-link.is-disabled {
    opacity: 0.13;
}

:root {
    --vestex-sidebar-bg: #004e64;
    --vestex-main-bg: #337183;
    --vestex-topbar-bg: #2b6674;
}

html.dark,
html[data-bs-theme="dark"],
body.theme-dark,
body[data-bs-theme="dark"] {
    --vestex-sidebar-bg: #0f1b24;
    --vestex-main-bg: #16222d;
    --vestex-topbar-bg: #13202b;
    /* Shared heading tokens for Falcon and Bootstrap-based page layouts. */
    --falcon-heading-color: #e9ecef;
    --bs-heading-color: #e9ecef;
    --bs-emphasis-color: #e9ecef;
    --bs-secondary-color: #9da9bb;
}

/* BASE */
html, body {
    background-color: var(--vestex-topbar-bg) !important;
}

.container-fluid[data-layout="container"],
.container[data-layout="container"],
.content,
.main-content,
.page-content {
    background-color: var(--vestex-topbar-bg) !important;
}

/* MAIN */
main.main {
    background-color: var(--vestex-topbar-bg) !important;
}



/* SIDEBAR */
nav.navbar-vertical,
.sidebar,
.app-sidebar {
    background-color: var(--vestex-sidebar-bg) !important;
    background-image: none !important;
}

/* Ikke dobbel-lag */
.navbar-vertical-content,
#navbarVerticalCollapse,
#navbarVerticalCollapse .navbar-vertical-content,
#navbarVerticalCollapse .scrollbar {
    background-color: transparent !important;
    background-image: none !important;
}

/* TOPBAR */
.navbar-top {
    background-color: var(--vestex-topbar-bg) !important;
    background-image: none !important;
}

/* Glass av */
.navbar-glass {
    background-color: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

    .navbar-glass::before,
    .navbar-glass::after,
    .navbar-top::before,
    .navbar-top::after {
        content: none !important;
        background: none !important;
    }

/* ===== Sidebar text & icons white ===== */

.navbar-vertical .nav-link {
    color: #f1f5f7 !important;
}

    .navbar-vertical .nav-link .nav-link-icon,
    .navbar-vertical .nav-link .nav-link-icon i,
    .navbar-vertical .nav-link .fas,
    .navbar-vertical .nav-link .far,
    .navbar-vertical .nav-link .fab {
        color: #f1f5f7 !important;
    }

    /* Hover */
    .navbar-vertical .nav-link:hover {
        color: #f1f5f7 !important;
        opacity: 0.85;
    }

    /* Active */
    .navbar-vertical .nav-link.active {
        color: #f1f5f7 !important;
        font-weight: 600;
    }



/* ===== Sidebar menu row hover/active ===== */

/* Sørg for at linken fyller bredden og får bedre padding */
.navbar-vertical .nav-link {
    display: flex; /* viktig: gjør den til en "rad" */
    align-items: center;
    width: 100%;
    padding: .55rem .75rem; /* mer luft */
    margin: .10rem .50rem; /* "innrykk" fra kanten på menyen */
    border-radius: .25rem; /* mindre avrunding */
}

    /* Hover-farge som fyller hele "raden" */
    .navbar-vertical .nav-link:hover {
        background-color: rgba(255,255,255,0.14) !important;
    }

    /* Active valgt menypunkt */
    .navbar-vertical .nav-link.active {
        background-color: rgba(255,255,255,0.12) !important;
        border-radius: .25rem;
    }

    /* Litt spacing mellom ikon og tekst (om Falcon ikke allerede gir det) */
    .navbar-vertical .nav-link .nav-link-icon {
        margin-right: .55rem;
    }

    /* Hvis teksten ligger i egen span med padding, kan du justere den */
    .navbar-vertical .nav-link .nav-link-text {
        padding-left: 0 !important; /* siden vi bruker margin-right på ikon */
    }

.navbar-vertical .nav-item {
    width: 100%;
}

/* Selve raden */
.navbar-vertical .nav-link {
    margin: .10rem 0; /* ingen side-margin */
    padding: .55rem 1.25rem; /* mer indre luft */
}

    .navbar-vertical .nav-link > .d-flex {
        padding-left: 1.25rem; /* flytter ikon + tekst samlet */
        padding-right: 1.25rem;
    }



/* Topbar må ikke være transparent selv om den har navbar-glass */
.navbar-top.navbar-glass {
    background-color: var(--vestex-topbar-bg) !important;
    background-image: none !important;
}

body.theme-dark .navbar-top .nav-link,
body.theme-dark .navbar-top .navbar-brand,
body.theme-dark .navbar-top .navbar-toggler,
body.theme-dark .navbar-top .btn:not(.btn-primary):not(#newDropdownButton) {
    color: #e9ecef !important;
}

body.theme-dark .navbar-top .nav-link svg,
body.theme-dark .navbar-top .nav-link svg *,
body.theme-dark .navbar-top .navbar-toggler svg,
body.theme-dark .navbar-top .navbar-toggler svg * {
    color: #e9ecef !important;
    fill: currentColor !important;
    stroke: currentColor !important;
}

body.theme-dark .navbar-top .search-input,
body.theme-dark .navbar-top .search-box .form-control {
    background-color: #0b0f13 !important;
    border-color: #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark .navbar-top .search-input::placeholder,
body.theme-dark .navbar-top .search-box .form-control::placeholder {
    color: #9fb0bf !important;
}

.navbar-top .vx-fast-search-area {
    flex: 1 1 0;
    min-width: 0;
}

.navbar-top .vx-fast-search-box {
    width: 100%;
    max-width: 64rem;
}

.navbar-top .vx-fast-search-form {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.navbar-top .vx-fast-search-entity {
    flex: 0 0 auto;
    width: auto;
    max-width: 12rem;
    border-radius: 50rem;
    box-shadow: none;
}

.navbar-top .vx-fast-search-input-wrap {
    flex-basis: 24rem;
    /* Reserve typing space beside the match-mode selector; wrap other controls. */
    min-width: min(24rem, 100%);
}

.navbar-top .vx-fast-search-input-wrap .search-input {
    padding-right: 8rem;
}

.navbar-top .vx-fast-search-match-mode {
    position: absolute;
    top: 50%;
    right: 0.5rem;
    transform: translateY(-50%);
    width: 7.25rem;
    padding: 0.2rem 1.25rem 0.2rem 0.35rem;
    border: 0;
    border-radius: 50rem;
    background-color: transparent;
    background-position: right 0.25rem center;
    font-size: 0.75rem;
    color: var(--falcon-700, #5e6e82);
    cursor: pointer;
}

body.theme-dark .navbar-top .vx-fast-search-match-mode {
    color-scheme: dark;
    color: #9fb0bf;
}

.navbar-top .vx-fast-search-own-customers {
    display: none;
    flex: 0 0 auto;
    gap: 0.25rem;
    padding-left: 0;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 600;
    color: #f1f5f7;
}

.navbar-top .vx-fast-search-own-customers.is-visible {
    display: flex;
}

.navbar-top .vx-fast-search-own-customers .form-check-input {
    float: none;
    flex: 0 0 auto;
    margin: 0;
}

.navbar-top .vx-fast-search-own-customers .form-check-input:not(:checked) {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: #f1f5f7;
}

.navbar-top .vx-fast-search-own-customers .form-check-label {
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 1;
}

body.theme-dark .navbar-top .vx-fast-search-entity {
    background-color: #0b0f13 !important;
    border-color: #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark .navbar-top .vx-fast-search-own-customers {
    color: #f1f5f7;
}

/* ===== Force hamburger lines white ===== */
.navbar-vertical-toggle .navbar-toggle-icon,
.navbar-vertical-toggle .navbar-toggle-icon::before,
.navbar-vertical-toggle .navbar-toggle-icon::after,
.navbar-vertical-toggle .toggle-line,
.navbar-vertical-toggle .toggle-line::before,
.navbar-vertical-toggle .toggle-line::after {
    background: #f1f5f7 !important;
    border-color: #f1f5f7 !important;
}

/* Mobile hamburger */
#mobileHamburger .navbar-toggle-icon,
#mobileHamburger .navbar-toggle-icon::before,
#mobileHamburger .navbar-toggle-icon::after,
#mobileHamburger .toggle-line,
#mobileHamburger .toggle-line::before,
#mobileHamburger .toggle-line::after {
    background: #f1f5f7 !important;
    border-color: #f1f5f7 !important;
}

/* Default: vis stor logo, skjul ikon */
.brand-logo-icon {
    display: none;
}

/* Default: vis stor logo, skjul ikon */
.brand-logo-icon {
    display: none;
}

.brand-logo-full {
    display: block;
    max-width: 175px;
    height: 47px; /* <-- viktig for SVG */
    width: auto;
}

/* Når sidebaren er collapsed: skjul stor logo, vis ikon */
html.navbar-vertical-collapsed .brand-logo-full,
body.navbar-vertical-collapsed .brand-logo-full,
.navbar-vertical-collapsed .brand-logo-full {
    display: none !important;
}

html.navbar-vertical-collapsed .brand-logo-icon,
body.navbar-vertical-collapsed .brand-logo-icon,
.navbar-vertical-collapsed .brand-logo-icon {
    display: block !important;
    width: 28px;
    height: 28px;
    margin: 0 auto;
}






/* ===== Topbar New dropdown button ===== */
#newDropdownButton {
    color: #d5b785 !important; /* Lion */
    border-color: #d5b785 !important;
    background-color: transparent !important;
}

    /* Hover */
    #newDropdownButton:hover {
        background-color: #d5b785 !important;
        border-color: #d5b785 !important;
        color: #073B4C !important;
    }

    /* Active (klikket) */
    #newDropdownButton:active,
    #newDropdownButton.show {
        background-color: #caa566 !important; /* Lion 80 */
        border-color: #caa566 !important;
        color: #073B4C !important;
    }

/* =========================================================
   VESTEX FORMS + BUTTONS (HTML + Bootstrap + ASP.NET)
   Brand:
   - Midnight Green: #073B4C (eller din sidebar)
   - Lion:          #d5b785  (primary)
   - Lion hover:    #caa566
   ========================================================= */

:root {
    --vestex-primary: #d5b785; /* Lion 100 */
    --vestex-primary-hover: #caa566; /* Lion 80 */
    --vestex-ink: #073B4C; /* mørk tekst */
    --vestex-focus: rgba(213,183,133,0.28);
    --vestex-border: rgba(7,59,76,0.25);
}

/* ---------- Inputs / Select / Textarea (generelt) ---------- */
/* Treffer både Bootstrap og “rene” inputs (inkl ASP.NET) */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea {
    border-color: var(--vestex-border) !important;
}

    /* Bootstrap-klasser + fallback */
    .form-control,
    .form-select,
    textarea.form-control {
        border-color: var(--vestex-border) !important;
    }

        /* Focus (fjern blå, gi Lion-ring) */
        input:not([type="checkbox"]):not([type="radio"]):focus,
        select:focus,
        textarea:focus,
        .form-control:focus,
        .form-select:focus {
            border-color: var(--vestex-primary) !important;
            box-shadow: 0 0 0 .20rem var(--vestex-focus) !important;
            outline: none !important;
        }

        /* Hover (subtil) */
        input:not([type="checkbox"]):not([type="radio"]):hover,
        select:hover,
        textarea:hover,
        .form-control:hover,
        .form-select:hover {
            border-color: rgba(213,183,133,0.65) !important;
        }

        /* Disabled/read-only */
        input:disabled, select:disabled, textarea:disabled,
        .form-control:disabled, .form-select:disabled,
        input[readonly], textarea[readonly] {
            background-color: rgba(242,241,242,0.9) !important; /* Neutral-ish */
            opacity: 1; /* bootstrap gjør ofte 0.65 */
            cursor: not-allowed;
        }

/* ---------- Checkbox / Radio (Bootstrap 5) ---------- */
.form-check-input:focus {
    border-color: var(--vestex-primary) !important;
    box-shadow: 0 0 0 .20rem var(--vestex-focus) !important;
}

.form-check-input:checked {
    background-color: var(--vestex-primary) !important;
    border-color: var(--vestex-primary) !important;
}

/* ---------- Buttons (Bootstrap + asp:Button render) ---------- */
/* Baseline - gjør knapper litt mer “Vestex” */
.btn {
    border-radius: .45rem;
    font-weight: 500;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

/* Primary (Save/Update) */
.btn-primary {
    background-color: var(--vestex-primary) !important;
    border-color: var(--vestex-primary) !important;
    color: var(--vestex-ink) !important;
}

    .btn-primary:hover {
        background-color: var(--vestex-primary-hover) !important;
        border-color: var(--vestex-primary-hover) !important;
        color: var(--vestex-ink) !important;
    }

    .btn-primary:focus,
    .btn-primary:active,
    .btn-primary.active {
        box-shadow: 0 0 0 .20rem var(--vestex-focus) !important;
    }

/* Outline primary (New / sekundær) */
.btn-outline-primary {
    color: var(--vestex-primary) !important;
    border-color: var(--vestex-primary) !important;
}

    .btn-outline-primary:hover {
        background-color: var(--vestex-primary) !important;
        border-color: var(--vestex-primary) !important;
        color: var(--vestex-ink) !important;
    }

    .btn-outline-primary:focus,
    .btn-outline-primary:active {
        box-shadow: 0 0 0 .20rem var(--vestex-focus) !important;
    }

/* Link buttons (hvis du bruker .btn-link) */
.btn-link {
    color: var(--vestex-primary) !important;
}

    .btn-link:hover {
        color: var(--vestex-primary-hover) !important;
    }

/* ---------- Dropdown (Bootstrap) ---------- */
.dropdown-menu {
    border-color: rgba(7,59,76,0.15) !important;
}

.dropdown-item:focus,
.dropdown-item:hover {
    background-color: rgba(213,183,133,0.22) !important; /* lys Lion */
    color: var(--vestex-ink) !important;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--vestex-primary) !important;
    color: var(--vestex-ink) !important;
}

/* ---------- Listbox (HTML select multiple + ASP:ListBox) ---------- */
/* Viktig: OS styrer selve markeringa i listen i stor grad.
   Men vi kan style ramma og focus fint. */
select[multiple],
select[size] {
    border-color: var(--vestex-border) !important;
}

    select[multiple]:focus,
    select[size]:focus {
        border-color: var(--vestex-primary) !important;
        box-shadow: 0 0 0 .20rem var(--vestex-focus) !important;
    }

/* =========================================
   VESTEX Section Title Component
   ========================================= */

.section-title {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .9rem;
    background-color: #e7ebec; /* ønsket bg */
    border-radius: .6rem;
    font-weight: 600;
    color: #073B4C; /* behold mørk tekst */
}

.section-title-icon {
    color: #caa566; /* ønsket ikonfarge */
    font-size: 1rem;
}

.section-title-text {
    font-size: 1.05rem;
}


/* =========================================================
   VESTEX – Depth & Life (FINAL)
   ========================================================= */

/* Litt mer kontrast mellom bakgrunn og kort */
main.main {
    background-color: var(--vestex-topbar-bg) !important; /* matcher topbar i light/dark */
}

/* Oppgrader alle shadow-sm kort (det er disse du bruker mest) */
.card.shadow-sm,
.shadow-sm {
    box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 10px 28px rgba(0,0,0,.10) !important;
    border: 1px solid rgba(0,0,0,.06) !important;
}

/* Hover-løft (desktop) */
@media (hover: hover) {
    .card.shadow-sm:hover,
    .shadow-sm:hover {
        box-shadow: 0 2px 6px rgba(0,0,0,.08), 0 14px 34px rgba(0,0,0,.14) !important;
    }
}

/* Subtil premium-gradient på de store “hovedkortene” */
.customer-card,
.customer-right-col > .card.shadow-sm,
#customerBottomCard.card.shadow-sm {
    background: linear-gradient(to bottom, #ffffff 0%, #fbfcfd 100%) !important;
}

.btn-primary {
    box-shadow: 0 6px 18px rgba(213,183,133,.25);
}

.customer-card.shadow-sm {
    box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 18px 40px rgba(0,0,0,.12) !important;
}

/* Minimal fix: bare brand og evt. topbar-innhold */
.navbar-top {
    background-color: var(--vestex-topbar-bg) !important;
}

    .navbar-top .navbar-brand,
    .navbar-top .navbar-brand img,
    .navbar-top .search-box,
    .navbar-top .btn {
        opacity: 1 !important;
        filter: none !important;
    }

/* =========================================================
   Tabulator Pagination (catch-all)
   - dekker både Tabulator .tabulator-page og Bootstrap .page-link
   ========================================================= */

/* 1) Bootstrap-style pagination inni Tabulator footer */
.tabulator .tabulator-footer .pagination .page-link {
    background: #fff !important;
    border-color: rgba(7,59,76,.20) !important;
    color: #073B4C !important;
    border-radius: .35rem !important;
}

    .tabulator .tabulator-footer .pagination .page-link:hover {
        background: rgba(213,183,133,.18) !important;
        border-color: rgba(213,183,133,.45) !important;
        color: #073B4C !important;
    }

.tabulator .tabulator-footer .pagination .page-item.active .page-link {
    background: #d5b785 !important; /* Lion */
    border-color: #d5b785 !important;
    color: #073B4C !important;
    box-shadow: 0 6px 16px rgba(213,183,133,.25) !important;
}

/* Disabled */
.tabulator .tabulator-footer .pagination .page-item.disabled .page-link {
    opacity: .45 !important;
    background: #fff !important;
    color: #073B4C !important;
}

/* 2) Tabulator native pagination buttons (hvis det er den varianten) */
.tabulator .tabulator-footer .tabulator-page {
    border: 1px solid rgba(7,59,76,.20) !important;
    background: #fff !important;
    color: #073B4C !important;
    border-radius: .35rem !important;
}

    .tabulator .tabulator-footer .tabulator-page.active {
        background: #d5b785 !important;
        border-color: #d5b785 !important;
        color: #073B4C !important;
        box-shadow: 0 6px 16px rgba(213,183,133,.25) !important;
    }

/* Actions: keep on one line */
.tabulator .tabulator-cell .tab-actions {
    white-space: nowrap;
}

/* ================================
   Tabulator – tighter header
   ================================ */
.tabulator .tabulator-header .tabulator-col {
    padding-top: .25rem;
    padding-bottom: .25rem;
}

    .tabulator .tabulator-header .tabulator-col .tabulator-col-content {
        padding-top: .15rem;
        padding-bottom: .15rem;
    }

    .tabulator .tabulator-header .tabulator-col .tabulator-col-title {
        line-height: 1.15;
        font-size: 0.875rem; /* matcher ofte Bootstrap small */
    }

.tabulator .tabulator-tableholder .tabulator-row {
    min-height: 34px;
}

.tabulator .tabulator-cell {
    padding-top: .35rem;
    padding-bottom: .35rem;
    font-size: 0.9rem;
}

/* Tabulator: allow horizontal scroll when too narrow */
.tabulator .tabulator-tableholder {
    overflow-x: auto !important;
}

.vestex-icon {
    color: #d5b785 !important;
}

select option:checked {
    background-color: #d5b785 !important;
    color: #073B4C !important;
}


/* =========================================
   VESTEX – Cards (light surfaces on teal bg)
   Brukes på sider som ReportFilter osv.
   ========================================= */
.vestex-card {
    background: linear-gradient(to bottom, #ffffff 0%, #fbfcfd 100%) !important;
    border: 1px solid rgba(0,0,0,.06) !important;
}

    .vestex-card .card-body {
        background: transparent !important; /* bakgrunnen styres av .vestex-card */
    }

    .vestex-card .card-header {
        background-color: #e7ebec !important;
        color: #073B4C !important;
        border-bottom: 1px solid #d8dee6 !important;
    }

body.theme-dark .vestex-card {
    background: #0e141b !important;
    border-color: #2b3035 !important;
}

body.theme-dark .vestex-card .card-header {
    background-color: #0e141b !important;
    color: #e9ecef !important;
    border-bottom-color: #2b3035 !important;
}

body.theme-dark .vestex-card .card-body {
    color: #e9ecef !important;
}

body.theme-dark .report-filter-page .filter-top-container,
body.theme-dark .report-filter-page .filter-container .filter-card {
    background: #0e141b !important;
    background-image: none !important;
    border: 1px solid #2b3035 !important;
    box-shadow: none !important;
}

body.theme-dark .report-filter-page .filter-card label,
body.theme-dark .report-filter-page .filter-item label,
body.theme-dark .report-filter-page .filter-item,
body.theme-dark .report-filter-page .filter-card,
body.theme-dark .report-filter-page .filter-card span,
body.theme-dark .report-filter-page .filter-card td,
body.theme-dark .report-filter-page .filter-card .text-muted {
    color: #e9ecef !important;
}

/* Customer search uses custom panels outside the shared filter-card layout. */
body.theme-dark .customer-find-page .customer-find-main-filters,
body.theme-dark .customer-find-page .customer-find-side-filters {
    background: #121a24;
    border-color: #2b3035;
}

body.theme-dark .customer-find-page .customer-find-panel-title,
body.theme-dark .customer-find-page .customer-find-panel-title i,
body.theme-dark .customer-find-page .customer-find-panel-title svg {
    color: #e9ecef;
}

body.theme-dark .customer-find-page .customer-find-main-filters label,
body.theme-dark .customer-find-page .customer-find-side-filters label {
    color: #9da9bb;
}

/* Activity dashboard legends share the same surface in both chart tabs. */
body.theme-dark #activityDashboard .vx-activity-legend-group {
    background-color: #121a24;
    border-color: #2b3035;
}

body.theme-dark #activityDashboard .vx-activity-legend-item {
    color: #e9ecef;
}

body.theme-dark .modal-content {
    background-color: #1b2430 !important;
    background-image: none !important;
    border-color: #2b3035 !important;
    box-shadow: 0 1rem 2rem rgba(0,0,0,.45) !important;
    overflow: hidden;
}

body.theme-dark .modal-header,
body.theme-dark .modal-body,
body.theme-dark .modal-footer {
    background-color: #1b2430 !important;
    background-image: none !important;
}

body.theme-dark .modal-dialog-scrollable .modal-body,
body.theme-dark .modal-body {
    overflow-x: hidden !important;
}

body.theme-dark .modal-header {
    border-bottom-color: #2b3035 !important;
}

body.theme-dark .modal-footer {
    border-top-color: #2b3035 !important;
}

body.theme-dark #addAppointmentModal .vx-appointment-box {
    background: #121a24 !important;
    border-color: #2b3035 !important;
}

body.theme-dark #addAppointmentModal .vx-appointment-advanced {
    border-top-color: #39424e !important;
}

body.theme-dark #addAppointmentModal .vx-field-label,
body.theme-dark #addAppointmentModal .form-text,
body.theme-dark #addAppointmentModal .vx-appointment-meta-link .text-muted {
    color: #9da9bb !important;
}

body.theme-dark #addAppointmentModal .vx-time-menu {
    background: #121a24 !important;
    border-color: #2b3035 !important;
    box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.35) !important;
}

body.theme-dark #addAppointmentModal .vx-time-option {
    color: #e9ecef !important;
}

body.theme-dark #addAppointmentModal .vx-time-option:hover,
body.theme-dark #addAppointmentModal .vx-time-option:focus {
    background: #1d2733 !important;
}

body.theme-dark #addAppointmentModal .vx-time-option.vx-time-option-active {
    background: #273140 !important;
    color: #ffffff !important;
}

body.theme-dark #addAppointmentModal .vx-time-toggle {
    background: #121a24 !important;
    border-color: #556070 !important;
    color: #cfd6de !important;
}

body.theme-dark #addAppointmentModal .vx-time-toggle:hover,
body.theme-dark #addAppointmentModal .vx-time-toggle:focus {
    background: #1d2733 !important;
    border-color: #6b7785 !important;
    color: #ffffff !important;
}

body.theme-dark #addAppointmentModal .vx-richtext-editor {
    background: #121a24 !important;
    border-color: #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark #addAppointmentModal .vx-richtext-editor[contenteditable="false"] {
    background-color: #0f161f !important;
}

body.theme-dark #addAppointmentModal #appointmentWarningRow {
    background-color: #3b3120 !important;
    border-color: #6b5527 !important;
}

body.theme-dark #addAppointmentModal #appointmentWarningRow .text-dark,
body.theme-dark #addAppointmentModal #appointmentWarningRow .text-muted,
body.theme-dark #addAppointmentModal #appointmentWarningDate,
body.theme-dark #addAppointmentModal #appointmentWarningText {
    color: #f2e3b3 !important;
}

/* Dashboard line chart card background (erstatt Falcon-blå) */
.bg-line-chart-gradient {
    background: linear-gradient(135deg, var(--vestex-sidebar-bg) 0%, var(--vestex-topbar-bg) 55%, var(--vestex-main-bg) 100% ) !important;
    border: 1px solid rgba(213,183,133,0.35);
    border-radius: 0.75rem;
    box-shadow: 0 0 0 1px rgba(213,183,133,0.08), 0 10px 25px rgba(0,0,0,0.22);
}

/* Nice multi-select box height + consistent look */
.vestex-multilist {
    min-height: 140px; /* ~5 rows */
    padding-right: 0.5rem;
}

#taskFilterCard .form-text {
    font-size: .78rem;
}

/* =========================================
   VESTEX TABS (Classic Bootstrap tab look)
   - Active tab = "flik"
   - Inactive = tekst
   - Fixes the 1px seam/gap globally (no markup changes)
   ========================================= */

.vestex-tabs {
    border-bottom: 0 !important;
    gap: .35rem;
    /* IMPORTANT: make tabs sit on the baseline */
    display: flex !important;
    align-items: flex-end !important;
    padding-bottom: 0 !important;
}

    /* Default / inactive */
    .vestex-tabs .nav-link {
        border: 0 !important;
        background: transparent !important;
        color: rgba(7,59,76,0.70) !important;
        font-weight: 500;
        padding: .45rem .85rem;
        border-radius: .55rem .55rem 0 0;
        transition: color .18s ease, background-color .18s ease, opacity .18s ease;
        opacity: .85;
        /* IMPORTANT: pull tabs down to meet the panel border */
        margin-bottom: -1px !important;
    }

        /* Hover on inactive tabs */
        .vestex-tabs .nav-link:hover {
            opacity: 1;
            color: rgba(7,59,76,0.92) !important;
            background-color: rgba(213,183,133,0.10) !important;
        }

        /* Active = the "tab" */
        .vestex-tabs .nav-link.active,
        .vestex-tabs .nav-item.show .nav-link {
            opacity: 1;
            color: rgba(7,59,76,1) !important;
            background: #fff !important;
            border: 1px solid rgba(7,59,76,0.18) !important;
            border-bottom-color: #fff !important;
            border-radius: .65rem .65rem 0 0;
            position: relative;
            /* keep the pull-down so there is no seam */
            margin-bottom: -1px !important;
            font-weight: 600 !important; /* aktiv */
        }

            /* Small Vestex accent for active */
            .vestex-tabs .nav-link.active::after,
            .vestex-tabs .nav-item.show .nav-link::after {
                content: "";
                position: absolute;
                left: .75rem;
                right: .75rem;
                bottom: .25rem;
                height: 2px;
                border-radius: 999px;
                background: var(--vestex-primary);
                opacity: .55;
            }

        /* Focus ring */
        .vestex-tabs .nav-link:focus {
            outline: none !important;
            box-shadow: 0 0 0 .20rem var(--vestex-focus) !important;
        }

/* Panel under tabs */
.vestex-tab-panel {
    border: 1px solid rgba(7,59,76,0.18);
    border-top: 0;
    border-radius: 0 0 .75rem .75rem;
    background: #fff;
    padding: .90rem;
    /* Optional: avoid "air" directly under tabs */
    margin-top: 0 !important;
}

.vestex-tabs {
    border-bottom: 1px solid rgba(7,59,76,0.18) !important;
}

body.theme-dark .section-title {
    background-color: #1d2733 !important;
    border: 1px solid #34404f !important;
    color: #f5f7fa !important;
}

body.theme-dark .section-title-icon {
    color: #d5b785 !important;
}

body.theme-dark .vestex-tabs {
    border-bottom-color: #2b3035 !important;
}

body.theme-dark .vestex-tabs .nav-link {
    color: #9da9bb !important;
}

body.theme-dark .vestex-tabs .nav-link:hover {
    color: #e9ecef !important;
    background-color: rgba(213,183,133,0.10) !important;
}

body.theme-dark .vestex-tabs .nav-link.active,
body.theme-dark .vestex-tabs .nav-item.show .nav-link {
    background: #121a24 !important;
    border-color: #2b3035 !important;
    border-bottom-color: #121a24 !important;
    color: #f8f9fa !important;
}

body.theme-dark .vestex-tab-panel {
    background: #121a24 !important;
    border-color: #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark .customer-page-shell .card.shadow-sm,
body.theme-dark .customer-page-shell .vestex-tab-panel .card,
body.theme-dark .project-page-shell .card.shadow-sm,
body.theme-dark .project-page-shell .vestex-tab-panel .card {
    background: #121a24 !important;
    border-color: #2b3035 !important;
    box-shadow: 0 10px 25px rgba(0,0,0,.30) !important;
}

body.theme-dark .customer-page-shell .card.shadow-sm .card-body,
body.theme-dark .customer-page-shell .vestex-tab-panel .card .card-body,
body.theme-dark .project-page-shell .card.shadow-sm .card-body,
body.theme-dark .project-page-shell .vestex-tab-panel .card .card-body {
    background: transparent !important;
    color: #e9ecef !important;
}

body.theme-dark .customer-page-shell .so-label,
body.theme-dark .customer-page-shell .text-muted,
body.theme-dark .customer-page-shell .small,
body.theme-dark .customer-page-shell .text-500,
body.theme-dark .customer-page-shell .text-700,
body.theme-dark .project-page-shell .so-label,
body.theme-dark .project-page-shell .text-muted,
body.theme-dark .project-page-shell .small,
body.theme-dark .project-page-shell .text-500,
body.theme-dark .project-page-shell .text-700 {
    color: #9da9bb !important;
}

body.theme-dark .customer-page-shell .section-title-text,
body.theme-dark .customer-page-shell .font-sans-serif,
body.theme-dark .customer-page-shell h6,
body.theme-dark .customer-page-shell p,
body.theme-dark .customer-page-shell strong,
body.theme-dark .customer-page-shell .table,
body.theme-dark .project-page-shell .section-title-text,
body.theme-dark .project-page-shell .font-sans-serif,
body.theme-dark .project-page-shell h6,
body.theme-dark .project-page-shell p,
body.theme-dark .project-page-shell strong,
body.theme-dark .project-page-shell .table,
body.theme-dark .project-page-shell label {
    color: #e9ecef !important;
}

body.theme-dark .customer-page-shell .customer-no-pill {
    background-color: #121a24 !important;
    border: 1px solid #39424e !important;
    color: #f5f7fa !important;
}

body.theme-dark .project-page-shell .customer-no-pill {
    background-color: #121a24 !important;
    border: 1px solid #39424e !important;
    color: #f5f7fa !important;
}

body.theme-dark .project-page-shell .bg-light {
    background-color: #1b2430 !important;
    border-color: #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark .customer-page-shell .brreg-money {
    background: #1b2430 !important;
    border-color: #2b3035 !important;
}

body.theme-dark .customer-page-shell .brreg-money-label {
    color: #9da9bb !important;
}

body.theme-dark .customer-page-shell .brreg-money-value {
    color: #f5f7fa !important;
}

body.theme-dark .vx-ef-root .vx-ef-state {
    background: #121a24 !important;
    border-color: #39424e !important;
    color: #e9ecef !important;
}

body.theme-dark .vx-ef-root .vx-ef-group {
    background: #121a24 !important;
    border-color: #2b3035 !important;
}

body.theme-dark .vx-ef-root .vx-ef-group legend,
body.theme-dark .vx-ef-root .vx-ef-label,
body.theme-dark .vx-ef-root .vx-ef-state,
body.theme-dark .vx-ef-root .vx-ef-input-wrap,
body.theme-dark .vx-ef-root .vx-ef-design-switch,
body.theme-dark .vx-ef-root .vx-ef-context-menu .dropdown-item {
    color: #e9ecef !important;
}

body.theme-dark .vx-ef-root .vx-ef-field-hidden .form-control,
body.theme-dark .vx-ef-root .vx-ef-field-hidden .form-select,
body.theme-dark .vx-ef-root .vx-ef-field-hidden .form-check-input {
    background: #1b2430 !important;
    border-color: #39424e !important;
}

body.theme-dark .vx-ef-root .vx-ef-context-menu {
    background: #121a24 !important;
    border-color: #2b3035 !important;
    box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.35) !important;
}

body.theme-dark .vx-ef-root .vx-ef-context-menu .dropdown-item:hover,
body.theme-dark .vx-ef-root .vx-ef-context-menu .dropdown-item:focus,
body.theme-dark .vx-ef-root .vx-ef-context-menu .dropdown-item:active {
    background: #1b2430 !important;
    color: #ffffff !important;
}

body.theme-dark .bg-body {
    background-color: #121a24 !important;
    color: #e9ecef !important;
}

body.theme-dark .bg-body.border,
body.theme-dark .border.bg-body,
body.theme-dark .bg-body.rounded-2 {
    border-color: #2b3035 !important;
}

body.theme-dark .bg-body .form-check-label,
body.theme-dark .bg-body .form-check-input {
    color: inherit;
}

/* Customer navigation loading must not move the card or the sidebar. */
#customerNavigationStatus.alert-info,
#personNavigationStatus.alert-info,
#projectNavigationStatus.alert-info {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1040;
    width: max-content;
    max-width: calc(100vw - 2rem);
    margin: 0;
    padding: .5rem 1rem;
    border: 1px solid var(--falcon-border-color, #d8e2ef);
    border-radius: .5rem;
    background: var(--falcon-card-bg, #fff);
    color: var(--falcon-body-color, #344050);
    box-shadow: var(--falcon-box-shadow, 0 7px 14px rgba(65,69,88,.15));
    pointer-events: none;
}
body.theme-dark #customerNavigationStatus.alert-info,
body.theme-dark #personNavigationStatus.alert-info,
body.theme-dark #projectNavigationStatus.alert-info {
    background: #121a24;
    border-color: #39424e;
    color: #e9ecef;
}

/* ====== Reusable customer filter side panel ====== */
:root {
    --vx-topbar-h: 72px;
    --vx-rp-w: 360px;
    --vx-rp-splitter-w: 14px;
    --vx-rp-right-pad: 16px;
    --vx-rp-scrollbar-offset: 0px;
}
body.vx-rp-open:not(.vx-rp-overlay) #vxRightPanelHost {
    padding-right: calc(var(--vx-rp-w) + var(--vx-rp-splitter-w) + var(--vx-rp-right-pad) + var(--vx-rp-scrollbar-offset) - var(--vx-rp-host-inset, 0px));
}
#vxRightPanel.vx-rp-panel {
    position: fixed;
    top: var(--vx-topbar-h);
    bottom: 16px;
    right: calc(var(--vx-rp-right-pad) + var(--vx-rp-scrollbar-offset));
    width: var(--vx-rp-w);
    min-height: 0;
    border: 1px solid var(--falcon-border-color, #d8e2ef);
    border-radius: var(--falcon-card-border-radius, .375rem);
    box-shadow: var(--falcon-box-shadow, 0 7px 14px rgba(65,69,88,.15));
    background: var(--falcon-card-bg, #fff);
    color: var(--falcon-body-color, #344050);
    overflow: hidden;
    z-index: 900;
}
.vx-rp-content { height: 100%; min-height: 0; padding: 12px; }
#vxRightPanelSplitter.vx-rp-splitter {
    position: fixed;
    top: var(--vx-topbar-h);
    bottom: 16px;
    right: calc(var(--vx-rp-right-pad) + var(--vx-rp-scrollbar-offset) + var(--vx-rp-w));
    width: var(--vx-rp-splitter-w);
    cursor: col-resize;
    touch-action: none;
    z-index: 901;
}
.vx-rp-splitter .splitter-grip {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    display: flex; flex-direction: column; gap: 5px; padding: 10px 4px;
    border-radius: 999px; background: var(--falcon-card-bg, #fff); opacity: .7; pointer-events: none;
}
.vx-rp-splitter .splitter-grip span { width: 4px; height: 4px; border-radius: 50%; background: #6c757d; }
.vx-rp-splitter:hover .splitter-grip, .vx-rp-splitter:focus-visible .splitter-grip { opacity: 1; }
body:not(.vx-rp-open) #vxRightPanel, body:not(.vx-rp-open) #vxRightPanelSplitter { display: none; }
html.vx-split-dragging, body.vx-split-dragging { cursor: col-resize !important; user-select: none !important; }
#vxRightPanelToggle .avatar { display: flex; align-items: center; justify-content: center; }
#vxRightPanelToggle .vx-customer-filter-icon { display: block; width: 100%; height: 100%; }
.vx-customer-filter-panel { height: 100%; min-height: 0; display: flex; flex-direction: column; gap: .65rem; }
.vx-customer-filter-header, .vx-customer-filter-footer { display: flex; justify-content: space-between; align-items: center; gap: .4rem; flex-shrink: 0; }
.vx-customer-filter-fields { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem .6rem; align-items: center; }
.vx-customer-filter-fields label { font-size: .85rem; margin: 0; }
.vx-customer-filter-table { flex: 1 1 0; min-height: 0; }
.vx-sidebar-view-select { min-width: 0; flex: 1; font-weight: 600; }
.vx-sidebar-view { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; gap: .65rem; }
.vx-sidebar-view[hidden] { display: none !important; }
.vx-document-preview { overflow: hidden; }
.vx-document-preview > :not(.vx-document-preview-frame) { flex-shrink: 0; }
.vx-document-preview [hidden] { display: none !important; }
.vx-document-preview-mail-info { max-height: 32%; overflow: auto; overflow-wrap: anywhere; }
.vx-document-preview-frame { flex: 1 1 0; min-height: 0; overflow: hidden; }
.vx-document-preview-frame:empty, #vxDocumentPreviewStatus:empty { display: none; }
.vx-document-preview-frame iframe { display: block; width: 100%; height: 100%; border: 1px solid var(--falcon-border-color, #d8e2ef); background: white; }
body.vx-rp-preview-wide #vxRightPanel { width: min(1000px, calc(100vw - 48px)); z-index: 1035; }
body.vx-rp-preview-wide #vxRightPanelSplitter { display: none; }
.vx-sidebar-day-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem; flex-shrink: 0; }
.vx-sidebar-day-toolbar .form-select { width: auto; }
/* Reset Falcon's generic section padding inside the fixed-height sidebar. */
.vx-sidebar-day-section { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; gap: .4rem; padding: 0; margin: 0; }
.vx-sidebar-day-section[hidden] { display: none !important; }
.vx-sidebar-day-section > h6 { flex-shrink: 0; }
.vx-sidebar-day-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 0; }
.vx-sidebar-day-item { display: block; width: 100%; padding: .5rem; text-align: left; color: inherit; background: transparent; border: 0; border-bottom: 1px solid var(--falcon-border-color, #d8e2ef); font-size: .85rem; overflow-wrap: anywhere; }
.vx-sidebar-day-item:hover, .vx-sidebar-day-item:focus-visible { background: var(--falcon-gray-200, #edf2f9); }
.vx-sidebar-day-item:focus-visible { outline: 2px solid #b59559; outline-offset: -2px; }
.vx-sidebar-day-item-title { display: block; font-weight: 600; }
.vx-sidebar-day-item-meta { display: block; margin-top: .15rem; font-size: .8rem; }
.vx-sidebar-day-item-time { display: block; margin-bottom: .15rem; font-size: .8rem; }
#vxCustomerFilterTodayStatus:empty { display: none; }
body.theme-dark .vx-sidebar-day-item:hover, body.theme-dark .vx-sidebar-day-item:focus-visible { background: #394554; }
body.theme-dark .vx-sidebar-day-item { border-color: #30363d; }
.vx-customer-filter-footer { flex-wrap: wrap; }
#vxCustomerFilterStatus:empty { display: none; }
#vxCustomerFilterTable .tabulator-row.vx-customer-filter-active,
#vxCustomerFilterTable .tabulator-row.vx-customer-filter-active:hover {
    background: #f5ead4 !important; box-shadow: inset 3px 0 #b59559; font-weight: 600;
}
#vxCustomerFilterTable .tabulator-row.vx-customer-filter-active .tabulator-cell { background: inherit !important; color: inherit; }
#vxCustomerFilterTable .vx-customer-filter-link { color: inherit; text-decoration: none; }
#vxCustomerFilterTable .vx-customer-filter-link:focus-visible { outline: 2px solid var(--falcon-primary, #b59559); outline-offset: -2px; }
body.theme-dark #vxRightPanel { background: #131920; color: #e3e6ed; border-color: #30363d; }
body.theme-dark #vxCustomerFilterTable .tabulator-row.vx-customer-filter-active,
body.theme-dark #vxCustomerFilterTable .tabulator-row.vx-customer-filter-active:hover { background: #394554 !important; box-shadow: inset 3px 0 #d2b77e; color: #fff; }
.container-fluid[data-layout="container"] {
    padding-left: 0 !important;
    padding-right: 20px !important;
}

/* Ikke la tilfeldige SVG/overlays i topbaren stjele klikk */
.navbar-top .nav-link > span,
.navbar-top .nav-link svg,
.navbar-top .nav-link svg * {
    pointer-events: none;
}

main.main > .content,
main.main .content {
    padding-bottom: 0 !important;
}

main.main .content {
    padding: 0 !important;
}

/* =========================================================
   Infragistics WebDataGrid - shared dark mode support
   ========================================================= */
body.theme-dark .igg_Control,
html[data-bs-theme="dark"] .igg_Control {
    background-color: #121a24 !important;
    border-color: #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark .igg_Control table,
html[data-bs-theme="dark"] .igg_Control table {
    background-color: transparent !important;
    color: inherit !important;
}

body.theme-dark .igg_Header,
body.theme-dark .igg_HeaderCaption,
body.theme-dark .igg_GroupFieldHeaderCaption,
body.theme-dark .igg_HeaderRowSelector,
body.theme-dark .igg_FixedColumnHeaderCssClass,
html[data-bs-theme="dark"] .igg_Header,
html[data-bs-theme="dark"] .igg_HeaderCaption,
html[data-bs-theme="dark"] .igg_GroupFieldHeaderCaption,
html[data-bs-theme="dark"] .igg_HeaderRowSelector,
html[data-bs-theme="dark"] .igg_FixedColumnHeaderCssClass {
    background-color: #1a2430 !important;
    border-color: #2f3946 !important;
    color: #f5f7fa !important;
}

body.theme-dark tbody.igg_Item > tr > td,
body.theme-dark tbody > tr.igg_Alt > td,
body.theme-dark .igg_RowSelector,
body.theme-dark .igg_FooterRowSelector,
body.theme-dark .igg_MergedCell,
body.theme-dark .igg_MergedCellTop,
html[data-bs-theme="dark"] tbody.igg_Item > tr > td,
html[data-bs-theme="dark"] tbody > tr.igg_Alt > td,
html[data-bs-theme="dark"] .igg_RowSelector,
html[data-bs-theme="dark"] .igg_FooterRowSelector,
html[data-bs-theme="dark"] .igg_MergedCell,
html[data-bs-theme="dark"] .igg_MergedCellTop {
    background-color: #121a24 !important;
    border-color: #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark tbody.igg_Item > tr:hover > td,
body.theme-dark tbody > tr:hover > td.igg_MergedCell,
body.theme-dark tbody > tr:hover > td.igg_MergedCellTop,
html[data-bs-theme="dark"] tbody.igg_Item > tr:hover > td,
html[data-bs-theme="dark"] tbody > tr:hover > td.igg_MergedCell,
html[data-bs-theme="dark"] tbody > tr:hover > td.igg_MergedCellTop {
    background-color: #1a2430 !important;
}

body.theme-dark .igg_SelectedCell,
body.theme-dark tbody > tr > td.igg_SelectedCell,
body.theme-dark tbody > tr:hover > td.igg_SelectedCell,
body.theme-dark .igg_ActiveCell,
body.theme-dark tbody > tr > td.igg_ActiveCell,
body.theme-dark .igg_SelectedHeader,
body.theme-dark .igg_SelectedRowSelector,
body.theme-dark .igg_ActiveRowSelector,
body.theme-dark .igg_MergedCell.igg_SelectedCell,
body.theme-dark .igg_MergedCellTop.igg_SelectedCell,
body.theme-dark .igg_MergedCell.igg_ActiveCell,
html[data-bs-theme="dark"] .igg_SelectedCell,
html[data-bs-theme="dark"] tbody > tr > td.igg_SelectedCell,
html[data-bs-theme="dark"] tbody > tr:hover > td.igg_SelectedCell,
html[data-bs-theme="dark"] .igg_ActiveCell,
html[data-bs-theme="dark"] tbody > tr > td.igg_ActiveCell,
html[data-bs-theme="dark"] .igg_SelectedHeader,
html[data-bs-theme="dark"] .igg_SelectedRowSelector,
html[data-bs-theme="dark"] .igg_ActiveRowSelector,
html[data-bs-theme="dark"] .igg_MergedCell.igg_SelectedCell,
html[data-bs-theme="dark"] .igg_MergedCellTop.igg_SelectedCell,
html[data-bs-theme="dark"] .igg_MergedCell.igg_ActiveCell {
    background-color: rgba(213,183,133,0.18) !important;
    border-color: #6a5940 !important;
    color: #f8f9fa !important;
}

body.theme-dark .igg_FilterRow,
body.theme-dark tr.igg_FilterRow > td,
body.theme-dark tr.igg_FilterRowTop > td,
body.theme-dark tr.igg_FilterRowBottom > td,
body.theme-dark .igg_FilterRowCell,
body.theme-dark .igg_FilterRowTopCell,
body.theme-dark .igg_FilterRowBottomCell,
body.theme-dark .igg_FilterRuleDropDown,
body.theme-dark .igg_FilterCheckboxList,
html[data-bs-theme="dark"] .igg_FilterRow,
html[data-bs-theme="dark"] tr.igg_FilterRow > td,
html[data-bs-theme="dark"] tr.igg_FilterRowTop > td,
html[data-bs-theme="dark"] tr.igg_FilterRowBottom > td,
html[data-bs-theme="dark"] .igg_FilterRowCell,
html[data-bs-theme="dark"] .igg_FilterRowTopCell,
html[data-bs-theme="dark"] .igg_FilterRowBottomCell,
html[data-bs-theme="dark"] .igg_FilterRuleDropDown,
html[data-bs-theme="dark"] .igg_FilterCheckboxList {
    background-color: #16202b !important;
    border-color: #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark .igg_Control input,
body.theme-dark .igg_Control select,
body.theme-dark .igg_Control textarea,
body.theme-dark .igg_FilterRuleDropDown input,
body.theme-dark .igg_SummaryDropDown input,
html[data-bs-theme="dark"] .igg_Control input,
html[data-bs-theme="dark"] .igg_Control select,
html[data-bs-theme="dark"] .igg_Control textarea,
html[data-bs-theme="dark"] .igg_FilterRuleDropDown input,
html[data-bs-theme="dark"] .igg_SummaryDropDown input {
    background-color: #0b0f13 !important;
    border: 1px solid #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark .igg_Control input::placeholder,
body.theme-dark .igg_Control textarea::placeholder,
html[data-bs-theme="dark"] .igg_Control input::placeholder,
html[data-bs-theme="dark"] .igg_Control textarea::placeholder {
    color: #9fb0bf !important;
}

body.theme-dark .igg_Footer,
body.theme-dark .igg_FooterCaption,
body.theme-dark .igg_Pager,
body.theme-dark .igg_Summary,
body.theme-dark .igg_SummaryRow,
body.theme-dark .igg_SummaryRow th,
body.theme-dark .igg_HeaderScrollbarIntersection,
body.theme-dark .igg_FooterScrollbarIntersection,
body.theme-dark .igg_ScrollbarIntersection,
html[data-bs-theme="dark"] .igg_Footer,
html[data-bs-theme="dark"] .igg_FooterCaption,
html[data-bs-theme="dark"] .igg_Pager,
html[data-bs-theme="dark"] .igg_Summary,
html[data-bs-theme="dark"] .igg_SummaryRow,
html[data-bs-theme="dark"] .igg_SummaryRow th,
html[data-bs-theme="dark"] .igg_HeaderScrollbarIntersection,
html[data-bs-theme="dark"] .igg_FooterScrollbarIntersection,
html[data-bs-theme="dark"] .igg_ScrollbarIntersection {
    background-color: #1a2430 !important;
    border-color: #2b3035 !important;
    color: #dfe6ee !important;
}

body.theme-dark .igg_PageLink,
body.theme-dark .igg_SummaryButton,
body.theme-dark .igg_SummaryDropDown,
body.theme-dark .igg_SummaryDropDownItem,
html[data-bs-theme="dark"] .igg_PageLink,
html[data-bs-theme="dark"] .igg_SummaryButton,
html[data-bs-theme="dark"] .igg_SummaryDropDown,
html[data-bs-theme="dark"] .igg_SummaryDropDownItem {
    background: #121a24 !important;
    border: 1px solid #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark .igg_PageLink:hover,
body.theme-dark .igg_SummaryButton:hover,
body.theme-dark .igg_SummaryDropDownItem:hover,
html[data-bs-theme="dark"] .igg_PageLink:hover,
html[data-bs-theme="dark"] .igg_SummaryButton:hover,
html[data-bs-theme="dark"] .igg_SummaryDropDownItem:hover {
    background: #1f2b38 !important;
    border-color: #425061 !important;
}

body.theme-dark .igg_PageCurrent,
html[data-bs-theme="dark"] .igg_PageCurrent {
    background: #d5b785 !important;
    border: 1px solid #c29c58 !important;
    color: #11202b !important;
}

/* ===== Topbar theme toggle with custom sun/moon icons ===== */
.navbar-top .theme-toggle-nav-item {
    display: flex;
    align-items: center;
}

.navbar-top .theme-toggle-link {
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    cursor: pointer;
}

.navbar-top .theme-control-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.navbar-top .avatar.avatar-xl {
    width: 2rem;
    height: 2rem;
}

.navbar-top .vx-topbar-start-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f1f5f7;
    font-size: 1.85rem;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 0 1px #ffffff;
}

.navbar-top .vx-topbar-start-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
}

.navbar-top .theme-control-toggle .theme-control-toggle-icon-avatar {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* One shared frame for start, theme, profile and customer-filter icons. */
.navbar-top .vx-topbar-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: .25rem !important;
    margin: 0;
    line-height: 1;
    flex-shrink: 0;
}

.navbar-top .vx-topbar-icon-link > .avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    opacity: 1;
}

.navbar-top .vx-topbar-icon-link .icon-white {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: .9;
}

/* ===== Shared search/autocomplete result lists in dark mode ===== */
body.theme-dark .vx-search-results,
body.theme-dark .pm-customer-results,
body.theme-dark #skeieCalcProjectResults,
body.theme-dark #skeieCalcCustomerResults,
body.theme-dark .bev-project-results,
body.theme-dark .modal .position-relative > .list-group.position-absolute,
html[data-bs-theme="dark"] .vx-search-results,
html[data-bs-theme="dark"] .pm-customer-results,
html[data-bs-theme="dark"] #skeieCalcProjectResults,
html[data-bs-theme="dark"] #skeieCalcCustomerResults,
html[data-bs-theme="dark"] .bev-project-results,
html[data-bs-theme="dark"] .modal .position-relative > .list-group.position-absolute {
    background-color: #121a24 !important;
    border: 1px solid #2b3035 !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35) !important;
    z-index: 1085 !important;
    overflow: hidden;
}

body.theme-dark .vx-search-results .list-group-item,
body.theme-dark .pm-customer-results .list-group-item,
body.theme-dark #skeieCalcProjectResults .list-group-item,
body.theme-dark #skeieCalcCustomerResults .list-group-item,
body.theme-dark .bev-project-results .list-group-item,
body.theme-dark .modal .position-relative > .list-group.position-absolute .list-group-item,
html[data-bs-theme="dark"] .vx-search-results .list-group-item,
html[data-bs-theme="dark"] .pm-customer-results .list-group-item,
html[data-bs-theme="dark"] #skeieCalcProjectResults .list-group-item,
html[data-bs-theme="dark"] #skeieCalcCustomerResults .list-group-item,
html[data-bs-theme="dark"] .bev-project-results .list-group-item,
html[data-bs-theme="dark"] .modal .position-relative > .list-group.position-absolute .list-group-item {
    background-color: #121a24 !important;
    border-color: #2b3035 !important;
    color: #e9ecef !important;
}

body.theme-dark .vx-search-results .list-group-item + .list-group-item,
body.theme-dark .pm-customer-results .list-group-item + .list-group-item,
body.theme-dark #skeieCalcProjectResults .list-group-item + .list-group-item,
body.theme-dark #skeieCalcCustomerResults .list-group-item + .list-group-item,
body.theme-dark .bev-project-results .list-group-item + .list-group-item,
body.theme-dark .modal .position-relative > .list-group.position-absolute .list-group-item + .list-group-item,
html[data-bs-theme="dark"] .vx-search-results .list-group-item + .list-group-item,
html[data-bs-theme="dark"] .pm-customer-results .list-group-item + .list-group-item,
html[data-bs-theme="dark"] #skeieCalcProjectResults .list-group-item + .list-group-item,
html[data-bs-theme="dark"] #skeieCalcCustomerResults .list-group-item + .list-group-item,
html[data-bs-theme="dark"] .bev-project-results .list-group-item + .list-group-item,
html[data-bs-theme="dark"] .modal .position-relative > .list-group.position-absolute .list-group-item + .list-group-item {
    border-top-color: #253242 !important;
}

body.theme-dark .vx-search-results .list-group-item.list-group-item-action:hover,
body.theme-dark .vx-search-results .list-group-item.list-group-item-action:focus,
body.theme-dark .pm-customer-results .list-group-item.list-group-item-action:hover,
body.theme-dark .pm-customer-results .list-group-item.list-group-item-action:focus,
body.theme-dark #skeieCalcProjectResults .list-group-item.list-group-item-action:hover,
body.theme-dark #skeieCalcProjectResults .list-group-item.list-group-item-action:focus,
body.theme-dark #skeieCalcCustomerResults .list-group-item.list-group-item-action:hover,
body.theme-dark #skeieCalcCustomerResults .list-group-item.list-group-item-action:focus,
body.theme-dark .bev-project-results .list-group-item.list-group-item-action:hover,
body.theme-dark .bev-project-results .list-group-item.list-group-item-action:focus,
body.theme-dark .modal .position-relative > .list-group.position-absolute .list-group-item.list-group-item-action:hover,
body.theme-dark .modal .position-relative > .list-group.position-absolute .list-group-item.list-group-item-action:focus,
html[data-bs-theme="dark"] .vx-search-results .list-group-item.list-group-item-action:hover,
html[data-bs-theme="dark"] .vx-search-results .list-group-item.list-group-item-action:focus,
html[data-bs-theme="dark"] .pm-customer-results .list-group-item.list-group-item-action:hover,
html[data-bs-theme="dark"] .pm-customer-results .list-group-item.list-group-item-action:focus,
html[data-bs-theme="dark"] #skeieCalcProjectResults .list-group-item.list-group-item-action:hover,
html[data-bs-theme="dark"] #skeieCalcProjectResults .list-group-item.list-group-item-action:focus,
html[data-bs-theme="dark"] #skeieCalcCustomerResults .list-group-item.list-group-item-action:hover,
html[data-bs-theme="dark"] #skeieCalcCustomerResults .list-group-item.list-group-item-action:focus,
html[data-bs-theme="dark"] .bev-project-results .list-group-item.list-group-item-action:hover,
html[data-bs-theme="dark"] .bev-project-results .list-group-item.list-group-item-action:focus,
html[data-bs-theme="dark"] .modal .position-relative > .list-group.position-absolute .list-group-item.list-group-item-action:hover,
html[data-bs-theme="dark"] .modal .position-relative > .list-group.position-absolute .list-group-item.list-group-item-action:focus {
    background-color: #1b2733 !important;
    color: #ffffff !important;
}

body.theme-dark .vx-search-results .list-group-item.disabled,
body.theme-dark .pm-customer-results .list-group-item.disabled,
body.theme-dark #skeieCalcProjectResults .list-group-item.disabled,
body.theme-dark #skeieCalcCustomerResults .list-group-item.disabled,
body.theme-dark .bev-project-results .list-group-item.disabled,
html[data-bs-theme="dark"] .vx-search-results .list-group-item.disabled,
html[data-bs-theme="dark"] .pm-customer-results .list-group-item.disabled,
html[data-bs-theme="dark"] #skeieCalcProjectResults .list-group-item.disabled,
html[data-bs-theme="dark"] #skeieCalcCustomerResults .list-group-item.disabled,
html[data-bs-theme="dark"] .bev-project-results .list-group-item.disabled {
    background-color: #121a24 !important;
    color: #9fb0bf !important;
    opacity: 1;
}

/* ===== Interest setup ===== */
.interest-setup-layout {
    min-height: 0;
}

.interest-setup-group {
    overflow: hidden;
}

.interest-setup-group:last-child {
    margin-bottom: 0 !important;
}

.interest-setup-group-header {
    cursor: pointer;
    user-select: none;
}

.interest-setup-list {
    min-height: 2.25rem;
}

.interest-setup-interest {
    cursor: pointer;
    user-select: none;
}

.interest-setup-drag-handle {
    color: var(--bs-secondary-color);
    cursor: grab;
}

.interest-setup-group.dragging,
.interest-setup-interest.dragging {
    opacity: 0.45;
}

.interest-setup-group.is-selected {
    border-color: var(--bs-primary);
}

.interest-setup-interest.is-selected {
    background-color: var(--bs-primary-bg-subtle);
}

.interest-setup-list-empty {
    display: none;
    padding: 0.4rem 0.75rem;
}

.interest-setup-list > .interest-setup-list-empty:only-child {
    display: block;
}

/* ===== Interests UserControl ===== */
.vx-interests-root {
    display: block;
    position: relative;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding: 0.25rem;
}

.vx-interests-toolbar {
    display: flex;
    position: absolute;
    top: 0.25rem;
    right: 0.75rem;
    z-index: 1;
    padding: 0 0.25rem;
    background: var(--bs-body-bg, #fff);
}

.vx-interests-state {
    border: 1px dashed var(--bs-border-color, #ced4da);
    border-radius: 0.75rem;
    padding: 1rem;
    padding-right: 7rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.vx-interests-content {
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 0.25rem 0.5rem 0.5rem;
}

.vx-interest-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
    align-items: start;
}

.vx-interest-group {
    min-width: 0;
    margin: 0;
    border: 1px solid var(--bs-border-color, #ced4da);
    border-radius: 0.75rem;
    padding: 0.5rem 0.75rem 0.65rem;
    background: var(--bs-body-bg, #fff);
}

.vx-interest-group legend {
    float: none;
    width: auto;
    margin: 0 0 0.2rem 0.1rem;
    padding: 0 0.35rem;
    color: var(--bs-body-color, #495057);
    font-size: 0.95rem;
    font-weight: 600;
}

.vx-interest-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.25rem 0.75rem;
}

.vx-interest-selected-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.vx-interest-selected-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 100%;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--bs-border-color, #ced4da);
    border-radius: 999px;
    background: var(--bs-tertiary-bg, #f8f9fa);
    color: var(--bs-body-color, #495057);
    line-height: 1.25;
}

.vx-interest-selected-item .bi {
    color: var(--bs-primary, #2c7be5);
}

.vx-interest-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.25rem 0.35rem;
    border-radius: 0.35rem;
    cursor: pointer;
}

.vx-interest-option:hover {
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.vx-interest-option .form-check-input {
    flex: 0 0 auto;
    margin-top: 0.18rem;
}

.vx-interest-option-text,
.vx-interest-name {
    display: block;
    min-width: 0;
}

.vx-interest-name {
    line-height: 1.35;
}

.vx-interests-status {
    padding: 0.25rem 0.5rem 0;
}

#customerTop .customer-right-col > .card,
#customerTop .customer-right-col > .card > .card-body {
    min-height: 0;
    overflow: hidden;
}

#customerTop .customer-right-col > .card > .card-body,
#customerTop .customer-right-col .vestex-tab-panel,
.person-page .top-right-pane .tab-content {
    display: flex;
    flex-direction: column;
}

#customerTop .customer-right-col .vestex-tab-panel,
.person-page .top-right-pane .tab-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#pane-interests.active.show,
#pane-erp-addresses.active.show,
#person-interests-pane.active.show {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

@media (max-width: 767.98px) {
    .vx-interest-groups,
    .vx-interest-options {
        grid-template-columns: 1fr;
    }
}

/* Recently visited items in the main navigation. */
.navbar-vertical .vx-recent-nav-list {
    display: none;
    margin: -0.1rem 0.65rem 0.25rem 2.15rem;
    padding: 0.15rem 0 0.2rem 0.25rem;
    border-left: 1px solid var(--bs-border-color, #d8e2ef);
}

.navbar-vertical .vx-recent-nav:hover > .vx-recent-nav-list,
.navbar-vertical .vx-recent-nav:focus-within > .vx-recent-nav-list {
    display: block;
}

.navbar-vertical .vx-recent-nav-list .vx-recent-nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
    margin: 0;
    padding: 0.3rem 0.5rem;
    font-size: 0.78rem;
}

.navbar-vertical .vx-recent-nav-icon {
    flex: 0 0 auto;
    color: var(--bs-secondary-color, #748194);
    font-size: 0.68rem;
}

.navbar-vertical .vx-recent-nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 1200px) {
    .navbar-vertical .vx-recent-nav-list {
        position: fixed;
        top: var(--vx-recent-top, 0);
        left: var(--vx-recent-left, 14.5rem);
        z-index: 1060;
        width: min(26rem, calc(100vw - var(--vx-recent-left, 14.5rem) - 0.75rem));
        min-width: 20rem;
        max-height: calc(100vh - 1.5rem);
        margin: 0;
        padding: 0.4rem;
        overflow-y: auto;
        border: 1px solid var(--falcon-border-color, #d8e2ef);
        border-radius: 0.5rem;
        background: var(--falcon-card-bg, var(--bs-body-bg, #fff));
        box-shadow: 0 0.5rem 1.5rem rgba(11, 23, 39, 0.18);
    }

    .navbar-vertical .vx-recent-nav-list .vx-recent-nav-link {
        padding: 0.45rem 0.65rem;
        border-radius: 0.35rem;
        color: #344050 !important;
        font-size: 0.86rem;
        font-weight: 600;
        opacity: 1 !important;
    }

    .navbar-vertical .vx-recent-nav-list .vx-recent-nav-link:hover,
    .navbar-vertical .vx-recent-nav-list .vx-recent-nav-link:focus {
        background: var(--falcon-gray-200, var(--bs-tertiary-bg, #edf2f9));
    }

    .navbar-vertical .vx-recent-nav-list .vx-recent-nav-icon {
        color: #748194 !important;
        opacity: 1 !important;
    }

    .navbar-vertical .vx-recent-nav-list .vx-recent-nav-text {
        color: inherit !important;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    html.dark .navbar-vertical .vx-recent-nav-list,
    html[data-bs-theme="dark"] .navbar-vertical .vx-recent-nav-list,
    body.theme-dark .navbar-vertical .vx-recent-nav-list {
        border-color: #344050;
        background: #121e2d;
    }

    html.dark .navbar-vertical .vx-recent-nav-list .vx-recent-nav-link,
    html[data-bs-theme="dark"] .navbar-vertical .vx-recent-nav-list .vx-recent-nav-link,
    body.theme-dark .navbar-vertical .vx-recent-nav-list .vx-recent-nav-link {
        color: #d8e2ef !important;
    }
}

/* Context menus are separate overlays, outside the Tabulator table. */
html[data-bs-theme="dark"] .tabulator-menu,
body.theme-dark .tabulator-menu,
html[data-bs-theme="dark"] .vx-anno-media-admin .vx-context-menu,
body.theme-dark .vx-anno-media-admin .vx-context-menu {
    background: #121720;
    color: #e9ecef;
    border: 1px solid #344050;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .4);
}

html[data-bs-theme="dark"] .tabulator-menu .tabulator-menu-item,
body.theme-dark .tabulator-menu .tabulator-menu-item,
html[data-bs-theme="dark"] .vx-anno-media-admin .vx-context-menu button,
body.theme-dark .vx-anno-media-admin .vx-context-menu button {
    color: #e9ecef;
}

html[data-bs-theme="dark"] .tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover,
body.theme-dark .tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover,
html[data-bs-theme="dark"] .tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):focus-visible,
body.theme-dark .tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):focus-visible,
html[data-bs-theme="dark"] .vx-anno-media-admin .vx-context-menu button:not(:disabled):hover,
body.theme-dark .vx-anno-media-admin .vx-context-menu button:not(:disabled):hover,
html[data-bs-theme="dark"] .vx-anno-media-admin .vx-context-menu button:not(:disabled):focus,
body.theme-dark .vx-anno-media-admin .vx-context-menu button:not(:disabled):focus {
    background: #203a5c;
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .tabulator-menu .tabulator-menu-item-disabled,
body.theme-dark .tabulator-menu .tabulator-menu-item-disabled,
html[data-bs-theme="dark"] .vx-anno-media-admin .vx-context-menu button:disabled,
body.theme-dark .vx-anno-media-admin .vx-context-menu button:disabled {
    background: transparent;
    color: #8a96a8;
    opacity: 1;
    cursor: default;
}

html[data-bs-theme="dark"] .tabulator-menu .tabulator-menu-separator,
body.theme-dark .tabulator-menu .tabulator-menu-separator {
    border-top-color: #344050;
}

/* Print, Nett and Bilag share the order-line toolbar surface. */
html[data-bs-theme="dark"] .vx-so-page .vx-so-table-area,
body.theme-dark .vx-so-page .vx-so-table-area {
    background: #0e141b;
    border-color: #2b3035;
}

html[data-bs-theme="dark"] .vx-so-page .vx-so-table-toolbar,
body.theme-dark .vx-so-page .vx-so-table-toolbar {
    background: #0e141b;
    color: #e9ecef;
    border-color: #2b3035;
}

/* Person search uses the same card, filter and result layout as customer search. */
.person-find-page .person-find-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
}
.person-find-filter-grid {
    display: grid;
    grid-template-columns: minmax(430px, 560px) minmax(360px, 470px);
    gap: 1rem;
    align-items: start;
}
.person-find-panel {
    min-width: 0;
    border: 1px solid var(--bs-border-color, #d8e2ef);
    border-radius: .5rem;
    padding: .85rem;
    background: var(--bs-card-bg, #fff);
}
.person-find-panel-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .7rem;
    font-size: .9rem;
    font-weight: 700;
}
.person-find-form-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: center;
    gap: .5rem;
    margin-bottom: .5rem;
}
.person-find-form-row label {
    margin-bottom: 0;
    font-size: .85rem;
}
.person-find-form-actions,
.person-find-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}
.person-find-form-actions {
    margin-top: .75rem;
    margin-left: 110px;
}
.person-find-toolbar {
    justify-content: space-between;
}
@media (max-width: 1100px) {
    .person-find-filter-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .person-find-form-row { grid-template-columns: 96px minmax(0, 1fr); }
    .person-find-form-actions { margin-left: 0; }
}

/* Project appointment color uses the same event preview as appointment types. */
.vx-project-appointment-color-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}
.vx-project-appointment-color-row > label {
    min-width: 110px;
}
.vx-project-appointment-color-row > select {
    flex: 1 1 160px;
    max-width: 300px;
}
.vx-appointment-color-preview {
    display: flex;
    flex: 0 0 190px;
    width: 190px;
    min-height: 58px;
    flex-direction: column;
    justify-content: center;
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
}

/* Read-only appointment info: three text lines, with scrolling for longer notes. */
#addAppointmentModal .vx-richtext-editor.vx-appointment-info {
    height: calc(4.5em + 1.5rem + 2px);
    min-height: 0;
    max-height: none;
    line-height: 1.5;
    overflow: auto;
}

/* Anno HTML report rows: match the legacy colors emitted by BuildHtmlReport.
   Screen only, so printing and PDF export retain their existing light colors. */
@media screen {
    body.theme-dark .vx-anno-salgsrapport .vx-sr-html [bgcolor="#D5D5D5" i],
    html[data-bs-theme="dark"] .vx-anno-salgsrapport .vx-sr-html [bgcolor="#D5D5D5" i] {
        background-color: #263442;
    }

    body.theme-dark .vx-anno-salgsrapport .vx-sr-html [bgcolor="#EDEFF1" i],
    html[data-bs-theme="dark"] .vx-anno-salgsrapport .vx-sr-html [bgcolor="#EDEFF1" i] {
        background-color: #121b24;
    }

    body.theme-dark .vx-anno-salgsrapport .vx-sr-html [bgcolor="#DDE0E2" i],
    html[data-bs-theme="dark"] .vx-anno-salgsrapport .vx-sr-html [bgcolor="#DDE0E2" i] {
        background-color: #192631;
    }
}

/* Inactive customer: one translucent warning across the basic-info fields. */
.customer-warning-fields {
    position: relative;
    min-width: 0;
}
.customer-inactive-watermark {
    display: none;
    position: absolute;
    inset: 0;
    color: var(--falcon-danger, #e63757);
    opacity: .16;
    pointer-events: none;
    z-index: 3;
}
/* Override Font Awesome's .svg-inline--fa.fa-w-* width (normally 1em). */
.customer-warning-fields .customer-inactive-watermark > svg.svg-inline--fa,
.customer-warning-fields .customer-inactive-watermark > i {
    display: block;
    width: 100%;
    height: 100%;
}
.customer-is-inactive .customer-inactive-watermark {
    display: block;
}
.customer-inactive-menu {
    position: fixed;
    z-index: 1060;
}

/* People marked as retired in CRM filter results. */
.crm-filter-page .tabulator .tabulator-row.crm-filter-retired-row,
.crm-filter-page .tabulator .tabulator-row.crm-filter-retired-row .tabulator-cell {
    background-color: #fce6ea !important;
    color: #8a2338;
}
body.theme-dark .crm-filter-page .tabulator .tabulator-row.crm-filter-retired-row,
body.theme-dark .crm-filter-page .tabulator .tabulator-row.crm-filter-retired-row .tabulator-cell,
html[data-bs-theme="dark"] .crm-filter-page .tabulator .tabulator-row.crm-filter-retired-row,
html[data-bs-theme="dark"] .crm-filter-page .tabulator .tabulator-row.crm-filter-retired-row .tabulator-cell {
    background-color: #512b36 !important;
    color: #ffb3c2;
}
