/* MD HQ — Customer care + Products screens. Uses the tokens from style.css. */
.small { font-size: 12px; }
:root { --ch-ig: #8a3ab9; --ch-fb: #0a7cff; }
:root[data-theme="dark"] { --ch-ig: #b46ee6; --ch-fb: #4aa3ff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ch-ig: #b46ee6; --ch-fb: #4aa3ff; } }

/* chips + channel tags */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.chip b { font-weight: 700; margin-left: 2px; }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-instagram.is-on { background: var(--ch-ig); border-color: var(--ch-ig); color: #fff; }
.chip-messenger.is-on { background: var(--ch-fb); border-color: var(--ch-fb); color: #fff; }
.ch { display: inline-block; font-size: 11px; font-weight: 650; padding: 1px 8px; border-radius: 99px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.ch-website { background: var(--ink); color: var(--bg); border-color: transparent; }
.ch-instagram { background: linear-gradient(90deg, #833ab4, #c13584 60%, #e1306c); color: #fff; border-color: transparent; }
.ch-messenger { background: var(--ch-fb); color: #fff; border-color: transparent; }

/* inbox: WhatsApp-style list + chat */
:root { --chat-bg: #f4f4f5; --b-in: #ffffff; --b-ai: #e9e9ee; --b-team: #dcf5d3; --unread: #1f9d55; }
:root[data-theme="dark"] { --chat-bg: #0c0c0e; --b-in: #1c1c20; --b-ai: #26262c; --b-team: #1d3326; --unread: #3ecf7e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --chat-bg: #0c0c0e; --b-in: #1c1c20; --b-ai: #26262c; --b-team: #1d3326; --unread: #3ecf7e; } }

.inbox { display: grid; grid-template-columns: 370px minmax(0, 1fr); height: calc(100dvh - 140px); min-height: 520px;
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.in-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--surface); }
.in-search { position: relative; margin: 14px 14px 10px; }
/* + New WhatsApp chat (2026-11-13) */
.in-new { display: block; width: calc(100% - 28px); margin: 0 14px 10px; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line, rgba(127,127,127,.3)); background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.in-new:hover { background: var(--surface-2); }
.in-search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.in-search input { width: 100%; border-radius: 99px; padding: 10px 14px 10px 40px; background: var(--surface-2); border-color: transparent; }
.in-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; flex: none; }
.in-tabs::-webkit-scrollbar { display: none; }
.tchip { flex: none; display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 6px 13px; font-size: 13px; font-weight: 600;
  background: var(--surface-2); border: 1px solid transparent; color: var(--ink-2); cursor: pointer; }
.tchip b { background: var(--ink-3); color: var(--surface); border-radius: 99px; padding: 0 6px; font-size: 11px; line-height: 17px; }
.tchip.t-waiting b { background: var(--bad); color: #fff; }
.tchip.on { background: var(--ink); color: var(--bg); }
.tchip.on b { background: var(--bg); color: var(--ink); }
.in-paused { margin: 0 14px 10px; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 500; }
.conv-list { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; border-top: 1px solid var(--line); }
.in-none { padding: 40px 20px; text-align: center; color: var(--ink-3); font-size: 13.5px; margin: 0; }

.cv { display: flex; gap: 12px; align-items: center; width: 100%; padding: 0 0 0 14px; background: none; border: 0; text-align: left; color: var(--ink); cursor: pointer; }
.cv:hover { background: var(--surface-2); }
.cv.on { background: var(--accent-soft); }
.cv-main { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.cv-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cv-top b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-top time { font-size: 12px; color: var(--ink-3); flex: none; }
.cv.unread .cv-top time { color: var(--unread); font-weight: 600; }
.cv-bot { display: flex; align-items: center; gap: 8px; }
.cv-text { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv.unread .cv-text { color: var(--ink); font-weight: 500; }
.mark { flex: none; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 2px 8px; line-height: 16px; }
.mark.n { background: var(--unread); color: #fff; min-width: 20px; text-align: center; padding: 2px 6px; }
.mark.warn { background: var(--warn-soft); color: var(--warn); }
.mark.bad { background: var(--bad); color: #fff; }

.av { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px;
  color: #fff; background: #3d3833; letter-spacing: .02em; }
.av-instagram { background: linear-gradient(135deg, #833ab4, #c13584 60%, #e1306c); }
.av-messenger { background: var(--ch-fb); }
.av i { position: absolute; right: -2px; bottom: -2px; font-style: normal; font-size: 11px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface); display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface); }
.av.sm { width: 40px; height: 40px; font-size: 13.5px; }
.av.sm i { width: 17px; height: 17px; font-size: 9.5px; }

.thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--chat-bg); }
.in-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--ink-3); padding: 24px; }
.in-empty b { display: block; color: var(--ink); font: 600 24px/1.2 var(--font-display); margin-bottom: 4px; }
.in-empty p { margin: 0; font-size: 13.5px; }
.in-empty-ic { display: block; width: 84px; height: 84px; margin: 0 auto 12px; color: var(--accent); opacity: .85; }

.ch-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 64px; flex: none; }
.ch-back { display: none; }
.ch-who { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; background: none; border: 0; padding: 0; text-align: left; color: var(--ink); cursor: pointer; }
.ch-who b { font-weight: 600; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-who .vf { color: var(--good); font-size: 13px; }
.ch-who .st { font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-who .st.bad { color: var(--bad); }
.ch-who .st.warn { color: var(--warn); }
.ch-acts { display: flex; align-items: center; gap: 4px; flex: none; }
.menu-wrap { position: relative; }
.ch-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 12; min-width: 230px; display: grid; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.ch-menu[hidden] { display: none; }
.ch-menu button { text-align: left; padding: 11px 12px; border-radius: 9px; background: none; border: 0; color: var(--ink); font-size: 14px; cursor: pointer; }
.ch-menu button:hover { background: var(--surface-2); }
.ch-menu .danger { color: var(--bad); }

.ch-body { flex: 1; display: flex; min-height: 0; }
.ch-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ch-msgs { flex: 1; overflow-y: auto; padding: 14px 7% 12px; display: flex; flex-direction: column; overscroll-behavior: contain; }
.day { align-self: center; margin: 14px 0 6px; padding: 4px 12px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2);
  background: var(--surface); box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.b { max-width: min(78%, 560px); margin-top: 6px; padding: 7px 10px 5px; border-radius: 12px; font-size: 14.5px; line-height: 1.45;
  overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0, 0, 0, .07); color: var(--ink); }
.b.in { align-self: flex-start; background: var(--b-in); border-top-left-radius: 4px; }
.b.out { align-self: flex-end; background: var(--b-ai); border-top-right-radius: 4px; }
.b.human { background: var(--b-team); }
.b-text { white-space: pre-wrap; }
.b-text a { color: var(--accent); }
.b-meta { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 2px; font-size: 11px; color: var(--ink-3); }
.b-meta span { font-weight: 600; }
.b .ph { display: block; max-width: min(260px, 100%); max-height: 320px; border-radius: 8px; margin: 1px 0 4px; background: var(--line); }
.b .voice { display: block; width: 250px; max-width: 100%; margin: 2px 0 4px; }
.b .voice-text { font-style: italic; }
.b-sys { align-self: center; margin: 8px 0 2px; padding: 3px 10px; border-radius: 8px; font-size: 11.5px; color: var(--ink-3);
  background: color-mix(in srgb, var(--surface) 75%, transparent); text-align: center; max-width: 90%; }

.ai-draft { margin: 6px 12px 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1.5px solid var(--warn);
  border-radius: 16px; box-shadow: var(--shadow); }
.sug-h { font-size: 12.5px; font-weight: 700; color: var(--warn); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-h span { font-weight: 500; color: var(--ink-3); }
.sug-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.45; max-height: 32vh; overflow-y: auto; }
.sug-fix textarea { width: 100%; }
.sug-fix p { margin: 6px 0 0; }
.sug-btns { display: flex; gap: 8px; }
.sug-btns[hidden] { display: none; }
.sug-btns .btn { flex: 1; justify-content: center; }
.ch-note { margin: 6px 12px 0; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; font-weight: 500;
  display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ch-note.wa-shut { gap: 6px 10px; }
.ch-note.wa-shut .small { color: var(--ink-2); font-weight: 400; }
.ch-note .link-btn { font-size: 12.5px; }
.ch-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); flex: none; }
.ch-compose textarea { flex: 1; resize: none; border-radius: 22px; padding: 11px 16px; line-height: 1.4; max-height: 140px; min-height: 44px;
  background: var(--surface); border: 1px solid var(--line); }
.send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--unread); color: #fff; display: grid; place-items: center; cursor: pointer; }
.send:disabled { opacity: .5; }

.ch-info { display: none; width: 340px; flex: none; overflow-y: auto; padding: 0 16px 20px; background: var(--surface); border-left: 1px solid var(--line); font-size: 13px; }
.thread.info .ch-info { display: grid; gap: 8px; align-content: start; }
.info-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 14px 0 10px; background: var(--surface); font-size: 15px; }
.ch-info textarea { width: 100%; }

/* message bubbles used by Train → Test chat */
.msg { max-width: 78%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.msg a { overflow-wrap: anywhere; }
.msg .who { display: block; font-size: 11px; font-weight: 600; color: var(--ink-3); margin-bottom: 3px; white-space: normal; }
.msg.customer { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); }
.msg.ai, .msg.human { align-self: flex-end; background: var(--accent-soft); border: 1px solid transparent; }
.msg.human { background: color-mix(in srgb, var(--series-out) 14%, var(--surface)); }
.msg.declined { align-self: flex-end; background: var(--bad-soft); color: var(--ink-3); text-decoration: line-through; opacity: .75; }
.msg.system { align-self: center; background: transparent; color: var(--ink-3); font-size: 12px; text-align: center; max-width: 90%; }
.ph { display: block; max-width: 220px; max-height: 260px; border-radius: 10px; margin: 4px 0; background: var(--line); }
.voice { display: block; width: 240px; max-width: 100%; margin: 4px 0; }
.voice-text { font-style: italic; }
.draft { margin: 0 18px 12px; border: 1.5px dashed var(--warn); background: var(--warn-soft); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.draft-h { font-weight: 650; color: var(--warn); }
.draft-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.draft-act { display: flex; gap: 8px; flex-wrap: wrap; }
.draft textarea { width: 100%; }
.takeover-note { margin: 0 18px 12px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 500; }
.composer { display: flex; gap: 8px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.card-body .composer { padding: 12px 0 0; }
.composer input:not([type=file]) { flex: 1; }
.good-btn { background: var(--good-soft); color: var(--good); border-color: transparent; }
.good-solid { background: var(--good); color: #fff; border-color: var(--good); }
.danger-btn { color: var(--bad); }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pf-box { border: 1px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px; display: grid; gap: 6px; }
.pf-box.warn { border-color: var(--warn); }
.pf-name { font-weight: 650; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf-row { display: flex; justify-content: space-between; gap: 10px; }
.pf-row > span:first-child { color: var(--ink-3); }
.pf-row b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.pf-sec { font-weight: 650; margin-top: 8px; }
.pf-item { display: grid; gap: 1px; }
.pf-item .muted { font-size: 12px; }
.pf-order { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
.profile textarea { width: 100%; }

/* train / settings */
.test-msgs { display: flex; flex-direction: column; gap: 10px; min-height: 260px; max-height: 55vh; overflow-y: auto; padding: 4px 2px 12px; }
.typing { color: var(--ink-3); font-size: 12.5px; font-style: italic; }
.debug { font-size: 12px; color: var(--ink-3); }
.test-pv { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.test-pv img { height: 60px; border-radius: 8px; }
.sel-sm { padding: 6px 8px; font-size: 12.5px; border-radius: 9px; }
.rule { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.rule:first-child { border-top: 0; }
.rule .grow { flex: 1; min-width: 0; display: grid; gap: 3px; overflow-wrap: anywhere; }
.rule.off { opacity: .5; }
.rule-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.rule-sec { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-top: 14px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink); font-weight: 400; }
.switch-row:first-child { border-top: 0; }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; flex: none; border: 0; padding: 0; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .15s; }
.switch:checked { background: var(--good); }
.switch:checked::after { left: 21px; }
.set-form { display: grid; gap: 12px; max-width: 420px; }

/* products */
.q-list { display: grid; }
.q-item { display: flex; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); align-items: flex-start; }
.q-item:first-child { border-top: 0; }
.q-item.working { background: var(--accent-soft); }
.q-item .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.q-item .t { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.q-item .s { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-item .s a, .q-item .t a { color: var(--ink-3); }
.q-pos { width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-2); flex: none; }
.q-side { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; max-width: 45%; }
.q-form { display: grid; gap: 12px; }
.q-form textarea { width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg-radio { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.seg-radio label { display: inline-flex; font-weight: 500; position: relative; }
.seg-radio input { position: absolute; opacity: 0; pointer-events: none; }
.seg-radio span { border: 1px solid var(--line-2); border-radius: 99px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); background: var(--surface); }
.seg-radio input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg-radio input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.verdicts { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; }
.verdicts li { padding: 6px 10px; border-radius: 8px; background: var(--surface-2); overflow-wrap: anywhere; }
.verdicts li.added, .verdicts li.requeued { background: var(--good-soft); color: var(--good); }
.verdicts li.rejected { background: var(--bad-soft); color: var(--bad); }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.hist-list { display: grid; margin-top: 12px; max-height: 65vh; overflow-y: auto; }
.hist-day { font-weight: 650; font-size: 12.5px; padding: 14px 0 6px; color: var(--accent); }
.hist-row { padding: 9px 0; }
.hist-check { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.link-btn { background: none; border: 0; padding: 0 2px; color: var(--accent); font-size: 12px; font-weight: 600; }
.redo-bar { position: sticky; bottom: 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-color: var(--accent); }
.reel-video { width: 100%; max-height: 60vh; border-radius: 12px; background: #000; }
.reel-caption { white-space: pre-wrap; font-size: 13px; background: var(--surface-2); border-radius: 10px; padding: 10px; margin: 0; max-height: 160px; overflow-y: auto; }
.lbl { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.motion-saved { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.motion-chip { cursor: pointer; }
.ref-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 6px; max-height: 420px; overflow-y: auto; }
.ref-prod { position: relative; display: grid; gap: 6px; border: 1.5px solid var(--line); border-radius: 12px; padding: 6px; cursor: pointer; font-weight: 500; }
.ref-prod.on { border-color: var(--accent); background: var(--accent-soft); }
.ref-prod.off { opacity: .45; cursor: not-allowed; }
.ref-prod input { position: absolute; top: 10px; left: 10px; accent-color: var(--accent); }
.ref-prod img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--line); }
.rp-title { font-size: 12px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (max-width: 1180px) {
  .inbox { grid-template-columns: 320px minmax(0, 1fr); }
  .thread.info .ch-info { position: absolute; right: 0; top: 0; bottom: 0; z-index: 8; box-shadow: var(--shadow); }
  .thread { position: relative; }
  .ch-acts .ch-give span { display: none; }
}
@media (max-width: 900px) {
  /* Phone: the list is the page; an open chat covers the whole screen, like WhatsApp. */
  .inbox { display: block; height: auto; min-height: 0; margin: -18px -16px -48px; border: 0; border-radius: 0; box-shadow: none; }
  .in-search { margin: 12px 12px 10px; }
  .in-tabs { padding: 0 12px 10px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } /* phones: one row you swipe */
  .in-side { border-right: 0; min-height: calc(100dvh - 110px); }
  .conv-list { overflow: visible; }
  .inbox .thread { display: none; }
  .inbox.open .thread { display: flex; position: fixed; inset: 0; z-index: 40; height: 100dvh; }
  body.chat-open { overflow: hidden; }
  .ch-back { display: inline-grid; margin-left: -6px; }
  .ch-head { padding: 8px 8px 8px 10px; padding-top: max(8px, env(safe-area-inset-top)); min-height: 60px; }
  .ch-msgs { padding: 10px 10px 8px; }
  .b { max-width: 86%; }
  .thread.info .ch-info { position: fixed; inset: 0; z-index: 45; width: 100%; border-left: 0; padding-top: env(safe-area-inset-top); }
  .msg { max-width: 90%; }
  .q-item { flex-wrap: wrap; padding: 12px 16px; }
  .q-side { max-width: none; width: 100%; justify-content: flex-start; padding-left: 38px; }
  .two { grid-template-columns: 1fr; }
}

/* exchange requests waiting for accept / decline */
.xr-list { display: grid; }
.xr { padding: 16px 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.xr:first-child { border-top: 0; }
.xr-failed { background: var(--bad-soft); }
.xr-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.xr-top b { font-size: 15px; margin-right: 8px; }
.xr-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 18px; font-size: 13.5px; }
.xr-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
.xr-err { font-size: 12.5px; color: var(--bad); }
.xr-btns { display: flex; gap: 8px; }
.xr-btns .btn { min-width: 120px; justify-content: center; }
@media (max-width: 900px) {
  .xr { padding: 14px 16px; }
  .xr-grid { grid-template-columns: 1fr 1fr; }
  .xr-btns .btn { flex: 1; }
}

/* tap a message to show its Delete button */
.b { cursor: pointer; }
.b-del { display: none; margin-top: 6px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface);
  color: var(--bad); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.b.sel { outline: 2px solid var(--accent); outline-offset: 2px; }
.b.sel .b-del { display: inline-block; }

/* ================================================================== Reel Studio */
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.rs-tile { display: grid; gap: 6px; text-align: left; color: inherit; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; cursor: pointer; min-width: 0; }
.rs-cover { aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; }
.rs-cover img, .rs-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rs-tile:hover .rs-cover { border-color: var(--accent); }
.rs-ph { display: grid; place-items: center; font-size: 30px; color: var(--ink-3); width: 100%; height: 100%; }
.rs-ph .i { width: 30px; height: 30px; }
.rs-new .rs-cover { border-style: dashed; }
.rs-tt { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-ts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rs-models { display: flex; gap: 12px; flex-wrap: wrap; }
.rs-model { position: relative; width: 96px; display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; text-align: center; cursor: pointer; }
.rs-model img, .rs-model .rs-ph { width: 96px; height: 128px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.rs-add .rs-ph { border-style: dashed; }
.rs-model .icon-btn { position: absolute; top: 2px; right: 2px; width: 26px; height: 26px; background: var(--surface); }
.rs-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.rs-title { flex: 1; min-width: 0; font-size: 18px; font-weight: 600; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 6px 8px; color: var(--ink); }
.rs-title:hover, .rs-title:focus { border-color: var(--line-2); background: var(--surface); }
.rs-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.rs-sec { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.rs-sec:first-child { border-top: 0; padding-top: 0; }
.rs-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rs-row label.btn { cursor: pointer; }
.rs-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.rs-thumbs:empty { display: none; }
.rs-thumb { position: relative; }
.rs-thumb img { width: 72px; height: 96px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.rs-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; cursor: pointer; }
.rs-ref { display: flex; gap: 10px; align-items: flex-end; }
.rs-ref video { width: 140px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 10px; background: #000; }
#rs-picker { display: grid; gap: 8px; }
#rs-picker input { width: 100%; }
.rs-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 340px; overflow: auto; }
.rs-res { display: grid; gap: 4px; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 4px; font: inherit; font-size: 11.5px; color: inherit; text-align: left; cursor: pointer; }
.rs-res:hover { border-color: var(--accent); }
.rs-res img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 7px; }
.rs-res span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rs-chat { display: grid; gap: 10px; max-height: 420px; overflow: auto; padding: 2px 2px 8px; }
.rs-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; }
.rs-msg.c { background: var(--surface-2); border: 1px solid var(--line); justify-self: start; border-bottom-left-radius: 4px; }
.rs-msg.u { background: var(--accent-soft); justify-self: end; border-bottom-right-radius: 4px; }
.rs-who { font-size: 11px; font-weight: 700; color: var(--ink-3); margin-bottom: 2px; }
.rs-compose { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.rs-compose textarea { flex: 1; min-width: 0; resize: vertical; }
.rs-risks { display: grid; gap: 4px; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
.rs-shots { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.rs-prompt { margin-top: 12px; }
.rs-prompt summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.rs-prompt textarea { width: 100%; margin-top: 8px; font-size: 12.5px; }
.rs-takes { display: grid; gap: 18px; }
.rs-take { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.rs-take:first-child { border-top: 0; padding-top: 0; }
.rs-take-h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rs-take video { width: 100%; max-width: 320px; aspect-ratio: 9 / 16; background: #000; border-radius: 12px; }
.rs-wait { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rs-note { width: 100%; }
@media (max-width: 900px) {
  .rs-cols { grid-template-columns: minmax(0, 1fr); }
  .rs-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .rs-take video { max-width: 100%; }
}
.rs-thumb.on img { outline: 3px solid var(--good); outline-offset: -3px; }
.rs-thumb.on::after { content: "✓"; position: absolute; left: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--good); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.rs-outfit { display: grid; gap: 8px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px dashed var(--line); }
.rs-outfit:last-of-type { border-bottom: 0; }
.rs-picker { display: grid; gap: 8px; }
.rs-picker input { width: 100%; }
.rs-grm { margin-left: 6px; color: var(--bad); }
/* The AI draft never gets squeezed away: the messages scroll instead. */
#ch-draft, #ch-state { flex: none; }
.ch-msgs { min-height: 90px; }
.ai-draft > * { flex: none; }
.sug-text { min-height: 1.45em; max-height: 38vh; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.sug-why { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.sug-fix textarea { display: block; min-height: 7.5em; max-height: 45vh; resize: vertical; font-size: 14.5px; line-height: 1.45; color: var(--ink); }

/* ================================================================== Stock / Best sellers */
.st-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 14px 20px 6px; }
.st-tools input { flex: 1; min-width: 180px; }
.st-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-name span { min-width: 0; }
.st-img { width: 40px; height: 52px; border-radius: 6px; object-fit: cover; background: var(--surface-2); flex: none; display: inline-block; }
.st-row { cursor: pointer; }
.st-row:hover td { background: var(--surface-2); }
.st-sub td { background: var(--surface-2); padding-top: 4px; }
.st-sub .pill { margin: 2px 4px 2px 0; }
.bs-rank { font-weight: 700; color: var(--ink-3); width: 32px; }

/* WhatsApp: the customer's number next to their name in the chat header. */
.ch-phone { font-weight: 500; color: var(--ink-2); font-size: .9em; margin-left: 6px; user-select: all; }

/* ---- Products → Competitor Radar ---- */
.cr-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cr-add input { flex: 1 1 180px; }
.cr-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; min-width: 0; }
.cr-comp { min-width: 0; overflow: hidden; }
.cr-body, .cr-sec { min-width: 0; }
.cr-head { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 16px 20px; text-align: left; color: inherit; cursor: pointer; }
.cr-head:hover { background: var(--surface-2); border-radius: var(--radius); }
.cr-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.cr-title b { font-size: 15px; }
.cr-title a { color: var(--accent); }
.cr-status { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.cr-status .pill { white-space: normal; }
.cr-chev { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.cr-comp.open .cr-chev { transform: rotate(180deg); }
.cr-body:empty { display: none; }
.cr-body { border-top: 1px solid var(--line); }
.cr-sec { padding: 8px 0 4px; border-bottom: 1px solid var(--line); }
.cr-sec h3 { margin: 10px 20px 4px; font-size: 14px; }
.cr-pad { margin: 8px 20px 12px; }
.cr-up { color: var(--good); font-weight: 700; }
.cr-down { color: var(--bad); font-weight: 700; }
.cr-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; padding: 8px 20px; }
.cr-post { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: var(--surface-2); color: #fff; }
.cr-post img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cr-noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--ink-3); font-size: 12px; }
.cr-rank, .cr-vid, .cr-date { position: absolute; top: 6px; background: rgba(0,0,0,.6); border-radius: 99px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; }
.cr-rank { left: 6px; }
.cr-vid { right: 6px; }
.cr-date { top: auto; bottom: 30px; left: 6px; font-weight: 500; }
.cr-stats { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; background: linear-gradient(transparent, rgba(0,0,0,.75)); font-size: 12px; font-weight: 600; }
.cr-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; }
@media (max-width: 640px) { .cr-head { padding: 14px 16px; } .cr-posts { grid-template-columns: repeat(2, 1fr); padding: 8px 16px; } .cr-sec h3, .cr-pad { margin-left: 16px; margin-right: 16px; } }

/* ---- Products → Instagram Stories ---- */
.sto-pad { margin: 10px 20px 16px; }
.sto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 10px 20px 12px; }
.sto-item { position: relative; display: flex; flex-direction: column; gap: 6px; background: none; border: 2px solid transparent; border-radius: 12px; padding: 4px; text-align: left; color: inherit; cursor: pointer; min-width: 0; }
.sto-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--surface-2); display: block; }
.sto-item:hover { background: var(--surface-2); }
.sto-item.on { border-color: var(--accent); background: var(--accent-soft); }
.sto-num { position: absolute; top: 10px; left: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.sto-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sto-last { font-size: 11px; color: var(--ink-3); }
.sto-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.sto-tray { display: flex; gap: 14px; overflow-x: auto; padding: 16px 20px 20px; }
.sto-prev { flex: none; width: 160px; display: flex; flex-direction: column; gap: 6px; }
.sto-canvas { width: 160px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; text-align: center; padding: 0; }
.sto-c { width: 100%; height: 100%; display: block; }
.sto-cap { font-size: 12px; line-height: 1.3; }
.sto-res { font-size: 12px; font-weight: 600; }
.sto-res.good { color: var(--good); }
.sto-res.bad { color: var(--bad); }
.sto-pend { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 14px; border-left: 4px solid var(--warn); }
.sto-pend .note { margin-top: 4px; }
.sto-pend-btns { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 640px) { .sto-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px 16px 16px; } .sto-tray, .sto-bar { padding-left: 16px; padding-right: 16px; } .sto-prev, .sto-canvas { width: 130px; } }

/* ---- Finance: the month's profit as a statement ---- */
.pl { display: flex; flex-direction: column; }
.pl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.pl-row:first-child { border-top: 0; }
.pl-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pl-row small { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.pl-row b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-top b { font-size: 16px; }
.pl-sum { border-top: 2px solid var(--line-2); font-weight: 600; }
.pl-total { border-top: 2px solid var(--ink-3); font-weight: 700; font-size: 16px; padding-top: 12px; }
.pl-total b { font-size: 20px; }
.pl-cash { margin-top: 10px; border-top: 1px dashed var(--line-2); }
.b .vid { width: min(240px, 100%); aspect-ratio: 9 / 16; max-height: 380px; background: #000; object-fit: contain; }
.sto-sticky { position: sticky; top: var(--sto-top, 0px); z-index: 4; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.sto-sticky #sto-next, .sto-sticky #sto-post { margin-left: auto; }
.sto-sticky .btn[disabled] { opacity: .45; }
.sto-more { text-align: center; color: var(--ink-3); font-size: 12.5px; padding: 6px 20px 20px; }

/* ---- Orders → Restock ---- */
.rs-pad { margin: 10px 20px 16px; }
.rs-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); }
.rs-order { border-top: 1px solid var(--line); padding: 12px 20px; }
.rs-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin-bottom: 6px; }
.rs-head a { color: inherit; }
.rs-line { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.rs-line img, .rs-noimg { width: 44px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--surface-2); flex: none; }
.rs-line.done { opacity: .75; }
.rs-what { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rs-what b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-what span { font-size: 12px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rs-done { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; font-weight: 600; color: var(--good); text-align: right; }
.rs-done span { color: var(--ink-3); font-weight: 400; }
.rs-done a { color: var(--accent); font-weight: 600; }
.btn.arm { background: var(--warn); border-color: var(--warn); color: #fff; }
@media (max-width: 640px) { .rs-order { padding: 12px 16px; } .rs-pad { margin-left: 16px; margin-right: 16px; } }
.st-tools .rs-toggle input[type="checkbox"] { flex: none; min-width: 0; width: 16px; height: 16px; padding: 0; margin: 0; }
.rs-line { cursor: default; }
.rs-line.on { background: var(--accent-soft); border-radius: 8px; }
.rs-pick { flex: none; width: 18px; height: 18px; min-width: 0; padding: 0; margin: 0; cursor: pointer; accent-color: var(--accent); }
.rs-pick-sp { flex: none; width: 18px; }
#rs-bar #rs-bulk { margin-left: auto; }
.rs-all { display: flex; align-items: center; gap: 10px; padding: 10px 20px; border-top: 1px solid var(--line); cursor: pointer; }
.rs-head .rs-pick { margin-right: 2px; }
@media (max-width: 640px) { .rs-all { padding: 10px 16px; } }

/* ---------------------------------------------------------------- Home cards: numbers + one status line */
.hs-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 12px; }
.hs-stat .kpi-value { line-height: 1.1; }
.hs-stat .muted { font-size: 12.5px; margin-top: 2px; }
.hs-foot { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- AI credit: spend by tool */
.ai-units { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.ai-units > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.ai-units span { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.ai-units b { display: block; font: 600 22px/1.2 var(--font-display); margin-top: 4px; }
.ai-units em { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.ai-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.ai-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: var(--surface-2); min-width: 80px; }
.ai-bar i { display: block; height: 100%; }
@media (max-width: 760px) { .ai-units { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- Orders → Cancel & refund */
.cr-find { display: flex; gap: 8px; }
.cr-find input { flex: 1; min-width: 0; }
.cr-row { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; color: inherit; cursor: pointer; font: inherit; }
.cr-row:hover, .cr-row.on { background: var(--surface-2); }
.cr-pills { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.cr-top { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cr-top .btn { margin-left: auto; }
.cr-sums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.cr-sums > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; min-width: 0; }
.cr-sums span { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.cr-sums b { font-size: 16px; font-variant-numeric: tabular-nums; }
.cr-lines { display: grid; gap: 2px; }
.cr-done { color: var(--bad); font-weight: 600; margin: 10px 0 0; }
.cr-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.cr-form { display: grid; gap: 12px; margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.cr-form label { display: grid; gap: 6px; }
.cr-form label.cr-chk, .cr-chk { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13px; }
.cr-chk input { width: 16px; height: 16px; padding: 0; }
.cr-rlines { display: grid; gap: 6px; }
.cr-rline { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.cr-rline .rs-what { flex: 1; min-width: 0; }
.cr-rline select { width: 64px; }
.cr-warn { margin: 0; font-size: 13px; color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 8px 12px; }
.cr-sum { font-size: 14px; padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px dashed var(--line-2); }
@media (max-width: 640px) {
  .cr-sums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cr-row { flex-wrap: wrap; }
  .cr-pills { justify-content: flex-start; }
  .cr-rline { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------- MD Radar → Opportunities */
.op-tabs { margin: -4px 0 16px; }
.op-tabs .badge { margin-left: 6px; }
.op-hero { padding: 22px 24px; margin-bottom: 14px; background: linear-gradient(135deg, var(--accent-soft), var(--surface) 60%); }
.op-hero-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.op-hero-top > div:first-child { flex: 1 1 320px; min-width: 0; }
.op-hero h2 { margin: 0; font: 600 28px/1.15 var(--font-display); }
.op-hero p { margin: 6px 0 0; color: var(--ink-2); font-size: 13.5px; max-width: 70ch; }
.op-hero-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.op-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.op-kpis > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.op-kpis span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.op-kpis b { display: block; font: 600 24px/1.2 var(--font-display); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-kpis em { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 14px; padding-bottom: 2px; }
.op-wait { display: flex; align-items: center; gap: 10px; padding: 14px 18px; margin-bottom: 14px; color: var(--ink-2); font-size: 13.5px; }
.op-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: op-spin .8s linear infinite; flex: none; display: inline-block; vertical-align: -2px; }
@keyframes op-spin { to { transform: rotate(360deg); } }
.op-card { margin-bottom: 14px; overflow: hidden; border-left: 4px solid var(--line-2); min-width: 0; }
.op-card.pri-high { border-left-color: var(--bad); }
.op-card.pri-medium { border-left-color: var(--warn); }
.op-card.is-new { box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.op-head { display: flex; align-items: flex-start; gap: 14px; width: 100%; background: none; border: 0; padding: 16px 18px; text-align: left; color: inherit; cursor: pointer; }
.op-head:hover { background: var(--surface-2); }
.op-head[aria-expanded="true"] .cr-chev { transform: rotate(180deg); }
.op-when-box { flex: none; width: 52px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; padding: 6px 0 5px; }
.op-when-box b { display: block; font: 600 22px/1 var(--font-display); }
.op-when-box span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.op-when-box.sm { width: 44px; padding: 4px 0; }
.op-when-box.sm b { font-size: 18px; }
.op-title { flex: 1; min-width: 0; }
.op-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.op-occ { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.op-cc { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 1px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); margin-right: 3px; }
.op-cc.all { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.op-title h3 { margin: 6px 0 4px; font-size: 17px; line-height: 1.3; }
.op-sub { font-size: 12.5px; color: var(--ink-3); }
.op-sub b { color: var(--ink-2); }
.op-sub b.op-late, b.op-late { color: var(--bad); }
.op-body { padding: 4px 22px 20px 84px; border-top: 1px solid var(--line); }
.op-body h4 { margin: 18px 0 8px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.op-body p { margin: 0; line-height: 1.55; font-size: 14px; }
.op-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.op-body p.op-changed { margin-top: 14px; font-size: 12.5px; color: var(--ink-2); background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; }
.op-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.op-steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.op-steps li.done > div { text-decoration: line-through; color: var(--ink-3); }
.op-steps input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--good); padding: 0; }
.op-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 12px; font-weight: 700; margin-top: 1px; }
.op-when { display: inline-block; margin-top: 4px; font-size: 11.5px; font-weight: 600; color: var(--accent); }
.op-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.op-prod { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); padding-bottom: 8px; min-width: 0; }
.op-prod:hover { border-color: var(--accent); }
.op-prod img, .op-noimg { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface-2); display: block; }
.op-prod b, .op-prod span, .op-prod em { padding: 0 9px; }
.op-prod b { font-size: 12.5px; line-height: 1.3; margin-top: 4px; }
.op-prod span { font-size: 11.5px; color: var(--good); font-weight: 600; }
.op-prod span.pre { color: var(--ink-3); }
.op-prod em { font-style: normal; font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.op-ben { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; line-height: 1.5; }
.op-more { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--surface-2); }
.op-more summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.op-more .note { margin-top: 8px; }
.op-facts { display: grid; gap: 6px; margin-top: 10px; }
.op-facts > div { display: flex; gap: 12px; justify-content: space-between; font-size: 13px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; flex-wrap: wrap; }
.op-facts span { color: var(--ink-3); }
.op-facts b { font-weight: 600; text-align: right; }
.op-research { font-size: 13px; line-height: 1.55; margin-top: 10px; color: var(--ink-2); }
.op-result { margin-top: 16px; padding: 10px 14px; border-radius: 10px; background: var(--good-soft); font-size: 13.5px; }
.op-decide { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.op-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.op-btns .btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.op-decide .note { margin-top: 8px; }
.op-form { display: grid; gap: 10px; }
.op-form textarea { width: 100%; resize: vertical; font: inherit; }
.op-decided { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; font-size: 13.5px; }
.op-decided.good { color: var(--good); }
.op-decided.bad { color: var(--bad); }
.op-decided .btn { margin-left: auto; }
.op-bar { flex: 1 1 140px; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.op-bar i { display: block; height: 100%; background: var(--good); }
.op-month h4 { margin: 18px 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.op-month:first-child h4 { margin-top: 0; }
.op-cal { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.op-cal-main { flex: 1; min-width: 0; font-size: 13.5px; }
.op-cal-main .op-sub { margin-top: 3px; }
.op-cal.pri-low { opacity: .72; }
.op-foot { margin: 6px 2px 20px; }
@media (max-width: 760px) {
  .op-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-body { padding: 4px 16px 18px; }
  .op-cols { grid-template-columns: 1fr; gap: 6px; }
  .op-head { padding: 14px; gap: 10px; }
  .op-when-box { width: 44px; }
  .op-hero { padding: 18px 16px; }
  .op-cal { flex-wrap: wrap; }
  .op-cal .btn { margin-left: 56px; }
}
/* Restock pop-up: orders still waiting for the same piece */
.rs-popcard { max-width: 540px; }
.rs-popline { padding: 0; }
.rs-mlist { display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.rs-m { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.rs-m.on { background: var(--accent-soft); border-color: var(--accent); }
.rs-m a { color: var(--accent); font-weight: 600; flex: none; }
.rs-m input:disabled + .rs-what { opacity: .5; }
#rs-pfoot { flex-wrap: wrap; }
/* Cancel & refund: cancel requests from chats */
.cr-rq { gap: 10px; }
.cr-rq .link-btn { margin-left: 6px; }
.cr-rq-done { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; font-weight: 600; color: var(--good); text-align: right; max-width: 45%; }
.cr-rq-done span { color: var(--ink-3); font-weight: 400; }
.cr-rq-old { padding: 8px 20px 14px; }
.cr-rq-old summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 4px 0; }

/* ---- Insights: Profit by product · Return insights · Promotion planner ---- */
.pf-top { padding: 0 0 14px; }
.pf-cols { margin-top: 0; }
.pf-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.pf-pos { color: var(--good); }
.pf-neg { color: var(--bad); }
tr.pf-loss td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.pf-m { display: inline-block; min-width: 42px; text-align: center; font-weight: 700; font-size: 12px; border-radius: 99px; padding: 2px 8px; }
.pf-m.good { background: var(--good-soft); color: var(--good); }
.pf-m.warn { background: var(--warn-soft); color: var(--warn); }
.pf-m.bad { background: var(--bad-soft); color: var(--bad); }
.pf-detail { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
.pf-more { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 14px 20px 4px; }
.pf-how { margin: 12px 20px 16px; line-height: 1.55; }
.pf-notes { display: grid; gap: 6px; margin: 0 0 16px; }
.pf-notes p { margin: 0; background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 9px 13px; font-size: 13px; font-weight: 600; }
.pf-flow { display: grid; gap: 9px; }
.pf-flow-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "bar bar"; gap: 5px 12px; align-items: end; font-size: 13.5px; }
.pf-flow-row > span { grid-area: label; } .pf-flow-row > .pf-bar { grid-area: bar; height: 6px; } .pf-flow-row > b { grid-area: value; }
.pf-flow-row > span { display: flex; flex-direction: column; line-height: 1.3; }
.pf-flow-row em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.pf-flow-row > b { text-align: right; font-variant-numeric: tabular-nums; }
.pf-flow-row.sum { border-top: 1px solid var(--line); padding-top: 9px; font-weight: 700; }
.pf-flow-row.total > b { font-size: 16px; }
.pf-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.pf-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--ink-3); }
.pf-flow-row.in .pf-bar > i { background: var(--series-in); }
.pf-flow-row.out .pf-bar > i { background: var(--series-out); }
.pf-flow-row.sum .pf-bar > i { background: var(--good); }
.pf-glance { display: grid; gap: 14px; }
.pf-glance > div { display: grid; gap: 2px; }
.pf-glance span { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.pf-glance b { font-size: 15px; }
.pf-glance em { font-style: normal; font-size: 12.5px; color: var(--ink-3); }

.ri-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 14px 20px 18px; }
.ri-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; align-content: start; background: var(--surface); }
.ri-head { display: flex; gap: 12px; align-items: flex-start; }
.ri-head .st-img { width: 52px; height: 66px; flex: none; }
.ri-head > div { min-width: 0; display: grid; gap: 4px; }
.ri-head b a { color: inherit; }
.ri-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.ri-pill { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 2px 8px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.ri-pill.r-small, .pf-bar.r-small > i { background: #f3dfd6; color: #a3442b; }
.ri-pill.r-large, .pf-bar.r-large > i { background: #dde7f3; color: #2f5f93; }
.ri-pill.r-damaged, .pf-bar.r-damaged > i { background: #f6e3c4; color: #8a5a10; }
.ri-pill.r-mind, .pf-bar.r-mind > i { background: #e6e0f3; color: #5b4693; }
.pf-bar.r-small > i { background: #d4785e; } .pf-bar.r-large > i { background: #5b8cc4; } .pf-bar.r-damaged > i { background: #d69a3a; }
.pf-bar.r-mind > i { background: #8f78c4; } .pf-bar.r-other > i { background: var(--ink-3); }
.ri-tip { display: grid; gap: 3px; border-radius: 10px; padding: 9px 12px; font-size: 13px; background: var(--surface-2); }
.ri-tip span { color: var(--ink-2); }
.ri-tip.bad { background: var(--bad-soft); } .ri-tip.bad b { color: var(--bad); }
.ri-tip.warn { background: var(--warn-soft); } .ri-tip.warn b { color: var(--warn); }
.ri-notes { font-size: 12.5px; color: var(--ink-2); border-left: 3px solid var(--line-2); padding-left: 10px; }
.ri-notes span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.ri-reasons { display: grid; gap: 10px; }
.ri-reason { display: grid; grid-template-columns: 130px minmax(0, 1fr) 34px 42px; gap: 10px; align-items: center; font-size: 13.5px; }
.ri-reason b { text-align: right; } .ri-reason em { font-style: normal; color: var(--ink-3); font-size: 12px; text-align: right; }
.ri-how { margin: 0; padding-left: 18px; display: grid; gap: 7px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }

.pp-offer { display: flex; align-items: baseline; gap: 10px; }
.pp-offer b { font-size: 22px; font-family: var(--font-display); }
.pp-offer s { color: var(--ink-3); }
.pp-facts { display: grid; gap: 3px; font-size: 12.5px; color: var(--ink-2); }
.pp-acts { display: flex; gap: 8px; align-items: center; }
.pp-note { display: flex; gap: 8px; align-items: center; }
.pp-note input { flex: 1; min-width: 0; }
.pp-steps { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); }
.pp-wait { margin: 0; }
.pp-card.done, .pp-card.rejected { opacity: .7; }
.pp-card.approved { border-color: var(--good); }
@media (max-width: 640px) {
  .ri-grid { grid-template-columns: minmax(0, 1fr); padding: 12px 16px 16px; }
  .ri-reason { grid-template-columns: 110px minmax(0, 1fr) 30px; }
  .ri-reason em { display: none; }
  .pf-how { margin-left: 16px; margin-right: 16px; }
}
/* Stories: Instagram sale price (never "promo-" class names) */
.sto-sale { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 6px; }
.sto-shows { display: flex; flex-wrap: wrap; gap: 0 14px; }
.sto-showp { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--ink-2); font-weight: 600; cursor: pointer; }
.sto-sale span { color: var(--ink-3); }
.sto-sale input { width: 76px; min-width: 0; padding: 4px 8px; font-size: 13px; }
.sto-sale-on { font-size: 12px; color: var(--accent); margin-top: 6px; }

/* Customers (care/customers) + inbox history panel */
.cu-filters { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 6px; }
.card-body .cu-filters { padding: 0 0 8px; }
.cu-count { padding: 4px 20px 10px; }
.cu-chans { display: flex; gap: 4px; flex-wrap: wrap; }
.cu-chans .ch { font-size: 11px; }
.cu-more { padding: 12px 20px 18px; text-align: center; }
.cu-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cu-name { margin: 0; font-size: 22px; }
.cu-actions { margin-left: auto; display: flex; gap: 8px; }
.cu-grid { margin-top: 20px; align-items: start; }
.cu-col { display: grid; gap: 20px; min-width: 0; }
.cu-order { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; margin-bottom: 10px; }
.cu-order.pending { border-color: var(--warn); }
.cu-order.cancelled { opacity: .65; }
.cu-order-top { display: flex; gap: 10px; align-items: baseline; }
.cu-r { margin-left: auto; }
.cu-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.cu-items { display: grid; gap: 6px; }
.cu-item { display: flex; gap: 10px; align-items: center; min-width: 0; }
.cu-item img, .cu-noimg { width: 34px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--surface-2); flex: none; }
.cu-item span { min-width: 0; display: grid; }
.cu-item em { font-style: normal; }
.cu-chat { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
.cu-chat:last-child { border-bottom: 0; }
.cu-chat:hover .cu-chat-txt { text-decoration: underline; }
.cu-chat-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-line { padding: 7px 0; border-bottom: 1px solid var(--line); }
.cu-line:last-child { border-bottom: 0; }
#cu-note { width: 100%; margin-bottom: 8px; }
.cu-mini { margin-top: 8px; }
.cu-mini .cu-order { padding: 8px 10px; margin-bottom: 8px; }
.cu-panel-foot { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.cu-link input { width: 100%; margin-top: 6px; }
.cu-pick { display: grid; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; margin-top: 6px; }
.cu-pick:hover { border-color: var(--ink-3); }

/* Send offers (care/offers) — "of-", never "promo-"/"ad-" (ad blockers hide those) */
.of-grid { align-items: start; }
.of-grid > div { display: grid; gap: 20px; min-width: 0; }
.of-sec { font-weight: 650; margin: 12px 0 8px; }
.of-sec:first-child { margin-top: 0; }
.of-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin: 6px 0 10px; }
.of-row label { display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-2); }
.of-grow { flex: 1; min-width: 200px; }
.of-photo { cursor: pointer; }
.of-preview { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.of-preview p { margin: 4px 0 0; }
.of-count { font-size: 15px; }
.of-count b { font-size: 20px; }
.of-tpl { border: 1px dashed var(--warn); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 6px; justify-items: start; }
#of-title, #of-body { width: 100%; margin-bottom: 8px; }
#of-send { margin-top: 10px; }
.of-phone { display: grid; gap: 8px; }
.of-bubble { background: #dcf8c6; color: #111; border-radius: 12px 12px 12px 4px; padding: 6px; max-width: 340px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.of-bubble img { width: 100%; border-radius: 8px; display: block; max-height: 260px; object-fit: cover; }
.of-bubble p { margin: 6px 6px 4px; font-size: 13.5px; line-height: 1.4; overflow-wrap: anywhere; }
.of-url { color: #1a73e8; }
.of-btns { display: grid; gap: 1px; border-top: 1px solid rgba(0,0,0,.08); margin-top: 6px; }
.of-btns span { text-align: center; color: #0a7cff; font-size: 13px; font-weight: 600; padding: 7px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.of-btns span:last-child { border-bottom: 0; }
.of-camp { border-bottom: 1px solid var(--line); padding: 12px 0; display: grid; gap: 6px; }
.of-camp:first-child { padding-top: 0; }
.of-camp:last-child { border-bottom: 0; }
.of-camp-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.of-camp-act { margin-left: auto; display: flex; gap: 6px; }
.of-body { overflow-wrap: anywhere; }
.of-stats { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.of-why { color: var(--warn); margin: 0; }
@media (max-width: 760px) {
  .cu-actions { margin-left: 0; }
  .of-camp-act { margin-left: 0; }
  .cu-chat { flex-wrap: wrap; }
}

/* Inbox: bulk select (close / reopen / delete many chats) */
.in-bulk { padding: 0 14px 6px; }
.in-bulk-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.in-bulk-bar .btn[disabled] { opacity: .45; }
.in-bulk-bar .bulk-del:not([disabled]) { border-color: var(--bad); color: var(--bad); }
.cv-check { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--line-2); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; align-self: center; }
.cv.picked { background: var(--accent-soft); }
.cv.picked .cv-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* Cancel requests: Accept / Decline (cancellation form, 2026-10-17) */
.cr-rq { align-items: flex-start; }
.cr-rq-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.cr-rq-lines { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cr-rq-lines span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px 3px 3px; }
.cr-rq-lines img { width: 24px; height: 30px; object-fit: cover; border-radius: 4px; }
.cr-dec { margin-top: 10px; display: grid; gap: 8px; }
.cr-dec-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-dec-row { display: flex; gap: 8px; }
.cr-dec-row input { flex: 1; min-width: 0; }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
@media (max-width: 640px) { .cr-rq { flex-wrap: wrap; } .cr-rq-btns { justify-content: flex-start; } .cr-dec-row { flex-direction: column; } }

/* Orders → Order problems (2026-10-17) */
.op-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 20px; }
.op-tile { display: grid; justify-items: start; gap: 2px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; color: var(--ink); }
.op-tile span { font-size: 18px; }
.op-tile b { font-size: 24px; font-weight: 700; line-height: 1.1; }
.op-tile em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.op-tile.red b { color: var(--bad); }
.op-tile.yellow b { color: var(--warn); }
.op-tile.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.op-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); border-left: 3px solid var(--warn); padding-left: 12px; }
.op-row.red { border-left-color: var(--bad); }
.op-row:last-child { border-bottom: 0; }
.op-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.op-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.op-kind { font-weight: 650; font-size: 13px; }
.op-detail { font-size: 13.5px; overflow-wrap: anywhere; }
.op-done { color: var(--good); }
.op-sent { color: var(--muted); margin-top: 4px; }
.op-check { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent, currentColor); }
#op-bulk { margin: 6px 0 4px; }
.op-acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.op-note { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.op-note input { flex: 1; min-width: 200px; }
.op-discord { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.op-discord input { flex: 1; min-width: 220px; }
@media (max-width: 640px) { .op-row { flex-direction: column; } .op-acts { flex-direction: row; align-items: center; } }
.op-msg { display: grid; gap: 6px; margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.op-msg textarea { width: 100%; }
/* Inbox: the order + date line in the Cancelled / Late pre-order tabs (care.js markLine) */
.cv-mark { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin: 1px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-mark.no { color: var(--bad); }
/* Stories: colours together (owner 2026-10-31) */
.sto-lay { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-weight: 600; color: var(--ink-2); }
.sto-lay label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.sto-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sto-chips .tchip { font-size: 11px; padding: 2px 8px; }
[data-gadd] { display: block; margin-top: 6px; text-align: left; }
.rs-via { display: flex; flex-wrap: wrap; gap: 4px 12px; width: 100%; font-weight: 600; color: var(--ink-2); }
.rs-via label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
/* Stories: photo grid (owner 2026-11-02) */
.sto-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
.sto-slot { padding: 0; border: 1px solid var(--line, #3334); border-radius: 4px; background: none; cursor: pointer; line-height: 0; }
.sto-slot img { width: 34px; height: 60px; object-fit: cover; border-radius: 3px; }
.sto-layall { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 14px 0; }
/* Inbox: team photos & voice notes (owner 2026-11-02) */
.ch-tool { flex: none; width: 40px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink-2); cursor: pointer; border-radius: 50%; }
.ch-tool:hover { color: var(--ink); }
.ch-tool.on { color: var(--bad, #d33); }
#ch-attach:empty { display: none; }
.ch-att { display: flex; align-items: center; gap: 10px; padding: 8px 14px 0; }
.ch-att img { height: 72px; border-radius: 8px; }
.ch-att audio { height: 36px; max-width: 240px; }
.ch-att.rec .pulse { color: var(--bad, #d33); font-weight: 600; }

/* Content Machine (machine.js) */
.cm-piece { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cm-piece:last-child { border-bottom: 0; }
.cm-piece img { width: 48px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--surface-2); flex: none; }
.cm-pi { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cm-model { background: none; border: 2px solid transparent; border-radius: 12px; padding: 2px; color: inherit; font: inherit; opacity: .55; }
.cm-model.on { border-color: var(--accent); opacity: 1; }
.cm-make { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cm-make select { margin-left: 6px; }
.cm-run { padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.cm-run:last-child { border-bottom: 0; margin-bottom: 0; }
.cm-runh { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.cm-prow { margin: 10px 0; }
.cm-ptitle { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.cm-vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.cm-vid, .cm-move { display: grid; gap: 5px; align-content: start; min-width: 0; }
.cm-vid .rs-ts, .cm-move .rs-ts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cm-acts { display: flex; gap: 4px; flex-wrap: wrap; }
.cm-err { color: var(--bad); margin: 0; overflow-wrap: anywhere; }
.cm-accts { display: grid; margin-top: 10px; }
.cm-acct { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cm-acct:last-child { border-bottom: 0; }
.cm-filter { margin: 0 0 12px; align-items: center; }
.cm-addsrc { padding: 0; gap: 6px; }
.cm-addsrc input { flex: 1; min-width: 200px; }
.cm-lib { margin-top: 6px; }
@media (max-width: 640px) {
  .cm-vids { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
.cm-how { margin-top: 6px; align-items: center; }
.cm-picker { margin: 4px 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.cm-pickable .rs-cover { position: relative; padding: 0; cursor: pointer; border-width: 2px; }
.cm-pickable.on .rs-cover { border-color: var(--accent); }
.cm-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.cm-tab { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface-2); color: inherit; font: inherit; cursor: pointer; }
.cm-tab span { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.cm-tab.on { border-color: var(--accent); background: var(--accent-soft); }
.cm-strip { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.cm-strip img { width: 34px; height: 46px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); }
.cm-strip .muted { margin-right: 4px; }
.cm-pi select { font: inherit; font-size: 12.5px; padding: 3px 6px; border-radius: 8px; }
.cm-lookclips { padding-top: 6px; }
.cm-cover { position: relative; }
.cm-ref { position: absolute; top: 6px; right: 6px; width: 30%; aspect-ratio: 9 / 16; border-radius: 7px; overflow: hidden; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); z-index: 1; }
.cm-ref img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content Machine -> Make photos (machine.js, owner 2026-11-05) */
.cm-ref-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cm-ref-tile { position: relative; width: 96px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.cm-ref-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cm-ref-tile .icon-btn { position: absolute; top: 4px; right: 4px; background: rgba(0, 0, 0, .55); color: #fff; }
.cm-ref-add { width: 96px; aspect-ratio: 3 / 4; border: 1.5px dashed var(--line-2); border-radius: 10px; display: grid; place-content: center; justify-items: center; gap: 2px; cursor: pointer; font-size: 26px; color: var(--ink-2); }
.cm-ref-add span { font-size: 11.5px; font-weight: 600; }
.cm-ph-note { width: 100%; box-sizing: border-box; margin: 10px 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; resize: vertical; }
.cm-ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 10px; }
.cm-ph-out { display: grid; gap: 6px; }
.cm-ph-out img { width: 100%; border-radius: 10px; display: block; background: var(--surface-2); }

/* Content Machine -> Make videos questionnaire (machine.js wizardHtml, owner 2026-11-06) */
.wz { display: grid; gap: 14px; }
.wz-top { display: flex; align-items: center; gap: 12px; }
.wz-step { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.wz-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.wz-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .3s; }
.wz-saids { display: flex; flex-wrap: wrap; gap: 6px; }
.wz-said { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wz-said:hover { border-color: var(--accent); color: var(--ink); }
.wz-q { margin: 4px 0 0; font: 600 26px/1.2 var(--font-display); color: var(--ink); }
.wz-sub { margin: -6px 0 0; font-size: 13.5px; color: var(--ink-2); }
.wz-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.wz-opt { display: grid; gap: 6px; justify-items: start; text-align: left; padding: 18px 18px 16px; border: 1.5px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
.wz-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.wz-opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wz-ico { font-size: 28px; line-height: 1; }
.wz-opt b { font-size: 16px; }
.wz-opt span:last-child { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.wz-row { margin-bottom: 6px; }
.wz-search { margin-bottom: 12px; }
.wz-nav { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.wz-sum { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 14px; margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); font-size: 13.5px; }
.wz-sum dt { color: var(--ink-3); font-weight: 600; }
.wz-sum dd { margin: 0; color: var(--ink); }
.wz-make { width: 100%; min-height: 48px; margin-top: 12px; font-size: 15px; justify-content: center; }

/* ---------------------------------------------------------------- Design Studio (design.js, 2026-11-14) */
.ds-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.ds-card { display: grid; gap: 4px; text-align: left; background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; font: inherit; }
.ds-card b { font-size: 13.5px; }
.ds-thumb { display: grid; place-items: center; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.ds-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ds-card:hover .ds-thumb { border-color: var(--accent); }
.ds-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.ds-tpl { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 12px 8px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; text-align: center; cursor: pointer; }
.ds-tpl img { width: 56px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; }
.ds-tpl.on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink) inset; }
.ds-tpl-e { font-size: 26px; line-height: 1.2; }
.ds-noone { justify-items: center; }
.ds-noone-i { display: grid; place-items: center; width: 96px; height: 128px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 30px; }
.ds-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.ds-title { flex: 1 1 200px; min-width: 0; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; }
.ds-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.ds-stage { position: sticky; top: 12px; display: grid; gap: 10px; }
.ds-side { display: grid; gap: 14px; min-width: 0; }
.ds-slides, .ds-tools, .ds-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ds-canvas-wrap { display: flex; justify-content: center; padding: 14px; border-radius: 14px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--line) 0 50%) 0 0 / 22px 22px; }
#ds-canvas { display: block; max-width: 100%; max-height: 68vh; width: auto; height: auto; border-radius: 4px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); touch-action: none; cursor: grab; }
.ds-msgs { display: grid; gap: 8px; max-height: 42vh; overflow-y: auto; padding: 14px 18px; }
.ds-msg { max-width: 88%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; white-space: normal; }
.ds-msg.me { justify-self: end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.ds-msg.me .muted { display: block; color: inherit; opacity: .65; font-size: 11px; }
.ds-msg.ai { justify-self: start; background: var(--accent-soft); color: var(--ink); border-bottom-left-radius: 4px; }
.ds-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 18px 0; }
.ds-say { display: flex; gap: 8px; align-items: flex-end; padding: 10px 18px 16px; }
.ds-say textarea { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; resize: vertical; }
.ds-pending { margin: 4px 18px 6px; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); border: 1px solid var(--line-2); }
.ds-jobline { padding: 4px 18px; }
.ds-phgroup { margin-top: 12px; }
.ds-phrow { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 4px; }
.ds-ph { position: relative; flex: none; width: 74px; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; color: var(--ink-2); font-size: 20px; }
.ds-ph img { width: 100%; height: 100%; object-fit: cover; }
.ds-ph span { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 10px; font-weight: 700; text-align: center; }
.ds-ph.on { border-color: #ff8a65; }
.ds-ph-add { border: 1px dashed var(--line-2); }
.ds-ph-add span { background: none; color: var(--ink-2); position: static; }
.ds-row { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 10px 0; }
.ds-row label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); min-width: 110px; flex: 1 1 110px; }
.ds-row input[type=range] { width: 100%; }
.ds-row input[type=color] { width: 100%; height: 32px; padding: 0; border: 1px solid var(--line-2); border-radius: 8px; background: none; }
.ds-row input:not([type]), .ds-row select { padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.ds-layers { display: grid; gap: 4px; max-height: 220px; overflow-y: auto; margin-bottom: 10px; }
.ds-layer { display: flex; gap: 8px; align-items: center; text-align: left; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.ds-layer span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-layer.on { border-color: #ff8a65; background: var(--accent-soft); }
#ds-ed { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ds-own { margin-top: 14px; }
.ds-own summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.ds-cap { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.ds-cap textarea { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; resize: vertical; }
@media (max-width: 980px) {
  .ds-edit { grid-template-columns: minmax(0, 1fr); }
  .ds-stage { position: static; }
  #ds-canvas { max-height: 60vh; }
}
.cm-kid-ai { display: grid; place-items: center; font-size: 30px; color: var(--ink-2); }

/* Inbox: swipe a chat left to close it (2026-11-14). The row slides over a coloured strip that says what happens. */
.cv-sw { position: relative; overflow: hidden; }
.cv-sw > .cv { position: relative; z-index: 1; touch-action: pan-y; }
.cv-sw.swiping { background: var(--ink-3); }
.cv-sw.swiping > .cv { background: var(--surface); }
.cv-sw.swiping > .cv.on { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
.cv-sw.armed { background: var(--good); }
.cv-sw.swiping::after { content: attr(data-sw); position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: #fff; font-weight: 600; font-size: 14px; }

/* Women / Men segmented control in the page header (2026-11-17), styled like the month picker. */
.aud-seg { display: inline-flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.aud-seg[hidden] { display: none; }
.aud-seg button { border: 0; background: none; color: var(--ink-2, var(--ink)); font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .01em; padding: 6px 16px; border-radius: 8px; cursor: pointer; transition: background .15s, color .15s; }
.aud-seg button:hover { color: var(--ink); }
.aud-seg button.on { background: var(--ink); color: var(--surface); }
/* Women / Men switch on the inbox: how many chats need a person on each side (owner 2026-11-19) */
.aud-seg .aud-n { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: #d64545; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

/* Email (2026-11-19): subject line on a customer email, and the "Reply with Claude" panel in place of the message box. */
.b-subj { font-size: 12px; font-weight: 700; margin-bottom: 4px; overflow-wrap: anywhere; }
.b-subj.muted { font-weight: 500; }
.asst { margin: 6px 12px 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--surface);
  border: 1.5px solid var(--accent, #8a6d3b); border-radius: 16px; box-shadow: var(--shadow); }
.asst-h { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.asst-talk { display: flex; flex-direction: column; gap: 6px; max-height: 18vh; overflow-y: auto; }
.asst-talk[hidden] { display: none; }
.asst-m { display: block; font-size: 13.5px; line-height: 1.4; padding: 7px 10px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 92%; }
.asst-m b { display: block; font-size: 11.5px; margin-bottom: 2px; }
.asst-m.me { align-self: flex-end; background: var(--bg, #f4f1ec); }
.asst-m.claude { align-self: flex-start; background: color-mix(in srgb, var(--accent, #8a6d3b) 12%, transparent); }
.asst-lbl { font-size: 12px; font-weight: 600; color: var(--ink-3); }
.asst textarea { width: 100%; font-size: 14.5px; line-height: 1.45; resize: vertical; }
.asst-ask { display: flex; gap: 6px; }
.asst-ask input { flex: 1; min-width: 0; }

/* ---------- Content Machine → Post to Instagram (igpost.js, 2026-11-20) ---------- */
.igp-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.igp { background: var(--surface); color: inherit; border: 1px solid var(--line); border-radius: 14px; width: min(860px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.igp-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.igp-h [data-igp-x] { margin-left: auto; }
.igp-body { display: grid; grid-template-columns: 240px 1fr; gap: 18px; padding: 16px; }
.igp-vid video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; background: #000; }
.igp-form { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.igp-l { font-weight: 600; font-size: 13px; margin-top: 6px; }
.igp-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.igp-row > label:not(.btn) { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-weight: 400; }
.igp-row input[type=radio], .igp-row input[type=checkbox] { width: auto; margin: 0; }
.igp-form select, .igp-form input:not([type=radio]):not([type=checkbox]), .igp-form textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: inherit; max-width: 100%; }
.igp-form select#igp-music { flex: 1; min-width: 180px; }
.igp-form textarea { width: 100%; resize: vertical; box-sizing: border-box; }
#igp-list { display: flex; flex-direction: column; gap: 10px; }
.igp-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.igp-it { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 680px) {
  .igp-wrap { padding: 0; align-items: stretch; }
  .igp { border-radius: 0; max-height: 100vh; }
  .igp-body { grid-template-columns: 1fr; }
  .igp-vid video { max-height: 45vh; width: auto; margin: 0 auto; display: block; }
}

/* ---------- Orders → All orders (allorders.js, 2026-11-22) ---------- */
.ao-tabs .tchip { font-size: 14px; padding: 6px 14px; }
.pill.sec-w { background: color-mix(in srgb, #d63384 12%, transparent); color: #c2185b; border-color: color-mix(in srgb, #d63384 30%, transparent); }
.pill.sec-m { background: color-mix(in srgb, #1e6fd9 12%, transparent); color: #1e63c4; border-color: color-mix(in srgb, #1e6fd9 30%, transparent); }
.pill.sec-b { background: color-mix(in srgb, #7b4bd6 12%, transparent); color: #6a3fc4; border-color: color-mix(in srgb, #7b4bd6 30%, transparent); }
.pill.sec-k { background: color-mix(in srgb, #e0a100 14%, transparent); color: #a87900; border-color: color-mix(in srgb, #e0a100 30%, transparent); }
.ao-list { display: flex; flex-direction: column; gap: 8px; }
.ao-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.ao-row:hover { border-color: var(--line-2); background: var(--surface-2); }
.ao-row.ao-cx { opacity: .6; }
.ao-thumbs { display: flex; flex: none; width: 96px; }
.ao-thumbs img { width: 44px; height: 58px; object-fit: cover; border-radius: 6px; border: 2px solid var(--surface); margin-left: -18px; background: var(--surface-2); }
.ao-thumbs img:first-child { margin-left: 0; }
.ao-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ao-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ao-sub { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ao-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ao-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ao-wrap { position: fixed; inset: 0; z-index: 900; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ao-pop { background: var(--surface); color: inherit; border: 1px solid var(--line); border-radius: 14px; width: min(960px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.ao-pop .loading, .ao-pop .empty { padding: 24px; }
.ao-h { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.ao-h > div:first-child { flex: 1; min-width: 0; }
.ao-name { font-size: 18px; }
.ao-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; padding: 16px; }
.ao-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 14px 0 8px; }
.ao-col h3:first-child { margin-top: 0; }
.ao-line { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ao-line img, .ao-noimg { width: 64px; height: 86px; object-fit: cover; border-radius: 8px; background: var(--surface-2); flex: none; }
.ao-line.ao-gone { opacity: .5; }
.ao-li { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ao-li a { color: inherit; }
.ao-lp { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ao-box { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.ao-money .ao-m { display: flex; justify-content: space-between; gap: 12px; }
.ao-note { white-space: pre-wrap; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 0; }
.ao-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ao-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
@media (max-width: 720px) {
  .ao-thumbs { width: 60px; } .ao-thumbs img:not(:first-child) { display: none; }
  .ao-side .ao-pills { display: none; }
  .ao-wrap { padding: 0; align-items: stretch; } .ao-pop { border-radius: 0; max-height: 100vh; }
  .ao-body { grid-template-columns: 1fr; }
}

/* ---------- Orders → Supplier (supplier.js, 2026-11-24) ---------- */
.sp-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.sp-seg { display: inline-flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.sp-seg .tchip { border: 0; font-size: 14px; padding: 7px 16px; }
.sp-top input[type=date] { font: inherit; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: inherit; }
.sp-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 12px; }
.sp-sum { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sp-list { display: flex; flex-direction: column; gap: 10px; }
.sp-g { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sp-gh { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--surface-2); }
.sp-gh img, .sp-noimg { width: 48px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--surface); flex: none; }
.sp-gt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-n { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 11px; background: var(--ink, #111); color: var(--surface, #fff); font-size: 12px; margin-right: 4px; padding: 0 6px; }
.sp-link { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; opacity: .8; }
.sp-ga { display: flex; gap: 6px; flex: none; }
.sp-items { display: flex; flex-direction: column; }
.sp-it { display: grid; grid-template-columns: minmax(120px, 220px) 50px 1fr; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); }
.sp-q { font-size: 15px; }
.sp-os { display: flex; flex-wrap: wrap; gap: 4px; }
.sp-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin: 18px 0 8px; }
.sp-cust { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.sp-c { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
@media (max-width: 640px) { .sp-it { grid-template-columns: 1fr auto; } .sp-os { grid-column: 1 / -1; } .sp-ga { flex-direction: column; } }

/* ---------- Content Machine → Make videos, one screen (machine.js studioHtml, 2026-11-24) ---------- */
.vm { display: flex; flex-direction: column; gap: 16px; grid-column: 1 / -1; }
.vm-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.vm-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; }
.vm-tab:hover { border-color: var(--line-2); }
.vm-tab.on { border-color: var(--ink, #111); box-shadow: 0 0 0 1px var(--ink, #111); }
.vm-tab .vm-ico { font-size: 22px; }
.vm-tab small { color: var(--ink-2); font-size: 12px; line-height: 1.35; }
.vm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.vm-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vm-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.vm-sh { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.vm-sh h3 { margin: 0; font-size: 16px; }
.vm-sh p { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }
.vm-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ink, #111); color: var(--surface, #fff); font-weight: 600; font-size: 14px; }
.vm-picked { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.vm-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.vm-opt { display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: inherit; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.vm-opt span { font-size: 12px; color: var(--ink-2); }
.vm-opt.on { border-color: var(--ink, #111); background: var(--surface); box-shadow: 0 0 0 1px var(--ink, #111); }
.vm-side { position: sticky; top: 76px; }
.vm-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.vm-card h3 { margin: 0; font-size: 16px; }
.vm-sum { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; margin: 0; font-size: 13px; }
.vm-sum dt { color: var(--ink-2); }
.vm-sum dd { margin: 0; }
.vm-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.vm-row select { font: inherit; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: inherit; }
.vm-q { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.vm-q label { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; }
.vm-q label.on { border-color: var(--ink, #111); box-shadow: 0 0 0 1px var(--ink, #111); }
.vm-q input { display: none; }
.vm-q span { font-size: 12px; color: var(--ink-2); }
.vm-issues { margin: 0; padding-left: 18px; color: var(--warn, #b26b00); font-size: 13px; }
.vm-go { width: 100%; padding: 12px; font-size: 15px; }
@media (max-width: 960px) { .vm-grid { grid-template-columns: 1fr; } .vm-side { position: static; } .vm-opts { grid-template-columns: 1fr; } }
.sp-add { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.sp-add input { flex: 1; min-width: 200px; font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: inherit; }
.sp-catq { margin-bottom: 4px; }
.igp-accs { gap: 8px; }
.igp-acc { display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 1px !important; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; cursor: pointer; }
.igp-acc:has(input:checked) { border-color: var(--ink, #111); box-shadow: 0 0 0 1px var(--ink, #111); }
.igp-acc input { position: absolute; opacity: 0; pointer-events: none; }
.igp-caph { margin: 8px 0 2px; }
.igp-acc.igp-off { opacity: .45; cursor: not-allowed; }

/* Supplier: locked-in links + Save all (owner 2026-11-26) */
.sp-locked { align-items: center; }
.sp-lk { flex: 1; min-width: 0; font-size: 12px; padding: 6px 9px; border: 1px dashed var(--line-2); border-radius: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-saveall { position: sticky; top: var(--sto-top, 0px); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); }

/* Orders → Confirmations (owner 2026-11-27) */
.cf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 12px 0 10px; }
.cf-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm, 10px);
  background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cf-tile b { font-size: 22px; line-height: 1.1; }
.cf-tile span { font-size: 12px; color: var(--ink-2); }
.cf-tile .cf-ti { font-size: 15px; }
.cf-tile.hot { border-color: var(--bad); background: var(--bad-soft); }
.cf-tile.hot b { color: var(--bad); }
.cf-tile.on { outline: 2px solid var(--ink); outline-offset: -1px; }
.cf-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); margin: 0 0 12px; }
.cf-stats b { color: var(--ink); }
.cf-sub { font-size: 12.5px; color: var(--ink-3, var(--ink-2)); margin: 0 0 8px; }
.cf-list { display: grid; gap: 10px; }
.cf-card { border: 1px solid var(--line-2); border-left: 4px solid var(--line-2); border-radius: var(--radius-sm, 10px); padding: 12px 14px; background: var(--surface); display: grid; gap: 8px; }
.cf-card.st-call, .cf-card.st-cancelling { border-left-color: var(--bad); }
.cf-card.st-reminded, .cf-card.st-waiting { border-left-color: var(--warn); }
.cf-card.st-confirmed, .cf-card.st-restored { border-left-color: var(--good); }
.cf-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cf-who { display: grid; gap: 2px; min-width: 0; font-size: 13.5px; }
.cf-who a { color: inherit; }
.cf-side { text-align: right; font-size: 12.5px; }
.cf-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); margin-left: 4px; }
.cf-pill.st-call, .cf-pill.st-cancelling, .cf-pill.st-cancelled { background: var(--bad-soft); color: var(--bad); }
.cf-pill.st-waiting, .cf-pill.st-reminded { background: var(--warn-soft); color: var(--warn); }
.cf-pill.st-confirmed, .cf-pill.st-restored { background: var(--good-soft); color: var(--good); }
.cf-next { font-weight: 600; color: var(--warn); }
.cf-next.bad { color: var(--bad); }
.cf-items { font-size: 12.5px; color: var(--ink-2); }
.cf-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.cf-step { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px dashed var(--line-2); color: var(--ink-3, var(--ink-2)); }
.cf-step.done { border-style: solid; color: var(--ink); background: var(--surface-2); }
.cf-step.done.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.cf-step.done.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.cf-step.done.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.cf-calls { margin: 0; padding-left: 16px; font-size: 12.5px; display: grid; gap: 2px; }
.cf-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.cf-log { display: grid; gap: 8px; padding: 10px; border-radius: 8px; background: var(--surface-2); }
.cf-log input { font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: inherit; }
.cf-outs { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 560px) { .cf-side { text-align: left; } .cf-tiles { grid-template-columns: repeat(3, 1fr); } }

/* The Freedom Journey (owner 2026-11-27) */
.fj-bar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.fj-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; align-self: flex-start; }
.fj-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.fj-head h2 { margin: 4px 0; font-size: 22px; }
.fj-ep { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: .03em; }
.fj-note { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--ink); margin: 8px 0 14px; }
#fj-body h3 { font-size: 14px; margin: 16px 0 8px; }
.fj-h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fj-hooks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.fj-hook { border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; background: var(--surface); }
.fj-hook.on { border-color: var(--good); background: var(--good-soft); }
.fj-hook p { margin: 0; font-weight: 600; font-size: 15px; }
.fj-hk { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.fj-hook.on .fj-hk { color: var(--good); }
.fj-table td, .fj-table th { vertical-align: top; font-size: 13px; }
.fj-say { font-size: 14px; font-weight: 500; min-width: 220px; }
.fj-part { font-weight: 700; white-space: nowrap; }
.fj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.fj-box { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; background: var(--surface); min-width: 0; display: grid; gap: 6px; align-content: start; }
.fj-box h3 { margin: 0 !important; }
.fj-list { margin: 0; padding-left: 16px; display: grid; gap: 3px; font-size: 13px; }
.fj-shot { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 3px 0; }
.fj-pre { white-space: pre-wrap; margin: 0; font-size: 13px; }
.fj-tags { font-size: 12.5px; color: var(--ink-2); margin: 8px 0; word-break: break-word; }
.fj-warn { padding: 8px 12px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); font-size: 13px; }
.fj-eps { display: grid; gap: 6px; }
.fj-ep-row { display: grid; grid-template-columns: 48px 1fr auto auto; gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.fj-f { display: grid; gap: 4px; font-size: 13px; }
.fj-f input, .fj-f select, #fj-fb { font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: inherit; }
.fj-row { display: flex; align-items: center; gap: 8px; }
@media (max-width: 560px) { .fj-ep-row { grid-template-columns: 40px 1fr; } }

/* Exchange request badges (owner 2026-11-27) */
.xr-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.xrb { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); cursor: default; }
.xrb.good { background: var(--good-soft); color: var(--good); }
.xrb.warn { background: var(--warn-soft); color: var(--warn); }
.xrb.bad { background: var(--bad-soft); color: var(--bad); }
/* Supplier: missed-day warning (owner 2026-11-29) */
.sp-missed { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; padding: 10px 12px;
  border-radius: 10px; border: 1px solid #e5484d; background: rgba(229, 72, 77, .1); color: inherit; }
.sp-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 10px 0 0; padding: 10px 12px;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); }
.sp-warn { color: #e5484d; font-weight: 600; }
/* Call from HQ (owner 2026-11-30) */
.hq-callbox { position: fixed; right: 16px; bottom: 16px; z-index: 9999; width: min(340px, calc(100vw - 32px)); padding: 12px 14px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.hq-cb-top { display: flex; flex-direction: column; gap: 2px; }
.hq-cb-state { margin: 8px 0; }
.hq-cb-acts { display: flex; gap: 8px; justify-content: flex-end; }
/* Reviews (owner 2026-12-01) */
.rv-card { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.rv-img { width: 76px; height: 100px; object-fit: cover; border-radius: 8px; background: var(--line-2); }
.rv-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rv-store { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line-2); }
.rv-stars { color: #c8963e; font-size: 18px; letter-spacing: 1px; margin: 4px 0; }
.rv-stars.r1, .rv-stars.r2 { color: #e5484d; }
.rv-body { margin: 4px 0 8px; white-space: pre-wrap; }
.rv-phs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rv-ph { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.rv-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.rv-err { color: #e5484d; font-size: 13px; margin-top: 6px; }
.cf-search { margin: 0 0 10px; }
.cf-search input { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); color: inherit; font: inherit; }

/* ---- Orders → China buying (dxm.js, 2026-12-03) ---- */
.dx-bar { display: grid; gap: 10px; }
.dx-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.dx-grow { flex: 1; }
.dx-bar select { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; }
.dx-warn { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.dx-list { display: grid; gap: 14px; }
.dx-group { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dx-gh { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.dx-gh b { font-size: 14px; }
.dx-gt { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.dx-tag { font-size: 12px; padding: 2px 8px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); }
.dx-tag.warn { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.dx-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); }
.dx-line:first-of-type { border-top: 0; }
.dx-img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.dx-main { display: grid; gap: 4px; min-width: 0; }
.dx-title { font-size: 14px; }
.dx-ord { font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; background: var(--surface-2); margin-right: 4px; }
.dx-match { font-size: 13px; }
.dx-problem { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 13px; }
.dx-problem span { color: var(--ink-2); }
.dx-links { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; }
.dx-links a { color: var(--ink); text-decoration: underline; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; cursor: pointer; font: inherit; }
.dx-side { display: grid; gap: 6px; justify-items: end; align-content: start; }
.dx-st { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.dx-st.ok { background: var(--good-soft); color: var(--good); }
.dx-st.warn { background: var(--warn-soft); color: var(--warn); }
.dx-amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.dx-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dx-pick { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; }
.dx-pick:hover { border-color: var(--ink); }
.dx-pick img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.dx-picked { font-size: 13px; color: var(--good); }
@media (max-width: 640px) {
  .dx-line { grid-template-columns: 52px minmax(0, 1fr); }
  .dx-img { width: 52px; height: 52px; }
  .dx-side { grid-column: 2; justify-items: start; grid-auto-flow: column; }
  .dx-gt { margin-left: 0; }
}
/* China buying: "Put another 1688 link" (2026-12-03) */
.dx-newlink { margin-top: 6px; border: 1px dashed var(--line-2); border-radius: 10px; padding: 8px 10px; }
.dx-newlink summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.dx-nl-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.dx-nl-row { display: flex; gap: 8px; }
.dx-nl-row input { flex: 1; min-width: 0; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: inherit; font-size: 13px; }
/* China buying: Supplier chat (2026-12-03) */
.dx-h3 { font-size: 14px; margin: 14px 0 8px; }
.dx-chat-q, .dx-chat-reply { display: grid; gap: 4px; }
.dx-chat-en { font-size: 14px; }
.dx-chat-zh { font-size: 12.5px; color: var(--ink-3); }
.dx-chat-act { display: flex; gap: 8px; margin-top: 8px; }
.dx-chat-reply { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); }
/* China buying → 🛒 Bought on 1688 (2026-12-03) */
.dx-cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; }
.dx-bought { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line, #eee); }
.dx-bought .dx-img { width: 56px; height: 56px; }
@media (max-width: 640px) { .dx-bought { grid-template-columns: 44px 1fr; } .dx-bought .dx-side { grid-column: 2; } }
/* China buying → 🧪 Buy any 1688 link (2026-12-03) */
.tb-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tb-form #tb-link { flex: 1 1 260px; min-width: 0; }
.tb-form #tb-qty { width: 70px; }
.tb-form #tb-note { flex: 0 1 200px; min-width: 0; }
.tb-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; max-height: 360px; overflow-y: auto; margin: 6px 0; }
.tb-opt { display: grid; gap: 3px; justify-items: center; padding: 6px; border: 1px solid var(--line, #ddd); border-radius: 8px; background: var(--surface, #fff); color: inherit; font-size: 12px; cursor: pointer; text-align: center; }
.tb-opt img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.tb-opt.on { outline: 2px solid var(--accent, #2563eb); border-color: transparent; }
.tb-form label { display: inline-flex; align-items: center; gap: 6px; }
.tb-form input[type="checkbox"] { width: 16px; height: 16px; min-width: 0; padding: 0; margin: 0; flex: none; }
.dx-orders { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; margin-top: 4px; word-break: break-all; }
/* China buying → 💬 live supplier chat (2026-12-04) */
.lc-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 12px; min-height: 420px; }
.lc-list { display: flex; flex-direction: column; gap: 4px; max-height: 560px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--surface); }
.lc-th { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font: inherit; }
.lc-th:hover { background: var(--surface-2); }
.lc-th.on { background: var(--accent-soft); }
.lc-th-top { display: flex; align-items: center; gap: 6px; }
.lc-th-top b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-th-last { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-badge { margin-left: auto; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.lc-conv { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.lc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.lc-msgs { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 12px; overflow-y: auto; max-height: 460px; min-height: 260px; background: var(--bg); }
.lc-msg { display: flex; }
.lc-msg.me { justify-content: flex-end; }
.lc-bub { max-width: 78%; padding: 8px 11px; border-radius: 12px; background: var(--surface-2); font-size: 14px; line-height: 1.4; white-space: normal; word-break: break-word; }
.lc-msg.me .lc-bub { background: var(--accent-soft); }
.lc-zh { margin-top: 4px; font-size: 12px; color: var(--ink-3); }
.lc-meta { margin-top: 4px; font-size: 11px; color: var(--ink-3); }
.lc-send { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.lc-send textarea { flex: 1; resize: vertical; min-height: 44px; font: inherit; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
@media (max-width: 760px) {
  .lc-wrap { grid-template-columns: 1fr; }
  .lc-list { max-height: 200px; }
}
/* live chat photos + product cards (2026-12-04) */
.lc-media { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; white-space: normal; }
.lc-img { display: block; max-width: 220px; max-height: 260px; border-radius: 8px; object-fit: cover; }
.lc-card { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 10px; padding: 6px; max-width: 280px; }
.lc-card img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }
.lc-more { display: block; margin: 8px auto; }

/* China buying ⚠️ Needs you (2026-12-05) */
.dx-howto { margin: 0 0 6px; }
.dx-sec { display: grid; gap: 8px; margin-bottom: 14px; }
.dx-sec-h { display: flex; gap: 8px; align-items: baseline; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.dx-fix { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.dx-gone { margin-left: auto; }
