/* ============================================================================
   WebGateway V5 - orange / gray / white / black.

   Layout follows SalesTargetAI / ManufacturingAI (black sidebar, cards, data
   tables) with a fixed top bar for search, cart and the user menu.

   Orange is the brand and the action color: primary buttons, the active menu
   item, the cart badge, focus rings. It is not used for status - red / amber /
   green inks are reserved for "needs attention / caution / fine".
   ========================================================================== */

:root {
  --orange:        #F26522;   /* Wood-Mizer orange: fills, bars, badges */
  --orange-hover:  #D9541A;
  --orange-ink:    #B4460F;   /* orange text on white, 5.0:1 */
  --orange-tint:   #FEF0E8;

  --white:    #FFFFFF;
  --gray-25:  #FAFAFA;
  --gray-50:  #F4F4F5;
  --gray-100: #EAEAEC;
  --gray-200: #DADBDE;
  --gray-300: #C2C4C8;
  --gray-400: #9A9DA3;
  --gray-500: #74777E;
  --gray-600: #55585F;
  --gray-700: #3A3C42;
  --gray-800: #232428;
  --gray-900: #151619;
  --black:    #0B0B0C;

  --surface:        var(--white);
  --surface-sunken: var(--gray-50);
  --border:         var(--gray-200);
  --border-strong:  var(--gray-300);
  --ink:            var(--black);
  --ink-2:          var(--gray-600);
  --ink-muted:      var(--gray-500);

  --good:     #1F6B40;  --good-bg: #E7F3EC;
  --warn:     #7A5200;  --warn-bg: #FCF3DC;
  --bad:      #9E1F15;  --bad-bg:  #FBE9E7;
  --info:     #1E4E8C;  --info-bg: #E8EFF9;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(11,11,12,.06);
  --shadow-md: 0 6px 24px rgba(11,11,12,.12);

  --sidebar-w: 240px;
  --topbar-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;

  /* Mode-stable: the black sidebar and "dark" controls stay dark in both themes. */
  --sidebar-bg: #0B0B0C;
  --fixed-dark: #151619;
  --fixed-dark-hover: #0B0B0C;
  --warn-border: #EFD9A4; --bad-border: #F1C2BC; --good-border: #BCDDC9; --info-border: #C3D4EE;
  color-scheme: light;
}

/* Dark theme (user menu > Appearance). The gray ramp is mirrored so every component that reads it flips with it;
   orange keeps its fills, and inks are lifted to stay readable on dark surfaces. */
html[data-theme="dark"] {
  --orange-hover:  #FF7A3D;
  --orange-ink:    #FF9A66;
  --orange-tint:   #3A2216;

  --white:    #1B1C20;
  --gray-25:  #17181B;
  --gray-50:  #121316;
  --gray-100: #25272C;
  --gray-200: #30333A;
  --gray-300: #3E4149;
  --gray-400: #6B6F77;
  --gray-500: #9296A0;
  --gray-600: #B3B7BF;
  --gray-700: #CDD0D6;
  --gray-800: #E3E5E9;
  --gray-900: #F1F2F4;
  --black:    #F7F7F8;

  --good: #7FD3A1;  --good-bg: #16301F;  --good-border: #24503A;
  --warn: #F0C766;  --warn-bg: #33280C;  --warn-border: #5A4715;
  --bad:  #FF9E93;  --bad-bg:  #3A1714;  --bad-border:  #6A2A24;
  --info: #9CC2F5;  --info-bg: #13243A;  --info-border: #274770;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 6px 24px rgba(0,0,0,.5);
  color-scheme: dark;
}
html[data-theme="dark"] img:not([src$=".svg"]) { filter: brightness(.92); }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--surface-sunken);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.1rem; } h3 { font-size: .98rem; } h4 { font-size: .9rem; }
p { margin: 0 0 .75rem; }
code, .mono { font-family: var(--mono); font-size: .86em; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ============================ shell ====================================== */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg); color: #fff;
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  display: flex; flex-direction: column;
  transition: transform .2s ease;
}
.sidebar__brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: .55rem;
  padding: 0 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08);
  color: #fff; text-decoration: none;
  overflow: hidden; /* never spill past the dark sidebar into the top bar */
}
.sidebar__brand:hover { text-decoration: none; }
.sidebar__brand img { height: 20px; width: auto; max-width: 130px; flex: 0 1 auto; min-width: 0; }
.sidebar__brand-tag {
  font-size: .95rem; font-weight: 600; letter-spacing: .01em; color: #fff; line-height: 1;
  flex: 0 0 auto;
}
.sidebar__nav { flex: 1; overflow-y: auto; padding: .6rem 0 1rem; }
.sidebar__section {
  margin: 1rem 1.1rem .3rem; font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--gray-400);
}
.sidebar__link {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem 1.1rem; color: rgba(255,255,255,.78);
  border-left: 3px solid transparent; font-size: .92rem;
}
.sidebar__link:hover { color: #fff; background: rgba(255,255,255,.05); text-decoration: none; }
.sidebar__link--active { color: #fff; background: rgba(242,101,34,.14); border-left-color: var(--orange); }
.sidebar__link--disabled { color: rgba(255,255,255,.35); cursor: default; }
.sidebar__link--disabled:hover { background: none; color: rgba(255,255,255,.35); }
.sidebar__link svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .85; }
/* Accordion menu: one <details class="nav-group"> per V4 menu. */
.nav-group { border-top: 1px solid rgba(255,255,255,.06); }
.nav-group__head {
  display: flex; align-items: center; gap: .65rem; cursor: pointer; list-style: none; user-select: none;
  padding: .62rem 1.1rem; color: rgba(255,255,255,.88); font-size: .9rem; font-weight: 600;
  border-left: 3px solid transparent;
}
.nav-group__head::-webkit-details-marker { display: none; }
.nav-group__head:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-group__head:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.nav-group[data-active="1"] > .nav-group__head { color: #fff; border-left-color: var(--orange); }
.nav-group__icon { width: 17px; height: 17px; flex: 0 0 17px; opacity: .85; }
.nav-group[data-active="1"] .nav-group__icon { color: var(--orange); opacity: 1; }
.nav-group__head span { flex: 1; }
.nav-group__caret { width: 14px; height: 14px; flex: 0 0 14px; opacity: .55; transition: transform .15s ease; }
.nav-group[open] > .nav-group__head .nav-group__caret { transform: rotate(90deg); }
.nav-group__body { padding: .1rem 0 .5rem; }
.nav-group__link { padding: .38rem 1.1rem .38rem 2.75rem; font-size: .86rem; color: rgba(255,255,255,.7); }
.nav-group__link.sidebar__link--active { color: #fff; }
.nav-ext { margin-left: auto; font-size: .72rem; opacity: .5; }
@media (prefers-reduced-motion: reduce) { .nav-group__caret { transition: none; } }
.sidebar__customer {
  margin: .4rem .8rem; padding: .6rem .7rem; border-radius: var(--radius);
  background: rgba(255,255,255,.06); font-size: .82rem;
}
.sidebar__customer strong { display: block; color: #fff; font-size: .88rem; }
.sidebar__customer span { color: var(--gray-400); }
.sidebar__foot { padding: .8rem 1.1rem; border-top: 1px solid rgba(255,255,255,.08); font-size: .75rem; color: var(--gray-400); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  background: var(--white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem;
}
.topbar__menu { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; color: var(--ink); }
.topbar__menu svg { width: 22px; height: 22px; }
.topbar__search { flex: 1; max-width: 560px; position: relative; }
.topbar__search input {
  width: 100%; height: 38px; border: 1px solid var(--border-strong); border-radius: 19px;
  padding: 0 1rem 0 2.4rem; font: inherit; background: var(--gray-25);
}
.topbar__search input:focus { outline: none; border-color: var(--orange); background: var(--surface); box-shadow: 0 0 0 3px var(--orange-tint); }
.topbar__search svg { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--gray-500); }
.topbar__spacer { flex: 1; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: var(--ink); background: none; border: 0; cursor: pointer;
}
.icon-btn:hover { background: var(--gray-50); text-decoration: none; }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn__badge {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--orange); color: #fff; font-size: .68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface);
}

.dropdown { position: relative; }
.dropdown__menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: .35rem 0; z-index: 50;
}
.dropdown.open .dropdown__menu { display: block; }
.dropdown__head { padding: .6rem 1rem .5rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.dropdown__head strong { display: block; }
.dropdown__head span { font-size: .8rem; color: var(--ink-muted); }
.dropdown__item { display: block; padding: .45rem 1rem; color: var(--ink); font-size: .9rem; }
.dropdown__item:hover { background: var(--gray-50); text-decoration: none; }
.dropdown__sep { height: 1px; background: var(--border); margin: .3rem 0; }

.user-chip { display: flex; align-items: center; gap: .55rem; background: none; border: 0; cursor: pointer; padding: .25rem .35rem; border-radius: 22px; font: inherit; color: var(--ink); }
.user-chip:hover { background: var(--gray-50); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: #232428; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700;
}
.user-chip__name { font-size: .88rem; font-weight: 600; }

.content { padding: 1.4rem 1.5rem 3rem; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.page-head__sub { color: var(--ink-2); margin: .15rem 0 0; font-size: .92rem; }
.breadcrumb { font-size: .8rem; color: var(--ink-muted); margin-bottom: .3rem; }
.breadcrumb a { color: var(--ink-muted); }

.banner { padding: .65rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; border: 1px solid; }
.banner--warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.banner--bad  { background: var(--bad-bg);  color: var(--bad);  border-color: var(--bad-border); }
.banner--good { background: var(--good-bg); color: var(--good); border-color: var(--good-border); }
.banner--info { background: var(--info-bg); color: var(--info); border-color: var(--info-border); }

/* ============================ cards / grid =============================== */

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); margin-bottom: 1rem; min-width: 0; }
.grid > .card { margin-bottom: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border); }
.card__title { margin: 0; font-size: .98rem; }
.card__hint { font-size: .78rem; color: var(--ink-muted); }
.card__body { padding: 1rem 1.1rem; }
.card__body--flush { padding: 0; }

.tile { padding: 1rem 1.1rem; }
.tile__label { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-muted); }
.tile__value { font-size: 1.55rem; font-weight: 700; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.tile__sub { font-size: .8rem; color: var(--ink-2); }
.tile--accent { border-top: 3px solid var(--orange); }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; font-size: .9rem; }
dl.kv dt { color: var(--ink-muted); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ============================ tables ===================================== */

.table-wrap { overflow-x: auto; }
/* A long list scrolls inside its card, with the header row kept in view. */
.table-wrap--scroll { max-height: 72vh; overflow: auto; }
/* table.table: some ported pages used the Bootstrap class name; give them the same look. */
table.data, table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .88rem; }
table.data th, table.table th {
  text-align: left; font-weight: 600; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-muted); background: var(--gray-25); padding: .6rem .8rem; border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.data td, table.table td { padding: .6rem .8rem; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
table.data tbody tr:last-child td, table.table tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td, table.table tbody tr:hover td { background: var(--gray-25); }
table.data tfoot td { font-weight: 700; border-top: 2px solid var(--border); border-bottom: 0; }
/* Sortable headers: a header link looks like a header, not a body link. */
table.data th a, table.table th a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .25rem; }
table.data th a:hover, table.table th a:hover { color: var(--ink); }
table.data th.is-sorted, table.table th.is-sorted { color: var(--ink); }
table.data th .sort-arrow { color: var(--orange); font-size: .7rem; }
/* Cell helpers: a main value with a smaller line under it. */
.cell-main { font-weight: 600; color: var(--ink); }
.cell-sub { display: block; font-size: .78rem; color: var(--ink-muted); margin-top: .1rem; }
.cell-clip { max-width: 24rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Pager under a table. */
.pager { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; padding: .75rem 1rem; border-top: 1px solid var(--border); }
.pager a, .pager span.pager__page { min-width: 2rem; padding: .25rem .6rem; border: 1px solid var(--border); border-radius: 6px; text-align: center; text-decoration: none; color: var(--ink); background: var(--surface, #fff); font-size: .85rem; }
.pager a:hover { border-color: var(--orange); color: var(--orange-ink); }
.pager .is-on { background: var(--orange); border-color: var(--orange); color: #fff; }
.pager__info { margin-left: auto; font-size: .82rem; color: var(--ink-muted); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.dim, .muted { color: var(--ink-muted); }
.small { font-size: .82rem; }
.empty { color: var(--ink-muted); padding: 1.2rem; text-align: center; font-size: .9rem; }

/* ============================ badges ===================================== */

.badge { display: inline-block; padding: .1rem .5rem; border-radius: 10px; font-size: .74rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge--ok     { background: var(--good-bg); color: var(--good); }
.badge--warn   { background: var(--warn-bg); color: var(--warn); }
.badge--bad    { background: var(--bad-bg);  color: var(--bad); }
.badge--info   { background: var(--info-bg); color: var(--info); }
.badge--accent { background: var(--orange-tint); color: var(--orange-ink); }
.badge--gray   { background: var(--gray-100); color: var(--gray-700); }

/* ============================ forms / buttons ============================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  height: 36px; padding: 0 .95rem; border-radius: var(--radius); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--gray-50); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.btn--dark { background: var(--fixed-dark); border-color: var(--fixed-dark); color: #fff; }
.btn--dark:hover { background: var(--fixed-dark-hover); }
.btn--danger { color: var(--bad); }
.btn--sm { height: 30px; padding: 0 .65rem; font-size: .8rem; }
.btn--link { border: 0; background: none; color: var(--orange-ink); padding: 0; height: auto; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

.field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.field label { font-size: .78rem; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input {
  height: 36px; padding: 0 .65rem; border: 1px solid var(--border-strong); border-radius: var(--radius);
  font: inherit; font-size: .9rem; background: var(--surface); color: var(--ink); width: 100%;
}
textarea.input { height: auto; min-height: 72px; padding: .5rem .65rem; resize: vertical; }
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-tint); }
.input--sm { height: 30px; font-size: .84rem; }
.input--qty { width: 76px; text-align: right; }
.form-grid { display: grid; gap: .8rem 1rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.check { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; }
.check input { accent-color: var(--orange); }
.field-error { color: var(--bad); font-size: .8rem; }

/* ============================ tabs ======================================= */

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); padding: 0 1.1rem; overflow-x: auto; }
.tab {
  padding: .7rem .8rem; border: 0; background: none; font: inherit; font-size: .88rem; font-weight: 600;
  color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--orange); }
.tab-panel[hidden] { display: none; }

/* ============================ steps (checkout) =========================== */

.steps { display: flex; gap: 0; margin-bottom: 1.1rem; counter-reset: step; }
.step { flex: 1; display: flex; align-items: center; gap: .55rem; font-size: .86rem; color: var(--ink-muted); font-weight: 600; }
.step::before {
  counter-increment: step; content: counter(step);
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center; font-size: .78rem; background: var(--surface);
}
.step::after { content: ""; flex: 1; height: 2px; background: var(--gray-200); margin-right: .55rem; }
.step:last-child::after { display: none; }
.step--done::before { background: var(--fixed-dark); border-color: var(--fixed-dark); color: #fff; }
.step--current { color: var(--ink); }
.step--current::before { border-color: var(--orange); color: var(--orange-ink); }

/* ============================ modal ====================================== */

dialog.modal { border: 0; border-radius: var(--radius-lg); padding: 0; width: min(760px, calc(100vw - 32px)); box-shadow: var(--shadow-md); }
dialog.modal::backdrop { background: rgba(11,11,12,.45); }
.modal__head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--border); }
.modal__body { padding: 1rem 1.1rem; max-height: 70vh; overflow-y: auto; }
.modal__foot { padding: .8rem 1.1rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; }

.summary-row { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .92rem; }
.summary-row--total { border-top: 2px solid var(--gray-900); margin-top: .4rem; padding-top: .55rem; font-weight: 700; font-size: 1.05rem; }

.ai-summary { white-space: pre-wrap; font-size: .9rem; line-height: 1.55; }

/* ============================ responsive ================================= */

.scrim { display: none; }
@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .main { margin-left: 0; }
  .topbar { padding: 0 .75rem; gap: .5rem; }
  .topbar__menu { display: inline-flex; }
  .user-chip__name { display: none; }
  .content { padding: 1rem 16px 3rem; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .steps .step span { display: none; }
}

/* ============================ page layouts =============================== */

.layout-side { display: grid; gap: 1rem; grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.layout-side > * { min-width: 0; }
@media (max-width: 1180px) { .layout-side { grid-template-columns: minmax(0, 1fr); } }

.tabs { flex-wrap: wrap; overflow-x: visible; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 520px; }
/* Customer Info > Cases: the full case description, wrapped; a long one scrolls and the box can be dragged taller. */
.case-desc { min-width: 260px; max-width: 520px; max-height: 8.5em; overflow: auto; overflow-wrap: anywhere; }
.case-desc--long { resize: vertical; }   /* only a description too long for the box gets the drag grip */
.case-equip { min-width: 150px; max-width: 240px; }
.sidebar__brand-tag { white-space: nowrap; }

/* Appearance picker in the user menu (Light / Dark / System). */
.theme-pick { padding: .45rem .9rem .55rem; display: grid; gap: .35rem; }
.theme-pick__label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-muted); }
.theme-pick__opts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.theme-pick__opts button { border: 0; background: var(--surface); color: var(--ink-2); font: inherit; font-size: .8rem; font-weight: 600; padding: .35rem .4rem; cursor: pointer; }
.theme-pick__opts button + button { border-left: 1px solid var(--border); }
.theme-pick__opts button:hover { background: var(--surface-sunken); color: var(--ink); }
.theme-pick__opts button.is-on { background: var(--orange); color: #fff; }
