/* GetFlyLink design system — mobile-first, RTL, light/dark */
:root {
  --ink: #102039;
  --ink-soft: #4a556c;
  --bg: #f3f5fb;
  --card: #ffffff;
  --muted-bg: #ebeef6;
  --track: #e0e5f0;
  --line: #d5dbe8;
  --brand: #1a2744;
  --brand-2: #2a3280;
  --accent: #0a7d56;
  --accent-hover: #086847;
  --accent-soft: #e5f7f0;
  --accent-text: #086347;
  --on-accent: #ffffff;
  --on-brand: #f4f7ff;
  --gold: #0a7d56;
  --gold-deep: #086347;
  --pine: #0a7d56;
  --ok: #0a7d56;
  --ok-bg: #e7f7f0;
  --ok-border: #b6e4d0;
  --ok-text: #086347;
  --warn-bg: #fff6e0;
  --warn-border: #ead39a;
  --warn-text: #8a5a00;
  --danger: #b42318;
  --danger-bg: #fdecec;
  --danger-border: #f0c0c0;
  --info: #2656a8;
  --info-bg: #eaf1fb;
  --count-bg: #dce3f2;
  --shadow: 0 1px 2px rgba(16, 32, 57, 0.05), 0 10px 28px rgba(16, 32, 57, 0.07);
  --shadow-lg: 0 16px 40px rgba(16, 32, 57, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-8: 32px;
  --nav-h: 56px;
  --tab-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Heebo", "Segoe UI", "Arial Hebrew", "Noto Sans Hebrew", Arial, sans-serif;
  --topbar: #121a2e;
  --topbar-text: #eef2fb;
  --tab-bg: rgba(255, 255, 255, 0.92);
  --ease: 180ms cubic-bezier(.2, .7, .2, 1);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e8edf7;
  --ink-soft: #9aa6bc;
  --bg: #0c1220;
  --card: #161d2e;
  --muted-bg: #1c2438;
  --track: #263048;
  --line: #2a3348;
  --brand: #c7d2fe;
  --brand-2: #a5b4fc;
  --accent: #3dcb96;
  --accent-hover: #6ee7b7;
  --accent-soft: #12352a;
  --accent-text: #6ee7b7;
  --on-accent: #06281c;
  --on-brand: #0c1220;
  --gold: #3dcb96;
  --gold-deep: #6ee7b7;
  --pine: #3dcb96;
  --ok: #3dcb96;
  --ok-bg: #12352a;
  --ok-border: #1d5c45;
  --ok-text: #6ee7b7;
  --warn-bg: #2a2312;
  --warn-border: #6b5420;
  --warn-text: #f0c674;
  --danger: #f87171;
  --danger-bg: #3a1717;
  --danger-border: #7a2e2e;
  --info: #93c5fd;
  --info-bg: #15233a;
  --count-bg: #2a3348;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.5);
  --topbar: #080c16;
  --topbar-text: #e8edf7;
  --tab-bg: rgba(16, 22, 36, 0.94);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Safety net: never let one wide element make a phone page pan sideways. */
html { overflow-x: hidden; }
@supports (overflow: clip) { html { overflow-x: clip; } }
code, kbd, samp { overflow-wrap: anywhere; word-break: break-word; }
.break-all { word-break: break-all; overflow-wrap: anywhere; }
html { direction: rtl; color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body {
  overflow-x: hidden;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100dvh;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--ease), color var(--ease);
}
body.nav-open { overflow: hidden; }
body.has-tabs { padding-bottom: calc(var(--tab-h) + var(--safe-bottom)); }
a { color: var(--accent-text); }
a:hover { color: var(--accent-hover); }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.ico {
  width: 1.15em; height: 1.15em;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 auto;
  display: inline-block; vertical-align: -0.2em;
}
.ico-lg { width: 1.45em; height: 1.45em; }


/* ── Chrome: header, drawer, tabs, toasts ───────────────────────── */
.app { min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  min-height: var(--nav-h);
  padding: 0 12px;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--topbar);
  color: var(--topbar-text);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.18);
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--topbar-text); margin-inline-end: auto; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(160deg, #243356 0%, #151c30 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.brand-mark svg { display: block; }
.brand-name { font-weight: 800; letter-spacing: -0.03em; font-size: 1.06rem; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar-user { font-size: 0.78rem; color: #c5cde0; max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-inline: 6px; }
.icon-btn {
  appearance: none; border: 0; background: transparent; color: inherit;
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn:hover, .icon-btn:focus-visible { background: rgba(255,255,255,0.08); }
.icon-btn .ico { width: 22px; height: 22px; }
html[data-theme="dark"] .theme-sun { display: none; }
html[data-theme="light"] .theme-moon, html:not([data-theme]) .theme-moon { display: none; }
html[data-theme="dark"] .theme-moon { display: block; }

.nav-toggle { width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--topbar-text); cursor: pointer; display: grid; place-items: center; }
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-backdrop {
  position: fixed; inset: 0; background: rgba(8, 12, 22, 0.48);
  backdrop-filter: blur(2px);
  z-index: 60; opacity: 0; pointer-events: none; transition: opacity var(--ease);
}
.nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
.nav-drawer {
  position: fixed; top: 0; bottom: 0; right: 0; left: auto;
  width: min(86vw, 360px);
  background: var(--card); color: var(--ink);
  z-index: 70; transform: translateX(110%);
  transition: transform 220ms cubic-bezier(.2,.7,.2,1);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  padding-bottom: calc(12px + var(--safe-bottom));
  overflow: auto;
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 12px; font-weight: 800; position: sticky; top: 0;
  background: var(--card); z-index: 1;
  border-bottom: 1px solid var(--line);
}
.nav-close { border: 0; background: var(--muted-bg); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.nav-section { padding: 6px 8px 10px; border-top: 1px solid var(--line); }
.nav-section-title {
  margin: 10px 12px 6px; font-size: 0.72rem; font-weight: 800;
  letter-spacing: 0.06em; color: var(--ink-soft); text-transform: none;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin: 2px 6px; border-radius: 12px;
  text-decoration: none; color: var(--ink); font-weight: 650; font-size: 0.98rem;
  transition: background var(--ease), color var(--ease);
}
.nav-link .ico { color: var(--ink-soft); }
.nav-link.is-active { background: var(--accent-soft); color: var(--accent-text); }
.nav-link.is-active .ico { color: var(--accent-text); }
.nav-link-btn { width: calc(100% - 12px); border: 0; background: transparent; text-align: right; cursor: pointer; font: inherit; }
.nav-logout { margin: 0; }
.nav-count, .nav-sched .nav-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35em; margin-inline-start: auto;
  padding: 0 6px; height: 1.35em; border-radius: 999px;
  background: var(--count-bg); color: var(--ink);
  font-size: 0.72rem; font-weight: 800; text-align: center;
}
.nav-link.is-active .nav-count { background: var(--accent); color: var(--on-accent); }

.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 45;
  display: flex; justify-content: space-around;
  min-height: calc(var(--tab-h) + var(--safe-bottom));
  padding: 6px 4px calc(6px + var(--safe-bottom));
  background: var(--tab-bg);
  backdrop-filter: saturate(1.2) blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(16,32,57,0.06);
}
.tabbar a, .tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-width: 0; padding: 4px 2px;
  border: 0; background: transparent; color: var(--ink-soft);
  text-decoration: none; font-size: 0.68rem; font-weight: 700; font-family: inherit;
  cursor: pointer;
}
.tabbar .ico { width: 22px; height: 22px; }
.tabbar a.is-active, .tabbar button.is-active { color: var(--accent-text); }
.tab-badge {
  position: absolute; top: -2px; inset-inline-end: calc(50% - 18px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 0.62rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.tabbar a, .tabbar .tab-item { position: relative; }
@media (min-width: 860px) {
  .tabbar { display: none; }
  body.has-tabs { padding-bottom: 0; }
}

#toast-host {
  position: fixed; inset-inline: 12px; bottom: calc(var(--tab-h) + var(--safe-bottom) + 12px);
  z-index: 90; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
body:not(.has-tabs) #toast-host { bottom: calc(16px + var(--safe-bottom)); }
.toast {
  pointer-events: auto;
  background: var(--brand); color: var(--on-brand);
  padding: 12px 14px; border-radius: 14px;
  box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: 0.92rem;
  transform: translateY(12px); opacity: 0;
  transition: transform var(--ease), opacity var(--ease);
}
.toast.is-in { transform: none; opacity: 1; }
.toast-ok { background: var(--accent); color: var(--on-accent); }
.toast-error { background: var(--danger); color: #fff; }
.toast-info { background: var(--brand); color: var(--on-brand); }
html[data-theme="dark"] .toast-info { color: #0c1220; background: #c7d2fe; }

.app-dialog {
  border: 0; border-radius: 20px; padding: 22px 18px 16px;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-lg);
  width: min(92vw, 360px);
}
.app-dialog::backdrop { background: rgba(8,12,22,0.5); backdrop-filter: blur(2px); }
.app-dialog p { margin: 0 0 16px; font-weight: 650; }

.main { padding: 8px 16px 24px; flex: 1; animation: pageIn 280ms ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head h1 { margin: 8px 0 4px; font-size: 1.55rem; letter-spacing: -0.03em; font-weight: 800; }
.page-head p, .lede, .hint { color: var(--ink-soft); }
.lede { margin-top: 0; }
.hint { font-size: 0.88rem; margin: 8px 0 0; }
.ok-hint { color: var(--ok-text); }
.hint.is-error, .is-error { color: var(--danger); }
.hint.is-ok, .is-ok { color: var(--ok-text); }
.eyebrow { margin: 0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; color: var(--accent-text); }

.flash-wrap { padding: 8px 16px 0; }
.flash { padding: 10px 12px; border-radius: 12px; margin-bottom: 8px; font-size: 0.95rem; }
.flash-ok { background: var(--ok-bg); color: var(--ok-text); }
.flash-error { background: var(--danger-bg); color: var(--danger); }

.form, fieldset { display: grid; gap: 14px; }
.form label, fieldset label { display: grid; gap: 6px; font-weight: 700; font-size: 0.92rem; }
.form input, .form select, .form textarea, fieldset input, fieldset select, fieldset textarea,
input[type="text"], input[type="password"], input[type="number"], input[type="url"], input[type="tel"], input[type="time"], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); color: var(--ink); font: inherit;
  transition: border-color var(--ease), box-shadow var(--ease);
}
textarea { min-height: 88px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus,
input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
  outline: none;
}
.check { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform 120ms ease, background var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: var(--on-brand); border-color: transparent; }
html[data-theme="dark"] .btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-secondary { background: var(--muted-bg); border-color: var(--line); }
.btn-ghost { background: transparent; }
.btn-small { min-height: 34px; padding: 4px 10px; font-size: 0.82rem; border-radius: 10px; }
.btn-wa { background: var(--ok-bg); color: var(--ok-text); border-color: var(--ok-border); }
.btn-tg { background: var(--info-bg); color: var(--info); border-color: transparent; }

.toolbar { display: grid; gap: 8px; margin: 8px 0 16px; }
.select-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.has-tabs .select-row, .sticky-actions {
  position: sticky; bottom: calc(var(--tab-h) + var(--safe-bottom) + 8px);
  z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  padding: 8px 4px; margin-inline: -4px; border-radius: 14px;
  box-shadow: 0 -8px 20px color-mix(in srgb, var(--ink) 6%, transparent);
}
@media (min-width: 860px) {
  .has-tabs .select-row, .sticky-actions { bottom: 8px; }
}
.grid { display: grid; gap: 14px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.card, .queue-item, .panel, .auth-card,
.draft-card, .agent-card, .order-card, .sched-card, .hc-card, .sb-card, .ae-result, .stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { position: relative; overflow: hidden; transition: transform var(--ease), box-shadow var(--ease); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.panel { padding: 16px; margin: 0 0 16px; }
.panel h2 { margin: 0 0 10px; font-size: 1.08rem; font-weight: 800; }

.badge {
  position: absolute; top: 8px; right: 8px;
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand);
  font-size: 0.72rem; font-weight: 800;
}
html[data-theme="dark"] .badge { color: #0c1220; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.stat-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 14px 12px; text-decoration: none; color: inherit;
  transition: transform var(--ease), box-shadow var(--ease);
}
.stat-card:hover { transform: translateY(-2px); color: inherit; }
.stat-kicker { font-size: 0.75rem; font-weight: 800; color: var(--ink-soft); }
.stat-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); }
.stat-sub { font-size: 0.75rem; color: var(--ink-soft); }

.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-actions .btn { flex: 1 1 calc(50% - 8px); }

.empty, .empty-state {
  text-align: center; padding: 40px 16px;
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  color: var(--ink-soft);
}
.empty-state .empty-ico {
  width: 64px; height: 64px; margin: 0 auto 12px;
  border-radius: 20px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text);
}
.empty-state .empty-ico .ico { width: 32px; height: 32px; }
.empty-state h2 { margin: 0 0 6px; color: var(--ink); font-size: 1.15rem; }
.empty-state p { margin: 0 0 16px; }
.empty-state .btn { min-width: 180px; }

.skeleton {
  background: linear-gradient(90deg, var(--muted-bg) 0%, var(--track) 45%, var(--muted-bg) 100%);
  background-size: 200% 100%;
  animation: skel 1.15s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skel { to { background-position: -200% 0; } }
.skel-card { overflow: hidden; }
.skel-img { height: 180px; border-radius: 0; }
.skel-line { height: 12px; margin: 8px 12px; }
.skel-line.short { width: 40%; }

.site-foot {
  text-align: center; font-size: 0.75rem; color: var(--ink-soft);
  padding: 8px 16px 20px;
}
.has-tabs .site-foot { padding-bottom: 8px; }

.auth-card { padding: 28px 20px; margin: 28px auto 0; max-width: 420px; }
body.is-auth .main { display: flex; flex-direction: column; justify-content: center; }
.auth-card h1 { margin: 0 0 8px; font-size: 1.6rem; }
.auth-switch { text-align: center; margin-top: 16px; }

/* light/dark tweaks for status surfaces */
.conn-light { background: var(--card); border-color: var(--line); color: var(--ink); }
.conn-light span { color: var(--ink-soft); }
.conn-status li { background: var(--card); }
.dash-upcoming li { background: var(--card); }
.target-item, .sched-item, .log-item { background: var(--card); }
.mode-pill span { background: var(--card); color: var(--ink); }
.mode-pill:has(input:checked) span { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.gender-btn { background: var(--card); }
.gender-btn.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.pager-num.is-current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cat-chip { background: var(--muted-bg); color: var(--ink); border: 1px solid var(--line); }
.cat-chip.is-active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.ai-progress span { background: var(--accent); }
.sb-preview-text { background: var(--muted-bg); color: var(--ink); }
.posted-meta { color: var(--ink-soft); }
.hc-card .hc-badge { background: var(--brand); color: #f3d48a; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .main { animation: none; }
}

/* ── Legacy component styles (tokenized) ─────────────────────── */
.card-check { position: absolute; top: 8px; right: 8px; z-index: 2; background: rgba(255,253,248,0.9); padding: 4px; border-radius: 8px; }
.card-img-wrap { position: relative; background: var(--muted-bg); }
.card-img, .queue-img { width: 100%; max-height: 260px; object-fit: cover; display: block; background: var(--muted-bg); }
.card-img.is-empty, .flylink-img.is-empty {
  min-height: 120px; display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); font-size: 0.88rem; padding: 16px; text-align: center;
}
.badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--gold); color: #fff; font-size: 0.72rem; font-weight: 800;
  padding: 3px 8px; border-radius: 999px;
}
.badge-count { top: auto; bottom: 8px; left: 8px; right: auto; background: rgba(18,35,58,0.82); }
.card-img-wrap .badge + .badge-count { bottom: 8px; }
.card-body, .queue-body { padding: 12px; }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.code { font-size: 0.92rem; }
.price { font-weight: 800; color: var(--gold-deep); }
.item-type { margin: 4px 0 0; color: var(--ink-soft); font-size: 0.86rem; }

.flylink-preview {
  padding: 10px 12px 12px;
  background: var(--muted-bg);
  border-top: 1px solid var(--line);
}
.flylink-preview-inline { margin: 8px 0; border-radius: 12px; border: 1px solid var(--line); }
.flylink-label { margin: 0 0 8px; font-weight: 800; font-size: 0.82rem; }
.flylink-img {
  width: 100%; max-height: 200px; object-fit: contain;
  background: var(--card); border-radius: 10px; display: block; margin-bottom: 8px;
}

.post-box { margin-top: 8px; }
.post-box summary { cursor: pointer; font-weight: 700; font-size: 0.92rem; padding: 6px 0; }
textarea.post-text, textarea[name="post_style_prompt"] {
  width: 100%; font: inherit; font-size: 0.92rem; line-height: 1.55;
  background: var(--muted-bg); padding: 10px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--ink);
  resize: vertical; min-height: 8em;
  direction: rtl; text-align: start; unicode-bidi: plaintext;
}
textarea.post-text:focus, textarea[name="post_style_prompt"]:focus {
  outline: 2px solid color-mix(in srgb, var(--gold) 50%, white);
  border-color: var(--gold);
}
.post-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.picker-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  padding: 4px 0 8px;
}
.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--muted-bg);
  display: block;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb input { position: absolute; inset-block-end: 4px; inset-inline-start: 4px; width: 18px; height: 18px; accent-color: var(--ink); z-index: 1; }
.thumb:has(input:checked) { border-color: var(--ink); }
.mode-row, .size-pills { display: flex; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.mode-pill { flex: 1; min-width: 0; position: relative; }
.size-pill { flex: 0 0 52px; }
.mode-pill span {
  display: flex; align-items: center; justify-content: center;
  min-height: 36px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 0.82rem; font-weight: 700;
  background: var(--card);
}
.mode-pill input { position: absolute; opacity: 0; pointer-events: none; }
.mode-pill:has(input:checked) span { background: var(--ink); color: var(--card); border-color: var(--ink); }
.collage-size-label { font-weight: 700; font-size: 0.86rem; }
.collage-preview { margin-top: 8px; }
.preview-label { font-weight: 700; font-size: 0.86rem; margin: 0 0 6px; }
.collage-preview-imgs { display: grid; gap: 8px; }
.collage-preview-imgs img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; background: var(--muted-bg); }

.link-block { display: grid; gap: 8px; margin: 8px 0 6px; }
.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  background: var(--muted-bg);
  border-radius: 10px;
  padding: 8px 8px 8px 10px;
}
.link-label { font-size: 0.72rem; font-weight: 800; color: var(--ink-soft); letter-spacing: 0.02em; grid-column: 1 / 2; }
.link-url { font-size: 0.68rem; line-height: 1.35; overflow-wrap: anywhere; word-break: break-all; grid-column: 1 / 2; }
.link-row .btn { grid-row: 1 / 3; grid-column: 2 / 3; min-height: 34px; }

.queue-list { display: grid; gap: 14px; }
.panel { padding: 16px; margin: 0 0 16px; }
.panel h2 { margin: 0 0 10px; font-size: 1.08rem; }
.guide-steps { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: 8px; }
.he-guide { line-height: 1.55; }
.target-list, .sched-list, .log-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.target-item, .sched-item, .log-item {
  border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--card);
}
.badge-status { position: static; display: inline-block; }
.badge-sent, .badge-ok { background: var(--pine); }
.badge-failed, .badge-error { background: var(--danger); }
.badge-pending { background: var(--gold-deep); }
.badge-cancelled { background: var(--ink-soft); }
.qr-wrap { text-align: center; margin-top: 12px; }
.qr-wrap img { max-width: 280px; width: 100%; background: var(--card); padding: 10px; border-radius: 12px; border: 1px solid var(--line); }

.empty { text-align: center; padding: 32px 12px; color: var(--ink-soft); }
.auth-card { padding: 22px 18px; margin-top: 20px; }
.auth-switch { text-align: center; margin-top: 16px; }
.site-foot { text-align: center; font-size: 0.75rem; color: var(--ink-soft); padding: 16px 8px 8px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.status-line { min-height: 1.2em; }

/* Categories */
.cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
}
.cat-chip {
  appearance: none;
  border: 1px solid var(--line, #d7dde7);
  background: var(--card);
  color: var(--ink, #152033);
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cat-chip .cat-n {
  font-size: 0.75rem;
  color: var(--ink-soft, #5b677a);
  background: #eef2f7;
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 1.4em;
  text-align: center;
}
.cat-chip.is-active {
  background: var(--navy, #152033);
  color: #fff;
  border-color: var(--navy, #152033);
}
.cat-chip.is-active .cat-n {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.cat-section { margin: 0 0 22px; }
.cat-heading {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 6px 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.cat-heading .cat-n {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft, #5b677a);
}
.cat-assign {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
  font-size: 0.82rem;
}
.cat-assign span { color: var(--ink-soft, #5b677a); flex: 0 0 auto; }
.cat-assign select {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 0.86rem;
  padding: 6px 8px;
  border: 1px solid var(--line, #d7dde7);
  border-radius: 8px;
  background: var(--card);
  color: inherit;
}
.cat-settings { margin-top: 24px; }
.cat-edit-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.cat-edit-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-edit-list input[type="text"] {
  flex: 1;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line, #d7dde7);
  border-radius: 8px;
}
.cat-key {
  font-size: 0.72rem;
  color: var(--ink-soft, #5b677a);
  min-width: 4.5em;
  direction: ltr;
}
.cat-add-row {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
}
.cat-add-row input {
  flex: 1;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line, #d7dde7);
  border-radius: 8px;
}

/* Schedule timeline */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 420px) {
  .form-row-time { grid-template-columns: 1fr 1fr; }
}
.sched-board { margin-top: 8px; }
.sched-board-past { opacity: 0.98; }
.sched-day { margin: 0 0 18px; }
.sched-day-heading {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sched-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 4px;
  border-inline-start: 2px solid #e3e8f0;
  display: grid;
  gap: 12px;
}
.sched-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: start;
  background: transparent;
  border: 0;
  padding: 0 0 0 12px;
  position: relative;
}
.sched-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -5px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--navy, #152033);
  box-shadow: 0 0 0 3px #fff;
}
.sched-item.is-past::before { background: #8a96a8; }
.sched-item.is-overdue::before { background: var(--danger, #b42318); }
.sched-time {
  padding-top: 10px;
  text-align: start;
}
.sched-hhmm {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.95rem;
  display: block;
}
.sched-late {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--danger, #b42318);
  font-weight: 700;
}
.sched-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line, #d7dde7);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 1px 2px rgba(18, 35, 58, 0.04);
}
.sched-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: #eef2f7;
}
.sched-thumb.is-empty { background: #eef2f7; }
.sched-body { min-width: 0; }
.sched-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sched-cat {
  margin: 4px 0 6px;
  font-size: 0.82rem;
  color: var(--ink-soft, #5b677a);
}
.sched-targets {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
  padding: 0;
}
.plat-badge {
  font-size: 0.72rem;
  line-height: 1.2;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #152033;
}
.plat-badge.plat-telegram { background: #e6f3fb; color: #0b5d8a; }
.plat-badge.plat-whatsapp { background: #e7f7ee; color: #0c6b38; }
.plat-badge.plat-facebook { background: #e8eefb; color: var(--info); }
.sched-item .post-actions { margin-top: 4px; }

/* Design system polish */
h1, h2, h3, .brand, .stat-value, .cat-heading {
  font-family: "Heebo", var(--font);
  font-weight: 700;
}
.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold-deep);
  text-transform: uppercase;
}

/* Dashboard */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 16px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 14px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
}
.stat-kicker { font-size: 0.75rem; font-weight: 700; color: var(--ink-soft); }
.stat-value { font-size: 1.7rem; letter-spacing: -0.03em; line-height: 1.15; }
.stat-sub { font-size: 0.75rem; color: var(--ink-soft); }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick-actions .btn { text-align: center; }
.dash-cats { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dash-cats a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-radius: 12px; background: var(--muted-bg);
  text-decoration: none; color: inherit; font-weight: 700;
}
.conn-status { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.conn-status li {
  display: flex; justify-content: space-between; gap: 8px; align-items: baseline;
  padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
}
.conn-status a { font-weight: 800; text-decoration: none; color: inherit; }
.conn-status span { font-size: 0.8rem; color: var(--ink-soft); }
.conn-status .is-on { border-color: var(--ok-border); background: var(--ok-bg); }
.conn-status .is-off { opacity: 0.92; }
.dash-upcoming { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.dash-upcoming li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
}

/* Partnership + source */
.no-share-banner {
  display: block;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 800;
  font-size: 0.88rem;
}
.badge-ae { background: var(--info); }
.discount-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 800;
  color: #fff; background: var(--danger); border-radius: 999px; padding: 1px 6px;
}
.price-was { font-size: 0.78rem; color: var(--ink-soft); text-decoration: line-through; }
.source-chips { margin-top: 8px; }

/* Scheduled products */
.cat-chip-sched { background: var(--warn-bg); }
.cat-chip-sched.is-active { background: var(--gold); color: #fff; }
.nav-count, .nav-sched .nav-count {
  display: inline-block;
  min-width: 1.3em;
  margin-inline-start: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--count-bg);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}
.nav-link.is-active .nav-count { background: rgba(255,255,255,0.25); color: inherit; }
.scheduled-section { margin: 0 0 16px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.scheduled-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.scheduled-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.scheduled-thumb {
  width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--muted-bg);
}
.scheduled-thumb.is-empty { background: var(--muted-bg); }
.scheduled-body { display: grid; gap: 2px; }
.scheduled-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.auto-on-card { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0 6px; }
.sched-when { font-size: 0.8rem; font-weight: 700; color: var(--ink); }
.badge-queued { background: var(--ink-soft); }

/* Suppliers + FlyLink */
.supplier-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.supplier-list li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  display: grid;
  gap: 4px;
}
.supplier-list .is-on { border-color: var(--ok-border); }
.supplier-list .is-off { border-color: var(--danger-border); }
.supplier-head { display: grid; gap: 4px; }
.supplier-actions { display: flex; gap: 8px; margin-top: 8px; }
.supplier-edit { margin-top: 6px; }
#supplier-add h3 { margin: 0 0 8px; font-size: 1rem; }

/* AliExpress results */
.ae-grid { margin-top: 12px; }
.ae-mini .card-img { height: 140px; object-fit: cover; width: 100%; }
.ae-result {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.ae-result img { width: 100%; height: 160px; object-fit: cover; background: var(--muted-bg); }
.ae-result .card-body { padding: 10px; display: grid; gap: 4px; }

/* Pagination (RTL) */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 6px;
  direction: rtl;
}
.pager-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pager-num, .pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}
.pager-num.is-current {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}
.pager-btn.is-disabled {
  opacity: 0.4;
  cursor: default;
}
.pager-gap { padding: 8px 4px; color: var(--ink-soft); }
.pager-meta { text-align: center; margin: 0 0 12px; }
.gender-chips { margin-top: 8px; }
.gender-assign { margin-top: 6px; }

/* Prominent gender bar on products */
.gender-bar {
  margin: 0 0 16px;
  padding: 14px 14px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.gender-bar-label {
  margin: 0 0 10px;
  font-family: "Heebo", var(--font);
  font-weight: 800;
  font-size: 1.02rem;
}
.gender-bar-btns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.gender-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 10px 6px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  text-align: center;
}
.gender-btn .gender-n {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.gender-btn.is-active {
  border-color: var(--gold-deep);
  background: var(--warn-bg);
  color: var(--ink);
}
.gender-women.is-active { border-color: #9b4a6a; background: #fbeff3; }
.gender-men.is-active { border-color: #2b5c8a; background: #eef4fb; }
.gender-kids.is-active { border-color: #1f6b56; background: #eef8f3; }
.gender-bar-more {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.gender-bar-more .gender-btn {
  flex: 1;
  min-height: 44px;
  flex-direction: row;
  gap: 6px;
  font-size: 0.92rem;
}


/* AI classify */
.ai-toolbar {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.ai-progress {
  height: 8px;
  background: var(--track);
  border-radius: 999px;
  overflow: hidden;
}
.ai-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.3s ease;
}
#ai-settings .he-guide {
  margin-bottom: 1.25rem;
}
#ai-settings .guide-steps {
  padding-inline-start: 1.2rem;
}
#ai-settings .guide-steps li {
  margin: 0.45rem 0;
}

#ai-classify-stop[hidden] { display: none !important; }

/* Search bot connection page */
.sb-status { margin: 0; padding-inline-start: 1.2rem; display: grid; gap: 6px; }
.sb-preview-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--muted-bg);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 12px;
  line-height: 1.5;
}
.sb-preview-cards {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.sb-card {
  border: 1px solid var(--line, var(--line));
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
}
.sb-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.sb-card pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.92rem;
  margin: 0;
  padding: 12px 14px;
  line-height: 1.5;
}

.badge-posted {
  background: var(--brand);
  color: var(--card);
  top: 8px;
  left: 8px;
  right: auto;
}
.posted-meta {
  margin: 0.25rem 0 0.4rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.posted-chips { margin-top: 0.35rem; }

.draft-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.draft-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1rem;
  box-shadow: 0 1px 2px rgba(28, 20, 10, 0.04);
}
.draft-head { display: flex; gap: 0.85rem; align-items: flex-start; margin-bottom: 0.75rem; }
.draft-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--muted-bg); flex: 0 0 72px; }
.draft-thumb.is-empty { background: var(--muted-bg); }
.draft-photo-list { list-style: none; margin: 0.4rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.draft-photo { width: 92px; position: relative; }
.draft-photo img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; display: block; }
.draft-photo-actions { display: flex; justify-content: center; gap: 0.15rem; margin-top: 0.2rem; }
.draft-avail { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.draft-avail-btn { border: 2px solid transparent; padding: 0; background: none; border-radius: 10px; }
.draft-avail-btn img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.draft-avail-btn.is-on { border-color: var(--brand); opacity: 0.45; }
#drafts-auto-panel { margin-bottom: 1rem; }

.sg-days, .sg-windows { margin: 0.6rem 0 1rem; }
.sg-day-windows { margin: 0.6rem 0; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.sg-day-name { display: block; margin-bottom: 0.3rem; }
.sg-win-list { list-style: none; margin: 0; padding: 0; }
.sg-win { display: flex; align-items: center; gap: 0.4rem; margin: 0.25rem 0; flex-wrap: wrap; }
.sg-win input[type=time] { min-width: 7rem; }
.cycle-list { list-style: none; margin: 0.5rem 0 1rem; padding: 0; max-height: 16rem; overflow: auto; }
.cycle-list li { padding: 0.2rem 0; }

.conn-light {
  display: flex; align-items: flex-start; gap: 0.7rem;
  margin: 0 0 1rem; padding: 0.85rem 1rem;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card);
}
.conn-dot {
  width: 12px; height: 12px; border-radius: 50%; margin-top: 0.35rem;
  flex: 0 0 12px; background: #9aa3ad;
  box-shadow: 0 0 0 4px rgba(154,163,173,0.18);
}
.conn-light strong { display: block; font-size: 1rem; }
.conn-light span { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.15rem; }
.conn-light-connected { border-color: var(--ok-border); background: var(--ok-bg); }
.conn-light-connected .conn-dot { background: #1e8a58; box-shadow: 0 0 0 4px rgba(30,138,88,0.18); }
.conn-light-pending { border-color: var(--warn-border); background: var(--warn-bg); }
.conn-light-pending .conn-dot { background: #c48a12; box-shadow: 0 0 0 4px rgba(196,138,18,0.18); }
.conn-light-disconnected { border-color: var(--danger-border); background: var(--danger-bg); }
.conn-light-disconnected .conn-dot { background: #c4453c; box-shadow: 0 0 0 4px rgba(196,69,60,0.16); }

.agent-list, .order-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.agent-card, .order-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1rem;
}

.conn-status li.is-connected, .conn-status li.is-on { border-color: var(--ok-border); }
.conn-status li.is-pending { border-color: var(--warn-border); background: var(--warn-bg); }
.conn-status li.is-disconnected, .conn-status li.is-off { border-color: var(--danger-border); }


/* High-commission AliExpress browse page + search-bot post style editor */
.hc-connect { max-width: 42rem; }
.hc-chips { margin: 8px 0 16px; }
.hc-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.hc-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; }
.hc-filters input[type="number"] { width: 8.5rem; min-height: 38px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line, var(--line)); }
.hc-filters .hint { flex: 1 1 100%; margin: 0; }
.hc-grid { margin-top: 8px; }
.hc-card .hc-badge {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: var(--brand); color: #f3d48a; font-weight: 700;
  font-size: 0.78rem; padding: 4px 8px; border-radius: 999px;
  box-shadow: 0 0 0 1px #c9a14a;
}
.hc-card .card-img-wrap { position: relative; }
.hc-title { font-size: 0.95rem; line-height: 1.35; margin: 0 0 8px; max-height: 4.05em; overflow: hidden; }
.hc-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 0.86rem; }
.hc-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
#sb-style-panel textarea { width: 100%; min-height: 4.5rem; font-family: inherit; line-height: 1.45; }
#sb-reply-tmpl { min-height: 9rem; }

.empty-state.compact { padding: 20px 12px; box-shadow: none; }
.empty-state.compact .empty-ico { width: 48px; height: 48px; border-radius: 14px; }
.empty-state.compact .empty-ico .ico { width: 24px; height: 24px; }
.auth-card .brand { justify-content: center; margin-inline-end: 0; }
.auth-card .brand-name { color: var(--ink); }

/* Final accent overrides (win over leftover gold/cream) */
.gender-btn.is-active,
.gender-all.is-active {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
  color: var(--accent-text) !important;
}
.cat-chip.is-active, .cat-chip-sched.is-active {
  background: var(--accent) !important;
  color: var(--on-accent) !important;
  border-color: var(--accent) !important;
}
.posted-chips .cat-chip.is-active { background: var(--accent); }

/* —— Schedule folders (exact slots + plan) —— */
.sf-summary-head,
.sf-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.sf-summary-head h2,
.sf-card-top h2,
.sf-name { margin: 0; font-size: 1.05rem; }
.sf-summary-list,
.sf-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.sf-summary-item a,
.sf-card { display: block; text-decoration: none; color: inherit; }
.sf-summary-item {
  border: 1px solid var(--border);
  border-radius: var(--radius, 14px);
  padding: 0.85rem 1rem;
  background: var(--surface, var(--card, #fff));
}
.sf-summary-item.is-off,
.sf-card.is-off { opacity: 0.62; }
.sf-summary-item a { display: flex; flex-direction: column; gap: 0.35rem; }
.sf-slots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0.35rem 0;
}
.sf-slots-label { font-size: 0.8rem; color: var(--muted); margin-inline-end: 0.25rem; }
.sf-slot-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft, color-mix(in srgb, var(--accent) 14%, transparent));
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
}
.badge-folder,
.badge-loop {
  position: static;
  display: inline-flex;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--ink, var(--text));
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
}
.app-dialog.sf-picker { z-index: 80; }
.sched-name { margin: 0.15rem 0 0; font-weight: 600; }
.sched-skip { color: var(--danger, #b42318); }
.sched-item.is-skipped { opacity: 0.78; }
.sched-item.is-skipped .sched-card { background: color-mix(in srgb, var(--muted) 12%, var(--surface, #fff)); }
.sched-item.is-sent .badge-sent { background: var(--ok, #0f8a5f); color: #fff; }

.sf-list { margin-top: 0.5rem; }
.sf-card { padding: 1rem 1.1rem; }
.sf-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.25rem 0 0; }
.sf-enable { flex: 0 0 auto; }
.page-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }

.sf-slots-edit { margin: 1rem 0; }
.sf-slot-list { list-style: none; margin: 0 0 0.6rem; padding: 0; display: grid; gap: 0.4rem; }
.sf-slot-row { display: flex; align-items: center; gap: 0.5rem; }
.sf-slot-row input[type="time"] { max-width: 10rem; }

.sf-items { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.5rem; }
.sf-item {
  display: grid;
  grid-template-columns: auto 52px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface, #fff);
}
.sf-item.is-dragging { opacity: 0.5; }
.sf-grip {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  padding: 0.2rem;
  display: inline-flex;
}
.sf-grip .ico { width: 18px; height: 18px; }
.sf-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--bg-soft, #f3f4f6);
}
.sf-thumb.is-empty { background: var(--bg-soft, #eee); }
.sf-item-body { display: flex; flex-direction: column; min-width: 0; }
.sf-item-name { font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-item-move { display: flex; gap: 0.15rem; }

.sf-picker { width: min(28rem, 100%); }
.sf-picker h2 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.sf-picker-list { list-style: none; margin: 0.5rem 0; padding: 0; max-height: 40vh; overflow: auto; display: grid; gap: 0.4rem; }
.sf-picker-list button {
  width: 100%;
  text-align: start;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: inherit;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}
.sf-picker-list button:hover,
.sf-picker-list button:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.sf-picker-new { display: grid; gap: 0.3rem; margin: 0.75rem 0; }
.sf-picker-new span { font-size: 0.85rem; color: var(--muted); }

/* —— Earnings dashboard —— */
.earn-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}
.earn-ranges a.mode-pill {
  flex: 0 0 auto;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border, var(--line));
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 650;
}
.earn-ranges a.mode-pill.is-active {
  background: var(--brand, #1a2744);
  color: var(--on-brand, #fff);
  border-color: var(--brand, #1a2744);
}
.earn-custom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  margin: 0 0 0.75rem;
}
.earn-custom label { display: grid; gap: 0.2rem; font-size: 0.8rem; color: var(--muted); }
.earn-custom input[type="date"] { min-width: 9.5rem; }
.earn-stats .stat-value small { font-size: 0.55em; font-weight: 600; opacity: 0.75; }
.earn-chart-panel { overflow: hidden; }
.earn-chart { width: 100%; min-height: 180px; }
.earn-chart svg { width: 100%; height: 200px; display: block; }
.earn-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.85rem; margin: 0.6rem 0 0; padding: 0; font-size: 0.8rem; color: var(--muted); }
.swatch { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; margin-inline-end: 0.3rem; vertical-align: -0.05rem; }
.swatch-est { background: var(--brand, #1a2744); }
.swatch-set { background: var(--accent, #0a7d56); }
.earn-products, .earn-tracks, .earn-orders { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.earn-product {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
}
.earn-product:last-child { border-bottom: 0; }
.earn-thumb {
  width: 52px; height: 52px; object-fit: cover; border-radius: 8px;
  background: var(--bg-soft, #f3f4f6);
}
.earn-thumb.is-empty { background: var(--bg-soft, #eee); }
.earn-product strong { display: block; font-size: 0.92rem; line-height: 1.3; }
.earn-amt { font-variant-numeric: tabular-nums; font-weight: 700; }
.earn-tracks li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.6rem;
  align-items: baseline;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.earn-tracks li:last-child { border-bottom: 0; }
.badge-pending_paid, .badge-pending_confirmed { background: var(--gold-deep, #b5811a); color: #fff; }
.badge-settled { background: var(--pine, #0f8a5f); color: #fff; }
.badge-invalid { background: var(--ink-soft, #64748b); color: #fff; }

.stat-delta { display: block; margin-top: 0.25rem; font-size: 0.75rem; font-weight: 700; }
.stat-delta.is-up { color: var(--pine, #0f8a5f); }
.stat-delta.is-down { color: var(--danger, #b42318); }
.stat-delta.is-flat { color: var(--ink-soft, #64748b); }
.stat-value { font-variant-numeric: tabular-nums; }
.earn-periods { margin-bottom: 1rem; }
.earn-periods .stat-card.is-active { outline: 2px solid var(--brand, #1a2744); }

/* High-commission pills + fallback note */
.hc-comm-chips { margin: -4px 0 16px; }
.hc-max { color: var(--pine, #0f8a5f); }
.hc-actions .btn-primary { font-weight: 700; }
.hc-fallback { color: #8a5a12; background: #fff6e5; padding: 8px 12px; border-radius: 10px; }

.ps-toggles { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; border: 0; margin: 0 0 12px; padding: 0; }
.ps-toggles legend { font-weight: 700; padding: 0; margin-inline-end: 8px; }
.ps-radio { display: inline-flex; align-items: center; gap: 6px; }
.ps-preview { display: none; }

/* Post-style profiles + WhatsApp preview bubbles */
.ps-profile {
  margin: 1.4rem 0 0;
  padding: 1rem 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
.ps-profile + .ps-profile { margin-top: 1rem; }
.ps-profile-head { margin: 0 0 0.85rem; }
.ps-profile-head h2 { margin: 0.1rem 0 0.35rem; font-size: 1.2rem; }
.ps-profile-head .eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--accent-text, var(--gold-deep));
  text-transform: none;
}
.ps-wa-wrap { margin-top: 0.85rem; }
.ps-wa-wrap h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.ps-wa {
  --wa-chat: #efeae2;
  --wa-bubble: #ffffff;
  --wa-text: #111b21;
  --wa-link: #027eb5;
  --wa-time: rgba(17, 27, 33, 0.55);
  --wa-price: #0a7d56;
  background:
    radial-gradient(circle at 12% 8%, rgba(0,0,0,0.035), transparent 42%),
    var(--wa-chat);
  border-radius: 16px;
  padding: 14px 12px 16px;
  margin: 0 0 0.75rem;
}
html[data-theme="dark"] .ps-wa {
  --wa-chat: #0b141a;
  --wa-bubble: #005c4b;
  --wa-text: #e9edef;
  --wa-link: #53bdeb;
  --wa-time: rgba(233, 237, 239, 0.65);
  --wa-price: #b6ebc8;
  background:
    radial-gradient(circle at 80% 0%, rgba(255,255,255,0.03), transparent 40%),
    var(--wa-chat);
}
.ps-wa-bubble {
  max-width: 88%;
  margin-inline-start: auto;
  background: var(--wa-bubble);
  color: var(--wa-text);
  border-radius: 10px 10px 2px 10px;
  padding: 6px 8px 4px;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.18);
}
html[data-theme="dark"] .ps-wa-bubble {
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.45);
}
.ps-wa-thumb {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin: 0 0 6px;
  background: rgba(0,0,0,0.08);
}
.ps-wa-price {
  margin: 0 0 4px;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--wa-price);
  line-height: 1.3;
}
.ps-wa-text {
  margin: 0;
  padding: 0;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--wa-text);
}
.ps-wa-text a {
  color: var(--wa-link);
  text-decoration: none;
  word-break: break-all;
  overflow-wrap: anywhere;
}
.ps-wa-time {
  margin: 2px 0 0;
  text-align: start;
  font-size: 0.68rem;
  line-height: 1.2;
  color: var(--wa-time);
}



/* Post-style option grids, templates, and A/B variant bubbles */
.ps-opts { margin: 0 0 1rem; }
.ps-opt-group {
  margin: 0 0 0.9rem;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--line, var(--border, #e6e1d8));
}
.ps-opt-group:first-child { border-top: 0; padding-top: 0; }
.ps-opt-group h3 {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 800;
}
.ps-opt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem 0.9rem;
}
@media (min-width: 640px) {
  .ps-opt-grid { grid-template-columns: 1fr 1fr; }
}
.ps-opt-group label > span,
.ps-opt-grid label > span {
  display: block;
  margin: 0 0 0.28rem;
  font-size: 0.82rem;
  font-weight: 650;
}
.ps-opt-group select,
.ps-opt-group input[type="text"],
.ps-opt-group textarea,
.ps-tmpl-row input,
.ps-tmpl-row select {
  width: 100%;
}
.ps-checks { display: grid; gap: 0.45rem; }
.ps-check,
.form .ps-check,
.form .ps-toggles .ps-radio {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 0.45rem;
  width: auto;
  max-width: 100%;
  font-size: 0.92rem;
  line-height: 1.35;
}
.ps-check input,
.form .ps-check input,
.ps-toggles .ps-radio input,
.form .ps-toggles .ps-radio input {
  width: 1.1rem !important;
  height: 1.1rem !important;
  min-width: 1.1rem;
  max-width: 1.1rem;
  margin: 0;
  flex: 0 0 auto;
  appearance: auto;
  accent-color: var(--accent, #0f8a5f);
}
.ps-toggles {
  background: var(--bg-soft, transparent);
  border-radius: 12px;
  padding: 0.45rem 0.55rem 0.35rem;
  margin-bottom: 0.7rem;
}
.ps-toggles .ps-radio,
.form .ps-toggles .ps-radio {
  background: var(--card, #fff);
  border: 1px solid var(--line, var(--border, #e6e1d8));
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.84rem;
  cursor: pointer;
  white-space: nowrap;
}
.ps-toggles .ps-radio:has(input:checked) {
  border-color: var(--accent, #0f8a5f);
  background: color-mix(in srgb, var(--accent, #0f8a5f) 14%, transparent);
  font-weight: 700;
}
.ps-tmpl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.5rem;
  align-items: center;
}
.ps-tmpl-row select,
.ps-tmpl-row input[type="text"] { flex: 1 1 12rem; min-width: 0; }
.ps-tmpl-row .btn { flex: 0 0 auto; }
.ps-wa-variants .ps-wa { margin-top: 0.55rem; }
.ps-wa-variants .ps-wa-bubble { opacity: 0.98; }
.ps-variant-label {
  margin: 0 0 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted, #667);
}

/* Suppliers */
.sup-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.85rem; }
.sup-card {
  display: grid;
  grid-template-rows: 148px auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--card, #fff);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
[data-theme="dark"] .sup-card { box-shadow: none; }
.sup-cover { width: 100%; height: 148px; object-fit: cover; background: var(--bg-soft, #f3f4f6); display: block; }
.sup-cover.is-empty { display: grid; place-items: center; color: var(--ink-soft); }
.sup-cover.is-empty .ico { width: 2rem; height: 2rem; }
.sup-body { padding: 0.85rem 1rem 1rem; display: grid; gap: 0.28rem; }
.sup-body h2 { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.sup-badge {
  display: inline-flex; align-items: center; width: fit-content;
  font-size: 0.75rem; font-weight: 700; border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.sup-badge.is-on { background: var(--ok-bg, #e8f7ef); color: var(--pine, #0f8a5f); }
.sup-badge.is-off { background: var(--danger-bg, #fde8e8); color: var(--danger, #b42318); }
.sup-badge.is-ae { background: var(--gold-soft, #f6e7c3); color: var(--gold-deep, #8a5a12); }
.sup-rename {
  display: grid; gap: 0.5rem; margin: 0 0 1rem;
  padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: 14px;
  background: var(--card, #fff);
}
.sup-rename button { width: fit-content; }
.sup-page-head .eyebrow a { color: inherit; }
.supplier-chips { margin-top: 0.4rem; }

/* FlyLink + combined earnings */
.earn-connect { margin-bottom: 1rem; }
.earn-periods a.stat-card {
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 0.2rem;
}
.earn-settle-note { margin: -0.25rem 0 1rem; }
.badge-source { background: var(--bg-soft, #eef2f6); color: var(--ink); font-weight: 650; }
.badge-source.badge-flylink { background: #1a2744; color: #fff; }
.badge-source.badge-aliexpress { background: #e11d2e; color: #fff; }
.badge-pending, .badge-confirmed { background: var(--gold-deep, #b5811a); color: #fff; }
.badge-not_eligible { background: var(--ink-soft, #64748b); color: #fff; }
.earn-flylink-wallet { margin-top: 0.85rem; }

/* ── Nav groups, drawer tweaks, desktop sidebar (v40) ─────────── */
.nav-drawer > .nav-link {
  margin-top: 8px;
}
.nav-group {
  padding: 4px 8px 8px;
  border-top: 1px solid var(--line);
}
.nav-group > .nav-section-title {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 2px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  user-select: none;
}
.nav-group > .nav-section-title::-webkit-details-marker { display: none; }
.nav-group > .nav-section-title::marker { content: ""; }
.nav-group > .nav-section-title::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-inline-end: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 160ms ease;
}
.nav-group[open] > .nav-section-title::after {
  transform: rotate(-135deg);
  opacity: 0.7;
}
.nav-group > .nav-section-title:hover,
.nav-group > .nav-section-title:focus-visible {
  background: var(--muted-bg);
  color: var(--ink);
}
.nav-group.has-active > .nav-section-title {
  color: var(--accent-text);
}
.nav-subgroup {
  margin: 4px 6px 2px;
  padding: 0;
  border-radius: 12px;
  background: var(--muted-bg);
}
.nav-sub-title {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--ink-soft);
  user-select: none;
}
.nav-sub-title::-webkit-details-marker { display: none; }
.nav-sub-title::marker { content: ""; }
.nav-sub-title::after {
  content: "";
  width: 6px;
  height: 6px;
  border-inline-end: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.5;
  transition: transform 160ms ease;
}
.nav-subgroup[open] > .nav-sub-title::after {
  transform: rotate(-135deg);
}
.nav-subgroup .nav-link { margin-inline: 2px; }
.tabbar .lock-badge { margin-inline-start: 2px; }
.tabbar .lock-badge .ico { width: 11px; height: 11px; }

@media (min-width: 860px) {
  body.has-tabs .app {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
  }
  body.has-tabs .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  body.has-tabs .nav-toggle { display: none; }
  body.has-tabs .nav-backdrop { display: none !important; }
  body.has-tabs .nav-drawer,
  body.has-tabs .nav-drawer[hidden] {
    display: flex !important;
    position: sticky;
    top: var(--nav-h);
    grid-column: 1;
    grid-row: 2 / -1;
    align-self: start;
    width: auto;
    height: calc(100dvh - var(--nav-h));
    max-height: calc(100dvh - var(--nav-h));
    transform: none;
    box-shadow: none;
    border-inline-end: 1px solid var(--line);
    z-index: 40;
    padding-bottom: 16px;
  }
  body.has-tabs .nav-drawer-head { display: none; }
  body.has-tabs .flash-wrap { grid-column: 2; grid-row: 2; }
  body.has-tabs .main {
    grid-column: 2;
    grid-row: 3;
    min-width: 0;
  }
  body.has-tabs .site-foot {
    grid-column: 2;
    grid-row: 4;
  }
  body.has-tabs.nav-open { overflow: auto; }
}

.nav-backdrop { z-index: 130; }
.nav-drawer { z-index: 140; }
body.nav-open .cookie-notice { z-index: 50; }
.nav-group > .nav-section-title::after,
.nav-sub-title::after {
  border-inline-end: 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-block-start: -3px;
}
.nav-group[open] > .nav-section-title::after,
.nav-subgroup[open] > .nav-sub-title::after {
  transform: rotate(-135deg);
  margin-block-start: 3px;
}

/* Compact onboarding checklist */
.onb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.onb-head h2 { margin: 0 0 8px; }
.onb-count { font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }
.onb-compact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.onb-compact li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.onb-compact li.is-done { padding: 6px 12px; color: var(--ink-soft); border-style: dashed; }
.onb-check { color: var(--ok, #16a34a); font-weight: 800; }
.onb-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.onb-text .hint { margin: 0; font-size: 0.84rem; }
.onb-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.onb-actions form { margin: 0; }
.onb-skip { background: none; border: 0; color: var(--ink-soft); font: inherit; font-size: 0.82rem; text-decoration: underline; cursor: pointer; padding: 10px 4px; min-height: 40px; }
.btn.btn-sm { min-height: 40px; padding: 0 12px; font-size: 0.86rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Hot commissions / top products empty state */
.hc-empty { text-align: start; }
.hc-empty-icon { font-size: 1.8rem; line-height: 1; margin-bottom: 6px; }
.hc-guide { margin: 10px 0 12px; padding-inline-start: 1.3em; display: grid; gap: 6px; }
.hc-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* storefront add-on: nav badge + pricing/billing card */
.nav-new-badge { margin-inline-start: auto; font-size: .66rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.sf-addon-card { border: 1px solid color-mix(in srgb, #b8892b 45%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, #b8892b 9%, var(--card)), var(--card)); }
.sf-addon-head h2 { margin: 6px 0 2px; }
.sf-addon-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, #b8892b 18%, transparent); color: #8a6414; font-size: .74rem; font-weight: 800; }
html[data-theme="dark"] .sf-addon-chip { color: #f3d38a; }
.sf-addon-price { margin: 0 0 8px; color: var(--ink-soft); }
.sf-addon-price strong { font-size: 1.5rem; color: var(--ink); }
.sf-addon-list { margin: 0 0 14px; padding-inline-start: 20px; display: grid; gap: 4px; }
.sf-addon-on { color: var(--ok-text); font-weight: 700; }

/* Post link mode + group signature (settings) */
.post-out-choices { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; }
.post-out-choices legend { font-weight: 800; margin-bottom: 4px; }
.post-out-choice {
  display: grid !important;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--card, #fff);
}
.post-out-choice input { margin-top: 3px; width: 1.15em; height: 1.15em; }
.post-out-choice .hint { display: block; font-weight: 500; margin: 4px 0 0; }
.post-out-choice.is-off { opacity: 0.55; background: var(--muted-bg); }
.post-out-previews { display: grid; gap: 10px; }
.post-out-previews h3 { margin: 0; font-size: 1rem; }
.post-out-preview-grid { display: grid; gap: 12px; }
@media (min-width: 800px) {
  .post-out-preview-grid { grid-template-columns: 1fr 1fr; }
}
.post-out-preview { margin: 0; }
.post-out-preview figcaption { font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.post-out-preview .sb-preview-text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.55;
  max-height: 22rem;
  overflow: auto;
}
