/* ==========================================================================
   TikHub Solar UI — Botanical Sage & Warm Stone Design System (ZERO Bootstrap 5)
   Adopted from golang/goskeleton-solar: fast, minimalist, elegant.
   Self-hosted Figtree + JetBrains Mono, warm alabaster-stone canvas,
   crisp pure-white rounded bento cards, floating vertical pill rail with
   hover flyouts, contextual subnav, native <dialog> theme customizer,
   6 color palettes + light/dark mode.
   ========================================================================== */

/* ---- 1. Self-hosted Fonts (CSP font-src 'self') ---- */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/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("../fonts/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("../fonts/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("../fonts/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;
}

/* ---- 2. Palette: Solar Sage (default / mars-green) ---- */
:root,
[data-theme="light"],
[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;

  --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-rgb: 82, 115, 98;
  --gs-brand-light: #789888;
  --gs-brand-dark: #3f5d4e;
  --gs-brand-fg: #ffffff;
  --gs-primary-fg: #ffffff;
  --gs-primary-hover: color-mix(in srgb, var(--gs-brand) 88%, #000);
  --gs-primary-active: color-mix(in srgb, var(--gs-brand) 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-row-hover: #f7f6f2;

  /* Semantic surfaces & typography */
  --s-body-bg: #eae9e4;
  --s-body-color: #181a19;
  --s-body-rgb: 24, 26, 25;
  --s-heading: #181a19;
  --s-muted: #6c726f;
  --s-secondary-bg: #f5f4f0;
  --s-tertiary-bg: #ecebe6;
  --s-border: #e4e2dc;
  --s-border-soft: rgba(24, 26, 25, 0.07);
  --s-link: #4b6d5c;
  --s-link-hover: #365244;

  /* Semantic colors */
  --s-primary: var(--gs-brand);
  --s-primary-rgb: var(--gs-brand-rgb);
  --s-primary-text: #355243;
  --s-primary-bg: #e9f1ec;
  --s-primary-border: #cfe0d6;

  --s-secondary: #757a77;
  --s-secondary-text: #444846;
  --s-secondary-bg-subtle: #eeede8;
  --s-secondary-border: #dfddd6;

  --s-success: #4b7c63;
  --s-success-rgb: 75, 124, 99;
  --s-success-text: #2e5742;
  --s-success-bg: #e6f1eb;
  --s-success-border: #cde3d6;

  --s-info: #4b6d94;
  --s-info-rgb: 75, 109, 148;
  --s-info-text: #2c4a6b;
  --s-info-bg: #ebf1f8;
  --s-info-border: #d1dfee;

  --s-warning: #c88636;
  --s-warning-rgb: 200, 134, 54;
  --s-warning-text: #7d5019;
  --s-warning-bg: #faf1e2;
  --s-warning-border: #efd8b3;

  --s-danger: #c25548;
  --s-danger-rgb: 194, 85, 72;
  --s-danger-text: #8e362c;
  --s-danger-bg: #fbeae7;
  --s-danger-border: #f2ccc6;

  /* Compatibility aliases for existing TikHub views */
  --tk-font: var(--gs-font-sans);
  --tk-accent: var(--s-primary);
  --tk-accent-rgb: var(--s-primary-rgb);
  --tk-accent-2: var(--gs-brand-dark);
  --tk-bg: var(--gs-page);
  --tk-surface: var(--gs-surface);
  --tk-surface-2: var(--gs-surface-muted);
  --tk-border: var(--s-border);
  --tk-input-border: var(--gs-input);
  --tk-text: var(--s-body-color);
  --tk-muted: var(--s-muted);
  --tk-shadow: var(--gs-shadow-panel);
  --tk-shadow-lg: var(--gs-shadow-raised);
  --tk-radius: 1.375rem;
  --tk-radius-sm: 0.75rem;
  --tk-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --tk-topbar-h: 64px;

  color-scheme: light;
}

[data-theme="dark"],
[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-rgb: 124, 163, 143;
  --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-row-hover: #212523;

  --s-body-bg: #111312;
  --s-body-color: #eef2ef;
  --s-body-rgb: 238, 242, 239;
  --s-heading: #f2f5f3;
  --s-muted: #939d97;
  --s-secondary-bg: #202422;
  --s-tertiary-bg: #252a27;
  --s-border: #292f2c;
  --s-border-soft: rgba(255, 255, 255, 0.07);
  --s-link: #8bb49f;
  --s-link-hover: #aed0be;

  --s-primary-text: #c2e0d0;
  --s-primary-bg: #1d2d24;
  --s-primary-border: #2e483a;

  --s-secondary: #939d97;
  --s-secondary-text: #cdd5d0;
  --s-secondary-bg-subtle: #232825;
  --s-secondary-border: #313834;

  --s-success: #6fb28f;
  --s-success-rgb: 111, 178, 143;
  --s-success-text: #b9e4cd;
  --s-success-bg: #1a3024;
  --s-success-border: #294c39;

  --s-info: #7fa7d6;
  --s-info-rgb: 127, 167, 214;
  --s-info-text: #c2d9f5;
  --s-info-bg: #192638;
  --s-info-border: #293e5c;

  --s-warning: #e0a756;
  --s-warning-rgb: 224, 167, 86;
  --s-warning-text: #f5d39f;
  --s-warning-bg: #2e2313;
  --s-warning-border: #4d391e;

  --s-danger: #e57a62;
  --s-danger-rgb: 229, 122, 98;
  --s-danger-text: #f5b4a6;
  --s-danger-bg: #331b17;
  --s-danger-border: #542c25;

  color-scheme: dark;
}

/* ---- 2b. Additional Palettes (from goskeleton-solar + goskeleton-rauke rail accents) ---- */
:root:not([data-theme="dark"])[data-palette="mars-red"] {
  --gs-page: #ede8e6; --s-body-bg: #ede8e6; --gs-panel: #ede8e6;
  --gs-rail: #471117; --gs-rail-brand-bg: #b84a54; --gs-rail-brand-fg: #ffffff;
  --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-rgb: 168, 66, 75;
  --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;
  --s-link: #9b3d46; --s-link-hover: #782a32;
  --s-primary-text: #6e1f26; --s-primary-bg: #f7e6e7; --s-primary-border: #ecc5c9;
}
[data-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-brand-rgb: 223, 119, 128;
  --gs-sage-grad: linear-gradient(135deg, #a64b54 0%, #7d2f37 55%, #591e25 100%);
  --s-link: #ea9199;
}

:root:not([data-theme="dark"])[data-palette="mars-orange"] {
  --gs-page: #eeeae4; --s-body-bg: #eeeae4; --gs-panel: #eeeae4;
  --gs-rail: #4a2007; --gs-rail-brand-bg: #c9722c; --gs-rail-brand-fg: #ffffff;
  --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-rgb: 184, 102, 40;
  --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;
  --s-link: #b26124; --s-link-hover: #8c4816;
  --s-primary-text: #70380e; --s-primary-bg: #f8efe6; --s-primary-border: #edd4bc;
}
[data-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-brand-rgb: 227, 148, 82;
  --gs-sage-grad: linear-gradient(135deg, #b5682a 0%, #8a4b19 55%, #61330e 100%);
  --s-link: #edaa72;
}

:root:not([data-theme="dark"])[data-palette="mars-purple"] {
  --gs-page: #ebe9ee; --s-body-bg: #ebe9ee; --gs-panel: #ebe9ee;
  --gs-rail: #271352; --gs-rail-brand-bg: #745ca8; --gs-rail-brand-fg: #ffffff;
  --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-rgb: 107, 84, 156;
  --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;
  --s-link: #665096; --s-link-hover: #4d3978;
  --s-primary-text: #3f2d69; --s-primary-bg: #f0ecf8; --s-primary-border: #d8cdf0;
}
[data-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-brand-rgb: 163, 142, 214;
  --gs-sage-grad: linear-gradient(135deg, #745ca8 0%, #523d82 55%, #37275c 100%);
  --s-link: #b7a5e3;
}

:root:not([data-theme="dark"])[data-palette="mars-blue"] {
  --gs-page: #e8ebee; --s-body-bg: #e8ebee; --gs-panel: #e8ebee;
  --gs-rail: #0f295e; --gs-rail-brand-bg: #1d5ed6; --gs-rail-brand-fg: #ffffff;
  --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-rgb: 67, 105, 150;
  --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;
  --s-link: #446994; --s-link-hover: #2f4d70;
  --s-primary-text: #264366; --s-primary-bg: #eaf0f7; --s-primary-border: #cbdbed;
}
[data-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-brand-rgb: 127, 167, 214;
  --gs-sage-grad: linear-gradient(135deg, #4f739e 0%, #36547a 55%, #233957 100%);
  --s-link: #9bbce3;
}

:root:not([data-theme="dark"])[data-palette="mars-black"] {
  --gs-page: #eaeae8; --s-body-bg: #eaeae8; --gs-panel: #eaeae8;
  --gs-rail: #111214; --gs-rail-brand-bg: #ffffff; --gs-rail-brand-fg: #111214;
  --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-rgb: 37, 39, 41;
  --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;
  --s-link: #252729; --s-link-hover: #0e0f10;
  --s-primary-text: #141517; --s-primary-bg: #eeeeec; --s-primary-border: #d6d6d2;
}
[data-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-rgb: 228, 230, 232; --gs-brand-fg: #121315; --gs-primary-fg: #121315;
  --gs-sage-grad: linear-gradient(135deg, #3c3f44 0%, #232629 55%, #16181a 100%);
  --s-link: #e4e6e8;
}

/* ---- 2c. Mobile Drawer Sidebar Tokens ---- */
:root, html[data-sidebar-theme="mint"] {
  --gs-sidebar-bg: var(--gs-surface);
  --gs-sidebar-text: rgba(var(--s-body-rgb), 0.74);
  --gs-sidebar-text-strong: var(--s-body-color);
  --gs-sidebar-muted: var(--s-muted);
  --gs-sidebar-label: var(--s-muted);
  --gs-sidebar-border: var(--s-border);
  --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);
}
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-text: rgba(240, 244, 241, 0.76);
  --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);
}
html[data-sidebar-theme="teal"]     { --gs-sidebar-bg: linear-gradient(170deg, #4b6c5b 0%, #375345 60%, #24382e 100%); }
html[data-sidebar-theme="graphite"] { --gs-sidebar-bg: #252927; }
html[data-sidebar-theme="ruby"]     { --gs-sidebar-bg: linear-gradient(170deg, #7e2e36 0%, #5c1e25 60%, #3d1217 100%); }
html[data-sidebar-theme="blue"]     { --gs-sidebar-bg: linear-gradient(170deg, #2d4c73 0%, #1f3756 60%, #14253b 100%); }

/* ---- 3. Reset & Base Typography ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--gs-page);
  color: var(--s-body-color);
  font-family: var(--gs-font-sans);
  font-size: 0.875rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  margin: 0 0 0.5rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--s-heading);
}
h1, .h1 { font-size: 1.65rem; letter-spacing: -0.025em; }
h2, .h2 { font-size: 1.4rem; letter-spacing: -0.025em; }
h3, .h3 { font-size: 1.15rem; }
h4, .h4 { font-size: 1.02rem; }
h5, .h5 { font-size: 0.9375rem; }
h6, .h6 { font-size: 0.875rem; }
p { margin: 0 0 0.75rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--s-link); text-decoration: none; transition: color 0.14s ease; }
a:hover { color: var(--s-link-hover); }
img, svg { vertical-align: middle; }
img { max-width: 100%; height: auto; }
button, input, optgroup, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; margin: 0; }
button, [type="button"], [type="reset"], [type="submit"] { -webkit-appearance: button; cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; }
ol, ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }
dl { margin: 0 0 0.75rem; }
dt { font-weight: 600; }
dd { margin: 0 0 0.35rem; }
b, strong { font-weight: 600; }
small, .small { font-size: 0.8em; }
hr { margin: 1rem 0; border: 0; border-top: 1px solid var(--s-border); opacity: 1; }
hr.dashed { border-top-style: dashed; }
code, kbd, pre, samp { font-family: var(--gs-font-mono); }
code {
  font-size: 0.78rem;
  background: var(--s-tertiary-bg);
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--s-body-color);
  word-wrap: break-word;
}
pre {
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem;
  background: #181b19;
  color: #dce6e0;
  border-radius: 14px;
  font-size: 0.78rem;
  overflow-x: auto;
}
pre code { background: transparent; padding: 0; color: inherit; font-size: inherit; }
kbd {
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding: 0 0.4rem;
  border: 1px solid var(--s-border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--gs-surface);
  color: var(--s-muted);
  font-size: 0.6875rem;
  font-weight: 500;
}
label { display: inline-block; }
::selection { background: rgba(var(--s-primary-rgb), 0.2); }
[hidden] { display: none !important; }
.tk-no-transition * { transition: none !important; }
* { scrollbar-width: thin; scrollbar-color: rgba(110, 120, 115, 0.3) transparent; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-thumb { background: rgba(110, 120, 115, 0.3); border-radius: 999px; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---- 4. Zero-Bootstrap Responsive 12-Column Grid ---- */
.container, .container-fluid { width: 100%; margin-left: auto; margin-right: auto; padding-left: 0.75rem; padding-right: 0.75rem; }
.container { max-width: 1180px; }

.row {
  --gx: 1.1rem;
  --gy: 0px;
  display: flex;
  flex-wrap: wrap;
  margin-top: calc(-1 * var(--gy));
  margin-left: calc(-0.5 * var(--gx));
  margin-right: calc(-0.5 * var(--gx));
}
.row > * {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-left: calc(var(--gx) * 0.5);
  padding-right: calc(var(--gx) * 0.5);
  margin-top: var(--gy);
}

.g-0 { --gx: 0px; --gy: 0px; }
.g-1 { --gx: 0.35rem; --gy: 0.35rem; }
.g-2 { --gx: 0.65rem; --gy: 0.65rem; }
.g-3 { --gx: 1rem; --gy: 1rem; }
.g-4 { --gx: 1.35rem; --gy: 1.35rem; }
.g-5 { --gx: 2.25rem; --gy: 2.25rem; }
.gx-2 { --gx: 0.65rem; } .gx-3 { --gx: 1rem; } .gx-4 { --gx: 1.35rem; }
.gy-2 { --gy: 0.65rem; } .gy-3 { --gy: 1rem; } .gy-4 { --gy: 1.35rem; }

.col { flex: 1 0 0%; width: auto; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-1  { flex: 0 0 auto; width: 8.333333%; }
.col-2  { flex: 0 0 auto; width: 16.666667%; }
.col-3  { flex: 0 0 auto; width: 25%; }
.col-4  { flex: 0 0 auto; width: 33.333333%; }
.col-5  { flex: 0 0 auto; width: 41.666667%; }
.col-6  { flex: 0 0 auto; width: 50%; }
.col-7  { flex: 0 0 auto; width: 58.333333%; }
.col-8  { flex: 0 0 auto; width: 66.666667%; }
.col-9  { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.333333%; }
.col-11 { flex: 0 0 auto; width: 91.666667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

@media (min-width: 576px) {
  .col-sm { flex: 1 0 0%; width: auto; }
  .col-sm-auto { flex: 0 0 auto; width: auto; }
  .col-sm-2  { flex: 0 0 auto; width: 16.666667%; }
  .col-sm-3  { flex: 0 0 auto; width: 25%; }
  .col-sm-4  { flex: 0 0 auto; width: 33.333333%; }
  .col-sm-5  { flex: 0 0 auto; width: 41.666667%; }
  .col-sm-6  { flex: 0 0 auto; width: 50%; }
  .col-sm-7  { flex: 0 0 auto; width: 58.333333%; }
  .col-sm-8  { flex: 0 0 auto; width: 66.666667%; }
  .col-sm-9  { flex: 0 0 auto; width: 75%; }
  .col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-sm-12 { flex: 0 0 auto; width: 100%; }
}
@media (min-width: 768px) {
  .col-md { flex: 1 0 0%; width: auto; }
  .col-md-auto { flex: 0 0 auto; width: auto; }
  .col-md-2  { flex: 0 0 auto; width: 16.666667%; }
  .col-md-3  { flex: 0 0 auto; width: 25%; }
  .col-md-4  { flex: 0 0 auto; width: 33.333333%; }
  .col-md-5  { flex: 0 0 auto; width: 41.666667%; }
  .col-md-6  { flex: 0 0 auto; width: 50%; }
  .col-md-7  { flex: 0 0 auto; width: 58.333333%; }
  .col-md-8  { flex: 0 0 auto; width: 66.666667%; }
  .col-md-9  { flex: 0 0 auto; width: 75%; }
  .col-md-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-md-12 { flex: 0 0 auto; width: 100%; }
}
@media (min-width: 992px) {
  .col-lg { flex: 1 0 0%; width: auto; }
  .col-lg-auto { flex: 0 0 auto; width: auto; }
  .col-lg-2  { flex: 0 0 auto; width: 16.666667%; }
  .col-lg-3  { flex: 0 0 auto; width: 25%; }
  .col-lg-4  { flex: 0 0 auto; width: 33.333333%; }
  .col-lg-5  { flex: 0 0 auto; width: 41.666667%; }
  .col-lg-6  { flex: 0 0 auto; width: 50%; }
  .col-lg-7  { flex: 0 0 auto; width: 58.333333%; }
  .col-lg-8  { flex: 0 0 auto; width: 66.666667%; }
  .col-lg-9  { flex: 0 0 auto; width: 75%; }
  .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-lg-12 { flex: 0 0 auto; width: 100%; }
  .offset-lg-1 { margin-left: 8.333333%; }
  .offset-lg-2 { margin-left: 16.666667%; }
  .order-lg-1 { order: 1 !important; }
  .order-lg-2 { order: 2 !important; }
  .order-lg-3 { order: 3 !important; }
}
@media (min-width: 1200px) {
  .col-xl { flex: 1 0 0%; width: auto; }
  .col-xl-auto { flex: 0 0 auto; width: auto; }
  .col-xl-2  { flex: 0 0 auto; width: 16.666667%; }
  .col-xl-3  { flex: 0 0 auto; width: 25%; }
  .col-xl-4  { flex: 0 0 auto; width: 33.333333%; }
  .col-xl-5  { flex: 0 0 auto; width: 41.666667%; }
  .col-xl-6  { flex: 0 0 auto; width: 50%; }
  .col-xl-7  { flex: 0 0 auto; width: 58.333333%; }
  .col-xl-8  { flex: 0 0 auto; width: 66.666667%; }
  .col-xl-9  { flex: 0 0 auto; width: 75%; }
  .col-xl-10 { flex: 0 0 auto; width: 83.333333%; }
  .col-xl-12 { flex: 0 0 auto; width: 100%; }
  .g-xl-4 { --gx: 1.35rem; --gy: 1.35rem; }
}
@media (min-width: 1400px) {
  .col-xxl-3 { flex: 0 0 auto; width: 25%; }
  .col-xxl-4 { flex: 0 0 auto; width: 33.333333%; }
  .col-xxl-6 { flex: 0 0 auto; width: 50%; }
  .col-xxl-8 { flex: 0 0 auto; width: 66.666667%; }
  .col-xxl-9 { flex: 0 0 auto; width: 75%; }
}

/* ---- 5. Lightweight Utilities ---- */
.d-none { display: none !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-grid { display: grid !important; }
.d-inline-grid { display: inline-grid !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
@media (min-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-block { display: block !important; }
  .d-sm-inline { display: inline !important; }
  .d-sm-inline-block { display: inline-block !important; }
  .d-sm-grid { display: grid !important; }
  .d-sm-inline-grid { display: inline-grid !important; }
  .d-sm-flex { display: flex !important; }
  .d-sm-inline-flex { display: inline-flex !important; }
}
@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-block { display: block !important; }
  .d-md-inline { display: inline !important; }
  .d-md-inline-block { display: inline-block !important; }
  .d-md-grid { display: grid !important; }
  .d-md-inline-grid { display: inline-grid !important; }
  .d-md-flex { display: flex !important; }
  .d-md-inline-flex { display: inline-flex !important; }
}
@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-lg-inline { display: inline !important; }
  .d-lg-grid { display: grid !important; }
  .d-lg-inline-grid { display: inline-grid !important; }
  .d-lg-flex { display: flex !important; }
  .d-lg-inline-flex { display: inline-flex !important; }
}
@media (min-width: 1200px) {
  .d-xl-none { display: none !important; }
  .d-xl-block { display: block !important; }
  .d-xl-inline-grid { display: inline-grid !important; }
  .d-xl-flex { display: flex !important; }
}

.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.flex-fill { flex: 1 1 auto !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-stretch { align-items: stretch !important; }
.align-self-start { align-self: flex-start !important; }
.align-self-center { align-self: center !important; }
.align-self-end { align-self: flex-end !important; }
.align-middle { vertical-align: middle !important; }
.align-top { vertical-align: top !important; }

.gap-0 { gap: 0 !important; }
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.9rem !important; }
.gap-4 { gap: 1.35rem !important; }
.gap-5 { gap: 2rem !important; }

/* Margin & Padding */
.m-0 { margin: 0 !important; } .m-1 { margin: 0.25rem !important; } .m-2 { margin: 0.5rem !important; } .m-3 { margin: 1rem !important; } .m-auto { margin: auto !important; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 0.25rem !important; } .mt-2 { margin-top: 0.5rem !important; } .mt-3 { margin-top: 1rem !important; } .mt-4 { margin-top: 1.4rem !important; } .mt-5 { margin-top: 2.25rem !important; } .mt-auto { margin-top: auto !important; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 0.25rem !important; } .mb-2 { margin-bottom: 0.5rem !important; } .mb-3 { margin-bottom: 1rem !important; } .mb-4 { margin-bottom: 1.4rem !important; } .mb-5 { margin-bottom: 2.25rem !important; }
.ms-0 { margin-left: 0 !important; } .ms-1 { margin-left: 0.25rem !important; } .ms-2 { margin-left: 0.5rem !important; } .ms-3 { margin-left: 1rem !important; } .ms-auto { margin-left: auto !important; }
.me-0 { margin-right: 0 !important; } .me-1 { margin-right: 0.25rem !important; } .me-2 { margin-right: 0.5rem !important; } .me-3 { margin-right: 1rem !important; } .me-auto { margin-right: auto !important; }
.mx-0 { margin-left: 0 !important; margin-right: 0 !important; } .mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; } .mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; } .mx-auto { margin-left: auto !important; margin-right: auto !important; }
.my-0 { margin-top: 0 !important; margin-bottom: 0 !important; } .my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; } .my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; } .my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; } .my-4 { margin-top: 1.4rem !important; margin-bottom: 1.4rem !important; }

.p-0 { padding: 0 !important; } .p-1 { padding: 0.25rem !important; } .p-2 { padding: 0.5rem !important; } .p-3 { padding: 1rem !important; } .p-4 { padding: 1.4rem !important; } .p-5 { padding: 2rem !important; }
.pt-0 { padding-top: 0 !important; } .pt-1 { padding-top: 0.25rem !important; } .pt-2 { padding-top: 0.5rem !important; } .pt-3 { padding-top: 1rem !important; } .pt-4 { padding-top: 1.4rem !important; }
.pb-0 { padding-bottom: 0 !important; } .pb-1 { padding-bottom: 0.25rem !important; } .pb-2 { padding-bottom: 0.5rem !important; } .pb-3 { padding-bottom: 1rem !important; } .pb-4 { padding-bottom: 1.4rem !important; }
.ps-0 { padding-left: 0 !important; } .ps-1 { padding-left: 0.25rem !important; } .ps-2 { padding-left: 0.5rem !important; } .ps-3 { padding-left: 1rem !important; } .ps-4 { padding-left: 1.4rem !important; }
.pe-0 { padding-right: 0 !important; } .pe-1 { padding-right: 0.25rem !important; } .pe-2 { padding-right: 0.5rem !important; } .pe-3 { padding-right: 1rem !important; } .pe-4 { padding-right: 1.4rem !important; } .pe-5 { padding-right: 2.5rem !important; }
.px-0 { padding-left: 0 !important; padding-right: 0 !important; } .px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; } .px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; } .px-3 { padding-left: 1rem !important; padding-right: 1rem !important; } .px-4 { padding-left: 1.4rem !important; padding-right: 1.4rem !important; }
.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; } .py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; } .py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; } .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; } .py-4 { padding-top: 1.4rem !important; padding-bottom: 1.4rem !important; } .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
@media (min-width: 768px) { .mt-md-0 { margin-top: 0 !important; } .mb-md-0 { margin-bottom: 0 !important; } .p-md-4 { padding: 1.5rem !important; } .text-md-end { text-align: right !important; } }
@media (min-width: 992px) { .p-lg-5 { padding: 2.25rem !important; } .mb-lg-0 { margin-bottom: 0 !important; } .mt-lg-0 { margin-top: 0 !important; } }

/* Sizing & Position */
.w-100 { width: 100% !important; } .w-75 { width: 75% !important; } .w-50 { width: 50% !important; } .w-auto { width: auto !important; }
.h-100 { height: 100% !important; } .mw-100 { max-width: 100% !important; } .min-w-0 { min-width: 0 !important; }
.position-relative { position: relative !important; } .position-absolute { position: absolute !important; } .position-fixed { position: fixed !important; } .position-sticky { position: sticky !important; }
.top-0 { top: 0 !important; } .end-0 { right: 0 !important; } .bottom-0 { bottom: 0 !important; } .start-0 { left: 0 !important; }
.overflow-hidden { overflow: hidden !important; } .overflow-auto { overflow: auto !important; } .overflow-x-auto { overflow-x: auto !important; } .overflow-y-auto { overflow-y: auto !important; }

/* Text & Fonts */
.text-start { text-align: left !important; } .text-center { text-align: center !important; } .text-end { text-align: right !important; }
.text-nowrap { white-space: nowrap !important; } .text-wrap { white-space: normal !important; } .text-break { word-wrap: break-word !important; word-break: break-word !important; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-uppercase { text-transform: uppercase !important; } .text-lowercase { text-transform: lowercase !important; } .text-capitalize { text-transform: capitalize !important; }
.text-decoration-none { text-decoration: none !important; } .text-reset { color: inherit !important; }
.fw-light { font-weight: 300 !important; } .fw-normal { font-weight: 400 !important; } .fw-medium { font-weight: 500 !important; } .fw-semibold { font-weight: 600 !important; } .fw-bold { font-weight: 700 !important; }
.fst-italic { font-style: italic !important; }
.lh-1 { line-height: 1 !important; } .lh-sm { line-height: 1.25 !important; } .lh-base { line-height: 1.5 !important; }
.fs-1 { font-size: 2rem !important; } .fs-2 { font-size: 1.55rem !important; } .fs-3 { font-size: 1.3rem !important; } .fs-4 { font-size: 1.15rem !important; } .fs-5 { font-size: 1rem !important; } .fs-6 { font-size: 0.875rem !important; }
.lead { font-size: 1.05rem; font-weight: 400; }
.font-monospace, .font-mono { font-family: var(--gs-font-mono) !important; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.user-select-all { user-select: all !important; }
.pe-none { pointer-events: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

/* Colors */
.text-body { color: var(--s-body-color) !important; }
.text-muted, .text-secondary, .text-body-secondary { color: var(--s-muted) !important; }
.text-primary, .link-primary { color: var(--s-primary) !important; }
.text-success { color: var(--s-success) !important; }
.text-danger { color: var(--s-danger) !important; }
.text-warning { color: var(--s-warning) !important; }
.text-info { color: var(--s-info) !important; }
.text-dark { color: var(--s-body-color) !important; }
.text-light { color: var(--gs-surface-muted) !important; }
.text-white { color: #ffffff !important; }
.text-white-50 { color: rgba(255, 255, 255, 0.72) !important; }

.bg-transparent { background-color: transparent !important; }
.bg-white { background-color: var(--gs-surface) !important; }
.bg-light { background-color: var(--gs-surface-muted) !important; }
.bg-dark { background-color: #181a19 !important; color: #f2f5f3; }
.bg-primary { background-color: var(--s-primary) !important; }
.bg-secondary { background-color: var(--s-secondary) !important; }
.bg-success { background-color: var(--s-success) !important; }
.bg-danger { background-color: var(--s-danger) !important; }
.bg-warning { background-color: var(--s-warning) !important; }
.bg-info { background-color: var(--s-info) !important; }
.bg-primary-subtle, .bg-light-primary { background-color: var(--s-primary-bg) !important; color: var(--s-primary-text); }
.bg-secondary-subtle, .bg-light-secondary { background-color: var(--s-secondary-bg-subtle) !important; color: var(--s-secondary-text); }
.bg-success-subtle, .bg-light-success { background-color: var(--s-success-bg) !important; color: var(--s-success-text); }
.bg-danger-subtle, .bg-light-danger { background-color: var(--s-danger-bg) !important; color: var(--s-danger-text); }
.bg-warning-subtle, .bg-light-warning { background-color: var(--s-warning-bg) !important; color: var(--s-warning-text); }
.bg-info-subtle, .bg-light-info { background-color: var(--s-info-bg) !important; color: var(--s-info-text); }
.bg-white.bg-opacity-10 { background-color: rgba(255, 255, 255, 0.12) !important; }
.bg-white.bg-opacity-25 { background-color: rgba(255, 255, 255, 0.25) !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-50 { opacity: 0.5 !important; }

/* Borders, Radius & Shadow */
.border { border: 1px solid var(--s-border) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--s-border) !important; }
.border-bottom { border-bottom: 1px solid var(--s-border) !important; }
.border-start { border-left: 1px solid var(--s-border) !important; }
.border-end { border-right: 1px solid var(--s-border) !important; }
.border-primary { border-color: var(--s-primary-border) !important; }
.border-success { border-color: var(--s-success-border) !important; }
.border-danger { border-color: var(--s-danger-border) !important; }
.border-warning { border-color: var(--s-warning-border) !important; }
.border-info { border-color: var(--s-info-border) !important; }
.rounded { border-radius: 0.75rem !important; }
.rounded-0 { border-radius: 0 !important; }
.rounded-1 { border-radius: 0.35rem !important; }
.rounded-2 { border-radius: 0.6rem !important; }
.rounded-3 { border-radius: 0.9rem !important; }
.rounded-4 { border-radius: 1.25rem !important; }
.rounded-pill { border-radius: 999px !important; }
.rounded-circle { border-radius: 50% !important; }
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--gs-shadow-panel) !important; }
.shadow { box-shadow: var(--gs-shadow-raised) !important; }
.shadow-lg { box-shadow: var(--gs-shadow-raised) !important; }
.float-end { float: right !important; }
.float-start { float: left !important; }
.list-unstyled { list-style: none; padding-left: 0; }

/* ---- 6. Solar Sage Components (Zero Bootstrap 5) ---- */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.52rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--s-body-color);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--gs-brand); outline-offset: 2px; }
.btn:disabled, .btn.disabled { opacity: 0.55; pointer-events: none; }
.btn.d-block, .btn.w-100.d-block { display: flex; width: 100%; }
.btn svg { width: 0.95rem; height: 0.95rem; flex: none; }
.btn i { line-height: 1; }

.btn-sm { padding: 0.34rem 0.78rem; font-size: 0.775rem; border-radius: 0.625rem; }
.btn-lg { padding: 0.72rem 1.5rem; font-size: 0.9375rem; border-radius: 0.875rem; }
.btn-xs { padding: 0.18rem 0.5rem; font-size: 0.72rem; border-radius: 0.5rem; }

.btn-primary {
  background: var(--s-primary);
  border-color: var(--s-primary);
  color: var(--gs-primary-fg);
  box-shadow: 0 4px 12px -4px rgba(var(--s-primary-rgb), 0.42);
}
.btn-primary:hover { background: var(--gs-primary-hover); border-color: var(--gs-primary-hover); color: var(--gs-primary-fg); }

.btn-secondary {
  background: var(--s-secondary-bg-subtle);
  border-color: var(--s-secondary-border);
  color: var(--s-secondary-text);
}
.btn-secondary:hover { background: var(--s-border); color: var(--s-body-color); }

.btn-success { background: var(--s-success); border-color: var(--s-success); color: #fff; }
.btn-success:hover { filter: brightness(0.92); color: #fff; }

.btn-danger { background: var(--s-danger); border-color: var(--s-danger); color: #fff; }
.btn-danger:hover { filter: brightness(0.92); color: #fff; }

.btn-warning { background: var(--s-warning); border-color: var(--s-warning); color: #fff; }
.btn-warning:hover { filter: brightness(0.92); color: #fff; }

.btn-info { background: var(--s-info); border-color: var(--s-info); color: #fff; }
.btn-info:hover { filter: brightness(0.92); color: #fff; }

.btn-dark { background: var(--gs-ink); border-color: var(--gs-ink); color: var(--gs-ink-fg); }
.btn-dark:hover { opacity: 0.9; color: var(--gs-ink-fg); }

.btn-light, .btn-outline-secondary {
  background: var(--gs-surface);
  border-color: var(--s-border);
  color: var(--s-body-color);
  box-shadow: var(--gs-shadow-control);
}
.btn-light:hover, .btn-outline-secondary:hover {
  background: var(--gs-surface-muted);
  border-color: var(--gs-input);
  color: var(--s-body-color);
}

.btn-outline-primary { background: var(--gs-surface); border-color: var(--s-primary); color: var(--s-primary); }
.btn-outline-primary:hover { background: var(--s-primary); border-color: var(--s-primary); color: var(--gs-primary-fg); }
.btn-outline-success { background: var(--gs-surface); border-color: var(--s-success-border); color: var(--s-success); }
.btn-outline-success:hover { background: var(--s-success-bg); color: var(--s-success-text); }
.btn-outline-danger { background: var(--gs-surface); border-color: var(--s-danger-border); color: var(--s-danger); }
.btn-outline-danger:hover { background: var(--s-danger-bg); color: var(--s-danger-text); }
.btn-outline-warning { background: var(--gs-surface); border-color: var(--s-warning-border); color: var(--s-warning-text); }
.btn-outline-warning:hover { background: var(--s-warning-bg); color: var(--s-warning-text); }
.btn-outline-info { background: var(--gs-surface); border-color: var(--s-info-border); color: var(--s-info); }
.btn-outline-info:hover { background: var(--s-info-bg); color: var(--s-info-text); }
.btn-outline-dark { background: transparent; border-color: var(--s-border); color: var(--s-body-color); }
.btn-outline-dark:hover { background: var(--gs-ink); border-color: var(--gs-ink); color: var(--gs-ink-fg); }
.btn-outline-light { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.22); color: #fff; }
.btn-link { background: transparent; border-color: transparent; color: var(--s-link); box-shadow: none; padding-left: 0.35rem; padding-right: 0.35rem; }
.btn-link:hover { color: var(--s-link-hover); text-decoration: underline; }

.gs-btn-ink {
  background: var(--gs-ink); border-color: var(--gs-ink); color: var(--gs-ink-fg);
  box-shadow: 0 4px 12px -4px rgba(24, 25, 27, 0.25);
}
.gs-btn-ink:hover { opacity: 0.88; color: var(--gs-ink-fg); }
.gs-btn-sage {
  background: var(--gs-sage-grad); border: 0; color: #fff;
  border-radius: 0.75rem; padding: 0.6rem 1.3rem; font-weight: 600; font-size: 0.8125rem;
  box-shadow: 0 6px 16px -6px rgba(67, 97, 82, 0.52);
}
.gs-btn-sage:hover { color: #fff; filter: brightness(1.06); }

.btn-group { display: inline-flex; vertical-align: middle; }
.btn-group > .btn { border-radius: 0; }
.btn-group > .btn:first-child { border-top-left-radius: 0.75rem; border-bottom-left-radius: 0.75rem; }
.btn-group > .btn:last-child { border-top-right-radius: 0.75rem; border-bottom-right-radius: 0.75rem; }
.btn-group > .btn:not(:first-child) { margin-left: -1px; }
.btn-group-sm > .btn { padding: 0.34rem 0.72rem; font-size: 0.775rem; }
.btn-group-sm > .btn:first-child { border-top-left-radius: 0.625rem; border-bottom-left-radius: 0.625rem; }
.btn-group-sm > .btn:last-child { border-top-right-radius: 0.625rem; border-bottom-right-radius: 0.625rem; }

.btn-close {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--s-muted);
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.btn-close::before { content: "\00d7"; font-size: 1.4rem; line-height: 1; font-weight: 400; }
.btn-close:hover { background: var(--gs-surface-muted); color: var(--s-body-color); }
.btn-close-white { color: rgba(255, 255, 255, 0.8); }
.btn-close-white:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* Forms */
.form-control, .form-select {
  display: block;
  width: 100%;
  padding: 0.52rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--s-body-color);
  background-color: var(--gs-surface);
  border: 1px solid var(--gs-input);
  border-radius: 0.75rem;
  appearance: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-select {
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%236c726f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 14px 14px;
}
.form-control-sm, .form-select-sm { padding: 0.34rem 0.68rem; font-size: 0.8rem; border-radius: 0.625rem; }
.form-select-sm { padding-right: 1.95rem; }
.form-control-lg, .form-select-lg { padding: 0.7rem 1rem; font-size: 0.95rem; border-radius: 0.85rem; }
.form-control::placeholder { color: var(--s-muted); opacity: 0.75; }
.form-control:disabled, .form-control[readonly], .form-select:disabled {
  background-color: var(--s-tertiary-bg);
  color: var(--s-muted);
  opacity: 0.9;
}
.form-control:focus, .form-select:focus,
.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(--s-primary-rgb), 0.14);
}
textarea.form-control { min-height: 4.5rem; resize: vertical; }
.form-control-color { width: 2.8rem; height: 2.25rem; padding: 0.25rem; cursor: pointer; }
.form-control-plaintext { display: block; width: 100%; padding: 0.45rem 0; color: var(--s-body-color); background: transparent; border: 0; }
.form-label, .col-form-label { font-size: 0.8125rem; font-weight: 600; color: var(--s-body-color); margin-bottom: 0.35rem; }
.col-form-label { padding-top: 0.5rem; padding-bottom: 0.5rem; margin-bottom: 0; line-height: 1.4; }
.form-text { display: block; margin-top: 0.25rem; font-size: 0.75rem; color: var(--s-muted); }
.is-invalid { border-color: var(--s-danger) !important; }
.is-valid { border-color: var(--s-success) !important; }
.invalid-feedback { display: none; width: 100%; margin-top: 0.25rem; font-size: 0.76rem; color: var(--s-danger); }
.is-invalid ~ .invalid-feedback, .was-validated :invalid ~ .invalid-feedback { display: block; }

/* Checkbox, Radio & Switch */
.form-check { display: flex; align-items: flex-start; gap: 0.5rem; min-height: 1.4rem; margin-bottom: 0.25rem; }
.form-check-inline { display: inline-flex; margin-right: 1rem; }
.form-check-label { font-size: 0.82rem; cursor: pointer; line-height: 1.4; }
.form-check-input {
  flex: none;
  width: 1.08rem;
  height: 1.08rem;
  margin-top: 0.14rem;
  vertical-align: top;
  background-color: var(--gs-surface);
  border: 1.5px solid var(--gs-input);
  border-radius: 0.35rem;
  appearance: none;
  cursor: pointer;
  transition: background-color 0.14s ease, border-color 0.14s ease;
}
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input:hover { border-color: var(--s-primary); }
.form-check-input:focus-visible { outline: 2px solid var(--gs-brand); outline-offset: 2px; }
.form-check-input:checked {
  background-color: var(--s-primary);
  border-color: var(--s-primary);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 72%;
}
.form-check-input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E");
}
.form-check-input[type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='4' fill='%23ffffff'/%3E%3C/svg%3E");
}
.form-switch .form-check-input {
  width: 2.15rem;
  height: 1.2rem;
  border-radius: 999px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%238c9490'/%3E%3C/svg%3E");
  background-position: left center;
  background-size: contain;
  background-repeat: no-repeat;
  transition: background-position 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}
.form-switch .form-check-input:checked {
  background-position: right center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23ffffff'/%3E%3C/svg%3E");
}

/* Input Groups */
.input-group { position: relative; display: flex; flex-wrap: nowrap; align-items: stretch; width: 100%; }
.input-group > .form-control, .input-group > .form-select { position: relative; flex: 1 1 auto; width: 1%; min-width: 0; }
.input-group-text {
  display: flex; align-items: center; padding: 0.45rem 0.78rem;
  font-size: 0.82rem; font-weight: 500; color: var(--s-muted); white-space: nowrap;
  background: var(--gs-surface-muted); border: 1px solid var(--gs-input); border-radius: 0.75rem;
}
.input-group-sm > .form-control, .input-group-sm > .form-select, .input-group-sm > .input-group-text, .input-group-sm > .btn {
  padding: 0.34rem 0.65rem; font-size: 0.8rem;
}
.input-group > :not(:first-child) { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group:focus-within .input-group-text { border-color: var(--gs-brand); }

/* Crisp Pure-White Bento Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: var(--gs-surface);
  border: 1px solid var(--s-border-soft);
  border-radius: 1.375rem;
  box-shadow: var(--gs-shadow-panel);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1.15rem 1.35rem 0.85rem;
  background: transparent;
  border-bottom: 1px solid var(--s-border-soft);
  border-radius: 1.375rem 1.375rem 0 0;
}
.card-header > * { min-width: 0; }
.card-header h5, .card-header h6, .card-title { margin-bottom: 0; font-size: 0.98rem; font-weight: 600; letter-spacing: -0.015em; }
.card-header h6 > i:first-child, .card-header h5 > i:first-child { color: var(--gs-brand); }
.card-subtitle, .gs-card-sub { color: var(--s-muted); font-size: 0.8125rem; }
.card-body { flex: 1 1 auto; padding: 1.25rem 1.35rem; }
.card-footer { padding: 0.9rem 1.35rem; background: transparent; border-top: 1px solid var(--s-border-soft); border-radius: 0 0 1.375rem 1.375rem; }
.card-header.bg-white, .card-footer.bg-white { background-color: transparent !important; }
.card-header.bg-light, .card-footer.bg-light { background-color: var(--gs-surface-muted) !important; }
.gs-well { padding: 1.1rem; border-radius: 1.125rem; background: var(--gs-surface-muted); border: 1px solid var(--s-border-soft); }

/* Clean Airy Tables */
.table-responsive { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: inherit; }
.table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
  color: var(--s-body-color);
  font-size: 0.825rem;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.table > thead > tr > th, .table > thead th {
  font-family: var(--gs-font-mono);
  font-size: 0.675rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--s-muted);
  text-align: left;
  white-space: nowrap;
  padding: 0.72rem 1.15rem;
  border-bottom: 1px solid var(--s-border);
  background: transparent;
}
.table > thead.table-light th { background: var(--gs-surface-muted); }
.table > tbody > tr > td, .table > tbody > tr > th {
  padding: 0.82rem 1.15rem;
  border-bottom: 1px solid color-mix(in srgb, var(--s-border) 68%, transparent);
  vertical-align: middle;
}
.table > tbody > tr:last-child > td, .table > tbody > tr:last-child > th { border-bottom: 0; }
.table-sm > thead > tr > th, .table-sm > tbody > tr > td, .table-sm > tbody > tr > th { padding: 0.56rem 0.95rem; font-size: 0.79rem; }
.table-hover > tbody > tr:hover > td, .table-hover > tbody > tr:hover > th { background-color: var(--gs-row-hover); }
.table-striped > tbody > tr:nth-of-type(odd) > td { background-color: color-mix(in srgb, var(--gs-surface-muted) 60%, transparent); }
.table-bordered th, .table-bordered td { border: 1px solid var(--s-border); }
.table-borderless th, .table-borderless td { border: 0 !important; }
.table-nowrap th, .table-nowrap td { white-space: nowrap; }
.table-centered th, .table-centered td { vertical-align: middle !important; }

/* Soft Pill Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.28em 0.72em;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  vertical-align: baseline;
  font-variant-numeric: tabular-nums;
}
.badge.bg-primary, .badge.text-bg-primary { background-color: var(--s-primary-bg) !important; color: var(--s-primary-text) !important; }
.badge.bg-secondary, .badge.text-bg-secondary { background-color: var(--s-secondary-bg-subtle) !important; color: var(--s-secondary-text) !important; }
.badge.bg-success, .badge.text-bg-success { background-color: var(--s-success-bg) !important; color: var(--s-success-text) !important; }
.badge.bg-info, .badge.text-bg-info { background-color: var(--s-info-bg) !important; color: var(--s-info-text) !important; }
.badge.bg-warning, .badge.text-bg-warning { background-color: var(--s-warning-bg) !important; color: var(--s-warning-text) !important; }
.badge.bg-danger, .badge.text-bg-danger { background-color: var(--s-danger-bg) !important; color: var(--s-danger-text) !important; }
.badge.bg-dark, .badge.text-bg-dark { background-color: var(--gs-ink) !important; color: var(--gs-ink-fg) !important; }
.badge.bg-light, .badge.text-bg-light { background-color: var(--gs-surface-muted) !important; color: var(--s-body-color) !important; border: 1px solid var(--s-border); }
.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-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(--s-body-color); background-color: var(--gs-surface); border: 1px solid var(--s-border); }

/* High-contrast status badges inside hero cards follow semantic Solar tokens */
.cust-hero .badge.bg-success, .cust-pending .badge.bg-success, .tk-gradient .badge.bg-success { background-color: var(--s-success-bg) !important; color: var(--s-success-text) !important; }
.cust-hero .badge.bg-danger, .cust-pending .badge.bg-danger, .tk-gradient .badge.bg-danger { background-color: var(--s-danger-bg) !important; color: var(--s-danger-text) !important; }
.cust-hero .badge.bg-warning, .cust-pending .badge.bg-warning, .tk-gradient .badge.bg-warning { background-color: var(--s-warning-bg) !important; color: var(--s-warning-text) !important; }
.cust-hero .badge.bg-secondary, .cust-pending .badge.bg-secondary, .tk-gradient .badge.bg-secondary { background-color: var(--s-secondary-bg-subtle) !important; color: var(--s-secondary-text) !important; }

/* Alerts */
.alert {
  position: relative;
  padding: 0.85rem 1.05rem;
  margin-bottom: 1rem;
  border: 1px solid var(--s-border);
  border-radius: 1rem;
  font-size: 0.83rem;
  background: var(--gs-surface-muted);
  color: var(--s-body-color);
}
.alert-primary { background: var(--s-primary-bg); border-color: var(--s-primary-border); color: var(--s-primary-text); }
.alert-success, .alert--success { background: var(--s-success-bg); border-color: var(--s-success-border); color: var(--s-success-text); }
.alert-info, .alert--info { background: var(--s-info-bg); border-color: var(--s-info-border); color: var(--s-info-text); }
.alert-warning, .alert--warning { background: var(--s-warning-bg); border-color: var(--s-warning-border); color: var(--s-warning-text); }
.alert-danger, .alert--danger, .alert--error { background: var(--s-danger-bg); border-color: var(--s-danger-border); color: var(--s-danger-text); }
.alert-light, .alert-secondary { background: var(--gs-surface-muted); border-color: var(--s-border); color: var(--s-body-color); }
.alert-dismissible { padding-right: 2.75rem; }
.alert-dismissible .btn-close { position: absolute; top: 0.55rem; right: 0.65rem; }

/* Modals (Zero Bootstrap, no focus-trap conflict with SweetAlert2!) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
  padding: 1rem;
  background: rgba(18, 22, 20, 0.48);
  backdrop-filter: blur(3px);
}
.modal.show { display: flex; align-items: flex-start; justify-content: center; }
.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: auto;
  pointer-events: auto;
  animation: gs-modal-in 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes gs-modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.modal-sm { max-width: 360px; }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 1120px; }
.modal-dialog-centered { margin: auto; }
.modal-dialog-scrollable { max-height: calc(100vh - 2rem); display: flex; }
.modal-dialog-scrollable .modal-content { max-height: 100%; overflow: hidden; }
.modal-dialog-scrollable .modal-body { overflow-y: auto; }
@media (max-width: 575.98px) {
  .modal-fullscreen-sm-down { max-width: none; width: 100%; margin: 0; height: 100%; }
  .modal-fullscreen-sm-down .modal-content { min-height: 100%; border-radius: 1rem; }
}
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--gs-surface);
  color: var(--s-body-color);
  border: 1px solid var(--s-border);
  border-radius: 1.375rem;
  box-shadow: var(--gs-shadow-raised);
  outline: 0;
}
.modal-header {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid var(--s-border);
}
.modal-title { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.3; }
.modal-body { position: relative; flex: 1 1 auto; padding: 1.25rem 1.35rem; }
.modal-footer {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.9rem 1.35rem;
  border-top: 1px solid var(--s-border);
}
body.modal-open { overflow: hidden; }

/* Dropdowns */
.dropdown, .dropup { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1055;
  display: none;
  min-width: 190px;
  padding: 0.42rem;
  margin: 0;
  list-style: none;
  font-size: 0.825rem;
  color: var(--s-body-color);
  background: var(--gs-surface);
  border: 1px solid var(--s-border);
  border-radius: 1.125rem;
  box-shadow: var(--gs-shadow-raised);
}
.dropdown-menu-end { left: auto; right: 0; }
.dropup .dropdown-menu { top: auto; bottom: calc(100% + 6px); }
.dropdown-menu.show { display: block; animation: gs-modal-in 0.14s ease; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.48rem 0.75rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: var(--s-body-color);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.dropdown-item i { font-size: 1.05rem; opacity: 0.82; }
.dropdown-item:hover { background: var(--gs-surface-muted); color: var(--s-body-color); }
.dropdown-item.active { background: var(--gs-soft); color: var(--gs-soft-fg); font-weight: 600; }
.dropdown-divider { height: 0; margin: 0.35rem 0; border-top: 1px solid var(--s-border); }
.dropdown-header { display: block; padding: 0.35rem 0.75rem; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--s-muted); }

/* Navs, Tabs & Pills */
.nav { display: flex; flex-wrap: wrap; padding-left: 0; margin-bottom: 0; list-style: none; gap: 0.25rem; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 0.9rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--s-muted);
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link:hover { color: var(--s-body-color); background: var(--gs-surface-muted); }
.nav-link.active { color: var(--gs-soft-fg); background: var(--gs-soft); font-weight: 600; }
.nav-tabs { border-bottom: 1px solid var(--s-border); gap: 0.2rem; }
.nav-tabs .nav-link { border-radius: 0.75rem 0.75rem 0 0; margin-bottom: -1px; border: 1px solid transparent; }
.nav-tabs .nav-link.active { background: var(--gs-surface); border-color: var(--s-border) var(--s-border) var(--gs-surface); color: var(--gs-brand); }
.nav-pills .nav-link.active { background: var(--gs-soft); color: var(--gs-soft-fg); font-weight: 600; }
.tab-content > .tab-pane { display: none; }
.tab-content > .active { display: block; }
.fade { transition: opacity 0.15s linear; }

/* Collapse & Accordion */
.collapse:not(.show) { display: none; }
.accordion-item { background: var(--gs-surface); border: 1px solid var(--s-border); border-radius: 1rem; margin-bottom: 0.65rem; overflow: hidden; }
.accordion-header { margin: 0; }
.accordion-button {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 0.9rem 1.15rem; font-size: 0.875rem; font-weight: 600; color: var(--s-body-color);
  background: transparent; border: 0; text-align: left; cursor: pointer;
}
.accordion-button:hover { background: var(--gs-surface-muted); }
.accordion-body { padding: 0.9rem 1.15rem; border-top: 1px solid var(--s-border-soft); }

/* Pagination, Progress, Spinners, List Groups, Breadcrumbs */
.pagination { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; gap: 0.25rem; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2rem; height: 2rem; padding: 0 0.6rem;
  border-radius: 999px; border: 1px solid transparent;
  background: transparent; color: var(--s-muted);
  font-family: var(--gs-font-mono); font-size: 0.78rem; font-weight: 500;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.page-link:hover { background: var(--gs-accent); color: var(--s-body-color); }
.page-item.active .page-link, .page-link.active { background: var(--gs-ink); color: var(--gs-ink-fg); border-color: var(--gs-ink); }
.page-item.disabled .page-link { opacity: 0.45; pointer-events: none; }

.progress { display: flex; height: 8px; overflow: hidden; background: var(--gs-accent); border-radius: 999px; }
.progress-bar { display: flex; flex-direction: column; justify-content: center; overflow: hidden; color: #fff; text-align: center; white-space: nowrap; background: var(--gs-brand); transition: width 0.35s ease; }

.spinner-border {
  display: inline-block; width: 1.5rem; height: 1.5rem; vertical-align: -0.15em;
  border: 0.18em solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: tk-spin 0.7s linear infinite;
}
.spinner-border-sm { width: 0.95rem; height: 0.95rem; border-width: 0.15em; }
@keyframes tk-spin { to { transform: rotate(360deg); } }
.spin { animation: tk-spin 1s linear infinite; display: inline-block; }

.list-group { display: flex; flex-direction: column; padding-left: 0; margin-bottom: 0; border-radius: 1rem; overflow: hidden; }
.list-group-item { position: relative; display: block; padding: 0.7rem 1rem; color: var(--s-body-color); background: var(--gs-surface); border: 1px solid var(--s-border); }
.list-group-item + .list-group-item { border-top: 0; }
.list-group-flush .list-group-item { border-left: 0; border-right: 0; border-radius: 0; }
.list-group-flush .list-group-item:first-child { border-top: 0; }
.list-group-flush .list-group-item:last-child { border-bottom: 0; }
.list-group-item-action:hover { background: var(--gs-surface-muted); }
.list-group-item.active { background: var(--gs-soft); color: var(--gs-soft-fg); border-color: var(--s-primary-border); font-weight: 600; }

.breadcrumb { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; font-size: 0.78rem; color: var(--s-muted); gap: 0.35rem; }
.breadcrumb-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.breadcrumb-item + .breadcrumb-item::before { content: "/"; color: var(--s-muted); opacity: 0.65; }
.breadcrumb-item a { color: var(--s-muted); }
.breadcrumb-item a:hover { color: var(--s-body-color); }
.breadcrumb-item.active { color: var(--s-body-color); font-weight: 500; }

/* Custom Tooltip */
.gs-tooltip {
  position: fixed; z-index: 1095; padding: 0.35rem 0.65rem; border-radius: 0.55rem;
  background: var(--gs-ink); color: var(--gs-ink-fg); font-size: 0.74rem; font-weight: 500;
  max-width: 260px; pointer-events: none; box-shadow: var(--gs-shadow-raised);
  opacity: 0; transition: opacity 0.12s ease;
}
.gs-tooltip.show { opacity: 1; }

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

.gs-rail-col { display: none; }

/* Floating vertical icon rail (goskeleton-rauke 3-pill architecture, flyout-only without desktop sidebar) */
.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;
}
[data-theme="dark"] .gs-rail,
[data-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-bg, var(--gs-brand));
  color: var(--gs-rail-brand-fg, #ffffff);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  flex: none;
  transition: filter 0.15s ease, transform 0.14s ease;
}
.gs-rail-brand:hover {
  color: var(--gs-rail-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 i { font-size: 1.2rem; line-height: 1; }
.gs-rail-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.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.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(--s-border);
  color: var(--s-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(--s-body-color);
  border-color: var(--gs-brand);
  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(--s-muted);
  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(--gs-brand) 60%, var(--s-body-color));
  flex: none;
}
.gs-meter-rail-ticks > span.is-zero { background: var(--s-border); }
.gs-meter-rail-ticks > span.is-current { background: var(--gs-brand); }

/* 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 i { font-size: 1.3rem; line-height: 1; }
.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 Flyout Submenu beside the Pill Rail */
.gs-rail-flyout {
  position: absolute;
  left: calc(100% + 12px);
  top: -6px;
  z-index: 1050;
  min-width: 224px;
  max-height: 78vh;
  overflow-y: auto;
  padding: 0.55rem;
  border-radius: 1.125rem;
  background: var(--gs-surface);
  border: 1px solid var(--s-border);
  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--up { top: auto; bottom: -6px; }
.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(--s-muted);
}
.gs-rail-flyout a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.46rem 0.68rem;
  border-radius: 0.7rem;
  color: var(--s-body-color);
  font-size: 0.815rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}
.gs-rail-flyout a i { font-size: 1rem; color: var(--s-muted); }
.gs-rail-flyout a:hover { background: var(--gs-surface-muted); color: var(--s-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 i { color: var(--gs-soft-fg); }

/* Rail Labels Mode */
.gs-rail-label { display: none; }
html[data-rail-labels="true"] .gs-rail { width: 100%; border-radius: 1.5rem; padding: 0.5rem 0.35rem; }
html[data-rail-labels="true"] .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; }
html[data-rail-labels="true"] .gs-rail-item.is-active::before { left: -0.35rem; }
html[data-rail-labels="true"] .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;
}
html[data-rail-labels="true"] .gs-rail-prefs { width: 100%; }

/* Mobile Slide-in Navigation Drawer (Zero Bootstrap Offcanvas) */
.gs-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 286px;
  max-width: 86vw;
  z-index: 1070;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  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;
  box-shadow: var(--gs-shadow-raised);
  transform: translateX(-105%);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
html.sb-open .gs-sidebar { transform: translateX(0); }
html.sb-open { overflow: hidden; }
.gs-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1065;
  background: rgba(18, 22, 20, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
html.sb-open .gs-backdrop { opacity: 1; visibility: visible; }
@media (min-width: 992px) {
  .gs-sidebar, .gs-backdrop { display: none !important; }
}

.gs-brand {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.2rem 0.3rem;
  color: var(--gs-sidebar-text-strong); flex: none;
}
.gs-brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 0.8rem; background: var(--gs-sage-grad); color: #fff;
  font-weight: 700; font-size: 0.85rem; flex: none;
}
.gs-brand-mark--sm { width: 30px; height: 30px; font-size: 0.72rem; border-radius: 0.65rem; }
.gs-brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.gs-brand-text strong { font-size: 0.92rem; font-weight: 700; letter-spacing: -0.02em; }
.gs-brand-text small { color: var(--gs-sidebar-muted); font-size: 0.72rem; }

.gs-nav {
  display: flex; flex-direction: column; gap: 0.12rem;
  flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 0.75rem;
}
.gs-nav-label {
  margin: 0.85rem 0 0.22rem; 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.6rem;
  padding: 0.48rem 0.75rem; border-radius: 0.75rem;
  font-size: 0.84rem; font-weight: 500; color: var(--gs-sidebar-text);
}
.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; }

/* Collapsible Mobile Sidebar Groups (Accordion) */
.gs-nav-group { margin: 0.14rem 0; }
.gs-nav-group-toggle {
  display: flex; align-items: center; gap: 0.6rem;
  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 > i:first-child { font-size: 1.05rem; opacity: 0.9; 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-count {
  font-family: var(--gs-font-mono); font-size: 0.66rem; font-weight: 600;
  padding: 0.08rem 0.42rem; border-radius: 999px;
  background: var(--gs-sidebar-card); color: var(--gs-sidebar-muted);
}
.gs-nav-group-caret {
  font-size: 0.78rem; 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; }

/* Floating Auto-Fullscreen Resume Pill */
.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: #fff;
  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-size: 0.82rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
}
.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.6rem; border-top: 1px solid var(--gs-sidebar-border); }
.gs-user-card {
  display: flex; align-items: center; gap: 0.6rem; 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.6rem; 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.71rem; color: var(--gs-sidebar-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Main Panel & Topbar */
.gs-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; gap: 1.15rem; }
.gs-topbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.9rem; padding: 0.15rem 0; }
.gs-topbar-title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 14rem; }
.gs-topbar-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem; font-size: 0.76rem; color: var(--s-muted); margin-bottom: 0.2rem; }
.gs-topbar-crumbs a { color: inherit; }
.gs-topbar-crumbs a:hover { color: var(--s-body-color); }
.gs-topbar-title h1 {
  margin: 0; font-size: 1.65rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gs-topbar-sub { margin: 0.22rem 0 0; font-size: 0.82rem; color: var(--s-muted); }
.gs-topbar-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.gs-topbar-tools { display: flex; align-items: center; gap: 0.55rem; }

/* Circular White Topbar Icon Buttons */
.gs-icon-btn, .tk-icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--s-border-soft);
  border-radius: 50%;
  background: var(--gs-surface);
  color: var(--s-body-color);
  font-size: 1.18rem;
  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, .tk-icon-btn:hover {
  background: var(--gs-surface);
  color: var(--gs-brand);
  transform: translateY(-1px);
  box-shadow: var(--gs-shadow-panel);
}
.gs-icon-btn svg, .tk-icon-btn svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gs-theme-launcher-fill { fill: currentColor !important; stroke: none !important; }

.tk-mode-toggle .i-dark { display: none; }
[data-theme="dark"] .tk-mode-toggle .i-light,
[data-bs-theme="dark"] .tk-mode-toggle .i-light { display: none; }
[data-theme="dark"] .tk-mode-toggle .i-dark,
[data-bs-theme="dark"] .tk-mode-toggle .i-dark { display: inline-block; }

/* Floating White Pill Search Bar */
.gs-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  height: 44px;
  min-width: 15.5rem;
  padding: 0.22rem 0.25rem 0.22rem 1.15rem;
  border: 1px solid var(--s-border-soft);
  border-radius: 999px;
  background: var(--gs-surface);
  color: var(--s-muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: var(--gs-shadow-control);
  transition: box-shadow 0.16s ease, color 0.16s ease;
}
.gs-search-trigger:hover { color: var(--s-body-color); box-shadow: var(--gs-shadow-panel); }
.gs-search-trigger-text { flex: 1; text-align: left; }
.gs-search-trigger-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; 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: 0.95rem; height: 0.95rem; fill: none; stroke: currentColor; stroke-width: 2; }

/* Contextual Horizontal Pill Subnav (single-row scroller + caret arrows) */
.gs-subnav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.32rem;
  border-radius: 999px;
  background: var(--gs-surface);
  border: 1px solid var(--s-border-soft);
  box-shadow: var(--gs-shadow-control);
  align-self: flex-start;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.gs-subnav-track {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  flex: 1 1 auto;
  border-radius: 999px;
}
.gs-subnav-track::-webkit-scrollbar { display: none; }
.gs-subnav-track.is-dragging {
  scroll-behavior: auto;
  cursor: grabbing;
  user-select: none;
}
.gs-subnav-track.is-dragging a { pointer-events: none; }
.gs-subnav.can-scroll-left .gs-subnav-track {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 100%);
}
.gs-subnav.can-scroll-right .gs-subnav-track {
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
}
.gs-subnav.can-scroll-left.can-scroll-right .gs-subnav-track {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}
.gs-subnav-arrow {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--s-border-soft);
  background: var(--gs-surface);
  color: var(--s-heading);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.12s ease;
}
.gs-subnav-arrow[hidden] { display: none !important; }
.gs-subnav-arrow:hover:not(:disabled) { background: var(--gs-surface-muted); color: var(--gs-brand); }
.gs-subnav-arrow:active:not(:disabled) { transform: scale(0.92); }
.gs-subnav-arrow:disabled { opacity: 0.3; cursor: default; }
.gs-subnav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.88rem;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--s-muted);
  white-space: nowrap;
  flex: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.gs-subnav a:hover { background: var(--gs-surface-muted); color: var(--s-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.1rem; width: 100%; min-width: 0; }
.gs-content > .container-fluid,
.gs-content main > .container-fluid { padding-left: 0; padding-right: 0; }
.gs-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem;
  padding: 0.65rem 0.25rem 0;
  font-family: var(--gs-font-mono); font-size: 0.7rem; color: var(--s-muted);
}
.gs-footer a { color: var(--s-muted); }
.gs-footer a:hover { color: var(--gs-brand); }

/* Desktop Grid Shell */
@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;
  }
  html[data-rail-labels="true"] .gs-app { 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);
  }
}

/* ---- 8. 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: 580px; background: var(--gs-surface); border: 1px solid var(--s-border); border-radius: 1.375rem; box-shadow: var(--gs-shadow-raised); overflow: hidden; }
.gs-search-field { display: flex; align-items: center; gap: 0.65rem; padding: 0.9rem 1.15rem; border-bottom: 1px solid var(--s-border); }
.gs-search-field i { font-size: 1.15rem; color: var(--s-muted); }
.gs-search-field input { flex: 1; border: 0; background: transparent; color: var(--s-body-color); font: inherit; font-size: 0.92rem; outline: none; }
.gs-search-results { list-style: none; margin: 0; padding: 0.45rem; max-height: 52vh; overflow-y: auto; }
.gs-search-result { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.8rem; border-radius: 0.75rem; color: var(--s-body-color); }
.gs-search-result:hover, .gs-search-result.is-active { background: var(--gs-surface-muted); color: var(--s-body-color); }
.gs-search-type { font-family: var(--gs-font-mono); 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; white-space: nowrap; font-weight: 600; }
.gs-search-body { display: flex; flex-direction: column; min-width: 0; }
.gs-search-body strong { font-size: 0.84rem; }
.gs-search-body small { color: var(--s-muted); font-size: 0.72rem; }
.gs-search-hint { margin: 0; padding: 0.85rem 1.15rem; color: var(--s-muted); font-size: 0.76rem; }
html.search-open { overflow: hidden; }

/* ---- 9. Native <dialog> Theme Customizer ---- */
.gs-theme-dialog {
  width: min(28rem, calc(100vw - 2rem));
  max-height: calc(100vh - 3rem);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--s-border);
  border-radius: 1.375rem;
  background: var(--gs-surface);
  color: var(--s-body-color);
  box-shadow: var(--gs-shadow-raised);
  margin: auto;
}
.gs-theme-dialog::backdrop { background: rgba(18, 22, 20, 0.48); backdrop-filter: blur(3px); }
.gs-theme-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1.15rem 1.35rem 0; }
.gs-theme-dialog-head h2 { font-size: 1.1rem; margin: 0; }
.gs-theme-dialog-close {
  display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0;
  border-radius: 50%; background: transparent; color: var(--s-muted); font-size: 1.3rem; line-height: 1; cursor: pointer;
}
.gs-theme-dialog-close:hover { background: var(--gs-surface-muted); color: var(--s-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-family: var(--gs-font-mono); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--s-muted); }
.gs-theme-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.55rem; }
.gs-theme-choice {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.68rem 0.75rem; border: 1px solid var(--s-border); border-radius: 0.85rem;
  background: var(--gs-surface); color: var(--s-muted); font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.gs-theme-choice:hover { background: var(--gs-surface-muted); color: var(--s-body-color); }
.gs-theme-choice.is-active { border-color: var(--s-primary); background: var(--s-primary-bg); color: var(--s-primary-text); }
.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.58rem; padding: 0.58rem 0.78rem;
  border: 1px solid var(--s-border); border-radius: 0.85rem;
  background: var(--gs-surface); color: var(--s-muted); font-size: 0.8125rem; font-weight: 600; text-align: left; cursor: pointer;
}
.gs-theme-palette:hover { background: var(--gs-surface-muted); color: var(--s-body-color); }
.gs-theme-palette.is-active { border-color: var(--s-primary); background: var(--s-primary-bg); color: var(--s-primary-text); }
.gs-theme-palette-dot { width: 1.1rem; height: 1.1rem; 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.6rem; }
.gs-theme-swatch { width: 2rem; height: 2rem; padding: 0; border: 1px solid var(--s-border); 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(--s-primary); }
.gs-theme-dialog-hint { margin: 0.55rem 0 0; font-size: 0.72rem; color: var(--s-muted); }

/* ---- 10. Solar Sage Bento Dashboard Widgets ---- */
.gs-bento-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.05rem; }
@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.15rem 1.3rem; border-radius: 1.375rem;
  background: var(--gs-surface); border: 1px solid var(--s-border-soft);
  box-shadow: var(--gs-shadow-panel); min-height: 98px; color: var(--s-body-color);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.gs-kpi-card:hover { transform: translateY(-2px); box-shadow: var(--gs-shadow-raised); color: var(--s-body-color); }
.gs-kpi-card-left { display: flex; align-items: center; gap: 0.88rem; min-width: 0; }
.gs-kpi-label { display: block; font-size: 0.77rem; font-weight: 500; color: var(--s-muted); margin-bottom: 0.18rem; white-space: nowrap; }
.gs-kpi-num { display: block; font-size: 1.52rem; font-weight: 700; line-height: 1.12; letter-spacing: -0.03em; color: var(--s-heading); font-variant-numeric: tabular-nums; }
.gs-kpi-sub { display: block; font-size: 0.72rem; color: var(--s-muted); margin-top: 0.2rem; }
.gs-kpi-circle { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; flex: none; font-size: 1.25rem; }
.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--coral { background: var(--gs-coral-bg); color: var(--gs-coral-fg); }
.gs-kpi-circle--info { background: var(--s-info-bg); color: var(--s-info); }

.gs-mini-capsules { display: flex; align-items: flex-end; gap: 5px; height: 44px; flex: none; }
.gs-mini-capsule-track { 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); }
.gs-mini-capsule-fill.is-active { background: var(--gs-brand-dark); }
svg.gs-mini-spark { width: 64px; height: 34px; overflow: visible; flex: none; }

.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:hover { color: #ffffff; }
.gs-kpi-card--featured .gs-kpi-label, .gs-kpi-card--featured .gs-kpi-sub { color: rgba(255, 255, 255, 0.78); }
.gs-kpi-card--featured .gs-kpi-num { color: #ffffff; }

.gs-bento-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1.05rem; 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); } }

.gs-cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.gs-cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.05rem; }
.gs-cols-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.05rem; }
@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-inset-stat { padding: 0.9rem 1.1rem; border-radius: 1rem; background: var(--gs-surface); border: 1px solid var(--s-border-soft); box-shadow: var(--gs-shadow-panel); }
.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.24);
}
.gs-impersonation {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1.15rem; border-radius: 1.125rem;
  background: var(--s-warning-bg); color: var(--s-warning-text);
  font-size: 0.82rem; border: 1px solid var(--s-warning-border);
}
.gs-impersonation-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--s-warning); flex: none; }

.gs-avatar {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--gs-soft); color: var(--gs-soft-fg);
  font-size: 0.75rem; font-weight: 700; flex: none; overflow: hidden;
}
img.gs-avatar { object-fit: cover; display: block; border: 1px solid var(--s-border); }
.gs-avatar--lg { width: 48px; height: 48px; font-size: 1rem; }

/* ---- 11. 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: 20; }
.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(--s-border-soft);
  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.1rem 2.85rem;
  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-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.26; }
.gs-auth-hero-art svg { display: block; width: 100%; height: 100%; }
.gs-auth-hero > :not(.gs-auth-hero-art) { position: relative; z-index: 1; }
.gs-auth-hero h1 { font-size: 2.05rem; letter-spacing: -0.03em; color: #ffffff; margin: 0; }
.gs-auth-hero > p { color: var(--gs-hero-soft); font-size: 0.87rem; max-width: 36ch; margin: 0; }
.gs-auth-hero-list { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.62rem; font-size: 0.82rem; color: var(--gs-hero-text); }
.gs-auth-hero-list li { position: relative; padding-left: 1.35rem; }
.gs-auth-hero-list li::before {
  content: ""; position: absolute; left: 0; top: 0.42rem; width: 7px; height: 7px;
  border-radius: 50%; background: var(--gs-hero-soft); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}
.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 img { width: 36px; height: 36px; display: block; }
.gs-auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 2.65rem 2.5rem; }
.gs-auth-panel-footer { margin-top: 1.6rem; text-align: center; font-size: 0.74rem; color: var(--s-muted); }
.gs-auth-panel .form-group.row { margin-left: 0; margin-right: 0; margin-bottom: 0.65rem !important; }
.gs-auth-panel .form-group.row > [class*="col-sm-"] { flex: 0 0 100%; max-width: 100%; width: 100%; padding-left: 0; padding-right: 0; }
.gs-auth-panel .form-group.row > .col-form-label { text-align: left !important; padding-top: 0; padding-bottom: 0.3rem; }
.gs-auth-panel h2 { font-size: 1.5rem; letter-spacing: -0.025em; }
.gs-auth-panel h2.text-primary { color: var(--s-heading) !important; }
@media (max-width: 991.98px) {
  .gs-auth-shell { grid-template-columns: 1fr; }
  .gs-auth-hero { display: none; }
  .gs-auth-panel { padding: 2rem 1.45rem; }
}

/* ---- 12. Compatibility Layer for Existing TikHub Views ---- */
.tk-brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 700; font-size: 1.28rem; letter-spacing: -0.03em; line-height: 1;
  white-space: nowrap; color: var(--s-heading);
}
.tk-brand:hover { color: var(--s-heading); }
.tk-brand-mark { width: 34px; height: 34px; flex: none; display: block; }
.tk-brand-name b { font-weight: 700; color: var(--gs-brand); }
.tk-brand-lg { font-size: 1.65rem; gap: 0.65rem; }
.tk-brand-lg .tk-brand-mark { width: 42px; height: 42px; }

.tk-icon {
  width: 46px; height: 46px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0;
}
.tk-icon-sm { width: 36px; height: 36px; font-size: 1.05rem; }
.tk-icon-primary { background: var(--s-primary-bg); color: var(--s-primary); }
.tk-icon-success { background: var(--gs-soft); color: var(--gs-soft-fg); }
.tk-icon-info    { background: var(--s-info-bg); color: var(--s-info); }
.tk-icon-warning { background: var(--gs-sand); color: var(--gs-sand-fg); }
.tk-icon-danger  { background: var(--gs-coral-bg); color: var(--gs-coral-fg); }

/* Solar Bento Hero Banners (crisp white surface + subtle palette tint, light/dark + 6 palettes) */
.cust-hero, .cust-pending, .tk-gradient {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--s-primary-border) !important;
  color: var(--s-body-color) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--gs-brand) 8%, var(--gs-surface)) 0%, var(--gs-surface) 62%) !important;
  box-shadow: inset 4px 0 0 var(--gs-brand), var(--gs-shadow-panel);
}
.cust-pending {
  border-color: var(--s-warning-border) !important;
  background: linear-gradient(135deg, var(--s-warning-bg) 0%, var(--gs-surface) 68%) !important;
  box-shadow: inset 4px 0 0 var(--s-warning), var(--gs-shadow-panel);
}
.tk-gradient-success {
  border-color: var(--s-success-border) !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--s-success) 9%, var(--gs-surface)) 0%, var(--gs-surface) 62%) !important;
  box-shadow: inset 4px 0 0 var(--s-success), var(--gs-shadow-panel);
}
.cust-hero h1, .cust-hero h2, .cust-hero h3, .cust-hero h4, .cust-hero h5, .cust-hero h6,
.cust-pending h1, .cust-pending h2, .cust-pending h3, .cust-pending h4, .cust-pending h5, .cust-pending h6,
.tk-gradient h1, .tk-gradient h2, .tk-gradient h3, .tk-gradient h4, .tk-gradient h5, .tk-gradient h6 {
  color: var(--s-heading) !important;
}
.cust-hero p, .cust-hero small, .cust-hero .text-white-50,
.cust-pending p, .cust-pending small, .cust-pending .text-white-50,
.tk-gradient p, .tk-gradient small, .tk-gradient .text-white-50 {
  color: var(--s-muted) !important;
}
.cust-hero .text-white, .cust-pending .text-white, .tk-gradient .text-white {
  color: var(--s-heading) !important;
}
.cust-hero .badge.bg-white, .cust-hero .badge.bg-light,
.cust-pending .badge.bg-white, .cust-pending .badge.bg-light,
.tk-gradient .badge.bg-white, .tk-gradient .badge.bg-light {
  background: var(--gs-soft) !important;
  color: var(--gs-soft-fg) !important;
  border: 1px solid var(--s-primary-border) !important;
}
.cust-hero .btn-light, .cust-pending .btn-light, .tk-gradient .btn-light {
  background: var(--gs-brand);
  border-color: var(--gs-brand);
  color: var(--gs-primary-fg);
  box-shadow: 0 4px 12px -4px rgba(var(--s-primary-rgb), 0.35);
}
.cust-hero .btn-light:hover, .cust-pending .btn-light:hover, .tk-gradient .btn-light:hover {
  background: var(--gs-primary-hover);
  border-color: var(--gs-primary-hover);
  color: var(--gs-primary-fg);
}
.cust-hero .btn-outline-light, .cust-pending .btn-outline-light, .tk-gradient .btn-outline-light {
  background: var(--gs-surface);
  border-color: var(--s-border);
  color: var(--s-body-color);
}
.cust-hero .btn-outline-light:hover, .cust-pending .btn-outline-light:hover, .tk-gradient .btn-outline-light:hover {
  background: var(--gs-surface-muted);
  color: var(--s-body-color);
}
.tk-glass {
  background: var(--gs-surface-muted);
  border: 1px solid var(--s-border);
  border-radius: 1rem;
  color: var(--s-body-color);
}

.connectivity-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.connectivity-dot.bg-success { box-shadow: 0 0 0 3px rgba(var(--s-success-rgb), 0.2); }
.connectivity-dot.bg-danger { box-shadow: 0 0 0 3px rgba(var(--s-danger-rgb), 0.2); }

/* Vertical Tabs (Device Detail / Remote) — compact sidebar so right content gets max width */
.dev-tabs-card .card-header { padding: 0.85rem 1rem 0.72rem; }
.dev-tabs-card .card-body { padding: 0.45rem !important; }
.dev-tabs-card .nav-tabs,
.dev-tabs-card .nav-pills { display: flex; flex-direction: column; border-bottom: 0; gap: 0.14rem; }
.dev-tabs-card .nav-tabs .nav-item, .dev-tabs-card .nav-tabs .nav-link,
.dev-tabs-card .nav-pills .nav-item, .dev-tabs-card .nav-pills .nav-link { width: 100%; }
.dev-tabs-card .nav-tabs .nav-link,
.dev-tabs-card .nav-pills .nav-link {
  justify-content: flex-start; text-align: left; padding: 0.46rem 0.72rem;
  font-size: 0.81rem; white-space: nowrap; border: 0; border-radius: 0.65rem; margin-bottom: 0;
}
.dev-tabs-card .nav-tabs .nav-link:hover,
.dev-tabs-card .nav-pills .nav-link:hover { background: var(--gs-surface-muted); }
.dev-tabs-card .nav-tabs .nav-link.active,
.dev-tabs-card .nav-pills .nav-link.active { background: var(--gs-soft); color: var(--gs-soft-fg); font-weight: 600; }
.dev-tabs-card .nav-tabs .nav-link .tk-count-badge,
.dev-tabs-card .nav-tabs .nav-link .badge { font-size: 0.68rem; min-width: 1.45rem; padding: 0.18em 0.55em; justify-content: center; }
@media (min-width: 992px) {
  .dev-tabs-vertical { flex-wrap: nowrap; align-items: flex-start; }
  .dev-tabs-vertical > .dev-tabs-menu-col { flex: 0 0 236px; width: 236px; max-width: 236px; }
  .dev-tabs-vertical > .dev-tabs-menu-col + div { flex: 1 1 0%; width: auto; min-width: 0; }
  .dev-tabs-menu-col .dev-tabs-card { position: sticky; top: 1.25rem; }
  .row:has(> .remote-menu-col) { flex-wrap: nowrap; align-items: flex-start; }
  .remote-menu-col { flex: 0 0 236px; width: 236px; max-width: 236px; }
  .remote-menu-col + div { flex: 1 1 0%; width: auto; min-width: 0; }
}
@media (max-width: 991.98px) {
  .dev-tabs-card .nav-tabs,
  .dev-tabs-card .nav-pills { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; }
  .dev-tabs-card .nav-tabs .nav-item, .dev-tabs-card .nav-tabs .nav-link,
  .dev-tabs-card .nav-pills .nav-item, .dev-tabs-card .nav-pills .nav-link { width: auto; }
}

/* Legacy font-size & weight utilities */
.fs-10 { font-size: 10px !important; } .fs-11 { font-size: 11px !important; }
.fs-12, .f-s-12 { font-size: 12px !important; } .fs-13, .f-s-13 { font-size: 13px !important; }
.fs-14, .f-s-14 { font-size: 14px !important; } .fs-15 { font-size: 15px !important; }
.fs-16, .f-s-16 { font-size: 16px !important; } .fs-17 { font-size: 17px !important; }
.fs-18, .f-s-18 { font-size: 18px !important; } .fs-20, .f-s-20 { font-size: 20px !important; }
.fs-22 { font-size: 22px !important; } .fs-24 { font-size: 24px !important; }
.f-w-400 { font-weight: 400 !important; } .f-w-500 { font-weight: 500 !important; }
.f-w-600 { font-weight: 600 !important; } .f-w-700 { font-weight: 700 !important; }
.b-r-10 { border-radius: 10px !important; } .b-r-15 { border-radius: 15px !important; }
.h-35 { height: 35px !important; } .w-35 { width: 35px !important; }
.h-45 { height: 45px !important; } .w-45 { width: 45px !important; }
.d-flex-center { display: flex; align-items: center; justify-content: center; }
.page-title-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 1.15rem; }
.page-title-head h4 { font-size: 1.25rem; font-weight: 700; text-transform: none !important; letter-spacing: -0.02em; margin: 0; }
/* Hide redundant title/breadcrumb bars when already displayed in .gs-topbar (keep if containing buttons) */
.gs-content .page-title-head:not(:has(.btn)) { display: none !important; }

/* ---- 13. Status Pages (404 & Maintenance) ---- */
.tk-status {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem 1.25rem; position: relative;
  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-page);
}
.tk-status-code {
  font-size: clamp(4.5rem, 15vw, 7.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  background: var(--gs-sage-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tk-status-icon { width: 84px; height: 84px; border-radius: 50%; font-size: 2.5rem; margin-bottom: 1.1rem; }
.tk-status p { color: var(--s-muted); max-width: 460px; }
.tk-status-foot { position: absolute; bottom: 1.25rem; font-family: var(--gs-font-mono); font-size: 0.72rem; color: var(--s-muted); }
.tk-status-mode { position: absolute; top: 1.25rem; right: 1.25rem; }

/* ---- 14. Third-party Local Plugins (SweetAlert2, DataTables, ApexCharts) ---- */
.swal2-popup {
  border-radius: 1.375rem !important; font-family: var(--gs-font-sans) !important;
  background: var(--gs-surface) !important; color: var(--s-body-color) !important;
  border: 1px solid var(--s-border) !important; box-shadow: var(--gs-shadow-raised) !important;
}
.swal2-title, .swal2-html-container { color: var(--s-body-color) !important; }
.swal2-styled.swal2-confirm { background-color: var(--gs-brand) !important; border-radius: 0.75rem !important; font-weight: 600 !important; }
.swal2-styled.swal2-cancel, .swal2-styled.swal2-deny { border-radius: 0.75rem !important; font-weight: 600 !important; }
.swal2-input, .swal2-textarea, .swal2-select {
  border: 1px solid var(--gs-input) !important; border-radius: 0.75rem !important;
  background: var(--gs-surface) !important; color: var(--s-body-color) !important; box-shadow: none !important;
}
.swal2-input:focus, .swal2-textarea:focus, .swal2-select:focus { border-color: var(--gs-brand) !important; outline: 0 !important; }

/* DataTables (Zero Bootstrap 5 integration) */
.dataTables_wrapper { font-size: 0.825rem; color: var(--s-body-color); }
.dataTables_wrapper .dt-top,
.dataTables_wrapper .dt-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem; padding: 0.65rem 0;
}
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.8rem; color: var(--s-muted); font-weight: 500;
}
.dataTables_wrapper .dataTables_length select { width: auto; display: inline-block; }
.dataTables_wrapper .dataTables_filter input { width: 220px; max-width: 100%; display: inline-block; }
.dataTables_wrapper .dataTables_info { font-size: 0.78rem; color: var(--s-muted); }
.dataTables_wrapper .dataTables_processing {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  padding: 0.65rem 1.25rem; border-radius: 0.85rem; background: var(--gs-surface);
  border: 1px solid var(--s-border); box-shadow: var(--gs-shadow-raised); font-weight: 600; z-index: 10;
}
table.dataTable { width: 100% !important; margin: 0 !important; border-collapse: collapse !important; }
table.dataTable thead th { cursor: pointer; position: relative; padding-right: 1.65rem; }
table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
  position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%);
  font-size: 0.65rem; opacity: 0.35; content: "\2195";
}
table.dataTable thead th.sorting_asc::after { content: "\2191"; opacity: 0.95; color: var(--gs-brand); }
table.dataTable thead th.sorting_desc::after { content: "\2193"; opacity: 0.95; color: var(--gs-brand); }
table.dataTable thead th.sorting_disabled { cursor: default; }
table.dataTable thead th.sorting_disabled::after { display: none; }
/* Customer portal legacy jQuery DataTables default renderer */
.dataTables_wrapper .dataTables_paginate .paginate_button:not(.page-item) {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2rem; height: 2rem; padding: 0 0.55rem; margin: 0 0.1rem;
  border-radius: 999px !important; border: 1px solid transparent !important;
  color: var(--s-muted) !important; background: transparent !important; cursor: pointer;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:not(.page-item).current {
  background: var(--gs-ink) !important; color: var(--gs-ink-fg) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:not(.page-item):hover:not(.disabled):not(.current) {
  background: var(--gs-accent) !important; color: var(--s-body-color) !important;
}

.apexcharts-tooltip { border-radius: 0.85rem !important; box-shadow: var(--gs-shadow-raised) !important; }
[data-theme="dark"] .apexcharts-tooltip.apexcharts-theme-light { background: var(--gs-surface) !important; border-color: var(--s-border) !important; color: var(--s-body-color); }
[data-theme="dark"] .apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title { background: var(--gs-surface-muted) !important; border-color: var(--s-border) !important; }

/* Responsive Shell Adjustments */
@media (max-width: 991.98px) {
  .gs-app { padding: 0.85rem 1rem 1.5rem; }
  .gs-topbar-title h1 { font-size: 1.38rem; }
  .gs-search-trigger { min-width: 0; width: 44px; height: 44px; padding: 0; justify-content: center; }
  .gs-search-trigger-text, .gs-search-trigger kbd { display: none; }
  .gs-search-trigger-btn { width: 36px; height: 36px; }
}
@media (max-width: 575.98px) {
  .gs-footer { flex-direction: column; }
  .gs-topbar-actions { margin-left: 0; }
}
@media print {
  .no-print, .gs-rail-col, .gs-sidebar, .gs-topbar, .gs-subnav, .gs-footer, .gs-backdrop { display: none !important; }
  .gs-app { display: block !important; padding: 0 !important; max-width: none !important; }
}
