/* SOBACO OS — brand green from the logo, light & dark, glass controls, workwear "wall" texture */
:root {
  --green: #01422a;          /* logo green: fills, primary buttons */
  --green-ink: #01422a;      /* green used for text/lines on the current background */
  --green-soft: #dfe9e2;
  --bg: #f1f0eb;             /* soft off-white, not glaring */
  --wall: rgba(0, 0, 0, .13);   /* dot colour */
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #fafaf7;
  --raise: rgba(255, 255, 255, .9);
  --text: #111412;
  --muted: #6a706b;
  --line: rgba(0, 0, 0, .09);
  --input: rgba(255, 255, 255, .8);
  --glass: rgba(255, 255, 255, .5);
  --glass-line: rgba(255, 255, 255, .8);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --red: #c4332f; --amber: #a86b00; --blue: #2c5bb8;
  --track: -0.04em;
  --radius: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green-ink: #6cc497; --green-soft: rgba(108, 196, 151, .13);
    --bg: #0b0d0c; --wall: rgba(255, 255, 255, .09);
    --surface: rgba(255, 255, 255, .045); --surface-solid: #141816; --raise: rgba(255, 255, 255, .07);
    --text: #edf1ee; --muted: #8b938e; --line: rgba(255, 255, 255, .08);
    --input: rgba(255, 255, 255, .05); --glass: rgba(255, 255, 255, .06); --glass-line: rgba(255, 255, 255, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
    --red: #ff6b66; --amber: #f0b44c; --blue: #8fb0ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --green-ink: #6cc497; --green-soft: rgba(108, 196, 151, .13);
  --bg: #0b0d0c; --wall: rgba(255, 255, 255, .09);
  --surface: rgba(255, 255, 255, .045); --surface-solid: #141816; --raise: rgba(255, 255, 255, .07);
  --text: #edf1ee; --muted: #8b938e; --line: rgba(255, 255, 255, .08);
  --input: rgba(255, 255, 255, .05); --glass: rgba(255, 255, 255, .06); --glass-line: rgba(255, 255, 255, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .35);
  --red: #ff6b66; --amber: #f0b44c; --blue: #8fb0ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.45 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: var(--track);
  color: var(--text); -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  /* dot grid background */
  background-image: radial-gradient(var(--wall) 1px, transparent 1.4px);
  background-size: 20px 20px;
  background-position: 0 0;
  background-attachment: fixed;
}
h1, h2, h3 { margin: 0 0 .4em; font-weight: 700; letter-spacing: var(--track); }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 18px; }
h3 { font-size: 12px; text-transform: uppercase; color: var(--muted); letter-spacing: .04em; font-weight: 600; }
p { margin: .3em 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
a { color: inherit; }
img.logo-light, img.logo-dark { display: block; height: auto; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-dark { display: block !important; } :root:not([data-theme="light"]) .logo-light { display: none !important; } }
:root[data-theme="dark"] .logo-dark { display: block !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }

/* ---------- glass controls ---------- */
button, input, select { font: inherit; letter-spacing: inherit; color: inherit; }
button {
  cursor: pointer; padding: 10px 16px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
button:hover { border-color: var(--green-ink); }
button:active { transform: translateY(1px); }
button.primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0)) , var(--green);
  border-color: rgba(255, 255, 255, .18); color: #fff; font-weight: 700;
}
button.primary:hover { filter: brightness(1.12); border-color: rgba(255, 255, 255, .3); }
button.danger { color: var(--red); }
button.danger:hover { border-color: var(--red); }
button.ghost { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; }
button.ghost:hover { background: var(--glass); border-color: var(--line); }
button.small { padding: 6px 12px; font-size: 13px; border-radius: 10px; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=month], input[type=number], select {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 10px;
  background: var(--input); border: 1px solid var(--line); outline: none;
}
input:focus, select:focus { border-color: var(--green-ink); box-shadow: 0 0 0 3px var(--green-soft); }
label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.error { color: var(--red); font-size: 13px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow); padding: 24px;
}

/* ---------- auth pages ---------- */
.auth { min-height: 100vh; display: grid; place-content: center; gap: 22px; padding: 24px; }
.auth .brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth .brand img { width: 220px; }
.os-tag { font-weight: 800; font-size: 13px; letter-spacing: .08em; padding: 3px 8px; border-radius: 8px; background: var(--green); color: #fff; }
.auth .card { width: min(420px, 92vw); }
.auth .card button.primary { width: 100%; margin-top: 6px; }
.google { display: block; text-align: center; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); color: var(--text); font-weight: 700; text-decoration: none; margin: 4px 0 6px; }
.google:hover { border-color: var(--green-ink); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* ---------- shell: collapsible sidebar + top bar ---------- */
:root { --side: 256px; --top: 60px; }
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; transition: grid-template-columns .2s ease; }
.shell.collapsed { --side: 72px; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; z-index: 20;
  padding: 14px 12px; border-right: 1px solid var(--line);
  background: var(--surface); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 40px; }
.side .logo { display: flex; align-items: center; gap: 8px; padding: 2px 6px; text-decoration: none; overflow: hidden; }
.side .logo img { width: 118px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 11px; flex: none; }
.icon-btn svg, .profile-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.collapse svg { transition: transform .2s ease; }
.shell.collapsed .collapse svg { transform: rotate(180deg); }
#nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; overflow-x: hidden; flex: 1; padding-bottom: 8px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: 11px; text-align: left;
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; border: 1px solid transparent;
  background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; white-space: nowrap;
}
.nav-item svg { width: 19px; height: 19px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav-item .lbl { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-item .chev { width: 15px; height: 15px; opacity: .5; transition: transform .15s ease; }
.nav-item[aria-expanded="true"] .chev { transform: rotate(90deg); }
.nav-item:hover { background: var(--glass); border-color: var(--line); transform: none; }
.nav-item.active { background: var(--green); color: #fff; border-color: rgba(255, 255, 255, .15); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.nav-item.has-active { color: var(--green-ink); }
.sub { display: grid; gap: 1px; margin: 2px 0 6px 21px; padding-left: 12px; border-left: 1px solid var(--line); }
.nav-sub { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; font-size: 13.5px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.nav-sub:hover { color: var(--text); background: var(--glass); }
.nav-sub.active { color: var(--green-ink); background: var(--green-soft); font-weight: 700; }
.nav-sub.soon { cursor: default; opacity: .7; }
.nav-sub.soon:hover { background: transparent; color: var(--muted); }
.pill { margin-left: auto; font-size: 9.5px; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); font-weight: 600; color: var(--muted); }
.shell.collapsed .side .logo, .shell.collapsed .nav-item .lbl, .shell.collapsed .nav-item .chev, .shell.collapsed .nav-item .pill, .shell.collapsed .sub { display: none !important; }
.shell.collapsed .side-top { justify-content: center; }
.shell.collapsed .nav-item { justify-content: center; padding: 10px 0; }

.content { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 15; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: var(--surface); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--line);
}
.crumb { flex: 1; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { display: none; }
.profile { position: relative; }
.profile-btn { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; }
.pname { font-weight: 700; font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.avatar.big { width: 40px; height: 40px; font-size: 16px; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 10px; z-index: 30; display: grid; gap: 6px;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.menu-me { display: flex; gap: 10px; align-items: center; padding: 6px 6px 10px; border-bottom: 1px solid var(--line); }
.menu-me .who { line-height: 1.2; }
.menu-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 6px; font-size: 13px; color: var(--muted); }
.menu-row .seg { width: 150px; }
.menu-item { text-align: left; background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; padding: 9px 8px; border-radius: 10px; }
.menu-item:hover { background: var(--glass); border-color: var(--line); }
.danger-text { color: var(--red); }
.seg { display: flex; padding: 3px; gap: 3px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); }
.seg button { flex: 1; padding: 6px 8px; font-size: 12px; border-radius: 9px; background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; }
.seg button.on { background: var(--raise); border-color: var(--line); font-weight: 700; color: var(--text); }
.foot { margin-top: auto; padding: 18px 24px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); text-align: center; }
.auth + .foot, body[data-view=login] .foot, body[data-view=setup] .foot { border: 0; position: relative; margin-top: -40px; }
.bottom-nav, .scrim { display: none; }

.page { padding: 28px 32px 64px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 0; max-width: 640px; }
.page h2 { margin-top: 26px; }

/* staff view */
.admin { display: grid; grid-template-columns: 340px 1fr; flex: 1; }
.list { border-right: 1px solid var(--line); padding: 28px 18px; }
.list-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding: 0 6px; }
.list-head h2 { margin: 0; font-size: 22px; }
#staff-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
#staff-list li button {
  width: 100%; text-align: left; display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: none;
}
#staff-list li button:hover { border-color: var(--green-ink); }
#staff-list li button.sel { border-color: var(--green-ink); box-shadow: 0 0 0 3px var(--green-soft); }
.who { font-weight: 700; }
.tag { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.tag.owner { color: var(--green-ink); font-weight: 700; } .tag.off { color: var(--red); }
.detail { padding: 32px 36px 110px; }
.detail .empty { margin-top: 40px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.detail-head p { margin: 2px 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.group.full { margin-bottom: 14px; border-color: var(--green-ink); background: var(--green-soft); }
.tick { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 0; color: var(--text); font-size: 14px; cursor: pointer; }
.tick.child { padding-left: 26px; color: var(--muted); }
.tick input { width: 18px; height: 18px; accent-color: var(--green); }
.tick.locked { opacity: .5; cursor: default; }
.savebar {
  position: fixed; left: calc(var(--side) + 340px); right: 0; bottom: 0; z-index: 10; display: flex; justify-content: flex-end; align-items: center; gap: 12px;
  padding: 14px 36px; background: var(--surface); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-top: 1px solid var(--line);
}

/* finance */
.card.wide { width: 100%; max-width: 900px; margin: 16px 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; }
input.short { width: 120px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters label { min-width: 180px; margin-bottom: 8px; }
.tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; margin: 10px 0 18px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td select { margin: 0; padding: 7px 9px; min-width: 210px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td input.num { text-align: right; margin: 0; }
.actions-cell { white-space: nowrap; text-align: right; }
.actions-cell button + button { margin-left: 6px; }
.badge { font-size: 11px; font-weight: 600; letter-spacing: .01em; padding: 4px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--line); background: var(--glass); }
.badge.recorded { color: var(--green-ink); background: var(--green-soft); border-color: transparent; }
.badge.pending_approval { color: var(--amber); }
.badge.needs_review { color: var(--blue); }
.badge.rejected { color: var(--red); }
details.add { margin-top: 24px; }
details.add summary { cursor: pointer; font-weight: 700; }
table.report td, table.report th { padding: 8px 14px; }
table.report tr.head td { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .05em; padding-top: 18px; border: 0; font-weight: 600; }
table.report tr.total td { font-weight: 700; border-top: 1px solid var(--line); }
table.report tr.net td { color: var(--green-ink); font-size: 15px; }
table.report tr.net.off td { color: var(--red); }
.narrow { max-width: 640px; }
table.lines td { padding: 6px 4px; border: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 6px 0 4px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 22px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* misc */
.row { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
dialog { padding: 0; border: 0; background: transparent; color: var(--text); }
dialog::backdrop { background: rgba(0, 0, 0, .45); backdrop-filter: blur(3px); }
dialog .card { width: min(460px, 92vw); background: var(--surface-solid); }
#toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); background: var(--green); color: #fff; padding: 11px 18px; border-radius: 12px; font-weight: 700; z-index: 50; box-shadow: var(--shadow); }
.pw { position: relative; display: block; }
.pw input { padding-right: 72px; }
.pw .eye { position: absolute; right: 6px; top: 50%; transform: translateY(calc(-50% + 3px)); padding: 6px 10px; font-size: 12px; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; color: var(--muted); }
.pw .eye:hover { color: var(--text); }

/* overview & extra finance */
.money-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.money-card { position: relative; overflow: hidden; border-radius: var(--radius); padding: 16px 18px; color: #fff; box-shadow: var(--shadow);
  background: linear-gradient(160deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 60%), var(--green); border: 1px solid rgba(255, 255, 255, .12); }
.money-card::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px); background-size: 100% 20px, 60px 40px; }
.money-card.c2 { background-color: #0b5a3b; } .money-card.c3 { background-color: #1d6b4c; } .money-card.c4 { background-color: #2b3a33; }
.money-card .k { font-size: 12px; opacity: .85; font-weight: 600; }
.money-card .v { font-size: 26px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.money-card .muted { color: rgba(255, 255, 255, .7); margin-top: 4px; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; }
.two-col .card { padding: 18px 20px; }
.two-col h2 { margin-top: 0; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .in::before { background: var(--green-ink); } .legend .out::before { background: var(--muted); opacity: .5; }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 190px; margin: 12px 0 8px; align-items: end; }
.bar-col { display: grid; grid-template-rows: 1fr auto auto; height: 100%; text-align: center; gap: 3px; }
.bar-pair { display: flex; gap: 4px; align-items: flex-end; justify-content: center; height: 100%; }
.bar-pair i { display: block; width: 40%; max-width: 22px; border-radius: 6px 6px 2px 2px; }
.bar-pair i.in { background: var(--green-ink); } .bar-pair i.out { background: var(--muted); opacity: .45; }
.bar-lbl { font-size: 11px; color: var(--muted); }
.bar-net { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.bar-net.neg, td.neg { color: var(--red); } td.pos { color: var(--green-ink); }
.stats.tight .stat { padding: 10px 12px; } .stats.tight .v { font-size: 17px; }
.todo { display: flex; justify-content: space-between; align-items: center; padding: 12px 12px; border-radius: 12px; text-decoration: none; border: 1px solid var(--line); margin-bottom: 8px; background: var(--glass); }
.todo b { font-variant-numeric: tabular-nums; }
.todo.hot { border-color: var(--green-ink); } .todo.hot b { color: var(--green-ink); }
.todo:hover { border-color: var(--green-ink); }
.btn { display: inline-flex; align-items: center; cursor: pointer; padding: 10px 16px; border-radius: 12px; font-size: 14px; margin: 0; color: #fff; font-weight: 700;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0)), var(--green); border: 1px solid rgba(255, 255, 255, .18); }
.btn input.file { position: absolute; width: 1px; height: 1px; opacity: 0; }
.btn:focus-within { outline: 2px solid var(--green-ink); outline-offset: 2px; }
tr.dim td { opacity: .55; }
.mono { font-variant-numeric: tabular-nums; font-weight: 700; }
.actions-cell select { display: inline-block; width: auto; min-width: 170px; margin: 0 6px 0 0; vertical-align: middle; }
.actions-cell > * { margin-top: 3px; margin-bottom: 3px; }
.empty-note { padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

/* mobile: phone-first */
@media (max-width: 900px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; --side: 0px; }
  .side { position: fixed; inset: 0 auto 0 0; width: 286px; z-index: 60; transform: translateX(-105%); transition: transform .2s ease; background: var(--surface-solid); }
  .side.open { transform: none; box-shadow: var(--shadow); }
  .shell.collapsed .side .logo, .shell.collapsed .nav-item .lbl, .shell.collapsed .nav-item .chev, .shell.collapsed .nav-item .pill { display: revert !important; }
  .shell.collapsed .sub:not([hidden]) { display: grid !important; }
  .shell.collapsed .nav-item { justify-content: flex-start; padding: 9px 10px; }
  .collapse { display: none; }
  .scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .4); backdrop-filter: blur(2px); }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 12px; gap: 8px; }
  .pname { display: none; }
  .profile-btn { padding: 3px; }
  .profile-btn > svg { display: none; }
  .menu { position: fixed; right: 10px; left: 10px; top: calc(var(--top) + 6px); width: auto; }
  .page { padding: 16px 14px 24px; }
  h1 { font-size: 24px; }
  .content { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--surface-solid); border-top: 1px solid var(--line);
  }
  .bottom-nav a, .bottom-nav button { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; font-size: 10.5px; font-weight: 600; color: var(--muted); text-decoration: none;
    background: transparent; border: 0; box-shadow: none; backdrop-filter: none; border-radius: 10px; }
  .bottom-nav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .bottom-nav .active { color: var(--green-ink); background: var(--green-soft); }
  #toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .money-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .money-card { padding: 13px 14px; } .money-card .v { font-size: 19px; } .money-card .muted { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; } .stat .v { font-size: 18px; }
  .filters label { min-width: 0; flex: 1 1 140px; }
  .card { padding: 18px 16px; }
  /* tables become stacked cards */
  .tablewrap.cards { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .tablewrap.cards table, .tablewrap.cards tbody, .tablewrap.cards tr, .tablewrap.cards td { display: block; width: 100%; }
  .tablewrap.cards thead { display: none; }
  .tablewrap.cards tr { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin-bottom: 10px; }
  .tablewrap.cards td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border: 0; text-align: right; white-space: normal; }
  .tablewrap.cards td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex: none; max-width: 45%; }
  .tablewrap.cards td:not([data-label])::before, .tablewrap.cards td[data-label=""]::before { content: none; }
  .tablewrap.cards td.actions-cell { flex-wrap: wrap; justify-content: flex-end; padding-top: 8px; }
  .tablewrap.cards td select { min-width: 0; flex: 1 1 100%; margin: 0 0 6px; }
  .tablewrap.cards tr.total, .tablewrap.cards tr.head { background: var(--green-soft); }
  .admin { grid-template-columns: 1fr; }
  .list { border-right: 0; border-bottom: 1px solid var(--line); }
  .detail { padding: 20px 16px 110px; }
  .savebar { left: 0; bottom: calc(64px + env(safe-area-inset-bottom)); padding: 12px 16px; }
  td select { min-width: 150px; }
}
td.nowrap, .nowrap { white-space: nowrap; }

/* shared bits for modules */
textarea, input:not([type]), input[type=search], input[type=tel], input[type=url], input[type=time], input[type=datetime-local] {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border-radius: 10px; font: inherit; letter-spacing: inherit; color: inherit;
  background: var(--input); border: 1px solid var(--line); outline: none; resize: vertical;
}
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--green-soft); }
input.cell, input:not([type]).cell { margin: 0; padding: 7px 9px; min-width: 90px; display: inline-block; width: 100%; }
input.cell.qty { width: 76px; min-width: 0; text-align: right; }
input.cell.low { border-color: var(--red); }
.qty-cell { white-space: nowrap; } .qty-cell button { margin-left: 6px; }
.row.left { justify-content: flex-start; }
.upload { position: relative; margin-top: 4px; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
@media (max-width: 900px) { input.cell.qty { width: 64px; } }

/* ---------- menu v3: sections, channels hub, home, phone bar with SOBACO mark ---------- */
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: 10px 10px 3px; }
.top-mark { display: none; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ch-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 34px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: inherit; box-shadow: var(--shadow); }
a.ch-card:hover { border-color: var(--green-ink); }
.ch-card.off { opacity: .7; box-shadow: none; }
.ch-card p { margin: 0; font-size: 13px; }
.ch-head { display: flex; align-items: center; gap: 10px; }
.ch-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--green-soft); color: var(--green-ink); flex: none; object-fit: cover; }
.ch-ico svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ch-tag { position: absolute; right: 10px; bottom: 8px; font-size: 11px; color: var(--muted); padding: 2px 8px; border-radius: 7px; background: var(--glass); border: 1px solid var(--line); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.home-grid > * { margin: 0; }
.profile-card .menu-row { padding: 10px 0; border-top: 1px solid var(--line); }
.menu-open { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
button.danger { color: #fff; background: var(--red); border-color: transparent; }
@media (max-width: 900px) {
  .collapse { display: inline-grid !important; }
  .collapse svg { transform: none !important; }
  .profile { display: none; }
  .top-mark { display: inline-flex; margin-left: auto; }
  .crumb { order: 0; }
  .bottom-nav { grid-template-columns: repeat(5, 1fr); grid-auto-flow: row; align-items: end; }
  .bottom-nav .mark-btn { justify-self: center; width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0)), var(--green); box-shadow: 0 6px 18px rgba(1, 66, 42, .35); border: 3px solid var(--surface-solid); padding: 0; }
  .bottom-nav .mark-btn img { width: 34px; height: 34px; }
  .bottom-nav .mark-btn.active { outline: 2px solid var(--green-ink); outline-offset: 2px; background-color: var(--green); }
}

/* finance sections as glass blocks */
.sub.blocks { border-left: 0; padding-left: 0; margin-left: 8px; gap: 8px; }
.nav-block { display: grid; gap: 1px; padding: 6px; border-radius: 13px; background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.nav-block .nav-section { padding: 4px 8px 4px; color: var(--green-ink); }
.nav-block .nav-sub { padding: 7px 8px; }
/* keep the logo row solid while the menu scrolls under it */
.side-top { position: sticky; top: 0; z-index: 2; background: var(--surface-solid); margin: -14px -12px 0; padding: 14px 12px 8px; }

/* hide the menu's scrollbar (still scrolls by touch, wheel and trackpad) */
#nav, .side { scrollbar-width: none; -ms-overflow-style: none; }
#nav::-webkit-scrollbar, .side::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* never let a page grow wider than the phone */
.page { min-width: 0; overflow-x: clip; }
.page > *, .att-strip { min-width: 0; max-width: 100%; }
.att-head { flex-wrap: wrap; }
.home-grid .card > h2:first-child, .home-grid section > h2:first-child { margin-top: 0; }

/* Channel price adjustment (EasyStore style) */
.adj-default { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adj-pill { background: transparent; border: 1px dashed var(--line); color: var(--green-ink, var(--text)); padding: 4px 10px; border-radius: 8px; font-weight: 600; white-space: nowrap; }
.adj-pill:hover:not([disabled]) { border-style: solid; }
.adj-pill.dim { color: var(--muted); font-weight: 500; }
.adj-dlg .card { width: min(480px, 94vw); }
.adj-dlg h2 { margin: 0; }
.adj-input { display: grid; grid-template-columns: 76px 1fr 90px; gap: 0; margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.adj-input > * { border: 0; border-radius: 0; margin: 0; min-width: 0; }
.adj-input > * + * { border-left: 1px solid var(--line); }
.adj-preview { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); margin-bottom: 8px; }
.adj-preview strong { font-size: 1.15rem; }
.adj-new { color: var(--red); }
.adj-arrow { color: var(--muted); font-size: 1.2rem; }
details.adv > summary { cursor: pointer; font-weight: 600; }
.adj-dlg .adj-head { justify-content: space-between; align-items: center; }

/* SOBACO AI: customer-data warning, floating button and half-screen sheet */
.ai-warn { background: color-mix(in srgb, var(--red) 12%, transparent); border: 1px solid color-mix(in srgb, var(--red) 45%, transparent); color: var(--red); font-weight: 700; font-size: .82rem; letter-spacing: .01em; border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; }
.ai-pii { color: var(--red); font-weight: 700; margin: 0 0 8px; }
.ai-fab { position: fixed; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 60; width: 56px; height: 56px; border-radius: 50%; padding: 0; display: grid; place-items: center;
  background: #01422A; border: 2px solid rgba(255,255,255,.7); box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.ai-fab img { width: 32px; height: 32px; }
@media (min-width: 901px) { .ai-fab { bottom: 24px; right: 24px; } }
.ai-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 70; }
.ai-sheet { position: fixed; left: 0; right: 0; bottom: 0; height: 62vh; z-index: 71; background: var(--surface-solid); border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.25); display: flex; flex-direction: column; }
@media (min-width: 901px) { .ai-sheet { left: auto; right: 24px; bottom: 24px; width: 440px; height: 70vh; border-radius: 18px; } }
.ai-sheet[hidden], .ai-scrim[hidden], .ai-fab[hidden] { display: none; }
.ai-sheet-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.ai-sheet-bar strong { flex: 1; }
.ai-grip { width: 36px; height: 4px; border-radius: 4px; background: var(--line); }
.ai-sheet-body { flex: 1; overflow-y: auto; padding: 10px 12px 0; overscroll-behavior: contain; }

/* phone bar camera button (centre) */
.bottom-nav .cam-btn { justify-self: center; width: 62px; height: 62px; margin-top: -28px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; box-shadow: var(--shadow); }
.bottom-nav .cam-btn svg { width: 30px; height: 30px; stroke: #fff; }
.bottom-nav .cam-btn.active { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.cap-thumb-img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; display: block; }
/* Receipt proof in Finance lists (expenses, bank reconciliation) */
.badge.no-receipt { background: #fde2e1; color: #9b1c1c; }
.receipt-cell { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.bank-sugg { display: flex; gap: 6px; align-items: center; margin: 2px 0; flex-wrap: wrap; }
.receipt-link { display: inline-block; line-height: 0; }

/* Category tabs at the top of each page (left menu = categories only) */
.subnav { position: sticky; top: var(--top); z-index: 14; background: var(--surface); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); }
.subnav[hidden] { display: none; }
.subnav .sub-inner { display: flex; align-items: center; gap: 6px; overflow-x: auto; padding: 8px 24px; scrollbar-width: none; }
.subnav .sub-inner::-webkit-scrollbar { display: none; }
.subnav .sub-tab { flex: none; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; background: transparent; }
.subnav .sub-tab:hover { border-color: var(--green); }
.subnav .sub-tab.active { background: var(--green); border-color: var(--green); color: #fff; }
.subnav .sub-sec { flex: none; margin-left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.subnav .sub-sec:first-child { margin-left: 0; }
@media (max-width: 900px) { .subnav .sub-inner { padding: 8px 12px; } }
.nav-item.top.soon { opacity: .55; cursor: default; }
/* section dropdowns in the category tabs */
.subnav .sub-drop { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; }
.subnav .sub-drop .chev { width: 14px; height: 14px; transform: rotate(90deg); }
.sub-menu { position: fixed; z-index: 80; min-width: 200px; max-width: 260px; max-height: 60vh; overflow-y: auto; padding: 6px; border-radius: 12px;
  background: var(--surface-solid); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.25); display: grid; gap: 2px; }
.sub-menu a { padding: 7px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-menu a:hover { background: color-mix(in srgb, var(--green) 12%, transparent); }
.sub-menu a.active { background: var(--green); color: #fff; }
/* stop the trackpad swipe from turning into browser back / forward */
html, body, .subnav .sub-inner, .ai-sheet-body { overscroll-behavior-x: none; }
/* SOBACO AI opens as a panel on the right with an X to close */
.ai-sheet { left: auto !important; right: 0 !important; top: 0 !important; bottom: 0 !important; width: min(440px, 92vw) !important; height: 100% !important; border-radius: 18px 0 0 18px !important; }
@media (min-width: 901px) { .ai-sheet { top: 12px !important; bottom: 12px !important; right: 12px !important; height: auto !important; border-radius: 18px !important; } }
.ai-grip { display: none; }

/* Tabs style v3: one pill bar, hover = raised pill, active = green text with a glowing dot under it */
.subnav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; padding: 8px 24px 8px; }
.subnav .sub-inner { padding: 5px; gap: 2px; border-radius: 999px; background: var(--surface-solid); border: 1px solid var(--line);
  box-shadow: var(--shadow), inset 0 1px 0 var(--glass-line); width: fit-content; max-width: 100%; }
.subnav .sub-tab, .subnav .sub-drop { position: relative; border: 0; background: transparent; color: var(--muted); padding: 8px 18px 13px; border-radius: 999px; font-weight: 600; transition: background .15s, color .15s; }
.subnav .sub-tab:hover, .subnav .sub-drop[aria-expanded="true"] { background: var(--raise); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12), inset 0 1px 0 var(--glass-line); }
.subnav .sub-tab.active { background: transparent; color: var(--green-ink); box-shadow: none; }
.subnav .sub-tab.active:hover { background: var(--raise); }
.subnav .sub-tab.active::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%;
  background: var(--green-ink); box-shadow: 0 0 8px 2px rgba(1, 66, 42, .55), 0 0 18px 6px rgba(1, 66, 42, .22); }
@media (max-width: 900px) { .subnav { padding: 8px 12px 8px; } .subnav .sub-inner { padding: 5px; } .subnav .sub-tab, .subnav .sub-drop { padding: 7px 14px 12px; } }

/* Phone bar: floating glass pill (iPhone style) — icons only, dot under the active one, glowing camera in the middle */
@media (max-width: 900px) {
  .bottom-nav { left: 14px !important; right: 14px !important; bottom: calc(10px + env(safe-area-inset-bottom)) !important; width: auto; height: 62px; padding: 0 8px !important;
    border-radius: 999px; border: 1px solid var(--glass-line); border-top: 1px solid var(--glass-line);
    background: color-mix(in srgb, var(--surface-solid) 62%, transparent) !important; backdrop-filter: blur(26px) saturate(1.6); -webkit-backdrop-filter: blur(26px) saturate(1.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .16), inset 0 1px 0 var(--glass-line); align-items: center !important; }
  .bottom-nav a { position: relative; background: transparent !important; padding: 0; height: 100%; align-content: center; color: var(--muted); }
  .bottom-nav a > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }   /* labels stay for screen readers */
  .bottom-nav svg { width: 24px; height: 24px; }
  .bottom-nav a.active { color: var(--text); }
  .bottom-nav a.active:not(.cam-btn)::after { content: ""; position: absolute; left: 50%; bottom: 9px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
    background: var(--green-ink); box-shadow: 0 0 8px 2px rgba(1, 66, 42, .5); }
  .bottom-nav .cam-btn { width: 54px; height: 54px; margin-top: 0; align-self: center; background: radial-gradient(circle at 35% 30%, #0b6a45, var(--green) 70%) !important; color: #fff;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--green-ink) 14%, transparent), 0 6px 18px rgba(1, 66, 42, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }
  .bottom-nav .cam-btn svg { width: 26px; height: 26px; }
  .bottom-nav .cam-btn.active { outline: 0; box-shadow: 0 0 0 2px var(--green-ink), 0 0 18px 4px rgba(1, 66, 42, .45); }
  .ai-fab { bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (max-width: 900px) { .content { padding-bottom: calc(92px + env(safe-area-inset-bottom)); } }

/* ---- frame: dark icon rail + rounded page panel (desktop) ---- */
:root { --frame: #2a2927; --rail-text: #ebe8df; --accent: #01422a; --accent-ink: #ffffff; }
:root[data-theme="dark"] { --frame: #040504; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --frame: #040504; } }
@media (min-width: 901px) {
  .shell { background: var(--frame); height: 100vh; min-height: 0; overflow: hidden; }
  .side { background: transparent; border-right: 0; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--rail-text); padding: 18px 12px; }
  .side-top { position: static; background: transparent; margin: 0; padding: 0 0 10px; }
  .side .logo-light { display: none !important; }
  .side .logo-dark { display: block !important; }
  .side .os-tag { color: var(--accent); border-color: rgba(255, 255, 255, .25); }
  .side .icon-btn { background: transparent; border-color: transparent; color: var(--rail-text); box-shadow: none; }
  .side .icon-btn:hover { background: rgba(255, 255, 255, .1); }
  #nav { gap: 6px; scrollbar-width: none; }
  #nav::-webkit-scrollbar { display: none; }
  .side .nav-item { color: var(--rail-text); border-radius: 14px; padding: 11px 12px; }
  .side .nav-item svg { opacity: 1; }
  .side .nav-item:hover { background: rgba(255, 255, 255, .09); border-color: transparent; }
  .side .nav-item.active { background: var(--accent); color: var(--accent-ink); border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14); }
  .side .nav-item .pill { color: var(--rail-text); border-color: rgba(255, 255, 255, .25); }
  .shell.collapsed .side .nav-item { width: 48px; height: 48px; padding: 0; margin: 0 auto; }
  .content {
    margin: 12px 12px 12px 0; height: calc(100vh - 24px); min-height: 0; overflow-y: auto; border-radius: 28px;
    background-color: var(--bg); background-image: radial-gradient(var(--wall) 1px, transparent 1.4px); background-size: 20px 20px;
  }
  .topbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; border-radius: 28px 28px 0 0; }
}
.rail-tip { position: fixed; z-index: 60; pointer-events: none; transform: translateY(-50%); padding: 7px 12px; border-radius: 10px; background: var(--green); color: #fff;
  font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .16); }
/* ---- dash ---- */
/* Category dashboards + Reports & Documents (public/mod/dash.js). Every class starts with dsh-.
   Pastel tokens for both themes: light = soft pastels with dark ink; dark = deep tints with light ink. */
:root {
  --dsh-yellow: #fbeaa6; --dsh-lilac: #ddd5f8; --dsh-sky: #cfe5f8;
  --dsh-ink: #141614; --dsh-ink-soft: rgba(20, 22, 20, .66);
  --dsh-outline: #1b1e1c; --dsh-track: rgba(20, 22, 20, .14);
  --dsh-card: #ffffff;
  --dsh-dark: #121513; --dsh-dark-text: #f2f4ef; --dsh-dark-dim: rgba(242, 244, 239, .66); --dsh-dark-line: rgba(255, 255, 255, .14);
  --dsh-accent: #d9f27e; --dsh-accent-ink: #141614;
  --dsh-pill: #141614; --dsh-pill-text: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --dsh-yellow: #3a3418; --dsh-lilac: #2d2846; --dsh-sky: #19303f;
    --dsh-ink: #f2f4ef; --dsh-ink-soft: rgba(242, 244, 239, .68);
    --dsh-outline: rgba(255, 255, 255, .3); --dsh-track: rgba(255, 255, 255, .16);
    --dsh-card: #161a18;
    --dsh-dark: #20261f; --dsh-dark-line: rgba(255, 255, 255, .16);
    --dsh-pill: #f2f4ef; --dsh-pill-text: #141614;
  }
}
:root[data-theme="dark"] {
  --dsh-yellow: #3a3418; --dsh-lilac: #2d2846; --dsh-sky: #19303f;
  --dsh-ink: #f2f4ef; --dsh-ink-soft: rgba(242, 244, 239, .68);
  --dsh-outline: rgba(255, 255, 255, .3); --dsh-track: rgba(255, 255, 255, .16);
  --dsh-card: #161a18;
  --dsh-dark: #20261f; --dsh-dark-line: rgba(255, 255, 255, .16);
  --dsh-pill: #f2f4ef; --dsh-pill-text: #141614;
}
.dsh { max-width: 1240px; }
.dsh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 18px; max-width: 1240px; }
.dsh-head p { margin: 0; max-width: 640px; }
.dsh-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.dsh-chips { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.dsh-chips::-webkit-scrollbar { display: none; }
button.dsh-chip { padding: 7px 14px; border-radius: 999px; font-size: 13px; white-space: nowrap; background: var(--dsh-card); border: 1.5px solid var(--dsh-outline); color: var(--text); box-shadow: none; backdrop-filter: none; }
button.dsh-chip.on { background: var(--dsh-pill); color: var(--dsh-pill-text); border-color: var(--dsh-pill); font-weight: 700; }
.dsh-actions { display: flex; gap: 6px; }
.dsh-actions button { border-radius: 999px; }
.dsh-pill { display: inline-block; max-width: 100%; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsh-pill.dark { background: var(--dsh-pill); color: var(--dsh-pill-text); }
.dsh-pill.accent { background: var(--dsh-accent); color: var(--dsh-accent-ink); }
.dsh-chg { font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dsh-chg.ok { color: var(--green-ink); } .dsh-chg.bad { color: var(--red); } .dsh-chg.flat { color: var(--muted); }

/* row of three pastel feature cards */
.dsh-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dsh-feat, .dsh-rcard { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 18px; border-radius: 22px; border: 1.5px solid var(--dsh-outline); color: var(--dsh-ink); text-decoration: none; }
.dsh-yellow { background: var(--dsh-yellow); } .dsh-lilac { background: var(--dsh-lilac); } .dsh-sky { background: var(--dsh-sky); }
.dsh-feat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.dsh-feat .dsh-chg.flat, .dsh-rcard .dsh-chg.flat, .dsh-feat .dsh-prev, .dsh-feat .dsh-cap, .dsh-rcard .dsh-prev, .dsh-rwhat { color: var(--dsh-ink-soft); }
.dsh-big { font-size: 34px; line-height: 1.05; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 8px; overflow-wrap: anywhere; }
.dsh-prev, .dsh-cap { font-size: 12px; min-height: 17px; }
.dsh-bar { height: 8px; border-radius: 999px; background: var(--dsh-track); overflow: hidden; margin-top: 8px; }
.dsh-bar i { display: block; height: 100%; border-radius: 999px; background: var(--dsh-ink); }
.dsh-btn { align-self: flex-start; margin-top: 10px; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; text-decoration: none; background: var(--dsh-pill); color: var(--dsh-pill-text); border: 1.5px solid var(--dsh-pill); }
.dsh-btn:hover { filter: brightness(1.15); }

/* small tiles under the feature cards */
.dsh-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 16px; }
.dsh-tile { background: var(--dsh-card); border: 1.5px solid var(--dsh-outline); border-radius: 18px; padding: 12px 16px; min-width: 0; }
.dsh-tile .k { font-size: 12px; color: var(--muted); }
.dsh-tile .v { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; overflow-wrap: anywhere; }

/* wide list card beside the dark suggestions card */
.dsh-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.dsh-col { display: grid; gap: 16px; min-width: 0; }
.dsh-card { background: var(--dsh-card); border: 1.5px solid var(--dsh-outline); border-radius: 22px; padding: 18px; min-width: 0; }
.dsh-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.dsh-card-head h2 { margin: 0; }
.dsh-link { font-size: 13px; font-weight: 700; color: var(--green-ink); text-decoration: none; white-space: nowrap; }
.dsh-link:hover { text-decoration: underline; }
.dsh .tablewrap.dsh-table, .dsh-st .tablewrap.dsh-table { background: transparent; border: 0; border-radius: 0; box-shadow: none; margin: 0 0 4px; }
.dsh-table table th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.dsh-table table th.num { text-align: right; }
.dsh-table table td { padding: 10px 6px; border-bottom: 1px solid var(--line); }
.dsh-table table tr:last-child td { border-bottom: 0; }

.dsh-dark { background: var(--dsh-dark); color: var(--dsh-dark-text); border-color: var(--dsh-dark-line); }
.dsh-dark h2 { color: var(--dsh-dark-text); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 6px; }
.dsh-dark .dsh-card-head + h2 { margin-top: 6px; }
.dsh-dim { color: var(--dsh-dark-dim); }
.dsh-fc-big { font-size: 32px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dsh-fc-none .dsh-fc-big { font-size: 22px; }
.dsh-fc-rows { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; margin: 12px 0 0; font-size: 13px; }
.dsh-fc-rows dt { color: var(--dsh-dark-dim); } .dsh-fc-rows dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.dsh-fc-list { margin-top: 12px; font-size: 13px; }
.dsh-fc-list th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--dsh-dark-dim); font-weight: 600; text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--dsh-dark-line); }
.dsh-fc-list th.num { text-align: right; }
.dsh-fc-list td { padding: 7px 4px; border-bottom: 1px solid var(--dsh-dark-line); }
.dsh-how { font-size: 12px; color: var(--dsh-dark-dim); margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--dsh-dark-line); }
.dsh-how b { color: var(--dsh-dark-text); }
.dsh-sugs { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.dsh-sug { border: 1px solid var(--dsh-dark-line); border-radius: 16px; padding: 12px; background: rgba(255, 255, 255, .04); }
.dsh-sug p { margin: 6px 0 0; font-size: 13.5px; }
.dsh-sug-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dsh-sev { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: var(--dsh-dark-text); }
.dsh-sev.sev-high { background: #ff8a80; color: #2a0b08; } .dsh-sev.sev-med { background: #ffd666; color: #2b2000; } .dsh-sev.sev-good { background: var(--dsh-accent); color: var(--dsh-accent-ink); }
.dsh-fig { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dsh-sug-btn { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--dsh-accent); text-decoration: none; }
.dsh-sug-btn:hover { text-decoration: underline; }
button.dsh-ask { width: 100%; margin-top: 8px; padding: 14px 18px; border-radius: 999px; font-size: 15px; font-weight: 700; background: var(--dsh-dark-text); color: #141614; border: 0; box-shadow: none; backdrop-filter: none; }
button.dsh-ask:hover { background: var(--dsh-accent); border: 0; }

/* charts */
.dsh-chart { display: block; width: 100%; height: 200px; }
.dsh-b { fill: var(--green-ink); } .dsh-b.neg { fill: var(--red); }
.dsh-b.fc { fill: var(--green-ink); fill-opacity: .28; stroke: var(--green-ink); stroke-width: 1; stroke-dasharray: 3 2; }
.dsh-axis { stroke: var(--dsh-outline); stroke-width: 1; opacity: .5; } .dsh-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.dsh-tick { font-size: 11px; fill: var(--muted); letter-spacing: 0; }
.dsh-chart-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.dsh-legend { display: inline-flex; align-items: center; gap: 6px; }
.dsh-legend i { width: 14px; height: 10px; border-radius: 3px; border: 1px dashed var(--green-ink); background: color-mix(in srgb, var(--green-ink) 28%, transparent); }
.dsh-spark { display: block; width: 100%; height: 46px; margin-top: 8px; }
.dsh-spark-line { fill: none; stroke: var(--dsh-ink); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.dsh-spark-fill { fill: var(--dsh-ink); opacity: .1; } .dsh-spark .dsh-axis { stroke: var(--dsh-ink); opacity: .25; }

/* Reports dashboard */
.dsh-h { margin: 24px 0 10px; }
.dsh-rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.dsh-rcard { transition: transform .12s ease; }
.dsh-rcard:hover { transform: translateY(-2px); }
.dsh-rcard.empty { background: var(--dsh-card); color: var(--text); }
.dsh-rcard.empty .dsh-big, .dsh-rcard.empty .dsh-prev, .dsh-rcard.empty .dsh-rwhat { color: var(--muted); }
.dsh-rcard.empty .dsh-spark-line { stroke: var(--muted); } .dsh-rcard.empty .dsh-btn { background: transparent; color: var(--text); border-color: var(--dsh-outline); }
.dsh-rcard .dsh-big { font-size: 26px; margin-top: 0; }
.dsh-rwhat { font-size: 12px; margin-top: 8px; }
.dsh-hbars { display: grid; gap: 8px; }
.dsh-hbar { display: grid; grid-template-columns: minmax(90px, 170px) minmax(0, 1fr) auto; gap: 10px; align-items: center; text-decoration: none; font-size: 13.5px; }
.dsh-hbar .b { height: 12px; border-radius: 999px; background: var(--dsh-track); overflow: hidden; }
.dsh-hbar .b i { display: block; height: 100%; border-radius: 999px; background: var(--green-ink); }
.dsh-hbar .v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dsh-hbar:hover .n { text-decoration: underline; }
.dsh-extras { max-width: 900px; margin-top: 18px; }
.dsh-st details { margin-top: 10px; } .dsh-st summary { cursor: pointer; font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.dsh-st-out { margin-top: 10px; }
.dsh-tools { display: inline-flex; }
.dsh-printfoot { display: none; }

@media (max-width: 1100px) { .dsh-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .dsh-feats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .dsh-head { align-items: flex-start; flex-direction: column; }
  .dsh-head-right { justify-content: flex-start; width: 100%; }
  .dsh-big { font-size: 30px; } .dsh-fc-big { font-size: 28px; }
  .dsh-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dsh-card, .dsh-feat, .dsh-rcard { padding: 16px; border-radius: 20px; }
  .dsh-rgrid { grid-template-columns: minmax(0, 1fr); }
  .dsh-chart { height: 170px; }
  .dsh-hbar { grid-template-columns: minmax(0, 1fr) auto; } .dsh-hbar .b { grid-column: 1 / -1; grid-row: 2; }
  .dsh .tablewrap.dsh-table.cards tr, .dsh-st .tablewrap.dsh-table.cards tr { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 8px 0; margin: 0; }
  .dsh .tablewrap.dsh-table.cards td, .dsh-st .tablewrap.dsh-table.cards td { border-bottom: 0; padding: 4px 0; }
}
/* Print view: only while body.dsh-printing is set (by the Print buttons in /mod/dash.js), so no other module's print is touched */
@media print {
  body.dsh-printing { background: #fff !important; }
  body.dsh-printing #side, body.dsh-printing .topbar, body.dsh-printing #subnav, body.dsh-printing #bottom-nav, body.dsh-printing .foot, body.dsh-printing .scrim,
  body.dsh-printing .ai-fab, body.dsh-printing .ai-sheet, body.dsh-printing .ai-scrim, body.dsh-printing #toast, body.dsh-printing .dsh-noprint,
  body.dsh-printing .page-head .row, body.dsh-printing .seg, body.dsh-printing details.add { display: none !important; }
  body.dsh-printing .content, body.dsh-printing .page { margin: 0 !important; padding: 0 !important; }
  body.dsh-printing .dsh, body.dsh-printing .dsh-head, body.dsh-printing .dsh-extras { max-width: none; }
  body.dsh-printing .dsh-feat, body.dsh-printing .dsh-rcard, body.dsh-printing .dsh-card, body.dsh-printing .dsh-tile, body.dsh-printing .stat { break-inside: avoid; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.dsh-printing .dsh-main { grid-template-columns: minmax(0, 1fr); }
  body.dsh-printing .dsh-rgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.dsh-printing .dsh-printfoot { display: block; margin-top: 14px; }
}

/* ---- tabs in the top bar: no grey strip, tabs at the very top of every category ---- */
.topbar { position: static; height: auto; min-height: var(--top); flex-wrap: wrap; row-gap: 8px; padding-top: 10px; padding-bottom: 6px;
  background: transparent !important; border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.topbar .subnav { position: static; order: 2; flex: 1 1 auto; min-width: 0; padding: 0 !important; background: transparent !important; border: 0; }
.topbar .subnav .sub-inner { width: max-content; max-width: 100%; }
.topbar:has(.subnav:not([hidden])) .crumb { display: none; }
.topbar .profile { order: 3; margin-left: auto; }
@media (max-width: 900px) {
  .topbar { padding: 8px 12px 4px; }
  .topbar:has(.subnav:not([hidden])) .crumb { display: block; }
  .topbar .subnav { order: 4; flex: 1 1 100%; }
}
/* ---- phone: tabs at the very top (no title row above), smaller see-through glass bar ---- */
@media (max-width: 900px) {
  .topbar:has(.subnav:not([hidden])) { flex-wrap: nowrap; padding: 8px 10px 4px; min-height: 0; gap: 8px; }
  .topbar:has(.subnav:not([hidden])) .crumb, .topbar:has(.subnav:not([hidden])) .top-mark { display: none !important; }
  .topbar:has(.subnav:not([hidden])) .menu-btn { width: 34px; height: 34px; border-radius: 50%; order: 1; }
  .topbar:has(.subnav:not([hidden])) .subnav { order: 2; flex: 1 1 auto; }
  .topbar .subnav .sub-inner { padding: 4px; }
  .topbar .subnav .sub-tab, .topbar .subnav .sub-drop { padding: 6px 12px 10px; font-size: 13px; }

  .bottom-nav { left: 50% !important; right: auto !important; transform: translateX(-50%); width: min(300px, calc(100% - 48px)) !important; height: 50px; padding: 0 6px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    background: color-mix(in srgb, var(--surface-solid) 28%, transparent) !important; backdrop-filter: blur(18px) saturate(1.8); -webkit-backdrop-filter: blur(18px) saturate(1.8);
    border: 1px solid color-mix(in srgb, #fff 45%, transparent); box-shadow: 0 6px 20px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .5); }
  .bottom-nav svg { width: 20px; height: 20px; }
  .bottom-nav a.active:not(.cam-btn)::after { bottom: 6px; width: 4px; height: 4px; margin-left: -2px; }
  .bottom-nav .cam-btn { width: 40px; height: 40px; }
  .bottom-nav .cam-btn svg { width: 20px; height: 20px; }
  .ai-fab { bottom: calc(74px + env(safe-area-inset-bottom)); }
  .content { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}
/* ---- glass: floating tab pill (stays on top while scrolling) and phone side menu ---- */
.topbar:has(.subnav:not([hidden])) { position: sticky; top: 0; z-index: 30; }
.subnav .sub-inner { background: color-mix(in srgb, var(--surface-solid) 55%, transparent) !important;
  backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7);
  border: 1px solid color-mix(in srgb, #fff 55%, transparent); box-shadow: 0 8px 24px rgba(0, 0, 0, .10), inset 0 1px 0 rgba(255, 255, 255, .55); }
:root[data-theme="dark"] .subnav .sub-inner { border-color: rgba(255, 255, 255, .12); box-shadow: 0 8px 24px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .08); }
.topbar .profile-btn { background: color-mix(in srgb, var(--surface-solid) 55%, transparent); backdrop-filter: blur(22px) saturate(1.7); -webkit-backdrop-filter: blur(22px) saturate(1.7); }
@media (max-width: 900px) {
  .side { background: color-mix(in srgb, var(--surface-solid) 58%, transparent) !important;
    backdrop-filter: blur(28px) saturate(1.8); -webkit-backdrop-filter: blur(28px) saturate(1.8);
    border-right: 1px solid color-mix(in srgb, #fff 45%, transparent); }
  .side .side-top { background: transparent !important; }
  .side .nav-item:not(.active):hover { background: color-mix(in srgb, #fff 35%, transparent); }
  .scrim:not([hidden]) { background: rgba(0, 0, 0, .18); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .topbar .menu-btn { background: color-mix(in srgb, var(--surface-solid) 55%, transparent); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
}
/* ---- desktop: same glass side menu as the phone (light frosted panel over a soft tinted backdrop) ---- */
@media (min-width: 901px) {
  .shell { background-color: var(--bg);
    background-image: radial-gradient(60% 50% at 0% 0%, rgba(1, 66, 42, .16), transparent 70%), radial-gradient(50% 45% at 100% 100%, rgba(120, 140, 255, .12), transparent 70%),
      radial-gradient(var(--wall) 1px, transparent 1.4px);
    background-size: auto, auto, 20px 20px; }
  .side { margin: 12px 0 12px 12px; height: calc(100vh - 24px); border-radius: 28px; color: var(--text);
    background: color-mix(in srgb, var(--surface-solid) 55%, transparent) !important; backdrop-filter: blur(26px) saturate(1.8); -webkit-backdrop-filter: blur(26px) saturate(1.8);
    border: 1px solid color-mix(in srgb, #fff 55%, transparent); box-shadow: 0 10px 30px rgba(0, 0, 0, .08), inset 0 1px 0 rgba(255, 255, 255, .6); }
  .shell { grid-template-columns: calc(var(--side) + 12px) 1fr; }
  .content { margin-left: 12px; }
  .side .logo-light { display: block !important; }
  .side .logo-dark { display: none !important; }
  .side .os-tag { color: #fff; background: var(--green); border-color: transparent; }
  .side .icon-btn { color: var(--text); }
  .side .icon-btn:hover, .side .nav-item:hover { background: color-mix(in srgb, #fff 45%, transparent); }
  .side .nav-item { color: var(--text); }
  .side .nav-item.active { background: var(--green); color: #fff; }
  .side .nav-item .pill { color: var(--muted); border-color: var(--line); }
  .topbar { flex-wrap: nowrap; }
}
@media (min-width: 901px) {
  :root[data-theme="dark"] .side { border-color: rgba(255, 255, 255, .1); box-shadow: 0 10px 30px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .06); }
  :root[data-theme="dark"] .side .logo-light { display: none !important; }
  :root[data-theme="dark"] .side .logo-dark { display: block !important; }
  :root[data-theme="dark"] .side .nav-item:hover { background: rgba(255, 255, 255, .08); }
}

/* ---- rpt ---- */
/* Reports overview (/mod/reports_hub.js): rounded cards, SOBACO green current line, dashed grey previous, glass filter chips */
.rp { max-width: 1240px; }
.rp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.rp-head p { margin: 0; max-width: 680px; }
.rp-head .rp-vs { margin-top: 4px; font-variant-numeric: tabular-nums; }
.rp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-actions button { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; }
.rp-bi { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rp-bar { display: grid; gap: 10px; margin-bottom: 18px; position: relative; z-index: 5; }
.rp-bar-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rp-seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.rp-seg::-webkit-scrollbar { display: none; }
.rp-seg button { padding: 6px 13px; font-size: 13px; border-radius: 999px; background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; white-space: nowrap; }
.rp-seg button.on { background: var(--green); color: #fff; }
.rp-custom { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.rp-custom label { font-size: 12px; color: var(--muted); display: grid; gap: 2px; margin: 0; }
.rp-custom input { padding: 6px 10px; border-radius: 12px; }
.rp-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rp-fwrap { position: relative; }
.rp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; font-size: 13px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); box-shadow: var(--shadow); color: var(--text); white-space: nowrap; }
.rp-chip.on { border-color: var(--green-ink); }
.rp-chip-lbl { font-weight: 700; box-shadow: none; }
.rp-chip-k { color: var(--muted); }
.rp-caret { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.rp-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 200px; max-width: min(300px, 86vw); max-height: 320px; overflow: auto; display: grid; gap: 2px; padding: 6px;
  border-radius: 16px; background: color-mix(in srgb, var(--surface-solid) 82%, transparent); backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0, 0, 0, .16); }
.rp-menu button { text-align: left; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; }
.rp-menu button:hover { background: var(--glass); }
.rp-menu button.on { background: var(--green-soft); color: var(--green-ink); font-weight: 700; }
.rp-body { display: grid; gap: 26px; transition: opacity .15s; }
.rp-body.rp-busy { opacity: .55; }
.rp-sec { display: grid; gap: 12px; min-width: 0; }
.rp-sec-head { display: flex; gap: 12px; align-items: center; }
.rp-sec-head h2 { margin: 0; font-size: 20px; }
.rp-sec-head p { margin: 0; font-size: 13px; }
.rp-sec-ico { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--green); color: #fff; }
.rp-sec-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rp-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.rp-col { display: grid; gap: 14px; min-width: 0; }
.rp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.rp-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.rp-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.rp-card { background: var(--surface); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.rp-card.rp-off { background: transparent; border-style: dashed; box-shadow: none; }
.rp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.rp-card-head h3 { margin: 0; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.rp-more { font-size: 12.5px; font-weight: 700; color: var(--green-ink); text-decoration: none; white-space: nowrap; }
.rp-more:hover { text-decoration: underline; }
.rp-iwrap { position: relative; display: inline-flex; }
.rp-i { width: 18px; height: 18px; padding: 0; border-radius: 50%; font: italic 700 11px/16px Georgia, serif; letter-spacing: 0; color: var(--muted); background: transparent; border: 1px solid var(--line); box-shadow: none; backdrop-filter: none; }
.rp-i:hover { color: var(--text); border-color: var(--muted); }
.rp-tip { position: absolute; z-index: 30; top: calc(100% + 6px); left: -8px; width: max-content; max-width: 260px; padding: 9px 11px; border-radius: 12px; font-size: 12px; font-weight: 400; line-height: 1.4;
  letter-spacing: 0; color: var(--text); background: var(--surface-solid); border: 1px solid var(--line); box-shadow: 0 10px 26px rgba(0, 0, 0, .16); white-space: normal; }
.rp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.rp-tile { border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; background: var(--raise); min-width: 0; }
.rp-tile-k { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.rp-tile-v { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; overflow-wrap: anywhere; }
.rp-chg { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-chg.up { color: var(--green-ink); } .rp-chg.down { color: var(--red); } .rp-chg.flat { color: var(--muted); }
.rp-chart-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 6px; }
.rp-toggles { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.rp-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.rp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rp-key { display: inline-block; width: 16px; height: 0; border-top: 3px solid var(--green-ink); border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.rp-key.prev { border-top: 2px dashed var(--muted); }
.rp-key.k1 { width: 10px; height: 10px; border: 0; border-radius: 3px; background: var(--green-ink); }
.rp-key.k2 { width: 10px; height: 10px; border: 0; border-radius: 3px; background: color-mix(in srgb, var(--green-ink) 45%, transparent); }
.rp-key.k3 { width: 10px; height: 10px; border: 0; border-radius: 3px; background: color-mix(in srgb, var(--muted) 45%, transparent); }
.rp-chart { position: relative; }
.rp-chart-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.rp-svg { display: block; width: 100%; height: auto; min-width: 540px; touch-action: pan-y; }
.rp-svg .rp-grid { stroke: var(--line); stroke-width: 1; }
.rp-svg .rp-ax { fill: var(--muted); font-size: 11px; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.rp-svg .rp-cur, .rp-spark .rp-cur { fill: none; stroke: var(--green-ink); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.rp-svg .rp-prev, .rp-spark .rp-prev { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-dasharray: 5 5; opacity: .7; }
.rp-svg .rp-fill { fill: var(--green-ink); opacity: .1; stroke: none; }
.rp-svg .rp-dot { fill: var(--green-ink); stroke: var(--surface-solid); stroke-width: 2; }
.rp-svg .rp-now { stroke: var(--amber); stroke-width: 1.4; stroke-dasharray: 2 3; }
.rp-svg .rp-now-t { fill: var(--amber); font-size: 11px; font-weight: 700; letter-spacing: 0; }
.rp-svg .rp-guide { stroke: var(--text); stroke-width: 1; opacity: .25; }
.rp-ctip { position: absolute; transform: translateX(-50%); z-index: 6; pointer-events: none; min-width: 150px; padding: 8px 10px; border-radius: 12px; font-size: 12px;
  background: var(--surface-solid); border: 1px solid var(--line); box-shadow: 0 10px 26px rgba(0, 0, 0, .14); display: grid; gap: 4px; }
.rp-ctip-row { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; }
.rp-ctip-row b { font-variant-numeric: tabular-nums; }
.rp-mini-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.rp-mini-v { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.rp-spark { width: 120px; height: 38px; flex: 0 0 auto; }
.rp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: rp; }
.rp-list li { display: grid; gap: 4px; min-width: 0; }
.rp-li-top, .rp-li-bot { display: flex; justify-content: space-between; gap: 10px; align-items: center; min-width: 0; }
.rp-li-n { font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-li-n::before { counter-increment: rp; content: counter(rp) "."; color: var(--muted); margin-right: 6px; font-variant-numeric: tabular-nums; }
.rp-li-v { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-li-bar { flex: 1 1 auto; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.rp-li-bar i { display: block; height: 100%; border-radius: 999px; background: var(--green-ink); }
.rp-li-p { font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.rp-empty { margin: 6px 0; padding: 18px 12px; text-align: center; color: var(--muted); font-size: 13px; border-radius: 14px; background: color-mix(in srgb, var(--muted) 7%, transparent); }
.rp-empty-b { display: grid; gap: 4px; }
.rp-empty-b b { color: var(--text); }
.rp-locked { margin: 6px 0; padding: 14px 12px; color: var(--muted); font-size: 13px; border-radius: 14px; border: 1px dashed var(--line); text-align: center; }
.rp-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.rp-cap { margin: -6px 0 8px; }
.rp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rp-stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); margin: 8px 0 10px; }
.rp-stack i { display: block; height: 100%; }
.rp-stack .k1 { background: var(--green-ink); } .rp-stack .k2 { background: color-mix(in srgb, var(--green-ink) 45%, transparent); } .rp-stack .k3 { background: color-mix(in srgb, var(--muted) 45%, transparent); }
.rp-crow { display: grid; grid-template-columns: minmax(0, 1fr) auto 52px; gap: 8px; align-items: center; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.rp-crow:last-child { border-bottom: 0; }
.rp-crow b { font-variant-numeric: tabular-nums; }
.rp-crow > span:last-child { text-align: right; font-size: 12px; }
.rp-printfoot { display: none; }
@media (max-width: 1100px) {
  .rp-main { grid-template-columns: minmax(0, 1fr); }
  .rp-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .rp-head { align-items: flex-start; flex-direction: column; }
  .rp-grid2, .rp-grid3, .rp-two { grid-template-columns: minmax(0, 1fr); }
  .rp-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .rp-tiles { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .rp-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; }
  .rp-tile .rp-tile-k { grid-column: 1 / -1; }
  .rp-card { padding: 14px; border-radius: 20px; }
  .rp-mini-v { font-size: 20px; }
  .rp-spark { width: 84px; }
  .rp-mini-row { flex-wrap: wrap; }
  .rp-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .rp-chips::-webkit-scrollbar { display: none; }
  .rp-chips .rp-fwrap { position: static; }
  .rp-menu { position: fixed; left: 12px; right: 12px; top: auto; max-width: none; }
}
/* Print: only while body.rp-printing is set by the Print button on the Reports overview */
@media print {
  body.rp-printing { background: #fff !important; }
  body.rp-printing #side, body.rp-printing .topbar, body.rp-printing #subnav, body.rp-printing #bottom-nav, body.rp-printing .foot, body.rp-printing .scrim,
  body.rp-printing .ai-fab, body.rp-printing .ai-sheet, body.rp-printing .ai-scrim, body.rp-printing #toast, body.rp-printing .rp-actions, body.rp-printing .rp-bar,
  body.rp-printing .rp-seg, body.rp-printing .rp-toggles, body.rp-printing .rp-more, body.rp-printing .rp-i, body.rp-printing .rp-ctip { display: none !important; }
  body.rp-printing .content, body.rp-printing .page { margin: 0 !important; padding: 0 !important; }
  body.rp-printing .rp-card { break-inside: avoid; box-shadow: none; backdrop-filter: none; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.rp-printing .rp-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
  body.rp-printing .rp-svg { min-width: 0; }
  body.rp-printing .rp-chart-scroll { overflow: visible; }
  body.rp-printing .rp-printfoot { display: block; }
}
.rp-card-head h3 { text-transform: none; letter-spacing: var(--track); color: var(--text); }
/* ---- mkt2 ---- */
/* Marketing calendar, All ads, Marketing dashboard mixed cards, Design → Size measurement (/mod/marketing2.js). Prefix mk2-. */
:root {
  --mk2-post: #01422a; --mk2-camp: #5b3fc4; --mk2-ads: #a86b00;
  --mk2-meta: #2c5bb8; --mk2-tiktok: #c92a5c; --mk2-google: #1d7f86; --mk2-shopee_ads: #d35400; --mk2-kol: #7b5cd6; --mk2-live_host: #8a6d00; --mk2-total: #111412;
  --mk2-day: rgba(255, 255, 255, .62); --mk2-out: rgba(0, 0, 0, .025);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --mk2-post: #6cc497; --mk2-camp: #b7a4ff; --mk2-ads: #f0b44c;
    --mk2-meta: #8fb0ff; --mk2-tiktok: #ff7aa2; --mk2-google: #5fd0d6; --mk2-shopee_ads: #ff9a5c; --mk2-kol: #c3b0ff; --mk2-live_host: #e6c85a; --mk2-total: #edf1ee;
    --mk2-day: rgba(255, 255, 255, .035); --mk2-out: rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --mk2-post: #6cc497; --mk2-camp: #b7a4ff; --mk2-ads: #f0b44c;
  --mk2-meta: #8fb0ff; --mk2-tiktok: #ff7aa2; --mk2-google: #5fd0d6; --mk2-shopee_ads: #ff9a5c; --mk2-kol: #c3b0ff; --mk2-live_host: #e6c85a; --mk2-total: #edf1ee;
  --mk2-day: rgba(255, 255, 255, .035); --mk2-out: rgba(0, 0, 0, .25);
}
.mk2-cal { max-width: 1240px; }
.mk2-cal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 6px 0 10px; }
.mk2-cal-nav { display: flex; align-items: center; gap: 8px; }
.mk2-cal-nav h2 { margin: 0; min-width: 170px; text-align: center; font-size: 18px; }
.mk2-cal-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mk2-cal-tools .seg { min-width: 220px; }
.mk2-cal-tools select { width: auto; margin: 0; }
.mk2-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; font-size: 13px; }
.mk2-leg { display: inline-flex; align-items: center; gap: 7px; margin: 0; cursor: pointer; font-weight: 600; }
.mk2-leg input { width: auto; margin: 0; }
.mk2-leg i { width: 18px; height: 10px; border-radius: 4px; display: inline-block; }
.mk2-leg.mk2-k-post i { background: var(--mk2-post); } .mk2-leg.mk2-k-campaign i { background: var(--mk2-camp); } .mk2-leg.mk2-k-ads i { background: var(--mk2-ads); }
.mk2-ghostleg { cursor: default; color: var(--muted); font-weight: 400; } .mk2-ghostleg i { border: 1.5px dashed var(--muted); }
.mk2-cal-body { overflow-x: auto; transition: opacity .15s; }
.mk2-cal-body.mk2-loading { opacity: .5; }
.mk2-grid { display: grid; gap: 6px; min-width: 700px; }
.mk2-wdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; letter-spacing: .04em; }
.mk2-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); column-gap: 4px; row-gap: 3px; position: relative; }
.mk2-day { background: var(--mk2-day); border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; cursor: pointer; min-width: 0; }
.mk2-day:hover, .mk2-day:focus-visible { border-color: var(--green-ink); outline: none; }
.mk2-day.out { background: var(--mk2-out); } .mk2-day.out .mk2-dnum { opacity: .45; }
.mk2-day.today { border: 2px solid var(--green-ink); } .mk2-day.today .mk2-dnum { color: var(--green-ink); }
.mk2-dnum { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mk2-bar { z-index: 1; align-self: center; height: 22px; margin: 0 3px; padding: 0 8px; border-radius: 7px; border: 0; font-size: 12px; font-weight: 700; line-height: 22px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; box-shadow: none; backdrop-filter: none; min-width: 0; cursor: pointer; }
.mk2-bar.mk2-k-campaign { background: var(--mk2-camp); }
.mk2-bar.mk2-k-ads { background: color-mix(in srgb, var(--mk2-ads) 22%, transparent); color: var(--text); border: 1.5px solid var(--mk2-ads); line-height: 19px; }
.mk2-bar.cl { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; } .mk2-bar.cr { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.mk2-bar.dim { opacity: .55; } .mk2-bar.st-cancelled { text-decoration: line-through; }
.mk2-bar:hover { filter: brightness(1.12); }
:root[data-theme="dark"] .mk2-bar.mk2-k-campaign { color: #160d33; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mk2-bar.mk2-k-campaign { color: #160d33; } }
.mk2-bar.solo { display: block; width: 100%; margin: 4px 0; }
.mk2-posts { z-index: 1; display: flex; flex-direction: column; gap: 3px; padding: 0 5px 6px; min-width: 0; cursor: pointer; }
.mk2-chip { display: flex; align-items: baseline; gap: 5px; width: 100%; min-width: 0; padding: 3px 7px; border-radius: 7px; font-size: 12px; text-align: left; background: var(--raise); border: 1px solid var(--line); border-left: 4px solid var(--mk2-post); box-shadow: none; backdrop-filter: none; color: var(--text); cursor: pointer; }
.mk2-chip:hover { border-color: var(--mk2-post); }
.mk2-chip.done { opacity: .55; } .mk2-chip.due { border-style: solid dotted solid solid; }
.mk2-chip .mk2-time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); flex: none; }
.mk2-chip .mk2-ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mk2-week.tall .mk2-chip { flex-wrap: wrap; } .mk2-week.tall .mk2-chip .mk2-ttl { white-space: normal; }
.mk2-chip .mk2-sub { flex-basis: 100%; font-size: 11px; color: var(--muted); }
.mk2-ghost { border: 1.5px dashed var(--line); border-left: 1.5px dashed var(--muted); background: transparent; color: var(--muted); }
.mk2-more { padding: 2px 6px; font-size: 11.5px; font-weight: 700; background: transparent; border: 0; box-shadow: none; color: var(--green-ink); text-align: left; }
.mk2-agenda-list { display: grid; gap: 10px; max-width: 760px; }
.mk2-agenda { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; gap: 5px; }
.mk2-agenda.today { border: 2px solid var(--green-ink); }
.mk2-agenda-day { display: flex; align-items: center; gap: 6px; } .mk2-agenda-day button { margin-left: auto; }
.mk2-agenda .mk2-chip { flex-wrap: wrap; } .mk2-agenda .mk2-chip .mk2-ttl { white-space: normal; }
.mk2-pop { position: fixed; z-index: 60; display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mk2-pop-day { font-weight: 700; font-size: 13px; }
.mk2-pop button { width: 100%; text-align: left; }
.mk2-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.mk2-cal-foot p { margin: 8px 0 0; }

/* All ads */
.mk2-ads { max-width: 1240px; display: grid; gap: 14px; }
.mk2-ads > details.add { margin: 0; }
.mk2-tiles4 { margin-top: 0; }
.mk2-note { margin: 0; }
.mk2-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 14px; }
.mk2-line { display: block; width: 100%; height: 220px; }
.mk2-area { fill: var(--mk2-total); opacity: .06; }
.mk2-ln { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.mk2-ln.mk2-p-total { stroke-width: 2.6; }
.mk2-dot { fill: var(--mk2-total); }
.mk2-ln.mk2-p-total { stroke: var(--mk2-total); } .mk2-ln.mk2-p-meta { stroke: var(--mk2-meta); } .mk2-ln.mk2-p-tiktok { stroke: var(--mk2-tiktok); } .mk2-ln.mk2-p-google { stroke: var(--mk2-google); }
.mk2-ln.mk2-p-shopee_ads { stroke: var(--mk2-shopee_ads); } .mk2-ln.mk2-p-kol { stroke: var(--mk2-kol); } .mk2-ln.mk2-p-live_host { stroke: var(--mk2-live_host); }
.mk2-dotkey { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; vertical-align: middle; background: var(--muted); }
.mk2-dotkey.mk2-p-total { background: var(--mk2-total); } .mk2-dotkey.mk2-p-meta { background: var(--mk2-meta); } .mk2-dotkey.mk2-p-tiktok { background: var(--mk2-tiktok); } .mk2-dotkey.mk2-p-google { background: var(--mk2-google); }
.mk2-dotkey.mk2-p-shopee_ads { background: var(--mk2-shopee_ads); } .mk2-dotkey.mk2-p-kol { background: var(--mk2-kol); } .mk2-dotkey.mk2-p-live_host { background: var(--mk2-live_host); }
.mk2-keys { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.mk2-hbars { display: grid; gap: 12px; }
.mk2-hb { display: grid; grid-template-columns: minmax(100px, 150px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.mk2-hb-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk2-hb-bars { display: grid; gap: 4px; }
.mk2-hb-track { display: block; height: 9px; border-radius: 999px; background: var(--dsh-track); overflow: hidden; }
.mk2-hb-track i { display: block; height: 100%; border-radius: 999px; }
.mk2-hb-track i.sp, .mk2-hb-legend i.sp { background: var(--mk2-ads); } .mk2-hb-track i.rv, .mk2-hb-legend i.rv { background: var(--green-ink); }
.mk2-hb-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.mk2-hb-legend { display: flex; gap: 14px; } .mk2-hb-legend i { display: inline-block; width: 14px; height: 8px; border-radius: 4px; margin-right: 6px; }
.mk2-import { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; grid-column: 1 / -1; }
.mk2-import h3 { margin: 0 0 4px; font-size: 14px; }

/* Marketing dashboard: mixed cards (between the KPI tiles and the list / suggestions) */
.dsh-more:empty { display: none; }
.mk2-mix { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.mk2-mix-up { grid-column: span 3; } .mk2-mix-cp { grid-column: span 3; } .mk2-mix-codes { grid-column: span 2; } .mk2-mix-email { grid-column: span 2; } .mk2-mix-cr { grid-column: span 2; }
.mk2-stages { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.mk2-stage { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--dsh-yellow); color: var(--dsh-ink); border: 1px solid var(--dsh-outline); }
.mk2-stage.zero { background: transparent; color: var(--muted); border-color: var(--line); }
.mk2-uplist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mk2-uplist li { border-left: 4px solid var(--mk2-post); border-radius: 6px; background: var(--raise); }
.mk2-uplist a { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 0 10px; padding: 7px 10px; text-decoration: none; color: var(--text); font-size: 13px; }
.mk2-uplist a .muted { grid-column: 2; }
.mk2-upday { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; grid-row: span 2; }
.mk2-upttl { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk2-bigline { font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.mk2-kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.mk2-kv b { font-variant-numeric: tabular-nums; }

/* Design → Size measurement */
.mk2-tpl button { min-width: 96px; }
.mk2-sc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 1fr); gap: 16px; align-items: start; max-width: 1280px; }
.mk2-sc-left, .mk2-sc-right { display: grid; gap: 14px; min-width: 0; }
.mk2-sc .card { margin: 0; }
.mk2-sticky { position: sticky; top: 12px; }
.mk2-sc-scroll { overflow-x: auto; }
.mk2-sc-table { border-collapse: separate; border-spacing: 4px; min-width: 100%; }
.mk2-sc-table th { font-size: 12px; font-weight: 700; text-align: left; color: var(--muted); vertical-align: bottom; padding: 0 2px; min-width: 92px; }
.mk2-sc-table th:first-child { min-width: 70px; }
.mk2-sc-table td { padding: 0; }
.mk2-sc-table input { margin: 0; padding: 7px 8px; font-variant-numeric: tabular-nums; min-width: 0; width: 100%; }
.mk2-sc-table input.mk2-size { font-weight: 700; width: 70px; }
.mk2-sc-table input.mk2-val { text-align: center; }
.mk2-sc-table input.bad { border-color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); }
.mk2-colhead { display: flex; flex-direction: column; gap: 2px; }
.mk2-colbtns { display: flex; gap: 2px; } .mk2-colbtns button { padding: 1px 6px; font-size: 11px; }
.mk2-rowbtns { white-space: nowrap; } .mk2-rowbtns button { padding: 3px 7px; font-size: 12px; }
.mk2-sc-edit .row select { width: auto; margin: 0; }
.mk2-sc-opts { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 10px; }
.mk2-sc-opts .seg { min-width: 120px; }
.mk2-sc-preview { display: flex; justify-content: center; background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 10px; margin-bottom: 10px; }
.mk2-sc-preview canvas { display: block; width: 100%; max-width: 460px; height: auto; border-radius: 10px; box-shadow: var(--shadow); }
.mk2-sc-preview canvas.portrait { max-width: 400px; }
.mk2-results { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.mk2-prod { max-width: 100%; }
.mk2-dirty { align-self: center; }
@media (max-width: 1100px) { .mk2-sc { grid-template-columns: minmax(0, 1fr); } .mk2-sticky { position: static; } .mk2-mix { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mk2-mix > * { grid-column: span 1; } .mk2-mix-up, .mk2-mix-cp { grid-column: 1 / -1; } }
@media (max-width: 900px) { .mk2-two { grid-template-columns: minmax(0, 1fr); } .mk2-line { height: 180px; } }
@media (max-width: 700px) {
  .mk2-mix { grid-template-columns: minmax(0, 1fr); } .mk2-mix > * { grid-column: 1 / -1; }
  .mk2-cal-nav h2 { min-width: 0; font-size: 16px; } .mk2-cal-tools, .mk2-cal-tools .seg { width: 100%; } .mk2-cal-tools select { width: 100%; }
  .mk2-hb { grid-template-columns: minmax(0, 1fr) auto; } .mk2-hb-bars { grid-column: 1 / -1; grid-row: 2; }
  .mk2-uplist a { grid-template-columns: minmax(0, 1fr); } .mk2-uplist a .muted { grid-column: 1; } .mk2-upday { grid-row: auto; }
}
.mk2-ads-add { margin-bottom: 14px; }

/* ---- exp ---- */
/* Export dialog (CSV / Excel / PDF), Filter-by panel + chips, EasyStore-style home page. Classes start with ex-. */
:root { --ex-red: #f8d9d4; --ex-green: #d7ecdf; --ex-warn: #a86b00; }
:root[data-theme="dark"] { --ex-red: #3d211e; --ex-green: #183026; --ex-warn: #f0b44c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ex-red: #3d211e; --ex-green: #183026; --ex-warn: #f0b44c; } }

/* --- export dialog --- */
dialog.ex-dlg { width: min(480px, 94vw); padding: 22px; background: var(--surface-solid); }
dialog.ex-dlg h2 { margin: 0 0 12px; font-size: 18px; }
.ex-field { border: 0; padding: 0; margin: 0 0 12px; }
.ex-field legend { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; padding: 0; }
.ex-radios { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-radio { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); color: var(--text); font-size: 14px; cursor: pointer; }
.ex-radio:has(input:checked) { border-color: var(--green-ink); background: var(--green-soft); font-weight: 700; }
.ex-radio input { margin: 0; accent-color: var(--green); }
.ex-note { margin: 2px 0 8px; } .ex-status { min-height: 18px; margin: 6px 0; font-size: 13px; }
.ex-extra .row { gap: 8px; margin-bottom: 8px; }

/* --- filter chips row + right-side sheet --- */
.ex-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 10px 0 12px; }
.ex-toolbar > label { margin: 0; flex: 1 1 260px; max-width: 420px; }
.ex-toolbar > label:last-child { flex: 0 0 auto; }
.ex-toolbar select { margin-top: 0; }
input.ex-search { display: block; width: 100%; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--input); border: 1px solid var(--line); outline: none; }
.ex-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 10 1 360px; min-width: 0; }
.ex-chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; font-size: 13px; line-height: 1.3; border: 1px dashed var(--line); background: transparent; color: var(--text); box-shadow: none; backdrop-filter: none; white-space: nowrap; cursor: pointer; }
.ex-chip.on { border-style: solid; border-color: var(--green-ink); background: var(--green-soft); padding: 0 4px 0 0; }
.ex-chip-all.on { padding: 6px 12px; font-weight: 700; }
.ex-chip-main { padding: 6px 4px 6px 12px; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; font-size: 13px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; border-radius: 999px; }
.ex-chip-main b { font-weight: 700; }
.ex-chip-x { padding: 2px 8px; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; font-size: 16px; line-height: 1; border-radius: 999px; color: var(--muted); }
.ex-chip-x:hover { color: var(--red); }
.ex-add { position: relative; }
.ex-add > summary { list-style: none; color: var(--green-ink); font-weight: 700; border-color: transparent; }
.ex-add > summary::-webkit-details-marker { display: none; }
.ex-add-list { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 220px; max-height: 340px; overflow-y: auto; padding: 6px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; }
.ex-add-list button { text-align: left; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; box-shadow: none; backdrop-filter: none; font-size: 14px; }
.ex-add-list button:hover { background: var(--green-soft); }
.ex-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .35); backdrop-filter: blur(2px); }
.ex-sheet { position: fixed; z-index: 81; top: 0; right: 0; bottom: 0; width: min(400px, 100vw); display: flex; flex-direction: column; background: var(--surface-solid); border-left: 1px solid var(--line); box-shadow: -12px 0 40px rgba(0, 0, 0, .18); }
.ex-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.ex-sheet-head h2 { margin: 0; font-size: 18px; }
.ex-x { width: 36px; height: 36px; padding: 0; font-size: 22px; line-height: 1; border-radius: 50%; }
.ex-sheet-body { flex: 1; overflow-y: auto; padding: 4px 18px 12px; overscroll-behavior: contain; }
.ex-sheet-foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.ex-sheet-foot button { flex: 1; }
.ex-fsec { border-bottom: 1px solid var(--line); }
.ex-fsec > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 14px; }
.ex-fsec > summary::-webkit-details-marker { display: none; }
.ex-fsec > summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 18px; }
.ex-fsec[open] > summary::after { content: "–"; }
.ex-fcount { margin-left: auto; font-weight: 400; font-size: 12px; color: var(--green-ink); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-fbody { padding: 0 0 14px; }
.ex-fopts { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; }
.ex-fopt { display: flex; align-items: center; gap: 10px; margin: 0; padding: 7px 4px; font-size: 14px; color: var(--text); border-radius: 8px; cursor: pointer; }
.ex-fopt:hover { background: var(--glass); }
.ex-fopt input { margin: 0; width: 17px; height: 17px; accent-color: var(--green); flex: none; }
.ex-frange { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ex-fin { margin: 0; }
.ex-fin input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: var(--input); border: 1px solid var(--line); }
html.ex-sheet-open { overflow: hidden; }
.ex-flag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--glass); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.ex-flag.warn { color: var(--ex-warn); border-color: currentColor; }

/* --- home --- */
.ex-home { max-width: 1240px; display: grid; gap: 16px; }
.ex-home > * { margin: 0; min-width: 0; }
.ex-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; border-radius: 22px; overflow: hidden; background: rgba(255, 255, 255, .14);
  background-image: linear-gradient(135deg, #01422a, #0b5a3b); color: #fff; box-shadow: var(--shadow); }
.ex-hstat { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; color: #fff; text-decoration: none; background: rgba(1, 66, 42, .55); min-width: 0; }
.ex-hstat:hover { background: rgba(255, 255, 255, .08); }
.ex-hstat .k { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.ex-hstat b { font-size: 30px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ex-hstat .s { font-size: 12px; opacity: .85; min-height: 16px; }
.ex-hstat .ex-chg.up { color: #b9f3cf; } .ex-hstat .ex-chg.down { color: #ffc4bf; } .ex-hstat .ex-chg.flat { color: inherit; }
.ex-period-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.ex-period { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ex-period button { flex: none; padding: 7px 14px; font-size: 13px; white-space: nowrap; }
.ex-card { background: var(--dsh-card); border: 1.5px solid var(--dsh-outline); border-radius: 22px; padding: 18px; min-width: 0; }
.ex-card > h2, .ex-card-head h2 { margin: 0 0 12px; font-size: 16px; }
.ex-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ex-chg { font-size: 12px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ex-chg.up { color: var(--green-ink); } .ex-chg.down { color: var(--red); } .ex-chg.flat { color: var(--muted); }

/* "To post today / Belum pos" */
.ex-post { border-width: 2px; border-color: var(--green-ink); }
.ex-post.late { border-color: var(--ex-warn); }
.ex-post-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ex-post-head h2 { margin: 0; font-size: 19px; }
.ex-post-head p { margin: 4px 0 0; }
.ex-bm { color: var(--muted); font-weight: 600; }
.ex-post-total { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.ex-post-total b { font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.ex-pbuckets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0 6px; }
.ex-pb { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--dsh-ink); border: 1.5px solid var(--dsh-outline); min-width: 0; }
.ex-pb b { font-size: 22px; font-variant-numeric: tabular-nums; }
.ex-pb span { font-size: 12px; }
.ex-pb.b0 { background: var(--ex-green); } .ex-pb.b1 { background: var(--dsh-yellow); } .ex-pb.b2, .ex-pb.b3 { background: var(--ex-red); } .ex-pb.bp { background: var(--dsh-lilac); }
.ex-pb.zero { opacity: .55; }
.ex-pb:hover { filter: brightness(.97); }
.ex-sub { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ex-plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; margin-bottom: 6px; }
.ex-prow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--text); text-decoration: none; }
.ex-prow:hover { border-color: var(--green-ink); }
.ex-pno { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ex-age { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--ex-green); color: var(--dsh-ink); }
.ex-age.a1 { background: var(--dsh-yellow); } .ex-age.a2, .ex-age.a3 { background: var(--ex-red); } .ex-age.ap { background: var(--dsh-lilac); }
.ex-ok { margin: 10px 0; font-weight: 700; color: var(--green-ink); }
.ex-social { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; }
.ex-social-card .ex-social { margin: 0; padding: 0; border: 0; }
.ex-social-k { font-weight: 700; }
.ex-social-list { flex-basis: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-post .row.left { margin-top: 10px; }
a.btn.small { padding: 7px 14px; font-size: 13px; text-decoration: none; }

/* chart cards */
.ex-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ex-chart { display: flex; flex-direction: column; gap: 4px; }
.ex-chart-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ex-chart-top .k { font-size: 13px; font-weight: 700; color: var(--muted); }
.ex-big { font-size: 28px; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
svg.ex-line { width: 100%; height: 120px; margin-top: 8px; overflow: visible; }
.ex-line .ex-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ex-line polyline { fill: none; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ex-line .ex-prev { stroke: var(--muted); stroke-width: 1.5; opacity: .35; }
.ex-line .ex-cur { stroke: var(--green-ink); stroke-width: 2.5; }
.ex-line .ex-rest { stroke: var(--green-ink); stroke-width: 1.5; stroke-dasharray: 3 4; opacity: .55; }
.ex-line .ex-pt { fill: var(--green-ink); }
.ex-axis { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ex-legend { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; }
.ex-lg { display: inline-block; width: 14px; height: 0; border-top: 2.5px solid var(--green-ink); margin-left: 6px; }
.ex-lg.prev { border-top: 1.5px solid var(--muted); opacity: .5; }

/* channels table */
.ex-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.ex-dot-website { background: #01422a; } .ex-dot-pos { background: #6b716d; } .ex-dot-shopee { background: #f05d2e; } .ex-dot-tiktok { background: #111; }
.ex-dot-lazada { background: #1a2ea8; } .ex-dot-wholesale { background: #b9a26a; } .ex-dot-dropship { background: #8a6d2a; } .ex-dot-custom { background: #4a73b8; }
:root[data-theme="dark"] .ex-dot-website { background: #6cc497; } :root[data-theme="dark"] .ex-dot-tiktok { background: #f2f4ef; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ex-dot-website { background: #6cc497; } :root:not([data-theme="light"]) .ex-dot-tiktok { background: #f2f4ef; } }
.ex-tablewrap { overflow-x: auto; }
.ex-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ex-table th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ex-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.ex-table tr:last-child td { border-bottom: 0; }
.ex-table .num { text-align: right; white-space: nowrap; }
.ex-table tr.ex-zero td { color: var(--muted); }
.ex-chname { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.ex-share { display: inline-flex; align-items: center; gap: 8px; min-width: 130px; }
.ex-bar { display: block; flex: 1; height: 8px; border-radius: 999px; background: var(--dsh-track); overflow: hidden; min-width: 60px; }
.ex-bar i { display: block; height: 100%; border-radius: 999px; background: var(--green-ink); }

/* pastel tiles */
.ex-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ex-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 18px; border: 1.5px solid var(--dsh-outline); color: var(--dsh-ink); text-decoration: none; min-width: 0; }
a.ex-tile:hover { filter: brightness(.97); }
.ex-tile .k { font-size: 13px; }
.ex-tile b { font-size: 26px; font-variant-numeric: tabular-nums; }
.ex-tile.yellow { background: var(--dsh-yellow); } .ex-tile.lilac { background: var(--dsh-lilac); } .ex-tile.sky { background: var(--dsh-sky); }
.ex-tile.green { background: var(--ex-green); } .ex-tile.red { background: var(--ex-red); }
.ex-yourday { margin: 8px 0 0; font-size: 16px; }

@media (max-width: 1000px) { .ex-charts { grid-template-columns: minmax(0, 1fr); } .ex-pbuckets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .ex-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: 18px; }
  .ex-hstat { padding: 14px; } .ex-hstat b { font-size: 24px; }
  .ex-card { padding: 14px; border-radius: 18px; }
  .ex-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ex-tile b { font-size: 22px; }
  .ex-pbuckets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ex-post-total b { font-size: 32px; }
  .ex-plist { grid-template-columns: minmax(0, 1fr); }
  .ex-table thead { display: none; }
  .ex-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ex-table td { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; border: 0; text-align: right; }
  .ex-table td::before { content: attr(data-l); color: var(--muted); font-size: 12px; text-align: left; }
  .ex-table td:first-child { grid-column: 1 / -1; } .ex-table td:first-child::before { content: none; }
  .ex-share { min-width: 0; }
  .ex-toolbar > label { flex-basis: 100%; max-width: none; }
  .ex-sheet { width: 100vw; }
}

/* --- PDF print view: only while body.ex-printing is set (by /mod/export.js), so no other module's printing changes --- */
.ex-print { display: none; }
@page ex-land {
  size: A4 landscape; margin: 11mm 10mm 13mm;
  @bottom-left { content: "SOBACO OS"; font: 8px Helvetica, Arial, sans-serif; color: #666; }
  @bottom-right { content: counter(page) " / " counter(pages); font: 8px Helvetica, Arial, sans-serif; color: #666; }
}
@media print {
  body.ex-printing { background: #fff !important; }
  body.ex-printing > *:not(.ex-print) { display: none !important; }
  body.ex-printing .ex-print { display: block !important; page: ex-land; color: #000; background: #fff; font: 8.5px/1.3 Helvetica, Arial, sans-serif; letter-spacing: 0; }
  body.ex-printing .ex-print, body.ex-printing .ex-print * { visibility: visible !important; }
  body.ex-printing .ex-phead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; border-bottom: 2px solid #01422a; padding-bottom: 6px; margin-bottom: 6px; }
  body.ex-printing .ex-pbrand { font-weight: 800; font-size: 11px; letter-spacing: .12em; color: #01422a; }
  body.ex-printing .ex-phead h1 { margin: 2px 0 0; font-size: 16px; }
  body.ex-printing .ex-pmeta { text-align: right; color: #444; }
  body.ex-printing .ex-pfilters { margin: 0 0 4px; color: #333; }
  body.ex-printing .ex-ptable { width: 100%; border-collapse: collapse; margin-top: 6px; }
  body.ex-printing .ex-ptable thead { display: table-header-group; }
  body.ex-printing .ex-ptable tr { break-inside: avoid; page-break-inside: avoid; }
  body.ex-printing .ex-ptable th { background: #dfe9e2; color: #111; text-align: left; white-space: normal; text-transform: none; letter-spacing: 0; font-size: 8px; font-weight: 700; padding: 3px 4px; border: .5px solid #9aa79f; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.ex-printing .ex-ptable td { font-size: 8.5px; line-height: 1.3; color: #000; padding: 2.5px 4px; border: .5px solid #c9cfcb; vertical-align: top; overflow-wrap: break-word; word-break: normal; hyphens: none; }
  body.ex-printing .ex-ptable tbody tr:nth-child(even) td { background: #f6f7f5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.ex-printing .ex-ptable .num { text-align: right; white-space: nowrap; }
}
/* ---- one look for every dashboard, report and infographic (same as the category dashboards) ---- */
.money-grid { gap: 16px; }
.money-card { color: var(--dsh-ink); background: var(--dsh-yellow) !important; border: 1.5px solid var(--dsh-outline); border-radius: 22px; box-shadow: none; padding: 18px; }
.money-card::after { display: none; }
.money-card.c2 { background: var(--dsh-lilac) !important; }
.money-card.c3 { background: var(--dsh-sky) !important; }
.money-card.c4 { background: var(--dsh-card) !important; }
.money-card .k { display: inline-block; width: fit-content; opacity: 1; padding: 4px 11px; border-radius: 999px; background: var(--dsh-pill); color: var(--dsh-pill-text); font-size: 12px; font-weight: 700; }
.money-card .v { font-size: 30px; font-weight: 800; margin-top: 12px; color: var(--dsh-ink); }
.money-card .muted { color: var(--dsh-ink-soft); }
.stats { gap: 12px; }
.stat { background: var(--dsh-card); border: 1.5px solid var(--dsh-outline); border-radius: 18px; padding: 12px 16px; box-shadow: none; color: var(--text); }
a.stat { text-decoration: none; }
.two-col { gap: 16px; }
.two-col > .card, .page > div > .card:has(.bars), .page .card:has(.bar-pair), .page .card:has(.hbar) {
  background: var(--dsh-card); border: 1.5px solid var(--dsh-outline); border-radius: 22px; box-shadow: none; }
.todo { border-radius: 14px; border: 1.5px solid var(--line); background: var(--dsh-card); }
.todo.hot { border-color: var(--dsh-outline); }
.page > div > table, .page > table { border-radius: 18px; }
@media (max-width: 900px) { .money-grid { grid-template-columns: 1fr 1fr; } .money-card .v { font-size: 22px; } }
/* home hero row: four pastel cards like the category dashboards (was one green block) */
.ex-hero { gap: 16px; background: transparent !important; background-image: none !important; box-shadow: none; overflow: visible; border-radius: 0; color: var(--dsh-ink); }
.ex-hstat { background: var(--dsh-yellow) !important; border: 1.5px solid var(--dsh-outline); border-radius: 22px; color: var(--dsh-ink); padding: 18px; }
.ex-hstat:nth-child(2) { background: var(--dsh-lilac) !important; } .ex-hstat:nth-child(3) { background: var(--dsh-sky) !important; } .ex-hstat:nth-child(4) { background: var(--dsh-card) !important; }
.ex-hstat:hover { filter: brightness(.98); }
.ex-hstat .k { display: inline-block; width: fit-content; padding: 4px 11px; border-radius: 999px; background: var(--dsh-pill); color: var(--dsh-pill-text); opacity: 1; text-transform: none; letter-spacing: 0; font-weight: 700; }
.ex-hstat b { margin-top: 8px; color: var(--dsh-ink); }
.ex-hstat .s { color: var(--dsh-ink-soft); opacity: 1; }
.ex-hstat .ex-chg.up { color: var(--green-ink); } .ex-hstat .ex-chg.down { color: var(--red); }
.ex-post { border-width: 1.5px; border-color: var(--dsh-outline); }
@media (max-width: 900px) { .ex-hero { gap: 10px; border-radius: 0; } }

/* Report, insight and dashboard pages: every card gets the dashboard outline look */
body[data-group="records"] .page .card, body[data-group="home"] .page .card, .page .card:has(> .dsh-card-head),
body[data-group="records"] .page section.card { background: var(--dsh-card); border: 1.5px solid var(--dsh-outline); border-radius: 22px; box-shadow: none; }
body[data-group="records"] .page .card.wide { max-width: none; }

/* ---- studio ---- */
/* Content Studio (public/mod/studio.js). Platform colours are plain dots + text — no third-party logos. */
.st-plat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.st-plat i, .st-pdot, .st-cdot i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.st-dot-tiktok i, .st-pdot.st-dot-tiktok { background: #111; box-shadow: 0 0 0 2px #25f4ee55; }
:root[data-theme="dark"] .st-dot-tiktok i, :root[data-theme="dark"] .st-pdot.st-dot-tiktok { background: #f2f2f2; }
.st-dot-shopee_product i, .st-pdot.st-dot-shopee_product { background: #ee4d2d; }
.st-dot-shopee_video i, .st-pdot.st-dot-shopee_video { background: #f7a23b; }
.st-dot-instagram i, .st-pdot.st-dot-instagram { background: #c13584; }
.st-dot-facebook i, .st-pdot.st-dot-facebook { background: #1877f2; }
.st-pdot.st-ps-posted { outline: 2px solid var(--green-ink); outline-offset: 1px; }
.st-pdot.st-ps-failed { outline: 2px solid var(--red); outline-offset: 1px; }
.st-badge { display: inline-block; }
.st-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); background: var(--glass); color: var(--text); cursor: pointer; }
.st-chip b { font-variant-numeric: tabular-nums; }
.st-chip.active { border-color: var(--green-ink); color: var(--green-ink); background: var(--green-soft); }
.st-chip:disabled { opacity: .5; cursor: default; }
.st-x { border: 0; background: transparent; padding: 0 2px; font-size: 15px; line-height: 1; cursor: pointer; color: inherit; box-shadow: none; }
.st-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; padding: 3px 7px; border-radius: 8px; background: var(--glass); border: 1px solid var(--line); word-break: break-all; }
.st-lbl { font-size: 13px; color: var(--muted); margin: 6px 0 6px; }
.st-warn { color: var(--amber); margin: 4px 0; }
.st-ok { color: var(--green-ink); font-weight: 700; }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.st-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: end; }
.st-layout .btn.ghost, .st-top .btn.ghost, .st-posts .btn.ghost, .st-mcard .btn.ghost { background: var(--glass); color: var(--text); border: 1px solid var(--line); font-weight: 600; }
.st-back { display: inline-block; margin-bottom: 6px; color: var(--muted); text-decoration: none; }
/* upload */
.st-top { max-width: none; display: grid; gap: 12px; }
.st-drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 22px 16px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: copy; transition: border-color .15s, background .15s; }
.st-drop.st-over { border-color: var(--green-ink); background: var(--green-soft); }
.st-queue { display: grid; gap: 8px; }
.st-queue:empty { display: none; }
.st-qrow { display: grid; gap: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.st-qtop { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.st-qname { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-qwarn { color: var(--amber); }
.st-qdone .st-bar i { background: var(--green-ink); }
.st-qfail { border-color: var(--red); }
.st-bar { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.st-bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width .2s; }
.st-tg:empty { display: none; }
/* list */
.st-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.st-fdet { margin: 0 0 12px; }
.st-fdet > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 4px 0; }
.st-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 10px; align-items: end; margin-top: 8px; }
.st-seg { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; justify-self: start; }
.st-seg button { border: 0; border-radius: 0; box-shadow: none; padding: 8px 14px; background: transparent; }
.st-seg button.active { background: var(--green); color: #fff; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.st-card { display: grid; text-decoration: none; color: var(--text); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); transition: transform .12s, border-color .12s; }
.st-card:hover { transform: translateY(-2px); border-color: var(--green-ink); }
.st-k-failed { border-color: var(--red); }
.st-thumb { position: relative; display: block; aspect-ratio: 9 / 16; background: #0d100e; overflow: hidden; max-height: 300px; }
.st-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-noimg { display: grid; place-items: center; height: 100%; color: #8b938e; font-size: 30px; }
.st-dur, .st-count { position: absolute; bottom: 8px; right: 8px; padding: 2px 7px; border-radius: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-count { right: auto; left: 8px; }
.st-cbody { display: grid; gap: 6px; padding: 10px 12px 12px; }
.st-ctitle { font-weight: 700; font-size: 14px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.st-cmeta, .st-cplats { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.st-col { display: grid; align-content: start; gap: 10px; padding: 10px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); scroll-snap-align: start; min-height: 120px; }
.st-col h3 { display: flex; justify-content: space-between; margin: 0 2px; font-size: 13px; }
.st-col .st-thumb { aspect-ratio: 16 / 10; }
/* one post */
.st-layout { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 16px; align-items: start; }
.st-colA, .st-colB { display: grid; gap: 16px; min-width: 0; }
.st-layout .card { margin: 0; padding: 18px; }
.st-layout h2 { margin: 0 0 10px; font-size: 16px; }
.st-stage { display: grid; gap: 8px; border-radius: 14px; overflow: hidden; background: #0d100e; }
.st-stage video, .st-stage img { width: 100%; max-height: 70vh; display: block; object-fit: contain; background: #000; }
.st-stage.st-empty { min-height: 220px; place-items: center; }
.st-strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; }
.st-mthumb { width: 54px; height: 72px; padding: 0; border-radius: 10px; overflow: hidden; flex: none; display: grid; place-items: center; }
.st-mthumb img { width: 100%; height: 100%; object-fit: cover; }
.st-mthumb.active { outline: 2px solid var(--green-ink); }
.st-mcard label.btn { margin-top: 8px; }
.st-pchips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.st-plats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 12px; margin-bottom: 8px; }
.st-tick { padding: 5px 0; }
.st-details textarea, .st-capcard textarea, .card textarea[name=hashtags] { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 12px; background: var(--input); border: 1px solid var(--line); color: var(--text); font: inherit; resize: vertical; }
.st-caphead { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.st-caphead label { margin: 0; }
.st-caphead select { width: auto; }
.st-caps { display: grid; gap: 12px; margin: 10px 0; }
.st-caph { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.st-caph strong { font-size: 13px; }
.st-caph button { margin-left: auto; }
.st-hooks, .st-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.st-hooks:empty { display: none; }
.st-hist { margin-top: 10px; }
.st-hist summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.st-hrow { padding: 8px 0; border-top: 1px solid var(--line); }
.st-pre { white-space: pre-wrap; font: inherit; font-size: 13px; margin: 4px 0; }
.st-prow { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); }
.st-prow:first-of-type { border-top: 0; }
.st-phead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-prow .row { margin-top: 4px; }
.st-prow.st-ps-failed .st-phead .badge { color: var(--red); }
/* connections */
.st-chead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.st-chead h2 { margin: 0; }
.st-cdot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); }
.st-c-on i { background: #2fa36b; } .st-c-on { color: var(--green-ink); }
.st-c-part i { background: var(--amber); } .st-c-part { color: var(--amber); }
.st-c-off i { background: var(--muted); }
.st-secrets { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.st-secrets li.ok { color: var(--green-ink); }
.st-copyrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.st-links { margin: 0 0 8px; padding-left: 18px; font-size: 13px; }
.st-evs { display: flex; flex-wrap: wrap; gap: 0 16px; }
.st-secret { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--amber); margin: 8px 0; }
.st-doc { color: var(--muted); border-left: 3px solid var(--line); padding-left: 10px; }
.st-home .row { justify-content: flex-start; }
@media (max-width: 900px) {
  .st-layout { grid-template-columns: 1fr; }
  .st-three { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .st-upload-big { display: flex; justify-content: center; width: 100%; padding: 18px 16px; font-size: 17px; border-radius: 16px; }
  .page-head:has(.st-upload-big) > .row { width: 100%; }
  .st-drop { display: none; }
  .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .st-thumb { max-height: 240px; }
  .st-two { grid-template-columns: 1fr 1fr; }
  .st-board { grid-auto-columns: 78%; }
}

/* ---- integ ---- */
.ig-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 8px 0 4px; max-width: 900px; }
.ig-tile { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; }
.ig-tile:hover { border-color: var(--green-ink); }
.ig-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ig-head h2, .ig-head h3 { margin: 0; }
.ig-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.ig-dot i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.ig-dot.ig-connected { color: var(--green-ink); } .ig-dot.ig-connected i { background: #1f9d55; }
.ig-dot.ig-needs_setup { color: var(--amber); } .ig-dot.ig-needs_setup i { background: var(--amber); }
.ig-dot.ig-error { color: var(--red); } .ig-dot.ig-error i { background: var(--red); }
.ig-dot.ig-off i { background: transparent; border: 1.5px solid var(--muted); }
.ig-err { color: var(--red); }
.ig-warn { color: var(--amber); }
.ig-key { max-width: 900px; }
.ig-card h3 { margin-top: 14px; font-size: 15px; }
.ig-sub { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; background: var(--glass); }
.ig-ticks { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 6px 0; }
.ig-evs .tick { padding: 3px 0; }
.ig-grid2, .ig-grid3 { display: grid; gap: 8px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.ig-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ig-end { align-self: end; padding-bottom: 6px; }
.ig-copy { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.ig-copy code, .ig-pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: 0; background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; word-break: break-all; max-width: 100%; }
.ig-pre { white-space: pre-wrap; margin: 6px 0; padding: 8px 10px; }
.ig-break { word-break: break-all; }
.ig-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.ig-docs a { color: var(--green-ink); }
.ig-lbl { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 8px; }
.ig-free ul { margin: 0; padding-left: 18px; } .ig-free li { margin: 6px 0; } .ig-free a { color: var(--green-ink); }
.ig-modal { border: 0; padding: 0; background: transparent; max-width: min(560px, 94vw); width: 100%; }
.ig-modal::backdrop { background: rgba(0, 0, 0, .45); }
.ig-modal-card { margin: 0; max-height: 86vh; overflow: auto; background: var(--surface-solid); }
.ig-modal-card label { display: block; margin: 8px 0; }
.ig-rates { margin: 8px 0; }
@media (max-width: 700px) { .ig-grid2, .ig-grid3 { grid-template-columns: 1fr; } .ig-tiles { grid-template-columns: 1fr 1fr; } }

/* ---- market ---- */
/* Marketplaces overview (#marketplaces) + summary card on Integrations. Status dots reuse .ig-dot. */
.mk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 8px 0 4px; max-width: 900px; }
.mk-tile { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); text-decoration: none; color: inherit; }
.mk-tile:hover { border-color: var(--green-ink); }
.mk-card h3 { margin-top: 14px; font-size: 15px; }
.mk-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.mk-stat { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.mk-stat b { font-size: 20px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mk-stat span { font-size: 12px; color: var(--muted); }
.mk-stat.mk-bad b { color: var(--amber); }
.mk-acts { flex-wrap: wrap; gap: 6px; }
.mk-details { margin: 8px 0; border-top: 1px solid var(--line); padding-top: 8px; }
.mk-details summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.mk-copy { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.mk-copy code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--input); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; word-break: break-all; max-width: 100%; }
.mk-log { margin: 6px 0 0; padding-left: 18px; font-size: 13px; } .mk-log li { margin: 3px 0; }
.mk-rules ol { margin: 0; padding-left: 20px; } .mk-rules li { margin: 6px 0; }
.mk-disabled { opacity: .5; pointer-events: none; }
.mk-file { max-width: 100%; }
@media (max-width: 700px) { .mk-tiles { grid-template-columns: 1fr 1fr; } .mk-stats { grid-template-columns: 1fr 1fr; } }
/* ---- studio2 ---- */
.st2-upload { font-size: 17px; padding: 14px 22px; border-radius: 14px; min-height: 52px; }
.st2-top { display: grid; gap: 12px; }
.st2-sheet { display: grid; gap: 10px; border: 2px solid var(--green-ink); }
.st2-sheet textarea, .st2-sheet select, .st2-sheet input[type=date] { width: 100%; }
.st2-pickrow .btn { width: 100%; justify-content: center; min-height: 52px; font-size: 16px; }
.st2-files { display: grid; gap: 2px; }
.st2-fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st2-sug, .st2-sizes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st2-go { min-height: 48px; flex: 1; }
.st2-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; }
.st2-meter { margin: 6px 0; }
.st2-warnbar i { background: var(--amber); }
.st2-ideagrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); margin-top: 8px; }
.st2-idea { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.st2-ideacard summary { cursor: pointer; }
.st2-after { color: var(--green-ink); margin-top: 4px; }
.st2-calnav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.st2-calnav .st-seg { margin-left: auto; }
.st2-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.st2-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.st2-wd { text-align: center; padding: 2px 0; }
.st2-day { min-height: 92px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; display: flex; flex-direction: column; gap: 3px; background: var(--surface); overflow: hidden; }
.st2-cal-week .st2-day { min-height: 180px; }
.st2-out { opacity: .45; }
.st2-today { border-color: var(--green-ink); box-shadow: inset 0 0 0 1px var(--green-ink); }
.st2-over { background: var(--green-soft); }
.st2-dnum { color: var(--muted); }
.st2-ev { display: block; font-size: 11px; line-height: 1.25; padding: 3px 5px; border-radius: 6px; text-decoration: none; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: grab; border-left: 3px solid var(--muted); background: var(--glass); }
.st2-evt { font-variant-numeric: tabular-nums; color: var(--muted); }
.st2-ph { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; border-left: 3px solid var(--muted); background: var(--glass); }
.st2-ph-idea { border-left-color: #9a8cd8; }
.st2-ph-uploaded { border-left-color: var(--muted); }
.st2-ph-caption_ready { border-left-color: var(--blue); }
.st2-ph-in_review { border-left-color: var(--amber); }
.st2-ph-approved { border-left-color: #3a9b6c; }
.st2-ph-scheduled { border-left-color: var(--green-ink); }
.st2-ph-posting { border-left-color: var(--blue); }
.st2-ph-posted { border-left-color: var(--green-ink); background: var(--green-soft); }
.st2-ph-failed { border-left-color: var(--red); }
.st2-sgrow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.st2-conf { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.st2-conf.mid { color: var(--amber); }
.st2-conf.hi { color: var(--green-ink); }
.st2-ok { color: var(--green-ink); }
.st2-prod { display: grid; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.st2-prod h3 { margin: 0 0 4px; }
.st2-fact { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; gap: 8px; align-items: center; }
.st2-fact input { width: 100%; }
.st2-fv { overflow-wrap: anywhere; }
.st2-ins { white-space: nowrap; }
.st2-low { border-color: var(--amber); color: var(--amber); }
.st2-chart table { font-size: 12px; }
.st2-brow { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.st2-bopen { border-color: var(--amber); }
.st2-bprod { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st2-done { font-weight: 600; }
.st2-act { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; max-height: 260px; overflow: auto; }
.st2-cmt { padding: 8px 10px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); margin-bottom: 6px; }
.st2-cmt.mine { border-color: var(--green-ink); }
.st2-cbody { white-space: pre-wrap; overflow-wrap: anywhere; }
.st2-comments textarea { width: 100%; }
.st2-live { width: 100%; margin-bottom: 8px; background: var(--green-soft); color: var(--green-ink); border: 1px solid var(--green-ink); border-radius: 10px; padding: 8px; font-weight: 600; cursor: pointer; }
.st2-maprow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.st2-maprow input { width: 100%; font-family: ui-monospace, monospace; }
@media (max-width: 700px) {
  .st2-upload { width: 100%; }
  .st2-cal-month .st2-day { min-height: 64px; }
  .st2-cal-month .st2-ev { font-size: 10px; padding: 2px 3px; }
  .st2-cal-week { grid-template-columns: 1fr; }
  .st2-cal-week .st2-wd { display: none; }
  .st2-cal-week .st2-day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .st2-cal-week .st2-dnum { min-width: 28px; }
  .st2-cal-week .st2-ev { flex: 1 1 100%; white-space: normal; font-size: 13px; padding: 6px 8px; }
  .st2-fact { grid-template-columns: 1fr auto; }
  .st2-fact > .muted { grid-column: 1 / -1; }
  .st2-maprow { grid-template-columns: 1fr; }
}   /* staffux: this closing brace was missing, so every rule below (fin, staffux) only applied under 700px */
/* ---- fin ---- receipt inbox, iPhone share setup, SBC Works suppliers, client book, invoices (classes fn-*) */
.fn-check { display: flex; align-items: center; gap: 6px; margin: 8px 0; font-weight: 500; }
.fn-check input { width: auto; margin: 0; }
.fn-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fn-split > .card { margin: 0; }
.fn-preview { display: flex; flex-direction: column; gap: 8px; position: sticky; top: 12px; }
.fn-pdf { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.fn-img { width: 100%; max-height: 72vh; object-fit: contain; border-radius: 10px; background: var(--glass); }
.fn-form h2 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fn-warn { color: var(--amber); font-size: 13px; margin: 6px 0; }
.fn-dupes { border: 1px solid var(--red); border-radius: 10px; padding: 8px 12px; margin: 8px 0; color: var(--red); font-size: 13px; }
.fn-dupes ul { margin: 4px 0 0; padding-left: 18px; }
.fn-once { border: 1.5px dashed var(--green-ink); border-radius: 12px; padding: 12px; margin: 10px 0; background: var(--green-soft); }
.fn-token { display: block; margin: 8px 0; padding: 10px; border-radius: 8px; background: var(--surface-solid); font-size: 13px; word-break: break-all; user-select: all; }
.fn-url { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.fn-url code, .fn-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; word-break: break-all; }
.fn-steps { padding-left: 22px; margin: 6px 0; }
.fn-steps li { margin: 0 0 10px; line-height: 1.5; }
.fn-sub { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
.fn-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); font-size: 13px; margin: 0; }
.fn-chip input { width: auto; margin: 0; }
.fn-stars { color: var(--amber); letter-spacing: 1px; white-space: nowrap; }
.fn-hidden-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fn-files { margin: 4px 0 10px; padding-left: 18px; }
.fn-seg { max-width: 360px; margin: 8px 0; }
.fn-client { margin-bottom: 6px; }
.fn-picked { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--glass); display: grid; gap: 3px; justify-items: start; }
.fn-hits { display: grid; gap: 4px; margin: -4px 0 8px; }
.fn-hit { text-align: left; justify-content: flex-start; padding: 8px 10px; }
.fn-lines-edit { display: grid; gap: 6px; }
.fn-lh, .fn-line { display: grid; grid-template-columns: minmax(180px, 3fr) 70px 70px 100px 90px 96px 100px 34px; gap: 6px; align-items: center; }
.fn-lh { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fn-line textarea { min-height: 38px; resize: vertical; }
.fn-line input, .fn-line select, .fn-line textarea { margin: 0; }
.fn-amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.fn-x { padding: 4px 8px; }
.fn-sumrow { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); gap: 16px; margin-top: 14px; align-items: start; }
.fn-totals-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--glass); display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.fn-totals-box > div { display: flex; justify-content: space-between; gap: 10px; }
.fn-totals-box .fn-grand { border-top: 1.5px solid var(--green-ink); padding-top: 6px; font-size: 17px; }
.fn-ship { margin: 8px 0; }
.fn-actions { margin-top: 10px; }
.fn-senders { display: grid; gap: 6px; margin-bottom: 6px; }
.fn-sender { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.fn-sender input, .fn-sender select { margin: 0; }
.fn-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 12px; }
.fn-hot .v { color: var(--red); }
@media (max-width: 900px) {
  .fn-split, .fn-sumrow { grid-template-columns: 1fr; }
  .fn-preview { position: static; order: -1; }
  .fn-pdf { height: 55vh; }
  .fn-lh { display: none; }
  .fn-line { grid-template-columns: 1fr 1fr 1fr; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
  .fn-line textarea { grid-column: 1 / -1; }
  .fn-sender { grid-template-columns: 1fr; }
}

/* ---- staffux ---- */
/* S button: lifted above any bottom action bar by public/mod/ai.js (fabClearance), hidden under tall overlays */
.ai-fab { margin-bottom: var(--sx-fab-lift, 0px); transition: margin-bottom .18s ease; }
.ai-fab.sx-fab-off { display: none; }
@media (prefers-reduced-motion: reduce) { .ai-fab { transition: none; } }
/* staff list cards: "Name — Job title" on one line, readable ticks below */
#staff-list li button { gap: 4px; }
.sx-namerow { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.sx-namerow .who { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-title { flex: 1 1 auto; min-width: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-namerow .tag { flex: none; margin-left: auto; }
.sx-sum { font-size: 12.5px; line-height: 1.35; color: var(--text); opacity: .82; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sx-sum.sx-none { color: var(--muted); font-style: italic; }
/* editor: everyone-has note, presets, tick all */
.sx-everyone { margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius); border: 1px dashed var(--line); background: var(--surface); color: var(--muted); font-size: 13px; }
.sx-presets { margin: 0 0 14px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.sx-presets-head h3 { margin: 0 0 2px; }
.sx-presets-head p { margin: 0 0 10px; }
.sx-preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sx-preset { display: grid; gap: 4px; text-align: left; padding: 10px 12px; border-radius: 12px; height: 100%; align-content: start; }
.sx-preset-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.sx-preset-desc { font-size: 12px; color: var(--muted); line-height: 1.35; }
.sx-preset.sx-match { border-color: var(--green-ink); background: var(--green-soft); }
.sx-badge { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; background: var(--green); color: #fff; }
.sx-group-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 2px; }
.sx-group-head h3 { margin: 0; }
.sx-tickall { flex: none; padding: 4px 10px; font-size: 12px; }
.sx-tickall:disabled { opacity: .45; cursor: default; }
/* checkout settings note (stock reserved at payment) */
.sx-note { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius); border-left: 3px solid var(--green-ink); background: var(--green-soft); font-size: 13px; }
/* Reports overview: gross sales + what comes off (4 tiles) */
.rp-tiles.sx-tiles4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .rp-tiles.sx-tiles4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .rp-tiles.sx-tiles4 { grid-template-columns: minmax(0, 1fr); } }
/* ---- freeplan (Settings → System health) ---- */
.fp-reasons { margin: 6px 0; padding-left: 18px; display: grid; gap: 4px; }
.fp-bar { display: inline-block; width: 120px; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; vertical-align: middle; }
.fp-bar .fp-fill { display: block; height: 100%; background: var(--green-ink); }
.fp-bar.warn .fp-fill { background: var(--amber); }
.fp-bar.over .fp-fill { background: var(--red); }
/* ---- sign ---- (Sign a letter, company stamp cleaner, My signature — public/mod/sign.js) */
.sg-legal { max-width: 900px; font-size: 12.5px; line-height: 1.5; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; padding: 8px 12px; background: var(--glass); }
.sg-chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--glass); white-space: nowrap; }
.sg-st-draft { color: var(--muted); }
.sg-st-waiting { color: var(--amber); border-color: currentColor; }
.sg-st-final { color: var(--green-ink); border-color: currentColor; }
.sg-st-cancelled { color: var(--red); border-color: currentColor; }
.sg-row-r { display: inline-flex; align-items: center; gap: 8px; }
.sg-warn { color: var(--amber); font-weight: 600; }
.sg-locked { color: var(--green-ink); font-weight: 700; }
.sg-danger { color: var(--red); }
.sg-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--text); border: 1px solid var(--line); background: var(--glass); }
.sg-btn.primary { background: var(--green); color: #fff; border-color: transparent; font-weight: 700; }
.sg-btn:hover { border-color: var(--green-ink); }
.sg-mini { padding: 5px 10px; font-size: 12.5px; }
.sg-checker { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background-color: #fff; background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.sg-stamp-img { max-width: 220px; max-height: 220px; }
.sg-sig-img { max-width: 360px; max-height: 160px; }
.sg-co-card .sg-checker { max-width: 380px; }
.sg-versions { margin-top: 14px; }
.sg-vlist { display: flex; flex-wrap: wrap; gap: 10px; }
.sg-v { display: grid; gap: 4px; justify-items: start; width: 150px; }
.sg-v .sg-checker { min-height: 0; padding: 6px; width: 100%; }
.sg-v .sg-stamp-img { max-width: 120px; max-height: 120px; }
.sg-check { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 14px; }
.sg-check input { width: auto; margin: 0; }
.sg-fs { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px 8px; margin: 10px 0; }
.sg-fs legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 4px; }
.sg-lbl { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
/* modal (cleaner, draw pad) */
html.sg-noscroll, html.sg-noscroll body { overflow: hidden; }
.sg-modal { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sg-modal-card { width: min(980px, 100%); max-height: 100%; overflow: auto; background: var(--surface-solid); color: var(--text); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); padding: 16px; }
.sg-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 17px; }
.sg-modal-foot { justify-content: flex-end; margin-top: 10px; }
.sg-cl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sg-cl-fig { margin: 0; display: grid; gap: 6px; }
.sg-cl-fig figcaption { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.sg-cl-before { display: flex; align-items: center; justify-content: center; min-height: 240px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); padding: 8px; }
.sg-cl-canvas, .sg-cl-result { max-width: 100%; max-height: 320px; }
.sg-cl-fig .sg-checker { min-height: 240px; }
.sg-cl-info { margin: 8px 0; }
.sg-cl-controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 16px; align-items: end; }
.sg-slider { display: grid; gap: 4px; font-size: 13px; margin: 0; }
.sg-slider output { font-variant-numeric: tabular-nums; color: var(--muted); }
.sg-slider input[type=range] { width: 100%; accent-color: var(--green-ink); }
.sg-rot { display: flex; gap: 8px; align-items: end; }
.sg-rot .sg-slider { flex: 1; }
.sg-seg { max-width: 360px; }
.sg-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.sg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line); }
.sg-dot-original { background: conic-gradient(#1837a0, #be1e28, #6b2fa0, #1837a0); }
.sg-dot-blue { background: rgb(24, 55, 150); } .sg-dot-red { background: rgb(190, 30, 40); } .sg-dot-black { background: rgb(22, 22, 26); }
.sg-pad { position: relative; height: min(46vh, 320px); border-radius: 12px; border: 1px solid var(--line); background: #fff; touch-action: none; }
.sg-pad-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.sg-pad-base { position: absolute; left: 8%; right: 8%; bottom: 26%; border-bottom: 1.5px dashed #b9bdb9; pointer-events: none; }
/* letter layout */
.sg-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 16px; align-items: start; max-width: 1280px; }
.sg-main .card.wide { margin-top: 0; }
.sg-aside { position: sticky; top: 12px; display: grid; gap: 12px; }
.sg-aside .card.wide { margin: 0; }
.sg-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.sg-pick { padding: 6px 12px; font-size: 13px; border-radius: 999px; }
.sg-pick.on { background: var(--green); color: #fff; border-color: transparent; }
.sg-pick.stamp.on { background: #1d4fbf; }
.sg-presets { flex-wrap: wrap; gap: 6px; }
.sg-sheets { display: grid; gap: 18px; justify-items: center; padding-bottom: 24px; }
.sg-sheet-wrap { width: min(100%, 620px); display: grid; gap: 6px; }
.sg-sheet-no { display: flex; justify-content: space-between; align-items: center; }
.sg-sheet { position: relative; width: 100%; background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(0, 0, 0, .18), 0 8px 24px rgba(0, 0, 0, .08); overflow: hidden; touch-action: none; user-select: none; }
.sg-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.sg-blank { position: absolute; inset: 7% 9%; background-image: repeating-linear-gradient(180deg, transparent 0 22px, rgba(0, 0, 0, .05) 22px 23px); display: flex; align-items: flex-start; justify-content: flex-end; }
.sg-blank span { font-size: 42px; font-weight: 700; color: rgba(0, 0, 0, .07); }
.sg-box { position: absolute; border: 1.5px dashed #c46a0a; border-radius: 4px; background: rgba(255, 166, 0, .08); display: flex; align-items: center; justify-content: center; }
.sg-box.sel { border-style: solid; box-shadow: 0 0 0 3px rgba(196, 106, 10, .25); }
.sg-box.movable { cursor: grab; }
.sg-box.movable:active { cursor: grabbing; }
.sg-box-stamp { border-color: #1d4fbf; background: rgba(29, 79, 191, .06); }
.sg-box-stamp.sel { box-shadow: 0 0 0 3px rgba(29, 79, 191, .25); }
.sg-box img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.sg-box-label { position: absolute; left: 0; top: -18px; font-size: 10.5px; font-weight: 700; color: #8a4a06; white-space: nowrap; background: rgba(255, 255, 255, .9); padding: 0 4px; border-radius: 4px; }
.sg-box-stamp .sg-box-label { color: #1d4fbf; }
.sg-grip { position: absolute; right: -7px; bottom: -7px; width: 16px; height: 16px; border-radius: 50%; background: #c46a0a; border: 2px solid #fff; cursor: nwse-resize; touch-action: none; }
.sg-box-stamp .sg-grip { background: #1d4fbf; }
.sg-x { position: absolute; right: -9px; top: -9px; width: 20px; height: 20px; padding: 0; border-radius: 50%; font-size: 13px; line-height: 1; display: flex; align-items: center; justify-content: center; background: var(--surface-solid); }
.sg-box:not(.sel) .sg-x { display: none; }
.sg-signers { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.sg-signers li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.sg-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.sg-orig { margin-left: auto; }
.sg-preview-box { display: grid; gap: 6px; }
.sg-preview { width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
@media (max-width: 900px) {
  .sg-layout { grid-template-columns: 1fr; }
  .sg-aside { position: static; }
  .sg-preview { height: 60vh; }
  .sg-cl-grid { grid-template-columns: 1fr 1fr; }
  .sg-cl-before, .sg-cl-fig .sg-checker { min-height: 150px; }
  .sg-modal { padding: 0; }
  .sg-modal-card { border-radius: 0; height: 100%; }
}
.sg-logo-img { max-width: 260px; max-height: 120px; }
/* sign: the floating SOBACO button becomes a small edge tab when a control under it is too high to lift over (ai.js fabClearance) */
.ai-fab.sx-fab-tab { width: 30px; height: 44px; right: 0; border-radius: 12px 0 0 12px; }
.ai-fab.sx-fab-tab img { width: 18px; height: 18px; }

/* ---- hrprof ---- staff profile: salary & allowances, summary header, leave, payslips, documents (PDF / custom type) */
.hp-sal { margin: 4px 0 22px; padding: 14px 16px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 10px; }
.hp-sal h3 { margin: 0; font-size: 15px; text-transform: none; letter-spacing: 0; }
.hp-sal .hp-base { margin: 0; max-width: 320px; }
.hp-rows { display: grid; gap: 8px; }
.hp-arow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(90px, 1fr) 40px; gap: 8px; align-items: center; }
.hp-arow input { margin: 0; }
.hp-ahead { font-size: 12px; color: var(--muted); margin-bottom: -4px; }
.hp-arow.dup input { border-color: var(--amber); }
.hp-x { width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 10px; font-size: 16px; line-height: 1; color: var(--red); background: transparent;
  border: 1px solid color-mix(in srgb, var(--red) 45%, transparent); box-shadow: none; cursor: pointer; }
.hp-x:hover, .hp-x:focus-visible { background: color-mix(in srgb, var(--red) 12%, transparent); }
.hp-add { padding-top: 2px; }
.hp-warn { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; border-left: 3px solid var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); font-size: 13px; color: var(--text); }
.hp-warn[hidden] { display: none; }
.hp-warn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .hp-warn-row span { flex: 1 1 220px; }
.hp-total { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.hp-total span { color: var(--muted); font-size: 13px; } .hp-total-v { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--green-ink); }
.hp-sal > p { margin: 0; }
.grid2 > label[hidden] { display: none; }
.hp-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; }
.hp-chip { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.hp-chip span { font-size: 12px; color: var(--muted); } .hp-chip b { font-size: 17px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } .hp-chip small { font-size: 12px; color: var(--muted); }
.hp-badge { display: inline-block; justify-self: start; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); }
.hp-badge.warn { background: color-mix(in srgb, var(--amber) 16%, transparent); color: var(--amber); }
.hp-badge.bad { background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); }
.hp-pdf { display: grid; place-content: center; justify-items: center; gap: 2px; aspect-ratio: 4 / 3; border-radius: 8px; background: var(--glass); border: 1px dashed var(--line); text-decoration: none; color: var(--text); }
.hp-pdf b { font-size: 20px; color: var(--red); } .hp-pdf small { color: var(--muted); }
.hp-preview { margin: 0 0 12px; font-weight: 600; } .hp-preview.neg { color: var(--red); }
.ps-sec + .ps-sec, .card + .ps-sec { margin-top: 14px; }
@media (max-width: 600px) {
  .hp-sal { padding: 12px; }
  .hp-arow { grid-template-columns: minmax(0, 1fr) 96px 40px; gap: 6px; }
  .hp-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- produx ---- */
/* Products list: filters wrap on the left, the List / Grid switch stays fixed at the right end of the row */
.px-filterbar { display: flex; align-items: flex-start; gap: 12px; }
.px-filterbar > .filters { flex: 1 1 auto; min-width: 0; }
.px-seg { flex: none; display: inline-flex; margin-top: 6px;   /* lines up with the first row of filter boxes */ border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--input); }
.px-seg-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; min-height: 40px; padding: 8px 11px; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--muted); }
.px-seg-btn + .px-seg-btn { border-left: 1px solid var(--line); }
.px-seg-btn:hover { color: var(--text); }
.px-seg-btn.on { background: var(--green); color: #fff; }
.px-seg svg, .px-grip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.px-grip svg { stroke-width: 3.4; }
/* drag handle (⋮⋮): touch-action none so a long-press drags instead of scrolling */
.px-grip { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 36px; padding: 4px; border: 1px solid transparent; border-radius: 8px; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--muted); cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.px-grip:hover { color: var(--green-ink); border-color: var(--line); }
.px-grip:active { cursor: grabbing; transform: none; }
.px-grip-cell { width: 36px; padding-right: 0 !important; }
.px-tile-grip { position: absolute; top: 14px; right: 14px; z-index: 1; background: var(--surface-solid); border-radius: 8px; }
.px-dragging { opacity: .35; }
body.px-drag-on, body.px-drag-on * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.px-drop { position: fixed; z-index: 60; pointer-events: none; background: var(--green-ink); border-radius: 3px; box-shadow: 0 0 0 3px var(--green-soft); }
.px-drop-h { height: 4px; }
.px-drop-v { width: 4px; }
.px-ghost { position: fixed; z-index: 61; pointer-events: none; max-width: 240px; padding: 6px 10px; border-radius: 10px; background: var(--green); color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: var(--shadow); }
.px-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; padding: 9px 12px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; }
.px-snack { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 55; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); padding: 9px 10px 9px 16px; border-radius: 12px; background: var(--green); color: #fff; font-weight: 700; box-shadow: var(--shadow); }
.px-snack[hidden] { display: none; }
.px-snack button { color: #fff; border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .12); }
.px-menu { position: fixed; z-index: 70; min-width: 190px; display: grid; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-solid); box-shadow: var(--shadow); }
.px-menu button { text-align: left; padding: 9px 12px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.px-menu button:hover:not(:disabled), .px-menu button:focus-visible { background: var(--green-soft); }
.px-bulkmove { position: relative; }
.px-bulkmove > summary { list-style: none; cursor: pointer; padding: 6px 12px; font-size: 13px; border-radius: 10px; border: 1px solid var(--glass-line); background: var(--glass); }
.px-bulkmove > summary::-webkit-details-marker { display: none; }
.px-menu-inline { position: absolute; top: calc(100% + 4px); left: 0; }
.px-colhead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-top: 18px; }
.px-colhead h2 { margin: 0 0 8px; }
.px-mode { min-width: 220px; margin-bottom: 8px; font-size: 13px; }
.px-rank { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .px-filterbar { gap: 8px; }
  .px-filters { gap: 0 8px; }
  .px-filters label { flex: 1 1 110px; }
  .px-filters label:first-child { flex-basis: 100%; }   /* search gets its own line, next to the switch */
  .px-snack { bottom: calc(80px + env(safe-area-inset-bottom)); }
  /* phone cards: handle sits in the card's top-right corner */
  .px-list .tablewrap.cards tr { position: relative; }
  .px-list .tablewrap.cards td.px-grip-cell { position: absolute; top: 6px; right: 6px; width: auto; padding: 0; }
  .px-list .tablewrap.cards td.pv-tick-cell { padding-right: 44px; }
}
@media (prefers-reduced-motion: reduce) { .px-drop { box-shadow: none; } }
/* ---- meta ---- (Settings → Meta / Instagram, Channels → Live selling page) */
.mt-card h3 { margin: 16px 0 6px; font-size: 15px; }
.mt-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.mt-head h2 { margin: 0; }
.mt-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.mt-dot i { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); display: inline-block; }
.mt-dot.mt-on { color: var(--green-ink); } .mt-dot.mt-on i { background: #1f9d55; }
.mt-dot.mt-part { color: var(--amber); } .mt-dot.mt-part i { background: var(--amber); }
.mt-dot.mt-error { color: var(--red); } .mt-dot.mt-error i { background: var(--red); }
.mt-dot.mt-off i { background: transparent; border: 1.5px solid var(--muted); }
.mt-copy { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.mt-copy code { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; font-size: 12.5px; padding: 6px 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.mt-secrets { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.mt-secrets li.ok { color: var(--green-ink); }
.mt-current { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; font-size: 14px; }
.mt-switch { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 600; }
.mt-note { padding: 8px 12px; border-left: 3px solid var(--green-ink); background: var(--green-soft); border-radius: 8px; }
.mt-docs a { color: var(--green-ink); }
a.btn.disabled { opacity: .45; pointer-events: none; }
.mt-voucher { margin: 12px 0; }
.mt-items, .mt-results { display: grid; gap: 8px; margin: 10px 0; }
.mt-item, .mt-res { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.mt-res { grid-template-columns: 40px 1fr auto; padding: 6px 8px; }
.mt-item img, .mt-res img, .mt-ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--line); display: grid; place-items: center; font-weight: 700; color: var(--muted); }
.mt-item.mt-isfeat { border: 2px solid var(--green-ink); background: var(--green-soft); }
.mt-iname { display: grid; gap: 2px; min-width: 0; }
.mt-iname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-iact { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 600px) { .mt-item { grid-template-columns: 44px 1fr; } .mt-iact { grid-column: 1 / -1; justify-content: flex-start; } }
.mt-card a.btn, .mt-card a.btn:hover { text-decoration: none; }
/* ---- importux ---- */
/* One import / upload flow everywhere (public/mod/importflow.js): Choose → Check (nothing saved) → Uploading → Result */
.iu { position: relative; }
.iu-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.iu .iu-title { margin: 0; font-size: 20px; }
.iu .iu-title:focus, .iu .iu-title:focus-visible { outline: none; }   /* focused only so screen readers announce the step */
.card .iu.card, .dio-box .iu.card { box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 16px; margin: 12px 0 0; max-width: none; }
.iu h3 { margin-top: 0; }
.iu-x { flex: none; }
.iu-intro { margin: 4px 0 0; }
.iu-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.iu-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.iu-steps { list-style: none; display: flex; gap: 6px; margin: 14px 0 16px; padding: 0; counter-reset: none; flex-wrap: wrap; }
.iu-steps li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); background: var(--glass); }
.iu-steps li b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--line); color: var(--text); font-size: 11px; }
.iu-steps li.iu-now { border-color: var(--green-ink); color: var(--text); font-weight: 700; }
.iu-steps li.iu-now b { background: var(--green); color: #fff; }
.iu-steps li.iu-done b { background: var(--green-soft); color: var(--green-ink); }
.iu-body > * + * { margin-top: 12px; }
/* step 1: drop zone */
.iu-drop { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 28px 16px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--glass); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.iu-drop:hover, .iu-drop:focus-visible { border-color: var(--green-ink); outline: none; }
.iu-drop.iu-over { border-color: var(--green-ink); background: var(--green-soft); }
.iu-dropicon { font-size: 28px; line-height: 1; color: var(--green-ink); }
.iu-drop strong { font-size: 16px; }
.iu-pick { margin: 4px 0; }
.iu-accept { max-width: 46ch; }
.iu-hint { margin: 8px 0 0; }
.iu-err { margin: 8px 0 0; font-size: 14px; }
/* chosen file */
.iu-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--raise); }
.iu-fileicon { color: var(--green-ink); font-size: 18px; }
.iu-fname { font-weight: 700; overflow-wrap: anywhere; flex: 1 1 160px; min-width: 0; }
.iu-change { margin-left: auto; }
/* step 2: check */
.iu-safe { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--amber); border-left-width: 5px; background: color-mix(in srgb, var(--amber) 12%, transparent); }
.iu-safe strong { font-size: 16px; color: var(--amber); }
.iu-safe span { font-size: 13px; }
.iu-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.iu-count { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); }
.iu-count b { font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.iu-count span { font-size: 12.5px; color: var(--muted); }
.iu-count.iu-t-add b { color: var(--green-ink); }
.iu-count.iu-t-skip b { color: var(--muted); }
.iu-count.iu-t-warn b { color: var(--amber); }
.iu-count.iu-t-bad b { color: var(--red); }
.iu-line { margin: 0; }
.iu-errs h3, .iu-tablewrap h3 { font-size: 14px; margin: 0 0 6px; }
.iu-errs { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); }
.iu-warns { padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); }
.iu-warns summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--amber); }
.iu-list { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 3px; font-size: 13px; max-height: 260px; overflow: auto; }
.iu-list.iu-bad li { color: var(--red); }
.iu-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.iu-table { border-collapse: collapse; font-size: 12.5px; min-width: 100%; }
.iu-table th, .iu-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.iu-table th { color: var(--muted); font-weight: 700; }
.iu-media { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.iu-media li { display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--raise); min-width: 0; }
.iu-media li.iu-mbad { border-color: var(--red); }
.iu-thumb { display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--line); }
.iu-thumb img, .iu-thumb video { width: 100%; height: 100%; object-fit: cover; }
.iu-noimg { font-weight: 800; color: var(--muted); }
.iu-mname { font-weight: 700; font-size: 13px; overflow-wrap: anywhere; }
.iu-mchecks { display: grid; gap: 2px; }
.iu-c-warn { color: var(--amber); }
.iu-c-bad { color: var(--red); }
.iu-c-ok { color: var(--green-ink); }
.iu-why { margin-top: 4px; }
.iu-actions { gap: 10px; flex-wrap: wrap; }
.iu-confirm { display: grid; gap: 8px; width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--green-ink); background: var(--green-soft); }
.iu-confirm strong { font-size: 15px; }
/* step 3: uploading */
.iu-bar { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.iu-bar > i { display: block; height: 100%; width: 0; background: var(--green-ink); border-radius: inherit; transition: width .25s ease; }
.iu-bar.iu-bar-thin { height: 4px; }
.iu[data-step="stopping"] .iu-bar > i { background: var(--amber); }
.iu-uptext { font-weight: 700; font-variant-numeric: tabular-nums; margin: 6px 0 0; }
button.iu-stop { color: var(--red); border-color: var(--red); }
/* step 4: result */
.iu-result { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-left-width: 5px; }
.iu-result h3 { margin: 0 0 4px; }
.iu-result p { margin: 4px 0 0; }
.iu-result.iu-r-ok { border-color: var(--green-ink); background: var(--green-soft); }
.iu-result.iu-r-warn { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, transparent); }
.iu-result.iu-r-cancel { border-color: var(--red); background: color-mix(in srgb, var(--red) 8%, transparent); }
/* dialog: centred card; phone: full-screen sheet */
html.iu-open { overflow: hidden; }
.iu-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .45); }
.iu-sheet { width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: var(--radius); }
.iu-sheet .iu.card { margin: 0; max-width: none; background: var(--surface-solid); }
@media (max-width: 640px) {
  .iu-overlay { padding: 0; place-items: stretch; }
  .iu-sheet { max-height: 100vh; height: 100%; border-radius: 0; }
  .iu-sheet .iu.card { min-height: 100%; border-radius: 0; padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
  .iu-steps li span { display: none; }
  .iu-steps li.iu-now span { display: inline; }
  .iu-drop { padding: 22px 12px; }
  .iu-actions > button, .iu-confirm .row > button { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) { .iu-bar > i, .iu-drop { transition: none; } }
/* Studio "Upload content" sheet now wraps the flow card (the card carries the frame) */
.st2-sheet:has(> .iu) { border: 0; }
.iu-result h3 { font-size: 16px; text-transform: none; letter-spacing: var(--track); color: var(--text); }
/* in-app dialogs + snackbar (public/mod/dialog.js) — replace the browser's alert / confirm / prompt */
html.dl-open { overflow: hidden; }
.dl-scrim { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .42); animation: dl-fade .14s ease; }
.dl-scrim.dl-out { opacity: 0; transition: opacity .14s ease; }
.dl-card { width: min(440px, 100%); display: grid; gap: 10px; padding: 22px 22px 18px; border-radius: var(--radius); border: 1px solid var(--glass-line); background: var(--surface-solid);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .28); animation: dl-pop .16s ease; }
.dl-card.dl-danger { border-top: 4px solid var(--red); }
.dl-card .dl-title { margin: 0; font-size: 18px; text-transform: none; color: var(--text); letter-spacing: var(--track); }
.dl-msg { margin: 0; color: var(--text); opacity: .85; white-space: pre-line; overflow-wrap: anywhere; }
.dl-label { margin: 4px 0 0; }
.dl-label:empty { display: none; }
.dl-input { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); color: var(--text); font: inherit; }
.dl-input:focus { outline: none; border-color: var(--green-ink); box-shadow: 0 0 0 3px var(--green-soft); }
.dl-input[aria-invalid="true"] { border-color: var(--red); }
textarea.dl-input { resize: vertical; min-height: 84px; }
.dl-err { margin: 0; color: var(--red); font-size: 13px; }
.dl-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.dl-acts button { min-width: 96px; }
/* feedback: the old bottom snackbar (.dl-snack) is replaced by the top notice bar (.fb-stack, end of file) */
@keyframes dl-fade { from { opacity: 0; } }
@keyframes dl-pop { from { opacity: 0; transform: scale(.97); } }
@media (max-width: 640px) {
  .dl-scrim { place-items: end stretch; padding: 0; }
  .dl-card { width: 100%; border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); animation: dl-sheet .2s ease; }
  .dl-acts button { flex: 1 1 0; }
  @keyframes dl-sheet { from { transform: translateY(24px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .dl-scrim, .dl-card { animation: none; } }

/* ---- mobnav ---- */
/* Phone bottom bar (EasyStore style): floating see-through glass pill, 5 icon-only items (Menu · Home · Camera · Tasks · Profile),
   the current one sits in a soft green rounded square, red dot for "something new", camera stays the big centre action.
   Shown wherever the bar was already shown (≤ 900px); desktop untouched. */
@media (max-width: 900px) {
  .bottom-nav.mn-bar {
    left: 50% !important; right: auto !important; transform: translateX(-50%); width: min(360px, calc(100% - 28px)) !important; height: 64px;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important; padding: 0 8px !important; z-index: 62;   /* above the drawer + backdrop, so ✕ closes it */
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-columns: none; align-items: center !important; justify-items: center;
    border-radius: 26px; background: color-mix(in srgb, var(--surface-solid) 40%, transparent) !important;
    backdrop-filter: blur(22px) saturate(1.8); -webkit-backdrop-filter: blur(22px) saturate(1.8);
    border: 1px solid color-mix(in srgb, #fff 50%, transparent); box-shadow: 0 10px 28px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .5);
  }
  :root[data-theme="dark"] .bottom-nav.mn-bar { border-color: rgba(255, 255, 255, .12); box-shadow: 0 10px 28px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .07); }
  .mn-bar .mn-item { position: relative; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; margin: 0; border: 0; border-radius: 15px;
    background: transparent !important; color: var(--muted); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; cursor: pointer; }
  .mn-bar .mn-item > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }   /* label for screen readers */
  .mn-bar .mn-item svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mn-bar .mn-item.active { color: var(--green-ink); background: color-mix(in srgb, var(--green-ink) 15%, transparent) !important; }
  .bottom-nav.mn-bar .mn-item.active::after { content: none !important; }   /* no glowing dot under the active item any more */
  .mn-bar .mn-item:hover { border: 0; transform: none; }
  .mn-bar .mn-dot { position: absolute; top: 9px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--red);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface-solid) 85%, transparent); }
  .mn-bar .mn-cam { width: 54px !important; height: 54px !important; margin: 0 !important; border-radius: 50%; display: grid; place-items: center; color: #fff;
    background: radial-gradient(circle at 35% 30%, #0b6a45, #01422a 70%) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, #01422a 16%, transparent), 0 6px 16px rgba(1, 66, 42, .45), inset 0 1px 0 rgba(255, 255, 255, .25); }
  .mn-bar .mn-cam svg { width: 26px !important; height: 26px !important; stroke: #fff; fill: none; stroke-width: 1.8; }
  .mn-bar .mn-cam.active { box-shadow: 0 0 0 2px var(--green-ink), 0 0 18px 4px rgba(1, 66, 42, .45); }
  .mn-bar .mn-cam::after { content: none !important; }
  /* the bar's ☰ replaces the old floating menu button */
  .topbar .menu-btn { display: none !important; }
  .content { padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important; }
  .ai-fab { bottom: calc(88px + env(safe-area-inset-bottom)) !important; }
  #toast { bottom: calc(90px + env(safe-area-inset-bottom)); }

  /* Left drawer: partial width with the rest dimmed; labels wrap instead of being cut off */
  .side { width: min(78vw, 320px) !important; padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
  .side .nav-item { white-space: normal; align-items: flex-start; line-height: 1.25; font-size: 14px; }
  .side .nav-item .lbl { overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
  .side .nav-item svg { margin-top: 1px; }
  .scrim:not([hidden]) { background: rgba(0, 0, 0, .38) !important; }
}
@media (max-width: 360px) { .side .nav-item { font-size: 13px; padding: 8px 9px; } }

/* Sold out labels (Products list / grid, collections, POS, Studio, variant rows) */
.mn-badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .01em; padding: 3px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; line-height: 1.3; vertical-align: middle; }
.mn-sold { color: #fff; background: var(--red); }
.mn-selling { color: var(--muted); background: var(--glass); border-color: var(--line); }
.mn-partial { color: var(--amber); background: color-mix(in srgb, var(--amber) 13%, transparent); }
td .mn-badge { margin-top: 4px; }
.pv-vname .mn-badge { margin-left: 4px; }
.pos-prod .mn-badge { justify-self: start; }

/* Profile: big Clock in / Clock out card on top */
.mn-pf-top:empty { display: none; }
.mn-pf-top .mn-clock { margin: 0 0 14px; padding: 18px 18px 14px; border-radius: 22px; }
.mn-pf-top .mn-clock .big { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.mn-pf-top .mn-clock .hc-row button { min-height: 48px; min-width: 132px; font-size: 15px; border-radius: 14px; }
.mn-pf-top .mn-clock.mn-clock-in .big { color: var(--green-ink); }

/* Page numbers under every paged list (SBC.pager, /mod/pager.js): centred, rounded squares, current page in Sobaco green */
.opager:has(> .mn-pager), .pv-pager:has(> .mn-pager) { display: block; margin: 16px 0 4px; }
.mn-pager { display: grid; justify-items: center; gap: 8px; margin: 16px 0 4px; }
.mn-pg-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; }
.mn-pg { min-width: 40px; height: 40px; padding: 0 10px; border-radius: 11px; display: inline-grid; place-items: center; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--text); background: color-mix(in srgb, var(--muted) 12%, transparent); border: 1px solid transparent; box-shadow: none; cursor: pointer; font-variant-numeric: tabular-nums; }
.mn-pg:hover:not(:disabled) { background: color-mix(in srgb, var(--muted) 20%, transparent); border-color: transparent; transform: none; }
.mn-pg[aria-current="page"] { color: #fff; background: #01422a; box-shadow: 0 4px 14px rgba(1, 66, 42, .35), 0 0 0 3px color-mix(in srgb, #01422a 16%, transparent); }
:root[data-theme="dark"] .mn-pg[aria-current="page"] { box-shadow: 0 4px 16px rgba(108, 196, 151, .25), 0 0 0 3px rgba(108, 196, 151, .18); }
.mn-pg-arrow { font-size: 18px; }
.mn-pg:disabled { opacity: .4; cursor: default; }
.mn-pg-gap { min-width: 22px; text-align: center; color: var(--muted); letter-spacing: .1em; }
.mn-pg-info { margin: 0; }
@media (max-width: 600px) { .mn-pg { min-width: 44px; height: 44px; } .mn-pg-row { gap: 5px; } }

/* ---- cfai ---- */
/* SOBACO AI chat room (public/mod/cfai.js): sidebar of chats + message log + composer; phone = full-screen sheet. */
@media (max-width: 900px) { .ai-sheet { width: 100vw !important; border-radius: 0 !important; } }
.cfai-shell { display: flex; gap: 14px; max-width: 1100px; min-height: calc(100vh - 170px); }
.cfai-shell.in-sheet { min-height: 100%; height: 100%; gap: 0; }
.cfai-side { width: 240px; flex: none; display: flex; flex-direction: column; gap: 8px; }
.cfai-shell.in-sheet .cfai-side, .cfai-shell .cfai-side { display: none; }
@media (min-width: 1100px) { .cfai-shell:not(.in-sheet) .cfai-side { display: flex; } .cfai-shell:not(.in-sheet) .cfai-sidebtn { display: none; } }
.cfai-shell.side-open .cfai-side { display: flex; position: absolute; z-index: 6; inset: 44px 8px auto 8px; max-height: 70%; overflow-y: auto; background: var(--surface-solid); border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); }
.cfai-shell { position: relative; }
.cfai-threads { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.cfai-thread { display: flex; align-items: center; gap: 2px; border-radius: 10px; }
.cfai-thread.on, .cfai-thread:hover { background: var(--raise, var(--surface)); }
.cfai-thread-open { flex: 1; text-align: left; background: none; border: 0; color: var(--text); padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.cfai-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cfai-main.drop { outline: 2px dashed var(--green); outline-offset: 4px; border-radius: 14px; }
.cfai-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cfai-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfai-log { flex: 1; overflow-y: auto; padding: 4px 2px 10px; min-height: 30vh; }
.cfai-shell:not(.in-sheet) .cfai-log { overflow: visible; }
.cfai-msg { display: flex; flex-direction: column; margin: 8px 0; }
.cfai-msg.user { align-items: flex-end; }
.cfai-msg.ai { align-items: flex-start; }
.cfai-bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; font-size: 15px; overflow-wrap: anywhere; }
.cfai-bubble.mine { background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.cfai-bubble.ai { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; max-width: 100%; }
.cfai-bubble.ai p { margin: 4px 0; }
.cfai-plain { white-space: pre-wrap; }
.cfai-tag { font-size: 12px; font-weight: 700; opacity: .8; }
.cfai-h { margin: 10px 0 4px; font-size: 15px; }
.cfai-list { margin: 4px 0; padding-left: 22px; }
.cfai-ic { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--raise, rgba(0,0,0,.06)); padding: 1px 5px; border-radius: 5px; }
.cfai-code { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 8px 0; }
.cfai-code-bar { display: flex; justify-content: space-between; align-items: center; padding: 2px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.cfai-code pre { margin: 0; padding: 10px; overflow-x: auto; font-size: 13px; }
.cfai-table { overflow-x: auto; margin: 8px 0; }
.cfai-table table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
.cfai-table th, .cfai-table td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
.cfai-bubble blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line); color: var(--muted); }
.cfai-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: 3px; }
.cfai-act { background: none; border: 0; color: var(--muted); font-size: 12px; padding: 3px 7px; border-radius: 8px; cursor: pointer; }
.cfai-act:hover, .cfai-act.on { background: var(--raise, var(--surface)); color: var(--text); }
.cfai-draft { margin: 8px 0; padding: 14px; width: 100%; max-width: 640px; }
.cfai-composer { position: sticky; bottom: 0; background: var(--surface-solid); border-top: 1px solid var(--line); padding: 8px 2px; z-index: 5; }
@media (max-width: 900px) { .cfai-shell:not(.in-sheet) .cfai-composer { bottom: calc(70px + env(safe-area-inset-bottom)); } }
.cfai-row { display: flex; gap: 6px; align-items: flex-end; }
.cfai-input { flex: 1; margin: 0; max-height: 180px; font-size: 16px; resize: none; }
.cfai-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.cfai-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.cfai-icon.primary { background: var(--green); color: #fff; border-color: transparent; }
.cfai-icon.danger { background: #b3261e; color: #fff; border-color: transparent; }
.cfai-icon.rec { background: #b3261e; color: #fff; animation: cfai-pulse 1.2s infinite; }
@keyframes cfai-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .cfai-icon.rec { animation: none; } }
.cfai-icon[hidden] { display: none; }
.cfai-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cfai-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.cfai-chips button { white-space: nowrap; flex: none; }
.cfai-files { display: flex; flex-wrap: wrap; gap: 6px; }
.cfai-files:not(:empty) { margin-bottom: 6px; }
.cfai-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 4px 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); margin: 2px 4px 2px 0; }
.cfai-bubble.mine .cfai-chip { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.3); color: #fff; }
.cfai-chip img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.cfai-foot { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 6px; }
.cfai-edit { width: min(640px, 100%); }
.cfai-newbtn { width: 100%; }
/* settings pages */
.cfai-routing select { margin: 0; min-width: 120px; }
.cfai-routing td { vertical-align: middle; }
.cfai-prov { gap: 10px; }
.cfai-kn textarea { width: 100%; }
.cfai-ex { gap: 10px; align-items: flex-start; }
.cfai-meter { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 6px 0; }
.cfai-meter-fill { display: block; height: 100%; background: var(--green); width: 0; }
.cfai-meter-fill.p10 { width: 10%; } .cfai-meter-fill.p20 { width: 20%; } .cfai-meter-fill.p30 { width: 30%; } .cfai-meter-fill.p40 { width: 40%; } .cfai-meter-fill.p50 { width: 50%; }
.cfai-meter-fill.p60 { width: 60%; } .cfai-meter-fill.p70 { width: 70%; } .cfai-meter-fill.p80 { width: 80%; } .cfai-meter-fill.p90 { width: 90%; } .cfai-meter-fill.p100 { width: 100%; background: #b3261e; }
.cfai-bank { flex-wrap: wrap; border-left: 3px solid var(--green); padding-left: 6px; }
/* ---- feedback ---- */
/* Top notice bar (SBC.notify / SBC.toast): Sobaco glass card, top centre under the floating tab bar on desktop, under the
   status bar (safe area) on phones. Up to 3 stacked; newest at the bottom of the stack. Light + dark via the theme variables. */
.fb-stack { position: fixed; z-index: 1300; top: calc(var(--top, 60px) + 12px); left: 50%; transform: translateX(-50%); width: min(520px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.fb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.fb-note { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: 11px; padding: 12px 10px 12px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid var(--glass-line); box-shadow: 0 12px 34px rgba(0, 0, 0, .16), 0 1px 2px rgba(0, 0, 0, .06); color: var(--text); animation: fb-in .22s cubic-bezier(.2, .9, .3, 1.2); }
.fb-note::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--fb-c, var(--green-ink)); }
.fb-success { --fb-c: #1f8a4c; } .fb-error { --fb-c: var(--red); } .fb-warning { --fb-c: var(--amber); } .fb-info { --fb-c: var(--blue); }
.fb-ico { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; margin-top: 1px; background: var(--fb-c); color: #fff; font-weight: 800; font-size: 13px; }
.fb-body { flex: 1; min-width: 0; display: grid; gap: 2px; padding-top: 2px; }
.fb-title { font-size: 14px; font-weight: 800; letter-spacing: var(--track); }
.fb-msg { font-size: 14px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.fb-title + .fb-msg { font-weight: 500; opacity: .85; font-size: 13px; }
.fb-count { justify-self: start; font-size: 11px; font-weight: 700; color: var(--muted); }
button.fb-act { flex: none; align-self: center; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--green-ink); background: transparent; border: 1px solid var(--green-ink); border-radius: 10px; }
button.fb-x { flex: none; width: 32px; height: 32px; padding: 0; display: grid; place-items: center; border-radius: 10px; background: transparent; border: 0; box-shadow: none; color: var(--muted); font-size: 15px; }
button.fb-x:hover, button.fb-x:focus-visible { background: var(--raise); color: var(--text); }
.fb-note.fb-timed::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--fb-c); opacity: .5; transform-origin: left; animation: fb-count var(--fb-ms, 4000ms) linear forwards; }
.fb-note.fb-out { opacity: 0; transform: translateY(-8px) scale(.98); transition: opacity .18s ease, transform .18s ease; }
@keyframes fb-in { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
@keyframes fb-count { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 900px) { .fb-stack { top: calc(env(safe-area-inset-top) + 10px); } }
@media (prefers-reduced-motion: reduce) { .fb-note { animation: none; } .fb-note.fb-timed::after { animation: none; } }
@media print { .fb-stack { display: none !important; } }

/* Busy button (shared: any write started from a button, SBC.busy): stays its size, label dims, spinner on top */
button.fb-busy, input.fb-busy { position: relative; cursor: progress; }
button.fb-busy { color: transparent !important; }
button.fb-busy > * { visibility: hidden; }
button.fb-busy::after { content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--muted) var(--muted) var(--muted) transparent; animation: fb-spin .7s linear infinite; }
button.primary.fb-busy::after, button.danger.fb-busy::after { border-color: #fff #fff #fff transparent; }
@keyframes fb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button.fb-busy::after { animation-duration: 2s; } }

/* "Keep EasyStore photos" status block + progress (products → Import / export) */
.fb-r2-status { margin: 4px 0 6px; font-size: 15px; }
.fb-prog { height: 10px; border-radius: 999px; background: var(--raise); border: 1px solid var(--line); overflow: hidden; margin: 2px 0 6px; }
.fb-prog > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--green), #1f8a4c); transition: width .35s ease; }
:root[data-theme="dark"] .fb-prog > i { background: linear-gradient(90deg, #1f8a4c, var(--green-ink)); }
.fb-r2-run { margin: 6px 0 0; font-weight: 700; color: var(--green-ink); }
.fb-r2-failed { margin-top: 14px; }
.fb-r2-failed h3 { margin: 0; }
/* ---- phone product list ---- (photo left, everything else stacked on the right, compact) */
@media (max-width: 900px) {
  .tablewrap.cards.pv-table tr { display: grid; grid-template-columns: auto 52px 1fr; column-gap: 10px; row-gap: 2px; align-items: start; padding: 8px 10px; margin-bottom: 8px; border-radius: 12px; }
  .tablewrap.cards.pv-table td { display: block; padding: 0; text-align: left; font-size: 13px; }
  .tablewrap.cards.pv-table td::before { content: none; }
  .tablewrap.cards.pv-table td.pv-tick-cell { grid-column: 1; grid-row: 1 / span 4; align-self: center; padding: 0; width: auto; }
  .tablewrap.cards.pv-table td.pv-tick-cell:empty { display: none; }
  .tablewrap.cards.pv-table td.pv-thumb-cell { grid-column: 2; grid-row: 1 / span 4; width: 52px; }
  .tablewrap.cards.pv-table td.pv-thumb-cell img, .tablewrap.cards.pv-table td.pv-thumb-cell > * { width: 52px; height: 52px; border-radius: 8px; object-fit: contain; }
  .tablewrap.cards.pv-table td.pv-info-cell, .tablewrap.cards.pv-table td.pv-inv-cell, .tablewrap.cards.pv-table td.pv-vis-cell, .tablewrap.cards.pv-table td.pv-price-cell { grid-column: 3; }
  .tablewrap.cards.pv-table td.pv-info-cell .strong { font-size: 14px; line-height: 1.25; padding-right: 34px; }
  .tablewrap.cards.pv-table td.pv-inv-cell { color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
  .tablewrap.cards.pv-table td.pv-inv-cell.neg { color: var(--red, #b42318); }
  .tablewrap.cards.pv-table td.pv-vis-cell .badge, .tablewrap.cards.pv-table td.pv-inv-cell .badge { font-size: 11px; padding: 1px 7px; }
  .tablewrap.cards.pv-table td.pv-price-cell { font-weight: 600; }
  .px-list .tablewrap.cards.pv-table td.pv-tick-cell { padding-right: 0; }
  .px-list .tablewrap.cards.pv-table td.px-grip-cell { top: 4px; right: 4px; }
}
/* reports v2 */
/* Reports page (EasyStore-style): date bar left + filters right, clickable Gross / Net / Total tiles, channel multi-select, channel reports list */
.rp-bar.rpx-bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 16px; flex-wrap: wrap; }
.rpx-bar .rp-bar-row { min-width: 0; max-width: 100%; }
.rpx-bar .rp-chips { justify-content: flex-end; }
.rpx-bar .rp-seg button { flex: 0 0 auto; }
.rpx-clear { box-shadow: none; color: var(--muted); }
.rpx-clear:hover { color: var(--text); }
.rpx-multi { min-width: 230px; }
.rpx-check { display: flex; align-items: center; gap: 9px; padding: 7px 10px; margin: 0; border-radius: 10px; font-size: 13.5px; cursor: pointer; color: var(--text); }
.rpx-check:hover { background: var(--glass); }
.rpx-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); flex: 0 0 auto; }
.rpx-menu-foot { position: sticky; bottom: -6px; display: flex; justify-content: flex-end; padding: 6px 4px 2px; margin-top: 4px; border-top: 1px solid var(--line); background: inherit; }
.rpx-menu-foot button.primary { background: var(--green); color: #fff; border-color: transparent; padding: 6px 14px; text-align: center; }
.rpx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rpx-tile { cursor: pointer; position: relative; transition: border-color .15s, box-shadow .15s, background .15s; }
.rpx-tile:hover { border-color: var(--muted); }
.rpx-tile:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.rpx-tile.on { border-color: var(--green-ink); background: var(--green-soft); box-shadow: inset 0 -3px 0 var(--green-ink); }
.rpx-tile.on .rp-tile-k { color: var(--green-ink); font-weight: 700; }
.rpx-chlist { display: grid; gap: 0; }
.rpx-chrow { display: grid; grid-template-columns: minmax(0, 1fr) auto 96px auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; border-radius: 10px; }
.rpx-chrow:last-child { border-bottom: 0; }
.rpx-chrow:hover { background: var(--glass); }
.rpx-chn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rpx-chv { font-variant-numeric: tabular-nums; }
.rpx-cho { text-align: right; }
@media (max-width: 700px) {
  .rp-bar.rpx-bar { display: grid; grid-template-columns: minmax(0, 1fr); }
  .rpx-bar .rp-bar-row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .rpx-bar .rp-seg { display: flex; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rpx-bar .rp-chips { justify-content: flex-start; }
  .rpx-tiles { grid-template-columns: minmax(0, 1fr); }
  .rpx-menu-foot { position: static; }
  .rpx-chrow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
  .rpx-cho { text-align: left; }
  .rpx-chrow .rp-more { text-align: right; }
}
@media print { body.rp-printing .rpx-chrow .rp-more { display: none !important; } }

/* ---- offline ---- */
/* POS offline banner (public/mod/offline.js posBanner), global offline bar + pending-sync chip, offline report / paper
   sales / emergency page / paper sheet (A4 print), System health cards. */
.off-pos { border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; display: grid; gap: 6px; }
.off-pos.off-quiet { padding: 2px 2px 0; }
.off-pos.off-wait { border: 1px solid var(--line); background: var(--surface-solid); }
.off-pos.off-amber { border: 2px solid var(--amber); background: color-mix(in srgb, var(--amber) 12%, var(--surface-solid)); color: var(--text); }
.off-pos.off-amber b { color: var(--amber); font-size: 16px; }
.off-pos-h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.off-pos .row { gap: 8px 12px; align-items: center; flex-wrap: wrap; }
.off-chip-in { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 13px;
  background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.off-chip-in.bad, .off-chip.bad { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.off-bar { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 60; max-width: min(720px, calc(100vw - 16px)); margin-top: 6px;
  padding: 8px 14px; border-radius: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 13px; font-weight: 600;
  background: var(--surface-solid); color: var(--text); border: 2px solid var(--amber); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.off-bar a { color: var(--amber); font-weight: 700; }
.off-chip { position: fixed; left: 12px; bottom: 16px; z-index: 55; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; text-decoration: none;
  background: color-mix(in srgb, var(--amber) 22%, var(--surface-solid)); color: var(--amber); border: 1px solid var(--amber); box-shadow: 0 4px 14px rgba(0, 0, 0, .15); }
@media (max-width: 900px) { .off-chip { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } .off-bar { font-size: 12px; } }
.off-note { color: var(--amber); }
.off-stale td { color: var(--red); }
.off-results { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.off-num { width: 90px; text-align: right; margin: 0; }
.off-saved { border: 2px solid var(--green, #1f7a4d); }
.off-help-card a { font-weight: 700; color: var(--amber); }
.off-sec h2 { font-size: 17px; margin: 14px 0 6px; }
.off-sec ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.off-only-print { display: none; }
.off-sheet-h { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }
.off-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.off-grid th, .off-grid td { border: 1px solid var(--line); padding: 6px; height: 30px; text-align: left; vertical-align: top; }
.off-grid td.n { width: 28px; color: var(--muted); }
.off-backups .stats { margin: 8px 0; }
.off-backups details { margin-top: 10px; }
@media print {
  body.off-printing * { visibility: hidden !important; }
  body.off-printing .off-print, body.off-printing .off-print * { visibility: visible !important; }
  body.off-printing, html:has(body.off-printing) { background: #fff !important; }
  body.off-printing .off-print { position: absolute; left: 0; top: 0; width: 190mm; margin: 0; padding: 0; border: 0 !important; box-shadow: none !important;
    background: #fff !important; color: #000 !important; backdrop-filter: none !important; font-size: 12px; }
  body.off-printing .off-only-print { display: block; font-size: 18px; }
  body.off-printing .off-grid th, body.off-printing .off-grid td { border-color: #000 !important; height: 9mm; }
  body.off-printing .off-noprint, .off-bar, .off-chip { display: none !important; }
  @page { size: A4; margin: 10mm; }
}
/* ---- all reports → reports hub pointer ---- */
.rp-tohub { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; }

/* ---- profit ---- */
.pft-card { margin-top: 12px; }
.rp-tiles.pft-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pft-tile.neg .rp-tile-v { color: var(--red); }
.pft-tile.pft-off { background: transparent; border-style: dashed; }
.pft-tile.pft-off p { margin: 6px 0 0; }
.pft-warn { border: 1px solid var(--amber); background: color-mix(in srgb, var(--amber) 10%, transparent); color: var(--amber); border-radius: 12px; padding: 8px 12px; margin: 4px 0 10px; }
.pft-warn p { margin: 2px 0; }
.pft-warn .rp-more { display: inline-block; margin-top: 4px; }
.pft-ok { color: var(--muted); }
.pft-exp { margin-top: 10px; }
.pft-exp h4 { margin: 0 0 6px; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pft-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.pft-table td .badge.pft-nocost { margin-left: 6px; background: color-mix(in srgb, var(--amber) 15%, transparent); color: var(--amber); font-size: 11px; }
.pft-table td.neg { color: var(--red); }
@media (min-width: 1100px) { .pft-grid { grid-template-columns: 3fr 2fr; } }
@media (max-width: 760px) { .rp-tiles.pft-tiles { grid-template-columns: minmax(0, 1fr); } }
@media print { .pft-warn .rp-more { display: none; } }
/* ---- page loader ---- (spinning SOBACO S while a page loads) */
.page-loader { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; pointer-events: none; }
.page-loader[hidden] { display: none; }
/* wspin: the white SOBACO S turning in 3D (rotateY) — no box or disc behind it, just the logo over a soft full-screen veil (and a
   soft shadow on the logo) so it reads on light pages too. Same loader as the online store. */
.page-loader { background: rgba(0, 0, 0, .16); }
.page-loader-ring { width: 72px; height: 72px; background: transparent; display: grid; place-items: center; perspective: 400px; }
.page-loader-ring img { width: 56px; height: 56px; transform-style: preserve-3d; animation: page-loader-spin 1.2s linear infinite; filter: drop-shadow(0 0 1px rgba(0, 0, 0, .55)) drop-shadow(0 3px 10px rgba(0, 0, 0, .45)); }
@keyframes page-loader-spin { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }
body.page-loading .content { opacity: .55; transition: opacity .15s; }
@media (prefers-reduced-motion: reduce) { .page-loader-ring, .page-loader-ring img { animation: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- golive ---- */
/* Full-width pages (POS till: html.full-width) hide the desktop sidebar; the ☰ in the page toolbar (and the top bar's menu
   button) opens the same left drawer as on phones. Esc / backdrop tap / a menu link close it (public/app.js openDrawer). */
@media (min-width: 901px) {
  html.full-width .shell, html.full-width .shell.collapsed { grid-template-columns: 1fr !important; --side: 0px; }
  html.full-width .side { position: fixed; inset: 0 auto 0 0; margin: 0; height: 100vh; width: min(78vw, 300px); border-radius: 0 24px 24px 0; z-index: 60;
    transform: translateX(-105%); transition: transform .2s ease; }
  html.full-width .side.open { transform: none; box-shadow: var(--shadow); }
  html.full-width .scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .3); }
  html.full-width .collapse { display: none; }
  html.full-width .topbar .menu-btn { display: inline-grid; }
  html.full-width .shell.collapsed .side .logo, html.full-width .shell.collapsed .nav-item .lbl, html.full-width .shell.collapsed .nav-item .pill { display: revert !important; }
  html.full-width .shell.collapsed .side .nav-item { width: 100%; height: auto; margin: 0; justify-content: flex-start; padding: 9px 10px; }
  html.full-width .content { margin-left: 12px; }
  html.full-width .shell.collapsed .side-top { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { html.full-width .side { transition: none; } }

/* Settings → Go-live checklist */
.glv-top { display: grid; gap: 12px; }
.glv-prog { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.glv-bar { flex: 1; min-width: 160px; height: 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); overflow: hidden; }
.glv-fill { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.glv-ready { padding: 12px 14px; border-radius: 12px; background: var(--green); color: #fff; }
.glv-ready p { margin: 4px 0 0; }
.glv-blockers { padding: 10px 14px; border-radius: 12px; border: 1px solid var(--amber); background: color-mix(in srgb, var(--amber) 8%, transparent); }
.glv-blockers ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 2px; }
.glv-stage { margin-top: 14px; }
.glv-shead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.glv-shead h2 { margin: 0; }
.glv-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.glv-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); }
.glv-mark { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; }
.glv-ok .glv-mark { background: var(--green); }
.glv-warn .glv-mark { background: var(--amber); }
.glv-bad .glv-mark { background: var(--red); }
.glv-info .glv-mark { background: var(--blue); font-style: italic; }
.glv-bad { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); }
.glv-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.glv-crit { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); color: var(--muted); }
.glv-det { margin-top: 2px; overflow-wrap: anywhere; }
.glv-todo { margin-top: 4px; }
.glv-who { margin-top: 4px; color: var(--green-ink); }
.glv-act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.glv-keys { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.glv-key { font-family: ui-monospace, monospace; font-size: 11.5px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line); }
.glv-key.on { color: var(--green-ink); }
.glv-key.off { color: var(--red); }
.glv-gw { display: block; margin-top: 4px; }
.glv-urls, .glv-dns { margin-top: 14px; }
.glv-urls ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.glv-urlrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.glv-urlrow code { overflow-wrap: anywhere; padding: 4px 8px; border-radius: 8px; background: var(--input, var(--glass)); border: 1px solid var(--line); }
.glv-dns ol { padding-left: 20px; display: grid; gap: 4px; }
@media (max-width: 640px) {
  .glv-item { grid-template-columns: 26px minmax(0, 1fr); }
  .glv-act { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; }
}

/* ---- delivery + rewards (dlv / ptx) ---- */
.dlv-badge { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); white-space: nowrap; }
.dlv-badge.dlv-pickup { color: var(--blue); }
.dlv-badge.dlv-lalamove { color: var(--amber); }
.dlv-card .grid1 { display: grid; gap: 8px; }
.dlv-hours { gap: 8px; align-items: center; }
.dlv-hours .dlv-day { min-width: 92px; }
.dlv-hours input.short { width: 84px; }
.pk-dlv { margin: 4px 0; }
.tier-badge { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.tier-badge.tier-basic { background: var(--glass); border-color: var(--line); color: var(--ink-2, inherit); }
.tier-badge.tier-silver { background: #e6e9ee; color: #3d4654; }
.tier-badge.tier-gold { background: #f6e7b8; color: #6b4e00; }
.ptx-tiers td, .ptx-tiers th { padding: 6px 8px; text-align: left; }
.ptx-tiers input.short { width: 110px; }
.ptx-example { margin: 8px 0 0; }
/* ---- promo ---- */
/* Settings → Promo: sales + shipping promos from templates; the POS promo row uses the till's own styles */
.prm-tabs { max-width: 420px; margin-bottom: 12px; }
.prm-tabs button { font-size: 13px; }
.prm-note { margin: 0 0 10px; }
.prm-acts { gap: 6px; flex-wrap: wrap; }
.prm-rules summary { cursor: pointer; font-weight: 700; }
.prm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.prm-tpl { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; margin: 0; }
.prm-tpl:hover, .prm-tpl:focus-visible { border-color: var(--green-ink); }
.prm-tpl p { margin: 0; }
.prm-ex { margin-top: auto !important; padding-top: 6px; border-top: 1px dashed var(--line); }
.prm-form h3 { margin: 18px 0 6px; font-size: 15px; }
.prm-form .span2 { grid-column: 1 / -1; }
.prm-form [hidden] { display: none !important; }
.prm-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 4px 0; }
.prm-opt { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.prm-opt input { width: auto; margin: 0; }
.prm-pickwrap { display: grid; gap: 6px; margin: 6px 0; }
.prm-pick { max-height: 220px; overflow: auto; display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--input, var(--glass)); }
.prm-tiers { display: grid; gap: 6px; margin: 6px 0; }
.prm-tier { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.prm-tier label { flex: 1 1 140px; }
.prm-preview { margin: 12px 0; padding: 12px; border-radius: 12px; border: 1px dashed var(--line); display: grid; gap: 6px; }
.prm-banner { padding: 8px 12px; border-radius: 10px; background: var(--green-soft); color: var(--green-ink); font-weight: 700; text-align: center; }
.prm-banner.alt { background: transparent; border: 1px solid var(--line); }
.prm-on { margin: 10px 0; }
.prm-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.prm-log li { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) {
  .prm-grid { grid-template-columns: 1fr; }
  .prm-acts { justify-content: flex-start; }
}
.btn.prm-back { background: var(--glass); color: var(--text); border: 1px solid var(--line); font-weight: 600; }

/* ---- minimal ---- */
/* Owner feedback (Nov 2026): minimalist and compact on every admin page, phone (~390 px) first.
   Shared controls from /mod/minimal.js: .mn-range (date range bar + Custom picker), .mn-xm (Export & print menu),
   .mn-ib (square icon button with a real tooltip), .mn-tb (one-row list toolbar), .mn-kpi (compact stat cards).
   Spacing on a 4 / 8 px grid; one neutral surface + a 1 px border; colour only as a thin accent; no blur, no patterns. */
:root { --mn-r: 12px; --mn-h: 36px; --mn-surface: var(--surface-solid); --mn-accent: var(--green-ink); }

/* 1. plain background everywhere (light + dark): no dot grid, no tinted blobs */
body, .content, .shell { background-image: none !important; }
@media (min-width: 901px) { .shell { background-color: var(--bg); } .content { background-color: var(--bg); } }
.money-card::after { content: none; }

/* compact page heading */
.page { padding: 24px 32px 64px; }
.page-head { margin-bottom: 16px; gap: 8px 16px; align-items: center; }
.page-head h1, .dsh-head h1, .rp-head h1 { font-size: 26px; }
.page-head > .row { gap: 8px; flex-wrap: nowrap; align-items: center; }
@media (max-width: 600px) {
  .page { padding: 16px 16px 96px; }
  .page-head, .dsh-head, .rp-head { margin-bottom: 12px; }
  .page-head h1, .dsh-head h1, .rp-head h1 { font-size: 22px; }
  .page-head p, .dsh-head p, .rp-head p { font-size: 13px; }
}

/* ---------- stroke icons (Lucide-style, 24 px grid, 1.75 stroke) ---------- */
.mn-ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- icon button + tooltip (hover and keyboard focus; not the native title) ---------- */
.mn-ib { position: relative; display: inline-grid; place-items: center; width: var(--mn-h); height: var(--mn-h); min-width: var(--mn-h); padding: 0; flex: none;
  border-radius: 10px; background: var(--mn-surface); border: 1px solid var(--line); box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--text); }
.mn-ib:hover { border-color: color-mix(in srgb, var(--text) 30%, transparent); background: var(--raise); }
.mn-ib.on { color: var(--green-ink); border-color: color-mix(in srgb, var(--green-ink) 45%, transparent); }
.mn-ib[aria-expanded="true"] { background: var(--raise); border-color: var(--green-ink); }
.mn-badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--green); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); z-index: 70; pointer-events: none;
  padding: 4px 8px; border-radius: 6px; background: var(--text); color: var(--bg); font-size: 12px; font-weight: 500; line-height: 1.3; letter-spacing: 0;
  white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity .12s ease .25s; }
[data-tip]:hover::after, [data-tip]:focus-visible::after, [data-tip]:focus-within::after { opacity: 1; visibility: visible; }
[data-tip][aria-expanded="true"]::after, .mn-all[data-tip]::after { content: none; }
.mn-xm [data-tip]::after { left: auto; right: 0; transform: none; }
@media (pointer: coarse) { :root { --mn-h: 44px; } [data-tip]::after { display: none; } }

/* ---------- popovers: opaque surface, 1 px border, no blur ---------- */
.mn-pop { position: absolute; z-index: 65; top: calc(100% + 6px); right: 0; min-width: 220px; padding: 6px; border-radius: var(--mn-r);
  background: var(--surface-solid); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(0, 0, 0, .14); color: var(--text); }
.mn-pop[hidden] { display: none; }

/* ---------- Export & print menu ---------- */
.mn-xm { position: relative; display: inline-flex; flex: none; }
.mn-menu { display: grid; gap: 2px; }
.mn-mi { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 8px; border: 0; background: transparent;
  box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; font-size: 14px; text-align: left; color: var(--text); white-space: nowrap; }
.mn-mi:hover, .mn-mi:focus-visible { background: var(--green-soft); outline: none; }
.mn-mi .mn-ic { color: var(--muted); width: 16px; height: 16px; }
.mn-mi-print { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 2px; }
@media (pointer: coarse) { .mn-mi { min-height: 44px; } }

/* ---------- date range bar: one compact segmented row, scrolls sideways on a phone ---------- */
.mn-range { position: relative; display: flex; min-width: 0; max-width: 100%; }
.mn-seg { display: flex; gap: 2px; padding: 2px 0 2px 2px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  border-radius: 10px; background: color-mix(in srgb, var(--text) 5%, transparent); border: 1px solid var(--line); }
.mn-seg::-webkit-scrollbar { display: none; }
.mn-seg-b { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.mn-seg-b:hover { color: var(--text); border-color: transparent; }
.mn-seg-b.on { background: var(--surface-solid); color: var(--text); font-weight: 700; border-color: var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.mn-seg-c .mn-ic { width: 15px; height: 15px; }
/* "Custom" stays visible at the end while the presets scroll under it (phone) */
.mn-seg-c { position: sticky; right: 0; z-index: 1; background: color-mix(in srgb, var(--bg) 95%, var(--text)); box-shadow: -8px 0 8px -4px color-mix(in srgb, var(--bg) 95%, var(--text)); }
.mn-seg-c.on { background: var(--surface-solid); box-shadow: -8px 0 8px -4px color-mix(in srgb, var(--bg) 95%, var(--text)), 0 1px 2px rgba(0, 0, 0, .06); }
@media (pointer: coarse) { .mn-seg-b { height: 34px; } }
.mn-datepop { width: min(320px, calc(100vw - 32px)); padding: 12px; display: grid; gap: 8px; }
.mn-pop-h { font-weight: 700; font-size: 14px; }
.mn-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mn-dates label { margin: 0; font-size: 12px; color: var(--muted); }
.mn-dates input { margin-top: 4px; padding: 8px 8px; font-size: 14px; min-height: 40px; }
.mn-hint { margin: 0; font-size: 12px; color: var(--muted); }
.mn-err { margin: 0; font-size: 12px; color: var(--red); min-height: 0; }
.mn-err:empty { display: none; }
.mn-pop-f { display: flex; justify-content: flex-end; gap: 8px; }
.mn-pop-f button { min-height: 36px; }
/* phone: the custom picker opens as a small sheet above the bottom bar, so it never runs off the screen edge */
@media (max-width: 600px) { .mn-range .mn-datepop { position: fixed; left: 16px; right: 16px; top: auto; bottom: calc(88px + env(safe-area-inset-bottom)); width: auto; } }
/* old range rows: dashboards / home / reports keep the bar on one line with its date label */
.ex-period-row, .mn-rangerow { flex-wrap: nowrap; min-width: 0; gap: 8px 12px; }
.ex-period-row > .muted, .mn-rangerow > .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.dsh-head-right { gap: 8px; flex-wrap: nowrap; min-width: 0; max-width: 100%; }
.rp-bar-row { min-width: 0; }
@media (max-width: 600px) {
  .dsh-head-right { width: 100%; justify-content: space-between; }
  .ex-period-row > .muted, .mn-rangerow > .muted { display: none; }
}

/* ---------- list toolbar: ONE compact row ---------- */
.mn-tbw { margin: 8px 0 12px; display: grid; gap: 8px; }
.mn-tb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mn-tb > * { flex: none; margin: 0; }
.mn-search { flex: 1 1 auto; min-width: 0; position: relative; display: flex; align-items: center; margin: 0; color: var(--muted); }
.mn-search .mn-ic { position: absolute; left: 10px; width: 16px; height: 16px; pointer-events: none; }
.mn-search input, .mn-search input.ex-search { width: 100%; min-width: 0; height: var(--mn-h); margin: 0; padding: 0 12px 0 34px; border-radius: 10px;
  background: var(--mn-surface); border: 1px solid var(--line); color: var(--text); font-size: 14px; }
.mn-search input:focus { border-color: var(--green-ink); box-shadow: 0 0 0 3px var(--green-soft); outline: none; }
.mn-sort, .mn-sel { position: relative; display: inline-flex; align-items: center; margin: 0; height: var(--mn-h); border-radius: 10px; border: 1px solid var(--line);
  background: var(--mn-surface); color: var(--muted); max-width: 168px; }
.mn-sort .mn-ic { position: absolute; left: 9px; width: 16px; height: 16px; pointer-events: none; }
.mn-sort select, .mn-sel select { margin: 0; height: 100%; width: 100%; min-width: 0; border: 0; background: transparent; box-shadow: none; padding: 0 8px 0 30px;
  font-size: 13px; color: var(--text); text-overflow: ellipsis; }
.mn-sel select { padding-left: 10px; }
.mn-sort:focus-within, .mn-sel:focus-within { border-color: var(--green-ink); box-shadow: 0 0 0 3px var(--green-soft); }
.mn-tick { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--text); white-space: nowrap; }
.mn-tick input { width: auto; margin: 0; }
.mn-link { white-space: nowrap; }
.mn-add { display: inline-flex; align-items: center; gap: 6px; height: var(--mn-h); min-height: var(--mn-h); padding: 0 14px; border-radius: 10px; font-size: 14px; white-space: nowrap; flex: none; }
.mn-add .mn-ic { width: 16px; height: 16px; stroke-width: 2; }
.mn-chips:empty, .mn-chips[hidden] { display: none; }
.mn-chips .ex-chips { flex: none; }
.mn-chips .ex-chip-all, .mn-chips .ex-add { display: none; }
.mn-chips .ex-chip { padding: 4px 10px; font-size: 12px; }
.mn-fpanel { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 8px; border-radius: var(--mn-r); border: 1px solid var(--line); background: var(--mn-surface); }
.mn-fpanel > label { margin: 0; flex: 1 1 150px; max-width: 220px; }
.mn-fpanel select { margin: 0; padding: 7px 10px; font-size: 13px; }
.mn-tb .px-seg { flex: none; margin: 0; }
@media (max-width: 600px) {
  .mn-tb { gap: 6px; }
  .mn-sort { width: var(--mn-h); max-width: var(--mn-h); }
  .mn-sort select { padding: 0; opacity: 0; position: absolute; inset: 0; }   /* icon-sized on a phone; the select still opens natively */
  .mn-sort .mn-ic { left: 50%; transform: translateX(-50%); }
  .mn-sel { max-width: 120px; }
  .mn-add { width: var(--mn-h); padding: 0; justify-content: center; }
  .mn-add-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mn-tb .mn-link { display: none; }
  .mn-tb .mn-tick { font-size: 12px; }
  .mn-fpanel > label { max-width: none; flex-basis: calc(50% - 4px); }
}

/* ---------- select all: a small checkbox in the list head (no full-width box) ---------- */
.mn-all { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0; cursor: pointer; }
.mn-all input { width: 16px; height: 16px; margin: 0; }
.orow.ohead .mn-all-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html .obulk { gap: 6px; padding: 6px 10px; }
.obulk-n { font-size: 13px; margin-right: 4px; }
.mn-listhead { display: flex; align-items: center; gap: 8px; padding: 4px 12px; margin: 0 0 4px; }
@media (max-width: 900px) {
  html .olist .orow.ohead:has(.mn-all) { display: flex; align-items: center; padding: 2px 12px; border: 0; background: transparent; min-height: 32px; }
  html .olist .orow.ohead:has(.mn-all) > :not(.oc-check) { display: none; }
  html .olist .orow.ohead .mn-all-t { position: static; width: auto; height: auto; clip: auto; }
}
.pv-all, label.tick.pv-all { display: none; }

/* ---------- compact KPI / stat cards: neutral, side by side, small numbers, thin accent ---------- */
.dsh-feats, .dsh-tiles, .dsh-rgrid, .ex-tiles, .ex-hero, .rp-grid4, .money-grid { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)) !important; gap: 8px !important; }
.dsh-feats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
@media (min-width: 1100px) { .dsh-tiles, .ex-tiles, .ex-hero, .money-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 600px) {
  .dsh-feats, .dsh-tiles, .dsh-rgrid, .ex-tiles, .ex-hero, .rp-grid4, .money-grid, .stats, .rp-tiles, .rp-tiles.pft-tiles, .rp-tiles.sx-tiles4, .hc-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
  .dsh-feats > :last-child:nth-child(odd), .ex-hero > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
html .mn-kpi, html .dsh-feat, html .dsh-rcard, html .dsh-tile, html .ex-tile, html .ex-hstat, html .stat, html .rp-tile, html .money-card, .page .stats > .stat {
  position: relative; gap: 2px; padding: 12px 14px !important; border-radius: var(--mn-r) !important; min-width: 0;
  background: var(--mn-surface) !important; border: 1px solid var(--line) !important; box-shadow: inset 3px 0 0 var(--mn-accent) !important;
  color: var(--text) !important; filter: none !important; transform: none; }
html .money-card { color: var(--text) !important; }
html .money-card .k, html .money-card .muted { color: var(--muted) !important; opacity: 1; }
/* one restrained accent per card family instead of yellow / lilac / sky fills */
html .dsh-lilac, html .ex-tile.lilac, html .ex-hstat:nth-child(2), html .money-card.c2 { --mn-accent: color-mix(in srgb, var(--blue) 60%, var(--green-ink)); }
html .dsh-sky, html .ex-tile.sky, html .ex-hstat:nth-child(3), html .money-card.c3 { --mn-accent: var(--blue); }
html .ex-tile.yellow, html .ex-hstat:nth-child(4), html .money-card.c4 { --mn-accent: var(--amber); }
html .ex-tile.red { --mn-accent: var(--red); }
html .dsh-tile, html .stat, html .rp-tile { box-shadow: none !important; }
html .dsh-rcard.empty { box-shadow: none !important; }
a.mn-kpi, a.dsh-rcard, a.ex-tile, a.ex-hstat, a.stat { text-decoration: none; color: var(--text); }
a.mn-kpi:hover, a.dsh-rcard:hover, a.ex-tile:hover, a.ex-hstat:hover, a.stat:hover { border-color: color-mix(in srgb, var(--text) 28%, transparent) !important; transform: none; }
.dsh-feat-top { gap: 6px; }
.dsh-k, html .ex-hstat .k, .ex-tile .k, .dsh-rwhat { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 !important;
  background: none !important; color: var(--muted) !important; font-size: 12px !important; font-weight: 600; text-transform: none !important; letter-spacing: 0 !important; border-radius: 0; }
.dsh-feat-top .dsh-k { flex: 1 1 auto; }
.mn-go { flex: none; margin-left: auto; color: var(--muted); font-size: 18px; line-height: 1; font-weight: 400; text-decoration: none; }
a.mn-go { display: inline-grid; place-items: center; min-width: 32px; min-height: 32px; }
html .dsh-big, html .ex-hstat b, html .ex-tile b, html .dsh-tile .v, html .stat .v, html .rp-tile-v, html .rp-mini-v, html .money-card .v, html .ex-big {
  font-size: 22px !important; line-height: 1.15; margin: 2px 0 0 !important; font-weight: 700; color: var(--text) !important; }
html .dsh-rcard .dsh-big { font-size: 20px !important; }
.dsh-prev, .dsh-cap, html .ex-hstat .s { font-size: 11.5px; min-height: 0; color: var(--muted) !important; }
html .dsh-bar { height: 3px; margin-top: 6px; background: color-mix(in srgb, var(--text) 8%, transparent); }
html .dsh-bar i { background: var(--mn-accent); }
.dsh-chg { font-size: 11.5px; white-space: nowrap; }
.dsh-spark { height: 32px; margin-top: 4px; }
html .dsh-feat .dsh-btn, html .dsh-rcard .dsh-btn { display: none !important; }
@media (max-width: 600px) {
  html .dsh-big, html .ex-hstat b, html .ex-tile b, html .dsh-tile .v, html .stat .v, html .rp-tile-v, html .rp-mini-v, html .money-card .v, html .ex-big { font-size: 19px !important; }
  html .mn-kpi, html .dsh-feat, html .dsh-rcard, html .dsh-tile, html .ex-tile, html .ex-hstat, html .stat, html .rp-tile, html .money-card { padding: 10px 12px !important; }
  .dsh-cap { display: none; }
}
/* home: card groups and chart cards lose their heavy outlines too */
body[data-group="records"] .page .card, body[data-group="home"] .page .card, .page .card:has(> .dsh-card-head), body[data-group="records"] .page section.card,
html .dsh-card, html .ex-card { border: 1px solid var(--line) !important; border-radius: 14px !important; box-shadow: none !important; }
html .ex-card, html .dsh-card { padding: 16px; }
@media (max-width: 600px) { html .ex-card, html .dsh-card { padding: 12px; } }
/* home "To post today" buckets: neutral tiles; the number carries the colour only when there is something late */
html .ex-pb { background: var(--mn-surface) !important; border: 1px solid var(--line) !important; border-radius: 10px; padding: 8px 10px; color: var(--text); filter: none !important; }
html .ex-pb b { font-size: 18px; }
html .ex-pb span { color: var(--muted); font-size: 11.5px; }
html .ex-pb.b0:not(.zero) b { color: var(--green-ink); } html .ex-pb.b1:not(.zero) b { color: var(--amber); } html .ex-pb.b2:not(.zero) b, html .ex-pb.b3:not(.zero) b { color: var(--red); }
html .ex-pb.zero { opacity: .6; }
.ex-pbuckets { gap: 6px; }
@media (max-width: 600px) { .ex-pbuckets { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
/* home hero: neutral (beats the old nth-child pastel fills) */
html .ex-hero .ex-hstat, html .ex-hero .ex-hstat:nth-child(n) { background: var(--mn-surface) !important; border: 1px solid var(--line) !important; color: var(--text) !important; }
html .ex-hero .ex-hstat:nth-child(2) { --mn-accent: color-mix(in srgb, var(--blue) 60%, var(--green-ink)); } html .ex-hero .ex-hstat:nth-child(3) { --mn-accent: var(--blue); } html .ex-hero .ex-hstat:nth-child(4) { --mn-accent: var(--amber); }

/* ---------- dashboards & reports headers ---------- */
.dsh-head, .rp-head { align-items: center; }
.dsh-tools { display: inline-flex; align-items: center; gap: 8px; }
.rp-actions { flex-wrap: nowrap; }

/* ---------- small header row: heading + icon menu (HR month sheet, staff detail, channel export) ---------- */
.mn-h3row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0 8px; }
.mn-h3row h3 { margin: 0; }
.mn-h3row > .tick { margin: 0 auto 0 8px; }

/* ---------- attendance inside Profile ---------- */
html .mn-att { max-width: 900px; margin: 0 0 16px; padding: 16px; gap: 12px; }
html .mn-att .att-circle-wrap { width: min(56vw, 220px); margin: 0 auto; }
html .mn-att button.att-circle { font-size: 22px; }
html .mn-att .att-circle .clock { font-size: clamp(24px, 8vw, 32px); }
html .mn-att .att-strip { padding-bottom: 4px; }
html .mn-att .att-day { width: 42px; padding: 6px 0; }
html .mn-att .att-day b { font-size: 15px; }
html .mn-att .mn-h3row { margin-top: 8px; }
html .hc h2 .mn-go { font-size: 20px; color: var(--muted); }
@media (max-width: 600px) { html .mn-att { padding: 12px; } }

/* ---------- print view for SBC.printView(): content only, plain white ---------- */
@media print {
  body.mn-printing { background: #fff !important; color: #000; }
  body.mn-printing .side, body.mn-printing .topbar, body.mn-printing .bottom-nav, body.mn-printing #bottom-nav, body.mn-printing .mn-noprint,
  body.mn-printing .dsh-noprint, body.mn-printing .mn-tbw, body.mn-printing .obulk, body.mn-printing .pager, body.mn-printing .opager,
  body.mn-printing .page-head .row, body.mn-printing button, body.mn-printing .fb-stack, body.mn-printing footer { display: none !important; }
  body.mn-printing .shell { display: block; }
  body.mn-printing .content { margin: 0 !important; height: auto !important; overflow: visible !important; border-radius: 0; background: #fff !important; }
  body.mn-printing .page { padding: 0; max-width: none; }
  body.mn-printing .card, body.mn-printing .mn-kpi, body.mn-printing .stat { box-shadow: none !important; break-inside: avoid; }
}
/* customers list: the tier label hugs its text (no full-width pill) */
.cc-name .tier-badge { justify-self: start; width: auto; }
/* reports / dashboard headings: the icon menu stays top-right on a phone instead of wrapping to its own row */
@media (max-width: 600px) {
  .rp-head, .page-head:has(> .row > .mn-xm:last-child) { flex-wrap: nowrap; align-items: flex-start; }
  .rp-head > div:first-child, .page-head:has(> .row > .mn-xm:last-child) > div:first-child { flex: 1 1 auto; min-width: 0; }
  .rp-head > .rp-actions, .page-head > .row:has(> .mn-xm:last-child) { flex: none; }
}
html .mn-att .att-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
html .mn-att .att-card { padding: 10px; gap: 4px; } html .mn-att .att-card b { font-size: 15px; }

/* ---- catalog photos ---- */
/* "Photos in our storage" box (SBC.photoCopy in /mod/products.js): Products page strip, Import page card, Go-live item.
   Compact: one row (count + green button), a thin bar under it. Missing cost note on the Products page. */
.pcp { display: grid; gap: 6px; }
.pcp h2 { margin: 0; }
.pcp-compact { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--mn-r, 12px); background: var(--mn-surface, var(--surface-solid)); margin: 8px 0; }
.pcp-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pcp-count { margin: 0; font-size: 14px; }
.pcp-left { color: var(--muted); }
.pcp-bad { color: var(--red, #b42318); font-weight: 600; }
.pcp-ok { color: var(--green-ink); font-weight: 600; font-size: 14px; }
.pcp-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pcp-bar { height: 6px; border-radius: 999px; background: var(--raise); overflow: hidden; }
.pcp-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--green); transition: width .3s ease; }
.pcp-run { margin: 0; font-size: 13px; font-weight: 600; color: var(--green-ink); }
.pcp-failed summary { cursor: pointer; font-weight: 600; }
.glv-body .pcp-compact { margin: 8px 0 0; }
.glv-pct { font-size: 15px; color: var(--green-ink); margin-right: 4px; }
.pmc-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 8px; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .pcp-bar > i { transition: none; } }

/* ---- monitor ---- */
/* Settings → System health → Errors (/mod/monitor.js): compact check chips, message + collapsible scrubbed stack. */
.sysmon-checks { gap: 10px; flex-wrap: wrap; }
.sysmon-chk { display: inline-flex; align-items: center; gap: 6px; }
.sysmon-msg { max-width: 520px; overflow-wrap: anywhere; }
.sysmon-msg details summary { cursor: pointer; }
.sysmon-stack { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 240px; overflow: auto; margin: 4px 0 0; padding: 6px 8px; border-radius: 8px; background: var(--raise); }
/* ---- listings ---- */
/* Product editor → Sales channels → Marketplace listings (public/mod/listings.js): compact, one block per marketplace */
.lst-box { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.lst-title { margin: 0; font-size: 14px; }
.lst-m { display: grid; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--mn-r, 12px); background: var(--mn-surface, var(--surface-solid)); }
.lst-head { display: grid; gap: 2px; }
.lst-switch { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.lst-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.lst-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--muted); flex: none; }
.lst-d-live { background: var(--green); }
.lst-d-pending { background: var(--amber, #b54708); }
.lst-d-error { background: var(--red, #b42318); }
.lst-err { margin: 0; font-size: 13px; color: var(--red, #b42318); overflow-wrap: anywhere; }
.lst-note { margin: 0; }
.lst-more summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.lst-more[open] { display: grid; gap: 8px; }
.lst-field { display: grid; gap: 4px; }
.lst-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lst-q { flex: 1 1 140px; min-width: 0; }
.lst-results { display: grid; gap: 2px; max-height: 220px; overflow-y: auto; }
.lst-opt { text-align: left; font-size: 13px; padding: 6px 8px; background: none; border: 1px solid transparent; border-radius: 8px; }
.lst-opt:hover, .lst-opt:focus-visible { border-color: var(--line); background: var(--raise); }
.lst-chosen { margin: 0; }
.lst-attrs { display: grid; gap: 6px; }
.lst-attr { display: grid; gap: 2px; }
.lst-req > span { font-weight: 600; }
.lst-sel, .lst-in { width: 100%; min-width: 0; }
.lst-problems { padding: 6px 8px; border-radius: 8px; background: var(--raise); }
.lst-problems p, .lst-problems ul { margin: 0; }
.lst-problems ul { padding-left: 18px; }
.lst-acts { gap: 6px; }
.lst-map { display: grid; gap: 4px; }
.lst-map .row { gap: 6px; align-items: center; flex-wrap: wrap; }
.lst-mapout p { margin: 0; }
.lst-unm ul { margin: 4px 0 0; padding-left: 18px; max-height: 200px; overflow-y: auto; }

/* ---- themes ---- */
/* thm: Online store → Theme (preset gallery with live mini previews, Customise, versions) + Brand on other channels.
   Mini previews read --tp-* variables set per card through the CSSOM (style.setProperty) — no inline style attributes. */
.thm-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.thm-top-l { display: grid; gap: 6px; min-width: 0; }
.thm-state { gap: 8px; align-items: center; margin: 0; }
.thm-acts { gap: 8px; margin: 0; }
.thm-hint { flex-basis: 100%; margin: 0; }
.thm-main { display: grid; gap: 14px; align-items: start; }
@media (min-width: 1100px) { .thm-main { grid-template-columns: 1fr minmax(320px, 400px); } .thm-side { position: sticky; top: 12px; } }
.thm-side-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.thm-side-h h2 { margin: 0; }
.thm-gal h2 { margin: 0 0 2px; }
.thm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 10px; }
.thm-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--raise); }
.thm-card.on { border-color: var(--green-ink); box-shadow: 0 0 0 1px var(--green-ink); }
.thm-card-b { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.thm-card-b > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.thm-card-b p { margin: 0 0 6px; flex: 1; }
.thm-card-b button { align-self: flex-start; }
.thm-livetag { font-size: 10px; padding: 2px 7px; }
.thm-big { margin: 10px 0; }
.thm-ct { padding: 8px 10px; border-radius: 8px; font-size: 13px; margin-bottom: 10px; border: 1px solid var(--line); }
.thm-ct p { margin: 2px 0; }
.thm-ct.ok { color: var(--green-ink); background: var(--green-soft); border-color: transparent; }
.thm-ct.warn { color: var(--amber); border-color: var(--amber); }
.thm-colour { display: flex; gap: 6px; align-items: center; }
.thm-colour .thm-swatch { width: 44px; height: 38px; padding: 2px; flex: none; margin: 0; cursor: pointer; }
.thm-colour .thm-hex { font-family: ui-monospace, Menlo, Consolas, monospace; margin: 0; }
.thm-range { display: grid; gap: 6px; align-content: start; }
.thm-range input { width: 100%; }
.thm-seg { max-width: 320px; }
.thm-share { margin-top: 8px; }
.thm-vers { list-style: none; margin: 0; padding: 0; }
.thm-vers li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.thm-vers li:last-child { border-bottom: 0; }
.thm-brandlink { margin-top: 4px; max-width: 520px; }
.thm-plats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.thm-plat h2 { margin-top: 0; }
.thm-checks { margin: 8px 0; }
.thm-dls { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 8px; }
.thm-dl { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
/* mini storefront preview */
.thm-mini { --tp-bg: #0e0e0e; --tp-text: #f2efe6; --tp-display: "Helvetica Neue", Arial, sans-serif; --tp-sans: var(--tp-display); --tp-radius: 0px;
  background: var(--tp-bg); color: var(--tp-text); font-family: var(--tp-sans); display: flex; flex-direction: column; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: 1px solid var(--line); user-select: none; }
.thm-mini.big { aspect-ratio: 16 / 11; border: 1px solid var(--line); border-radius: 10px; }
.thm-m-bar { height: 6px; background: var(--tp-accent); flex: none; }
.thm-m-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--tp-rule); flex: none; }
.thm-mini[data-head="left"] .thm-m-head { grid-template-columns: auto 1fr auto; }
.thm-mini[data-head="left"] .thm-m-logo { grid-column: 1; grid-row: 1; justify-self: start; }
.thm-mini[data-head="left"] .thm-m-nav { grid-column: 2; grid-row: 1; justify-self: center; }
.thm-m-logo { height: 9px; width: auto; grid-column: 2; grid-row: 1; }
.thm-mini.big .thm-m-logo { height: 14px; }
.thm-mini[data-logo="dark"] .thm-m-logo { filter: brightness(0); }
.thm-m-nav, .thm-m-tools { display: flex; gap: 3px; grid-row: 1; }
.thm-m-nav { grid-column: 1; }
.thm-m-tools { grid-column: 3; justify-self: end; }
.thm-m-nav i, .thm-m-tools i { width: 12px; height: 2px; background: var(--tp-muted); display: block; }
.thm-m-hero { padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--tp-cell); flex: none; }
.thm-m-h1 { font: var(--tp-weight) 15px/0.95 var(--tp-display); letter-spacing: -.02em; text-transform: uppercase; }
.thm-mini.big .thm-m-h1 { font-size: 26px; }
.thm-mini[data-upper="0"] .thm-m-h1, .thm-mini[data-upper="0"] .thm-m-btn { text-transform: none; }
.thm-m-btns { display: flex; gap: 4px; }
.thm-m-btn { font: 800 8px/1 var(--tp-display); text-transform: uppercase; padding: 4px 7px; border: 1px solid var(--tp-rule); border-radius: var(--tp-radius); color: var(--tp-text); }
.thm-mini.big .thm-m-btn { font-size: 11px; padding: 7px 12px; }
.thm-m-btn.primary { background: var(--tp-text); color: var(--tp-on-text); border-color: var(--tp-text); }
.thm-mini[data-btn="outline"] .thm-m-btn.primary { background: transparent; color: var(--tp-text); border-width: 2px; }
.thm-mini[data-btn="accent"] .thm-m-btn.primary { background: var(--tp-accent); color: var(--tp-on-accent); border-color: var(--tp-accent); }
.thm-m-cards { display: grid; grid-template-columns: repeat(2, 1fr); flex: 1; min-height: 0; border-top: 1px solid var(--tp-rule); }
.thm-mini.big .thm-m-cards { grid-template-columns: repeat(3, 1fr); }
.thm-m-card { display: flex; flex-direction: column; border-right: 1px solid var(--tp-rule); min-height: 0; }
.thm-m-img { flex: 1; background: var(--tp-cell); display: block; min-height: 14px; }
.thm-m-cbar { display: flex; justify-content: space-between; padding: 3px 5px; font: 800 7px/1.2 var(--tp-display); text-transform: uppercase; background: var(--tp-bg); }
.thm-mini.big .thm-m-cbar { font-size: 10px; padding: 5px 7px; }
.thm-mini[data-card="gap"] .thm-m-cards { gap: 6px; padding: 6px; border: 0; }
.thm-mini[data-card="gap"] .thm-m-card { border: 0; }
.thm-mini[data-card="gap"] .thm-m-cbar { background: transparent; padding-left: 0; padding-right: 0; }
.thm-mini[data-card="boxed"] .thm-m-cards { gap: 5px; padding: 6px; border: 0; }
.thm-mini[data-card="boxed"] .thm-m-card { border: 1px solid var(--tp-line); border-radius: var(--tp-radius); overflow: hidden; }
.thm-mini[data-card="boxed"] .thm-m-cbar { background: var(--tp-surface); }
.thm-m-foot { height: 8px; background: var(--tp-accent); flex: none; }
.thm-mini[data-foot="quiet"] .thm-m-foot { background: var(--tp-surface); border-top: 1px solid var(--tp-line); }

/* channel page: auth status button (EasyStore-style) */
.btn.ch-conn.ok { background: var(--ok-bg, #e7f4ec); color: var(--ok, #1f7a45); border-color: transparent; }
.btn.ch-conn.off { background: var(--warn-bg, #fbeee6); color: var(--warn, #a4501b); border-color: transparent; }

/* ---- chp2 ---- EasyStore-style channel pages (/mod/chpages.js): header · stats card · platform preview · action cards.
   The mockups use fixed platform-like colours (white screens, red / orange / green / blue accents) in light and dark;
   generic shapes only — no logos or wordmarks. */
.chp2 { --chp2-ph: #e3e5e3; }
.chp2-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.chp2-head h1 { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 26px; }
.chp2-back { text-decoration: none; }
.chp2-hr { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chp2-hr a.btn { text-decoration: none; white-space: nowrap; }
.chp2-sub { margin: 4px 0 16px; max-width: 760px; }
.chp2-h2 { margin: 28px 0 12px; font-size: 16px; }

/* stats: one white card, three columns of two stats */
.chp2-stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 12px 0 8px; padding: 20px 0; border-radius: var(--radius);
  background: var(--surface-solid); border: 1px solid var(--line); }
.chp2-scol { display: grid; gap: 18px; align-content: start; padding: 0 24px; }
.chp2-scol + .chp2-scol { border-left: 1px solid var(--line); }
.chp2-stat { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chp2-sico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--green-soft); color: var(--green-ink); }
.chp2-stxt { min-width: 0; }
.chp2-sk { font-size: 13px; color: var(--muted); }
.chp2-sv { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chp2-sv.chp2-warn { color: var(--amber); }
.chp2-sv.chp2-ok { color: var(--green-ink); }

/* preview stage */
.chp2-pvwrap { margin: 20px 0 24px; container-type: inline-size; }
.chp2-preview { display: flex; justify-content: center; align-items: flex-end; gap: 28px; padding: 36px 16px; border-radius: var(--radius); overflow: hidden;
  background: color-mix(in srgb, var(--green-soft) 60%, transparent); border: 1px solid var(--line); }
.chp2-pvwrap figcaption { margin-top: 8px; text-align: center; }
@container (max-width: 820px) { .chp2-preview { zoom: .78; } }
@container (max-width: 620px) { .chp2-preview { zoom: .6; gap: 18px; } }
@container (max-width: 440px) { .chp2-preview { zoom: .46; } }
.chp2-preview, .chp2-preview * { box-sizing: border-box; }
.chp2-phone { position: relative; flex: none; width: 200px; height: 400px; padding: 8px; border-radius: 32px; background: #121212; box-shadow: 0 18px 40px rgba(0, 0, 0, .22); }
.chp2-notch { position: absolute; z-index: 2; top: 13px; left: 50%; transform: translateX(-50%); width: 58px; height: 14px; border-radius: 10px; background: #121212; }
.chp2-screen { display: flex; flex-direction: column; height: 100%; overflow: hidden; border-radius: 25px; background: #fff; color: #111; font-size: 10px; line-height: 1.3; text-align: left; }
.chp2-over { margin-left: -86px; z-index: 1; margin-bottom: -12px; }
.chp2-browser { display: flex; flex-direction: column; flex: none; width: 580px; height: 370px; overflow: hidden; border-radius: 12px; background: #fff; color: #111;
  border: 1px solid rgba(0, 0, 0, .12); box-shadow: 0 18px 40px rgba(0, 0, 0, .16); font-size: 10px; line-height: 1.3; text-align: left; }
.chp2-bbar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; flex: none; background: #ececec; }
.chp2-dot { width: 8px; height: 8px; border-radius: 50%; background: #c8c8c8; }
.chp2-url { flex: 1; height: 16px; margin-left: 10px; padding: 0 8px; border-radius: 6px; background: #fff; color: #777; font-size: 9px; line-height: 16px; overflow: hidden; white-space: nowrap; }
.chp2-bbody { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.chp2-tablet { flex: none; width: 540px; height: 370px; padding: 12px; border-radius: 24px; background: #121212; box-shadow: 0 18px 40px rgba(0, 0, 0, .22); }
.chp2-tablet .chp2-screen { display: grid; grid-template-columns: 1fr 150px; border-radius: 14px; background: #f4f5f4; }

/* shared mockup parts */
.chp2-img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--chp2-ph, #e3e5e3); }
.chp2-ph { background: var(--chp2-ph, #e3e5e3); }
.chp2-hero { border-radius: 0; flex: none; }
.chp2-bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--chp2-ph, #e3e5e3); }
.chp2-w-s { width: 28px; } .chp2-w-m { width: 52px; } .chp2-w-l { width: 96px; }
.chp2-pad { display: grid; gap: 5px; padding: 8px 10px; }
.chp2-row { display: flex; align-items: center; gap: 6px; }
.chp2-center { justify-content: center; }
.chp2-grow { flex: 1; }
.chp2-title { font-weight: 600; font-size: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chp2-muted { color: #888; font-size: 9px; }
.chp2-btn { display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; border-radius: 6px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.chp2-pill { border-radius: 999px; padding: 4px 14px; }
.chp2-btn-red { background: #fe2c55; color: #fff; }
.chp2-btn-line { border: 1px solid #222; color: #111; }
.chp2-btn-orange { background: #ee4d2d; color: #fff; }
.chp2-btn-ink { background: #111; color: #fff; }
.chp2-btn-green { background: #01422a; color: #fff; padding: 9px; }
.chp2-btn-wa { width: 100%; background: #25d366; color: #fff; padding: 9px; }
.chp2-btn-blue { background: #1877f2; color: #fff; }
.chp2-av { display: inline-block; width: 36px; height: 36px; border-radius: 50%; background: #d9d9d9; flex: none; }
.chp2-av-lg { width: 50px; height: 50px; } .chp2-av-sm { width: 22px; height: 22px; }
.chp2-ring { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #d62976; }
.chp2-handle { font-weight: 700; font-size: 11px; }
.chp2-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; }
.chp2-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px; }
.chp2-row4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 10px; }
.chp2-row5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 10px 12px; }
.chp2-tile { display: grid; gap: 3px; min-width: 0; align-content: start; }
.chp2-tname { font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chp2-tprice { font-size: 9.5px; font-weight: 700; white-space: nowrap; }
.chp2-ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* TikTok Shop: black / white / red */
.chp2-tt .chp2-tt-price { color: #fe2c55; font-size: 15px; font-weight: 800; }
.chp2-tt .chp2-tprice { color: #fe2c55; }
.chp2-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 10px 14px; border-top: 1px solid #eee; }
.chp2-prof { display: grid; justify-items: center; gap: 6px; padding: 28px 10px 8px; }
.chp2-tabs { display: flex; align-items: center; gap: 12px; padding: 4px 10px; border-bottom: 1px solid #eee; }
.chp2-tab.on { font-weight: 700; padding-bottom: 4px; border-bottom: 2px solid #111; }
/* Shopee: orange */
.chp2-sp-top { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #ee4d2d; flex: none; }
.chp2-sp-top-sm { padding: 26px 8px 8px; }
.chp2-sp-mark { width: 22px; height: 22px; border-radius: 5px; background: rgba(255, 255, 255, .92); flex: none; }
.chp2-sp-search, .chp2-st-search, .chp2-ps-search { flex: 1; padding: 5px 8px; border-radius: 3px; background: #fff; color: #999; font-size: 9px; }
.chp2-sp-shop { display: grid; grid-template-columns: auto 1fr 1.2fr; gap: 12px; align-items: center; margin: 10px 12px 0; padding: 12px; border-radius: 6px; background: #3f3f3f; color: #fff; }
.chp2-sp-shop .chp2-bar { background: rgba(255, 255, 255, .28); }
.chp2-sp-shop .chp2-av { background: #8a8a8a; }
.chp2-sp-info { display: grid; gap: 6px; justify-items: start; }
.chp2-sp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; }
.chp2-orange .chp2-tprice { color: #ee4d2d; }
/* online store */
.chp2-st-nav { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-bottom: 1px solid #eee; flex: none; }
.chp2-st-brand { font-weight: 800; font-size: 12px; letter-spacing: .14em; }
.chp2-st-search { max-width: 170px; border-radius: 999px; background: #f2f2f2; padding: 4px 10px; }
.chp2-st-links { display: flex; gap: 12px; font-size: 9px; font-weight: 600; }
.chp2-st-nav .chp2-st-search { margin-left: auto; }
.chp2-st-cart { width: 14px; height: 13px; border: 1.5px solid #111; border-radius: 2px 2px 4px 4px; flex: none; }
.chp2-st-hero { position: relative; height: 160px; overflow: hidden; flex: none; }
.chp2-st-hero .chp2-img { height: 100%; aspect-ratio: auto; border-radius: 0; }
.chp2-st-hero-sm { height: 130px; }
.chp2-st-heroText { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: rgba(0, 0, 0, .3); color: #fff; }
.chp2-st-h { font-weight: 800; font-size: 20px; letter-spacing: .22em; }
.chp2-st-heroText .chp2-btn-ink { background: #fff; color: #111; }
.chp2-st-mtop { display: flex; align-items: center; justify-content: space-between; padding: 26px 12px 8px; flex: none; }
.chp2-st-burger { width: 14px; height: 10px; border-top: 2px solid #111; border-bottom: 2px solid #111; }
/* POS */
.chp2-ps-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px; overflow: hidden; }
.chp2-ps-search { flex: none; border: 1px solid #e2e2e2; border-radius: 6px; }
.chp2-ps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chp2-ps-tile { display: grid; align-content: space-between; gap: 6px; min-height: 56px; padding: 8px; border-radius: 8px; color: #fff; font-weight: 700; overflow: hidden; }
.chp2-ps-scan { background: #111; } .chp2-ps-c0 { background: #01422a; } .chp2-ps-c1 { background: #2c5bb8; } .chp2-ps-c2 { background: #a86b00; }
.chp2-ps-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chp2-ps-k { font-size: 14px; }
.chp2-ps-cart { display: flex; flex-direction: column; gap: 7px; padding: 10px; background: #fff; border-left: 1px solid #e2e2e2; min-width: 0; }
.chp2-ps-h { font-weight: 800; font-size: 11px; }
.chp2-ps-line { display: flex; justify-content: space-between; gap: 6px; font-size: 9px; }
.chp2-ps-line span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chp2-ps-tot { padding-top: 6px; border-top: 1px solid #eee; font-weight: 800; }
.chp2-phone .chp2-ps-search { margin: 28px 8px 6px; }
.chp2-ps-grid-sm { grid-template-columns: 1fr 1fr; padding: 0 8px; }
.chp2-ps-bar { display: flex; justify-content: space-between; margin: 8px; padding: 9px 10px; border-radius: 8px; background: #01422a; color: #fff; font-weight: 700; }
/* WhatsApp */
.chp2-wa-top { display: flex; align-items: center; gap: 8px; padding: 26px 10px 8px; background: #075e54; color: #fff; flex: none; }
.chp2-wa-top .chp2-av { background: rgba(255, 255, 255, .45); }
.chp2-wa-chat { flex: 1; padding: 10px; background: #ece5dd; }
.chp2-wa-bubble { max-width: 90%; margin-left: auto; padding: 8px; border-radius: 8px 0 8px 8px; background: #dcf8c6; font-size: 9.5px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.chp2-wa-bubble p { margin: 0 0 3px; }
.chp2-wa-link { color: #027eb5; word-break: break-all; }
.chp2-wa-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 6px; align-items: center; padding: 4px 0; border-bottom: 1px solid #eee; }
.chp2-wa-thumb { width: 34px; }
.chp2-wa-iname { min-width: 0; }
.chp2-wa-qty { display: flex; gap: 3px; }
.chp2-wa-qty span { width: 15px; height: 15px; border: 1px solid #ddd; border-radius: 3px; text-align: center; line-height: 13px; font-size: 9px; }
.chp2-wa-field { padding: 6px; border: 1px solid #ddd; border-radius: 5px; color: #999; font-size: 9px; }
.chp2-wa-tall { height: 38px; }
/* Facebook & Instagram */
.chp2-mt-head { display: flex; align-items: center; gap: 6px; padding: 26px 10px 8px; flex: none; }
.chp2-mt-head .chp2-btn { margin-left: auto; }
.chp2-mt-post { position: relative; flex: none; }
.chp2-mt-post .chp2-img { border-radius: 0; }
.chp2-mt-tag { position: absolute; left: 10px; bottom: 10px; display: grid; gap: 1px; max-width: 72%; padding: 5px 8px; border-radius: 8px; background: rgba(255, 255, 255, .95); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.chp2-mt-acts { padding: 6px 10px 0; }
.chp2-cell { overflow: hidden; }
.chp2-cell .chp2-img { border-radius: 0; }

/* action cards: 3 columns; the first is filled green (like EasyStore's "View Store") */
.chp2-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.chp2-card { display: flex; align-items: flex-start; gap: 14px; min-height: 96px; padding: 18px; border-radius: var(--radius); background: var(--surface-solid);
  border: 1px solid var(--line); color: inherit; text-decoration: none; }
a.chp2-card:hover { border-color: var(--green-ink); }
a.chp2-card:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.chp2-cico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; background: var(--green-soft); color: var(--green-ink); }
.chp2-cico .mn-ic { width: 20px; height: 20px; }
.chp2-ctext { min-width: 0; }
.chp2-ctext b { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 15px; }
.chp2-ctext p { margin: 4px 0 0; font-size: 13px; line-height: 1.4; color: var(--muted); }
.chp2-ext { width: 14px; height: 14px; opacity: .7; }
.chp2-card.primary { background: var(--green); border-color: var(--green); color: #fff; }
.chp2-card.primary p { color: rgba(255, 255, 255, .82); }
.chp2-card.primary .chp2-cico { background: rgba(255, 255, 255, .15); color: #fff; }
.chp2-card.primary:hover { filter: brightness(1.12); }
.chp2-card.soon { background: transparent; border-style: dashed; }
.chp2-card.soon .chp2-cico { background: var(--line); color: var(--muted); }
.chp2-soon { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--amber) 15%, transparent); color: var(--amber); }
@media (max-width: 900px) { .chp2-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .chp2-stats { grid-auto-flow: row; grid-auto-columns: auto; padding: 4px 0; }
  .chp2-scol { padding: 14px 16px; }
  .chp2-scol + .chp2-scol { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .chp2-head h1 { font-size: 22px; }
  .chp2-cards { grid-template-columns: 1fr; }
  .chp2-card { min-height: 0; padding: 14px; }
  .chp2-preview { padding: 24px 8px; }
}
.chp2-sep { border-top: 6px solid #f3f3f3; }
.chp2-chip { padding: 3px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 9px; }
.chp2-chip.on { border-color: #fe2c55; color: #fe2c55; }
.chp2-pv-pos .chp2-over, .chp2-pv-store .chp2-over, .chp2-pv-shopee .chp2-over { margin-left: -48px; }
.chp2-mt-prof { display: flex; align-items: center; gap: 10px; padding: 28px 10px 0; }
.chp2-mt-pinfo { display: grid; gap: 5px; }
.chp2-mt .chp2-btn-blue { width: 100%; }
/* two-phone previews are narrower than browser / tablet ones: they keep their size longer on small screens */
@container (max-width: 820px) { .chp2-preview.chp2-pv-tiktok, .chp2-preview.chp2-pv-whatsapp, .chp2-preview.chp2-pv-meta { zoom: 1; } }
@container (max-width: 540px) { .chp2-preview.chp2-pv-tiktok, .chp2-preview.chp2-pv-whatsapp, .chp2-preview.chp2-pv-meta { zoom: .74; gap: 16px; } }
@container (max-width: 380px) { .chp2-preview.chp2-pv-tiktok, .chp2-preview.chp2-pv-whatsapp, .chp2-preview.chp2-pv-meta { zoom: .66; gap: 12px; } }
.chp2-menu a.mn-mi { text-decoration: none; }

/* ---- chtab ---- Channels tabs (scroll sideways on phones) + the marketplace "Account & sync" board on channel pages */
.subnav .sub-inner { scroll-padding-inline: 12px; touch-action: pan-x pan-y; }
.chtab-board { scroll-margin-top: 120px; }
.chtab-board[hidden] { display: none; }
.chtab-board .mk-card { margin: 0; }
.chtab-board h2:focus:not(:focus-visible) { outline: none; }
.mk-flash { margin: 0 0 10px; }
.mk-flash.ok { color: var(--green-ink); font-weight: 600; }

/* ---- mktmatch ---- Match products (marketplace listing → SOBACO variant) on the TikTok Shop / Shopee board */
.mkm { margin-top: 14px; }
.mkm-bar { flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.mkm-bar input[type="search"] { flex: 1 1 200px; min-width: 0; max-width: 320px; }
.mkm-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.mkm-filters button.on { background: var(--green); border-color: var(--green); color: #fff; }
.mkm-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mkm-score { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--raise); color: var(--muted); }
.mkm-score.mid { color: var(--amber); }
.mkm-score.hi { color: var(--green-ink); }
.mkm-src { display: inline-block; margin-top: 3px; font-size: 12px; color: var(--muted); }
.mkm-foot { flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.mkm-foot .grow { flex: 1 1 auto; }
.mkm-csv { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.mkm-dlg { width: min(520px, 94vw); padding: 0; border: 0; border-radius: 16px; background: transparent; }
.mkm-dlg::backdrop { background: rgba(0, 0, 0, .35); }
.mkm-dlg .card { margin: 0; }
.mkm-dlghead { justify-content: space-between; align-items: center; }
.mkm-dlg input[type="search"] { width: 100%; margin: 8px 0; }
.mkm-picks { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; }
.mkm-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: inherit; cursor: pointer; }
.mkm-pick:hover, .mkm-pick:focus-visible { border-color: var(--green-ink); }
.mkm-cell { min-width: 0; text-align: left; }

/* ---- ted: Themes page + theme editor (/mod/themeeditor.js) ---- */
.ted-cur { display: grid; gap: 22px; align-items: center; }
.ted-cur-info h2 { font-size: 30px; margin: 2px 0 4px; letter-spacing: var(--track); }
.ted-cur-acts { flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ted-shots { position: relative; min-height: 260px; padding-right: 70px; }
.ted-shot-d { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-solid); box-shadow: var(--shadow); }
.ted-shot-bar { display: flex; gap: 5px; padding: 7px 10px; border-bottom: 1px solid var(--line); } .ted-shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.ted-shot-vp { position: relative; overflow: hidden; height: 300px; }
.ted-shot-f { position: absolute; top: 0; left: 0; width: 1280px; height: 1000px; border: 0; transform: scale(.42); transform-origin: 0 0; pointer-events: none; background: #0e0e0e; }
.ted-shot-p { position: absolute; right: 0; bottom: -14px; width: 128px; border: 6px solid #1c1c1c; border-radius: 22px; overflow: hidden; background: #0e0e0e; box-shadow: var(--shadow); }
.ted-shot-p .ted-shot-vp { height: 250px; }
.ted-shot-f.phone { width: 390px; height: 820px; transform: scale(.3); }
.ted-how { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; }
@media (min-width: 900px) { .ted-cur { grid-template-columns: minmax(240px, 1fr) 2fr; } .ted-shot-vp { height: 340px; } .ted-shot-f { transform: scale(.5); } }
/* full-screen editor */
body.ted-full .side, body.ted-full .topbar, body.ted-full .content > .foot, body.ted-full .bottom-nav, body.ted-full .scrim { display: none !important; }
body.ted-full { overflow: hidden; } body.ted-full .ai-fab, body.ted-full .ai-sheet { display: none !important; }
body.ted-full .shell { display: block; min-height: 0; padding: 0; margin: 0; } body.ted-full .content { padding: 0 !important; margin: 0; min-height: 0; }
body.ted-full #view-other { padding: 0; max-width: none; overflow: visible; }
.ted-root { display: flex; flex-direction: column; height: 100vh; height: 100dvh; background: var(--bg); }
.ted-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface-solid); flex-wrap: wrap; }
.ted-exit { display: inline-flex; align-items: center; gap: 4px; } .ted-exit svg { width: 16px; height: 16px; }
.ted-bar-mid { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.ted-pagesel { max-width: 280px; min-width: 0; margin: 0; }
.ted-devs { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.ted-bar-r { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ted-status { min-width: 0; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ted-status.err { color: var(--red); white-space: normal; }
.ted-ib { display: inline-grid; place-items: center; width: 34px; height: 34px; min-height: 0; padding: 0; border-radius: 9px; background: transparent; border: 1px solid transparent; color: var(--text); }
.ted-ib svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ted-ib:hover { background: var(--raise); border-color: var(--line); } .ted-ib[aria-pressed="true"] { background: var(--green-soft); color: var(--green-ink); border-color: var(--line); }
.ted-ib:disabled { opacity: .35; }
.ted-viewseg { display: none; }
.ted-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 340px 1fr; }
.ted-panel { border-right: 1px solid var(--line); background: var(--surface-solid); display: flex; flex-direction: column; min-height: 0; }
.ted-tabs { margin: 10px 12px 0; display: grid; grid-template-columns: 1fr 1fr; }
.ted-pbody { flex: 1; overflow: auto; padding: 10px 12px 40px; }
.ted-grp { margin: 0 0 16px; } .ted-grp h3 { margin: 10px 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ted-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ted-row { display: flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--raise); position: relative; transform: translateY(var(--ted-dy, 0)); }
.ted-row.main { border-style: dashed; } .ted-row.off .ted-row-name span:first-child { opacity: .5; text-decoration: line-through; }
.ted-row.dragging { z-index: 5; box-shadow: var(--shadow); opacity: .92; transition: none; }
.ted-row.drop-before { box-shadow: 0 -3px 0 var(--green-ink); } .ted-row.drop-after { box-shadow: 0 3px 0 var(--green-ink); }
.ted-grip { width: 30px; height: 38px; min-height: 0; padding: 0; background: transparent; border: 0; cursor: grab; touch-action: none; color: var(--muted); display: grid; place-items: center; }
.ted-grip svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; } .ted-grip:active { cursor: grabbing; }
.ted-grip-sp { width: 12px; }
.ted-row-name { flex: 1; text-align: left; background: transparent; border: 0; min-height: 38px; padding: 6px 4px; font-weight: 600; color: var(--text); }
.ted-row-name:hover { text-decoration: underline; }
.ted-more { position: relative; }
.ted-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 170px; background: var(--surface-solid); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 4px; display: grid; }
.ted-mi { text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 9px 10px; min-height: 0; color: var(--text); } .ted-mi:hover, .ted-mi:focus-visible { background: var(--raise); }
.ted-add { width: 100%; margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--green-ink); color: var(--green-ink); background: transparent; border-radius: 10px; }
.ted-add svg, .ted-addblock svg, .ted-sec-foot svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ted-addblock, .ted-sec-foot button { display: inline-flex; align-items: center; gap: 6px; }
.ted-note { background: var(--green-soft); border-radius: 10px; padding: 8px 10px; margin: 0 0 8px; } .ted-note p { margin: 0 0 6px; }
.ted-tip { margin-top: 18px; }
.ted-backlist { margin-bottom: 6px; } .ted-sec-h { margin: 4px 0 2px; font-size: 20px; }
.ted-fields { display: grid; gap: 12px; margin: 12px 0; }
.ted-field label, .ted-field > div { display: grid; gap: 5px; font-size: 13px; font-weight: 600; } .ted-field label.tick { display: flex; font-weight: 500; }
.ted-field input, .ted-field select, .ted-field textarea { margin: 0; width: 100%; }
.ted-field input[type="checkbox"] { width: auto; }
.ted-lab { font-size: 13px; font-weight: 600; } .ted-rl { display: flex; justify-content: space-between; } .ted-rv { color: var(--muted); font-weight: 500; }
.ted-colour { display: flex; gap: 8px; align-items: center; } .ted-colour input[type="color"] { width: 44px; height: 38px; padding: 2px; flex: none; } .ted-hex { font-family: ui-monospace, Menlo, monospace; }
.ted-media-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ted-mthumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: grid; place-items: center; font-size: 11px; color: var(--muted); background: var(--raise); }
.ted-block { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 6px; background: var(--raise); }
.ted-block summary { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 4px 4px 10px; cursor: pointer; font-weight: 600; }
.ted-bacts { display: flex; } .ted-bacts .ted-ib { width: 30px; height: 30px; } .ted-bfields { padding: 4px 10px 10px; display: grid; gap: 12px; }
.ted-sec-foot { display: flex; gap: 8px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.ted-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ted-style { display: grid; gap: 4px; padding: 6px; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--raise); text-align: left; color: var(--text); }
.ted-style.on { border-color: var(--green-ink); box-shadow: 0 0 0 2px var(--green-soft); }
.ted-sw { display: flex; height: 22px; border-radius: 6px; overflow: hidden; } .ted-sw i { flex: 1; }
.ted-canvas { position: relative; overflow: auto; background: var(--wall); padding: 12px; min-height: 0; }
.ted-vp { width: calc(var(--ted-w, 1280px) * var(--ted-k, 1)); height: calc(var(--ted-h, 800px) * var(--ted-k, 1)); margin: 0 auto; position: relative; }
.ted-frame { position: absolute; top: 0; left: 0; width: var(--ted-w, 1280px); height: var(--ted-h, 800px); border: 0; background: #0e0e0e; transform: scale(var(--ted-k, 1)); transform-origin: 0 0; box-shadow: var(--shadow); border-radius: 6px; }
.ted-vp[data-device="phone"] .ted-frame, .ted-vp[data-device="tablet"] .ted-frame { border-radius: 18px; outline: 8px solid #1c1c1c; }
.ted-modal { position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 16px; }
.ted-modal-card { background: var(--surface-solid); border-radius: 18px; padding: 18px; width: min(520px, 100%); max-height: 86vh; overflow: auto; box-shadow: var(--shadow); }
.ted-modal-card.wide { width: min(860px, 100%); }
.ted-modal-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; } .ted-modal-h h2 { margin: 0; }
.ted-vers { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.ted-vers li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.ted-picker { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.ted-pick { width: 100%; height: 100%; display: grid; gap: 4px; text-align: left; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--raise); color: var(--text); min-height: 0; }
.ted-pick:hover, .ted-pick:focus-visible { border-color: var(--green-ink); }
.ted-thumb { display: grid; gap: 3px; height: 54px; padding: 6px; border-radius: 8px; background: var(--bg); grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }
.ted-thumb i { background: var(--line); border-radius: 3px; }
.ted-th-slideshow i:first-child, .ted-th-image_banner i:first-child, .ted-th-video i:first-child, .ted-th-cta_band i:first-child, .ted-th-announcement i:first-child { grid-column: 1 / -1; grid-row: 1 / -1; background: var(--green-soft); }
.ted-th-image_with_text i:first-child { grid-row: 1 / -1; background: var(--green-soft); }
.ted-th-rich_text i, .ted-th-button_text i, .ted-th-faq i, .ted-th-newsletter i { grid-column: 1 / -1; height: 6px; align-self: center; }
.ted-th-spacer i { grid-column: 1 / -1; height: 2px; align-self: center; }
.ted-mgrid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ted-mitem { width: 100%; display: grid; gap: 4px; padding: 4px; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--raise); text-align: left; color: var(--text); }
.ted-mitem img, .ted-mitem .ted-mthumb { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.ted-mitem span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .ted-bar { gap: 6px; padding: 6px 8px; flex-wrap: nowrap; display: grid; grid-template-columns: auto 1fr; }
  .ted-exit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ted-bar-r { flex-wrap: nowrap; gap: 4px; }
  .ted-bar-mid { grid-column: 1 / -1; order: 3; }
  .ted-pagesel { max-width: none; flex: 1; }
  .ted-devs { display: none; } .ted-prevbtn { display: none; }
  .ted-status { max-width: 130px; }
  .ted-viewseg { display: inline-grid; grid-template-columns: 1fr 1fr; }
  .ted-main { grid-template-columns: 1fr; }
  .ted-root[data-view="edit"] .ted-canvas { display: none; }
  .ted-root[data-view="preview"] .ted-panel { display: none; }
  .ted-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ted-style-btn { justify-self: start; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--green-ink); font-weight: 600; }
/* ---- xpt (EasyStore-style export dialog: scope, date range, export format, file format, Advanced columns) ---- */
dialog.xpt-dlg { width: min(560px, 94vw); max-height: min(92vh, 860px); overflow-y: auto; overscroll-behavior: contain; }
dialog.xpt-dlg select.xpt-select { display: block; width: 100%; max-width: 100%; margin: 0; }
.xpt-n { font-weight: 400; color: var(--muted); }
.xpt-rangerow { display: flex; flex-direction: column; gap: 4px; }
.xpt-custom { margin-top: 8px; }
.xpt-adv { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--glass); }
.xpt-adv > summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--green-ink); padding: 4px 0; }
.xpt-adv[open] > summary { margin-bottom: 6px; }
.xpt-advtools { gap: 6px; margin-bottom: 6px; }
.xpt-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; max-height: 40vh; overflow-y: auto; }
.xpt-col span { overflow-wrap: anywhere; }
.xpt-count { font-weight: 700; margin: 6px 0 2px; }
.xpt-acts { justify-content: flex-end; gap: 8px; position: sticky; bottom: -22px; padding: 10px 0 2px; background: var(--surface-solid); }
@media (max-width: 600px) {
  dialog.xpt-dlg { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 92vh; }
  .xpt-cols { grid-template-columns: 1fr; }
  .xpt-acts button { flex: 1; }
}

/* ---- chn2 ---- channel sub-pages (#chMeta/<part>, #posHub/<part>, #chMarket/<ch>/orders …): a thin back bar to the channel
   page on top of the existing view, so every card on a channel page stays inside Channels */
.chn2-bar { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; min-height: 44px; }
.chn2-bar .chn2-back { text-decoration: none; }
.chn2-crumb { color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.chn2-crumb:hover, .chn2-crumb:focus-visible { color: var(--text); text-decoration: underline; }
.chn2-denied { margin-top: 16px; }
.chp2.chn2 { margin-bottom: 4px; }
/* jobs: background imports / exports — top-bar button + dropdown, live cards on import pages (/mod/jobs.js) */
.job-wrap { position: relative; margin-left: auto; }
.topbar .job-wrap { order: 3; margin-left: auto; }
.topbar .job-wrap ~ .profile { margin-left: 8px; }
.job-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; border: 1px solid var(--line); background: var(--raise); }
.job-btn[hidden] { display: none; }
.job-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.job-dot.job-spin { background: var(--green-ink); animation: job-pulse 1.2s ease-in-out infinite; }
@keyframes job-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .job-dot.job-spin { animation: none; } }
.job-pct { font-variant-numeric: tabular-nums; color: var(--green-ink); }
.job-menu { width: min(420px, calc(100vw - 20px)); max-height: min(70vh, 640px); overflow: auto; }
.job-head { padding: 4px 6px 8px; border-bottom: 1px solid var(--line); }
.job-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.job-item { display: grid; gap: 4px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); }
.job-card { margin: 8px 0; }
.job-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.job-label { font-size: 14px; overflow-wrap: anywhere; }
.job-chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.job-chip-running, .job-chip-queued, .job-chip-uploading { color: var(--green-ink); }
.job-chip-done { background: var(--green); color: #fff; }
.job-chip-failed { color: var(--red); }
.job-chip-paused, .job-chip-cancelled { color: var(--muted); }
.job-file { overflow-wrap: anywhere; }
.job-bar { width: 100%; height: 8px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; }
.job-bar::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
.job-bar::-webkit-progress-value { background: var(--green-ink); border-radius: 999px; }
.job-bar::-moz-progress-bar { background: var(--green-ink); border-radius: 999px; }
.job-counts { color: var(--muted); font-variant-numeric: tabular-nums; }
.job-actions { gap: 6px; flex-wrap: wrap; }
.job-probbox { display: grid; gap: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.job-problems { margin: 0; padding-left: 18px; max-height: 220px; overflow: auto; font-size: 12.5px; }
.job-for { display: grid; gap: 4px; margin-bottom: 10px; }
.job-for[hidden] { display: none; }
@media (max-width: 760px) { .job-btxt { display: none; } .job-menu { position: fixed; left: 10px; right: 10px; top: calc(var(--top) + 6px); width: auto; } }
/* ---- tst: Online store → Themes — Theme store (public/mod/themestore.js) ---- */
.tst-sec h2 { margin-bottom: 2px; }
.tst-grid { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tst-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface-solid); display: flex; flex-direction: column; }
.tst-thumb { position: relative; height: 210px; overflow: hidden; border-bottom: 1px solid var(--line); background: #0e0e0e; }
.tst-thumb-f { position: absolute; top: 0; left: 0; width: 1280px; height: 1000px; border: 0; transform: scale(.21); transform-origin: 0 0; pointer-events: none; }
.tst-card-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.tst-card-b h3 { margin: 0; font-size: 16px; }
.tst-desc { margin: 0 0 6px; flex: 1; }
.tst-acts { gap: 8px; align-items: center; }
.tst-more { position: relative; }
.tst-menu { position: absolute; z-index: 30; left: 0; top: calc(100% + 4px); min-width: 200px; background: var(--surface-solid); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; display: grid; }
.tst-menu[hidden] { display: none; }
.tst-mi { text-align: left; background: transparent; border: 0; padding: 9px 12px; border-radius: 8px; min-height: 0; font-weight: 600; }
.tst-mi:hover, .tst-mi:focus-visible { background: var(--raise); }
.tst-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 12px 0; }
.tst-dl dt { font-size: 12px; color: var(--muted); } .tst-dl dd { margin: 0; font-weight: 600; }
.ted-tname { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }


/* ---- jobs history ---- */
.job-hist { margin-top: 1.25rem; }
.job-hist h4 { margin: 0 0 .5rem; font-size: .95rem; }
.job-histtbl td { vertical-align: top; }

/* ---- cour: courier choice (order page card, booking dialog, Delivery settings) ---- */
.cour-card { border: 1px solid var(--line, rgba(0,0,0,.12)); border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.cour-chose, .cour-booked { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 2px 0; }
.cour-chose b { font-size: 1.05rem; }
.cour-k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #666); }
.cour-flag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; color: var(--amber, #b26b00); }
.cour-dlg .ig-modal-card { max-width: 640px; }
.cour-dlg-list { display: grid; gap: 10px; margin: 8px 0; }
.cour-dlg-row { border: 1px solid var(--line, rgba(0,0,0,.12)); border-radius: 12px; padding: 10px 12px; }
.cour-dlg-row.cour-dlg-flag { border-color: var(--red, #c0392b); }
.cour-dlg-row.cour-dlg-changed { border-color: var(--amber, #b26b00); }
.cour-dlg-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cour-dlg-chose { font-weight: 700; margin: 6px 0; color: var(--green, #1f7a4d); }
.cour-dlg-chose.cour-missing { color: var(--red, #c0392b); }
.cour-dlg-note { color: var(--amber, #b26b00); margin: 4px 0 0; }
.cour-dlg-row select { width: 100%; }
.cour-set { margin: 12px 0 4px; }
.cour-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cour-rows { display: grid; gap: 8px; margin: 6px 0; }
.cour-row { display: grid; grid-template-columns: 1.3fr 1.2fr .7fr 1fr auto auto; gap: 8px; align-items: end; padding-bottom: 8px; border-bottom: 1px dashed var(--line, rgba(0,0,0,.12)); }
@media (max-width: 720px) { .cour-row { grid-template-columns: 1fr 1fr; } }
.cour-ab-rows { display: grid; gap: 12px; margin: 8px 0; }
.cour-ab-row { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.cour-ab-ticks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 6px; font-weight: 600; }
.pk-return { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 6px; }
.pk-return h2 { font-size: 12px; margin: 0 0 2px; text-transform: uppercase; letter-spacing: .04em; }

/* ---- ord3: back pill, accordion details, channel badges, order dialogs ---- */
/* one back control on every detail / sub page: "‹ Back to …" at the top-left above the title */
.backpill { display: inline-flex; align-items: center; gap: 4px; width: max-content; max-width: 100%; margin: 0 0 8px; padding: 3px 12px 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.6; text-decoration: none; letter-spacing: 0; }
.backpill:hover, .backpill:focus-visible { color: var(--text); background: var(--green-soft); border-color: transparent; }
.backpill-chev { font-size: 18px; line-height: 1; margin-top: -2px; }
.backpill > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-head.has-back > div:first-child { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.page-head.has-back h1 { margin-top: 0; }
.chp2-head.has-back { align-items: flex-end; }
.chp2-titles { display: flex; flex-direction: column; align-items: flex-start; flex: 1 1 auto; min-width: 0; }
.chp2-titles h1 { margin: 0; font-size: 26px; }
.chn2-bar .backpill { margin: 0; }
@media (max-width: 760px) { .chp2-titles h1 { font-size: 22px; } }

/* details / summary: no browser triangle — a subtle bordered row with a chevron on the right that turns when open.
   :where() keeps it weak, so components with their own summary look (menus, filter sections) keep theirs. */
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
:where(details:not(.omenu):not(.px-bulkmove):not(.ex-add):not(.ex-fsec):not(.ted-block)) > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 600; transition: background-color .15s ease, border-color .15s ease; }
:where(details:not(.omenu):not(.px-bulkmove):not(.ex-add):not(.ex-fsec):not(.ted-block)) > summary:hover { background: var(--green-soft); border-color: transparent; }
:where(details:not(.omenu):not(.px-bulkmove):not(.ex-add):not(.ex-fsec):not(.ted-block)) > summary:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
:where(details:not(.omenu):not(.px-bulkmove):not(.ex-add):not(.ex-fsec):not(.ted-block)) > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 0 auto; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; opacity: .55; transform: rotate(-45deg); transition: transform .18s ease; }
:where(details[open]:not(.omenu):not(.px-bulkmove):not(.ex-add):not(.ex-fsec):not(.ted-block)) > summary { margin-bottom: 10px; }
:where(details[open]:not(.omenu):not(.px-bulkmove):not(.ex-add):not(.ex-fsec):not(.ted-block)) > summary::after { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { :where(details) > summary, :where(details) > summary::after { transition: none; } }

/* channel badges: coloured square with a generic glyph (or the owner's uploaded icon) + name — never a third-party logo drawing */
.chb { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; vertical-align: middle; letter-spacing: 0; }
.chb-mark { display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--chb, #4a4f4c); color: #fff; overflow: hidden; }
.chb-sm .chb-mark { width: 20px; height: 20px; border-radius: 6px; }
.chb-ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chb-mark:has(.chb-img) { background: transparent; }
.chb-website { --chb: #01422a; } .chb-pos { --chb: #4a4f4c; } .chb-tiktok { --chb: #111; } .chb-tiktok_dm { --chb: #3a3a3a; } .chb-shopee { --chb: #e4572e; }
.chb-lazada { --chb: #23379e; } .chb-facebook { --chb: #2f5fb3; } .chb-instagram { --chb: #a2378f; } .chb-instagram_live { --chb: #d6336c; } .chb-whatsapp { --chb: #1f8f50; }
.chb-wholesale, .chb-dropship { --chb: #8a6d1f; } .chb-custom { --chb: #1d3561; } .chb-email { --chb: #6a706b; }
:root[data-theme="dark"] .chb-tiktok, :root[data-theme="dark"] .chb-website { --chb: #2c3a33; }
.ch-ico-badge { background: transparent !important; }
.ch-ico-badge .chb-mark { width: 36px; height: 36px; border-radius: 10px; }
.ch-ico-badge .chb-ico { width: 20px; height: 20px; }
.ex-chname .chb { font-weight: 600; }
.ex-subrow td:first-child { padding-left: 26px; }
.ex-subrow { color: var(--muted); font-size: 13px; }

/* in-app dialogs with a form inside (cancel order, WhatsApp reminder, arrange shipment) */
.dl-card.dl-wide { width: min(520px, calc(100vw - 24px)); }
.ord3-form { display: grid; gap: 12px; margin: 6px 0 4px; }
.ord3-form .dl-label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.ord3-toggle { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.ord3-toggle input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.ord3-toggle > span { display: grid; gap: 2px; }
.ord3-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(168, 107, 0, .1); color: var(--amber); font-size: 13px; }
.ord3-wa { display: grid; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.ord3-msg { margin: 0; white-space: pre-wrap; font: inherit; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--input); border: 1px solid var(--line); }
.ord3-set .field { display: grid; gap: 4px; max-width: 360px; }
.ord3-days { max-width: 120px; }
.ord3-iconlist { display: grid; gap: 8px; }
.ord3-iconrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.ord3-iconrow .chb { min-width: 170px; }
.ord3-iconrow label.btn { cursor: pointer; }
.ord3-set > h2:first-child { margin-top: 0; }

/* ---- ord3: EasyStore-style Home (hero banner, area charts, Unified tiles, compact "To post today") ---- */
.hm3-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding: 28px; border-radius: 24px; color: #fff;
  background: linear-gradient(120deg, var(--green) 0%, #0b5e3d 55%, #2f8a5f 100%); box-shadow: var(--shadow); margin-bottom: 16px; }
.hm3-hero-text { display: grid; gap: 6px; min-width: 0; }
.hm3-hi { font-size: 13px; opacity: .85; }
.hm3-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.hm3-title { margin: 0; font-size: 30px; line-height: 1.12; letter-spacing: -.03em; color: #fff; }
.hm3-sub { margin: 0; font-size: 14px; opacity: .85; }
.hm3-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hm3-stat { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); color: #fff; text-decoration: none; min-width: 0; }
a.hm3-stat:hover { background: rgba(255, 255, 255, .2); }
.hm3-stat > div { display: grid; gap: 2px; min-width: 0; }
.hm3-stat b { font-size: 14px; line-height: 1.3; }
.hm3-stat span:not(.hm3-stat-ico) { font-size: 12px; opacity: .8; }
.hm3-stat-ico { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, .16); }
.hm3-ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm3-chart { display: flex; flex-direction: column; gap: 4px; }
.hm3-chart-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hm3-k { font-size: 13px; font-weight: 700; color: var(--muted); }
.hm3-big { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hm3-chg { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.hm3-chg.up { color: #137a45; background: rgba(19, 122, 69, .12); } .hm3-chg.down { color: var(--red); background: rgba(196, 51, 47, .1); } .hm3-chg.flat { color: var(--muted); background: var(--line); }
svg.hm3-area { width: 100%; height: 104px; margin-top: 8px; overflow: visible; }
.hm3-area path { vector-effect: non-scaling-stroke; }
.hm3-area .hm3-prev { fill: none; stroke: var(--muted); stroke-width: 1.5; opacity: .35; }
.hm3-area .hm3-fill { fill: var(--green-ink); opacity: .1; stroke: none; }
.hm3-area .hm3-cur { fill: none; stroke: var(--green-ink); stroke-width: 2.5; stroke-linecap: round; }
.hm3-axis { display: flex; justify-content: space-between; }
.hm3-more { font-size: 13px; font-weight: 700; color: var(--green-ink); text-decoration: none; margin-top: 4px; align-self: flex-start; }
.hm3-more:hover { text-decoration: underline; }
.hm3-tilerow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.hm3-tilecard { margin: 0; }
.hm3-tilecard h2 { margin: 0 0 10px; font-size: 16px; }
.hm3-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.hm3-tile { display: grid; gap: 2px; padding: 12px; border-radius: 14px; text-decoration: none; color: var(--text); min-width: 0; background: var(--hm3-bg); }
a.hm3-tile:hover { filter: brightness(.97); }
.hm3-tile-ico { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, .7); color: var(--hm3-ink); margin-bottom: 4px; }
.hm3-tile b { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--hm3-ink); }
.hm3-tile-k { font-size: 13px; font-weight: 600; }
.hm3-tile-s { font-size: 11px; color: var(--muted); }
.hm3-tile.green { --hm3-bg: #e3f3e9; --hm3-ink: #137a45; } .hm3-tile.amber { --hm3-bg: #fbf0d9; --hm3-ink: #8a5a00; } .hm3-tile.blue { --hm3-bg: #e3ecfb; --hm3-ink: #2c5bb8; }
.hm3-tile.red { --hm3-bg: #fbe5e4; --hm3-ink: #b0302c; } .hm3-tile.violet { --hm3-bg: #efe6fb; --hm3-ink: #6c3fb0; } .hm3-tile.grey { --hm3-bg: #ecedeb; --hm3-ink: #4a4f4c; }
:root[data-theme="dark"] .hm3-tile { --hm3-bg: rgba(255, 255, 255, .05); } :root[data-theme="dark"] .hm3-tile-ico { background: rgba(255, 255, 255, .08); }
:root[data-theme="dark"] .hm3-tile.green { --hm3-ink: #6cc497; } :root[data-theme="dark"] .hm3-tile.amber { --hm3-ink: #f0b44c; } :root[data-theme="dark"] .hm3-tile.blue { --hm3-ink: #8fb0ff; }
:root[data-theme="dark"] .hm3-tile.red { --hm3-ink: #ff6b66; } :root[data-theme="dark"] .hm3-tile.violet { --hm3-ink: #c79bf2; } :root[data-theme="dark"] .hm3-tile.grey { --hm3-ink: #b8bdb9; }
details.hm3-post > summary.hm3-post-sum { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0; border: 0; background: transparent; cursor: pointer; }
details.hm3-post > summary.hm3-post-sum:hover { background: transparent; }
details.hm3-post > summary.hm3-post-sum::after { margin-left: 8px; }
.hm3-post-t { display: grid; gap: 2px; min-width: 0; }
.hm3-post-n { margin-left: auto; font-size: 22px; font-weight: 700; padding: 2px 12px; border-radius: 999px; background: var(--green-soft); color: var(--green-ink); }
.hm3-post-n.late { background: rgba(196, 51, 47, .1); color: var(--red); }
.hm3-post-body { display: grid; gap: 10px; margin-top: 12px; }
@media (max-width: 900px) {
  .hm3-hero { grid-template-columns: 1fr; padding: 20px; gap: 16px; border-radius: 20px; }
  .hm3-title { font-size: 24px; }
  .hm3-tilerow { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .hm3-stats { grid-template-columns: 1fr 1fr; gap: 8px; } .hm3-stat { padding: 10px; } .hm3-stat b { font-size: 13px; } }

/* ===== inv2: Inventory one row per product (public/mod/inv2.js) + stock summary / insights (Inventory, Products → Dashboard) ===== */
.inv2-panel { display: grid; gap: 12px; margin: 4px 0 12px; }
.inv2-stats { margin: 0; }
.inv2-sub { margin-top: 4px; font-weight: 600; }
.inv2-filters { align-items: center; }
.inv2-filters .px-seg { margin-top: 0; margin-left: auto; }
.inv2-ins { padding: 14px 16px; }
.inv2-ins > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; }
.inv2-ins > summary::-webkit-details-marker { display: none; }
.inv2-ins > summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.inv2-ins:not([open]) > summary::after { transform: rotate(-90deg); }
.inv2-ins > summary h2 { margin: 0; font-size: 17px; }
.inv2-sg { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 6px; }
.inv2-sg li { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 14px; }
.inv2-sg li.bad { border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); }
.inv2-sg li.warn { border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 9%, transparent); }
.inv2-sg li.ok { background: var(--green-soft); border-color: transparent; }
.inv2-ins-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.inv2-ins-col h3 { font-size: 14px; margin: 6px 0 8px; }
.inv2-ins-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.inv2-ins-item { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; text-decoration: none; color: var(--text); }
.inv2-ins-item:hover { background: var(--glass); }
.inv2-ins-img { flex: none; width: 40px; height: 40px; border-radius: 8px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--green-soft); }
.inv2-ins-img.empty, .inv2-img.empty { font-size: 10px; font-weight: 900; letter-spacing: .08em; color: var(--green-ink); }
.inv2-ins-txt { display: grid; gap: 2px; min-width: 0; }
.inv2-ins-txt strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv2-pill { justify-self: start; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.inv2-pill.bad { color: #fff; background: var(--red); }
.inv2-pill.warn { color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); }

/* product rows / cards */
.inv2-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.inv2-list.is-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.inv2-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 44px; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; margin: 0; }
.inv2-item:hover, .inv2-item.open { border-color: var(--green-ink); }
.inv2-img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: var(--green-soft); }
.inv2-meta { display: grid; gap: 2px; min-width: 0; }
.inv2-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv2-total { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; font-weight: 700; font-variant-numeric: tabular-nums; }
.inv2-total.neg { color: var(--red); }
.inv2-chev { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--input); color: var(--text); box-shadow: none; }
.inv2-chev svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.inv2-chev.on svg { transform: rotate(180deg); }
.inv2-list.is-grid .inv2-item { grid-template-columns: minmax(0, 1fr) 44px; grid-template-rows: auto auto auto; align-content: start; }
.inv2-list.is-grid .inv2-img { grid-column: 1 / -1; width: 100%; height: auto; aspect-ratio: 4 / 5; }
.inv2-list.is-grid .inv2-meta { grid-column: 1 / -1; }
.inv2-list.is-grid .inv2-total { justify-content: flex-start; }
.inv2-open { grid-column: 1 / -1; }

/* variants inside an open product */
.inv2-vars { border: 1px solid var(--green-ink); border-radius: var(--radius, 14px); padding: 10px 12px; background: var(--surface); }
.inv2-vars ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.inv2-var { display: grid; grid-template-columns: minmax(0, 1fr) 80px auto auto; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; border: 1px solid var(--line); }
.inv2-var.changed { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 7%, transparent); }
.inv2-vname { display: grid; gap: 2px; min-width: 0; }
.inv2-vname .mono { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv2-actual { display: grid; justify-items: end; font-variant-numeric: tabular-nums; }
.inv2-actual b { font-size: 18px; }
.inv2-actual.neg b { color: var(--red); } .inv2-actual.warn b { color: var(--amber); }
.inv2-stepper { display: inline-flex; align-items: center; gap: 4px; }
.inv2-var .inv2-step { flex: none; width: 44px; height: 44px; padding: 0; font-size: 20px; font-weight: 700; border-radius: 10px; }
.inv2-var input.inv2-qty { flex: none; width: 76px; min-width: 0; height: 44px; margin: 0; padding: 6px; text-align: center; font-size: 16px; font-variant-numeric: tabular-nums; }
.inv2-save { min-height: 44px; }
.inv2-vars-foot { justify-content: flex-end; gap: 8px; margin-top: 10px; }
@media (max-width: 600px) {
  .inv2-filters .px-seg { margin-left: 0; }
  .inv2-item { grid-template-columns: 48px minmax(0, 1fr) 44px; gap: 10px; }
  .inv2-item .inv2-img { width: 48px; height: 48px; }
  .inv2-item .inv2-total { grid-column: 2; grid-row: 2; justify-content: flex-start; }
  .inv2-item .inv2-chev { grid-column: 3; grid-row: 1 / span 2; }
  .inv2-item .inv2-img { grid-row: 1 / span 2; }
  .inv2-list.is-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .inv2-list.is-grid .inv2-item { grid-template-columns: minmax(0, 1fr) 44px; }
  .inv2-list.is-grid .inv2-item .inv2-img { grid-row: auto; width: 100%; height: auto; }
  .inv2-list.is-grid .inv2-item .inv2-total { grid-column: 1; grid-row: auto; }
  .inv2-list.is-grid .inv2-item .inv2-chev { grid-column: 2; grid-row: auto; }
  .inv2-var { grid-template-columns: minmax(0, 1fr) auto; }
  .inv2-var .inv2-stepper { grid-column: 1 / -1; justify-content: space-between; }
  .inv2-var input.inv2-qty { flex: 1; width: auto; }
  .inv2-var .inv2-save { grid-column: 1 / -1; width: 100%; }
}

/* chlogo: real platform logos (SBCOrdCore.logo / logoImg — one source of truth, files under /img/ch/) */
.chb-logo { display: inline-block; flex: none; object-fit: contain; vertical-align: middle; }
.chb-mark:has(.chb-logo) { background: transparent; border-radius: 6px; }
.chb-mark .chb-logo { width: 100%; height: 100%; }
.subnav .sub-tab .sub-logo { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
.subnav .sub-tab .sub-logo + .sub-logo { margin-left: -2px; }
.ex-fopt .fopt-logo { width: 18px; height: 18px; margin-right: 6px; vertical-align: -4px; }
.rp-chl { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.rp-chlogo { width: 18px; height: 18px; flex: none; }
.chip .chb { font-size: inherit; font-weight: inherit; color: inherit; gap: 5px; }
.chip .chb-mark { width: 16px; height: 16px; border-radius: 4px; }

/* fluid: admin pages fill the window left-to-right at any width (no narrow column + empty right side).
   Containers that used to stop at 900–1280px now stretch; grids already use auto-fill so they reflow into more
   columns on wide screens. Phone / iPad rules above still apply (padding below 901px is untouched). */
.page { max-width: none; }
@media (min-width: 901px) { .page { padding-left: clamp(24px, 2.2vw, 44px); padding-right: clamp(24px, 2.2vw, 44px); } }
.card.wide, .dsh, .dsh-head, .dsh-extras, .rp, .mk2-cal, .mk2-ads, .mk2-sc, .ex-home, .sg-layout, .cfai-shell,
.ig-tiles, .mk-tiles, .ig-key, html .mn-att, .dio-list { max-width: none; }
/* keep long text and single form fields at a readable line length inside the now-wide cards */
.card.wide > p, .card.wide > label:not(.tick), .card.wide > form > label:not(.tick), .card.wide > textarea,
.card.wide > form > textarea, .card.wide > form > p, .page-head p { max-width: 78ch; }
/* wide screens: stat / tile rows get more columns instead of growing each tile */
@media (min-width: 1600px) { .stats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); } }

/* driveup: "Upload to Drive" — top-bar button on every screen size + 3-step sheet (/mod/driveup.js) */
.du-top { order: 3; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px 6px 10px; border-radius: 999px;
  font-weight: 700; font-size: 13px; border: 1px solid var(--line); background: var(--raise); color: var(--text); cursor: pointer; }
.du-top svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.du-top:hover, .du-top:focus-visible { border-color: var(--green-ink); color: var(--green-ink); }
.topbar .du-top ~ .job-wrap, .topbar .du-top ~ .profile { margin-left: 8px; }
@media (max-width: 900px) {
  .du-top { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border-radius: 50%; margin-left: 8px; }
  .du-top-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.du-drophint { position: fixed; inset: 12px; z-index: 1100; display: grid; place-items: center; border: 3px dashed var(--green-ink); border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent); color: var(--green-ink); font-size: 20px; font-weight: 700; pointer-events: none; }
.dl-card.du-card { width: min(640px, calc(100vw - 24px)); max-height: min(92vh, 900px); overflow: auto; overscroll-behavior: contain; }
.du-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.du-x { width: 44px; height: 44px; }
.du-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.du-step { flex: 1 1 0; padding: 6px 0 0; border-top: 3px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.du-step.past { border-top-color: color-mix(in srgb, var(--green-ink) 45%, transparent); }
.du-step.on { border-top-color: var(--green-ink); color: var(--text); }
.du-pane { display: grid; gap: 12px; }
.du-sec { display: grid; gap: 6px; }
.du-h { margin: 0; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.du-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.du-chip { display: inline-grid; justify-items: start; gap: 1px; min-height: 44px; padding: 6px 12px; border-radius: 12px; text-align: left; max-width: 100%; }
.du-chip-k { font-size: 11px; color: var(--muted); font-weight: 700; }
.du-chip-p { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.du-chip.on { border-color: var(--green-ink); background: var(--green-soft, rgba(1, 66, 42, .08)); }
.du-psearch { width: 100%; min-height: 44px; }
.du-plist { list-style: none; margin: 6px 0 0; padding: 4px; display: grid; gap: 2px; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.du-prow { width: 100%; min-height: 44px; display: grid; gap: 2px; justify-items: start; text-align: left; border-color: transparent; background: transparent; }
.du-prow:hover, .du-prow:focus-visible { background: var(--raise); }
.du-pnone, .du-fnone, .du-loading { padding: 8px 10px; }
.du-pick { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--green-ink); border-radius: 12px; }
.du-pname { font-weight: 700; }
.du-attach { align-items: flex-start; }
.du-attach input { margin-top: 3px; }
.du-block { display: block; margin-top: 2px; }
.du-browser { border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.du-bhead { display: flex; align-items: center; gap: 6px; min-height: 44px; }
.du-upbtn { min-width: 44px; min-height: 44px; }
.du-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 14px; min-width: 0; }
.du-crumb { border: 0; background: transparent; box-shadow: none; padding: 6px 4px; min-height: 36px; color: var(--green-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.du-crumb.on { color: var(--text); text-decoration: none; font-weight: 700; padding: 6px 4px; }
.du-flist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 240px; overflow: auto; }
.du-frow { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; text-align: left; border-color: transparent; background: transparent; }
.du-frow span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.du-frow svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; color: var(--muted); }
.du-frow:hover, .du-frow:focus-visible { background: var(--raise); }
.du-frow.on { border-color: var(--green-ink); }
.du-newrow { display: flex; gap: 8px; margin-top: 8px; }
.du-newrow input { flex: 1; min-width: 0; min-height: 44px; }
.du-newrow button { min-height: 44px; }
.du-dest { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); }
.du-destpath { overflow-wrap: anywhere; }
.du-zone { display: grid; justify-items: center; gap: 10px; padding: 26px 16px; border: 2px dashed var(--line); border-radius: 16px; text-align: center; }
.du-zone.over { border-color: var(--green-ink); background: var(--green-soft, rgba(1, 66, 42, .06)); }
.du-zone-ico svg { width: 40px; height: 40px; stroke: var(--green-ink); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.du-zone-t { margin: 0; font-weight: 700; }
.du-zone-acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
.du-zone-acts button { min-height: 44px; }
.du-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.du-sum { margin: 0; }
.du-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.du-thumb { position: relative; display: grid; gap: 2px; min-width: 0; font-size: 12px; }
.du-thumb img, .du-vid { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); }
.du-vid { display: grid; place-items: center; font-size: 26px; color: var(--muted); }
.du-tname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-weight: 600; }
.du-rm { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 18px; line-height: 1;
  background: color-mix(in srgb, var(--surface-solid) 85%, transparent); }
.du-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 50vh; overflow: auto; }
.du-row { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.du-row p { margin: 0; }
.du-row button { justify-self: start; min-height: 40px; }
.du-rtop { display: flex; justify-content: space-between; gap: 10px; min-width: 0; }
.du-rstate { flex: none; color: var(--muted); font-weight: 700; }
.du-done .du-rstate { color: var(--green-ink); }
.du-fail .du-rstate { color: var(--red); }
.du-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.du-bar i { display: block; height: 100%; width: 0; background: var(--green-ink); border-radius: inherit; transition: width .2s ease; }
.du-fail .du-bar i { background: var(--red); }
.du-foot { display: grid; gap: 8px; }
.du-ok { color: var(--green-ink); font-weight: 700; }
.du-warn { color: var(--text); }
.du-empty { display: grid; gap: 8px; }
@media (max-width: 640px) {
  .dl-card.du-card { width: 100%; max-height: 94vh; }
  .du-done-acts { display: grid; grid-template-columns: 1fr; }
  .du-done-acts > * { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .du-bar i { transition: none; } }

/* promo3: Marketing → Store promos (public/mod/promo.js) */
.spr-form { display: grid; gap: 4px; }
.spr-sec { border-bottom: 1px solid var(--line); padding: 4px 0 16px; }
.spr-sec:last-of-type { border-bottom: 0; }
.spr-sec h2 { font-size: 16px; margin: 10px 0 8px; }
.spr-tiers { display: grid; gap: 8px; margin: 8px 0; }
.spr-tier { display: grid; grid-template-columns: minmax(0, 160px) minmax(0, 160px) max-content; justify-content: start; gap: 10px; align-items: end; }
.spr-tier > button { margin-bottom: 6px; }
.spr-tiers > button { justify-self: start; width: auto; }
.spr-preview { margin: 8px 0 4px; padding: 8px 10px; background: var(--soft, rgba(31, 78, 58, .08)); font-weight: 700; font-size: 13px; }
.spr-rule { margin: 6px 0 0; }
.spr-ins { display: grid; grid-template-columns: 100px max-content minmax(0, 120px); gap: 10px 16px; align-items: end; justify-content: start; }
.spr-ins > b, .spr-ins > .prm-opt { padding-bottom: 12px; }
.spr-tpl-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.spr-tpl { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.spr-tpl p { margin: 2px 0 6px; }
.spr-run { font-weight: 700; }
@media (max-width: 560px) { .spr-tier { grid-template-columns: 1fr 1fr; } .spr-tpl { flex-direction: column; align-items: stretch; } .spr-ins { grid-template-columns: 1fr 1fr; } }
/* ---------- lp: Marketing → Link page editor (public/mod/linkpage.js) ---------- */
.lpe-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1180px) { .lpe-grid { grid-template-columns: minmax(0, 1fr) 400px; } .lpe-side { position: sticky; top: 16px; } }
.lpe-col .card.wide { max-width: none; }
.lpe-side { padding: 16px 0; }
.lpe-frame { display: block; width: 390px; max-width: 100%; height: 760px; border: 1px solid var(--line); border-radius: 28px; background: #fff; }
.lpe-addr code { font-size: 15px; word-break: break-all; }
.lpe-h { justify-content: space-between; align-items: center; }
.lpe-h > label { margin: 0; min-width: 180px; }
.lpe-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.lpe-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--raise); }
.lpe-row.lpe-hidden, .lpe-row.lpe-ended, .lpe-row.lpe-missing { opacity: .7; }
.lpe-main { flex: 1; min-width: 0; }
.lpe-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lpe-acts { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.lpe-acts button { min-width: 36px; }
.lpe-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; }
.lpe-swatch { width: 44px; height: 44px; border-radius: 6px; flex: none; border: 2px solid var(--text); }
.lpe-sw-highlight { background: #1f4e3a; border-color: #1f4e3a; }
.lpe-sw-outline { border-width: 1px; border-color: var(--line); }
.lpe-st { font-weight: 700; }
.lpe-st-live { color: var(--green-ink); } .lpe-st-soon { color: var(--muted); } .lpe-st-scheduled { color: var(--blue); } .lpe-st-missing, .lpe-st-ended { color: var(--amber); } .lpe-st-hidden { color: var(--muted); }
.lpe-thumbrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.lpe-lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.lpe-form { display: grid; gap: 2px; }
.lpe-mgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 50vh; overflow: auto; }
.lpe-mitem { padding: 0; min-height: 0; width: 100%; aspect-ratio: 1; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--input); }
.lpe-mitem[aria-pressed="true"] { border-color: var(--green-ink); }
.lpe-mitem img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lpe-save { position: sticky; bottom: 12px; z-index: 5; gap: 12px; align-items: center; }
@media (max-width: 640px) {
  .lpe-row { flex-wrap: wrap; }
  .lpe-acts { width: 100%; justify-content: flex-start; }
  .lpe-frame { height: 640px; }
}
/* mail: Settings → Emails (public/mod/mail.js) */
.eml-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all; }
.eml-preview { white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; background: var(--surface-2, rgba(127, 127, 127, .08)); border-radius: 8px; padding: 12px; max-height: 480px; overflow: auto; }
.eml-grid textarea { width: 100%; min-height: 280px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; }
.eml-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.eml-row { align-items: center; }
/* ===== ads: Marketing → Ads results / Link builder / Playbook / Setup (public/mod/ads.js) ===== */
.adx-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; }
.adx-bar select { min-height: 40px; width: auto; max-width: 100%; }
.adx-card h2 { margin-top: 0; }
.adx-demo { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; border: 2px dashed var(--amber); font-weight: 700; }
.adx-stats { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.adx-sub { display: block; font-size: 12px; font-weight: 500; margin-top: 2px; }
.adx-legend { margin: 6px 0 14px; font-size: 13px; }
.adx-assume { color: var(--text); border-left: 3px solid var(--amber); padding: 6px 10px; border-radius: 6px; background: color-mix(in srgb, var(--amber) 10%, transparent); }
.adx-light { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.adx-light::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.adx-light-green::before { background: var(--green-ink); }
.adx-light-amber::before { background: var(--amber); }
.adx-light-red::before { background: var(--red); }
.adx-light-red { color: var(--red); }
.adx-neg { color: var(--red); font-weight: 700; }
.adx-recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adx-rec { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); border-left-width: 4px; }
.adx-rec-p0 { border-left-color: var(--red); }
.adx-rec-p1 { border-left-color: var(--green-ink); }
.adx-rec-p2 { border-left-color: var(--red); }
.adx-rec-p3 { border-left-color: var(--amber); }
.adx-rec-p4 { border-left-color: var(--muted); }
.adx-table td { vertical-align: top; }
.adx-namecell { display: flex; gap: 10px; align-items: flex-start; min-width: 220px; }
.adx-name { font-weight: 700; overflow-wrap: anywhere; }
.adx-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--raise); border: 1px solid var(--line); }
.adx-thumb-none { display: inline-block; }
.adx-why { min-width: 220px; font-size: 13px; }
.adx-why strong { display: block; margin-top: 4px; }
.adx-v { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid var(--line); }
.adx-v-scale { background: var(--green-ink); color: #fff; border-color: var(--green-ink); }
.adx-v-kill { background: var(--red); color: #fff; border-color: var(--red); }
.adx-v-fix_hook, .adx-v-fix_page { background: color-mix(in srgb, var(--amber) 22%, transparent); border-color: var(--amber); }
.adx-v-low_stock { background: color-mix(in srgb, var(--red) 12%, transparent); border-color: var(--red); color: var(--red); }
.adx-i { min-height: 0; padding: 0 4px; margin-left: 2px; border: 0; background: none; color: var(--muted); font-size: 13px; cursor: help; }
.adx-i:hover, .adx-i:focus-visible { color: var(--green-ink); }
.adx-linkout { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.adx-url, .adx-links code { overflow-wrap: anywhere; word-break: break-all; font-size: 12px; padding: 6px 8px; border-radius: 8px; background: var(--raise); border: 1px solid var(--line); }
.adx-links, .adx-drafts, .adx-budget { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.adx-links li, .adx-drafts li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.adx-namer input, .adx-namer select { min-width: 0; flex: 1 1 110px; }
.adx-rules { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.adx-ruleact { color: var(--green-ink); font-style: normal; font-weight: 600; }
.adx-tpls { display: grid; gap: 10px; }
.adx-tpl { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.adx-tpl summary { cursor: pointer; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.adx-ta { width: 100%; margin: 10px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.45; }
.adx-tag { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--raise); border: 1px solid var(--line); }
.adx-d-pushed { color: var(--green-ink); border-color: var(--green-ink); }
.adx-d-failed { color: var(--red); border-color: var(--red); }
.adx-budget li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.adx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.adx-status { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.adx-status li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.adx-status code { font-size: 12px; overflow-wrap: anywhere; }
.adx-ok { color: var(--green-ink); font-weight: 700; }
.adx-no { color: var(--red); font-weight: 700; }
.adx-steps { line-height: 1.5; }
.adx-formulas td:nth-child(2) { min-width: 260px; }
@media (max-width: 640px) { .adx-namecell, .adx-why { min-width: 0; } .adx-grid { grid-template-columns: 1fr; } }

/* ---------- imged: Products → Images (photo cards, drag order, hide switch) + the in-browser photo editor ---------- */
.pv-images { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.pv-image { position: relative; display: grid; gap: 6px; align-content: start; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pv-image > img, .pv-image .pv-thumb img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: #ffffff; border-radius: 8px; }
.pv-image .pv-thumb { display: block; width: 100%; height: auto; min-height: 0; padding: 0; border: 0; background: transparent; cursor: zoom-in; border-radius: 8px; }
.pv-image .pv-thumb:focus-visible { outline: 2px solid var(--accent, #01422a); outline-offset: 2px; }
.pv-image > .badge { position: absolute; top: 12px; left: 12px; pointer-events: none; }
.pv-image > .pv-hid-badge { top: 38px; }
.pv-image > .badge.pv-ed-badge { left: auto; right: 12px; width: auto; }
.pv-image .row { flex-wrap: wrap; gap: 4px; }
.pv-image.pv-hidden img { opacity: .45; filter: grayscale(1); }
.pv-image[draggable="true"] { cursor: grab; }
.pv-image.pv-dragging { opacity: .5; }
.pv-image.pv-dropto { outline: 2px dashed var(--accent, #01422a); outline-offset: 2px; }
.pv-imgtools { margin: 4px 0 10px; gap: 10px; align-items: center; flex-wrap: wrap; }

dialog.ime-dlg { width: min(1120px, 96vw); max-height: 94vh; padding: 0; background: var(--surface-solid); border-radius: 16px; overflow: hidden; display: none; }
dialog.ime-dlg[open] { display: flex; flex-direction: column; }
.ime-head, .ime-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ime-foot { border-bottom: 0; border-top: 1px solid var(--line); }
.ime-head h3 { margin: 0; font-size: 17px; flex: 1; }
.ime-grow { flex: 1; }
.ime-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0; min-height: 0; overflow: auto; }
.ime-left { padding: 16px; display: grid; gap: 6px; align-content: start; justify-items: center; background: repeating-conic-gradient(#e9e9e9 0% 25%, #f7f7f7 0% 50%) 50% / 20px 20px; }
.ime-stagewrap { width: 100%; height: min(62vh, 620px); display: flex; align-items: center; justify-content: center; }
.ime-stage { display: block; touch-action: none; cursor: grab; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2), 0 8px 30px rgba(0, 0, 0, .18); }
.ime-stage:active { cursor: grabbing; }
.ime-stage:focus-visible { outline: 3px solid var(--accent, #01422a); outline-offset: 3px; }
.ime-left > p { margin: 0; color: #444444; }
.ime-panel { padding: 12px 16px; display: grid; gap: 14px; align-content: start; border-left: 1px solid var(--line); overflow: auto; }
.ime-panel section, .ime-adj { display: grid; gap: 8px; }
.ime-panel h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ime-adj summary { cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.ime-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ime-seg { display: flex; gap: 4px; }
.ime-seg button[aria-pressed="true"], .ime-row .ime-sw[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent, #01422a); }
.ime-seg button[aria-pressed="true"] { background: var(--accent, #01422a); color: #ffffff; }
.ime-range { display: grid; gap: 2px; font-size: 13px; }
.ime-range input { width: 100%; }
.ime-val { color: var(--muted); font-variant-numeric: tabular-nums; }
.ime-sw { width: 30px; height: 30px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); }
.ime-custom { display: inline-flex; align-items: center; gap: 6px; }
.ime-colour { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: transparent; }
.ime-check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.ime-cutbox { display: grid; gap: 6px; padding-left: 4px; border-left: 2px solid var(--line); }
.ime-prevs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ime-prevs figure { margin: 0; display: grid; gap: 4px; justify-items: center; }
.ime-p { width: 100%; height: auto; aspect-ratio: 1 / 1; border: 1px solid var(--line); border-radius: 6px; background: #ffffff; }
.ime-p-mkt { border-radius: 2px; }
@media (max-width: 820px) {
  dialog.ime-dlg { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .ime-body { grid-template-columns: minmax(0, 1fr); }
  .ime-stagewrap { height: min(52vh, 460px); }
  .ime-panel { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
}
/* imged: Channels → Online store preview = the real storefront in scaled frames (desktop 1280 px wide, phone 390 px) */
.chp2-st .chp2-bbody, .chp2-st .chp2-screen { position: relative; }
.chp2-live { position: absolute; top: 0; left: 0; border: 0; pointer-events: none; background: #ffffff; transform-origin: 0 0; }
.chp2-live-d { width: 1280px; height: 750px; transform: scale(.453); }
.chp2-live-p { width: 390px; height: 816px; transform: scale(.472); }

/* colmenu: Collections → "Show in website menu" switch + the product tick list inside a collection */
.colm-preview { font-weight: 600; }
.colm-sw { width: 1%; white-space: nowrap; }
.colm-card { margin: 16px 0; }
.colm-tools { gap: 12px; align-items: center; flex-wrap: wrap; }
.colm-q { flex: 1 1 240px; min-width: 0; }
.colm-only { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.colm-list { list-style: none; margin: 8px 0 0; padding: 0; max-height: 560px; overflow-y: auto; border-top: 1px solid var(--line, #e5e5e5); }
.colm-row label { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 4px; border-bottom: 1px solid var(--line, #e5e5e5); cursor: pointer; }
.colm-row input[type="checkbox"] { width: 20px; height: 20px; flex: none; }
.colm-row .pv-thumb { width: 40px; height: 40px; flex: none; object-fit: contain; background: #ffffff; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; }
.colm-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.colm-card > h2 { margin-top: 0; }
/* colnav: Payments → "+ Add payment" panel */
.gwy-add { margin-top: 12px; }
.gwy-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 10px; }
.gwy-list code { display: inline-block; margin: 2px 6px 0 0; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; }
