/* GoSkeleton Solar — Botanical Sage & Warm Stone Design System (Bootstrap 5 layer).
 *
 * Self-hosted Figtree + JetBrains Mono typography, warm alabaster-stone canvas,
 * pure crisp white rounded bento cards, floating white vertical pill rail with
 * deep charcoal active indicators, and botanical sage-pine accents.
 */

/* ---- Self-hosted fonts (CSP font-src 'self') ---- */
@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: Solar Sage (default / 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;

  /* Solar Sage core tokens */
  --gs-page: #eae9e4;
  --gs-rail: #1f352b;
  --gs-rail-brand-bg: #527362;
  --gs-rail-brand-fg: #ffffff;
  --gs-rail-icon: rgba(255, 255, 255, 0.68);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(255, 255, 255, 0.16);
  --gs-rail-hover-bg: rgba(255, 255, 255, 0.12);
  --gs-rail-hover-fg: #ffffff;
  --gs-rail-accent: #7de0b0;
  --gs-rail-marker: #7de0b0;
  --gs-ink: #18191b;
  --gs-ink-fg: #ffffff;
  --gs-panel: #eae9e4;
  --gs-surface: #ffffff;
  --gs-surface-muted: #f5f4f0;
  --gs-input: #dfddd6;
  --gs-accent: #edf2ee;
  --gs-brand: #527362;
  --gs-brand-light: #789888;
  --gs-brand-dark: #3f5d4e;
  --gs-brand-fg: #ffffff;
  --gs-primary-fg: #ffffff;
  --gs-primary-hover: color-mix(in srgb, var(--bs-primary) 88%, #000);
  --gs-primary-active: color-mix(in srgb, var(--bs-primary) 78%, #000);
  --gs-sage-grad: linear-gradient(135deg, #7e9b8c 0%, #557666 52%, #436152 100%);
  --gs-sand: #f0eadc;
  --gs-sand-fg: #8c7853;
  --gs-highlight: #e0654a;
  --gs-highlight-rgb: 224, 101, 74;
  --gs-highlight-fg: #ffffff;
  --gs-soft: #e6f1eb;
  --gs-soft-fg: #3b6953;
  --gs-coral-bg: #fbeae7;
  --gs-coral-fg: #c25548;
  --gs-shadow-panel: 0 2px 14px rgb(24 30 26 / 0.035), 0 1px 2px rgb(24 30 26 / 0.03);
  --gs-shadow-raised: 0 12px 32px -12px rgb(20 28 24 / 0.14), 0 2px 6px rgb(20 28 24 / 0.04);
  --gs-shadow-control: 0 2px 8px rgb(24 30 26 / 0.04);

  --gs-auth-glow-1: #dce7e0;
  --gs-auth-glow-2: #efe6d4;
  --gs-auth-base: #eae9e4;
  --gs-hero-from: #2c4337;
  --gs-hero-via: #466556;
  --gs-hero-to: #6e8d7d;
  --gs-hero-soft: #dcebe2;
  --gs-hero-muted: #b7cfc2;
  --gs-hero-text: #eef5f0;
  --gs-toast-primary: #4b6c5b;
  --gs-chart-total: #527362;
  --gs-chart-errors: #e0654a;
  --gs-table-head-bg: transparent;
  --gs-row-hover: #f7f6f2;
  --gs-mark-from: #688877;
  --gs-mark-to: #466656;

  --bs-body-font-family: var(--gs-font-sans);
  --bs-body-font-size: 0.875rem;
  --bs-body-line-height: 1.55;
  --bs-body-bg: #eae9e4;
  --bs-body-color: #181a19;
  --bs-body-color-rgb: 24, 26, 25;
  --bs-emphasis-color: #141615;
  --bs-emphasis-color-rgb: 20, 22, 21;
  --bs-secondary-color: #7b807d;
  --bs-secondary-color-rgb: 123, 128, 125;
  --bs-secondary-bg: #f5f4f0;
  --bs-secondary-bg-rgb: 245, 244, 240;
  --bs-tertiary-bg: #ecebe6;
  --bs-tertiary-bg-rgb: 236, 235, 230;
  --bs-border-color: #e4e2dc;
  --bs-border-color-translucent: rgba(24, 26, 25, 0.06);
  --bs-heading-color: #181a19;

  --bs-link-color: #4b6d5c;
  --bs-link-color-rgb: 75, 109, 92;
  --bs-link-hover-color: #365244;
  --bs-link-hover-color-rgb: 54, 82, 68;

  --bs-primary: #527362;
  --bs-primary-rgb: 82, 115, 98;
  --bs-primary-text-emphasis: #355243;
  --bs-primary-bg-subtle: #e9f1ec;
  --bs-primary-border-subtle: #cfe0d6;
  --bs-secondary: #757a77;
  --bs-secondary-rgb: 117, 122, 119;
  --bs-secondary-text-emphasis: #444846;
  --bs-secondary-bg-subtle: #eeede8;
  --bs-secondary-border-subtle: #dfddd6;
  --bs-success: #4b7c63;
  --bs-success-rgb: 75, 124, 99;
  --bs-success-text-emphasis: #2e5742;
  --bs-success-bg-subtle: #e6f1eb;
  --bs-success-border-subtle: #cde3d6;
  --bs-info: #4b6d94;
  --bs-info-rgb: 75, 109, 148;
  --bs-info-text-emphasis: #2c4a6b;
  --bs-info-bg-subtle: #ebf1f8;
  --bs-info-border-subtle: #d1dfee;
  --bs-warning: #c88636;
  --bs-warning-rgb: 200, 134, 54;
  --bs-warning-text-emphasis: #7d5019;
  --bs-warning-bg-subtle: #faf1e2;
  --bs-warning-border-subtle: #efd8b3;
  --bs-danger: #c25548;
  --bs-danger-rgb: 194, 85, 72;
  --bs-danger-text-emphasis: #8e362c;
  --bs-danger-bg-subtle: #fbeae7;
  --bs-danger-border-subtle: #f2ccc6;
  --bs-light: #f6f5f1;
  --bs-light-rgb: 246, 245, 241;
  --bs-dark: #18191b;
  --bs-dark-rgb: 24, 25, 27;

  --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(82, 115, 98, 0.28);
  color-scheme: light;
}

[data-bs-theme="dark"] {
  --gs-page: #111312;
  --gs-rail: #14221c;
  --gs-rail-brand-bg: #527362;
  --gs-rail-brand-fg: #ffffff;
  --gs-rail-icon: rgba(214, 232, 222, 0.68);
  --gs-rail-icon-active: #eef6f1;
  --gs-rail-active-bg: rgba(136, 216, 176, 0.18);
  --gs-rail-hover-bg: rgba(136, 216, 176, 0.12);
  --gs-rail-hover-fg: #eef6f1;
  --gs-rail-accent: #88d8b0;
  --gs-rail-marker: #88d8b0;
  --gs-ink: #eef2ef;
  --gs-ink-fg: #121513;
  --gs-panel: #111312;
  --gs-surface: #1a1d1b;
  --gs-surface-muted: #151816;
  --gs-input: #2c322f;
  --gs-accent: #222a26;
  --gs-brand: #7ca38f;
  --gs-brand-light: #97baa8;
  --gs-brand-dark: #4c6c5c;
  --gs-brand-fg: #0e1612;
  --gs-primary-fg: #0e1612;
  --gs-sage-grad: linear-gradient(135deg, #5d7e6d 0%, #3d5a4b 55%, #2b4236 100%);
  --gs-sand: #2c2820;
  --gs-sand-fg: #d9c59d;
  --gs-highlight: #e57a62;
  --gs-highlight-rgb: 229, 122, 98;
  --gs-highlight-fg: #1b0b08;
  --gs-soft: #1e3328;
  --gs-soft-fg: #b2dcc5;
  --gs-coral-bg: #361e1a;
  --gs-coral-fg: #f3a194;
  --gs-shadow-panel: 0 2px 12px rgb(0 0 0 / 0.32), 0 1px 2px rgb(0 0 0 / 0.25);
  --gs-shadow-raised: 0 14px 36px -12px rgb(0 0 0 / 0.65), 0 2px 6px rgb(0 0 0 / 0.4);
  --gs-shadow-control: 0 1px 4px rgb(0 0 0 / 0.28);
  --gs-auth-glow-1: #1a2c23;
  --gs-auth-glow-2: #282218;
  --gs-auth-base: #111312;
  --gs-chart-total: #88ad9a;
  --gs-chart-errors: #e57a62;
  --gs-row-hover: #212523;

  --bs-body-bg: #111312;
  --bs-body-color: #eef2ef;
  --bs-body-color-rgb: 238, 242, 239;
  --bs-emphasis-color: #ffffff;
  --bs-emphasis-color-rgb: 255, 255, 255;
  --bs-secondary-color: #939d97;
  --bs-secondary-color-rgb: 147, 157, 151;
  --bs-secondary-bg: #202422;
  --bs-secondary-bg-rgb: 32, 36, 34;
  --bs-tertiary-bg: #252a27;
  --bs-tertiary-bg-rgb: 37, 42, 39;
  --bs-border-color: #292f2c;
  --bs-border-color-translucent: rgba(255, 255, 255, 0.07);
  --bs-heading-color: #f2f5f3;

  --bs-link-color: #8bb49f;
  --bs-link-color-rgb: 139, 180, 159;
  --bs-link-hover-color: #aed0be;
  --bs-link-hover-color-rgb: 174, 208, 190;

  --bs-primary: #7ca38f;
  --bs-primary-rgb: 124, 163, 143;
  --bs-primary-text-emphasis: #c2e0d0;
  --bs-primary-bg-subtle: #1d2d24;
  --bs-primary-border-subtle: #2e483a;
  --bs-secondary: #939d97;
  --bs-secondary-rgb: 147, 157, 151;
  --bs-secondary-text-emphasis: #cdd5d0;
  --bs-secondary-bg-subtle: #232825;
  --bs-secondary-border-subtle: #313834;
  --bs-success: #6fb28f;
  --bs-success-rgb: 111, 178, 143;
  --bs-success-text-emphasis: #b9e4cd;
  --bs-success-bg-subtle: #1a3024;
  --bs-success-border-subtle: #294c39;
  --bs-info: #7fa7d6;
  --bs-info-rgb: 127, 167, 214;
  --bs-info-text-emphasis: #c2d9f5;
  --bs-info-bg-subtle: #192638;
  --bs-info-border-subtle: #293e5c;
  --bs-warning: #e0a756;
  --bs-warning-rgb: 224, 167, 86;
  --bs-warning-text-emphasis: #f5d39f;
  --bs-warning-bg-subtle: #2e2313;
  --bs-warning-border-subtle: #4d391e;
  --bs-danger: #e57a62;
  --bs-danger-rgb: 229, 122, 98;
  --bs-danger-text-emphasis: #f5b4a6;
  --bs-danger-bg-subtle: #331b17;
  --bs-danger-border-subtle: #542c25;
  --bs-light: #202422;
  --bs-light-rgb: 32, 36, 34;
  --bs-dark: #eef2ef;
  --bs-dark-rgb: 238, 242, 239;
  --bs-focus-ring-color: rgba(124, 163, 143, 0.35);
  color-scheme: dark;
}

/* ---- Palette: Mars Red (Terracotta Rose) ---- */
:root:not([data-bs-theme="dark"])[data-palette="mars-red"],
[data-bs-theme="light"][data-palette="mars-red"] {
  --gs-page: #ede8e6;
  --gs-rail: #471117;
  --gs-rail-brand-bg: #b84a54;
  --gs-rail-brand-fg: #ffffff;
  --gs-rail-icon: rgba(255, 255, 255, 0.7);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(255, 255, 255, 0.16);
  --gs-rail-accent: #ff7b84;
  --gs-rail-marker: #ff7b84;
  --gs-accent: #f7ebeb;
  --gs-brand: #a8424b;
  --gs-brand-light: #c96972;
  --gs-brand-dark: #852e36;
  --gs-sage-grad: linear-gradient(135deg, #c66f77 0%, #9b3d46 55%, #7d2c34 100%);
  --gs-soft: #f7e6e7;
  --gs-soft-fg: #7e252e;
  --gs-hero-from: #3b171b;
  --gs-hero-via: #782a32;
  --gs-hero-to: #b14d56;
  --gs-toast-primary: #9b3d46;
  --bs-body-bg: #ede8e6;
  --gs-panel: #ede8e6;
  --bs-link-color: #9b3d46;
  --bs-link-hover-color: #782a32;
  --bs-primary: #a8424b;
  --bs-primary-rgb: 168, 66, 75;
  --bs-primary-text-emphasis: #6e1f26;
  --bs-primary-bg-subtle: #f7e6e7;
  --bs-primary-border-subtle: #ecc5c9;
}
[data-bs-theme="dark"][data-palette="mars-red"] {
  --gs-rail: #2b1013;
  --gs-rail-brand-bg: #a8424b;
  --gs-rail-brand-fg: #ffffff;
  --gs-rail-icon: rgba(247, 214, 217, 0.7);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(242, 107, 116, 0.2);
  --gs-rail-hover-bg: rgba(242, 107, 116, 0.14);
  --gs-rail-accent: #f26b74;
  --gs-rail-marker: #f26b74;
  --gs-brand: #df7780;
  --gs-sage-grad: linear-gradient(135deg, #a64b54 0%, #7d2f37 55%, #591e25 100%);
  --bs-primary: #df7780;
  --bs-primary-rgb: 223, 119, 128;
  --bs-link-color: #ea9199;
}

/* ---- Palette: Mars Orange (Warm Amber) ---- */
:root:not([data-bs-theme="dark"])[data-palette="mars-orange"],
[data-bs-theme="light"][data-palette="mars-orange"] {
  --gs-page: #eeeae4;
  --gs-rail: #4a2007;
  --gs-rail-brand-bg: #c9722c;
  --gs-rail-brand-fg: #ffffff;
  --gs-rail-icon: rgba(255, 255, 255, 0.72);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(255, 255, 255, 0.16);
  --gs-rail-accent: #ff9e44;
  --gs-rail-marker: #ff9e44;
  --gs-accent: #f8efe6;
  --gs-brand: #b86628;
  --gs-brand-light: #d68b4e;
  --gs-brand-dark: #944d19;
  --gs-sage-grad: linear-gradient(135deg, #d68f52 0%, #b26124 55%, #8f4a16 100%);
  --gs-soft: #f9ecdf;
  --gs-soft-fg: #7a3e10;
  --gs-hero-from: #3d210d;
  --gs-hero-via: #7d4217;
  --gs-hero-to: #b86628;
  --gs-toast-primary: #b26124;
  --bs-body-bg: #eeeae4;
  --gs-panel: #eeeae4;
  --bs-link-color: #b26124;
  --bs-link-hover-color: #8c4816;
  --bs-primary: #b86628;
  --bs-primary-rgb: 184, 102, 40;
  --bs-primary-text-emphasis: #70380e;
  --bs-primary-bg-subtle: #f8efe6;
  --bs-primary-border-subtle: #edd4bc;
}
[data-bs-theme="dark"][data-palette="mars-orange"] {
  --gs-rail: #2b1507;
  --gs-rail-brand-bg: #b86628;
  --gs-rail-brand-fg: #ffffff;
  --gs-rail-icon: rgba(248, 224, 200, 0.72);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(247, 149, 59, 0.2);
  --gs-rail-hover-bg: rgba(247, 149, 59, 0.14);
  --gs-rail-accent: #f7953b;
  --gs-rail-marker: #f7953b;
  --gs-brand: #e39452;
  --gs-sage-grad: linear-gradient(135deg, #b5682a 0%, #8a4b19 55%, #61330e 100%);
  --bs-primary: #e39452;
  --bs-primary-rgb: 227, 148, 82;
  --bs-link-color: #edaa72;
}

/* ---- Palette: Mars Purple (Plum Slate) ---- */
:root:not([data-bs-theme="dark"])[data-palette="mars-purple"],
[data-bs-theme="light"][data-palette="mars-purple"] {
  --gs-page: #ebe9ee;
  --gs-rail: #271352;
  --gs-rail-brand-bg: #745ca8;
  --gs-rail-brand-fg: #ffffff;
  --gs-rail-icon: rgba(255, 255, 255, 0.7);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(255, 255, 255, 0.16);
  --gs-rail-accent: #b794ff;
  --gs-rail-marker: #b794ff;
  --gs-accent: #f0ecf8;
  --gs-brand: #6b549c;
  --gs-brand-light: #8e78bd;
  --gs-brand-dark: #523e7d;
  --gs-sage-grad: linear-gradient(135deg, #8e79bc 0%, #665096 55%, #4d3978 100%);
  --gs-soft: #eeeaf7;
  --gs-soft-fg: #453170;
  --gs-hero-from: #221936;
  --gs-hero-via: #463470;
  --gs-hero-to: #725ba6;
  --gs-toast-primary: #665096;
  --bs-body-bg: #ebe9ee;
  --gs-panel: #ebe9ee;
  --bs-link-color: #665096;
  --bs-link-hover-color: #4d3978;
  --bs-primary: #6b549c;
  --bs-primary-rgb: 107, 84, 156;
  --bs-primary-text-emphasis: #3f2d69;
  --bs-primary-bg-subtle: #f0ecf8;
  --bs-primary-border-subtle: #d8cdf0;
}
[data-bs-theme="dark"][data-palette="mars-purple"] {
  --gs-rail: #1c1038;
  --gs-rail-brand-bg: #6b549c;
  --gs-rail-brand-fg: #ffffff;
  --gs-rail-icon: rgba(226, 217, 245, 0.72);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(169, 134, 247, 0.22);
  --gs-rail-hover-bg: rgba(169, 134, 247, 0.14);
  --gs-rail-accent: #a986f7;
  --gs-rail-marker: #a986f7;
  --gs-brand: #a38ed6;
  --gs-sage-grad: linear-gradient(135deg, #745ca8 0%, #523d82 55%, #37275c 100%);
  --bs-primary: #a38ed6;
  --bs-primary-rgb: 163, 142, 214;
  --bs-link-color: #b7a5e3;
}

/* ---- Palette: Mars Blue (Nordic Slate) ---- */
:root:not([data-bs-theme="dark"])[data-palette="mars-blue"],
[data-bs-theme="light"][data-palette="mars-blue"] {
  --gs-page: #e8ebee;
  --gs-rail: #0f295e;
  --gs-rail-brand-bg: #1d5ed6;
  --gs-rail-brand-fg: #ffffff;
  --gs-rail-icon: rgba(255, 255, 255, 0.7);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(255, 255, 255, 0.18);
  --gs-rail-accent: #6ea3ff;
  --gs-rail-marker: #6ea3ff;
  --gs-accent: #eaf0f7;
  --gs-brand: #436996;
  --gs-brand-light: #6a8eb8;
  --gs-brand-dark: #315178;
  --gs-sage-grad: linear-gradient(135deg, #6b8fb8 0%, #446994 55%, #325075 100%);
  --gs-soft: #e6eff8;
  --gs-soft-fg: #284970;
  --gs-hero-from: #17273b;
  --gs-hero-via: #2d4c73;
  --gs-hero-to: #5278a6;
  --gs-toast-primary: #446994;
  --bs-body-bg: #e8ebee;
  --gs-panel: #e8ebee;
  --bs-link-color: #446994;
  --bs-link-hover-color: #2f4d70;
  --bs-primary: #436996;
  --bs-primary-rgb: 67, 105, 150;
  --bs-primary-text-emphasis: #264366;
  --bs-primary-bg-subtle: #eaf0f7;
  --bs-primary-border-subtle: #cbdbed;
}
[data-bs-theme="dark"][data-palette="mars-blue"] {
  --gs-rail: #0e1e42;
  --gs-rail-brand-bg: #2563eb;
  --gs-rail-brand-fg: #ffffff;
  --gs-rail-icon: rgba(210, 226, 245, 0.72);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(110, 163, 255, 0.22);
  --gs-rail-hover-bg: rgba(110, 163, 255, 0.14);
  --gs-rail-accent: #6ea3ff;
  --gs-rail-marker: #6ea3ff;
  --gs-brand: #7fa7d6;
  --gs-sage-grad: linear-gradient(135deg, #4f739e 0%, #36547a 55%, #233957 100%);
  --bs-primary: #7fa7d6;
  --bs-primary-rgb: 127, 167, 214;
  --bs-link-color: #9bbce3;
}

/* ---- Palette: Mars Black (Monochrome Stone) ---- */
:root:not([data-bs-theme="dark"])[data-palette="mars-black"],
[data-bs-theme="light"][data-palette="mars-black"] {
  --gs-page: #eaeae8;
  --gs-rail: #111214;
  --gs-rail-brand-bg: #ffffff;
  --gs-rail-brand-fg: #111214;
  --gs-rail-icon: rgba(255, 255, 255, 0.68);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(255, 255, 255, 0.18);
  --gs-rail-accent: #ffffff;
  --gs-rail-marker: #ffffff;
  --gs-accent: #eeeeec;
  --gs-brand: #252729;
  --gs-brand-light: #4e5256;
  --gs-brand-dark: #141517;
  --gs-sage-grad: linear-gradient(135deg, #4b4f53 0%, #272a2d 55%, #16181a 100%);
  --gs-soft: #ebebea;
  --gs-soft-fg: #252729;
  --gs-hero-from: #141517;
  --gs-hero-via: #2a2d30;
  --gs-hero-to: #464a4e;
  --gs-toast-primary: #252729;
  --bs-body-bg: #eaeae8;
  --gs-panel: #eaeae8;
  --bs-link-color: #252729;
  --bs-link-hover-color: #0e0f10;
  --bs-primary: #252729;
  --bs-primary-rgb: 37, 39, 41;
  --bs-primary-text-emphasis: #141517;
  --bs-primary-bg-subtle: #eeeeec;
  --bs-primary-border-subtle: #d6d6d2;
}
[data-bs-theme="dark"][data-palette="mars-black"] {
  --gs-rail: #141518;
  --gs-rail-brand-bg: #e4e6e8;
  --gs-rail-brand-fg: #121315;
  --gs-rail-icon: rgba(235, 237, 240, 0.68);
  --gs-rail-icon-active: #ffffff;
  --gs-rail-active-bg: rgba(244, 244, 245, 0.18);
  --gs-rail-hover-bg: rgba(244, 244, 245, 0.12);
  --gs-rail-accent: #f4f4f5;
  --gs-rail-marker: #f4f4f5;
  --gs-brand: #e4e6e8;
  --gs-brand-fg: #121315;
  --gs-primary-fg: #121315;
  --gs-sage-grad: linear-gradient(135deg, #3c3f44 0%, #232629 55%, #16181a 100%);
  --bs-primary: #e4e6e8;
  --bs-primary-rgb: 228, 230, 232;
  --bs-link-color: #e4e6e8;
}

/* ---- Mobile Drawer Sidebar Tokens ---- */
:root,
html[data-sidebar-theme="mint"] {
  --gs-sidebar-bg: var(--gs-surface);
  --gs-sidebar-solid: var(--gs-surface);
  --gs-sidebar-text: rgba(var(--bs-body-color-rgb), 0.72);
  --gs-sidebar-text-strong: var(--bs-body-color);
  --gs-sidebar-muted: var(--bs-secondary-color);
  --gs-sidebar-label: var(--bs-secondary-color);
  --gs-sidebar-border: var(--bs-border-color);
  --gs-sidebar-hover: var(--gs-surface-muted);
  --gs-sidebar-active-bg: var(--gs-ink);
  --gs-sidebar-active-fg: var(--gs-ink-fg);
  --gs-sidebar-card: var(--gs-surface-muted);
  --gs-sidebar-scroll: rgba(var(--bs-body-color-rgb), 0.16);
}
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: #181a19;
  --gs-sidebar-solid: #181a19;
  --gs-sidebar-text: rgba(240, 244, 241, 0.72);
  --gs-sidebar-text-strong: #ffffff;
  --gs-sidebar-muted: #98a39d;
  --gs-sidebar-label: #7e8a84;
  --gs-sidebar-border: rgba(255, 255, 255, 0.1);
  --gs-sidebar-hover: rgba(255, 255, 255, 0.08);
  --gs-sidebar-active-bg: rgba(255, 255, 255, 0.16);
  --gs-sidebar-active-fg: #ffffff;
  --gs-sidebar-card: rgba(255, 255, 255, 0.07);
  --gs-sidebar-scroll: rgba(255, 255, 255, 0.2);
}
html[data-sidebar-theme="teal"] {
  --gs-sidebar-bg: linear-gradient(170deg, #4b6c5b 0%, #375345 60%, #24382e 100%);
  --gs-sidebar-solid: #375345;
}
html[data-sidebar-theme="graphite"] {
  --gs-sidebar-bg: #252927;
  --gs-sidebar-solid: #252927;
}
html[data-sidebar-theme="ruby"] {
  --gs-sidebar-bg: linear-gradient(170deg, #7e2e36 0%, #5c1e25 60%, #3d1217 100%);
  --gs-sidebar-solid: #5c1e25;
}
html[data-sidebar-theme="blue"] {
  --gs-sidebar-bg: linear-gradient(170deg, #2d4c73 0%, #1f3756 60%, #14253b 100%);
  --gs-sidebar-solid: #1f3756;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--gs-page);
  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.02em;
  color: var(--bs-heading-color);
}
h1, h2 { font-size: 1.5rem; letter-spacing: -0.025em; }
h3 { font-size: 0.96rem; letter-spacing: -0.012em; }
h4 { font-size: 0.9375rem; }
h5 { font-size: 0.875rem; }
p { margin-bottom: 0; }
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: 2px 7px;
  border-radius: 7px;
  color: var(--bs-body-color);
}
kbd {
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding: 0 0.4rem;
  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.85rem 1rem;
  background: #181b19;
  color: #dce6e0;
  border-radius: 14px;
  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; }
.min-w-0 { min-width: 0; }

svg[viewBox] {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.swal2-icon svg { width: auto; height: auto; }

/* ---- Bootstrap Component Refinement ---- */
.btn {
  --bs-btn-font-size: 0.8125rem;
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: 0.55rem;
  --bs-btn-padding-x: 1.2rem;
  --bs-btn-border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease, border-color 0.16s ease;
}
.btn:active { transform: translateY(1px); }
.btn-sm {
  --bs-btn-font-size: 0.78rem;
  --bs-btn-padding-y: 0.36rem;
  --bs-btn-padding-x: 0.9rem;
  --bs-btn-border-radius: 0.65rem;
}
.btn-lg {
  --bs-btn-font-size: 0.9375rem;
  --bs-btn-padding-y: 0.72rem;
  --bs-btn-padding-x: 1.65rem;
  --bs-btn-border-radius: 0.875rem;
}
.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: var(--gs-primary-hover);
  --bs-btn-hover-border-color: var(--gs-primary-hover);
  --bs-btn-active-bg: var(--gs-primary-active);
  --bs-btn-active-border-color: var(--gs-primary-active);
  --bs-btn-disabled-bg: var(--bs-primary);
  --bs-btn-disabled-border-color: var(--bs-primary);
  --bs-btn-color: var(--gs-primary-fg);
  --bs-btn-hover-color: var(--gs-primary-fg);
  --bs-btn-active-color: var(--gs-primary-fg);
  --bs-btn-disabled-color: var(--gs-primary-fg);
  box-shadow: 0 4px 12px -4px rgba(var(--bs-primary-rgb), 0.42);
}
.btn-outline-primary {
  --bs-btn-color: var(--bs-primary);
  --bs-btn-bg: var(--gs-surface);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-color: var(--gs-primary-fg);
  --bs-btn-hover-bg: var(--bs-primary);
  --bs-btn-hover-border-color: var(--bs-primary);
  --bs-btn-active-color: var(--gs-primary-fg);
  --bs-btn-active-bg: var(--gs-primary-active);
  --bs-btn-active-border-color: var(--gs-primary-active);
}
.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) 86%, 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: 0 4px 12px -4px rgba(24, 25, 27, 0.25);
}
.gs-btn-sage {
  background: var(--gs-sage-grad);
  border: 0;
  color: #ffffff;
  border-radius: 0.75rem;
  padding: 0.62rem 1.35rem;
  font-weight: 600;
  font-size: 0.8125rem;
  box-shadow: 0 6px 16px -6px rgba(67, 97, 82, 0.55);
}
.gs-btn-sage:hover,
.gs-btn-sage:focus {
  color: #ffffff;
  filter: brightness(1.06);
  box-shadow: 0 8px 20px -6px rgba(67, 97, 82, 0.62);
}
.btn-outline-secondary,
.btn-light {
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-bg: var(--gs-surface);
  --bs-btn-border-color: var(--bs-border-color);
  --bs-btn-hover-bg: var(--gs-surface-muted);
  --bs-btn-hover-color: var(--bs-body-color);
  --bs-btn-hover-border-color: var(--gs-input);
  --bs-btn-active-bg: var(--gs-surface-muted);
  --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);
}
.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 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: none;
}
.form-control { padding: 0.55rem 0.9rem; }
.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); }
.form-control:focus,
.form-control:focus-visible,
.form-select:focus,
.form-select:focus-visible,
.form-check-input:focus,
.form-check-input:focus-visible,
.input-group:focus-within > .form-control,
.input-group:focus-within > .form-select {
  border-color: var(--gs-brand);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.12);
}
.form-control:focus, .form-select:focus { background-color: var(--gs-surface); }
.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.35rem; }
.form-check-input:hover { border-color: var(--bs-primary); }
.form-check-input:checked,
.form-check-input[type="checkbox"]:indeterminate {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}
.gs-check-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1.05rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--gs-surface-muted);
}
.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); }
.form-label { font-size: 0.8125rem; font-weight: 600; color: var(--bs-body-color); margin-bottom: 0.35rem; }
.form-text { font-size: 0.75rem; color: var(--bs-secondary-color); }
.form-check-label { font-size: 0.8125rem; }

/* ---- Soft Reference-Inspired Badges ---- */
.badge {
  --bs-badge-font-size: 0.72rem;
  --bs-badge-font-weight: 600;
  --bs-badge-padding-y: 0.28em;
  --bs-badge-padding-x: 0.72em;
  --bs-badge-border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.badge.text-bg-primary { color: var(--bs-primary-text-emphasis) !important; background-color: var(--bs-primary-bg-subtle) !important; border: 0; }
.badge.text-bg-secondary { color: var(--bs-secondary-text-emphasis) !important; background-color: var(--bs-secondary-bg-subtle) !important; border: 0; }
.badge.text-bg-success { color: var(--gs-soft-fg) !important; background-color: var(--gs-soft) !important; border: 0; }
.badge.text-bg-info { color: var(--bs-info-text-emphasis) !important; background-color: var(--bs-info-bg-subtle) !important; border: 0; }
.badge.text-bg-warning { color: var(--bs-warning-text-emphasis) !important; background-color: var(--bs-warning-bg-subtle) !important; border: 0; }
.badge.text-bg-danger { color: var(--gs-coral-fg) !important; background-color: var(--gs-coral-bg) !important; border: 0; }
.badge.text-bg-dark { color: var(--gs-ink-fg) !important; background-color: var(--gs-ink) !important; }
.badge.gs-badge-violet { color: var(--gs-ink-fg); background-color: var(--gs-ink); font-family: var(--gs-font-mono); font-weight: 500; }
.badge.gs-badge-highlight { color: var(--gs-coral-fg); background-color: var(--gs-coral-bg); }
.badge.gs-badge-soft { color: var(--gs-soft-fg); background-color: var(--gs-soft); }
.badge.gs-badge-coral { color: var(--gs-coral-fg); background-color: var(--gs-coral-bg); }
.badge.gs-badge-outline { color: var(--bs-body-color); background-color: var(--gs-surface); border: 1px solid var(--bs-border-color); }

.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); }

/* ---- Crisp Pure-White Bento Cards ---- */
.card {
  --bs-card-bg: var(--gs-surface);
  --bs-card-border-color: var(--bs-border-color-translucent);
  --bs-card-border-radius: 1.375rem;
  --bs-card-inner-border-radius: calc(1.375rem - 1px);
  --bs-card-spacer-y: 1.35rem;
  --bs-card-spacer-x: 1.4rem;
  --bs-card-cap-bg: transparent;
  --bs-card-cap-padding-y: 1.25rem;
  --bs-card-cap-padding-x: 1.4rem;
  box-shadow: var(--gs-shadow-panel);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.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: 1rem; font-weight: 600; letter-spacing: -0.015em; 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: var(--bs-border-color); }
.gs-well {
  padding: 1.1rem;
  border-radius: 1.125rem;
  background: var(--gs-surface-muted);
  border: 1px solid var(--bs-border-color-translucent);
}

/* ---- Clean Airy Tables ---- */
.card > .table-responsive:last-child > .table:last-child { margin-bottom: 0; }
.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) 65%, transparent);
  margin-bottom: 0;
  font-size: 0.825rem;
  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.675rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  padding: 0.65rem 1.4rem;
  border-bottom-color: var(--bs-border-color);
}
.table.table > tbody > tr > td { padding: 0.85rem 1.4rem; vertical-align: middle; }
.table.table > tbody > tr:last-child > td { border-bottom: 0; }
.table.table-sm > :not(caption) > * > * { padding: 0.55rem 1.4rem; font-size: 0.78rem; }
.table-responsive { border-radius: inherit; }
.table-responsive:has(> .table > tbody > tr > td[colspan] > .gs-empty) > .table { min-width: 0; }

.alert {
  --bs-alert-padding-y: 0.8rem;
  --bs-alert-padding-x: 1rem;
  --bs-alert-font-size: 0.8125rem;
  --bs-alert-border-radius: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}
.alert > p { flex: 1; }
.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: var(--bs-border-color-translucent);
  --bs-dropdown-border-radius: 1.125rem;
  --bs-dropdown-link-hover-bg: var(--gs-surface-muted);
  --bs-dropdown-link-active-bg: var(--bs-primary);
  box-shadow: var(--gs-shadow-raised);
  padding: 0.4rem;
}
.dropdown-item { border-radius: 0.65rem; }
.modal { --bs-modal-bg: var(--gs-surface); --bs-modal-border-radius: 1.5rem; --bs-modal-border-color: var(--bs-border-color); }
.progress { --bs-progress-bg: var(--bs-tertiary-bg); --bs-progress-bar-bg: var(--gs-brand); --bs-progress-border-radius: 999px; }

/* Pagination */
.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-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;
}

/* =====================================================================
 * SOLAR SAGE APPLICATION SHELL (Warm Stone Canvas + Floating White Rail)
 * ===================================================================== */
.gs-app {
  min-height: 100vh;
  max-width: 1460px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Desktop: 3-pill floating vertical icon rail (goskeleton-rauke style, flyout-only without desktop sidebar) */
.gs-rail-col {
  display: none;
}

.gs-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
  padding: 0.5rem;
  border-radius: 1.75rem;
  background: var(--gs-rail);
  color: #ffffff;
  box-shadow: 0 14px 30px -12px rgba(15, 22, 18, 0.36), var(--gs-shadow-raised);
  transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
[data-bs-theme="dark"] .gs-rail,
[data-bs-theme="dark"] .gs-rail-prefs {
  border: 1px solid color-mix(in srgb, var(--gs-rail-marker, var(--gs-rail-accent)) 22%, transparent);
}
.gs-rail-brand {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 0.2rem;
  border-radius: 0.875rem;
  background: var(--gs-rail-brand, var(--gs-rail-brand-bg, var(--gs-brand)));
  color: var(--gs-rail-brand-fg, var(--gs-brand-fg, #ffffff));
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: none;
  order: -1;
  transition: filter 0.15s ease, transform 0.14s ease;
}
.gs-rail-brand:hover {
  color: var(--gs-rail-brand-fg, var(--gs-brand-fg, #ffffff));
  filter: brightness(1.08);
}
.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-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
}

.gs-rail-group {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  z-index: 1;
}
.gs-rail-group.is-flyout-open {
  z-index: 30;
}
@media (hover: hover) {
  .gs-rail-group:hover,
  .gs-rail-group:focus-within {
    z-index: 30;
  }
}
/* Invisible hover bridge on the parent group (not clipped by flyout scroll) */
.gs-rail-group::after {
  content: "";
  position: absolute;
  left: calc(100% - 4px);
  top: -16px;
  bottom: -16px;
  width: 28px;
  display: none;
  z-index: 1049;
}
.gs-rail-group.is-flyout-open::after {
  display: block;
}
@media (hover: hover) {
  .gs-rail-group:hover::after,
  .gs-rail-group:focus-within::after {
    display: block;
  }
}
.gs-rail-item {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 0.875rem;
  border: 0;
  background: transparent;
  color: var(--gs-rail-icon, rgba(255, 255, 255, 0.68));
  cursor: pointer;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gs-rail-item:hover {
  background: var(--gs-rail-hover-bg, rgba(255, 255, 255, 0.12));
  color: var(--gs-rail-hover-fg, #ffffff);
}
.gs-rail-item:focus-visible {
  outline: 2px solid var(--gs-rail-marker, var(--gs-brand));
  outline-offset: 2px;
}
.gs-rail-item svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
}
.gs-rail-item.is-active {
  background: var(--gs-rail-active-bg, rgba(255, 255, 255, 0.18));
  color: var(--gs-rail-icon-active, #ffffff);
}
.gs-rail-item.is-active:hover {
  background: var(--gs-rail-active-bg, rgba(255, 255, 255, 0.18));
  color: var(--gs-rail-icon-active, #ffffff);
}
.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-rail-accent));
  transform: translateY(-50%);
}
.gs-rail-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gs-highlight);
  box-shadow: 0 0 0 2px var(--gs-rail);
}

/* Middle floating 24H activity meter pill */
.gs-meter-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.72rem 0.45rem;
  border-radius: 1.75rem;
  background: var(--gs-surface);
  border: 1px solid var(--bs-border-color);
  color: var(--bs-body-color);
  box-shadow: var(--gs-shadow-panel);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gs-meter-rail:hover {
  color: var(--bs-body-color);
  border-color: var(--bs-primary);
  box-shadow: var(--gs-shadow-raised);
}
.gs-meter-rail-label {
  font-family: var(--gs-font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color);
  line-height: 1;
  flex: none;
}
.gs-meter-rail-total {
  font-family: var(--gs-font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  flex: none;
}
.gs-meter-rail-ticks {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  width: 100%;
  padding: 0 0.25rem;
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}
.gs-meter-rail-ticks > span {
  height: 2.5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bs-primary) 60%, var(--bs-body-color));
  flex: none;
}
.gs-meter-rail-ticks > span.is-zero {
  background: var(--bs-border-color);
}
.gs-meter-rail-ticks > span.is-current {
  background: var(--bs-primary);
}

/* Bottom separate preferences / theme pill */
.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(255, 255, 255, 0.78));
  box-shadow: 0 12px 26px -10px rgba(15, 22, 18, 0.34), var(--gs-shadow-raised);
  cursor: pointer;
  flex: none;
  transition: color 0.15s ease, transform 0.14s ease, filter 0.15s ease;
}
.gs-rail-prefs:hover {
  color: var(--gs-rail-icon-active, #ffffff);
  filter: brightness(1.08);
}
.gs-rail-prefs svg {
  width: 22px;
  height: 22px;
}

.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; }
@media (max-height: 760px) {
  .gs-rail-col > .gs-meter-rail { display: none; }
}

/* Floating Submenu Flyout beside the white rail */
.gs-rail-flyout {
  position: absolute;
  left: calc(100% + 12px);
  top: -6px;
  z-index: 1050;
  min-width: 215px;
  max-height: 78vh;
  overflow-y: auto;
  padding: 0.55rem;
  border-radius: 1.125rem;
  background: var(--gs-surface);
  border: 1px solid var(--bs-border-color-translucent);
  box-shadow: var(--gs-shadow-raised);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.18s;
  pointer-events: none;
}
.gs-rail-group.is-flyout-open > .gs-rail-flyout {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
  pointer-events: auto;
}
@media (hover: hover) {
  .gs-rail-group:hover > .gs-rail-flyout,
  .gs-rail-group:focus-within > .gs-rail-flyout {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0s;
    pointer-events: auto;
  }
}
.gs-rail-flyout-title {
  padding: 0.3rem 0.65rem 0.45rem;
  font-family: var(--gs-font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bs-secondary-color);
}
.gs-rail-flyout a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.68rem;
  border-radius: 0.7rem;
  color: var(--bs-body-color);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.gs-rail-flyout a svg {
  width: 16px;
  height: 16px;
  color: var(--bs-secondary-color);
}
.gs-rail-flyout a:hover {
  background: var(--gs-surface-muted);
  color: var(--bs-body-color);
}
.gs-rail-flyout a.is-active {
  background: var(--gs-soft);
  color: var(--gs-soft-fg);
  font-weight: 600;
}
.gs-rail-flyout a.is-active svg {
  color: var(--gs-soft-fg);
}

/* Labels mode when enabled in Settings -> Mini sidebar */
.gs-rail-label { display: none; }
.gs-rail-col--labels .gs-rail {
  width: 100%;
  border-radius: 1.5rem;
  padding: 0.5rem 0.35rem;
}
.gs-rail-col--labels .gs-rail-item {
  width: 100%;
  height: auto;
  min-height: 48px;
  border-radius: 0.875rem;
  padding: 0.38rem 0.15rem;
  gap: 0.2rem;
  align-content: center;
}
.gs-rail-col--labels .gs-rail-item.is-active::before {
  left: -0.35rem;
}
.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-prefs {
  width: 100%;
}

/* Mobile Offcanvas Navigation Drawer */
.gs-sidebar {
  --bs-offcanvas-width: 280px;
  --bs-offcanvas-bg: var(--gs-sidebar-bg);
  --bs-offcanvas-color: var(--gs-sidebar-text);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0.85rem;
  background: var(--gs-sidebar-bg);
  color: var(--gs-sidebar-text);
  border-right: 1px solid var(--gs-sidebar-border);
  border-radius: 0 1.75rem 1.75rem 0;
  overflow: hidden;
}
@media (min-width: 992px) {
  .gs-sidebar { display: none !important; }
}
.gs-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.35rem;
  color: var(--gs-sidebar-text-strong);
  flex: none;
}
.gs-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 0.85rem;
  background: var(--gs-sage-grad);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  flex: none;
}
.gs-brand-mark--sm { width: 32px; height: 32px; font-size: 0.72rem; border-radius: 0.65rem; }
.gs-brand-mark--lg { width: 52px; height: 52px; border-radius: 1.1rem; font-size: 1.15rem; }
.gs-brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.gs-brand-text strong { font-size: 0.9rem; font-weight: 600; }
.gs-brand-text small { color: var(--gs-sidebar-muted); font-size: 0.74rem; }

.gs-nav {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 0.75rem;
}
.gs-nav-label {
  margin: 0.9rem 0 0.25rem;
  padding: 0 0.7rem;
  font-family: var(--gs-font-mono);
  font-size: 0.64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gs-sidebar-label);
}
.gs-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.52rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gs-sidebar-text);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gs-nav .nav-link:hover {
  background: var(--gs-sidebar-hover);
  color: var(--gs-sidebar-text-strong);
}
.gs-nav .nav-link.active {
  background: var(--gs-sidebar-active-bg);
  color: var(--gs-sidebar-active-fg);
  font-weight: 600;
}
.gs-nav .nav-link svg { width: 17px; height: 17px; }
.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.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
}
.gs-nav-count--highlight { background: var(--gs-highlight); color: var(--gs-highlight-fg); }

/* Collapsible Mobile Sidebar Groups (Accordion) */
.gs-nav-group { margin: 0.14rem 0; }
.gs-nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.52rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gs-sidebar-text-strong);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gs-nav-group-toggle::-webkit-details-marker { display: none; }
.gs-nav-group-toggle::marker { content: ""; }
.gs-nav-group-toggle:hover { background: var(--gs-sidebar-hover); }
.gs-nav-group.is-active > .gs-nav-group-toggle { background: var(--gs-sidebar-hover); }
.gs-nav-group-toggle > svg:first-child { width: 17px; height: 17px; opacity: 0.88; flex-shrink: 0; }
.gs-nav-group-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-nav-group-caret {
  width: 15px;
  height: 15px;
  color: var(--gs-sidebar-muted);
  flex-shrink: 0;
  transition: transform 0.18s ease;
}
.gs-nav-group[open] > .gs-nav-group-toggle .gs-nav-group-caret { transform: rotate(180deg); }
.gs-nav-group-items {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0.2rem 0 0.35rem 0.95rem;
  padding-left: 0.55rem;
  border-left: 1.5px solid var(--gs-sidebar-border);
}
.gs-nav-group-items .nav-link { padding: 0.42rem 0.68rem; font-size: 0.82rem; }

/* Fullscreen Icon Toggle & Floating Resume Pill */
.gs-fs-toggle .gs-fs-icon-exit { display: none; }
.gs-fs-toggle[aria-pressed="true"] .gs-fs-icon-enter { display: none; }
.gs-fs-toggle[aria-pressed="true"] .gs-fs-icon-exit { display: block; }
.gs-fs-pill {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1070;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--gs-brand);
  color: #ffffff;
  box-shadow: 0 12px 28px -8px rgba(15, 23, 18, 0.35);
  overflow: hidden;
}
.gs-fs-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
}
.gs-fs-pill-btn svg { width: 16px; height: 16px; }
.gs-fs-pill-btn:hover { background: rgba(255, 255, 255, 0.12); }
.gs-fs-pill-close {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: inherit;
  width: 34px;
  height: 34px;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}
.gs-fs-pill-close:hover { background: rgba(255, 255, 255, 0.16); }

.gs-sidebar-footer { display: flex; flex-direction: column; gap: 0.5rem; flex: none; padding-top: 0.5rem; border-top: 1px solid var(--gs-sidebar-border); }
.gs-user-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem;
  border-radius: 1rem;
  background: var(--gs-sidebar-card);
  color: var(--gs-sidebar-text-strong);
}
.gs-user-card-link { display: flex; align-items: center; gap: 0.65rem; flex: 1; min-width: 0; 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.82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-user-card-meta small { font-size: 0.72rem; color: var(--gs-sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Main Panel & Header ---- */
.gs-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 auto;
  gap: 1.25rem;
}

.gs-topbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.15rem 0;
}
.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.4rem;
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.25rem;
}
.gs-topbar-crumbs a { color: inherit; }
.gs-topbar-crumbs a:hover { color: var(--bs-body-color); }
.gs-topbar-title h1 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-topbar-sub {
  margin-top: 0.3rem;
  font-size: 0.84rem;
  color: var(--bs-secondary-color);
}
.gs-topbar-sub:empty { display: none; }

.gs-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.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-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Circular White Topbar Icon Buttons (matching reference right-side circles) */
.gs-icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 50%;
  background: var(--gs-surface);
  color: var(--bs-body-color);
  line-height: 1;
  box-shadow: var(--gs-shadow-control);
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}
.gs-icon-btn:hover {
  background: var(--gs-surface);
  color: var(--gs-brand);
  transform: translateY(-1px);
  box-shadow: var(--gs-shadow-panel);
}
.gs-icon-btn:focus-visible { outline: 2px solid var(--gs-brand); outline-offset: 2px; }
.gs-icon-btn svg { width: 1.125rem; height: 1.125rem; }
.gs-icon-btn-dot {
  position: absolute;
  top: 10px;
  right: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gs-highlight);
  box-shadow: 0 0 0 2px var(--gs-surface);
}
.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; }

/* Floating White Pill Search Bar with Solid Dark Circle Search Button */
.gs-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 48px;
  min-width: 17.5rem;
  padding: 0.25rem 0.28rem 0.25rem 1.25rem;
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 999px;
  background: var(--gs-surface);
  color: var(--bs-secondary-color);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  box-shadow: var(--gs-shadow-control);
  transition: box-shadow 0.16s ease, color 0.16s ease;
}
.gs-search-trigger:hover {
  color: var(--bs-body-color);
  box-shadow: var(--gs-shadow-panel);
}
.gs-search-trigger:focus-visible { outline: 2px solid var(--gs-brand); outline-offset: 2px; }
.gs-search-trigger-text { flex: 1; text-align: left; }
.gs-search-trigger-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gs-ink);
  color: var(--gs-ink-fg);
  flex: none;
  transition: transform 0.15s ease;
}
.gs-search-trigger:hover .gs-search-trigger-btn {
  transform: scale(1.04);
}
.gs-search-trigger-btn svg { width: 1rem; height: 1rem; stroke-width: 2; }

/* Contextual Horizontal Pill Sub-navigation (for multi-page sections) */
.gs-subnav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding: 0.35rem;
  border-radius: 999px;
  background: var(--gs-surface);
  border: 1px solid var(--bs-border-color-translucent);
  box-shadow: var(--gs-shadow-control);
  align-self: flex-start;
}
.gs-subnav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bs-secondary-color);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gs-subnav a:hover {
  background: var(--gs-surface-muted);
  color: var(--bs-body-color);
}
.gs-subnav a.is-active {
  background: var(--gs-ink);
  color: var(--gs-ink-fg);
  font-weight: 600;
}

.gs-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  width: 100%;
}
.gs-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem 0;
  font-family: var(--gs-font-mono);
  font-size: 0.6875rem;
  color: var(--bs-secondary-color);
}

/* Desktop Grid: 3-pill Floating Icon Rail on Left, Content on Right */
@media (min-width: 992px) {
  .gs-app {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    column-gap: 1.35rem;
    padding: 1.25rem 1.75rem 2rem;
    align-items: start;
  }
  .gs-app:has(.gs-rail-col--labels) {
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .gs-rail-col {
    position: sticky;
    top: 1.25rem;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    height: calc(100vh - 2.5rem);
  }
}

/* =====================================================================
 * SOLAR SAGE BENTO DASHBOARD WIDGETS
 * ===================================================================== */

/* Row 1: 4 Compact KPI Cards */
.gs-bento-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (max-width: 1199.98px) {
  .gs-bento-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .gs-bento-kpis { grid-template-columns: minmax(0, 1fr); }
}

.gs-kpi-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1.2rem 1.35rem;
  border-radius: 1.375rem;
  background: var(--gs-surface);
  border: 1px solid var(--bs-border-color-translucent);
  box-shadow: var(--gs-shadow-panel);
  min-height: 100px;
}
.gs-kpi-card-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}
.gs-kpi-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--bs-secondary-color);
  margin-bottom: 0.2rem;
  white-space: nowrap;
}
.gs-kpi-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--bs-heading-color);
  font-variant-numeric: tabular-nums;
}
.gs-kpi-circle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
}
.gs-kpi-circle--sage {
  background: var(--gs-soft);
  color: var(--gs-brand);
}
.gs-kpi-circle--sand {
  background: var(--gs-sand);
  color: var(--gs-sand-fg);
}
.gs-kpi-circle svg { width: 20px; height: 20px; }

/* Mini vertical capsule bar cluster (KPI Card 1) */
.gs-mini-capsules {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 46px;
  flex: none;
}
.gs-mini-capsule-track {
  position: relative;
  width: 6px;
  height: 100%;
  border-radius: 999px;
  background: var(--gs-accent);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.gs-mini-capsule-fill {
  width: 100%;
  border-radius: 999px;
  background: var(--gs-brand);
  transition: height 0.3s ease;
}
.gs-mini-capsule-fill.is-active {
  background: var(--gs-brand-dark);
}

/* Mini smooth SVG sparkline (KPI Card 2 & Featured Card 4) */
svg.gs-mini-spark {
  width: 68px;
  height: 36px;
  overflow: visible;
  flex: none;
}

/* Featured Sage Green Gradient KPI Card (KPI Card 4) */
.gs-kpi-card--featured {
  background: var(--gs-sage-grad);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 26px -10px rgba(67, 97, 82, 0.45);
}
.gs-kpi-card--featured .gs-kpi-label {
  color: rgba(255, 255, 255, 0.78);
}
.gs-kpi-card--featured .gs-kpi-num {
  color: #ffffff;
}

/* Row 2 & Row 3 Asymmetric Bento Grid (2fr : 1fr : 1fr = 50% : 25% : 25%) */
.gs-bento-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: stretch;
}
@media (max-width: 1199.98px) {
  .gs-bento-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gs-bento-row > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
  .gs-bento-row { grid-template-columns: minmax(0, 1fr); }
}

/* Row 2, Col 1: Traffic Overview Card (Balance · On track) */
.gs-track-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gs-brand);
}
.gs-track-pill svg {
  width: 15px;
  height: 15px;
  fill: var(--gs-brand);
  stroke: #ffffff;
  stroke-width: 2.2;
}
.gs-track-pill--warn {
  color: var(--gs-coral-fg);
}
.gs-track-pill--warn svg {
  fill: var(--gs-coral-fg);
}

.gs-inset-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
@media (max-width: 575.98px) {
  .gs-inset-stats { grid-template-columns: minmax(0, 1fr); }
}
.gs-inset-stat {
  padding: 0.95rem 1.15rem;
  border-radius: 1rem;
  background: var(--gs-surface);
  border: 1px solid var(--bs-border-color-translucent);
  box-shadow: 0 6px 20px -10px rgba(24, 30, 26, 0.12);
}
.gs-inset-stat-label {
  display: block;
  font-size: 0.74rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.25rem;
}
.gs-inset-stat-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.gs-inset-stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--bs-heading-color);
  font-variant-numeric: tabular-nums;
}

/* Smooth Organic Wave SVG Chart */
.gs-wave-wrap {
  position: relative;
  width: 100%;
  margin-top: 0.4rem;
}
svg.gs-wave-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.gs-wave-line {
  fill: none;
  stroke: var(--gs-brand);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.gs-wave-hit {
  fill: transparent;
  stroke: none;
  cursor: pointer;
}
.gs-wave-dot {
  fill: var(--gs-surface);
  stroke: var(--gs-brand);
  stroke-width: 2.2;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.gs-wave-pt:hover .gs-wave-dot { opacity: 1; }
.gs-wave-axis {
  fill: var(--bs-secondary-color);
  stroke: none;
  font-family: var(--gs-font-mono);
  font-size: 9px;
}

/* Row 2, Col 2: Semi-Circular Arc Gauge Card (Earnings 80% style) */
.gs-gauge-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.gs-gauge-figure {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--gs-brand);
  line-height: 1.15;
  margin: 0.15rem 0 0.35rem;
  font-variant-numeric: tabular-nums;
}
.gs-gauge-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.65rem;
}
svg.gs-gauge-svg {
  width: 100%;
  max-width: 215px;
  height: auto;
  overflow: visible;
}
.gs-gauge-track {
  fill: none;
  stroke: var(--gs-accent);
  stroke-width: 22;
  stroke-linecap: butt;
}
.gs-gauge-fill {
  fill: none;
  stroke: url(#gsGaugeGrad);
  stroke-width: 22;
  stroke-linecap: butt;
}
.gs-gauge-needle {
  stroke: var(--gs-ink);
  stroke-width: 2.4;
  stroke-linecap: round;
}
.gs-gauge-pct {
  fill: var(--bs-heading-color);
  stroke: none;
  font-family: var(--gs-font-sans);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* Row 2, Col 3: Operator Profile Card (Carlic Bolomboy style) */
.gs-profile-bento {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
}
.gs-profile-bento-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--gs-sand);
  color: var(--gs-sand-fg);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 3px solid var(--gs-surface-muted);
}
.gs-profile-bento-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gs-profile-bento-name {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bs-heading-color);
}
.gs-profile-bento-email {
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gs-profile-bento-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.15rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--bs-border-color-translucent);
}
.gs-profile-bento-stat span {
  display: block;
  font-size: 0.7rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.15rem;
}
.gs-profile-bento-stat strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--bs-heading-color);
  font-variant-numeric: tabular-nums;
}

/* Row 3, Col 1: Infrastructure & Channels Split Card (Wallet Card Stack style) */
.gs-stack-bento {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 1.25rem;
  align-items: center;
}
@media (max-width: 767.98px) {
  .gs-stack-bento { grid-template-columns: minmax(0, 1fr); }
}
.gs-stack-copy h3 {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: 0.6rem;
}
.gs-stack-copy p {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.gs-stack-visual {
  padding: 1rem;
  border-radius: 1.15rem;
  background: var(--gs-soft);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.gs-service-layer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  border-radius: 0.9rem;
  background: var(--gs-surface);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color-translucent);
  box-shadow: 0 4px 14px -8px rgba(20, 28, 24, 0.14);
  transition: transform 0.16s ease;
}
.gs-service-layer:hover { transform: translateX(3px); }
.gs-service-layer--sage {
  background: var(--gs-sage-grad);
  color: #ffffff;
  border-color: transparent;
}
.gs-service-layer--sage .gs-service-layer-sub { color: rgba(255, 255, 255, 0.78); }
.gs-service-layer--ink {
  background: #1c2220;
  color: #f3f5f4;
  border-color: transparent;
}
.gs-service-layer--ink .gs-service-layer-sub { color: rgba(243, 245, 244, 0.65); }
.gs-service-layer-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
}
.gs-service-layer-sub {
  display: block;
  font-size: 0.71rem;
  color: var(--bs-secondary-color);
}
.gs-service-layer-pill {
  font-family: var(--gs-font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
}
.gs-service-layer:not(.gs-service-layer--sage):not(.gs-service-layer--ink) .gs-service-layer-pill {
  background: var(--gs-soft);
  color: var(--gs-soft-fg);
}
.gs-service-layer-pill.is-warn {
  background: var(--gs-coral-bg) !important;
  color: var(--gs-coral-fg) !important;
}

/* Row 3, Col 2: Recent Activity List (Your Transfers style with left vertical bars) */
.gs-transfer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.gs-transfer-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-left: 0.85rem;
}
.gs-transfer-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  bottom: 2px;
  width: 3px;
  border-radius: 999px;
  background: var(--gs-brand);
}
.gs-transfer-item:nth-child(2n)::before {
  background: var(--gs-ink);
}
.gs-transfer-meta {
  min-width: 0;
  flex: 1;
}
.gs-transfer-meta strong {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--bs-heading-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-transfer-meta small {
  display: block;
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
}

/* Row 3, Col 3: Keep You Safe! Security Card (exact fingerprint card homage) */
.gs-safe-bento {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
}
.gs-safe-icon {
  width: 58px;
  height: 58px;
  color: var(--gs-brand);
  margin-bottom: 0.35rem;
}
.gs-safe-icon svg {
  width: 56px;
  height: 56px;
  stroke-width: 1.5;
}
.gs-safe-bento h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.gs-safe-bento p {
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
  max-width: 24ch;
  margin-bottom: 0.65rem;
}

/* Attention Strip */
.gs-attention {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1.15rem;
  border-radius: 1.125rem;
  background: var(--gs-coral-bg);
  color: var(--gs-coral-fg);
  border: 1px solid rgba(var(--gs-highlight-rgb), 0.25);
}
.gs-attention-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gs-highlight);
  color: #ffffff;
  flex: none;
}
.gs-attention-icon svg { width: 16px; height: 16px; }
.gs-attention p { flex: 1 1 14rem; font-size: 0.825rem; color: var(--bs-body-color); }

/* ---- Shared Utility Widgets ---- */
.gs-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gs-soft);
  color: var(--gs-soft-fg);
  font-size: 0.74rem;
  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.66rem; }
.gs-avatar--xl { width: 68px; height: 68px; font-size: 1.3rem; }

.gs-tile {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 0.65rem;
  background: var(--gs-surface-muted);
  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.7rem; color: var(--bs-secondary-color); }

.gs-queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.gs-queue-item {
  display: flex;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  border-radius: 1rem;
  background: var(--gs-surface-muted);
  border: 1px solid var(--bs-border-color-translucent);
}
.gs-queue-item strong { display: block; font-size: 0.86rem; font-weight: 600; line-height: 1.35; }
.gs-queue-item small { display: block; font-size: 0.77rem; color: var(--bs-secondary-color); }
.gs-id-pill { display: inline-block; padding: 0.1rem 0.45rem; border-radius: 0.4rem; background: var(--bs-tertiary-bg); font-family: var(--gs-font-mono); font-size: 0.66rem; color: var(--bs-body-color); }

.gs-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.gs-bars li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 2.2rem; align-items: center; gap: 0.75rem; font-size: 0.82rem; }
.gs-bars-track { height: 7px; border-radius: 999px; background: var(--gs-accent); overflow: hidden; }
.gs-bars-track > span { display: block; height: 100%; border-radius: inherit; background: var(--gs-brand); }
.gs-bars-value { font-family: var(--gs-font-mono); font-weight: 600; text-align: right; }

.gs-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--gs-surface);
  border: 1px solid var(--bs-border-color-translucent);
  font-size: 0.76rem;
  color: var(--bs-body-color);
  box-shadow: var(--gs-shadow-control);
}
.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 color-mix(in srgb, var(--gs-brand) 20%, transparent); }
.gs-dot--ok { width: 8px; height: 8px; background: var(--gs-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gs-brand) 18%, transparent); }
.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.82rem; 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: var(--gs-sage-grad); -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.48rem 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.76rem; font-weight: 400; }
.gs-meta dd { margin: 0; text-align: right; font-size: 0.8rem; font-weight: 500; overflow-wrap: anywhere; }

.gs-user-cell { display: flex; align-items: center; gap: 0.75rem; }
.gs-user-cell > div { display: flex; flex-direction: column; min-width: 0; }
.gs-user-cell small { color: var(--bs-secondary-color); font-size: 0.74rem; }
.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.75rem; background: var(--gs-surface-muted); 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.75rem; overflow: hidden; }
.gs-email-preview-subject { margin: 0; padding: 0.65rem 0.9rem; background: var(--gs-surface-muted); border-bottom: 1px solid var(--bs-border-color); font-size: 0.76rem; 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.55rem 0.6rem; border: 1px dashed var(--bs-border-color); border-radius: 0.6rem; background: var(--gs-surface-muted); font-size: 0.78rem; text-align: center; }

.gs-meter { height: 7px; border-radius: 999px; background: var(--gs-accent); overflow: hidden; }
.gs-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--gs-brand); 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.15rem; padding: 0.8rem 1rem; border-radius: 1rem; background: var(--gs-surface-muted); border: 1px solid var(--bs-border-color-translucent); }
.gs-count span { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; }
.gs-count small { color: var(--bs-secondary-color); font-size: 0.72rem; }

.gs-version-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1.375rem;
  background: var(--gs-sage-grad);
  color: #ffffff;
  box-shadow: var(--gs-shadow-raised);
  flex-wrap: wrap;
}
.gs-version-hero-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.74); }
.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.78rem; color: rgba(255, 255, 255, 0.86); }
.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: rgba(255, 255, 255, 0.72); }
.gs-version-hero-facts dd { margin: 0.1rem 0 0; font-size: 0.8rem; color: #ffffff; }

/* ---- 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.74rem; }
.gs-timeline-head h4 { margin: 0.5rem 0 0.25rem; font-size: 0.92rem; }
.gs-timeline-notes { color: var(--bs-body-color); font-size: 0.8rem; margin-bottom: 0.35rem; }
.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.85rem 1.4rem;
  font-size: 0.76rem;
  cursor: pointer;
  list-style: none;
}
.gs-release-summary::-webkit-details-marker { display: none; }
.gs-release-summary:hover { background: var(--gs-surface-muted); }
.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 (Solar Sage Split Card) ---- */
.gs-auth-body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 1.75rem 1.125rem;
  background:
    radial-gradient(960px 480px at 12% 0%, var(--gs-auth-glow-1) 0%, transparent 60%),
    radial-gradient(880px 460px at 95% 100%, var(--gs-auth-glow-2) 0%, transparent 55%),
    var(--gs-auth-base);
}
.gs-auth-theme { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 10; }
.gs-auth-shell {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  width: min(1000px, 100%);
  min-height: 560px;
  background: var(--gs-surface);
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 1.75rem;
  overflow: hidden;
  box-shadow: var(--gs-shadow-raised);
}
.gs-auth-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.95rem;
  padding: 3.25rem 3rem;
  background: linear-gradient(155deg, var(--gs-hero-from) 0%, var(--gs-hero-via) 52%, var(--gs-hero-to) 100%);
  color: var(--gs-hero-text);
  overflow: hidden;
}
.gs-auth-hero::after {
  content: "";
  position: absolute;
  inset: auto -70px -110px auto;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 234, 220, 0.22), transparent 65%);
}
.gs-auth-hero h1 { font-size: 2.15rem; letter-spacing: -0.03em; color: #ffffff; margin: 0; }
.gs-auth-hero > p { color: var(--gs-hero-soft); font-size: 0.86rem; max-width: 34ch; margin: 0; }
.gs-auth-hero-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.65rem; font-size: 0.8rem; color: var(--gs-hero-text); }
.gs-auth-hero-list li { position: relative; padding-left: 1.4rem; }
.gs-auth-hero-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gs-hero-soft);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}
.gs-auth-hero-version { position: absolute; z-index: 1; bottom: 1.5rem; left: 3rem; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gs-hero-muted); font-family: var(--gs-font-mono); }
.gs-auth-hero-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.28; }
.gs-auth-hero-art svg { display: block; width: 100%; height: 100%; }
.gs-auth-hero > :not(.gs-auth-hero-art):not(.gs-auth-hero-version) { position: relative; z-index: 1; }
.gs-auth-solar-badge {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  backdrop-filter: blur(8px);
}
.gs-auth-solar-badge svg { width: 34px; height: 34px; }

.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.7rem; color: var(--bs-secondary-color); }
.gs-auth-head { margin-bottom: 1.4rem; }
.gs-auth-head h2 { font-size: 1.55rem; letter-spacing: -0.025em; margin: 0; }
.gs-auth-head p { color: var(--bs-secondary-color); font-size: 0.83rem; margin-top: 0.25rem; }
.gs-auth-alt { margin-top: 0.9rem; text-align: center; font-size: 0.8rem; }
.gs-demo-box { margin-top: 1.4rem; padding: 0.95rem 1.05rem; border-radius: 1rem; background: var(--gs-surface-muted); border: 1px dashed var(--bs-border-color); font-size: 0.76rem; }
.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.55rem; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.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.73rem; }

/* ---- Theme Dialog ---- */
.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: 1.375rem;
  background: var(--gs-surface);
  color: var(--bs-body-color);
  box-shadow: var(--gs-shadow-raised);
}
.gs-theme-dialog::backdrop { background: rgba(18, 22, 20, 0.45); backdrop-filter: blur(3px); }
.gs-theme-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1.2rem 1.35rem 0; }
.gs-theme-dialog-head h2 { font-size: 1.1rem; }
.gs-theme-dialog-close {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.gs-theme-dialog-close:hover { background: var(--gs-surface-muted); color: var(--bs-body-color); }
.gs-theme-dialog-section { padding: 1rem 1.35rem 0; }
.gs-theme-dialog-section:last-of-type { padding-bottom: 1.35rem; }
.gs-theme-dialog-label { margin: 0 0 0.55rem; 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.9rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  background: var(--gs-surface);
  color: var(--bs-secondary-color);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.gs-theme-choice:hover { background: var(--gs-surface-muted); 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-palettes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.gs-theme-palette {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  background: var(--gs-surface);
  color: var(--bs-secondary-color);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.gs-theme-palette:hover { background: var(--gs-surface-muted); color: var(--bs-body-color); }
.gs-theme-palette.is-active { border-color: var(--bs-primary); background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.gs-theme-palette-dot { width: 1.125rem; height: 1.125rem; border-radius: 999px; flex: none; background: linear-gradient(145deg, var(--swatch-from), var(--swatch-to)); border: 1px solid rgba(0, 0, 0, 0.12); }
.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.65rem; background: linear-gradient(150deg, var(--swatch-from), var(--swatch-to)); cursor: pointer; }
.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.65rem; background: var(--gs-surface); color: var(--bs-secondary-color); font-size: 0.66rem; font-weight: 600; cursor: pointer; }
.gs-theme-pattern.is-active { border-color: var(--bs-primary); color: var(--bs-primary-text-emphasis); }
.gs-theme-pattern-canvas { position: relative; display: block; height: 2.3rem; border-radius: 0.45rem; background: var(--gs-surface-muted); border: 1px solid var(--bs-border-color); }
.gs-theme-dialog-hint { margin: 0.625rem 0 0; font-size: 0.72rem; color: var(--bs-secondary-color); }

/* ---- Public Landing Page (Harmonized with Solar Sage) ---- */
.gs-landing-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: color-mix(in srgb, var(--gs-surface) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bs-border-color);
}
.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: 1140px; 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.25rem; margin-left: 0.5rem; flex: 1; flex-wrap: wrap; }
.gs-landing-links a { color: var(--bs-secondary-color); font-size: 0.84rem; font-weight: 500; }
.gs-landing-links a:hover { color: var(--bs-body-color); }
.gs-landing-actions { display: flex; align-items: center; gap: 0.6rem; }
.gs-landing { width: 100%; max-width: 1140px; 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, color-mix(in srgb, var(--gs-brand) 22%, transparent), transparent 75%); filter: blur(12px); 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.38rem 0.9rem; border-radius: 999px; border: 1px solid var(--bs-border-color); background: var(--gs-surface); color: var(--bs-secondary-color); font-size: 0.76rem; font-weight: 600; }
.gs-hero-title { margin: 1.375rem 0 0.875rem; font-size: clamp(1.95rem, 4.4vw, 3.1rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; }
.gs-hero-sub { margin: 0 auto; max-width: 640px; color: var(--bs-secondary-color); font-size: 0.96rem; line-height: 1.65; }
.gs-hero-actions { display: flex; justify-content: center; gap: 0.75rem; margin-top: 1.85rem; flex-wrap: wrap; }
.gs-hero-facts { list-style: none; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.7rem; margin: 2.5rem 0 0; padding: 0; }
.gs-hero-facts li { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.85rem 1.2rem; min-width: 135px; border: 1px solid var(--bs-border-color-translucent); border-radius: 1rem; background: var(--gs-surface); box-shadow: var(--gs-shadow-panel); }
.gs-hero-facts strong { font-size: 0.84rem; }
.gs-hero-facts span { color: var(--bs-secondary-color); font-size: 0.73rem; }
.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.4rem; }
.gs-section-head p { margin: 0; color: var(--bs-secondary-color); font-size: 0.86rem; }
.gs-panel-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 0.85rem; background: var(--gs-soft); color: var(--gs-brand); flex: none; }
.gs-panel-icon svg { width: 1.2rem; height: 1.2rem; }
.gs-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap; margin-top: 0.5rem; padding: 2rem; border-radius: 1.375rem; border: 1px solid var(--bs-border-color-translucent); background: linear-gradient(135deg, color-mix(in srgb, var(--gs-brand) 14%, var(--gs-surface)), var(--gs-surface)); box-shadow: var(--gs-shadow-panel); }
.gs-cta h2 { margin: 0 0 0.35rem; font-size: 1.3rem; }
.gs-cta p { margin: 0; color: var(--bs-secondary-color); font-size: 0.84rem; }
.gs-landing-footer { border-top: 1px solid var(--bs-border-color); background: var(--gs-surface); }
.gs-landing-footer-inner { max-width: 1140px; margin: 0 auto; padding: 1.85rem 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.86rem; }
.gs-landing-footer-brand p { margin: 0.25rem 0 0; color: var(--bs-secondary-color); font-size: 0.76rem; 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.8rem; }
.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.74rem; text-align: right; }

/* ---- Command Palette ---- */
.gs-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  background: rgba(18, 22, 20, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 1rem 1rem;
  backdrop-filter: blur(3px);
}
.gs-search-overlay[hidden] { display: none; }
.gs-search-dialog { width: 100%; max-width: 600px; background: var(--gs-surface); border: 1px solid var(--bs-border-color-translucent); border-radius: 1.375rem; box-shadow: var(--gs-shadow-raised); overflow: hidden; }
.gs-search-field { display: flex; align-items: center; gap: 0.7rem; padding: 0.95rem 1.15rem; border-bottom: 1px solid var(--bs-border-color); }
.gs-search-field svg { width: 1.1rem; height: 1.1rem; 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.9rem; outline: none; }
.gs-search-results { list-style: none; margin: 0; padding: 0.45rem; max-height: 50vh; overflow-y: auto; }
.gs-search-result { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.65rem 0.8rem; border-radius: 0.75rem; text-decoration: none; color: inherit; }
.gs-search-result:hover, .gs-search-result.is-active { background: var(--gs-surface-muted); color: inherit; }
.gs-search-type { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gs-soft-fg); background: var(--gs-soft); border-radius: 6px; padding: 2px 7px; margin-top: 2px; white-space: nowrap; font-weight: 600; }
.gs-search-body strong { display: block; font-size: 0.84rem; }
.gs-search-body small { color: var(--bs-secondary-color); font-size: 0.73rem; }
.gs-search-hint { margin: 0; padding: 1rem 1.15rem; color: var(--bs-secondary-color); font-size: 0.76rem; }
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.8rem 1rem; 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.4rem; max-height: 320px; overflow-y: auto; }
.gs-notif-item { display: flex; gap: 0.65rem; align-items: flex-start; padding: 0.65rem; border-radius: 0.75rem; }
.gs-notif-item.is-unread { background: var(--gs-surface-muted); }
.gs-notif-item strong { display: block; font-size: 0.8rem; }
.gs-notif-item small { display: block; color: var(--bs-secondary-color); font-size: 0.73rem; }
.gs-notif-open { margin-left: auto; color: var(--bs-secondary-color); font-size: 0.9375rem; }
.gs-notif-empty { padding: 1.2rem 1rem; color: var(--bs-secondary-color); font-size: 0.76rem; 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-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--gs-highlight);
  color: #ffffff;
  box-shadow: 0 0 0 2px var(--gs-surface);
  font-size: 0.64rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gs-notif-btn { position: relative; }

/* ---- Impersonation, Bulk, Saved Filters, File Input ---- */
.gs-impersonation { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.25rem; border-radius: 1rem; background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); font-size: 0.8rem; border: 1px solid var(--bs-warning-border-subtle); }
.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.65rem; padding: 0.8rem 1.4rem; border-top: 1px solid var(--bs-border-color); background: var(--gs-surface-muted); flex-wrap: wrap; border-radius: 0 0 1.375rem 1.375rem; }
.gs-bulk-count { font-size: 0.76rem; color: var(--bs-secondary-color); }

.gs-chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.65rem; border-radius: 999px; border: 1px solid var(--bs-border-color); background: var(--gs-surface); font-size: 0.74rem; }
.gs-chip a { color: inherit; }
.gs-chip-remove { border: none; background: transparent; color: var(--bs-secondary-color); cursor: pointer; font-size: 0.85rem; 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; }
.gs-flash-data { display: none; }
.gs-pre { white-space: pre-wrap; word-break: break-word; }

/* ---- Toasts & SweetAlert2 ---- */
#toast-container > div {
  border-radius: 1rem;
  box-shadow: var(--gs-shadow-raised);
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 1;
  padding: 0.9rem 1.05rem 0.9rem 2.9rem;
  width: 340px;
  font-family: var(--gs-font-sans);
  color: #ffffff;
}
#toast-container > .toast-success { background-color: var(--gs-toast-primary); }
#toast-container > .toast-info { background-color: #252b28; }
#toast-container > .toast-warning { background-color: #b57322; }
#toast-container > .toast-error { background-color: #b8483c; }
#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: 1.375rem;
  box-shadow: var(--gs-shadow-raised);
  font-family: inherit;
  padding: 1.5rem 1.5rem 1.3rem;
  width: min(440px, calc(100vw - 32px));
}
.swal2-popup.gs-swal .swal2-confirm,
.swal2-popup.gs-swal .swal2-cancel { border-radius: 0.75rem; font-size: 0.8125rem; font-weight: 600; margin: 0; min-width: 8rem; box-shadow: none; }

/* ---- Layout Grid Helpers ---- */
.gs-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.1rem; align-items: start; }
.gs-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; align-items: start; }
.gs-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; align-items: start; }
.gs-cols-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.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); } }
.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-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.8rem; border: 1px solid var(--bs-border-color); border-radius: 1rem; }
.gs-rail-color .form-control-color { flex: none; width: 2.75rem; height: 2.25rem; padding: 0.2rem; }
.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.82rem; color: var(--bs-secondary-color); display: flex; flex-direction: column; gap: 0.25rem; }
.gs-2fa-method.is-active { border-color: color-mix(in srgb, var(--bs-success) 55%, var(--bs-border-color)); }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .gs-app { padding: 1rem; }
  .gs-topbar-title h1 { font-size: 1.45rem; }
  .gs-auth-shell { grid-template-columns: 1fr; }
  .gs-auth-hero { display: none; }
  .gs-auth-panel { padding: 2.25rem 1.625rem; }
  .gs-search-trigger { min-width: 0; width: 46px; height: 46px; padding: 0; justify-content: center; }
  .gs-search-trigger-text { display: none; }
  .gs-search-trigger-btn { width: 38px; height: 38px; }
  .gs-landing-links { display: none; }
  .gs-landing-footer-meta { text-align: left; }
}

@media (max-width: 575.98px) {
  .gs-footer { flex-direction: column; }
  .gs-version-hero-facts { grid-template-columns: 1fr; }
  .gs-topbar-actions { margin-left: 0; }
  .gs-hero-facts li { flex: 1 1 44%; }
  #toast-container > div { width: calc(100vw - 32px); }
}
