@charset "UTF-8";
/* ==========================================================================
   Web Boomers - FOSSBilling 0.8.7 client area theme
   --------------------------------------------------------------------------
   Single hand-written stylesheet. No build step, no framework, no CDN.

   Layout of this file
     1. Design tokens (light + dark)
     2. Reset & base typography
     3. Utility layer (the Bootstrap 5 class vocabulary that FOSSBilling
        core module templates rely on, re-expressed in Web Boomers tokens)
     4. Components (buttons, cards, tables, forms, badges, alerts, nav,
        tabs, dropdowns, modals, accordions, pagination, list groups...)
     5. Application shell (sidebar, topbar, page header, drawer)
     6. Page-level compositions (dashboard, invoices, storefront, support,
        announcements, knowledge base, settings, auth)
     7. Responsive breakpoints
     8. Motion & print

   Anything prefixed .wb- is this theme's own component vocabulary.
   Everything else is a core-compatibility class and must keep its name.
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */

:root {
  /* --- brand ------------------------------------------------------------ */
  --primary: #1466ff;
  --primary-hover: #0b52dd;
  --primary-active: #0945bd;
  --primary-light: #e9f0ff;
  --primary-subtle: #f4f8ff;
  --primary-contrast: #ffffff;
  --primary-ring: rgba(20, 102, 255, 0.28);

  --secondary: #00b6cf;
  --secondary-hover: #009bb2;
  --secondary-light: #e2f8fc;
  --accent: #22d3ee;

  --gradient-brand: linear-gradient(135deg, #1466ff 0%, #00c8e0 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(20, 102, 255, 0.10) 0%, rgba(0, 200, 224, 0.10) 100%);

  /* --- surfaces --------------------------------------------------------- */
  --background: #f4f7fc;
  --background-alt: #eef3fa;
  --surface: #ffffff;
  --surface-alt: #fafbfe;
  --surface-hover: #f5f8fd;
  --surface-sunken: #f1f5fb;
  --nav-surface: #ffffff;
  --overlay: rgba(9, 20, 40, 0.48);

  /* --- lines ------------------------------------------------------------ */
  --border: #e3e9f3;
  --border-strong: #cfd9e8;
  --border-subtle: #eef2f8;

  /* --- text ------------------------------------------------------------- */
  --text: #0f1b33;
  --text-strong: #060e20;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --text-inverse: #ffffff;
  --link: var(--primary);
  --link-hover: var(--primary-hover);

  /* --- status ----------------------------------------------------------- */
  --success: #12855a;
  --success-bg: #e6f7ef;
  --success-border: #bfe9d6;
  --warning: #a45c00;
  --warning-bg: #fff5e3;
  --warning-border: #f7dfb4;
  --danger: #c81e46;
  --danger-bg: #fdeaef;
  --danger-border: #f7c6d3;
  --info: #0670a8;
  --info-bg: #e5f4fd;
  --info-border: #bce2f6;
  --neutral: #526075;
  --neutral-bg: #eef1f6;
  --neutral-border: #dbe1eb;

  /* --- elevation -------------------------------------------------------- */
  --shadow-xs: 0 1px 2px rgba(15, 27, 51, 0.05);
  --shadow-sm: 0 1px 3px rgba(15, 27, 51, 0.06), 0 1px 2px rgba(15, 27, 51, 0.04);
  --shadow-md: 0 4px 14px rgba(15, 27, 51, 0.07), 0 1px 3px rgba(15, 27, 51, 0.05);
  --shadow-lg: 0 14px 38px rgba(15, 27, 51, 0.11), 0 3px 10px rgba(15, 27, 51, 0.05);
  --shadow-focus: 0 0 0 3px var(--primary-ring);

  /* --- geometry --------------------------------------------------------- */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  /* --- type ------------------------------------------------------------- */
  --font-sans: "Inter", "Inter var", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3125rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2rem;

  /* --- shell ------------------------------------------------------------ */
  --sidebar-w: 268px;
  --sidebar-w-collapsed: 78px;
  --topbar-h: 68px;
  --content-max: 1400px;

  --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 240ms cubic-bezier(0.4, 0, 0.2, 1);

  color-scheme: light;
}

/* Dark palette. Deliberately designed, not an inversion: the ground is a deep
   navy, cards lift one step out of it, and brand hues are brightened so they
   keep AA contrast on those darker surfaces. Declared three times so the
   explicit toggle wins in both directions and no-JS visitors still get the
   system preference. */
:root[data-bs-theme="dark"] {
  color-scheme: dark;

  --primary: #4d8dff;
  --primary-hover: #6fa4ff;
  --primary-active: #8bb6ff;
  --primary-light: rgba(77, 141, 255, 0.16);
  --primary-subtle: rgba(77, 141, 255, 0.09);
  --primary-contrast: #04101f;
  --primary-ring: rgba(77, 141, 255, 0.36);

  --secondary: #35d3ea;
  --secondary-hover: #5cdcef;
  --secondary-light: rgba(53, 211, 234, 0.15);
  --accent: #67e8f9;

  --gradient-brand: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(77, 141, 255, 0.16) 0%, rgba(53, 211, 234, 0.14) 100%);

  --background: #060c18;
  --background-alt: #0a1120;
  --surface: #101a2d;
  --surface-alt: #142038;
  --surface-hover: #182643;
  --surface-sunken: #0c1424;
  --nav-surface: #0c1424;
  --overlay: rgba(2, 6, 14, 0.66);

  --border: #24334f;
  --border-strong: #2e3f60;
  --border-subtle: #1a2740;

  --text: #e7eefb;
  --text-strong: #f7fafe;
  --text-muted: #9aa9c2;
  --text-faint: #74849e;
  --text-inverse: #04101f;
  --link: #7aabff;
  --link-hover: #a3c5ff;

  --success: #4ade9b;
  --success-bg: rgba(74, 222, 155, 0.13);
  --success-border: rgba(74, 222, 155, 0.30);
  --warning: #fbc55a;
  --warning-bg: rgba(251, 197, 90, 0.13);
  --warning-border: rgba(251, 197, 90, 0.30);
  --danger: #ff7d9c;
  --danger-bg: rgba(255, 125, 156, 0.13);
  --danger-border: rgba(255, 125, 156, 0.30);
  --info: #6ec8f5;
  --info-bg: rgba(110, 200, 245, 0.13);
  --info-border: rgba(110, 200, 245, 0.30);
  --neutral: #a4b2c8;
  --neutral-bg: rgba(164, 178, 200, 0.13);
  --neutral-border: rgba(164, 178, 200, 0.26);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.44);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.46);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.55);
  --shadow-focus: 0 0 0 3px var(--primary-ring);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-bs-theme="light"]):not([data-bs-theme="dark"]) {
    color-scheme: dark;

    --primary: #4d8dff;
    --primary-hover: #6fa4ff;
    --primary-active: #8bb6ff;
    --primary-light: rgba(77, 141, 255, 0.16);
    --primary-subtle: rgba(77, 141, 255, 0.09);
    --primary-contrast: #04101f;
    --primary-ring: rgba(77, 141, 255, 0.36);

    --secondary: #35d3ea;
    --secondary-hover: #5cdcef;
    --secondary-light: rgba(53, 211, 234, 0.15);
    --accent: #67e8f9;

    --gradient-brand: linear-gradient(135deg, #3b82f6 0%, #22d3ee 100%);
    --gradient-brand-soft: linear-gradient(135deg, rgba(77, 141, 255, 0.16) 0%, rgba(53, 211, 234, 0.14) 100%);

    --background: #060c18;
    --background-alt: #0a1120;
    --surface: #101a2d;
    --surface-alt: #142038;
    --surface-hover: #182643;
    --surface-sunken: #0c1424;
    --nav-surface: #0c1424;
    --overlay: rgba(2, 6, 14, 0.66);

    --border: #24334f;
    --border-strong: #2e3f60;
    --border-subtle: #1a2740;

    --text: #e7eefb;
    --text-strong: #f7fafe;
    --text-muted: #9aa9c2;
    --text-faint: #74849e;
    --text-inverse: #04101f;
    --link: #7aabff;
    --link-hover: #a3c5ff;

    --success: #4ade9b;
    --success-bg: rgba(74, 222, 155, 0.13);
    --success-border: rgba(74, 222, 155, 0.30);
    --warning: #fbc55a;
    --warning-bg: rgba(251, 197, 90, 0.13);
    --warning-border: rgba(251, 197, 90, 0.30);
    --danger: #ff7d9c;
    --danger-bg: rgba(255, 125, 156, 0.13);
    --danger-border: rgba(255, 125, 156, 0.30);
    --info: #6ec8f5;
    --info-bg: rgba(110, 200, 245, 0.13);
    --info-border: rgba(110, 200, 245, 0.30);
    --neutral: #a4b2c8;
    --neutral-bg: rgba(164, 178, 200, 0.13);
    --neutral-border: rgba(164, 178, 200, 0.26);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.44);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.46);
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, 0.55);
    --shadow-focus: 0 0 0 3px var(--primary-ring);
  }
}

/* ==========================================================================
   2. RESET & BASE TYPOGRAPHY
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  font-weight: 400;
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  margin: 0 0 var(--space-3);
  font-weight: 650;
  line-height: 1.25;
  color: var(--text-strong);
  letter-spacing: -0.014em;
  text-wrap: balance;
}

h1, .h1 { font-size: var(--text-2xl); }
h2, .h2 { font-size: var(--text-xl); }
h3, .h3 { font-size: var(--text-lg); }
h4, .h4 { font-size: var(--text-md); }
h5, .h5 { font-size: var(--text-base); }
h6, .h6 { font-size: var(--text-sm); text-transform: none; }

.display-1 { font-size: clamp(3.25rem, 12vw, 5.5rem); font-weight: 750; line-height: 1; letter-spacing: -0.04em; }
.display-6 { font-size: clamp(1.6rem, 4vw, 2.15rem); font-weight: 700; line-height: 1.18; letter-spacing: -0.022em; }

p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }

a {
  color: var(--link);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 2px; }

strong, b { font-weight: 650; color: var(--text-strong); }
small, .small { font-size: var(--text-sm); }

hr {
  height: 1px;
  margin: var(--space-5) 0;
  border: 0;
  background: var(--border);
  opacity: 1;
}

img, svg, video { max-width: 100%; }
img { height: auto; border-style: none; }

code, kbd, pre, samp { font-family: var(--font-mono); font-size: 0.875em; }

code {
  padding: 0.15em 0.4em;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-xs);
}

pre {
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  overflow-x: auto;
  color: var(--text);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  line-height: 1.55;
}
pre code { padding: 0; color: inherit; background: none; }

blockquote, .blockquote {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  border-left: 3px solid var(--primary);
  background: var(--primary-subtle);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: inherit;
}

dl, dt, dd { margin: 0; }
dt { font-weight: 600; }

ul, ol { margin: 0 0 var(--space-3); padding-left: 1.35rem; }
li + li { margin-top: 2px; }
.list-unstyled { padding-left: 0; list-style: none; }

::selection { background: var(--primary-light); color: var(--text-strong); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Skip link - first tab stop on every page */
.wb-skip {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 2000;
  padding: 10px 18px;
  font-weight: 600;
  color: var(--primary-contrast);
  background: var(--primary);
  border-radius: var(--radius-sm);
  transition: top var(--transition);
}
.wb-skip:focus { top: var(--space-3); color: var(--primary-contrast); text-decoration: none; }

.visually-hidden,
.embed-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Icons -------------------------------------------------------------------
   Core templates render <svg class="icon"><use href="#id"/></svg>. */
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  vertical-align: -0.16em;
  fill: none;
  stroke: currentColor;
  pointer-events: none;
}

/* Theme-conditional visibility. Core's partial_company_logo ships one <img>
   per theme and relies on these to swap. Handled for all three states. */
.hide-theme-dark, .hide-theme-light { display: revert; }
:root[data-bs-theme="dark"] .hide-theme-dark { display: none !important; }
:root[data-bs-theme="light"] .hide-theme-light { display: none !important; }
:root:not([data-bs-theme="dark"]) .hide-theme-light { display: none !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-bs-theme="light"]):not([data-bs-theme="dark"]) .hide-theme-dark { display: none !important; }
  :root:not([data-bs-theme="light"]):not([data-bs-theme="dark"]) .hide-theme-light { display: revert !important; }
}

/* ==========================================================================
   3. UTILITY LAYER
   The Bootstrap 5 class vocabulary used by FOSSBilling core client templates.
   Only the classes core actually emits are implemented - this is a
   compatibility surface, not a general-purpose framework.
   ========================================================================== */

/* --- grid ---------------------------------------------------------------- */
.container,
.container-fluid {
  width: 100%;
  margin-inline: auto;
  padding-inline: 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-inline: calc(var(--space-3) * -1);
}
.row > * {
  width: 100%;
  max-width: 100%;
  padding-inline: var(--space-3);
  margin-top: 0;
}

.col { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }

.col-1  { flex: 0 0 auto; width: 8.3333%; }
.col-2  { flex: 0 0 auto; width: 16.6667%; }
.col-3  { flex: 0 0 auto; width: 25%; }
.col-4  { flex: 0 0 auto; width: 33.3333%; }
.col-5  { flex: 0 0 auto; width: 41.6667%; }
.col-6  { flex: 0 0 auto; width: 50%; }
.col-7  { flex: 0 0 auto; width: 58.3333%; }
.col-8  { flex: 0 0 auto; width: 66.6667%; }
.col-9  { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.3333%; }
.col-11 { flex: 0 0 auto; width: 91.6667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

.g-1 { --wb-gutter: var(--space-1); }
.g-2 { --wb-gutter: var(--space-2); }
.g-3 { --wb-gutter: var(--space-3); }
.g-4 { --wb-gutter: var(--space-4); }
.g-5 { --wb-gutter: var(--space-5); }
.row[class*="g-"] { margin-inline: calc(var(--wb-gutter) / -2); row-gap: var(--wb-gutter); }
.row[class*="g-"] > * { padding-inline: calc(var(--wb-gutter) / 2); }

/* --- display / flex ------------------------------------------------------ */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.justify-content-evenly { justify-content: space-evenly !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-baseline { align-items: baseline !important; }
.align-items-stretch { align-items: stretch !important; }
.align-self-center { align-self: center !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: var(--space-1) !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-5 { gap: var(--space-5) !important; }

.order-button { order: 0; }

/* --- spacing ------------------------------------------------------------- */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--space-1) !important; }
.m-2 { margin: var(--space-2) !important; }
.m-3 { margin: var(--space-3) !important; }
.m-4 { margin: var(--space-4) !important; }
.m-5 { margin: var(--space-5) !important; }
.m-auto { margin: auto !important; }
.mx-auto { margin-inline: auto !important; }
.mx-0 { margin-inline: 0 !important; }
.my-0 { margin-block: 0 !important; }
.my-1 { margin-block: var(--space-1) !important; }
.my-2 { margin-block: var(--space-2) !important; }
.my-3 { margin-block: var(--space-3) !important; }
.my-4 { margin-block: var(--space-4) !important; }
.my-5 { margin-block: var(--space-5) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--space-1) !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-3 { margin-top: var(--space-3) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-5 { margin-top: var(--space-5) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--space-1) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-3 { margin-bottom: var(--space-3) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-5 { margin-bottom: var(--space-5) !important; }
.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: var(--space-1) !important; }
.ms-2 { margin-left: var(--space-2) !important; }
.ms-3 { margin-left: var(--space-3) !important; }
.ms-auto { margin-left: auto !important; }
.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: var(--space-1) !important; }
.me-2 { margin-right: var(--space-2) !important; }
.me-3 { margin-right: var(--space-3) !important; }
.me-auto { margin-right: auto !important; }
.ml-2 { margin-left: var(--space-2) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--space-1) !important; }
.p-2 { padding: var(--space-2) !important; }
.p-3 { padding: var(--space-3) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-5 { padding: var(--space-5) !important; }
.px-0 { padding-inline: 0 !important; }
.px-1 { padding-inline: var(--space-1) !important; }
.px-2 { padding-inline: var(--space-2) !important; }
.px-3 { padding-inline: var(--space-3) !important; }
.px-4 { padding-inline: var(--space-4) !important; }
.py-0 { padding-block: 0 !important; }
.py-1 { padding-block: var(--space-1) !important; }
.py-2 { padding-block: var(--space-2) !important; }
.py-3 { padding-block: var(--space-3) !important; }
.py-4 { padding-block: var(--space-4) !important; }
.py-5 { padding-block: var(--space-5) !important; }
.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: var(--space-1) !important; }
.pt-2 { padding-top: var(--space-2) !important; }
.pt-3 { padding-top: var(--space-3) !important; }
.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: var(--space-1) !important; }
.pb-2 { padding-bottom: var(--space-2) !important; }
.pb-3 { padding-bottom: var(--space-3) !important; }
.ps-3 { padding-left: var(--space-3) !important; }

/* --- sizing -------------------------------------------------------------- */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.h-75 { min-height: 70vh; }

/* --- text ---------------------------------------------------------------- */
.text-start { text-align: left !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-nowrap { white-space: nowrap !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-break { overflow-wrap: anywhere; word-break: break-word; }
.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }
.text-decoration-none { text-decoration: none !important; }
.text-reset { color: inherit !important; }

.text-muted, .text-secondary { color: var(--text-muted) !important; }
.text-faint { color: var(--text-faint) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-dark, .link-body-emphasis { color: var(--text-strong) !important; }
.text-white { color: #fff !important; }

.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 680 !important; }

.fs-4 { font-size: var(--text-xl) !important; }
.fs-5 { font-size: var(--text-lg) !important; }
.fs-6 { font-size: var(--text-md) !important; }
.fs-7 { font-size: var(--text-sm) !important; }
.fs-8 { font-size: var(--text-xs) !important; }
.font-monospace { font-family: var(--font-mono) !important; }

.lh-1 { line-height: 1 !important; }
.num, .greenNum, .redNum, .bludNum { font-variant-numeric: tabular-nums; }
.greenNum { color: var(--success); }
.redNum { color: var(--danger); }
.bludNum { color: var(--primary); }

/* --- borders, radius, shadow, background --------------------------------- */
.border { border: 1px solid var(--border) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--border) !important; }
.border-bottom { border-bottom: 1px solid var(--border) !important; }
.border-start { border-left: 1px solid var(--border) !important; }
.border-end { border-right: 1px solid var(--border) !important; }
.border-start-0 { border-left: 0 !important; }
.border-end-0 { border-right: 0 !important; }
.border-primary { border-color: var(--primary) !important; }

.rounded-0 { border-radius: 0 !important; }
.rounded { border-radius: var(--radius) !important; }
.rounded-2 { border-radius: var(--radius-sm) !important; }
.rounded-3 { border-radius: var(--radius-lg) !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-pill { border-radius: var(--radius-pill) !important; }

.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.bg-transparent { background-color: transparent !important; }
.bg-light { background-color: var(--surface-sunken) !important; }
.bg-body { background-color: var(--surface) !important; }

.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-y-visible { overflow-y: visible !important; }

.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }
.top-0 { top: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.start-0 { left: 0 !important; }
.left-0 { left: 0 !important; }
.end-0 { right: 0 !important; }
.float-end { float: right !important; }
.pull-right { float: right !important; }

.img-fluid { max-width: 100%; height: auto; }
.img-thumbnail {
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.ratio { position: relative; width: 100%; }
.ratio::before { display: block; padding-top: var(--wb-ratio, 100%); content: ""; }
.ratio > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.ratio-1x1 { --wb-ratio: 100%; }

.invisible { visibility: hidden !important; }
.visible { visibility: visible !important; }

/* ==========================================================================
   4. COMPONENTS
   ========================================================================== */

/* --- buttons ------------------------------------------------------------- */
.btn {
  --wb-btn-bg: var(--surface);
  --wb-btn-fg: var(--text);
  --wb-btn-bd: var(--border-strong);
  --wb-btn-bg-hover: var(--surface-hover);
  --wb-btn-bd-hover: var(--border-strong);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 9px 16px;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 560;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  color: var(--wb-btn-fg);
  background-color: var(--wb-btn-bg);
  border: 1px solid var(--wb-btn-bd);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: background-color var(--transition), border-color var(--transition),
    color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn:hover {
  color: var(--wb-btn-fg);
  text-decoration: none;
  background-color: var(--wb-btn-bg-hover);
  border-color: var(--wb-btn-bd-hover);
}
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled,
.btn.disabled,
fieldset:disabled .btn {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}
.btn .icon { width: 1.05em; height: 1.05em; }

.btn-primary {
  --wb-btn-bg: var(--primary);
  --wb-btn-fg: var(--primary-contrast);
  --wb-btn-bd: var(--primary);
  --wb-btn-bg-hover: var(--primary-hover);
  --wb-btn-bd-hover: var(--primary-hover);
  box-shadow: 0 1px 2px rgba(20, 102, 255, 0.24);
}
.btn-secondary {
  --wb-btn-bg: var(--surface-sunken);
  --wb-btn-fg: var(--text);
  --wb-btn-bd: var(--border);
  --wb-btn-bg-hover: var(--surface-hover);
}
.btn-dark {
  --wb-btn-bg: var(--text-strong);
  --wb-btn-fg: var(--surface);
  --wb-btn-bd: var(--text-strong);
  --wb-btn-bg-hover: var(--text);
  --wb-btn-bd-hover: var(--text);
}
:root[data-bs-theme="dark"] .btn-dark,
:root[data-bs-theme="dark"] .btn-secondary {
  --wb-btn-bg: var(--surface-alt);
  --wb-btn-fg: var(--text);
  --wb-btn-bd: var(--border-strong);
  --wb-btn-bg-hover: var(--surface-hover);
}
.btn-success {
  --wb-btn-bg: var(--success);
  --wb-btn-fg: #fff;
  --wb-btn-bd: var(--success);
  --wb-btn-bg-hover: color-mix(in srgb, var(--success) 88%, #000);
}
.btn-danger {
  --wb-btn-bg: var(--danger);
  --wb-btn-fg: #fff;
  --wb-btn-bd: var(--danger);
  --wb-btn-bg-hover: color-mix(in srgb, var(--danger) 88%, #000);
}
.btn-warning {
  --wb-btn-bg: var(--warning);
  --wb-btn-fg: #fff;
  --wb-btn-bd: var(--warning);
  --wb-btn-bg-hover: color-mix(in srgb, var(--warning) 88%, #000);
}
.btn-info {
  --wb-btn-bg: var(--secondary);
  --wb-btn-fg: #04212a;
  --wb-btn-bd: var(--secondary);
  --wb-btn-bg-hover: var(--secondary-hover);
}
:root[data-bs-theme="dark"] .btn-success,
:root[data-bs-theme="dark"] .btn-danger,
:root[data-bs-theme="dark"] .btn-warning { --wb-btn-fg: #04101f; }

/* outline */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-info {
  --wb-btn-bg: transparent;
  box-shadow: none;
}
.btn-outline-primary { --wb-btn-fg: var(--primary); --wb-btn-bd: color-mix(in srgb, var(--primary) 42%, transparent); --wb-btn-bg-hover: var(--primary-light); --wb-btn-bd-hover: var(--primary); }
.btn-outline-secondary { --wb-btn-fg: var(--text); --wb-btn-bd: var(--border-strong); --wb-btn-bg-hover: var(--surface-hover); }
.btn-outline-success { --wb-btn-fg: var(--success); --wb-btn-bd: var(--success-border); --wb-btn-bg-hover: var(--success-bg); }
.btn-outline-danger { --wb-btn-fg: var(--danger); --wb-btn-bd: var(--danger-border); --wb-btn-bg-hover: var(--danger-bg); }
.btn-outline-info { --wb-btn-fg: var(--info); --wb-btn-bd: var(--info-border); --wb-btn-bg-hover: var(--info-bg); }

/* ghost + link */
.wb-btn-ghost {
  --wb-btn-bg: transparent;
  --wb-btn-fg: var(--text-muted);
  --wb-btn-bd: transparent;
  --wb-btn-bg-hover: var(--surface-hover);
  --wb-btn-bd-hover: transparent;
  box-shadow: none;
}
.wb-btn-ghost:hover { --wb-btn-fg: var(--text); }
.btn-link {
  --wb-btn-bg: transparent;
  --wb-btn-fg: var(--link);
  --wb-btn-bd: transparent;
  --wb-btn-bg-hover: transparent;
  --wb-btn-bd-hover: transparent;
  box-shadow: none;
  padding-inline: 4px;
}
.btn-link:hover { --wb-btn-fg: var(--link-hover); text-decoration: underline; }

.btn-sm { padding: 6px 12px; font-size: var(--text-sm); border-radius: var(--radius-xs); }
.btn-lg, .btn-large, .btn-big { padding: 12px 22px; font-size: var(--text-md); border-radius: var(--radius); }
.btn-icon { padding: 8px; aspect-ratio: 1; }

.btn.wb-loading { color: transparent !important; pointer-events: none; position: relative; }
.btn.wb-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 15px; height: 15px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--wb-btn-fg);
  animation: wb-spin 0.6s linear infinite;
}

.btn-group { display: inline-flex; vertical-align: middle; }
.btn-group > .btn { border-radius: 0; margin-left: -1px; box-shadow: none; }
.btn-group > .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group > .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group > .btn:hover { z-index: 1; }

.btn-close {
  width: 32px; height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}
.btn-close::before { content: "\00d7"; font-size: 1.4rem; line-height: 1; }
.btn-close:hover { color: var(--text); background: var(--surface-hover); }

.btn-check { position: absolute; opacity: 0; pointer-events: none; }

.icon-link { display: inline-flex; align-items: center; gap: 6px; }

/* --- cards --------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: var(--space-4) var(--space-5);
  background: transparent;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card-header > h1, .card-header > h2, .card-header > h3,
.card-header h1, .card-header h5, .card-header h6 { margin-bottom: 0; }
.card-header h1 { font-size: var(--text-xl); }

.card-body { flex: 1 1 auto; padding: var(--space-5); }
.card-footer {
  padding: var(--space-4) var(--space-5);
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.card-title { margin-bottom: var(--space-2); font-size: var(--text-md); font-weight: 620; }
.card-subtitle { font-size: var(--text-sm); color: var(--text-muted); }
.card-text { margin-bottom: var(--space-3); }
.card > .list-group:last-child { border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }

/* Nested cards (core uses card-in-card on news/tickets) read as list rows. */
.card .card { box-shadow: none; border-radius: var(--radius); }
.card .card:hover { border-color: var(--border-strong); }


.well {
  padding: var(--space-4);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* --- tables -------------------------------------------------------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--text-base);
  color: var(--text);
  vertical-align: middle;
}
.table > thead th {
  padding: 11px var(--space-4);
  font-size: var(--text-xs);
  font-weight: 620;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
.table > thead th:first-child { border-top-left-radius: var(--radius-sm); }
.table > thead th:last-child { border-top-right-radius: var(--radius-sm); }
.table > tbody > tr > td,
.table > tfoot > tr > td {
  padding: 13px var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
.table > tbody > tr:last-child > td { border-bottom: 0; }
.table > tfoot > tr > td { font-weight: 600; background: var(--surface-alt); border-bottom: 0; border-top: 1px solid var(--border); }
.table a { font-weight: 550; }

.table-hover > tbody > tr { transition: background-color var(--transition); }
.table-hover > tbody > tr:hover { background: var(--surface-hover); }
.table-striped > tbody > tr:nth-of-type(odd) { background: var(--surface-alt); }
.table-striped.table-hover > tbody > tr:hover { background: var(--surface-hover); }
.table-sm > thead th, .table-sm > tbody > tr > td { padding: 8px var(--space-3); }
.table-borderless > tbody > tr > td,
.table-borderless > thead th { border: 0; }
/* Core adds .table-bordered; a full grid fights the design language, so the
   horizontal rules above are kept and only vertical separators are added. */
.table-bordered > tbody > tr > td + td,
.table-bordered > thead th + th { border-left: 1px solid var(--border-subtle); }

.table .actions { white-space: nowrap; text-align: right; }
.table .actions .btn + .btn { margin-left: var(--space-2); }

/* --- badges -------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  color: var(--neutral);
  background: var(--neutral-bg);
  border: 1px solid var(--neutral-border);
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.wb-badge-plain::before { display: none; }

.badge.bg-primary, .badge.text-bg-primary { color: var(--primary); background: var(--primary-light); border-color: color-mix(in srgb, var(--primary) 30%, transparent); }
.badge.bg-success, .badge.text-bg-success { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.badge.bg-warning, .badge.text-bg-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.badge.bg-danger, .badge.text-bg-danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.badge.bg-info, .badge.text-bg-info { color: var(--info); background: var(--info-bg); border-color: var(--info-border); }
.badge.bg-secondary, .badge.text-bg-secondary { color: var(--neutral); background: var(--neutral-bg); border-color: var(--neutral-border); }

/* --- alerts -------------------------------------------------------------- */
.alert {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: flex-start;
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--neutral-bg);
  border: 1px solid var(--neutral-border);
  border-left: 3px solid var(--neutral);
  border-radius: var(--radius);
}
.alert > * { min-width: 0; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert-heading { color: inherit; margin-bottom: var(--space-1); }
.alert-link { font-weight: 620; color: inherit; text-decoration: underline; }
.alert-primary { color: var(--text); background: var(--primary-subtle); border-color: color-mix(in srgb, var(--primary) 24%, transparent); border-left-color: var(--primary); }
.alert-info { background: var(--info-bg); border-color: var(--info-border); border-left-color: var(--info); }
.alert-success { background: var(--success-bg); border-color: var(--success-border); border-left-color: var(--success); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); border-left-color: var(--warning); }
.alert-danger { background: var(--danger-bg); border-color: var(--danger-border); border-left-color: var(--danger); }
.alert-secondary, .alert-light { background: var(--surface-sunken); border-color: var(--border); border-left-color: var(--border-strong); }
.alert-dismissible { padding-right: 52px; }
.alert-dismissible .btn-close { position: absolute; top: 8px; right: 8px; }
.alert-block .row { margin: 0; }

/* --- forms --------------------------------------------------------------- */
.form-label,
.col-form-label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--text-sm);
  font-weight: 560;
  color: var(--text);
}
.form-control,
.form-select,
textarea.form-control,
input[type="text"].form-control,
input[type="email"].form-control,
input[type="password"].form-control {
  display: block;
  width: 100%;
  padding: 9px 13px;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--surface);
  background-clip: padding-box;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2364748b' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}
:root[data-bs-theme="dark"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239aa9c2' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
}
.form-control::placeholder { color: var(--text-faint); opacity: 1; }
.form-control:hover, .form-select:hover { border-color: var(--text-faint); }
.form-control:focus,
.form-select:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}
.form-control:disabled, .form-control[readonly], .form-select:disabled {
  color: var(--text-muted);
  background-color: var(--surface-sunken);
  cursor: not-allowed;
}
textarea.form-control { min-height: 110px; resize: vertical; line-height: 1.6; }
.form-control-sm, .form-select-sm { padding: 6px 11px; font-size: var(--text-sm); }
.form-select-sm { padding-right: 32px; }

.form-control.is-invalid, .form-select.is-invalid, .form-control[aria-invalid="true"] {
  border-color: var(--danger);
}
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 24%, transparent); }
.form-control.is-valid { border-color: var(--success); }
.invalid-feedback {
  display: block;
  margin-top: 5px;
  font-size: var(--text-sm);
  color: var(--danger);
}
.valid-feedback { display: block; margin-top: 5px; font-size: var(--text-sm); color: var(--success); }

.form-text, .form-hint {
  display: block;
  margin-top: 6px;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.is-required + .form-text::after { content: ""; }

/* legacy / bootstrap 2 remnants still emitted by a few core templates */
.control-group, .form-group { margin-bottom: var(--space-4); }
.controls, .form-controls { display: block; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.form-inline { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.form { background: none; }

.form-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  min-height: 1.5rem;
  margin-bottom: var(--space-2);
}
.form-check-input {
  flex: 0 0 auto;
  width: 18px; height: 18px;
  margin-top: 2px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  appearance: none;
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8'/%3E%3C/svg%3E");
}
.form-check-input[type="radio"]:checked {
  background-image: none;
  box-shadow: inset 0 0 0 4px var(--surface);
}
.form-check-input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.form-check-label { font-size: var(--text-base); cursor: pointer; }

.form-switch .form-check-input {
  width: 38px;
  height: 21px;
  border-radius: var(--radius-pill);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='5' fill='%23cfd9e8'/%3E%3C/svg%3E");
  background-position: left 3px center;
  background-size: 15px;
  background-repeat: no-repeat;
  transition: background-position var(--transition), background-color var(--transition);
}
.form-switch .form-check-input:checked {
  background-position: right 3px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='5' fill='%23fff'/%3E%3C/svg%3E");
  box-shadow: none;
}

.form-floating { position: relative; }
.form-floating > label { color: var(--text-muted); font-size: var(--text-sm); }

.input-group { display: flex; width: 100%; }
.input-group > .form-control,
.input-group > .form-select { flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group > :not(:first-child) { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group > .form-control:focus,
.input-group > .btn:focus-visible { z-index: 3; }
.input-group-text, .input-group-text-sm, .input-append {
  display: flex;
  align-items: center;
  padding: 9px 13px;
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* CKEditor / markdown editor host used by the support module */
.editor-textarea { min-height: 160px; }
.ck-editor__editable { min-height: 180px; }
.ck.ck-editor__main > .ck-editor__editable,
.ck.ck-toolbar {
  background: var(--surface) !important;
  border-color: var(--border-strong) !important;
  color: var(--text) !important;
}

/* intl-tel-input is optional; when its JS is absent the field is a plain
   tel input and must still look native to the design system. */
.iti { width: 100%; }
.iti__country-list { background: var(--surface); color: var(--text); border-color: var(--border); }

/* --- nav & tabs ---------------------------------------------------------- */
.nav { display: flex; flex-wrap: wrap; padding-left: 0; margin: 0; list-style: none; }
.nav-item { display: block; }
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 9px 14px;
  font-size: var(--text-base);
  font-weight: 540;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--surface-hover); text-decoration: none; }
.nav-link.active { color: var(--primary); }

.nav-tabs {
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-5);
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs .nav-link {
  position: relative;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: -1px;
  white-space: nowrap;
  padding-inline: 14px;
}
.nav-tabs .nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 8px;
  bottom: 0;
  height: 2px;
  background: transparent;
  border-radius: 2px 2px 0 0;
  transition: background-color var(--transition);
}
.nav-tabs .nav-link.active { color: var(--primary); background: transparent; }
.nav-tabs .nav-link.active::after { background: var(--primary); }
.card-header-tabs { margin-bottom: calc(var(--space-4) * -1 - 1px); border-bottom: 0; }
.card-header:has(.card-header-tabs) { padding-bottom: 0; }

.nav-pills .nav-link.active { color: var(--primary-contrast); background: var(--primary); }

.tab-content > .tab-pane { display: none; }
.tab-content > .tab-pane.active { display: block; }
.tab-content > .tab-pane.fade { opacity: 0; transition: opacity var(--transition-slow); }
.tab-content > .tab-pane.fade.show,
.tab-content > .tab-pane.active:not(.fade) { opacity: 1; }
.tab-content > .tab-pane.active.fade { opacity: 1; }

/* --- list groups --------------------------------------------------------- */
.list-group { display: flex; flex-direction: column; padding-left: 0; margin: 0; list-style: none; border-radius: var(--radius); }
.list-group-item {
  position: relative;
  display: block;
  padding: var(--space-3) var(--space-4);
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-top: -1px;
  transition: background-color var(--transition), color var(--transition);
}
.list-group-item:first-child { margin-top: 0; border-radius: var(--radius) var(--radius) 0 0; }
.list-group-item:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.list-group-item:only-child { border-radius: var(--radius); }
a.list-group-item:hover,
.list-group-item-action:hover { background: var(--surface-hover); color: var(--text-strong); text-decoration: none; z-index: 1; }
a.list-group-item .icon { color: var(--text-faint); transition: transform var(--transition), color var(--transition); }
a.list-group-item:hover .icon { color: var(--primary); transform: translateX(2px); }
.list-group-flush .list-group-item {
  border-inline: 0;
  border-radius: 0;
  background: transparent;
}
.list-group-flush .list-group-item:first-child { border-top: 0; }
.list-group-flush .list-group-item:last-child { border-bottom: 0; }

/* --- dropdowns ----------------------------------------------------------- */
.dropdown, .dropup { position: relative; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: var(--space-2); }
.dropdown-toggle::after {
  content: "";
  width: 0; height: 0;
  margin-left: 2px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
  opacity: 0.6;
  transition: transform var(--transition);
}
.dropdown-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  z-index: 1200;
  top: calc(100% + 6px);
  right: 0;
  display: none;
  min-width: 214px;
  padding: 6px;
  margin: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.dropdown-menu.show {
  display: block;
  animation: wb-pop var(--transition) ease-out;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: 8px 12px;
  clear: both;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
  border-radius: var(--radius-xs);
  cursor: pointer;
}
.dropdown-item:hover, .dropdown-item:focus { color: var(--text-strong); background: var(--surface-hover); text-decoration: none; }
.dropdown-item.wb-danger { color: var(--danger); }
.dropdown-item.wb-danger:hover { background: var(--danger-bg); }
.dropdown-divider {
  height: 0;
  margin: 5px 4px;
  overflow: hidden;
  border-top: 1px solid var(--border);
}
/* core dashboard breadcrumbs abuse .dropdown-divider as a "/" separator */
li > .dropdown-divider { display: inline; border: 0; margin: 0 4px; color: var(--text-faint); }

/* --- modals -------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--space-4);
  background: var(--overlay);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.modal.show { display: block; }
.modal.fade .modal-dialog { transform: translateY(-12px); opacity: 0; transition: transform var(--transition-slow), opacity var(--transition-slow); }
.modal.fade.show .modal-dialog { transform: none; opacity: 1; }
.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: max(var(--space-5), 4vh) auto;
}
.modal-lg { max-width: 760px; }
.modal-content {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}
.modal-title { margin: 0; font-size: var(--text-md); font-weight: 620; }
.modal-body { padding: var(--space-5); overflow-y: auto; max-height: calc(100vh - 220px); }
.modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
}
body.wb-modal-open { overflow: hidden; }

/* --- collapse & accordion ------------------------------------------------ */
.collapse:not(.show) { display: none; }
.collapsing { height: 0; overflow: hidden; transition: height var(--transition-slow); }

.accordion { display: flex; flex-direction: column; gap: var(--space-3); }
.accordion-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.accordion-header { margin: 0; }
.accordion-button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-4) var(--space-5);
  font-family: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-strong);
  text-align: left;
  background: var(--surface-alt);
  border: 0;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition);
}
.accordion-button:hover { background: var(--surface-hover); }
.accordion-button:not(.collapsed) { color: var(--primary); background: var(--primary-subtle); box-shadow: inset 3px 0 0 var(--primary); }
.accordion-button::after {
  content: "";
  width: 0; height: 0;
  margin-left: auto;
  border: 5px solid transparent;
  border-top-color: currentColor;
  border-bottom: 0;
  opacity: 0.55;
  transition: transform var(--transition);
}
.accordion-button.collapsed::after { transform: rotate(-90deg); }
.accordion-body { padding: var(--space-5); }
.accordion-inner { min-width: 0; }

/* --- pagination ---------------------------------------------------------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 0;
  margin: var(--space-5) 0 0;
  list-style: none;
}
.page-item { display: block; }
.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: var(--text-sm);
  font-weight: 560;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}
.page-link:hover { color: var(--text-strong); background: var(--surface-hover); border-color: var(--border-strong); text-decoration: none; }
.page-item.active .page-link {
  color: var(--primary-contrast);
  background: var(--primary);
  border-color: var(--primary);
}
.page-item.disabled .page-link { opacity: 0.42; pointer-events: none; }

/* --- breadcrumbs --------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 0;
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  list-style: none;
  color: var(--text-muted);
}
.breadcrumb-item, .breadcrumb > li { display: flex; align-items: center; min-width: 0; }
.breadcrumb-item + .breadcrumb-item::before,
.breadcrumb > li + li::before {
  content: "/";
  padding-inline: 8px;
  color: var(--text-faint);
}
.breadcrumb-item a, .breadcrumb > li a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active, .breadcrumb > li.active {
  color: var(--text);
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 42ch;
}

/* --- progress ------------------------------------------------------------ */
.progress {
  display: flex;
  height: 8px;
  overflow: hidden;
  background: var(--surface-sunken);
  border-radius: var(--radius-pill);
}
.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: #fff;
  background: var(--gradient-brand);
  transition: width var(--transition-slow);
}
.progress-bar-striped {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.16) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.16) 75%, transparent 75%, transparent);
  background-size: 12px 12px;
}
.progress-bar-animated { animation: wb-stripes 1s linear infinite; }

/* --- tooltips (JS-driven, see webboomers.js) ----------------------------- */
.wb-tooltip {
  position: absolute;
  z-index: 1600;
  max-width: 260px;
  padding: 6px 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.45;
  color: var(--surface);
  background: var(--text-strong);
  border-radius: var(--radius-xs);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}
.wb-tooltip.wb-in { opacity: 1; }
:root[data-bs-theme="dark"] .wb-tooltip { color: var(--text-strong); background: var(--surface-alt); border: 1px solid var(--border); }

/* --- toasts -------------------------------------------------------------- */
.toast-container {
  position: fixed;
  z-index: 1700;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  max-width: min(400px, calc(100vw - 24px));
  pointer-events: none;
}
.wb-toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: 13px var(--space-4);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: wb-slide-in var(--transition-slow) ease-out;
}
.wb-toast.wb-out { animation: wb-slide-out var(--transition-slow) ease-in forwards; }
.wb-toast-body { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.wb-toast .icon { margin-top: 3px; }
.wb-toast--success { border-left-color: var(--success); }
.wb-toast--success .icon { color: var(--success); }
.wb-toast--error { border-left-color: var(--danger); }
.wb-toast--error .icon { color: var(--danger); }
.wb-toast--warning { border-left-color: var(--warning); }
.wb-toast--warning .icon { color: var(--warning); }
.wb-toast--info .icon { color: var(--primary); }
.wb-toast .btn-close { width: 24px; height: 24px; margin: -2px -4px 0 0; }

/* --- loading / wait ------------------------------------------------------ */
.wait, .loading {
  position: fixed;
  inset: 0;
  z-index: 1800;
  background: var(--overlay);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.spinner-border {
  display: inline-block;
  width: 1.4rem;
  height: 1.4rem;
  border: 2.5px solid var(--primary);
  border-right-color: transparent;
  border-radius: 50%;
  animation: wb-spin 0.7s linear infinite;
}


/* --- flash messages (core partial_message.html.twig) --------------------- */
.h-block {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-sunken);
}
.h-block h2 {
  margin: 0 0 4px;
  font-size: var(--text-xs);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.h-block p { margin: 0; }
.h-block.success { background: var(--success-bg); border-color: var(--success-border); border-left-color: var(--success); }
.h-block.success h2 { color: var(--success); }
.h-block.error, .h-block.danger { background: var(--danger-bg); border-color: var(--danger-border); border-left-color: var(--danger); }
.h-block.error h2, .h-block.danger h2 { color: var(--danger); }
.h-block.info { background: var(--info-bg); border-color: var(--info-border); border-left-color: var(--info); }
.h-block.info h2 { color: var(--info); }
.h-block.warning { background: var(--warning-bg); border-color: var(--warning-border); border-left-color: var(--warning); }
.h-block.warning h2 { color: var(--warning); }

/* --- link helpers used by core -------------------------------------------- */
.link-underline { text-decoration: underline; text-underline-offset: 2px; }
.link-underline-opacity-0 { text-decoration: none; }
.link-underline-opacity-75-hover:hover, .link-offset-3-hover:hover { text-decoration: underline; }
.link-offset-2 { text-underline-offset: 2px; }

/* ==========================================================================
   5. APPLICATION SHELL
   ========================================================================== */

.wb-app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

/* --- sidebar ------------------------------------------------------------- */
.wb-sidebar {
  position: fixed;
  inset-block: 0;
  left: 0;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  background: var(--nav-surface);
  border-right: 1px solid var(--border);
  transition: width var(--transition-slow), transform var(--transition-slow);
}

.wb-sidebar__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--topbar-h);
  padding-inline: var(--space-5);
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border-subtle);
}
.wb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-strong);
}
.wb-brand:hover { text-decoration: none; color: var(--text-strong); }
.wb-brand img { height: 32px; width: auto; max-width: 100%; object-fit: contain; }
.wb-brand__mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: 0 0 auto;
  color: #fff;
  background: var(--gradient-brand);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(20, 102, 255, 0.28);
}
.wb-brand__mark .icon { width: 19px; height: 19px; }
.wb-brand__name {
  font-size: var(--text-md);
  font-weight: 680;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wb-sidebar__nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-4) var(--space-3);
  scrollbar-width: thin;
}
.wb-sidebar__foot {
  flex: 0 0 auto;
  padding: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.wb-nav { display: flex; flex-direction: column; gap: 2px; padding: 0; margin: 0; list-style: none; }
.wb-nav__label {
  padding: var(--space-4) 12px 6px;
  font-size: var(--text-xs);
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}
.wb-nav__label:first-child { padding-top: 4px; }

.wb-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  font-size: var(--text-base);
  font-weight: 520;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background-color var(--transition);
}
.wb-nav__link:hover {
  color: var(--text-strong);
  background: var(--surface-hover);
  text-decoration: none;
}
.wb-nav__link .icon {
  width: 19px; height: 19px;
  flex: 0 0 auto;
  color: var(--text-faint);
  transition: color var(--transition);
}
.wb-nav__link:hover .icon { color: var(--text-muted); }
.wb-nav__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-nav__link.is-active {
  color: var(--primary);
  font-weight: 620;
  background: var(--primary-light);
}
.wb-nav__link.is-active .icon { color: var(--primary); }
.wb-nav__link.is-active::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 50%;
  translate: 0 -50%;
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.wb-nav__count {
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 22px;
  padding: 1px 7px;
  font-size: var(--text-xs);
  font-weight: 650;
  text-align: center;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: var(--radius-pill);
}
.wb-nav__link.is-danger { color: var(--text-muted); }
.wb-nav__link.is-danger:hover { color: var(--danger); background: var(--danger-bg); }
.wb-nav__link.is-danger:hover .icon { color: var(--danger); }

/* sidebar mini cards */
.wb-sidecard {
  padding: var(--space-4);
  margin: var(--space-3) 0 0;
  background: var(--gradient-brand-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: var(--radius);
}
.wb-sidecard__label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 620;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.wb-sidecard__value {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-strong);
}
.wb-sidecard__note { font-size: var(--text-sm); color: var(--text-muted); }
.wb-sidecard .btn { margin-top: var(--space-3); width: 100%; }

/* --- collapsed rail (desktop only, persisted in localStorage) ------------ */
@media (min-width: 992px) {
  body.wb-rail { --sidebar-w: var(--sidebar-w-collapsed); }
  body.wb-rail .wb-sidebar__head { padding-inline: 0; justify-content: center; }
  body.wb-rail .wb-brand__name,
  body.wb-rail .wb-brand img,
  body.wb-rail .wb-nav__text,
  body.wb-rail .wb-nav__label,
  body.wb-rail .wb-nav__count,
  body.wb-rail .wb-sidecard { display: none; }
  body.wb-rail .wb-nav__link { justify-content: center; padding-inline: 0; }
  body.wb-rail .wb-sidebar__nav { padding-inline: 10px; }
}

/* --- main column --------------------------------------------------------- */
.wb-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-w);
  transition: margin-left var(--transition-slow);
}

/* --- topbar -------------------------------------------------------------- */
.wb-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: var(--topbar-h);
  padding-inline: clamp(var(--space-4), 3vw, var(--space-6));
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.wb-topbar__title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* Absorbs the shrink first, so a long page title (a ticket subject, say)
     is truncated rather than pushing the account menu off-screen. */
  flex: 1 1 auto;
}
.wb-topbar__title h1 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 650;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-topbar__crumb {
  font-size: var(--text-xs);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-topbar__crumb .breadcrumb { margin: 0; font-size: var(--text-xs); flex-wrap: nowrap; overflow: hidden; }
.wb-topbar__crumb .breadcrumb-item.active { max-width: 30ch; }
.wb-topbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  /* Must not shrink: these are fixed-size icon controls, and letting the
     cluster compress makes the avatar spill past the viewport. The title
     above carries flex-shrink instead and truncates. */
  flex: 0 0 auto;
}

.wb-iconbtn {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}
.wb-iconbtn:hover { color: var(--text-strong); background: var(--surface-hover); border-color: var(--border); }
.wb-iconbtn .icon { width: 19px; height: 19px; }
.wb-iconbtn[aria-pressed="true"] { color: var(--primary); background: var(--primary-light); }

/* theme toggle - only the icon for the current state is shown */
.wb-theme-toggle .icon { display: none; }
.wb-theme-toggle[data-state="light"] .wb-ico-light,
.wb-theme-toggle[data-state="dark"] .wb-ico-dark,
.wb-theme-toggle[data-state="auto"] .wb-ico-auto { display: block; }

/* account menu */
.wb-account { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.wb-account__btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 230px;
  min-width: 0;
  flex: 0 1 auto;
  padding: 5px 10px 5px 5px;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color var(--transition), border-color var(--transition);
}
.wb-account__btn:hover { background: var(--surface-hover); border-color: var(--border); }
.wb-account__avatar {
  width: 30px; height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: var(--text-xs);
  font-weight: 680;
  color: #fff;
  background: var(--gradient-brand);
  border-radius: 50%;
}
.wb-account__avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.wb-account__avatar > div { width: 100%; height: 100%; }
/* Every level between the button and the text must be allowed to shrink:
   flex items default to min-width:auto, and the utility classes core-style
   templates put on the label wrapper force display:block, so without this a
   long client name pushes the whole topbar past the viewport. */
.wb-account__btn > * { min-width: 0; }
.wb-account__btn > span:not(.wb-account__avatar) { overflow: hidden; }
.wb-account__name,
.wb-account__meta {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-account__name {
  font-size: var(--text-sm);
  font-weight: 560;
  line-height: 1.25;
}
.wb-account__meta { font-size: var(--text-xs); color: var(--text-muted); font-weight: 400; }

.wb-menu-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 5px;
}
.wb-menu-head strong { display: block; font-size: var(--text-sm); }
.wb-menu-head span { display: block; font-size: var(--text-xs); color: var(--text-muted); overflow-wrap: anywhere; }

/* --- content ------------------------------------------------------------- */
.wb-content {
  flex: 1 1 auto;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: clamp(var(--space-4), 2.6vw, var(--space-6));
}

.wb-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.wb-page-head__text { min-width: 0; flex: 1 1 320px; }
.wb-page-head h1 {
  margin: 0 0 4px;
  font-size: clamp(1.4rem, 3.2vw, var(--text-2xl));
  font-weight: 700;
  letter-spacing: -0.025em;
}
.wb-page-head p { margin: 0; color: var(--text-muted); max-width: 68ch; }
.wb-page-head__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); flex: 0 0 auto; }

/* --- footer -------------------------------------------------------------- */
.wb-footer {
  padding: var(--space-5) clamp(var(--space-4), 2.6vw, var(--space-6));
  margin-top: auto;
  font-size: var(--text-sm);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.wb-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  max-width: var(--content-max);
  margin-inline: auto;
}
.wb-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.wb-footer a { color: var(--text-muted); }
.wb-footer a:hover { color: var(--primary); }
.wb-footer__bank {
  flex-basis: 100%;
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border);
  font-size: var(--text-xs);
  line-height: 1.7;
}

/* --- mobile drawer ------------------------------------------------------- */
.wb-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: var(--overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}
body.wb-drawer-open .wb-backdrop { opacity: 1; visibility: visible; }
body.wb-drawer-open { overflow: hidden; }

.wb-burger { display: none; }
.wb-sidebar__close { display: none; }

/* Back-to-top */
.wb-totop {
  position: fixed;
  right: clamp(12px, 3vw, 24px);
  bottom: clamp(12px, 3vw, 24px);
  z-index: 900;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  color: var(--primary-contrast);
  background: var(--primary);
  border: 0;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition), background-color var(--transition);
}
.wb-totop.wb-in { opacity: 1; visibility: visible; }
.wb-totop:hover { background: var(--primary-hover); color: var(--primary-contrast); }

/* ==========================================================================
   6. PAGE COMPOSITIONS
   ========================================================================== */

/* --- greeting ------------------------------------------------------------ */
.wb-hello {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: clamp(var(--space-4), 2.5vw, var(--space-6));
  margin-bottom: var(--space-5);
  background: var(--gradient-brand-soft), var(--surface);
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.wb-hello::after {
  content: "";
  position: absolute;
  right: -60px; top: -80px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, color-mix(in srgb, var(--secondary) 26%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
.wb-hello__text { position: relative; min-width: 0; flex: 1 1 300px; }
.wb-hello__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 620;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
}
.wb-hello h1 {
  margin: 6px 0 4px;
  font-size: clamp(1.35rem, 3.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  overflow-wrap: anywhere;
}
.wb-hello p { margin: 0; color: var(--text-muted); }
.wb-hello__actions { position: relative; display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* --- stat cards ---------------------------------------------------------- */
.wb-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.wb-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
a.wb-stat:hover {
  text-decoration: none;
  color: inherit;
  border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.wb-stat__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.wb-stat__icon {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-light);
}
.wb-stat__icon .icon { width: 19px; height: 19px; }
.wb-stat--cyan .wb-stat__icon { color: var(--secondary); background: var(--secondary-light); }
.wb-stat--success .wb-stat__icon { color: var(--success); background: var(--success-bg); }
.wb-stat--warning .wb-stat__icon { color: var(--warning); background: var(--warning-bg); }
.wb-stat--danger .wb-stat__icon { color: var(--danger); background: var(--danger-bg); }
.wb-stat__value {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}
.wb-stat__label {
  font-size: var(--text-sm);
  font-weight: 540;
  color: var(--text-muted);
}
.wb-stat__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  padding-top: var(--space-3);
  margin-top: auto;
  border-top: 1px dashed var(--border);
}
.wb-stat__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-weight: 620;
  border-radius: var(--radius-pill);
  color: var(--neutral);
  background: var(--neutral-bg);
}
.wb-stat__chip .icon { width: 12px; height: 12px; }
.wb-stat__chip--success { color: var(--success); background: var(--success-bg); }
.wb-stat__chip--warning { color: var(--warning); background: var(--warning-bg); }
.wb-stat__chip--danger { color: var(--danger); background: var(--danger-bg); }
.wb-stat__chip--info { color: var(--info); background: var(--info-bg); }

/* --- panel grid ---------------------------------------------------------- */
.wb-grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
/* --2 is a deliberate two-up composition, not "as many as fit": the dashboard
   is meant to read as a 2x2 board rather than reflowing to three narrow
   columns on a wide screen. */
@media (min-width: 992px) {
  .wb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.wb-grid--3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.wb-grid--aside { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: start; }

.wb-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.wb-panel__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}
.wb-panel__head h2, .wb-panel__head h3 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 640;
  letter-spacing: -0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-panel__head .wb-panel__aside { margin-left: auto; flex: 0 0 auto; display: flex; gap: var(--space-2); align-items: center; }
.wb-panel__body { padding: var(--space-5); flex: 1 1 auto; min-width: 0; }
.wb-panel__body--flush { padding: 0; }
.wb-panel__foot {
  padding: var(--space-3) var(--space-5);
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
}
.wb-panel__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- record rows (mobile-friendly alternative to wide tables) ------------ */
.wb-rows { display: flex; flex-direction: column; }
.wb-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition);
}
.wb-row:last-child { border-bottom: 0; }
a.wb-row:hover { background: var(--surface-hover); color: inherit; text-decoration: none; }
.wb-row__icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: 0 0 auto;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 10px;
}
.wb-row__icon .icon { width: 17px; height: 17px; }
.wb-row__main { flex: 1 1 auto; min-width: 0; }
.wb-row__title {
  display: block;
  font-weight: 560;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.wb-row__meta .wb-dot { color: var(--text-faint); }
.wb-row__side { flex: 0 0 auto; display: flex; align-items: center; gap: var(--space-2); }

.wb-dot::before { content: "\00b7"; }
.wb-mono { font-family: var(--font-mono); font-size: 0.94em; }

/* --- empty states -------------------------------------------------------- */
.wb-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: clamp(var(--space-5), 6vw, var(--space-7)) var(--space-4);
  text-align: center;
}
.wb-empty__art {
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  margin-bottom: var(--space-2);
  color: var(--primary);
  background: var(--gradient-brand-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: var(--radius-lg);
}
.wb-empty__art .icon { width: 27px; height: 27px; }
.wb-empty h3 { margin: 0; font-size: var(--text-md); font-weight: 640; }
.wb-empty p { margin: 0; max-width: 46ch; color: var(--text-muted); font-size: var(--text-base); }
.wb-empty__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; margin-top: var(--space-3); }
.wb-empty--sm { padding: var(--space-5) var(--space-4); }
.wb-empty--sm .wb-empty__art { width: 46px; height: 46px; border-radius: var(--radius); }
.wb-empty--sm .wb-empty__art .icon { width: 21px; height: 21px; }

/* --- storefront ---------------------------------------------------------- */
.wb-catalog { display: flex; flex-direction: column; gap: var(--space-6); }
.wb-catalog__group > header { margin-bottom: var(--space-4); }
.wb-catalog__group h2 {
  margin: 0 0 2px;
  font-size: var(--text-xl);
  font-weight: 680;
  letter-spacing: -0.022em;
}
.wb-catalog__group .wb-catalog__desc { color: var(--text-muted); margin: 0; max-width: 76ch; }

.wb-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: var(--space-4);
}
.wb-product {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.wb-product:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.wb-product__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: var(--space-4);
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius);
  overflow: hidden;
}
.wb-product__icon img { width: 26px; height: 26px; object-fit: contain; }
.wb-product__icon .icon { width: 22px; height: 22px; }
.wb-product__title {
  margin: 0 0 4px;
  font-size: var(--text-md);
  font-weight: 660;
  letter-spacing: -0.014em;
  overflow-wrap: anywhere;
}
.wb-product__desc {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.wb-product__desc > :last-child { margin-bottom: 0; }
.wb-product__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
  padding: var(--space-3) 0;
  margin-bottom: var(--space-3);
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
}
.wb-product__amount {
  font-size: var(--text-xl);
  font-weight: 720;
  letter-spacing: -0.03em;
  color: var(--text-strong);
}
.wb-product__unit { font-size: var(--text-sm); color: var(--text-muted); }
.wb-product__from { font-size: var(--text-xs); color: var(--text-faint); flex-basis: 100%; }
.wb-product__features {
  padding: 0;
  margin: 0 0 var(--space-4);
  list-style: none;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.wb-product__features li { display: flex; align-items: flex-start; gap: 7px; margin-top: 5px; }
.wb-product__features .icon { width: 15px; height: 15px; margin-top: 3px; color: var(--success); }
.wb-product__cta { margin-top: auto; }
.wb-product__cta .btn { width: 100%; }

/* --- invoice / amount emphasis ------------------------------------------- */
.wb-amount { font-weight: 680; letter-spacing: -0.015em; color: var(--text-strong); white-space: nowrap; }
.wb-overdue { color: var(--danger); }

.wb-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.wb-segment {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.wb-segment::-webkit-scrollbar { display: none; }
.wb-segment button, .wb-segment a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 560;
  color: var(--text-muted);
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: var(--radius-xs);
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition), background-color var(--transition), box-shadow var(--transition);
}
.wb-segment button:hover, .wb-segment a:hover { color: var(--text-strong); text-decoration: none; }
.wb-segment .is-active {
  color: var(--text-strong);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.wb-segment .wb-pill {
  padding: 0 6px;
  font-size: var(--text-xs);
  font-weight: 680;
  border-radius: var(--radius-pill);
  background: var(--neutral-bg);
  color: var(--neutral);
}
.wb-pill--danger { background: var(--danger-bg) !important; color: var(--danger) !important; }

/* --- support conversation ------------------------------------------------ */
.wb-thread { display: flex; flex-direction: column; gap: var(--space-4); }
.wb-msg {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.wb-msg--staff { border-color: color-mix(in srgb, var(--primary) 32%, var(--border)); }
.wb-msg--staff .wb-msg__head { background: var(--primary-subtle); }
.wb-msg__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}
.wb-msg__who { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.wb-msg__avatar {
  width: 36px; height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 680;
  font-size: var(--text-sm);
}
.wb-msg__avatar img, .wb-msg__avatar > div { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.wb-msg__name { display: block; font-weight: 600; color: var(--text-strong); overflow-wrap: anywhere; }
.wb-msg__time { font-size: var(--text-xs); color: var(--text-muted); }
.wb-msg__tools { margin-left: auto; display: flex; align-items: center; gap: var(--space-2); flex: 0 0 auto; }
.wb-msg__body { padding: var(--space-5); }
.wb-msg__body > :last-child { margin-bottom: 0; }

.wb-meta-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
}
.wb-meta-list dt {
  font-size: var(--text-xs);
  font-weight: 620;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.wb-meta-list dd { font-weight: 550; color: var(--text-strong); overflow-wrap: anywhere; }

/* --- knowledge base ------------------------------------------------------ */
.wb-kb-hero {
  padding: clamp(var(--space-5), 5vw, var(--space-7)) clamp(var(--space-4), 4vw, var(--space-6));
  margin-bottom: var(--space-5);
  text-align: center;
  background: var(--gradient-brand-soft), var(--surface);
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  border-radius: var(--radius-lg);
}
.wb-kb-hero h1 {
  margin: 0 0 var(--space-2);
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 720;
  letter-spacing: -0.03em;
}
.wb-kb-hero p { margin: 0 auto var(--space-5); max-width: 56ch; color: var(--text-muted); }
.wb-kb-search { max-width: 560px; margin-inline: auto; }
.wb-kb-search .input-group > .form-control { padding-block: 12px; }

.wb-kb-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: var(--space-4); }
.wb-kb-cat {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.wb-kb-cat:hover { border-color: color-mix(in srgb, var(--primary) 36%, var(--border)); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.wb-kb-cat__icon {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  margin-bottom: var(--space-3);
  color: var(--secondary);
  background: var(--secondary-light);
  border-radius: var(--radius);
}
.wb-kb-cat h2 { margin: 0 0 4px; font-size: var(--text-md); font-weight: 650; }
.wb-kb-cat h2 a { color: var(--text-strong); }
.wb-kb-cat h2 a:hover { color: var(--primary); text-decoration: none; }
.wb-kb-cat__desc { margin: 0 0 var(--space-3); font-size: var(--text-sm); color: var(--text-muted); }
.wb-kb-cat__links { display: flex; flex-direction: column; gap: 1px; margin: 0 0 var(--space-3); padding: 0; list-style: none; }
.wb-kb-cat__links a {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.wb-kb-cat__links a:hover { color: var(--primary); text-decoration: none; }
.wb-kb-cat__links .icon { width: 13px; height: 13px; flex: 0 0 auto; color: var(--text-faint); }
.wb-kb-cat__foot { margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--border-subtle); }

/* article typography */
.wb-article { max-width: 74ch; }
.wb-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.wb-article__meta span { display: inline-flex; align-items: center; gap: 6px; }

.kb-article-content,
.markdown-body,
.markdown {
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--text);
  background: transparent;
  overflow-wrap: break-word;
}
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3,
.markdown-body h4, .markdown-body h5, .markdown-body h6 {
  margin: 2em 0 0.6em;
  line-height: 1.3;
  scroll-margin-top: calc(var(--topbar-h) + 20px);
}
.markdown-body h1 { font-size: 1.65em; }
.markdown-body h2 {
  font-size: 1.35em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--border);
}
.markdown-body h3 { font-size: 1.15em; }
.markdown-body h4 { font-size: 1em; }
.markdown-body p { margin: 0 0 1.15em; }
.markdown-body ul, .markdown-body ol { margin: 0 0 1.15em; padding-left: 1.5em; }
.markdown-body li { margin-top: 0.35em; }
.markdown-body li > p { margin-bottom: 0.5em; }
.markdown-body a { text-decoration: underline; text-underline-offset: 2px; }
.markdown-body img { border-radius: var(--radius); border: 1px solid var(--border); margin-block: 0.5em; }
.markdown-body hr { margin: 2em 0; }
.markdown-body table { width: 100%; margin: 0 0 1.3em; }
.markdown-body pre { margin: 0 0 1.3em; }
.markdown-body blockquote { margin: 0 0 1.3em; }
.markdown-body code { white-space: break-spaces; }

/* --- announcements ------------------------------------------------------- */
.wb-news { display: flex; flex-direction: column; gap: var(--space-4); }
.wb-news__item {
  display: flex;
  flex-direction: column;
  padding: clamp(var(--space-4), 3vw, var(--space-5));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.wb-news__item:hover { border-color: color-mix(in srgb, var(--primary) 32%, var(--border)); box-shadow: var(--shadow-md); }
.wb-news__date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}
.wb-news__item h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
  font-weight: 660;
  letter-spacing: -0.02em;
}
.wb-news__item h2 a { color: var(--text-strong); }
.wb-news__item h2 a:hover { color: var(--primary); text-decoration: none; }
.wb-news__excerpt { color: var(--text-muted); margin-bottom: var(--space-4); }
.wb-news__excerpt > :last-child { margin-bottom: 0; }
.wb-news__more { margin-top: auto; align-self: flex-start; }

/* --- settings ------------------------------------------------------------ */
.wb-settings { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.wb-settings__nav {
  position: sticky;
  top: calc(var(--topbar-h) + var(--space-4));
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.wb-settings__nav .nav-link { justify-content: flex-start; }
.wb-settings__nav .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 620;
}
.wb-settings__nav .nav-link.active .icon { color: var(--primary); }
.wb-settings__nav .nav-link .icon { width: 17px; height: 17px; color: var(--text-faint); }

.wb-fieldset { border: 0; padding: 0; margin: 0 0 var(--space-5); }
.wb-fieldset > legend {
  padding: 0;
  margin-bottom: var(--space-1);
  font-size: var(--text-md);
  font-weight: 640;
  color: var(--text-strong);
}
.wb-fieldset__hint { margin: 0 0 var(--space-4); font-size: var(--text-sm); color: var(--text-muted); }
.wb-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: var(--space-4); }
.wb-fields--1 { grid-template-columns: minmax(0, 1fr); }
.wb-field { min-width: 0; }
.wb-field--wide { grid-column: 1 / -1; }
.wb-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.wb-avatar-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  margin-bottom: var(--space-5);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.wb-avatar-row__img { width: 64px; height: 64px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; }
.wb-avatar-row__img img, .wb-avatar-row__img > div { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* --- auth ---------------------------------------------------------------- */
.wb-auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}
.wb-auth__aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-6);
  padding: clamp(var(--space-5), 4vw, 56px);
  color: #eaf2ff;
  background:
    radial-gradient(900px 500px at 12% 8%, rgba(34, 211, 238, 0.30), transparent 62%),
    radial-gradient(700px 500px at 88% 92%, rgba(20, 102, 255, 0.42), transparent 60%),
    linear-gradient(160deg, #071634 0%, #04102a 55%, #030b1c 100%);
  overflow: hidden;
}
.wb-auth__aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(80% 80% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(80% 80% at 50% 40%, #000 30%, transparent 100%);
  pointer-events: none;
}
.wb-auth__aside > * { position: relative; z-index: 1; }
.wb-auth__aside .wb-brand { color: #fff; }
.wb-auth__aside .wb-brand__name { color: #fff; }
.wb-auth__pitch h2 {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #fff;
}
.wb-auth__pitch p { margin: 0; color: rgba(234, 242, 255, 0.76); max-width: 44ch; }
.wb-auth__points { display: flex; flex-direction: column; gap: var(--space-3); margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.wb-auth__points li { display: flex; align-items: flex-start; gap: 10px; color: rgba(234, 242, 255, 0.88); font-size: var(--text-base); }
.wb-auth__points .icon { width: 18px; height: 18px; margin-top: 3px; flex: 0 0 auto; color: #67e8f9; }
.wb-auth__legal { font-size: var(--text-xs); color: rgba(234, 242, 255, 0.5); }

.wb-auth__main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(var(--space-5), 5vw, 56px) var(--space-4);
  background: var(--background);
}
.wb-auth__card { width: 100%; max-width: 424px; }
.wb-auth__mobile-brand { display: none; justify-content: center; margin-bottom: var(--space-5); }
.wb-auth__card h1 {
  margin: 0 0 6px;
  font-size: var(--text-2xl);
  font-weight: 720;
  letter-spacing: -0.03em;
}
.wb-auth__card > p { margin: 0 0 var(--space-5); color: var(--text-muted); }
.wb-auth__box {
  padding: clamp(var(--space-4), 4vw, var(--space-6));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.wb-auth__alt {
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}
.wb-auth__alt a { font-weight: 600; }

/* --- error page ---------------------------------------------------------- */
.wb-error { text-align: center; padding: clamp(var(--space-6), 8vw, 96px) var(--space-4); }
.wb-error__code {
  display: block;
  font-size: clamp(4rem, 18vw, 8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wb-error h1 { margin: var(--space-4) 0 var(--space-2); font-size: var(--text-xl); }
.wb-error p { margin: 0 auto var(--space-5); max-width: 52ch; color: var(--text-muted); overflow-wrap: anywhere; }
.wb-error__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: center; }

/* --- misc core hooks ----------------------------------------------------- */
.invoice-gateway {
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.invoice-gateway:hover { border-color: var(--primary); }
.invoice-gateway:has(.btn-check:checked) {
  border-color: var(--primary);
  background: var(--primary-subtle);
  box-shadow: var(--shadow-focus);
}
.invoice-gateway img { max-height: 34px; width: auto; }

.tlds { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.currency_selector { min-width: 180px; }
.client-dropdown .dropdown-toggle { border: 0; background: none; cursor: pointer; }
.empty { color: var(--text-muted); }
.block { display: block; }
#push { display: none; }

/* Embed module keeps its own tiny scope; align it with the tokens. */
.embed-shell { color: var(--text); background: var(--surface); }
.embed-label { font-size: var(--text-sm); font-weight: 560; }
.embed-input, .embed-select, .embed-textarea {
  width: 100%;
  padding: 9px 13px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
}
.embed-button {
  padding: 9px 16px;
  font: inherit;
  font-weight: 560;
  color: var(--primary-contrast);
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.embed-grid { display: grid; gap: var(--space-3); }
.embed-stack { display: flex; flex-direction: column; gap: var(--space-3); }

.fb-kb-suggestions { margin-bottom: var(--space-3); }
.fb-kb-suggestions-hint { font-size: var(--text-sm); color: var(--text-muted); }
.fb-kb-suggestions-results { display: flex; flex-direction: column; gap: 2px; }

/* ==========================================================================
   7. RESPONSIVE
   Breakpoints follow the Bootstrap scale so the core templates' col-sm-*,
   col-md-*, col-lg-* and d-*-* classes behave as their authors expected.
   ========================================================================== */

/* --- sm: >=576px --------------------------------------------------------- */
@media (min-width: 576px) {
  .col-sm-1  { flex: 0 0 auto; width: 8.3333%; }
  .col-sm-2  { flex: 0 0 auto; width: 16.6667%; }
  .col-sm-3  { flex: 0 0 auto; width: 25%; }
  .col-sm-4  { flex: 0 0 auto; width: 33.3333%; }
  .col-sm-5  { flex: 0 0 auto; width: 41.6667%; }
  .col-sm-6  { flex: 0 0 auto; width: 50%; }
  .col-sm-8  { flex: 0 0 auto; width: 66.6667%; }
  .col-sm-9  { flex: 0 0 auto; width: 75%; }
  .col-sm-10 { flex: 0 0 auto; width: 83.3333%; }
  .col-sm-12 { flex: 0 0 auto; width: 100%; }
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
  .d-sm-inline-flex { display: inline-flex !important; }
  .d-sm-grid { display: grid !important; }
}

/* --- md: >=768px --------------------------------------------------------- */
@media (min-width: 768px) {
  .col-md-1  { flex: 0 0 auto; width: 8.3333%; }
  .col-md-2  { flex: 0 0 auto; width: 16.6667%; }
  .col-md-3  { flex: 0 0 auto; width: 25%; }
  .col-md-4  { flex: 0 0 auto; width: 33.3333%; }
  .col-md-5  { flex: 0 0 auto; width: 41.6667%; }
  .col-md-6  { flex: 0 0 auto; width: 50%; }
  .col-md-7  { flex: 0 0 auto; width: 58.3333%; }
  .col-md-8  { flex: 0 0 auto; width: 66.6667%; }
  .col-md-9  { flex: 0 0 auto; width: 75%; }
  .col-md-10 { flex: 0 0 auto; width: 83.3333%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
  .offset-md-1 { margin-left: 8.3333%; }
  .offset-md-8 { margin-left: 66.6667%; }
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
  .d-md-inline-block { display: inline-block !important; }
  .flex-md-row { flex-direction: row !important; }
  .align-items-md-center { align-items: center !important; }
  .justify-content-md-end { justify-content: flex-end !important; }
  .ms-md-3 { margin-left: var(--space-3) !important; }
  .mb-md-0 { margin-bottom: 0 !important; }
  .p-md-4 { padding: var(--space-4) !important; }
}

/* --- lg: >=992px --------------------------------------------------------- */
@media (min-width: 992px) {
  .col-lg-3  { flex: 0 0 auto; width: 25%; }
  .col-lg-4  { flex: 0 0 auto; width: 33.3333%; }
  .col-lg-6  { flex: 0 0 auto; width: 50%; }
  .col-lg-8  { flex: 0 0 auto; width: 66.6667%; }
  .col-lg-9  { flex: 0 0 auto; width: 75%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
  .d-lg-grid { display: grid !important; }
  .d-lg-inline-flex { display: inline-flex !important; }
  .p-lg-5 { padding: var(--space-5) !important; }
}

/* --- xl: >=1200px -------------------------------------------------------- */
@media (min-width: 1200px) {
  .col-xl-3 { flex: 0 0 auto; width: 25%; }
  .col-xl-4 { flex: 0 0 auto; width: 33.3333%; }
  .col-xl-6 { flex: 0 0 auto; width: 50%; }
}

/* --- laptop: tighten the aside split ------------------------------------- */
@media (max-width: 1200px) {
  :root { --sidebar-w: 244px; }
  .wb-grid--aside { grid-template-columns: minmax(0, 1fr); }
  .wb-settings { grid-template-columns: 200px minmax(0, 1fr); }
}

/* --- tablet & below: sidebar becomes an off-canvas drawer ---------------- */
@media (max-width: 991.98px) {
  :root { --topbar-h: 60px; }

  .wb-sidebar {
    width: min(302px, 88vw);
    transform: translateX(-102%);
    box-shadow: none;
  }
  body.wb-drawer-open .wb-sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .wb-main { margin-left: 0; }

  .wb-burger { display: grid; }
  .wb-sidebar__close { display: grid; margin-left: auto; }
  .wb-sidebar__head { padding-inline: var(--space-4); }

  .wb-settings { grid-template-columns: minmax(0, 1fr); }
  .wb-settings__nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 5px;
  }
  .wb-settings__nav::-webkit-scrollbar { display: none; }
  .wb-settings__nav .nav-link { white-space: nowrap; }

  .wb-auth { grid-template-columns: minmax(0, 1fr); }
  .wb-auth__aside { display: none; }
  .wb-auth__mobile-brand { display: flex; }

  /* Core's own sidebar column and top-nav duplicate this theme's shell. */
  .navbar, #sidebarMenu { display: none !important; }
}

/* --- mobile -------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .wb-content { padding: var(--space-4) var(--space-4) var(--space-5); }

  .card-header, .card-body, .card-footer,
  .wb-panel__head, .wb-panel__body, .wb-panel__foot,
  .modal-header, .modal-body, .modal-footer,
  .accordion-button, .accordion-body { padding-inline: var(--space-4); }
  .wb-row { padding-inline: var(--space-4); }

  .wb-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); }
  .wb-stat { padding: var(--space-4); }
  .wb-stat__value { font-size: 1.45rem; }
  .wb-stat__foot { display: none; }

  .wb-products, .wb-kb-cats { grid-template-columns: minmax(0, 1fr); }
  .wb-grid--2, .wb-grid--3 { grid-template-columns: minmax(0, 1fr); }

  .wb-hello { padding: var(--space-4); }
  .wb-hello__actions { width: 100%; }
  .wb-hello__actions .btn { flex: 1 1 auto; }

  .wb-page-head__actions { width: 100%; }
  .wb-page-head__actions .btn { flex: 1 1 auto; }

  .wb-fields { grid-template-columns: minmax(0, 1fr); }
  .wb-form-actions .btn { width: 100%; }

  .wb-row { flex-wrap: wrap; }
  .wb-row__side { width: 100%; justify-content: space-between; padding-left: 46px; }

  .modal { padding: 0; }
  .modal-dialog { margin: 0; max-width: none; min-height: 100%; }
  .modal-content { min-height: 100dvh; border: 0; border-radius: 0; }
  .modal-body { max-height: none; }
  .modal-footer { position: sticky; bottom: 0; }
  .modal-footer .btn { flex: 1 1 auto; }

  .toast-container { max-width: 100vw; left: 0; }

  /* Touch targets */
  .btn, .page-link, .nav-link, .dropdown-item { min-height: 40px; }
  .btn-sm { min-height: 36px; }

  /* Core-authored wide tables: switch to stacked definition rows so nothing
     forces the page into a horizontal scroll. Header labels are carried in
     data-label by this theme's own templates; core tables keep their own
     scroll container instead. */
  .wb-table-cards thead { display: none; }
  .wb-table-cards, .wb-table-cards tbody, .wb-table-cards tr, .wb-table-cards td { display: block; width: 100%; }
  .wb-table-cards tr {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border);
  }
  .wb-table-cards tr:last-child { border-bottom: 0; }
  .wb-table-cards td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 4px 0;
    border: 0;
    text-align: right;
  }
  .wb-table-cards td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: var(--text-xs);
    font-weight: 620;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left;
  }
  .wb-table-cards td:empty { display: none; }
  .wb-table-cards td.actions { justify-content: flex-end; padding-top: var(--space-2); }
  /* The action button says what it does; the column label is noise here. */
  .wb-table-cards td.actions::before { content: none; }
}

@media (max-width: 400px) {
  .wb-stats { grid-template-columns: minmax(0, 1fr); }
  .wb-account__name, .wb-account__meta { display: none; }
  .wb-account__btn { padding: 4px; }
}

/* ==========================================================================
   8. MOTION, SCROLLBARS, PRINT
   ========================================================================== */

@keyframes wb-spin { to { transform: rotate(360deg); } }
@keyframes wb-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes wb-stripes { from { background-position: 0 0; } to { background-position: 12px 0; } }
@keyframes wb-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes wb-slide-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes wb-slide-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateX(18px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .btn:active, .wb-stat:hover, .wb-product:hover, .wb-kb-cat:hover, }

@media (prefers-contrast: more) {
  :root { --border: #94a3b8; --border-strong: #64748b; --text-muted: #475569; }
  .btn, .card, .form-control, .wb-panel { border-width: 1.5px; }
}

/* Scrollbars */
.wb-sidebar__nav::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.wb-panel__scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.wb-sidebar__nav::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.wb-panel__scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.wb-sidebar__nav::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track { background: transparent; }

@media print {
  :root {
    --background: #fff; --surface: #fff; --surface-alt: #fff; --surface-sunken: #fff;
    --text: #000; --text-strong: #000; --text-muted: #333; --border: #bbb; --border-subtle: #ddd;
  }
  .wb-sidebar, .wb-topbar, .wb-footer, .wb-totop, .wb-backdrop,
  .toast-container, .wait, .loading, .wb-page-head__actions,
  .pagination, .btn, .nav-tabs, .wb-segment { display: none !important; }
  .wb-main { margin-left: 0 !important; }
  .wb-content { max-width: none; padding: 0; }
  .card, .wb-panel, .wb-stat, .wb-product { box-shadow: none !important; border-color: #bbb !important; break-inside: avoid; }
  .tab-content > .tab-pane { display: block !important; opacity: 1 !important; }
  a { color: #000 !important; text-decoration: none !important; }
  body { background: #fff; font-size: 11pt; }
}

/* ==========================================================================
   9. LEGACY REMNANTS
   A handful of core client templates still carry Bootstrap 2 era classes on
   bare inputs. Styling them keeps those controls from rendering unthemed.
   ========================================================================== */

.text-sm { font-size: var(--text-sm) !important; }

input.span1, input.span2, input.span8,
input.span1[type="text"], input.span2[type="text"], input.span8[type="text"] {
  display: block;
  width: 100%;
  padding: 9px 13px;
  font: inherit;
  font-size: var(--text-base);
  color: var(--text);
  background-color: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xs);
  transition: border-color var(--transition), box-shadow var(--transition);
}
input.span1:focus, input.span2:focus, input.span8:focus {
  outline: 0;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}
