:root {
    /* Light Theme (Default) */
    --bg-body: #f4f6f8;
    --bg-card: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --table-header-bg: #f8fafc;
    --surface-color: #ffffff;
    --bg-tinted: #cfcfcf;

    --dyn-header-bg:   #d5e4f4;            /* light purple (placeholder)        */
    --dyn-header-edge: rgb(124 152 182 / 0.54);


    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-row-hover: rgb(37 99 235 / 0.07);

    --accent-omega6: #f59e0b;
    --accent-danger: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);

    --shadow-down: 0 2px 8px rgba(0, 0, 0, 0.12);

    /* ── Typography (overridable via JS / PHP session) ── */
    --font-family:    'Inter', system-ui, -apple-system, sans-serif;
    --font-size-base: 16px;
    /* Legacy alias */
    --font-sans: var(--font-family);

    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --radius-md: 0.5rem;
    --radius-sm: 0.25rem;

    /* Buttons / forms / actions */
    --button_apply_bg: #3b82f6;
    --button_cancel_bg: #e2e8f0;
    --button_del_bg: #ec3c7b;
    --form_toggle_on: #3bf6ca;
    --form_toggle_hover: #3be6f6;
    --form_toggle_off: #e2e8f0;

    /* ── Secondary / legacy token names ───────────────────────────────
       These names were used across pages via var(--x, #fallback) but were
       never actually declared, so every use silently fell back to a
       HARD-CODED LIGHT COLOUR — which is why those elements did not react
       to dark mode. Values below match the old fallbacks exactly, so light
       mode is unchanged; the dark-mode block now gives them real values.
       Prefer the primary tokens above in NEW code. */
    --card-bg:         var(--bg-card);        /* was: #fff        */
    --text-color:      #12303f;               /* was: #12303f     */
    --accent-color:    #2e5d78;               /* was: #2e5d78     */
    --accent-primary:  #1d4ed8;               /* was: #1d4ed8     */
    --accent-secondary: var(--primary-color);
    --input-bg:        #ffffff;               /* was: #fff        */
    --hover-bg:        rgba(0, 0, 0, 0.05);   /* was: rgba(0,0,0,.05) */
    --bg-surface-2:    #eef2f7;               /* was: #eef2f7     */
    --bg-level-2:      #fff8e1;               /* warm highlight   */
    --bg-level-3:      #e2e8f0;               /* neutral chip bg  */
}

body.dark-mode {
    --bg-body: #0f172a;
    --bg-card: black;
    --surface-color: #1e293b;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --table-header-bg: #283548;
    --bg-tinted: #3d4455;

    --dyn-header-bg:   #0a3155;            /* light purple (placeholder)        */
    --dyn-header-edge: rgb(35 88 135);



    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);

    --primary-row-hover: rgb(1 8 14 / 0.88);

    /* Dark values for the secondary tokens declared in :root above. */
    --card-bg:         var(--bg-card);
    --text-color:      var(--text-main);
    --accent-color:    #5b9bbd;
    --accent-primary:  #60a5fa;
    --accent-secondary: var(--primary-color);
    --input-bg:        #172033;
    --hover-bg:        rgba(255, 255, 255, 0.06);
    --bg-surface-2:    var(--table-header-bg);
    --bg-level-2:      #3a3320;
    --bg-level-3:      #334155;
}

* {
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* ═══════════════════════════════════════════════════════════════════
   TYPOGRAPHY — central font control
   font-size/font-family live here only. Component CSS must NOT set
   font-size; use .smallGray or rely on inheritance. Override via JS
   (CSS custom properties) or PHP session (<style> in <head>).
   ═══════════════════════════════════════════════════════════════════ */
body {
    font-family: var(--font-family);
    font-size:   var(--font-size-base);
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    line-height: 1.5;
}

h1, h1 > span { font-size: 120%; font-weight: 700; margin: 10px 0 0.5rem; }
h2, h2 > span { font-size: 110%; font-weight: 600; margin: 0 0 0.5rem; }
h3 { font-size: 105%; font-weight: 600; margin: 0 0 0.4rem; }
h4 { font-size: 100%; font-weight: 600; margin: 0 0 0.4rem; }
h5, h6 { font-size: 100%; font-weight: 600; margin: 0 0 0.25rem; }

/* Small muted text — use instead of arbitrary font-size overrides */
.smallGray {
    font-size: 90%;
    color: var(--text-muted);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
.app-header {
}

.logo {
    font-weight: 700;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.logo span {
    color: var(--primary-color);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-main);
}
/* Buttons, form controls, chips, accordion, toggle → controls.css */



/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}
.card h3 {
    padding: 4px;
    margin: 0;
}
.card .browser_img_container {
    border: 1px solid var(--border-color);
    height: 140px;
    text-align: center;
    background: var(--bg-body);
}
.card .browser_img_container img {
    height: 140px;
}
.card-title {
    font-weight: 600;
    margin: 0;
}

/* Badges */
.badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: var(--bg-card);
    /* Matched to card bg for consistency */
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Filter Sections */
.filter-section {
    margin-bottom: 1.5rem;
    position: relative;
}

.filter-title {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: default;
}

.help-icon {
    color: var(--primary-color);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0 5px;
}

.filter-title:hover .help-icon {
    opacity: 1;
}

.search-box {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 0.6rem 0.6rem 0.6rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-body);
    color: var(--text-main);
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Filter Chips: layout only — chip/pill styles → controls.css */
#select_single_type {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#select_single_type #omegas span.filter-chip {
    padding: 0.4rem 0.3rem;
}
#select_single_type hr {
    border: 0; border-top: 1px solid var(--border-color); margin: 2px 0;
}

/* Modal (overlay/card structure — not a control) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    width: 800px;
    max-width: 95%;
    height: 80vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-body);
    flex-shrink: 0;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Accordion → controls.css */

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    width: 40%;
}






.subsection-header {
    background-color: var(--table-header-bg);
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Visual Container */
.visual-container {
    position: relative;
    height: 400px;
    background: var(--bg-body);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.btn-load-3d {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

/* Utilities */
.text-muted {
    color: var(--text-muted);
}

/* .btn-outline → controls.css */

.flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

/* header-actions pushed to the far right */
.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* Nav Links */
.nav-link {
    padding: 0.5rem 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: var(--radius-md);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.88rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: rgba(59, 130, 246, 0.1);
}

/* Nav dropdown items */
.nav-has-sub {
    position: relative;
}

.nav-chevron {
    font-size: 0.65em;
    opacity: 0.7;
    transition: transform 160ms;
}
.nav-has-sub:hover .nav-chevron,
.nav-has-sub.nav-open .nav-chevron {
    transform: rotate(180deg);
}

.nav-sub {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
    min-width: 190px;
    padding: 0.3rem;
    z-index: 300;
    display: none;
}
/* Transparent bridge over the 4px gap so the dropdown doesn't close
   when the pointer travels from the button down to the sub-items. */
.nav-sub::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 0;
    right: 0;
    height: 6px;
    background: transparent;
}
body.dark-mode .nav-sub { box-shadow: 0 8px 24px rgba(0,0,0,0.45); }

.nav-has-sub:hover .nav-sub,
.nav-has-sub.nav-open .nav-sub { display: block; }

.nav-sub a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.8rem;
    border-radius: 5px;
    color: var(--text-main);
    font-size: 0.84rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: background 80ms, color 80ms;
}
.nav-sub a:hover {
    background: rgba(59,130,246,0.08);
    color: var(--primary-color);
}
.nav-sub a i {
    width: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8em;
}

/* Research Section */
.research-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-label {
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 0.5rem;
}

/* .source-btn, .filter-pill → controls.css */

.pub-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pub-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pub-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    display: block;
}

.pub-meta {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.pub-tag {
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    margin-right: 8px;
}

/* Latest Research — loading / status / footer (AJAX feed) */
.research-loading {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.5rem 0;
    color: var(--text-muted);
}
.research-spinner {
    width: 1.05rem;
    height: 1.05rem;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color, #3b82f6);
    border-radius: 50%;
    display: inline-block;
    animation: research-spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes research-spin { to { transform: rotate(360deg); } }

.research-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.research-empty {
    padding: 1.5rem 0;
    color: var(--text-muted);
}
.research-footer {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}
.research-search-link {
    text-decoration: none;
}

/* Historical Consumption (card_diet) */
.hist-loading {
    display: flex; align-items: center; gap: 0.6rem;
    color: var(--text-muted); padding: 1.5rem 0;
}
.hist-empty {
    background: var(--bg-body);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 1.75rem 1rem;
    text-align: center;
    color: var(--text-muted);
}
.hist-chart-wrap { position: relative; height: 260px; margin-bottom: 0.5rem; }
.hist-note { font-size: 0.8rem; color: var(--text-muted); margin: 0.5rem 0 0; line-height: 1.45; }
.hist-badge-est {
    display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: #b45309; background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.4); border-radius: 4px; padding: 1px 6px; margin-right: 0.4rem;
}
.hist-unit-toggle { display: inline-flex; border: 1px solid var(--border-color); border-radius: 6px; overflow: hidden; }
.hist-unit-btn {
    border: 0; background: var(--bg-card); color: var(--text-muted);
    font-family: inherit; font-size: 0.8rem; font-weight: 600; padding: 0.25rem 0.6rem; cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.hist-unit-btn + .hist-unit-btn { border-left: 1px solid var(--border-color); }
.hist-unit-btn.active { background: #018bad; color: #fff; }

.hist-research { margin-top: 1.25rem; }
.hist-research-title {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--text-muted); margin-bottom: 0.5rem;
}
.hist-ref-list { list-style: none; padding: 0; margin: 0; }
.hist-ref-list li { padding: 0.4rem 0; border-bottom: 1px solid var(--border-color); font-size: 0.9rem; }
.hist-ref-list li:last-child { border-bottom: 0; }
.hist-ref-meta { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }

@media (max-width: 720px) {
    .diet-grid { grid-template-columns: 1fr !important; }
}

a.external_id { color: var(--primary-color); transition: 0.3s;}
a.external_id:hover { text-decoration: underline; }


/* ───────────────────────────────────────────────────────────────────────────
 * Unified Tooltips component
 * ───────────────────────────────────────────────────────────────────────────
 * Markup patterns (driven by tooltips JS in fa_core.js):
 *
 *   1. Icon next to a label, AJAX-loaded by id:
 *      <span class="info-tooltip" data-tooltip-id="SMILES" tabindex="0">
 *         <i class="fa-solid fa-circle-question"></i>
 *      </span>
 *
 *   2. Icon next to a label, inline content (no AJAX):
 *      <span class="info-tooltip" tabindex="0">
 *         <i class="fa-solid fa-circle-question"></i>
 *         <span class="info-tooltip-content"><h6>Title</h6><p>Body…</p></span>
 *      </span>
 *
 *   3. Shorthand: any element with [data-tooltip-id] but no .info-tooltip
 *      wrapper — JS will inject the icon + popup on init.
 *
 *   Both hover and keyboard focus open the popup. The popup is positioned
 *   below the trigger by default; JS flips it above when it would clip
 *   the viewport (adds .info-tooltip--above).
 * ─────────────────────────────────────────────────────────────────────────── */

.info-tooltip {
    display: inline-flex;
    position: relative;
    margin-left: 4px;
    cursor: help;
    color: var(--text-muted);
    outline: none;
    vertical-align: baseline;
}
.info-tooltip:hover,
.info-tooltip:focus-visible {
    color: var(--primary-color);
}

.info-tooltip-content {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    max-width: 80vw;
    padding: 0.85rem 1rem;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    line-height: 1.45;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
    font-weight: 400;
    color: var(--text-main);
    white-space: normal;
    z-index: 50;
}
.info-tooltip-content::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px; height: 10px;
    background: var(--bg-card, #fff);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}

/* Flip above the trigger when too close to bottom of viewport */
.info-tooltip.info-tooltip--above .info-tooltip-content {
    top: auto;
    bottom: calc(100% + 6px);
}
.info-tooltip.info-tooltip--above .info-tooltip-content::before {
    top: auto;
    bottom: -6px;
    border-left: none;
    border-top: none;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* Open states: hover, focus, focus-within, or programmatic .is-open */
.info-tooltip:hover .info-tooltip-content,
.info-tooltip:focus-visible .info-tooltip-content,
.info-tooltip:focus-within .info-tooltip-content,
.info-tooltip.is-open .info-tooltip-content {
    display: block;
}

/* Content typography */
.info-tooltip-content h6 {
    margin: 0 0 0.2rem 0;
    font-weight: 700;
    color: var(--text-main);
    text-transform: none;
}
.info-tooltip-content p          { margin: 0 0 0.6rem 0; }
.info-tooltip-content p:last-child { margin-bottom: 0; }
.info-tooltip-content code {
    font-family: monospace;
    background: var(--bg-body, #f4f6f8);
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
}

.info-tooltip-content .info-tooltip-more {
    display: inline-block;
    margin-top: 0.45rem;
    color: var(--primary-color);
    text-decoration: none;
}
.info-tooltip-content .info-tooltip-more:hover { text-decoration: underline; }
.info-tooltip-content .info-tooltip-more i { margin-left: 3px; }

/* Loading / error skeleton */
.info-tooltip-content.is-loading {
    color: var(--text-muted);
    font-style: italic;
}
.info-tooltip-content.is-error {
    color: var(--accent-danger, #ef4444);
}

/* Dark-mode tweaks */
body.dark-mode .info-tooltip-content {
    background: var(--bg-card);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
body.dark-mode .info-tooltip-content::before { background: var(--bg-card); }
body.dark-mode .info-tooltip-content code    { background: var(--bg-body); }
/* ═══════════════════════════════════════════════════════════════════
   GLOBAL HEADER SEARCH
   Sits right of the logo, before the nav. In rest state it's compact
   (~160px). On focus the input slides right to 3× width, overlaying
   the nav without shifting it.
   ═══════════════════════════════════════════════════════════════════ */

/* Wrapper: stays at rest-width in the flex flow — never grows */
.gs-wrap {
    position: relative;
    flex: 0 0 160px;   /* rest/half width */
    height: 36px;      /* anchors the absolute input */
    margin-right: 0.75rem;
}

/* Promote stacking context on focus so the expanded input overlays nav */
.gs-wrap:focus-within { z-index: 5; }

/* Input: absolutely fills the wrap in rest state, expands rightward on focus */
.gs-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;       /* 160px at rest */
    height: 100%;
    padding: 0 2.1rem 0 0.75rem;   /* room for the icon on the right */
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: width 260ms cubic-bezier(0.4, 0, 0.2, 1),
                border-color 120ms,
                box-shadow 120ms;
    z-index: 1;
}
.gs-input::placeholder { color: var(--text-muted); }
.gs-wrap:focus-within .gs-input {
    width: 680px;      /* 3× rest width */
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59,130,246,0.18);
}

/* Magnifying-glass icon — sits at the right edge of the input and slides
   right with it as the input expands on focus (matches the width transition). */
.gs-icon {
    position: absolute;
    left: calc(160px - 1.55rem);   /* right edge of the rest-width input */
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.78rem;
    pointer-events: none;
    z-index: 2;        /* above the input */
    line-height: 1;
    transition: left 260ms cubic-bezier(0.4, 0, 0.2, 1);
}
.gs-wrap:focus-within .gs-icon { left: calc(680px - 1.55rem); }

/* Dropdown: anchored to wrap left, matches expanded input width */
.gs-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 160px;      /* rest width — JS opens it only when focused */
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 1200;
    overflow: hidden;
    display: none;
}
.gs-wrap:focus-within .gs-dropdown { width: 480px; }
.gs-dropdown.gs-open { display: block; }

.gs-group-label {
    padding: 0.45rem 0.85rem 0.25rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}
.gs-group-label:first-child { border-top: none; }

.gs-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.85rem;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
    transition: background 80ms;
    border-radius: 0;
}
.gs-item:hover,
.gs-item.gs-active {
    background: rgba(59,130,246,0.09);
    color: var(--primary-color);
}

.gs-item-icon {
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}
.gs-item.gs-active .gs-item-icon { color: var(--primary-color); }

.gs-item-body { min-width: 0; }
.gs-item-label {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}
.gs-item.gs-active .gs-item-label { color: var(--primary-color); }

.gs-item-sub {
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gs-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
}
