/* ══════════════════════════════════════════════════════════════════════════
   HOFMAN admin · v2.1 — בהיר ואוורירי: כרטיסים לבנים, אפור-כהה רך, מנטה כהדגשה
   (נקודות סטטוס, תגיות, שורות מודגשות), כפתורי pill כהים. הגוונים נדגמו מהרפרנס.
   ⚠️ CSP: style-src 'self' — אין inline styles. הכל כאן.
   הטוקנים מוצהרים בשלושה מקומות: :root, prefers-color-scheme:dark, [data-theme=dark].
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --paper: #F5F7F9; --surface: #FFFFFF; --sunk: #EDEFF3; --raised: #FFFFFF;
  --ink: #161819; --muted: #7A8089; --faint: #A3A6AD; --line: #E5E8EC; --line-strong: #D3D7DC;
  --accent: #41B2A7; --accent-ink: #26776F; --accent-soft: #E8F6F4; --row-hover: #F4FAFA;
  --primary: #161819; --primary-hover: #2B2E33; --primary-ink: #FFFFFF; --primary-soft: #EDEFF3;
  --focus: #41B2A7;
  --ok: #26776F; --ok-soft: #E8F6F4; --warn: #8A5A12; --warn-soft: #FBF1DF;
  --danger: #B3261E; --danger-soft: #FBE7E5;
  --bar-bg: #FFFFFF; --bar-ink: #161819; --bar-muted: #7A8089; --bar-line: #E5E8EC;
  --thumb-bg: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(22,24,25,.04);
  --shadow: 0 1px 2px rgba(22,24,25,.03), 0 10px 30px rgba(22,24,25,.05);
  --shadow-lg: 0 16px 48px rgba(22,24,25,.10);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Hebrew", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: var(--sans);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;
  --radius: var(--r-md);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1418; --surface: #161C21; --sunk: #0B0F13; --raised: #1B2228;
    --ink: #E6EAED; --muted: #8E98A3; --faint: #5F6975; --line: #232B32; --line-strong: #333D46;
    --accent: #58BBB2; --accent-ink: #58BBB2; --accent-soft: #193435; --row-hover: #152729;
    --primary: #E6EAED; --primary-hover: #FFFFFF; --primary-ink: #0F1418; --primary-soft: #232B32;
    --focus: #58BBB2;
    --ok: #58BBB2; --ok-soft: #193435; --warn: #E5B36A; --warn-soft: #332614;
    --danger: #F0857C; --danger-soft: #3A1F1C;
    --bar-bg: #121820; --bar-ink: #E6EAED; --bar-muted: #8E98A3; --bar-line: #232B32;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-lg: 0 12px 48px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
--paper: #0F1418; --surface: #161C21; --sunk: #0B0F13; --raised: #1B2228;
  --ink: #E6EAED; --muted: #8E98A3; --faint: #5F6975; --line: #232B32; --line-strong: #333D46;
  --accent: #58BBB2; --accent-ink: #58BBB2; --accent-soft: #193435; --row-hover: #152729;
  --primary: #E6EAED; --primary-hover: #FFFFFF; --primary-ink: #0F1418; --primary-soft: #232B32;
  --focus: #58BBB2;
  --ok: #58BBB2; --ok-soft: #193435; --warn: #E5B36A; --warn-soft: #332614;
  --danger: #F0857C; --danger-soft: #3A1F1C;
  --bar-bg: #121820; --bar-ink: #E6EAED; --bar-muted: #8E98A3; --bar-line: #232B32;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 48px rgba(0,0,0,.6);
}

/* ── בסיס ─────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { color-scheme: light dark; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
bdi[dir="ltr"], .mono, time[dir="ltr"] { direction: ltr; unicode-bidi: isolate; }
.mono { font-family: var(--mono); font-size: .92em; }
.num { font-variant-numeric: tabular-nums; }
.dim { color: var(--muted); }
.spacer { flex: 1; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ic.big { width: 22px; height: 22px; display: block; margin: 0 auto 4px; }
.logo { display: block; }
.logo-on-ink { filter: none; }   /* הסרגל בהיר - הלוגו המקורי */
.brand-text { font: 800 22px/1 var(--display); color: var(--bar-ink); letter-spacing: -.5px; }

/* ── כפתורים ──────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: var(--r-pill); padding: 8px 16px; font-weight: 600; cursor: pointer; white-space: nowrap; box-shadow: var(--shadow-sm); }
.btn:hover:not(:disabled) { border-color: var(--ink); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: transparent; color: var(--primary-ink); }
.btn.primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.sm { padding: 5px 11px; font-size: 12.5px; }
.btn.lg { padding: 12px 18px; font-size: 15px; }
.btn.wide { width: 100%; }
.btn.danger-text { color: var(--danger); }
.btn.danger-text:hover:not(:disabled) { border-color: var(--danger); background: var(--danger-soft); }
.btn.bar-btn { color: var(--bar-ink); border-color: var(--bar-line); }
.btn.bar-btn:hover:not(:disabled) { border-color: var(--ink); background: var(--sunk); }
.icon-btn { border: none; background: transparent; color: var(--muted); cursor: pointer; width: 34px; height: 34px; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover:not(:disabled) { background: var(--sunk); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.link-btn { border: none; background: none; color: var(--accent-ink); font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: var(--r-sm); display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover:not(:disabled) { text-decoration: underline; }
.link-btn:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.link-btn.inline { padding: 0 2px; font-size: inherit; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ── שער ─────────────────────────────────────────────────────────────────── */
.gate { min-height: 100dvh; display: grid; place-items: center; padding: var(--s6); background: radial-gradient(60% 50% at 85% 0%, var(--accent-soft), transparent 70%), var(--paper); }
.gate-shell { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, 440px); width: min(1040px, 100%); border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--surface); }
.gate-brand { background: linear-gradient(160deg, var(--accent-soft), var(--sunk) 70%); color: var(--ink); border-inline-end: 1px solid var(--line); padding: var(--s10); display: flex; flex-direction: column; justify-content: center; gap: var(--s4); }
.gate-logo-img { width: min(100%, 440px); height: auto; }
.gate-tag { margin: var(--s2) 0 0; font: 700 20px/1.3 var(--display); }
.gate-points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13.5px; }
.gate-points li::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-inline-end: 10px; vertical-align: 1px; }
.gate-card { padding: var(--s8); display: flex; flex-direction: column; gap: var(--s4); }
.gate-step { display: flex; flex-direction: column; gap: var(--s4); }
.gate-checking { align-items: center; justify-content: center; min-height: 200px; color: var(--muted); flex-direction: row; }
.gate-title { margin: 0; font: 700 24px/1.2 var(--display); color: var(--ink); letter-spacing: -.2px; }
.gate-lead { margin: -6px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.gate-note { margin: 0; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.5; }
.code-input { font: 600 30px/1.2 var(--mono); letter-spacing: .45em; text-align: center; padding: var(--s3) !important; }
.code-input::placeholder { letter-spacing: .3em; color: var(--faint); }

/* ── שדות ─────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.req { color: var(--danger); font-weight: 700; }
.field input[type="text"], .field input[type="password"], .field input[type="tel"], .field input[type="search"], .field textarea, .select, .search input, .cat-edit {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 10px 12px; width: 100%;
}
.field input:focus, .field textarea:focus, .select:focus, .search input:focus, .cat-edit:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); outline: none; }
.field input[dir="ltr"] { text-align: left; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field textarea { resize: vertical; min-height: 70px; }
.field-error { font-size: 12px; color: var(--danger); }
.form-error { margin: 0; padding: 9px 12px; border-radius: var(--r-sm); font-size: 13px; background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); }
.input-wrap { position: relative; direction: ltr; }   /* המפתח LTR - הכפתור והריפוד באותו צד */
.input-wrap input { padding-inline-end: 42px !important; }
.input-btn { position: absolute; inset-inline-end: 6px; top: 50%; translate: 0 -50%; border: none; background: none; color: var(--muted); cursor: pointer; width: 32px; height: 32px; border-radius: var(--r-sm); }
.input-btn:hover { background: var(--sunk); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent-ink); width: 15px; height: 15px; }
.hint { margin: -4px 0 0; font-size: 12.5px; padding: 8px 11px; border-radius: var(--r-sm); background: var(--sunk); color: var(--muted); min-height: 34px; }
.hint.ok { background: var(--ok-soft); color: var(--ok); }
.hint.warn { background: var(--warn-soft); color: var(--warn); }
.hint.err { background: var(--danger-soft); color: var(--danger); }

/* ── combo (קטגוריה) ─────────────────────────────────────────────────────── */
.combo { position: relative; }
.combo input { padding-inline-end: 38px !important; }
.combo-btn { position: absolute; inset-inline-end: 4px; top: 50%; translate: 0 -50%; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); border-radius: var(--r-sm); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.combo-btn:hover { background: var(--sunk); color: var(--ink); }
.combo.open .combo-btn .ic { rotate: 180deg; }
.combo-list { position: absolute; top: calc(100% + 4px); inset-inline: 0; z-index: 5; margin: 0; padding: var(--s1); list-style: none; background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); max-height: min(240px, 40vh); overflow: auto; }
.combo-list [role="option"] { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-sm); cursor: pointer; }
.combo-list [role="option"][aria-selected="true"], .combo-list [role="option"]:hover { background: var(--accent-soft); color: var(--accent-ink); }
.combo-list mark { background: none; color: inherit; font-weight: 700; text-decoration: underline var(--accent) 2px; text-underline-offset: 2px; }
.combo-count { color: var(--muted); font-size: 12px; }
.combo-hint { margin: 0; font-size: 12.5px; padding: var(--s2) var(--s3); border-radius: var(--r-sm); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.combo-hint.similar { background: var(--warn-soft); color: var(--warn); }
.combo-hint.new { background: var(--accent-soft); color: var(--accent-ink); }
.combo-hint .link-btn { font-weight: 700; padding: 0 4px; color: inherit; text-decoration: underline; }

/* ── מעטפת ───────────────────────────────────────────────────────────────── */
.app { padding: 0 0 var(--s10); }
.topbar { background: var(--bar-bg); color: var(--bar-ink); border-bottom: 1px solid var(--bar-line); position: sticky; top: 0; z-index: 10; }
.topbar-inner, .panel { max-width: 1240px; margin: 0 auto; padding-inline: var(--s5); }
.topbar-inner { display: flex; align-items: center; gap: var(--s6); min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-img { height: 24px; width: auto; }
.brand-sub { color: var(--bar-muted); font-size: 12.5px; padding-inline-start: 10px; border-inline-start: 1px solid var(--bar-line); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--s2); }
.whoami { color: var(--bar-muted); font-size: 13px; padding-inline-end: 6px; }
.whoami b { color: var(--bar-ink); font-weight: 600; }
.tabs { display: flex; gap: var(--s1); }
.tab { border: none; background: transparent; color: var(--bar-muted); font: 600 14px var(--display); padding: var(--s4) var(--s3); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; box-shadow: inset 0 -2px transparent; }
.tab:hover { color: var(--bar-ink); }
.tab[aria-selected="true"] { color: var(--bar-ink); box-shadow: inset 0 -2px var(--accent); }
.tab-badge { background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: var(--r-pill); }
.panel { padding-top: var(--s6); }
.panel-title { font: 800 20px var(--display); margin: 0; }
.panel-help { margin: -6px 0 var(--s4); color: var(--muted); font-size: 12.5px; }

.toolbar { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.search { position: relative; flex: 0 1 340px; min-width: 200px; }
.search input { padding-inline-start: 34px; }
.search-ic { position: absolute; inset-inline-start: 11px; top: 50%; translate: 0 -50%; color: var(--muted); width: 16px; height: 16px; }
.select { width: auto; min-width: 150px; }
.count { font-size: 13px; font-weight: 600; color: var(--muted); }
.toolbar-actions { margin-inline-start: auto; display: flex; gap: var(--s2); }

/* ── מצבים ───────────────────────────────────────────────────────────────── */
.state { text-align: center; padding: 44px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); margin-bottom: var(--s4); }
.state h4 { margin: 0 0 6px; color: var(--ink); font: 800 16px var(--display); }
.state p { margin: 0; font-size: 13px; }
.state .btn { margin-top: 12px; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%; animation: s .7s linear infinite; vertical-align: -2px; margin-inline-end: 6px; }
@keyframes s { to { transform: rotate(360deg); } }

/* ── טבלאות ──────────────────────────────────────────────────────────────── */
.tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; box-shadow: var(--shadow); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: var(--s3); text-align: start; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--surface); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--row-hover); }
.table tr.inactive td { opacity: .55; }
.table tr.inactive td.col-actions, .table tr.inactive td .badge { opacity: 1; }
.col-pos { width: 56px; } .col-thumb { width: 76px; } .col-sku { width: 130px; } .col-actions { width: 160px; }
.col-expand { width: 40px; } .col-by { width: 120px; }
.pos-btns { display: inline-flex; flex-direction: column; gap: 1px; }
.pos-btns .icon-btn { width: 28px; height: 20px; }
.pos-btns .ic { width: 14px; height: 14px; }
.thumb { width: 56px; height: 56px; object-fit: contain; border-radius: var(--r-sm); background: var(--thumb-bg); border: 1px solid var(--line); padding: 2px; display: block; }
.thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--line-strong); background: var(--sunk); font-size: 18px; }
.thumb.sm { width: 34px; height: 34px; }
.name { font-weight: 700; }
.cat { display: inline-block; margin-top: 4px; padding: 1px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 600; }
.sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.actions { display: flex; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }   /* נקודת סטטוס כמו ברפרנס */
.badge.on, .badge.st-delivered { background: var(--ok-soft); color: var(--ok); }
.badge.off, .badge.st-cancelled { background: var(--danger-soft); color: var(--danger); }
.badge.st-new { background: var(--accent-soft); color: var(--accent-ink); }
.badge.st-sent { background: var(--warn-soft); color: var(--warn); }
.badge.st-confirmed { background: var(--sunk); color: var(--muted); }
.status-cell { display: flex; align-items: center; gap: 8px; }
.status-select { padding: 4px 8px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); font-size: 12.5px; }
.price-main { font-weight: 700; }

/* הרחבת הזמנה */
tr.odetail td { background: var(--sunk); padding: var(--s4) var(--s5); }
.lines { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--r-sm); overflow: hidden; margin-bottom: 10px; }
.lines th, .lines td { padding: 7px 10px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.lines th { background: transparent; position: static; }
.odetail-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 12.5px; color: var(--muted); }
.odetail-meta b { color: var(--ink); }
.history { list-style: none; margin: 8px 0 0; padding: 0; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.expand[aria-expanded="true"] { rotate: 90deg; }

/* קטגוריות */
.cat-table .cat-edit { width: min(320px, 100%); padding: 7px 10px; }
.cat-row-edit { display: flex; flex-direction: column; gap: 4px; }

/* ── דיאלוגים ────────────────────────────────────────────────────────────── */
.dialog { border: none; border-radius: var(--r-xl); padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(780px, calc(100vw - 32px)); max-height: calc(100vh - 40px); }
.dialog::backdrop { background: rgba(22,24,25,.35); backdrop-filter: blur(3px); }
.dialog-sm { width: min(440px, calc(100vw - 32px)); }
.dialog-form { display: flex; flex-direction: column; max-height: calc(100vh - 40px); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s6); border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 0; font: 800 18px var(--display); }
.dialog-body { padding: var(--s5) var(--s6); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s4); }
.dialog-foot { display: flex; align-items: center; gap: 10px; padding: var(--s4) var(--s6); border-top: 1px solid var(--line); background: var(--sunk); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.span2 { grid-column: 1 / -1; }
.confirm-text { margin: 0; font-size: 15px; line-height: 1.6; padding-top: 6px; }

/* מדיה: גלריה + סרטון */
.media-block { gap: 8px; }
.gallery { display: flex; flex-wrap: wrap; gap: 10px; min-height: 12px; }
.gal-item { position: relative; width: 96px; height: 96px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--thumb-bg); overflow: hidden; }
.gal-item img { width: 100%; height: 100%; object-fit: contain; padding: 4px; display: block; }
.gal-item.main { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.gal-main { position: absolute; top: 4px; inset-inline-start: 4px; font-size: 10px; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); padding: 1px 7px; border-radius: var(--r-pill); }
.gal-tools { position: absolute; bottom: 0; inset-inline: 0; display: flex; justify-content: center; gap: 2px; background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 2px; }
.gal-tools button { border: 0; background: none; width: 26px; height: 22px; cursor: pointer; border-radius: var(--r-sm); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.gal-tools button:hover:not(:disabled) { background: var(--sunk); color: var(--ink); }
.gal-tools button:disabled { opacity: .3; cursor: default; }
.gal-tools button.danger:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); }
.gal-item.uploading { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); font-size: 11.5px; gap: 6px; border-style: dashed; }
.media-ctrl { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.hint-sm { margin: 0; font-size: 12px; color: var(--muted); }
.video-row { display: flex; gap: var(--s4); align-items: flex-start; flex-wrap: wrap; }
.video-preview { position: relative; width: 260px; max-width: 100%; }
.video-preview video { width: 100%; max-height: 200px; border-radius: var(--r-md); background: #000; display: block; }
.video-chip { position: absolute; top: 8px; inset-inline-start: 8px; }
.thumb-wrap { position: relative; width: 56px; }
.thumb-count { position: absolute; bottom: -5px; inset-inline-end: -6px; background: var(--ink); color: var(--paper); font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: var(--r-pill); line-height: 16px; }
.thumb-video { position: absolute; top: -5px; inset-inline-start: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; }
.thumb-video .ic { width: 10px; height: 10px; fill: currentColor; stroke: none; }

/* תמונה */
.img-row { display: flex; gap: var(--s4); align-items: flex-start; }
.img-preview { width: 120px; height: 120px; border-radius: var(--r-md); background: var(--thumb-bg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.img-preview img { width: 100%; height: 100%; object-fit: contain; }
.img-empty { font-size: 12px; color: var(--muted); text-align: center; }
.img-ctrl { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.img-status { margin: 0; font-size: 12px; color: var(--muted); }

/* ── toasts ──────────────────────────────────────────────────────────────── */
.toasts { position: fixed; inset-inline-start: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-md); font-size: 13px; box-shadow: var(--shadow-lg); max-width: 360px; cursor: pointer; border-inline-start: 4px solid var(--accent); }
.toast.ok { border-inline-start-color: var(--ok); }
.toast.err { border-inline-start-color: var(--danger); }

/* ── מוטיבציה (opt-in) ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .btn, .icon-btn, .tab, .thumb, .combo-btn .ic, .expand { transition: background .12s, border-color .12s, color .12s, transform .12s, box-shadow .15s, scale .15s, rotate .15s; }
  .prow:hover .thumb { scale: 1.06; }
  .fresh .prow { animation: rise .28s ease-out both; }
  .fresh .prow:nth-child(2) { animation-delay: .03s; } .fresh .prow:nth-child(3) { animation-delay: .06s; } .fresh .prow:nth-child(4) { animation-delay: .09s; }
  .fresh .prow:nth-child(5) { animation-delay: .12s; } .fresh .prow:nth-child(6) { animation-delay: .15s; } .fresh .prow:nth-child(7) { animation-delay: .18s; }
  .fresh .prow:nth-child(n+8) { animation-delay: .21s; }
  .toast { animation: toast-in .2s ease-out; }
  .dialog[open] { animation: pop .18s ease-out; }
  .combo-list { animation: fade .12s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(6px); } }
  @keyframes toast-in { from { opacity: 0; translate: -12px 0; } }
  @keyframes pop { from { opacity: 0; scale: .97; } }
  @keyframes fade { from { opacity: 0; } }
}

/* ── רספונסיב ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gate-shell { grid-template-columns: 1fr; }
  .gate-brand { padding: var(--s6); }
  .gate-logo-img { width: min(100%, 280px); }
  .gate-points { display: none; }
}
@media (max-width: 720px) {
  .gate { padding: var(--s3); }
  .gate-card { padding: var(--s5); }
  .col-disc, .col-retail, .col-by, .col-sku { display: none; }
  .brand-sub, .whoami { display: none; }              /* לוגו + כפתורים בשורה אחת, הטאבים מתחת */
  .brand-img { height: 20px; }
  .topbar-inner { gap: var(--s3); min-height: 52px; }
  .tabs { margin-top: -6px; }
  .tabs { order: 3; width: 100%; overflow-x: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .toolbar-actions { margin-inline-start: 0; width: 100%; }
  .search { flex: 1 1 100%; }
  .table th, .table td { padding: 8px 9px; }
  .toasts { inset-inline: 12px; bottom: 12px; }
  .toast { max-width: none; }
  .actions { flex-direction: column; }
}
@media (hover: hover) {
  .catalog .actions { opacity: .6; }
  .catalog .prow:hover .actions, .catalog .prow:focus-within .actions { opacity: 1; }
}
