/* PHUSE CSS Framework v1.2.8 | Flat - Modern - Professional */

/* Icon system - .pi / .pi-* - lives in icons.css, imported here.
   @import MUST stay before all other rules per the CSS spec, or
   browsers silently ignore it. */
@import url("icons.css?v=1.1.23");

/* ============================================================
   § 0  SELF-HOSTED TYPEFACE - IBM Plex Sans / Mono
   No CDN calls (privacy-appropriate for a self-hosted CMS).
   Files vendored under fonts/ - see fonts/OFL.txt (SIL Open Font License 1.1).
   ============================================================ */
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans/ibm-plex-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans/ibm-plex-sans-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans/ibm-plex-sans-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('../fonts/ibm-plex-sans/ibm-plex-sans-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono/ibm-plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../fonts/ibm-plex-mono/ibm-plex-mono-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Lora - "Field" theme headings. */
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lora';
  src: url('../fonts/lora/lora-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Karla - "Field" theme body text. */
@font-face {
  font-family: 'Karla';
  src: url('../fonts/karla/karla-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('../fonts/karla/karla-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Karla';
  src: url('../fonts/karla/karla-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Space Grotesk - "Frame" theme display headings. */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk/space-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk/space-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Roboto - "Marketplace Trust" (Carikno) theme, body + headings.
   Served by Google Fonts as a single variable-instance woff2 covering
   weights 400/500/700 (confirmed: all three @font-face blocks below
   resolve to the same file) - one download, three weight declarations,
   same self-hosting approach as every font above (see fonts/roboto/OFL.txt). */
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/roboto/roboto-variable.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/roboto/roboto-variable.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Roboto';
  src: url('../fonts/roboto/roboto-variable.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   § 1  DESIGN TOKENS - CSS Custom Properties
   ============================================================ */
:root {
  /* Brand - "Precision Ledger" enterprise navy (0.0.9) */
  --ps-primary:           #1E3A5F;
  --ps-primary-hover:     #16293F;
  --ps-primary-light:     #E7EBEF;
  --ps-primary-rgb:       30, 58, 95;
  /* Stable navy for filled backgrounds with white text (buttons, avatars,
     logo marks) - does NOT flip in dark mode, unlike --ps-primary itself. */
  --ps-primary-fill:       #1E3A5F;
  --ps-primary-fill-hover: #16293F;
  --ps-success:           #16A34A;
  --ps-success-light:     #F0FDF4;
  --ps-danger:            #DC2626;
  --ps-danger-light:      #FEF2F2;
  --ps-warning:           #D97706;
  --ps-warning-light:     #FFFBEB;
  --ps-info:              #0891B2;
  --ps-info-light:        #ECFEFF;

  /* Neutral - semantic */
  --ps-secondary:         #64748B;
  --ps-secondary-hover:   #475569;
  --ps-light:             #F1F5F9;
  --ps-dark:              #0F172A;

  /* Backgrounds */
  --ps-bg-base:           #FFFFFF;
  --ps-bg-surface:        #F8FAFC;
  --ps-bg-subtle:         #F1F5F9;

  /* Text */
  --ps-text-primary:      #0F172A;
  --ps-text-secondary:    #475569;
  --ps-text-muted:        #94A3B8;

  /* Borders */
  --ps-border:            #E2E8F0;
  --ps-border-strong:     #CBD5E1;

  /* Radius */
  --ps-radius:            6px;
  --ps-radius-sm:         4px;
  --ps-radius-lg:         8px;

  /* Shadows */
  --ps-shadow-sm:         0 1px 2px rgba(0,0,0,.05);
  --ps-shadow:            0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --ps-shadow-md:         0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --ps-shadow-lg:         0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);

  /* Typography - IBM Plex pairing (0.0.9), self-hosted (see @font-face above) */
  --ps-font-sans:         'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ps-font-mono:         'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  /* Type scale - modular, ~1.2 ratio (0.0.9) */
  --fs-xs:                0.6875rem;  /* 11px - mono labels, captions */
  --fs-sm:                0.8125rem;  /* 13px - dense UI text */
  --fs-base:              0.9375rem;  /* 15px - body */
  --fs-md:                1.0625rem;  /* 17px - subheads */
  --fs-lg:                1.3125rem;  /* 21px - page titles */
  --fs-xl:                1.75rem;    /* 28px - ledger stat numbers */
  --fs-2xl:               2.25rem;    /* 36px - display */
  --lh-tight:             1.2;
  --lh-base:              1.5;
  --lh-loose:             1.7;

  /* Grid */
  --ps-gutter-x:          1.5rem;
  --ps-gutter-y:          0;

  /* Spacing scale (0.0.9) - 4px base */
  --sp-1:                 0.25rem;  /* 4px */
  --sp-2:                 0.5rem;   /* 8px */
  --sp-3:                 0.75rem;  /* 12px */
  --sp-4:                 1rem;     /* 16px */
  --sp-5:                 1.5rem;   /* 24px */
  --sp-6:                 2rem;     /* 32px */
  --sp-7:                 3rem;     /* 48px */
  --sp-8:                 4rem;     /* 64px */
}

/* ============================================================
   § 2  DARK MODE
   ============================================================ */
[data-theme=dark] {
  --ps-bg-base:           #14171e;
  --ps-bg-surface:        #191c26;
  --ps-bg-subtle:         #1f2330;

  --ps-text-primary:      #dce2f0;
  --ps-text-secondary:    #8b93ac;
  --ps-text-muted:        #525c74;

  --ps-border:            #22273a;
  --ps-border-strong:     #2d3347;

  --ps-primary-light:     #162050;

  /* Navy is too dark to read as TEXT/ICON/BORDER on a dark surface - brighten
     --ps-primary itself for dark mode. Filled backgrounds (buttons, avatars,
     logo marks) use the separate, non-flipping --ps-primary-fill instead. */
  --ps-primary:           #60A5FA;
  --ps-primary-hover:     #93C5FD;
  --ps-primary-rgb:       96, 165, 250;

  --ps-light:             #191c26;
  --ps-dark:              #dce2f0;
}

/* ============================================================
   § 3  RESET & BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  /* Always reserve the scrollbar gutter so short pages (e.g. Contact) don't
     render a few pixels wider than tall ones (e.g. Search/Videos/Gallery) -
     without this, the shared sticky header/container appears to shift width
     between pages depending on whether that page's content needs to scroll. */
  scrollbar-gutter: stable;
  overflow-y: scroll;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--ps-font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ps-text-primary);
  background-color: var(--ps-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

:focus:not(:focus-visible) {
  outline: none;
}

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
}

p,
h1, h2, h3, h4, h5, h6,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul, ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

table {
  border-collapse: collapse;
}

/* ============================================================
   § 4  TYPOGRAPHY
   ============================================================ */

/* Headings */
h1 { font-size: 2rem;    font-weight: 700; line-height: 1.2; margin-bottom: .5rem; }
h2 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin-bottom: .5rem; }
h3 { font-size: 1.5rem;  font-weight: 600; line-height: 1.25; margin-bottom: .5rem; }
h4 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin-bottom: .5rem; }
h5 { font-size: 1.125rem;font-weight: 600; line-height: 1.35; margin-bottom: .5rem; }
h6 { font-size: 1rem;    font-weight: 600; line-height: 1.4; margin-bottom: .5rem; }

/* Display */
.display-1 { font-size: 5rem;   font-weight: 700; line-height: 1.2; }
.display-2 { font-size: 4.5rem; font-weight: 700; line-height: 1.2; }
.display-3 { font-size: 4rem;   font-weight: 700; line-height: 1.2; }
.display-4 { font-size: 3.5rem; font-weight: 700; line-height: 1.2; }
.display-5 { font-size: 3rem;   font-weight: 700; line-height: 1.2; }
.display-6 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; }

/* Lead */
.lead { font-size: 1.25rem; font-weight: 300; line-height: 1.7; }

/* Small */
.small, small { font-size: 0.875em; }

/* Font weight */
.fw-bold     { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-medium   { font-weight: 500; }
.fw-normal   { font-weight: 400; }
.fw-light    { font-weight: 300; }

/* Font style */
.fst-italic { font-style: italic; }
.fst-normal { font-style: normal; }

/* Line height */
.lh-1    { line-height: 1; }
.lh-sm   { line-height: 1.25; }
.lh-base { line-height: 1.6; }
.lh-lg   { line-height: 2; }

/* Letter spacing */
.ls-wide { letter-spacing: 0.1em; }

/* Links */
a {
  color: var(--ps-primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Paragraph */
p {
  margin-bottom: 1rem;
}
p:last-child {
  margin-bottom: 0;
}

/* Blockquote */
blockquote {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--ps-primary);
  background: var(--ps-bg-surface);
  color: var(--ps-text-secondary);
  border-radius: 0 var(--ps-radius) var(--ps-radius) 0;
  margin-bottom: 1rem;
}

/* HR */
hr {
  border: none;
  border-top: 1px solid var(--ps-border);
  margin: 1.5rem 0;
}

/* ============================================================
   § 5  CONTAINER
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

.container-sm {
  width: 100%;
  max-width: 540px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

.container-md {
  width: 100%;
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

.container-lg {
  width: 100%;
  max-width: 960px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

.container-xl {
  width: 100%;
  max-width: 1140px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

.container-fluid {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
}

/* ============================================================
   § 6  GRID SYSTEM (12 columns)
   ============================================================ */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--ps-gutter-x, 1.5rem) * -.5);
  margin-left:  calc(var(--ps-gutter-x, 1.5rem) * -.5);
  margin-top: calc(var(--ps-gutter-y, 0) * -1);
}

.row > * {
  box-sizing: border-box;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: calc(var(--ps-gutter-x, 1.5rem) * .5);
  padding-left:  calc(var(--ps-gutter-x, 1.5rem) * .5);
  margin-top: var(--ps-gutter-y, 0);
}

.col        { flex: 1 0 0%; }
.col-auto   { flex: 0 0 auto; width: auto; }
.col-1      { flex: 0 0 auto; width: 8.33333%; }
.col-2      { flex: 0 0 auto; width: 16.66667%; }
.col-3      { flex: 0 0 auto; width: 25%; }
.col-4      { flex: 0 0 auto; width: 33.33333%; }
.col-5      { flex: 0 0 auto; width: 41.66667%; }
.col-6      { flex: 0 0 auto; width: 50%; }
.col-7      { flex: 0 0 auto; width: 58.33333%; }
.col-8      { flex: 0 0 auto; width: 66.66667%; }
.col-9      { flex: 0 0 auto; width: 75%; }
.col-10     { flex: 0 0 auto; width: 83.33333%; }
.col-11     { flex: 0 0 auto; width: 91.66667%; }
.col-12     { flex: 0 0 auto; width: 100%; }

/* Row columns */
.row-cols-1 > * { flex: 0 0 auto; width: 100%; }
.row-cols-2 > * { flex: 0 0 auto; width: 50%; }
.row-cols-3 > * { flex: 0 0 auto; width: 33.33333%; }
.row-cols-4 > * { flex: 0 0 auto; width: 25%; }
.row-cols-5 > * { flex: 0 0 auto; width: 20%; }
.row-cols-6 > * { flex: 0 0 auto; width: 16.66667%; }

/* Gap utilities */
.g-0  { --ps-gutter-x: 0;     --ps-gutter-y: 0; }
.g-1  { --ps-gutter-x: .25rem; --ps-gutter-y: .25rem; }
.g-2  { --ps-gutter-x: .5rem;  --ps-gutter-y: .5rem; }
.g-3  { --ps-gutter-x: 1rem;   --ps-gutter-y: 1rem; }
.g-4  { --ps-gutter-x: 1.5rem; --ps-gutter-y: 1.5rem; }
.g-5  { --ps-gutter-x: 3rem;   --ps-gutter-y: 3rem; }

.gx-0 { --ps-gutter-x: 0; }
.gx-1 { --ps-gutter-x: .25rem; }
.gx-2 { --ps-gutter-x: .5rem; }
.gx-3 { --ps-gutter-x: 1rem; }
.gx-4 { --ps-gutter-x: 1.5rem; }
.gx-5 { --ps-gutter-x: 3rem; }

.gy-0 { --ps-gutter-y: 0; }
.gy-1 { --ps-gutter-y: .25rem; }
.gy-2 { --ps-gutter-y: .5rem; }
.gy-3 { --ps-gutter-y: 1rem; }
.gy-4 { --ps-gutter-y: 1.5rem; }
.gy-5 { --ps-gutter-y: 3rem; }

/* ============================================================
   § 7  FLEXBOX UTILITIES
   ============================================================ */
.d-flex         { display: flex !important; }
.d-inline-flex  { display: inline-flex !important; }

.flex-row            { flex-direction: row !important; }
.flex-column         { flex-direction: column !important; }
.flex-row-reverse    { flex-direction: row-reverse !important; }
.flex-column-reverse { flex-direction: column-reverse !important; }

.flex-wrap         { flex-wrap: wrap !important; }
.flex-nowrap       { flex-wrap: nowrap !important; }
.flex-wrap-reverse { flex-wrap: wrap-reverse !important; }

.flex-fill    { flex: 1 1 auto !important; }
.flex-grow-0  { flex-grow: 0 !important; }
.flex-grow-1  { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-shrink-1 { flex-shrink: 1 !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-content-start   { align-content: flex-start !important; }
.align-content-end     { align-content: flex-end !important; }
.align-content-center  { align-content: center !important; }
.align-content-between { align-content: space-between !important; }
.align-content-around  { align-content: space-around !important; }
.align-content-stretch { align-content: stretch !important; }

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

.order-first { order: -1 !important; }
.order-0     { order: 0 !important; }
.order-1     { order: 1 !important; }
.order-2     { order: 2 !important; }
.order-3     { order: 3 !important; }
.order-4     { order: 4 !important; }
.order-5     { order: 5 !important; }
.order-last  { order: 6 !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* ============================================================
   § 8  SPACING (margin & padding)
   ============================================================ */

/* Margin */
.m-0  { margin: 0 !important; }
.m-1  { margin: .25rem !important; }
.m-2  { margin: .5rem !important; }
.m-3  { margin: 1rem !important; }
.m-4  { margin: 1.5rem !important; }
.m-5  { margin: 3rem !important; }
.m-6  { margin: 4rem !important; }
.m-7  { margin: 5rem !important; }
.m-8  { margin: 6rem !important; }
.m-auto { margin: auto !important; }

.mt-0  { margin-top: 0 !important; }
.mt-1  { margin-top: .25rem !important; }
.mt-2  { margin-top: .5rem !important; }
.mt-3  { margin-top: 1rem !important; }
.mt-4  { margin-top: 1.5rem !important; }
.mt-5  { margin-top: 3rem !important; }
.mt-6  { margin-top: 4rem !important; }
.mt-7  { margin-top: 5rem !important; }
.mt-8  { margin-top: 6rem !important; }
.mt-auto { margin-top: auto !important; }

.mb-0  { margin-bottom: 0 !important; }
.mb-1  { margin-bottom: .25rem !important; }
.mb-2  { margin-bottom: .5rem !important; }
.mb-3  { margin-bottom: 1rem !important; }
.mb-4  { margin-bottom: 1.5rem !important; }
.mb-5  { margin-bottom: 3rem !important; }
.mb-6  { margin-bottom: 4rem !important; }
.mb-7  { margin-bottom: 5rem !important; }
.mb-8  { margin-bottom: 6rem !important; }
.mb-auto { margin-bottom: auto !important; }

.ms-0  { margin-left: 0 !important; }
.ms-1  { margin-left: .25rem !important; }
.ms-2  { margin-left: .5rem !important; }
.ms-3  { margin-left: 1rem !important; }
.ms-4  { margin-left: 1.5rem !important; }
.ms-5  { margin-left: 3rem !important; }
.ms-6  { margin-left: 4rem !important; }
.ms-7  { margin-left: 5rem !important; }
.ms-8  { margin-left: 6rem !important; }
.ms-auto { margin-left: auto !important; }

.me-0  { margin-right: 0 !important; }
.me-1  { margin-right: .25rem !important; }
.me-2  { margin-right: .5rem !important; }
.me-3  { margin-right: 1rem !important; }
.me-4  { margin-right: 1.5rem !important; }
.me-5  { margin-right: 3rem !important; }
.me-6  { margin-right: 4rem !important; }
.me-7  { margin-right: 5rem !important; }
.me-8  { margin-right: 6rem !important; }
.me-auto { margin-right: auto !important; }

.mx-0    { margin-right: 0 !important; margin-left: 0 !important; }
.mx-1    { margin-right: .25rem !important; margin-left: .25rem !important; }
.mx-2    { margin-right: .5rem !important;  margin-left: .5rem !important; }
.mx-3    { margin-right: 1rem !important;   margin-left: 1rem !important; }
.mx-4    { margin-right: 1.5rem !important; margin-left: 1.5rem !important; }
.mx-5    { margin-right: 3rem !important;   margin-left: 3rem !important; }
.mx-auto { margin-right: auto !important;   margin-left: auto !important; }

.my-0  { margin-top: 0 !important;      margin-bottom: 0 !important; }
.my-1  { margin-top: .25rem !important; margin-bottom: .25rem !important; }
.my-2  { margin-top: .5rem !important;  margin-bottom: .5rem !important; }
.my-3  { margin-top: 1rem !important;   margin-bottom: 1rem !important; }
.my-4  { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.my-5  { margin-top: 3rem !important;   margin-bottom: 3rem !important; }
.my-auto { margin-top: auto !important; margin-bottom: auto !important; }

/* Padding */
.p-0  { padding: 0 !important; }
.p-1  { padding: .25rem !important; }
.p-2  { padding: .5rem !important; }
.p-3  { padding: 1rem !important; }
.p-4  { padding: 1.5rem !important; }
.p-5  { padding: 3rem !important; }
.p-6  { padding: 4rem !important; }
.p-7  { padding: 5rem !important; }
.p-8  { padding: 6rem !important; }

.pt-0  { padding-top: 0 !important; }
.pt-1  { padding-top: .25rem !important; }
.pt-2  { padding-top: .5rem !important; }
.pt-3  { padding-top: 1rem !important; }
.pt-4  { padding-top: 1.5rem !important; }
.pt-5  { padding-top: 3rem !important; }
.pt-6  { padding-top: 4rem !important; }
.pt-7  { padding-top: 5rem !important; }
.pt-8  { padding-top: 6rem !important; }

.pb-0  { padding-bottom: 0 !important; }
.pb-1  { padding-bottom: .25rem !important; }
.pb-2  { padding-bottom: .5rem !important; }
.pb-3  { padding-bottom: 1rem !important; }
.pb-4  { padding-bottom: 1.5rem !important; }
.pb-5  { padding-bottom: 3rem !important; }
.pb-6  { padding-bottom: 4rem !important; }
.pb-7  { padding-bottom: 5rem !important; }
.pb-8  { padding-bottom: 6rem !important; }

.ps-0  { padding-left: 0 !important; }
.ps-1  { padding-left: .25rem !important; }
.ps-2  { padding-left: .5rem !important; }
.ps-3  { padding-left: 1rem !important; }
.ps-4  { padding-left: 1.5rem !important; }
.ps-5  { padding-left: 3rem !important; }
.ps-6  { padding-left: 4rem !important; }
.ps-7  { padding-left: 5rem !important; }
.ps-8  { padding-left: 6rem !important; }

.pe-0  { padding-right: 0 !important; }
.pe-1  { padding-right: .25rem !important; }
.pe-2  { padding-right: .5rem !important; }
.pe-3  { padding-right: 1rem !important; }
.pe-4  { padding-right: 1.5rem !important; }
.pe-5  { padding-right: 3rem !important; }
.pe-6  { padding-right: 4rem !important; }
.pe-7  { padding-right: 5rem !important; }
.pe-8  { padding-right: 6rem !important; }

.px-0  { padding-right: 0 !important;      padding-left: 0 !important; }
.px-1  { padding-right: .25rem !important;  padding-left: .25rem !important; }
.px-2  { padding-right: .5rem !important;   padding-left: .5rem !important; }
.px-3  { padding-right: 1rem !important;    padding-left: 1rem !important; }
.px-4  { padding-right: 1.5rem !important;  padding-left: 1.5rem !important; }
.px-5  { padding-right: 3rem !important;    padding-left: 3rem !important; }

.py-0  { padding-top: 0 !important;      padding-bottom: 0 !important; }
.py-1  { padding-top: .25rem !important; padding-bottom: .25rem !important; }
.py-2  { padding-top: .5rem !important;  padding-bottom: .5rem !important; }
.py-3  { padding-top: 1rem !important;   padding-bottom: 1rem !important; }
.py-4  { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5  { padding-top: 3rem !important;   padding-bottom: 3rem !important; }

/* ============================================================
   § 9  DISPLAY
   ============================================================ */
.d-none         { display: none !important; }
.d-block        { display: block !important; }
.d-inline       { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-grid         { display: grid !important; }
.d-table        { display: table !important; }
.d-table-cell   { display: table-cell !important; }
.d-table-row    { display: table-row !important; }

/* ============================================================
   § 10  COLOR UTILITIES
   ============================================================ */

/* Background */
.bg-primary     { background-color: var(--ps-primary-fill) !important; }
.bg-secondary   { background-color: var(--ps-secondary) !important; }
.bg-success     { background-color: var(--ps-success) !important; }
.bg-danger      { background-color: var(--ps-danger) !important; }
.bg-warning     { background-color: var(--ps-warning) !important; }
.bg-info        { background-color: var(--ps-info) !important; }
.bg-light       { background-color: var(--ps-light) !important; }
.bg-dark        { background-color: var(--ps-dark) !important; }
.bg-white       { background-color: #ffffff !important; }
.bg-transparent { background-color: transparent !important; }
.bg-tertiary    { background-color: var(--ps-bg-subtle) !important; color: var(--ps-text-primary); }
.bg-surface     { background-color: var(--ps-bg-surface) !important; }
.bg-subtle      { background-color: var(--ps-bg-subtle) !important; }

/* Subtle background variants */
.bg-primary-subtle  { background-color: var(--ps-primary-light) !important; }
.bg-success-subtle  { background-color: var(--ps-success-light) !important; }
.bg-danger-subtle   { background-color: var(--ps-danger-light) !important; }
.bg-warning-subtle  { background-color: var(--ps-warning-light) !important; }
.bg-info-subtle     { background-color: var(--ps-info-light) !important; }
.bg-secondary-subtle { background-color: #F1F5F9 !important; }

/* Text color */
.text-primary   { color: var(--ps-primary) !important; }
.text-secondary { color: var(--ps-text-secondary) !important; }
.text-success   { color: var(--ps-success) !important; }
.text-danger    { color: var(--ps-danger) !important; }
.text-warning   { color: var(--ps-warning) !important; }
.text-info      { color: var(--ps-info) !important; }
.text-light     { color: var(--ps-light) !important; }
.text-dark      { color: var(--ps-dark) !important; }
.text-white     { color: #ffffff !important; }
.text-muted     { color: var(--ps-text-muted) !important; }
.text-body      { color: var(--ps-text-primary) !important; }
.text-reset     { color: inherit !important; }

/* Text emphasis variants */
.text-primary-emphasis  { color: #16293F !important; }
.text-success-emphasis  { color: #15803D !important; }
.text-danger-emphasis   { color: #B91C1C !important; }
.text-warning-emphasis  { color: #B45309 !important; }
.text-info-emphasis     { color: #0E7490 !important; }
.text-secondary-emphasis { color: #334155 !important; }

/* ============================================================
   § 11  BORDER & RADIUS
   ============================================================ */
.border        { border: 1px solid var(--ps-border) !important; }
.border-0      { border: none !important; }
.border-top    { border-top: 1px solid var(--ps-border) !important; }
.border-bottom { border-bottom: 1px solid var(--ps-border) !important; }
.border-start  { border-left: 1px solid var(--ps-border) !important; }
.border-end    { border-right: 1px solid var(--ps-border) !important; }

.border-primary   { border-color: var(--ps-primary) !important; }
.border-secondary { border-color: var(--ps-secondary) !important; }
.border-success   { border-color: var(--ps-success) !important; }
.border-danger    { border-color: var(--ps-danger) !important; }
.border-warning   { border-color: var(--ps-warning) !important; }
.border-info      { border-color: var(--ps-info) !important; }
.border-light     { border-color: var(--ps-border) !important; }
.border-dark      { border-color: var(--ps-dark) !important; }

.border-1 { border-width: 1px !important; }
.border-2 { border-width: 2px !important; }
.border-3 { border-width: 3px !important; }
.border-4 { border-width: 4px !important; }
.border-5 { border-width: 5px !important; }

.rounded        { border-radius: var(--ps-radius) !important; }
.rounded-0      { border-radius: 0 !important; }
.rounded-1      { border-radius: .25rem !important; }
.rounded-2      { border-radius: .375rem !important; }
.rounded-3      { border-radius: .5rem !important; }
.rounded-4      { border-radius: .75rem !important; }
.rounded-5      { border-radius: 1rem !important; }
.rounded-circle { border-radius: 50% !important; }
.rounded-pill   { border-radius: 50rem !important; }

.rounded-top    { border-top-left-radius: var(--ps-radius) !important; border-top-right-radius: var(--ps-radius) !important; }
.rounded-bottom { border-bottom-left-radius: var(--ps-radius) !important; border-bottom-right-radius: var(--ps-radius) !important; }
.rounded-start  { border-top-left-radius: var(--ps-radius) !important; border-bottom-left-radius: var(--ps-radius) !important; }
.rounded-end    { border-top-right-radius: var(--ps-radius) !important; border-bottom-right-radius: var(--ps-radius) !important; }

/* ============================================================
   § 12  SHADOW
   ============================================================ */
.shadow-none { box-shadow: none !important; }
.shadow-sm   { box-shadow: var(--ps-shadow-sm) !important; }
.shadow      { box-shadow: var(--ps-shadow) !important; }
.shadow-md   { box-shadow: var(--ps-shadow-md) !important; }
.shadow-lg   { box-shadow: var(--ps-shadow-lg) !important; }

/* ============================================================
   § 13  BUTTON
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--ps-radius);
  font-family: var(--ps-font-sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  user-select: none;
  white-space: nowrap;
  vertical-align: middle;
}

.btn:focus-visible {
  outline: 2px solid var(--ps-primary);
  outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
  opacity: .65;
  pointer-events: none;
}

/* Button sizes */
.btn-sm {
  padding: .25rem .5rem;
  font-size: .875rem;
  border-radius: var(--ps-radius-sm);
}

.btn-lg {
  padding: .75rem 1.5rem;
  font-size: 1.125rem;
  border-radius: var(--ps-radius-lg);
}

.btn-block {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Solid variants */
.btn-primary {
  background-color: var(--ps-primary-fill);
  border-color: var(--ps-primary-fill);
  color: #ffffff;
}
.btn-primary:hover {
  background-color: var(--ps-primary-fill-hover);
  border-color: var(--ps-primary-fill-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary {
  background-color: #64748B;
  border-color: #64748B;
  color: #ffffff;
}
.btn-secondary:hover {
  background-color: #475569;
  border-color: #475569;
  color: #ffffff;
  text-decoration: none;
}

.btn-success {
  background-color: var(--ps-success);
  border-color: var(--ps-success);
  color: #ffffff;
}
.btn-success:hover {
  background-color: #15803D;
  border-color: #15803D;
  color: #ffffff;
  text-decoration: none;
}

.btn-danger {
  background-color: var(--ps-danger);
  border-color: var(--ps-danger);
  color: #ffffff;
}
.btn-danger:hover {
  background-color: #B91C1C;
  border-color: #B91C1C;
  color: #ffffff;
  text-decoration: none;
}

.btn-warning {
  background-color: var(--ps-warning);
  border-color: var(--ps-warning);
  color: #ffffff;
}
.btn-warning:hover {
  background-color: #B45309;
  border-color: #B45309;
  color: #ffffff;
  text-decoration: none;
}

.btn-info {
  background-color: var(--ps-info);
  border-color: var(--ps-info);
  color: #ffffff;
}
.btn-info:hover {
  background-color: #0E7490;
  border-color: #0E7490;
  color: #ffffff;
  text-decoration: none;
}

.btn-light {
  background-color: #F1F5F9;
  border-color: #E2E8F0;
  color: #0F172A;
}
.btn-light:hover {
  background-color: #E2E8F0;
  border-color: #CBD5E1;
  color: #0F172A;
  text-decoration: none;
}

.btn-dark {
  background-color: #0F172A;
  border-color: #0F172A;
  color: #ffffff;
}
.btn-dark:hover {
  background-color: #1E293B;
  border-color: #1E293B;
  color: #ffffff;
  text-decoration: none;
}

/* Outline variants */
.btn-outline-primary {
  background-color: transparent;
  border-color: var(--ps-primary);
  color: var(--ps-primary);
}
.btn-outline-primary:hover {
  background-color: var(--ps-primary-fill);
  border-color: var(--ps-primary-fill);
  color: #ffffff;
  text-decoration: none;
}

.btn-outline-secondary {
  background-color: transparent;
  border-color: #64748B;
  color: #64748B;
}
.btn-outline-secondary:hover {
  background-color: #64748B;
  border-color: #64748B;
  color: #ffffff;
  text-decoration: none;
}

.btn-outline-success {
  background-color: transparent;
  border-color: var(--ps-success);
  color: var(--ps-success);
}
.btn-outline-success:hover {
  background-color: var(--ps-success);
  border-color: var(--ps-success);
  color: #ffffff;
  text-decoration: none;
}

.btn-outline-danger {
  background-color: transparent;
  border-color: var(--ps-danger);
  color: var(--ps-danger);
}
.btn-outline-danger:hover {
  background-color: var(--ps-danger);
  border-color: var(--ps-danger);
  color: #ffffff;
  text-decoration: none;
}

.btn-outline-warning {
  background-color: transparent;
  border-color: var(--ps-warning);
  color: var(--ps-warning);
}
.btn-outline-warning:hover {
  background-color: var(--ps-warning);
  border-color: var(--ps-warning);
  color: #ffffff;
  text-decoration: none;
}

.btn-outline-info {
  background-color: transparent;
  border-color: var(--ps-info);
  color: var(--ps-info);
}
.btn-outline-info:hover {
  background-color: var(--ps-info);
  border-color: var(--ps-info);
  color: #ffffff;
  text-decoration: none;
}

.btn-outline-light {
  background-color: transparent;
  border-color: #E2E8F0;
  color: var(--ps-text-secondary);
}
.btn-outline-light:hover {
  background-color: #F1F5F9;
  border-color: #E2E8F0;
  color: var(--ps-text-primary);
  text-decoration: none;
}

.btn-outline-dark {
  background-color: transparent;
  border-color: #0F172A;
  color: #0F172A;
}
.btn-outline-dark:hover {
  background-color: #0F172A;
  border-color: #0F172A;
  color: #ffffff;
  text-decoration: none;
}

/* Link button */
.btn-link {
  background-color: transparent;
  border-color: transparent;
  color: var(--ps-primary);
  padding-left: 0;
  padding-right: 0;
}
.btn-link:hover {
  color: var(--ps-primary-hover);
  text-decoration: underline;
  background-color: transparent;
}

/* Button group */
.btn-group {
  display: inline-flex;
}
.btn-group > .btn:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
}
.btn-group > .btn:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* ============================================================
   § 14  CARD
   ============================================================ */
.card {
  background: var(--ps-bg-base);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--ps-shadow-md);
  transition: box-shadow .2s ease;
}

.card-header {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--ps-border);
  background: var(--ps-bg-surface);
  font-weight: 500;
}

.card-body {
  padding: 1rem;
  flex: 1 1 auto;
}

.card-footer {
  padding: .75rem 1rem;
  border-top: 1px solid var(--ps-border);
  background: var(--ps-bg-surface);
}

.card-title {
  margin: 0 0 .5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ps-text-primary);
}

.card-subtitle {
  margin: -.25rem 0 .5rem;
  font-size: .875rem;
  color: var(--ps-text-muted);
}

.card-text {
  margin: 0;
  color: var(--ps-text-secondary);
}

.card-text:not(:last-child) {
  margin-bottom: .5rem;
}

.card-img-top {
  width: 100%;
  height: auto;
  display: block;
}

.card-img-bottom {
  width: 100%;
  height: auto;
  display: block;
}

.card-link {
  color: var(--ps-primary);
  text-decoration: none;
}
.card-link:hover {
  text-decoration: underline;
}
.card-link + .card-link {
  margin-left: 1rem;
}

/* Card group */
.card-group {
  display: flex;
  gap: 1rem;
}
.card-group > .card {
  flex: 1;
}

/* ============================================================
   § 15  BADGE
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .25em .5em;
  font-size: .75em;
  font-weight: 600;
  border-radius: var(--ps-radius);
  white-space: nowrap;
  line-height: 1;
  vertical-align: baseline;
}

.badge.bg-primary   { background-color: var(--ps-primary-fill) !important;   color: #ffffff; }
.badge.bg-secondary { background-color: var(--ps-secondary) !important; color: #ffffff; }
.badge.bg-success   { background-color: var(--ps-success) !important;   color: #ffffff; }
.badge.bg-danger    { background-color: var(--ps-danger) !important;    color: #ffffff; }
.badge.bg-warning   { background-color: var(--ps-warning) !important;   color: #ffffff; }
.badge.bg-info      { background-color: var(--ps-info) !important;      color: #ffffff; }
.badge.bg-light     { background-color: #F1F5F9 !important;             color: #0F172A; }
.badge.bg-dark      { background-color: #0F172A !important;             color: #ffffff; }

/* Badge rounded-pill is inherited from § 11 */

/* ============================================================
   § 16  ALERT
   ============================================================ */
.alert {
  padding: .875rem 1rem;
  border-radius: var(--ps-radius);
  border: 1px solid transparent;
  display: block;
  margin-bottom: 1rem;
  position: relative;
}

.alert-dismissible {
  padding-right: 3rem;
  position: relative;
}

/* -- Close button (used in alerts, modals, offcanvas) --------------------- */
.btn-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--ps-radius);
  cursor: pointer;
  opacity: .5;
  color: currentColor;
  transition: opacity .15s ease, background-color .15s ease;
  flex-shrink: 0;
  line-height: 1;
}

.btn-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, .08);
}

.btn-close .pi {
  pointer-events: none;
}

/* Position inside alert */
.alert .btn-close {
  position: absolute;
  top: .5rem;
  right: .5rem;
}

.alert-primary {
  background-color: var(--ps-primary-light);
  border-color: #C7CED7;
  color: #16293F;
}

.alert-secondary {
  background-color: #F1F5F9;
  border-color: #CBD5E1;
  color: #334155;
}

.alert-success {
  background-color: var(--ps-success-light);
  border-color: #BBF7D0;
  color: #15803D;
}

.alert-danger {
  background-color: var(--ps-danger-light);
  border-color: #FECACA;
  color: #B91C1C;
}

.alert-warning {
  background-color: var(--ps-warning-light);
  border-color: #FDE68A;
  color: #B45309;
}

.alert-info {
  background-color: var(--ps-info-light);
  border-color: #A5F3FC;
  color: #0E7490;
}

.alert-light {
  background-color: #F8FAFC;
  border-color: #E2E8F0;
  color: #475569;
}

.alert-dark {
  background-color: #1E293B;
  border-color: #334155;
  color: #F1F5F9;
}

/* Dark mode alert overrides - keep primary alert consistent with other alert variants */
[data-theme=dark] .alert-primary {
  background-color: rgba(37, 99, 235, 0.15);
  border-color: rgba(147, 197, 253, 0.3);
  color: #93C5FD;
}
[data-theme=dark] .text-primary-emphasis { color: #93C5FD !important; }
[data-theme=dark] .alert-secondary {
  background-color: rgba(100, 116, 139, 0.15);
  border-color: rgba(148, 163, 184, 0.3);
  color: #94A3B8;
}
[data-theme=dark] .alert-success {
  background-color: rgba(22, 163, 74, 0.15);
  border-color: rgba(134, 239, 172, 0.3);
  color: #86EFAC;
}
[data-theme=dark] .alert-danger {
  background-color: rgba(220, 38, 38, 0.15);
  border-color: rgba(252, 165, 165, 0.3);
  color: #FCA5A5;
}
[data-theme=dark] .alert-warning {
  background-color: rgba(217, 119, 6, 0.15);
  border-color: rgba(253, 230, 138, 0.3);
  color: #FDE68A;
}
[data-theme=dark] .alert-info {
  background-color: rgba(8, 145, 178, 0.15);
  border-color: rgba(103, 232, 249, 0.3);
  color: #67E8F9;
}
[data-theme=dark] .alert-light {
  background-color: rgba(241, 245, 249, 0.07);
  border-color: rgba(226, 232, 240, 0.2);
  color: #94A3B8;
}

/* ============================================================
   § 17  TABLE
   ============================================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  color: var(--ps-text-primary);
}

.table th,
.table td {
  padding: .75rem;
  text-align: left;
  border-bottom: 1px solid var(--ps-border);
  vertical-align: top;
}

.table th {
  font-weight: 600;
  background: var(--ps-bg-surface);
  color: var(--ps-text-primary);
}

.table thead tr:last-child th {
  border-bottom: 2px solid var(--ps-border-strong);
}

.table-sm th,
.table-sm td {
  padding: .4rem .75rem;
}

.table-bordered {
  border: 1px solid var(--ps-border);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--ps-border);
}

.table-striped tbody tr:nth-child(odd) {
  background: var(--ps-bg-subtle);
}

.table-hover tbody tr:hover {
  background: var(--ps-bg-surface);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ============================================================
   § 18  LIST GROUP
   ============================================================ */
.list-group {
  display: flex;
  flex-direction: column;
  border-radius: var(--ps-radius);
  overflow: hidden;
  margin-bottom: 1rem;
}

.list-group-item {
  padding: .625rem 1rem;
  border: 1px solid var(--ps-border);
  border-top: none;
  background: var(--ps-bg-base);
  color: var(--ps-text-primary);
  display: flex;
  align-items: center;
}

.list-group-item:first-child {
  border-top: 1px solid var(--ps-border);
  border-radius: var(--ps-radius) var(--ps-radius) 0 0;
}

.list-group-item:last-child {
  border-radius: 0 0 var(--ps-radius) var(--ps-radius);
}

.list-group-item:first-child:last-child {
  border-radius: var(--ps-radius);
}

.list-group-item.active {
  background: var(--ps-primary-fill);
  border-color: var(--ps-primary-fill);
  color: #ffffff;
}

.list-group-item-action {
  cursor: pointer;
  text-decoration: none;
}
.list-group-item-action:hover {
  background: var(--ps-bg-surface);
  color: var(--ps-text-primary);
  text-decoration: none;
}

.list-group-item.active.list-group-item-action:hover {
  background: var(--ps-primary-hover);
}

.list-group-flush {
  border-radius: 0;
}
.list-group-flush .list-group-item {
  border-left: none;
  border-right: none;
}
.list-group-flush .list-group-item:first-child {
  border-top: none;
  border-radius: 0;
}
.list-group-flush .list-group-item:last-child {
  border-radius: 0;
}

/* ============================================================
   § 19  FORMS
   ============================================================ */
.form-label {
  display: block;
  margin-bottom: .375rem;
  font-weight: 500;
  font-size: .9375rem;
  color: var(--ps-text-primary);
}

.form-control {
  display: block;
  width: 100%;
  padding: .5rem .75rem;
  font-size: 1rem;
  font-family: var(--ps-font-sans);
  line-height: 1.5;
  color: var(--ps-text-primary);
  background-color: var(--ps-bg-base);
  border: 1px solid var(--ps-border-strong);
  border-radius: var(--ps-radius);
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(var(--ps-primary-rgb), .15);
}

.form-control:disabled {
  background-color: var(--ps-bg-subtle);
  opacity: .65;
  cursor: not-allowed;
}

.form-control::placeholder {
  color: var(--ps-text-muted);
}

.form-control-sm {
  padding: .25rem .5rem;
  font-size: .875rem;
  border-radius: var(--ps-radius-sm);
}

.form-control-lg {
  padding: .75rem 1rem;
  font-size: 1.125rem;
  border-radius: var(--ps-radius-lg);
}

textarea.form-control {
  min-height: 6rem;
  resize: vertical;
}

.vtx-loading {
  opacity: .45;
  pointer-events: none;
  transition: opacity .12s ease;
}

input[type=date].form-control,
input[type=datetime-local].form-control,
input[type=time].form-control,
input[type=month].form-control,
input[type=week].form-control {
  color-scheme: light;
  padding-right: .5rem;
}

input[type=date].form-control::-webkit-calendar-picker-indicator,
input[type=datetime-local].form-control::-webkit-calendar-picker-indicator,
input[type=time].form-control::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .5;
  padding: 0;
  margin-left: .25rem;
}

input[type=date].form-control::-webkit-calendar-picker-indicator:hover,
input[type=datetime-local].form-control::-webkit-calendar-picker-indicator:hover,
input[type=time].form-control::-webkit-calendar-picker-indicator:hover {
  opacity: .85;
}

[data-theme=dark] input[type=date].form-control,
[data-theme=dark] input[type=datetime-local].form-control,
[data-theme=dark] input[type=time].form-control,
[data-theme=dark] input[type=month].form-control,
[data-theme=dark] input[type=week].form-control {
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) input[type=date].form-control,
  :root:not([data-theme=light]) input[type=datetime-local].form-control,
  :root:not([data-theme=light]) input[type=time].form-control,
  :root:not([data-theme=light]) input[type=month].form-control,
  :root:not([data-theme=light]) input[type=week].form-control {
    color-scheme: dark;
  }
}

.form-select {
  display: block;
  width: 100%;
  padding: .5rem 2.5rem .5rem .75rem;
  font-size: 1rem;
  font-family: var(--ps-font-sans);
  line-height: 1.5;
  color: var(--ps-text-primary);
  background-color: var(--ps-bg-base);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  background-size: 16px 12px;
  border: 1px solid var(--ps-border-strong);
  border-radius: var(--ps-radius);
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(var(--ps-primary-rgb), .15);
}

.form-select:disabled {
  background-color: var(--ps-bg-subtle);
  opacity: .65;
  cursor: not-allowed;
}

.form-select-sm {
  padding: .25rem 2rem .25rem .5rem;
  font-size: .875rem;
  border-radius: var(--ps-radius-sm);
  background-size: 14px 10px;
}

.form-select-lg {
  padding: .75rem 3rem .75rem 1rem;
  font-size: 1.125rem;
  border-radius: var(--ps-radius-lg);
}

.form-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}

.form-check-input {
  width: 1em;
  height: 1em;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--ps-primary);
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
  font-size: .9375rem;
}

.form-switch .form-check-input {
  width: 2em;
  height: 1.15em;
}

.form-text {
  display: block;
  margin-top: .25rem;
  font-size: .875rem;
  color: var(--ps-text-muted);
}

.form-group {
  margin-bottom: 1rem;
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 0;
}

.input-group .form-control:first-child {
  border-top-left-radius: var(--ps-radius);
  border-bottom-left-radius: var(--ps-radius);
}

.input-group .form-control:last-child {
  border-top-right-radius: var(--ps-radius);
  border-bottom-right-radius: var(--ps-radius);
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: .5rem .75rem;
  font-size: 1rem;
  background-color: var(--ps-bg-surface);
  border: 1px solid var(--ps-border-strong);
  color: var(--ps-text-secondary);
  white-space: nowrap;
}

.input-group-text:first-child {
  border-top-left-radius: var(--ps-radius);
  border-bottom-left-radius: var(--ps-radius);
  border-right: none;
}

.input-group-text:last-child {
  border-top-right-radius: var(--ps-radius);
  border-bottom-right-radius: var(--ps-radius);
  border-left: none;
}

.input-group .btn {
  border-radius: 0;
}

.input-group .btn:first-child {
  border-top-left-radius: var(--ps-radius);
  border-bottom-left-radius: var(--ps-radius);
}

.input-group .btn:last-child {
  border-top-right-radius: var(--ps-radius);
  border-bottom-right-radius: var(--ps-radius);
}

/* Validation states */
.form-control.is-valid,
.is-valid .form-control {
  border-color: #16A34A;
}
.form-control.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}

.form-control.is-invalid,
.is-invalid .form-control {
  border-color: #DC2626;
}
.form-control.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220,38,38,.15);
}

.valid-feedback {
  display: block;
  width: 100%;
  margin-top: .25rem;
  font-size: .875rem;
  color: #16A34A;
}

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: .25rem;
  font-size: .875rem;
  color: #DC2626;
}

.form-floating {
  position: relative;
}

.form-floating > .form-control {
  height: 3.5rem;
  padding: 1rem .75rem .25rem;
}

.form-floating > label {
  position: absolute;
  top: 0;
  left: 0;
  padding: 1rem .75rem;
  pointer-events: none;
  transition: transform .15s ease, font-size .15s ease, color .15s ease;
  color: var(--ps-text-muted);
  transform-origin: 0 0;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  transform: scale(.85) translateY(-.5rem);
  font-size: .875rem;
  color: var(--ps-primary);
}

/* ============================================================
   § 20  NAVIGATION / NAVBAR
   ============================================================ */
.navbar {
  display: flex;
  align-items: center;
  padding: .75rem 1rem;
  background: var(--ps-bg-base);
  border-bottom: 1px solid var(--ps-border);
  position: relative;
}

.navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ps-text-primary);
  text-decoration: none;
  margin-right: 1rem;
  flex-shrink: 0;
}
.navbar-brand:hover {
  color: var(--ps-primary);
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.navbar-collapse {
  flex: 1;
}

.navbar-toggler {
  display: none;
  background: none;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: .25rem .5rem;
  cursor: pointer;
  line-height: 1;
  color: var(--ps-text-secondary);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .5rem .75rem;
  color: var(--ps-text-secondary);
  text-decoration: none;
  border-radius: var(--ps-radius);
  transition: color .15s ease, background-color .15s ease;
  font-size: .9375rem;
}
.nav-link:hover,
.nav-link.active {
  color: var(--ps-primary);
  background: var(--ps-primary-light);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: .125rem;
}

/* Tabs */
.nav-tabs {
  border-bottom: 2px solid var(--ps-border);
  gap: 0;
}
.nav-tabs .nav-link {
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: .625rem .875rem;
  color: var(--ps-text-secondary);
  background: none;
}
.nav-tabs .nav-link:hover {
  color: var(--ps-primary);
  background: none;
  border-bottom-color: var(--ps-border-strong);
}
.nav-tabs .nav-link.active {
  color: var(--ps-primary);
  background: none;
  border-bottom-color: var(--ps-primary);
}

/* Pills */
.nav-pills .nav-link {
  border-radius: 50rem;
}
.nav-pills .nav-link.active {
  background: var(--ps-primary-fill);
  color: #ffffff;
}

/* Underline nav */
.nav-underline {
  border-bottom: 1px solid var(--ps-border);
  gap: 0;
}
.nav-underline .nav-link {
  border-radius: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.nav-underline .nav-link.active {
  color: var(--ps-primary);
  border-bottom-color: var(--ps-primary);
  background: none;
}

/* Tab content */
.tab-content > .tab-pane {
  display: none;
}
.tab-content > .active {
  display: block;
}

/* ============================================================
   § 21  CODE & PRE
   ============================================================ */
code {
  font-family: var(--ps-font-mono);
  font-size: .875em;
  padding: .125em .3em;
  background: var(--ps-bg-subtle);
  border-radius: 3px;
  color: var(--ps-text-primary);
}

pre {
  margin: 0 0 1rem;
  padding: 1rem;
  background: #1E1E2E;
  color: #CDD6F4;
  border-radius: var(--ps-radius);
  overflow-x: auto;
  font-family: var(--ps-font-mono);
  font-size: .875rem;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
  border-radius: 0;
}

.code-block {
  background: #1E1E2E;
  color: #CDD6F4;
  border-radius: var(--ps-radius);
  padding: 1rem;
  font-family: var(--ps-font-mono);
  font-size: .875rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  margin-bottom: 1rem;
}

kbd {
  display: inline-block;
  padding: .125rem .375rem;
  font-family: var(--ps-font-mono);
  font-size: .8125rem;
  color: var(--ps-text-primary);
  background: var(--ps-bg-subtle);
  border: 1px solid var(--ps-border-strong);
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,.1);
}

/* ============================================================
   § 22  MODAL
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1055;
  overflow-x: hidden;
  overflow-y: auto;
}

.modal.show {
  display: block;
}

.modal.fade .modal-dialog {
  transition: transform .2s ease;
  transform: translateY(-2rem);
}

.modal.show .modal-dialog {
  transform: translateY(0);
}

.modal-dialog {
  position: relative;
  width: auto;
  max-width: 560px;
  margin: 1.75rem auto;
  pointer-events: none;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: var(--ps-bg-base);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg);
  box-shadow: var(--ps-shadow-lg);
  outline: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg) var(--ps-radius-lg) 0 0;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.5;
}

.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  padding: .75rem 1rem;
  border-top: 1px solid var(--ps-border);
  border-radius: 0 0 var(--ps-radius-lg) var(--ps-radius-lg);
}

.modal-sm .modal-dialog  { max-width: 300px; }
.modal-lg .modal-dialog  { max-width: 800px; }
.modal-xl .modal-dialog  { max-width: 1140px; }

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,.5);
  z-index: 1050;
}

.modal-backdrop.fade { opacity: 0; transition: opacity .2s ease; }
.modal-backdrop.show { opacity: 1; }

/* ============================================================
   § 23  DROPDOWN
   ============================================================ */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle::after {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: .375em;
  vertical-align: .2em;
  content: '';
  border-top: .3em solid;
  border-right: .3em solid transparent;
  border-left: .3em solid transparent;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 10rem;
  padding: .25rem 0;
  margin: .125rem 0 0;
  background-color: var(--ps-bg-base);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow-md);
  list-style: none;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-menu-end {
  left: auto;
  right: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  padding: .4rem 1rem;
  clear: both;
  font-size: .9375rem;
  color: var(--ps-text-primary);
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color .1s ease;
}
.dropdown-item:hover {
  background-color: var(--ps-primary-light);
  color: var(--ps-primary);
  text-decoration: none;
}
.dropdown-item.active {
  background-color: var(--ps-primary-fill);
  color: #ffffff;
}
.dropdown-item:disabled,
.dropdown-item.disabled {
  color: var(--ps-text-muted);
  pointer-events: none;
}

.dropdown-divider {
  height: 0;
  margin: .25rem 0;
  overflow: hidden;
  border-top: 1px solid var(--ps-border);
}

.dropdown-header {
  display: block;
  padding: .25rem 1rem;
  margin-bottom: 0;
  font-size: .75rem;
  font-weight: 600;
  color: var(--ps-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* ============================================================
   § 24  PROGRESS
   ============================================================ */
.progress {
  height: .75rem;
  background: var(--ps-bg-subtle);
  border-radius: 50rem;
  overflow: hidden;
  display: flex;
  margin-bottom: 1rem;
}

.progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: var(--ps-primary-fill);
  transition: width .3s ease;
  white-space: nowrap;
  font-size: .6875rem;
  font-weight: 600;
  color: #ffffff;
}

.progress-bar.bg-success { background: var(--ps-success) !important; }
.progress-bar.bg-danger  { background: var(--ps-danger) !important; }
.progress-bar.bg-warning { background: var(--ps-warning) !important; }
.progress-bar.bg-info    { background: var(--ps-info) !important; }

.progress-sm { height: .375rem; }
.progress-lg { height: 1.25rem; }

/* Striped */
.progress-bar-striped {
  background-image: linear-gradient(
    45deg,
    rgba(255,255,255,.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255,255,255,.15) 50%,
    rgba(255,255,255,.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
}

/* ============================================================
   § 25  CAROUSEL
   ============================================================ */
.carousel {
  position: relative;
  overflow: hidden;
}

.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-item {
  position: relative;
  display: none;
  float: left;
  width: 100%;
  margin-right: -100%;
  backface-visibility: hidden;
  transition: transform .6s ease;
}

.carousel-item.active {
  display: block;
}

.carousel-item-next,
.carousel-item-prev {
  display: block;
}

.carousel-item-next:not(.carousel-item-start),
.active.carousel-item-end {
  transform: translateX(100%);
}

.carousel-item-prev:not(.carousel-item-end),
.active.carousel-item-start {
  transform: translateX(-100%);
}

.carousel-control-prev,
.carousel-control-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15%;
  color: #ffffff;
  text-align: center;
  background: none;
  border: none;
  cursor: pointer;
  opacity: .5;
  transition: opacity .15s ease;
}

.carousel-control-prev { left: 0; }
.carousel-control-next { right: 0; }
.carousel-control-prev:hover,
.carousel-control-next:hover { opacity: .9; }

.carousel-control-prev-icon,
.carousel-control-next-icon {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  background-repeat: no-repeat;
  background-position: 50%;
  background-size: 100% 100%;
}

.carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
}
.carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}

.carousel-indicators {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0;
  margin-bottom: 1rem;
  list-style: none;
  gap: .375rem;
}

.carousel-indicators [data-bs-target],
.carousel-indicators button {
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background-color: rgba(255,255,255,.5);
  border: none;
  cursor: pointer;
  transition: background-color .2s ease;
  padding: 0;
}

.carousel-indicators .active,
.carousel-indicators button.active {
  background-color: #ffffff;
}

.carousel-caption {
  position: absolute;
  right: 15%;
  bottom: 1.25rem;
  left: 15%;
  z-index: 10;
  padding: 1.25rem;
  color: #ffffff;
  text-align: center;
}

/* ============================================================
   § 26  OFFCANVAS
   ============================================================ */
.offcanvas {
  position: fixed;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  visibility: hidden;
  background-color: var(--ps-bg-base);
  border: 1px solid var(--ps-border);
  outline: 0;
  transition: transform .3s ease;
}

.offcanvas.show {
  visibility: visible;
}

.offcanvas-start {
  top: 0;
  left: 0;
  width: 320px;
  height: 100%;
  border-right: 1px solid var(--ps-border);
  border-left: none;
  border-top: none;
  border-bottom: none;
  transform: translateX(-100%);
}

.offcanvas-start.show {
  transform: translateX(0);
}

.offcanvas-end {
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  border-left: 1px solid var(--ps-border);
  border-right: none;
  border-top: none;
  border-bottom: none;
  transform: translateX(100%);
}

.offcanvas-end.show {
  transform: translateX(0);
}

.offcanvas-top {
  top: 0;
  left: 0;
  right: 0;
  height: auto;
  max-height: 30%;
  border-bottom: 1px solid var(--ps-border);
  border-top: none;
  border-left: none;
  border-right: none;
  transform: translateY(-100%);
}

.offcanvas-top.show {
  transform: translateY(0);
}

.offcanvas-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: auto;
  max-height: 30%;
  border-top: 1px solid var(--ps-border);
  border-bottom: none;
  border-left: none;
  border-right: none;
  transform: translateY(100%);
}

.offcanvas-bottom.show {
  transform: translateY(0);
}

.offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--ps-border);
}

.offcanvas-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.offcanvas-body {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
}

.offcanvas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,.5);
  z-index: 1040;
}

/* ============================================================
   § 27  TOOLTIP & POPOVER
   ============================================================ */
.tooltip {
  position: absolute;
  z-index: 1080;
  display: block;
  margin: 0;
  font-size: .8125rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
  --tooltip-bg: #0F172A;
}

.tooltip.show {
  opacity: 1;
}

.tooltip-inner {
  max-width: 200px;
  padding: .375rem .625rem;
  color: #ffffff;
  text-align: center;
  background-color: var(--tooltip-bg);
  border-radius: var(--ps-radius);
}

/* Tooltip color variants - set --tooltip-bg so both inner AND arrow stay in sync */
.tooltip-primary { --tooltip-bg: var(--ps-primary); }
.tooltip-success { --tooltip-bg: #198754; }
.tooltip-danger  { --tooltip-bg: #dc3545; }
.tooltip-warning { --tooltip-bg: #cc6200; }
.tooltip-info    { --tooltip-bg: #0aa2c0; }

.tooltip-arrow {
  position: absolute;
  display: block;
  width: .8rem;
  height: .4rem;
}

.tooltip-arrow::before {
  position: absolute;
  content: '';
  border-color: transparent;
  border-style: solid;
}

.bs-tooltip-top .tooltip-arrow,
[data-popper-placement^=top] .tooltip-arrow {
  bottom: 0;
}

.bs-tooltip-top .tooltip-arrow::before,
[data-popper-placement^=top] .tooltip-arrow::before {
  top: -1px;
  border-width: .4rem .4rem 0;
  border-top-color: var(--tooltip-bg);
}

.bs-tooltip-bottom .tooltip-arrow,
[data-popper-placement^=bottom] .tooltip-arrow {
  top: 0;
}

.bs-tooltip-bottom .tooltip-arrow::before,
[data-popper-placement^=bottom] .tooltip-arrow::before {
  bottom: -1px;
  border-width: 0 .4rem .4rem;
  border-bottom-color: var(--tooltip-bg);
}

.bs-tooltip-start .tooltip-arrow,
[data-popper-placement^=left] .tooltip-arrow {
  right: 0;
  width: .4rem;
  height: .8rem;
}

.bs-tooltip-start .tooltip-arrow::before,
[data-popper-placement^=left] .tooltip-arrow::before {
  left: -1px;
  border-width: .4rem 0 .4rem .4rem;
  border-left-color: var(--tooltip-bg);
}

.bs-tooltip-end .tooltip-arrow,
[data-popper-placement^=right] .tooltip-arrow {
  left: 0;
  width: .4rem;
  height: .8rem;
}

.bs-tooltip-end .tooltip-arrow::before,
[data-popper-placement^=right] .tooltip-arrow::before {
  right: -1px;
  border-width: .4rem .4rem .4rem 0;
  border-right-color: var(--tooltip-bg);
}

/* Popover */
.popover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1070;
  display: block;
  max-width: 276px;
  font-size: .875rem;
  background-color: var(--ps-bg-base);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-lg);
  box-shadow: var(--ps-shadow-md);
  opacity: 0;
  transition: opacity .15s ease;
}

.popover.show {
  opacity: 1;
}

.popover-header {
  padding: .625rem .875rem;
  margin-bottom: 0;
  font-weight: 600;
  background-color: var(--ps-bg-surface);
  border-bottom: 1px solid var(--ps-border);
  border-top-left-radius: calc(var(--ps-radius-lg) - 1px);
  border-top-right-radius: calc(var(--ps-radius-lg) - 1px);
}

.popover-body {
  padding: .75rem .875rem;
  color: var(--ps-text-secondary);
}

.popover-arrow {
  position: absolute;
  display: block;
  width: 1rem;
  height: .5rem;
}

/* ============================================================
   § 28  TOAST
   ============================================================ */
.toast {
  width: 350px;
  max-width: 100%;
  pointer-events: auto;
  background-color: var(--ps-bg-base);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow-md);
  opacity: 0;
  transition: opacity .15s ease;
  overflow: hidden;
}

.toast.show {
  opacity: 1;
}

.toast:not(.show) {
  display: none;
}

.toast-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  background-color: var(--ps-bg-surface);
  border-bottom: 1px solid var(--ps-border);
  color: var(--ps-text-secondary);
}

.toast-body {
  padding: .75rem;
  word-break: break-word;
  color: var(--ps-text-primary);
}

.toast-container {
  position: absolute;
  z-index: 1090;
  width: max-content;
  max-width: 100%;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

/* Position utilities for toasts */
.position-fixed    { position: fixed !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-static   { position: static !important; }
.position-sticky   { position: sticky !important; }

.top-0     { top: 0 !important; }
.top-50    { top: 50% !important; }
.top-100   { top: 100% !important; }
.bottom-0  { bottom: 0 !important; }
.bottom-50 { bottom: 50% !important; }
.bottom-100 { bottom: 100% !important; }
.start-0   { left: 0 !important; }
.start-50  { left: 50% !important; }
.start-100 { left: 100% !important; }
.end-0     { right: 0 !important; }
.end-50    { right: 50% !important; }
.end-100   { right: 100% !important; }

.translate-middle   { transform: translateX(-50%) translateY(-50%) !important; }
.translate-middle-x { transform: translateX(-50%) !important; }
.translate-middle-y { transform: translateY(-50%) !important; }

/* ============================================================
   § 29  ACCORDION & COLLAPSE
   ============================================================ */
.accordion {
  border-radius: var(--ps-radius);
  overflow: hidden;
  border: 1px solid var(--ps-border);
  margin-bottom: 1rem;
}

.accordion-item {
  border-bottom: 1px solid var(--ps-border);
  background: var(--ps-bg-base);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  margin: 0;
}

.accordion-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: .875rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ps-text-primary);
  background: var(--ps-bg-base);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background-color .15s ease;
}

.accordion-button:hover {
  background: var(--ps-bg-surface);
}

.accordion-button::after {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  margin-left: auto;
  content: '';
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform .2s ease;
}

.accordion-button.collapsed::after {
  transform: rotate(0deg);
}

.accordion-button:not(.collapsed) {
  color: var(--ps-primary);
  background: var(--ps-primary-light);
}

.accordion-button:not(.collapsed)::after {
  transform: rotate(-180deg);
}

.accordion-body {
  padding: .875rem 1rem;
  color: var(--ps-text-secondary);
  overflow: hidden;
  transition: max-height .3s ease;
}

/* Collapse */
.collapse {
  display: none;
}

.collapse.show {
  display: block;
}

.collapsing {
  height: 0;
  overflow: hidden;
  transition: height .2s ease;
}

/* ============================================================
   § 30  BREADCRUMB
   ============================================================ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 0;
  margin-bottom: 1rem;
  list-style: none;
  gap: .25rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  font-size: .875rem;
  color: var(--ps-text-muted);
}

.breadcrumb-item a {
  color: var(--ps-primary);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: var(--ps-text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  padding-right: .25rem;
  color: var(--ps-text-muted);
}

/* ============================================================
   § 31  PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: .25rem;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 .5rem;
  font-size: .875rem;
  color: var(--ps-primary);
  background-color: var(--ps-bg-base);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
  cursor: pointer;
}

.page-link:hover {
  background-color: var(--ps-primary-light);
  color: var(--ps-primary);
  text-decoration: none;
}

.page-item.active .page-link {
  background-color: var(--ps-primary-fill);
  border-color: var(--ps-primary-fill);
  color: #ffffff;
}

.page-item.disabled .page-link {
  color: var(--ps-text-muted);
  pointer-events: none;
  background-color: var(--ps-bg-subtle);
}

/* ============================================================
   § 32  SPINNER
   ============================================================ */
@keyframes ps-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes ps-grow {
  0%   { transform: scale(0); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: .25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: ps-spin .75s linear infinite;
}

.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: .2em;
}

.spinner-grow {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  background-color: currentColor;
  border-radius: 50%;
  opacity: 0;
  animation: ps-grow .75s linear infinite;
}

.spinner-grow-sm {
  width: 1rem;
  height: 1rem;
}

/* ============================================================
   § 33  POSITION & SIZING UTILITIES
   ============================================================ */

/* Sizing */
.w-25   { width: 25% !important; }
.w-50   { width: 50% !important; }
.w-75   { width: 75% !important; }
.w-100  { width: 100% !important; }
.w-auto { width: auto !important; }

.h-25   { height: 25% !important; }
.h-50   { height: 50% !important; }
.h-75   { height: 75% !important; }
.h-100  { height: 100% !important; }
.h-auto { height: auto !important; }

.mw-100   { max-width: 100% !important; }
.mh-100   { max-height: 100% !important; }
.vw-100   { width: 100vw !important; }
.vh-100   { height: 100vh !important; }
.min-vw-100 { min-width: 100vw !important; }
.min-vh-100 { min-height: 100vh !important; }

/* ============================================================
   § 34  TEXT UTILITIES
   ============================================================ */
.text-start  { text-align: left !important; }
.text-center { text-align: center !important; }
.text-end    { text-align: right !important; }

.text-wrap   { white-space: normal !important; }
.text-nowrap { white-space: nowrap !important; }
.text-break  { word-wrap: break-word !important; word-break: break-word !important; }
.text-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.text-lowercase  { text-transform: lowercase !important; }
.text-uppercase  { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }

.text-decoration-none        { text-decoration: none !important; }
.text-decoration-underline   { text-decoration: underline !important; }
.text-decoration-line-through { text-decoration: line-through !important; }

.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.fs-6 { font-size: 1rem !important; }
.fs-7 { font-size: .875rem !important; }

.text-opacity-25  { opacity: .25 !important; }
.text-opacity-50  { opacity: .5 !important; }
.text-opacity-75  { opacity: .75 !important; }
.text-opacity-100 { opacity: 1 !important; }

/* ============================================================
   § 35  OVERFLOW & VISIBILITY
   ============================================================ */
.overflow-auto    { overflow: auto !important; }
.overflow-hidden  { overflow: hidden !important; }
.overflow-visible { overflow: visible !important; }
.overflow-scroll  { overflow: scroll !important; }
.overflow-x-auto  { overflow-x: auto !important; }
.overflow-y-auto  { overflow-y: auto !important; }

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

.opacity-0   { opacity: 0 !important; }
.opacity-25  { opacity: .25 !important; }
.opacity-50  { opacity: .5 !important; }
.opacity-75  { opacity: .75 !important; }
.opacity-100 { opacity: 1 !important; }

/* ============================================================
   § 37  RESPONSIVE BREAKPOINTS
   ============================================================ */

/* sm - 576px */
@media (min-width: 576px) {
  .col-sm        { flex: 1 0 0%; }
  .col-sm-auto   { flex: 0 0 auto; width: auto; }
  .col-sm-1      { flex: 0 0 auto; width: 8.33333%; }
  .col-sm-2      { flex: 0 0 auto; width: 16.66667%; }
  .col-sm-3      { flex: 0 0 auto; width: 25%; }
  .col-sm-4      { flex: 0 0 auto; width: 33.33333%; }
  .col-sm-5      { flex: 0 0 auto; width: 41.66667%; }
  .col-sm-6      { flex: 0 0 auto; width: 50%; }
  .col-sm-7      { flex: 0 0 auto; width: 58.33333%; }
  .col-sm-8      { flex: 0 0 auto; width: 66.66667%; }
  .col-sm-9      { flex: 0 0 auto; width: 75%; }
  .col-sm-10     { flex: 0 0 auto; width: 83.33333%; }
  .col-sm-11     { flex: 0 0 auto; width: 91.66667%; }
  .col-sm-12     { flex: 0 0 auto; width: 100%; }

  .row-cols-sm-1 > * { flex: 0 0 auto; width: 100%; }
  .row-cols-sm-2 > * { flex: 0 0 auto; width: 50%; }
  .row-cols-sm-3 > * { flex: 0 0 auto; width: 33.33333%; }
  .row-cols-sm-4 > * { flex: 0 0 auto; width: 25%; }
  .row-cols-sm-5 > * { flex: 0 0 auto; width: 20%; }
  .row-cols-sm-6 > * { flex: 0 0 auto; width: 16.66667%; }

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

  .text-sm-start  { text-align: left !important; }
  .text-sm-center { text-align: center !important; }
  .text-sm-end    { text-align: right !important; }

  .flex-sm-row            { flex-direction: row !important; }
  .flex-sm-column         { flex-direction: column !important; }
  .flex-sm-row-reverse    { flex-direction: row-reverse !important; }
  .flex-sm-column-reverse { flex-direction: column-reverse !important; }
  .flex-sm-wrap           { flex-wrap: wrap !important; }
  .flex-sm-nowrap         { flex-wrap: nowrap !important; }
  .justify-content-sm-start   { justify-content: flex-start !important; }
  .justify-content-sm-end     { justify-content: flex-end !important; }
  .justify-content-sm-center  { justify-content: center !important; }
  .justify-content-sm-between { justify-content: space-between !important; }
  .justify-content-sm-around  { justify-content: space-around !important; }
  .align-items-sm-start   { align-items: flex-start !important; }
  .align-items-sm-end     { align-items: flex-end !important; }
  .align-items-sm-center  { align-items: center !important; }
  .align-items-sm-stretch { align-items: stretch !important; }

  .m-sm-0  { margin: 0 !important; }
  .m-sm-1  { margin: .25rem !important; }
  .m-sm-2  { margin: .5rem !important; }
  .m-sm-3  { margin: 1rem !important; }
  .m-sm-4  { margin: 1.5rem !important; }
  .m-sm-5  { margin: 3rem !important; }
  .mt-sm-0 { margin-top: 0 !important; }
  .mt-sm-1 { margin-top: .25rem !important; }
  .mt-sm-2 { margin-top: .5rem !important; }
  .mt-sm-3 { margin-top: 1rem !important; }
  .mt-sm-4 { margin-top: 1.5rem !important; }
  .mt-sm-5 { margin-top: 3rem !important; }
  .mb-sm-0 { margin-bottom: 0 !important; }
  .mb-sm-1 { margin-bottom: .25rem !important; }
  .mb-sm-2 { margin-bottom: .5rem !important; }
  .mb-sm-3 { margin-bottom: 1rem !important; }
  .mb-sm-4 { margin-bottom: 1.5rem !important; }
  .mb-sm-5 { margin-bottom: 3rem !important; }
  .mx-sm-auto { margin-left: auto !important; margin-right: auto !important; }
  .p-sm-0  { padding: 0 !important; }
  .p-sm-1  { padding: .25rem !important; }
  .p-sm-2  { padding: .5rem !important; }
  .p-sm-3  { padding: 1rem !important; }
  .p-sm-4  { padding: 1.5rem !important; }
  .p-sm-5  { padding: 3rem !important; }
  .px-sm-0 { padding-left: 0 !important; padding-right: 0 !important; }
  .px-sm-1 { padding-left: .25rem !important; padding-right: .25rem !important; }
  .px-sm-2 { padding-left: .5rem !important; padding-right: .5rem !important; }
  .px-sm-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .px-sm-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
  .px-sm-5 { padding-left: 3rem !important; padding-right: 3rem !important; }
  .py-sm-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
  .py-sm-1 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
  .py-sm-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
  .py-sm-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .py-sm-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
  .py-sm-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
}

/* md - 768px */
@media (min-width: 768px) {
  .col-md        { flex: 1 0 0%; }
  .col-md-auto   { flex: 0 0 auto; width: auto; }
  .col-md-1      { flex: 0 0 auto; width: 8.33333%; }
  .col-md-2      { flex: 0 0 auto; width: 16.66667%; }
  .col-md-3      { flex: 0 0 auto; width: 25%; }
  .col-md-4      { flex: 0 0 auto; width: 33.33333%; }
  .col-md-5      { flex: 0 0 auto; width: 41.66667%; }
  .col-md-6      { flex: 0 0 auto; width: 50%; }
  .col-md-7      { flex: 0 0 auto; width: 58.33333%; }
  .col-md-8      { flex: 0 0 auto; width: 66.66667%; }
  .col-md-9      { flex: 0 0 auto; width: 75%; }
  .col-md-10     { flex: 0 0 auto; width: 83.33333%; }
  .col-md-11     { flex: 0 0 auto; width: 91.66667%; }
  .col-md-12     { flex: 0 0 auto; width: 100%; }

  .row-cols-md-1 > * { flex: 0 0 auto; width: 100%; }
  .row-cols-md-2 > * { flex: 0 0 auto; width: 50%; }
  .row-cols-md-3 > * { flex: 0 0 auto; width: 33.33333%; }
  .row-cols-md-4 > * { flex: 0 0 auto; width: 25%; }
  .row-cols-md-5 > * { flex: 0 0 auto; width: 20%; }
  .row-cols-md-6 > * { flex: 0 0 auto; width: 16.66667%; }

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

  .text-md-start  { text-align: left !important; }
  .text-md-center { text-align: center !important; }
  .text-md-end    { text-align: right !important; }

  .flex-md-row            { flex-direction: row !important; }
  .flex-md-column         { flex-direction: column !important; }
  .flex-md-row-reverse    { flex-direction: row-reverse !important; }
  .flex-md-column-reverse { flex-direction: column-reverse !important; }
  .flex-md-wrap           { flex-wrap: wrap !important; }
  .flex-md-nowrap         { flex-wrap: nowrap !important; }
  .justify-content-md-start   { justify-content: flex-start !important; }
  .justify-content-md-end     { justify-content: flex-end !important; }
  .justify-content-md-center  { justify-content: center !important; }
  .justify-content-md-between { justify-content: space-between !important; }
  .justify-content-md-around  { justify-content: space-around !important; }
  .align-items-md-start   { align-items: flex-start !important; }
  .align-items-md-end     { align-items: flex-end !important; }
  .align-items-md-center  { align-items: center !important; }
  .align-items-md-stretch { align-items: stretch !important; }

  .m-md-0  { margin: 0 !important; }
  .m-md-1  { margin: .25rem !important; }
  .m-md-2  { margin: .5rem !important; }
  .m-md-3  { margin: 1rem !important; }
  .m-md-4  { margin: 1.5rem !important; }
  .m-md-5  { margin: 3rem !important; }
  .mt-md-0 { margin-top: 0 !important; }
  .mt-md-1 { margin-top: .25rem !important; }
  .mt-md-2 { margin-top: .5rem !important; }
  .mt-md-3 { margin-top: 1rem !important; }
  .mt-md-4 { margin-top: 1.5rem !important; }
  .mt-md-5 { margin-top: 3rem !important; }
  .mb-md-0 { margin-bottom: 0 !important; }
  .mb-md-1 { margin-bottom: .25rem !important; }
  .mb-md-2 { margin-bottom: .5rem !important; }
  .mb-md-3 { margin-bottom: 1rem !important; }
  .mb-md-4 { margin-bottom: 1.5rem !important; }
  .mb-md-5 { margin-bottom: 3rem !important; }
  .mx-md-auto { margin-left: auto !important; margin-right: auto !important; }
  .p-md-0  { padding: 0 !important; }
  .p-md-1  { padding: .25rem !important; }
  .p-md-2  { padding: .5rem !important; }
  .p-md-3  { padding: 1rem !important; }
  .p-md-4  { padding: 1.5rem !important; }
  .p-md-5  { padding: 3rem !important; }
  .px-md-0 { padding-left: 0 !important; padding-right: 0 !important; }
  .px-md-1 { padding-left: .25rem !important; padding-right: .25rem !important; }
  .px-md-2 { padding-left: .5rem !important; padding-right: .5rem !important; }
  .px-md-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .px-md-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
  .px-md-5 { padding-left: 3rem !important; padding-right: 3rem !important; }
  .py-md-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
  .py-md-1 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
  .py-md-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
  .py-md-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .py-md-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
  .py-md-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
}

/* lg - 992px */
@media (min-width: 992px) {
  .col-lg        { flex: 1 0 0%; }
  .col-lg-auto   { flex: 0 0 auto; width: auto; }
  .col-lg-1      { flex: 0 0 auto; width: 8.33333%; }
  .col-lg-2      { flex: 0 0 auto; width: 16.66667%; }
  .col-lg-3      { flex: 0 0 auto; width: 25%; }
  .col-lg-4      { flex: 0 0 auto; width: 33.33333%; }
  .col-lg-5      { flex: 0 0 auto; width: 41.66667%; }
  .col-lg-6      { flex: 0 0 auto; width: 50%; }
  .col-lg-7      { flex: 0 0 auto; width: 58.33333%; }
  .col-lg-8      { flex: 0 0 auto; width: 66.66667%; }
  .col-lg-9      { flex: 0 0 auto; width: 75%; }
  .col-lg-10     { flex: 0 0 auto; width: 83.33333%; }
  .col-lg-11     { flex: 0 0 auto; width: 91.66667%; }
  .col-lg-12     { flex: 0 0 auto; width: 100%; }

  .row-cols-lg-1 > * { flex: 0 0 auto; width: 100%; }
  .row-cols-lg-2 > * { flex: 0 0 auto; width: 50%; }
  .row-cols-lg-3 > * { flex: 0 0 auto; width: 33.33333%; }
  .row-cols-lg-4 > * { flex: 0 0 auto; width: 25%; }
  .row-cols-lg-5 > * { flex: 0 0 auto; width: 20%; }
  .row-cols-lg-6 > * { flex: 0 0 auto; width: 16.66667%; }

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

  .text-lg-start  { text-align: left !important; }
  .text-lg-center { text-align: center !important; }
  .text-lg-end    { text-align: right !important; }

  .flex-lg-row            { flex-direction: row !important; }
  .flex-lg-column         { flex-direction: column !important; }
  .flex-lg-row-reverse    { flex-direction: row-reverse !important; }
  .flex-lg-column-reverse { flex-direction: column-reverse !important; }
  .flex-lg-wrap           { flex-wrap: wrap !important; }
  .flex-lg-nowrap         { flex-wrap: nowrap !important; }
  .justify-content-lg-start   { justify-content: flex-start !important; }
  .justify-content-lg-end     { justify-content: flex-end !important; }
  .justify-content-lg-center  { justify-content: center !important; }
  .justify-content-lg-between { justify-content: space-between !important; }
  .justify-content-lg-around  { justify-content: space-around !important; }
  .align-items-lg-start   { align-items: flex-start !important; }
  .align-items-lg-end     { align-items: flex-end !important; }
  .align-items-lg-center  { align-items: center !important; }
  .align-items-lg-stretch { align-items: stretch !important; }

  .m-lg-0  { margin: 0 !important; }
  .m-lg-1  { margin: .25rem !important; }
  .m-lg-2  { margin: .5rem !important; }
  .m-lg-3  { margin: 1rem !important; }
  .m-lg-4  { margin: 1.5rem !important; }
  .m-lg-5  { margin: 3rem !important; }
  .mt-lg-0 { margin-top: 0 !important; }
  .mt-lg-1 { margin-top: .25rem !important; }
  .mt-lg-2 { margin-top: .5rem !important; }
  .mt-lg-3 { margin-top: 1rem !important; }
  .mt-lg-4 { margin-top: 1.5rem !important; }
  .mt-lg-5 { margin-top: 3rem !important; }
  .mb-lg-0 { margin-bottom: 0 !important; }
  .mb-lg-1 { margin-bottom: .25rem !important; }
  .mb-lg-2 { margin-bottom: .5rem !important; }
  .mb-lg-3 { margin-bottom: 1rem !important; }
  .mb-lg-4 { margin-bottom: 1.5rem !important; }
  .mb-lg-5 { margin-bottom: 3rem !important; }
  .mx-lg-auto { margin-left: auto !important; margin-right: auto !important; }
  .p-lg-0  { padding: 0 !important; }
  .p-lg-1  { padding: .25rem !important; }
  .p-lg-2  { padding: .5rem !important; }
  .p-lg-3  { padding: 1rem !important; }
  .p-lg-4  { padding: 1.5rem !important; }
  .p-lg-5  { padding: 3rem !important; }
  .px-lg-0 { padding-left: 0 !important; padding-right: 0 !important; }
  .px-lg-1 { padding-left: .25rem !important; padding-right: .25rem !important; }
  .px-lg-2 { padding-left: .5rem !important; padding-right: .5rem !important; }
  .px-lg-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .px-lg-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
  .px-lg-5 { padding-left: 3rem !important; padding-right: 3rem !important; }
  .py-lg-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
  .py-lg-1 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
  .py-lg-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
  .py-lg-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .py-lg-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
  .py-lg-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
}

/* xl - 1200px */
@media (min-width: 1200px) {
  .col-xl        { flex: 1 0 0%; }
  .col-xl-auto   { flex: 0 0 auto; width: auto; }
  .col-xl-1      { flex: 0 0 auto; width: 8.33333%; }
  .col-xl-2      { flex: 0 0 auto; width: 16.66667%; }
  .col-xl-3      { flex: 0 0 auto; width: 25%; }
  .col-xl-4      { flex: 0 0 auto; width: 33.33333%; }
  .col-xl-5      { flex: 0 0 auto; width: 41.66667%; }
  .col-xl-6      { flex: 0 0 auto; width: 50%; }
  .col-xl-7      { flex: 0 0 auto; width: 58.33333%; }
  .col-xl-8      { flex: 0 0 auto; width: 66.66667%; }
  .col-xl-9      { flex: 0 0 auto; width: 75%; }
  .col-xl-10     { flex: 0 0 auto; width: 83.33333%; }
  .col-xl-11     { flex: 0 0 auto; width: 91.66667%; }
  .col-xl-12     { flex: 0 0 auto; width: 100%; }

  .row-cols-xl-1 > * { flex: 0 0 auto; width: 100%; }
  .row-cols-xl-2 > * { flex: 0 0 auto; width: 50%; }
  .row-cols-xl-3 > * { flex: 0 0 auto; width: 33.33333%; }
  .row-cols-xl-4 > * { flex: 0 0 auto; width: 25%; }
  .row-cols-xl-5 > * { flex: 0 0 auto; width: 20%; }
  .row-cols-xl-6 > * { flex: 0 0 auto; width: 16.66667%; }

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

  .text-xl-start  { text-align: left !important; }
  .text-xl-center { text-align: center !important; }
  .text-xl-end    { text-align: right !important; }

  .flex-xl-row            { flex-direction: row !important; }
  .flex-xl-column         { flex-direction: column !important; }
  .flex-xl-row-reverse    { flex-direction: row-reverse !important; }
  .flex-xl-column-reverse { flex-direction: column-reverse !important; }
  .flex-xl-wrap           { flex-wrap: wrap !important; }
  .flex-xl-nowrap         { flex-wrap: nowrap !important; }
  .justify-content-xl-start   { justify-content: flex-start !important; }
  .justify-content-xl-end     { justify-content: flex-end !important; }
  .justify-content-xl-center  { justify-content: center !important; }
  .justify-content-xl-between { justify-content: space-between !important; }
  .justify-content-xl-around  { justify-content: space-around !important; }
  .align-items-xl-start   { align-items: flex-start !important; }
  .align-items-xl-end     { align-items: flex-end !important; }
  .align-items-xl-center  { align-items: center !important; }
  .align-items-xl-stretch { align-items: stretch !important; }

  .m-xl-0  { margin: 0 !important; }
  .m-xl-1  { margin: .25rem !important; }
  .m-xl-2  { margin: .5rem !important; }
  .m-xl-3  { margin: 1rem !important; }
  .m-xl-4  { margin: 1.5rem !important; }
  .m-xl-5  { margin: 3rem !important; }
  .mt-xl-0 { margin-top: 0 !important; }
  .mt-xl-1 { margin-top: .25rem !important; }
  .mt-xl-2 { margin-top: .5rem !important; }
  .mt-xl-3 { margin-top: 1rem !important; }
  .mt-xl-4 { margin-top: 1.5rem !important; }
  .mt-xl-5 { margin-top: 3rem !important; }
  .mb-xl-0 { margin-bottom: 0 !important; }
  .mb-xl-1 { margin-bottom: .25rem !important; }
  .mb-xl-2 { margin-bottom: .5rem !important; }
  .mb-xl-3 { margin-bottom: 1rem !important; }
  .mb-xl-4 { margin-bottom: 1.5rem !important; }
  .mb-xl-5 { margin-bottom: 3rem !important; }
  .mx-xl-auto { margin-left: auto !important; margin-right: auto !important; }
  .p-xl-0  { padding: 0 !important; }
  .p-xl-1  { padding: .25rem !important; }
  .p-xl-2  { padding: .5rem !important; }
  .p-xl-3  { padding: 1rem !important; }
  .p-xl-4  { padding: 1.5rem !important; }
  .p-xl-5  { padding: 3rem !important; }
  .px-xl-0 { padding-left: 0 !important; padding-right: 0 !important; }
  .px-xl-1 { padding-left: .25rem !important; padding-right: .25rem !important; }
  .px-xl-2 { padding-left: .5rem !important; padding-right: .5rem !important; }
  .px-xl-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .px-xl-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
  .px-xl-5 { padding-left: 3rem !important; padding-right: 3rem !important; }
  .py-xl-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
  .py-xl-1 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
  .py-xl-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
  .py-xl-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .py-xl-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
  .py-xl-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
}

/* xxl - 1400px */
@media (min-width: 1400px) {
  .col-xxl        { flex: 1 0 0%; }
  .col-xxl-auto   { flex: 0 0 auto; width: auto; }
  .col-xxl-1      { flex: 0 0 auto; width: 8.33333%; }
  .col-xxl-2      { flex: 0 0 auto; width: 16.66667%; }
  .col-xxl-3      { flex: 0 0 auto; width: 25%; }
  .col-xxl-4      { flex: 0 0 auto; width: 33.33333%; }
  .col-xxl-5      { flex: 0 0 auto; width: 41.66667%; }
  .col-xxl-6      { flex: 0 0 auto; width: 50%; }
  .col-xxl-7      { flex: 0 0 auto; width: 58.33333%; }
  .col-xxl-8      { flex: 0 0 auto; width: 66.66667%; }
  .col-xxl-9      { flex: 0 0 auto; width: 75%; }
  .col-xxl-10     { flex: 0 0 auto; width: 83.33333%; }
  .col-xxl-11     { flex: 0 0 auto; width: 91.66667%; }
  .col-xxl-12     { flex: 0 0 auto; width: 100%; }

  .row-cols-xxl-1 > * { flex: 0 0 auto; width: 100%; }
  .row-cols-xxl-2 > * { flex: 0 0 auto; width: 50%; }
  .row-cols-xxl-3 > * { flex: 0 0 auto; width: 33.33333%; }
  .row-cols-xxl-4 > * { flex: 0 0 auto; width: 25%; }
  .row-cols-xxl-5 > * { flex: 0 0 auto; width: 20%; }
  .row-cols-xxl-6 > * { flex: 0 0 auto; width: 16.66667%; }

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

/* ============================================================
   § 38  MAX-WIDTH UTILITIES
   ============================================================ */
.max-width-sm  { max-width: 540px !important; }
.max-width-md  { max-width: 720px !important; }
.max-width-lg  { max-width: 960px !important; }
.max-width-xl  { max-width: 1140px !important; }

/* ============================================================
   § 39  ADDITIONAL UTILITIES
   ============================================================ */
.float-start { float: left !important; }
.float-end   { float: right !important; }
.float-none  { float: none !important; }

.clearfix::after {
  content: '';
  display: table;
  clear: both;
}

.user-select-none { user-select: none !important; }
.user-select-all  { user-select: all !important; }

.pe-none { pointer-events: none !important; }
.pe-auto { pointer-events: auto !important; }

.cursor-pointer     { cursor: pointer !important; }
.cursor-default     { cursor: default !important; }
.cursor-not-allowed { cursor: not-allowed !important; }
.cursor-grab        { cursor: grab !important; }
.cursor-text        { cursor: text !important; }

/* Z-index utilities */
.z-0   { z-index: 0 !important; }
.z-10  { z-index: 10 !important; }
.z-20  { z-index: 20 !important; }
.z-30  { z-index: 30 !important; }
.z-50  { z-index: 50 !important; }
.z-100 { z-index: 100 !important; }

/* Grid template columns */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-gap-1  { gap: .25rem; }
.grid-gap-2  { gap: .5rem; }
.grid-gap-3  { gap: 1rem; }
.grid-gap-4  { gap: 1.5rem; }
.grid-gap-5  { gap: 3rem; }

/* ============================================================
   § 40  PRINT STYLES
   ============================================================ */
@media print {
  .d-print-none  { display: none !important; }
  .d-print-block { display: block !important; }
  .d-print-flex  { display: flex !important; }
  .d-print-inline { display: inline !important; }
  .d-print-inline-block { display: inline-block !important; }

  a { text-decoration: underline; }
  a[href]::after { content: ' (' attr(href) ')'; }
  pre, blockquote { page-break-inside: avoid; }
  thead { display: table-header-group; }
  tr, img { page-break-inside: avoid; }
  img { max-width: 100% !important; }
  h1, h2, h3 { page-break-after: avoid; }
  body { font-size: 11pt; color: #000; background: #fff; }

  .shadow, .shadow-sm, .shadow-md, .shadow-lg { box-shadow: none !important; }
  .navbar, .offcanvas { display: none !important; }
}

/* ============================================================
   § 38  DARK MODE TOGGLE BUTTON
   ============================================================ */

#phuse-theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--ps-border);
  background: var(--ps-bg-surface);
  color: var(--ps-text-primary);
  box-shadow: var(--ps-shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9990;
  transition: background .2s, box-shadow .2s, transform .15s;
  font-size: 1.1rem;
}

#phuse-theme-toggle:hover {
  background: var(--ps-bg-subtle);
  box-shadow: var(--ps-shadow-lg);
  transform: scale(1.08);
}

/* System dark mode (before JS loads - no flash for auto users) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --ps-bg-base:           #14171e;
    --ps-bg-surface:        #191c26;
    --ps-bg-subtle:         #1f2330;
    --ps-text-primary:      #dce2f0;
    --ps-text-secondary:    #8b93ac;
    --ps-text-muted:        #525c74;
    --ps-border:            #22273a;
    --ps-border-strong:     #2d3347;
    --ps-primary-light:     #162050;
    --ps-light:             #191c26;
    --ps-dark:              #dce2f0;
  }
}

/* ============================================================
   END - PHUSE CSS Framework v1.2.6
   ============================================================ */

/* -- Admin locale switcher ------------------------------------------------- */
.vtx-locale-select {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius-sm);
  color: var(--ps-text);
  cursor: pointer;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .06em;
  padding: .25rem .5rem;
  text-transform: uppercase;
  line-height: 1.4;
  transition: background .15s, border-color .15s;
}
.vtx-locale-select:hover,
.vtx-locale-select:focus {
  background: var(--ps-bg-hover);
  border-color: var(--ps-primary);
  outline: none;
}
.vtx-locale-select option {
  background: var(--ps-bg);
  color: var(--ps-text);
}

/* -- Error pages (App/Views/error/404.php + _404-content.php) --- */
.vtx-error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  min-height: 60vh;
}
.vtx-error-code {
  font-size: 6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--clr-accent, #6366f1);
  margin-bottom: 1rem;
}
.vtx-error-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: .625rem;
}
.vtx-error-desc {
  color: var(--clr-muted, #6b7280);
  margin-bottom: 2rem;
  line-height: 1.6;
}
.vtx-error-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}
