/* Govps — Bootstrap 5 theme layer.
 *
 * web/static/vendor/bootstrap/bootstrap-5.3.9.min.css ships unmodified; this
 * file maps the palette onto Bootstrap's CSS variables and adds the console
 * shell plus the few composite widgets templates need (dot chart, KPI card,
 * command palette, auth split, landing hero). Everything else in the views is
 * plain Bootstrap 5 markup and utility classes.
 *
 * The look follows the dens-ui "Mars Green" dashboard block (MIT, © Denslab):
 * a framed shell, a light sidebar, Figtree for UI text, JetBrains Mono for
 * data, pill buttons, 22px cards, and orange kept for things that need you.
 */

/* ---- Self-hosted fonts (no CDN: the CSP only allows font-src 'self') ----
 * Both are variable fonts, so one file per subset covers every weight. */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../vendor/figtree/figtree-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../vendor/figtree/figtree-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../vendor/jetbrains-mono/jetbrains-mono-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../vendor/jetbrains-mono/jetbrains-mono-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---- Palette (Mars Green) ---- */
:root,
[data-bs-theme="light"] {
  --gs-font-sans: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gs-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* dens-ui tokens */
  --gs-page: #e3e8e6;          /* outside the app frame */
  --gs-rail: #0f1716;          /* the icon rail column */
  --gs-ink: #0f1716;           /* foreground; ink buttons and the brand tile */
  --gs-ink-fg: #ffffff;
  --gs-panel: #f5f7f6;         /* the framed main panel ("surface") */
  --gs-surface: #ffffff;       /* cards, inputs, popovers */
  --gs-surface-muted: #f5f7f6;
  --gs-input: #cfd8d5;
  --gs-accent: #e3efeb;
  --gs-brand: #008c8d;
  --gs-highlight: #ff8a00;     /* orange: only for things that need attention */
  --gs-highlight-rgb: 255, 138, 0;
  --gs-highlight-fg: #1f1100;
  --gs-soft: #c0ebd7;
  --gs-soft-fg: #0a4a44;
  --gs-shadow-panel: 0 1px 2px rgb(15 23 22 / 0.04), 0 10px 28px -14px rgb(15 23 22 / 0.14);
  --gs-shadow-raised: 0 2px 6px rgb(15 23 22 / 0.06), 0 18px 40px -16px rgb(15 23 22 / 0.24);
  --gs-shadow-control: 0 1px 2px rgb(15 23 22 / 0.05);

  --gs-auth-glow-1: #d9ece6;
  --gs-auth-glow-2: #fbe9d4;
  --gs-auth-base: #edf0ef;
  --gs-hero-from: #0f1716;
  --gs-hero-via: #0d3b3a;
  --gs-hero-to: #00797a;
  --gs-chart-total: #0f1716;
  --gs-chart-errors: #ff8a00;
  --gs-table-head-bg: transparent;
  --gs-row-hover: #f5f7f6;
  --gs-mark-from: #008c8d;
  --gs-mark-to: #00797a;

  --bs-body-font-family: var(--gs-font-sans);
  --bs-body-font-size: 0.875rem;
  --bs-body-line-height: 1.55;
  --bs-body-bg: #edf0ef;
  --bs-body-color: #0f1716;
  --bs-body-color-rgb: 15, 23, 22;
  --bs-emphasis-color: #0f1716;
  --bs-emphasis-color-rgb: 15, 23, 22;
  --bs-secondary-color: #566361;
  --bs-secondary-color-rgb: 86, 99, 97;
  --bs-secondary-bg: #f5f7f6;
  --bs-secondary-bg-rgb: 245, 247, 246;
  --bs-tertiary-bg: #e6ebe9;
  --bs-tertiary-bg-rgb: 230, 235, 233;
  --bs-border-color: #dbe2df;
  --bs-border-color-translucent: rgba(15, 23, 22, 0.08);
  --bs-heading-color: #0f1716;

  --bs-link-color: #00797a;
  --bs-link-color-rgb: 0, 121, 122;
  --bs-link-hover-color: #005f60;
  --bs-link-hover-color-rgb: 0, 95, 96;

  --bs-primary: #00797a;
  --bs-primary-rgb: 0, 121, 122;
  --bs-primary-text-emphasis: #0a4a44;
  --bs-primary-bg-subtle: #e3efeb;
  --bs-primary-border-subtle: #c0ebd7;
  --bs-secondary: #566361;
  --bs-secondary-rgb: 86, 99, 97;
  --bs-secondary-text-emphasis: #36403f;
  --bs-secondary-bg-subtle: #e6ebe9;
  --bs-secondary-border-subtle: #dbe2df;
  --bs-success: #009267;
  --bs-success-rgb: 0, 146, 103;
  --bs-success-text-emphasis: #0a4a44;
  --bs-success-bg-subtle: #dcf3e8;
  --bs-success-border-subtle: #c0ebd7;
  --bs-info: #2d54bc;
  --bs-info-rgb: 45, 84, 188;
  --bs-info-text-emphasis: #0b3289;
  --bs-info-bg-subtle: #e7edfa;
  --bs-info-border-subtle: #cbd7f3;
  --bs-warning: #e07800;
  --bs-warning-rgb: 224, 120, 0;
  --bs-warning-text-emphasis: #8a4600;
  --bs-warning-bg-subtle: #fff1e0;
  --bs-warning-border-subtle: #ffd9a8;
  --bs-danger: #a42423;
  --bs-danger-rgb: 164, 36, 35;
  --bs-danger-text-emphasis: #8c1d1c;
  --bs-danger-bg-subtle: #fbeaea;
  --bs-danger-border-subtle: #f2c8c7;
  --bs-light: #f5f7f6;
  --bs-light-rgb: 245, 247, 246;
  --bs-dark: #0f1716;
  --bs-dark-rgb: 15, 23, 22;

  --bs-border-radius: 0.875rem;
  --bs-border-radius-sm: 0.625rem;
  --bs-border-radius-lg: 1.375rem;
  --bs-border-radius-xl: 1.75rem;
  --bs-box-shadow-sm: var(--gs-shadow-control);
  --bs-box-shadow: var(--gs-shadow-raised);
  --bs-focus-ring-color: rgba(0, 140, 141, 0.3);
  color-scheme: light;
}

[data-bs-theme="dark"] {
  --gs-page: #050505;
  --gs-rail: #1b1f1e;
  --gs-ink: #ecf2f0;
  --gs-ink-fg: #0c0b0b;
  --gs-panel: #121514;
  --gs-surface: #161918;
  --gs-surface-muted: #121514;
  --gs-input: #303736;
  --gs-accent: #1f2b29;
  --gs-highlight: #ff9a1f;
  --gs-highlight-rgb: 255, 154, 31;
  --gs-soft: #123f3a;
  --gs-soft-fg: #c0ebd7;
  --gs-shadow-panel: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px -16px rgb(0 0 0 / 0.7);
  --gs-shadow-raised: 0 2px 6px rgb(0 0 0 / 0.5), 0 20px 44px -16px rgb(0 0 0 / 0.8);
  --gs-shadow-control: 0 1px 2px rgb(0 0 0 / 0.3);
  --gs-auth-glow-1: #0f2a27;
  --gs-auth-glow-2: #2a1a08;
  --gs-auth-base: #0c0b0b;
  --gs-chart-total: #ecf2f0;
  --gs-chart-errors: #ff9a1f;
  --gs-row-hover: #1b1f1e;

  --bs-body-bg: #0c0b0b;
  --bs-body-color: #ecf2f0;
  --bs-body-color-rgb: 236, 242, 240;
  --bs-emphasis-color: #ffffff;
  --bs-emphasis-color-rgb: 255, 255, 255;
  --bs-secondary-color: #9aa8a5;
  --bs-secondary-color-rgb: 154, 168, 165;
  --bs-secondary-bg: #1b1f1e;
  --bs-secondary-bg-rgb: 27, 31, 30;
  --bs-tertiary-bg: #1e2322;
  --bs-tertiary-bg-rgb: 30, 35, 34;
  --bs-border-color: #262c2b;
  --bs-border-color-translucent: rgba(255, 255, 255, 0.08);
  --bs-heading-color: #ecf2f0;

  --bs-link-color: #19a3a4;
  --bs-link-color-rgb: 25, 163, 164;
  --bs-link-hover-color: #4cc3c4;
  --bs-link-hover-color-rgb: 76, 195, 196;

  --bs-primary: #19a3a4;
  --bs-primary-rgb: 25, 163, 164;
  --bs-primary-text-emphasis: #c0ebd7;
  --bs-primary-bg-subtle: #1f2b29;
  --bs-primary-border-subtle: #123f3a;
  --bs-secondary: #9aa8a5;
  --bs-secondary-rgb: 154, 168, 165;
  --bs-secondary-text-emphasis: #c9d3d1;
  --bs-secondary-bg-subtle: #1e2322;
  --bs-secondary-border-subtle: #2c3332;
  --bs-success: #24ab7e;
  --bs-success-rgb: 36, 171, 126;
  --bs-success-text-emphasis: #c0ebd7;
  --bs-success-bg-subtle: #123f3a;
  --bs-success-border-subtle: #1a5249;
  --bs-info: #6f93ec;
  --bs-info-rgb: 111, 147, 236;
  --bs-info-text-emphasis: #bccdfa;
  --bs-info-bg-subtle: #141f40;
  --bs-info-border-subtle: #233463;
  --bs-warning: #ff9a1f;
  --bs-warning-rgb: 255, 154, 31;
  --bs-warning-text-emphasis: #ffc47d;
  --bs-warning-bg-subtle: #2b1d0b;
  --bs-warning-border-subtle: #4b3212;
  --bs-danger: #f74835;
  --bs-danger-rgb: 247, 72, 53;
  --bs-danger-text-emphasis: #ff9d91;
  --bs-danger-bg-subtle: #2c1311;
  --bs-danger-border-subtle: #4d211c;
  --bs-light: #1b1f1e;
  --bs-light-rgb: 27, 31, 30;
  --bs-dark: #ecf2f0;
  --bs-dark-rgb: 236, 242, 240;
  --bs-focus-ring-color: rgba(25, 163, 164, 0.35);
  color-scheme: dark;
}

/* ---- Sidebar palettes (theme dialog → Sidebar color) ----
 * "mint" is the dens-ui light sidebar and the default; it follows the color
 * mode. "ink", "teal", "graphite", "ruby" and "blue" are dark rails in both
 * modes. --gs-sidebar-bg may be a gradient; --gs-sidebar-solid is always a
 * plain color, because Bootstrap's .offcanvas-lg forces the background color
 * to transparent on desktop and only a solid color can override it. */
:root,
html[data-sidebar-theme="mint"] {
  --gs-sidebar-bg: #f6f8f7;
  --gs-sidebar-solid: #f6f8f7;
  --gs-sidebar-text: rgba(15, 23, 22, 0.75);
  --gs-sidebar-text-strong: #0f1716;
  --gs-sidebar-muted: #566361;
  --gs-sidebar-label: #566361;
  --gs-sidebar-border: #dbe2df;
  --gs-sidebar-hover: rgba(255, 255, 255, 0.75);
  --gs-sidebar-active-bg: #ffffff;
  --gs-sidebar-active-shadow: 0 1px 2px rgb(15 23 22 / 0.06), 0 4px 12px -6px rgb(15 23 22 / 0.16);
  --gs-sidebar-mark-bg: #0f1716;
  --gs-sidebar-mark-fg: #ffffff;
  --gs-sidebar-card: #ffffff;
  --gs-sidebar-scroll: rgba(15, 23, 22, 0.18);
  --gs-sidebar-art-line: rgba(15, 23, 22, 0.07);
  --gs-sidebar-art-line-strong: rgba(0, 121, 122, 0.2);
  --gs-sidebar-art-dot: rgba(15, 23, 22, 0.08);
  --gs-sidebar-art-node: #00797a;
}
[data-bs-theme="dark"]:not([data-sidebar-theme]),
html[data-bs-theme="dark"][data-sidebar-theme="mint"] {
  --gs-sidebar-bg: #111413;
  --gs-sidebar-solid: #111413;
  --gs-sidebar-text: rgba(236, 242, 240, 0.72);
  --gs-sidebar-text-strong: #ecf2f0;
  --gs-sidebar-muted: #9aa8a5;
  --gs-sidebar-label: #9aa8a5;
  --gs-sidebar-border: #232928;
  --gs-sidebar-hover: rgba(28, 33, 32, 0.8);
  --gs-sidebar-active-bg: #1c2120;
  --gs-sidebar-active-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 12px -6px rgb(0 0 0 / 0.6);
  --gs-sidebar-mark-bg: #ecf2f0;
  --gs-sidebar-mark-fg: #0c0b0b;
  --gs-sidebar-card: #1c2120;
  --gs-sidebar-scroll: rgba(236, 242, 240, 0.18);
  --gs-sidebar-art-line: rgba(236, 242, 240, 0.06);
  --gs-sidebar-art-line-strong: rgba(25, 163, 164, 0.24);
  --gs-sidebar-art-dot: rgba(236, 242, 240, 0.07);
  --gs-sidebar-art-node: #19a3a4;
}
html[data-sidebar-theme="ink"],
html[data-sidebar-theme="teal"],
html[data-sidebar-theme="graphite"],
html[data-sidebar-theme="ruby"],
html[data-sidebar-theme="blue"] {
  --gs-sidebar-bg: #0f1716;
  --gs-sidebar-solid: #0f1716;
  --gs-sidebar-text: rgba(236, 242, 240, 0.66);
  --gs-sidebar-text-strong: #ecf2f0;
  --gs-sidebar-muted: #93a19e;
  --gs-sidebar-label: #7c8a87;
  --gs-sidebar-border: rgba(236, 242, 240, 0.1);
  --gs-sidebar-hover: rgba(236, 242, 240, 0.08);
  --gs-sidebar-active-bg: rgba(236, 242, 240, 0.14);
  --gs-sidebar-active-shadow: none;
  --gs-sidebar-mark-bg: #008c8d;
  --gs-sidebar-mark-fg: #ffffff;
  --gs-sidebar-card: rgba(236, 242, 240, 0.07);
  --gs-sidebar-scroll: rgba(236, 242, 240, 0.2);
  --gs-sidebar-art-line: rgba(236, 242, 240, 0.08);
  --gs-sidebar-art-line-strong: rgba(25, 163, 164, 0.35);
  --gs-sidebar-art-dot: rgba(236, 242, 240, 0.09);
  --gs-sidebar-art-node: #19a3a4;
}
html[data-sidebar-theme="teal"] {
  --gs-sidebar-bg: linear-gradient(170deg, #00797a 0%, #005556 60%, #003b3c 100%);
  --gs-sidebar-solid: #005556;
  --gs-sidebar-text: rgba(255, 255, 255, 0.74);
  --gs-sidebar-muted: #a8d8d4;
  --gs-sidebar-label: #8cc8c3;
  --gs-sidebar-border: rgba(255, 255, 255, 0.14);
  --gs-sidebar-hover: rgba(255, 255, 255, 0.1);
  --gs-sidebar-active-bg: rgba(255, 255, 255, 0.18);
  --gs-sidebar-mark-bg: #ffffff;
  --gs-sidebar-mark-fg: #00797a;
  --gs-sidebar-card: rgba(255, 255, 255, 0.1);
  --gs-sidebar-art-line: rgba(255, 255, 255, 0.1);
  --gs-sidebar-art-line-strong: rgba(192, 235, 215, 0.3);
  --gs-sidebar-art-dot: rgba(255, 255, 255, 0.1);
  --gs-sidebar-art-node: #c0ebd7;
}
html[data-sidebar-theme="graphite"] {
  --gs-sidebar-bg: #22282a;
  --gs-sidebar-solid: #22282a;
  --gs-sidebar-mark-bg: #ecf2f0;
  --gs-sidebar-mark-fg: #0f1716;
}
html[data-sidebar-theme="ruby"] {
  --gs-sidebar-bg: linear-gradient(170deg, #7a1c1f 0%, #561316 60%, #380b0d 100%);
  --gs-sidebar-solid: #561316;
  --gs-sidebar-text: rgba(255, 255, 255, 0.74);
  --gs-sidebar-muted: #e3b1b1;
  --gs-sidebar-label: #d39a9a;
  --gs-sidebar-border: rgba(255, 255, 255, 0.14);
  --gs-sidebar-hover: rgba(255, 255, 255, 0.1);
  --gs-sidebar-active-bg: rgba(255, 255, 255, 0.18);
  --gs-sidebar-mark-bg: #ffffff;
  --gs-sidebar-mark-fg: #7a1c1f;
  --gs-sidebar-card: rgba(255, 255, 255, 0.1);
  --gs-sidebar-art-line: rgba(255, 255, 255, 0.1);
  --gs-sidebar-art-line-strong: rgba(255, 196, 196, 0.3);
  --gs-sidebar-art-dot: rgba(255, 255, 255, 0.1);
  --gs-sidebar-art-node: #ffb4b4;
}
html[data-sidebar-theme="blue"] {
  --gs-sidebar-bg: linear-gradient(170deg, #1f4fa3 0%, #173a7c 60%, #0f2554 100%);
  --gs-sidebar-solid: #173a7c;
  --gs-sidebar-text: rgba(255, 255, 255, 0.76);
  --gs-sidebar-muted: #b3c6ee;
  --gs-sidebar-label: #9ab3e6;
  --gs-sidebar-border: rgba(255, 255, 255, 0.14);
  --gs-sidebar-hover: rgba(255, 255, 255, 0.1);
  --gs-sidebar-active-bg: rgba(255, 255, 255, 0.18);
  --gs-sidebar-mark-bg: #ffffff;
  --gs-sidebar-mark-fg: #1f4fa3;
  --gs-sidebar-card: rgba(255, 255, 255, 0.1);
  --gs-sidebar-art-line: rgba(255, 255, 255, 0.1);
  --gs-sidebar-art-line-strong: rgba(191, 212, 255, 0.32);
  --gs-sidebar-art-dot: rgba(255, 255, 255, 0.1);
  --gs-sidebar-art-node: #bfd4ff;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-family: var(--bs-body-font-family);
  font-size: var(--bs-body-font-size);
  line-height: var(--bs-body-line-height);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4, h5 {
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--bs-heading-color);
}
h1, h2 { font-size: 1.375rem; letter-spacing: -0.025em; }
h3 { font-size: 0.9375rem; letter-spacing: -0.01em; }
h4 { font-size: 0.9375rem; }
h5 { font-size: 0.875rem; }
p { margin-bottom: 0; }
/* Links never get an underline, including on hover and focus. */
a,
a:hover,
a:focus,
a:active { text-decoration: none; }
code, kbd, pre, samp { font-family: var(--gs-font-mono); }
code { font-size: 0.75rem; background: var(--bs-tertiary-bg); padding: 1px 6px; border-radius: 6px; color: var(--bs-secondary-color); }
kbd {
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding: 0 0.375rem;
  border: 1px solid var(--bs-border-color);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--gs-surface);
  color: var(--bs-secondary-color);
  font-size: 0.6875rem;
  font-weight: 500;
  box-shadow: none;
}
pre { margin: 0; padding: 0.75rem 0.875rem; background: #0f1716; color: #d5e2df; border-radius: 12px; font-size: 0.75rem; overflow-x: auto; }
[hidden] { display: none !important; }
.font-monospace { font-family: var(--gs-font-mono) !important; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* Bootstrap 5.3 has no min-width utility; flex children that truncate need it. */
.min-w-0 { min-width: 0; }

/* Templates draw icons inline; one rule keeps their stroke weight uniform. */
svg[viewBox] {
  width: 1.0625rem;
  height: 1.0625rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.swal2-icon svg { width: auto; height: auto; }

/* ---- Bootstrap component tuning ---- */
/* Buttons are pills, as in dens-ui. */
.btn {
  --bs-btn-font-size: 0.8125rem;
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: 0.5rem;
  --bs-btn-padding-x: 1.1rem;
  --bs-btn-border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm {
  --bs-btn-font-size: 0.78rem;
  --bs-btn-padding-y: 0.32rem;
  --bs-btn-padding-x: 0.85rem;
  --bs-btn-border-radius: 999px;
}
.btn-lg {
  --bs-btn-font-size: 0.9375rem;
  --bs-btn-padding-y: 0.7rem;
  --bs-btn-padding-x: 1.6rem;
  --bs-btn-border-radius: 999px;
}
.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: color-mix(in srgb, var(--bs-primary) 88%, #000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--bs-primary) 88%, #000);
  --bs-btn-active-bg: color-mix(in srgb, var(--bs-primary) 80%, #000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--bs-primary) 80%, #000);
  --bs-btn-disabled-bg: var(--bs-primary);
  --bs-btn-disabled-border-color: var(--bs-primary);
  --bs-btn-color: #ffffff;
  --bs-btn-hover-color: #ffffff;
  --bs-btn-active-color: #ffffff;
  --bs-btn-disabled-color: #ffffff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.18), 0 1px 2px rgb(0 0 0 / 0.12);
}
[data-bs-theme="dark"] .btn-primary {
  --bs-btn-color: #031414; --bs-btn-hover-color: #031414; --bs-btn-active-color: #031414; --bs-btn-disabled-color: #031414;
}
/* Ink: the dark pill dens-ui uses for the main action of a page. */
.gs-btn-ink {
  --bs-btn-bg: var(--gs-ink);
  --bs-btn-border-color: var(--gs-ink);
  --bs-btn-color: var(--gs-ink-fg);
  --bs-btn-hover-bg: color-mix(in srgb, var(--gs-ink) 85%, transparent);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-hover-color: var(--gs-ink-fg);
  --bs-btn-active-bg: var(--gs-ink);
  --bs-btn-active-color: var(--gs-ink-fg);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 1px 2px rgb(0 0 0 / 0.16);
}
.btn-outline-secondary,
.btn-light {
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-bg: var(--gs-surface);
  --bs-btn-border-color: var(--gs-input);
  --bs-btn-hover-bg: var(--gs-accent);
  --bs-btn-hover-color: var(--bs-body-color);
  --bs-btn-hover-border-color: var(--gs-input);
  --bs-btn-active-bg: var(--gs-accent);
  --bs-btn-active-color: var(--bs-body-color);
  --bs-btn-active-border-color: var(--gs-input);
  box-shadow: var(--gs-shadow-control);
}
.btn-outline-danger {
  --bs-btn-color: var(--bs-danger);
  --bs-btn-bg: var(--gs-surface);
  --bs-btn-border-color: var(--bs-danger-border-subtle);
  --bs-btn-hover-bg: var(--bs-danger-bg-subtle);
  --bs-btn-hover-color: var(--bs-danger-text-emphasis);
  --bs-btn-hover-border-color: var(--bs-danger-border-subtle);
  --bs-btn-active-bg: var(--bs-danger-bg-subtle);
  --bs-btn-active-color: var(--bs-danger-text-emphasis);
  --bs-btn-active-border-color: var(--bs-danger-border-subtle);
}
.btn-link {
  --bs-btn-color: var(--bs-link-color);
  --bs-btn-hover-color: var(--bs-link-hover-color);
  --bs-btn-font-weight: 600;
  text-decoration: none;
}
.btn-link:hover,
.btn-link:focus,
.btn-link:active { text-decoration: none; }
.btn svg { width: 0.9375rem; height: 0.9375rem; }

.form-control, .form-select {
  font-size: 0.875rem;
  background-color: var(--gs-surface);
  border-color: var(--gs-input);
  border-radius: 0.75rem;
  box-shadow: var(--gs-shadow-control);
}
.form-control { padding: 0.5rem 0.85rem; }
.form-control-sm, .form-select-sm { border-radius: 0.625rem; }
.form-control:disabled, .form-select:disabled { background-color: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.input-group > .form-control, .input-group > .form-select, .input-group > .btn { box-shadow: none; }

/* Focus feedback is only the thin border in the theme colour: no glow, no
   ring, and the field keeps its own surface (Bootstrap repaints it). */
.form-control:focus,
.form-control:focus-visible,
.form-select:focus,
.form-select:focus-visible,
.form-check-input:focus,
.form-check-input:focus-visible,
.form-range:focus,
.input-group:focus-within > .form-control,
.input-group:focus-within > .form-select {
  border-color: var(--gs-brand);
  outline: 0;
  box-shadow: none;
}
.form-control:focus,
.form-control:focus-visible,
.form-select:focus,
.form-select:focus-visible { background-color: var(--gs-surface); }
.form-range:focus::-webkit-slider-thumb { box-shadow: none; }
.form-range:focus::-moz-range-thumb { box-shadow: none; }

/* Checkboxes follow the palette: 17px, soft corners, the green primary when
   checked, and the same thin-border focus as the text fields. */
.form-check-input {
  --bs-form-check-bg: var(--gs-surface);
  width: 1.0625rem;
  height: 1.0625rem;
  margin-top: 0.1rem;
  border: 1.5px solid var(--gs-input);
}
.form-check-input[type="checkbox"] { border-radius: 0.3125rem; }
.form-check-input:hover { border-color: var(--bs-primary); }
.form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}
.form-check-input[type="checkbox"]:indeterminate {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

/* Settings boolean rows: the row itself is the card, so the box lines up with
   the title and the whole surface reads as one control. */
.gs-check-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--bs-border-color) 70%, transparent);
  border-radius: 1rem;
  background: var(--gs-panel);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
label.gs-check-card,
label.gs-check-inline { cursor: pointer; }
.gs-check-card .form-check-input { flex: none; margin: 0.15rem 0 0; }
.gs-check-card .form-check-label { flex: 1; min-width: 0; cursor: pointer; }
.gs-check-card:hover { border-color: rgba(var(--bs-primary-rgb), 0.45); }
.gs-check-card:has(.form-check-input:checked) {
  border-color: rgba(var(--bs-primary-rgb), 0.55);
  background: color-mix(in srgb, var(--bs-primary-bg-subtle) 35%, var(--gs-panel));
}
label.gs-check-card:has(.form-check-input:disabled) { cursor: not-allowed; }
.gs-check-card--warning {
  background: var(--bs-warning-bg-subtle);
  border-color: var(--bs-warning-border-subtle);
  color: var(--bs-warning-text-emphasis);
}
.gs-check-card--warning:hover {
  border-color: color-mix(in srgb, var(--bs-warning-text-emphasis) 45%, var(--bs-warning-border-subtle));
}
.gs-check-card--warning:has(.form-check-input:checked) {
  border-color: var(--bs-primary);
  background: color-mix(in srgb, var(--bs-warning-bg-subtle) 88%, var(--bs-primary-bg-subtle));
}
.gs-check-card--warning code {
  color: inherit;
  background: color-mix(in srgb, var(--gs-surface) 75%, transparent);
  padding: 0.08rem 0.35rem;
  border-radius: 0.35rem;
}
.gs-check-card-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
}
.gs-check-card-desc {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  opacity: 0.92;
}
/* The Show/hide toggle and other buttons inside a field share that ring. */
.btn:focus-visible,
.btn-check:focus-visible + .btn {
  --bs-btn-focus-box-shadow: 0 0 0 2px var(--gs-surface), 0 0 0 4px rgba(var(--bs-primary-rgb), 0.55);
  box-shadow: var(--bs-btn-focus-box-shadow);
}
.form-label { font-size: 0.8125rem; font-weight: 600; color: var(--bs-body-color); margin-bottom: 0.35rem; }
.form-text { font-size: 0.75rem; }
.form-check-label { font-size: 0.8125rem; }

.badge {
  --bs-badge-font-size: 0.72rem;
  --bs-badge-font-weight: 600;
  --bs-badge-padding-y: 0.22em;
  --bs-badge-padding-x: 0.75em;
  --bs-badge-border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
/* Badge palette: Bootstrap's text-bg-* utilities are solid, these keep the
   dens-ui look (soft green, outline, orange highlight) for roles, HTTP
   methods, and status codes. */
.badge.text-bg-primary { color: var(--bs-primary-text-emphasis) !important; background-color: var(--bs-primary-bg-subtle) !important; border: 1px solid var(--bs-primary-border-subtle); }
.badge.text-bg-secondary { color: var(--bs-body-color) !important; background-color: var(--gs-surface) !important; border: 1px solid var(--bs-border-color); }
.badge.text-bg-success { color: var(--gs-soft-fg) !important; background-color: var(--gs-soft) !important; border: 1px solid transparent; }
.badge.text-bg-info { color: var(--bs-info-text-emphasis) !important; background-color: var(--bs-info-bg-subtle) !important; border: 1px solid var(--bs-info-border-subtle); }
.badge.text-bg-warning { color: var(--bs-warning-text-emphasis) !important; background-color: var(--bs-warning-bg-subtle) !important; border: 1px solid var(--bs-warning-border-subtle); }
.badge.text-bg-danger { color: var(--bs-danger-text-emphasis) !important; background-color: var(--bs-danger-bg-subtle) !important; border: 1px solid var(--bs-danger-border-subtle); }
.badge.text-bg-dark { color: var(--gs-ink-fg) !important; background-color: var(--gs-ink) !important; }
/* "violet" is the historical name of the accent badge (versions, defaults,
   primary keys); in the Mars Green palette it is the ink pill. */
.badge.gs-badge-violet { color: var(--gs-ink-fg); background-color: var(--gs-ink); border: 1px solid transparent; font-family: var(--gs-font-mono); font-weight: 500; }
.badge.gs-badge-highlight { color: var(--gs-highlight-fg); background-color: var(--gs-highlight); }
.badge.gs-badge-soft { color: var(--gs-soft-fg); background-color: var(--gs-soft); }
.badge.gs-badge-outline { color: var(--bs-body-color); background-color: var(--gs-surface); border: 1px solid var(--bs-border-color); }

/* Status dot, used inside badges or next to text (dens-ui StatusDot). */
.gs-status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--gs-brand); }
.gs-status-dot--highlight { background: var(--gs-highlight); }
.gs-status-dot--danger { background: var(--bs-danger); }
.gs-status-dot--muted { background: color-mix(in srgb, var(--bs-secondary-color) 60%, transparent); }

/* Cards: 22px panels with a hairline ring and the panel shadow. */
.card {
  --bs-card-bg: var(--gs-surface);
  --bs-card-border-color: color-mix(in srgb, var(--bs-border-color) 60%, transparent);
  --bs-card-border-radius: var(--bs-border-radius-lg);
  --bs-card-inner-border-radius: calc(var(--bs-border-radius-lg) - 1px);
  --bs-card-spacer-y: 1.25rem;
  --bs-card-spacer-x: 1.25rem;
  --bs-card-cap-bg: transparent;
  --bs-card-cap-padding-y: 1.15rem;
  --bs-card-cap-padding-x: 1.25rem;
  box-shadow: var(--gs-shadow-panel);
}
.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  border-bottom: 0;
  padding-bottom: 0.35rem;
}
.card-header > * { min-width: 0; }
.card-title { margin-bottom: 0; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.card-subtitle, .gs-card-sub { color: var(--bs-secondary-color); font-size: 0.8125rem; }
.card-footer { background: transparent; border-top-color: color-mix(in srgb, var(--bs-border-color) 70%, transparent); }
/* An inset well inside a card (dens-ui "inset" card). */
.gs-well {
  padding: 1rem;
  border-radius: 1rem;
  background: var(--gs-panel);
  border: 1px solid color-mix(in srgb, var(--bs-border-color) 70%, transparent);
}

/* Flush table cards read better without the body padding. */
.card > .table-responsive:last-child > .table:last-child { margin-bottom: 0; }

/* Bootstrap paints cells through `.table > :not(caption) > * > *` (specificity
   0,2,0); the doubled class below wins without !important. Headers are the
   dens-ui mono caps; rows are separated by a soft hairline. */
.table.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--gs-row-hover);
  --bs-table-border-color: color-mix(in srgb, var(--bs-border-color) 70%, transparent);
  margin-bottom: 0;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.table.table > thead { --bs-table-bg: var(--gs-table-head-bg); }
.table.table > thead > tr > th {
  font-family: var(--gs-font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  padding: 0.6rem 1.25rem;
  border-bottom-color: var(--bs-border-color);
}
.table.table > tbody > tr > td { padding: 0.8rem 1.25rem; vertical-align: middle; }
.table.table > tbody > tr:last-child > td { border-bottom: 0; }
.table.table-sm > :not(caption) > * > * { padding: 0.5rem 1.25rem; font-size: 0.78rem; }
.table-responsive { border-radius: inherit; }
/* A table whose only row is the empty-state placeholder drops its minimum
   width so the message stays centred inside the card instead of scrolling. */
.table-responsive:has(> .table > tbody > tr > td[colspan] > .gs-empty) > .table { min-width: 0; }

.alert { --bs-alert-padding-y: 0.75rem; --bs-alert-padding-x: 0.9rem; --bs-alert-font-size: 0.8125rem; --bs-alert-border-radius: 1rem; display: flex; align-items: flex-start; gap: 0.6rem; }
.alert > p { flex: 1; }
/* Flash payloads use the short names success/error/info/warning. */
.alert--success { --bs-alert-color: var(--bs-success-text-emphasis); --bs-alert-bg: var(--bs-success-bg-subtle); --bs-alert-border-color: var(--bs-success-border-subtle); }
.alert--error, .alert--danger { --bs-alert-color: var(--bs-danger-text-emphasis); --bs-alert-bg: var(--bs-danger-bg-subtle); --bs-alert-border-color: var(--bs-danger-border-subtle); }
.alert--warning { --bs-alert-color: var(--bs-warning-text-emphasis); --bs-alert-bg: var(--bs-warning-bg-subtle); --bs-alert-border-color: var(--bs-warning-border-subtle); }
.alert--info { --bs-alert-color: var(--bs-info-text-emphasis); --bs-alert-bg: var(--bs-info-bg-subtle); --bs-alert-border-color: var(--bs-info-border-subtle); }

.dropdown-menu {
  --bs-dropdown-bg: var(--gs-surface);
  --bs-dropdown-font-size: 0.8125rem;
  --bs-dropdown-border-color: color-mix(in srgb, var(--bs-border-color) 70%, transparent);
  --bs-dropdown-border-radius: 1rem;
  --bs-dropdown-link-hover-bg: var(--gs-accent);
  --bs-dropdown-link-active-bg: var(--bs-primary);
  box-shadow: var(--gs-shadow-raised);
  padding: 0.35rem;
}
.dropdown-item { border-radius: 0.625rem; }
.modal { --bs-modal-bg: var(--gs-surface); --bs-modal-border-radius: var(--bs-border-radius-xl); --bs-modal-border-color: var(--bs-border-color); }
.progress { --bs-progress-bg: var(--bs-tertiary-bg); --bs-progress-bar-bg: var(--gs-ink); --bs-progress-border-radius: 999px; }

/* Pagination: separate pill buttons with no shared borders, a muted label,
   and the ink pill for the current page. */
.pagination {
  --bs-pagination-font-size: 0.78rem;
  --bs-pagination-padding-x: 0.5rem;
  --bs-pagination-padding-y: 0.25rem;
  --bs-pagination-border-width: 1px;
  --bs-pagination-border-color: transparent;
  --bs-pagination-border-radius: 999px;
  --bs-pagination-color: var(--bs-secondary-color);
  --bs-pagination-bg: transparent;
  --bs-pagination-hover-color: var(--bs-body-color);
  --bs-pagination-hover-bg: var(--gs-accent);
  --bs-pagination-hover-border-color: transparent;
  --bs-pagination-focus-color: var(--bs-body-color);
  --bs-pagination-focus-bg: var(--gs-accent);
  --bs-pagination-focus-box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), 0.4);
  --bs-pagination-active-color: var(--gs-ink-fg);
  --bs-pagination-active-bg: var(--gs-ink);
  --bs-pagination-active-border-color: var(--gs-ink);
  --bs-pagination-disabled-color: var(--bs-secondary-color);
  --bs-pagination-disabled-bg: transparent;
  --bs-pagination-disabled-border-color: transparent;
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0;
}
.pagination .page-item:not(:first-child) .page-link { margin-left: 0; }
.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.6rem;
  border-radius: 999px;
  font-family: var(--gs-font-mono);
  font-weight: 500;
}
.pagination .page-item.active .page-link { font-weight: 600; }
.pagination .page-item.disabled .page-link { opacity: 0.5; }
.nav-link { --bs-nav-link-font-size: 0.85rem; }

/* ---- Console shell: a framed app, as in the dens-ui dashboard block ---- */
.gs-app { min-height: 100vh; padding: 0.75rem; }
.gs-rail-col { display: none; }

/* Icon rail (xl and up): brand tile, one icon per area, a 24h meter and the
   preferences button. The active area gets an orange marker on the left. */
.gs-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem;
  border-radius: 1.375rem;
  background: var(--gs-rail);
  color: #ecf2f0;
  box-shadow: var(--gs-shadow-raised);
}
.gs-rail-brand {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 0.25rem;
  border-radius: 0.875rem;
  background: var(--gs-rail-brand, var(--gs-brand));
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  order: -1;
}
.gs-rail-brand:hover { color: #ffffff; filter: brightness(1.08); }
.gs-rail-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 0.875rem;
  color: var(--gs-rail-icon, rgba(236, 242, 240, 0.55));
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gs-rail-item:hover { background: color-mix(in srgb, var(--gs-rail-icon-active, #ecf2f0) 10%, transparent); color: var(--gs-rail-icon-active, #ecf2f0); }
.gs-rail-item:focus-visible, .gs-rail-brand:focus-visible, .gs-rail-prefs:focus-visible, .gs-meter-rail:focus-visible { outline: 2px solid var(--gs-brand); outline-offset: 2px; }
.gs-rail-item svg { width: 18px; height: 18px; }
.gs-rail-item.is-active { background: var(--gs-rail-active-bg, rgba(236, 242, 240, 0.15)); color: var(--gs-rail-icon-active, #ecf2f0); }
.gs-rail-item.is-active::before {
  content: "";
  position: absolute;
  left: -0.5rem;
  top: 50%;
  width: 4px;
  height: 1rem;
  border-radius: 999px;
  background: var(--gs-rail-marker, var(--gs-highlight));
  transform: translateY(-50%);
}
.gs-rail-dot {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gs-rail-marker, var(--gs-highlight));
  box-shadow: 0 0 0 2px var(--gs-rail);
}
.gs-meter-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.5rem;
  border-radius: 1.375rem;
  background: var(--gs-sidebar-bg);
  border: 1px solid var(--gs-sidebar-border);
  color: var(--gs-sidebar-text-strong);
}
.gs-meter-rail:hover { color: var(--gs-sidebar-text-strong); border-color: var(--gs-input); }
.gs-meter-rail-label { font-family: var(--gs-font-mono); font-size: 0.6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gs-sidebar-muted); }
.gs-meter-rail-total { font-family: var(--gs-font-mono); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.gs-meter-rail-ticks { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%; }
.gs-meter-rail-ticks > span { height: 2px; border-radius: 999px; background: color-mix(in srgb, var(--gs-sidebar-text-strong) 70%, transparent); }
.gs-meter-rail-ticks > span.is-zero { background: var(--gs-sidebar-border); }
.gs-meter-rail-ticks > span.is-current { background: var(--gs-highlight); }
.gs-rail-prefs {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-top: auto;
  padding: 0;
  border: 0;
  border-radius: 1.375rem;
  background: var(--gs-rail);
  color: var(--gs-rail-icon, rgba(236, 242, 240, 0.7));
  box-shadow: var(--gs-shadow-raised);
  cursor: pointer;
  transition: color 0.15s ease;
}
.gs-rail-prefs:hover { color: var(--gs-rail-icon-active, #ecf2f0); }
.gs-rail-prefs svg { width: 22px; height: 22px; }

/* The rail column never squeezes the icon rail or the preferences button:
   the button keeps its 56px square at the bottom, level with the end of the
   sidebar. The 24h meter absorbs short viewports instead, dropping its oldest
   ticks from the top (the current hour stays visible at the bottom). */
.gs-rail-col > .gs-rail,
.gs-rail-col > .gs-rail-prefs { flex: none; }
.gs-rail-col > .gs-meter-rail { flex: 0 1 auto; min-height: 0; overflow: hidden; }
.gs-meter-rail-label, .gs-meter-rail-total { flex: none; }
.gs-meter-rail-ticks { flex: 0 1 auto; min-height: 0; overflow: hidden; justify-content: flex-end; }
.gs-meter-rail-ticks > span { flex: none; }
@media (max-height: 720px) {
  .gs-rail-col > .gs-meter-rail { display: none; }
}
@media (max-height: 600px) {
  .gs-rail-col > .gs-rail { flex: 0 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; }
}
.gs-sidebar {
  --bs-offcanvas-width: 264px;
  --bs-offcanvas-bg: var(--gs-sidebar-bg);
  --bs-offcanvas-color: var(--gs-sidebar-text);
  --bs-nav-link-color: var(--gs-sidebar-text);
  --bs-nav-link-hover-color: var(--gs-sidebar-text-strong);
  --bs-nav-link-padding-y: 0;
  --bs-nav-link-padding-x: 0.75rem;
  /* `.offcanvas-lg` only supplies display:flex below lg, so the rail has to
     declare it itself or it falls back to block and the nav overflows. */
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem 0.625rem 0.625rem;
  background: var(--gs-sidebar-bg);
  color: var(--gs-sidebar-text);
  border: 1px solid var(--gs-sidebar-border);
  border-radius: 1.75rem;
  /* The rail is exactly one viewport tall; its nav scrolls instead. */
  overflow: hidden;
}
.gs-sidebar > :not(.gs-sidebar-art) { position: relative; z-index: 1; }

/* Optional decorative vector background behind the navigation. */
.gs-sidebar-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.gs-sidebar-art svg { display: block; width: 100%; height: 100%; stroke-width: 1.3; }

/* Only the groups belonging to the selected pattern are painted; "none" (the
   default) keeps the plain dens-ui sidebar. */
.gs-sidebar-art svg > [class^="gs-sidebar-art-"] { display: none; }
html[data-sidebar-pattern="mesh"] .gs-sidebar-art-dots,
html[data-sidebar-pattern="mesh"] .gs-sidebar-art-flow,
html[data-sidebar-pattern="mesh"] .gs-sidebar-art-nodes,
html[data-sidebar-pattern="mesh"] .gs-sidebar-art-signal,
html[data-sidebar-pattern="mesh"] .gs-sidebar-art-shield { display: block; }
html[data-sidebar-pattern="grid"] .gs-sidebar-art-grid,
html[data-sidebar-pattern="grid"] .gs-sidebar-art-rings { display: block; }
html[data-sidebar-pattern="waves"] .gs-sidebar-art-waves,
html[data-sidebar-pattern="waves"] .gs-sidebar-art-signal { display: block; }
html[data-sidebar-pattern="orbit"] .gs-sidebar-art-rings,
html[data-sidebar-pattern="orbit"] .gs-sidebar-art-nodes,
html[data-sidebar-pattern="orbit"] .gs-sidebar-art-shield { display: block; }

.gs-sidebar-art-dots { fill: url(#gsSidebarArtDots); stroke: none; }
.gs-sidebar-art-dot { fill: var(--gs-sidebar-art-dot); stroke: none; }
.gs-sidebar-art-grid { fill: url(#gsSidebarArtGrid); stroke: none; }
.gs-sidebar-art-grid-line { fill: none; stroke: var(--gs-sidebar-art-line); stroke-width: 1; }
.gs-sidebar-art-rings circle {
  fill: none;
  stroke: var(--gs-sidebar-art-line);
  stroke-dasharray: 3 9;
  animation: gsArtSpin 60s linear infinite;
  transform-box: view-box;
  transform-origin: 228px 112px;
}
.gs-sidebar-art-rings circle:nth-child(2) { animation-duration: 44s; animation-direction: reverse; }
.gs-sidebar-art-rings circle:nth-child(3) { animation-duration: 30s; }
.gs-sidebar-art-waves path {
  fill: none;
  stroke: var(--gs-sidebar-art-line-strong);
  stroke-dasharray: 3 11;
  animation: gsArtFlow 18s linear infinite;
}
.gs-sidebar-art-waves path:nth-child(2n) { animation-duration: 24s; animation-direction: reverse; }
.gs-sidebar-art-waves path:nth-child(3n) { animation-duration: 30s; }
.gs-sidebar-art-beam {
  fill: none;
  stroke: var(--gs-sidebar-art-line-strong);
  stroke-dasharray: 8 14;
  animation: gsArtFlow 9s linear infinite;
}
.gs-sidebar-art-beam--slow { animation-duration: 14s; animation-direction: reverse; }
.gs-sidebar-art-nodes circle {
  fill: var(--gs-sidebar-art-node);
  stroke: none;
  opacity: 0.5;
  animation: gsArtPulse 4.2s ease-in-out infinite;
}
.gs-sidebar-art-nodes circle:nth-child(2n) { animation-delay: 1.4s; }
.gs-sidebar-art-nodes circle:nth-child(3n) { animation-delay: 2.6s; }
.gs-sidebar-art-signal path { fill: none; stroke: var(--gs-sidebar-art-line-strong); }
.gs-sidebar-art-signal circle { fill: var(--gs-sidebar-art-node); stroke: none; animation: gsArtPulse 3.4s ease-in-out infinite; }
.gs-sidebar-art-shield path { fill: none; stroke: var(--gs-sidebar-art-line-strong); }
.gs-sidebar-art-shield path:first-child { stroke: var(--gs-sidebar-art-line); }

@keyframes gsArtFlow { to { stroke-dashoffset: -220; } }
@keyframes gsArtSpin { to { transform: rotate(360deg); } }
@keyframes gsArtPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .gs-sidebar-art * { animation: none !important; }
}
.gs-sidebar .offcanvas-header { padding: 0; }
/* Bootstrap's .offcanvas-lg sets background-color: transparent !important from
   992px up, which wiped every solid sidebar color (gradients survived because
   they live in background-image). Win it back with the solid token. */
html .gs-sidebar { background-color: var(--gs-sidebar-solid) !important; }
html:is([data-sidebar-theme="ink"], [data-sidebar-theme="teal"], [data-sidebar-theme="graphite"], [data-sidebar-theme="ruby"], [data-sidebar-theme="blue"]) .gs-sidebar .btn-close,
[data-bs-theme="dark"] .gs-sidebar .btn-close { filter: invert(1) grayscale(1); }

/* Brand: the 36px ink tile with the app initials, name over tagline. */
.gs-brand { display: flex; align-items: center; gap: 0.75rem; padding: 0.25rem 0.375rem 0; color: var(--gs-sidebar-text-strong); flex: none; }
.gs-brand:hover { text-decoration: none; color: var(--gs-sidebar-text-strong); }
.gs-brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 0.75rem;
  background: var(--gs-sidebar-mark-bg, var(--gs-ink));
  color: var(--gs-sidebar-mark-fg, var(--gs-ink-fg));
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  flex: none;
}
.gs-brand-mark--sm { width: 30px; height: 30px; font-size: 0.7rem; border-radius: 0.625rem; }
.gs-brand-mark--lg { width: 52px; height: 52px; border-radius: 1rem; font-size: 1.2rem; }
.gs-brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.gs-brand-text strong { font-size: 0.875rem; font-weight: 600; }
.gs-brand-text small { color: var(--gs-sidebar-muted); font-size: 0.75rem; }

/* min-height:0 lets the nav shrink to the space left in the rail so long menus
   scroll inside the sidebar. nowrap overrides Bootstrap's `.nav` wrap, which
   would otherwise lay the items out in extra columns. */
.gs-nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.125rem;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 -0.25rem;
  padding: 0 0.25rem 0.25rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--gs-sidebar-scroll) transparent;
}
.gs-nav > * { flex: none; }
/* A soft fade at the bottom edge hints that a long menu scrolls. */
.gs-nav:not(.gs-nav--footer) { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.75rem), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 1.75rem), transparent); padding-bottom: 1.25rem; }
.gs-nav::-webkit-scrollbar { width: 6px; }
.gs-nav::-webkit-scrollbar-thumb { background: var(--gs-sidebar-scroll); border-radius: 999px; }
.gs-nav::-webkit-scrollbar-track { background: transparent; }
.gs-nav-label {
  margin: 1rem 0 0;
  padding: 0 0.75rem 0.375rem;
  font-family: var(--gs-font-mono);
  font-size: 0.65625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gs-sidebar-label);
}
.gs-nav-label:first-child { margin-top: 0.25rem; }
.gs-nav .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  height: 2.25rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gs-sidebar-text);
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.gs-nav .nav-link > span:not(.gs-nav-count):not(.gs-nav-status) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 0.5rem; }
.gs-nav .nav-link > .gs-nav-count,
.gs-nav .nav-link > .gs-nav-status { flex: none; }
.gs-nav .nav-link:hover { background-color: var(--gs-sidebar-hover); color: var(--gs-sidebar-text-strong); }
.gs-nav .nav-link:focus-visible { outline: 2px solid var(--gs-brand); outline-offset: -2px; }
.gs-nav .nav-link.active {
  background: var(--gs-sidebar-active-bg);
  color: var(--gs-sidebar-text-strong);
  font-weight: 600;
  box-shadow: var(--gs-sidebar-active-shadow);
}
.gs-nav .nav-link svg { width: 18px; height: 18px; }
/* Sidebar counts: plain muted number, or the orange pill when it needs you. */
.gs-nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  padding: 0 0.375rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--gs-sidebar-muted);
}
.gs-nav-count--highlight { background: var(--gs-highlight); color: var(--gs-highlight-fg); }

/* Collapsible menu groups (dens-ui SidebarFolder): icon, chevron, left guide line. */
.gs-nav-folder { display: flex; flex-direction: column; width: 100%; }
.gs-nav-folder-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--gs-sidebar-text);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.gs-nav-folder-toggle:hover {
  background-color: var(--gs-sidebar-hover);
  color: var(--gs-sidebar-text-strong);
}
.gs-nav-folder-toggle:focus-visible { outline: 2px solid var(--gs-brand); outline-offset: -2px; }
.gs-nav-folder.is-open > .gs-nav-folder-toggle,
.gs-nav-folder.has-active > .gs-nav-folder-toggle { color: var(--gs-sidebar-text-strong); }
.gs-nav-folder.has-active:not(.is-open) > .gs-nav-folder-toggle {
  background: var(--gs-sidebar-active-bg);
  font-weight: 600;
  box-shadow: var(--gs-sidebar-active-shadow);
}
.gs-nav-folder-toggle > svg:first-child { width: 18px; height: 18px; flex: none; }
.gs-nav-folder-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.gs-nav-folder-badge { display: inline-flex; align-items: center; flex: none; margin-left: auto; }
.gs-nav-folder-badge .gs-nav-count,
.gs-nav-folder-badge .gs-nav-status { margin-left: 0; }
.gs-nav-folder.is-open > .gs-nav-folder-toggle > .gs-nav-folder-badge { display: none; }
.gs-nav-folder-chevron {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--gs-sidebar-muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
}
.gs-nav-folder-toggle:hover > .gs-nav-folder-chevron,
.gs-nav-folder.is-open > .gs-nav-folder-toggle > .gs-nav-folder-chevron { color: var(--gs-sidebar-text-strong); }
.gs-nav-folder.is-open > .gs-nav-folder-toggle > .gs-nav-folder-chevron { transform: rotate(90deg); }
.gs-nav-folder-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.16s ease,
              visibility 0s linear 0.22s;
}
.gs-nav-folder.is-open > .gs-nav-folder-panel {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: grid-template-rows 0.22s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.18s ease,
              visibility 0s linear 0s;
}
.gs-nav--no-anim .gs-nav-folder-panel,
.gs-nav--no-anim .gs-nav-folder-chevron { transition: none !important; }
.gs-nav-folder-list { overflow: hidden; min-height: 0; }
.gs-nav-folder-items {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-left: 21px;
  padding: 0.125rem 0 0.25rem 0.625rem;
}
.gs-nav-folder-items::before {
  content: "";
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0;
  width: 1px;
  background: var(--gs-sidebar-border);
}
.gs-nav .gs-nav-folder-items .nav-link {
  height: 2rem;
  padding: 0 0.625rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  gap: 0.5rem;
}
.gs-nav .gs-nav-folder-items .nav-link svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) {
  .gs-nav-folder-panel,
  .gs-nav-folder-chevron { transition: none !important; }
}

/* Footer: the signed-in user card, as in the dens-ui block. */
.gs-sidebar-footer { display: flex; flex-direction: column; gap: 0.5rem; flex: none; }
.gs-nav--footer { flex: none; overflow: visible; margin: 0; padding: 0; }
.gs-user-card {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem;
  border-radius: 1.125rem;
  background: var(--gs-sidebar-card);
  border: 1px solid var(--gs-sidebar-border);
  color: var(--gs-sidebar-text-strong);
}
.gs-user-card-link { display: flex; align-items: center; gap: 0.625rem; flex: 1; min-width: 0; color: inherit; }
.gs-user-card-link:hover { color: inherit; }
.gs-user-card-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.gs-user-card-meta strong { font-size: 0.8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-user-card-meta small { font-size: 0.75rem; color: var(--gs-sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-user-card .gs-icon-btn { width: 32px; height: 32px; border-color: transparent; background: transparent; box-shadow: none; color: var(--gs-sidebar-muted); }
.gs-user-card .gs-icon-btn:hover { background: var(--gs-sidebar-hover); color: var(--gs-sidebar-text-strong); }

/* Main panel: the rounded "surface" frame that holds header, page, footer. */
.gs-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: calc(100vh - 1.5rem);
  padding: 0.5rem;
  border-radius: 2.125rem;
  background: var(--gs-panel);
  border: 1px solid color-mix(in srgb, var(--bs-border-color) 70%, transparent);
}
.gs-topbar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.75rem 0.75rem 0.25rem;
}
.gs-topbar-title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 16rem; }
.gs-topbar-crumbs { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; color: var(--bs-secondary-color); }
.gs-topbar-crumbs a { color: inherit; }
.gs-topbar-crumbs a:hover { color: var(--bs-body-color); }
.gs-topbar-title h1 {
  margin: 0.4rem 0 0;
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-topbar-sub { margin-top: 0.4rem; font-size: 0.8125rem; color: var(--bs-secondary-color); }
.gs-topbar-sub:empty { display: none; }
.gs-topbar-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; flex-wrap: wrap-reverse; justify-content: flex-end; }
/* Page actions sit left of the global tools; when they do not fit, wrap-reverse
   keeps search, bell and globe together on the top line and drops the page
   actions to the line below. */
.gs-topbar-page-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 0.5rem; }
.gs-topbar-page-actions:empty { display: none; }
.gs-topbar-page-actions > .d-flex { justify-content: flex-end; }
.gs-topbar-tools { display: flex; align-items: center; gap: 0.5rem; }

.gs-icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--gs-input);
  border-radius: 999px;
  background: var(--gs-surface);
  color: var(--bs-body-color);
  line-height: 1;
  box-shadow: var(--gs-shadow-control);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gs-icon-btn:hover { background: var(--gs-accent); color: var(--bs-body-color); text-decoration: none; }
.gs-icon-btn:focus-visible { outline: 2px solid var(--gs-brand); outline-offset: 2px; }
.gs-icon-btn--ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--bs-secondary-color); }
.gs-icon-btn--ghost:hover { background: var(--gs-accent); }
.gs-icon-btn svg { width: 1.0625rem; height: 1.0625rem; }
.gs-theme-toggle .icon-sun { display: none; }
.gs-theme-toggle .icon-moon { display: block; }
[data-bs-theme="dark"] .gs-theme-toggle .icon-sun { display: block; }
[data-bs-theme="dark"] .gs-theme-toggle .icon-moon { display: none; }
.gs-theme-launcher-fill { fill: currentColor; stroke: none; }

.gs-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gs-soft);
  color: var(--gs-soft-fg);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex: none;
  overflow: hidden;
}
img.gs-avatar { object-fit: cover; display: block; border: 1px solid var(--bs-border-color); }
.gs-avatar--sm { width: 28px; height: 28px; font-size: 0.65rem; }
.gs-avatar--xl { width: 64px; height: 64px; font-size: 1.25rem; }

.gs-content { flex: 1; display: flex; flex-direction: column; gap: 0.875rem; width: 100%; max-width: 1480px; margin: 0 auto; padding: 0.75rem; }
.gs-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.75rem 0.375rem;
  font-family: var(--gs-font-mono);
  font-size: 0.6875rem;
  color: var(--bs-secondary-color);
}

@media (min-width: 992px) {
  /* The outer frame holds rail, sidebar and main panel, as in the block. */
  body:has(> .gs-app) { background: var(--gs-page); }
  .gs-app {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    gap: 0.75rem;
    min-height: calc(100vh - 1.5rem);
    margin: 0.75rem;
    border-radius: 2.5rem;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
  }
  .gs-sidebar { position: sticky; top: 1.5rem; height: calc(100vh - 3rem); max-height: calc(100vh - 3rem); }
  .gs-main { min-height: calc(100vh - 3rem); }
}
@media (min-width: 1200px) {
  .gs-app { grid-template-columns: 56px 252px minmax(0, 1fr); }
  .gs-app:has(.gs-rail-col--labels) { grid-template-columns: 76px 252px minmax(0, 1fr); }
  .gs-rail-col {
    position: sticky;
    top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: calc(100vh - 3rem);
  }
}

/* ---- Page head ---- */
.gs-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.gs-page-head h2 { margin: 0; font-size: 1.25rem; }
.gs-page-head-sub { color: var(--bs-secondary-color); font-size: 0.8125rem; margin-top: 0.2rem; }
/* Filter bars that used to sit in the page head stay in the content, right-aligned. */
.gs-page-toolbar { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.gs-page-toolbar > * { min-width: 0; }

/* ---- Dashboard: KPI card, dot chart, attention strip, queue, tiles ---- */
.gs-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.9rem; font-family: var(--gs-font-mono); font-size: 0.6875rem; color: var(--bs-secondary-color); }
.gs-legend-item { display: inline-flex; align-items: center; gap: 0.375rem; }
.gs-legend-dot { width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--gs-ink) 80%, transparent); }
.gs-legend-dot--errors { background: var(--gs-highlight); }
.gs-legend-dot--future { background: transparent; border: 1px solid var(--bs-secondary-color); }

.gs-kpi { display: grid; gap: 1.25rem; }
@media (min-width: 1200px) { .gs-kpi { grid-template-columns: 220px minmax(0, 1fr); } }
.gs-kpi-value {
  font-size: 4rem;
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.gs-kpi-caption { font-size: 0.8125rem; color: var(--bs-secondary-color); }
.gs-kpi-facts { margin: 0; border-top: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color); }
.gs-kpi-facts > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0; font-size: 0.8125rem; }
.gs-kpi-facts > div + div { border-top: 1px solid var(--bs-border-color); }
.gs-kpi-facts dt { font-weight: 400; color: var(--bs-secondary-color); }
.gs-kpi-facts dd { margin: 0; font-family: var(--gs-font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }

/* svg.gs-dotchart outranks the global svg[viewBox] icon sizing. */
svg.gs-dotchart { display: block; width: 100%; height: auto; overflow: visible; stroke: none; }
.gs-dotchart .gs-dot-ok { fill: color-mix(in srgb, var(--gs-ink) 80%, transparent); stroke: none; }
.gs-dotchart .gs-dot-err { fill: var(--gs-highlight); stroke: none; }
.gs-dotchart .gs-dot-future { fill: none; stroke: color-mix(in srgb, var(--bs-secondary-color) 55%, transparent); stroke-width: 1.2; }
.gs-dotchart .gs-dot-col:hover .gs-dot-ok { fill: var(--bs-primary); }
.gs-dotchart .gs-dot-hit { fill: transparent; stroke: none; }
.gs-dotchart .gs-now-line { stroke: var(--gs-ink); stroke-width: 1.5; }
.gs-dotchart .gs-now-pill { fill: var(--gs-ink); stroke: none; }
.gs-dotchart .gs-now-text { fill: var(--gs-ink-fg); stroke: none; font-family: var(--gs-font-mono); font-size: 8.5px; font-weight: 500; }
.gs-dotchart .gs-axis { fill: var(--bs-secondary-color); stroke: none; font-family: var(--gs-font-mono); font-size: 8.5px; }
.gs-dotchart .gs-baseline { stroke: var(--bs-border-color); stroke-width: 1; }

.gs-attention {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 1rem;
  background: rgba(var(--gs-highlight-rgb), 0.1);
  border: 1px solid rgba(var(--gs-highlight-rgb), 0.3);
}
.gs-attention-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--gs-highlight); color: var(--gs-highlight-fg); flex: none; }
.gs-attention-icon svg { width: 16px; height: 16px; }
.gs-attention p { flex: 1 1 14rem; font-size: 0.8125rem; }

.gs-tile {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 0.625rem;
  background: var(--gs-panel);
  border: 1px solid var(--bs-border-color);
  font-size: 0.75rem;
  font-weight: 700;
  flex: none;
}
.gs-mono-sub { font-family: var(--gs-font-mono); font-size: 0.6875rem; color: var(--bs-secondary-color); }

/* Run strip: one thin bar per period (dens-ui RunStrip). */
.gs-strip { display: flex; align-items: flex-end; gap: 3px; height: 1.5rem; }
.gs-strip > span { width: 6px; min-height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--gs-ink) 55%, transparent); }
.gs-strip > span.is-err { background: var(--gs-highlight); }
.gs-strip > span.is-empty { background: transparent; border: 1px dashed var(--bs-border-color); height: 100% !important; }

/* Queue items ("Needs you" in dens-ui): the first one is raised. */
.gs-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.gs-queue-item {
  display: flex;
  gap: 0.625rem;
  padding: 0.75rem;
  border-radius: 1rem;
  background: var(--gs-panel);
  border: 1px solid color-mix(in srgb, var(--bs-border-color) 70%, transparent);
}
.gs-queue-item:first-child { background: var(--gs-surface); border-color: var(--bs-border-color); box-shadow: var(--gs-shadow-raised); }
.gs-queue-item strong { display: block; font-size: 0.875rem; font-weight: 600; line-height: 1.35; }
.gs-queue-item small { display: block; font-size: 0.78rem; color: var(--bs-secondary-color); }
.gs-id-pill { display: inline-block; padding: 0.05rem 0.4rem; border-radius: 0.375rem; background: var(--bs-tertiary-bg); font-family: var(--gs-font-mono); font-size: 0.65625rem; color: var(--bs-body-color); }

.gs-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.gs-bars li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 2rem; align-items: center; gap: 0.75rem; font-size: 0.8125rem; }
.gs-bars-track { height: 6px; border-radius: 999px; background: var(--bs-tertiary-bg); overflow: hidden; }
.gs-bars-track > span { display: block; height: 100%; border-radius: inherit; background: var(--gs-ink); }
.gs-bars-value { font-family: var(--gs-font-mono); font-weight: 500; text-align: right; }

/* ---- Small composite widgets ---- */
.gs-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--gs-surface);
  border: 1px solid var(--bs-border-color);
  font-size: 0.75rem;
  color: var(--bs-body-color);
  box-shadow: var(--bs-box-shadow-sm);
}
.gs-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gs-dot--live { background: var(--gs-brand); box-shadow: 0 0 0 3px rgba(0, 140, 141, 0.18); }
.gs-dot--ok { width: 8px; height: 8px; background: var(--gs-brand); box-shadow: 0 0 0 3px rgba(0, 140, 141, 0.15); }
.gs-dot--warn { width: 8px; height: 8px; background: var(--gs-highlight); box-shadow: 0 0 0 3px rgba(var(--gs-highlight-rgb), 0.18); }

.gs-empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2rem 1rem; color: var(--bs-secondary-color); font-size: 0.8125rem; text-align: center; }

.gs-error-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.6rem; padding: 3.5rem 1.25rem; }
.gs-error-code { font-size: 4.5rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; background: linear-gradient(135deg, var(--gs-ink), var(--gs-brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gs-error-message { color: var(--bs-secondary-color); max-width: 520px; }
.gs-error-meta { color: var(--bs-secondary-color); font-size: 0.68rem; margin-top: 0.5rem; }

.gs-meta > div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px dashed var(--bs-border-color); }
.gs-meta > div:last-child { border-bottom: 0; }
.gs-meta dt { color: var(--bs-secondary-color); font-size: 0.75rem; font-weight: 400; }
.gs-meta dd { margin: 0; text-align: right; font-size: 0.78rem; font-weight: 500; overflow-wrap: anywhere; }

.gs-user-cell { display: flex; align-items: center; gap: 0.7rem; }
.gs-user-cell > div { display: flex; flex-direction: column; min-width: 0; }
.gs-user-cell small { color: var(--bs-secondary-color); font-size: 0.72rem; }
.gs-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.35rem; flex-wrap: wrap; }

.gs-code { margin: 0; padding: 0.85rem 1rem; border-radius: 0.625rem; background: var(--bs-secondary-bg); border: 1px solid var(--bs-border-color); font-family: var(--gs-font-mono); font-size: 0.75rem; color: var(--bs-body-color); overflow-x: auto; }
.gs-email-preview { border: 1px solid var(--bs-border-color); border-radius: 0.625rem; overflow: hidden; }
.gs-email-preview-subject { margin: 0; padding: 0.6rem 0.875rem; background: var(--bs-secondary-bg); border-bottom: 1px solid var(--bs-border-color); font-size: 0.75rem; font-weight: 600; }
.gs-email-preview-body { margin: 0; padding: 1rem; font-size: 0.78rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 340px; overflow-y: auto; }
.gs-recovery-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.5rem; }
.gs-recovery-codes code { padding: 0.5rem 0.6rem; border: 1px dashed var(--bs-border-color); border-radius: 0.5rem; background: var(--bs-secondary-bg); font-size: 0.78rem; text-align: center; }

.gs-meter { height: 6px; border-radius: 999px; background: var(--bs-tertiary-bg); overflow: hidden; }
.gs-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--bs-primary); transition: width 0.3s ease; }
.gs-meter--memory > span { background: var(--gs-ink); }
.gs-meter--disk > span { background: var(--gs-brand); }

.gs-count { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.75rem 0.875rem; border-radius: var(--bs-border-radius); background: var(--bs-secondary-bg); border: 1px solid var(--bs-border-color); }
.gs-count span { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.02em; }
.gs-count small { color: var(--bs-secondary-color); font-size: 0.7rem; }

.gs-version-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--bs-border-radius-lg);
  background: linear-gradient(120deg, var(--gs-hero-from), var(--gs-hero-via) 45%, var(--gs-hero-to));
  color: #d5e2df;
  box-shadow: var(--gs-shadow-raised);
  flex-wrap: wrap;
}
.gs-version-hero-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.14em; color: #8cc8c3; }
.gs-version-hero-value { font-size: 2.5rem; font-weight: 800; letter-spacing: -0.03em; color: #ffffff; line-height: 1.15; }
.gs-version-hero-meta { font-size: 0.75rem; color: #c0ebd7; }
.gs-version-hero-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1.75rem; margin: 0; align-content: center; }
.gs-version-hero-facts dt { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: #8cc8c3; }
.gs-version-hero-facts dd { margin: 0.1rem 0 0; font-size: 0.78rem; color: #ecf2f0; }

/* ---- Timeline (changelog) ---- */
.gs-timeline { list-style: none; margin: 0; padding: 0.35rem 1.35rem 0.35rem 1.6rem; position: relative; }
.gs-timeline::before { content: ""; position: absolute; left: 0.75rem; top: 0.75rem; bottom: 0.75rem; width: 2px; background: var(--bs-border-color); }
.gs-timeline-item { position: relative; padding: 0.6rem 0 0.6rem 1.1rem; }
.gs-timeline-marker { position: absolute; left: -1.2rem; top: 1.1rem; width: 12px; height: 12px; border-radius: 50%; background: var(--gs-surface); border: 3px solid var(--gs-brand); }
.gs-timeline-body { border-bottom: 1px dashed var(--bs-border-color); padding-bottom: 0.875rem; }
.gs-timeline-item:last-child .gs-timeline-body { border-bottom: 0; }
.gs-timeline-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.72rem; }
.gs-timeline-head h4 { margin: 0.5rem 0 0.25rem; font-size: 0.9rem; }
.gs-timeline-notes { color: var(--bs-body-color); font-size: 0.78rem; margin-bottom: 0.35rem; }
/* Release groups: only the newest version is expanded, older ones collapse. */
.gs-release-group { border-bottom: 1px solid var(--bs-border-color); }
.gs-release-group:last-child { border-bottom: 0; }
.gs-release-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  font-size: 0.72rem;
  cursor: pointer;
  list-style: none;
}
.gs-release-summary::-webkit-details-marker { display: none; }
.gs-release-summary:hover { background: var(--bs-secondary-bg); }
.gs-release-summary:focus-visible { outline: 2px solid var(--bs-link-color); outline-offset: -2px; }
.gs-release-chevron { width: 16px; height: 16px; margin-left: auto; transition: transform 0.15s ease; }
.gs-release-group[open] .gs-release-chevron { transform: rotate(180deg); }
.gs-release-group .gs-timeline { padding-top: 0; }

/* ---- Auth pages ---- */
.gs-auth-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 1.75rem 1.125rem;
  background:
    radial-gradient(1000px 500px at 10% -10%, var(--gs-auth-glow-1) 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 100%, var(--gs-auth-glow-2) 0%, transparent 55%),
    var(--gs-auth-base);
}
.gs-auth-theme { position: fixed; top: 1.1rem; right: 1.1rem; z-index: 10; }
.gs-auth-theme .gs-icon-btn { background: var(--gs-surface); box-shadow: var(--bs-box-shadow-sm); }

/* ---- Theme dialog: color mode, sidebar color and sidebar pattern ---- */
.gs-theme-dialog {
  width: min(28rem, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--gs-surface);
  color: var(--bs-body-color);
  box-shadow: var(--gs-shadow-raised);
}
.gs-theme-dialog::backdrop { background: rgba(12, 11, 11, 0.5); backdrop-filter: blur(2px); }
.gs-theme-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem 0;
}
.gs-theme-dialog-head h2 { font-size: 1.06rem; }
.gs-theme-dialog-close {
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 1.875rem;
  padding: 0;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.gs-theme-dialog-close:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.gs-theme-dialog-section { padding: 1rem 1.25rem 0; }
.gs-theme-dialog-section:last-of-type { padding-bottom: 1.25rem; }
.gs-theme-dialog-label {
  margin: 0 0 0.5rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}
.gs-theme-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }
.gs-theme-choice {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.625rem;
  background: var(--gs-surface);
  color: var(--bs-secondary-color);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.gs-theme-choice:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.gs-theme-choice.is-active {
  border-color: var(--bs-primary);
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}
.gs-theme-choice-icon { width: 1.125rem; height: 1.125rem; flex: none; }
.gs-theme-swatches { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.gs-theme-swatch {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.625rem;
  background: linear-gradient(150deg, var(--swatch-from), var(--swatch-to));
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gs-theme-swatch:hover { transform: translateY(-1px) scale(1.05); }
.gs-theme-swatch.is-active { box-shadow: 0 0 0 2px var(--gs-surface), 0 0 0 4px var(--bs-primary); }
.gs-theme-patterns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.gs-theme-pattern {
  display: grid;
  gap: 0.3rem;
  padding: 0.3rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.625rem;
  background: var(--gs-surface);
  color: var(--bs-secondary-color);
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.gs-theme-pattern:hover { border-color: var(--bs-secondary-color); color: var(--bs-body-color); }
.gs-theme-pattern.is-active { border-color: var(--bs-primary); color: var(--bs-primary-text-emphasis); }
.gs-theme-pattern-canvas {
  --gs-pattern-ink: color-mix(in srgb, var(--gs-sidebar-text-strong) 38%, transparent);
  position: relative;
  display: block;
  height: 2.6rem;
  border-radius: 0.5rem;
  background: var(--gs-sidebar-bg);
  border: 1px solid var(--gs-sidebar-border);
  overflow: hidden;
}
.gs-theme-pattern-canvas::after { content: ""; position: absolute; inset: 0; }
.gs-theme-pattern-canvas--mesh::after {
  background-image: radial-gradient(circle, var(--gs-pattern-ink) 1px, transparent 1.4px);
  background-size: 9px 9px;
}
.gs-theme-pattern-canvas--grid::after {
  background-image:
    linear-gradient(var(--gs-pattern-ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--gs-pattern-ink) 1px, transparent 1px);
  background-size: 10px 10px, 10px 10px;
}
.gs-theme-pattern-canvas--waves::after {
  background-image: repeating-radial-gradient(circle at 50% 130%, transparent 0 8px, var(--gs-pattern-ink) 8px 9px);
}
.gs-theme-pattern-canvas--orbit::after {
  background-image:
    radial-gradient(circle at 50% 50%, transparent 0 7px, var(--gs-pattern-ink) 7px 8px, transparent 8px),
    radial-gradient(circle at 50% 50%, transparent 0 14px, var(--gs-pattern-ink) 14px 15px, transparent 15px),
    radial-gradient(circle at 50% 50%, var(--gs-sidebar-art-node) 1.5px, transparent 2px);
}
.gs-theme-pattern-name { line-height: 1.1; text-align: center; }
.gs-theme-swatch:focus-visible,
.gs-theme-choice:focus-visible,
.gs-theme-pattern:focus-visible,
.gs-theme-dialog-close:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.gs-theme-dialog-hint { margin: 0.625rem 0 0; font-size: 0.72rem; color: var(--bs-secondary-color); }
.gs-auth-shell {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  width: min(1020px, 100%);
  min-height: 560px;
  background: var(--gs-surface);
  border: 1px solid var(--bs-border-color);
  border-radius: 1.625rem;
  overflow: hidden;
  box-shadow: var(--gs-shadow-raised);
}
.gs-auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.875rem;
  padding: 3.25rem 3rem;
  background: linear-gradient(160deg, var(--gs-hero-from) 0%, var(--gs-hero-via) 55%, var(--gs-hero-to) 100%);
  color: #d5e2df;
  overflow: hidden;
  --gs-auth-art-line: rgba(192, 235, 215, 0.16);
  --gs-auth-art-line-strong: rgba(192, 235, 215, 0.3);
  --gs-auth-art-dot: rgba(192, 235, 215, 0.14);
  --gs-auth-art-node: #c0ebd7;
}
.gs-auth-hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 0, 0.28), transparent 65%);
}
.gs-auth-hero h1 { font-size: 2.125rem; letter-spacing: -0.03em; color: #ffffff; margin: 0; }
.gs-auth-hero > p { color: #c0ebd7; font-size: 0.84rem; max-width: 34ch; margin: 0; }
.gs-auth-hero-list { list-style: none; margin: 0.35rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.625rem; font-size: 0.78rem; color: #d5e2df; }
.gs-auth-hero-list li { position: relative; padding-left: 1.375rem; }
.gs-auth-hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c0ebd7;
  box-shadow: 0 0 0 4px rgba(192, 235, 215, 0.18);
}
/* Animated vector backdrop on the sign-in hero: signal rings, data mesh, shield. */
.gs-auth-hero-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.gs-auth-hero-art svg { display: block; width: 100%; height: 100%; stroke-width: 1.3; }
.gs-auth-hero > :not(.gs-auth-hero-art) { position: relative; z-index: 1; }
.gs-auth-art-dots { fill: url(#gsAuthArtDots); stroke: none; }
.gs-auth-art-dot { fill: var(--gs-auth-art-dot); stroke: none; }
.gs-auth-art-rings circle {
  fill: none;
  stroke: var(--gs-auth-art-line);
  stroke-dasharray: 3 10;
  animation: gsArtSpin 70s linear infinite;
  transform-box: view-box;
  transform-origin: 512px 132px;
}
.gs-auth-art-rings circle:nth-child(2) { animation-duration: 50s; animation-direction: reverse; }
.gs-auth-art-rings circle:nth-child(3) { animation-duration: 34s; }
.gs-auth-art-wave path {
  fill: none;
  stroke: var(--gs-auth-art-line-strong);
  animation: gsArtPulse 5s ease-in-out infinite;
}
.gs-auth-art-wave path:nth-child(2) { animation-delay: 0.6s; }
.gs-auth-art-wave path:nth-child(3) { animation-delay: 1.2s; }
.gs-auth-art-wave circle { fill: var(--gs-auth-art-node); stroke: none; animation: gsArtPulse 3.6s ease-in-out infinite; }
.gs-auth-art-mesh path { fill: none; stroke: var(--gs-auth-art-line); }
.gs-auth-art-mesh .gs-auth-art-flow {
  stroke: var(--gs-auth-art-line-strong);
  stroke-dasharray: 10 12;
  animation: gsArtFlow 8s linear infinite;
}
.gs-auth-art-mesh .gs-auth-art-flow--slow { animation-duration: 13s; animation-direction: reverse; }
.gs-auth-art-mesh .gs-auth-art-node {
  fill: var(--gs-auth-art-node);
  stroke: rgba(15, 23, 22, 0.55);
  stroke-width: 2;
  opacity: 0.75;
  animation: gsArtPulse 4s ease-in-out infinite;
}
.gs-auth-art-mesh .gs-auth-art-node:nth-of-type(2n) { animation-delay: 1.2s; }
.gs-auth-art-mesh .gs-auth-art-node:nth-of-type(3n) { animation-delay: 2.4s; }
.gs-auth-art-shield path { fill: none; stroke: var(--gs-auth-art-line-strong); }
.gs-auth-art-shield path:first-child { stroke: var(--gs-auth-art-line); }

.gs-auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 3rem 2.75rem; }
.gs-auth-panel-footer { margin-top: 1.75rem; text-align: center; font-size: 0.68rem; color: var(--bs-secondary-color); }
.gs-auth-head { margin-bottom: 1.375rem; }
.gs-auth-head h2 { font-size: 1.5rem; letter-spacing: -0.025em; margin: 0; }
.gs-auth-head p { color: var(--bs-secondary-color); font-size: 0.8125rem; margin-top: 0.25rem; }
.gs-auth-alt { margin-top: 0.875rem; text-align: center; font-size: 0.78rem; }
.gs-demo-box { margin-top: 1.375rem; padding: 0.875rem 1rem; border-radius: var(--bs-border-radius); background: var(--bs-secondary-bg); border: 1px dashed var(--bs-border-color); font-size: 0.75rem; }
.gs-demo-box-title { font-weight: 700; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bs-secondary-color); margin-bottom: 0.5rem; }
.gs-demo-box ul { list-style: none; margin: 0 0 0.5rem; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.gs-demo-box li { display: flex; justify-content: space-between; gap: 0.6rem; }
.gs-demo-box li span { color: var(--bs-secondary-color); font-size: 0.72rem; }

/* ---- Public landing page ---- */
.gs-landing-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--gs-surface);
  background: color-mix(in srgb, var(--gs-surface) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bs-border-color);
}
/* The brand block is built for the dark sidebar; the landing navbar re-colours it. */
.gs-landing-nav .gs-brand,
.gs-landing-nav .gs-brand:hover { color: var(--bs-body-color); }
.gs-landing-nav .gs-brand-text small { color: var(--bs-secondary-color); }
.gs-landing-nav-inner { max-width: 1120px; margin: 0 auto; padding: 0.875rem 1.5rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.gs-landing-links { display: flex; align-items: center; gap: 1.125rem; margin-left: 0.5rem; flex: 1; flex-wrap: wrap; }
.gs-landing-links a { color: var(--bs-secondary-color); font-size: 0.8125rem; font-weight: 500; }
.gs-landing-links a:hover { color: var(--bs-body-color); }
.gs-landing-actions { display: flex; align-items: center; gap: 0.5rem; }
.gs-landing { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.5rem 4rem; }
.gs-hero { position: relative; padding: 4.5rem 0 3.5rem; text-align: center; overflow: hidden; }
.gs-hero-glow {
  position: absolute;
  inset: -30% 10% auto;
  height: 420px;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(0, 140, 141, 0.22), transparent 75%);
  filter: blur(10px);
  pointer-events: none;
}
.gs-hero-inner { max-width: 760px; margin: 0 auto; }
.gs-hero-badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.75rem; border-radius: 999px; border: 1px solid var(--bs-border-color); background: var(--gs-surface); color: var(--bs-secondary-color); font-size: 0.75rem; font-weight: 600; }
.gs-hero-title { margin: 1.375rem 0 0.875rem; font-size: clamp(1.875rem, 4.4vw, 3rem); line-height: 1.12; letter-spacing: -0.02em; font-weight: 700; }
.gs-hero-sub { margin: 0 auto; max-width: 640px; color: var(--bs-secondary-color); font-size: 0.9375rem; line-height: 1.65; }
.gs-hero-actions { display: flex; justify-content: center; gap: 0.75rem; margin-top: 1.75rem; flex-wrap: wrap; }
.gs-hero-facts { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.625rem; margin: 2.5rem 0 0; padding: 0; }
.gs-hero-facts li { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.75rem 1.125rem; min-width: 130px; border: 1px solid var(--bs-border-color); border-radius: 0.75rem; background: var(--gs-surface); }
.gs-hero-facts strong { font-size: 0.8125rem; }
.gs-hero-facts span { color: var(--bs-secondary-color); font-size: 0.72rem; }

.gs-section { padding: 3rem 0; }
.gs-section--alt { border-top: 1px solid var(--bs-border-color); }
.gs-section-head { max-width: 620px; margin-bottom: 1.625rem; }
.gs-section-head h2 { margin: 0 0 0.35rem; font-size: 1.375rem; letter-spacing: -0.01em; }
.gs-section-head p { margin: 0; color: var(--bs-secondary-color); font-size: 0.84rem; }
.gs-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.625rem;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
  flex: none;
}
.gs-panel-icon svg { width: 1.1875rem; height: 1.1875rem; }
.gs-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding: 1.875rem;
  border-radius: 1.125rem;
  border: 1px solid var(--bs-border-color);
  background: var(--gs-surface);
  background: linear-gradient(135deg, color-mix(in srgb, var(--gs-brand) 14%, var(--gs-surface)), var(--gs-surface));
}
.gs-cta h2 { margin: 0 0 0.35rem; font-size: 1.25rem; }
.gs-cta p { margin: 0; color: var(--bs-secondary-color); font-size: 0.8125rem; }
.gs-landing-footer { border-top: 1px solid var(--bs-border-color); background: var(--gs-surface); }
.gs-landing-footer-inner { max-width: 1120px; margin: 0 auto; padding: 1.75rem 1.5rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.gs-landing-footer-brand { display: flex; gap: 0.75rem; align-items: flex-start; max-width: 420px; }
.gs-landing-footer-brand strong { font-size: 0.84rem; }
.gs-landing-footer-brand p { margin: 0.25rem 0 0; color: var(--bs-secondary-color); font-size: 0.75rem; line-height: 1.55; }
.gs-landing-footer-links { display: flex; flex-direction: column; gap: 0.45rem; }
.gs-landing-footer-links a { color: var(--bs-secondary-color); font-size: 0.78rem; }
.gs-landing-footer-links a:hover { color: var(--bs-body-color); }
.gs-landing-footer-meta { display: flex; flex-direction: column; gap: 0.35rem; color: var(--bs-secondary-color); font-size: 0.72rem; text-align: right; }

/* ---- Command palette ---- */
.gs-search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 40px;
  min-width: 15rem;
  padding: 0 0.5rem 0 0.875rem;
  border: 1px solid var(--gs-input);
  border-radius: 999px;
  background: var(--gs-surface);
  color: var(--bs-secondary-color);
  font: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  box-shadow: var(--gs-shadow-control);
}
.gs-search-trigger:hover { color: var(--bs-body-color); }
.gs-search-trigger:focus-visible { outline: 2px solid var(--gs-brand); outline-offset: 2px; }
.gs-search-trigger svg { width: 1rem; height: 1rem; }
.gs-search-trigger span { flex: 1; text-align: left; }
.gs-search-trigger kbd { margin-left: auto; }
.gs-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(12, 11, 11, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 1rem;
  backdrop-filter: blur(2px);
}
.gs-search-overlay[hidden] { display: none; }
.gs-search-dialog { width: 100%; max-width: 620px; background: var(--gs-surface); border: 1px solid var(--bs-border-color); border-radius: 1.375rem; box-shadow: var(--gs-shadow-raised); overflow: hidden; }
.gs-search-field { display: flex; align-items: center; gap: 0.625rem; padding: 0.875rem 1rem; border-bottom: 1px solid var(--bs-border-color); }
.gs-search-field svg { width: 1.0625rem; height: 1.0625rem; color: var(--bs-secondary-color); }
.gs-search-field input { flex: 1; border: none; background: transparent; color: var(--bs-body-color); font: inherit; font-size: 0.875rem; outline: none; }
.gs-search-results { list-style: none; margin: 0; padding: 0.35rem; max-height: 50vh; overflow-y: auto; }
.gs-search-result { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.625rem 0.75rem; border-radius: 0.625rem; text-decoration: none; color: inherit; }
.gs-search-result:hover, .gs-search-result.is-active { background: var(--bs-secondary-bg); text-decoration: none; color: inherit; }
.gs-search-type { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bs-secondary-color); border: 1px solid var(--bs-border-color); border-radius: 6px; padding: 2px 6px; margin-top: 2px; white-space: nowrap; }
.gs-search-body strong { display: block; font-size: 0.8125rem; }
.gs-search-body small { color: var(--bs-secondary-color); font-size: 0.72rem; }
.gs-search-hint { margin: 0; padding: 1rem; color: var(--bs-secondary-color); font-size: 0.75rem; }
html.search-open { overflow: hidden; }

/* ---- Notifications dropdown ---- */
.gs-notif-menu { width: 340px; padding: 0; overflow: hidden; }
.gs-notif-item.is-unread strong::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 0.375rem; border-radius: 50%; background: var(--gs-highlight); vertical-align: middle; }
.gs-notif-head, .gs-notif-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 0.875rem; border-bottom: 1px solid var(--bs-border-color); }
.gs-notif-foot { border-bottom: none; border-top: 1px solid var(--bs-border-color); }
.gs-notif-list { list-style: none; margin: 0; padding: 0.35rem; max-height: 320px; overflow-y: auto; }
.gs-notif-item { display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.625rem; border-radius: 0.625rem; }
.gs-notif-item.is-unread { background: var(--bs-secondary-bg); }
.gs-notif-item strong { display: block; font-size: 0.78rem; }
.gs-notif-item small { display: block; color: var(--bs-secondary-color); font-size: 0.72rem; }
.gs-notif-open { margin-left: auto; color: var(--bs-secondary-color); font-size: 0.9375rem; }
.gs-notif-empty { padding: 1.125rem 0.875rem; color: var(--bs-secondary-color); font-size: 0.75rem; margin: 0; }
.gs-notif-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex: 0 0 auto; background: var(--bs-primary); }
.gs-notif-dot--success { background: var(--bs-success); }
.gs-notif-dot--warning { background: var(--bs-warning); }
.gs-notif-dot--error { background: var(--bs-danger); }
.gs-notif-dot--info { background: var(--bs-primary); }
/* Orange count on the bell: it is the one thing in the header that needs you. */
.gs-notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gs-highlight);
  color: var(--gs-highlight-fg);
  box-shadow: 0 0 0 2px var(--gs-panel);
  font-size: 0.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gs-notif-btn { position: relative; }

/* ---- Impersonation, bulk actions, saved filters ---- */
.gs-impersonation {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1.5rem;
  background: var(--bs-warning-bg-subtle);
  color: var(--bs-warning-text-emphasis);
  font-size: 0.78rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.gs-impersonation p { margin: 0; flex: 1; }
.gs-impersonation-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bs-warning); flex: 0 0 auto; }

.gs-bulk-bar { display: flex; align-items: center; gap: 0.625rem; padding: 0.75rem 1.25rem; border-top: 1px solid var(--bs-border-color); background: var(--bs-secondary-bg); flex-wrap: wrap; }
.gs-bulk-count { font-size: 0.75rem; color: var(--bs-secondary-color); }

.gs-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.5rem; border-radius: 999px; border: 1px solid var(--bs-border-color); background: var(--bs-secondary-bg); font-size: 0.72rem; }
.gs-chip a { color: inherit; text-decoration: none; }
.gs-chip-remove { border: none; background: transparent; color: var(--bs-secondary-color); cursor: pointer; font-size: 0.8125rem; line-height: 1; padding: 0; }
.gs-chip-remove:hover { color: var(--bs-danger); }

.gs-file-input { position: relative; overflow: hidden; cursor: pointer; }
.gs-file-input input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---- Feedback widgets ---- */
.gs-flash-data { display: none; }
.gs-pre { white-space: pre-wrap; word-break: break-word; }

/* Toasts (toastr) and confirmations (SweetAlert2) */
#toast-container > div {
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow);
  font-size: 0.8125rem;
  line-height: 1.5;
  opacity: 1;
  padding: 0.875rem 1rem 0.875rem 2.875rem;
  width: 340px;
  max-height: 45vh;
  overflow-y: auto;
  font-family: var(--gs-font-sans);
}
#toast-container > div:hover { box-shadow: var(--gs-shadow-raised); }
#toast-container > div { color: #ffffff; }
#toast-container > .toast-success { background-color: #00797a; }
#toast-container > .toast-info { background-color: #0f1716; }
#toast-container > .toast-warning { background-color: #b45f00; }
#toast-container > .toast-error { background-color: #a42423; }
#toast-container > div .toast-title { font-weight: 600; margin-bottom: 2px; }
#toast-container > div .toast-message { word-break: break-word; }
#toast-container > div .toast-progress { opacity: 0.35; }
#toast-container .toast-close-button { opacity: 0.85; font-weight: 400; }
#toast-container.toast-bottom-right { right: 20px; bottom: 20px; }

.swal2-popup.gs-swal {
  background: var(--gs-surface);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--bs-box-shadow);
  font-family: inherit;
  padding: 1.5rem 1.5rem 1.25rem;
  width: min(440px, calc(100vw - 32px));
}
.swal2-popup.gs-swal .swal2-icon { width: 3rem; height: 3rem; margin: 0 auto 0.75rem; border-width: 3px; }
.swal2-popup.gs-swal .swal2-icon .swal2-icon-content { font-size: 1.7rem; }
.swal2-popup.gs-swal .swal2-html-container,
.swal2-popup.gs-swal .swal2-title { color: var(--bs-body-color); font-size: 0.875rem; line-height: 1.6; margin: 0; padding: 0 0.25rem; }
.swal2-popup.gs-swal .swal2-actions { gap: 0.5rem; margin-top: 1.125rem; width: 100%; }
/* Confirm is the filled action, cancel a neutral outline: never the same look. */
.swal2-popup.gs-swal .swal2-confirm,
.swal2-popup.gs-swal .swal2-cancel { border-radius: var(--bs-border-radius-sm); font-size: 0.8125rem; font-weight: 600; margin: 0; min-width: 8.25rem; box-shadow: none; }
.swal2-popup.gs-swal .swal2-close { color: var(--bs-secondary-color); }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .gs-app { padding: 0.5rem; }
  .gs-main { min-height: calc(100vh - 1rem); border-radius: 1.75rem; }
  .gs-sidebar { border-radius: 0 1.75rem 1.75rem 0; }
  .gs-topbar-title h1 { font-size: 1.5rem; }
  .gs-auth-shell { grid-template-columns: 1fr; }
  .gs-auth-hero { display: none; }
  .gs-auth-panel { padding: 2.25rem 1.625rem; }
  .gs-search-trigger span, .gs-search-trigger kbd { display: none; }
  .gs-search-trigger { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  .gs-landing-links { display: none; }
  .gs-hero { padding: 3.25rem 0 2.5rem; }
  .gs-landing-footer-meta { text-align: left; }
}

@media (max-width: 575.98px) {
  .gs-page-head { flex-direction: column; align-items: stretch; }
  .gs-kpi-value { font-size: 3.25rem; }
  .gs-footer { flex-direction: column; }
  .gs-version-hero-facts { grid-template-columns: 1fr; }
  .gs-topbar { gap: 0.75rem; padding: 0.5rem 0.5rem 0; }
  .gs-topbar-actions { gap: 0.375rem; margin-left: 0; }
  .gs-content { padding: 0.5rem; }
  .gs-hero-facts li { flex: 1 1 44%; }
  .gs-cta { padding: 1.375rem; }
  #toast-container > div { width: calc(100vw - 32px); }
  #toast-container.toast-bottom-right { right: 16px; bottom: 16px; }
}

/* ---- Stat cards and bar chart (WAF, vulnerability and report pages) ---- */
.gs-stat {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.1rem 1.15rem;
  background: var(--gs-surface);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--gs-shadow-panel);
}
.gs-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.gs-stat-label { font-family: var(--gs-font-mono); font-size: 0.6875rem; font-weight: 500; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: 0.08em; }
.gs-stat-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 0.75rem; background: var(--gs-accent); color: var(--bs-primary-text-emphasis); }
.gs-stat-icon--success { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.gs-stat-icon--info { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.gs-stat-icon--warning { background: rgba(var(--gs-highlight-rgb), 0.14); color: var(--bs-warning-text-emphasis); }
.gs-stat-icon svg { width: 1.0625rem; height: 1.0625rem; }
.gs-stat-value { margin-top: 0.7rem; font-size: 2rem; font-weight: 300; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.gs-stat-unit { font-size: 0.875rem; font-weight: 500; color: var(--bs-secondary-color); margin-left: 0.2rem; letter-spacing: 0; }
.gs-stat-hint { color: var(--bs-secondary-color); font-size: 0.75rem; margin-top: 0.2rem; }

.gs-waf-value { font-size: 1.6rem; font-weight: 300; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }

.gs-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.6rem; height: 200px; padding-top: 0.5rem; }
.gs-chart-col { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 0.35rem; height: 100%; min-width: 0; }
.gs-chart-plot { display: flex; align-items: flex-end; justify-content: center; gap: 3px; flex: 1; width: 100%; }
.gs-chart-bar { min-height: 3px; border-radius: 5px 5px 2px 2px; transition: height 0.35s ease; }
.gs-chart-bar--total { width: 60%; max-width: 26px; background: color-mix(in srgb, var(--gs-ink) 82%, transparent); }
.gs-chart-bar--errors { width: 22%; max-width: 10px; background: var(--gs-highlight); }
.gs-chart-label { font-family: var(--gs-font-mono); font-size: 0.625rem; color: var(--bs-secondary-color); white-space: nowrap; }
.gs-chart-value { font-family: var(--gs-font-mono); font-size: 0.6875rem; font-weight: 500; color: var(--bs-body-color); }

.card .list-group,
.card .list-group .list-group-item { background-color: var(--bs-card-bg); }

/* The outbox detail page is where a message is actually read, so it gets the
   viewport instead of the 340px clamp used by previews. */
.gs-email-preview-body--tall { max-height: min(72vh, 900px); font-size: 0.8125rem; }

/* Collapsible timeline entries (WAF docs and older pages). */
.gs-timeline-details { border-bottom: 1px dashed var(--bs-border-color); }
.gs-timeline-summary { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; padding: 0.5rem 0; font-size: 0.72rem; cursor: pointer; list-style: none; border-radius: 0.5rem; }
.gs-timeline-summary::-webkit-details-marker { display: none; }
.gs-timeline-summary:hover .gs-timeline-title { color: var(--bs-link-color); }
.gs-timeline-summary:focus-visible { outline: 2px solid var(--bs-link-color); outline-offset: 2px; }
.gs-timeline-title { font-size: 0.84rem; font-weight: 600; }
.gs-timeline-chevron { width: 16px; height: 16px; margin-left: auto; transition: transform 0.15s ease; }
.gs-timeline-details[open] .gs-timeline-chevron { transform: rotate(180deg); }
.gs-timeline-item:last-child .gs-timeline-details { border-bottom: 0; }

/* ---- Govps server management ---- */
/* Layout helpers for the server pages: a main column with a narrow aside, and
   evenly divided form grids. Bootstrap's row/col classes need markup wrappers
   around every child, which reads poorly in the long nginx and firewall forms. */
.gs-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.gs-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; align-items: start; }
.gs-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.gs-cols-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: start; }
@media (max-width: 1199.98px) {
  .gs-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 991.98px) {
  .gs-cols-3, .gs-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .gs-cols-2, .gs-cols-3, .gs-cols-4 { grid-template-columns: minmax(0, 1fr); }
}

/* Bootstrap swaps the light and dark ramps in dark mode, which leaves
   text-bg-dark white on white. Pin the contrast for each theme. */
.badge.text-bg-dark { --bs-dark-rgb: 33, 37, 41; }
[data-bs-theme="dark"] .badge.text-bg-dark { --bs-dark-rgb: 222, 226, 230; color: #16181d !important; }

/* Inline rule builder: five fields plus the submit button. */
.gs-rule-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 0.75rem; align-items: end; }
@media (max-width: 991.98px) {
  .gs-rule-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .gs-rule-form { grid-template-columns: minmax(0, 1fr); }
}

/* Tables that would otherwise crush their columns on a narrow screen. */
.gs-table-wide { min-width: 900px; }

/* File manager */
.gs-table-wide .gs-row-actions, .table .gs-row-actions { flex-wrap: nowrap; }
.gs-file-cell { display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.gs-file-cell > div { display: flex; flex-direction: column; min-width: 0; }
.gs-file-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 0.5rem;
  background: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  flex: none;
}
.gs-file-icon svg { width: 1rem; height: 1rem; }
.gs-file-icon--dir { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }

/* File editor: the textarea fills the card and the action bar sticks to it. */
.code-editor-form { display: flex; flex-direction: column; }
.code-editor {
  width: 100%;
  min-height: 420px;
  padding: 1rem 1.125rem;
  border: 0;
  border-radius: 0;
  resize: vertical;
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  font-family: var(--gs-font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  tab-size: 4;
  outline: none;
}
.code-editor__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}
.file-preview {
  margin: 0;
  max-height: 70vh;
  overflow: auto;
  padding: 1rem 1.25rem;
  border-radius: 0;
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  font-family: var(--gs-font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Command output and generated configuration */
.config-output,
.log-output {
  margin: 0;
  padding: 1rem 1.25rem;
  border-radius: 0;
  max-height: 440px;
  overflow: auto;
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  font-family: var(--gs-font-mono);
  font-size: 0.75rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.table-responsive + .log-output,
.card > .log-output { border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius); }

/* SQL studio */
.sql-editor { min-height: 190px; resize: vertical; }
.sql-result td { max-width: 420px; white-space: pre-wrap; word-break: break-word; }
.null-cell { color: var(--bs-secondary-color); font-style: italic; }

/* Terminal */
.terminal {
  margin: 0;
  padding: 1rem 1.125rem 0.75rem;
  background: #0b1110;
  color: #d5e2df;
  border-top: 1px solid #1e2a28;
  font-family: var(--gs-font-mono);
  font-size: 0.78rem;
}
.terminal__output {
  margin: 0 0 0.625rem;
  padding: 0;
  background: transparent;
  color: inherit;
  min-height: 340px;
  max-height: 52vh;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: inherit;
}
.terminal__prompt-line { display: flex; align-items: center; gap: 0.5rem; border-top: 1px dashed #1e2a28; padding-top: 0.625rem; }
.terminal__prompt { color: #4cc3c4; font-weight: 700; }
.terminal__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: #ecf2f0;
  font-family: var(--gs-font-mono);
  font-size: 0.78rem;
  caret-color: #19a3a4;
}
.terminal__input::placeholder { color: #4f5f5c; }
.terminal__run { border-color: #2c3a37; background: #141d1b; color: #c0ebd7; }
.terminal__run:hover { background: #17223c; color: #ecf2f0; }
.terminal__footer { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.625rem; font-size: 0.66rem; color: #6b7c78; }

/* Network pages */
.addr-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.375rem; }
.addr-list li { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.rule-expr { display: flex; flex-wrap: wrap; gap: 0.375rem; font-family: var(--gs-font-mono); font-size: 0.72rem; color: var(--bs-secondary-color); }
.rule-expr span { background: var(--bs-tertiary-bg); border-radius: 0.375rem; padding: 0.06rem 0.375rem; }

/* Long-running job dialogs (certificates, email test) */
.swal2-popup.gs-swal .gs-form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; text-align: left; }
.swal2-popup.gs-swal .gs-form__lead { margin: 0; font-size: 0.8125rem; color: var(--bs-secondary-color); }
.swal2-popup.gs-swal .gs-form__field { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.75rem; font-weight: 600; }
.swal2-popup.gs-swal .gs-form__field .swal2-input { margin: 0; width: 100%; }
.swal2-popup.gs-swal .gs-form__check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; font-weight: 500; }
.swal2-popup.gs-swal .gs-form__hint { margin: 0; font-size: 0.72rem; color: var(--bs-secondary-color); }
.swal2-popup.gs-swal .gs-progress { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.75rem; }
.swal2-popup.gs-swal .gs-progress__track { height: 6px; border-radius: 999px; background: var(--bs-tertiary-bg); overflow: hidden; }
.swal2-popup.gs-swal .gs-progress__bar { display: block; height: 100%; border-radius: inherit; background: var(--bs-primary); transition: width 0.3s ease; }
.swal2-popup.gs-swal .gs-progress__stage { margin: 0; font-size: 0.8125rem; font-weight: 600; }
.swal2-popup.gs-swal .gs-progress__hint { margin: 0; font-size: 0.72rem; color: var(--bs-secondary-color); }
.swal2-popup.gs-swal--progress .swal2-actions { display: none; }

/* Alerts use the same inline icon language as the auth screens. */
.alert > svg { flex: none; width: 1.0625rem; height: 1.0625rem; margin-top: 0.1rem; }

/* CVE Watch severity palette. */
.gs-sev { display: inline-flex; align-items: center; gap: .25rem; font-weight: 600; letter-spacing: .02em; }
.gs-sev--critical { background: #7f1d1d !important; color: #fff !important; }
.gs-sev--high { background: #dc2626 !important; color: #fff !important; }
.gs-sev--medium { background: #f59e0b !important; color: #1f1300 !important; }
.gs-sev--low { background: #0284c7 !important; color: #fff !important; }
.gs-sev--unknown { background: #6b7280 !important; color: #fff !important; }
.gs-sev-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.gs-sev-card { display: block; padding: .85rem 1rem; border-radius: var(--bs-border-radius-lg); border: 1px solid var(--bs-border-color);
  border-left-width: 5px; background: var(--bs-body-bg); color: inherit; text-decoration: none; }
.gs-sev-card:hover { background: var(--bs-tertiary-bg); }
.gs-sev-card.is-active { box-shadow: 0 0 0 2px var(--bs-primary); }
.gs-sev-card--critical { border-left-color: #7f1d1d; }
.gs-sev-card--high { border-left-color: #dc2626; }
.gs-sev-card--medium { border-left-color: #f59e0b; }
.gs-sev-card--low { border-left-color: #0284c7; }
.gs-sev-card--unknown { border-left-color: #6b7280; }
.gs-sev-card__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); }
.gs-sev-card__count { font-size: 1.6rem; font-weight: 700; line-height: 1.2; }
.gs-cve-preview summary { cursor: pointer; list-style: none; }
.gs-cve-preview summary::-webkit-details-marker { display: none; }
.gs-cve-preview summary::after { content: " ▸ preview"; color: var(--bs-link-color); font-size: .8rem; }
.gs-cve-preview[open] summary::after { content: " ▾ hide"; }
.gs-cve-preview__body { margin-top: .5rem; padding: .6rem .75rem; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); }

/* Mars Green cards are 22px panels: full-bleed blocks at the bottom of a card
   (terminal, command output, file editor) follow the inner radius. */
.card > :is(.terminal, .log-output, .config-output, .file-preview, .code-editor-form):last-child,
.card > .code-editor-form:last-child .code-editor__bar,
.table-responsive + .log-output {
  border-bottom-left-radius: var(--bs-card-inner-border-radius);
  border-bottom-right-radius: var(--bs-card-inner-border-radius);
}
/* Long paths in a card header badge (terminal cwd, file paths) truncate. */
.card-header > .badge.font-monospace { max-width: min(48%, 420px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Honeypot ------------------------------------------------------------ */
.gs-hp-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; counter-reset: none; }
.gs-hp-flow > li { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.75rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg); background: var(--bs-tertiary-bg); position: relative; }
.gs-hp-flow > li strong { display: block; font-size: 0.875rem; }
.gs-hp-flow > li small { display: block; color: var(--bs-secondary-color); font-size: 0.75rem; line-height: 1.45; margin-top: 0.15rem; }
.gs-hp-flow__step { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--gs-font-mono); font-size: 0.75rem; font-weight: 600; background: var(--gs-ink); color: var(--gs-ink-fg); }
@media (max-width: 991.98px) { .gs-hp-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .gs-hp-flow { grid-template-columns: minmax(0, 1fr); } }
.gs-hp-score { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; height: 2.75rem; padding: 0 0.6rem; border-radius: 999px; font-family: var(--gs-font-mono); font-size: 1.05rem; font-weight: 600; background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); }
.gs-hp-pre { color: var(--bs-body-color); white-space: pre-wrap; word-break: break-all; font-size: 0.75rem; max-height: 16rem; overflow: auto; padding: 0.75rem; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); }
.gs-hp-pre--tall { max-height: 28rem; }
.gs-hp-actions { list-style: none; margin: 0.35rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.75rem; color: var(--bs-secondary-color); }
.gs-hp-actions li { display: flex; align-items: center; gap: 0.45rem; }
.gs-hp-actions .badge { min-width: 4.6rem; }
.gs-nav-status { margin-left: auto; display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.6875rem; font-weight: 500; color: var(--gs-sidebar-muted); }
.gs-nav-status::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 999px; background: currentColor; }
.gs-nav-status--ok::before { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
.gs-nav-status--down::before { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }

/* Mini sidebar with text labels (Settings → Mini sidebar). */
.gs-rail-label { display: none; }
.gs-rail-col--labels .gs-rail { padding: 0.5rem 0.35rem; }
.gs-rail-col--labels .gs-rail-item { width: 100%; height: auto; min-height: 48px; padding: 0.4rem 0.15rem; gap: 0.2rem; align-content: center; }
.gs-rail-col--labels .gs-rail-label { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.5625rem; font-weight: 600; line-height: 1.1; letter-spacing: 0.01em; }
.gs-rail-col--labels .gs-rail-item.is-active::before { left: -0.35rem; }
.gs-rail-col--labels .gs-rail-prefs { width: 100%; }
.gs-rail-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.75rem; }
.gs-rail-color { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg); }
.gs-rail-color .form-control-color { flex: none; width: 2.75rem; height: 2.25rem; padding: 0.2rem; }

/* Collapsible raw output at the bottom of a card (nftables, firewall). */
.gs-collapse { border-top: 1px solid var(--bs-border-color); }
.gs-collapse > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.85rem var(--bs-card-spacer-x);
  font-size: 0.8125rem; font-weight: 600; cursor: pointer; list-style: none;
  border-radius: 0 0 var(--bs-card-border-radius) var(--bs-card-border-radius);
  transition: background-color 0.15s ease;
}
.gs-collapse > summary::-webkit-details-marker { display: none; }
.gs-collapse > summary:hover { background: var(--bs-tertiary-bg); }
.gs-collapse > summary:focus-visible { outline: 2px solid var(--bs-link-color); outline-offset: -2px; }
.gs-collapse[open] > summary { border-radius: 0; }
.gs-collapse-chevron { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--bs-secondary-color); transition: transform 0.2s ease; }
.gs-collapse[open] .gs-collapse-chevron { transform: rotate(180deg); }
.gs-collapse > pre { margin: 0 var(--bs-card-spacer-x) var(--bs-card-spacer-y); }

/* Two-factor setup: QR code beside the steps and setup key. */
.gs-2fa-setup { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; }
.gs-2fa-qr { flex: none; width: 208px; height: 208px; padding: 8px; border-radius: 14px; background: #ffffff; border: 1px solid var(--bs-border-color); image-rendering: pixelated; }
.gs-2fa-setup > div { flex: 1 1 16rem; }
.gs-2fa-steps { padding-left: 1.1rem; font-size: 0.8125rem; color: var(--bs-secondary-color); display: flex; flex-direction: column; gap: 0.25rem; }

/* Sign-in code page: the "didn't get the code?" alternative. */
.gs-otp-alt { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--bs-border-color); }
.gs-otp-alt > summary { cursor: pointer; font-size: 0.875rem; font-weight: 600; color: var(--bs-link-color); }
.gs-2fa-method.is-active { border-color: color-mix(in srgb, var(--bs-success) 55%, var(--bs-border-color)); }
.gs-bars--wide li { grid-template-columns: 6.5rem minmax(0, 1fr) 4.75rem; }

/* Mobile sidebar close: the dialog's × button in sidebar colours, centred on
   the brand row so it clears the rounded corner. */
.gs-sidebar .offcanvas-header { position: absolute; top: 1.125rem; right: 0.875rem; z-index: 3; padding: 0; }
.gs-sidebar-close { width: 2rem; height: 2rem; font-size: 1.375rem; color: var(--gs-sidebar-muted); }
.gs-sidebar-close:hover { background: color-mix(in srgb, var(--gs-sidebar-text-strong) 10%, transparent); color: var(--gs-sidebar-text-strong); }
.gs-sidebar-close:focus { outline: 0; box-shadow: none; }
.gs-sidebar-close:focus-visible { outline: 1px solid var(--gs-sidebar-text-strong); outline-offset: 1px; }
@media (max-width: 991.98px) { .gs-sidebar .gs-brand { padding-right: 2.75rem; } }
