:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --text: #1b1f24;
  --muted: #5d6673;
  --border: #dde1e7;
  --accent: #3c6797;
  --accent-text: #ffffff;
  --ok: #1f8a4c;
  --warn: #b86e00;
  --bad: #c62f2f;
  --ok-bg: #e6f4ec;
  --warn-bg: #fdf1dd;
  --bad-bg: #fbe7e7;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 4px 16px rgb(0 0 0 / 5%);
  --tag-best: #1b7f45;
  --tag-best-text: #ffffff;
  --tag-fast: #2a62c9;
  --tag-fast-text: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111418;
    --surface: #1a1f25;
    --surface-2: #222830;
    --text: #e7eaee;
    --muted: #9aa4b1;
    --border: #2e3640;
    --accent: #4d72a3;
    --ok: #4cc27f;
    --warn: #e2a33c;
    --bad: #ef6b6b;
    --ok-bg: #173324;
    --warn-bg: #3a2c13;
    --bad-bg: #3d1c1c;
    --shadow: none;
    --tag-best: #4cc27f;
    --tag-best-text: #0b2416;
    --tag-fast: #7aa7f5;
    --tag-fast-text: #0c1a33;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[hidden] { display: none !important; }
h1 { font-size: 22px; margin: 0; }
h2 { font-size: 16px; margin: 0 0 12px; }
code { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 2px 5px; border-radius: 5px; }
.hint { color: var(--muted); margin: 8px 0 0; }
.error { color: var(--bad); margin: 8px 0 0; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover, .btn.ghost.active { background: var(--surface-2); }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.btn:disabled { opacity: .55; cursor: default; }

input, select {
  height: 38px; padding: 0 12px; border-radius: 8px; width: 100%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit;
}
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
label { display: grid; gap: 6px; font-weight: 500; }
label.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
input[type="checkbox"] { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); cursor: pointer; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: .04em; color: var(--text); text-decoration: none; }
.logo { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 16px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(360px, 100%); display: grid; gap: 16px; }
.login-card .btn { justify-content: center; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 24px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.topbar-actions { display: flex; gap: 4px; }

.view.search, .view.settings { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; }

/* Search */
.search-box { display: flex; gap: 8px; max-width: 760px; margin: 24px auto 0; }
.search-box .article-field { flex: 2; position: relative; }
.search-box #q-article { height: 46px; font-size: 16px; }
.history-menu {
  position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; right: 0;
  margin: 0; padding: 4px; list-style: none; max-height: 320px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow);
}
.history-menu .history-title { padding: 6px 10px 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.history-menu li[role="option"] {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 6px; cursor: pointer; font-variant-numeric: tabular-nums;
}
.history-menu li[role="option"].active, .history-menu li[role="option"]:hover { background: var(--surface-2); }
.history-menu .remove { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 0 4px; }
.history-menu .remove:hover { color: var(--bad); }
.search-box #q-brand { flex: 1; height: 46px; }
.search-box .btn { height: 46px; padding: 0 22px; }
.view.search > .hint { text-align: center; }

.supplier-strip { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 24px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chip.running .dot, .chip.pending .dot { background: var(--accent); animation: pulse 1s infinite alternate; }
.chip.ok .dot { background: var(--ok); }
.chip.no_match .dot, .chip.ambiguous .dot, .chip.timeout .dot, .chip.circuit_open .dot { background: var(--warn); }
.chip.error .dot, .chip.blocked .dot, .chip.needs_login .dot { background: var(--bad); }
.chip small { color: var(--muted); font-variant-numeric: tabular-nums; }
button.chip { font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
button.chip:hover { border-color: var(--muted); }
button.chip.off { opacity: .5; text-decoration: line-through; }
.total-time { align-self: center; padding: 0 4px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes pulse { to { opacity: .3; } }

/* Under the search box without taking room: it overlays the gap below. */
.search-box { position: relative; }
.progress-bar { position: absolute; left: 0; right: 0; bottom: -9px; height: 3px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.progress-bar span { display: block; width: 30%; height: 100%; border-radius: 2px; background: var(--accent); animation: sweep 1.3s ease-in-out infinite; }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.btn.busy::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .progress-bar span { animation: none; width: 100%; opacity: .5; }
  .btn.busy::before { animation-duration: 2s; }
}

.clarify, .results { margin: 24px auto 0; }
.results { overflow-x: auto; }
.clarify { max-width: 900px; }
.clarify tbody tr { cursor: pointer; }
.clarify tbody tr:hover { background: var(--surface-2); }

.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.results-head h2 { margin: 0; }
.results-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.tool-select { height: 28px; width: auto; padding: 0 8px; font-size: 13px; }
.filter-note { margin: 10px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.col-switch { position: relative; }
.col-switch .menu { min-width: 200px; }
.menu-check { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-weight: 400; }
.menu-check:hover { background: var(--surface-2); }
.menu-check:has(input:disabled) { color: var(--muted); cursor: default; }

.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.grid th, .grid td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.grid th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.grid th[data-sort] { cursor: pointer; user-select: none; }
.grid th[data-sort]:hover { color: var(--text); }
.grid th.sorted::after { content: " ↑"; }
.grid th.sorted.desc::after { content: " ↓"; }
.grid tbody tr:last-child td { border-bottom: 0; }
.grid .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.grid td.nowrap { white-space: nowrap; }
.grid tr.group td { background: var(--surface-2); font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.group-toggle { border: 0; background: none; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.group-toggle:hover { color: var(--text); }
.group-toggle { display: inline-flex; align-items: center; gap: 6px; }
.caret-icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.group-toggle[aria-expanded="false"] .caret-icon { transform: rotate(-90deg); }
.grid tr.brand-filter td { background: var(--surface); padding-top: 8px; padding-bottom: 8px; }
.brand-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.brand-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 12px; cursor: pointer;
}
.brand-chip small { color: var(--muted); font-variant-numeric: tabular-nums; }
.brand-chip:hover { border-color: var(--muted); }
.brand-chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.brand-chips .link-btn { font-size: 12px; margin-left: 4px; }
/* Best price and Fastest: tags on the top edge of their row, over its border
   and over the value they mark, aligned with it: right over a number, left
   over a part number (where they go when their column is hidden).
   Every offer row has a little more room at the top than the grid's 9px,
   tagged or not, so the tag clears the text and the rows keep one height. */
.offers tbody tr:not(.group):not(.brand-filter) > td { padding-top: 12px; }
.offers.tight tbody tr:not(.group):not(.brand-filter) > td { padding-top: 11px; }
.offers td:is([data-col="article"], [data-col="price_net"], [data-col="price_gross"], [data-col="delivery"]) { position: relative; }
.row-tags { position: absolute; top: 0; left: 8px; transform: translateY(-50%); display: flex; gap: 6px; z-index: 1; }
.offers td.num > .row-tags { left: auto; right: 8px; }
/* The first row's tags rise into the header: a little more room below its labels. */
.offers thead th { padding-bottom: 11px; }
.offers.tight thead th { padding-bottom: 10px; }
.offers.tight td.num > .row-tags { right: 2px; }
.row-tag {
  display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 11px; line-height: 16px; font-weight: 600;
  white-space: nowrap; cursor: default; box-shadow: 0 1px 2px rgb(0 0 0 / 20%);
}
.row-tag.best { background: var(--tag-best); color: var(--tag-best-text); }
.row-tag.fastest { background: var(--tag-fast); color: var(--tag-fast-text); }
.group-meta { font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 4px; }
/* Part numbers link to the supplier; underlined only when pointed at, so a
   column of links does not stripe the table. */
.offers td a, .cart .grid td a { color: inherit; text-decoration: none; }
.offers td a:hover, .cart .grid td a:hover { text-decoration: underline; }
.offers tbody tr:not(.group):hover td { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.offers .brand-cell { font-weight: 500; }
/* The description takes the room left over and stays on one line, so rows
   are even; the full text is in the tooltip. */
.offers .name { color: var(--muted); width: 100%; max-width: 0; min-width: 160px; }
.offers .name .clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offers .name .hint { display: block; margin: 0; }
.offers .price { font-weight: 600; }
/* "0%" beside a price incl. VAT at 0% VAT: on the price's line, so the row
   keeps its height; the explanation is in the tooltip. */
.offers .vat-zero {
  display: inline-block; margin-right: 6px; padding: 0 5px; border-radius: 4px; vertical-align: 1px;
  background: var(--surface-2); color: var(--muted); font-size: 11px; line-height: 16px; font-weight: 500; cursor: help;
}
.offers .inline-extra span[title] { cursor: help; }
/* Qty and Incl. VAT repeated small inside Availability and Net price; shown
   only in the .compact layout below, where their own columns give way. */
.offers .inline-extra { display: none; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 2px; }

/* When the offers table would not fit its section it keeps every value but
   takes less room, step by step as fitOffers (app.js) finds each one still
   too wide; a step keeps the ones before it:
   .tight     tighter cells;
   .stack     the match badge under the number;
   .compact   Qty and Incl. VAT shown inside Availability and Net price, and a
              narrower description;
   .wrap      supplier names and brands of several words wrap.
   Wrapping waits for the last step: the description takes all the room it
   can, so a column that may wrap is always squeezed to its longest word.
   The .compact rule for .inline-extra has the weight of the hidden-column
   rules in #column-style, which come later, so a hidden column stays hidden
   there too. */
.offers.tight th, .offers.tight td { padding: 8px 6px; }
.offers.tight th { font-size: 11px; letter-spacing: 0; }
.offers.stack td[data-col="article"] .badge { display: table; margin-top: 3px; }
.offers.compact .name { min-width: 90px; }
.offers.compact th[data-col="quantity"], .offers.compact td[data-col="quantity"],
.offers.compact th[data-col="price_gross"], .offers.compact td[data-col="price_gross"] { display: none; }
.compact .inline-extra { display: block; }
.offers.wrap td[data-col="supplier"], .offers.wrap td.brand-cell { white-space: normal; }
/* While fitOffers measures, every quantity shows its − and +, so the table
   it picks still fits when one of them is active. */
.offers.measuring .qty-step { display: inline-flex; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.muted { background: var(--surface-2); color: var(--muted); }
.badge.plain { background: none; color: var(--muted); padding-left: 0; font-weight: 400; }

/* Carts */
.btn .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: 12px; }
.cart-switch { position: relative; display: inline-flex; align-items: center; }
.cart-switch #nav-cart { padding-right: 6px; }
.active-cart-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-sum { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn.caret { padding: 0 8px; }
.menu {
  position: absolute; z-index: 20; top: calc(100% + 4px); right: 0; min-width: 240px; max-width: 340px;
  margin: 0; padding: 4px; list-style: none; max-height: 360px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / 15%);
}
.menu.floating { position: fixed; top: 0; right: auto; }
.menu .menu-title { padding: 6px 10px 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.menu button {
  display: flex; width: 100%; justify-content: space-between; gap: 10px; align-items: center;
  padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.menu button:hover, .menu button:focus-visible { background: var(--surface-2); outline: none; }
.menu button .meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.menu button .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.offers .add-col { width: 1%; white-space: nowrap; }
/* Cells align to the top (descriptions wrap); the controls, taller than a
   line of text, are pulled up so their middle sits on the first line. */
.add-cell { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin: -5px 0; }
/* The quantity and its Add button stay on one line together. */
.add-ctl { display: inline-flex; gap: 6px; align-items: center; flex: none; }
.add-cell input, .qty-input { width: 48px; height: 30px; padding: 0 6px; text-align: right; }
/* Quantity fields: no browser spinners; − and + show while the field is
   active (the focus is inside), flush against it. */
.add-qty, .qty-input { appearance: textfield; -moz-appearance: textfield; }
.add-qty::-webkit-inner-spin-button, .add-qty::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty-ctl { display: inline-flex; align-items: stretch; }
.qty-step {
  display: none; width: 22px; height: 30px; padding: 0; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font: inherit; font-size: 15px; line-height: 1; cursor: pointer;
}
.qty-step:hover { background: var(--border); }
.qty-ctl:focus-within .qty-step { display: inline-flex; align-items: center; justify-content: center; }
.qty-ctl:focus-within .qty-step:first-child { border-radius: 6px 0 0 6px; border-right: 0; }
.qty-ctl:focus-within .qty-step:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.qty-ctl:focus-within input { border-radius: 0; }
/* In the offers the add controls stay quiet until their row is pointed at:
   a column of filled buttons outshouts the prices. */
.offers .add-cell .btn.primary { background: transparent; border-color: var(--border); color: var(--text); }
.offers tbody tr:hover .add-cell .btn.primary, .offers .add-cell .btn.primary:focus-visible {
  background: var(--accent); border-color: var(--accent); color: var(--accent-text);
}
/* The button itself, pointed at: a shade brighter than its row's. */
.offers .add-cell .btn.primary:hover { background: color-mix(in srgb, var(--accent) 82%, white); border-color: transparent; color: var(--accent-text); }
.add-btn { width: 34px; padding: 0; }
.add-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.offers .add-qty { border-color: transparent; background: transparent; }
.offers tbody tr:hover .add-qty, .offers .add-qty:focus { border-color: var(--border); background: var(--surface); }
.in-cart { color: var(--ok); font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; cursor: default; }
.in-cart.other { color: var(--muted); }
.view.cart { max-width: 1320px; margin: 0 auto; padding: 32px 24px 64px; }
.carts-layout { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
.carts-aside { position: sticky; top: 72px; }
.carts-aside-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.carts-filters { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 10px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.segmented button { border: 0; background: var(--surface); color: var(--muted); padding: 5px 12px; font: inherit; cursor: pointer; }
.segmented button.on { background: var(--surface-2); color: var(--text); font-weight: 600; }
.cart-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cart-list li { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; }
.cart-list li:hover { border-color: var(--muted); }
.cart-list li.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.cart-list .row1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.cart-list .row1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-list .sub { color: var(--muted); font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-list li.archived { opacity: .7; }
.cart-list .empty { border: 0; background: none; cursor: default; }
.cart-detail { min-width: 0; }
.cart-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cart-detail-head h2 { font-size: 20px; margin: 0; display: flex; gap: 8px; align-items: center; }
.cart-detail-head .hint { margin-top: 4px; }
.cart-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cart-group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 8px; }
.cart-group-head h3 { margin: 0; font-size: 15px; }
.cart-group-head .sum { color: var(--muted); }
.cart-group-head .group-actions { margin-left: auto; display: flex; gap: 6px; align-self: center; }
.cart-group-head .group-actions a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.cart .grid td { vertical-align: middle; }
.cart-table { margin-top: 20px; overflow-x: auto; }
/* Ten columns share the cart area next to the cart list: tighter cells. */
.cart .grid th, .cart .grid td { padding-left: 8px; padding-right: 8px; }
.cart .grid tr.group-head td { background: var(--surface-2); padding: 10px 12px; }
.cart .grid tbody + tbody tr.group-head td { border-top: 1px solid var(--border); }
.cart .grid tr.group-head .cart-group-head { margin: 0; align-items: center; }
/* Long part numbers wrap here rather than push the actions out of view. */
.cart .grid td.nowrap { white-space: normal; overflow-wrap: anywhere; }
.cart .line-actions { display: flex; gap: 4px; align-items: center; justify-content: flex-end; }
.cart .move-select { height: 30px; width: auto; max-width: 150px; padding: 0 6px; font-size: 13px; }
.cart .remove-line { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 0 6px; }
.cart .remove-line:hover { color: var(--bad); }
.cart .was { color: var(--muted); text-decoration: line-through; font-weight: 400; margin-right: 6px; }
.cart-totals { margin-top: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 15px; }
.cart-totals b { font-size: 18px; }

/* Settings */
.settings-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.users-head { margin-top: 48px; }
.pw-row { display: flex; gap: 8px; align-items: center; }
.pw-row input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.accounts { margin-top: 20px; }
.accounts td.actions { text-align: right; white-space: nowrap; }

dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 0; background: var(--surface); color: var(--text); width: min(460px, calc(100% - 32px)); box-shadow: 0 10px 40px rgb(0 0 0 / 25%); }
dialog::backdrop { background: rgb(0 0 0 / 35%); }
.dialog-form { display: grid; gap: 14px; padding: 22px; }
.dialog-form h2 { margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 20; }

@media (max-width: 720px) {
  .topbar { padding: 10px 16px; }
  #nav-search { display: none; }
  .view.search, .view.settings, .view.cart { padding: 20px 16px 48px; }
  .carts-layout { grid-template-columns: 1fr; }
  .carts-aside { position: static; }
  .active-cart-name { max-width: 90px; }
  .search-box { flex-wrap: wrap; }
  .search-box .article-field, .search-box #q-brand { flex: 1 1 100%; }
  .search-box .btn { flex: 1; justify-content: center; }
  .results, .accounts, .clarify { overflow-x: auto; }
  .accounts { display: block; }
  .grid { min-width: 720px; }
  .settings-head { flex-wrap: wrap; }
}
