/* =====================================================================================================
   CoreSupport design system - implements the "CoreSupport Console" prototype (prototype/index.html).
   Industrial / utilitarian: neutral surfaces, CoreFlex red (#AF2127) used sparingly as the accent, separate
   status colours, dense but calm tables. Outfit (UI) + JetBrains Mono (ticket numbers), both self-hosted under the
   SIL Open Font License; "Gilroy" (CoreFlex brand font) is used automatically if licensed files are added (fonts/README.md).
   Light and dark themes: <html data-bs-theme> is set by js/theme.js before first paint.
   No inline styles anywhere: the Content-Security-Policy forbids them, so every visual is a class here.
   ===================================================================================================== */

@font-face { font-family: "Outfit"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/outfit-latin-variable.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-variable.woff2") format("woff2"); }

/* ------------------------------------------------------------------ tokens */
:root, [data-bs-theme="light"] {
  --red-50: #fcefef; --red-100: #f8d9da; --red-600: #af2127; --red-700: #8e1a1f;
  --ink-200: #e2e2e6; --ink-300: #cfcfd5; --ink-400: #a0a0a8; --ink-500: #707078; --ink-600: #55555c; --ink-700: #3c3c3e;

  --bg: #f6f6f7; --surface: #ffffff; --surface-2: #fafafb; --surface-sunken: #f1f1f3;
  --border: var(--ink-200); --border-strong: var(--ink-300);
  --text: #1d1d1f; --text-2: var(--ink-600); --text-3: var(--ink-500);
  --accent: var(--red-600); --accent-hover: var(--red-700); --accent-soft: var(--red-50); --accent-text: #9b1c22;
  --primary-bg: #1f1f22; --primary-hover: #000000; --primary-fg: #ffffff;
  --focus: rgba(175, 33, 39, .55);
  --ok: #1e7a46; --ok-soft: #e6f4ec; --warn: #9a5b00; --warn-soft: #fff3d6; --crit: #b4232a; --crit-soft: #fdecec;
  --info: #1f5bb5; --info-soft: #e8f0fc; --neutral: var(--ink-600); --neutral-soft: #efeff1;
  --note-bg: #fff8e6; --note-border: #dfae3a; --note-text: #6f4b00;
  --grid: #ececef; --chart-a: #1d1d1f; --chart-b: #2c7a7b; --logo-ink: var(--ink-700); --scrim: rgba(18, 18, 20, .48);
  --glow-a: rgba(175, 33, 39, .07); --glow-b: rgba(65, 62, 243, .05);
  --sh-sm: 0 1px 2px rgba(20, 20, 24, .06);
  --sh-md: 0 1px 2px rgba(20, 20, 24, .05), 0 4px 14px rgba(20, 20, 24, .06);
  --sh-lg: 0 2px 6px rgba(20, 20, 24, .06), 0 14px 36px rgba(20, 20, 24, .12);
  --sh-xl: 0 28px 72px rgba(20, 20, 24, .24);

  --font-ui: "Gilroy", "Outfit", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-base: 14px; --fs-md: 16px; --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 28px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-full: 999px;
  --h-sm: 32px; --h-md: 38px;
  --dur-1: 120ms; --dur-2: 200ms; --dur-3: 280ms; --ease-out: cubic-bezier(.2, .8, .2, 1);
  --sidebar-w: 248px;

  /* Bootstrap mapped to the tokens */
  --bs-body-font-family: var(--font-ui); --bs-body-font-size: var(--fs-base); --bs-body-line-height: 1.45;
  --bs-body-color: var(--text); --bs-body-color-rgb: 29, 29, 31; --bs-body-bg: var(--surface); --bs-body-bg-rgb: 255, 255, 255;
  --bs-secondary-color: var(--text-2); --bs-tertiary-color: var(--text-3); --bs-heading-color: var(--text);
  --bs-border-color: var(--border); --bs-border-radius: var(--r-sm); --bs-border-radius-lg: var(--r-md);
  --bs-primary: var(--accent); --bs-primary-rgb: 175, 33, 39; --bs-link-color: var(--accent-text); --bs-link-color-rgb: 155, 28, 34;
  --bs-link-hover-color: var(--accent-hover); --bs-link-hover-color-rgb: 142, 26, 31; --bs-focus-ring-color: rgba(175, 33, 39, .2);
  --bs-secondary-bg: var(--surface-sunken); --bs-tertiary-bg: var(--surface-2);
}
[data-bs-theme="dark"] {
  --bg: #111113; --surface: #19191c; --surface-2: #1e1e22; --surface-sunken: #0d0d0f;
  --border: #2b2b30; --border-strong: #3a3a41;
  --text: #ececef; --text-2: #b6b6bd; --text-3: #8f8f97;
  --accent: #e25a60; --accent-hover: #ec7277; --accent-soft: #3a1a1c; --accent-text: #f29095;
  --primary-bg: #ececef; --primary-hover: #ffffff; --primary-fg: #111113; --focus: rgba(236, 114, 119, .7);
  --ok: #55c487; --ok-soft: #14301f; --warn: #e6b04f; --warn-soft: #382a0f; --crit: #f07b80; --crit-soft: #3a1618;
  --info: #86adf2; --info-soft: #17253b; --neutral: #b6b6bd; --neutral-soft: #29292e;
  --note-bg: #2c240f; --note-border: #8a6a1f; --note-text: #f2d185;
  --grid: #26262b; --chart-a: #ececef; --chart-b: #5fc7b8; --logo-ink: #e6e6ea; --scrim: rgba(0, 0, 0, .62);
  --glow-a: rgba(226, 90, 96, .08); --glow-b: rgba(120, 118, 255, .06);
  --sh-sm: 0 1px 2px rgba(0, 0, 0, .4); --sh-md: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
  --sh-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .5); --sh-xl: 0 28px 72px rgba(0, 0, 0, .65);
  --bs-body-color: var(--text); --bs-body-color-rgb: 236, 236, 239; --bs-body-bg: var(--surface); --bs-body-bg-rgb: 25, 25, 28;
  --bs-secondary-color: var(--text-2); --bs-tertiary-color: var(--text-3); --bs-heading-color: var(--text); --bs-border-color: var(--border);
  --bs-link-color: var(--accent-text); --bs-link-color-rgb: 242, 144, 149; --bs-link-hover-color: #ffb3b6; --bs-link-hover-color-rgb: 255, 179, 182;
  --bs-secondary-bg: var(--surface-sunken); --bs-tertiary-bg: var(--surface-2);
  --bs-form-invalid-color: var(--crit); --bs-form-invalid-border-color: var(--crit);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
html { scroll-padding-top: 80px; }
body {
  min-height: 100vh; font-family: var(--font-ui); font-size: var(--fs-base); line-height: 1.45; color: var(--text); background-color: var(--bg);
  background-image: radial-gradient(42rem 20rem at 100% -6rem, var(--glow-a), transparent 70%), radial-gradient(36rem 18rem at 18% -8rem, var(--glow-b), transparent 70%);
  background-repeat: no-repeat; background-attachment: fixed; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .h1, .h2, .h3, .h4, .h5, .h6 { line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; color: var(--text); }
h1, .h1 { font-size: var(--fs-xl); font-weight: 600; margin: 0; }
h2, .h2 { font-size: var(--fs-md); font-weight: 600; margin: 0; }
h3, .h3 { font-size: var(--fs-base); font-weight: 600; margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: var(--accent-text); text-underline-offset: .18em; }
.mono { font-family: var(--font-mono); font-size: .92em; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted, .text-muted, .text-secondary { color: var(--text-2) !important; }
.subtle { color: var(--text-3); }
.small-text { font-size: var(--fs-sm); }
.xs-text { font-size: var(--fs-xs); }
.bi { line-height: 1; vertical-align: -.125em; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 2000; }
.skip-link:focus { left: 12px; }

/* ------------------------------------------------------------------ app shell */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: var(--s-4);
  background: var(--surface); border-right: 1px solid var(--border); padding: var(--s-4) var(--s-3); overflow-y: auto; z-index: 30; }
.brand { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-1) var(--s-2) var(--s-2); text-decoration: none; color: var(--text); }
.brand-logo { height: 24px; width: auto; display: block; }
.brand-product { font-weight: 600; font-size: var(--fs-sm); color: var(--text-2); padding-left: var(--s-3); border-left: 1px solid var(--border-strong); }
[data-bs-theme="dark"] .brand-logo, [data-bs-theme="dark"] .auth-logo { filter: brightness(0) invert(1); opacity: .9; }
.nav-group { display: grid; gap: 2px; }
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); padding: var(--s-2) var(--s-3) var(--s-1); }
.side-link { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 36px; padding: 0 var(--s-3); border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-weight: 500; transition: background var(--dur-1), color var(--dur-1); border: 0; background: none; width: 100%; text-align: left; }
.side-link .bi { font-size: 1.05rem; }
.side-link:hover { background: var(--surface-sunken); color: var(--text); }
.side-link[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.side-link[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav-count { margin-left: auto; font-size: var(--fs-xs); font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.side-link[aria-current="page"] .nav-count { color: var(--accent-text); }
.sidebar-foot { margin-top: auto; display: grid; gap: 2px; padding-top: var(--s-3); border-top: 1px solid var(--border); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--s-3); min-height: 60px; padding: var(--s-2) var(--s-5);
  background: color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--border); }
.topbar .menu-btn, .topbar .brand-mobile { display: none; }
.topbar-spacer { flex: 1; }
.content { width: 100%; max-width: 1440px; margin: 0 auto; padding: var(--s-5) var(--s-5) var(--s-7); }
.content:focus { outline: none; }
.top-search { position: relative; flex: 0 1 420px; min-width: 0; margin: 0; }
.top-search .bi { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.top-search .form-control { height: var(--h-md); padding-left: 34px; padding-right: 40px; background: var(--surface-2); border-color: var(--border); }
.top-search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 11px; color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; background: var(--surface); box-shadow: none; }
.account-btn { display: inline-flex; align-items: center; gap: var(--s-2); padding: 2px 6px 2px 4px; border: 0; background: none; border-radius: var(--r-full); color: var(--text); }
.account-btn:hover, .account-btn[aria-expanded="true"] { background: var(--surface-sunken); }
.account-meta { display: grid; text-align: left; line-height: 1.15; }
.account-meta b { font-weight: 600; font-size: var(--fs-sm); }
.account-meta span { font-size: var(--fs-xs); color: var(--text-3); }
.offcanvas.nav-drawer { --bs-offcanvas-width: min(300px, 86vw); --bs-offcanvas-bg: var(--surface); }
.offcanvas.nav-drawer .sidebar { position: static; height: 100%; border-right: 0; }
.auth-shell-top { display: flex; align-items: center; padding: var(--s-3) var(--s-5); }

/* ------------------------------------------------------------------ buttons (Bootstrap mapped to the prototype) */
.btn { --bs-btn-border-radius: var(--r-sm); --bs-btn-font-weight: 500; --bs-btn-padding-x: var(--s-4); --bs-btn-font-size: var(--fs-base);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--h-md); white-space: nowrap; touch-action: manipulation; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-sm { --bs-btn-padding-x: var(--s-3); --bs-btn-font-size: var(--fs-sm); min-height: var(--h-sm); }
.btn-primary { --bs-btn-bg: var(--primary-bg); --bs-btn-border-color: var(--primary-bg); --bs-btn-color: var(--primary-fg);
  --bs-btn-hover-bg: var(--primary-hover); --bs-btn-hover-border-color: var(--primary-hover); --bs-btn-hover-color: var(--primary-fg);
  --bs-btn-active-bg: var(--primary-hover); --bs-btn-active-border-color: var(--primary-hover); --bs-btn-active-color: var(--primary-fg);
  --bs-btn-disabled-bg: var(--primary-bg); --bs-btn-disabled-border-color: var(--primary-bg); --bs-btn-disabled-color: var(--primary-fg); --bs-btn-focus-shadow-rgb: 175, 33, 39; box-shadow: var(--sh-sm); }
.btn-brand { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--accent-hover); --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--accent-hover); --bs-btn-active-border-color: var(--accent-hover); --bs-btn-active-color: #fff; --bs-btn-focus-shadow-rgb: 175, 33, 39; box-shadow: var(--sh-sm); }
.btn-secondary, .btn-outline-secondary, .btn-outline-primary, .btn-outline-success {
  --bs-btn-bg: var(--surface); --bs-btn-color: var(--text); --bs-btn-border-color: var(--border-strong);
  --bs-btn-hover-bg: var(--surface-sunken); --bs-btn-hover-color: var(--text); --bs-btn-hover-border-color: var(--border-strong);
  --bs-btn-active-bg: var(--surface-sunken); --bs-btn-active-color: var(--text); --bs-btn-active-border-color: var(--border-strong);
  --bs-btn-disabled-bg: var(--surface); --bs-btn-disabled-color: var(--text-3); --bs-btn-disabled-border-color: var(--border); --bs-btn-focus-shadow-rgb: 60, 60, 62; }
.btn-ghost { --bs-btn-bg: transparent; --bs-btn-color: var(--text-2); --bs-btn-border-color: transparent; --bs-btn-hover-bg: var(--surface-sunken);
  --bs-btn-hover-color: var(--text); --bs-btn-hover-border-color: transparent; --bs-btn-active-bg: var(--surface-sunken); --bs-btn-active-border-color: transparent; }
.btn-danger { --bs-btn-bg: var(--crit); --bs-btn-border-color: var(--crit); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--crit); --bs-btn-hover-border-color: var(--crit); --bs-btn-hover-color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
.btn-outline-danger { --bs-btn-bg: transparent; --bs-btn-color: var(--crit); --bs-btn-border-color: var(--border-strong); --bs-btn-hover-bg: var(--crit-soft);
  --bs-btn-hover-color: var(--crit); --bs-btn-hover-border-color: var(--crit); --bs-btn-active-bg: var(--crit-soft); --bs-btn-active-color: var(--crit); --bs-btn-active-border-color: var(--crit); }
.btn-icon { width: var(--h-md); padding: 0; }
.btn-icon.btn-sm { width: var(--h-sm); }
.btn:disabled { opacity: .45; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .75; }
.btn-link { --bs-btn-color: var(--accent-text); --bs-btn-hover-color: var(--accent-hover); }

/* ------------------------------------------------------------------ badges, priority, avatars, chips */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600;
  white-space: nowrap; background: var(--neutral-soft); color: var(--neutral); line-height: 1; }
.badge .bi { font-size: 12px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.crit { background: var(--crit-soft); color: var(--crit); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--accent-soft); color: var(--accent-text); }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text-2); }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
.prio-bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.prio-bars i { width: 3px; border-radius: 1px; background: var(--border-strong); }
.prio-bars i:nth-child(1) { height: 5px; } .prio-bars i:nth-child(2) { height: 8px; } .prio-bars i:nth-child(3) { height: 11px; }
.prio[data-p="Normal"] .prio-bars i:nth-child(-n+1), .prio[data-p="High"] .prio-bars i:nth-child(-n+2) { background: var(--text-2); }
.prio[data-p="High"] { color: var(--text); }
.prio[data-p="Urgent"] { color: var(--crit); font-weight: 600; }
.prio[data-p="Urgent"] .prio-bars i { background: var(--crit); }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 11px; font-weight: 600; background: var(--surface-sunken);
  color: var(--text-2); border: 1px solid var(--border); flex: 0 0 auto; }
.avatar.staff { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.avatar.lg { width: 36px; height: 36px; font-size: 13px; }
.person { display: inline-flex; align-items: center; gap: var(--s-2); min-width: 0; }
.person > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px; border-radius: var(--r-full); background: var(--surface-sunken);
  border: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text); text-decoration: none; }
.chip .x { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--text-3); }
.chip:hover .x { background: var(--border); color: var(--text); }

/* ------------------------------------------------------------------ page header, panels, notices */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-5); }
.page-head .titles { display: grid; gap: 6px; min-width: 0; }
.page-head .sub { color: var(--text-2); }
.page-head .actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-3); flex-wrap: wrap; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs .bi { font-size: 11px; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin: calc(-1 * var(--s-3)) 0 var(--s-5); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-sm); min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); min-height: 52px; }
.panel-head .meta { font-size: var(--fs-sm); color: var(--text-3); }
.panel-body { padding: var(--s-4); }
.panel-body.tight { padding: var(--s-2); }
.stack { display: grid; gap: var(--s-4); align-content: start; }
.vstack-sm { display: grid; gap: var(--s-2); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--s-4); }
.grid-even { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.mb-section { margin-bottom: var(--s-4); }
.row-flex { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.notice { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.notice > .bi { font-size: 1.1rem; margin-top: 1px; }
.notice .body { display: grid; gap: 4px; flex: 1; min-width: 0; }
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); } .notice.warn > .bi { color: var(--warn); }
.notice.crit { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 30%, transparent); } .notice.crit > .bi { color: var(--crit); }
.notice.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 25%, transparent); } .notice.info > .bi { color: var(--info); }
.kv { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-2) var(--s-3); font-size: var(--fs-sm); margin: 0; }
.kv dt { color: var(--text-3); font-weight: 400; }
.kv dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-3); margin-bottom: var(--s-4); }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { display: grid; gap: 6px; padding: var(--s-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-sm);
  color: inherit; text-decoration: none; transition: border-color var(--dur-1), box-shadow var(--dur-1); }
a.kpi:hover { border-color: var(--border-strong); box-shadow: var(--sh-md); color: inherit; }
.kpi .label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; }
.kpi .value { font-size: var(--fs-2xl); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi .ctx { font-size: var(--fs-xs); color: var(--text-3); }
.kpi.crit .value, .kpi.crit .label .bi { color: var(--crit); }
.kpi.warn .value, .kpi.warn .label .bi { color: var(--warn); }
.kpi.is-zero .value { color: var(--text-3); }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-base); margin: 0; }
table.data th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3);
  background: var(--surface-2); padding: 0 var(--s-4); height: 38px; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
table.data th.r, table.data td.r { text-align: right; }
table.data td { padding: 10px var(--s-4); border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); background: transparent; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr.clickable { cursor: pointer; }
table.data tbody tr.clickable:hover td { background: var(--surface-2); }
table.data tbody tr.is-inactive td { color: var(--text-3); }
.th-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.th-sort:hover { color: var(--text); }
th[aria-sort="ascending"] .th-sort, th[aria-sort="descending"] .th-sort { color: var(--text); }
.ticket-link { color: var(--text); text-decoration: none; font-weight: 500; }
.ticket-link:hover { color: var(--text); text-decoration: underline; }
.cell-sub { display: block; font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }
.subject-cell { min-width: 16rem; max-width: 30rem; }
.subject-cell .ticket-link { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sla-cell { display: grid; gap: 2px; justify-items: start; }
.sla-cell .when { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.row-actions { display: flex; justify-content: flex-end; gap: var(--s-1); flex-wrap: nowrap; align-items: center; }
.queue-list { display: grid; }
.queue-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); color: inherit; text-decoration: none; }
.queue-item:last-child { border-bottom: 0; }
.queue-item:hover { background: var(--surface-2); color: inherit; }
.queue-item .t { min-width: 0; font-weight: 500; }

/* ------------------------------------------------------------------ tabs, toolbar, pager */
.tabs { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); padding: 0 var(--s-3); }
.tab { position: relative; display: inline-flex; align-items: center; gap: var(--s-2); height: 46px; padding: 0 var(--s-3); color: var(--text-2); font-weight: 500; white-space: nowrap; text-decoration: none; }
.tab:hover { color: var(--text); }
.tab[aria-current="page"] { color: var(--text); }
.tab[aria-current="page"]::after { content: ""; position: absolute; left: var(--s-2); right: var(--s-2); bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px 2px 0 0; }
.tab .count { font-size: var(--fs-xs); font-weight: 600; padding: 1px 7px; border-radius: var(--r-full); background: var(--surface-sunken); color: var(--text-2); font-variant-numeric: tabular-nums; }
.tab[aria-current="page"] .count { background: var(--accent-soft); color: var(--accent-text); }
.tab.alert .count { background: var(--crit-soft); color: var(--crit); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); margin: 0; }
.toolbar .grow { flex: 1 1 220px; min-width: 0; position: relative; }
.toolbar .grow .bi-search { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.toolbar .grow .form-control { padding-left: 32px; }
.toolbar .form-select { width: auto; max-width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; padding: var(--s-2) var(--s-4) var(--s-3); border-bottom: 1px solid var(--border); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-2); }
.pager .form-select { width: auto; min-height: var(--h-sm); padding-top: 2px; padding-bottom: 2px; }

/* ------------------------------------------------------------------ forms (Bootstrap mapped) */
.form-label { font-size: var(--fs-sm); font-weight: 500; color: var(--text); margin-bottom: 6px; }
.form-control, .form-select { min-height: var(--h-md); border-color: var(--border-strong); border-radius: var(--r-sm); font-size: var(--fs-base); background-color: var(--surface); color: var(--text); }
.form-control:hover, .form-select:hover { border-color: var(--ink-400); }
.form-control:focus, .form-select:focus { border-color: var(--text-2); box-shadow: 0 0 0 3px var(--accent-soft); background-color: var(--surface); color: var(--text); }
.form-control::placeholder { color: var(--text-3); }
textarea.form-control { line-height: 1.6; }
.form-text { font-size: var(--fs-xs); color: var(--text-3); }
.form-check-input { border-color: var(--border-strong); background-color: var(--surface); }
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--text-2); }
.text-danger { color: var(--crit) !important; }
.validation-summary-valid { display: none; }
.validation-summary-errors ul { margin: 0; padding-left: 1.1rem; }
.input-validation-error, [aria-invalid="true"] { border-color: var(--crit) !important; }
.input-validation-error:focus { box-shadow: 0 0 0 3px var(--crit-soft) !important; }
.is-invalid { border-color: var(--crit) !important; }
.alert { border-radius: var(--r-md); }
.alert-danger { --bs-alert-bg: var(--crit-soft); --bs-alert-border-color: color-mix(in srgb, var(--crit) 35%, transparent); --bs-alert-color: var(--text); }
.alert-danger strong, .alert-danger li { color: var(--crit); }
.alert-info { --bs-alert-bg: var(--info-soft); --bs-alert-border-color: color-mix(in srgb, var(--info) 25%, transparent); --bs-alert-color: var(--text); }
.alert-warning { --bs-alert-bg: var(--warn-soft); --bs-alert-border-color: color-mix(in srgb, var(--warn) 30%, transparent); --bs-alert-color: var(--text); }

/* ------------------------------------------------------------------ conversation */
.thread { display: grid; gap: var(--s-3); }
.msg { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.msg-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
.msg-head .who { display: grid; min-width: 0; }
.msg-head .who b { font-weight: 600; }
.msg-head .when { margin-left: auto; font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.msg-body { padding: var(--s-3) var(--s-4) var(--s-4); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; font-size: var(--fs-md); max-width: 75ch; }
.msg-files { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: 0 var(--s-4) var(--s-4); }
.msg.staff { border-left: 3px solid var(--text); }
.msg.note { background: var(--note-bg); border: 1px dashed var(--note-border); border-left: 3px solid var(--note-border); }
.msg.note .msg-head { border-bottom-color: color-mix(in srgb, var(--note-border) 40%, transparent); }
.note-tag { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 600; color: var(--note-text); }
.file-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface-2); font-size: var(--fs-sm); color: var(--text); text-decoration: none; }
.file-chip:hover { border-color: var(--border-strong); color: var(--text); }
.file-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer { border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); overflow: hidden; transition: border-color var(--dur-2), background var(--dur-2); }
.composer.is-note { background: var(--note-bg); border-color: var(--note-border); border-style: dashed; }
.composer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-3) var(--s-3) 0; }
.composer textarea.form-control { border: 0; box-shadow: none; background: transparent; min-height: 120px; resize: vertical; }
.composer-errors { padding: 0 var(--s-3); }
.composer-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); padding: var(--s-2) var(--s-3) var(--s-3); }
.composer .audience { font-size: var(--fs-sm); color: var(--text-2); display: flex; gap: 6px; align-items: center; }
.composer.is-note .audience { color: var(--note-text); font-weight: 500; }
.composer .file-hint { padding: 0 var(--s-3); }
.composer input[type="file"] { max-width: 320px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: calc(var(--r-sm) + 3px); }
.segmented label { position: relative; margin: 0; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 var(--s-3); border-radius: var(--r-sm); font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); cursor: pointer; }
.segmented input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }
.segmented input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.segmented input[value="true"]:checked + span { background: var(--note-bg); color: var(--note-text); }
.sla-item { display: grid; gap: 6px; }
progress.meter { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: var(--r-full); background: var(--surface-sunken); overflow: hidden; color: var(--ok); }
progress.meter::-webkit-progress-bar { background: var(--surface-sunken); border-radius: var(--r-full); }
progress.meter::-webkit-progress-value { background: var(--ok); border-radius: var(--r-full); }
progress.meter::-moz-progress-bar { background: var(--ok); border-radius: var(--r-full); }
progress.meter.warn::-webkit-progress-value { background: var(--warn); } progress.meter.warn::-moz-progress-bar { background: var(--warn); }
progress.meter.crit::-webkit-progress-value { background: var(--crit); } progress.meter.crit::-moz-progress-bar { background: var(--crit); }
progress.meter.done::-webkit-progress-value { background: var(--text-3); } progress.meter.done::-moz-progress-bar { background: var(--text-3); }
.props-state { font-size: var(--fs-sm); color: var(--text-3); }

/* ------------------------------------------------------------------ charts (server-rendered SVG) */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: var(--font-ui); }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .line-a { stroke: var(--chart-a); stroke-width: 2.25; fill: none; }
.chart .line-b { stroke: var(--chart-b); stroke-width: 2.25; fill: none; stroke-dasharray: 6 4; }
.chart .area-a { fill: var(--chart-a); opacity: .06; }
.chart .dot-a { fill: var(--surface); stroke: var(--chart-a); stroke-width: 2; }
.chart .dot-b { fill: var(--surface); stroke: var(--chart-b); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit:focus { outline: none; }
.chart .hover-line { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: var(--fs-sm); color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch-line { width: 18px; height: 0; border-top: 2.5px solid var(--chart-a); }
.swatch-line.b { border-top: 2.5px dashed var(--chart-b); }
.chart-box { position: relative; }
.chart-tip { position: absolute; pointer-events: none; background: var(--primary-bg); color: var(--primary-fg); border-radius: var(--r-sm); padding: 6px 10px; font-size: var(--fs-xs);
  box-shadow: var(--sh-lg); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); z-index: 3; }
.chart-note { font-size: var(--fs-sm); color: var(--text-2); margin: var(--s-2) 0 0; }
details.data-table summary { cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); padding: var(--s-2) 0 0; }
.bars { display: grid; gap: var(--s-1); }
.bar-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 36px; align-items: center; gap: var(--s-3); padding: 6px var(--s-2); border-radius: var(--r-sm); color: inherit; text-decoration: none; }
.bar-row:hover { background: var(--surface-2); color: inherit; }
.bar-row .name { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.bar-svg { width: 100%; height: 10px; display: block; }
.bar-svg .track { fill: var(--surface-sunken); }
.bar-svg .fill { fill: var(--chart-a); }
.bar-row.is-me .bar-svg .fill { fill: var(--accent); }
.bar-row.is-unassigned .bar-svg .fill { fill: var(--text-3); }

/* ------------------------------------------------------------------ empty states */
.empty-state { display: grid; justify-items: center; text-align: center; gap: var(--s-3); padding: var(--s-7) var(--s-4); color: var(--text-2); }
.empty-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-sunken); color: var(--text-3); font-size: 22px; }
.empty-state h1, .empty-state h2 { font-size: var(--fs-md); color: var(--text); }
.empty-state p { max-width: 46ch; margin: 0; }

/* ------------------------------------------------------------------ menus, dialogs, toasts */
.dropdown-menu { --bs-dropdown-bg: var(--surface); --bs-dropdown-border-color: var(--border); --bs-dropdown-border-radius: var(--r-md); --bs-dropdown-link-color: var(--text);
  --bs-dropdown-link-hover-bg: var(--surface-sunken); --bs-dropdown-link-hover-color: var(--text); --bs-dropdown-link-active-bg: var(--surface-sunken); --bs-dropdown-link-active-color: var(--text);
  --bs-dropdown-header-color: var(--text-3); --bs-dropdown-divider-bg: var(--border); box-shadow: var(--sh-lg); padding: var(--s-1); min-width: 220px; }
.dropdown-item { display: flex; align-items: center; gap: var(--s-2); min-height: 34px; border-radius: var(--r-sm); font-size: var(--fs-base); }
.dropdown-item.danger { color: var(--crit); }
.dropdown-item .check-mark { margin-left: auto; visibility: hidden; }
.dropdown-item[aria-checked="true"] .check-mark { visibility: visible; }
.dropdown-header { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.dropdown-who { padding: var(--s-2) var(--s-3); display: grid; gap: 2px; }
.dropdown-menu form { margin: 0; }
.modal { --bs-modal-bg: var(--surface); --bs-modal-border-color: var(--border); --bs-modal-border-radius: var(--r-lg); --bs-modal-header-border-color: var(--border);
  --bs-modal-footer-border-color: var(--border); --bs-modal-footer-bg: var(--surface-2); --bs-modal-color: var(--text); }
.modal-content { box-shadow: var(--sh-xl); }
.modal-backdrop { --bs-backdrop-bg: #121214; --bs-backdrop-opacity: .48; }
#appModal .modal-header { align-items: flex-start; padding: var(--s-4) var(--s-5); }
#appModal .modal-title { font-weight: 600; font-size: var(--fs-md); }
#appModal .modal-body { padding: var(--s-5); }
#appModal .modal-footer { gap: var(--s-2); background: var(--surface-2); padding: var(--s-3) var(--s-5); border-radius: 0 0 var(--r-lg) var(--r-lg); }
#appModal .modal-footer > * { margin: 0; }
[data-bs-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.toasts { position: fixed; z-index: 1090; right: 16px; bottom: 16px; display: grid; gap: var(--s-2); width: min(420px, calc(100vw - 32px)); }
.app-toast { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); border-radius: var(--r-md);
  background: var(--primary-bg); color: var(--primary-fg); box-shadow: var(--sh-lg); animation: toast-in var(--dur-3) var(--ease-out); }
.app-toast.crit { background: var(--crit); color: #fff; }
.app-toast .msg-t { flex: 1; min-width: 0; }
.app-toast .close { border: 0; background: transparent; color: inherit; opacity: .75; padding: 4px 6px; border-radius: var(--r-sm); }
.app-toast .close:hover { opacity: 1; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ sign-in */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-brand { display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-6); padding: var(--s-7);
  background: radial-gradient(28rem 20rem at 12% 90%, rgba(235, 0, 255, .07), transparent 70%), radial-gradient(30rem 22rem at 90% 15%, var(--glow-a), transparent 70%), var(--surface-2);
  border-right: 1px solid var(--border); }
.auth-logo { height: 44px; width: auto; max-width: 100%; align-self: flex-start; }
.auth-head { font-size: clamp(30px, 3.4vw, 44px); font-weight: 600; line-height: 1.08; letter-spacing: -.025em; max-width: 16ch; margin: 0; }
.auth-head em { font-style: normal; color: var(--accent); }
.auth-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; display: grid; gap: var(--s-3); color: var(--text-2); font-size: var(--fs-md); }
.auth-list li { display: flex; gap: var(--s-3); align-items: center; }
.auth-list .bi { color: var(--accent); font-size: 1.1rem; }
.auth-form { display: grid; align-content: center; padding: var(--s-7) var(--s-5); }
.auth-card { width: 100%; max-width: 400px; margin: 0 auto; display: grid; gap: var(--s-4); }
.auth-card .btn-brand { min-height: 44px; }
.pwd-wrap { position: relative; }
.pwd-wrap .form-control { padding-right: 44px; }
/* Positioned with top/bottom (not transform) so the generic .btn:active "press" transform cannot move the button out
   from under the pointer, which used to cancel the click. */
.pwd-wrap .btn { position: absolute; right: 3px; top: 3px; bottom: 3px; min-height: 0; height: auto; }
.pwd-wrap .btn:active:not(:disabled) { transform: none; }
/* Hide Edge's own reveal icon so there is only one eye button. */
.pwd-wrap input::-ms-reveal, .pwd-wrap input::-ms-clear { display: none; }

/* ------------------------------------------------------------------ responsive */
@media (pointer: coarse) { :root { --h-md: 44px; --h-sm: 40px; } .side-link { min-height: 44px; } .tab { height: 48px; } }
@media (max-width: 1279.98px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1023.98px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app > .sidebar { display: none; }
  .topbar .menu-btn, .topbar .brand-mobile { display: inline-flex; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .topbar { padding-left: var(--s-4); padding-right: var(--s-4); }
  .content { padding-left: var(--s-4); padding-right: var(--s-4); }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-even { grid-template-columns: minmax(0, 1fr); }
  .top-search { flex: 1 1 auto; }
  .toolbar .form-select { flex: 1 1 calc(50% - var(--s-2)); }
  .toolbar .grow { flex-basis: 100%; }
  .top-search kbd, .hide-sm { display: none !important; }
  .page-head { align-items: stretch; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; }
  table.data.cards-sm thead { display: none; }
  table.data.cards-sm, table.data.cards-sm tbody, table.data.cards-sm tr, table.data.cards-sm td { display: block; width: 100%; }
  table.data.cards-sm tr { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
  table.data.cards-sm td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: var(--s-3); text-align: right; }
  table.data.cards-sm td::before { content: attr(data-label); color: var(--text-3); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; text-align: left; flex: 0 0 auto; padding-top: 2px; }
  table.data.cards-sm td.subject-cell { display: block; text-align: left; max-width: none; min-width: 0; padding-bottom: var(--s-2); }
  table.data.cards-sm td.subject-cell::before, table.data.cards-sm td.actions-cell::before { display: none; }
  table.data.cards-sm td.subject-cell .ticket-link { white-space: normal; }
  table.data.cards-sm td.actions-cell { justify-content: flex-end; }
  .auth { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .auth-brand { padding: var(--s-5) var(--s-4); gap: var(--s-4); border-right: 0; border-bottom: 1px solid var(--border); }
  .auth-list, .auth-foot { display: none; }
  .auth-head { font-size: 26px; }
  .auth-form { padding: var(--s-5) var(--s-4) var(--s-7); }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .bar-row { grid-template-columns: 96px minmax(0, 1fr) 30px; }
  #appModal .modal-body { padding: var(--s-4); }
  #appModal .modal-header, #appModal .modal-footer { padding-left: var(--s-4); padding-right: var(--s-4); }
}
@media (max-width: 575.98px) {
  #appModal .modal-footer { flex-direction: column-reverse; align-items: stretch; }
  .kpis.three { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ reports, group members */
.filters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--s-3); }
.member-picker { display: grid; gap: var(--s-1); max-height: 360px; overflow-y: auto; padding: var(--s-2) var(--s-3); border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-2); }
.member-picker .form-check { margin: 0; padding-top: 4px; padding-bottom: 4px; }
fieldset legend.form-label { font-size: var(--fs-sm); float: none; }
[data-closure-reason][hidden] { display: none !important; }

/* ------------------------------------------------------------------ customer accounts */
.account-highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s-4); padding: var(--s-4); }
.account-highlights > div { display: grid; gap: 4px; min-width: 0; align-content: start; justify-items: start; }
.account-highlights .label { font-size: var(--fs-xs); color: var(--text-3); font-weight: 500; }
details.section > summary { list-style: none; cursor: pointer; }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary .bi-chevron-down { color: var(--text-3); transition: transform var(--dur-2); }
details.section:not([open]) > summary { border-bottom: 0; }
details.section:not([open]) > summary .bi-chevron-down { transform: rotate(-90deg); }
details.section > summary:hover h2 { color: var(--accent-text); }
.kv.two-col { grid-template-columns: 150px minmax(0, 1fr) 150px minmax(0, 1fr); }
.kv.compact { grid-template-columns: 56px minmax(0, 1fr); gap: 2px var(--s-2); font-size: var(--fs-xs); margin-top: var(--s-2); }
.contact-list, .note-list { list-style: none; margin: 0; padding: 0; }
.contact-list > li, .note-list > li { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
.contact-list > li:last-child, .note-list > li:last-child { border-bottom: 0; }
.empty-state.compact { padding: var(--s-5) var(--s-4); }
.empty-state.compact p { font-size: var(--fs-sm); }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.form-section-title { font-size: var(--fs-sm); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); margin-bottom: var(--s-3); padding-bottom: var(--s-2); border-bottom: 1px solid var(--border); }
.min-w-0 { min-width: 0; }
.border-bottom { border-bottom: 1px solid var(--border) !important; }
address { font-style: normal; line-height: 1.5; }
@media (max-width: 1279.98px) { .kv.two-col { grid-template-columns: 130px minmax(0, 1fr); } }
