/* ================================================================
   DARK THEME FOR ARCHITECTUI — "OBSIDIAN"
   ================================================================

   This is the platform's DEFAULT skin. It is the same skeleton every other
   ArchitectUI skin uses (dark-blue.css, dracula.css and forest.css are the
   same 8100 lines with a different palette); what makes it the rich one is
   the palette below plus the RICH SURFACE SYSTEM section at the end of this
   file, which is Dark's alone.

   The palette is the PRODUCT's palette — the one the public site and the
   project workspace already wear (static/dokie/dokie-site.css): a near-black
   navy ground with the brand sweep #2f8fd6 -> #59c26a. Keeping the two in
   step is deliberate: a visitor who signs in should not feel handed over to
   a different piece of software.

   CONTRAST. Every ink/ground pair below clears WCAG 1.4.3 AA on the body
   ground #080e19:  --foreground 16.7:1, --comment 7.0:1, --purple 5.5:1,
   --green 8.6:1, --red 5.3:1, --orange 8.7:1. That is why --comment is a
   full step brighter than the neutral grey it replaced: at #6a737d it was
   3.5:1 and failed.

   FILLED ACCENTS. #2f8fd6 carries WHITE at only 3.5:1, so a filled primary
   does not use white ink — it uses the brand sweep with the dark ink
   #04121d — 5.4:1 against the blue end of the sweep and 8.4:1 against the
   green end — exactly as the product's own buttons do. See the
   BUTTONS block in the rich section; that is the one place this skin
   deliberately departs from the shared skeleton's colour logic.
   ================================================================ */

:root {
  /* ---- Obsidian palette ------------------------------------------------
     Grounds carry a navy ink (H≈215) at a saturation that reads as black
     rather than as blue: it is what stops large dark areas going flat grey
     under a monitor's own gamma. Accents, not surfaces, carry the colour. */
  --background: #080e19;           /* the page ground */
  --current-line: #101b2c;         /* the card / panel ground, one step up */
  --foreground: #e9eff7;           /* primary ink */
  --comment: #8a9db4;              /* secondary ink, hairlines, placeholders */
  --cyan: #46b6d9;                 /* info */
  --green: #59c26a;                /* success — and the far end of the brand sweep */
  --orange: #e0a33c;               /* warning */
  --pink: #6fbdf0;                 /* hover accent (a lift of --purple, not a hue change) */
  --purple: #2f8fd6;               /* primary — the brand */
  --red: #e05a52;                  /* danger */
  --yellow: #d8c46a;
  --foreground-muted: rgba(233, 239, 247, 0.72);

  /* ---- The rich section's own tokens ----------------------------------
     Declared here so the whole file can reach them, and so a plugin author
     writing per-theme CSS (NctThemeCss / the HTML Component Studio) can pick
     the same surfaces up instead of inventing near-misses. */
  --surface-1: #0c1422;            /* a well: sidebar, table head, inputs at rest */
  --surface-2: #101b2c;            /* a card, a dialog body  (== --current-line) */
  --surface-3: #16243a;            /* raised: hover, a dialog's header strip */
  --surface-4: #1c2f49;            /* pressed / selected */
  --hairline: rgba(150, 184, 219, 0.14);   /* a card edge */
  --hairline-2: rgba(150, 184, 219, 0.24); /* a divider that has to be seen */
  --hairline-ui: rgba(168, 200, 232, 0.52);/* the edge of a CONTROL: 3.7:1 on a field, 3.5:1 on a
                                              card. WCAG 1.4.11 asks 3:1; 0.42 gave only 2.9:1. */
  --tint: rgba(255, 255, 255, 0.04);       /* the "raise" wash on a surface */
  --tint-2: rgba(255, 255, 255, 0.08);
  --brand-sweep: linear-gradient(100deg, #2f8fd6 0%, #59c26a 100%);

  /* THE PRIMARY BUTTON'S RAMP — the same blue->green idea, but solved instead of interpolated.
     `--brand-sweep` above is decoration: it runs behind a 22px knob and a 4px progress bar, where
     nothing has to be read. The button is different, because a LABEL sits on it.

     Straight-line sRGB interpolation between the two brand tokens does two measurable things:
       - it ramps LUMINANCE 0.251 -> 0.418 (x1.66) left to right. The eye does not read that as
         "two colours"; it reads it as a light source off to the right, and nothing else in this
         product is lit from the side. That mismatch is what makes the button feel tilted.
       - it passes near the neutral axis in the middle, so chroma collapses to 0.092 at frac 0.42 —
         exactly where the label sits. The brand is weakest where the eye lands.

     These stops hold luminance constant at Y = 0.30 (measured 0.2984..0.3014, x1.010) and push the
     unavoidable gamut waist out to frac 0.69, past the label's trailing edge. Measured: ink
     contrast 6.28..6.33 across the WHOLE button (was 5.43..8.43), chroma under the label 0.124
     (was 0.097), edge against a card 5.71:1 (WCAG 1.4.11 asks 3:1, and today's blue gives 4.91).

     BOTH ENDS ARE STILL THE BRAND. #3e9be3 is #2f8fd6's own hue (245.4) and its own chroma (0.138)
     lifted to Y = 0.30, and #3ea953 is #59c26a's hue (147.1) and chroma (0.158) lowered to it —
     the same two colours the logo and the public site use, lit evenly instead of re-picked. The
     middle stops ride the sRGB ceiling, which is why the waist here (0.110) is shallower than the
     endpoints-first version's (0.103).

     The waist cannot be removed, only moved: at this luminance sRGB's ceiling near hue 196 IS
     ~0.112, in any colour space. Anyone re-tuning these stops should move it, not chase it. */
  --btn-ramp: #3e9be3 0%,
              #339ce1 36%,
              #08a3c2 58%,
              #09a6a0 74%,
              #08aa77 88%,
              #3ea953 100%;
  /* The ramp is an OBJECT of a fixed width, not a stretch. Stretched to `100%`, the same class
     spends 95 degrees of hue on a 363px login button and on a 96px toolbar button, so one token
     renders as two different colours and the small one comes out an anonymous teal. Pinned, the
     rate of travel is constant: the login CTA shows the whole pair, and a small button shows the
     blue head with the turn only beginning — which is the right answer at that size. `max()` so a
     full-width button still gets a complete sweep instead of a slab and then dead green. */
  --btn-slab: 360px;
  /* HOW FAR HOVER ADVANCES THE RAMP — and it has to be a function of WIDTH, not a fixed number.
     The ramp's first 36% is a deliberately near-constant blue head (that is what parks the chroma
     waist past the label), so a fixed `-64px` moves the colour under a 110px button by dE76 = 1.7,
     which is below a just-noticeable difference: 2229 of the product's buttons are btn-sm and none
     of them had a hover state at all. Measured in-browser at 110 / 200 / 363px:
         -64px             dE  1.7 / 12.0 / 22.3     <- no hover on small buttons
         calc(30% - 32px)  dE 12.3 / 17.3 /  9.5
         calc(30% - 48px)  dE 16.9 / 21.8 / 15.6     <- this one, visible at every width
     A percentage in `background-position` resolves as p x (button width - image width), which is
     NEGATIVE while the 360px slab is wider than the button — so a positive 30% yields a leftward
     offset that grows as the button shrinks, and collapses to zero once the button is wider than
     the slab, leaving the flat -48px. Anything wider than the slab therefore exposes 48px of
     `background-color` at the right, and that is seamless by construction: the fallback colour IS
     the ramp's 100% stop, so the join is continuous in value and differs only in slope, by about
     1.2 RGB units per pixel. */
  --btn-shift: calc(30% - 48px);
  --brand-ink: #04121d;            /* ink ON the sweep */
  --brand-soft: rgba(47, 143, 214, 0.14);
  --brand-line: rgba(47, 143, 214, 0.34);
  --elev-1: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -12px rgba(0, 0, 0, .55);
  --elev-2: 0 2px 6px rgba(0, 0, 0, .40), 0 32px 64px -24px rgba(0, 0, 0, .70);
  --glow: 0 0 0 1px var(--brand-line), 0 18px 60px -22px rgba(47, 143, 214, .65);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  /* Override Bootstrap Variables */
  --bs-blue: var(--cyan); /* Or keep a blue tone if preferred */
  --bs-indigo: #5b6fd6; /* Muted indigo */
  --bs-purple: var(--purple);
  --bs-pink: var(--pink);
  --bs-red: var(--red);
  --bs-orange: var(--orange);
  --bs-yellow: var(--yellow);
  --bs-green: var(--green);
  --bs-teal: #3fb8c0; /* Custom teal derived from green/cyan */
  --bs-cyan: var(--cyan);
  --bs-white: var(--foreground); /* White becomes foreground */
  --bs-gray: var(--comment);
  --bs-gray-dark: var(--current-line);
  --bs-gray-100: #e9eff7;
  --bs-gray-200: #cbd8e6; /* Adjust grays based on foreground/background */
  --bs-gray-300: #a8bacd;
  --bs-gray-400: #6d8299;
  --bs-gray-500: var(--comment); /* Mid gray */
  --bs-gray-600: #335078; /* Darker comment */
  --bs-gray-700: var(--current-line); /* Darker gray */
  --bs-gray-800: #0f1a2a;
  --bs-gray-900: #0b1220; /* Darkest gray */
  --bs-primary: var(--purple);
  --bs-primary-rgb: 47, 143, 214;
  --bs-secondary: var(--comment);
  --bs-success: var(--green);
  --bs-info: var(--cyan);
  --bs-warning: var(--orange);
  --bs-danger: var(--red);
  --bs-light: var(--current-line); /* Light becomes current-line */
  --bs-dark: var(--background);   /* Dark becomes background */
  --bs-body-color: var(--foreground);
  --bs-body-bg: var(--background);
  --bs-link-color: var(--purple);
  --bs-link-hover-color: var(--pink);
  --bs-border-color: #22385a;      /* Neutral border */
  --bs-footer-border-color: var(--current-line);
  --bs-border-color-translucent: rgba(47, 143, 214, 0.15); /* Translucent blue border */
  --bs-table-hover-bg: #16243a; /* Much darker shade of comment color for better contrast */
  --bs-table-hover-color: var(--pink); /* Match sidebar menu hover text color */
  /* The /settings rail and Bootstrap's own utilities read these; unbridged they fall back to a
     5% black wash, which is invisible on a near-black ground. */
  --bs-secondary-bg: var(--surface-3);
  --bs-tertiary-bg: var(--tint-2);
  --bs-secondary-color: var(--comment);

  /* ArchitectUI specific potentially using bs vars */
  --bs-focus: var(--pink);
  --bs-alternate: #5aa9e2; /* Lighter blue */

  /* The browser paints scrollbars, the <select> popup, the date picker's own widget and a
     search field's clear button from this — not from any rule of ours. Without it a dark
     page gets light UA widgets. */
  color-scheme: dark;

  /* Consider if font needs changing - leave default for now */
  /* --bs-font-sans-serif: ...; */
  /* --bs-font-monospace: ...; */
}

/* ================================================================
   LOGIN BACKGROUND ANIMATION VARS — Dark
   Drives login-background-animation.css colors. The animation file
   itself is theme-agnostic; each theme defines its own palette here.
   The blobs are the brand sweep taken apart: blue, cyan and green
   drifting over the obsidian ground, so the sign-in page is the same
   picture as the marketing page a visitor arrived from.
   ================================================================ */
:root {
    --login-gradient-start: rgb(4, 7, 13);
    --login-gradient-end: rgb(16, 27, 44);
    --login-first-color: 47, 143, 214;
    --login-second-color: 70, 182, 217;
    --login-third-color: 89, 194, 106;
    --login-fourth-color: 35, 120, 182;
    --login-fifth-color: 28, 47, 73;
    --login-pointer-color: 120, 190, 240;

    --login-glass-bg: rgba(16, 27, 44, 0.72);
    --login-glass-bg-hover: rgba(18, 31, 50, 0.78);
    --login-glass-bg-focus: rgba(22, 36, 58, 0.84);
    --login-glass-border: rgba(150, 184, 219, 0.26);
    --login-glass-border-hover: rgba(47, 143, 214, 0.44);

    --login-glass-text: #e9eff7;
    --login-glass-text-muted-rgb: 233, 239, 247;

    --login-accent-rgb: 47, 143, 214;
    --login-accent-hover-rgb: 89, 194, 106;
    --login-accent-active-rgb: 35, 120, 182;

    --login-card-bg: rgba(10, 17, 32, 0.62);
    --login-slider-overlay: rgba(5, 8, 14, 0.55);
}


/**
 * Content Highlighting Styles - Dark Theme
 */
.nct-content-highlight {
    background-color: rgba(47, 143, 214, 0.2) !important;
    border: 2px solid rgba(47, 143, 214, 0.6) !important;
    box-shadow: 0 0 15px rgba(47, 143, 214, 0.4) !important;
    transition: all 0.2s ease-in-out !important;
}

/* Body background - Dark theme */
body {
  background: linear-gradient(135deg, var(--background) 0%, #04080f 50%, #060b14 100%);
  background-attachment: fixed;
  color: var(--bs-body-color);
  min-height: 100vh;
}

/* Keep basic element styling simple */
a {
  color: var(--bs-link-color);
}

a:hover {
  color: var(--bs-link-hover-color);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--bs-body-color); /* Use body color for headings */
}

.app-theme-white.app-container {
    background-color: var(--background);
}

.app-header {
    background-color: var(--current-line) !important; /* Use !important cautiously */
    border-bottom: 2px solid var(--purple) !important;
}

.app-header .app-header__content .app-header-left .search-wrapper .input-holder .search-input,
.app-header .app-header__content .app-header-left .search-wrapper .input-holder .search-icon span {
    background-color: var(--background);
    color: var(--foreground);
}
.app-header .app-header__content .app-header-left .search-wrapper.active .input-holder {
    background: var(--background);
}

.app-header .app-header__content .header-megamenu .nav-link,
.app-header .app-header__content .header-dots .btn-link {
    color: var(--foreground-muted) !important;
}

.app-header .app-header__content .header-megamenu .nav-link:hover,
.app-header .app-header__content .header-dots .btn-link:hover {
    /*color: var(--pink) !important;*/
}


.app-sidebar {
    background-color: var(--current-line) !important;
    border-right: 1px solid var(--comment) !important;
}

.app-sidebar .app-sidebar__inner {
    background-color: var(--current-line);
}

.app-sidebar .vertical-nav-menu,
.app-sidebar .metismenu-container {
    background-color: transparent;
}

.app-sidebar .vertical-nav-menu ul > li > a {
    color: var(--foreground);
    border-left: 3px solid transparent;
}

.app-sidebar .vertical-nav-menu ul > li > a:hover {
    background-color: #16243a; /* Match table hover bg for consistency */
    color: var(--pink);
    border-left-color: var(--purple);
}

.app-sidebar .vertical-nav-menu ul > li > a.mm-active,
.app-sidebar .vertical-nav-menu li > a.mm-active,
.app-sidebar .vertical-nav-menu li.mm-active > a {
    color: var(--green);
    background-color: var(--background);
    border-left-color: var(--green);
}

.app-sidebar .vertical-nav-menu .mm-collapsing:before,
.app-sidebar .vertical-nav-menu .mm-collapse:before {
    background: var(--comment);
}

.app-sidebar .nav-item-header {
    color: var(--comment);
}

/* Sidebar heading (PAGES label) */
.app-sidebar__heading {
    color: var(--comment) !important;
}

/* Hamburger menu */
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    background-color: var(--foreground-muted) !important;
}

.app-main {
    background: linear-gradient(135deg, #0a111e 0%, #080e19 100%);
}

.app-main__inner {
    background: linear-gradient(135deg, #0a111e 0%, #080e19 100%);
}

.app-page-title {
    background: rgba(8, 14, 25, 0.7); /* Slightly transparent background */
    /*border-bottom: 1px solid var(--comment);*/
}

.app-page-title .page-title-heading,
.app-page-title .page-title-subheading {
    color: var(--foreground) !important;
}

/* Footer backgrounds now use gradients - see gradient section below */
.app-footer {
    /* background-color: var(--current-line) !important; */
    border-top: 1px solid rgba(47, 143, 214, 0.3) !important;
}

.app-footer .app-footer__inner {
    /* background-color: var(--current-line) !important; */
    color: var(--comment);
}

/* === Bootstrap Overrides === */


/* === BUTTONS - See modern section below === */

/* Cards (Adjust slightly to use BS vars, remove redundant parts) */
.card {
    background: linear-gradient(135deg, #0d1624 0%, #0b1220 100%);
    border: 1px solid #0e1726;
    color: var(--bs-body-color);
}

.card-header {
    background-color: rgba(8, 14, 25, 0.5); /* Darker background */
    border-bottom: 2px solid var(--purple);
    color: var(--bs-body-color);
}

/* Ensure card title uses muted foreground color */
.card-title {
    color: var(--foreground-muted) !important;
}

/* Card title with icons */
.card-title i,
.card-title .fa,
.card-title [class^="fa-"],
.card-title [class*=" fa-"] {
    color: var(--purple) !important;
}

/* Small text elements */
.small,
small {
    color: var(--comment) !important;
}

.card-footer {
    background-color: rgba(8, 14, 25, 0.5);
    border-top: 1px solid var(--bs-footer-border-color);
    color: var(--bs-gray); /* Use gray for footer text */
}

/* Card header nav link active state */
.card-header > .nav .nav-link.active {
    color: var(--pink) !important; /* Use pink for active nav links in card headers */
    background-color: transparent !important; /* Ensure no conflicting background */
    border-color: transparent transparent var(--pink) transparent !important; /* Optional: bottom border in pink */
}

/* Card header nav link default state */
.card-header > .nav .nav-link {
    color: var(--bs-gray-400) !important; /* Lighter gray for inactive tabs */
}

/* Dropdowns (Adjust to use BS vars) */
.dropdown-menu {
    background-color: var(--current-line);
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
}

.dropdown-item {
    color: var(--bs-body-color);
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: #16243a !important; /* Match table hover bg */
    color: var(--ink-1) !important;
}

.dropdown-header {
    color: var(--bs-gray);
}

.dropdown-divider {
    border-top: 1px solid var(--bs-border-color);
}

/* Modals (Adjust to use BS vars) */
.modal-content {
    background-color: var(--bs-dark); /* Use dark for modal content bg */
    border: 2px solid var(--purple);
    color: var(--bs-body-color);
}

.modal-header {
    background-color: var(--bs-light); /* Use light for header/footer */
    border-bottom: 2px solid var(--purple);
    color: var(--bs-body-color);
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%); 
}

.modal-body {
    background-color: var(--bs-dark);
    color: var(--bs-body-color);
}

.modal-footer {
    background-color: var(--bs-light) !important;
    border-top: 1px solid var(--bs-footer-border-color) !important;
}

/* Forms (Adjust to use BS vars) */

/* === FORM CONTROLS - See modern section below === */

/* Tables (Adjust to use BS vars) */
.table {
    color: var(--bs-body-color);
    border-color: var(--bs-border-color);
    /* Set table-specific vars */
    --bs-table-bg: transparent; 
    --bs-table-accent-bg: transparent; /* Initialize with transparent */
    --bs-table-striped-bg: rgba(16, 27, 44, 0.5); /* From existing .table-striped override */
    --bs-table-striped-color: var(--bs-body-color);
    --bs-table-active-bg: rgba(47, 143, 214, 0.26); /* soft tint of --bs-primary (#2f8fd6); full primary was too bright for selected rows */
    --bs-table-active-color: var(--bs-body-color);
    --bs-table-hover-bg: #16243a !important; /* Force table to use our hover bg */
    --bs-table-hover-color: var(--pink) !important; /* Force table to use our hover text color */
}

.table > :not(caption) > * > * {
    background-color: var(--bs-table-bg);
    border-bottom-width: 1px;
    color: rgba(233, 239, 247, 0.7);
    border-color: var(--bs-border-color);
    /* Keep the box-shadow mechanism Bootstrap uses */
    box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg);
}

/* The .table-striped rule now uses the variable */
.table-striped > tbody > tr:nth-of-type(odd) {
    --bs-table-accent-bg: var(--bs-table-striped-bg);
    color: var(--bs-table-striped-color);
}

/* Force our hover styles with higher specificity and !important */
.table-hover > tbody > tr:hover {
    --bs-table-accent-bg: #16243a !important;
    color: var(--pink) !important;
}

/* Direct override to ensure table hover styling works */
.table-hover > tbody > tr:hover > * {
    background-color: #16243a !important;
    color: var(--pink) !important;
    border-color: var(--bs-border-color);
}

/* Table header backgrounds */
.table thead,
.table thead th,
.table-light thead,
.table-light thead th,
thead.table-light,
thead.table-light th {
    background-color: var(--current-line) !important;
    color: var(--foreground-muted) !important;
    border-color: var(--comment) !important;
}

/* Ensure table headers are visible and properly styled */
.table th {
    color: var(--foreground-muted) !important;
    background-color: var(--current-line) !important;
    border-bottom-color: var(--comment) !important;
}

/* Links inside tables should match table text color */
.table a,
.table a.card-title {
    color: rgba(233, 239, 247, 0.7) !important;
}

.table a:hover,
.table a.card-title:hover {
    color: rgba(233, 239, 247, 0.9) !important;
}

/* Table borders - keep outer vertical borders, remove internal cell borders */
.table-bordered {
    border: 1px solid var(--bs-border-color) !important; /* Keep outer border */
}

.table-bordered > :not(caption) > * > * {
    border-width: 0 0 1px 0 !important; /* Only bottom borders for cells */
}

/* Remove internal vertical borders only */
.table-bordered > :not(caption) > * > td + td,
.table-bordered > :not(caption) > * > th + th {
    border-left-width: 0 !important; /* Remove borders between cells */
}

/* Keep left border on first cell and right border on last cell */
.table-bordered > :not(caption) > * > td:first-child,
.table-bordered > :not(caption) > * > th:first-child {
    border-left-width: 1px !important;
}

.table-bordered > :not(caption) > * > td:last-child,
.table-bordered > :not(caption) > * > th:last-child {
    border-right-width: 1px !important;
}

/* Table Row Styling Classes - Dark Theme (Corrected) */
.table-primary {
    --bs-table-bg: rgba(47, 143, 214, 0.2);
    --bs-table-color: var(--purple);
    border-color: rgba(47, 143, 214, 0.3);
}

.table-secondary {
    --bs-table-bg: rgba(138, 157, 180, 0.2);
    --bs-table-color: var(--comment);
    border-color: rgba(138, 157, 180, 0.3);
}

.table-success {
    --bs-table-bg: rgba(89, 194, 106, 0.2);
    --bs-table-color: var(--green);
    border-color: rgba(89, 194, 106, 0.3);
}

.table-danger {
    --bs-table-bg: rgba(224, 90, 82, 0.2);
    --bs-table-color: var(--red);
    border-color: rgba(224, 90, 82, 0.3);
}

.table-warning {
    --bs-table-bg: rgba(224, 163, 60, 0.2);
    --bs-table-color: var(--orange);
    border-color: rgba(224, 163, 60, 0.3);
}

.table-info {
    --bs-table-bg: rgba(70, 182, 217, 0.2);
    --bs-table-color: var(--cyan);
    border-color: rgba(70, 182, 217, 0.3);
}

.table-light {
    --bs-table-bg: rgba(16, 27, 44, 0.35);
    --bs-table-color: var(--foreground);
    border-color: rgba(16, 27, 44, 0.4);
}

.table-dark {
    --bs-table-bg: rgba(8, 14, 25, 0.7);
    --bs-table-color: var(--foreground);
    border-color: rgba(8, 14, 25, 0.9);
}

/* Navigation (Tabs, Pills) (Adjust to use BS vars) */
.nav-tabs .nav-link {
    border-color: var(--bs-border-color);
    color: var(--bs-gray) !important;
}

.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus {
    border-color: var(--bs-primary);
    color: var(--foreground) !important;
    isolation: isolate;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--foreground) !important;
    background-color: var(--current-line) !important;
    border-color: var(--bs-border-color) var(--bs-border-color) var(--current-line) !important;
}

.nav-pills .nav-link {
    color: var(--bs-body-color);
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: var(--bs-body-color);
    background-color: var(--bs-primary);
}

/* Progress Bars (Adjust to use BS vars) */
.progress {
    background-color: var(--bs-light);
}

.progress-bar {
    background-color: var(--bs-primary);
    color: var(--bs-body-color);
}

/* List Groups (Adjust to use BS vars) */
.list-group-item {
    background-color: var(--current-line);
    border: 1px solid var(--comment);
    color: var(--foreground);
}

.list-group-item:hover {
    /* Add hover for non-active items */
    background-color: #16243a; /* Match table hover bg */
    color: var(--pink);
}

.list-group-item.active {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
    color: var(--bs-body-color);
}

.list-group-item a {
    color: var(--bs-link-color);
}

.list-group-item a:hover {
    color: var(--bs-link-hover-color);
}

/* Alerts - Dark themed */
.alert {
    background-color: var(--current-line) !important;
    border-color: var(--bs-border-color) !important;
    color: var(--foreground) !important;
}

.alert-primary {
    background-color: rgba(47, 143, 214, 0.15) !important; /* Purple with opacity */
    border-color: var(--purple) !important;
    color: var(--purple) !important;
}

.alert-info {
    background-color: rgba(70, 182, 217, 0.2) !important; /* Cyan with opacity */
    border-color: var(--cyan) !important;
    color: var(--cyan) !important;
}

.alert-success {
    background-color: rgba(89, 194, 106, 0.2) !important; /* Green with opacity */
    border-color: var(--green) !important;
    color: var(--green) !important;
}

.alert-warning {
    background-color: rgba(224, 163, 60, 0.2) !important; /* Orange with opacity */
    border-color: var(--orange) !important;
    color: var(--orange) !important;
}

.alert-danger {
    background-color: rgba(224, 90, 82, 0.2) !important; /* Red with opacity */
    border-color: var(--red) !important;
    color: var(--red) !important;
}

.alert-secondary {
    background-color: rgba(138, 157, 180, 0.2) !important; /* Comment with opacity */
    border-color: var(--comment) !important;
    color: var(--comment) !important;
}

.alert-dark {
    background-color: rgba(8, 14, 25, 0.8) !important; /* Darker background with opacity */
    border-color: var(--current-line) !important;
    color: var(--foreground) !important;
}

.alert-light {
    background-color: rgba(16, 27, 44, 0.6) !important; /* Lighter with opacity */
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
}

/* Style for all alert links */
.alert .alert-link {
    color: inherit !important;
    font-weight: bold;
    text-decoration: underline;
}

/* === Bootstrap Utility Classes - Dark Overrides === */

/* Text color utilities */
.text-primary {
    color: var(--purple) !important;
}

.text-secondary {
    color: var(--comment) !important;
}

.text-success {
    color: var(--green) !important;
}

.text-danger {
    color: var(--red) !important;
}

.text-warning {
    color: var(--orange) !important;
}

.text-info {
    color: var(--cyan) !important;
}

.text-light {
    color: var(--foreground) !important;
}

.text-dark {
    color: var(--background) !important;
}

.text-muted {
    color: var(--comment) !important;
}

/* Background color utilities */
.bg-primary {
    background-color: var(--purple) !important;
}

.bg-secondary {
    background-color: var(--comment) !important;
}

/* Badges with bg-secondary need stronger contrast for small text on dark themes.
   Higher-specificity selectors below cover badges inside table cells where the
   table's text-color override would otherwise leak in via inheritance. */
.badge.bg-secondary,
.table .badge.bg-secondary,
.table > :not(caption) > * > * .badge.bg-secondary,
span.badge.bg-secondary {
    background-color: #080d18 !important;
    color: #ffffff !important;
    border: 1px solid var(--comment) !important;
}

.bg-success {
    background-color: var(--green) !important;
}

.bg-danger {
    background-color: var(--red) !important;
}

.bg-warning {
    background-color: var(--orange) !important;
}

.bg-info {
    background-color: var(--cyan) !important;
}

.bg-light {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
}
.bg-light strong,
.bg-light label,
.bg-light .form-label,
.bg-light .form-check-label,
.bg-light small,
.bg-light .text-muted {
    color: var(--foreground) !important;
}

.bg-dark {
    background-color: var(--background) !important;
}

/* Border color utilities */
.border-primary {
    border-color: var(--purple) !important;
}

.border-secondary {
    border-color: var(--comment) !important;
}

.border-success {
    border-color: var(--green) !important;
}

.border-danger {
    border-color: var(--red) !important;
}

.border-warning {
    border-color: var(--orange) !important;
}

.border-info {
    border-color: var(--cyan) !important;
}

.border-light {
    border-color: var(--comment) !important;
}

.border-dark {
    border-color: var(--background) !important;
}

/* === Vendor Specific (Adjust to use BS vars where possible) === */

/* Accordions */
.accordion-item {
    background-color: var(--current-line); /* Use current-line for accordion items */
    border: 1px solid var(--bs-border-color);
}

.accordion-button {
    color: var(--foreground);
    background-color: var(--background) !important;
    border-color: var(--bs-border-color);
}

.accordion-button:not(.collapsed) {
    color: var(--green); /* Match active menu item color */
    background-color: var(--background) !important;
    border-color: var(--bs-border-color);
    box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

.accordion-button:after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23f8f8f2'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:not(.collapsed):after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2350fa7b'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(47, 143, 214, 0.25); /* Primary color with opacity */
    border-color: var(--purple);
    z-index: 3;
}

.accordion-button:hover {
    background-color: #16243a; /* Match table hover bg for consistency */
    color: var(--pink); /* Match hover color in sidebar */
}

.accordion-body {
    background-color: var(--current-line);
    color: var(--foreground);
    border-top: 1px solid var(--bs-border-color);
}

/* Flush accordion variant */
.accordion-flush .accordion-item {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
}

.accordion-flush .accordion-button {
    border-radius: 0;
    border-right: 0;
    border-left: 0;
}

/* Pagination */
.page-link, /* Standard Bootstrap */
.pagination li a /* ArchitectUI specific */ {
    color: var(--bs-link-color);
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
}

.page-link:hover,
.pagination li a:hover {
    color: var(--bs-link-hover-color);
    background-color: var(--bs-light); /* Lighter background on hover */
    border-color: var(--bs-border-color);
}

.page-link:focus {
    color: var(--bs-link-hover-color);
    background-color: var(--bs-light);
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(47, 143, 214, 0.25); /* var(--bs-primary) focus shadow */
}

.page-item.active .page-link,
.pagination li.active a {
    z-index: 3;
    color: var(--background) !important; /* Dark text on purple background for better contrast */
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
    font-weight: 600;
}

.page-item.active .page-link span,
.pagination li.active a span {
    color: var(--background) !important;
}

.page-item.disabled .page-link,
.pagination li.disabled a {
    color: var(--bs-gray);
    pointer-events: none;
    background-color: var(--bs-dark);
    border-color: var(--bs-border-color);
}

/* Example: Perfect Scrollbar */
.ps__rail-y:hover > .ps__thumb-y,
.ps__rail-y:focus > .ps__thumb-y,
.ps__rail-y.ps--clicking .ps__thumb-y {
    background-color: var(--bs-gray);
}
.ps__thumb-y {
    background-color: var(--bs-gray);
}

/* Example: DataTables */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    color: var(--bs-body-color) !important;
}

.dataTables_wrapper .paginate_button {
    color: var(--bs-body-color) !important;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-light);
}

.dataTables_wrapper .paginate_button.current,
.dataTables_wrapper .paginate_button.current:hover {
    color: var(--bs-body-color) !important;
    border: 1px solid var(--bs-primary);
    background: var(--bs-primary);
}

.dataTables_wrapper .paginate_button:hover {
    color: var(--bs-body-color) !important;
    border: 1px solid var(--bs-link-hover-color);
    background: var(--bs-link-hover-color);
}

.dataTables_wrapper .paginate_button.disabled,
.dataTables_wrapper .paginate_button.disabled:hover,
.dataTables_wrapper .paginate_button.disabled:active {
    color: var(--bs-gray) !important;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-light);
}

/* Example: Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--bs-body-color);
}

.select2-dropdown {
    background-color: var(--bs-light);
    border: 1px solid var(--bs-border-color);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--bs-primary);
    color: var(--bs-body-color);
}

.select2-results__option {
    color: var(--bs-body-color);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
}

/* Example: MetisMenu */
.metismenu .mm-collapse .mm-active > a {
    color: var(--bs-link-hover-color);
}

/* Add styles for other vendor components (Charts, Calendar, etc.) as you encounter them */

/* === Specific ArchitectUI Overrides (from base.css analysis) === */

/* Override .app-theme-white defaults for header/footer */
.app-theme-white .app-footer .app-footer__inner,
.app-theme-white .app-header {
    background: var(--current-line) !important; /* Override #f1f5fa */
    color: var(--foreground);
}

/* Override default vertical nav link color and hover */
.vertical-nav-menu li a {
    color: var(--foreground-muted); /* Override #0e1726 */
}

.vertical-nav-menu li a:hover,
.vertical-nav-menu li:hover > a { /* Ensure hover on li also affects link */
    background-color: var(--comment);
    color: var(--pink);
}

/* MetisMenu Item Flexbox Layout for Sidebar */
.vertical-nav-menu li.metismenu-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    position: relative;
}

.vertical-nav-menu li.metismenu-item > a {
    flex: 1;
    min-width: 0;
    padding-right: 30px;
}

.vertical-nav-menu li.metismenu-item > a:hover + .metismenu-actions-btn {
    opacity: 1;
}

.vertical-nav-menu li.metismenu-item > .metismenu-actions-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 2.4rem;
    display: flex;
    align-items: center;
    z-index: 2;
    padding: 0 8px;
    opacity: 0;
    transition: opacity 0.2s;
    color: var(--foreground-muted);
    background: transparent;
    border: none;
}

.vertical-nav-menu li.metismenu-item > .metismenu-actions-btn:hover {
    opacity: 1;
    color: var(--pink);
}

.vertical-nav-menu li.metismenu-item > ul {
    flex-basis: 100%;
    width: 100%;
}

/* Nested menu items have smaller height */
.vertical-nav-menu ul > li.metismenu-item > .metismenu-actions-btn {
    height: 2rem;
}

/* MetisMenu state icon (expand/collapse arrow) */
.vertical-nav-menu i.metismenu-state-icon {
    color: var(--comment);
    transition: transform 300ms, color 300ms;
}

.vertical-nav-menu li.mm-active > a i.metismenu-state-icon {
    color: var(--green);
    transform: rotate(-180deg);
}

.vertical-nav-menu li a:hover i.metismenu-state-icon {
    color: var(--pink);
}

/* Ensure active link styles from previous override are maintained/prioritized */
/* (Check if these need !important if the base.css rule is more specific) */
.app-sidebar .vertical-nav-menu ul > li > a.mm-active,
.app-sidebar .vertical-nav-menu li > a.mm-active,
.app-sidebar .vertical-nav-menu li.mm-active > a {
    color: var(--green) !important; /* Might need !important */
    background-color: var(--background) !important; /* Might need !important */
}

/* Override drawer background */
.drawer-content-wrapper {
    background: var(--background); /* Override #fff */
    color: var(--foreground);
}

/* General border color reset for light borders */
[class*=border] {
    border-color: var(--bs-border-color) !important;
}

/* Override common light border colors directly */
.border,
.border-top, 
.border-right, 
.border-bottom,
.border-left {
    border-color: var(--bs-border-color) !important;
}

/* Override specific app-footer border */
.app-wrapper-footer .app-footer {
    border-top: var(--bs-footer-border-color) solid 1px !important;
}

.app-wrapper-footer .app-footer .app-footer__inner {
    border-left: var(--bs-footer-border-color) solid 1px !important;
}

/* Override table cell borders */
.table > :not(:last-child) > :last-child > * {
    border-bottom-color: var(--comment) !important;
}

/* CodeMirror Dark Theme */
.CodeMirror {
    background-color: var(--background) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--bs-border-color) !important;
}

.CodeMirror-gutters {
    background-color: var(--current-line) !important;
    border-right: 1px solid var(--bs-border-color) !important;
}

.CodeMirror-linenumber {
    color: var(--comment) !important;
}

.CodeMirror-cursor {
    border-left: 1px solid var(--foreground) !important;
}

/* CodeMirror syntax highlighting */
.cm-keyword {color: var(--pink) !important;}
.cm-atom {color: var(--purple) !important;}
.cm-number {color: var(--purple) !important;}
.cm-def {color: var(--green) !important;}
.cm-variable {color: var(--foreground) !important;}
.cm-variable-2 {color: var(--cyan) !important;}
.cm-variable-3 {color: var(--yellow) !important;}
.cm-property {color: var(--cyan) !important;}
.cm-operator {color: var(--pink) !important;}
.cm-comment {color: var(--comment) !important; font-style: italic;}
.cm-string {color: var(--yellow) !important;}
.cm-string-2 {color: var(--yellow) !important;}
.cm-meta {color: var(--green) !important;}
.cm-qualifier {color: var(--green) !important;}
.cm-builtin {color: var(--cyan) !important;}
.cm-bracket {color: var(--foreground) !important;}
.cm-tag {color: var(--pink) !important;}
.cm-attribute {color: var(--green) !important;}
.cm-header {color: var(--purple) !important;}
.cm-hr {color: var(--comment) !important;}
.cm-link {color: var(--purple) !important; text-decoration: none;}
.cm-error {background: var(--red) !important; color: var(--foreground) !important;}

/* Widget charts hover effect */
.widget-chart.widget-chart-hover:hover {
    z-index: 15;
    transform: scale(1.15);
    box-shadow: 0 0.46875rem 4.1875rem rgba(0, 0, 0, 0.5), 0 0.9375rem 2.40625rem rgba(0, 0, 0, 0.5), 0 0.25rem 1.3125rem rgba(0, 0, 0, 0.6), 0 0.125rem 1.1875rem rgba(0, 0, 0, 0.6);
    cursor: pointer;
    background: var(--current-line);
    border: 1px solid var(--comment);
}

/* Tree Component Dark Theme */
.tree-theme-human div.tree-subtree {
    margin: 0 0 0 18px;
    padding: 0;
}

.tree-theme-human div.tree-branch {
    margin: 0;
    padding: 0;
}

.tree-theme-human .tree-junction {
    display: block;
    float: left;
    width: 18px;
}

.tree-theme-human .tree-junction-expanded {
    display: block;
    float: left;
    width: 18px;
    background-position: -18px center;
    background-repeat: no-repeat;
    text-decoration: none;
    filter: invert(80%) hue-rotate(180deg); /* Invert the icon to make it light */
}

.tree-theme-human .tree-junction-expanded:hover {
    background-position: -54px center;
}

.tree-theme-human .tree-junction-collapsed {
    display: block;
    float: left;
    width: 18px;
    background-position: 0 center;
    background-repeat: no-repeat;
    text-decoration: none;
    filter: invert(80%) hue-rotate(180deg); /* Invert the icon to make it light */
}

.tree-theme-human .tree-junction-collapsed:hover {
    background-position: -36px center;
}

.tree-theme-human span.tree-content {
    display: block;
    margin-left: 18px;
}

.tree-theme-human table {
    border-spacing: 0;
    border-collapse: collapse;
}

.tree-theme-human tr.selected {
    background-color: var(--purple); /* Use Dark purple for selection */
    color: var(--foreground);
}

.tree-theme-human td {
    margin: 0;
    padding: 0;
}

.tree-theme-human span.tree-content a {
    color: var(--foreground); /* Dark foreground for text */
    text-decoration: none;
}

.tree-theme-human span.tree-content a:hover {
    color: var(--pink); /* Dark pink for hover */
    text-decoration: underline;
}

.tree-theme-human span.tree-content .selected {
    background-color: var(--purple); /* Dark purple for selection */
    color: var(--foreground);
}

.tree-theme-human .tree-folder-closed {
    padding-left: 18px;
    background-image: url(folder.gif);
    background-position: 0 50%;
    background-repeat: no-repeat;
    filter: invert(80%) hue-rotate(180deg); /* Invert the icon to make it light */
}

.tree-theme-human .tree-folder-open {
    padding-left: 18px;
    background-image: url(folder.gif);
    background-position: 0 50%;
    background-repeat: no-repeat;
    filter: invert(80%) hue-rotate(180deg); /* Invert the icon to make it light */
}

.tree-theme-human .tree-folder-other {
    padding-left: 18px;
    background-image: url(folder-other.gif);
    background-position: 0 50%;
    background-repeat: no-repeat;
    filter: invert(80%) hue-rotate(180deg); /* Invert the icon to make it light */
}

/* Additional styles for the tree node buttons */
.tree-theme-human .nct-node-main-btn {
    /*background-color: var(--current-line);*/
    border-color: var(--comment);
    color: var(--foreground);
}

.tree-theme-human .nct-node-main-btn:hover {
    background-color: #16243a; /* Match table hover bg for consistency */
    color: var(--pink);
}

.tree-theme-human .nct-node-main-btn.active {
    /*background-color: var(--purple);*/
    background-color: #16243a;
    /*border-color: var(--purple);*/
    color: var(--foreground);
}

.tree-theme-human .dropdown-menu {
    background-color: var(--current-line);
    border-color: var(--comment);
}

/* General nct-node-main-btn - Dark theme (outside tree context) */
.nct-node-main-btn {
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
}

.nct-node-main-btn:hover {
    background-color: #16243a !important;
    border-color: var(--purple) !important;
    color: var(--pink) !important;
}

.nct-node-main-btn.active {
    background-color: #16243a !important;
    border-color: var(--purple) !important;
    color: var(--foreground) !important;
}

/* Empty plugin drop zone label */
.mrjun-empty-pluginl-label {
    color: var(--comment) !important;
}

.mrjun-block-dialog.show {
    background-color: var(--current-line) !important;
    background: var(--current-line) !important;
}

[class^="pe-7s-"], [class*=" pe-7s-"] {
    color: #fff;
}

/* === BPMN.io Diagram Dark Theme === */

/* Default fill and stroke for shapes if not overridden by more specific types */
.djs-shape .djs-visual > rect,
.djs-shape .djs-visual > circle,
.djs-shape .djs-visual > polygon {
    fill: var(--current-line) !important; /* Dark current line for shape backgrounds */
    stroke: var(--comment) !important;     /* Dark comment for shape borders */
    stroke-width: 1px !important;
}

/* Specific task styling */
.djs-shape.bpmn-Task .djs-visual > rect {
    fill: var(--current-line) !important;
}

/* Gateways */
.djs-shape.bpmn-Gateway .djs-visual > polygon { /* Diamond shape */
    fill: var(--current-line) !important;
    stroke: var(--purple) !important; /* Purple border for gateways */
}

/* Events */
.djs-shape.bpmn-Event .djs-visual > circle {
    fill: var(--current-line) !important;
    stroke: var(--pink) !important; /* Pink border for events */
}
.djs-shape.bpmn-StartEvent .djs-visual > circle { 
    stroke: var(--green) !important; 
    fill: rgba(89, 194, 106, 0.3) !important; /* Light green fill for start */
}
.djs-shape.bpmn-EndEvent .djs-visual > circle { 
    stroke: var(--red) !important; 
    fill: rgba(224, 90, 82, 0.3) !important; /* Light red fill for end */
}


/* Sequence Flows / Connections */
.djs-connection .djs-visual > path {
    stroke: var(--foreground) !important; /* Dark foreground for lines */
    stroke-width: 1.5px !important;
    /* marker-end: url(#dark-arrowhead) !important; /* Custom arrowhead - see note */
}

/* Styling default bpmn.io markers */
.djs-connection marker path {
    fill: var(--foreground) !important;
    stroke: none !important; /* Usually no stroke on arrowheads */
}
/* If specific classes are used for markers, e.g., .djs-arrowhead */
.djs-arrowhead {
    fill: var(--foreground) !important;
}


/* Labels / Text */
.djs-label,
.djs-label .djs-text-content, /* If text is wrapped */
text.djs-label /* Targeting the SVG text element directly */
{
    fill: var(--foreground) !important;
    color: var(--foreground) !important; /* For HTML-based labels if any (less common for main diagram) */
    font-family: inherit !important; /* Ensure it uses body font */
    font-size: 12px !important;
}

/* Pools & Lanes */
.bpmn-Pool .djs-visual > rect,
.bpmn-Lane .djs-visual > rect {
    fill: rgba(8, 14, 25, 0.7) !important; /* Slightly transparent background */
    stroke: var(--comment) !important;
    stroke-width: 1px !important;
}
.bpmn-Pool .djs-label, /* Pool/Lane header text */
.bpmn-Lane .djs-label {
    fill: var(--foreground) !important;
    color: var(--foreground) !important;
}


/* Selection outline */
.djs-outline {
    stroke: var(--purple) !important;
    stroke-width: 2px !important;
    stroke-dasharray: 3,3 !important;
    fill: none !important;
    /* fill-opacity: 0.1 !important; */ /* Optional: slight fill for selection */
    /* fill: var(--purple) !important; */
}

/* Resize/connection handles */
.djs-handle-group .djs-handle-outer,
.djs-handle-group .djs-handle-inner {
    fill: rgba(47, 143, 214, 0.5) !important; /* Semi-transparent purple */
    stroke: var(--purple) !important;
}

/* Context Pad & Palette (HTML based) */
.djs-palette {
    background-color: var(--current-line) !important;
    border: 1px solid var(--bs-border-color) !important;
}
.djs-palette .entry {
    color: var(--foreground) !important;
    opacity: 0.8 !important;
}
.djs-palette .entry:hover {
    background-color: var(--comment) !important;
    color: var(--pink) !important;
    opacity: 1 !important;
}

.djs-context-pad {
    background-color: var(--current-line) !important;
    border-radius: 4px;
    border: 1px solid var(--bs-border-color) !important;
}
.djs-context-pad .entry {
    color: var(--foreground) !important;
    background-color: var(--current-line) !important;
    border-radius: 2px;
    opacity: 0.8 !important;
}
.djs-context-pad .entry:hover {
    background-color: var(--comment) !important;
    color: var(--pink) !important;
    opacity: 1 !important;
}

/* Ensure icons within palette/context pad are visible */
.djs-palette .entry [class^="bpmn-icon-"]:before,
.djs-palette .entry [class*=" bpmn-icon-"]:before,
.djs-context-pad .entry [class^="bpmn-icon-"]:before,
.djs-context-pad .entry [class*=" bpmn-icon-"]:before {
    color: var(--foreground) !important; /* Make palette icons visible */
}
.djs-palette .entry:hover [class^="bpmn-icon-"]:before,
.djs-palette .entry:hover [class*=" bpmn-icon-"]:before,
.djs-context-pad .entry:hover [class^="bpmn-icon-"]:before,
.djs-context-pad .entry:hover [class*=" bpmn-icon-"]:before {
    color: var(--pink) !important; /* Change icon color on hover too */
}

/* BPMN.io Popup Menu (e.g., Replace Menu) Dark Theme */
.djs-popup.bpmn-replace {
    background-color: var(--current-line) !important;
    border: 1px solid var(--bs-border-color) !important;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0,0.3) !important;
}

.djs-popup-header {
    background-color: var(--background) !important; /* Slightly darker header */
    padding: 8px 12px !important;
    border-bottom: 1px solid var(--bs-border-color) !important;
}

.djs-popup-title {
    color: var(--foreground) !important;
    font-size: 1em !important;
    font-weight: bold;
}

.djs-popup-header-group .entry {
    color: var(--foreground) !important;
    background: transparent !important;
    border: none !important;
    opacity: 0.8;
}

.djs-popup-header-group .entry:hover {
    color: var(--pink) !important;
    opacity: 1;
}

.djs-popup-header-group .entry [class^="bpmn-icon-"]:before,
.djs-popup-header-group .entry [class*=" bpmn-icon-"]:before {
    color: var(--foreground) !important;
}

.djs-popup-header-group .entry:hover [class^="bpmn-icon-"]:before,
.djs-popup-header-group .entry:hover [class*=" bpmn-icon-"]:before {
    color: var(--pink) !important;
}

.djs-popup-body {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
}

.djs-popup-search input[type="text"] {
    background-color: var(--background) !important;
    border: 1px solid var(--bs-border-color) !important;
    color: var(--foreground) !important;
    border-radius: 3px;
    padding: 6px 10px 6px 30px !important; /* Add padding for icon */
}

.djs-popup-search .djs-popup-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
}

.djs-popup-search .djs-popup-search-icon path {
    fill: var(--comment) !important; /* Search icon color */
}

.djs-popup-results {
    max-height: 250px;
    overflow-y: auto;
}

.djs-popup-results .entry {
    color: var(--foreground) !important;
    padding: 8px 12px !important;
    border-bottom: 1px solid var(--background) !important; /* Separator lines */
    cursor: pointer;
}

.djs-popup-results .entry:last-child {
    border-bottom: none !important;
}

.djs-popup-results .entry:hover, 
.djs-popup-results .entry.selected {
    background-color: #16243a !important; /* Consistent dark hover */
    color: var(--pink) !important;
}

.djs-popup-results .entry .djs-popup-label {
    color: inherit !important; /* Inherit from parent .entry */
}

/* Icons within the replace menu entries */
.djs-popup-results .entry [class^="bpmn-icon-"]:before,
.djs-popup-results .entry [class*=" bpmn-icon-"]:before {
    color: var(--foreground) !important;
}

.djs-popup-results .entry:hover [class^="bpmn-icon-"]:before,
.djs-popup-results .entry:hover [class*=" bpmn-icon-"]:before,
.djs-popup-results .entry.selected [class^="bpmn-icon-"]:before,
.djs-popup-results .entry.selected [class*=" bpmn-icon-"]:before {
    color: var(--pink) !important;
}

.djs-shape .djs-visual > rect[style*="stroke: green"],
.djs-shape .djs-visual > circle[style*="stroke: green"],
.djs-shape .djs-visual > polygon[style*="stroke: green"] {
    stroke: green !important;
    fill: green !important;
}

.nav-link {
    color: var(--foreground);
}

.nav-link:hover {
    background-color: var(--comment);
    color: var(--pink);
}

.nav-link .nav-link-icon {
    color: var(--foreground);
}

.nav-link .nav-link-icon:hover {
    color: var(--pink);
}

.tree-theme-human span.tree-content {
    color: var(--foreground) !important;
}

/* === Wicket Autocomplete Dropdown - Dark Theme === */

/* Main autocomplete container */
.wicket-aa-container {
    background-color: var(--current-line) !important;
    border: 1px solid var(--comment) !important;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    z-index: 99999999 !important;
    position: absolute !important;
}

/* Inner autocomplete wrapper */
.wicket-aa {
    background-color: var(--current-line);
    border-radius: 4px;
    overflow: hidden;
}

/* Autocomplete list */
.wicket-aa ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background-color: var(--current-line);
    border: none !important;
    max-height: 200px;
    overflow-y: auto;
}

/* Individual list items */
.wicket-aa ul li {
    padding: 8px 12px !important;
    margin: 0 !important;
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
    border: none !important;
    border-bottom: 1px solid rgba(138, 157, 180, 0.2) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1.4;
}

/* Remove border from last item */
.wicket-aa ul li:last-child {
    border-bottom: none !important;
}

/* Hover state */
.wicket-aa ul li:hover {
    background-color: #16243a !important; /* Match table hover bg */
    color: var(--pink) !important; /* Match sidebar menu hover text color */
}

/* Selected state */
.wicket-aa ul li.selected {
    background-color: var(--purple) !important;
    color: var(--foreground) !important;
    font-weight: 500;
}

/* Selected item on hover */
.wicket-aa ul li.selected:hover {
    background-color: var(--pink) !important;
    color: var(--background) !important;
}

/* Scrollbar styling for autocomplete */
.wicket-aa ul::-webkit-scrollbar {
    width: 6px;
}

.wicket-aa ul::-webkit-scrollbar-track {
    background: var(--background);
}

.wicket-aa ul::-webkit-scrollbar-thumb {
    background: var(--comment);
    border-radius: 3px;
}

.wicket-aa ul::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}

/* Alternative scrollbar styles for Firefox */
.wicket-aa ul {
    scrollbar-width: thin;
    scrollbar-color: var(--comment) var(--background);
}

/* Loading state (if applicable) */
.wicket-aa-loading {
    padding: 12px !important;
    text-align: center;
    color: var(--comment) !important;
    background-color: var(--current-line) !important;
    font-style: italic;
}

/* No results state (if applicable) */
.wicket-aa-no-results {
    padding: 12px !important;
    text-align: center;
    color: var(--comment) !important;
    background-color: var(--current-line) !important;
    font-style: italic;
}

/* Focus outline for accessibility */
.wicket-aa ul li:focus {
    outline: 2px solid var(--purple);
    outline-offset: -2px;
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .wicket-aa ul li {
        border-bottom-color: var(--comment) !important;
    }
    
    .wicket-aa ul li:hover {
        background-color: var(--background) !important;
        border: 1px solid var(--pink) !important;
    }
    
    .wicket-aa ul li.selected {
        border: 2px solid var(--purple) !important;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .wicket-aa ul li {
        transition: none;
    }
}

/* === FILE UPLOAD COMPONENT - DARK COLORS ONLY === */

/* File Upload Area - Colors Only */
.file-upload-area {
    border-color: var(--comment);
    background-color: var(--background);
    color: var(--foreground);
}

.file-upload-area:hover,
.file-upload-area:focus {
    border-color: var(--cyan);
    background-color: var(--current-line);
}

.file-upload-area.drag-over,
.file-upload-area.dragover {
    border-color: var(--green);
    background-color: rgba(89, 194, 106, 0.1);
}

.file-upload-area .upload-content {
    color: var(--foreground);
}

.file-upload-area .text-muted {
    color: var(--comment) !important;
}

.file-upload-area:hover .text-muted {
    color: var(--foreground) !important;
}

/* File Cards - Colors Only */
.file-card {
    background: var(--current-line);
    border-color: var(--comment);
}

.file-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 4px 12px rgba(70, 182, 217, 0.2);
}

/* File Names - Colors Only */
.file-name {
    color: var(--foreground) !important;
}

/* File Download Links - Colors Only */
.file-download-link {
    color: var(--foreground) !important;
}

.file-download-link:hover {
    color: var(--cyan) !important;
}

.file-download-link:focus {
    outline-color: var(--cyan);
}

/* File Remove Buttons - Colors Only */
.file-remove-btn {
    border-color: var(--red) !important;
    color: var(--red) !important;
}

.file-remove-btn:hover {
    background: var(--red) !important;
    color: var(--background) !important;
    border-color: var(--red) !important;
}

.file-remove-btn:focus {
    outline-color: var(--red);
}

/* Upload Messages - Colors Only */
.upload-message.success,
.alert-success {
    background-color: rgba(89, 194, 106, 0.2);
    color: var(--green);
    border-color: rgba(89, 194, 106, 0.4);
}

.upload-message.error,
.alert-danger {
    background-color: rgba(224, 90, 82, 0.2);
    color: var(--red);
    border-color: rgba(224, 90, 82, 0.4);
}

.upload-message.warning,
.alert-warning {
    background-color: rgba(224, 163, 60, 0.2);
    color: var(--orange);
    border-color: rgba(224, 163, 60, 0.4);
}

/* Focus - Colors Only */
.file-upload-area:focus-visible {
    outline-color: var(--cyan);
}

.file-actions .btn:focus-visible {
    outline-color: var(--cyan);
}

svg.new-parent, .djs-container .svg.new-parent {
    background: var(--current-line) !important;
}

/* === TABS LG ALTERNATE - FULL DARK THEME === */

/* Tab container background */
.tabs-lg-alternate.card-header {
    background-color: var(--current-line) !important;
    border-bottom: 1px solid var(--comment) !important;
}

/* Tab navigation list */
.tabs-lg-alternate ul.nav {
    background-color: transparent !important;
}

/* Individual tab items */
.tabs-lg-alternate .nav-item {
    background-color: transparent !important;
}

/* Tab links - default state (unselected) */
.tabs-lg-alternate .nav-link {
    background-color: var(--background) !important; /* Dark background for unselected tabs */
    color: var(--comment) !important; /* Muted color for unselected */
    border: 1px solid var(--comment) !important;
    border-bottom: none !important;
    transition: all 0.2s ease;
}

/* Tab links - hover state */
.tabs-lg-alternate .nav-link:hover {
    background-color: #16243a !important; /* Slightly lighter on hover */
    color: var(--foreground) !important;
    border-color: var(--purple) !important;
}

/* Tab links - active/selected state */
.tabs-lg-alternate .nav-link.active {
    background-color: var(--current-line) !important; /* Match card body background */
    color: var(--pink) !important; /* Pink for active tab text */
    border-color: var(--purple) !important;
    border-bottom: 1px solid var(--current-line) !important; /* Hide bottom border to connect with content */
    position: relative;
    z-index: 2;
}

/* Tab content styling */
.tabs-lg-alternate .widget-number {
    color: inherit !important; /* Inherit color from parent nav-link */
    font-weight: 600;
    font-size: 1.1rem;
}

.tabs-lg-alternate .tab-subheading {
    color: inherit !important;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Active tab content emphasis */
.tabs-lg-alternate .nav-link.active .widget-number {
    color: var(--pink) !important;
}

.tabs-lg-alternate .nav-link.active .tab-subheading {
    color: var(--foreground) !important;
    opacity: 1;
}

/* Tab focus state for accessibility */
.tabs-lg-alternate .nav-link:focus {
    outline: 2px solid var(--purple) !important;
    outline-offset: -2px;
    box-shadow: none !important;
}

/* Remove any default Bootstrap tab styling that might interfere */
.tabs-lg-alternate .nav-tabs {
    border-bottom: none !important;
}

.tabs-lg-alternate .nav-justified > .nav-link {
    flex: 1 1 auto;
    text-align: center;
}

/* Fix the ::before pseudo-element for Dark theme */
.tabs-lg-alternate.card-header > .nav .nav-link::before {
    background: var(--comment) !important; /* Use comment color instead of white */
    border-radius: 0;
}

/* Active state for ::before element */
.tabs-lg-alternate.card-header > .nav .nav-link.active::before {
    background: var(--pink) !important; /* Pink indicator for active tab */
}

/* Hover state for ::before element */
.tabs-lg-alternate.card-header > .nav .nav-link:hover::before {
    background: var(--purple) !important; /* Purple on hover */
}
/* === COMMENTS FORM CONTROL - DARK THEME === */

/* Main comments container */
.comments-control-container {
    background-color: transparent;
    color: var(--foreground);
}

/* New comment section card */
.comments-control-container .new-comment-section .card {
    background-color: var(--current-line) !important;
    border: 1px solid var(--comment) !important;
}

.comments-control-container .new-comment-section .card-title {
    color: var(--foreground) !important;
}

.comments-control-container .new-comment-section .card-title i {
    color: var(--purple) !important;
}

/* Comment textarea */
.comments-control-container .new-comment-textarea,
.comments-control-container .reply-textarea {
    background-color: var(--background) !important;
    border: 1px solid var(--comment) !important;
    color: var(--foreground) !important;
}

.comments-control-container .new-comment-textarea:focus,
.comments-control-container .reply-textarea:focus {
    background-color: var(--background) !important;
    border-color: var(--purple) !important;
    color: var(--foreground) !important;
    box-shadow: 0 0 0 0.25rem rgba(47, 143, 214, 0.25) !important;
}

.comments-control-container .new-comment-textarea::placeholder,
.comments-control-container .reply-textarea::placeholder {
    color: var(--comment) !important;
    opacity: 0.7;
}

/* Add comment button */
.add-comment-btn {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
    color: var(--background) !important;
}

.add-comment-btn:hover {
    background-color: var(--pink) !important;
    border-color: var(--pink) !important;
    color: var(--background) !important;
}

/* Comment cards */
.comments-control-container .comment-item .card {
    background-color: var(--current-line) !important;
    border: 1px solid var(--comment) !important;
}

.comments-control-container .comment-item .card:hover {
    border-color: var(--purple) !important;
    box-shadow: 0 0.5rem 1rem rgba(47, 143, 214, 0.15) !important;
}

/* Comment author */
.comments-control-container .comment-author {
    color: var(--purple) !important;
}

.comments-control-container .comment-author i {
    color: var(--purple) !important;
}

/* Comment timestamp */
.comments-control-container .comment-timestamp {
    color: var(--comment) !important;
}

/* Comment text */
.comments-control-container .comment-text {
    color: var(--foreground) !important;
}

/* Reply button */
.comments-control-container .reply-btn {
    background-color: transparent !important;
    border-color: var(--purple) !important;
    color: var(--purple) !important;
}

.comments-control-container .reply-btn:hover {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
    color: var(--background) !important;
}

/* Reply section */
.comments-control-container .reply-section {
    background-color: var(--background) !important;
    border: 1px solid var(--comment) !important;
}

/* Submit reply button */
.comments-control-container .submit-reply-btn {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
    color: var(--background) !important;
}

.comments-control-container .submit-reply-btn:hover {
    background-color: var(--pink) !important;
    border-color: var(--pink) !important;
    color: var(--background) !important;
}

/* Cancel reply button */
.comments-control-container .cancel-reply-btn {
    background-color: transparent !important;
    border-color: var(--comment) !important;
    color: var(--comment) !important;
}

.comments-control-container .cancel-reply-btn:hover {
    background-color: var(--comment) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
}

/* Answers/Replies section */
.comments-control-container .answer-item {
    border-left-color: var(--purple) !important;
}

.comments-control-container .answer-item .card {
    background-color: rgba(16, 27, 44, 0.5) !important;
    border: none !important;
}

.comments-control-container .answer-item .card:hover {
    background-color: rgba(16, 27, 44, 0.8) !important;
}

/* Answer author */
.comments-control-container .answer-author {
    color: var(--cyan) !important;
}

.comments-control-container .answer-author i {
    color: var(--cyan) !important;
}

/* Answer timestamp */
.comments-control-container .answer-timestamp {
    color: var(--comment) !important;
}

/* Answer text */
.comments-control-container .answer-text {
    color: var(--foreground) !important;
}

/* Icon colors */
.comments-control-container .fa-comment-dots {
    color: var(--purple) !important;
}

.comments-control-container .fa-user-circle {
    color: var(--purple) !important;
}

.comments-control-container .fa-clock {
    color: var(--comment) !important;
}

/* Scrollbar for comments container */
.comments-control-container::-webkit-scrollbar {
    width: 6px;
}

.comments-control-container::-webkit-scrollbar-track {
    background: var(--background);
}

.comments-control-container::-webkit-scrollbar-thumb {
    background: var(--comment);
    border-radius: 3px;
}

.comments-control-container::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}

/* Animation tweaks for dark theme */
.comments-control-container .comment-item {
    animation: fadeIn 0.3s ease-in;
}

.comments-control-container .answer-item {
    animation: slideIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================= */
/* Pe7s Icon Components - Dark Theme Override */
/* ============================================= */

/* Pe7s Dropdown Field Display */
.pe7s-icon-display {
    background: var(--background) !important;
    border-color: var(--comment) !important;
}

.pe7s-icon-display:hover {
    border-color: var(--cyan) !important;
    box-shadow: 0 0 0 0.2rem rgba(47, 143, 214, 0.25) !important;
}

.pe7s-display-icon {
    color: var(--cyan) !important;
}

.pe7s-display-text {
    color: var(--foreground) !important;
}

.pe7s-display-text.pe7s-placeholder {
    color: var(--comment) !important;
}

.pe7s-display-arrow {
    color: var(--comment) !important;
}

/* Pe7s Icon Chooser Panel */
.pe7s-icon-chooser-panel .icon-wrapper:hover {
    background-color: var(--current-line) !important;
    border-color: var(--cyan) !important;
}

.pe7s-icon-chooser-panel .icon-wrapper:hover .pe-icon {
    color: var(--cyan) !important;
}

.pe7s-icon-chooser-panel .icon-wrapper:hover .icon-name {
    color: var(--yellow) !important;
}

/* ============================================= */
/* AI Chat Panel Styles - Dark Theme (COLORS ONLY) */
/* ============================================= */

/* Main Panel */
.ai-chat-panel {
    /*background-color: var(--background);*/
}

/* Settings */
.chat-settings-container {
    border-bottom-color: var(--comment);
    background-color: var(--current-line);
}

.setting-label {
    color: var(--foreground);
}

.model-select {
    background-color: var(--background);
    color: var(--foreground);
    border-color: var(--comment);
}

/* Conversations */
.conversations-container {
    border-bottom-color: var(--comment);
}

.new-conversation-wrapper {
    border-bottom-color: var(--comment);
}

.conversation-item {
    border-bottom-color: var(--current-line);
    border-left-color: transparent;
    transition: background-color 0.2s;
}

.conversation-item:hover {
    background-color: var(--current-line);
}

.conversation-item.active {
    background-color: rgba(70, 182, 217, 0.1);
    border-left-color: var(--cyan);
}

.conversation-title {
    color: var(--foreground);
}

.conversation-time {
    color: var(--comment);
}

.btn-delete {
    background: none;
    border: none;
    color: var(--comment);
    transition: opacity 0.2s;
}

.btn-delete:hover {
    color: var(--red);
}

/* Chat Area */
.chat-area {
    /*background-color: var(--background);*/
}

.empty-state-content {
    color: var(--comment);
}

/* Messages */
.message-wrapper.message-user .message-content {
    background-color: var(--purple);
    color: var(--background);
}

.message-wrapper.message-assistant .message-content {
    background-color: var(--current-line);
    border-color: var(--comment);
    color: var(--foreground);
}

.message-time {
    color: rgba(233, 239, 247, 0.5);
}

.message-wrapper.message-user .message-time {
    color: rgba(8, 14, 25, 0.7);
}

/* Thinking / Reasoning */
.thinking-wrapper {
    /* All styling moved to ChatMessagesPanel.css - themes only handle colors */
}

.thinking-header {
    color: rgba(224, 163, 60, 0.6); /* Subtle yellow/amber with opacity */
}

.thinking-header:hover {
    color: rgba(224, 163, 60, 0.8); /* Slightly more visible on hover */
}

.thinking-header i {
    color: rgba(224, 163, 60, 0.6);
}

.thinking-content {
    color: #e9eff7;
    background-color: rgba(16, 27, 44, 0.95);
    padding: 0.75rem;
    border-radius: 6px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

/* Reasoning Events */
.reasoning-event {
    background-color: rgba(16, 27, 44, 0.6);
    border-left: 3px solid var(--cyan);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    margin: 0.5rem 0;
}

.reasoning-event-header {
    color: #46b6d9;
    font-weight: 600;
    font-size: 0.85em;
}

.reasoning-event-header i {
    margin-right: 0.5rem;
    color: #46b6d9;
}

.reasoning-event-tool {
    color: #6fbdf0;
    font-size: 0.85em;
    margin-top: 0.25rem;
    font-weight: 500;
}

.reasoning-event-args pre,
.reasoning-event-result pre {
    background-color: #060b13 !important;
    border: 1px solid #8a9db4 !important;
    color: #e9eff7 !important;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
    overflow-x: auto;
    max-height: 200px;
    font-size: 0.85em;
}

.reasoning-event-error {
    color: var(--red);
    background-color: rgba(224, 90, 82, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
    font-size: 0.85em;
}

/* Event type specific colors */
.reasoning-event-tool-call-planned {
    border-left-color: #d8c46a;
    background-color: rgba(16, 27, 44, 0.7);
}

.reasoning-event-tool-call-planned .reasoning-event-header {
    color: #d8c46a;
}

.reasoning-event-tool-execution-start {
    border-left-color: #46b6d9;
    background-color: rgba(16, 27, 44, 0.7);
}

.reasoning-event-tool-execution-start .reasoning-event-header {
    color: #46b6d9;
}

.reasoning-event-tool-execution-complete {
    border-left-color: #59c26a;
    background-color: rgba(16, 27, 44, 0.7);
}

.reasoning-event-tool-execution-complete .reasoning-event-header {
    color: #59c26a;
}

.reasoning-event-tool-execution-complete .reasoning-event-header i {
    color: #59c26a;
}

.reasoning-event-tool-execution-error {
    border-left-color: #e05a52;
    background-color: rgba(16, 27, 44, 0.8);
}

.reasoning-event-tool-execution-error .reasoning-event-header {
    color: #e05a52;
}

.reasoning-event-tool-execution-error .reasoning-event-header i {
    color: #e05a52;
}

.reasoning-event-analyzing-results {
    border-left-color: #6fbdf0;
    background-color: rgba(16, 27, 44, 0.7);
}

.reasoning-event-analyzing-results .reasoning-event-header {
    color: #6fbdf0;
}

/* Streaming */
.streaming-indicator span {
    color: var(--cyan);
}

/* Input */
.chat-input-container {
    border-top-color: var(--comment);
    background-color: var(--current-line);
}

.message-textarea {
    border-color: var(--comment);
    background-color: var(--background);
    color: var(--foreground);
}

.message-textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 0.2rem rgba(47, 143, 214, 0.25);
}

/* Tools Modal */
.mcp-tools-panel {
    background-color: var(--background);
    color: var(--foreground);
}

.tools-header {
    border-bottom-color: var(--comment);
}

.server-group {
    border-color: var(--comment);
}

.server-header {
    background-color: var(--current-line);
    border-bottom-color: var(--comment);
}

.server-name {
    color: var(--foreground);
}

.btn-link-sm {
    color: var(--purple);
}

.btn-link-sm:hover {
    color: var(--pink);
}

.tool-item {
    border-bottom-color: var(--current-line);
}

.tool-name-text {
    color: var(--foreground);
}

.tool-description {
    color: var(--comment);
}

.tool-item.tool-selected {
    background-color: rgba(70, 182, 217, 0.1);
}

.tools-footer {
    border-top-color: var(--comment);
}

/* Scrollbar Styling */
.conversations-list::-webkit-scrollbar-track,
.messages-container::-webkit-scrollbar-track,
.tools-list::-webkit-scrollbar-track,
.thinking-content::-webkit-scrollbar-track {
    background: var(--current-line);
}

.conversations-list::-webkit-scrollbar-thumb,
.messages-container::-webkit-scrollbar-thumb,
.tools-list::-webkit-scrollbar-thumb,
.thinking-content::-webkit-scrollbar-thumb {
    background: var(--comment);
}

.conversations-list::-webkit-scrollbar-thumb:hover,
.messages-container::-webkit-scrollbar-thumb:hover,
.tools-list::-webkit-scrollbar-thumb:hover,
.thinking-content::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}

/* Make dropdown menu smaller and less massive */
table .dropdown-menu-xl,
table .dropdown-menu {
    border: 1px solid var(--comment) !important;
    background-color: var(--current-line) !important;
}

/* Nav header in dropdown - smaller */
table .dropdown-menu .nav-item-header {
    color: var(--comment) !important;
    background-color: var(--background) !important;
    border-bottom: 1px solid var(--comment) !important;
}

/* Nav items in dropdown - more compact */
table .dropdown-menu .nav-item .nav-link {
    color: var(--foreground) !important;
}

table .dropdown-menu .nav-item .nav-link:hover {
    background-color: #16243a !important !important;
    color: var(--ink-1) !important;
}

/* Nav icons in dropdown */
table .dropdown-menu .nav-link-icon {
    color: var(--comment) !important;
}

table .dropdown-menu .nav-item .nav-link:hover .nav-link-icon {
    color: var(--ink-1) !important;
}

/* === RIGHT NAVIGATION TABS - DARK THEME (COLORS ONLY) === */

/* Default tab state - barely visible stripe */
.nct-right-nav.nav-tabs .nav-item .nav-link {
    background-color: var(--background);
    color: var(--comment);
    border-left: none;
    border-bottom: 1px solid rgba(138, 157, 180, 0.2);
    box-shadow: inset 2px 0 0 rgba(138, 157, 180, 0.3); /* Barely visible stripe */
}

/* Remove bottom border from last item */
.nct-right-nav.nav-tabs .nav-item:last-child .nav-link {
    border-bottom: none;
}

/* Hover state - narrower stripe */
.nct-right-nav.nav-tabs .nav-item .nav-link:hover {
    background-color: var(--background);
    color: var(--foreground);
    box-shadow: inset 2px 0 0 var(--purple); /* 2px narrow stripe */
}

/* Active state - narrower stripe */
.nct-right-nav.nav-tabs .nav-item .nav-link.active {
    background-color: var(--background);
    color: var(--pink);
    box-shadow: inset 2px 0 0 var(--pink); /* 2px narrow stripe */
}

/* Icon colors */
.nct-right-nav.nav-tabs .nav-item .nav-link .nav-icon {
    color: inherit;
}

/* Label colors */
.nct-right-nav.nav-tabs .nav-item .nav-link .nav-label {
    color: inherit;
}

/* Focus state for accessibility */
.nct-right-nav.nav-tabs .nav-item .nav-link:focus-visible {
    outline: 2px solid var(--purple);
    outline-offset: -2px;
    z-index: 1;
}


/* Chat Message Expand/Collapse - Dark Theme */
.message-text.collapsed::after {
    background: linear-gradient(to bottom, transparent, #080e19);
}

.message-expand-toggle {
    background-color: #101b2c;
    color: #46b6d9;
}

.message-expand-toggle:hover {
    background-color: #8a9db4;
    color: #e9eff7;
    box-shadow: 0 2px 8px rgba(70, 182, 217, 0.2);
}

/* JSON Viewer in Chat Messages - Dark Theme */
.json-viewer-container {
    background-color: #050911;
    border: 1px solid #101b2c;
}

.json-parse-error {
    background-color: #050911;
    border: 1px solid #e05a52;
    color: #e9eff7;
}

.json-error-message {
    background-color: #101b2c;
    color: #e05a52;
}

/* Override json-viewer plugin colors for Dark */
.json-viewer-container .json-viewer {
    color: #e9eff7;
}

.json-viewer-container .json-viewer ul {
    border-left-color: #8a9db4;
}

.json-viewer-container .json-viewer .type-string {
    color: #d8c46a;
}

.json-viewer-container .json-viewer .type-number {
    color: #6fbdf0;
}

.json-viewer-container .json-viewer .type-boolean {
    color: #6fbdf0;
}

.json-viewer-container .json-viewer .type-null {
    color: #8a9db4;
}

.json-viewer-container .json-viewer a.json-toggle {
    color: #46b6d9;
}

.json-viewer-container .json-viewer a.json-toggle:hover {
    color: #59c26a;
}

/* Mermaid Diagrams - Dark Theme */
.mermaid-viewer-container {
    background-color: #050911;
    border: 1px solid #101b2c;
}

.code-block {
    background-color: #050911;
    border: 1px solid #101b2c;
    color: #e9eff7;
}

/* ================================================================
   MODERN ENHANCEMENTS
   Enhanced buttons, forms, and glamorous effects
   ================================================================ */

/**
 * Dark Modern - Glamorous Colors & Borders Only
 * Flat design with color effects - NO 3D, NO SIZE CHANGES
 */

/* === SIDEBAR PROTECTION - DO NOT OVERRIDE === */

/* Exclude sidebar elements from button/link styling */
.app-sidebar,
.app-sidebar *,
.app-sidebar .vertical-nav-menu,
.app-sidebar .vertical-nav-menu *,
.app-sidebar a,
.app-sidebar button,
.app-sidebar .btn {
    /* Reset any potential overrides - let dark.css handle sidebar */
    background: unset !important;
    border: unset !important;
    box-shadow: unset !important;
    opacity: unset !important;
}

/* Restore dark.css sidebar styles explicitly */
.app-sidebar {
    background-color: #101b2c !important;
    border-right: 1px solid #8a9db4 !important;
}

.app-sidebar .vertical-nav-menu ul > li > a {
    background-color: transparent !important;
    color: #e9eff7 !important;
    border-left: 3px solid transparent !important;
    box-shadow: none !important;
}

.app-sidebar .vertical-nav-menu ul > li > a:hover {
    background-color: #16243a !important;
    color: #6fbdf0 !important;
    border-left-color: #2f8fd6 !important;
    box-shadow: none !important;
}

.app-sidebar .vertical-nav-menu ul > li > a.mm-active,
.app-sidebar .vertical-nav-menu li > a.mm-active,
.app-sidebar .vertical-nav-menu li.mm-active > a {
    color: #6fbdf0 !important;
    background-color: #080e19 !important;
    border-left-color: #6fbdf0 !important;
    box-shadow: none !important;
}

/* === FORM FIELDS - DARK THEME - STRICT & HIGHLY VISIBLE === */

.form-control,
.form-select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
    /* Beautiful dark gradient background */
    background: linear-gradient(135deg, #0a111e 0%, #04080f 100%) !important;

    /* Thick, highly visible border */
    border: 3px solid #365484 !important;
    border-radius: 6px !important;

    /* Text color */
    color: #e9eff7 !important;

    /* Smooth transitions */
    transition: all 0.3s ease !important;

    /* Subtle inner shadow for depth */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.form-control:hover,
.form-select:hover,
input:hover:not(:disabled),
textarea:hover:not(:disabled),
select:hover:not(:disabled) {
    /* Lighter gradient on hover */
    background: linear-gradient(135deg, #0e1827 0%, #070c16 100%) !important;

    /* Brighter border on hover - no colors, just brighter gray */
    border-color: #3d7fb2 !important;

    /* Enhanced shadow on hover */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(47, 143, 214, 0.5) !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    /* Even lighter gradient when focused */
    background: linear-gradient(135deg, #0e1827 0%, #0a111e 100%) !important;

    /* Even brighter border on focus - still no colors */
    border-color: #58a3d8 !important;

    /* Focused shadow with subtle glow */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3),
                0 0 0 3px rgba(47, 143, 214, 0.4),
                0 0 12px rgba(47, 143, 214, 0.2) !important;

    outline: none !important;
}

label.form-control.nct-prohibited,
.form-control:disabled,
.form-select:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    /* Darker, muted background for disabled state */
    background: linear-gradient(135deg, #04070d 0%, #03050a 100%) !important;
    border-color: #101b2c !important;
    color: #8a9db4 !important;
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* Placeholder styling - strict, no fancy colors */
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: #3d7fb2 !important;
    transition: opacity 0.2s ease !important;
    opacity: 0.7 !important;
}

.form-control:hover::placeholder,
input:hover::placeholder,
textarea:hover::placeholder {
    opacity: 0.8 !important;
}

.form-control:focus::placeholder,
input:focus::placeholder,
textarea:focus::placeholder {
    opacity: 0.5 !important;
}

/* REMOVED: the skin's private button layer.
   Every button here is drawn by the RUNG system in theme-common.css now. What stood in this
   place was the old private copy: 135deg gradients, `0 0 20px` coloured hover glows, resting
   drop shadows that grew on hover, and a disabled rule using `opacity: .5` that composited
   labels down to 1.5-1.8:1. It could not merely be overridden — those hover rules are (0,2,1)
   and beat the shared layer's (0,1,1) `box-shadow: none`, so the glows kept firing. */

/* === OUTLINE BUTTON VARIANTS === */

/* Outline Primary buttons */
.btn-outline-primary,
button.btn-outline-primary,
a.btn-outline-primary {
    background: transparent !important;
    border: 1px solid #2f8fd6 !important;
    color: #2f8fd6 !important;
}

.btn-outline-primary:hover,
button.btn-outline-primary:hover,
a.btn-outline-primary:hover {
    background: linear-gradient(135deg, #2f8fd6 0%, #2378b6 100%) !important;
    border-color: #4aa6e4 !important;
    color: #ffffff !important;
}

/* Outline Secondary buttons */
.btn-outline-secondary,
button.btn-outline-secondary,
a.btn-outline-secondary {
    background: transparent !important;
    /*border: 2px solid #1c2f49 !important;*/
    color: #e9eff7 !important;
}

.btn-outline-secondary:hover,
button.btn-outline-secondary:hover,
a.btn-outline-secondary:hover {
    background: linear-gradient(135deg, #1c2f49 0%, #101b2c 100%) !important;
    border-color: #2f8fd6 !important;
    color: #e9eff7 !important;
}

/* Outline Success buttons */
.btn-outline-success,
button.btn-outline-success,
a.btn-outline-success {
    background: transparent !important;
    border: 1px solid #59c26a !important;
    color: #59c26a !important;
}

.btn-outline-success:hover,
button.btn-outline-success:hover,
a.btn-outline-success:hover {
    background: linear-gradient(135deg, #59c26a 0%, #2378b6 100%) !important;
    border-color: #4aa6e4 !important;
    color: #ffffff !important;
}

/* Outline Danger buttons */
.btn-outline-danger,
button.btn-outline-danger,
a.btn-outline-danger {
    background: transparent !important;
    border: 1px solid #e05a52 !important;
    color: #e05a52 !important;
}

.btn-outline-danger:hover,
button.btn-outline-danger:hover,
a.btn-outline-danger:hover {
    background: linear-gradient(135deg, #e05a52 0%, #cf463e 100%) !important;
    border-color: #e97068 !important;
    color: #ffffff !important;
}

/* Outline Info buttons */
.btn-outline-info,
button.btn-outline-info,
a.btn-outline-info {
    background: transparent !important;
    border: 1px solid #2f8fd6 !important;
    color: #2f8fd6 !important;
}

.btn-outline-info:hover,
button.btn-outline-info:hover,
a.btn-outline-info:hover {
    background: linear-gradient(135deg, #2f8fd6 0%, #2378b6 100%) !important;
    border-color: #4aa6e4 !important;
    color: #ffffff !important;
}

/* Outline Light buttons - Dark override (prevents white borders on dark bg) */
.btn-outline-light,
button.btn-outline-light,
a.btn-outline-light {
    background: transparent !important;
    border: 1px solid var(--comment) !important;
    color: var(--foreground) !important;
}

.btn-outline-light:hover,
button.btn-outline-light:hover,
a.btn-outline-light:hover {
    background: linear-gradient(135deg, rgba(138, 157, 180, 0.3) 0%, rgba(138, 157, 180, 0.2) 100%) !important;
    border-color: var(--purple) !important;
    color: var(--foreground) !important;
}

.btn-outline-light:active,
button.btn-outline-light:active,
a.btn-outline-light:active {
    background: linear-gradient(135deg, rgba(138, 157, 180, 0.4) 0%, rgba(138, 157, 180, 0.3) 100%) !important;
    border-color: var(--purple) !important;
}

/* A dead link is a dead word: no box, no border, no fill — only the muted ink. */
.btn-link:disabled,
.btn-link.disabled,
button.btn-link:disabled {
    background: none !important;
    background-color: transparent !important;
    border-color: transparent !important;
    color: #6b7d95 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    text-decoration: none !important;
}

/* Foreground icons for outline buttons on hover (except warning) */
.btn-outline-primary:hover i, .btn-outline-primary:hover svg, .btn-outline-primary:hover .btn-icon-wrapper,
.btn-outline-secondary:hover i, .btn-outline-secondary:hover svg, .btn-outline-secondary:hover .btn-icon-wrapper,
.btn-outline-success:hover i, .btn-outline-success:hover svg, .btn-outline-success:hover .btn-icon-wrapper,
.btn-outline-danger:hover i, .btn-outline-danger:hover svg, .btn-outline-danger:hover .btn-icon-wrapper,
.btn-outline-info:hover i, .btn-outline-info:hover svg, .btn-outline-info:hover .btn-icon-wrapper {
    color: var(--foreground) !important;
}

/* Warning outline hover - dark text */
.btn-outline-warning:hover i, .btn-outline-warning:hover svg, .btn-outline-warning:hover .btn-icon-wrapper {
    color: #050911 !important;
}
.layout-management-main-form a.btn.text-danger [class*="fa-"],
.layout-management-main-form a.btn.text-danger [class*="pe-7s-"] {
    color: #e05a52 !important;
}

/* === CHECKBOXES & RADIO BUTTONS - FLAT & BEAUTIFUL === */

/*input[type="checkbox"],*/
input[type="radio"] {
    background: linear-gradient(135deg, #0a111e 0%, #070c16 100%) !important;
    border: 2px solid #1c2f49 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    background: linear-gradient(135deg, #0f1929 0%, #0a111e 100%) !important;
    border-color: #2f8fd6 !important;
    box-shadow: 0 0 8px rgba(47, 143, 214, 0.2) !important;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: linear-gradient(135deg, #4aa6e4 0%, #2f8fd6 100%) !important;
    border-color: #6fbdf0 !important;
    box-shadow: 0 0 12px rgba(47, 143, 214, 0.3),
                inset 0 1px 3px rgba(255, 255, 255, 0.1) !important;
}

/* Animated check/radio pulse on change */
@keyframes checkPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(47, 143, 214, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(47, 143, 214, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(47, 143, 214, 0);
    }
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    animation: checkPulse 0.5s ease-out !important;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
    box-shadow: 0 0 0 3px rgba(47, 143, 214, 0.25),
                0 0 12px rgba(47, 143, 214, 0.2) !important;
}

/* === SWITCHES - FLAT & BEAUTIFUL === */

.form-switch .form-check-input {
    background-image: none !important;
    background: linear-gradient(135deg, #0a111e 0%, #070c16 100%) !important;
    border: 2px solid #1c2f49 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.form-switch .form-check-input:hover {
    background: linear-gradient(135deg, #0f1929 0%, #0a111e 100%) !important;
    border-color: #2f8fd6 !important;
    box-shadow: 0 0 8px rgba(47, 143, 214, 0.2) !important;
}

.form-switch .form-check-input:checked {
    background: linear-gradient(135deg, #4aa6e4 0%, #2f8fd6 100%) !important;
    border-color: #6fbdf0 !important;
    box-shadow: 0 0 12px rgba(47, 143, 214, 0.3),
                inset 0 1px 3px rgba(255, 255, 255, 0.1) !important;
    animation: checkPulse 0.5s ease-out !important;
}

/* === INPUT GROUPS - BEAUTIFUL === */

.input-group-text {
    background: linear-gradient(135deg, #0f1929 0%, #0a111e 100%) !important;
    border: 2px solid #1c2f49 !important;
    color: #e9eff7 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.input-group:hover .input-group-text {
    border-color: #2f8fd6 !important;
    box-shadow: 0 0 8px rgba(47, 143, 214, 0.15) !important;
}

.input-group:focus-within .input-group-text {
    border-color: #4aa6e4 !important;
    background: linear-gradient(135deg, #0e1827 0%, #0e1827 100%) !important;
    box-shadow: 0 0 0 1px rgba(47, 143, 214, 0.25),
                0 2px 8px rgba(47, 143, 214, 0.2) !important;
}

/* === SELECT DROPDOWNS - BEAUTIFUL === */

select option {
    background: #0a111e !important;
    color: #e9eff7 !important;
    transition: all 0.2s ease !important;
}

select option:hover {
    background: #0f1929 !important;
}

select option:checked {
    background: linear-gradient(135deg, #4aa6e4 0%, #2f8fd6 100%) !important;
    font-weight: 500 !important;
}

/* === FILE UPLOAD BUTTONS - BEAUTIFUL === */

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, #2f8fd6 0%, #2378b6 100%) !important;
    border: 1px solid #4aa6e4 !important;
    color: #ffffff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background: linear-gradient(135deg, #4aa6e4 0%, #2f8fd6 100%) !important;
    border-color: #6fbdf0 !important;
    box-shadow: 0 0 20px rgba(47, 143, 214, 0.4),
                0 4px 12px rgba(47, 143, 214, 0.3) !important;
}

input[type="file"]::file-selector-button:active,
input[type="file"]::-webkit-file-upload-button:active {
    background: linear-gradient(135deg, #2378b6 0%, #1c6aa2 100%) !important;
    box-shadow: 0 0 12px rgba(47, 143, 214, 0.3),
                inset 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* === NAVIGATION LINK ICONS === */

/* Ensure nav link icons inherit the link color */
.nav-link i,
.nav-link svg,
.nav-link .icon,
.nav-link [class*="pe-"],
.nav-link [class*="lnr-"],
.nav-link [class*="fa-"],
.nav-link .nav-link-icon,
a.nav-link i,
a.nav-link svg,
a.nav-link .icon,
a.nav-link [class*="pe-"],
a.nav-link [class*="lnr-"],
a.nav-link [class*="fa-"],
a.nav-link .nav-link-icon {
    color: inherit !important;
    fill: currentColor !important;
}

/* === FOCUS STATES - REMOVE DEFAULT OUTLINE === */

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none !important;
}
/* ================================================================
   DARK GRADIENT & OPACITY ENHANCEMENTS
   Beautiful gradients and transparency - NO size/padding/margin changes
   ================================================================ */

/* === LEFT SIDEBAR - GRADIENT BACKGROUND === */

.app-sidebar {
    background: linear-gradient(180deg,
        #101b2c 0%,
        #0e1726 30%,
        #0c1422 60%,
        #09101c 90%,
        #080e19 100%) !important;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
}

/* Sidebar menu items with semi-transparent background */
.app-sidebar .vertical-nav-menu ul > li > a {
    background: rgba(8, 14, 25, 0.3) !important;
}

.app-sidebar .vertical-nav-menu ul > li > a:hover {
    background: linear-gradient(135deg,
        rgba(47, 143, 214, 0.2) 0%,
        rgba(47, 143, 214, 0.1) 100%) !important;
    box-shadow: 0 2px 8px rgba(47, 143, 214, 0.2);
}

.app-sidebar .vertical-nav-menu ul > li > a.mm-active,
.app-sidebar .vertical-nav-menu li > a.mm-active,
.app-sidebar .vertical-nav-menu li.mm-active > a {
    background: linear-gradient(135deg,
        rgba(89, 194, 106, 0.25) 0%,
        rgba(89, 194, 106, 0.15) 100%) !important;
    box-shadow: 0 2px 12px rgba(89, 194, 106, 0.25);
}

/* PAGES header with subtle background */
.app-sidebar__heading {
    background: linear-gradient(90deg,
        rgba(138, 157, 180, 0.15) 0%,
        transparent 100%);
}

/* === MAIN BODY AREA - ELEGANT GRADIENT === */

.app-main {
    background: linear-gradient(135deg,
        #080e19 0%,
        #0a111e 25%,
        #0e1827 50%,
        #0a111e 75%,
        #080e19 100%) !important;
}

.app-main__inner {
    background: transparent;
}

/* Cards with semi-transparent gradient background */
.card {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.6) 0%,
        rgba(16, 27, 44, 0.4) 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.card:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4),
                0 0 15px rgba(47, 143, 214, 0.1);
}

/* Card headers with gradient */
.card-header {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.8) 0%,
        rgba(8, 14, 25, 0.6) 100%) !important;
}

/* Tables with semi-transparent background */
.table {
    background: rgba(8, 14, 25, 0.2);
}

.table thead th {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.7) 0%,
        rgba(16, 27, 44, 0.5) 100%) !important;
}

.table-hover > tbody > tr:hover {
    background: linear-gradient(135deg,
        rgba(47, 143, 214, 0.15) 0%,
        rgba(47, 143, 214, 0.08) 100%) !important;
}

/* === RIGHT PANEL - AI CHAT - GRADIENT BACKGROUND === */

.ai-chat-panel {
    /*background: linear-gradient(180deg,*/
    /*    rgba(8, 14, 25, 0.95) 0%,*/
    /*    rgba(10, 17, 30, 0.95) 50%,*/
    /*    rgba(8, 14, 25, 0.95) 100%) !important;*/
    /*box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);*/
}

/* Chat settings with gradient */
.chat-settings-container {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.6) 0%,
        rgba(16, 27, 44, 0.4) 100%) !important;
}

/* Conversations container */
.conversations-container {
    background: linear-gradient(180deg,
        rgba(8, 14, 25, 0.4) 0%,
        transparent 100%);
}

/* Conversation items with semi-transparent background */
.conversation-item {
    background: rgba(16, 27, 44, 0.3) !important;
}

.conversation-item:hover {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.5) 0%,
        rgba(16, 27, 44, 0.3) 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.conversation-item.active {
    background: linear-gradient(135deg,
        rgba(70, 182, 217, 0.2) 0%,
        rgba(70, 182, 217, 0.1) 100%) !important;
    box-shadow: 0 2px 12px rgba(70, 182, 217, 0.15);
}

/* Chat area with gradient */
.chat-area {
    /*background: linear-gradient(135deg,*/
    /*    rgba(8, 14, 25, 0.5) 0%,*/
    /*    rgba(8, 14, 25, 0.3) 50%,*/
    /*    rgba(8, 14, 25, 0.5) 100%) !important;*/
}

/* User messages with gradient */
.message-wrapper.message-user .message-content {
    background: linear-gradient(135deg,
        rgba(47, 143, 214, 0.85) 0%,
        rgba(89, 194, 106, 0.85) 100%) !important;
    box-shadow: 0 2px 10px rgba(47, 143, 214, 0.2);
}

/* Assistant messages with semi-transparent gradient */
.message-wrapper.message-assistant .message-content {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.7) 0%,
        rgba(16, 27, 44, 0.5) 100%) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Thinking/Reasoning block */
.thinking-wrapper {
    /*background: linear-gradient(135deg,*/
    /*    rgba(16, 27, 44, 0.6) 0%,*/
    /*    rgba(16, 27, 44, 0.4) 100%);*/
    /*box-shadow: 0 2px 8px rgba(224, 163, 60, 0.1);*/
}

.thinking-content {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.9) 0%,
        rgba(16, 27, 44, 0.8) 100%) !important;
}

/* Reasoning events */
.reasoning-event {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.6) 0%,
        rgba(16, 27, 44, 0.4) 100%) !important;
}

/* Chat input with gradient */
.chat-input-container {
    /*background: linear-gradient(135deg,*/
    /*    rgba(16, 27, 44, 0.8) 0%,*/
    /*    rgba(16, 27, 44, 0.6) 100%) !important;*/
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.2);
}

.message-textarea,
.chat-message-input {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.7) 0%,
        rgba(8, 14, 25, 0.5) 100%) !important;
}

.message-textarea:focus,
.chat-message-input:focus {
    background: linear-gradient(135deg,
        rgba(12, 20, 34, 0.8) 0%,
        rgba(12, 20, 34, 0.6) 100%) !important;
    box-shadow: 0 0 15px rgba(47, 143, 214, 0.25);
}

/* === MODALS WITH GRADIENT === */

.modal-content {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.98) 0%,
        rgba(10, 17, 30, 0.98) 100%) !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.8) 0%,
        rgba(16, 27, 44, 0.6) 100%) !important;
}

.modal-footer {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.6) 0%,
        rgba(16, 27, 44, 0.4) 100%) !important;
}

/* === DROPDOWNS WITH GRADIENT === */

.dropdown-menu {
    background: var(--w2-brand) !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--w2-brand) !important;
}

/* === PAGE TITLE WITH GRADIENT === */

.app-page-title {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.85) 0%,
        rgba(8, 14, 25, 0.7) 100%) !important;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);*/
}

/* === FOOTER WITH GRADIENT === */

.app-wrapper-footer {
    background: linear-gradient(135deg,
        #101b2c 0%,
        #0e1726 50%,
        #101b2c 100%) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3) !important;
}

.app-footer {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.95) 0%,
        rgba(12, 20, 34, 0.95) 50%,
        rgba(16, 27, 44, 0.95) 100%) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4),
                0 0 15px rgba(138, 157, 180, 0.15) !important;
    backdrop-filter: blur(10px) !important;
}

.app-footer__inner {
    background: transparent !important;
}

/* Footer text styling */
.app-footer__inner .app-footer-left,
.app-footer__inner .app-footer-right {
    opacity: 1;
}

/* Footer copyright text styling */
.footer-copyright {
    color: var(--cyan) !important;
    font-size: 0.875rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* === HEADER WITH GRADIENT === */

.app-header {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.9) 0%,
        rgba(16, 27, 44, 0.8) 100%) !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

/* REMOVED: the skin's private button layer.
   Every button here is drawn by the RUNG system in theme-common.css now. What stood in this
   place was the old private copy: 135deg gradients, `0 0 20px` coloured hover glows, resting
   drop shadows that grew on hover, and a disabled rule using `opacity: .5` that composited
   labels down to 1.5-1.8:1. It could not merely be overridden — those hover rules are (0,2,1)
   and beat the shared layer's (0,1,1) `box-shadow: none`, so the glows kept firing. */

/* === DRAWER WRAPPER === */

.app-drawer-wrapper {
    background: linear-gradient(270deg,
        rgba(8, 14, 25, 0.4) 0%,
        transparent 100%);
}

/* Right sidebar navigation tabs */
.nct-right-nav.nav-tabs .nav-item .nav-link {
    background: rgba(8, 14, 25, 0.6);
}

.nct-right-nav.nav-tabs .nav-item .nav-link:hover {
    background: rgba(47, 143, 214, 0.2);
}

.nct-right-nav.nav-tabs .nav-item .nav-link.active {
    background: linear-gradient(135deg,
        rgba(47, 143, 214, 0.3) 0%,
        rgba(47, 143, 214, 0.2) 100%);
}

/* Drawer content wrapper */
.drawer-content-wrapper {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.95) 0%,
        rgba(10, 17, 30, 0.95) 100%);
}

/* ================================================================
   DARK TABLE DROPDOWN & ACTION MENU ENHANCEMENTS
   Beautiful gradients for table action menus and dropdowns
   ================================================================ */

/* Table dropdown menus with stunning gradients */
table .dropdown-menu-xl,
table .dropdown-menu {
    background: var(--w2-brand) !important;
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(47, 143, 214, 0.15) !important;
    backdrop-filter: blur(15px);
}

/* Dropdown header with gradient */
table .dropdown-menu .nav-item-header {
    color: var(--cyan) !important;
    background: var(--w2-brand) !important;
    border-bottom: 1px solid rgba(138, 157, 180, 0.3) !important;
}

/* Dropdown items with gradient hover */
table .dropdown-menu .nav-item .nav-link {
    color: var(--foreground) !important;
    background: rgba(8, 14, 25, 0.3);
    transition: all 0.3s ease;
}

table .dropdown-menu .nav-item .nav-link:hover {
    background: var(--w2-brand) !important;
    color: var(--ink-1) !important;
    box-shadow: 0 2px 8px rgba(47, 143, 214, 0.2);
}

/* Dropdown icons */
table .dropdown-menu .nav-link-icon {
    color: var(--comment) !important;
}

table .dropdown-menu .nav-item .nav-link:hover .nav-link-icon {
    color: var(--ink-1) !important;
}

/* General dropdown items (for non-nav dropdowns) */
.dropdown-item {
    background: rgba(8, 14, 25, 0.2) !important;
    color: var(--foreground) !important;
    transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--w2-brand) !important;
    color: var(--ink-1) !important;
    box-shadow: 0 2px 8px rgba(47, 143, 214, 0.2);
}

/* Active dropdown items */
.dropdown-item:active {
    background: var(--w2-brand) !important;
    color: var(--cyan) !important;
}

/* Dropdown divider with gradient */
.dropdown-divider {
    border-top: 1px solid rgba(138, 157, 180, 0.3) !important;
}

/* ================================================================
   CONTEXT MENU DROPDOWN - ENHANCED OPACITY & GRADIENTS
   Beautiful semi-transparent gradients for action menus
   ================================================================ */

/* Dropdown menu with strong gradient and opacity */
.dropdown-menu-xl.dropdown-menu,
.dropdown-menu {
    background: var(--w2-brand) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
                0 0 20px rgba(47, 143, 214, 0.2) !important;
}

/* Nav items inside dropdown */
.dropdown-menu .nav.flex-column .nav-item-header {
    background: var(--w2-brand) !important;
    color: var(--cyan) !important;
    border-bottom: 1px solid rgba(138, 157, 180, 0.3) !important;
}

.dropdown-menu .nav.flex-column .nav-item .nav-link {
    background: rgba(8, 14, 25, 0.25) !important;
    color: var(--foreground) !important;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.dropdown-menu .nav.flex-column .nav-item .nav-link:hover {
    background: var(--w2-brand) !important;
    color: var(--ink-1) !important;
    box-shadow: 0 2px 10px rgba(47, 143, 214, 0.3);
    transform: translateX(2px);
}

/* Icons in nav links */
.dropdown-menu .nav.flex-column .nav-link-icon {
    color: var(--comment) !important;
}

.dropdown-menu .nav.flex-column .nav-item .nav-link:hover .nav-link-icon {
    color: var(--ink-1) !important;
}

/* ================================================================
   MODAL DIALOG - ENHANCED OPACITY & GRADIENTS
   Beautiful semi-transparent gradients for modal dialogs
   ================================================================ */

/* Main block dialog with gradient */
.mrjun-block-dialog {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.98) 0%,
        rgba(10, 17, 30, 0.98) 50%,
        rgba(8, 14, 25, 0.98) 100%) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
                0 0 30px rgba(47, 143, 214, 0.2) !important;
}

/* Modal content inside dialog */
.mrjun-block-dialog .modal-content {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.7) 0%,
        rgba(16, 27, 44, 0.5) 100%) !important;
    backdrop-filter: blur(10px);
}

/* Modal header with gradient */
.mrjun-block-dialog .modal-header {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.9) 0%,
        rgba(16, 27, 44, 0.7) 100%) !important;
    border-bottom: 2px solid rgba(138, 157, 180, 0.3) !important;
}

/* Modal body */
.mrjun-block-dialog .modal-body {
    background: rgba(8, 14, 25, 0.3) !important;
}

/* Modal footer with gradient */
.mrjun-block-dialog .modal-footer {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.8) 0%,
        rgba(16, 27, 44, 0.6) 100%) !important;
    border-top: 1px solid rgba(138, 157, 180, 0.3) !important;
}

/* Form Controls in modal */
.mrjun-block-dialog .form-control,
.mrjun-block-dialog select.form-control {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.9) 0%,
        rgba(8, 14, 25, 0.8) 100%) !important;
    border: 1px solid rgba(138, 157, 180, 0.3) !important;
    color: var(--foreground) !important;
}

.mrjun-block-dialog .form-control:focus,
.mrjun-block-dialog select.form-control:focus {
    background: linear-gradient(135deg,
        rgba(12, 20, 34, 0.95) 0%,
        rgba(12, 20, 34, 0.85) 100%) !important;
    border-color: rgba(70, 182, 217, 0.5) !important;
    box-shadow: 0 0 15px rgba(47, 143, 214, 0.3);
}

/* Form labels */
.mrjun-block-dialog .form-label {
    color: var(--cyan) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ================================================================
   BOOTSTRAP MODAL - ENHANCED OPACITY & GRADIENTS
   Beautiful semi-transparent gradients for rich-bootstrap-modal-panel
   ================================================================ */

/* Modal backdrop with opacity */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(5px);
}

/* Main modal dialog */
.rich-bootstrap-modal-panel .modal-dialog {
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.6));
}

/* Modal content with gradient */
.rich-bootstrap-modal-panel .modal-content {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.98) 0%,
        rgba(10, 17, 30, 0.98) 50%,
        rgba(8, 14, 25, 0.98) 100%) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6),
                0 0 30px rgba(47, 143, 214, 0.2) !important;
}

/* Modal header with gradient */
.rich-bootstrap-modal-panel .modal-header {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.9) 0%,
        rgba(16, 27, 44, 0.7) 100%) !important;
    border-bottom: 2px solid rgba(138, 157, 180, 0.4) !important;
}

.rich-bootstrap-modal-panel .modal-title {
    color: var(--cyan) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Close button styling */
.rich-bootstrap-modal-panel .btn-close {
    filter: brightness(3) invert(0.8);
    opacity: 0.8;
}

.rich-bootstrap-modal-panel .btn-close:hover {
    opacity: 1;
    filter: brightness(4) invert(1);
}

/* Modal body with semi-transparent background */
.rich-bootstrap-modal-panel .modal-body {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.4) 0%,
        rgba(8, 14, 25, 0.3) 100%) !important;
}

/* Modal footer with gradient */
.rich-bootstrap-modal-panel .modal-footer {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.85) 0%,
        rgba(16, 27, 44, 0.7) 100%) !important;
    border-top: 1px solid rgba(138, 157, 180, 0.4) !important;
}

/* Form Controls in modal */
.rich-bootstrap-modal-panel .form-control,
.rich-bootstrap-modal-panel select.form-control,
.rich-bootstrap-modal-panel input.form-control {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.9) 0%,
        rgba(8, 14, 25, 0.8) 100%) !important;
    border: 1px solid rgba(138, 157, 180, 0.35) !important;
    color: var(--foreground) !important;
}

.rich-bootstrap-modal-panel .form-control:focus,
.rich-bootstrap-modal-panel select.form-control:focus,
.rich-bootstrap-modal-panel input.form-control:focus {
    background: linear-gradient(135deg,
        rgba(12, 20, 34, 0.95) 0%,
        rgba(12, 20, 34, 0.85) 100%) !important;
    border-color: rgba(70, 182, 217, 0.6) !important;
    box-shadow: 0 0 20px rgba(47, 143, 214, 0.4);
}

/* Form labels in modal */
.rich-bootstrap-modal-panel .form-label {
    color: var(--cyan) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

/* CodeMirror editor with gradient */
.rich-bootstrap-modal-panel .groovy-editor-container {
    background: rgba(8, 14, 25, 0.3);
    border-radius: 6px;
}

.rich-bootstrap-modal-panel .CodeMirror {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.95) 0%,
        rgba(8, 14, 25, 0.9) 100%) !important;
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.rich-bootstrap-modal-panel .CodeMirror-gutters {
    background: linear-gradient(90deg,
        rgba(16, 27, 44, 0.8) 0%,
        rgba(16, 27, 44, 0.6) 100%) !important;
    border-right: 1px solid rgba(138, 157, 180, 0.3) !important;
}

/* Multi-select controls */
.rich-bootstrap-modal-panel select[multiple].form-control {
    background: linear-gradient(135deg,
        rgba(8, 14, 25, 0.95) 0%,
        rgba(8, 14, 25, 0.85) 100%) !important;
}

.rich-bootstrap-modal-panel select[multiple].form-control option {
    background: rgba(8, 14, 25, 0.95) !important;
    color: var(--foreground) !important;
}

.rich-bootstrap-modal-panel select[multiple].form-control option:checked {
    background: linear-gradient(135deg,
        rgba(47, 143, 214, 0.6) 0%,
        rgba(47, 143, 214, 0.5) 100%) !important;
    color: var(--cyan) !important;
}

/* ================================================================
   FOOTER GRADIENT - FORCED VISIBILITY
   Ensuring footer gradients are visible with high specificity
   ================================================================ */

/* Force footer wrapper gradient with higher specificity */
.app-container .app-wrapper-footer,
body .app-wrapper-footer {
    background: linear-gradient(135deg,
        #101b2c 0%,
        #0e1726 25%,
        #0c1422 50%,
        #0e1726 75%,
        #101b2c 100%) !important;
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.4) !important;
}

/* Force app-footer gradient */
.app-container .app-wrapper-footer .app-footer,
body .app-wrapper-footer .app-footer {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.98) 0%,
        rgba(12, 20, 34, 0.98) 50%,
        rgba(16, 27, 44, 0.98) 100%) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5),
                0 0 20px rgba(138, 157, 180, 0.2) !important;
}

/* Ensure inner is transparent */
.app-container .app-wrapper-footer .app-footer .app-footer__inner,
body .app-wrapper-footer .app-footer .app-footer__inner {
    background: transparent !important;
    background-color: transparent !important;
}

/* ================================================================
   DARK - AUTOCOMPLETE/SUGGESTION DROPDOWN FIX
   Beautiful gradients for autocomplete suggestion fields
   ================================================================ */

/* Browser native autocomplete suggestions — match form-control gradient so autofilled fields don't look lighter than empty ones */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #070c15 inset !important;
    -webkit-text-fill-color: #e9eff7 !important;
    caret-color: #e9eff7 !important;
    background-color: #070c15 !important;
    border-color: #365484 !important;
    transition: background-color 9999s ease-out 0s, color 9999s ease-out 0s !important;
}

/* Date / time / color picker indicator — invert so the icon is visible on dark bg */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator,
input[type="color"]::-webkit-color-swatch-wrapper {
    filter: invert(0.85) hue-rotate(180deg);
    cursor: pointer;
    opacity: 0.85;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Number input spinner buttons */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    filter: invert(0.85) hue-rotate(180deg);
    opacity: 0.7;
}
input[type="number"]:hover::-webkit-inner-spin-button {
    opacity: 1;
}

/* Search field cancel button */
input[type="search"]::-webkit-search-cancel-button {
    filter: invert(0.85) hue-rotate(180deg);
    opacity: 0.7;
    cursor: pointer;
}

/* Text selection color */
::selection {
    background: rgba(90, 110, 134, 0.55);
    color: #ffffff;
}
::-moz-selection {
    background: rgba(90, 110, 134, 0.55);
    color: #ffffff;
}

/* Custom dropdown suggestions / autocomplete */
.dropdown-menu.show,
.autocomplete-dropdown,
.suggestions-dropdown,
.ui-autocomplete,
.ui-menu {
    background: var(--w2-brand) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
                0 0 20px rgba(47, 143, 214, 0.2) !important;
}

/* Suggestion items */
.dropdown-item,
.autocomplete-item,
.suggestion-item,
.ui-menu-item,
.ui-menu-item-wrapper {
    background: rgba(8, 14, 25, 0.3) !important;
    color: var(--foreground) !important;
    transition: all 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus,
.autocomplete-item:hover,
.suggestion-item:hover,
.ui-menu-item:hover,
.ui-menu-item-wrapper:hover,
.ui-state-active,
.ui-state-focus {
    background: var(--w2-brand) !important;
    color: var(--ink-1) !important;
    box-shadow: 0 2px 8px rgba(47, 143, 214, 0.2);
}

/* Wicket autocomplete specific */
.wicket-aa,
.wicket-aa-container {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.98) 0%,
        rgba(16, 27, 44, 0.98) 100%) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
                0 0 20px rgba(47, 143, 214, 0.2) !important;
}

.wicket-aa ul {
    background: transparent !important;
}

.wicket-aa li {
    background: rgba(8, 14, 25, 0.3) !important;
    color: var(--foreground) !important;
    border-bottom: 1px solid rgba(16, 27, 44, 0.5) !important;
}

.wicket-aa li:hover,
.wicket-aa li.selected {
    background: linear-gradient(135deg,
        rgba(47, 143, 214, 0.4) 0%,
        rgba(47, 143, 214, 0.3) 100%) !important;
    color: var(--cyan) !important;
}

/* Bootstrap typeahead */
.tt-menu,
.tt-dropdown-menu {
    background: var(--w2-brand) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
}

.tt-suggestion {
    background: rgba(8, 14, 25, 0.3) !important;
    color: var(--foreground) !important;
}

.tt-suggestion:hover,
.tt-suggestion.tt-cursor {
    background: linear-gradient(135deg,
        rgba(47, 143, 214, 0.4) 0%,
        rgba(47, 143, 214, 0.3) 100%) !important;
    color: var(--cyan) !important;
}

/* Select2 dropdown */
.select2-dropdown {
    background: linear-gradient(135deg,
        rgba(16, 27, 44, 0.98) 0%,
        rgba(16, 27, 44, 0.98) 100%) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
}

.select2-results__option {
    background: rgba(8, 14, 25, 0.3) !important;
    color: var(--foreground) !important;
}

.select2-results__option:hover,
.select2-results__option--highlighted {
    background: linear-gradient(135deg,
        rgba(47, 143, 214, 0.4) 0%,
        rgba(47, 143, 214, 0.3) 100%) !important;
    color: var(--cyan) !important;
}

/* Email suggestion specific styling */
input[type="email"] + .dropdown-menu,
input[type="email"] ~ .dropdown-menu {
    background: var(--w2-brand) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
                0 0 20px rgba(47, 143, 214, 0.2) !important;
}

input[type="email"] + .dropdown-menu .dropdown-item,
input[type="email"] ~ .dropdown-menu .dropdown-item {
    background: rgba(8, 14, 25, 0.3) !important;
    color: var(--foreground) !important;
}

input[type="email"] + .dropdown-menu .dropdown-item:hover,
input[type="email"] ~ .dropdown-menu .dropdown-item:hover {
    background: var(--w2-brand) !important;
    color: var(--ink-1) !important;
}

/* ================================================================
   DROPDOWN MENU - FORCED FIX FOR ALL DROPDOWNS
   Ensuring all dropdowns have proper dark background
   ================================================================ */

/* Force all dropdown menus to have proper background */
.dropdown-menu,
div.dropdown-menu,
ul.dropdown-menu {
    background: var(--w2-brand) !important;
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6),
                0 0 20px rgba(47, 143, 214, 0.2) !important;
    color: var(--foreground) !important;
}

/* Dropdown items */
.dropdown-menu .dropdown-item,
.dropdown-menu a,
.dropdown-menu button:not(.btn) {
    background: transparent !important;
    color: var(--foreground) !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu a:hover,
.dropdown-menu button:not(.btn):hover {
    background: var(--w2-brand) !important;
    color: var(--ink-1) !important;
}

/* ================================================================
   ONTOLOGY VIEWER PLUGIN STYLES
   ================================================================ */

/* Ontology viewer container */
.ontology-viewer-container {
    background: var(--background) !important;
}

.ontology-toolbar {
    background: var(--current-line) !important;
    border-bottom: 1px solid var(--comment) !important;
    color: var(--foreground) !important;
}

.ontology-title {
    color: var(--foreground) !important;
}

.search-box input {
    background: var(--background) !important;
    border: 1px solid var(--comment) !important;
    color: var(--foreground) !important;
}

.search-box input:focus {
    background: var(--background) !important;
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 0.2rem rgba(47, 143, 214, 0.25) !important;
}

.search-box input::placeholder {
    color: var(--comment) !important;
}

.search-icon {
    color: var(--comment) !important;
}

.toolbar-controls select {
    background: var(--background) !important;
    border: 1px solid var(--comment) !important;
    color: var(--foreground) !important;
}

.toolbar-controls select:focus {
    background: var(--background) !important;
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 0.2rem rgba(47, 143, 214, 0.25) !important;
}

.toolbar-controls select option {
    background: var(--background) !important;
    color: var(--foreground) !important;
}

.ontology-content {
    background: var(--background) !important;
}

.ontology-network {
    background: var(--background) !important;
    background-image:
        linear-gradient(rgba(138, 157, 180, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(138, 157, 180, 0.1) 1px, transparent 1px) !important;
    background-size: 20px 20px !important;
}

.details-panel {
    background: var(--background) !important;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5) !important;
}

.details-header {
    background: var(--current-line) !important;
    border-bottom: 1px solid var(--comment) !important;
    color: var(--foreground) !important;
}

.details-header .close {
    color: var(--foreground) !important;
}

.details-body {
    background: var(--background) !important;
}

.node-details h5 {
    color: var(--foreground) !important;
}

.node-details p {
    color: var(--foreground) !important;
}

.node-type-badge {
    background: var(--purple) !important;
    color: var(--foreground) !important;
}

.details-properties {
    border-top: 1px solid var(--current-line) !important;
}

.details-properties dt {
    color: var(--foreground) !important;
}

.details-properties dd {
    color: var(--foreground) !important;
    background: var(--current-line) !important;
}

.ontology-stats {
    background: var(--current-line) !important;
    border-top: 1px solid var(--comment) !important;
    color: var(--foreground) !important;
}

.ontology-stats span:before {
    background: var(--purple) !important;
}

.loading-overlay {
    background: rgba(8, 14, 25, 0.95) !important;
}

.loading-overlay p {
    color: var(--foreground) !important;
}

.ontology-network .alert {
    background: var(--current-line) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
}

.ontology-network .alert-danger {
    background: var(--current-line) !important;
    border-color: var(--red) !important;
    color: var(--red) !important;
}

/* Custom scrollbar for ontology viewer */
.details-body::-webkit-scrollbar {
    width: 8px !important;
}

.details-body::-webkit-scrollbar-track {
    background: var(--background) !important;
}

.details-body::-webkit-scrollbar-thumb {
    background: var(--comment) !important;
    border-radius: 4px !important;
}

.details-body::-webkit-scrollbar-thumb:hover {
    background: var(--purple) !important;
}

/* Vis-network edge styling for better visibility in dark theme */
.vis-network .vis-edge {
    stroke: var(--comment) !important;
    stroke-width: 2px !important;
}

.vis-network .vis-edge.vis-hover {
    stroke: var(--purple) !important;
    stroke-width: 3px !important;
}

.vis-network .vis-edge.vis-selected {
    stroke: var(--purple) !important;
    stroke-width: 3px !important;
}

.vis-network .vis-edge .vis-label {
    fill: var(--foreground) !important;
    background: var(--current-line) !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
}

.vis-network .vis-arrow {
    fill: var(--comment) !important;
    stroke: var(--comment) !important;
}

/* Concept filter dropdown - Dark theme */
.concept-filter-dropdown {
    background: var(--current-line) !important;
    border-color: var(--comment) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.filter-header {
    background: var(--background) !important;
    border-bottom-color: var(--comment) !important;
}

.filter-header .btn-link {
    color: var(--purple) !important;
}

.filter-header .btn-link:hover {
    color: var(--pink) !important;
}

.filter-option:hover {
    background: var(--background) !important;
}

.filter-option label {
    color: var(--foreground) !important;
}

.filter-option input[type="checkbox"] {
    accent-color: var(--purple) !important;
}

/* Drawer navigation button - Dark theme override */
.drawer-nav-btn {
    border-radius: 30px !important;
    background: var(--current-line) !important;
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    z-index: 20;
    color: var(--foreground) !important;
}

.drawer-nav-btn:hover {
    background: var(--background) !important;
    color: var(--purple) !important;
    box-shadow: 0 0 20px rgba(47, 143, 214, 0.4) !important;
}

/* ==================== MCP Tools Selection Panel ==================== */
.mcp-tools-panel {
    max-height: 70vh;
    overflow-y: auto;
    background: var(--background) !important;
    color: var(--foreground) !important;
}

.mcp-tools-panel .tools-header {
    position: sticky;
    top: 0;
    background: var(--background) !important;
    z-index: 10;
    padding: 15px;
    border-bottom: 2px solid var(--comment) !important;
    margin-bottom: 15px;
}

.mcp-tools-panel .server-group {
    margin-bottom: 20px;
    border: 1px solid var(--comment) !important;
    border-radius: 8px;
    overflow: hidden;
    background: var(--current-line) !important;
}

.mcp-tools-panel .server-header {
    background: var(--current-line) !important;
    color: var(--foreground) !important;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.mcp-tools-panel .server-header:hover {
    background: var(--comment) !important;
}

.mcp-tools-panel .server-header .collapse-icon {
    transition: transform 0.3s ease;
    font-size: 16px;
    margin-right: 8px;
}

.mcp-tools-panel .server-header.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.mcp-tools-panel .server-name {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcp-tools-panel .server-name i {
    font-size: 16px;
}

.mcp-tools-panel .server-actions {
    display: flex;
    gap: 10px;
}

.mcp-tools-panel .btn-link-sm {
    color: var(--foreground) !important;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.mcp-tools-panel .btn-link-sm:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    text-decoration: none;
}

.mcp-tools-panel .tools-in-server {
    background: var(--background) !important;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mcp-tools-panel .tools-in-server.expanded {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

.mcp-tools-panel .tool-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--comment) !important;
    transition: background 0.2s;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: start;
}

.mcp-tools-panel .tool-item:last-child {
    border-bottom: none;
}

.mcp-tools-panel .tool-item:hover {
    background: var(--current-line) !important;
}

.mcp-tools-panel .tool-item.tool-selected {
    background: rgba(47, 143, 214, 0.15) !important;
    border-left: 3px solid var(--cyan) !important;
}

.mcp-tools-panel .tool-label {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    grid-column: 1 / -1;
}

.mcp-tools-panel .tool-checkbox {
    margin-top: 3px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: var(--cyan) !important;
}

.mcp-tools-panel .tool-name-text {
    font-weight: 600;
    color: var(--foreground) !important;
    font-size: 13px;
}

.mcp-tools-panel .tool-description {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--cyan) !important;
    line-height: 1.5;
    margin-left: 26px;
    padding: 4px 0;
}

.mcp-tools-panel .tools-footer {
    position: sticky;
    bottom: 0;
    background: var(--background) !important;
    padding: 15px;
    border-top: 2px solid var(--comment) !important;
    text-align: right;
    margin-top: 15px;
}

.mcp-tools-panel .tools-footer .btn {
    min-width: 150px;
}

.mcp-tools-panel .tools-list {
    padding: 0 15px 15px 15px;
}

/* Scrollbar styling for MCP panel */
.mcp-tools-panel::-webkit-scrollbar {
    width: 8px;
}

.mcp-tools-panel::-webkit-scrollbar-track {
    background: var(--current-line) !important;
    border-radius: 10px;
}

.mcp-tools-panel::-webkit-scrollbar-thumb {
    background: var(--comment) !important;
    border-radius: 10px;
}

.mcp-tools-panel::-webkit-scrollbar-thumb:hover {
    background: var(--comment) !important;
}

/* Modal backdrop for Dark */
.modal-backdrop {
    background-color: rgba(8, 14, 25, 0.9) !important;
}

/* Badge styling in MCP panel */
.mcp-tools-panel .badge-light {
    background: rgba(255, 255, 255, 0.3) !important;
    color: var(--foreground) !important;
}

/* ================================================================
   TREE CONTENT SELECTOR - DARK THEME
   ================================================================ */

/* Main form container */
.tree-content-selector-form {
    background: linear-gradient(135deg, rgba(8, 14, 25, 0.98) 0%, rgba(10, 17, 30, 0.98) 100%) !important;
    color: var(--foreground) !important;
}

/* Tree container */
.tree-container {
    border: 1px solid var(--comment) !important;
    background: linear-gradient(135deg, rgba(16, 27, 44, 0.6) 0%, rgba(16, 27, 44, 0.4) 100%) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Content list text */
.content-list {
    color: var(--foreground) !important;
}

/* Filter input styles */
.tree-filter-input {
    background: linear-gradient(135deg, rgba(8, 14, 25, 0.9) 0%, rgba(8, 14, 25, 0.8) 100%) !important;
    border: 1px solid rgba(138, 157, 180, 0.35) !important;
    color: var(--foreground) !important;
}

.tree-filter-input:focus {
    background: linear-gradient(135deg, rgba(12, 20, 34, 0.95) 0%, rgba(12, 20, 34, 0.85) 100%) !important;
    border-color: rgba(70, 182, 217, 0.6) !important;
    box-shadow: 0 0 20px rgba(47, 143, 214, 0.4);
}

.tree-filter-input::placeholder {
    color: var(--comment) !important;
}

/* Clear filter button */
.clear-filter {
    background: linear-gradient(135deg, rgba(16, 27, 44, 0.8) 0%, rgba(16, 27, 44, 0.6) 100%) !important;
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    color: var(--foreground) !important;
}

.clear-filter:hover {
    background: linear-gradient(135deg, rgba(47, 143, 214, 0.3) 0%, rgba(47, 143, 214, 0.2) 100%) !important;
    border-color: rgba(70, 182, 217, 0.5) !important;
}

/* Form labels */
.tree-content-selector-form .form-label {
    color: var(--cyan) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Selected items display */
.selected-items-display {
    background: linear-gradient(135deg, rgba(47, 143, 214, 0.3) 0%, rgba(47, 143, 214, 0.2) 100%) !important;
    border: 1px solid rgba(47, 143, 214, 0.5) !important;
    color: var(--foreground) !important;
}

/* Tree lines and icons */
.tree li::before {
    border-bottom-color: var(--comment) !important;
}

.tree li::after {
    border-left-color: var(--comment) !important;
}

.tree .tree-junction::before {
    color: var(--comment) !important;
}

/* Non-refreshable nodes */
.tree-node-non-refreshable {
    color: var(--comment) !important;
}

/* Multi-selected items */
.tree-node-multi-selected {
    background: linear-gradient(135deg, rgba(47, 143, 214, 0.6) 0%, rgba(47, 143, 214, 0.5) 100%) !important;
    border: 1px solid rgba(47, 143, 214, 0.8) !important;
    color: var(--foreground) !important;
}

/* ================================================================
   CONTENT ITEM PANEL - DARK THEME  
   ================================================================ */

/* Content item links */
.content-item-link {
    color: var(--foreground) !important;
    border: 1px solid transparent;
}

.content-item-link:hover {
    background: linear-gradient(135deg, rgba(16, 27, 44, 0.8) 0%, rgba(16, 27, 44, 0.6) 100%) !important;
    color: var(--foreground) !important;
    border-color: rgba(138, 157, 180, 0.3) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Selectable items */
.content-item-selectable {
    color: var(--cyan) !important;
}

.content-item-selectable:hover {
    color: var(--foreground) !important;
}

/* Selected items */
.content-item-selected {
    background: linear-gradient(135deg, rgba(47, 143, 214, 0.8) 0%, rgba(47, 143, 214, 0.6) 100%) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--cyan) !important;
    box-shadow: 0 4px 15px rgba(47, 143, 214, 0.3);
}

.content-item-selected:hover {
    background: linear-gradient(135deg, rgba(74, 166, 228, 0.9) 0%, rgba(47, 143, 214, 0.7) 100%) !important;
    color: var(--foreground) !important;
    box-shadow: 0 6px 20px rgba(47, 143, 214, 0.5);
}

/* Content item labels */
.content-item-label {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Non-selectable items */
.content-item-link:not(.content-item-selectable) {
    color: var(--comment) !important;
}

.content-item-link:not(.content-item-selectable):hover {
    background: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* ================================================================
   REFRESHABLE CONTENT SELECTOR FIELD - DARK THEME  
   ================================================================ */

/* Content display area */
.content-display {
    background: linear-gradient(135deg, rgba(8, 14, 25, 0.9) 0%, rgba(8, 14, 25, 0.8) 100%) !important;
    border: 1px solid rgba(138, 157, 180, 0.35) !important;
    color: var(--foreground) !important;
}

.content-display[readonly] {
    /*background: linear-gradient(135deg, rgba(16, 27, 44, 0.8) 0%, rgba(16, 27, 44, 0.6) 100%) !important;*/
}

/* Selected content names */
.selected-content-names {
    color: var(--foreground) !important;
}

.selected-content-names:empty::before {
    color: var(--comment) !important;
}

/* Selector button */
.selector-button {
    background: linear-gradient(135deg, rgba(16, 27, 44, 0.8) 0%, rgba(16, 27, 44, 0.6) 100%) !important;
    border: 1px solid rgba(138, 157, 180, 0.4) !important;
    color: var(--foreground) !important;
}

.selector-button:hover {
    background: linear-gradient(135deg, rgba(47, 143, 214, 0.3) 0%, rgba(47, 143, 214, 0.2) 100%) !important;
    border-color: rgba(70, 182, 217, 0.5) !important;
}

/* ================================================================
   POPOVER - DARK THEME  
   ================================================================ */

.popover {
    background: var(--current-line) !important;
}


/* ================================================================
   LAYOUT MANAGEMENT PANEL - DARK THEME (Colors Only)
   ================================================================ */

/* List item colors */
.layout-management-main-form .list-group-item {
    background-color: var(--current-line) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
}

.layout-management-main-form .list-group-item.active {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
}

/* All text inside list items must be visible */
.layout-management-main-form .list-group-item,
.layout-management-main-form .list-group-item a,
.layout-management-main-form .list-group-item span,
.layout-management-main-form .list-group-item .small,
.layout-management-main-form .layout-name-link,
.layout-management-main-form .layout-name-link span {
    color: var(--foreground) !important;
}

/* Edit button (pen) - light color for visibility */
.layout-management-main-form .list-group-item a.layout-action-btn:not(.text-danger),
.layout-management-main-form .list-group-item a.layout-action-btn:not(.text-danger) i {
    color: #e9eff7 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.layout-management-main-form .list-group-item a.layout-action-btn:not(.text-danger):hover,
.layout-management-main-form .list-group-item a.layout-action-btn:not(.text-danger):hover i {
    color: #46b6d9 !important;
}

/* Delete button (trash) - red color */
.layout-management-main-form .list-group-item a.layout-action-btn.text-danger,
.layout-management-main-form .list-group-item a.layout-action-btn.text-danger i {
    color: #e05a52 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.layout-management-main-form .list-group-item a.layout-action-btn.text-danger:hover,
.layout-management-main-form .list-group-item a.layout-action-btn.text-danger:hover i {
    color: #ed847c !important;
}

/* Active item - white buttons for purple background */
.layout-management-main-form .list-group-item.active a.layout-action-btn:not(.text-danger),
.layout-management-main-form .list-group-item.active a.layout-action-btn:not(.text-danger) i {
    color: #ffffff !important;
    visibility: visible !important;
}

.layout-management-main-form .list-group-item.active a.layout-action-btn.text-danger,
.layout-management-main-form .list-group-item.active a.layout-action-btn.text-danger i {
    color: #e8a49e !important;
}

/* ================================================================
   SETTINGS SECTIONS - DARK THEME
   ================================================================ */

/* Settings section separator - using Dark comment color */
.settings-section {
    border-bottom: 1px solid var(--comment);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

/* ================================================================
   FORM LABELS - DARK THEME
   ================================================================ */

.form-label {
    color: var(--foreground-muted) !important; /* Dark foreground - clean neutral label color */
}

/* ================================================================
   DATERANGEPICKER - DARK THEME
   ================================================================ */

/* Main container */
.daterangepicker {
    background-color: var(--background) !important;
    border: 1px solid var(--comment) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
    font-family: inherit !important;
    z-index: 99999999 !important;
}

.daterangepicker::before,
.daterangepicker::after {
    border-bottom-color: var(--comment) !important;
}

.daterangepicker.opensleft::before,
.daterangepicker.opensleft::after,
.daterangepicker.opensright::before,
.daterangepicker.opensright::after {
    border-bottom-color: var(--background) !important;
}

/* Ranges sidebar */
.daterangepicker .ranges {
    background-color: var(--current-line) !important;
    border-right: 1px solid var(--comment) !important;
}

.daterangepicker .ranges ul {
    padding: 0 !important;
    margin: 0 !important;
}

.daterangepicker .ranges li {
    background-color: transparent !important;
    color: var(--foreground) !important;
    padding: 10px 16px !important;
    border-bottom: 1px solid rgba(138, 157, 180, 0.2) !important;
    cursor: pointer;
    transition: all 0.2s ease !important;
}

.daterangepicker .ranges li:hover {
    background-color: var(--purple) !important;
    color: var(--foreground) !important;
}

.daterangepicker .ranges li.active {
    background-color: var(--purple) !important;
    color: var(--foreground) !important;
    font-weight: 500;
}

/* Calendar container */
.daterangepicker .drp-calendar {
    background-color: var(--background) !important;
    padding: 12px !important;
}

.daterangepicker .calendar-table {
    background-color: var(--background) !important;
    border: none !important;
}

/* Month/Year header */
.daterangepicker .calendar-table .month {
    color: var(--foreground) !important;
    font-weight: 600 !important;
    padding: 8px 0 !important;
}

/* Month/Year select dropdowns */
.daterangepicker .calendar-table .monthselect,
.daterangepicker .calendar-table .yearselect {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--comment) !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    margin: 0 4px !important;
    cursor: pointer;
}

.daterangepicker .calendar-table .monthselect:hover,
.daterangepicker .calendar-table .yearselect:hover {
    border-color: var(--purple) !important;
}

.daterangepicker .calendar-table .monthselect:focus,
.daterangepicker .calendar-table .yearselect:focus {
    outline: none !important;
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 2px rgba(47, 143, 214, 0.3) !important;
}

/* Navigation arrows */
.daterangepicker .calendar-table th.prev,
.daterangepicker .calendar-table th.next {
    color: var(--foreground) !important;
    cursor: pointer;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
}

.daterangepicker .calendar-table th.prev:hover,
.daterangepicker .calendar-table th.next:hover {
    background-color: var(--current-line) !important;
}

.daterangepicker .calendar-table th.prev span,
.daterangepicker .calendar-table th.next span {
    border-color: var(--foreground) !important;
}

/* Day of week headers */
.daterangepicker .calendar-table thead tr:nth-child(2) th {
    color: var(--comment) !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    padding: 8px 0 !important;
}

/* Calendar days */
.daterangepicker .calendar-table td {
    color: var(--foreground) !important;
    background-color: transparent !important;
    border-radius: 4px !important;
    padding: 6px !important;
    min-width: 32px !important;
    height: 32px !important;
    line-height: 20px !important;
    transition: all 0.15s ease !important;
}

.daterangepicker .calendar-table td:hover {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
}

/* Weekend days */
.daterangepicker .calendar-table td.weekend {
    color: var(--pink) !important;
}

/* Off/disabled days (other months) */
.daterangepicker .calendar-table td.off,
.daterangepicker .calendar-table td.off.ends {
    color: var(--comment) !important;
    opacity: 0.5;
}

.daterangepicker .calendar-table td.off:hover,
.daterangepicker .calendar-table td.off.ends:hover {
    background-color: var(--current-line) !important;
    opacity: 0.7;
}

/* Today */
.daterangepicker .calendar-table td.today {
    background-color: var(--current-line) !important;
    color: var(--cyan) !important;
    font-weight: 600 !important;
}

/* Active/selected date */
.daterangepicker .calendar-table td.active,
.daterangepicker .calendar-table td.active:hover,
.daterangepicker .calendar-table td.start-date,
.daterangepicker .calendar-table td.end-date {
    background-color: var(--purple) !important;
    color: var(--foreground) !important;
    font-weight: 500 !important;
}

/* Date range between start and end */
.daterangepicker .calendar-table td.in-range {
    background-color: rgba(47, 143, 214, 0.3) !important;
    color: var(--foreground) !important;
}

/* Disabled dates */
.daterangepicker .calendar-table td.disabled {
    color: var(--comment) !important;
    opacity: 0.3;
    cursor: not-allowed !important;
}

/* Buttons container */
.daterangepicker .drp-buttons {
    background-color: var(--current-line) !important;
    border-top: 1px solid var(--comment) !important;
    padding: 12px !important;
}

/* Selected text */
.daterangepicker .drp-selected {
    color: var(--foreground) !important;
    font-size: 13px !important;
}

/* Cancel button */
.daterangepicker .drp-buttons .cancelBtn {
    background-color: transparent !important;
    color: var(--foreground) !important;
    border: 1px solid var(--comment) !important;
    border-radius: 4px !important;
    padding: 6px 16px !important;
    transition: all 0.2s ease !important;
}

.daterangepicker .drp-buttons .cancelBtn:hover {
    background-color: var(--comment) !important;
    border-color: var(--comment) !important;
}

/* Apply button */
.daterangepicker .drp-buttons .applyBtn {
    background-color: var(--purple) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--purple) !important;
    border-radius: 4px !important;
    padding: 6px 16px !important;
    transition: all 0.2s ease !important;
}

.daterangepicker .drp-buttons .applyBtn:hover {
    background-color: var(--pink) !important;
    border-color: var(--pink) !important;
}

/* Time picker */
.daterangepicker .calendar-time {
    background-color: var(--background) !important;
    border-top: 1px solid var(--comment) !important;
    padding: 8px 12px !important;
    text-align: center;
}

.daterangepicker .calendar-time select {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--comment) !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    margin: 0 2px !important;
}

.daterangepicker .calendar-time select:hover {
    border-color: var(--purple) !important;
}

.daterangepicker .calendar-time select:focus {
    outline: none !important;
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 2px rgba(47, 143, 214, 0.3) !important;
}

/* Time picker label */
.daterangepicker .calendar-time .daterangepicker_input {
    color: var(--foreground) !important;
}

/* Input with icon */
.daterangepicker .daterangepicker_input input {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--comment) !important;
    border-radius: 4px !important;
}

.daterangepicker .daterangepicker_input input:focus {
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 2px rgba(47, 143, 214, 0.3) !important;
}

/* AM/PM toggle */
.daterangepicker select.ampmselect {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--comment) !important;
}

/* Hide drp-selected when single date picker */
.daterangepicker.single .drp-selected {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 564px) {
    .daterangepicker .ranges {
        border-right: none !important;
        border-bottom: 1px solid var(--comment) !important;
    }

    .daterangepicker .ranges li {
        display: inline-block !important;
        padding: 8px 12px !important;
    }
}

/* ================================================================
   DATEPICKER (@chenfengyuan/datepicker) - DARK THEME
   ================================================================ */

/* Main container */
.datepicker-container {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
    font-size: 12px;
    line-height: 30px;
}

/* Dropdown styling */
.datepicker-dropdown {
    border: 1px solid var(--comment) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
    border-radius: 6px !important;
}

/* Arrow styling for top positions */
.datepicker-top-left,
.datepicker-top-right {
    border-top-color: var(--purple) !important;
}

.datepicker-top-left::before,
.datepicker-top-right::before {
    border-bottom-color: var(--purple) !important;
}

.datepicker-top-left::after,
.datepicker-top-right::after {
    border-bottom-color: var(--current-line) !important;
}

/* Arrow styling for bottom positions */
.datepicker-bottom-left,
.datepicker-bottom-right {
    border-bottom-color: var(--purple) !important;
}

.datepicker-bottom-left::before,
.datepicker-bottom-right::before {
    border-top-color: var(--purple) !important;
}

.datepicker-bottom-left::after,
.datepicker-bottom-right::after {
    border-top-color: var(--current-line) !important;
}

/* Panel list items */
.datepicker-panel > ul > li {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
    cursor: pointer;
    transition: all 0.15s ease;
}

/* Hover state */
.datepicker-panel > ul > li:hover {
    background-color: var(--background) !important;
    color: var(--pink) !important;
}

/* Muted/disabled text (days from other months) */
.datepicker-panel > ul > li.muted,
.datepicker-panel > ul > li.muted:hover {
    color: var(--comment) !important;
}

/* Today's date highlight */
.datepicker-panel > ul > li.highlighted {
    background-color: rgba(47, 143, 214, 0.2) !important;
    color: var(--cyan) !important;
}

.datepicker-panel > ul > li.highlighted:hover {
    background-color: rgba(47, 143, 214, 0.35) !important;
    color: var(--pink) !important;
}

/* Selected/picked date */
.datepicker-panel > ul > li.picked,
.datepicker-panel > ul > li.picked:hover {
    background-color: var(--purple) !important;
    color: var(--foreground) !important;
    font-weight: 600;
}

/* Disabled dates */
.datepicker-panel > ul > li.disabled,
.datepicker-panel > ul > li.disabled:hover {
    background-color: var(--current-line) !important;
    color: var(--comment) !important;
    opacity: 0.5;
    cursor: not-allowed !important;
}

.datepicker-panel > ul > li.disabled.highlighted,
.datepicker-panel > ul > li.disabled:hover.highlighted {
    background-color: rgba(47, 143, 214, 0.1) !important;
}

/* Navigation arrows (prev/next) */
.datepicker-panel > ul > li[data-view="years prev"],
.datepicker-panel > ul > li[data-view="year prev"],
.datepicker-panel > ul > li[data-view="month prev"],
.datepicker-panel > ul > li[data-view="years next"],
.datepicker-panel > ul > li[data-view="year next"],
.datepicker-panel > ul > li[data-view="month next"],
.datepicker-panel > ul > li[data-view="next"] {
    font-size: 18px;
    color: var(--purple) !important;
}

.datepicker-panel > ul > li[data-view="years prev"]:hover,
.datepicker-panel > ul > li[data-view="year prev"]:hover,
.datepicker-panel > ul > li[data-view="month prev"]:hover,
.datepicker-panel > ul > li[data-view="years next"]:hover,
.datepicker-panel > ul > li[data-view="year next"]:hover,
.datepicker-panel > ul > li[data-view="month next"]:hover,
.datepicker-panel > ul > li[data-view="next"]:hover {
    color: var(--pink) !important;
}

/* Current month/year display */
.datepicker-panel > ul > li[data-view="years current"],
.datepicker-panel > ul > li[data-view="year current"],
.datepicker-panel > ul > li[data-view="month current"] {
    color: var(--foreground) !important;
    font-weight: 600;
}

.datepicker-panel > ul > li[data-view="years current"]:hover,
.datepicker-panel > ul > li[data-view="year current"]:hover,
.datepicker-panel > ul > li[data-view="month current"]:hover {
    color: var(--pink) !important;
    background-color: var(--background) !important;
}

/* Week header row (days of week labels) */
.datepicker-panel > ul[data-view="week"] > li,
.datepicker-panel > ul[data-view="week"] > li:hover {
    background-color: var(--background) !important;
    color: var(--comment) !important;
    cursor: default !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
}

/* Years and months view */
.datepicker-panel > ul[data-view="years"] > li,
.datepicker-panel > ul[data-view="months"] > li {
    color: var(--foreground) !important;
}

.datepicker-panel > ul[data-view="years"] > li:hover,
.datepicker-panel > ul[data-view="months"] > li:hover {
    background-color: var(--background) !important;
    color: var(--pink) !important;
}

/* Inline datepicker */
.datepicker-inline {
    border: 1px solid var(--comment) !important;
    border-radius: 6px;
}

/* ================================================================
   PARSIS DRAG & DROP - DARK THEME
   ================================================================ */

.parsis-placeholder {
    width: 100%;
    height: 50px;
    background: var(--current-line);
    border: 2px dashed var(--comment);
    border-radius: 4px;
}

.parsis-drag-started-color {
    background: var(--current-line);
    min-height: 100px;
    border: 1px solid var(--comment);
    border-radius: 4px;
    opacity: 0.7;
}

.parsis-drag-started {
    background: var(--current-line);
    height: 100px;
    min-width: 100px;
    border: 1px solid var(--comment);
    border-radius: 4px;
    opacity: 0.7;
}

.parsis-drag-plugin-highlight {
    background: rgba(47, 143, 214, 0.25);
    min-height: 100px;
    border: 2px dashed var(--purple);
    border-radius: 4px;
}

/* Shrink the dragged clone of an in-parsis plugin to a 100x80 ghost */
.parsis-plugin-drag-source.ui-draggable-dragging {
    width: 100px !important;
    height: 80px !important;
    max-width: 100px !important;
    max-height: 80px !important;
    overflow: hidden !important;
    opacity: .9;
    border: 1px solid var(--purple);
    border-radius: 4px;
    background: var(--body-bg, #0f1929);
    color: var(--body-color, #f1f5fa);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .4);
    pointer-events: none;
    font-size: 11px;
    padding: 4px;
}

.divider {
    margin-top: 1rem;
    margin-bottom: 1rem;
    height: 1px;
    overflow: hidden;
    background: var(--current-line);
}

.mrjun-authoring-box {
    border-width: 1px;
    border-style: dotted;
    border-color: var(--purple);
    border-radius: 5px;
}

.mrjun-authoring-box:hover:not(:has(.mrjun-authoring-box:hover)) {
    border-color: var(--green);
    background: rgba(89, 194, 106, 0.1);
}

/* Plugin editor floating menu (nct-editor-buttons) — Dark */
.nct-editor-buttons .btn,
.nct-editor-buttons .btn-link,
.nct-editor-buttons .btn-icon,
.nct-editor-buttons .pe-7s-menu,
.nct-editor-buttons .btn-icon-wrapper {
    color: var(--foreground) !important;
    opacity: 0.85;
    transition: opacity 0.15s ease;
}
.nct-editor-buttons .btn:hover,
.nct-editor-buttons .btn:focus,
.nct-editor-buttons .nct-editor-btn-group.show .btn,
.nct-editor-buttons .btn:hover .pe-7s-menu,
.nct-editor-buttons .btn:focus .pe-7s-menu,
.nct-editor-buttons .nct-editor-btn-group.show .pe-7s-menu {
    opacity: 1;
}

.card-header > .nav .nav-link::before {
    background: var(--purple) !important;
}

/* CodeMirror selection - Dark style */
.CodeMirror-selected,
.CodeMirror-focused .CodeMirror-selected {
    background: #101b2c !important;
}

/* CodeMirror Hints (Autocomplete) - Dark style */
.CodeMirror-hints {
    background: #080e19 !important;
    border: 1px solid #8a9db4 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 1px rgba(70, 182, 217, 0.3) !important;
    font-family: 'Fira Code', 'JetBrains Mono', monospace !important;
    font-size: 13px !important;
    padding: 4px 0 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    z-index: 10000 !important;
}

.CodeMirror-hints::-webkit-scrollbar {
    width: 8px;
}

.CodeMirror-hints::-webkit-scrollbar-track {
    background: #060b13;
    border-radius: 4px;
}

.CodeMirror-hints::-webkit-scrollbar-thumb {
    background: #8a9db4;
    border-radius: 4px;
}

.CodeMirror-hints::-webkit-scrollbar-thumb:hover {
    background: #46b6d9;
}

.CodeMirror-hint {
    color: #e9eff7 !important;
    padding: 6px 12px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    border-left: 3px solid transparent !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

.CodeMirror-hint:hover {
    background: #101b2c !important;
    color: #46b6d9 !important;
    border-left-color: #46b6d9 !important;
}

.CodeMirror-hint-active,
.CodeMirror-hint-active:hover {
    background: linear-gradient(135deg, #101b2c 0%, #0f1929 100%) !important;
    color: #59c26a !important;
    border-left-color: #59c26a !important;
}

/* ================================================================
   REPLACEMENT PANEL / CHART CONFIGURATION - DARK THEME
   Styles for chart replacement panels and configuration UI
   ================================================================ */

/* Override inline light backgrounds on replacement panel containers */
.row[style*="background: #d4d4d4"],
.row[style*="background:#d4d4d4"],
.row[style*="background: #e9eff7"],
.row[style*="background:#e9eff7"] {
    background: linear-gradient(135deg, #0a111e 0%, #080e19 100%) !important;
}

/* Replacement panel sortable cards container */
.chart-js-replacement {
    transition: all 0.2s ease;
}

/* Active replacement card - highlight with purple glow */
.chart-js-replacement.active {
    position: relative;
}

.chart-js-replacement.active > div > .card {
    border: 2px solid var(--purple) !important;
    box-shadow: 0 0 15px rgba(47, 143, 214, 0.4),
                0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Chart configuration container */
.chart-configuration-cnt {
    background: linear-gradient(135deg, #0d1624 0%, #0b1220 100%) !important;
    border-radius: 8px;
    padding: 15px;
}

/* Form helper text */
.form-text {
    color: var(--comment) !important;
    font-size: 0.85em;
}

.form-text a {
    color: var(--purple) !important;
}

.form-text a:hover {
    color: var(--pink) !important;
    text-decoration: underline;
}

/* ================================================================
   NAVBAR - DARK THEME
   Bootstrap navbar component styling
   ================================================================ */

.navbar {
    background: linear-gradient(135deg, #0d1624 0%, #0b1220 100%) !important;
    border: 1px solid var(--comment) !important;
    border-radius: 6px;
}

.navbar.bg-light {
    background: linear-gradient(135deg, #0d1624 0%, #0b1220 100%) !important;
}

.navbar-brand {
    color: var(--foreground) !important;
    font-weight: 600;
}

.navbar-brand:hover {
    color: var(--pink) !important;
}

.navbar-nav .nav-link {
    color: var(--foreground-muted) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--pink) !important;
}

.navbar-toggler {
    border-color: var(--comment) !important;
}

.navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* NCT Navbar Run Query Button - special styling */
.nct-navbar-run-query {
    /* Inherits btn-success styling */
}

/* ================================================================
   AGGREGATIONS / GROUP BY / ORDER BY EDITOR PANELS - DARK THEME
   ================================================================ */

#aggregationsEditorPanel,
#groupByEditorPanel,
#orderByEditorPanel,
[id^="aggregationsEditorPanel"],
[id^="groupByEditorPanel"],
[id^="orderByEditorPanel"] {
    margin-bottom: 1rem;
}

#aggregationsEditorPanel .btn-success,
#groupByEditorPanel .btn-success,
#orderByEditorPanel .btn-success,
[id^="aggregationsEditorPanel"] .btn-success,
[id^="groupByEditorPanel"] .btn-success,
[id^="orderByEditorPanel"] .btn-success {
    margin-bottom: 0.5rem;
}

/* ================================================================
   QUERY PANEL - DARK THEME
   ================================================================ */

[id^="queryPanel"] {
    background: transparent;
}

[id^="queryPanel"] .card {
    background: linear-gradient(135deg, #0d1624 0%, #0b1220 100%) !important;
    border: 1px solid var(--comment) !important;
}

[id^="queryPanel"] .card-header {
    background-color: rgba(8, 14, 25, 0.7) !important;
    border-bottom: 1px solid var(--comment) !important;
    color: var(--foreground) !important;
}

[id^="queryPanel"] .card-header i {
    color: var(--purple) !important;
}

/* ================================================================
   RESULTS PANEL - DARK THEME
   ================================================================ */

[id^="resultsPanel"] {
    background: transparent;
}

[id^="resultsPanel"] .card,
.blocking-result-panel {
    background: linear-gradient(135deg, #0d1624 0%, #0b1220 100%) !important;
    border: 1px solid var(--comment) !important;
}

/* Result table container with scrollbar */
.nct-result-table-container {
    background: transparent;
}

.nct-result-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.nct-result-table-container::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 4px;
}

.nct-result-table-container::-webkit-scrollbar-thumb {
    background: var(--comment);
    border-radius: 4px;
}

.nct-result-table-container::-webkit-scrollbar-thumb:hover {
    background: var(--purple);
}

/* DataTables wrapper styling */
.dataTables_wrapper {
    color: var(--foreground) !important;
}

/* ================================================================
   FILTER PANEL - DARK THEME
   ================================================================ */

[id^="filter"] .card {
    background: linear-gradient(135deg, #0d1624 0%, #0b1220 100%) !important;
    border: 1px solid var(--comment) !important;
}

[id^="filter"] .card-header {
    background-color: rgba(8, 14, 25, 0.7) !important;
    border-bottom: 1px solid var(--comment) !important;
    color: var(--foreground) !important;
}

[id^="filter"] .card-header i {
    color: var(--purple) !important;
}

[id^="filter"] .card-body {
    background: transparent;
}

/* ================================================================
   HORIZONTAL RULE - DARK THEME
   ================================================================ */

hr {
    color: var(--comment) !important;
    opacity: 0.5;
}

/* iOS Toggle Switch - Dark */
.circle-nicelabel:not(:checked) + label.nicelabel-generated {
    background-color: #101b2c;
    border-color: #8a9db4;
}
.circle-nicelabel:checked + label.nicelabel-generated {
    background-color: #2f8fd6;
    border-color: #6fbdf0;
}
.circle-nicelabel:focus + label.nicelabel-generated {
    box-shadow: 0 0 0 3px rgba(47, 143, 214, 0.3);
}

/* ================================================================
   BTN-ACTIONS-PANE - DARK THEME
   ================================================================ */

.btn-actions-pane-right {
    color: var(--foreground-muted);
}

.btn-actions-pane-right .dropdown-menu {
    background-color: var(--current-line) !important;
    border: 1px solid var(--comment) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.btn-actions-pane-right .dropdown-item {
    color: var(--foreground) !important;
}

.btn-actions-pane-right .dropdown-item:hover {
    background-color: #16243a !important !important;
    color: var(--ink-1) !important;
}

.btn-actions-pane-right .dropdown-item .dropdown-icon {
    color: var(--purple) !important;
}

.btn-actions-pane-right .dropdown-item:hover .dropdown-icon {
    color: var(--ink-1) !important;
}

/* ================================================================
   STAT ICONS - DARK THEME
   ================================================================ */

.stat.text-primary {
    color: var(--purple) !important;
}

.stat.text-primary svg {
    stroke: var(--purple) !important;
}

/* ================================================================
   SET ALL REPLACEMENT MAX ITEMS - DARK THEME
   ================================================================ */

.set-all-rep-max-item-count-field {
    /* Inherits form-control styling */
}

.set-all-rep-max-item-count-btn {
    /* Inherits btn-success styling */
}

/* ================================================================
   UI SORTABLE DARK ENHANCEMENTS
   ================================================================ */

.ui-sortable-handle {
    cursor: grab;
}

.ui-sortable-handle:active {
    cursor: grabbing;
}

.ui-sortable-helper {
    opacity: 0.9;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    transform: rotate(2deg);
}

.ui-sortable-placeholder {
    background: rgba(47, 143, 214, 0.2) !important;
    border: 2px dashed var(--purple) !important;
    border-radius: 8px;
    visibility: visible !important;
}

/* ================================================================
   PAGING PANEL - DARK THEME (additional specificity)
   ================================================================ */

[id^="paging"] .pagination {
    margin-bottom: 0;
}

[id^="paging"] .page-link {
    background-color: var(--background) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
}

[id^="paging"] .page-link:hover {
    background-color: var(--current-line) !important;
    border-color: var(--purple) !important;
    color: var(--pink) !important;
}

[id^="paging"] .page-link[disabled],
[id^="paging"] .page-item.disabled .page-link {
    background-color: var(--background) !important;
    border-color: var(--comment) !important;
    color: var(--comment) !important;
    opacity: 0.5;
    cursor: not-allowed;
}

[id^="paging"] .page-item.active .page-link,
[id^="paging"] .page-item.active .page-link span {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
    color: var(--background) !important;
    font-weight: 600;
}

/* ================================================================
   ICON BUTTON WRAPPERS - DARK THEME
   ================================================================ */

.btn-icon-wrapper {
    color: inherit !important;
}

/* ================================================================
   FORM CONTROL SM - DARK THEME (ensure small controls are styled)
   ================================================================ */

.form-control-sm {
    /* Inherits from .form-control */
    font-size: 0.875rem !important;
}

/* ================================================================
   NOTIFICATION DROPDOWN HEADER - DARK THEME
   ================================================================ */

.dropdown-menu-header {
    background-color: var(--current-line) !important;
    border-bottom: 1px solid var(--comment) !important;
}

.dropdown-menu-header-inner {
    background: var(--w2-brand) !important;
}

.dropdown-menu-header-inner.bg-deep-blue {
    background: var(--w2-brand) !important;
}

.dropdown-menu-header .menu-header-image {
    opacity: 0.15 !important;
}

.dropdown-menu-header .menu-header-content {
    color: var(--foreground) !important;
}

.dropdown-menu-header .menu-header-content.text-dark {
    color: var(--foreground) !important;
}

.dropdown-menu-header .menu-header-title {
    color: var(--foreground) !important;
    font-weight: 600;
}

.dropdown-menu-header .menu-header-subtitle {
    color: var(--foreground-muted) !important;
}

.dropdown-menu-header .menu-header-subtitle b {
    color: var(--pink) !important;
}

.dropdown-menu-header .menu-header-subtitle b.unread-count-text {
    color: var(--foreground-muted) !important;
}

/* ================================================================
   NOTIFICATION LIST PANEL - DARK THEME
   Styles for the All Notifications modal
   ================================================================ */

.notification-list-panel {
    background-color: var(--background) !important;
}

.notification-list-item {
    border-bottom: 1px solid var(--current-line) !important;
    background-color: transparent;
}

.notification-list-item:hover {
    background-color: var(--current-line) !important;
}

.notification-list-item.notification-unread {
    background-color: rgba(47, 143, 214, 0.1) !important;
}

.notification-list-item.notification-unread::before {
    background-color: var(--purple) !important;
}

.notification-list-item.notification-unread.dot-danger::before {
    background-color: var(--red) !important;
}

.notification-list-item.notification-unread.dot-warning::before {
    background-color: var(--orange) !important;
}

.notification-list-item.notification-unread.dot-info::before {
    background-color: var(--cyan) !important;
}

.notification-icon {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
}

.dot-danger .notification-icon {
    background-color: rgba(224, 90, 82, 0.2) !important;
    color: var(--red) !important;
}

.dot-warning .notification-icon {
    background-color: rgba(224, 163, 60, 0.2) !important;
    color: var(--orange) !important;
}

.dot-info .notification-icon {
    background-color: rgba(47, 143, 214, 0.2) !important;
    color: var(--cyan) !important;
}

.dot-primary .notification-icon {
    background-color: rgba(47, 143, 214, 0.2) !important;
    color: var(--purple) !important;
}

.notification-title {
    color: var(--foreground) !important;
}

.notification-body {
    color: var(--foreground-muted) !important;
}

.notification-description {
    color: var(--comment) !important;
}

.notification-meta,
.notification-date,
.notification-source {
    color: var(--comment) !important;
}

.notifications-empty-state {
    background-color: var(--background) !important;
}

.notifications-empty-state .text-muted,
.notifications-empty-state i {
    color: var(--comment) !important;
}

.loading-spinner {
    background-color: var(--background) !important;
    color: var(--foreground) !important;
}

/* Notification dropdown timeline styles */
.notifications-list .vertical-timeline-item {
    background-color: transparent;
}

.notifications-list .vertical-timeline-item:hover {
    background-color: var(--current-line) !important;
}

.notifications-list .vertical-timeline-item.notification-unread {
    background-color: rgba(47, 143, 214, 0.1) !important;
}

.notifications-list .vertical-timeline-element-content {
    color: var(--foreground) !important;
}

.notifications-list .vertical-timeline-element-date {
    color: var(--comment) !important;
}

.notifications-list .timeline-title {
    color: var(--foreground) !important;
}

.notifications-list .notification-description {
    color: var(--comment) !important;
}

/* Notification Filter Toolbar */
.notification-filter-toolbar {
    background-color: var(--current-line) !important;
    border-bottom-color: var(--comment) !important;
}

.notification-filter-toolbar .form-check-label {
    color: var(--foreground) !important;
}

.notification-filter-toolbar .total-count {
    color: var(--comment) !important;
}

.notification-filter-toolbar .form-switch .form-check-input {
    background-color: var(--comment);
    border-color: var(--comment);
}

.notification-filter-toolbar .form-switch .form-check-input:checked {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
}

/* ================================================================
   AUDIT LOG DIFF PANEL - DARK THEME
   Beautiful diff visualization for audit log changes
   ================================================================ */

.diff-item {
    margin: 16px;
    border: 1px solid var(--current-line);
    border-radius: 8px;
    overflow: hidden;
    background: var(--background);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.diff-item:last-child {
    margin-bottom: 16px;
}

.diff-item-header {
    background: var(--current-line);
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--comment);
}

.diff-path-code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    background: #050911;
    color: var(--green);
    padding: 4px 10px;
    border-radius: 4px;
    flex-grow: 1;
}

.diff-readable-path {
    font-size: 12px;
    color: var(--foreground-muted);
    margin-top: 6px;
    padding: 4px 10px;
    background: rgba(224, 163, 60, 0.2);
    border-radius: 4px;
    display: inline-block;
}

.diff-values-container {
    display: flex;
    flex-wrap: wrap;
}

.diff-value-section {
    flex: 1;
    min-width: 250px;
    padding: 16px 20px;
}

.diff-value-old-section {
    background: linear-gradient(180deg, rgba(224, 90, 82, 0.1) 0%, rgba(224, 90, 82, 0.2) 100%);
    border-right: 3px solid var(--red);
}

.diff-value-new-section {
    background: linear-gradient(180deg, rgba(89, 194, 106, 0.1) 0%, rgba(89, 194, 106, 0.2) 100%);
    border-left: 3px solid var(--green);
}

.diff-value-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.diff-value-label-old {
    color: var(--red);
}

.diff-value-label-new {
    color: var(--green);
}

.diff-value {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    word-break: break-all;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.diff-value-old {
    background: var(--background);
    border: 2px solid var(--red);
    color: var(--red);
}

.diff-value-new {
    background: var(--background);
    border: 2px solid var(--green);
    color: var(--green);
}

.diff-empty {
    font-style: italic;
    color: var(--comment) !important;
}

.diff-context-row {
    background: var(--current-line);
    padding: 10px 20px;
    font-size: 12px;
    color: var(--foreground-muted);
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.diff-context-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.diff-context-label {
    font-weight: 600;
    color: var(--comment);
}

.diff-change-context {
    background: rgba(224, 163, 60, 0.15);
    padding: 10px 20px;
    font-size: 13px;
    color: var(--orange);
    border-left: 4px solid var(--orange);
}

.bg-purple {
    background-color: var(--purple) !important;
    color: var(--foreground) !important;
}

.badge-sm {
    font-size: 10px;
    padding: 3px 8px;
}

/* Localized diff grouping in AuditLogDetailPanel */
.diff-localized-section {
    background: rgba(28, 47, 73, 0.6);
    padding: 12px 20px;
    border-top: 1px dashed var(--comment);
}

.diff-localized-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--comment);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.diff-localized-header i {
    color: var(--cyan);
    font-size: 14px;
}

.diff-localized-entry {
    background: rgba(111, 189, 240, 0.05);
    border: 1px solid rgba(111, 189, 240, 0.15);
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.diff-localized-entry:last-child {
    margin-bottom: 0;
}

.diff-localized-entry-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(111, 189, 240, 0.08);
    border-bottom: 1px solid rgba(111, 189, 240, 0.1);
}

.diff-locale-badge {
    background: var(--cyan);
    color: var(--background);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* ================================================================
   FIELD CHANGE HISTORY PANEL - DARK THEME
   Displays field-specific audit log changes
   ================================================================ */

.field-history-container {
    /*max-height: 60vh;*/
    min-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.field-history-item {
    border: 1px solid var(--comment);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--current-line);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.field-history-header {
    background: rgba(16, 27, 44, 0.8);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--comment);
}

.field-history-header-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    align-items: center;
}

.field-history-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--comment);
}

.field-history-meta i {
    opacity: 0.8;
    font-size: 1rem;
    color: var(--cyan);
}

.field-history-meta-label {
    font-weight: 500;
    color: var(--foreground);
}

.field-history-meta-value {
    color: var(--pink);
    font-weight: 600;
}

.field-history-meta-value code {
    font-size: 0.75rem;
    padding: 0.15rem 0.4rem;
    background: var(--background);
    border-radius: 3px;
    color: var(--green);
    border: 1px solid var(--comment);
}

.field-history-body {
    padding: 1rem;
    background: var(--background);
}

.field-history-diff-type {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.field-history-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .field-history-values {
        grid-template-columns: 1fr;
    }
}

.field-history-value-section {
    padding: 0.75rem;
    border-radius: 6px;
}

.field-history-value-old {
    background: rgba(224, 90, 82, 0.15);
    border-left: 3px solid var(--red);
}

.field-history-value-new {
    background: rgba(89, 194, 106, 0.15);
    border-left: 3px solid var(--green);
}

.field-history-value-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.field-history-value-label-old {
    color: var(--red);
}

.field-history-value-label-new {
    color: var(--green);
}

.field-history-value-content {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
    word-break: break-word;
    white-space: pre-wrap;
    padding: 0.5rem;
    background: var(--current-line);
    border-radius: 4px;
    min-height: 2rem;
    color: var(--foreground);
}

.field-history-value-null {
    font-style: italic;
    color: var(--comment);
}

.field-history-path {
    padding: 0.5rem 0.75rem;
    /* --selection is declared in no skin, so without a fallback this strip painted
       transparent and the path text sat straight on the panel. */
    background: var(--selection, var(--current-line));
    border-bottom: 1px solid var(--comment);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.field-history-path i {
    color: var(--cyan);
}

.field-history-path-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--foreground);
    word-break: break-all;
}

.field-history-context {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--comment);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.field-history-empty {
    text-align: center;
    padding: 3rem;
    color: var(--comment);
}

.field-history-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    display: block;
    color: var(--purple);
}

/* Diff type badge colors */
.field-history-diff-type.diff-type-value-changed {
    background: var(--yellow);
    color: var(--background);
}

.field-history-diff-type.diff-type-field-added {
    background: var(--green);
    color: var(--background);
}

.field-history-diff-type.diff-type-field-removed {
    background: var(--red);
    color: var(--foreground);
}

.field-history-diff-type.diff-type-list-item-added {
    background: var(--cyan);
    color: var(--background);
}

.field-history-diff-type.diff-type-list-item-removed {
    background: var(--red);
    color: var(--foreground);
}

/* Level badges */
.field-history-level-info {
    background: var(--cyan);
    color: var(--background);
}

.field-history-level-warn {
    background: var(--yellow);
    color: var(--background);
}

.field-history-level-error {
    background: var(--red);
    color: var(--foreground);
}

/* Event type badges */
.field-history-event-type {
    background: var(--purple);
    color: var(--foreground);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Localized values grouping in FieldAuditLogContentPanel */
.field-history-localized-section {
    margin-top: 0.75rem;
    border-top: 1px dashed var(--comment);
    padding-top: 0.75rem;
}

.field-history-localized-header {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--comment);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.field-history-localized-header i {
    color: var(--cyan);
    font-size: 1rem;
}

.field-history-localized-entry {
    background: rgba(111, 189, 240, 0.05);
    border: 1px solid rgba(111, 189, 240, 0.15);
    border-radius: 6px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
}

.field-history-localized-entry:last-child {
    margin-bottom: 0;
}

.field-history-localized-entry-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.field-history-locale-badge {
    background: var(--cyan);
    color: var(--background);
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* ================================================================
   HELP PLUGIN STYLES - DARK THEME
   ================================================================ */

.nct-help-icon {
    color: var(--purple);
    background-color: rgba(47, 143, 214, 0.15);
}

.nct-help-icon:hover {
    color: var(--cyan);
    background-color: rgba(47, 143, 214, 0.25);
}

.nct-help-popup-content {
    background: var(--current-line);
    color: var(--foreground);
    border: 1px solid var(--comment);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.nct-help-popup-arrow {
    background: var(--current-line);
    border-left: 1px solid var(--comment);
    border-top: 1px solid var(--comment);
}

.nct-help-popup.above .nct-help-popup-arrow {
    border-left: none;
    border-top: none;
    border-right: 1px solid var(--comment);
    border-bottom: 1px solid var(--comment);
}

/* ================================================================
   FORM VALIDATION MESSAGE PANEL - Dark Theme
   ================================================================ */

.form-validation-message-panel {
    margin-bottom: 1rem;
}

.form-validation-message-panel .validation-global-errors {
    background-color: rgba(224, 90, 82, 0.15);
    border: 1px solid rgba(224, 90, 82, 0.4);
    border-left: 4px solid var(--red);
    color: var(--foreground);
}

.form-validation-message-panel .validation-field-errors {
    background-color: rgba(224, 163, 60, 0.15);
    border: 1px solid rgba(224, 163, 60, 0.4);
    border-left: 4px solid var(--orange);
    color: var(--foreground);
}

.form-validation-message-panel .validation-header {
    color: var(--foreground);
}

.form-validation-message-panel .validation-header i {
    color: var(--red);
}

.form-validation-message-panel .validation-field-errors .validation-header i {
    color: var(--orange);
}

.form-validation-message-panel .validation-error-item {
    border-bottom-color: rgba(233, 239, 247, 0.1);
}

.form-validation-message-panel .global-error-item i {
    color: var(--red);
}

.form-validation-message-panel .field-error-link {
    color: var(--foreground);
}

.form-validation-message-panel .field-error-link:hover {
    background-color: rgba(224, 163, 60, 0.2);
    color: var(--foreground);
}

.form-validation-message-panel .field-error-link i {
    color: var(--orange);
}

.form-validation-message-panel .field-error-link:hover i {
    color: var(--yellow);
}

.form-validation-message-panel .field-name {
    color: var(--orange);
}

.form-validation-message-panel .error-message {
    color: var(--foreground-muted);
}

/* Validation highlight effect - Dark */
.validation-highlight {
    animation: validation-pulse-dark 0.5s ease-in-out 2;
    box-shadow: 0 0 0 3px rgba(224, 90, 82, 0.4);
}

.validation-field-highlight {
    border-color: var(--red) !important;
    box-shadow: 0 0 0 0.2rem rgba(224, 90, 82, 0.35) !important;
}

@keyframes validation-pulse-dark {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(224, 90, 82, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(224, 90, 82, 0.2);
    }
}

/* ================================================================
   KICKER WINDOW PANEL - DARK THEME
   MrJun CMS authoring window styles
   ================================================================ */

.mrjun-window-panel {
    background-color: var(--current-line);
    border: 1px solid var(--comment);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--purple);
    z-index: 1000;
}

.mrjun-window-top {
    background: linear-gradient(135deg, var(--purple) 0%, var(--comment) 100%);
    border-bottom: 1px solid var(--comment);
    border-radius: 8px 8px 0 0;
    padding: 8px 12px;
    cursor: move;
}

.mrjun-window-top a {
    color: var(--foreground);
    opacity: 0.8;
    transition: opacity 0.2s;
}

.mrjun-window-top a:hover {
    opacity: 1;
}

.mrjun-window-panel .window-body {
    background: linear-gradient(180deg, var(--background) 0%, #04080f 100%);
    padding: 0;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
}

.kicker-tabs {
    background-color: var(--background);
}

.kicker-tabs .nav-tabs {
    background-color: var(--current-line);
    border-bottom: 1px solid var(--comment);
    padding: 4px 8px 0;
}

.kicker-tabs .nav-tabs .nav-item.nav-link {
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--foreground-muted);
    padding: 8px 16px;
    margin-right: 4px;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s;
}

.kicker-tabs .nav-tabs .nav-item.nav-link:hover {
    color: var(--foreground);
    background-color: rgba(255, 255, 255, 0.05);
}

.kicker-tabs .nav-tabs .nav-item.nav-link.active {
    background-color: var(--background);
    color: var(--pink);
    border-bottom-color: var(--pink);
}

.KickerPluginsTabPanel {
    background-color: var(--background);
}

.KickerPluginsTabPanel .card {
    background-color: var(--background);
    border: 1px solid var(--comment);
    border-radius: 4px;
    margin-bottom: 8px;
}

.KickerPluginsTabPanel .card-header {
    background-color: var(--current-line);
    border-bottom: 1px solid var(--comment);
    padding: 0;
}

.KickerPluginsTabPanel .card-header .btn-link {
    color: var(--foreground);
    text-decoration: none;
    padding: 10px 16px;
    display: block;
    width: 100%;
    text-align: left;
    font-weight: 500;
}

.KickerPluginsTabPanel .card-header .btn-link:hover {
    color: var(--pink);
}

.KickerPluginsTabPanel .card-body {
    background-color: var(--background);
    padding: 8px;
}

.KickerPluginsTabPanel .card-body > div[dcs-drag-component="drag"] {
    background-color: var(--current-line);
    border: 1px solid var(--comment);
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 6px;
    cursor: grab;
    transition: all 0.2s;
}

.KickerPluginsTabPanel .card-body > div[dcs-drag-component="drag"]:hover {
    background-color: var(--comment);
    border-color: var(--purple);
    transform: translateX(4px);
}

.KickerPluginsTabPanel .card-body > div[dcs-drag-component="drag"] > div {
    color: var(--foreground);
    font-size: 13px;
}

.mrjun-window-panel .ui-resizable-se {
    background-color: var(--purple);
    border-radius: 0 0 8px 0;
    opacity: 0.5;
}

.mrjun-window-panel .ui-resizable-se:hover {
    opacity: 1;
}

/* Database Management Plugin - active tabs */
.db-tab.active,
.db-subtab.active {
    color: #e9eff7;
    background: #2b4568;
    border-bottom-color: #2f8fd6;
}
.schema-tab.active {
    background: #2f8fd6;
    color: #e9eff7;
}

/* Projects Panel */
.projects-panel .card-header {
    color: var(--foreground-muted) !important;
}
.projects-panel .card-header .fw-semibold,
.projects-panel .card-header i {
    color: var(--foreground-muted) !important;
}

/* ================================================================
   PDF Templates plugin
   ================================================================ */
.pdfme-designer-container {
    background: var(--current-line);
    border-color: var(--comment);
}

.pdftemplate-fullscreen-overlay {
    background: var(--background) !important;
    color: var(--foreground) !important;
}
.pdftemplate-fullscreen-overlay .form-label,
.pdftemplate-fullscreen-overlay .pdftemplate-page-count {
    color: var(--foreground-muted) !important;
}
.pdftemplate-fullscreen-overlay .form-select {
    background-color: var(--current-line);
    color: var(--foreground);
    border-color: var(--comment);
}
.pdftemplate-fullscreen-overlay .form-select option {
    background-color: var(--current-line);
    color: var(--foreground);
}
.pdftemplate-fullscreen-overlay .dropdown-menu {
    background-color: var(--current-line);
    border-color: var(--comment);
}
.pdftemplate-fullscreen-overlay .dropdown-item {
    color: var(--foreground);
}
.pdftemplate-fullscreen-overlay .dropdown-item:hover,
.pdftemplate-fullscreen-overlay .dropdown-item:focus {
    background-color: var(--background);
    color: var(--foreground);
}
.pdftemplate-fullscreen-overlay .vr {
    background-color: var(--comment);
    opacity: 0.5;
}

.pdfme-designer-status {
    color: var(--foreground-muted);
}

.pdftemplate-settings h6 {
    color: var(--foreground);
}

.pdftemplate-settings .list-group-item {
    background-color: var(--background);
    border-color: var(--comment);
    color: var(--foreground);
    transition: background-color 0.15s ease-in-out;
}

.pdftemplate-settings .list-group-item:hover {
    background-color: var(--current-line);
    color: var(--foreground);
}

.pdftemplate-settings .list-group-item.active {
    background-color: var(--purple);
    border-color: var(--purple);
    color: var(--foreground);
}

.pdftemplate-settings .list-group-item a {
    color: var(--foreground);
    text-decoration: none;
}

.pdftemplate-settings .list-group-item.active a {
    color: var(--foreground);
}

.pdftemplate-settings .list-group-item:hover a {
    color: var(--foreground);
}

.pdftemplate-settings .list-group-item .badge.bg-success {
    background-color: var(--green) !important;
    color: var(--foreground) !important;
}

/* ================================================================
   pdfme Designer chrome — left toolbar + right Field List sidebar
   Overrides pdfme's hard-coded inline styles (rgb(245, 245, 245)
   background and rgba(0, 0, 0, 0.88) icon color). All styled
   AntD-style buttons share .ant-btn; the per-tool buttons add
   .pdfme-designer-plugin-{text|image|qrcode|code128|...}.
   ================================================================ */

/* --- Left tool palette --- */
.pdfme-designer-left-sidebar {
    background: var(--background) !important;
    border-right: 1px solid var(--comment);
}

.pdfme-designer-left-sidebar [aria-roledescription="draggable"] {
    cursor: grab;
}

.pdfme-designer-left-sidebar [aria-roledescription="draggable"]:active {
    cursor: grabbing;
}

.pdfme-designer-left-sidebar .ant-btn {
    background-color: var(--current-line) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease-in-out,
                border-color 0.15s ease-in-out,
                color 0.15s ease-in-out !important;
}

.pdfme-designer-left-sidebar .ant-btn:hover,
.pdfme-designer-left-sidebar .ant-btn:focus-visible {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
    color: var(--foreground) !important;
}

/* The icon wrapper carries an inline color we must override so the
   SVG (stroke="currentColor") inherits the right tone. */
.pdfme-designer-left-sidebar .ant-btn > div[title] {
    color: inherit !important;
}

/* --- Right Field List sidebar --- */
.pdfme-designer-right-sidebar > div {
    background: var(--background) !important;
    border-left: 1px solid var(--comment) !important;
}

.pdfme-designer-right-sidebar .pdfme-designer-list-view,
.pdfme-designer-right-sidebar .ant-typography,
.pdfme-designer-right-sidebar .ant-typography strong {
    color: var(--foreground) !important;
}

.pdfme-designer-right-sidebar .ant-divider {
    border-block-start: 1px solid var(--comment) !important;
    background-color: transparent !important;
}

.pdfme-designer-right-sidebar .pdfme-designer-list-view ul {
    color: var(--foreground);
}

.pdfme-designer-right-sidebar .pdfme-designer-list-view ul li {
    background-color: var(--current-line);
    border: 1px solid var(--comment);
    color: var(--foreground);
    transition: background-color 0.15s ease-in-out;
}

.pdfme-designer-right-sidebar .pdfme-designer-list-view ul li:hover {
    background-color: var(--purple);
}

.pdfme-designer-right-sidebar .pdfme-designer-bulk-update {
    color: var(--cyan) !important;
}

.pdfme-designer-right-sidebar .pdfme-designer-bulk-update:hover {
    color: var(--pink) !important;
}

.pdfme-designer-right-sidebar .pdfme-designer-bulk-update u {
    text-decoration: underline;
}

.pdfme-designer-right-sidebar .pdfme-designer-sidebar-toggle {
    background-color: var(--current-line) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
    box-shadow: none;
}

.pdfme-designer-right-sidebar .pdfme-designer-sidebar-toggle:hover {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
    color: var(--foreground) !important;
}

.pdfme-designer-right-sidebar .pdfme-designer-sidebar-toggle .ant-btn-icon {
    color: inherit !important;
}

/* AntD tooltips (portaled to <body>) — pdfme shows the field name on hover. */
.ant-tooltip .ant-tooltip-inner {
    background: var(--current-line) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--comment) !important;
}

.ant-tooltip .ant-tooltip-arrow::before,
.ant-tooltip .ant-tooltip-arrow::after {
    background: var(--current-line) !important;
}

/* ================================================================
   pdfme Designer Detail View — field-edit form (right sidebar
   when a schema is selected). Covers AntD form chrome:
   labels, inputs, number spinners, selects (incl. portaled
   dropdown), checkboxes, align button group, dividers, back btn.
   ================================================================ */

/* --- Detail-view shell --- */
.pdfme-designer-detail-view {
    color: var(--foreground);
}

.pdfme-designer-back-button.ant-btn {
    background-color: var(--current-line) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
}

.pdfme-designer-back-button.ant-btn:hover {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
    color: var(--foreground) !important;
}

/* --- Form labels --- */
.pdfme-designer-right-sidebar .ant-form-item-label > label,
.pdfme-designer-right-sidebar .ant-form-item-label > label.ant-form-item-required {
    color: var(--foreground) !important;
}

.pdfme-designer-right-sidebar .ant-form-item-label > label.ant-form-item-required::before {
    color: var(--red) !important;
}

/* --- Text inputs --- */
.pdfme-designer-right-sidebar .ant-input,
.pdfme-designer-right-sidebar .ant-input-outlined {
    background-color: var(--current-line) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
}

.pdfme-designer-right-sidebar .ant-input::placeholder {
    color: var(--foreground-muted) !important;
}

.pdfme-designer-right-sidebar .ant-input:hover,
.pdfme-designer-right-sidebar .ant-input-outlined:hover {
    border-color: var(--purple) !important;
}

.pdfme-designer-right-sidebar .ant-input:focus,
.pdfme-designer-right-sidebar .ant-input-outlined:focus,
.pdfme-designer-right-sidebar .ant-input:focus-within,
.pdfme-designer-right-sidebar .ant-input-outlined:focus-within {
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 2px rgba(47, 143, 214, 0.25) !important;
}

/* --- Number inputs (with up/down spin handlers) --- */
.pdfme-designer-right-sidebar .ant-input-number,
.pdfme-designer-right-sidebar .ant-input-number-outlined {
    background-color: var(--current-line) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
}

.pdfme-designer-right-sidebar .ant-input-number:hover {
    border-color: var(--purple) !important;
}

.pdfme-designer-right-sidebar .ant-input-number-focused,
.pdfme-designer-right-sidebar .ant-input-number:focus-within {
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 2px rgba(47, 143, 214, 0.25) !important;
}

.pdfme-designer-right-sidebar .ant-input-number-input {
    background-color: transparent !important;
    color: var(--foreground) !important;
}

.pdfme-designer-right-sidebar .ant-input-number-handler-wrap {
    background-color: transparent !important;
    border-inline-start: 1px solid var(--comment) !important;
}

.pdfme-designer-right-sidebar .ant-input-number-handler {
    border-inline-start-color: var(--comment) !important;
}

.pdfme-designer-right-sidebar .ant-input-number-handler:hover {
    background-color: var(--purple) !important;
}

.pdfme-designer-right-sidebar .ant-input-number-handler-up-inner,
.pdfme-designer-right-sidebar .ant-input-number-handler-down-inner {
    color: var(--foreground-muted) !important;
}

.pdfme-designer-right-sidebar .ant-input-number-handler:hover .ant-input-number-handler-up-inner,
.pdfme-designer-right-sidebar .ant-input-number-handler:hover .ant-input-number-handler-down-inner {
    color: var(--foreground) !important;
}

.pdfme-designer-right-sidebar .ant-input-number-handler-up-disabled,
.pdfme-designer-right-sidebar .ant-input-number-handler-down-disabled {
    cursor: not-allowed !important;
    opacity: 0.4;
}

.pdfme-designer-right-sidebar .ant-input-number-handler-up-disabled:hover,
.pdfme-designer-right-sidebar .ant-input-number-handler-down-disabled:hover {
    background-color: transparent !important;
}

/* --- Selects (closed state) --- */
.pdfme-designer-right-sidebar .ant-select-selector {
    background-color: var(--current-line) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
}

.pdfme-designer-right-sidebar .ant-select:hover .ant-select-selector,
.pdfme-designer-right-sidebar .ant-select-outlined:hover .ant-select-selector {
    border-color: var(--purple) !important;
}

.pdfme-designer-right-sidebar .ant-select-focused .ant-select-selector,
.pdfme-designer-right-sidebar .ant-select-open .ant-select-selector {
    border-color: var(--purple) !important;
    box-shadow: 0 0 0 2px rgba(47, 143, 214, 0.25) !important;
}

.pdfme-designer-right-sidebar .ant-select-selection-item,
.pdfme-designer-right-sidebar .ant-select-selection-search-input {
    color: var(--foreground) !important;
}

.pdfme-designer-right-sidebar .ant-select-arrow,
.pdfme-designer-right-sidebar .ant-select-suffix {
    color: var(--foreground-muted) !important;
}

/* --- Select dropdown panel (portaled to <body>) --- */
.ant-select-dropdown {
    background-color: var(--current-line) !important;
    border: 1px solid var(--comment);
    box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.4), 0 3px 6px -4px rgba(0, 0, 0, 0.5);
}

.ant-select-dropdown .ant-select-item {
    color: var(--foreground) !important;
}

.ant-select-dropdown .ant-select-item-option-active:not(.ant-select-item-option-disabled) {
    background-color: var(--background) !important;
}

.ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {
    background-color: var(--purple) !important;
    color: var(--foreground) !important;
}

/* --- Checkboxes (AntD) --- */
.pdfme-designer-right-sidebar .ant-checkbox-inner {
    background-color: var(--current-line) !important;
    border-color: var(--comment) !important;
}

.pdfme-designer-right-sidebar .ant-checkbox:hover .ant-checkbox-inner,
.pdfme-designer-right-sidebar .ant-checkbox-wrapper:hover .ant-checkbox-inner {
    border-color: var(--purple) !important;
}

.pdfme-designer-right-sidebar .ant-checkbox-checked .ant-checkbox-inner {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
}

.pdfme-designer-right-sidebar .ant-checkbox-checked::after {
    border-color: var(--purple) !important;
}

.pdfme-designer-right-sidebar .ant-checkbox-wrapper {
    color: var(--foreground) !important;
}

/* --- Align button group (.ant-space-compact + .pdfme-designer-align-*) --- */
.pdfme-designer-right-sidebar .ant-space-compact .ant-btn,
.pdfme-designer-right-sidebar [class*="pdfme-designer-align-"] {
    background-color: var(--current-line) !important;
    border-color: var(--comment) !important;
    color: var(--foreground) !important;
    box-shadow: none !important;
}

.pdfme-designer-right-sidebar .ant-space-compact .ant-btn:hover:not([disabled]),
.pdfme-designer-right-sidebar [class*="pdfme-designer-align-"]:hover:not([disabled]) {
    background-color: var(--purple) !important;
    border-color: var(--purple) !important;
    color: var(--foreground) !important;
    z-index: 2;
}

.pdfme-designer-right-sidebar .ant-space-compact .ant-btn[disabled],
.pdfme-designer-right-sidebar [class*="pdfme-designer-align-"][disabled] {
    background-color: var(--background) !important;
    border-color: var(--comment) !important;
    color: var(--foreground-muted) !important;
    opacity: 0.5;
    cursor: not-allowed !important;
}

/* --- Form-render decorations --- */
.pdfme-designer-right-sidebar .fr-panel,
.pdfme-designer-right-sidebar .fr-form,
.pdfme-designer-right-sidebar .fr-field {
    color: var(--foreground);
}

/* anticons (filled SVGs) inherit color from parent — make sure
   handler arrows and select dropdown chevron pick up theme color. */
.pdfme-designer-right-sidebar .anticon {
    color: inherit;
}

/* AntD popovers (e.g. confirm dialogs from pdfme) */
.ant-popover-inner {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
}

.ant-popover-arrow::before,
.ant-popover-arrow::after {
    background: var(--current-line) !important;
}

/* ================================================================
   pdfme Designer — AntD cards, form-render sections, color pickers,
   disabled number inputs (Table Style / Header Style / Body Style /
   Column Style sub-panels in the Detail View).
   ================================================================ */

/* --- AntD Card panels --- */
.pdfme-designer-right-sidebar .ant-card,
.pdfme-designer-right-sidebar .ant-card-bordered,
.pdfme-designer-right-sidebar .fr-obj-card {
    background-color: var(--current-line) !important;
    border: 1px solid var(--comment) !important;
    border-radius: 6px;
    color: var(--foreground);
}

.pdfme-designer-right-sidebar .ant-card-head {
    background-color: var(--background) !important;
    border-block-end: 1px solid var(--comment) !important;
    color: var(--foreground) !important;
}

.pdfme-designer-right-sidebar .ant-card-head-title {
    color: var(--foreground) !important;
    font-weight: 600;
}

.pdfme-designer-right-sidebar .ant-card-body {
    background-color: var(--current-line) !important;
    color: var(--foreground) !important;
}

/* --- form-render line-title sections (Border Width, Padding, Text Align) --- */
.pdfme-designer-right-sidebar .fr-obj-line-title {
    color: var(--foreground);
}

.pdfme-designer-right-sidebar .fr-obj-header {
    color: var(--foreground);
}

.pdfme-designer-right-sidebar .fr-header-title {
    color: var(--foreground) !important;
    font-weight: 500;
}

.pdfme-designer-right-sidebar .fr-obj-content,
.pdfme-designer-right-sidebar .fr-obj-col {
    color: var(--foreground);
}

/* --- Color pickers (fr-color-picker + rc-color-picker) --- */
.pdfme-designer-right-sidebar .fr-color-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdfme-designer-right-sidebar .rc-color-picker-wrap {
    flex-shrink: 0;
}

.pdfme-designer-right-sidebar .rc-color-picker-trigger {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 1px solid var(--comment) !important;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: inset 0 0 0 2px var(--background);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.pdfme-designer-right-sidebar .rc-color-picker-trigger:hover {
    border-color: var(--purple) !important;
}

.pdfme-designer-right-sidebar .fr-color-picker .ant-input {
    flex: 1 1 auto;
}

/* --- Disabled number input variant --- */
.pdfme-designer-right-sidebar .ant-input-number-disabled,
.pdfme-designer-right-sidebar .ant-input-number-disabled .ant-input-number-input {
    background-color: var(--background) !important;
    border-color: var(--comment) !important;
    color: var(--foreground-muted) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.pdfme-designer-right-sidebar .ant-input-number-disabled:hover {
    border-color: var(--comment) !important;
}

/* --- Select placeholder text (when no value yet) --- */
.pdfme-designer-right-sidebar .ant-select-selection-placeholder {
    color: var(--foreground-muted) !important;
}

/* ================================================================
   GANTT CHART FORM CONTROL — Dark skin
   Resolves against this file's --background / --foreground / --comment /
   --current-line / --purple / --orange / --foreground-muted tokens.
   ================================================================ */

.nct-gantt-root {
    background: var(--background);
    border-color: var(--comment);
    color: var(--foreground);
}

.nct-gantt-toolbar {
    background: var(--current-line);
    border-bottom-color: var(--comment);
}

.nct-gantt-toolbar .nct-gantt-btn {
    background: var(--background);
    border-color: var(--comment);
    color: var(--foreground);
}

.nct-gantt-toolbar .nct-gantt-btn:hover {
    background: var(--current-line);
    border-color: var(--purple);
    color: var(--foreground);
}

.nct-gantt-toolbar .nct-gantt-btn-primary,
.nct-gantt-toolbar .nct-gantt-btn-primary:hover {
    background: var(--purple);
    border-color: var(--purple);
    color: var(--foreground);
}

.nct-gantt-toolbar .nct-gantt-btn-primary:hover {
    filter: brightness(1.15);
}

.nct-gantt-toolbar .nct-gantt-btn-active {
    background: var(--orange);
    border-color: var(--orange);
    color: var(--background);
}

.nct-gantt-toolbar .nct-gantt-hint {
    color: var(--foreground-muted);
}

.nct-gantt-empty,
.nct-gantt-readonly {
    color: var(--foreground-muted);
}

.nct-gantt-deps-overlay path {
    stroke: var(--foreground-muted);
}

.nct-gantt-deps-overlay marker path {
    fill: var(--foreground-muted);
    stroke: none;
}

.nct-gantt-container .vis-item.vis-selected {
    box-shadow: 0 0 0 2px var(--orange), 0 0 0 4px rgba(0, 0, 0, .35);
}

.nct-gantt-container .vis-item .nct-gantt-progress {
    background: rgba(255, 255, 255, .8);
}

.nct-gantt-container .vis-timeline {
    border: 1px solid var(--comment);
    background: var(--background);
    color: var(--foreground);
}

.nct-gantt-container .vis-panel.vis-center,
.nct-gantt-container .vis-panel.vis-left,
.nct-gantt-container .vis-panel.vis-right,
.nct-gantt-container .vis-panel.vis-top,
.nct-gantt-container .vis-panel.vis-bottom {
    border-color: var(--comment);
    background: var(--background);
}

.nct-gantt-container .vis-foreground .vis-group,
.nct-gantt-container .vis-background .vis-group {
    border-color: var(--comment);
}

.nct-gantt-container .vis-time-axis .vis-text {
    color: var(--foreground-muted);
}

.nct-gantt-container .vis-time-axis .vis-text.vis-major {
    color: var(--foreground);
    font-weight: 600;
}

.nct-gantt-container .vis-time-axis .vis-grid.vis-minor {
    border-color: rgba(138, 157, 180, .25);
}

.nct-gantt-container .vis-time-axis .vis-grid.vis-major {
    border-color: var(--comment);
}

.nct-gantt-container .vis-current-time {
    background-color: var(--orange);
}

.nct-gantt-container .vis-labelset .vis-label {
    color: var(--foreground);
    border-color: var(--comment);
}

.vis-tooltip {
    background: var(--current-line) !important;
    color: var(--foreground) !important;
    border: 1px solid var(--comment) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4) !important;
}

.nct-gantt-context-menu {
    background: var(--current-line);
    border-color: var(--comment);
    color: var(--foreground);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

.nct-gantt-context-menu-item:hover {
    background: var(--background);
    color: var(--foreground);
}

.nct-gantt-edit-form fieldset legend {
    color: var(--foreground);
    border-bottom-color: var(--comment);
}

.nct-gantt-edit-form .form-label {
    color: var(--foreground-muted);
}

.nct-gantt-palette-chip {
    border-color: var(--comment);
}

.nct-gantt-palette-chip:hover {
    border-color: var(--purple);
}


/* ================================================================
   Side-by-side diff highlighting (Multi-Method Conflict modal)
   GitHub-dark style: removed = red tint, added = green tint
   ================================================================ */
/* MergeView 2-pane mode shares l-chunk across both panes; scope by
   .CodeMirror-merge-left (Existing → red) vs .CodeMirror-merge-editor
   (Auto-generated → green). Intra-line markers (l-deleted vs l-inserted)
   ARE class-differentiated, so they stay un-scoped. */
.mmcr-diff .CodeMirror-merge-left   .CodeMirror-merge-l-chunk        { background-color: rgba(240, 101, 92, 0.15) !important; }
.mmcr-diff .CodeMirror-merge-editor .CodeMirror-merge-l-chunk        { background-color: rgba(79, 191, 98, 0.15) !important; }
.mmcr-diff .CodeMirror-merge-left   .CodeMirror-merge-l-chunk-start  { border-top: 1px solid rgba(240, 101, 92, 0.40) !important; }
.mmcr-diff .CodeMirror-merge-left   .CodeMirror-merge-l-chunk-end    { border-bottom: 1px solid rgba(240, 101, 92, 0.40) !important; }
.mmcr-diff .CodeMirror-merge-editor .CodeMirror-merge-l-chunk-start  { border-top: 1px solid rgba(79, 191, 98, 0.40) !important; }
.mmcr-diff .CodeMirror-merge-editor .CodeMirror-merge-l-chunk-end    { border-bottom: 1px solid rgba(79, 191, 98, 0.40) !important; }
.mmcr-diff .CodeMirror-merge-l-deleted {
    background-color: rgba(240, 101, 92, 0.40) !important;
    background-image: none !important;
    text-decoration: none !important;
    color: #ffd7d5 !important;
}
.mmcr-diff .CodeMirror-merge-l-inserted {
    background-color: rgba(79, 191, 98, 0.40) !important;
    background-image: none !important;
    text-decoration: none !important;
    color: #b9f4c9 !important;
}
.mmcr-diff .CodeMirror-merge-l-connect { fill: rgba(79, 191, 98, 0.18) !important; stroke: rgba(79, 191, 98, 0.45) !important; }
.mmcr-diff .CodeMirror-merge-gap {
    background-color: rgba(255, 255, 255, 0.04);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}
/* "−" / "+" gutter column, GitHub left-margin style. */
.mmcr-diff .CodeMirror-gutter.mmcr-diff-marker { width: 18px; }
.mmcr-diff .mmcr-marker {
    display: inline-block;
    width: 100%;
    text-align: center;
    font-weight: 700;
    line-height: inherit;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.mmcr-diff .mmcr-marker-removed { color: #f0655c; }
.mmcr-diff .mmcr-marker-added   { color: #4fbf62; }

/* ================================================================
   TREE PICKER — dark palette
   Component layout/positioning lives in TreePickerFormControlPlugin.css.
   Selectors target `span.fancytree-node` (the whole row) so hover/active
   highlights the full clickable area. !important wins against any stray
   skin-win8 rules.
   ================================================================ */
.nct-tree-picker-host {
    background: var(--background, #080e19) !important;
    color: var(--foreground, #e9eff7) !important;
    border: 1px solid var(--current-line, #101b2c) !important;
}
.nct-tree-picker-host .fancytree-container span.fancytree-node,
.nct-tree-picker-host .fancytree-container span.fancytree-title {
    color: var(--foreground, #e9eff7) !important;
    background-color: transparent !important;
}
.nct-tree-picker-host .fancytree-container span.fancytree-node:hover,
.nct-tree-picker-host .fancytree-container span.fancytree-node:hover span.fancytree-title {
    background-color: var(--current-line, #101b2c) !important;
    color: var(--foreground, #e9eff7) !important;
}
.nct-tree-picker-host .fancytree-container .fancytree-active span.fancytree-node,
.nct-tree-picker-host .fancytree-container .fancytree-selected span.fancytree-node,
.nct-tree-picker-host .fancytree-container .fancytree-active span.fancytree-title,
.nct-tree-picker-host .fancytree-container .fancytree-selected span.fancytree-title {
    background-color: var(--purple, #2f8fd6) !important;
    color: var(--background, #080e19) !important;
}

/* ================================================================
   NCT WIZARD PANEL — Dark override
   ================================================================ */
.nct-wizard .nct-wizard-steps > li                       { color: var(--foreground-muted, rgba(233, 239, 247, 0.70)); }
.nct-wizard .nct-wizard-steps > li > a                   { color: var(--foreground-muted, rgba(233, 239, 247, 0.70)); }
.nct-wizard .nct-wizard-steps > li > a:hover,
.nct-wizard .nct-wizard-steps > li > a:focus,
.nct-wizard .nct-wizard-steps > li > a:active            { color: var(--foreground, #e9eff7) !important; }
.nct-wizard .nct-wizard-steps > li::before,
.nct-wizard .nct-wizard-steps > li::after                { background: var(--current-line, #101b2c); }
.nct-wizard .nct-wizard-steps > li em                    { background: var(--current-line, #101b2c); color: var(--foreground, #e9eff7); }
.nct-wizard .nct-wizard-steps > li.active > a            { color: var(--foreground, #e9eff7); }
.nct-wizard .nct-wizard-steps > li.active em             { background: var(--purple, #2f8fd6); color: var(--background, #080e19); box-shadow: 0 0 0 4px rgba(47, 143, 214, 0.28); }
.nct-wizard .nct-wizard-steps > li.active::before,
.nct-wizard .nct-wizard-steps > li.active::after         { background: var(--purple, #2f8fd6); }
.nct-wizard .nct-wizard-steps > li.done em               { background: var(--green, #59c26a); color: var(--background, #080e19); }
.nct-wizard .nct-wizard-steps > li.done::before,
.nct-wizard .nct-wizard-steps > li.done::after           { background: var(--green, #59c26a); }
.nct-wizard .nct-wizard-steps > li.danger em             { background: var(--red, #e05a52); color: var(--foreground, #e9eff7); }
.nct-wizard .nct-wizard-steps > li.danger::before,
.nct-wizard .nct-wizard-steps > li.danger::after         { background: var(--red, #e05a52); }
.nct-wizard .divider.wizard-bottom                       { border-top-color: var(--current-line, #101b2c); }
.nct-wizard .nct-wizard-content                          { color: var(--foreground, #e9eff7); }


/* ================================================================
   AUTHORING WINDOW — Dark palette
   Structure lives in NctAuthoringWindowPanel.css / NctPluginPalettePanel.css /
   NctContentTreePanel.css. This block only re-points the --nct-aw-* design tokens
   at this theme's palette, so the floating authoring window, the component palette
   and the content tree all re-skin from one place.
   ================================================================ */
.nct-aw,
.nct-aw-launcher,
.nct-ct-menu {
    --nct-aw-surface: var(--background, #080e19);
    --nct-aw-surface-2: var(--current-line, #101b2c);
    --nct-aw-text: var(--foreground, #e9eff7);
    --nct-aw-text-muted: var(--foreground-muted, rgba(233, 239, 247, .70));
    --nct-aw-border: var(--current-line, #101b2c);
    --nct-aw-accent: var(--purple, #2f8fd6);
    --nct-aw-accent-contrast: var(--background, #080e19);
    --nct-aw-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .40);
}

/* Bootstrap tints its accordion caret with a dark SVG; we draw our own chevron, so make
   sure no stock image sneaks back in on top of it. */
.nct-pal-group-btn::after {
    background-image: none !important;
}

/* Dragged plugin ghost is appended to <body>, outside .nct-aw — give it this theme's
   surface explicitly or it inherits the light default. */
body > .nct-pal-tile.ui-draggable-dragging {
    background: var(--current-line, #101b2c);
    border-color: var(--purple, #2f8fd6);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .6);
}

body > .nct-pal-tile.ui-draggable-dragging .nct-pal-tile-name {
    color: var(--foreground, #e9eff7);
}


/* ================================================================
   ADMIN TOOLBAR — Dark palette
   Structure lives in NctAdminToolbarPanel.css. Needed because the dark themes remap the
   Bootstrap 5.0 variables (--bs-body-bg / --bs-body-color / --bs-border-color / --bs-primary)
   but NOT the 5.3 additions --bs-tertiary-bg and --bs-secondary-color, so the neutral
   fallbacks in the component file would leak light greys onto a dark bar.
   ================================================================ */
.nct-toolbar {
    --nct-tb-surface: var(--background, #080e19);
    --nct-tb-surface-2: var(--current-line, #101b2c);
    --nct-tb-text: var(--foreground, #e9eff7);
    --nct-tb-text-muted: var(--foreground-muted, rgba(233, 239, 247, .70));
    --nct-tb-border: var(--current-line, #101b2c);
    --nct-tb-accent: var(--purple, #2f8fd6);
    --nct-tb-accent-contrast: var(--background, #080e19);
}

.nct-toolbar {
    box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

.nct-tb-profile .dropdown-menu {
    box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
}

.nct-tb-icon-btn:hover {
    background: var(--current-line, rgba(127, 127, 127, .25));
    color: var(--foreground, currentColor);
}

.nct-tb-expand {
    background: var(--background, #080e19);
    border-color: var(--current-line, #101b2c);
    color: var(--foreground, #e9eff7);
}


/* ================================================================
   PLUGIN EDITOR BUTTON STRIP — Dark palette
   Colours only; shape is in theme-common.css. !important is required because
   mrjun's ViewEditBehavior writes background/color as inline styles.
   ================================================================ */
.plugin-editor-btn-container {
    background: var(--current-line, #101b2c) !important;
    border-color: var(--comment, #8a9db4) !important;
}

.plugin-editor-btn-container .btn {
    color: var(--foreground, #e9eff7) !important;
    background: transparent !important;
}

.plugin-editor-btn-container .btn:hover,
.plugin-editor-btn-container .btn:focus {
    background: var(--purple, #2f8fd6) !important;
    color: var(--background, #080e19) !important;
}

.nct-plugin-context-menu {
    background: var(--background, #080e19) !important;
    color: var(--foreground, #e9eff7) !important;
    border: 1px solid var(--current-line, #101b2c) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .55) !important;
}

.nct-plugin-context-menu .dropdown-item {
    color: var(--foreground, #e9eff7) !important;
}

.nct-plugin-context-menu .dropdown-item:hover,
.nct-plugin-context-menu .dropdown-item:focus {
    background: var(--current-line, #101b2c) !important;
    color: var(--purple, #2f8fd6) !important;
}


/* ================================================================================================
   RICH SURFACE SYSTEM — DARK ONLY
   ================================================================================================

   Everything above this banner is the SHARED ArchitectUI skin skeleton — the same rules
   dark-blue.css, dracula.css and forest.css carry, recoloured. It is a competent admin skin, but
   it is a 2016 admin skin: a 2px accent rule under the header, a 3px border on every input, five
   different greys in one gradient, an accent glow on everything that can hover.

   This section is Dark's alone. It replaces that vocabulary with the product's own, the one the
   public site and the project workspace already wear:

     ground     one near-black, lit by two fixed aurora washes rather than by a diagonal gradient
     surface    a flat panel + a 1px hairline + an inset top highlight — never a gradient
     edge       hairlines at 14% / 24%; a CONTROL's edge at 52%, which is 3.7:1 — WCAG asks 3:1
     accent     ONE brand sweep (#2f8fd6 -> #59c26a) on the ONE primary action per view
     elevation  a large soft shadow, not a glow; glow is reserved for the primary action
     radius     8 / 12 / 16 — three steps, applied by role, not per component

   ORDER IS THE MECHANISM, BUT ONLY AT EQUAL SPECIFICITY. The skeleton writes ~1490 `!important`
   declarations, most at (0,1,0). This section is appended LAST and repeats the same selectors, so
   an equal-specificity tie is broken by source order in its favour. Where the skeleton is MORE
   specific the rule below has to repeat the ancestor or it simply loses, however late it sits —
   among author `!important` declarations the cascade compares specificity BEFORE source order.
   The forms that matter here: `.dropdown-menu.show` (0,2,0), `.app-theme-white .app-header`
   (0,2,0), `.app-container .app-wrapper-footer .app-footer` (0,3,0), `[id^="filter"] .card`
   (0,2,0), and `.table thead th` (0,1,2). Each is matched below on purpose.
   If you MOVE this section, it stops working. Keep it at the end of the file.

   WHAT IT DOES NOT TOUCH: the LAYOUT. No width, no margin, no line-height, no grid or flex change;
   nothing here moves a component or reflows a page, so the layout that shipped is the layout that
   stays. It does set size in four narrow places, all of them type or chrome rather than layout:
   the 11px uppercase kickers (table head, sidebar heading, dropdown header, menu header), the 6px
   padding that turns a dropdown into a menu with breathing room, `min-height: 100vh` on the body
   so the ground reaches the fold, and a 10px scrollbar. The theme switch's own geometry is not
   here at all — it lives in themes/theme-common.css, because the control is the same object in
   every skin.
   ================================================================================================ */

/* ------------------------------------------------------------------------------------------------
   1. THE GROUND
   The skeleton painted a 135° three-stop grey gradient on <body> and a FIFTH one on .app-main, so
   the page had two lighting directions fighting each other and a visible seam where the main area
   met the shell. One ground, lit once:  a flat obsidian + two large radial washes, blue high-right
   and green low-left, both fixed so they behave like light in the room rather than like wallpaper
   that scrolls. This is the same figure the product's own pages draw.
   ------------------------------------------------------------------------------------------------ */
body {
    background-color: var(--background);
    /* FOUR layers, and each has a job. Read top to bottom, which is also front to back:
         1. the brand wash, high right — the strongest light in the room, behind the header
         2. a green wash low right — the far end of the brand sweep, so the page is lit at BOTH
            ends of its vertical axis instead of only at the top
         3. a wide, very faint blue low left — fills the middle of a tall page, the region that was
            dead flat on any screen taller than the two original washes could reach
         4. the ground itself, as a 160° gradient rather than a flat fill: a page needs a floor.
            #0a1220 -> #060b14 is one and a half steps of the ramp, felt rather than seen.
       All fixed, so the figure stays where it is while the content scrolls past — that is what
       makes it read as light in a room and not as wallpaper. */
    background-image:
            radial-gradient(1250px 660px at 88% -8%, rgba(47, 143, 214, .15), transparent 62%),
            radial-gradient(1050px 720px at 80% 106%, rgba(89, 194, 106, .09), transparent 60%),
            radial-gradient(1500px 950px at 22% 92%, rgba(47, 143, 214, .075), transparent 62%),
            linear-gradient(160deg, #0a1220 0%, #080e19 44%, #060b14 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--bs-body-color);
    min-height: 100vh;
}

/* The shell sits ON the ground rather than repainting it. `transparent` everywhere the skeleton
   had a gradient is the whole trick: one light source instead of four. */
.app-container,
.app-theme-white.app-container {
    background-color: transparent;
}

.app-main,
.app-main__inner {
    background: transparent !important;
}

/* The page-title strip is a plinth, not a panel: it carries the heading and the breadcrumb and it
   must not read as a card, or every page appears to open with an empty card. A whisper of the
   surface plus one hairline underneath. */
.app-page-title {
    background: linear-gradient(180deg, rgba(255, 255, 255, .028) 0%, transparent 100%) !important;
    border-bottom: 1px solid var(--hairline) !important;
    box-shadow: none !important;
}

/* ------------------------------------------------------------------------------------------------
   2. THE CHROME — header, sidebar, footer
   ------------------------------------------------------------------------------------------------ */

/* The header was a grey slab under a 2px electric-blue rule. A 2px accent rule across the full
   width of an application is the single loudest "template" tell there is: it puts the strongest
   colour in the product on the one element that carries no information. Replaced by a translucent
   pane over the ground, a hairline, and a soft drop — the bar is felt, not announced.

   The ancestor is repeated because the shell markup really carries it: the layout templates open
   with `<div class="app-container app-theme-white …">`, and the skeleton writes
   `.app-theme-white .app-header { background: var(--current-line) !important }` at (0,2,0). Among
   author !important declarations specificity is compared BEFORE source order, so a bare
   `.app-header` at (0,1,0) loses however late it appears — and the shorthand would also have
   pinned `background-image: none`, taking the top highlight with it. */
.app-header,
.app-theme-white .app-header {
    background: rgba(8, 14, 25, .72) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .035) 0%, transparent 100%) !important;
    border-bottom: 1px solid var(--hairline) !important;
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, .03), 0 10px 28px -18px rgba(0, 0, 0, .9) !important;
    backdrop-filter: saturate(150%) blur(14px);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
}

/* Header icon buttons: dim at rest, ink on hover, with a soft plate appearing under the cursor.
   The skeleton left the hover rule empty (a commented-out colour), so they had no hover state at
   all — the bar felt dead to the touch. */
.app-header .app-header__content .header-megamenu .nav-link,
.app-header .app-header__content .header-dots .btn-link,
.app-header .app-header__content .header-dots .nav-link {
    color: var(--comment) !important;
    border-radius: var(--radius-sm);
    transition: color .16s ease, background-color .16s ease;
}

.app-header .app-header__content .header-megamenu .nav-link:hover,
.app-header .app-header__content .header-dots .btn-link:hover,
.app-header .app-header__content .header-dots .nav-link:hover {
    color: var(--foreground) !important;
    background-color: var(--tint) !important;
}

/* base.css draws a hard #dee2e6 hairline between the header's tool cluster and the account block
   as `.header-btn-lg::before` — a near-white 1px bar on a near-black bar. No theme overrode it, so
   it has been visible on every dark skin since they shipped. */
.app-header .header-btn-lg::before {
    background: var(--hairline-2) !important;
    opacity: .85;
}

/* The sidebar is the deepest surface in the app — a well, not a raised panel. Making it DARKER
   than the content it navigates is what stops the two competing for attention, and it is the
   opposite of what the skeleton did (a five-stop gradient LIGHTER than the page). */
.app-sidebar {
    background: var(--surface-1) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .025) 0%, transparent 220px) !important;
    border-right: 1px solid var(--hairline) !important;
    box-shadow: 1px 0 0 0 rgba(255, 255, 255, .02), 14px 0 40px -30px rgba(0, 0, 0, .9) !important;
}

.app-sidebar .app-sidebar__inner {
    background-color: transparent;
}

/* The 280px logo block belongs to the SIDEBAR column, not to the header — it sits exactly over the
   rail. Left translucent it composites the header's veil over the sidebar's darker ground and draws
   a visible seam at the corner where the two columns meet; this skin is the only one where that
   shows, because it is the only one whose sidebar is DARKER than its header. Painted in the
   sidebar's own colour, the corner closes. */
/* `!important` because base.css reaches this at (0,3,0) —
   `.app-theme-white.fixed-header .app-header__logo { background: rgba(250,251,252,.1) }` — and a
   10% white wash on a near-black bar is exactly the pale patch this rule exists to remove. An
   important declaration beats a normal one whatever its specificity, which is the cheaper fix
   here than growing the selector to match a class combination that may change. */
.app-header .app-header__logo {
    background: var(--surface-1) !important;
    box-shadow: inset -1px 0 0 0 var(--hairline);
}

/* Menu rows. At rest: no plate at all — a list of words, which is what a navigation list is. The
   left rail is a 2px inset shadow rather than a border, so the row's text does not shift by 3px
   between states (the skeleton's `border-left: 3px solid transparent` -> coloured did shift it,
   and the whole menu twitched as the cursor moved down it). */
.app-sidebar .vertical-nav-menu ul > li > a,
.app-sidebar .vertical-nav-menu li > a {
    background: transparent !important;
    color: var(--comment) !important;
    border-left: 0 !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-shadow: inset 0 0 0 0 transparent;
    transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.app-sidebar .vertical-nav-menu ul > li > a:hover,
.app-sidebar .vertical-nav-menu li > a:hover {
    background: var(--tint) !important;
    color: var(--foreground) !important;
    box-shadow: inset 2px 0 0 0 var(--hairline-ui) !important;
}

/* The active row is the only place in the shell the brand sweep appears as a RAIL: a 2px bar of
   the product's own gradient, a soft brand wash behind the text, and the text in full ink. The
   skeleton used --green here and --purple for hover, which read as two unrelated states of the
   same list. One accent, two intensities.

   `li > a.mm-active` is NOT redundant next to `ul > li > a.mm-active`. The panel puts the class on
   the LINK, and the descendant `ul` in that selector only exists from the SECOND level down — a
   top-level quick link is a child of `ul.vertical-nav-menu` itself, and a descendant combinator
   never matches the element it starts from. So the pair below used to cover children only, the
   selected top-level row fell through to base.css (`.vertical-nav-menu li a.mm-active`, a
   light-theme #3f6ad8 plate), and the rest rule above — `!important` at (0,2,2) — then beat that
   non-important rule and painted the selected row exactly like an unselected one. Measured before
   the fix: top-level active and top-level rest were byte-identical apart from `font-weight`.
   `li.mm-active > a` is a third case again: that class is written by the expand-state restore in
   PagesPanel.js and marks an OPEN branch, not the current page. */
.app-sidebar .vertical-nav-menu ul > li > a.mm-active,
.app-sidebar .vertical-nav-menu li > a.mm-active,
.app-sidebar .vertical-nav-menu li.mm-active > a,
.app-sidebar .vertical-nav-menu ul > li > a.active,
.app-sidebar .vertical-nav-menu li > a.active,
.app-sidebar .vertical-nav-menu li.active > a {
    background: linear-gradient(90deg, var(--brand-soft) 0%, rgba(47, 143, 214, .02) 70%, transparent 100%) !important;
    color: var(--foreground) !important;
    border-left: 0 !important;
    box-shadow: inset 2px 0 0 0 var(--purple) !important;
    font-weight: 600;
}

.app-sidebar .vertical-nav-menu ul > li > a.mm-active i.metismenu-icon,
.app-sidebar .vertical-nav-menu li > a.mm-active i.metismenu-icon,
.app-sidebar .vertical-nav-menu li.mm-active > a i.metismenu-icon {
    color: var(--purple) !important;
    opacity: 1 !important;
}

/* Section labels ("DASHBOARDS", "MASTER DATA"). A kicker: small, spaced, quiet — it is a signpost,
   not a heading. The skeleton gave it a grey-to-transparent gradient plate, which made every
   section look like a collapsed row. */
.app-sidebar .app-sidebar__heading,
.app-sidebar .nav-item-header {
    background: none !important;
    color: var(--comment) !important;
    font-size: .6875rem !important;
    font-weight: 700 !important;
    letter-spacing: .085em;
    text-transform: uppercase;
    /* NO `opacity` here, and none is needed. The skeleton pins `opacity: unset !important` on
       `.app-sidebar *` (line ~2814), so any value written here is dead — and the full-strength
       ink it forces is the right answer anyway: --comment on the sidebar well is 6.6:1, where the
       .72 this block used to carry would have blended down to 4.0:1 and failed AA for an 11px
       label. The quiet comes from the size, the tracking and the colour, not from a wash. */
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    background-color: var(--comment) !important;
}

/* The footer is the quietest strip on the page. It was the loudest: a three-stop gradient, a 10px
   blur, two shadows and cyan copyright text. */
/* Same ancestor game as the header, and worse: the skeleton reaches this strip through FOUR
   selectors, up to `.app-container .app-wrapper-footer .app-footer` at (0,3,0) with !important.
   Every one of them is matched below, or the five-stop gradient this block exists to remove is the
   rule that keeps winning. */
.app-wrapper-footer,
.app-container .app-wrapper-footer,
body .app-wrapper-footer {
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

.app-footer,
.app-wrapper-footer .app-footer,
.app-container .app-wrapper-footer .app-footer,
body .app-wrapper-footer .app-footer {
    background: rgba(8, 14, 25, .55) !important;
    background-image: none !important;
    border-top: 1px solid var(--hairline) !important;
    box-shadow: none !important;
    backdrop-filter: saturate(140%) blur(10px) !important;
    -webkit-backdrop-filter: saturate(140%) blur(10px) !important;
}

.app-footer .app-footer__inner,
.app-theme-white .app-footer .app-footer__inner,
.app-footer__inner {
    background: transparent !important;
    color: var(--comment);
}

.footer-copyright {
    color: var(--comment) !important;
    text-shadow: none;
}

/* ------------------------------------------------------------------------------------------------
   3. SURFACES — cards, panels, tabs
   A panel is a flat plane, a hairline and a 1px inset highlight along its top edge. The highlight
   is the whole effect: it is what a real edge catching a light does, and it costs one inset shadow.
   A GRADIENT on a panel does the opposite — it tells the eye the plane is curved, and once every
   panel is curved none of them is.
   ------------------------------------------------------------------------------------------------ */
.card {
    background: var(--surface-2) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, .045), var(--elev-1) !important;
    color: var(--bs-body-color);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

/* Hover belongs to a card you can CLICK. A static panel that lights up under the pointer is noise,
   so the lift is scoped to the ones that are links or carry the template's own clickable class. */
a.card:hover,
.card.card-btm-border:hover,
.card-hover-shadow:hover {
    border-color: var(--hairline-2) !important;
    background: var(--surface-3) !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, .06), var(--elev-2) !important;
}

.card:hover {
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, .045), var(--elev-1) !important;
}

/* A card header is a strip of the same plane, separated by a hairline. The skeleton put a 2px
   accent rule under it — the same mistake as the page header, repeated once per card, so a page
   with six cards drew six full-width blue bars. */
.card-header {
    background: transparent !important;
    background-image: none !important;
    border-bottom: 1px solid var(--hairline) !important;
    color: var(--bs-body-color);
}

.card-title {
    color: var(--foreground) !important;
    font-weight: 600;
    letter-spacing: -.01em;
}

.card-footer {
    background: transparent !important;
    border-top: 1px solid var(--hairline) !important;
    color: var(--comment);
}

/* The same treatment for the template's other panel shells, so a plugin that reaches for one of
   these instead of .card does not fall out of the system. */
.main-card,
.card-shadow-primary,
.profile-responsive,
.dropdown-menu-xl > .card,
.tab-content > .tab-pane > .card {
    background: var(--surface-2) !important;
    border-color: var(--hairline) !important;
}

/* Tabs. The active tab is the top of the panel below it, so it takes the panel's ground and loses
   its bottom edge; the inactive ones are just labels. The 2px underline is the ONE place a 2px
   accent bar is right — it is marking a selection, not decorating a container. */
.nav-tabs {
    border-bottom: 1px solid var(--hairline) !important;
}

.nav-tabs .nav-link {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    color: var(--comment) !important;
    transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.nav-tabs .nav-link:hover {
    background: var(--tint) !important;
    color: var(--foreground) !important;
    border-color: transparent !important;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    background: var(--surface-2) !important;
    color: var(--foreground) !important;
    border-color: var(--hairline) var(--hairline) transparent !important;
    box-shadow: inset 0 2px 0 0 var(--purple) !important;
    font-weight: 600;
}

/* A horizontal rule is a hairline. It was a 1px mid-grey line, which on a near-black ground reads
   as a scratch. */
hr,
.dropdown-divider {
    border-color: var(--hairline) !important;
    opacity: 1;
}

/* ------------------------------------------------------------------------------------------------
   4. TABLES
   The list is the product. Three changes carry it: the head becomes a KICKER (small, spaced, upper,
   quiet) instead of a grey band; the rows are separated by hairlines instead of borders; and the
   hover is a wash of the brand at 6%, not a 15% gradient that repaints the row.
   ------------------------------------------------------------------------------------------------ */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--foreground);
    --bs-table-border-color: var(--hairline);
    --bs-table-striped-bg: rgba(255, 255, 255, .022);
    --bs-table-hover-bg: var(--brand-soft);
    --bs-table-hover-color: var(--foreground);
    background: transparent !important;
    border-color: var(--hairline) !important;
}

.table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: var(--hairline);
    box-shadow: none;
}

.table thead th,
.table > thead > tr > th {
    background: transparent !important;
    background-image: none !important;
    border-bottom: 1px solid var(--hairline-2) !important;
    color: var(--comment) !important;
    font-size: .6875rem !important;
    font-weight: 700 !important;
    letter-spacing: .075em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-hover > tbody > tr:hover,
.table-hover > tbody > tr:hover > * {
    background: var(--brand-soft) !important;
    background-image: none !important;
    color: var(--foreground) !important;
    --bs-table-accent-bg: transparent;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255, 255, 255, .022);
}

/* A table that lives inside a card should not draw its own frame — the card is the frame. */
.card > .table,
.card > .table-responsive > .table,
.card-body > .table,
.card-body > .table-responsive > .table {
    border: 0 !important;
}

/* Figures line up. `tabular-nums` is one declaration and it is the difference between a money
   column that reads as a column and one that reads as a list of words — the browser stops giving
   `1` a narrow advance, so decimal points stack without any per-cell alignment work. Scoped to
   tables and to the template's own figure classes; body prose keeps proportional digits. */
.table td,
.table th,
.widget-numbers,
.badge {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Paging. Equal cells, quiet at rest, and the current page is the ONE marked thing in the row.

   THE SPAN MATTERS. Wicket's navigator renders the number inside a nested element —
   `<li class="page-item"><a class="page-link"><span>2</span></a></li>` — and the skeleton paints
   BOTH: `[id^="paging"] .page-item.active .page-link span { background: --purple }` at (0,4,1).
   Styling only the `<a>` therefore left a solid blue plate the exact size of the digit floating
   inside the outlined cell. Every rule below names the span as well, at matching specificity. */
.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination .page-item,
.pagination li {
    margin: 0;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-sm) !important;
    color: var(--comment) !important;
    font-variant-numeric: tabular-nums;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.pagination .page-link span,
.pagination li a span {
    background: transparent !important;
    background-color: transparent !important;
    color: inherit !important;
    border: 0 !important;
}

.pagination .page-link:hover,
.pagination .page-link:hover span {
    background: var(--tint) !important;
    border-color: var(--hairline) !important;
    color: var(--foreground) !important;
}

.pagination .page-link:hover span {
    background: transparent !important;
    border: 0 !important;
}

.pagination .page-item.active .page-link,
[id^="paging"] .page-item.active .page-link {
    background: var(--brand-soft) !important;
    background-color: var(--brand-soft) !important;
    border: 1px solid var(--brand-line) !important;
    color: var(--foreground) !important;
    font-weight: 600;
}

.pagination .page-item.active .page-link span,
.pagination li.active a span,
[id^="paging"] .page-item.active .page-link span {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    color: var(--foreground) !important;
}

/* The first/prev/next/last chevrons are punctuation, not numbers — no cell, no border. */
.pagination .page-item.disabled .page-link,
.pagination .page-link[disabled] {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--comment) !important;
    opacity: .38 !important;
}

/* ------------------------------------------------------------------------------------------------
   5. CONTROLS
   The skeleton put a 3px solid border on every text field. Three pixels is a fence: it makes the
   field the loudest object on a form and it eats 6px of the field's own width. WCAG 1.4.11 asks
   3:1 for the boundary of a control, and one pixel at --hairline-ui clears that — 3.7:1 against
   the field's own ground and 3.5:1 where a field sits on a card. Depth comes from the field being
   a WELL, darker than the panel it sits on, plus a 1px inset top shade: that is what a recess
   actually looks like, and it costs one shadow instead of six pixels of border.
   ------------------------------------------------------------------------------------------------ */
.form-control,
.form-select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
textarea,
select {
    background: var(--surface-1) !important;
    background-image: none !important;
    border: 1px solid var(--hairline-ui) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--foreground) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35) !important;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease !important;
}

.form-control:hover,
.form-select:hover,
input:hover:not(:disabled),
textarea:hover:not(:disabled),
select:hover:not(:disabled) {
    background: var(--surface-1) !important;
    background-image: none !important;
    border-color: rgba(168, 200, 232, .62) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35) !important;
}

/* The focus ring is the same figure everywhere in this skin: a 3px brand halo at 30%, plus the
   border going full brand. No blur, no outer glow — a glow on a focused input reads as an error
   state in half the products a user has already used. */
.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    background: var(--surface-1) !important;
    background-image: none !important;
    border-color: var(--purple) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35),
                0 0 0 3px rgba(47, 143, 214, .30) !important;
    outline: none !important;
}

label.form-control.nct-prohibited,
.form-control:disabled,
.form-select:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    background: rgba(255, 255, 255, .03) !important;
    background-image: none !important;
    border-color: var(--hairline) !important;
    color: var(--comment) !important;
    opacity: .65 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

/* A placeholder is a hint, not a value: it must be clearly quieter than typed text and still
   legible. The skeleton painted it in a mid blue at 70% opacity, which read as a filled field.

   The alphas are contrast numbers, not taste: --comment over the field ground gives 6.6:1 at full
   strength, 4.7:1 at .80 and only 3.3:1 at .62 — a placeholder is text, so .80 is the lowest that
   still clears WCAG 1.4.3 AA. The dip on focus is deliberate (the hint is getting out of the way
   of what you are typing) and stops at .62 rather than fading out. */
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--comment) !important;
    opacity: .80 !important;
}

.form-control:focus::placeholder,
input:focus::placeholder,
textarea:focus::placeholder {
    opacity: .62 !important;
}

/* THE CARET. The block above sets `background-image: none` on the whole control group — it has to,
   because the skeleton painted a gradient there — and a <select> keeps its chevron in exactly that
   property. Without this rule the field is a text box that silently opens a menu. A
   background-image cannot read a colour token, so the whole URL is the token: this is --comment,
   written into the SVG stroke. Repeat it if the palette ever moves.

   NOT ON `.form-control`, and that exclusion is load-bearing. `/common/css/common.css` line 271 —
   which PluginBasePage loads AFTER the skin — says `.form-control { appearance: auto !important }`.
   So every `select.form-control` in this product keeps the BROWSER's own arrow no matter what a
   skin does, and painting one here simply added a second chevron beside it. The native arrow is
   drawn in the element's `color`, which this skin already sets to --foreground, so it needs no
   help. Only the selects that genuinely lost their chevron get one back. */
.form-select:not(.form-control),
select:not(.form-control) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%238a9db4' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right .75rem center !important;
    background-size: 14px 11px !important;
    padding-right: 2.25rem !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* A multiple/size select is a LIST, not a dropdown — a chevron on it points at nothing. */
select[multiple],
select[size]:not([size="1"]) {
    background-image: none !important;
    padding-right: .75rem !important;
}

.form-label,
label.form-label,
.form-check-label {
    color: var(--foreground-muted);
    font-weight: 500;
}

/* Checkboxes and radios take the brand when checked and the same 3px halo on focus, so a form has
   one focus figure rather than three. */
.form-check-input {
    background-color: var(--surface-1);
    border: 1px solid var(--hairline-ui);
}

.form-check-input:checked {
    background-color: var(--purple);
    border-color: var(--purple);
}

.form-check-input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px rgba(47, 143, 214, .30);
}

/* ------------------------------------------------------------------------------------------------
   6. BUTTONS
   ONE filled button per view — the primary action — and it wears the product's own blue->green.
   Every other button is a hairline outline or plain text, which is what lets the one filled button
   mean something.

   Ink on the ramp is #04121d, not white, and that is a contrast decision rather than a taste one:
   white on the ramp is 3.2:1 and fails WCAG 1.4.3 for the 14px label a button carries, while the
   dark ink is 6.3:1 at every point along it — see --btn-ramp for how "every point" was arrived at.

   THE BUTTON IS FLAT. No inner highlight, no inner shade, no drop shadow, no glow — nothing that
   models a surface or lifts the object off the page. An earlier revision had a 1px top highlight
   and a 1px bottom shade, which is how a physical button is drawn, and it read as 3D and dated on
   sight. What replaces it is not less craft, it is craft moved into the FILL: an even, correctly
   lit, full-chroma ramp needs no bevel to look like an object. Anything added back here has to
   justify itself as something other than depth.

   Hover is a HUE event, not a brightness one: the ramp advances 64px inside the button. Because
   the ramp is iso-luminant that changes the colour under the label by dY = 0.0007 and its contrast
   not at all, so the state can be as visible as it likes without touching legibility. That move is
   only available because the field was flattened first.
   ------------------------------------------------------------------------------------------------ */

/* WHAT LIVES HERE NOW, AND WHAT DOES NOT.
   The whole button system — every rung, every role, every state, every modifier — is in
   theme-common.css under "RUNG", written once and read by all five skins through the token block at
   the foot of this file. What was here before was a second, private copy of it: `btn-secondary` and
   `btn-light` painted by one shared selector list (they measured byte-identical), four semantic
   washes so faint that `btn-danger` came out at 1.17:1 with a 2.16:1 edge — quieter than the
   "Save draft" beside it — and a `btn-link` in the brand blue, which is why every form footer in the
   product had two blues in it. All of that is deleted, not overridden: it lost to the shared layer
   on specificity anyway, and leaving it would have meant the file said one thing and rendered
   another.

   ONE THING STAYS, and it is the reason this section still exists: the primary button's ramp. The
   shared W3 rule paints a flat `var(--w3-brand)`, which is correct for four skins. Dark is the skin
   the product's own blue->green identity lives in, so its primary is an iso-luminant sweep rather
   than a flat fill — see the derivation above --btn-ramp at the top of this file. `--w3-brand` is
   set to the ramp's own head (#3e9be3) so the token and the ramp agree wherever something reads the
   token instead of the ramp.

   The selectors below are (0,2,0)/(0,2,1) — one step above the shared W3 rule, which is exactly what
   "a skin departing from the system has to do so loudly" means. They no longer repeat
   `.mrjun-block-dialog .modal-footer` / `.rich-bootstrap-modal-panel .modal-footer` /
   `.toolbar-controls`: those three context overrides were deleted from all five skins in the same
   change, so there is nothing left in a modal footer or a toolbar for the ramp to fight. */
.btn.btn-primary,
a.btn.btn-primary,
button.btn.btn-primary {
    background-color: #3ea953 !important;
    background-image: linear-gradient(to right, var(--btn-ramp)) !important;
    background-size: var(--btn-slab) 100% !important;
    background-size: max(var(--btn-slab), 100%) 100% !important;
    background-position: 0 0 !important;
    background-repeat: no-repeat !important;
    /* `background-color` fills the BORDER box while a background-image starts at the PADDING edge,
       so without this the ramp's green tail showed as a hairline all the way round — on a small
       blue button, a green outline. */
    background-origin: border-box !important;
    border-color: transparent !important;
    color: var(--brand-ink) !important;
    box-shadow: none !important;
    transition: background-position .18s ease-out, color .12s ease !important;
}

/* Hover advances the ramp instead of changing its brightness. Because the ramp is iso-luminant the
   colour under the label moves a long way and its contrast does not move at all — measured dE76
   16.9 / 21.8 / 15.6 at 110 / 200 / 363px, ink contrast 6.28-6.33 throughout. The shift has to be
   width-aware: a fixed -64px moved a 110px button by dE 1.7, below a just-noticeable difference,
   so 2229 small buttons had no hover state. */
.btn.btn-primary:hover,
a.btn.btn-primary:hover,
button.btn.btn-primary:hover {
    background-color: #3ea953 !important;
    background-image: linear-gradient(to right, var(--btn-ramp)) !important;
    background-position: var(--btn-shift) 0 !important;
    border-color: transparent !important;
    color: var(--brand-ink) !important;
}

/* Pressed snaps the ramp home — the same colour move in reverse, at 60ms. */
.btn.btn-primary:active,
a.btn.btn-primary:active,
button.btn.btn-primary:active {
    background-color: #3ea953 !important;
    background-image: linear-gradient(to right, var(--btn-ramp)) !important;
    background-position: 0 0 !important;
    transition-duration: .06s !important;
}

/* With no hover to return FROM, a press would be a no-op on touch. There it advances instead. */
@media (hover: none) {
    .btn.btn-primary:active,
    a.btn.btn-primary:active,
    button.btn.btn-primary:active {
        background-position: var(--btn-shift) 0 !important;
    }
}

/* A disabled primary is a dead slab like every other disabled button: the ramp must not survive it,
   and this is (0,3,0)/(0,3,1) so it beats the rules above. */
.btn.btn-primary:disabled,
.btn.btn-primary.disabled,
button.btn.btn-primary:disabled,
a.btn.btn-primary.disabled {
    background-color: var(--dis-fill) !important;
    background-image: none !important;
    border-color: var(--dis-fill) !important;
    color: var(--dis-ink) !important;
}

/* ------------------------------------------------------------------------------------------------
   7. BADGES AND CHIPS
   A status badge is a chip: a 14% wash of its own hue, a matching hairline, and the hue itself as
   ink. Solid saturated pills at 11px are the second loudest thing in an admin template after the
   accent rule, and a table of forty rows draws forty of them.
   ------------------------------------------------------------------------------------------------ */
.badge {
    border-radius: 999px !important;
    font-weight: 600;
    letter-spacing: .02em;
}

.badge.bg-primary, .badge.badge-primary {
    background: var(--brand-soft) !important;
    box-shadow: inset 0 0 0 1px var(--brand-line);
    color: var(--pink) !important;
}

.badge.bg-success, .badge.badge-success {
    background: rgba(89, 194, 106, .16) !important;
    box-shadow: inset 0 0 0 1px rgba(89, 194, 106, .42);
    color: var(--green) !important;
}

.badge.bg-danger, .badge.badge-danger {
    background: rgba(224, 90, 82, .16) !important;
    box-shadow: inset 0 0 0 1px rgba(224, 90, 82, .42);
    color: var(--red) !important;
}

.badge.bg-warning, .badge.badge-warning {
    background: rgba(224, 163, 60, .16) !important;
    box-shadow: inset 0 0 0 1px rgba(224, 163, 60, .42);
    color: var(--orange) !important;
}

.badge.bg-info, .badge.badge-info {
    background: rgba(70, 182, 217, .16) !important;
    box-shadow: inset 0 0 0 1px rgba(70, 182, 217, .42);
    color: var(--cyan) !important;
}

.badge.bg-secondary, .badge.badge-secondary {
    background: var(--tint-2) !important;
    box-shadow: inset 0 0 0 1px var(--hairline-2);
    color: var(--foreground-muted) !important;
}

/* The notification count on the bell is the one badge that MUST be a solid dot — it is a count, it
   is 6px of text, and a wash at that size is unreadable. */
.badge.notification-badge,
.header-dots .badge {
    background: var(--red) !important;
    box-shadow: 0 0 0 2px var(--background);
    color: #ffffff !important;
}

.dropdown-menu .dropdown-item,
.dropdown-menu.show .dropdown-item {
    background: transparent !important;
    background-image: none !important;
    border-radius: var(--radius-sm) !important;
    color: var(--foreground) !important;
    transition: background-color .14s ease, color .14s ease;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu.show .dropdown-item:hover,
.dropdown-menu.show .dropdown-item:focus {
    background: var(--tint-2) !important;
    background-image: none !important;
    color: var(--foreground) !important;
}

.dropdown-menu .dropdown-item.active,
.dropdown-menu.show .dropdown-item.active {
    background: var(--brand-soft) !important;
    background-image: none !important;
    box-shadow: inset 0 0 0 1px var(--brand-line);
    color: var(--foreground) !important;
}

.dropdown-menu .dropdown-header,
.dropdown-menu.show .dropdown-header {
    color: var(--comment) !important;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
    opacity: .86;   /* 4.95:1 on the menu ground; .80 was 4.46:1, under AA */
}

/* Dialogs. The header strip is one step up from the body so the title reads as a bar without a
   coloured band; the skeleton's accent-filled header made every dialog look like an alert. */
.modal-content,
.rich-bootstrap-modal-panel .modal-content,
.mrjun-block-dialog .modal-content {
    background: var(--surface-2) !important;
    background-image: none !important;
    border: 1px solid var(--hairline-2) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, .05), var(--elev-2) !important;
    color: var(--foreground) !important;
}

.modal-header,
.modal-footer {
    background: var(--surface-3) !important;
    background-image: none !important;
    border-color: var(--hairline) !important;
    color: var(--foreground) !important;
}

.modal-title {
    color: var(--foreground) !important;
    font-weight: 600;
    letter-spacing: -.01em;
}

/* The veil: a deep, lightly frosted dim. A flat 50% black slab over a near-black page makes the
   page behind look switched off rather than behind. */
.modal-backdrop,
.modal-backdrop.show {
    background-color: rgba(2, 4, 8, .62) !important;
    opacity: 1 !important;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.popover,
.tooltip-inner {
    background: var(--surface-3) !important;
    border: 1px solid var(--hairline-2) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--elev-2) !important;
    color: var(--foreground) !important;
}

/* ------------------------------------------------------------------------------------------------
   9. THE ACCOUNT CLUSTER
   The header's right-hand end is the most looked-at 200px in the product and it was the least
   designed: a 42px photo sitting naked on the bar, a chevron that never moved, a menu banner in
   flat `bg-info`, and two hard #dee2e6 hairlines drawn by base.css that no skin ever overrode.

   SCOPED TO `.app-header`. The same TopUserProfilePanel is embedded by the PUBLIC SITE's own bar
   (SiteNavPlugin), which is not inside `.app-header` and dresses the account block from
   dokie-site.css — an unprefixed rule here would paint the app shell's chrome onto the site, and a
   box-shadow does not inherit, so the site's own reset could not undo it.
   ------------------------------------------------------------------------------------------------ */
.app-header .header-btn-lg .widget-content-left .btn-group > a.btn img.rounded-circle {
    box-shadow: 0 0 0 2px var(--background), 0 0 0 3px var(--hairline-ui);
    transition: box-shadow .2s ease;
}

.app-header .header-btn-lg .widget-content-left .btn-group > a.btn:hover img.rounded-circle,
.app-header .header-btn-lg .widget-content-left .btn-group.show > a.btn img.rounded-circle {
    box-shadow: 0 0 0 2px var(--background), 0 0 0 3px var(--purple);
}

/* The trigger is an <a> with no href, so it had no focus state at all — a real keyboard gap, not
   a nicety. */
.app-header .header-btn-lg .widget-content-left .btn-group > a.btn:focus-visible img.rounded-circle {
    box-shadow: 0 0 0 2px var(--background), 0 0 0 5px rgba(47, 143, 214, .55);
    outline: none;
}

/* The chevron: quiet, and it turns over when the menu is open, so the control says which state it
   is in instead of leaving the user to notice the menu. */
.app-header .header-btn-lg .widget-content-left .btn-group > a.btn .fa-angle-down {
    color: var(--comment);
    opacity: 1 !important;
    transition: transform .2s ease, color .16s ease;
}

.app-header .header-btn-lg .widget-content-left .btn-group > a.btn:hover .fa-angle-down,
.app-header .header-btn-lg .widget-content-left .btn-group.show > a.btn .fa-angle-down {
    color: var(--foreground);
}

.app-header .header-btn-lg .widget-content-left .btn-group.show > a.btn .fa-angle-down {
    transform: rotate(180deg);
}

/* base.css:14712 dims the signed-in name to 80%. On a dark bar that is the one label the user
   looks for and it was the faintest thing on it. */
.app-header .header-user-info > .widget-heading {
    opacity: 1;
    color: var(--foreground);
    font-weight: 600;
    letter-spacing: .01em;
}

/* The account menu is the overlay treatment plus `overflow: hidden`, which is what finally lets
   the banner clip to the menu's own corners instead of squaring them off. */
.app-header .dropdown-menu.dropdown-menu-lg {
    overflow: hidden !important;
    border-radius: var(--radius) !important;
    padding: 0 !important;
}

.app-header .dropdown-menu.dropdown-menu-lg .dropdown-menu-header,
.app-header .dropdown-menu.dropdown-menu-lg .dropdown-menu-header-inner {
    border-radius: var(--radius) var(--radius) 0 0;
    margin-bottom: 0;
}

/* The banner. `bg-info` is written in the MARKUP, so the only way to reach it is to be more
   specific than a utility class — hence the two-class root. It becomes the brand sweep over the
   deep ground: the one place in the shell where the full gradient appears at size. */
.app-header .dropdown-menu.dropdown-menu-lg .dropdown-menu-header-inner.bg-info,
.app-header .dropdown-menu.dropdown-menu-lg .dropdown-menu-header-inner {
    background: var(--w2-brand) !important;
    box-shadow: inset 0 -1px 0 0 var(--hairline-2);
}

.app-header .dropdown-menu.dropdown-menu-lg .menu-header-image {
    opacity: .18 !important;
    filter: grayscale(55%);
}

/* The second avatar sits ON the banner, so its ring is drawn in light, not in the accent. */
.app-header .dropdown-menu-lg .menu-header-content .widget-content-left img.rounded-circle {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .30);
}

.app-header .dropdown-menu-lg .menu-header-content .widget-heading {
    color: #ffffff;
    font-weight: 600;
}

/* base.css:12097 draws this divider as a solid #dee2e6 block — a bright bar across a dark menu. */
.app-header .dropdown-menu-lg .nav-item.nav-item-divider,
.app-header .dropdown-menu .nav-item.nav-item-divider {
    background: var(--hairline) !important;
}

.app-header .dropdown-menu-lg .nav-item-header {
    color: var(--comment) !important;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
    opacity: .8;
}

.app-header .dropdown-menu-lg .nav-item .nav-link {
    border-radius: var(--radius-sm);
    color: var(--foreground) !important;
    transition: background-color .14s ease;
}

.app-header .dropdown-menu-lg .nav-item .nav-link:hover {
    background: var(--tint-2) !important;
}

.app-header .dropdown-menu-lg .nav-item .nav-link i {
    color: var(--purple) !important;
}

/* base.css:2373 paints `.btn-focus` a hard-coded #444054 — an off-palette slab sitting on the
   banner in every skin. On a coloured ground the right treatment is glass, not another fill. */
.app-header .dropdown-menu-lg .dropdown-menu-header .btn.btn-focus,
.app-header .dropdown-menu-lg .dropdown-menu-header .nct-logout-btn {
    background: rgba(255, 255, 255, .14) !important;
    background-image: none !important;
    border: 1px solid rgba(255, 255, 255, .30) !important;
    color: #ffffff !important;
    transition: background-color .18s ease, box-shadow .18s ease;
}

.app-header .dropdown-menu-lg .dropdown-menu-header .btn.btn-focus:hover,
.app-header .dropdown-menu-lg .dropdown-menu-header .nct-logout-btn:hover {
    background: rgba(255, 255, 255, .24) !important;
}

/* ------------------------------------------------------------------------------------------------
   10. THE THEME SWITCH — colour
   Shape, size and the knob's travel live in themes/theme-common.css, because the control is the
   same object in every skin and only its palette changes. This block is Dark's palette for it.
   The knob is the ONE place in the header the brand sweep appears, which is what makes a 60px
   control read as part of the product rather than as a widget dropped into the bar.
   ------------------------------------------------------------------------------------------------ */
.nct-theme-switch__track {
    background: var(--surface-1);
    border-color: var(--hairline-ui);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45);
}

.nct-theme-switch:hover .nct-theme-switch__track {
    background: var(--surface-2);
    border-color: var(--brand-line);
}

.nct-theme-switch:focus-visible .nct-theme-switch__track {
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .45), 0 0 0 3px rgba(47, 143, 214, .40);
}

.nct-theme-switch__knob {
    background: var(--brand-sweep);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .55), 0 0 12px rgba(47, 143, 214, .38);
}

.nct-theme-switch__ico {
    color: var(--comment);
}

/* The icon the knob is sitting on takes the ink that reads on the sweep; the other stays quiet.
   That pairing is the whole state indicator — no label, no colour change of the track. */
.nct-theme-switch.is-dark .nct-theme-switch__ico--moon,
.nct-theme-switch.is-light .nct-theme-switch__ico--sun {
    color: var(--brand-ink);
}

/* ------------------------------------------------------------------------------------------------
   10b. THE QUERY BUILDER'S PANELS
   The filter / query / results / aggregation strips are the one large surface the sections above
   never touch, because they are built from their own classes rather than from `.card`. Left alone
   they kept the skeleton's grey plates and stood out as the only 2016 screen left in the product.
   Nothing structural here — the same plane, hairline and radius the rest of the file uses.

   The skeleton reaches some of these through `[id^="filter"] .card` at (0,2,0), so that ancestor
   is repeated rather than assumed away.
   ------------------------------------------------------------------------------------------------ */
.filter-panel,
.query-panel,
.results-panel,
.aggregations-panel,
.group-by-panel,
.order-by-panel,
.replacement-panel,
.btn-actions-pane,
[id^="filter"] .card,
[id^="query"] .card {
    background: var(--surface-2) !important;
    background-image: none !important;
    border: 1px solid var(--hairline) !important;
    border-radius: var(--radius) !important;
    box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, .04) !important;
    color: var(--foreground);
}

.filter-panel .card-header,
.query-panel .card-header,
.results-panel .card-header,
[id^="filter"] .card .card-header,
[id^="query"] .card .card-header {
    background: transparent !important;
    background-image: none !important;
    border-bottom: 1px solid var(--hairline) !important;
}

/* ------------------------------------------------------------------------------------------------
   10c. THE AJAX WAIT
   Shape, size and behaviour are in themes/theme-common.css — the control is the same object in
   every skin. This is the one thing Dark does differently: the arc sweeps the product's own pair
   instead of a single accent, which is the same figure the primary button draws. `currentColor` in
   the shared rule becomes an explicit two-stop conic here.
   ------------------------------------------------------------------------------------------------ */
.ball-grid-pulse {
    filter: drop-shadow(0 0 16px rgba(47, 143, 214, .40))
            drop-shadow(0 0 30px rgba(89, 194, 106, .16));
}

.ball-grid-pulse::before {
    border-color: var(--hairline-ui);
    opacity: .55;
}

.ball-grid-pulse::after {
    background: conic-gradient(from 0turn,
            transparent 0turn 0.04turn,
            #2f8fd6 0.34turn,
            #59c26a 0.68turn,
            transparent 0.96turn);
}

/* The veil is TOKENS here, not a colour. The previous value was `rgba(2,4,8,.58)`, reasoned as
   "the ground is already near-black so the wash has to be deeper" — which is exactly backwards.
   Over the panel `#0c1422` that composites to `#060b13`, darker than the page ground itself, so the
   blocked region became the blackest rectangle on screen and everything inside it was crushed flat.
   There is no headroom below near-black; dimming has to come from `brightness()` on the backdrop,
   and what is left on top has to be a LIGHT film or the layer reads as an absence rather than as
   glass. Mechanism lives in theme-common.css; these are Dark's numbers. */
:root {
    --wait-veil: rgba(140, 178, 224, .055);
    --wait-veil-flat: rgba(6, 10, 18, .55);
    --wait-dim: .70;
    --wait-sat: 78%;
    --wait-sweep: rgba(160, 200, 240, .06);
}

@media (prefers-reduced-motion: reduce) {
    .ball-grid-pulse::after {
        background: none;
        border-color: var(--purple);
    }
}

/* ------------------------------------------------------------------------------------------------
   11. SCROLLBARS, SELECTION, FOCUS
   ------------------------------------------------------------------------------------------------ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(150, 184, 219, .18);
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(150, 184, 219, .32);
    background-clip: padding-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(150, 184, 219, .22) transparent;
}

::selection {
    background: rgba(47, 143, 214, .35);
    color: var(--foreground);
}

/* base.css ends with `a, button, .btn { outline: none !important }`, so a keyboard user has no
   focus indicator anywhere in the product. Putting it back needs `!important` for the same reason
   it was lost. `:focus-visible` (not `:focus`) keeps it off mouse clicks. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[role="button"]:focus-visible,
.nav-link:focus-visible,
.dropdown-item:focus-visible {
    outline: 2px solid var(--purple) !important;
    outline-offset: 2px !important;
    border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------------------------------------------
   12. REDUCED MOTION
   Everything this section animates is decoration — a knob sliding, a chevron turning, a button
   lifting 1px. None of it carries meaning that the end state does not, so all of it goes.
   ------------------------------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .nct-theme-switch__knob,
    .nct-theme-switch__track,
    .nct-theme-switch__ico,
    .btn,
    .card,
    .nav-tabs .nav-link,
    .app-sidebar .vertical-nav-menu ul > li > a,
    .app-header .header-btn-lg .widget-content-left .btn-group > a.btn img.rounded-circle,
    .app-header .header-btn-lg .widget-content-left .btn-group > a.btn .fa-angle-down,
    .form-control,
    .dropdown-menu .dropdown-item {
        transition: none !important;
    }

    .btn:active {
        transform: none;
    }
}

/* ------------------------------------------------------------------------------------------------
   13. FORCED COLORS (Windows high contrast)
   In this mode the OS supplies every colour and our washes collapse to the same system ink, so
   the surfaces that were told apart by a 14% tint stop being told apart at all. Give the ones that
   MUST stay separable a real border, which forced-colors does honour.
   ------------------------------------------------------------------------------------------------ */
@media (forced-colors: active) {
    .card,
    .modal-content,
    .dropdown-menu,
    .dropdown-menu.show,
    .nct-theme-switch__track,
    .form-control,
    .form-select {
        border: 1px solid CanvasText !important;
    }

    .nct-theme-switch__knob {
        background: Highlight !important;
        forced-color-adjust: none;
    }

    /* The primary button is the one control this mode breaks outright: forced-colors drops
       background-image and forces the text to CanvasText, so a dark-ink-on-ramp button becomes
       dark text on the canvas — an invisible Save. Hand it back the system's own button colours
       and, again, a real border, which is the only thing that still separates it from the page. */
    .btn-primary,
    button.btn-primary,
    a.btn-primary {
        forced-color-adjust: none;
        background: ButtonFace !important;
        background-image: none !important;
        color: ButtonText !important;
        border: 1px solid ButtonText !important;
        box-shadow: none !important;
    }

    .btn-primary:focus-visible,
    button.btn-primary:focus-visible,
    a.btn-primary:focus-visible {
        outline: 2px solid Highlight !important;
    }
}


/* ================================================================================================
   RUNG TOKENS — dark
   The button system lives in theme-common.css ("RUNG"); this is the only thing that differs per
   skin. Twelve surface/state values plus six per role. Declared last so they win outright, and
   declared as BAKED opaque colours rather than runtime alphas — an alpha composites against
   whatever happens to be behind it, which is why `btn-secondary` used to render as four different
   colours on four different grounds.

   --w3-* all sit at ONE luminance inside this skin (L3 0.660), so a role can change hue and chroma but
   can never buy weight. Everything was solved against the BINDING SURFACE — the hardest ground a
   button lands on, the raised/modal panel --srf-2 — which is why nothing degrades inside a dialog.
   ================================================================================================ */
:root {
    --srf-0: #080e19;
    --srf-1: #101b2c;
    --srf-2: #16243a;
    --srf-3: #1c2f49;
    --edge-ui: #637891;
    --ink-1: #eaf1f8;
    --ink-2: #828e99;
    --dis-fill: #282f36;
    --dis-ink: #9098a0;
    --dis-edge: #33393f;
    --focus: #cfe6ff;
    --btn-radius: 8px;

    /* brand's W3 is the ramp's own head, so the token and --btn-ramp agree by construction */
    --w3-brand: #3e9be3;      --w3-brand-hv: #3e9be3;
    --ink-on-brand: #04121d;  --w2-brand: #193450;
    --edge-brand: #477296;    --ink-brand: #56aaef;
    --w3-negative: #ed5a52;   --w3-negative-hv: #ec576f;
    --ink-on-negative: #120403; --w2-negative: #3c2834;
    --edge-negative: #975f59; --ink-negative: #e98177;
    --w3-positive: #47aa59;   --w3-positive-hv: #08ad70;
    --ink-on-positive: #020b03; --w2-positive: #1b3835;
    --edge-positive: #4d7852; --ink-positive: #64b66f;
    --w3-caution: #c18500;    --w3-caution-hv: #b48c00;
    --ink-on-caution: #0f0600; --w2-caution: #333023;
    --edge-caution: #87693a;  --ink-caution: #cf9533;
    --w3-info: #00a6ad;       --w3-info-hv: #12a4ba;
    --ink-on-info: #000b0d;   --w2-info: #0d3746;
    --edge-info: #2a797d;     --ink-info: #27b5bb;
}

/* REMOVED: the per-family icon-ink table.
   It painted the glyph inside a filled button with the light foreground while the label kept the
   dark ink — measured 1.6-2.6:1 for the icon beside 5.9-8.7:1 for its own text, i.e. the thinnest
   stroke in the button got the worst contrast in the button. Worse, it flattened the row-action
   glyphs to within 1 JND of each other, so a table's DELETE was not red. `.btn > i { color:
   currentColor }` in theme-common.css does the whole job: a glyph is part of the label and takes
   the label's colour. These rules had to be deleted rather than overridden — several are (0,1,1),
   which TIES the shared rule, and the skin loads later. */

/* REMOVED: this skin's private toastr rules.
   Every alert in the product is drawn by the shared TOASTS layer in theme-common.css now, off the
   same role tokens the buttons use. What stood here was a private copy per skin, and they had
   drifted into two different wrong answers: dark painted a muted panel but left the ink at
   `var(--background)` — near-black text on a dark green panel — while the other four painted a
   fully saturated 2013-style slab with white ink, several of which failed contrast outright
   (white on #f7b924 measures 1.9:1). */
