/* ══════════════════════════════════════════════════════════════════════════
   ShopCore Admin — the "Mate" look
   ══════════════════════════════════════════════════════════════════════════

   Loaded after shopcore-admin.css and the shared fluent-shell.css, for the
   Admin portal only (Reports and Accounting do not link it), so this sheet
   decides the finish without touching the other portals.

   Parts, in order:
     1. Tokens      — near-black primary, white surfaces, hairline strokes
     2. Base        — type, page, scrollbars
     3. Sidebar     — dark navy pane
     4. Top bar
     5. Controls    — buttons, chips, fields
     6. Tables      — checkbox column, quiet header, text status
     7. Cards       — KPI tiles, stat panels
     8. Overlays    — popover, modal, drawer, bulk-action bar
   ────────────────────────────────────────────────────────────────────────── */

/* ═══ 1. TOKENS ═══════════════════════════════════════════════════════════ */

:root {
  /* Primary is ink, not a hue: buttons, selection and links are near-black. */
  --brand-primary:   #0E1620;
  --brand-hover:     #1C2733;
  --brand-pressed:   #000000;
  --brand-selected:  #0E1620;
  --brand-fg:        #0E1620;
  --brand-fg-hover:  #000000;
  --brand-tint-60:   #F2F3F5;
  --brand-tint-40:   #E6E8EB;
  --brand-tint-20:   #C9CED5;
  --brand-on:        #FFFFFF;

  /* The one colour the design uses: the green of a paid order and a full ring. */
  --accent:          #2F6F55;
  --accent-hover:    #265B46;
  --accent-tint:     #EAF3EE;

  --neutral-canvas:       #FFFFFF;
  --neutral-layer:        #FFFFFF;
  --neutral-layer-alt:    #FAFAFB;
  --neutral-subtle:       #F6F7F8;
  --neutral-subtle-hover: #F2F3F5;
  --neutral-pressed:      #E9EBEE;
  --neutral-disabled-bg:  #F2F3F5;

  --stroke-1: #E3E5E8;   /* control borders */
  --stroke-2: #ECEDEF;   /* dividers */
  --ctl-stroke-hover: #CBD0D6;  /* a field under the pointer */
  --ctl-stroke-strong: #C3C9D0; /* checkbox edge, dashed chip edge */
  --ctl-track: #D3D8DE;         /* an off switch */
  --stroke-3: #F2F3F4;

  --fg-1: #0E1620;
  --fg-2: #2B333D;
  --fg-3: #6B7480;
  --fg-4: #9097A1;

  --success-fg: #1E7A4F; --success-bg: #EAF6EF; --success-br: #BFE3CF;
  --warning-fg: #B26A00; --warning-bg: #FFF5E6; --warning-br: #F4D9A8;
  --error-fg:   #D93036; --error-bg:   #FDEEEE; --error-br:   #F4BEC0;
  --info-fg:    #2F5FD0; --info-bg:    #EEF3FD; --info-br:    #C3D4F7;
  --purple-fg:  #6B4BC8; --purple-bg:  #F3F0FC; --purple-br:  #D5CCF2;

  /* Soft, short shadows: surfaces are drawn by their hairline, not their lift. */
  --shadow-2:  0 1px 2px rgba(14,22,32,.04);
  --shadow-4:  0 1px 3px rgba(14,22,32,.06);
  --shadow-8:  0 4px 12px rgba(14,22,32,.08);
  --shadow-16: 0 8px 24px rgba(14,22,32,.12);
  --shadow-28: 0 16px 40px rgba(14,22,32,.16);
  --shadow-64: 0 24px 64px rgba(14,22,32,.24);

  --r-sm: 4px; --r-md: 6px; --r-lg: 10px; --r-xl: 14px;

  --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', -apple-system, BlinkMacSystemFont,
          'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Inter', 'Segoe UI Variable Display', 'Segoe UI', sans-serif;

  --sidebar-w:           232px;
  --sidebar-w-collapsed: 64px;
  --topbar-h:            56px;
  --content-pad:         28px;

  /* The pane: a dark navy slab, lighter text as it comes forward. */
  --mt-side-bg:        #0B121A;
  --mt-side-raise:     #141C26;
  --mt-side-hover:     #111A24;
  --mt-side-stroke:    #1D2733;
  --mt-side-fg:        #8C97A4;
  --mt-side-fg-hover:  #D5DBE2;
  --mt-side-fg-active: #FFFFFF;
  --mt-side-faint:     #5B6673;

  --nav-bg:         var(--mt-side-bg);
  --nav-border:     var(--mt-side-stroke);
  --nav-fg:         var(--mt-side-fg);
  --nav-fg-hover:   var(--mt-side-fg-hover);
  --nav-fg-active:  var(--mt-side-fg-active);
  --nav-hover-bg:   var(--mt-side-hover);
  --nav-active-bg:  var(--mt-side-raise);
  --nav-section-fg: var(--mt-side-faint);
  --nav-rail:       transparent;

  --topbar-bg:     var(--neutral-layer);
  --topbar-border: var(--stroke-2);
  --focus-ring:    0 0 0 2px var(--neutral-layer), 0 0 0 4px var(--brand-primary);

  --sc-primary-light: #3A4756;
}

/* Dark theme: the page joins the pane. Ink flips to white for primary actions. */
:root[data-theme="dark"] {
  --brand-primary:  #F4F6F8;
  --brand-hover:    #FFFFFF;
  --brand-pressed:  #D9DEE4;
  --brand-selected: #F4F6F8;
  --brand-fg:       #F4F6F8;
  --brand-fg-hover: #FFFFFF;
  --brand-tint-60:  #1A232E;
  --brand-tint-40:  #243040;
  --brand-tint-20:  #33415A;
  --brand-on:       #0B121A;

  --accent:       #4DB68A;
  --accent-hover: #6BC9A0;
  --accent-tint:  #12261D;

  --neutral-canvas:       #0B121A;
  --neutral-layer:        #101821;
  --neutral-layer-alt:    #131C26;
  --neutral-subtle:       #151F2A;
  --neutral-subtle-hover: #1A2531;
  --neutral-pressed:      #0E1620;
  --neutral-disabled-bg:  #151F2A;

  --stroke-1: #2A3544;
  --stroke-2: #1F2A37;
  --ctl-stroke-hover: #3A4859;
  --ctl-stroke-strong: #3A4859;
  --ctl-track: #2E3B4B;
  --stroke-3: #19232E;

  --fg-1: #F4F6F8;
  --fg-2: #D3D9E0;
  --fg-3: #9AA4B0;
  --fg-4: #6F7A87;

  --success-fg: #5FD398; --success-bg: #11261B; --success-br: #1F4A33;
  --warning-fg: #F0B95B; --warning-bg: #2A2010; --warning-br: #54411D;
  --error-fg:   #FF7A80; --error-bg:   #2D1517; --error-br:   #5A2A2D;
  --info-fg:    #7DA2FF; --info-bg:    #131E36; --info-br:    #26396B;
  --purple-fg:  #B7A1F5; --purple-bg:  #1D1731; --purple-br:  #38305F;

  --shadow-2:  0 1px 2px rgba(0,0,0,.4);
  --shadow-4:  0 1px 3px rgba(0,0,0,.45);
  --shadow-8:  0 4px 12px rgba(0,0,0,.5);
  --shadow-16: 0 8px 24px rgba(0,0,0,.55);
  --shadow-28: 0 16px 40px rgba(0,0,0,.6);
  --shadow-64: 0 24px 64px rgba(0,0,0,.65);

  --mt-side-bg:     #070C12;
  --mt-side-raise:  #111923;
  --mt-side-hover:  #0D141C;
  --mt-side-stroke: #17202B;

  --sc-primary-light: #D3D9E0;
}

/* ═══ 2. BASE ═════════════════════════════════════════════════════════════ */

body { font-family: var(--font); color: var(--fg-1); background: var(--neutral-canvas);
       -webkit-font-smoothing: antialiased; }
.sc-shell { background: var(--neutral-canvas); }
.sc-main  { background: var(--neutral-canvas); }
.sc-content { background: var(--neutral-canvas); font-size: 13px; }
::selection { background: color-mix(in srgb, var(--brand-primary) 14%, transparent); color: var(--fg-1); }

/* ═══ 3. SIDEBAR ══════════════════════════════════════════════════════════
   A dark navy pane: mark and name with a fold button, a search field, the
   menu, and who is signed in. The selected item is a raised dark chip and
   white text — no rail, no tint. */

.fl-sidebar {
  background: var(--mt-side-bg); border-right: 0; color: var(--mt-side-fg);
  font-family: var(--font);
}
@media (min-width: 769px) {
  .fl-sidebar { width: var(--sidebar-w); }
  .fl-sidebar:not(.pinned) { width: var(--sidebar-w-collapsed); }
  .fl-sidebar:not(.pinned):not(:hover):not(:focus-within) :is(.fl-search, .fl-collapse, .fl-user-more, .fl-nav-none),
  .fl-sidebar.collapsed :is(.fl-search, .fl-collapse, .fl-user-more, .fl-nav-none) { display: none; }
  .fl-sidebar:not(.pinned):not(:hover):not(:focus-within) .fl-nav-section,
  .fl-sidebar.collapsed .fl-nav-section { background: var(--mt-side-stroke); }
  .fl-sidebar:not(.pinned):not(:hover):not(:focus-within) .fl-nav-item,
  .fl-sidebar.collapsed .fl-nav-item { border-radius: 8px; }
}

/* Header: mark, name, fold button */
.fl-logo { min-height: 60px; padding: 14px 14px 10px 16px; border-bottom: 0; gap: 10px; }
.fl-logo-mark { width: 24px; height: 24px; border-radius: 6px; }
.fl-logo-name { font-family: var(--font-display); font-size: 16px; font-weight: 600;
                letter-spacing: -.01em; color: #FFFFFF; }
.fl-logo-sub  { display: none; }
.fl-collapse {
  margin-left: auto; width: 28px; height: 28px; flex-shrink: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; background: transparent; color: var(--mt-side-fg); cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.fl-collapse:hover { background: var(--mt-side-raise); color: #FFFFFF; }
.fl-collapse svg { width: 17px; height: 17px; }

/* Search */
.fl-search {
  position: relative; display: flex; align-items: center; gap: 8px;
  margin: 2px 14px 12px; padding: 0 8px 0 10px; height: 34px;
  border: 1px solid var(--mt-side-stroke); border-radius: 8px; background: #0F1822;
  color: var(--mt-side-fg); transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.fl-search:focus-within { border-color: #2C3A4A; background: #111C28; }
.fl-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.fl-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  font: 400 13px/1 var(--font); color: #FFFFFF; box-shadow: none;
}
.fl-search input::placeholder { color: var(--mt-side-fg); }
.fl-search input:focus { box-shadow: none; border: 0; }
.fl-search kbd {
  flex-shrink: 0; padding: 2px 6px; border-radius: 5px; background: var(--mt-side-raise);
  border: 1px solid var(--mt-side-stroke); color: var(--mt-side-fg);
  font: 500 10.5px/1.3 var(--font); letter-spacing: .02em;
}
.fl-search:focus-within kbd { display: none; }

/* The trade chip: a quiet line of text, not a coloured badge. */
.fl-badge { margin: 0 14px 8px; padding: 0; background: transparent; color: var(--mt-side-faint);
            font-size: 10.5px; letter-spacing: .06em; }
.fl-badge::before { background: #3FB67F; }

/* Menu */
.fl-nav { padding: 2px 10px 12px; }
.fl-nav-section { padding: 18px 10px 6px; font-size: 11px; font-weight: 500; letter-spacing: .04em;
                  text-transform: none; color: var(--mt-side-faint); }
.fl-nav-section:first-child { padding-top: 4px; }

.fl-nav-item {
  min-height: 34px; padding: 6px 10px; margin: 2px 0; gap: 10px; border-radius: 7px;
  color: var(--mt-side-fg); font: 500 13px/1.3 var(--font);
}
.fl-nav-item svg { width: 16px; height: 16px; stroke-width: 1.7; }
.fl-nav-item:hover { background: var(--mt-side-hover); color: var(--mt-side-fg-hover); }
.fl-nav-item:active { background: var(--mt-side-raise); }
.fl-nav-item::before { display: none; }
.fl-nav-item.active { background: var(--mt-side-raise); color: #FFFFFF; font-weight: 500; }
.fl-nav-item.expanded:not(.active) { color: var(--mt-side-fg-hover); }
.fl-nav-chevron { opacity: .5; width: 13px; height: 13px; }

.fl-nav-count { padding: 0 6px; min-width: 18px; height: 18px; display: inline-flex; align-items: center;
                justify-content: center; border-radius: 999px; background: #E5484D; color: #FFFFFF;
                font-size: 10.5px; font-weight: 600; }
.fl-nav-item.active .fl-nav-count { background: #E5484D; color: #FFFFFF; }

.fl-nav-sub::before { left: 19px; background: var(--mt-side-stroke); }
.fl-nav-sub-item {
  min-height: 30px; padding: 5px 10px 5px 38px; margin: 1px 0; border-radius: 7px;
  color: var(--mt-side-fg); font: 400 12.5px/1.3 var(--font);
}
.fl-nav-sub-item:hover { background: var(--mt-side-hover); color: var(--mt-side-fg-hover); }
.fl-nav-sub-item.active { background: var(--mt-side-raise); color: #FFFFFF; font-weight: 500; }
.fl-nav-sub-item.active::before { left: 18px; width: 3px; height: 12px; background: #FFFFFF; opacity: .9; }
.fl-nav-none { padding: 14px 10px; font-size: 12.5px; color: var(--mt-side-faint); }

/* Signed-in user */
.fl-user { padding: 12px 14px 14px; border-top: 0; gap: 10px; }
.fl-avatar { width: 30px; height: 30px; background: #2A3644; color: #FFFFFF; font-size: 11.5px; font-weight: 600; }
.fl-user-name { font-size: 13px; font-weight: 500; color: #FFFFFF; }
.fl-user-role { font-size: 11.5px; color: var(--mt-side-faint); }
.fl-user-more {
  width: 26px; height: 26px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px; color: var(--mt-side-fg); text-decoration: none;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.fl-user-more:hover { background: var(--mt-side-raise); color: #FFFFFF; text-decoration: none; }
.fl-user-more svg { width: 16px; height: 16px; }

/* On a phone the drawer keeps the same pane. */
@media (max-width: 768px) {
  .fl-sidebar { width: min(var(--sidebar-w), 86vw); }
}

/* ═══ 4. TOP BAR + PAGE HEADER ════════════════════════════════════════════ */

.sc-topbar { height: var(--topbar-h); padding: 0 20px; gap: 10px; background: var(--neutral-layer);
             border-bottom: 1px solid var(--stroke-2); }
.sc-breadcrumb { font-size: 13px; }
.sc-bc-link { color: var(--fg-3); border-radius: 6px; }
.sc-bc-link:hover { color: var(--fg-1); background: var(--neutral-subtle-hover); }
.sc-bc-sep { color: var(--stroke-1); }
.sc-bc-current { color: var(--fg-1); font-weight: 500; }

.sc-search-wrap input {
  height: 34px; width: 240px; padding: 0 12px 0 34px; border-radius: 8px;
  background: var(--neutral-subtle); border: 1px solid transparent; font-size: 13px;
}
.sc-search-wrap input:focus { width: 300px; background: var(--neutral-layer); border-color: var(--stroke-1);
                              box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 8%, transparent); }
.sc-search-icon { left: 11px; }

.sc-icon-btn { width: 34px; height: 34px; border-radius: 8px; color: var(--fg-3); }
.sc-icon-btn:hover { background: var(--neutral-subtle-hover); color: var(--fg-1); }
.sc-icon-btn.on { background: var(--brand-tint-60); color: var(--fg-1); }
.sc-notif-dot { background: #E5484D; border-color: var(--neutral-layer); }

.sc-branch-btn { height: 34px; border-radius: 8px; border-color: var(--stroke-1); }
.sc-branch-all .sc-branch-name { color: var(--accent); }
.sc-branch-opt.active { background: var(--neutral-subtle); color: var(--fg-1); }

.sc-dropdown-menu, .sc-branch-menu { border-radius: 10px; border: 1px solid var(--stroke-2); box-shadow: var(--shadow-16); }
.sc-dropdown-item { border-radius: 6px; font-size: 13px; }
.sc-dropdown-item:hover { background: var(--neutral-subtle-hover); }

.sc-content { padding: var(--content-pad) 32px; }
.sc-page-header { margin-bottom: 20px; align-items: center; }
.sc-page-title { font-family: var(--font-display); font-size: 24px; font-weight: 600;
                 letter-spacing: -.02em; line-height: 1.2; color: var(--fg-1); }
.sc-page-subtitle { font-size: 13px; color: var(--fg-3); }

/* ═══ 5. CONTROLS ═════════════════════════════════════════════════════════ */

/* Buttons: ink for the main action, a white outlined button for the rest. */
.sc-btn {
  min-height: 32px; padding: 0 12px; gap: 6px; border-radius: 7px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--stroke-1); background: var(--neutral-layer); color: var(--fg-1); box-shadow: var(--shadow-2);
}
.sc-btn:hover:not(:disabled) { background: var(--neutral-subtle-hover); border-color: var(--stroke-1); }
.sc-btn:active:not(:disabled) { background: var(--neutral-pressed); }
.sc-btn svg { width: 14px; height: 14px; }
.sc-btn-primary, .sc-btn-accent {
  background: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-on); box-shadow: none;
}
.sc-btn-primary:hover:not(:disabled), .sc-btn-accent:hover:not(:disabled) {
  background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-on);
}
.sc-btn-primary:active:not(:disabled), .sc-btn-accent:active:not(:disabled) { background: var(--brand-pressed); }
.sc-btn-success { background: var(--accent); border-color: var(--accent); color: #FFFFFF; box-shadow: none; }
.sc-btn-success:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: #FFFFFF; }
.sc-btn-danger  { background: #D93036; border-color: #D93036; color: #FFFFFF; box-shadow: none; }
.sc-btn-danger:hover:not(:disabled) { background: #BF262C; border-color: #BF262C; color: #FFFFFF; }
.sc-btn-warning { background: var(--warning-bg); border-color: var(--warning-br); color: var(--warning-fg); box-shadow: none; }
.sc-btn-outline { background: var(--neutral-layer); border-color: var(--stroke-1); color: var(--fg-1); }
.sc-btn-subtle, .sc-btn-ghost { background: transparent; border-color: transparent; color: var(--fg-2); box-shadow: none; }
.sc-btn-subtle:hover:not(:disabled), .sc-btn-ghost:hover:not(:disabled) { background: var(--neutral-subtle-hover); border-color: transparent; }
.sc-btn-link { color: var(--fg-1); text-decoration: underline; text-underline-offset: 3px; box-shadow: none; }
.sc-btn-sm { min-height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 6px; }
.sc-btn-lg { min-height: 38px; padding: 0 16px; font-size: 14px; }
.sc-btn:disabled { opacity: .45; }

/* Fields */
.sc-input, .sc-select, .sc-textarea {
  min-height: 34px; border-radius: 7px; border: 1px solid var(--stroke-1);
  background: var(--neutral-layer); color: var(--fg-1); font-size: 13px;
}
.sc-input::placeholder, .sc-textarea::placeholder { color: var(--fg-4); }
.sc-input:hover, .sc-select:hover, .sc-textarea:hover { border-color: var(--ctl-stroke-hover); }
.sc-input:focus, .sc-select:focus, .sc-textarea:focus {
  border-color: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 9%, transparent); outline: none;
}
.sc-label { font-size: 12.5px; font-weight: 500; color: var(--fg-2); }
.sc-field-hint { color: var(--fg-4); }
.sc-input-addon { background: var(--neutral-subtle); border-color: var(--stroke-1); color: var(--fg-3); }

/* Checkboxes: a 16px square, ink when ticked. Switches keep their own track. */
.sc-shell input[type="checkbox"]:not(.sc-switch *),
.sc-login-shell input[type="checkbox"] {
  -webkit-appearance: none; appearance: none; flex-shrink: 0; margin: 0; cursor: pointer;
  width: 16px; height: 16px; border: 1.5px solid var(--ctl-stroke-strong); border-radius: 4px; background-color: var(--neutral-layer);
  display: inline-block; vertical-align: middle; position: relative;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.sc-shell input[type="checkbox"]:not(.sc-switch *):hover { border-color: var(--fg-3); }
.sc-shell input[type="checkbox"]:not(.sc-switch *):checked,
.sc-shell input[type="checkbox"]:not(.sc-switch *):indeterminate,
.sc-login-shell input[type="checkbox"]:checked {
  background-color: var(--brand-primary); border-color: var(--brand-primary);
  background-repeat: no-repeat; background-position: center; background-size: 11px;
}
.sc-shell input[type="checkbox"]:not(.sc-switch *):checked,
.sc-login-shell input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .sc-shell input[type="checkbox"]:not(.sc-switch *):checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B121A' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.sc-shell input[type="checkbox"]:not(.sc-switch *):indeterminate {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
}
.sc-shell input[type="checkbox"]:not(.sc-switch *):focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }
.sc-check-label { font-size: 13px; color: var(--fg-2); }

/* Switches */
.sc-switch input:checked + .sc-switch-track { background: var(--brand-primary); }
.sc-switch-track { background: var(--ctl-track); }

/* Filter chips — a row of small dashed pills, the first active one filled ink.
   Any select placed in a toolbar becomes one, so every list gets them without
   a markup change. */
.sc-toolbar { padding: 12px 0 14px; gap: 8px; border-bottom: 0; background: transparent; flex-wrap: wrap; }
.sc-toolbar-count { font-size: 12.5px; color: var(--fg-3); }
.sc-toolbar .sc-select {
  -webkit-appearance: none; appearance: none; width: auto; min-width: 0; min-height: 28px; height: 28px;
  padding: 0 26px 0 12px; border: 1px dashed var(--ctl-stroke-strong); border-radius: 999px; background-color: transparent;
  font-size: 12.5px; font-weight: 500; color: var(--fg-2); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7480' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 12px;
}
.sc-toolbar .sc-select:hover { border-color: var(--fg-3); background-color: var(--neutral-subtle); }
.sc-toolbar .sc-select:focus { border-style: solid; border-color: var(--brand-primary); box-shadow: none; }
.sc-toolbar .sc-input { min-height: 28px; height: 28px; border-radius: 999px; font-size: 12.5px; }
.sc-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--brand-primary); color: var(--brand-on); border: 1px solid var(--brand-primary);
  font-size: 12px; font-weight: 500;
}
.sc-chip button { color: inherit; opacity: .7; }
.sc-chip button:hover { opacity: 1; background: transparent; }
.sc-chip-row { gap: 6px; }

/* Tabs — plain text with an ink underline on the one in force. */
.sc-tabs { gap: 20px; border-bottom: 1px solid var(--stroke-2); }
.sc-tab { padding: 10px 0; font-size: 13px; font-weight: 500; color: var(--fg-3); background: transparent; border-radius: 0;
          box-shadow: none; border: 0; }
.sc-tab:hover { color: var(--fg-1); background: transparent; }
.sc-tab.active { color: var(--fg-1); font-weight: 600; box-shadow: inset 0 -2px 0 0 var(--brand-primary); background: transparent; }
.sc-tab .tab-cnt { margin-left: 6px; padding: 0 6px; min-width: 18px; height: 18px; display: inline-flex; align-items: center;
                   justify-content: center; border-radius: 999px; background: var(--neutral-subtle-hover);
                   color: var(--fg-3); font-size: 11px; font-weight: 600; }
.sc-tab.active .tab-cnt { background: var(--brand-primary); color: var(--brand-on); }

/* View toggle (list / tiles) */
.fl-viewtoggle { border-radius: 8px; border: 1px solid var(--stroke-1); background: var(--neutral-layer); }
.fl-viewtoggle-btn[aria-pressed="true"] { background: var(--brand-primary); color: var(--brand-on); }

/* Pagination */
.sc-page-btn { border-radius: 6px; border: 1px solid var(--stroke-1); background: var(--neutral-layer); color: var(--fg-2); font-size: 12.5px; }
.sc-page-btn:hover:not(:disabled) { background: var(--neutral-subtle-hover); }
.sc-page-btn.active { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-on); }

/* ═══ 6. TABLES ═══════════════════════════════════════════════════════════
   No outer frame, a quiet header in the page's own words (not capitals), a
   tick column, rows divided by a hairline and a soft fill under the pointer.
   Status is coloured text with a small glyph, not a filled pill. */

.sc-card:has(> .sc-table-wrap), .sc-card:has(.sc-table-wrap):not(:has(.sc-card-header)) {
  border: 0; box-shadow: none; background: transparent; border-radius: 0;
}
.sc-table-wrap { overflow-x: auto; }
.sc-table { font-size: 13px; border-collapse: separate; border-spacing: 0; }
.sc-table thead th {
  position: sticky; top: 0; z-index: 1; padding: 10px 14px; background: var(--neutral-layer);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--fg-4);
  border-top: 1px solid var(--stroke-2); border-bottom: 1px solid var(--stroke-2);
}
.sc-table thead th.sorted { color: var(--fg-1); }
.sc-table tbody td { padding: 0 14px; height: 48px; border-bottom: 1px solid var(--stroke-2); color: var(--fg-1); }
.sc-table tbody td.muted { color: var(--fg-3); }
.sc-table tbody tr { border-bottom: 0; }
.sc-table tbody tr:last-child td { border-bottom: 1px solid var(--stroke-2); }
.sc-table tbody tr:hover { background: var(--neutral-subtle); }
.sc-table tbody tr.selected { background: var(--neutral-subtle); }
.sc-table tbody tr.selected:hover { background: var(--neutral-subtle-hover); }
.sc-table th.col-check, .sc-table td.col-check { width: 44px; padding: 0 0 0 14px; }
.sc-table td.col-actions { color: var(--fg-3); }
.sc-table td.num { font-weight: 400; }
.sc-table-clickable tbody tr { cursor: pointer; }
.sc-cell-primary { font-weight: 500; }
.sc-cell-sub { color: var(--fg-4); }

/* A tick box in the header that is part-way: the same square with a dash. */
.sc-shell input[type="checkbox"][data-partial] {
  background-color: var(--brand-primary); border-color: var(--brand-primary);
  background-repeat: no-repeat; background-position: center; background-size: 11px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
}

/* Status: text with a glyph — ✓ paid, ✕ cancelled, ↩ refunded in the design. */
.sc-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 0; background: transparent !important;
  border: 0 !important; border-radius: 0; font-size: 13px; font-weight: 400; letter-spacing: 0; white-space: nowrap;
}
.sc-badge .sc-badge-dot { display: none; }
.sc-badge::before { content: "•"; font-size: 14px; line-height: 1; font-weight: 700; }
.badge-success { color: var(--success-fg); }
.badge-success::before { content: "✓"; font-size: 12px; }
.badge-error { color: var(--error-fg); }
.badge-error::before { content: "✕"; font-size: 11px; }
.badge-warning { color: var(--warning-fg); }
.badge-warning::before { content: "◔"; font-size: 13px; font-weight: 400; }
.badge-info { color: var(--info-fg); }
.badge-info::before { content: "↗"; font-size: 12px; }
.badge-neutral { color: var(--fg-3); }
.badge-neutral::before { content: "↩"; font-size: 12px; }
.badge-primary, .badge-accent { color: var(--accent); }
.badge-purple { color: var(--purple-fg); }

/* Pagination under a list */
.sc-pagination { padding: 14px 4px; border-top: 0; color: var(--fg-3); font-size: 12.5px; }

/* ═══ 8a. BULK-ACTION BAR ═════════════════════════════════════════════════
   Rises over the foot of the page when rows are ticked: close, the count, then
   the actions as quiet text buttons. */

@keyframes mt-rise { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
.sc-bulkbar {
  position: fixed; left: calc(50% + var(--sidebar-w) / 2); bottom: 22px; transform: translateX(-50%); z-index: 400;
  display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 12px;
  background: #0E1620; color: #FFFFFF; box-shadow: 0 12px 32px rgba(14,22,32,.28);
  animation: mt-rise var(--dur-normal) var(--ease-decel) both; max-width: calc(100vw - 24px);
}
:root[data-theme="dark"] .sc-bulkbar { background: #1A2531; border: 1px solid #2A3544; }
.sc-bulkbar-x {
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  border: 0; border-radius: 8px; background: transparent; color: #FFFFFF; cursor: pointer;
}
.sc-bulkbar-x:hover { background: rgba(255,255,255,.1); }
.sc-bulkbar-x svg { width: 15px; height: 15px; }
.sc-bulkbar-main { display: flex; align-items: center; gap: 2px; padding: 0 4px 0 6px; border-left: 1px solid rgba(255,255,255,.12); margin-left: 2px; overflow-x: auto; }
.sc-bulkbar-count { padding: 0 12px; font-size: 12.5px; color: rgba(255,255,255,.55); white-space: nowrap; }
.sc-bulkbar-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px;
  background: transparent; color: #FFFFFF; font: 500 12.5px/1 var(--font); cursor: pointer; white-space: nowrap;
}
.sc-bulkbar-btn:hover { background: rgba(255,255,255,.1); }
.sc-bulkbar-btn svg { width: 14px; height: 14px; }
@media (max-width: 768px) { .sc-bulkbar { left: 50%; } }

/* ═══ 7. CARDS ════════════════════════════════════════════════════════════
   Two surfaces. A white card with a hairline for forms and detail; a soft grey
   tile with generous corners for the dashboard's figures and panels. */

.sc-card { background: var(--neutral-layer); border: 1px solid var(--stroke-2); border-radius: 14px; box-shadow: none; }
.sc-card-header { padding: 16px 20px; border-bottom: 1px solid var(--stroke-2); }
.sc-card-title { font-size: 14px; font-weight: 600; color: var(--fg-1); letter-spacing: -.005em; }
.sc-card-subtitle { font-size: 12.5px; color: var(--fg-4); }
.sc-card-body { padding: 20px; }
.sc-card-footer { border-top: 1px solid var(--stroke-2); background: transparent; }
.sc-card-stack-top, .sc-card-stack-btm { border: 0; background: transparent; box-shadow: none; border-radius: 0; }
.sc-card-stack-top { padding: 0; }

/* Dashboard tiles — a figure, the icon in a dark disc, the change beside it. */
.sc-kpi-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.sc-kpi {
  background: var(--neutral-subtle); border: 0; border-radius: 20px; padding: 18px 20px; box-shadow: none; overflow: visible;
}
.sc-kpi:hover { box-shadow: none; background: var(--neutral-subtle-hover); }
.sc-kpi::after { display: none; }
.sc-kpi-label { font-size: 13px; font-weight: 500; color: var(--fg-3); text-transform: none; letter-spacing: 0; margin-bottom: 12px; }
.sc-kpi-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sc-kpi-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-primary); color: var(--brand-on); }
.sc-kpi-icon svg { width: 18px; height: 18px; }
.sc-kpi-value { font-size: 28px; font-weight: 600; letter-spacing: -.03em; line-height: 1; margin: 0; color: var(--fg-1); white-space: nowrap; }
.sc-kpi-trend { margin-left: auto; align-self: flex-end; gap: 2px; font-size: 11.5px; font-weight: 500; opacity: .9; }
.sc-kpi-sub { margin-top: 10px; font-size: 12px; color: var(--fg-4); }
.kpi-primary, .kpi-success, .kpi-warning, .kpi-error, .kpi-info, .kpi-accent, .kpi-purple { --kpi-c: var(--brand-primary); }

/* Dashboard panels sit on the same grey. */
:is(.sc-grid-2, .sc-grid-3, .sc-grid-4, .sc-grid-3-1, .sc-grid-2-1) > .sc-card {
  background: var(--neutral-subtle); border: 0; border-radius: 20px;
}
:is(.sc-grid-2, .sc-grid-3, .sc-grid-4, .sc-grid-3-1, .sc-grid-2-1) > .sc-card > .sc-card-header { border-bottom: 0; padding: 18px 22px 4px; }
:is(.sc-grid-2, .sc-grid-3, .sc-grid-4, .sc-grid-3-1, .sc-grid-2-1) > .sc-card > .sc-card-body { padding: 12px 22px 20px; }

/* Summary strip, detail blocks, stat rows */
.sc-summary-strip { background: var(--neutral-subtle); border: 0; border-radius: 14px; padding: 14px 20px; }
.sc-summary-label { font-size: 12px; color: var(--fg-3); }
.sc-summary-value { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.sc-detail-section-title { font-size: 12.5px; font-weight: 500; color: var(--fg-4); text-transform: none; letter-spacing: 0; }
.sc-detail-label { color: var(--fg-4); font-size: 12.5px; }
.sc-detail-value { color: var(--fg-1); font-size: 13px; }
.sc-stat-label { color: var(--fg-3); }
.sc-stat-value { font-weight: 600; }
.sc-progress { background: var(--neutral-pressed); border-radius: 999px; }
.sc-progress-bar { background: var(--accent); border-radius: 999px; }
.sc-divider { background: var(--stroke-2); }

/* Alerts */
.sc-alert { border-radius: 10px; font-size: 13px; }

/* Empty and loading */
.sc-empty-icon { background: var(--neutral-subtle); color: var(--fg-3); border-radius: 50%; }
.sc-empty-title { font-weight: 600; color: var(--fg-1); }
.sc-empty-text { color: var(--fg-4); }

/* fluent2-components paints the hover on the cell; match it for the new fills. */
.sc-table tbody tr:hover td, .sc-table tbody tr.selected td { background: var(--neutral-subtle); }
.sc-table tbody tr.selected:hover td { background: var(--neutral-subtle-hover); }
.sc-table thead th { height: auto; }

/* An item's detail panel, opened in place under its row. */
.sc-table tbody tr.sc-row-detail, .sc-table tbody tr.sc-row-detail:hover { cursor: default; }
.sc-table tbody tr.sc-row-detail > td { height: auto; padding: 16px 18px; background: var(--neutral-subtle); }
/* Totals under an editor's lines: compact rows, one rule above the block, the last
   row (the grand total) in semibold. A list's own totals row (DataGrid Footer) is
   shaded instead, like a header. */
.sc-table tfoot td { height: 38px; padding: 0 14px; color: var(--fg-2); background: transparent; border: 0; }
.sc-table tfoot tr:first-child td { border-top: 1px solid var(--stroke-2); }
.sc-table tfoot tr:last-child td { color: var(--fg-1); font-weight: 600; }
.sc-table tfoot.sc-foot-grid td { height: 48px; font-weight: 600; color: var(--fg-1);
  background: var(--neutral-subtle); border-top: 1px solid var(--stroke-2); }

/* A field inside a table cell: sized for a 48px row, fills its column, and a number
   stays right-aligned under its heading. */
.sc-table td > .sc-input, .sc-table td > .sc-select { width: 100%; min-height: 32px; height: 32px; padding-top: 0; padding-bottom: 0; }
.sc-table td > .sc-input.num, .sc-table td > .sc-input[type="number"] { min-width: 96px; text-align: right; }
.sc-table td > .sc-input:disabled, .sc-table td > .sc-select:disabled { background: var(--neutral-disabled-bg); color: var(--fg-3); }

/* A wide line table scrolls inside its card rather than pushing the page sideways. */
.sc-table-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; }
.sc-table thead th { white-space: nowrap; }

/* ═══ 8. OVERLAYS ═════════════════════════════════════════════════════════
   The detail popover of the design: a dark title bar with a grip, the title in
   small white type, and a close button; below it a white body and a footer of
   plain actions. Dialogs, drawers and confirmations all use it. */

.sc-overlay { background: rgba(14,22,32,.40); backdrop-filter: none; }
.sc-modal { border-radius: 12px; border: 1px solid var(--stroke-2); box-shadow: var(--shadow-28); }
.sc-modal-hdr {
  align-items: center; padding: 0 8px 0 14px; min-height: 40px; gap: 10px;
  background: #0E1620; color: #FFFFFF;
}
:root[data-theme="dark"] .sc-modal-hdr { background: #1A2531; }
.sc-modal-hdr::before {                       /* the grip */
  content: ""; width: 10px; height: 14px; flex-shrink: 0; opacity: .55;
  background: radial-gradient(circle, #fff 1.1px, transparent 1.4px) 0 0 / 5px 5px;
}
.sc-modal-hdr > div:first-child { flex: 1; display: flex; align-items: baseline; gap: 10px; }
.sc-modal-title { font-family: var(--font); font-size: 13px; font-weight: 500; color: #FFFFFF; letter-spacing: 0; }
.sc-modal-sub { margin: 0; font-size: 12px; color: rgba(255,255,255,.55); }
.sc-modal-close { width: 28px; height: 28px; border-radius: 6px; color: rgba(255,255,255,.8); }
.sc-modal-close:hover { background: rgba(255,255,255,.12); color: #FFFFFF; }
.sc-modal-body { padding: 16px 18px 18px; }
.sc-modal-ftr { padding: 10px 14px; background: var(--neutral-layer); gap: 6px; }
.sc-modal-ftr .sc-btn:not(.sc-btn-primary):not(.sc-btn-danger):not(.sc-btn-success):not(.sc-btn-accent) {
  border-color: transparent; background: transparent; box-shadow: none; color: var(--fg-2);
}
.sc-modal-ftr .sc-btn:not(.sc-btn-primary):not(.sc-btn-danger):not(.sc-btn-success):not(.sc-btn-accent):hover { background: var(--neutral-subtle-hover); }

/* A side panel gets the same bar, and the panel's own heading row inherits it. */
.sc-drawer { border-left: 1px solid var(--stroke-2); box-shadow: var(--shadow-28); }
.sc-drawer > .sc-modal-hdr, .sc-drawer .sc-modal-hdr { border-radius: 0; }

/* Flyouts and menus */
.sc-dropdown-menu, .sc-branch-menu, .sc-theme-menu { border-radius: 10px; padding: 4px; }
.sc-dropdown-item.selected { background: var(--neutral-subtle); color: var(--fg-1); }
.sc-dropdown-item.danger { color: var(--error-fg); }
.sc-tip { background: #0E1620; color: #FFFFFF; border-radius: 6px; }

/* Sign-in: the same ink and white, without the tinted wash. */
.sc-login-shell { background: var(--neutral-subtle); }
.sc-login-shell::before { display: none; }
.sc-login-card { border-radius: 20px; border: 0; box-shadow: var(--shadow-28); }
.sc-login-brand { background: #0B121A; }
.sc-login-head { font-weight: 600; }
.sc-login-link { color: var(--fg-1); text-decoration: underline; text-underline-offset: 3px; }
.sc-pw-toggle { border-width: 1px; border-radius: 7px; }

/* Error strip Blazor shows when a circuit drops */
#blazor-error-ui { background: #0E1620; color: #FFFFFF; }

/* ═══ 9. SIDE PANEL ═══════════════════════════════════════════════════════
   The column on the right of the dashboard: small capital headings, a
   half-ring gauge, a segmented status bar with its legend, a two-by-three grid
   of figures, and a short ranked list. Sections are divided by hairlines. */

.sc-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.sc-split-main { min-width: 0; }
.sc-sidepanel {
  position: sticky; top: 0; align-self: start; border-left: 1px solid var(--stroke-2);
  margin: -4px 0 0; padding-left: 0; font-size: 13px;
}
.sc-sp-sec { padding: 20px 0 20px 24px; border-bottom: 1px solid var(--stroke-2); }
.sc-sp-sec:last-child { border-bottom: 0; }
.sc-sp-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
            font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fg-3); }
.sc-sp-hd small { font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--fg-3); }

/* Gauge */
.sc-gauge { position: relative; width: 100%; max-width: 230px; margin: 4px auto 6px; }
.sc-gauge svg { display: block; width: 100%; height: auto; overflow: visible; }
.sc-gauge path { fill: none; stroke-width: 11; }
.sc-gauge-track { stroke: var(--neutral-pressed); stroke-linecap: round; }
.sc-gauge-seg { stroke-linecap: butt; }
.sc-seg-0 { stroke: var(--accent); }
.sc-seg-1 { stroke: #0E1620; }
.sc-seg-2 { stroke: #8C97A4; }
.sc-seg-3 { stroke: #C9CED5; }
:root[data-theme="dark"] .sc-seg-1 { stroke: #F4F6F8; }
.sc-gauge-center { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; }
.sc-gauge-value { font-size: 24px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: var(--fg-1); }
.sc-gauge-caption { margin-top: 2px; font-size: 12.5px; color: var(--fg-3); }

/* Legend rows under a gauge or a bar: a coloured square, the name, the figure. */
.sc-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; }
.sc-legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--fg-1); }
.sc-legend-item::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--legend-c, var(--accent)); }
.sc-legend-item.c1 { --legend-c: #0E1620; } .sc-legend-item.c2 { --legend-c: #8C97A4; } .sc-legend-item.c3 { --legend-c: #C9CED5; }
:root[data-theme="dark"] .sc-legend-item.c1 { --legend-c: #F4F6F8; }

/* Segmented status bar with rows beneath it */
.sc-segbar { display: flex; gap: 2px; height: 6px; border-radius: 999px; overflow: hidden; background: var(--neutral-pressed); margin-bottom: 14px; }
.sc-segbar > span { display: block; height: 100%; background: var(--accent); }
.sc-segbar > span.c1 { background: #0E1620; } .sc-segbar > span.c2 { background: #8C97A4; } .sc-segbar > span.c3 { background: #C9CED5; }
:root[data-theme="dark"] .sc-segbar > span.c1 { background: #F4F6F8; }
.sc-sp-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; color: var(--fg-1); }
.sc-sp-row-l { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.sc-sp-row-l::before { content: ""; width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; background: var(--legend-c, var(--accent)); }
.sc-sp-row.c1 { --legend-c: #0E1620; } .sc-sp-row.c2 { --legend-c: #8C97A4; } .sc-sp-row.c3 { --legend-c: #C9CED5; }
:root[data-theme="dark"] .sc-sp-row.c1 { --legend-c: #F4F6F8; }
.sc-sp-row-r { color: var(--fg-3); font-variant-numeric: tabular-nums; }

/* Two-by-three figures */
.sc-sp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.sc-sp-stat-v { font-size: 20px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sc-sp-stat-l { margin-top: 2px; font-size: 12.5px; color: var(--fg-3); }

/* Ranked list */
.sc-sp-rank { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.sc-sp-rank-n { width: 32px; height: 32px; flex-shrink: 0; display: grid; place-items: center; border-radius: 8px;
                background: var(--neutral-subtle); color: var(--fg-3); font-size: 12px; font-weight: 600; }
.sc-sp-rank-t { flex: 1; min-width: 0; line-height: 1.3; }
.sc-sp-rank-t b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-sp-rank-t span { font-size: 12px; color: var(--fg-4); }
.sc-sp-rank-v { font-variant-numeric: tabular-nums; font-weight: 500; }

@media (max-width: 1280px) {
  .sc-split { grid-template-columns: 1fr; }
  .sc-sidepanel { position: static; border-left: 0; border-top: 1px solid var(--stroke-2); display: grid;
                  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .sc-sp-sec { padding-left: 0; border-bottom: 0; }
}


/* ═══ 9. SETTINGS ═════════════════════════════════════════════════════════
   The frame around every Settings screen (Components/SettingsShell.razor):
   a grouped list of screens on the left, the screen on the right. Tokens only,
   so it follows the light and dark themes without a rule of its own.
   ────────────────────────────────────────────────────────────────────────── */

.mt-set {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.mt-set-nav {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px;
  background: var(--neutral-layer);
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
}

.mt-set-title {
  padding: 14px 10px 6px;
  font: 600 10.5px/1 var(--font);
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--fg-4);
}
.mt-set-title:first-child { padding-top: 4px; }

.mt-set-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--fg-2);
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease;
}
.mt-set-item:hover { background: var(--neutral-subtle-hover); color: var(--fg-1); }
.mt-set-item.active {
  background: var(--neutral-subtle);
  border-color: var(--stroke-1);
  color: var(--fg-1);
}
.mt-set-item-label { font: 600 13px/1.3 var(--font); }
.mt-set-item-sub   { font: 400 11.5px/1.35 var(--font); color: var(--fg-3); }

.mt-set-main { min-width: 0; }

/* The module chips on All settings: a row above the values rather than a second sidebar. */
.mt-set-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}
.mt-set-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--stroke-1);
  border-radius: 999px;
  background: var(--neutral-layer);
  color: var(--fg-2);
  font: 500 12.5px/1 var(--font);
  cursor: pointer;
}
.mt-set-chip:hover { border-color: var(--ctl-stroke-hover); background: var(--neutral-subtle); }
.mt-set-chip.active { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--brand-on); }
.mt-set-chip-n { font-size: 11px; opacity: .65; }

/* Narrow windows: the list becomes a row of chips above the screen. */
@media (max-width: 960px) {
  .mt-set { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .mt-set-nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 8px;
  }
  .mt-set-title { display: none; }
  .mt-set-item { flex: 0 0 auto; padding: 7px 12px; }
  .mt-set-item-sub { display: none; }
}
