:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #6b7280;
  --border: #e3e5ea;
  --accent: #e8590c;
  --accent-ink: #ffffff;
  --accent-soft: #fff1e8;
  --danger: #c92a2a;
  --ok-bg: #ebfbee; --ok-ink: #2b8a3e;
  --err-bg: #fff5f5; --err-ink: #c92a2a;
  --sidebar: #16181d;
  --sidebar-ink: #c9ccd3;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --surface: #171a20; --text: #e8eaee; --muted: #8b919c;
    --border: #262a32; --accent-soft: #2a1a10; --sidebar: #0a0b0e;
    --ok-bg: #12261a; --ok-ink: #69db7c; --err-bg: #2a1414; --err-ink: #ff8787;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
}
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; margin: 0 0 1rem; }
.muted { color: var(--muted); margin: 0; }
.hint { color: var(--muted); font-weight: 400; font-size: .85em; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Brand */
.brand { font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: .5rem; }
.brand-mark { background: var(--accent); color: var(--accent-ink); padding: .15rem .45rem; border-radius: 6px; font-size: .9em; letter-spacing: .04em; }
.brand-lg { font-size: 1.4rem; margin-bottom: 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1rem; border-radius: 8px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: inherit; border-color: var(--border); }
.btn-ghost:hover { background: rgba(127,127,127,.1); }
.btn-block { width: 100%; }
.icon-btn {
  background: none; border: 0; padding: .4rem; border-radius: 6px; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: rgba(127,127,127,.12); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); }

/* Forms */
.form { display: grid; gap: 1rem; }
.form label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], select {
  width: 100%; padding: .65rem .8rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
select {
  appearance: none; cursor: pointer; padding-right: 2.2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.form label[hidden] { display: none; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

/* Alerts */
.alert { padding: .7rem .9rem; border-radius: 8px; margin: 0 0 1rem; font-size: .92rem; }
.alert-ok { background: var(--ok-bg); color: var(--ok-ink); }
.alert-error { background: var(--err-bg); color: var(--err-ink); }

/* Auth pages */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 2rem;
}
.auth-card h1 { margin-bottom: .25rem; }
.auth-card .muted { margin-bottom: 1.5rem; }
.auth-switch { text-align: center; margin: 1.25rem 0 0; color: var(--muted); font-size: .92rem; }

/* App layout */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--sidebar); color: #fff; padding: 1.5rem 1rem;
  display: flex; flex-direction: column; gap: 2rem; position: sticky; top: 0; height: 100vh;
}
.menu { display: grid; gap: .25rem; }
.menu a {
  display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; border-radius: 8px;
  color: var(--sidebar-ink); text-decoration: none; font-weight: 500;
}
.menu a:hover { background: rgba(255,255,255,.06); color: #fff; }
.menu a.active { background: var(--accent); color: var(--accent-ink); }
.sidebar-foot { margin-top: auto; display: grid; gap: .75rem; }
.sidebar-foot .btn-ghost { border-color: rgba(255,255,255,.15); color: var(--sidebar-ink); }
.user { font-size: .85rem; color: var(--sidebar-ink); word-break: break-all; }
.user span { display: block; font-size: .75rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.content { padding: 2rem; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

/* Search */
.search { display: flex; gap: .5rem; margin-bottom: 1rem; max-width: 420px; }

/* Table */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: rgba(127,127,127,.04); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(127,127,127,.04); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { width: 1%; white-space: nowrap; text-align: right; }
.table .actions form { display: inline; }
.empty-row { text-align: center !important; color: var(--muted); padding: 2.5rem 1rem !important; }

/* Empty state */
.empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 4rem 1rem; text-align: center; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: .5rem; }
.empty h2 { color: var(--text); margin-bottom: .25rem; }
.empty p { margin: 0; }

/* Dialog */
.dialog { border: 0; border-radius: 14px; padding: 1.75rem; width: min(440px, calc(100vw - 32px)); background: var(--surface); color: var(--text); }
.dialog::backdrop { background: rgba(10,11,14,.55); }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .25rem; }

/* Mobile */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1rem 16px; }
  .menu { display: flex; order: 3; width: 100%; }
  .menu a { flex: 1; justify-content: center; }
  .sidebar-foot { margin: 0 0 0 auto; display: flex; align-items: center; }
  .sidebar-foot .user { display: none; }
  .sidebar-foot .btn { width: auto; padding: .45rem .8rem; }
  .content { padding: 1.25rem 16px; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--border); padding: .5rem 0; position: relative; }
  .table td { border: 0; padding: .3rem 1rem; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: .85rem; text-align: left; }
  .table .actions { width: 100%; justify-content: flex-end; }
  .table .actions::before { content: none; }
  .empty-row { display: block !important; }
  .empty-row::before { content: none !important; }
}

/* Petits boutons */
.btn-sm { padding: .4rem .7rem; font-size: .88rem; }
.danger-text { color: var(--danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
input[type=number] {
  width: 100%; padding: .65rem .8rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}

/* Recherche stock */
.search-lg { max-width: none; }
.search-lg input { font-size: 1.05rem; padding: .8rem 1rem; }
.search-count { margin: -.25rem 0 1rem; font-size: .9rem; }

/* Fiches stock */
.stock-list { display: grid; gap: .75rem; }
.stock-card {
  display: grid; grid-template-columns: 132px 1fr auto; gap: 1.1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: .8rem;
}
.stock-photo {
  width: 132px; height: 100px; border-radius: 10px; overflow: hidden; padding: 0; border: 0;
  background: rgba(127,127,127,.1); display: grid; place-items: center; cursor: zoom-in;
}
.stock-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.stock-photo-empty { cursor: default; color: var(--muted); }
.stock-photo-empty svg { width: 28px; height: 28px; opacity: .6; }
.stock-body { min-width: 0; }
.stock-ri {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .03em;
  background: var(--accent-soft); color: var(--accent); padding: .1rem .5rem; border-radius: 999px;
}
.stock-ref { margin: .3rem 0 .1rem; font-size: 1.05rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stock-desc { margin: 0 0 .2rem; color: var(--muted); font-size: .9rem; }
.stock-price { font-weight: 700; font-size: 1.05rem; }
.stock-price .muted { font-weight: 400; font-size: .88rem; }
.stock-actions { display: flex; align-items: center; gap: .35rem; }
.stock-actions form { display: inline; }

/* Champ photo dans le formulaire */
.photo-field { display: flex; gap: 1rem; align-items: center; }
.photo-preview {
  width: 112px; height: 84px; border-radius: 10px; overflow: hidden; flex: none;
  background: rgba(127,127,127,.1); display: grid; place-items: center; color: var(--muted);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview svg { width: 26px; height: 26px; opacity: .6; }
.photo-buttons { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.photo-buttons label.btn { display: inline-flex; font-weight: 600; font-size: .88rem; }
.photo-buttons [hidden] { display: none; }

/* Zoom photo */
.zoom { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; overflow: visible; }
.zoom::backdrop { background: rgba(0,0,0,.85); }
.zoom img { display: block; max-width: 94vw; max-height: 92vh; border-radius: 10px; cursor: zoom-out; }
.zoom-close {
  position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #fff; color: #000; font-size: 22px; line-height: 1; cursor: pointer;
}

@media (max-width: 760px) {
  .stock-card { grid-template-columns: 96px 1fr; gap: .8rem; }
  .stock-photo { width: 96px; height: 80px; }
  .stock-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--border); padding-top: .6rem; }
  .search-lg { flex-wrap: wrap; }
  .search-lg input { flex: 1 1 100%; }
  .form-row { grid-template-columns: 1fr; }
  .zoom-close { top: 8px; right: 8px; }
}

/* Infos partagées par référence */
.shared { border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1rem 1rem; margin: 0; display: grid; gap: .9rem; }
.shared legend { font-weight: 700; font-size: .85rem; padding: 0 .35rem; }
.shared > .hint { margin: -.4rem 0 0; }
.stock-same {
  display: inline-block; margin-left: .35rem; font-size: .75rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); padding: .05rem .5rem; border-radius: 999px; text-decoration: none;
}
.stock-same:hover { color: var(--text); }

/* ===== Tableaux : colonnes bien séparées ===== */
.table th { background: #eceef2; color: #4b5260; border-bottom: 2px solid var(--border); }
.table th + th, .table td + td { border-left: 1px solid var(--border); }
.table tbody tr:nth-child(even) td { background: rgba(127,127,127,.045); }
.table tbody tr:hover td { background: var(--accent-soft); }
.table td { vertical-align: middle; }
.table th.actions, .table td.actions { border-left: 1px solid var(--border); }
@media (prefers-color-scheme: dark) { .table th { background: #1f232b; color: var(--muted); } }

/* Stock en tableau */
.stock-table .col-photo { width: 92px; padding: .45rem .6rem; }
.stock-table .col-ri { width: 70px; text-align: center; }
.stock-table .stock-ri { font-size: .85rem; padding: .15rem .6rem; }
.ref-strong { font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ref-cell { display: inline-flex; align-items: center; gap: .4rem; font-variant-numeric: tabular-nums; }
.thumb {
  width: 72px; height: 54px; border-radius: 8px; overflow: hidden; padding: 0; border: 0;
  background: rgba(127,127,127,.12); display: grid; place-items: center; cursor: zoom-in;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-empty { cursor: default; color: var(--muted); }
.thumb-empty svg { width: 20px; height: 20px; opacity: .55; }
.stock-table .stock-same { margin-left: .5rem; }

/* Onglets En stock / Vendus */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tabs a {
  padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a span { font-size: .8rem; background: rgba(127,127,127,.15); color: inherit; padding: .05rem .45rem; border-radius: 999px; margin-left: .3rem; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs a.active span { background: var(--accent-soft); }

@media (max-width: 760px) {
  .table th + th, .table td + td, .table td.actions { border-left: 0; }
  .table tbody tr:nth-child(even) td { background: transparent; }
  .table tbody tr:nth-child(even) { background: rgba(127,127,127,.045); }
  .stock-table tr { display: grid !important; grid-template-columns: 92px auto 1fr; column-gap: .6rem; row-gap: .15rem; padding: .75rem 1rem; align-items: center; }
  .stock-table td, .stock-table td.num { display: block; padding: 0; text-align: left; }
  .stock-table td::before { content: none !important; }
  .stock-table td.col-photo { grid-column: 1; grid-row: 1 / span 3; width: auto; padding: 0; align-self: start; }
  .stock-table .thumb { width: 84px; height: 64px; }
  .stock-table td.col-ri { grid-column: 2; grid-row: 1; width: auto; }
  .stock-table td[data-label="Référence"] { grid-column: 3; grid-row: 1; }
  .stock-table td[data-label="Référence"] .stock-same { display: inline-block; margin: .15rem 0 0 0; }
  .stock-table td[data-label="Description"], .stock-table td[data-label="Vendu le"], .stock-table td[data-label="Modèle"] { grid-column: 2 / -1; font-size: .9rem; color: var(--muted); }
  .stock-table td[data-label="Prix"], .stock-table td[data-label="Prix de vente"] { grid-column: 2 / -1; font-weight: 700; }
  .stock-table td.actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .25rem; border-top: 1px solid var(--border); padding-top: .5rem; margin-top: .4rem; }
  .stock-table .empty-row { grid-column: 1 / -1; }
}

/* Catégories du stock */
.cat-tabs { flex-wrap: wrap; align-items: flex-end; }
.tab-add {
  margin-left: auto; align-self: center; display: inline-flex; align-items: center; gap: .3rem;
  font: inherit; font-size: .85rem; font-weight: 600; color: var(--accent); background: none;
  border: 1px dashed var(--accent); border-radius: 8px; padding: .35rem .7rem; cursor: pointer; margin-bottom: .3rem;
}
.tab-add svg { width: 15px; height: 15px; }
.tab-add:hover { background: var(--accent-soft); }
.subbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: 0 0 1rem; }
.subbar .search-count { margin: 0; }
.cat-title { margin: 0; font-size: 1.15rem; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.seg a { padding: .35rem .8rem; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.seg a + a { border-left: 1px solid var(--border); }
.seg a.active { background: var(--accent-soft); color: var(--accent); }
.seg a span { font-size: .78rem; opacity: .8; margin-left: .2rem; }
.cat-tag { display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; background: rgba(127,127,127,.12); color: var(--text); text-decoration: none; white-space: nowrap; }
.cat-tag:hover { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 760px) {
  .stock-table td[data-label="Catégorie"] { grid-column: 2 / -1; }
  .tab-add { margin-left: 0; }
}

/* Filtres marque / fiabilité */
.filters { display: grid; gap: .5rem; margin: 0 0 1rem; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.chips-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); min-width: 5.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .28rem .7rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: .85rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.chip span { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.on span { color: var(--accent-ink); opacity: .85; }
.chip-ok { color: var(--ok-ink); } .chip-warn { color: #b7791f; } .chip-bad { color: var(--err-ink); }
.chip-ok.on { background: var(--ok-ink); border-color: var(--ok-ink); color: var(--surface); }
.chip-warn.on { background: #b7791f; border-color: #b7791f; color: #fff; }
.chip-bad.on { background: var(--err-ink); border-color: var(--err-ink); color: var(--surface); }
.chip-ok.on span, .chip-bad.on span { color: var(--surface); }
.ref-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .3rem; }
.fpill { font-size: .7rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; white-space: nowrap; }
.fpill-ok { background: var(--ok-bg); color: var(--ok-ink); }
.fpill-warn { background: #fdf3dc; color: #a16207; }
.fpill-bad { background: var(--err-bg); color: var(--err-ink); }
.fpill-neutral { background: rgba(127,127,127,.12); color: var(--muted); }
.ref-brand { font-size: .78rem; color: var(--muted); font-weight: 600; }
.veh-cell { font-size: .9rem; max-width: 34ch; }
.veh-desc { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
@media (prefers-color-scheme: dark) { .fpill-warn { background: #3a2f16; color: #f0c060; } .chip-warn { color: #f0c060; } }
@media (max-width: 760px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; }
  .chips-label { min-width: auto; }
  .stock-table td[data-label="Véhicules"] { grid-column: 2 / -1; max-width: none; }
}

select:disabled { opacity: .6; cursor: not-allowed; }

/* Fenêtre Annonce */
.dialog-wide { width: min(620px, calc(100vw - 32px)); }
textarea {
  width: 100%; padding: .65rem .8rem; font: inherit; font-size: .92rem; line-height: 1.5; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; resize: vertical;
}
textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
#a-desc, #a-titre { background: rgba(127,127,127,.06); }
#a-copy-titre { justify-self: start; margin-top: -.5rem; }
.alert-warn { background: #fdf3dc; color: #8a5a00; }
@media (prefers-color-scheme: dark) { .alert-warn { background: #3a2f16; color: #f0c060; } }
.form [hidden] { display: none; }

/* Prix du marché (pros / particuliers) */
.mkt { display: grid; gap: 1px; margin-top: .25rem; font-size: .74rem; font-weight: 500; line-height: 1.3; white-space: nowrap; cursor: help; }
.mkt-pro { color: #9a4d0b; }
.mkt-part { color: #1f6f8b; }
.mkt-hint { color: var(--muted); }
@media (prefers-color-scheme: dark) { .mkt-pro { color: #e3a35a; } .mkt-part { color: #6cc3e0; } }
@media (max-width: 760px) { .mkt { justify-items: start; } }

/* Type de vente : en ligne / en main propre */
.vente-choice { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.vente-choice legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: .35rem; }
.form .vente-opt { display: block; position: relative; cursor: pointer; font-weight: 600; }
.vente-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.vente-opt span { display: flex; align-items: center; justify-content: center; padding: .6rem .8rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.vente-opt:hover span { border-color: var(--accent); }
.vente-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vente-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.vente { display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .55rem; border-radius: 999px; white-space: nowrap; }
.vente-ligne { background: #e7f0fb; color: #1f5fa8; }
.vente-main { background: var(--accent-soft); color: var(--accent); }
@media (prefers-color-scheme: dark) { .vente-ligne { background: #15263a; color: #8fbaf0; } }

/* Stock par quantités (BSM) */
.qty-group { margin-bottom: 1.4rem; }
.qty-head { display: flex; align-items: baseline; gap: .75rem; margin: 0 0 .5rem; }
.qty-head h3 { margin: 0; font-size: 1.15rem; display: inline-flex; align-items: center; justify-content: center; min-width: 2.6rem; padding: .15rem .6rem; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.qty-head .muted { font-size: .88rem; }
.qty-table .qty-cell { width: 1%; white-space: nowrap; text-align: center; }
.qty-cell form { display: inline; }
.qty-n { display: inline-block; min-width: 2.2rem; text-align: center; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.qty-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.qty-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.qty-btn:disabled { opacity: .35; cursor: default; }
.qty-empty .ref-strong, .qty-empty .qty-n { color: var(--muted); }
.qty-search-title { font-size: 1rem; margin: 1.4rem 0 .5rem; }
.form .check { display: flex; flex-direction: row; align-items: flex-start; gap: .5rem; font-weight: 500; }
.form .check input { width: auto; margin-top: .2rem; }
@media (max-width: 760px) {
  .qty-table td.qty-cell { width: 100%; display: flex; align-items: center; justify-content: flex-end; gap: .35rem; }
  .qty-table td.qty-cell::before { margin-right: auto; }
}
