/* Chasb Ahvaz admin panel — Persian RTL, mobile first, no external assets. */
:root {
  --bg: #f6f1ea;
  --surface: #ffffff;
  --surface-2: #fbf7f1;
  --text: #2f2320;
  --muted: #7a6a62;
  --line: #e8dccd;
  --brand: #8f1837;
  --brand-dark: #6b1029;
  --brand-soft: #f8e9ee;
  --accent: #c45c2a;
  --ok: #16803c;
  --ok-soft: #e7f5ec;
  --warn: #a15c00;
  --warn-soft: #fff3df;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --info: #1f5f99;
  --info-soft: #e8f1fa;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(47, 35, 32, .06), 0 4px 14px rgba(47, 35, 32, .05);
  --font: Vazirmatn, "Segoe UI", Tahoma, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.7 var(--font); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.4; margin: 0 0 .5em; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.1rem; } h3 { font-size: 1rem; }
small, .muted { color: var(--muted); }
img { max-width: 100%; }
.num, .ltr { direction: ltr; unicode-bidi: isolate; }

/* ── layout ──────────────────────────────────────────────────────────────────
   Mobile first: sticky mini header + drawer. ≥1000px: fixed sidebar, page header.
   Same tokens, icons and components at every size; only the layout changes. */
.shell { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.icon { flex-shrink: 0; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px;
  background: transparent; color: inherit; cursor: pointer; }
.icon-btn:active { background: rgba(0,0,0,.06); }

/* sidebar / drawer */
.sidebar { position: fixed; inset: 0 0 0 auto; width: min(86vw, 320px); background: #261918; color: #f1e6dc;
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s cubic-bezier(.22,1,.36,1);
  z-index: 40; overscroll-behavior: contain;
  padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
.sidebar.open { transform: none; box-shadow: -12px 0 40px rgba(0,0,0,.25); }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1rem; line-height: 1.35; }
.sidebar .brand:hover { text-decoration: none; }
.sidebar .brand img { border-radius: 9px; }
.sidebar .brand small { display: block; color: #bda89b; font-weight: 400; font-size: .74rem; }
.side-nav { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 8px 16px; }
.side-nav a, .nav-group > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px;
  border-radius: 10px; color: #f1e6dc; font-size: .95rem; cursor: pointer; }
.side-nav a:hover, .nav-group > summary:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.nav-top.active { background: rgba(255,255,255,.1); font-weight: 700; }
.nav-group { margin-top: 2px; }
.nav-group > summary { list-style: none; user-select: none; font-weight: 600; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary .icon { color: #d8b7a7; }
.nav-group > summary .chev { margin-inline-start: auto; display: inline-grid; color: #a8928a; transition: transform .2s; }
.nav-group[open] > summary .chev { transform: rotate(-90deg); }
.nav-group[open] > summary { color: #fff; }
.nav-items { padding: 2px 0 8px; margin-inline-start: 22px; border-inline-start: 1px solid rgba(255,255,255,.1); }
.nav-items a { min-height: 44px; padding-inline-start: 20px; font-size: .9rem; color: #dacbc0; border-radius: 0 10px 10px 0;
  position: relative; }
.nav-items a.active { color: #fff; font-weight: 700; background: rgba(255,255,255,.09); }
.nav-items a.active::before { content: ""; position: absolute; inset-inline-start: -1px; top: 10px; bottom: 10px; width: 3px;
  border-radius: 3px; background: var(--accent); }
.sidebar .me { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; color: #cdbbb0; }
.sidebar .me .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar .me form { display: inline; }
.sidebar .me button { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; background: none; border: 0;
  color: #ffb8a0; cursor: pointer; font: inherit; padding: 0 4px; }
.backdrop { position: fixed; inset: 0; background: rgba(20,12,10,.45); z-index: 35; opacity: 0; visibility: hidden;
  transition: opacity .25s, visibility .25s; }
.backdrop.show { opacity: 1; visibility: visible; }
html.menu-open, html.menu-open body { overflow: hidden; }

/* mobile header */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 6px;
  min-height: calc(54px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left));
  background: rgba(255,255,255,.96); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line); }
.top-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); white-space: nowrap; font-size: .95rem; }
.top-brand:hover { text-decoration: none; }
.top-brand img { border-radius: 7px; }
.top-current { margin-inline-start: auto; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .82rem; color: var(--muted); padding-inline-start: 8px; }
.close-btn { color: #d8c6bb; }

/* page header (title + page actions) */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 14px max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)); max-width: 1280px; width: 100%; margin: 0 auto; }
.page-head .title { font-size: 1.2rem; font-weight: 800; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.page-head .title:empty { display: none; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.top-actions:empty { display: none; }
main.content { padding: 14px max(14px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  max-width: 1280px; width: 100%; margin: 0 auto; min-width: 0; }

@media (min-width: 1000px) {
  .shell { grid-template-columns: 264px minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; transform: none; width: 264px; box-shadow: none; }
  .close-btn, .topbar, .backdrop { display: none !important; }
  .page-head { padding: 22px 26px 0; }
  .page-head .title { font-size: 1.35rem; }
  main.content { padding: 16px 26px 32px; }
}

/* cards & grid */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 14px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 10px; }
.grid { display: grid; gap: 14px; }
.grid > *, .form-grid > *, .card { min-width: 0; }     /* a wide table scrolls inside its card, never widens the page */
.grid.two { grid-template-columns: 1fr; }
.grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.four { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 1.35rem; color: var(--brand); }
.stat span { color: var(--muted); font-size: .85rem; }
.stat.link:hover { border-color: var(--brand); text-decoration: none; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 16px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 .95rem var(--font);
  cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.danger { color: var(--bad); border-color: #f0c4be; }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn.small { min-height: 34px; padding: 4px 10px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* forms */
label { font-weight: 600; font-size: .9rem; }
input[type=text], input[type=password], input[type=number], input[type=search], input:not([type]), select, textarea,
input[type=email], input[type=url], input[type=file] {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #dccbb7; border-radius: 8px; background: #fff;
  color: var(--text); font: 16px var(--font); }       /* 16px: iOS Safari does not zoom on focus */
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(143, 24, 55, .25); border-color: var(--brand); }
input.money, input[inputmode=numeric], input[inputmode=decimal] { direction: ltr; text-align: right; }
.field { margin-bottom: 12px; }
.field .help { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.field .errors { color: var(--bad); font-size: .85rem; margin: 2px 0 0; padding: 0; list-style: none; }
.field.check { display: flex; align-items: center; gap: 8px; }
.field.check input { width: 20px; height: 20px; min-height: 0; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 760px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .wide { grid-column: 1 / -1; } }
.checklist ul, ul.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .checklist ul, ul.checklist { grid-template-columns: 1fr 1fr; } }
.checklist label { font-weight: 500; display: flex; gap: 8px; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.filters > * { flex: 1 1 150px; }
.filters .btn { flex: 0 0 auto; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.list { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.list th { text-align: right; font-weight: 700; color: var(--muted); font-size: .8rem; padding: 8px; border-bottom: 2px solid var(--line);
  white-space: nowrap; }
table.list td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:hover td { background: var(--surface-2); }
table.list .thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: var(--surface-2); display: block; }
table.list td.money, table.list th.money { text-align: left; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

/* badges */
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge.awaiting_payment, .badge.pending_review, .badge.warn, .badge.draft { background: var(--warn-soft); color: var(--warn); border-color: #f3d9ae; }
.badge.preparing, .badge.info, .badge.partial { background: var(--info-soft); color: var(--info); border-color: #c9ddf0; }
.badge.ready { background: #f2eafb; color: #5b2a91; border-color: #dccbf0; }
.badge.shipped, .badge.completed, .badge.ok, .badge.active, .badge.paid, .badge.confirmed { background: var(--ok-soft); color: var(--ok); border-color: #bfe3cb; }
.badge.cancelled, .badge.returned, .badge.bad, .badge.rejected, .badge.refunded, .badge.unpaid { background: var(--bad-soft); color: var(--bad); border-color: #f3c6c0; }
.badge.inactive, .badge.archived { background: #eee; color: #666; }

/* messages */
.messages { list-style: none; padding: 0; margin: 0 0 14px; }
.messages li { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; border: 1px solid; }
.messages .success { background: var(--ok-soft); border-color: #bfe3cb; color: #0f5a2a; }
.messages .error { background: var(--bad-soft); border-color: #f3c6c0; color: #8a1c12; }
.messages .warning { background: var(--warn-soft); border-color: #f3d9ae; color: #7a4600; }
.messages .info { background: var(--info-soft); border-color: #c9ddf0; color: #18456f; }

/* tabs / pills */
.pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pills a { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font-size: .9rem; }
.pills a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.pills a:hover { text-decoration: none; border-color: var(--brand); }

/* order form */
.item-row { display: grid; grid-template-columns: 1fr 90px 130px 40px; gap: 8px; align-items: center; padding: 8px 0;
  border-bottom: 1px dashed var(--line); }
.item-row .name small { display: block; }
.item-row .line-total { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }
@media (max-width: 560px) { .item-row { grid-template-columns: 1fr 80px 110px 36px; } }
.picker { position: relative; }
.picker-results { position: absolute; inset-inline: 0; top: 100%; z-index: 10; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow); max-height: 340px; overflow-y: auto; display: none; }
.picker-results.show { display: block; }
.picker-results button { display: block; width: 100%; text-align: right; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--line);
  background: #fff; cursor: pointer; font: 14px var(--font); }
.picker-results button:hover, .picker-results button:focus { background: var(--brand-soft); }
.picker-results small { color: var(--muted); }
.total-box { font-size: 1.15rem; font-weight: 800; color: var(--brand); }
textarea.preview { min-height: 280px; font-size: .9rem; background: var(--surface-2); }

/* product images */
.images { display: flex; flex-wrap: wrap; gap: 10px; }
.images figure { margin: 0; width: 110px; text-align: center; }
.images img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.images figure.cover img { outline: 3px solid var(--accent); }
.images form { display: inline; }

/* misc */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; font-size: .95rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.timeline li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.bar { height: 10px; background: var(--brand); border-radius: 4px; min-width: 2px; }
.bars td { padding: 4px 8px; }
.pagination { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
details > summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { text-align: center; color: var(--brand); }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form input { width: 120px; min-height: 34px; padding: 4px 8px; }
.sticky-save { position: sticky; bottom: 0; background: rgba(246, 241, 234, .96); padding: 10px 0; border-top: 1px solid var(--line);
  display: flex; gap: 8px; z-index: 5; }
.hide-sm { display: none; }
@media (min-width: 760px) { .hide-sm { display: table-cell; } }

/* ── phones (iPhone first) ─────────────────────────────────────────────────── */
@media (max-width: 759px) {
  body { font-size: 15px; }
  .card { padding: 14px 12px; border-radius: 12px; }
  .card-head { align-items: stretch; }
  .card-head > .actions { width: 100%; }
  .actions .btn, .card-head .btn { flex: 1 1 auto; }
  .filters { gap: 8px 8px; }
  .filters > * { flex: 1 1 calc(50% - 4px); min-width: 0; }      /* two columns of filters… */
  .filters > div:first-of-type, .filters .btn { flex-basis: 100%; } /* …search and the button full width */
  .filters label { font-size: .8rem; }
  .grid.three, .grid.four { gap: 10px; }
  .stat { padding: 12px; }
  .stat b { font-size: 1.15rem; overflow-wrap: anywhere; }
  .kv { grid-template-columns: minmax(84px, 34%) 1fr; }
  .pills { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
    margin-inline: -14px; padding-inline: 14px; }
  .pills::-webkit-scrollbar { display: none; }
  .pills a { white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; }
  .table-wrap { margin-inline: -12px; padding-inline: 12px; overscroll-behavior-x: contain; }
  table.list { font-size: .88rem; }
  table.list td, table.list th { padding: 10px 6px; }
  .inline-form { flex-wrap: wrap; }
  .inline-form input { width: 100%; }
  .sticky-save { padding-bottom: calc(10px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .sticky-save .btn { flex: 1 1 140px; min-width: 0; }
  .btn { max-width: 100%; white-space: normal; text-align: center; line-height: 1.35; }  /* long labels wrap, never overflow */
  .item-row { grid-template-columns: minmax(0, 1fr) 76px 104px 40px; }
  .images figure, .images img { width: 96px; }
  .images img { height: 96px; }
}
/* touch screens: nothing smaller than a fingertip */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn.small { min-height: 40px; padding: 6px 12px; }
  .pagination a, .pagination span { min-height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; }
  .field.check input, table.list input[type=checkbox] { width: 22px; height: 22px; }
}

/* print view of the order list (سفارشات › چاپ سفارش‌ها) */
.print-only { display: none; }

@media print {
  @page { margin: 12mm; }
  body { background: #fff; font-size: 12px; }
  .shell { display: block; }
  .sidebar, .topbar, .backdrop, .top-actions, .no-print, .messages, .pills, form.filters, .pagination,
  .card-head, .btn, button, select, input[type=checkbox] { display: none !important; }
  .page-head, main.content { padding: 0; max-width: none; }
  .print-only { display: block; }
  .card { box-shadow: none; border: 0; padding: 0; margin: 0; }
  .table-wrap { overflow: visible; margin: 0; padding: 0; }
  table.list { font-size: 11px; }
  table.list tr { break-inside: avoid; }
  table.list tr:hover td { background: none; }
  .hide-sm { display: table-cell !important; }
  a { color: inherit; }
}

/* Jalali date picker (static/panel/jdate.js) — owner, 5 Nov */
.jd-input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23a08f7d' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important; background-position: left 10px center !important; padding-left: 34px !important; cursor: pointer; }
.jd-pop { position: absolute; z-index: 1000; width: 264px; background: var(--surface, #fff); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.35); padding: 10px; font-family: var(--font); }
.jd-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.jd-head b { font-size: .95rem; }
.jd-pick { display: flex; gap: 4px; }
.jd-pick select { width: auto; min-width: 0; height: 32px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface, #fff); color: var(--text); font: 700 .88rem var(--font); cursor: pointer; }
.jd-nav { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: transparent; font-size: 1.2rem;
  cursor: pointer; color: var(--text); }
.jd-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.jd-w { font-size: .75rem; color: var(--muted); padding: 2px 0 4px; }
.jd-d { height: 32px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font: 600 .88rem var(--font); color: var(--text); }
.jd-d:hover { background: var(--surface-2, #f4eee6); }
.jd-today { outline: 1.5px solid var(--accent); }
.jd-sel { background: var(--accent) !important; color: #fff !important; }
.jd-foot { display: flex; gap: 6px; margin-top: 8px; }
.jd-foot button { flex: 1; padding: 6px 0; border-radius: 8px; border: 1px solid var(--line); background: transparent; cursor: pointer;
  font: 600 .82rem var(--font); color: var(--text); }

/* product «مدل‌ها» editor (static/panel/product_form.js) — owner, 7 Nov */
.opt-help { margin-top: 0; }
.opt-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: var(--surface-2, #faf6f0); }
.opt-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 8px; flex-wrap: wrap; }
.opt-name { font-weight: 700; max-width: 260px; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px; border-radius: 10px; background: var(--surface, #fff);
  border: 1px dashed var(--line); min-height: 44px; }
.opt-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 10px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem; }
.opt-x { border: 0; background: rgba(255,255,255,.25); color: #fff; width: 22px; height: 22px; border-radius: 50%; cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0; }
.opt-x:hover { background: rgba(0,0,0,.25); }
.opt-input { flex: 1; min-width: 150px; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 6px !important; }
.opt-add { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.opt-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.opt-suggest[hidden] { display: none; }
.opt-sug { border: 1px dashed var(--accent); background: transparent; color: var(--accent); border-radius: 999px; padding: 3px 10px;
  cursor: pointer; font: 600 .85rem var(--font); }
.opt-sug:hover { background: var(--accent); color: #fff; }

/* product price / stock cards — owner, 7 Nov */
.vr-all { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px;
  background: var(--surface-2, #faf6f0); border: 1px dashed var(--accent); }
.vr-all label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.vr-all input { width: 130px; }
.vr-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.vr-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface, #fff); transition: opacity .2s; }
.vr-card.off { opacity: .55; }
.vr-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.vr-label { flex: 1; font-weight: 800; }
.vr-switch { display: inline-flex; gap: 4px; align-items: center; font-weight: 600; white-space: nowrap; cursor: pointer; }
.vr-main { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.vr-f { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.vr-f input { color: var(--text); }
.vr-price input { font-weight: 800; font-size: 1.05rem; }
.vr-check { display: flex; gap: 6px; align-items: center; font-size: .85rem; grid-column: 1 / -1; }
.vr-more { margin-top: 8px; }
.vr-more summary { cursor: pointer; font-size: .82rem; color: var(--muted); }
.vr-more[open] summary { margin-bottom: 8px; }
.vr-del { border: 1px solid var(--line); background: transparent; border-radius: 10px; width: 38px; height: 38px; cursor: pointer;
  font-size: 1rem; flex: none; }
.vr-del:hover { border-color: #c0392b; background: #fdecea; }
.vr-card.removing { border-style: dashed; border-color: #c0392b; background: #fdf3f2; }
.vr-card.removing .vr-head, .vr-card.removing .vr-main, .vr-card.removing .vr-more { display: none; }
.vr-gone { display: flex; gap: 8px; align-items: center; justify-content: space-between; color: #a5281b; font-weight: 600; }
.vr-gone[hidden] { display: none; }
.vr-off { margin-top: 10px; }

/* product page folding sections + jump bar + discount card — owner, 7 Nov */
.pf-jump { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; margin-bottom: 4px; scrollbar-width: none; }
.pf-jump::-webkit-scrollbar { display: none; }
.pf-jump a, .pf-all { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface, #fff);
  color: var(--text); text-decoration: none; font: 600 .85rem var(--font); cursor: pointer; white-space: nowrap; }
.pf-jump a:hover, .pf-all:hover { border-color: var(--accent); color: var(--accent); }
.pf-all { background: transparent; color: var(--muted); }
details.fold { padding-top: 0; padding-bottom: 0; margin-bottom: 14px; scroll-margin-top: 80px; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 0; user-select: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "‹"; font-size: 1.4rem; line-height: 1; color: var(--muted); transition: transform .2s;
  width: 18px; text-align: center; }
details.fold[open] > summary::before { transform: rotate(-90deg); }
details.fold > summary h2 { margin: 0; }
details.fold > summary .fold-hint { margin-inline-start: auto; color: var(--muted); font-size: .82rem; font-weight: 600;
  max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.fold[open] { padding-bottom: 16px; }
.dc-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.dc-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--line); }
.dc-list li > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.dc-list li.dc-running { border-color: #2e8b57; background: #eef8f1; }
.dc-list li.dc-ended { opacity: .6; }
.dc-tag { font-style: normal; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #2e8b57; color: #fff; }
.dc-tag.soon { background: #c98a14; }
.dc-tag.end { background: #888; }
.dc-form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.vr-off summary { cursor: pointer; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
