/* gs-systems.css — minimal UI classes for extended systems */
/* plain CSS only — no @apply, no build step required */
/* grey scale: every neutral colour below reads these; .dark flips them, so new classes adapt with no dark rule */
:root { --g0:#fff; --g50:#f9fafb; --g100:#f3f4f6; --g200:#e5e7eb; --g300:#d1d5db; --g400:#9ca3af; --g500:#6b7280; --g600:#4b5563; --g700:#374151; --g800:#1f2937; --g900:#111827; }
.dark { color-scheme: dark; --g0:#1f2937; --g50:#263040; --g100:#374151; --g200:#374151; --g300:#4b5563; --g400:#9ca3af; --g500:#9ca3af; --g600:#d1d5db; --g700:#d1d5db; --g800:#e5e7eb; --g900:#f9fafb; }

/* ============================================
   Buttons
   ============================================ */
.gs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    border-radius: 0.25rem;
    border: 1px solid var(--g300);
    background: var(--g0);
    color: var(--g700);
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
    text-decoration: none;
}
/* focus/active included so legacy global button styles can't invert the label (e.g. Hide/Show Filter) */
.gs-btn:hover, .gs-btn:focus, .gs-btn:active { background: var(--g50); color: var(--g700); outline: none; }

.gs-btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
/* solid variants re-assert white text on hover/focus/active so the generic .gs-btn:hover dark color can't win */
.gs-btn-primary:hover, .gs-btn-primary:focus, .gs-btn-primary:active { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

.gs-btn-secondary { background: var(--g100); color: var(--g700); border-color: var(--g300); }
.gs-btn-secondary:hover, .gs-btn-secondary:focus, .gs-btn-secondary:active { background: var(--g200); color: var(--g700); }

.gs-btn-success { background: #16a34a; color: #fff; border-color: #16a34a; }
.gs-btn-success:hover, .gs-btn-success:focus, .gs-btn-success:active { background: #15803d; border-color: #15803d; color: #fff; }

.gs-btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.gs-btn-danger:hover, .gs-btn-danger:focus, .gs-btn-danger:active { background: #b91c1c; border-color: #b91c1c; color: #fff; }

.gs-btn-outline { background: transparent; color: var(--g600); border-color: var(--g300); }
.gs-btn-outline:hover { background: var(--g50); color: var(--g800); }

.gs-btn-sm { padding: 4px 8px; font-size: 0.75rem; }

.gs-btn-ghost { background: transparent; border-color: transparent; color: var(--g500); }
.gs-btn-ghost:hover { background: var(--g100); color: var(--g700); }

/* Opinionated submit button (pair with width utility classes like w-200px/w-full). */
.gs-submit {
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 0.75rem;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
}

/* Solid button anchors must keep white text inside .gs-page/.gs-page-fluid
   (whose `a { color }` rule would otherwise win and wash out the label). */
.gs-page a.gs-btn-primary, .gs-page-fluid a.gs-btn-primary,
.gs-page a.gs-btn-success, .gs-page-fluid a.gs-btn-success,
.gs-page a.gs-btn-danger,  .gs-page-fluid a.gs-btn-danger { color: #fff; }

/* ============================================
   Cards
   ============================================ */
.gs-card {
    background: var(--g0);
    border: 1px solid var(--g200);
    border-radius: 0.5rem;
}
.gs-card-body { padding: 1rem; }
.gs-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--g500);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.gs-card-hover { transition: box-shadow 0.15s; }
.gs-card-hover:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }

/* ============================================
   Tables
   ============================================ */
.gs-table {
    width: 100%;
    font-size: 0.875rem;
    text-align: left;
    border-collapse: collapse;
}
.gs-table th {
    padding: 0.5rem 0.75rem;
    background: var(--g50);
    color: var(--g600);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--g200);
}
.gs-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--g100);
    color: var(--g700);
}
.gs-table tr:hover td { background: var(--g50); }

/* compact, evenly-spaced vertical header cell: label → input/sublabel → All action */
.gs-th-stack { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.gs-th-stack small { color: var(--g500); text-transform: none; font-weight: 400; }
.gs-table th:has(.gs-th-stack) { vertical-align: top; }

/* ============================================
   Inputs
   ============================================ */
.gs-input, .gs-select {
    padding: 6px 8px;
    font-size: 0.875rem;
    border: 1px solid var(--g300);
    border-radius: 0.25rem;
    background: var(--g0);
    color: var(--g700);
}
.gs-input:focus, .gs-select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: 0 0 0 1px #60a5fa;
}
.gs-checkbox { width: 1rem; height: 1rem; }

/* ============================================
   Badges
   ============================================ */
.gs-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
}
.gs-badge-success { background: rgba(34,197,94,.18); color: #15803d; }
.gs-badge-error   { background: rgba(239,68,68,.15); color: #b91c1c; }
.gs-badge-warning { background: rgba(234,179,8,.2); color: #a16207; }
.gs-badge-info    { background: rgba(59,130,246,.18); color: #1d4ed8; }
.gs-badge-ghost   { background: var(--g100); color: var(--g500); }

/* Audit marker: missing required reference/data value (soft warning).
   Use on a cell/row to highlight, or compose with .gs-badge for an inline label. */
.gs-missing { background: rgba(234,179,8,.2); border: 1px solid #fde68a; color: #a16207; }

/* ============================================
   Layout
   ============================================ */
.gs-container { padding: 1.5rem; padding-bottom: 50px; }

/* ============================================
   Links
   ============================================ */
.gs-link { color: #2563eb; font-size: 0.875rem; text-decoration: none; }
.gs-link:hover { text-decoration: underline; }

/* ============================================
   Alerts
   ============================================ */
.gs-alert { padding: 0.75rem 1rem; border-radius: 0.25rem; font-size: 0.875rem; }
.gs-alert-warning { background: rgba(234,179,8,.08); color: #854d0e; border: 1px solid #fde68a; }
.gs-alert-error   { background: rgba(239,68,68,.07); color: #991b1b; border: 1px solid #fecaca; }
.gs-alert-success { background: rgba(34,197,94,.08); color: #166534; border: 1px solid #bbf7d0; }

/* ============================================
   Modal
   ============================================ */
.gs-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gs-modal {
    background: var(--g0);
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
    padding: 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
    width: 100%;
    max-width: 42rem;
}
.gs-modal-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 1rem; }
.gs-modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }

/* ============================================
   Page primitives
   ============================================ */
/* Canonical end-of-page spacing = 50px bottom padding on the page wrapper. A view NEVER
   adds its own bottom spacer: no ht-50 / ht-100, no mb-* on the last block, no empty spacer
   div, no table-specific bottom margin. The wrapper owns it. */
/* Centered, max-width page container (default for view/edit/manage/settings pages). */
.gs-page { width: 100%; max-width: 1280px; margin: 0 auto; padding: 1.25rem 1.5rem 50px; color: var(--g800); font-size: 14px; }
/* Full-width page container (wide tables/matrix/reports/dashboards only). */
.gs-page-fluid { width: 100%; padding: 1.25rem 1.5rem 50px; color: var(--g800); font-size: 14px; }
.gs-page a, .gs-page-fluid a { color: #1d4ed8; text-decoration: none; }
.gs-page a:hover, .gs-page-fluid a:hover { text-decoration: underline; }
.gs-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-bottom: 0.875rem; border-bottom: 1px solid var(--g200); margin-bottom: 1rem; }
.gs-page-title { font-size: 1.25rem; font-weight: 600; color: var(--g900); margin: 0; }
.gs-page-subtitle { margin: 2px 0 0; font-size: 0.8125rem; color: var(--g500); }

/* ============================================
   Toolbar (compact text-link row)
   ============================================ */
.gs-toolbar { display: flex; flex-wrap: wrap; gap: 0.125rem 0.25rem; align-items: center; }
.gs-toolbar a { display: inline-block; padding: 4px 8px; border-radius: 0.25rem; font-size: 0.8125rem; color: var(--g600); text-decoration: none; }
.gs-toolbar a:hover { background: var(--g100); color: var(--g900); text-decoration: none; }
.gs-toolbar-sep { color: var(--g300); padding: 0 2px; user-select: none; }
.gs-toolbar-label { color: var(--g400); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.6875rem; padding-right: 4px; }
.gs-toolbar-sub { margin: -0.25rem 0 1rem; font-size: 0.8125rem; gap: 0.125rem 0.5rem; }
.gs-toolbar a.is-active { background: var(--g100); color: var(--g900); font-weight: 600; }

/* ============================================
   Grouped links (segmented control — joined links, no gaps)
   ============================================ */
.gs-groupedlinks { display: inline-flex; vertical-align: middle; border: 1px solid var(--g300); border-radius: 0.375rem; overflow: hidden; }
.gs-groupedlink { display: inline-block; padding: 4px 12px; font-size: 0.8125rem; line-height: 1.4; color: var(--g700); text-decoration: none; background: var(--g0); border-left: 1px solid var(--g300); }
.gs-groupedlink:first-child { border-left: 0; }
.gs-groupedlink:hover { background: rgba(37,99,235,.08); color: #1d4ed8; text-decoration: none; }
.gs-groupedlink.is-active { background: #2563eb; color: #fff; }

/* ============================================
   Pill navigation (level switchers, segmented filters)
   ============================================ */
.gs-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.5rem 0 0.875rem; margin: 0 0 1rem; border-bottom: 1px solid var(--g100); }
.gs-nav a { padding: 6px 14px; border-radius: 999px; font-size: 0.8125rem; font-weight: 500; line-height: 1; color: var(--g600); text-decoration: none; background: var(--g0); border: 1px solid var(--g200); transition: all 0.15s ease; }
.gs-nav a:hover { background: var(--g50); color: var(--g900); border-color: var(--g300); text-decoration: none; transform: translateY(-1px); }
.gs-nav a.active { background: #2563eb; color: #fff; border-color: #2563eb; box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3); }
.gs-nav a.active:hover { background: #1d4ed8; color: #fff; }

/* ============================================
   Section group (soft inner panel with small uppercase title)
   ============================================ */
.gs-section { margin-top: 1.5rem; padding: 1rem; background: var(--g50); border: 1px solid var(--g200); border-radius: 0.5rem; }
.gs-section-title { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: var(--g500); margin: 0 0 0.75rem; }

/* ============================================
   Card status variants and panel heading
   ============================================ */
.gs-card-warn   { border-color: #fde68a; background: rgba(234,179,8,.08); }
.gs-card-danger { border-color: #fecaca; background: rgba(239,68,68,.07); }
.gs-card-heading { font-size: 0.875rem; font-weight: 600; color: var(--g900); margin: 0 0 0.5rem; }
.gs-card-warn   .gs-card-heading { color: #92400e; }
.gs-card-danger .gs-card-heading { color: #991b1b; }

/* ============================================
   Form row (label above input, input fills row)
   ============================================ */
.gs-form-row { margin-bottom: 0.5rem; }
.gs-form-label { display: block; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--g500); margin-bottom: 3px; font-weight: 500; }
.gs-form-row .gs-input, .gs-form-row .gs-select { width: 100%; box-sizing: border-box; }

/* ============================================
   Help text (paragraph under headings / fields)
   ============================================ */
.gs-help-text { margin: 0 0 0.625rem; font-size: 0.75rem; color: var(--g500); }
.gs-card-warn   .gs-help-text { color: #92400e; }
.gs-card-danger .gs-help-text { color: #b91c1c; }

/* ============================================
   Alert info variant
   ============================================ */
.gs-alert-info { background: rgba(37,99,235,.08); color: #1e40af; border: 1px solid #bfdbfe; }

/* ============================================
   Compact scrollable bordered list
   ============================================ */
.gs-list { max-height: 360px; overflow-y: auto; font-size: 0.8125rem; border-top: 1px solid var(--g100); }
.gs-list a, .gs-list .gs-list-row { display: block; padding: 4px 6px; color: var(--g700); border-bottom: 1px solid var(--g100); font-variant-numeric: tabular-nums; text-decoration: none; }
.gs-list a:hover { background: var(--g50); color: #1d4ed8; text-decoration: none; }

/* ============================================
   Detail list (read-only label/value rows)
   ============================================ */
.gs-detail-row { display: flex; padding: 0.5rem 0; border-bottom: 1px solid var(--g100); }
.gs-detail-row:last-child { border-bottom: none; }
.gs-detail-label { flex: 0 0 160px; color: var(--g500); font-size: 0.8125rem; }
.gs-detail-value { flex: 1; color: var(--g800); font-size: 0.875rem; }
.gs-detail-value { min-width: 0; overflow-wrap: anywhere; }
/* Stacked row: label above, value takes the full card width. Use for long text such as notes. */
.gs-detail-stack { flex-direction: column; gap: 0.25rem; }
.gs-detail-stack .gs-detail-label { flex: none; }
.gs-detail-stack .gs-detail-value { line-height: 1.55; }
@media (max-width: 560px) {
	.gs-detail-row { flex-direction: column; gap: 0.125rem; }
	.gs-detail-label { flex: none; }
}

/* ============================================
   Form actions (button row under a form)
   ============================================ */
.gs-form-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

/* ============================================
   Helpers
   ============================================ */
.gs-muted { color: var(--g400); }

/* ============================================
   Menu hub (object navigation: search bar + grouped link cards)
   Reusable across SSCC {object}/index hubs. Behavior in gs-systems.js.
   ============================================ */
.gs-hub-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--g0); border: 1px solid var(--g200); border-radius: 8px; margin-bottom: 1.25rem; }
.gs-hub-bar-icon { color: var(--g400); font-size: 14px; flex-shrink: 0; }
.gs-hub-search { flex: 1; border: 0; outline: 0; font-size: 13px; color: var(--g800); background: transparent; }
.gs-hub-search::placeholder { color: var(--g400); }
.gs-hub-group { margin-bottom: 1.5rem; }
.gs-hub-group-title { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--g500); margin: 0 0 0.625rem; padding-bottom: 0.375rem; border-bottom: 1px solid var(--g100); }
.gs-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.5rem; }
.gs-hub-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--g200); border-radius: 8px; background: var(--g0); text-decoration: none; color: var(--g800); transition: border-color 0.15s, box-shadow 0.15s; }
.gs-hub-card:hover { border-color: #bfdbfe; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08); text-decoration: none; }
.gs-hub-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 7px; background: var(--g100); font-size: 15px; flex-shrink: 0; }
.gs-hub-card:hover .gs-hub-icon { background: rgba(37,99,235,.08); }
.gs-hub-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gs-hub-label { font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--g700); }
.gs-hub-desc { font-size: 11.5px; line-height: 1.35; color: var(--g500); }
/* planned destination: specified but no route exists yet. Not a link, never clickable. */
.gs-hub-card-planned { background: var(--g50); border-style: dashed; color: var(--g400); cursor: default; }
.gs-hub-card-planned:hover { border-color: var(--g200); box-shadow: none; }
.gs-hub-card-planned .gs-hub-icon { opacity: 0.55; }
.gs-hub-card-planned .gs-hub-label { color: var(--g500); font-weight: 400; }

/* ============================================
   Menu hub table (compact borderless grid that reads like a table)
   Beside the gs-hub-* cards. The -outline modifier makes shared thin dividers
   from gap + container background, so no cell needs a border. Toggle JS in-view.
   ============================================ */
.gs-hub-tcat { margin-bottom: 1rem; }
.gs-hub-tcat-title { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; color: var(--g500); margin: 0 0 0.375rem; }
.gs-hub-table { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: transparent; align-items: stretch; }
.gs-hub-table-outline { gap: 1px; background: var(--g200); border: 1px solid var(--g200); }
.gs-hub-tcell { display: flex; align-items: flex-start; gap: 8px; min-width: 0; height: 100%; padding: 8px 10px; background: var(--g0); border-radius: 0; text-decoration: none; color: var(--g800); }
.gs-hub-tcell:hover { background: var(--g100); text-decoration: none; color: var(--g900); }
.gs-hub-ticon { flex-shrink: 0; font-size: 14px; line-height: 1.35; }
.gs-hub-ttitle { font-size: 12.5px; font-weight: 500; line-height: 1.35; color: var(--g700); overflow-wrap: break-word; word-wrap: break-word; }
.gs-hub-tmeta { display: block; font-size: 11px; color: var(--g400); line-height: 1.3; margin-top: 2px; }

@media (max-width: 1100px) {
	.gs-hub-table { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
	.gs-hub-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
	.gs-hub-table { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================
   Searchable (canon in-page filter — #searchInput + .searchable)
   Behavior: views/elements/hubSearch.php; clearSearchFilter() in gs-systems.js.
   ============================================ */
.searchable.highlight-match { border-color: #86efac; box-shadow: 0 0 0 2px rgba(134, 239, 172, 0.45); }

/* ============================================
   Lookup picker (typeahead input → floating results panel)
   Behavior in views/js/filters.js: gsLookup() / gsLookupClose() / gsLookupClear().
   Markup: .gs-lookup-shell > (input#part) + #names.gs-lookup-results.gs-lookup-panel
   ============================================ */
.gs-lookup-shell { position: relative; }
.gs-lookup-results { background: var(--g0); border: 1px solid var(--g200); border-radius: 0.75rem; box-shadow: 0 10px 28px rgba(15, 23, 42, 0.15); padding: 0.85rem 1rem; max-height: 24rem; overflow: auto; }
.gs-lookup-panel { position: absolute; top: calc(100% + 0.5rem); left: 0; width: min(44rem, 100%); z-index: 30; }
.gs-lookup-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.gs-lookup-item { padding: 0.35rem 0; border-bottom: 1px dashed var(--g200); }
.gs-lookup-item:last-child { border-bottom: 0; }

/* ============================================
   Report dashboard (reusable: filter card + KPI grid + chart/table cards)
   Pattern reference: labrooms/report
   ============================================ */
.gs-filter-card { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; background: var(--g0); border: 1px solid var(--g200); border-radius: 0.5rem; padding: 0.875rem 1rem; margin-bottom: 1rem; }
.gs-filter-field { display: flex; flex-direction: column; gap: 3px; }
.gs-filter-field label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--g500); font-weight: 600; }
.gs-filter-quick { display: flex; align-items: center; gap: 0.25rem; font-size: 0.8125rem; padding-bottom: 7px; }
.gs-filter-quick a { cursor: pointer; }
.gs-filter-actions { display: flex; gap: 0.5rem; margin-left: auto; padding-bottom: 1px; }

.gs-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin: 0 0 1rem; }
.gs-kpi-card { background: var(--g0); border: 1px solid var(--g200); border-radius: 0.5rem; padding: 0.875rem 1rem; }
.gs-kpi-label { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--g500); font-weight: 600; }
.gs-kpi-value { margin-top: 0.25rem; font-size: 1.5rem; font-weight: 700; color: var(--g900); font-variant-numeric: tabular-nums; line-height: 1.1; }
.gs-kpi-sub { margin-top: 2px; font-size: 0.75rem; color: var(--g400); }
.gs-kpi-card.is-accent { border-color: #bfdbfe; background: rgba(37,99,235,.08); }
.gs-kpi-card.is-accent .gs-kpi-value { color: #1d4ed8; }

.gs-chart-card, .gs-table-card { background: var(--g0); border: 1px solid var(--g200); border-radius: 0.5rem; padding: 1rem; margin-bottom: 1rem; }
/* wide tables scroll inside the card instead of breaching its right border */
.gs-table-card { overflow-x: auto; }
.gs-chart-wrap { position: relative; height: 340px; width: 100%; }

/* ============================================
   Report shell (page-head action row, numeric cells, empty state)
   Reusable report pattern. Pairs with .gs-page-head + .gs-filter-card + .gs-table.
   ============================================ */
.gs-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.gs-num { text-align: right; font-variant-numeric: tabular-nums; }
.gs-report-empty { padding: 2rem 1rem; text-align: center; color: var(--g400); font-size: 0.875rem; }

/* ============================================
   Records data-table typography (apply on the page root)
   Humanist system sans + tabular numerals so numeric columns align; denser table text.
   ============================================ */
.gs-records, .gs-records table { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-variant-numeric: tabular-nums; }
.gs-records table { font-size: 0.875rem; }

/* ============================================
   Dark mode: greys flip through the :root variables at the top.
   Only coloured text needs a rule here: blue links, white text on solid buttons, tint text.
   ============================================ */
.dark .gs-page a, .dark .gs-page-fluid a, .dark .gs-link, .dark .gs-groupedlink:hover, .dark .gs-list a:hover { color: #93c5fd; }
.dark .gs-page a.gs-btn-primary, .dark .gs-page a.gs-btn-success, .dark .gs-page a.gs-btn-danger,
.dark .gs-page-fluid a.gs-btn-primary, .dark .gs-page-fluid a.gs-btn-success, .dark .gs-page-fluid a.gs-btn-danger { color: #fff; }
/* tints are translucent, so only their text needs lightening */
.dark .gs-badge-success, .dark .gs-alert-success { color: #86efac; }
.dark .gs-badge-error, .dark .gs-alert-error { color: #fca5a5; }
.dark .gs-badge-warning, .dark .gs-alert-warning, .dark .gs-missing { color: #fde047; }
.dark .gs-badge-info, .dark .gs-alert-info { color: #93c5fd; }
.dark [class*="gs-alert-"], .dark .gs-missing { border-color: color-mix(in srgb, currentColor 30%, transparent); }

/* ============================================
   Batch 2 UI: hub search keys, Systems panel on phones, login refresh, Golds showcase
   ============================================ */
.gs-hub-card:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.gs-hub-search:focus-visible { outline: none; }
.gs-hub-bar:focus-within { border-color: #93c5fd; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

/* top bar Systems panel: tall lists scroll inside the panel, taps stay easy on a phone */
.golds-systems-panel { max-height: 70vh; overflow-y: auto; }
@media (max-width: 560px) {
	.golds-systems-panel { padding: 0.5rem 0.75rem; max-height: 75vh; }
	.golds-systems-panel .gs-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.golds-systems-panel .gs-hub-card { padding: 10px; min-height: 44px; }
	.golds-systems-panel .gs-hub-icon { width: 28px; height: 28px; }
	.golds-caret, .golds-more-btn { min-height: 36px; min-width: 36px; }
}
@media (max-width: 340px) {
	.golds-systems-panel .gs-hub-grid { grid-template-columns: minmax(0, 1fr); }
}

/* login */
.gl-card { border-radius: 16px; }
.gl-body { padding: 2rem 1.75rem; }
.gl-label { display: block; margin-bottom: 0.3rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--g600); }
.gl-field { position: relative; }
.gl-icon { position: absolute; top: 0; bottom: 0; left: 0.8rem; display: flex; align-items: center; color: var(--g400); pointer-events: none; }
.golds-login .gl-input { padding: 0.7rem 0.8rem 0.7rem 2.5rem; border-radius: 10px; font-size: 16px; }	/* 16px: no zoom on iOS focus */
.golds-login .gl-input-pw { padding-right: 4rem; }
.gl-eye { position: absolute; top: 0; bottom: 0; right: 0; padding: 0 0.85rem; border: 0; background: transparent; color: var(--g500); font: inherit; font-size: 0.8125rem; cursor: pointer; }
.gl-eye:hover { color: var(--g800); }
.golds-login .gl-submit { margin-top: 0.75rem; padding: 12px; border-radius: 10px; font-size: 15px; font-weight: 600; }
.golds-login .gs-alert { margin-bottom: 1rem; }
@media (max-width: 400px) { .gl-body { padding: 1.5rem 1.1rem; } }

/* showcase/golds: setup -> buy -> make -> sell -> reconcile strip */
.gs-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; list-style: none; margin: 0 0 1.5rem; padding: 0; }
.gs-flow-step { display: flex; align-items: flex-start; gap: 10px; height: 100%; padding: 10px 12px; border: 1px solid var(--g200); border-radius: 8px; background: var(--g0); color: var(--g800); text-decoration: none; }
.gs-flow-step:hover { border-color: #bfdbfe; box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08); text-decoration: none; }
.gs-flow-num { width: 24px; height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(37, 99, 235, 0.12); color: #1d4ed8; font-size: 12px; font-weight: 700; }
.dark .gs-flow-num { color: #93c5fd; }
.gs-flow-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gs-flow-text strong { font-size: 13px; font-weight: 600; }
.gs-flow-text span { font-size: 11.5px; line-height: 1.35; color: var(--g500); }
.gs-flow-note { margin: -0.25rem 0 0.625rem; font-size: 12.5px; }
@media (max-width: 900px) { .gs-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .gs-flow { grid-template-columns: minmax(0, 1fr); } }
