/* COMMAND-CENTER-V2-BRIDGE (Founder authorization 2026-09-28, CC-V2-P1 batch J3):
   values only, remapped onto the Founder-approved vh2 token authority
   (vh2-tokens.css — D-426 A+C baseline: warm ivory/navy, orange primary action with a WHITE label,
   vivid blue interaction, no purple). Token NAMES are unchanged so every existing
   .vh-* and --vh-* rule on unmigrated legacy screens keeps working with zero markup
   change — only what --vh-brand etc. RESOLVE TO changed. Supersedes the
   2026-09-17 violet ADMIN-V2-VISUAL-PARITY decision. No external font CDN
   (unchanged constraint) — fonts now point at the self-hosted vh2 Inter faces. */

:root {
  --vh-brand:            var(--vh2-action-primary-bg, #D2431A);
  --vh-brand-hover:      var(--vh2-action-primary-bg-hover, #B8340F);
  --vh-brand-active:     var(--vh2-action-primary-bg-pressed, #8E2A12);
  --vh-brand-soft:       var(--vh2-brand-soft, #FFF1E8);
  --vh-brand-border:     var(--vh2-border-strong, #D8D3CB);
  --vh-brand-contrast:   var(--vh2-action-primary-fg, #FFFFFF);

  --vh-bg:               var(--vh2-bg-canvas, #F7F6F3);
  --vh-surface:          var(--vh2-surface, #FFFFFF);
  --vh-surface-2:        var(--vh2-bg-subtle, #FCFBF9);
  --vh-surface-3:        var(--vh2-bg-sunken, #F1EFEB);
  --vh-sidebar-bg:       var(--vh2-surface-sidebar, #FCFBF9);
  --vh-sidebar-fg:       var(--vh2-text-secondary, #525B69);
  --vh-sidebar-fg-hi:    var(--vh2-text-primary, #141A24);
  --vh-sidebar-active:   var(--vh2-bg-sunken, #F1EFEB);
  --vh-header-bg:        var(--vh2-surface, #FFFFFF);

  --vh-text:             var(--vh2-text-primary, #141A24);
  --vh-text-2:           var(--vh2-text-secondary, #525B69);
  --vh-text-3:           var(--vh2-text-tertiary, #6F7682);
  --vh-text-inverse:     var(--vh2-text-inverse, #FFFFFF);

  --vh-border:           var(--vh2-border-default, #E7E4DE);
  --vh-border-strong:    var(--vh2-border-strong, #D8D3CB);

  --vh-success:          var(--vh2-success-fg, #0E8A5F);
  --vh-success-soft:     var(--vh2-success-bg, #E6F5EE);
  --vh-success-border:   var(--vh2-success-border, #BFE0CC);
  --vh-warning:          var(--vh2-warning-fg, #B8340F);
  --vh-warning-soft:     var(--vh2-warning-bg, #F1EFEB);
  --vh-warning-border:   var(--vh2-warning-border, #E7E4DE);
  --vh-danger:           var(--vh2-danger-fg, #C6283D);
  --vh-danger-soft:      var(--vh2-danger-bg, #FCEBED);
  --vh-danger-border:    var(--vh2-danger-border, #F0C3CB);
  --vh-info:             var(--vh2-info-fg, #2B5CFF);
  --vh-info-soft:        var(--vh2-info-bg, #EEF3FE);
  --vh-info-border:      var(--vh2-info-border, #DCE6FD);
  --vh-neutral:          var(--vh2-neutral-fg, #525B69);
  --vh-neutral-soft:     var(--vh2-neutral-bg, #F1EFEB);
  --vh-neutral-border:   var(--vh2-neutral-border, #E7E4DE);

  --vh-s1: var(--vh2-s1, 4px);  --vh-s2: var(--vh2-s2, 8px);  --vh-s3: var(--vh2-s3, 12px); --vh-s4: var(--vh2-s4, 16px);
  --vh-s5: var(--vh2-s5, 20px); --vh-s6: var(--vh2-s6, 24px); --vh-s8: var(--vh2-s8, 32px); --vh-s10: var(--vh2-s10, 40px);

  --vh-r-sm: var(--vh2-r-xs, 6px); --vh-r-md: var(--vh2-r-md, 10px); --vh-r-lg: var(--vh2-r-lg, 14px); --vh-r-pill: var(--vh2-r-pill, 999px);

  --vh-shadow-1: var(--vh2-shadow-xs, 0 1px 2px rgba(20,26,36,.04));
  --vh-shadow-2: var(--vh2-shadow-sm, 0 1px 3px rgba(20,26,36,.06));
  --vh-shadow-3: var(--vh2-shadow-md, 0 4px 12px rgba(20,26,36,.06));
  --vh-shadow-4: var(--vh2-shadow-lg, 0 12px 32px rgba(20,26,36,.10));

  --vh-focus:            0 0 0 2px var(--vh2-focus-ring, #2B5CFF);

  --vh-font: var(--vh2-font, 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  --vh-font-heading: var(--vh2-font, 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif);
  --vh-font-mono: var(--vh2-font-mono, ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace);

  --vh-sidebar-width: 236px;
  --vh-speed: var(--vh2-dur-base, 140ms);
  --vh-accent:           var(--vh2-interactive, #2B5CFF);
  --vh-accent-soft:      var(--vh2-interactive-soft, #EEF3FE);
  --vh-accent-text:      var(--vh2-text-link, #B8340F);
  --vh-link:             var(--vh2-text-link, #2B5CFF);
  --vh-link-hover:       var(--vh2-action-primary-bg-pressed, #8E2A12);
  --vh-coral:            var(--vh2-brand, #FF643B);
  --vh-coral-soft:       var(--vh2-brand-soft, #FFF1E8);
  --vh-coral-text:       var(--vh2-brand-text, #B83A18);
}

/* ---------------------------------------------------------------------------
   2. DARK THEME — bridged the same way (graphite, values only).
   ------------------------------------------------------------------------ */
html[data-theme="dark"] {
  --vh-brand:            var(--vh2-action-primary-bg, #D2431A);
  --vh-brand-hover:      var(--vh2-action-primary-bg-hover, #B8340F);
  --vh-brand-active:     var(--vh2-action-primary-bg-pressed, #8E2A12);
  --vh-brand-soft:       var(--vh2-brand-soft, #4A170A);
  --vh-brand-border:     var(--vh2-border-strong, #3A404B);
  --vh-brand-contrast:   var(--vh2-action-primary-fg, #FFFFFF);
  --vh-accent:           var(--vh2-interactive, #6D97FF);
  --vh-accent-soft:      var(--vh2-interactive-soft, #1A2644);
  --vh-accent-text:      var(--vh2-text-link, #6D97FF);
  --vh-link:             var(--vh2-text-link, #6D97FF);
  --vh-link-hover:       var(--vh2-brand-text, #FF9A5C);
  --vh-coral:            var(--vh2-brand, #FF7A55);
  --vh-coral-soft:       var(--vh2-brand-soft, #3A2119);
  --vh-coral-text:       var(--vh2-brand-text, #FF9C7F);

  --vh-bg:               var(--vh2-bg-canvas, #0F1115);
  --vh-surface:          var(--vh2-surface, #15181D);
  --vh-surface-2:        var(--vh2-bg-subtle, #121519);
  --vh-surface-3:        var(--vh2-surface-raised, #1B1F26);
  --vh-sidebar-bg:       var(--vh2-surface-sidebar, #121519);
  --vh-sidebar-fg:       var(--vh2-text-secondary, #A9B0BB);
  --vh-sidebar-fg-hi:    var(--vh2-text-primary, #EEF0F3);
  --vh-sidebar-active:   var(--vh2-bg-subtle, #121519);
  --vh-header-bg:        var(--vh2-surface, #15181D);

  --vh-text:             var(--vh2-text-primary, #EEF0F3);
  --vh-text-2:           var(--vh2-text-secondary, #A9B0BB);
  --vh-text-3:           var(--vh2-text-tertiary, #8B93A0);
  --vh-text-inverse:     var(--vh2-text-inverse, #0F1115);

  --vh-border:           var(--vh2-border-default, #2A2F38);
  --vh-border-strong:    var(--vh2-border-strong, #3A404B);

  --vh-success:          var(--vh2-success-fg, #3CCB8F);
  --vh-success-soft:     var(--vh2-success-bg, #13291F);
  --vh-success-border:   var(--vh2-success-border, #1F4230);
  --vh-warning:          var(--vh2-warning-fg, #FF9A5C);
  --vh-warning-soft:     var(--vh2-warning-bg, #1B2240);
  --vh-warning-border:   var(--vh2-warning-border, #4A3A1C);
  --vh-danger:           var(--vh2-danger-fg, #FF6B7D);
  --vh-danger-soft:      var(--vh2-danger-bg, #33171C);
  --vh-danger-border:    var(--vh2-danger-border, #4A2530);
  --vh-info:             var(--vh2-info-fg, #6D97FF);
  --vh-info-soft:        var(--vh2-info-bg, #1A2644);
  --vh-info-border:      var(--vh2-info-border, #2A3B5C);
  --vh-neutral:          var(--vh2-neutral-fg, #A9B0BB);
  --vh-neutral-soft:     var(--vh2-neutral-bg, #1B1F26);
  --vh-neutral-border:   var(--vh2-neutral-border, #2A2F38);

  --vh-shadow-1: var(--vh2-shadow-xs, 0 1px 2px rgba(28,25,23,.35));
  --vh-shadow-2: var(--vh2-shadow-sm, 0 1px 3px rgba(28,25,23,.4));
  --vh-shadow-3: var(--vh2-shadow-md, 0 4px 12px rgba(28,25,23,.4));
  --vh-shadow-4: var(--vh2-shadow-lg, 0 12px 32px rgba(28,25,23,.5));

  --vh-focus:            0 0 0 2px var(--vh2-focus-ring, #6D97FF);

  color-scheme: dark;
}

/* Respect the OS preference when the operator has not chosen explicitly. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not([data-theme="dark"]) {
  --vh-brand:            var(--vh2-action-primary-bg, #D2431A);
  --vh-brand-hover:      var(--vh2-action-primary-bg-hover, #B8340F);
  --vh-brand-active:     var(--vh2-action-primary-bg-pressed, #8E2A12);
  --vh-brand-soft:       var(--vh2-brand-soft, #4A170A);
  --vh-brand-border:     var(--vh2-border-strong, #3A404B);
  --vh-brand-contrast:   var(--vh2-action-primary-fg, #FFFFFF);
  --vh-accent:           var(--vh2-interactive, #6D97FF);
  --vh-accent-soft:      var(--vh2-interactive-soft, #1A2644);
  --vh-accent-text:      var(--vh2-text-link, #6D97FF);
  --vh-link:             var(--vh2-text-link, #6D97FF);
  --vh-link-hover:       var(--vh2-brand-text, #FF9A5C);
  --vh-coral:            var(--vh2-brand, #FF7A55);
  --vh-coral-soft:       var(--vh2-brand-soft, #3A2119);
  --vh-coral-text:       var(--vh2-brand-text, #FF9C7F);

  --vh-bg:               var(--vh2-bg-canvas, #0F1115);
  --vh-surface:          var(--vh2-surface, #15181D);
  --vh-surface-2:        var(--vh2-bg-subtle, #121519);
  --vh-surface-3:        var(--vh2-surface-raised, #1B1F26);
  --vh-sidebar-bg:       var(--vh2-surface-sidebar, #121519);
  --vh-sidebar-fg:       var(--vh2-text-secondary, #A9B0BB);
  --vh-sidebar-fg-hi:    var(--vh2-text-primary, #EEF0F3);
  --vh-sidebar-active:   var(--vh2-bg-subtle, #121519);
  --vh-header-bg:        var(--vh2-surface, #15181D);

  --vh-text:             var(--vh2-text-primary, #EEF0F3);
  --vh-text-2:           var(--vh2-text-secondary, #A9B0BB);
  --vh-text-3:           var(--vh2-text-tertiary, #8B93A0);
  --vh-text-inverse:     var(--vh2-text-inverse, #0F1115);

  --vh-border:           var(--vh2-border-default, #2A2F38);
  --vh-border-strong:    var(--vh2-border-strong, #3A404B);

  --vh-success:          var(--vh2-success-fg, #3CCB8F);
  --vh-success-soft:     var(--vh2-success-bg, #13291F);
  --vh-success-border:   var(--vh2-success-border, #1F4230);
  --vh-warning:          var(--vh2-warning-fg, #FF9A5C);
  --vh-warning-soft:     var(--vh2-warning-bg, #1B2240);
  --vh-warning-border:   var(--vh2-warning-border, #4A3A1C);
  --vh-danger:           var(--vh2-danger-fg, #FF6B7D);
  --vh-danger-soft:      var(--vh2-danger-bg, #33171C);
  --vh-danger-border:    var(--vh2-danger-border, #4A2530);
  --vh-info:             var(--vh2-info-fg, #6D97FF);
  --vh-info-soft:        var(--vh2-info-bg, #1A2644);
  --vh-info-border:      var(--vh2-info-border, #2A3B5C);
  --vh-neutral:          var(--vh2-neutral-fg, #A9B0BB);
  --vh-neutral-soft:     var(--vh2-neutral-bg, #1B1F26);
  --vh-neutral-border:   var(--vh2-neutral-border, #2A2F38);

  --vh-shadow-1: var(--vh2-shadow-xs, 0 1px 2px rgba(28,25,23,.35));
  --vh-shadow-2: var(--vh2-shadow-sm, 0 1px 3px rgba(28,25,23,.4));
  --vh-shadow-3: var(--vh2-shadow-md, 0 4px 12px rgba(28,25,23,.4));
  --vh-shadow-4: var(--vh2-shadow-lg, 0 12px 32px rgba(28,25,23,.5));

  --vh-focus:            0 0 0 2px var(--vh2-focus-ring, #6D97FF);

  color-scheme: dark;
  }
}

/* ---------------------------------------------------------------------------
   3. BASE / TYPOGRAPHY
   ------------------------------------------------------------------------ */
html, body {
  background: var(--vh-bg) !important;
  color: var(--vh-text) !important;
  font-family: var(--vh-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.55;
}

h1, h2, h3, h4, h5, h6,
.panel-title, .page-header h1 {
  font-family: var(--vh-font-heading) !important;
  color: var(--vh-text) !important;
  letter-spacing: -0.015em;
  font-weight: 600;
}
h1 { font-size: 28px; line-height: 1.25; }
h2 { font-size: 22px; line-height: 1.3; }
h3 { font-size: 18px; line-height: 1.35; }
h4 { font-size: 16px; }
h5, h6 { font-size: 14px; }

a { color: var(--vh-link); transition: color var(--vh-speed) ease; }
a:hover, a:focus { color: var(--vh-link-hover); text-decoration: none; }

small, .text-muted { color: var(--vh-text-3) !important; }
hr { border-top-color: var(--vh-border); }
code, pre, .vh-mono { font-family: var(--vh-font-mono); font-size: 12px; }

/* Page heading block used across modules */
.page-head, .page-header {
  border-bottom: 1px solid var(--vh-border) !important;
  padding: var(--vh-s5) 0 var(--vh-s4) !important;
  margin: 0 0 var(--vh-s6) !important;
}
.page-head h3, .page-header h1 { margin: 0 0 var(--vh-s1); }
.breadcrumb {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 12px;
  color: var(--vh-text-3);
}
.breadcrumb > .active { color: var(--vh-text-2); }

/* ---------------------------------------------------------------------------
   4. APP SHELL
   ------------------------------------------------------------------------ */
#header, section#header, #header header {
  background: var(--vh-header-bg) !important;
  border-bottom: 1px solid var(--vh-border) !important;
  box-shadow: var(--vh-shadow-1);
}
#header .branding, .branding {
  background: var(--vh-header-bg) !important;
  border-right: 1px solid var(--vh-border);
}
#header .brand img { max-height: 34px; width: auto !important; }

#header .nav-left > li > a,
#header .nav-right > li > a,
#header .dropdown-toggle {
  color: var(--vh-text-2) !important;
  border-radius: var(--vh-r-sm);
  transition: background var(--vh-speed) ease, color var(--vh-speed) ease;
}
#header .nav-left > li > a:hover,
#header .nav-right > li > a:hover,
#header .dropdown-toggle:hover {
  background: var(--vh-surface-3) !important;
  color: var(--vh-text) !important;
}

/* Sidebar */
/* The Minovate template ships colour "schemes" whose rules look like
   `#sidebar.scheme-black { background-color: ... !important }` — one id PLUS one
   class, so a plain `#sidebar` rule loses the specificity contest even with
   !important. `#sidebar[class]` matches that specificity and, loading last, wins
   the tie. The approved design replaces the template's theming outright, so
   every scheme variant is covered deliberately rather than one at a time. */
#sidebar, .sidebar, #sidebar .sidebar-inner,
#sidebar[class], #sidebar[class] #navigation,
#sidebar[class] #sidebar-wrap {
  background: var(--vh-sidebar-bg) !important;
  background-color: var(--vh-sidebar-bg) !important;
  border-right: 1px solid var(--vh-border) !important;
  width: var(--vh-sidebar-width);
}
#sidebar[class] #sidebar-wrap::before {
  background: var(--vh-sidebar-bg) !important;
}

/* The header branding block carries the same scheme treatment. */
#header[class] .branding,
#header .branding[class] {
  background: var(--vh-header-bg) !important;
  background-color: var(--vh-header-bg) !important;
}
#sidebar .sidebar-nav ul li a,
#sidebar .nav > li > a,
.sidebar-nav a {
  color: var(--vh-sidebar-fg) !important;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--vh-r-sm);
  margin: 2px var(--vh-s2);
  padding: 9px var(--vh-s3) !important;
  transition: background var(--vh-speed) ease, color var(--vh-speed) ease;
}
#sidebar .sidebar-nav ul li a:hover,
#sidebar .nav > li > a:hover,
.sidebar-nav a:hover {
  background: var(--vh-surface-3) !important;
  color: var(--vh-sidebar-fg-hi) !important;
}
#sidebar .sidebar-nav ul li.active > a,
#sidebar .nav > li.active > a,
.sidebar-nav li.active > a {
  background: var(--vh-sidebar-active) !important;
  color: var(--vh-coral-text) !important;
  font-weight: 600;
}
#sidebar .sidebar-nav ul li a i,
#sidebar .nav > li > a i { opacity: .85; width: 18px; text-align: center; }

/* Section captions in the sidebar */
#sidebar .sidebar-nav .nav-header,
#sidebar .nav-header {
  color: var(--vh-text-3) !important;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: var(--vh-s5) var(--vh-s4) var(--vh-s2);
}

#content, .content, #wrap > section > .content {
  background: var(--vh-bg) !important;
  padding: var(--vh-s6) !important;
}

/* ---------------------------------------------------------------------------
   5. CARDS & PANELS
   ------------------------------------------------------------------------ */
.panel, .widget, .card {
  background: var(--vh-surface) !important;
  border: 1px solid var(--vh-border) !important;
  border-radius: var(--vh-r-lg) !important;
  box-shadow: var(--vh-shadow-2) !important;
  margin-bottom: var(--vh-s5);
  overflow: hidden;
}
.panel-heading {
  background: var(--vh-surface) !important;
  border-bottom: 1px solid var(--vh-border) !important;
  color: var(--vh-text) !important;
  padding: var(--vh-s4) var(--vh-s5) !important;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.panel-body { padding: var(--vh-s5) !important; color: var(--vh-text); }
.panel-footer {
  background: var(--vh-surface-2) !important;
  border-top: 1px solid var(--vh-border) !important;
  color: var(--vh-text-2) !important;
  padding: var(--vh-s3) var(--vh-s5) !important;
}
/* Bootstrap's coloured panel variants become quiet, tokenised surfaces. */
.panel-default, .panel-primary, .panel-info,
.panel-success, .panel-warning, .panel-danger {
  border-color: var(--vh-border) !important;
}
.panel-primary > .panel-heading,
.panel-info > .panel-heading,
.panel-success > .panel-heading,
.panel-warning > .panel-heading,
.panel-danger > .panel-heading {
  background: var(--vh-surface) !important;
  color: var(--vh-text) !important;
  border-bottom-color: var(--vh-border) !important;
}

/* ---------------------------------------------------------------------------
   6. STAT WIDGETS
   The dashboard tiles. Restyled in place; markup untouched.
   ------------------------------------------------------------------------ */
.vh-stat, .feature-box-container .card {
  background: var(--vh-surface) !important;
  border: 1px solid var(--vh-border) !important;
  border-radius: var(--vh-r-lg) !important;
  box-shadow: var(--vh-shadow-2) !important;
  padding: var(--vh-s5) !important;
  /* the old template forced a 500px teardrop radius */
  border-top-left-radius: var(--vh-r-lg) !important;
  border-bottom-right-radius: var(--vh-r-lg) !important;
  min-height: 0 !important;
  transition: box-shadow var(--vh-speed) ease, transform var(--vh-speed) ease;
}
.vh-stat:hover, .feature-box-container .card:hover {
  box-shadow: var(--vh-shadow-3) !important;
  transform: translateY(-1px);
}
.feature-box-container .card .front { padding: var(--vh-s5) !important; }
.vh-stat__label {
  color: var(--vh-text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin: 0 0 var(--vh-s2);
}
.vh-stat__value {
  color: var(--vh-text);
  font-size: 28px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.vh-stat__meta { color: var(--vh-text-3); font-size: 12px; margin-top: var(--vh-s2); }
.vh-stat__delta--up   { color: var(--vh-success); }
.vh-stat__delta--down { color: var(--vh-danger); }

/* ---------------------------------------------------------------------------
   7. TABLES
   ------------------------------------------------------------------------ */
.table, table.listtable {
  background: var(--vh-surface) !important;
  color: var(--vh-text) !important;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
  width: 100%;
}
.table > thead > tr > th, table.listtable > thead > tr > th {
  background: var(--vh-surface-3) !important;
  color: var(--vh-text-2) !important;
  border-bottom: 1px solid var(--vh-border) !important;
  border-top: 0 !important;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: var(--vh-s3) var(--vh-s4) !important;
  white-space: nowrap;
  vertical-align: middle;
}
.table > tbody > tr > td, table.listtable > tbody > tr > td {
  border-top: 1px solid var(--vh-border) !important;
  padding: var(--vh-s3) var(--vh-s4) !important;
  vertical-align: middle;
  color: var(--vh-text);
}
.table > tbody > tr:hover > td,
table.listtable > tbody > tr:hover > td {
  background: var(--vh-surface-2) !important;
}
.table-striped > tbody > tr:nth-of-type(odd) { background: transparent !important; }
.table > tbody > tr.vh-row-flagged > td {
  background: var(--vh-danger-soft) !important;
  box-shadow: inset 3px 0 0 var(--vh-danger);
}
/* Money and ids read better aligned and tabular */
.vh-num, .table td.vh-num, .table th.vh-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.vh-id { font-family: var(--vh-font-mono); font-size: 12px; color: var(--vh-text-2); }

/* Wide tables must scroll inside their own container, never the page. */
.table-responsive, .vh-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--vh-r-md);
  border: 0;
}

/* ---------------------------------------------------------------------------
   8. FORMS & FILTERS
   ------------------------------------------------------------------------ */
label, .control-label {
  color: var(--vh-text-2) !important;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: var(--vh-s1);
}
.form-control, .form-control[readonly], select, textarea, input[type="text"],
input[type="email"], input[type="password"], input[type="number"], input[type="search"] {
  background: var(--vh-surface) !important;
  border: 1px solid var(--vh-border-strong) !important;
  border-radius: var(--vh-r-sm) !important;
  box-shadow: none !important;
  color: var(--vh-text) !important;
  font-size: 14px;
  height: auto;
  padding: 9px var(--vh-s3) !important;
  transition: border-color var(--vh-speed) ease, box-shadow var(--vh-speed) ease;
}
.form-control::placeholder { color: var(--vh-text-3); }
.form-control:focus, select:focus, textarea:focus, input:focus {
  border-color: var(--vh-accent) !important;
  box-shadow: var(--vh-focus) !important;
  outline: none;
}
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
  background: var(--vh-surface-3) !important;
  color: var(--vh-text-3) !important;
  cursor: not-allowed;
}
.has-error .form-control { border-color: var(--vh-danger) !important; }
.has-error .help-block, .help-block.text-danger { color: var(--vh-danger) !important; }
.help-block { color: var(--vh-text-3); font-size: 12px; }

/* Filter bar sitting above a table */
.vh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--vh-s3);
  align-items: flex-end;
  padding: var(--vh-s4) var(--vh-s5);
  background: var(--vh-surface-2);
  border-bottom: 1px solid var(--vh-border);
}
.vh-filters .form-group { margin-bottom: 0; }

/* ---------------------------------------------------------------------------
   9. BUTTONS
   ------------------------------------------------------------------------ */
.btn {
  border-radius: var(--vh-r-sm) !important;
  font-size: 14px;
  font-weight: 600;
  padding: 8px var(--vh-s4) !important;
  border: 1px solid transparent;
  box-shadow: var(--vh-shadow-1);
  transition: background var(--vh-speed) ease, border-color var(--vh-speed) ease,
              color var(--vh-speed) ease, box-shadow var(--vh-speed) ease;
}
.btn:focus, .btn:active:focus { outline: none; box-shadow: var(--vh-focus) !important; }

.btn-primary, .btn-greensea, .btn-success {
  background: var(--vh-brand) !important;
  border-color: var(--vh-brand) !important;
  color: var(--vh-brand-contrast) !important;
}
.btn-primary:hover, .btn-greensea:hover, .btn-success:hover {
  background: var(--vh-brand-hover) !important;
  border-color: var(--vh-brand-hover) !important;
}
.btn-primary:active, .btn-greensea:active, .btn-success:active {
  background: var(--vh-brand-active) !important;
}

.btn-default {
  background: var(--vh-surface) !important;
  border-color: var(--vh-border-strong) !important;
  color: var(--vh-text) !important;
}
.btn-default:hover { background: var(--vh-surface-3) !important; }

.btn-danger {
  background: var(--vh-surface) !important;
  border-color: var(--vh-danger-border) !important;
  color: var(--vh-danger) !important;
}
.btn-danger:hover { background: var(--vh-danger-soft) !important; }

.btn-link { box-shadow: none; color: var(--vh-link) !important; }

/* Disabled must look genuinely unavailable — operator actions depend on this. */
.btn[disabled], .btn.disabled, fieldset[disabled] .btn {
  opacity: 1 !important;
  background: var(--vh-surface-3) !important;
  border-color: var(--vh-border) !important;
  color: var(--vh-text-3) !important;
  box-shadow: none;
  cursor: not-allowed;
}

.btn-xs  { padding: 3px var(--vh-s2) !important; font-size: 12px; }
.btn-sm  { padding: 6px var(--vh-s3) !important; font-size: 14px; }
.btn-lg  { padding: 11px var(--vh-s5) !important; font-size: 16px; }

/* ---------------------------------------------------------------------------
   10. STATUS BADGES
   One vocabulary for every lifecycle state across every module.
   ------------------------------------------------------------------------ */
.label, .badge, .vh-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 4px !important;
  font-size: 10.5px !important;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.3;
  padding: 4px 7px !important;
  border: 1px solid transparent;
  text-shadow: none;
  white-space: nowrap;
}
.label-success, .badge-success, .vh-badge--success {
  background: var(--vh-success-soft) !important;
  color: var(--vh-success) !important;
  border-color: var(--vh-success-border) !important;
}
.label-warning, .badge-warning, .vh-badge--warning {
  background: var(--vh-warning-soft) !important;
  color: var(--vh-warning) !important;
  border-color: var(--vh-warning-border) !important;
}
.label-danger, .badge-danger, .bg-lightred, .vh-badge--danger {
  background: var(--vh-danger-soft) !important;
  color: var(--vh-danger) !important;
  border-color: var(--vh-danger-border) !important;
}
.label-info, .badge-info, .vh-badge--info {
  background: var(--vh-info-soft) !important;
  color: var(--vh-info) !important;
  border-color: var(--vh-info-border) !important;
}
.label-default, .badge, .vh-badge--neutral {
  background: var(--vh-neutral-soft) !important;
  color: var(--vh-neutral) !important;
  border-color: var(--vh-neutral-border) !important;
}
.vh-badge--brand { background: var(--vh-accent-soft) !important; color: var(--vh-accent-text) !important; border-color: transparent !important; }
  background: var(--vh-brand-soft) !important;
  color: var(--vh-coral-text) !important;
  border-color: var(--vh-brand-border) !important;
}

/* ---------------------------------------------------------------------------
   11. ALERTS
   ------------------------------------------------------------------------ */
.alert {
  border-radius: var(--vh-r-md) !important;
  border: 1px solid transparent;
  padding: var(--vh-s3) var(--vh-s4) !important;
  font-size: 14px;
  box-shadow: none;
}
.alert-success { background: var(--vh-success-soft) !important; color: var(--vh-success) !important; border-color: var(--vh-success-border) !important; }
.alert-warning { background: var(--vh-warning-soft) !important; color: var(--vh-warning) !important; border-color: var(--vh-warning-border) !important; }
.alert-danger  { background: var(--vh-danger-soft) !important;  color: var(--vh-danger) !important;  border-color: var(--vh-danger-border) !important; }
.alert-info    { background: var(--vh-info-soft) !important;    color: var(--vh-info) !important;    border-color: var(--vh-info-border) !important; }

/* ---------------------------------------------------------------------------
   12. MODALS & DROPDOWNS
   ------------------------------------------------------------------------ */
.modal-content {
  background: var(--vh-surface) !important;
  border: 1px solid var(--vh-border) !important;
  border-radius: var(--vh-r-lg) !important;
  box-shadow: var(--vh-shadow-4) !important;
}
.modal-header {
  border-bottom: 1px solid var(--vh-border) !important;
  padding: var(--vh-s5) !important;
}
.modal-title { font-size: 18px; font-weight: 650; color: var(--vh-text) !important; }
.modal-body { padding: var(--vh-s5) !important; color: var(--vh-text); }
.modal-footer {
  border-top: 1px solid var(--vh-border) !important;
  padding: var(--vh-s4) var(--vh-s5) !important;
  background: var(--vh-surface-2) !important;
}
.modal-backdrop.in { opacity: .55; }

/* A destructive confirmation should look different from a routine one. */
.vh-modal--danger .modal-header {
  background: var(--vh-danger-soft) !important;
  border-bottom-color: var(--vh-danger-border) !important;
}
.vh-modal--danger .modal-title { color: var(--vh-danger) !important; }

.dropdown-menu {
  background: var(--vh-surface) !important;
  border: 1px solid var(--vh-border) !important;
  border-radius: var(--vh-r-md) !important;
  box-shadow: var(--vh-shadow-3) !important;
  padding: var(--vh-s1) !important;
}
.dropdown-menu > li > a {
  color: var(--vh-text) !important;
  border-radius: var(--vh-r-sm);
  padding: 8px var(--vh-s3) !important;
  font-size: 14px;
}
.dropdown-menu > li > a:hover { background: var(--vh-surface-3) !important; }
.dropdown-menu .panel-heading { background: var(--vh-surface-3) !important; }

/* ---------------------------------------------------------------------------
   13. PAGINATION
   ------------------------------------------------------------------------ */
.pagination > li > a, .pagination > li > span {
  background: var(--vh-surface) !important;
  border-color: var(--vh-border) !important;
  color: var(--vh-text-2) !important;
  margin: 0 2px;
  border-radius: var(--vh-r-sm) !important;
  font-size: 14px;
  padding: 6px 11px;
}
.pagination > li > a:hover { background: var(--vh-surface-3) !important; }
.pagination > .active > a, .pagination > .active > span,
.pagination > .active > a:hover {
  background: var(--vh-brand) !important;
  border-color: var(--vh-brand) !important;
  color: var(--vh-brand-contrast) !important;
}
.pagination > .disabled > a, .pagination > .disabled > span {
  background: var(--vh-surface-3) !important;
  color: var(--vh-text-3) !important;
}

/* ---------------------------------------------------------------------------
   14. EMPTY / LOADING / ERROR STATES
   Missing across the panel today — defined here so modules can adopt them.
   ------------------------------------------------------------------------ */
.vh-state {
  text-align: center;
  padding: var(--vh-s10) var(--vh-s5);
  color: var(--vh-text-2);
}
.vh-state__icon {
  width: 48px; height: 48px;
  margin: 0 auto var(--vh-s4);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--vh-r-md);
  background: var(--vh-surface-3);
  color: var(--vh-text-3);
  font-size: 22px;
}
.vh-state__title { font-size: 16px; font-weight: 650; color: var(--vh-text); margin-bottom: var(--vh-s2); }
.vh-state__body  { font-size: 14px; color: var(--vh-text-3); max-width: 420px; margin: 0 auto var(--vh-s4); }
.vh-state--error .vh-state__icon { background: var(--vh-danger-soft); color: var(--vh-danger); }

/* Skeleton rows while a table loads */
.vh-skeleton {
  background: linear-gradient(90deg,
    var(--vh-surface-3) 25%, var(--vh-surface-2) 37%, var(--vh-surface-3) 63%);
  background-size: 400% 100%;
  animation: vh-shimmer 1.3s ease-in-out infinite;
  border-radius: var(--vh-r-sm);
  height: 12px;
}
@keyframes vh-shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .vh-skeleton { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------------------------------------------------------------------------
   15. LOGIN
   ------------------------------------------------------------------------ */
body.vh-login, .vh-login-shell { background: var(--vh-bg) !important; }

/* The Minovate shell makes <body> a flex row for the sidebar layout, which
   leaves the login wrapper stuck at its content width (~327px) hard against the
   left edge. On the login state only, return the shell to normal block flow so
   the card can actually centre. Scoped with :has() so authenticated pages keep
   the flex shell untouched. */
body:has(.page-login) { display: block !important; }
body:has(.page-login) > div,
body:has(.page-login) #wrap { width: 100% !important; }

/* The login state renders into `.page-core.page-login`. Centre on that wrapper
   rather than relying on auto margins — Bootstrap's `.container` width rules
   and the template's own `w-420` fight each other otherwise. */
/* Promoted to its own full-viewport layer. The login state sits several
   unstyled wrappers deep inside #wrap, none of which carry a width, so any
   flow-based centring inherits a shrink-to-fit box. Taking it out of flow is
   both simpler and immune to whatever the template nests around it. */
.page-login {
  position: fixed !important;
  top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
  width: auto !important;
  max-width: none !important;
  z-index: 10;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--vh-s6);
  background: var(--vh-bg);
}
.page-login > * { width: 100%; max-width: 420px; }

.page-login .container.w-420,
.container.w-420 {
  background: var(--vh-surface);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-r-lg);
  box-shadow: var(--vh-shadow-3);
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 420px !important;
  padding: var(--vh-s8) var(--vh-s6) !important;
  float: none !important;
}
.container.w-420 .panel { border: 0 !important; box-shadow: none !important; margin: 0; }
.form-control.underline-input {
  background: var(--vh-surface) !important;
  border: 1px solid var(--vh-border-strong) !important;
  border-radius: var(--vh-r-sm) !important;
}
.form-actions.d-flex { display: flex; gap: var(--vh-s3); align-items: center; }
/* main.css hard-codes BLACK login placeholders (`.page-login input::-webkit-input-placeholder`), unreadable in the dark theme and
   a hard-coded colour (D-422). Use the token; two separate rules because an unknown vendor pseudo drops a whole selector list. */
.page-login input::-webkit-input-placeholder { color: var(--vh-text-3) !important; }
.page-login input::placeholder { color: var(--vh-text-3) !important; }

/* ---------------------------------------------------------------------------
   16. THEME TOGGLE
   ------------------------------------------------------------------------ */
.vh-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--vh-surface-3);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-r-pill);
  color: var(--vh-text-2);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  padding: 7px 13px;
  transition: background var(--vh-speed) ease, color var(--vh-speed) ease;
}
.vh-theme-toggle:hover { background: var(--vh-brand-soft); color: var(--vh-coral-text); }
.vh-theme-toggle:focus-visible { outline: none; box-shadow: var(--vh-focus); }
.vh-theme-toggle__icon { font-size: 14px; line-height: 1; }
html[data-theme="dark"] .vh-theme-toggle__label::after { content: "Light"; }
.vh-theme-toggle__label::after { content: "Dark"; }

/* ---------------------------------------------------------------------------
   17. RESPONSIVE
   ------------------------------------------------------------------------ */
@media (max-width: 1199px) {
  #content, .content { padding: var(--vh-s5) !important; }
  .vh-stat__value { font-size: 22px; }
}
@media (max-width: 991px) {
  #content, .content { padding: var(--vh-s4) !important; }
  .vh-filters { padding: var(--vh-s3); }
  .panel-heading, .panel-body { padding: var(--vh-s4) !important; }
  .table > thead > tr > th, .table > tbody > tr > td { padding: var(--vh-s2) var(--vh-s3) !important; }
}
@media (max-width: 767px) {
  h1 { font-size: 22px; } h2 { font-size: 22px; }
  .vh-stat__value { font-size: 22px; }
  .container.w-420 { margin-top: var(--vh-s6) !important; }
  /* the page itself must never scroll sideways */
  body { overflow-x: hidden; }
}

/* ---------------------------------------------------------------------------
   18. ACCESSIBILITY
   ------------------------------------------------------------------------ */
:focus-visible { outline: none; box-shadow: var(--vh-focus); border-radius: var(--vh-r-sm); }
.vh-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.vh-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 10000;
  background: var(--vh-brand); color: var(--vh-brand-contrast);
  padding: var(--vh-s2) var(--vh-s4); border-radius: 0 0 var(--vh-r-sm) 0;
}
.vh-skip-link:focus { left: 0; color: var(--vh-brand-contrast); }

/* ---------------------------------------------------------------------------
   19. DASHBOARD STAT TILES  (approved Codex Admin V2 direction)
   ----------------------------------------------------------------------------
   The template paints each dashboard tile with a saturated fill
   (`.front.bg-greensea`, `.bg-lightred`, `.bg-blue`, `.bg-green`, `.bg-warning`,
   `.bg-dutch`, `.bg-lightblue6`). Twenty of them side by side is a colour wall:
   nothing is emphasised, and colour carries no meaning because every tile has a
   different one for decorative reasons.

   The approved system uses a neutral stat card and spends colour only where it
   means something. Scoped to `.feature-box-container` so the same `bg-*` classes
   used elsewhere (e.g. the pending-provider count badge in the header) keep
   their semantic treatment.
   ------------------------------------------------------------------------ */
.feature-box-container .card .front[class*="bg-"] {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--vh-text) !important;
  padding: var(--vh-s5) !important;
}

/* Label */
.feature-box-container .card .front span {
  color: var(--vh-text-2) !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Value */
.feature-box-container .card .front p.text-elg,
.feature-box-container .card .front .text-elg {
  color: var(--vh-text) !important;
  font-size: 28px !important;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

/* Secondary lines inside the tile */
.feature-box-container .card .front .whole_pride,
.feature-box-container .card .front small,
.feature-box-container .card .front p:not(.text-elg) {
  color: var(--vh-text-3) !important;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

/* The icon is the only place colour is spent, and it keeps the tile's original
   semantic intent rather than being flattened away. */
.feature-box-container .card .front .user-sec i,
.feature-box-container .card .front i.fa {
  font-size: 18px;
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--vh-r-md);
  background: var(--vh-surface-3);
  color: var(--vh-text-2);
}
.feature-box-container .card .front.bg-green i.fa,
.feature-box-container .card .front.bg-greensea i.fa {
  background: var(--vh-success-soft); color: var(--vh-success);
}
.feature-box-container .card .front.bg-warning i.fa,
.feature-box-container .card .front.bg-dutch i.fa {
  background: var(--vh-warning-soft); color: var(--vh-warning);
}
.feature-box-container .card .front.bg-lightred i.fa {
  background: var(--vh-danger-soft); color: var(--vh-danger);
}
.feature-box-container .card .front.bg-blue i.fa,
.feature-box-container .card .front.bg-lightblue6 i.fa {
  background: var(--vh-info-soft); color: var(--vh-info);
}

/* "More info" footer link */
.feature-box-container .card .front a,
.feature-box-container .card a {
  color: var(--vh-link) !important;
  font-size: 12px;
  font-weight: 600;
}
.feature-box-container .card .front a i { background: none; color: inherit; width: auto; height: auto; }

/* ---------------------------------------------------------------------------
   20. SIDEBAR NAVIGATION — beating the template's colour "schemes"
   ----------------------------------------------------------------------------
   `main.css` colours the rail through scheme classes on BOTH the body
   (`.scheme-default`, `.black-scheme-color`) and the aside (`.scheme-black`),
   with rules like `#sidebar.scheme-black #navigation > li > a { color: rgba(255,
   255,255,.2) }`. Against the approved light rail that is white-on-white: the
   labels were invisible, and the active item kept the template's orange fill.

   These selectors carry an id + class (or id + id) so they match the template's
   specificity, and this sheet loads last so the tie resolves here. Every
   scheme variant is covered at once rather than chasing them individually.

   NOTE: the body also carries `sidebar-xs` when the operator collapses the rail
   to icons. That is a real template feature, not a defect — labels are meant to
   be hidden in that state, so nothing here forces them back on.
   ------------------------------------------------------------------------ */
#sidebar[class] #navigation a,
#sidebar[class] #navigation > li > a,
#sidebar[class] #navigation li a span,
#sidebar[class] .sidebar-nav a,
#sidebar[class] a.accordion-toggle {
  color: var(--vh-sidebar-fg) !important;
  font-family: var(--vh-font) !important;
  font-size: 14px;
  font-weight: 500;
}

#sidebar[class] #navigation a i,
#sidebar[class] .sidebar-nav a i {
  color: var(--vh-text-3) !important;
  opacity: 1;
}

#sidebar[class] #navigation a:hover,
#sidebar[class] #navigation > li > a:hover,
#sidebar[class] #navigation a:hover span,
#sidebar[class] a.accordion-toggle:hover {
  background-color: var(--vh-surface-3) !important;
  color: var(--vh-sidebar-fg-hi) !important;
}
#sidebar[class] #navigation a:hover i { color: var(--vh-sidebar-fg-hi) !important; }

/* Active route — brand-tinted, not the template's orange slab. */
#sidebar[class] #navigation > li.active > a,
#sidebar[class] #navigation li.active > a,
#sidebar[class] #navigation > li.active > a span,
#sidebar[class] .sidebar-nav li.active > a {
  background: var(--vh-sidebar-active) !important;
  background-color: var(--vh-sidebar-active) !important;
  background-image: none !important;
  color: var(--vh-coral-text) !important;
  font-weight: 600;
  border-radius: var(--vh-r-sm);
}
#sidebar[class] #navigation > li.active > a i,
#sidebar[class] #navigation li.active > a i { color: var(--vh-coral-text) !important; }

/* Section captions inside the rail. */
#sidebar[class] #navigation .nav-header,
#sidebar[class] .nav-header {
  color: var(--vh-text-3) !important;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

/* Header controls sit on a light surface now, so the template's white-on-dark
   treatment has to go with them. */
#header[class] .nav-left > li > a,
#header[class] .nav-right > li > a,
#header[class] a.dropdown-toggle,
#header[class] .nav-right > li > a span {
  color: var(--vh-text-2) !important;
}
#header[class] .nav-left > li > a:hover,
#header[class] .nav-right > li > a:hover,
#header[class] a.dropdown-toggle:hover {
  background-color: var(--vh-surface-3) !important;
  color: var(--vh-text) !important;
}

/* ---------------------------------------------------------------------------
   21. SHELL LAYOUT — content offset and stray page backgrounds
   ----------------------------------------------------------------------------
   Two real layout defects found by measuring the authenticated Dashboard, not
   by looking at it:

   1. `#sidebar` is `position: fixed` at 236px, but `#content` sat at x=0 with no
      left offset, so the rail covered the first ~236px of every screen. The
      template's own offset was tied to its 250px rail and did not follow the
      approved width.

   2. `.page.page-dashboard` painted `rgb(76,76,76)` — a leftover dark slab from
      the template's scheme system showing through behind the cards.
   ------------------------------------------------------------------------ */
body.aside-fixed #content,
body.appWrapper #content {
  margin-left: var(--vh-sidebar-width) !important;
  transition: margin-left var(--vh-speed) ease;
}

/* Collapsed rail ("icons only"): the template stamps `sidebar-xs` on the body. */
body.sidebar-xs #sidebar[class] { width: 64px !important; }
body.sidebar-xs #content { margin-left: 64px !important; }

/* Below the template's desktop breakpoint the rail goes off-canvas, so the
   content must reclaim the full width instead of keeping a phantom gutter. */
@media (max-width: 991px) {
  body.aside-fixed #content,
  body.appWrapper #content,
  body.sidebar-xs #content {
    margin-left: 0 !important;
  }
  #sidebar[class] { z-index: 1030; }
}

/* Page wrappers must not paint their own background over the app surface. */
.page,
.page-dashboard,
.dashboar-landing,
#content > .page,
#content .page[class] {
  background: transparent !important;
  background-color: transparent !important;
}

/* ---------------------------------------------------------------------------
   22. CHARTS — never let a canvas widen the page
   ----------------------------------------------------------------------------
   flot sizes its canvases in pixels at draw time. When the shell layout changes
   (the content offset added above), an already-drawn chart keeps its old width
   and pushes the whole document sideways — measured at 1440px viewport vs a
   1668px scrollWidth. One chart recovered on `resize`, a second did not.

   The approved system's rule is that wide content scrolls inside its own
   container and the page itself never scrolls horizontally, so the container is
   constrained rather than relying on every chart redrawing correctly.
   ------------------------------------------------------------------------ */
.flot-chart, .flot-container, .chart-holder,
[class*="flot"], .panel-body > div:has(> canvas.flot-base) {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
canvas.flot-base, canvas.flot-overlay { max-width: 100%; }

/* Belt and braces: the document itself must not scroll sideways. */
html, body { overflow-x: hidden; }

/* ---------------------------------------------------------------------------
   23. WIDE OPERATOR TABLES — scroll in their own box, never clip
   ----------------------------------------------------------------------------
   The Providers and Clients lists render an 11-column `table.listtable` at
   ~1331px inside a 1101px `.tile-body`, with `overflow-x: visible` all the way
   up. Before section 21 that pushed the whole page sideways; after the
   page-level `overflow-x: hidden` it did something worse — the right-hand
   columns were silently CLIPPED, so an operator could not reach them at all and
   nothing indicated they existed.

   The approved rule is explicit: wide content scrolls inside its own container
   and the page never scrolls horizontally. `.tile-body` and the custom-table
   directive's own box become the scroll container.
   ------------------------------------------------------------------------ */
custom-table .tile-body,
custom-table,
.tile > .tile-body,
.tile-body.p-0 {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Keep the identifier column readable while the rest scrolls. */
table.listtable > thead > tr > th:first-child,
table.listtable > tbody > tr > td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--vh-surface);
}
table.listtable > thead > tr > th:first-child { background: var(--vh-surface-3); }
table.listtable > tbody > tr:hover > td:first-child { background: var(--vh-surface-2); }

/* ---------------------------------------------------------------------------
   24. COLLAPSED RAIL — keep it a painted surface
   ----------------------------------------------------------------------------
   The template forces the rail transparent while collapsed:
     `.sidebar-sm #sidebar.scheme-black, .sidebar-xs #sidebar.scheme-black
        { background-color: transparent !important }`
   That is class+id+class specificity. It was written for a dark shell where a
   transparent rail simply showed dark page behind it; against the approved
   light/dark surfaces it leaves the collapsed rail unpainted, so the icons float
   on the page background with no edge. Matched at equal specificity.
   ------------------------------------------------------------------------ */
body.sidebar-xs #sidebar[class],
body.sidebar-sm #sidebar[class],
body.sidebar-xs #sidebar[class] #navigation,
body.sidebar-sm #sidebar[class] #navigation {
  background: var(--vh-sidebar-bg) !important;
  background-color: var(--vh-sidebar-bg) !important;
  border-right: 1px solid var(--vh-border) !important;
}

/* ---------------------------------------------------------------------------
   25. `.tile` — the list-screen card the panel rules never reached
   ----------------------------------------------------------------------------
   Providers, Clients, Bookings and the other list modules wrap their tables in
   `section.tile` + `.tile-header` + `.tile-body`, NOT in `.panel`. Section 5
   styled panels only, so every list screen kept the template's card treatment
   while the dashboard looked correct. Same contract as .panel.
   ------------------------------------------------------------------------ */
.tile {
  background: var(--vh-surface) !important;
  /* The template sets `.tile { color: #e7e7e7 }` for a dark card. Taking the
     background without taking the colour left near-white text on a white
     surface wherever a screen puts text directly on .tile rather than inside
     .tile-body -- the Financial Alerts labels measured 1.24:1. */
  color: var(--vh-text) !important;
  border: 1px solid var(--vh-border) !important;
  border-radius: var(--vh-r-lg) !important;
  box-shadow: var(--vh-shadow-2) !important;
  overflow: hidden;
  margin-bottom: var(--vh-s5);
  /* main.css .tile also sets `font-family: system-ui` and
     `letter-spacing: 1px`, with no !important. Every list table, form control
     and button lives inside a .tile, so the whole content area fell back to the
     platform font and inherited 1px tracking while the page header and
     breadcrumb (outside .tile) correctly used the token font -- two different
     typefaces on one screen. Same specificity, later stylesheet, so this wins
     on cascade order without another !important. */
  font-family: var(--vh-font);
  letter-spacing: normal;
}
.tile-header {
  background: var(--vh-surface) !important;
  border-bottom: 1px solid var(--vh-border) !important;
  color: var(--vh-text) !important;
  padding: var(--vh-s4) var(--vh-s5) !important;
  font-family: var(--vh-font-heading);
  font-weight: 600;
  font-size: 16px;
}
.tile-header h1, .tile-header h2, .tile-header h3,
.tile-header .tile-title { color: var(--vh-text) !important; margin: 0; }
.tile-body { background: var(--vh-surface) !important; color: var(--vh-text); }
.tile-footer {
  background: var(--vh-surface-2) !important;
  border-top: 1px solid var(--vh-border) !important;
  color: var(--vh-text-2) !important;
}

/* ---------------------------------------------------------------------------
   26. REMAINING BOOTSTRAP BUTTON VARIANTS
   `.btn-info` and `.btn-warning` were not covered by section 9 and kept the
   template's flat grey / orange fills, which read as a different design system
   sitting next to the restyled controls.
   ------------------------------------------------------------------------ */
.btn-info, .btn-warning {
  background: var(--vh-surface) !important;
  background-image: none !important;
  border-color: var(--vh-border-strong) !important;
  color: var(--vh-text) !important;
}
.btn-info:hover, .btn-warning:hover {
  background: var(--vh-surface-3) !important;
}

/* The template's rounded/effect button skins carry their own gradients. */
.btn-rounded { border-radius: var(--vh-r-pill) !important; }
.btn-ef, [class*="btn-ef-"] { background-image: none !important; }

/* ==========================================================================
   27. SUSPEND / REACTIVATE MODAL

   The operator has to be able to tell this apart from Delete at a glance. The
   whole reason this modal exists is that a control labelled "Suspend" was
   wired to an endpoint that cancelled bookings and hid an account's history,
   and nothing on screen said so.

   So: amber (or green) rather than the delete modal's red, a two-column
   does/does-not panel that is always visible rather than prose, and a confirm
   button that stays disabled until a reason has been typed.
   ========================================================================== */

.vh-account-modal-window .modal-dialog { width: 640px; max-width: 94vw; }
.vh-account-modal-window .modal-content {
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-r-lg);
  box-shadow: var(--vh-shadow-3, 0 18px 48px rgba(33, 36, 61, .18));
  overflow: hidden;
}

.vh-account-modal__header {
  padding: var(--vh-s5) var(--vh-s6);
  border-bottom: 1px solid var(--vh-border);
}
.vh-account-modal__header .modal-title { margin: 0; font-size: 18px; color: var(--vh-text); }
.vh-account-modal__header .fa { margin-right: var(--vh-s2); }

/* The accent is the whole point: one glance separates pause from destroy. */
.vh-account-modal--suspend .vh-account-modal__header {
  background: var(--vh2-callout-bg, #F8FAFC);
  border-bottom-color: var(--vh-border);
  border-left: 4px solid var(--vh-warning);
}
.vh-account-modal--suspend .vh-account-modal__header .modal-title { color: var(--vh-warning); }

.vh-account-modal--reactivate .vh-account-modal__header {
  background: var(--vh-success-soft);
  border-bottom-color: var(--vh-success-border);
}
.vh-account-modal--reactivate .vh-account-modal__header .modal-title { color: var(--vh-success); }

.vh-account-modal__body { padding: var(--vh-s6); background: var(--vh-surface); }

.vh-account-modal__subject { font-size: 16px; color: var(--vh-text); margin-bottom: var(--vh-s5); }
.vh-account-modal__subject strong { color: var(--vh-text); }
.vh-account-modal__kind { color: var(--vh-text-2); }

.vh-account-modal__effects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--vh-s4);
  margin-bottom: var(--vh-s5);
}
@media (max-width: 620px) {
  .vh-account-modal__effects { grid-template-columns: 1fr; }
}

.vh-effect {
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-r-md);
  padding: var(--vh-s4);
  background: var(--vh2-callout-bg, var(--vh-surface-2));
}
.vh-effect h5 {
  margin: 0 0 var(--vh-s2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--vh-text-2);
}
.vh-effect ul { margin: 0; padding-left: 18px; }
.vh-effect li { font-size: 14px; line-height: 1.55; color: var(--vh-text); }

.vh-effect--does {
  border-color: var(--vh-border);
  border-left: 4px solid var(--vh-warning);
  background: var(--vh2-callout-bg, #F8FAFC);
}
.vh-effect--does h5 { color: var(--vh-warning); }
.vh-account-modal--reactivate .vh-effect--does {
  border-color: var(--vh-success-border);
  background: var(--vh-success-soft);
}
.vh-account-modal--reactivate .vh-effect--does h5 { color: var(--vh-success); }

.vh-effect--doesnt { border-color: var(--vh-border); }

.vh-account-modal__reversible {
  font-size: 14px;
  color: var(--vh-success);
  background: var(--vh-success-soft);
  border: 1px solid var(--vh-success-border);
  border-radius: var(--vh-r-md);
  padding: var(--vh-s3) var(--vh-s4);
  margin-bottom: var(--vh-s5);
}
.vh-account-modal__reversible .fa { margin-right: var(--vh-s2); }
/* Money confirm dialog refusal (wrong password, etc.): an error, never the green success look. */
.vh-account-modal__reversible.vh-mc-error { color: var(--vh-danger); background: var(--vh-danger-soft); border-color: var(--vh-danger-border); }
/* Payout after a partial refund: a warning, not a safe/reversible note (D-506). */
.vh-account-modal__reversible.vh-prc-note { color: var(--vh-warning); background: transparent; border-color: var(--vh-warning-border); }

.vh-account-modal__reason label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--vh-text);
  margin-bottom: var(--vh-s2);
}
.vh-account-modal__reason .vh-required { color: var(--vh-danger); font-weight: 500; }
.vh-account-modal__reason textarea.form-control {
  width: 100%;
  border: 1px solid var(--vh-border-strong);
  border-radius: var(--vh-r-md);
  padding: var(--vh-s3);
  font-size: 14px;
  color: var(--vh-text);
  background: var(--vh-surface);
  resize: vertical;
}
.vh-account-modal__reason textarea.form-control:focus {
  border-color: var(--vh-accent);
  box-shadow: 0 0 0 3px var(--vh-accent-soft);
  outline: none;
}
.vh-account-modal__hint { margin: var(--vh-s2) 0 0; font-size: 12px; color: var(--vh-text-2); }

.vh-account-modal__footer {
  padding: var(--vh-s4) var(--vh-s6);
  border-top: 1px solid var(--vh-border);
  background: var(--vh-surface-2);
}

.vh-account-modal__confirm {
  border: 1px solid transparent;
  border-radius: var(--vh-r-md);
  font-weight: 600;
  color: var(--vh-text-inverse) !important;   /* sits on --vh-warning / --vh-success fills, NOT on the orange primary fill */
  background-image: none !important;
}
.vh-account-modal--suspend .vh-account-modal__confirm { background: var(--vh-warning) !important; }
.vh-account-modal--reactivate .vh-account-modal__confirm { background: var(--vh-success) !important; }
.vh-account-modal__confirm[disabled] { opacity: .5; cursor: not-allowed; }

/* Report-resolution modal's summary list (target/reason/details/date). */
.vh-report-detail {
  margin: 0 0 var(--vh-s5);
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--vh-s2) var(--vh-s4);
}
.vh-report-detail dt { font-size: 12px; font-weight: 600; color: var(--vh-text-2); white-space: nowrap; }
.vh-report-detail dd { margin: 0; font-size: 14px; color: var(--vh-text); }
.vh-report-detail__text { white-space: pre-wrap; word-break: break-word; }

/* Review Reports triage list. */
.vh-report-filters { padding: var(--vh-s4) var(--vh-s6); display: flex; align-items: center; flex-wrap: wrap; gap: var(--vh-s2); }
.vh-report-state { padding: var(--vh-s6); text-align: center; color: var(--vh-text-2); }
.vh-report-state--error { color: var(--vh-danger); }
.vh-report-pagination { padding: var(--vh-s4) var(--vh-s6); display: flex; align-items: center; gap: var(--vh-s3); }

/* Row actions: the reversible pair must never read as "another delete". */
.btn-warning.btn-rounded > .fa-pause,
.btn-success.btn-rounded > .fa-play { margin-right: 4px; }


/* ==========================================================================
   28. BOOKING DETAIL — OPERATOR CONTROL CENTRE

   Sits above the legacy detail tabs. Compact operations density: an operator
   should be able to answer "where is the money, is the provider payable, what
   went wrong, who touched this" without scrolling past a thousand lines of
   form.

   The stage list is the important part visually. Each of the seven money
   facts gets its own row with its own state, so nothing reads as a single
   "paid / not paid" binary.
   ========================================================================== */

.vh-ops {
  margin: 0 0 var(--vh-s6);
  font-size: 14px;
  color: var(--vh-text);
}

.vh-ops__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--vh-s3);
  padding: var(--vh-s4) var(--vh-s5);
  background: var(--vh-surface);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-r-lg) var(--vh-r-lg) 0 0;
  border-bottom: none;
}
.vh-ops__id { margin-right: auto; }
.vh-ops__label {
  display: block;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--vh-text-2);
}
.vh-ops__id strong { font-size: 18px; color: var(--vh-text); }
.vh-ops__badges { display: flex; flex-wrap: wrap; gap: var(--vh-s2); }

.vh-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--vh-r-pill);
  border: 1px solid var(--vh-neutral-border);
  background: var(--vh-neutral-soft);
  color: var(--vh-text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.vh-badge--sm { font-size: 12px; padding: 1px 8px; }
.vh-badge--lifecycle {
  border-color: var(--vh-brand-border);
  background: var(--vh-brand-soft);
  color: var(--vh-coral-text);
}
.vh-badge--warn {
  border-color: var(--vh-warning-border);
  background: var(--vh-warning-soft);
  color: var(--vh-warning);
}
.vh-badge--ok {
  border-color: var(--vh-success-border);
  background: var(--vh-success-soft);
  color: var(--vh-success);
}

.vh-ops__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--vh-border);
  border: 1px solid var(--vh-border);
  border-radius: 0 0 var(--vh-r-lg) var(--vh-r-lg);
  overflow: hidden;
}
.vh-ops__card { background: var(--vh-surface); padding: var(--vh-s4) var(--vh-s5); min-width: 0; }
.vh-ops__card--wide { grid-column: 1 / -1; }
@media (max-width: 1100px) { .vh-ops__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .vh-ops__grid { grid-template-columns: minmax(0, 1fr); } }

.vh-ops__title {
  margin: 0 0 var(--vh-s3);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--vh-text-2);
}
.vh-ops__hint { margin: 0 0 var(--vh-s3); font-size: 12px; color: var(--vh-text-2); }
.vh-ops__empty { margin: 0; font-size: 14px; color: var(--vh-text-2); font-style: italic; }
.vh-ops__note { color: var(--vh-text-2); font-size: 12px; }
.vh-ops__missing { color: var(--vh-text-2); font-style: italic; }
.vh-ops__foot { margin: var(--vh-s3) 0 0; font-size: 12px; color: var(--vh-text-2); }

/* Money ------------------------------------------------------------------ */
.vh-ops__table { width: 100%; border-collapse: collapse; }
.vh-ops__table th,
.vh-ops__table td {
  padding: 6px 10px 6px 0;
  text-align: left;
  font-weight: 400;
  vertical-align: top;
  border-bottom: 1px solid var(--vh-border);
}
.vh-ops__table tr:last-child th,
.vh-ops__table tr:last-child td { border-bottom: none; }
.vh-ops__amt { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 1%; }
.vh-ops__row--emph th, .vh-ops__row--emph td { font-weight: 700; color: var(--vh-text); }
.vh-ops__row--danger td.vh-ops__amt { color: var(--vh-danger); }
.vh-ops__derived {
  margin-left: 6px;
  padding: 0 6px;
  border-radius: var(--vh-r-pill);
  background: var(--vh-neutral-soft);
  color: var(--vh-text-2);
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.vh-ops__table--grid thead th {
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--vh-text-2);
  font-weight: 600;
}
.vh-ops__scroll { overflow-x: auto; }

/* The seven distinctions ------------------------------------------------- */
.vh-ops__stages { list-style: none; margin: 0; padding: 0; }
.vh-stage {
  display: grid;
  grid-template-columns: 12px 180px 90px minmax(0, 1fr);
  align-items: baseline;
  gap: var(--vh-s3);
  padding: 7px 0;
  border-bottom: 1px solid var(--vh-border);
}
.vh-stage:last-child { border-bottom: none; }
@media (max-width: 760px) {
  .vh-stage { grid-template-columns: 12px minmax(0, 1fr); }
  .vh-stage__detail { grid-column: 2; }
}
.vh-stage__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--vh-neutral-border);
  align-self: center;
}
.vh-stage__label { font-weight: 600; }
.vh-stage__state {
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--vh-text-2);
}
.vh-stage__detail { color: var(--vh-text-2); font-size: 12px; }

.vh-stage--yes     .vh-stage__dot   { background: var(--vh-success); }
.vh-stage--yes     .vh-stage__state { color: var(--vh-success); }
.vh-stage--no      .vh-stage__dot   { background: var(--vh-neutral-border); }
.vh-stage--unknown .vh-stage__dot   { background: var(--vh-warning); }
.vh-stage--unknown .vh-stage__state { color: var(--vh-warning); }

/* References, readiness, exceptions, history ------------------------------ */
.vh-ops__refs,
.vh-ops__exceptions,
.vh-ops__history,
.vh-ops__reasons { list-style: none; margin: 0; padding: 0; }
.vh-ops__refs li,
.vh-ops__exceptions li,
.vh-ops__history li {
  padding: 6px 0;
  border-bottom: 1px solid var(--vh-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--vh-s2);
  align-items: baseline;
}
.vh-ops__refs li:last-child,
.vh-ops__exceptions li:last-child,
.vh-ops__history li:last-child { border-bottom: none; }
/* Field names, not labels — shown verbatim so an operator can match them
   against the record. Never uppercased: stripePaymentIntentId is unreadable
   as STRIPEPAYMENTINTENTID. */
.vh-ops__refkind {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--vh-text-2);
  min-width: 150px;
}
/* Bootstrap 3 paints bare <code> crimson on pink, which reads as an error
   next to financial references. Take the colour too, not just the ground. */
.vh-ops code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--vh-text);
  background: var(--vh-surface-3);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-r-sm);
  padding: 1px 6px;
  word-break: break-all;
}
.vh-ops__when { color: var(--vh-text-2); font-size: 12px; white-space: nowrap; }
.vh-ops__who { font-weight: 600; }

.vh-ops__reasons li {
  padding: 2px 0 2px 14px;
  position: relative;
  color: var(--vh-warning);
  font-size: 12px;
}
.vh-ops__reasons li::before { content: "•"; position: absolute; left: 2px; }

.vh-verdict {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--vh-r-pill);
  font-weight: 700;
  font-size: 12px;
  margin-bottom: var(--vh-s2);
}
.vh-verdict--ok {
  background: var(--vh-success-soft);
  border: 1px solid var(--vh-success-border);
  color: var(--vh-success);
}
.vh-verdict--warn {
  background: var(--vh-warning-soft);
  border: 1px solid var(--vh-warning-border);
  color: var(--vh-warning);
}

.vh-ops__kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--vh-s3); margin: var(--vh-s2) 0 0; }
.vh-ops__kv dt { color: var(--vh-text-2); font-size: 12px; }
.vh-ops__kv dd { margin: 0; font-size: 12px; word-break: break-word; }

/* Ledger totals strip under the transaction trail. Sums only — the copy says
   so, and the styling deliberately does not look like a settlement summary. */
.vh-ops__ledger {
  margin-top: var(--vh-s3);
  padding-top: var(--vh-s3);
  border-top: 1px solid var(--vh-border);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--vh-s2) var(--vh-s4);
}
.vh-ops__ledgerlabel {
  font-size: 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--vh-text-2);
}
.vh-ops__ledgeritem { font-size: 12px; color: var(--vh-text-2); white-space: nowrap; }
.vh-ops__ledgeritem strong { color: var(--vh-text); font-variant-numeric: tabular-nums; }
.vh-ops__ledgeritem em { font-style: normal; opacity: .7; }
.vh-ops__ledger .vh-ops__note { flex-basis: 100%; margin: 0; }

/* Severity emphasis for count tiles. Replaces inline #e8381b, which could not
   respond to the theme and was being overridden by the heading rules anyway. */
.vh-count--risk    { color: var(--vh-danger) !important; }
.vh-count--neutral { color: var(--vh-text-2) !important; }
.vh-muted          { color: var(--vh-text-2) !important; }

/* ---------------------------------------------------------------------------
   Template `bg-*` utilities used AS BUTTON SKINS

   `bg-blue` and friends set a colour and a background together. The button
   rules in §5 replaced the background and left the near-white colour behind,
   so `.btn.bg-blue` painted white text on a transparent ground — the "Export
   Review" toolbar action measured 1.13:1 and was effectively invisible.

   `bg-lightred` already resolves through the danger mapping, so only the
   variants that actually appear on buttons and have no mapping are handled.
   ------------------------------------------------------------------------ */
/* brand polish 2026-10-25: the toolbar `bg-blue` skin (Export ...) is the WHITE secondary button - no blue / slate slab */
.btn.bg-blue,
.btn.bg-blue:hover,
.btn.bg-blue:focus,
.btn.bg-blue:active {
  background: var(--vh2-action-blue-bg, #FFFFFF) !important;
  background-image: none !important;
  border-color: transparent !important;
  color: var(--vh2-action-blue-fg, #0E1535) !important;
  box-shadow: inset 0 0 0 1px var(--vh-border-strong), var(--vh-shadow-1) !important;
}
.btn.bg-blue:hover { background: var(--vh2-action-blue-bg-hover, #F1EFEB) !important; filter: none; }
.btn.bg-blue span,
.btn.bg-blue i { color: inherit !important; }

/* ==========================================================================
   29. DETAIL-SCREEN COMPONENTS THE PANEL RULES NEVER REACHED

   Provider Detail, Client Detail and Booking Detail are built from components
   the template styled for a DARK card. Repainting the card white without
   taking their colours left text that measured between 1.00:1 and 2.62:1 —
   tab labels, section subtitles, form hints and any status chip whose value
   the markup's ng-class did not enumerate.
   ========================================================================== */

/* Tabs -------------------------------------------------------------------
   `.nav-tabs > li > a` inherited #dddddd, and the active tab was pure red
   (255,2,2) — off-palette and reading as an error rather than a selection. */
.nav-tabs {
  border-bottom: 1px solid var(--vh-border) !important;
  margin-bottom: var(--vh-s5);
}
.nav-tabs > li > a {
  color: var(--vh-text-2) !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: var(--vh-s3) var(--vh-s4) !important;
  font-weight: 600;
}
.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus {
  color: var(--vh-text) !important;
  background: var(--vh-surface-2) !important;
  border-bottom-color: var(--vh-border-strong) !important;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  color: var(--vh-coral-text) !important;
  background: transparent !important;
  border-bottom-color: var(--vh-brand) !important;
}

/* Section subtitles ------------------------------------------------------ */
.form-group.legend p,
.legend p {
  color: var(--vh-text-2) !important;
  border-bottom-color: var(--vh-border) !important;
}
.form-group.legend > label,
.legend > label { color: var(--vh-text) !important; }

/* Form hints -------------------------------------------------------------
   `.help-block { color: #ffffff }` made every hint invisible on the light
   surface. The error state is a class now, so both states are owned here. */
.help-block { color: var(--vh-text-2) !important; }
.help-block.vh-hint--error,
.vh-hint--error { color: var(--vh-danger) !important; }

/* Status chips -----------------------------------------------------------
   Bootstrap's bare `.label` is white-on-nothing. Markup that enumerates only
   some statuses in its ng-class (the Transactions list has no branch for
   `refunded`) left those values rendered as invisible text. Give the bare
   label a neutral chip so an unenumerated status still reads. */
.label {
  border-radius: var(--vh-r-pill);
  font-weight: 600;
  padding: 3px 10px;
}
.label:not([class*="label-"]) {
  color: var(--vh-text-2) !important;
  background: var(--vh-neutral-soft) !important;
  border: 1px solid var(--vh-neutral-border);
}

/* ==========================================================================
   30. LEGACY DETAIL BLOCKS

   `.user-detail`, `.tasker-detail`, `.task-detail`, `.payment-detail`,
   `.custo-detail li` and `.customer-detail` were written as white (or #b7b7b7)
   text for a dark card. On the migrated light surface the whole lower half of
   Booking Detail measured 1.00:1 — present in the DOM, invisible on screen.

   Mapped rather than rewritten: the markup is legacy and stays as it is, but
   its colours have to come from the tokens so both themes work.
   ========================================================================== */
.user-detail,
.tasker-detail,
.task-detail,
.payment-detail,
.customer-detail,
.custo-detail,
.custo-detail li,
.view-cnt .customer-detail li { color: var(--vh-text) !important; }

.user-detail strong,
.tasker-detail strong,
.task-detail strong,
.payment-detail strong,
.customer-detail strong,
.custo-detail strong,
.customer-detail.inline-block { color: var(--vh-text-2) !important; }

.view-cnt .nav-heading h3,
.view-cnt .nav-heading p { color: var(--vh-text) !important; }

/* Accent class the template repurposed to plain white. It marks the record's
   identifier, so it takes the brand accent rather than disappearing. */
.text-greensea { color: var(--vh-coral-text) !important; }

/* The lifecycle label above the booking summary was inline-styled #a8e100 and
   the description #c1c1c1 — both unreadable on white. */
.view-cnt h[style], .view-cnt h { color: var(--vh-text) !important; }

/* Booking Detail's legacy summary block. The status was in an inline-coloured
   `<h>` — not an element, so it never rendered as a heading and its #a8e100
   was invisible on white. Real elements, token colours. */
.vh-legacy-status {
  font-weight: 700;
  font-size: 16px;
  color: var(--vh-text) !important;
  margin-bottom: var(--vh-s2);
}
.vh-legacy-reason { color: var(--vh-warning) !important; }
.vh-legacy-body   { color: var(--vh-text) !important; }

/* Booking Detail's inline timeline sets `.timeline-text { color: white }` for
   a dark card. Every event timestamp rendered white on the white tile — the
   lifecycle history was in the DOM and invisible. The gradient ruler and the
   node markers are kept; only the text colour is corrected. */
.timeline-text,
.timeline-text .content-text,
.timeline-text .content-text p,
.timeline-text .container-text { color: var(--vh-text) !important; }
.timeline-text .content-text p { margin-bottom: 2px; }

/* `.admin-bg-color` is a translucent grey slab over whatever is behind it.
   Give it a real token surface so it reads the same in both themes. */
.admin-bg-color {
  background: var(--vh-surface-2) !important;
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-r-md);
}

/* ==========================================================================
   Admin V3 Phase A — navigation groups and brand moments
   ========================================================================== */
#sidebar #navigation > li.vh-nav-group,
#sidebar[class] #navigation > li.vh-nav-group {
  list-style: none;
  color: var(--vh-text-3) !important;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: var(--vh-s5) var(--vh-s4) var(--vh-s1);
  pointer-events: none;
  background: transparent !important;
}
#sidebar #navigation > li.vh-nav-group:first-child { padding-top: var(--vh-s3); }
/* Selection/active states use the secondary brand BLUE accent (D-422; violet is retired). */
#sidebar[class] #navigation > li.active > a,
#sidebar .sidebar-nav ul li.active > a,
#sidebar .nav > li.active > a {
  background: var(--vh-accent-soft) !important;
  color: var(--vh-accent-text) !important;
}
/* Orange is the primary brand/action fill (D-422); orange TEXT uses --vh-coral-text, never the raw fill. */
.vh-badge--brand { background: var(--vh-coral-soft) !important; color: var(--vh-coral-text) !important; border-color: transparent !important; }

/* ==========================================================================
   Admin V3 Phase B — dashboard hierarchy and money-stage tones
   ========================================================================== */
.vh-dash { padding: var(--vh-s6) !important; }
.vh-dash__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--vh-s4); margin-bottom: var(--vh-s6); }
.vh-dash__title { font-family: var(--vh-font-heading); font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 var(--vh-s1); color: var(--vh-text); }
.vh-dash__asof, .vh-dash__hint { color: var(--vh-text-3); font-size: 12px; margin: 0 0 var(--vh-s3); }
.vh-dash__section { margin-bottom: var(--vh-s8); }
.vh-dash__section--compact { margin-bottom: var(--vh-s6); }
.vh-dash__h2 { font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--vh-text-3); margin: 0 0 var(--vh-s3); }
.vh-dash__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--vh-s4); }
.vh-stat--link { display: block; color: inherit; text-decoration: none; }
.vh-stat--link:hover, .vh-stat--link:focus-visible { border-color: var(--vh-border-strong); text-decoration: none; color: inherit; box-shadow: var(--vh-shadow-2); }
.vh-dash__attention th, .vh-dash__attention td { vertical-align: top; }
.vh-dash__attention .vh-num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; width: 80px; }
.vh-dash__row--hot td:first-child { color: var(--vh-danger); font-weight: 700; }
.vh-dash__state { padding: var(--vh-s3) var(--vh-s4); border: 1px solid var(--vh-border); border-radius: var(--vh-r-md); background: var(--vh-surface); color: var(--vh-text-2); }
.vh-dash__state--problem { border-color: var(--vh-danger-border); background: var(--vh-danger-soft); color: var(--vh-danger); }
.vh-dash__inline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--vh-s3) var(--vh-s6); color: var(--vh-text-2); font-size: 14px; }
.vh-dash__inline strong { color: var(--vh-text); }
/* Money stages: 'unverified' (transfer created, bank payout unknown) and 'queued' are warnings, never green. */
.vh-stage--unverified .vh-stage__dot, .vh-stage--queued .vh-stage__dot,
.vh-stage--pending .vh-stage__dot, .vh-stage--mixed .vh-stage__dot { background: var(--vh-warning); }
.vh-stage--unverified .vh-stage__state, .vh-stage--queued .vh-stage__state,
.vh-stage--pending .vh-stage__state, .vh-stage--mixed .vh-stage__state { color: var(--vh-warning); }
.vh-stage--failed .vh-stage__dot, .vh-stage--reversed .vh-stage__dot { background: var(--vh-danger); }
.vh-stage--failed .vh-stage__state, .vh-stage--reversed .vh-stage__state { color: var(--vh-danger); }
.vh-stage--cancelled .vh-stage__dot { background: var(--vh-neutral-border); }

/* ===========================================================================
   ADMIN-V2-VISUAL-PARITY — component parity with the Codex V2 prototype
   (Founder objective 2026-09-17, stage 2). CSS-only; no template/JS/data
   change. Brings breadcrumbs, page headers, secondary buttons, cards, tables
   and detail panels closer to the prototype so the Admin reads as the same
   product, not the old Admin recoloured.
   ======================================================================== */

/* Breadcrumb — the prototype uses a subtle muted text trail, not a rounded
   pill with a coloured glow and a dark home disc. Neutralise the legacy bar. */
.pageheader .page-bar {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin: 2px 0 0 !important;
}
.pageheader .page-bar .page-breadcrumb,
.pageheader .page-bar .page-breadcrumb > li {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.pageheader .page-bar .page-breadcrumb > li > a {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  color: var(--vh-text-3) !important;
  font-family: var(--vh-font) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 2px 4px !important;
}
.pageheader .page-bar .page-breadcrumb > li > a:hover { color: var(--vh-accent-text) !important; }
.pageheader .page-bar .page-breadcrumb .fa-home,
.pageheader .page-bar .page-breadcrumb > li > a .fa-home,
.pageheader .page-bar .page-breadcrumb > li:first-child > a {
  background: transparent !important;
  color: var(--vh-text-3) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.pageheader .page-bar .page-breadcrumb > li:before { color: var(--vh-text-3) !important; }

/* Page heading — cool, Manrope, matches the prototype's page-heading. */
.pageheader h2 {
  color: var(--vh-text) !important;
  font-family: var(--vh-font-heading) !important;
  letter-spacing: -0.2px !important;
  font-weight: 700 !important;
  /* Handoff section 4: page title 27px desktop / 24px small. */
  font-size: 27px !important;
}
@media (max-width: 1199px) {
  .pageheader h2 { font-size: 22px !important; }
}
.pageheader h2 span { color: var(--vh-text-3) !important; font-style: normal !important; }

/* Secondary buttons — light, bordered (prototype .btn). Export/utility actions
   should not read as heavy graphite blocks. */
.btn-info, .btn-warning, .btn-default, .btn-rounded.btn-info {
  background: var(--vh-surface) !important;
  background-image: none !important;
  border: 1px solid var(--vh-border-strong) !important;
  color: var(--vh-text) !important;
  box-shadow: none !important;
  border-radius: var(--vh-r-sm) !important;
}
.btn-info:hover, .btn-warning:hover, .btn-default:hover, .btn-rounded.btn-info:hover {
  background: var(--vh-surface-2) !important;
  border-color: var(--vh-brand) !important;
  color: var(--vh-coral-text) !important;
}

/* Cards / tiles — the prototype's card: white, 1px --line, 12px, soft shadow. */
.tile, section.tile, .panel {
  border: 1px solid var(--vh-border) !important;
  border-radius: var(--vh-r-lg) !important;
  box-shadow: var(--vh-shadow-2) !important;
  background: var(--vh-surface) !important;
}
.tile-header, .panel-heading {
  border-bottom: 1px solid var(--vh-border) !important;
  background: transparent !important;
}
.tile-header h1, .tile-header h1 strong, .panel-title {
  font-family: var(--vh-font-heading) !important;
  font-weight: 700 !important;
  color: var(--vh-text) !important;
}

/* KPI / stat cards — align padding & radius to the prototype .metric. */
.vh-stat, .feature-box-container .card {
  border-radius: var(--vh-r-lg) !important;
  box-shadow: var(--vh-shadow-2) !important;
}

/* Tables — clean light header, hairline row borders (prototype .table). */
.table.vh-table thead th, .custom-table thead th, table thead th {
  background: var(--vh-surface-2) !important;
  color: var(--vh-text-3) !important;
  font-size: 10.5px !important;
  letter-spacing: .4px !important;
  text-transform: uppercase !important;
  border-bottom: 1px solid var(--vh-border) !important;
  font-weight: 600 !important;
}
.table tbody td, .custom-table tbody td { border-top: 1px solid var(--vh-border) !important; }
.table tbody tr:hover td { background: var(--vh-surface-2) !important; }

/* Search / date inputs — light bordered fields per the prototype. */
input[type="search"], input[type="text"].form-control, input[type="date"], .form-control, select.form-control {
  background: var(--vh-surface) !important;
  border: 1px solid var(--vh-border-strong) !important;
  border-radius: var(--vh-r-sm) !important;
  color: var(--vh-text) !important;
}
.form-control:focus { border-color: var(--vh-accent) !important; box-shadow: var(--vh-focus) !important; }

/* Dashboard KPI summary row — matches the Codex V2 prototype .metric cards.
   Real values only; no fabricated trend/sparkline. */
.vh-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--vh-s4);
  margin-bottom: var(--vh-s5);
}
.vh-kpi {
  display: block;
  background: var(--vh-surface);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-r-lg);
  box-shadow: var(--vh-shadow-2);
  padding: 18px 19px 16px;
  min-width: 0;
  text-decoration: none;
  transition: box-shadow var(--vh-speed) ease, border-color var(--vh-speed) ease;
}
.vh-kpi:hover { box-shadow: var(--vh-shadow-3); border-color: var(--vh-brand-border); text-decoration: none; }
.vh-kpi__label {
  color: var(--vh-text-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  text-transform: uppercase;
}
.vh-kpi__value {
  color: var(--vh-text);
  font-family: var(--vh-font-heading);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  margin-top: 8px;
}
.vh-kpi__meta { color: var(--vh-text-3); font-size: 12px; margin-top: 6px; }
@media (max-width: 1100px) { .vh-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .vh-kpi-grid { grid-template-columns: 1fr; } }

/* Ensure flot chart containers have a real width so the plot never inits at 0. */
.vh-dash .tile-body, .page-dashboard .tile-body { min-width: 0; }
.page-dashboard flot > div, .vh-dash flot > div { min-width: 120px; }

/* ============================================================
   Objective D — cross-entity operator global search (top bar)
   Read-only lookup widget. Matches the Codex V2 light/violet
   design: white surfaces, cool borders, violet focus, 12px radius.
   ============================================================ */
.vh-gsearch-host { display: inline-block; vertical-align: middle; }

.vh-gsearch { position: relative; display: inline-block; }

.vh-gsearch-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 340px;
  max-width: 42vw;
  height: 38px;
  background: var(--vh-surface);
  border: 1px solid var(--vh-border);
  border-radius: 10px;
  padding: 0 10px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.vh-gsearch.open .vh-gsearch-box,
.vh-gsearch-box:focus-within {
  border-color: var(--vh-accent);
  box-shadow: 0 0 0 3px var(--vh-accent-soft);
}
.vh-gsearch-icon { color: var(--vh-text-3); margin-right: 8px; font-size: 14px; }
.vh-gsearch-input {
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--vh-text);
  font-size: 14px;
  min-width: 0;
}
.vh-gsearch-input::placeholder { color: var(--vh-text-3); }
.vh-gsearch-clear {
  cursor: pointer; color: var(--vh-text-3); font-size: 18px; line-height: 1;
  padding: 0 2px; margin-left: 6px;
}
.vh-gsearch-clear:hover { color: var(--vh-text); }

.vh-gsearch-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 460px;
  max-width: 92vw;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--vh-surface);
  border: 1px solid var(--vh-border);
  border-radius: 12px;
  box-shadow: var(--vh-shadow-4);
  z-index: 1050;
  padding: 6px;
}
.vh-gsearch-state, .vh-gsearch-hint {
  padding: 14px 12px; color: var(--vh-text-2); font-size: 14px;
}
.vh-gsearch-error { color: var(--vh-danger); }

.vh-gsearch-results { list-style: none; margin: 0; padding: 0; }
.vh-gsearch-item {
  border-radius: 8px;
  padding: 8px 10px;
  transition: background .12s ease;
}
.vh-gsearch-item:hover { background: var(--vh-surface-3); }
.vh-gsearch-item + .vh-gsearch-item { border-top: 1px solid var(--vh-border); }
.vh-gsearch-item-main { cursor: pointer; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.vh-gsearch-badge {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--vh-brand-soft);
  color: var(--vh-accent-text);
  border: 1px solid var(--vh-brand-border);
}
/* brand polish: result-type badges are labels, not statuses: booking = brand tint, the others neutral (no blue / green) */
.vh-gsearch-badge-booking { background: var(--vh-coral-soft); color: var(--vh-coral-text); border-color: var(--vh2-orange-100, #FFE2D0); }
.vh-gsearch-badge-transaction { background: var(--vh-neutral-soft); color: var(--vh-neutral); border-color: var(--vh-neutral-border); }
.vh-gsearch-badge-provider { background: var(--vh-neutral-soft); color: var(--vh-neutral); border-color: var(--vh-neutral-border); }
.vh-gsearch-title { font-size: 14px; font-weight: 600; color: var(--vh-text); }
.vh-gsearch-sub { font-size: 12px; color: var(--vh-text-2); }
.vh-gsearch-links { margin-top: 4px; padding-left: 2px; }
.vh-gsearch-link {
  display: inline-block;
  font-size: 12px;
  color: var(--vh-link);
  cursor: pointer;
  margin-right: 14px;
}
.vh-gsearch-link:hover { color: var(--vh-link-hover); text-decoration: underline; }
.vh-gsearch-foot {
  padding: 8px 12px 4px;
  color: var(--vh-text-3);
  font-size: 12px;
  border-top: 1px solid var(--vh-border);
  margin-top: 4px;
}

@media (max-width: 820px) {
  .vh-gsearch-box { width: 200px; }
}

/* ============================================================
   Objective E — read-only financial reconciliation screen
   ============================================================ */
.vh-recon { padding: 4px 2px; }
.vh-recon-state { padding: 24px; color: var(--vh-text-2); font-size: 14px; }
.vh-recon-error { color: var(--vh-danger); }

.vh-recon-head .panel-body { padding: 16px 18px; }
.vh-recon-head-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px 20px;
}
.vh-recon-k { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--vh-text-3); }
.vh-recon-v { display: block; font-size: 14px; font-weight: 600; color: var(--vh-text); word-break: break-all; }
/* the internal booking id under the human number, kept for support (selectable) */
.vh-recon-internal-id { display: block; margin-top: 2px; font-family: var(--vh-font-mono); font-size: 12px; color: var(--vh-text-3); word-break: break-all; user-select: all; }

.vh-recon-flags { margin: 12px 0; }
.vh-recon-flag {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: 10px; margin-bottom: 8px;
  border: 1px solid var(--vh-border); background: var(--vh-surface);
}
.vh-recon-flag-critical { border-color: #f2c2c2; background: #fdecec; }
.vh-recon-flag-warning { border-color: #e7e4de; background: #f1efeb; }   /* brand pass U11: neutral surface, no amber */
.vh-recon-flag-info { border-color: #e7e4de; background: #f7f6f3; }   /* brand polish: warm neutral (was cool slate) */
.vh-recon-flag-info .vh-recon-flag-sev { background: #5F5A55; }
.vh-recon-flag-sev {
  flex: 0 0 auto; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; color: #fff;
}
.vh-recon-flag-critical .vh-recon-flag-sev { background: #c0392b; }
.vh-recon-flag-warning .vh-recon-flag-sev { background: #B8340F; }   /* white label 6:1 (#b9832b was 3.1:1) */
.vh-recon-flag-msg { font-size: 14px; font-weight: 600; color: var(--vh-text); }
.vh-recon-flag-ev { font-size: 12px; color: var(--vh-text-2); margin-top: 2px; font-family: monospace; }
/* The flag surfaces are fixed light tints in both themes, so their text is fixed dark (the theme text tokens turn light in dark mode: ~1.1:1 on the info tint). */
.vh-recon-flag-info .vh-recon-flag-msg, .vh-recon-flag-warning .vh-recon-flag-msg, .vh-recon-flag-critical .vh-recon-flag-msg { color: #1b2230; }
.vh-recon-flag-info .vh-recon-flag-ev, .vh-recon-flag-warning .vh-recon-flag-ev, .vh-recon-flag-critical .vh-recon-flag-ev { color: #475066; }

.vh-recon-clean {
  margin: 12px 0; padding: 12px 14px; border-radius: 10px;
  background: var(--vh-success-soft); border: 1px solid var(--vh-success-border); color: var(--vh-success); font-size: 14px; font-weight: 600;
}
.vh-recon-clean .fa { margin-right: 6px; }

.vh-recon-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--vh-text-3); }
.vh-recon-table td { vertical-align: middle; font-size: 14px; }
.vh-recon-step { font-weight: 600; color: var(--vh-text); }
.vh-recon-amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.vh-recon-detail { color: var(--vh-text-2); font-size: 12px; }
.vh-recon-src { color: var(--vh-text-3); font-size: 12px; font-family: monospace; }

.vh-recon-chip {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--vh-border); background: var(--vh-surface-3); color: var(--vh-text-2);
}
/* brand polish status map (BRAND-SYSTEM.md): ok/released = success, pending/unverified = warning, failed/reversed/conflict = danger; token pairs (light + dark) */
.vh-recon-chip-ok { background: var(--vh-success-soft); color: var(--vh-success); border-color: var(--vh-success-border); }
.vh-recon-chip-failed { background: var(--vh-danger-soft); color: var(--vh-danger); border-color: var(--vh-danger-border); }
.vh-recon-chip-reversed { background: var(--vh-danger-soft); color: var(--vh-danger); border-color: var(--vh-danger-border); }
.vh-recon-chip-pending { background: var(--vh-warning-soft); color: var(--vh-warning); border-color: var(--vh-warning-border); }
.vh-recon-chip-released { background: var(--vh-success-soft); color: var(--vh-success); border-color: var(--vh-success-border); }
.vh-recon-chip-conflict { background: var(--vh-danger-soft); color: var(--vh-danger); border-color: var(--vh-danger-border); }
.vh-recon-chip-unverified { background: var(--vh-warning-soft); color: var(--vh-warning); border-color: var(--vh-warning-border); }
.vh-recon-amt-note { font-size: 12px; font-weight: 400; color: var(--vh-text-3); }
.vh-recon-chip-unavailable { background: var(--vh-neutral-soft); color: var(--vh-text-2); border-color: var(--vh-neutral-border); }
.vh-recon-chip-not_yet_created { background: var(--vh-neutral-soft); color: var(--vh-text-2); border-color: var(--vh-neutral-border); }
.vh-recon-chip-not_applicable { background: transparent; color: var(--vh-text-3); border-style: dashed; }
.vh-recon-chip-zero { background: var(--vh-surface-3); color: var(--vh-text-2); }
.vh-recon-foot { margin-top: 12px; color: var(--vh-text-3); font-size: 12px; }

/* ============================================================
   Objective F — read-only provider operational summary
   ============================================================ */
.vh-psum { padding: 4px 2px; }
.vh-psum-state { padding: 24px; color: var(--vh-text-2); font-size: 14px; }
.vh-psum-error { color: var(--vh-danger); }
.vh-psum-note {
  margin: 8px 0 14px; padding: 10px 14px; border-radius: 10px;
  background: var(--vh-accent-soft); border: 1px solid var(--vh-border);
  color: var(--vh-accent-text); font-size: 12px;
}
.vh-psum-open { margin-left: 10px; font-weight: 600; color: var(--vh-link); cursor: pointer; }
.vh-psum-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
}
.vh-psum-card .panel-heading { font-size: 14px; }
.vh-psum-card .panel-body { padding: 12px 16px; }
.vh-psum-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid var(--vh-border); gap: 12px;
}
.vh-psum-row:last-child { border-bottom: 0; }
.vh-psum-k { color: var(--vh-text-2); font-size: 12px; }
.vh-psum-v { color: var(--vh-text); font-size: 14px; font-weight: 600; text-align: right; word-break: break-word; }
.vh-psum-na { color: var(--vh-text-3); font-size: 12px; font-style: italic; }
.vh-psum-big { font-size: 28px; font-weight: 700; color: var(--vh-text); line-height: 1.1; }
.vh-psum-big small { font-size: 16px; color: var(--vh-text-3); font-weight: 500; }
.vh-psum-big.vh-psum-alert { color: var(--vh-danger); }
.vh-psum-sub { color: var(--vh-text-2); font-size: 12px; margin-top: 2px; }

/* ============================================================
   Objective G — read-only booking operations summary
   ============================================================ */
.vh-bsum { padding: 4px 2px; }
.vh-bsum-state { padding: 24px; color: var(--vh-text-2); font-size: 14px; }
.vh-bsum-error { color: var(--vh-danger); }
.vh-bsum-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.vh-bsum-id { font-size: 16px; font-weight: 700; color: var(--vh-text); word-break: break-all; }
/* the internal booking id under the human number, kept for support (selectable) */
.vh-bsum-internal-id { margin-top: 2px; font-family: var(--vh-font-mono); font-size: 12px; color: var(--vh-text-3); word-break: break-all; user-select: all; }
.vh-bsum-ai-booking { margin-left: 6px; font-weight: 400; color: var(--vh-text-3); }
.vh-bsum-status {
  display: inline-block; margin-top: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--vh-surface-3); color: var(--vh-text-2);
}
.vh-bsum-status-completed, .vh-bsum-status-delivered { background: var(--vh-success-soft); color: var(--vh-success); }
.vh-bsum-status-cancelled, .vh-bsum-status-rejected { background: var(--vh-danger-soft); color: var(--vh-danger); }
.vh-bsum-status-in_progress, .vh-bsum-status-started, .vh-bsum-status-accepted, .vh-bsum-status-arrived { background: var(--vh-coral-soft); color: var(--vh-coral-text); }
.vh-bsum-status-pending { background: var(--vh-warning-soft); color: var(--vh-warning); }
.vh-bsum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 4px; }
.vh-bsum-row { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--vh-border); gap: 12px; }
.vh-bsum-row:last-child { border-bottom: 0; }
.vh-bsum-k { color: var(--vh-text-2); font-size: 12px; }
.vh-bsum-v { color: var(--vh-text); font-size: 14px; font-weight: 600; text-align: right; word-break: break-word; }
.vh-bsum-na { color: var(--vh-text-3); font-size: 12px; font-style: italic; }
.vh-bsum-pay { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--vh-border); gap: 10px; }
.vh-bsum-pay:last-child { border-bottom: 0; }
.vh-bsum-amt { font-size: 12px; color: var(--vh-text-2); font-variant-numeric: tabular-nums; }
.vh-bsum-exc { padding: 6px 0; font-size: 14px; color: var(--vh-text); }
.vh-bsum-exc-tag { display: inline-block; font-size: 10px; text-transform: uppercase; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--vh-surface-3); color: var(--vh-text-2); margin-right: 6px; }
.vh-bsum-exc-warn { background: var(--vh-warning-soft); color: var(--vh-warning); }
.vh-bsum-exc-crit { background: var(--vh-danger-soft); color: var(--vh-danger); }
.vh-bsum-tl { padding-left: 6px; }
.vh-bsum-tl-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; position: relative; }
.vh-bsum-tl-item:not(:last-child)::before { content: ''; position: absolute; left: 4px; top: 22px; bottom: -8px; width: 2px; background: var(--vh-border); }
.vh-bsum-tl-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: var(--vh-brand); z-index: 1; }
.vh-bsum-tl-label { font-size: 14px; font-weight: 600; color: var(--vh-text); min-width: 180px; }
.vh-bsum-tl-at { font-size: 12px; color: var(--vh-text-2); }
.vh-bsum-foot { margin-top: 12px; color: var(--vh-text-3); font-size: 12px; }

/* ============================================================
   Category/Sub-category status filter (All / Active / Inactive)
   ============================================================ */
.vh-cat-filter { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; }
.vh-cat-filter-label { margin: 0; font-size: 12px; color: var(--vh-text-2); font-weight: 600; }
.vh-cat-filter-select {
  display: inline-block; width: auto; min-width: 120px; height: 34px;
  padding: 4px 10px; font-size: 14px; border-radius: 8px;
  border: 1px solid var(--vh-border); background: var(--vh-surface); color: var(--vh-text);
}
.vh-cat-filter-select:focus { border-color: var(--vh-accent); box-shadow: 0 0 0 3px var(--vh-accent-soft); outline: 0; }

/* Orphaned subcategory (parent category missing) — data-quality warning */
.vh-cat-orphan {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--vh-warning);
  background: var(--vh-warning-soft); border: 1px solid var(--vh-warning-border); border-radius: 6px; padding: 2px 8px;
}
.vh-cat-orphan .fa { color: var(--vh-warning); }

/* Clients list / Bookings list stat cards.
   main.css pins `.list-use .feature-box-container.col-lg-2` to width: 20% and
   its responsive ladder stops at 1023px (100% -> 50% -> 20%). So from 1024px
   up to roughly 1400px the five-across row squeezes each label into a ~33px
   column and the card text renders one letter per line. This continues the
   ladder through that gap instead of changing the >=1400px layout. */
@media screen and (min-width: 1024px) and (max-width: 1199px) {
  .list-use .feature-box-container.col-lg-2,
  .task-lis .feature-box-container.col-lg-2 { width: 33.3333%; }
}
@media screen and (min-width: 1200px) and (max-width: 1399px) {
  .list-use .feature-box-container.col-lg-2,
  .task-lis .feature-box-container.col-lg-2 { width: 25%; }
}

/* ==========================================================================
   Narrow-viewport shell — accidental sidebar overlap
   --------------------------------------------------------------------------
   Below the desktop breakpoint the aside stays `position: fixed` (236px in
   `sidebar-sm`, 64px in the `sidebar-xs` rail) while `.view-container` keeps
   `margin-left: 0`, so the page heading, breadcrumb, stat cards and the
   table's first column render UNDERNEATH the navigation. Measured at 390px:
   sidebar 0-64px, page heading at x=36.

   The handoff specifies off-canvas mobile navigation; that needs a visible
   toggle, a backdrop and focus containment, which is a behavioural change.
   Until that exists, reserve the space the fixed aside actually occupies so
   nothing is hidden and navigation stays reachable. Keyed off the same body
   classes the shell already toggles.
   ========================================================================== */
@media (max-width: 991px) {
  .view-container {
    margin-left: 236px;
    transition: margin-left var(--vh-speed) ease;
  }
  body.sidebar-xs .view-container { margin-left: 64px; }
}
@media (max-width: 991px) and (prefers-reduced-motion: reduce) {
  .view-container { transition: none; }
}

/* In the collapsed `sidebar-xs` rail the aside BACKGROUND shrinks to 64px but
   the navigation list keeps its full 236px width, so the menu spilled over the
   page content instead of collapsing with it. The grouped navigation added in
   V3 Phase A (`li.vh-nav-group` captions) is not known to the legacy rail
   rules, which is why the labels stayed. Constrain the list to the rail and
   hide the captions and labels; the 29 destination icons stay visible and
   clickable, and the hover fly-out still reveals the labels. */
@media (max-width: 991px) {
  body.sidebar-xs #sidebar,
  body.sidebar-xs #sidebar > div,
  body.sidebar-xs #sidebar .slimScrollDiv,
  body.sidebar-xs #sidebar accordion,
  body.sidebar-xs #sidebar .panel-group,
  body.sidebar-xs #sidebar .panel,
  body.sidebar-xs #sidebar .panel-collapse,
  body.sidebar-xs #sidebar .panel-body,
  body.sidebar-xs #sidebar #navigation {
    width: 64px;
    max-width: 64px;
  }
  body.sidebar-xs #sidebar #navigation > li.vh-nav-group { display: none; }
  body.sidebar-xs #sidebar #navigation li a span { display: none; }
}

/* ==========================================================================
   Narrow-viewport header
   --------------------------------------------------------------------------
   The header packs brand, sidebar toggle, global search, theme toggle, a
   language dropdown and the account menu into one bar. Below the desktop
   breakpoint that does not fit, and the legacy markup fails badly rather than
   wrapping: BOTH the language and account menus are `li.dropdown.nav-profile`
   with `position: absolute; top: -14px`, so at 375px they rendered 14px ABOVE
   the header, on top of each other and under the search box - the visible
   result was the two labels interleaved ("Langu|hive|ge").

   Measured at 375px before: 9 real element overlaps, items at y = -14.
   After: 0 overlaps, nothing above the header, nothing past the right edge.

   The global search is hidden below 992px because it is the widest item and
   every list screen already has its own search. The language menu is hidden
   below 768px only; it remains available at tablet widths.
   ========================================================================== */
@media (max-width: 991px) {
  #header .vh-gsearch-host { display: none !important; }
  #header .nav-right { float: none !important; }
  #header .nav-right > li.dropdown.nav-profile {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
  }
}
@media (max-width: 767px) {
  /* :nth-child(3) is the language menu, :nth-child(4) the account menu; the
     two carry identical classes and attributes, so order is the only way to
     tell them apart. */
  #header .nav-right > li.dropdown.nav-profile:nth-child(3) { display: none !important; }
}

/* Click-opened counterpart of main.css's hover-only rail flyout. The class is
   set by viahive-theme.js below 992px; desktop still uses :hover. */
@media (max-width: 991px) {
  body.sidebar-xs #sidebar #navigation > li.dropdown.vh-nav-open > ul,
  body.sidebar-sm #sidebar #navigation > li.dropdown.vh-nav-open > ul {
    display: block !important;
  }
}

/* The rail wrappers (.slimScrollDiv, <accordion>, .panel) carry
   overflow: hidden and are clamped to the 64px rail, so an opened flyout was
   present in the DOM at 220px wide but clipped to nothing. While a flyout is
   open, let the rail paint outside itself. */
@media (max-width: 991px) {
  body.vh-nav-flyout-open #sidebar,
  body.vh-nav-flyout-open #sidebar > div,
  body.vh-nav-flyout-open #sidebar .slimScrollDiv,
  body.vh-nav-flyout-open #sidebar accordion,
  body.vh-nav-flyout-open #sidebar .panel,
  body.vh-nav-flyout-open #sidebar .panel-collapse,
  body.vh-nav-flyout-open #sidebar .panel-body,
  body.vh-nav-flyout-open #sidebar #navigation {
    overflow: visible !important;
  }
  body.vh-nav-flyout-open #sidebar #navigation > li.vh-nav-open > ul {
    z-index: 1045;
    background: var(--vh-sidebar-bg);
    border: 1px solid var(--vh-border);
    border-radius: var(--vh-r-md);
    box-shadow: var(--vh-shadow-3);
  }
}

/* Shared table request honesty (see custom-table.js runFetch). A failed fetch
   keeps the previous rows so the operator does not lose their place, but they
   must never read as the answer to the request that just failed. */
.vh-table-error {
  background: var(--vh-danger-bg, rgba(220, 76, 76, 0.12));
  color: var(--vh-danger-fg, #f0a0a0);
  text-align: left;
  padding: 10px 14px;
}
.vh-table-error a {
  margin-left: 10px;
  text-decoration: underline;
  font-weight: 600;
}
tr.vh-row-stale > td {
  opacity: 0.55;
  font-style: italic;
}

/* Tile-header controls at phone widths.
   main.css (vendor Minovate) hides every `.tile-header .controls` below 628px:

       @media only screen and (max-width: 628px) { .tile .tile-header .controls { display: none } }

   That is where the status filters and the "+ Add" actions live, so on a phone
   an operator could not change a filter or create a record at all. Nothing is
   hidden there for authorization or safety reasons — each control is already
   gated individually in its own template (`ng-if="...permission.add != false"`),
   and that gating is untouched here. Restore the list and let it wrap under
   the heading instead of sitting beside it. */
@media only screen and (max-width: 628px) {
  .tile .tile-header .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    float: none;
    width: 100%;
    margin: 10px 0 0;
    padding: 0;
  }
  .tile .tile-header .controls > li {
    float: none;
    display: inline-flex;
    align-items: center;
  }
  .tile .tile-header .controls .vh-cat-filter-select {
    max-width: 100%;
  }
}

/* "Screen unavailable" landing page (app.unavailable). Reached when a route
   transition fails, so the previous screen is never left mounted under the
   requested URL. Uses the existing V2 tokens; introduces no new palette. */
.vh-unavailable {
  text-align: center;
  padding: 36px 24px 30px;
}
.vh-unavailable-icon {
  font-size: 34px;
  color: var(--vh-warning, #B8340F);
  margin-bottom: 14px;
}
.vh-unavailable-title {
  font-family: var(--vh-font);
  font-size: 22px;
  margin: 0 0 8px;
}
.vh-unavailable-body {
  /* job 588 (S10): the legacy --vh-text-muted token is not defined in the V2 shell, so the old lavender fallback showed; use the V2 text token, centred and wrapped */
  color: var(--vh2-text-secondary, #57534E);
  margin: 0 auto 18px;
  max-width: min(46ch, 100%);
  text-align: center;
  overflow-wrap: anywhere;
}
.vh-unavailable-detail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  text-align: left;
  max-width: 44ch;
  margin: 0 auto 22px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--vh-bg, #12131b);
}
.vh-unavailable-detail dt {
  color: var(--vh2-text-secondary, #57534E);
  font-weight: 500;
  white-space: nowrap;
}
.vh-unavailable-detail dd {
  margin: 0;
  word-break: break-word;
}
.vh-unavailable-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .vh-unavailable { padding: 26px 16px 22px; }
  .vh-unavailable-detail { grid-template-columns: 1fr; }
  .vh-unavailable-actions .btn { width: 100%; }
}

/* Loading wave (Founder 11-24): grey shapes with a soft light moving left to right. The animation sits on the
   shapes only, never on the ng-if element, so ngAnimate can finish removing it. */
.vh-wave-lines { display: grid; gap: 14px; padding: 20px 24px; margin: 0; text-align: left; }
.vh-wave-lines .vh-wave { display: block; position: relative; overflow: hidden; height: 18px; border-radius: 8px; background: #E9E9EC; }
.vh-wave-lines .vh-wave:nth-of-type(odd) { width: 94%; }
.vh-wave-lines .vh-wave:last-child { width: 62%; }
.vh-wave-lines .vh-wave::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent); animation: vh-wave-move 1.5s ease-in-out infinite; }
.vh-wave-lines--bar { padding: 8px 16px; }
.vh-wave-lines--bar .vh-wave { height: 6px; }
.vh-wave-lines--bar .vh-wave:last-child { width: 100%; }
.vh-wave-lines--bar .vh-wave:not(:last-child) { display: none; }
@keyframes vh-wave-move { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .vh-wave-lines .vh-wave::after { animation: none; } }
