/* Padigo — the parent brand of KITCHEN, COOKBOOK, DASHBOARD, COUNTER and CHAT.
   The one design language all five apps share: colours, type, radii, focus, the Padigo wordmark, the "Padigo / APP" lockup and
   the switcher between apps. Each app's build puts this file FIRST, then its own CSS, which builds on these tokens.
   Components (brand.jsx): <Wordmark/>, <Lockup app="Kitchen"/>, <AppSwitcher/>, <PlatformLinks/>. Fonts: brand-head.mjs. */

:root {
  /* brand */
  --pd-green: #0f6b4f;          /* Padigo green: primary actions, links, the app name in the lockup */
  --pd-green-strong: #0b573f;   /* hover / pressed */
  --pd-green-soft: #e8f4ee;     /* selected rows, info notes, chips */
  --pd-green-line: #b9dccb;
  --pd-green-ink: #0a4433;      /* text on --pd-green-soft */
  --pd-marigold: #f0a020;       /* the wordmark's dot; small highlights only, never text on white */
  --pd-ink: #11201a;            /* sidebars and dark surfaces */
  --pd-ink-2: #1a2c25;
  --pd-ink-3: #233a31;
  --pd-ink-text: #c6d3cd;
  --pd-ink-muted: #8a9b94;
  --pd-ink-accent: #8fd8b6;     /* the app name and links on --pd-ink */

  /* neutrals */
  --pd-paper: #f7f7f4;
  --pd-panel: #ffffff;
  --pd-line: #e3e6e1;
  --pd-line-strong: #c9cec7;
  --pd-text: #17201c;
  --pd-muted: #64706a;

  /* meaning */
  --pd-success: #2b8a3e; --pd-success-soft: #ebfbee;
  --pd-warning: #b35c00; --pd-warning-soft: #fff4e6;
  --pd-danger: #d0352b;  --pd-danger-soft: #fff3f2;
  --pd-info: #1f5fa8;    --pd-info-soft: #eaf2fc;

  /* shape and type */
  --pd-radius-sm: 6px; --pd-radius: 8px; --pd-radius-lg: 12px; --pd-radius-xl: 16px;
  --pd-shadow: 0 1px 2px rgba(17, 32, 26, .05), 0 12px 32px -16px rgba(17, 32, 26, .22);
  --pd-shadow-pop: 0 18px 44px -18px rgba(17, 32, 26, .38);
  --pd-font-ui: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pd-font-brand: 'Bricolage Grotesque', var(--pd-font-ui);
  --pd-focus: 0 0 0 3px color-mix(in srgb, var(--pd-green) 32%, transparent);

  /* the names every app's CSS already uses, pointed at the brand */
  --bg: var(--pd-paper); --panel: var(--pd-panel); --line: var(--pd-line); --text: var(--pd-text); --muted: var(--pd-muted);
  --accent: var(--pd-green); --accent-strong: var(--pd-green-strong); --accent-soft: var(--pd-green-soft);
  --accent-line: var(--pd-green-line); --accent-ink: var(--pd-green-ink); --danger: var(--pd-danger);
  --side: var(--pd-ink); --side-2: var(--pd-ink-2); --side-3: var(--pd-ink-3); --side-text: var(--pd-ink-text);
  --side-muted: var(--pd-ink-muted); --side-link: var(--pd-ink-accent);
}

/* keyboard focus looks the same everywhere */
:focus-visible { outline: none; box-shadow: var(--pd-focus); }
a:focus-visible, button:focus-visible { border-radius: var(--pd-radius-sm); }

/* ---------- the wordmark ----------
   Bricolage Grotesque ExtraBold at its display optical size, set tight. The i is dotless and wears a marigold dot instead:
   that dot is the one signature detail (there is no logo yet). Screen readers hear "Padigo". */
.pd-wordmark {
  display: inline-block; font-family: var(--pd-font-brand); font-weight: 800; font-size: 22px; line-height: 1;
  letter-spacing: -.03em; font-variation-settings: 'opsz' 96; font-kerning: normal; color: inherit; white-space: nowrap;
}
.pd-wordmark .pd-P { margin-right: -.02em; }          /* close the P–a gap the bowl leaves */
/* the i gets a little air on both sides, so the dot reads as its own mark between d and g */
.pd-wordmark .pd-i { position: relative; display: inline-block; letter-spacing: 0; margin: 0 .005em 0 .015em; }
.pd-wordmark .pd-i::after {
  content: ''; position: absolute; left: 50%; top: var(--pd-dot-top, .09em); width: .19em; height: .19em; transform: translateX(-50%);
  border-radius: 50%; background: var(--pd-marigold);
}

/* ---------- Padigo / APP ---------- */
.pd-lockup {
  display: inline-flex; align-items: baseline; gap: .5em; min-width: 0; color: var(--pd-text); text-decoration: none; white-space: nowrap;
}
.pd-lockup .pd-wordmark { font-size: 21px; }
.pd-sep { font-family: var(--pd-font-ui); font-weight: 300; font-size: 17px; color: var(--pd-line-strong); transform: translateY(-.02em); }
.pd-app {
  font-family: var(--pd-font-ui); font-size: 11px; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; color: var(--pd-green);
}
.pd-lockup.sm .pd-wordmark { font-size: 18px; }
.pd-lockup.sm .pd-sep { font-size: 15px; }
.pd-lockup.sm .pd-app { font-size: 10px; letter-spacing: .15em; }
.pd-lockup.lg .pd-wordmark { font-size: 28px; }
.pd-lockup.lg .pd-sep { font-size: 22px; }
.pd-lockup.lg .pd-app { font-size: 12.5px; }
.pd-on-dark .pd-lockup, .pd-lockup.pd-on-dark { color: #fff; }
.pd-on-dark .pd-sep { color: rgba(255, 255, 255, .3); }
.pd-on-dark .pd-app { color: var(--pd-ink-accent); }
a.pd-lockup:hover .pd-app { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- moving between the apps ---------- */
.pd-switch { position: relative; display: inline-flex; }
.pd-switch-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-radius: var(--pd-radius);
  border: 1px solid transparent; background: transparent; color: var(--pd-muted); cursor: pointer;
}
.pd-switch-btn:hover, .pd-switch-btn[aria-expanded='true'] { background: color-mix(in srgb, var(--pd-text) 6%, transparent); color: var(--pd-text); }
.pd-on-dark .pd-switch-btn { color: var(--pd-ink-muted); }
.pd-on-dark .pd-switch-btn:hover, .pd-on-dark .pd-switch-btn[aria-expanded='true'] { background: var(--pd-ink-2); color: #fff; }
.pd-switch-btn svg { width: 16px; height: 16px; }
.pd-switch-menu {
  position: absolute; z-index: 300; top: calc(100% + 6px); left: 0; width: 270px; padding: 6px; background: var(--pd-panel);
  border: 1px solid var(--pd-line); border-radius: var(--pd-radius-lg); box-shadow: var(--pd-shadow-pop); display: flex; flex-direction: column;
  font-family: var(--pd-font-ui); font-size: 14px; text-align: left;
}
.pd-switch-menu.right { left: auto; right: 0; }
.pd-switch-head { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 10px 10px; border-bottom: 1px solid var(--pd-line); margin-bottom: 4px; color: var(--pd-text); }
.pd-switch-head .pd-wordmark { font-size: 18px; }
.pd-switch-head small { color: var(--pd-muted); font-size: 11.5px; }
.pd-switch-menu a {
  display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 8px 10px; border-radius: var(--pd-radius); color: var(--pd-text); text-decoration: none;
}
.pd-switch-menu a:hover { background: var(--pd-green-soft); }
.pd-switch-menu a[aria-current='page'] { background: color-mix(in srgb, var(--pd-text) 5%, transparent); }
.pd-switch-menu .pd-app { grid-column: 1; }
.pd-switch-menu .what { grid-column: 1; font-size: 12.5px; color: var(--pd-muted); }
.pd-switch-menu .here { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 11px; color: var(--pd-muted); }

/* in a dark sidebar: the other apps as a list */
.pd-platforms { display: flex; flex-direction: column; gap: 2px; }
.pd-platforms .side-title { display: flex; align-items: baseline; gap: 6px; }
.side-group.pd-platforms a { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 10px; border-radius: var(--pd-radius); color: var(--side-text); text-decoration: none; }
.side-group.pd-platforms a:hover { background: var(--side-2); color: #fff; }
.pd-platforms a .pd-app { color: inherit; font-size: 10.5px; letter-spacing: .15em; }
.pd-platforms a .what { font-size: 12px; color: var(--side-muted); }
.pd-platforms a:hover .what { color: var(--side-text); }

@media (max-width: 760px) {
  /* tight top bars on a phone: smaller, but both names stay (which app this is matters most on a small screen) */
  .pd-lockup.collapse { gap: .35em; }
  .pd-lockup.collapse .pd-wordmark { font-size: 16px; }
  .pd-lockup.collapse .pd-sep { font-size: 13px; }
  .pd-lockup.collapse .pd-app { font-size: 9px; letter-spacing: .12em; }
  .pd-switch-menu { position: fixed; left: 12px; right: 12px; top: 56px; width: auto; }
}

/* Shared by Kitchen and the Dashboard. Uses each app's --bg --panel --line --text --muted --accent --danger. */
.theme-list { display: flex; flex-direction: column; gap: 10px; }
.theme-subhead { margin: 14px 0 2px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.theme-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; align-items: center; gap: 12px 16px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.theme-card.is-live { border-color: color-mix(in srgb, #2b8a3e 45%, var(--line)); }
.theme-list:not(.compact) .theme-card.is-live { grid-template-columns: 260px 1fr auto; }
.theme-preview { display: block; width: 260px; height: 170px; overflow: hidden; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); position: relative; }
.theme-preview iframe { width: 1280px; height: 836px; border: 0; transform: scale(.203); transform-origin: 0 0; pointer-events: none; }
.theme-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.theme-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theme-title b { font-size: 15px; }
.theme-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pill { font-size: 11.5px; padding: 3px 8px; border-radius: 99px; background: #f1f3f5; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pill.live { background: #ebfbee; color: #2b8a3e; }
.menu-wrap { position: relative; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 8px; font-size: 18px; line-height: 1; }
.menu-wrap .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 180px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 16px 40px -16px rgba(0,0,0,.3); padding: 6px; display: flex; flex-direction: column; }
.menu-wrap .menu a, .menu-wrap .menu button { text-align: left; padding: 8px 10px; border: 0; border-radius: 6px; background: none;
  color: var(--text); text-decoration: none; font: inherit; cursor: pointer; }
.menu-wrap .menu a:hover, .menu-wrap .menu button:hover { background: var(--bg); }
.menu-wrap .menu .danger { color: var(--danger); }
.add-theme { align-self: flex-start; display: inline-block; text-decoration: none; border: 1px dashed #c5cad6; background: none; color: var(--accent); border-radius: 10px; padding: 9px 14px; font-weight: 500; }
.add-theme-form { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.add-theme-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.note.info { background: var(--accent-soft); color: var(--accent-ink); }
.theme-chip { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 3px 4px 3px 10px; border-radius: 99px;
  background: var(--bg); border: 1px solid var(--line); font-weight: 500; font-size: 12.5px; }
@media (max-width: 760px) {
  .theme-card, .theme-list:not(.compact) .theme-card.is-live { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .theme-preview { width: 100%; height: 190px; }
  .theme-preview iframe { transform: scale(calc(100vw / 1400)); }
  .theme-actions { justify-content: flex-start; }
}

/* media library + picker */
.media-lib { display: flex; flex-direction: column; gap: 12px; position: relative; }
.media-lib.dragging::after { content: 'Drop to upload'; position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; border: 2px dashed var(--accent);
  border-radius: 12px; background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); font-weight: 600; }
.media-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.media-toolbar .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.media-toolbar .seg button { border: 0; border-radius: 0; padding: 7px 12px; background: var(--panel); }
.media-toolbar .seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.media-search { flex: 1; min-width: 140px; width: auto; }
.media-body { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
.media-lib:not(.compact) .media-body:has(.media-detail) { grid-template-columns: 1fr 300px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.media-lib.compact .media-grid { max-height: 52vh; overflow: auto; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); padding: 2px; }
.media-tile { position: relative; aspect-ratio: 1; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #f1f3f5; cursor: pointer; }
.media-tile.on { outline: 2px solid var(--accent); outline-offset: 1px; }
.media-tile:hover { border-color: var(--accent); }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-kind { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; font-size: 11px;
  background: rgba(0,0,0,.6); color: #fff; }
.media-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px; font-size: 11px; color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 40px 16px; border: 1.5px dashed #cfd4de; border-radius: 12px; text-align: center; }
.media-detail { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; position: sticky; top: 16px; }
.media-detail label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 500; }
.media-preview { border-radius: 8px; overflow: hidden; background: #f1f3f5; }
.media-preview img, .media-preview video { width: 100%; display: block; max-height: 240px; object-fit: contain; }
.media-title { overflow-wrap: anywhere; }
.copy-row { display: flex; gap: 6px; } .copy-row input { flex: 1; min-width: 0; font-size: 12px; }
.modal-back { position: fixed; inset: 0; z-index: 200; background: rgba(15,17,22,.5); display: grid; place-items: center; padding: 16px; }
.modal { width: min(860px, 100%); max-height: calc(100dvh - 32px); overflow: auto; background: var(--panel); border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 12px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-foot { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.modal-foot input { flex: 1; min-width: 0; }
.media-field { display: flex; gap: 8px; align-items: center; }
.media-field .thumb-lg { width: 54px; height: 54px; flex: none; border-radius: 8px; background: #f1f3f5 center / cover no-repeat; border: 1px solid var(--line); overflow: hidden; }
.media-field .thumb-lg video { width: 100%; height: 100%; object-fit: cover; }
.media-field input { flex: 1; min-width: 0; }
@media (max-width: 760px) {
  .media-lib:not(.compact) .media-body:has(.media-detail) { grid-template-columns: 1fr; }
  .media-grid { grid-template-columns: repeat(3, 1fr); }
}

/* The app shell every signed-in app of ours uses: base type and controls, the dark sidebar, page frames,
   cards, stats and the phone layout. Kept here so the Dashboard and Counter look like one product.
   Each app's build prepends brand.css (Padigo's colours, type and the lockup), then ui.css, then this, then its own app.css.
   Colours come from brand.css: --bg --panel --line --text --muted --accent(-soft/-ink/-line) --danger --side(-2/-3/-text/-muted/-link). */
:root { font-family: var(--pd-font-ui); font-size: 14px; color: var(--text); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; cursor: pointer; color: var(--text); }
button:hover { border-color: #c5cad6; }
button.primary, a.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
button.primary:hover:not(:disabled), a.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
button.primary:disabled { opacity: .6; }
button.link { border: 0; background: none; color: var(--accent); padding: 4px; }
button.link.danger { color: var(--danger); }
a.btn { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; color: var(--text); text-decoration: none; background: #fff; font-weight: 500; }
a.btn:hover { border-color: #c5cad6; }
.btn-link { color: var(--accent); font-size: 13px; text-decoration: none; }
input, select, textarea { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; background: #fff; color: var(--text); }
input[type=checkbox], input[type=radio] { width: auto; padding: 0; flex: none; }
code { font-family: ui-monospace, monospace; font-size: 12px; }
.muted { color: var(--muted); } .small { font-size: 12px; }
small.err { color: var(--danger); }
.boot { padding: 40px; color: var(--muted); }
.note { padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.note.ok { background: #ebfbee; color: #2b8a3e; } .note.err { background: #fff5f5; color: var(--danger); }
.note .token-value { display: block; margin-top: 8px; padding: 8px 10px; background: #fff; border-radius: 6px; word-break: break-all; user-select: all; color: var(--text); }
.banner.info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 28px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; }
.at-input { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.at-input > span { display: flex; align-items: center; padding: 0 2px 0 10px; color: var(--muted); }
.at-input input { border: 0; padding-left: 2px; min-width: 0; }
.at-input:focus-within { border-color: var(--accent); }

/* shell */
.dash { display: grid; grid-template-columns: 248px 1fr; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100dvh; overflow: auto; background: var(--side); color: var(--side-text); padding: 18px 14px;
  display: flex; flex-direction: column; gap: 14px; }
.brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 8px 6px; }
.page-head h1, .card h2, .section-head h2, .empty-state h3 { font-family: var(--pd-font-brand); letter-spacing: -.015em; }
.side-label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--side-muted); padding: 0 4px; }
.side-label select { background: var(--side-2); color: #fff; border-color: var(--side-3); text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.side-nav, .side-group { display: flex; flex-direction: column; gap: 2px; }
.side-nav a, .side-group a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--side-text); text-decoration: none; font-weight: 500; }
.side-nav a:hover, .side-group a:hover { background: var(--side-2); color: #fff; }
.side-nav a.on, .side-group a.on { background: var(--side-3); color: #fff; }
.ico { width: 18px; text-align: center; opacity: .8; }
.side-title { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--side-muted); padding: 6px 10px 2px; }
.side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--side-3); }
.side-user .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side-user .who b { color: #fff; font-size: 13px; } .side-user .who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--side-muted); }
.side-user .link { color: var(--side-link); font-size: 12.5px; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 99px; display: grid; place-items: center; background: var(--side-3); color: #fff; font-weight: 600; }
.content { min-width: 0; }
.mobile-store { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-weight: 500; }
.mobile-top .pd-switch { margin-left: auto; }
.mobile-top .pd-lockup { flex: none; } /* keeps its size; the store name gives way (ellipsis) */
.mobile-top .mobile-store { flex: 1 1 auto; }
.mobile-top, .scrim { display: none; }
.page { max-width: 1080px; margin: 0 auto; padding: 30px 28px 60px; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; letter-spacing: -.01em; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; max-width: 100%; min-width: 0; }
.sub { margin: -8px 0 4px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card h2, .card h3 { margin: 0; font-size: 16px; }
.card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-end { display: flex; justify-content: flex-end; gap: 8px; }
.empty-state { text-align: center; padding: 48px 20px; border: 1px dashed #cfd4de; border-radius: 12px; background: var(--panel); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-state h3 { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat b { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .stat b.warn { color: #e67700; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.steps li.done a { color: var(--muted); text-decoration: line-through; }
.steps .check { width: 20px; height: 20px; border-radius: 99px; border: 1.5px solid #c5cad6; display: grid; place-items: center; font-size: 12px; color: #fff; }
.steps li.done .check { background: #2b8a3e; border-color: #2b8a3e; }
.history { overflow-x: auto; max-width: 100%; }
.history table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.history th { text-align: left; font-weight: 500; color: var(--muted); padding: 6px 8px; }
.history td { padding: 8px; border-top: 1px solid var(--line); }
.history td.right { text-align: right; }
/* moved account pages */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-head h2 { margin: 0; font-size: 18px; }
.ns-list, .token-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ns-row { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.ns-head { display: flex; gap: 12px; align-items: center; width: 100%; border: 0; background: none; text-align: left; padding: 12px 14px; }
.ns-head:disabled { cursor: default; color: inherit; }
.ns-head span:last-child { display: flex; flex-direction: column; }
.store-initial { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; text-transform: uppercase; }
.store-initial.small { width: 32px; height: 32px; font-size: 14px; }
.verified { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 10px; }
.members { border-top: 1px solid var(--line); padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.member { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 6px 0; }
.member > span:first-child { flex: 1; min-width: 0; }
.member select { width: auto; }
.member.add { justify-content: flex-start; } .member.add .at-input { flex: 1; }
.token-list .member { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.token-new { display: flex; gap: 8px; margin: 14px 0; } .token-new input { flex: 1; }

@media (max-width: 900px) {
  .dash { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-102%); transition: transform .22s ease; }
  .dash.nav-open .sidebar { transform: none; }
  .dash.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.35); }
  .mobile-top { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
  .page { padding: 20px 14px 40px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .banner.info { padding: 10px 14px; }
}

/* Marketing's own styles. The shell (sidebar, page frame, cards, buttons) comes from shared/app-ui/shell.css and ui.css. */

.boot { padding: 48px; text-align: center; color: var(--muted); }
.sub { margin: -6px 0 18px; }
.small { font-size: 13px; }

/* overview */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--line); border-radius: var(--pd-radius-lg, 14px); background: var(--panel); color: inherit; text-decoration: none; }
.tile b { font-family: var(--pd-font-brand); font-size: 18px; letter-spacing: -.02em; }
.tile span { color: var(--muted); line-height: 1.45; }
.tile em { font-style: normal; font-weight: 600; margin-top: auto; padding-top: 8px; color: var(--accent-strong); }
.tile.on:hover { border-color: var(--accent); background: var(--accent-soft); }
.tile.soon { opacity: .75; } .tile.soon em { color: var(--muted); }

/* the gallery */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 14px; font-weight: 500; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; align-items: end; }
.gcard { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.gcard b { margin-top: 4px; }
.gthumb { display: block; width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.gcard:hover .gthumb { box-shadow: 0 10px 26px -14px rgba(17, 32, 26, .45); transform: translateY(-2px); }
.gcard:focus-visible .gthumb { box-shadow: var(--pd-focus, 0 0 0 3px rgba(15, 107, 79, .32)); }
.thumb { display: block; width: 100%; height: 100%; }

/* the editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
.stage { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.poster { display: block; width: 100%; max-height: calc(100vh - 150px); max-width: 100%; object-fit: contain; margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px -22px rgba(17, 32, 26, .5); }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.group { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.group h2 { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-family: var(--pd-font-ui, inherit); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-weight: 600; font-size: 13px; }
.field textarea, .group textarea { resize: vertical; font: inherit; }
.image-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.image-field .btn { cursor: pointer; }
.swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.swatch { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.swatch input[type=color] { width: 38px; height: 38px; padding: 2px; border-radius: 8px; flex: none; cursor: pointer; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

@media (max-width: 1000px) {
  .editor { grid-template-columns: 1fr; }
  .stage { position: static; }
  .poster { max-height: 70vh; }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .swatches { grid-template-columns: 1fr 1fr; }
}

/* the gallery: every card the same height so rows line up whatever the poster's shape */
.gallery { align-items: start; }
.gthumb { aspect-ratio: 1 / 1; display: block; padding: 8px; box-sizing: border-box; background: var(--bg); }
.thumb { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(17, 32, 26, .18)); }
.gthumb { border-radius: 12px; }
.image-field label.btn { display: inline-flex; align-items: center; border: 1px solid var(--line); background: var(--panel); padding: 8px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.image-field label.btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.image-field label.btn:focus-within { box-shadow: var(--pd-focus, 0 0 0 3px rgba(15, 107, 79, .32)); }

/* offers */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.offer-form { margin-bottom: 18px; }
.offer-form .field { min-width: 0; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.code { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.code p { margin: 0; }
.code-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code-chip { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: .06em; padding: 5px 10px; border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent-strong); border-radius: 8px; cursor: pointer; }
.code-actions { margin-top: 4px; }
.code-actions .danger { margin-left: auto; color: var(--danger); }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .codes { grid-template-columns: 1fr; } }

/* gallery headings and the card's own actions */
.gh { margin: 22px 0 12px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.gcard { gap: 4px; }
.glink { display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.glink b { margin-top: 4px; }
.glink:hover .gthumb { box-shadow: 0 10px 26px -14px rgba(17, 32, 26, .45); transform: translateY(-2px); }
.glink:focus-visible .gthumb { box-shadow: var(--pd-focus, 0 0 0 3px rgba(15, 107, 79, .32)); }
.gact { display: flex; gap: 14px; font-size: 13px; }
.gact .link { color: var(--accent-strong); }
.gact .danger { margin-left: auto; color: var(--danger); }

/* the builder */
.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bar-name { font-weight: 600; min-width: 200px; max-width: 320px; }
.grow { flex: 1; }
.builder { display: grid; grid-template-columns: 230px minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.b-left, .b-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-height: calc(100vh - 170px); overflow: auto; }
.b-stage { min-width: 0; outline: none; position: sticky; top: 12px; }
.b-wrap { position: relative; width: 100%; max-height: calc(100vh - 210px); margin: 0 auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 34px -22px rgba(17, 32, 26, .5); touch-action: none; user-select: none; }
.b-stage:focus-visible .b-wrap { box-shadow: var(--pd-focus, 0 0 0 3px rgba(15, 107, 79, .32)); }
.b-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 8px; }
.b-overlay { position: absolute; inset: 0; }
.b-box { position: absolute; box-sizing: border-box; cursor: move; touch-action: none; }
.b-box:hover { outline: 1.5px solid rgba(15, 107, 79, .55); }
.b-box.sel { outline: 2px solid var(--accent); }
.b-h { position: absolute; width: 12px; height: 12px; background: #fff; border: 2px solid var(--accent); border-radius: 50%; touch-action: none; }
.b-h-nw { left: -7px; top: -7px; cursor: nwse-resize; } .b-h-n { left: calc(50% - 6px); top: -7px; cursor: ns-resize; } .b-h-ne { right: -7px; top: -7px; cursor: nesw-resize; }
.b-h-e { right: -7px; top: calc(50% - 6px); cursor: ew-resize; } .b-h-se { right: -7px; bottom: -7px; cursor: nwse-resize; } .b-h-s { left: calc(50% - 6px); bottom: -7px; cursor: ns-resize; }
.b-h-sw { left: -7px; bottom: -7px; cursor: nesw-resize; } .b-h-w { left: -7px; top: calc(50% - 6px); cursor: ew-resize; }
.b-guide { position: absolute; background: #f03e7a; pointer-events: none; }
.b-guide.v { top: 0; bottom: 0; width: 1px; } .b-guide.h { left: 0; right: 0; height: 1px; }
.adds { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.layers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.layers li { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.layers li.on { border-color: var(--accent); background: var(--accent-soft); }
.l-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: none; padding: 7px 8px; }
.l-ico { width: 18px; text-align: center; color: var(--muted); flex: none; }
.l-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.l-name em { font-style: normal; font-size: 11px; color: var(--accent-strong); border: 1px solid var(--accent-line, var(--line)); border-radius: 99px; padding: 0 6px; }
.l-act { display: flex; } .l-act button { border: 0; background: none; padding: 6px 7px; color: var(--muted); }
.fieldv { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.fieldv input, .fieldv select, .fieldv textarea { font-weight: 400; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .four { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.numf { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); position: relative; } .numf input { padding: 6px 6px; } .numf i { position: absolute; right: 8px; bottom: 8px; font-style: normal; }
.rangef { display: grid; grid-template-columns: 96px 1fr 38px; align-items: center; gap: 8px; font-size: 13px; } .rangef input { padding: 0; } .rangef b { font-weight: 600; text-align: right; font-size: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; } .check input { width: auto; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; } .seg button { flex: 1; border: 0; border-radius: 0; background: var(--panel); padding: 7px 4px; font-size: 12px; } .seg button + button { border-left: 1px solid var(--line); } .seg button.on { background: var(--accent); color: #fff; }
.colorfield { display: flex; flex-direction: column; gap: 5px; } .cf-label { font-size: 13px; font-weight: 600; }
.cf-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cf-sw { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); padding: 0; cursor: pointer; display: inline-block; position: relative; flex: none; }
.cf-sw.on { outline: 2px solid var(--accent); outline-offset: 2px; }
.cf-custom { background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); overflow: hidden; } .cf-custom input { position: absolute; inset: -6px; width: 40px; height: 40px; opacity: 0; cursor: pointer; padding: 0; }
.cf-none { border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 12px; background: var(--panel); } .cf-none.on { border-color: var(--accent); background: var(--accent-soft); }
.vars { display: flex; gap: 6px; flex-wrap: wrap; } .chip.sm { padding: 2px 8px; font-size: 11px; font-family: ui-monospace, monospace; }
.filebtn { cursor: pointer; display: inline-flex; justify-content: center; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 8px 14px; font-weight: 600; }
.group h2 .link { font-size: 12px; text-transform: none; letter-spacing: 0; margin-left: 8px; } .group h2 .danger { color: var(--danger); }
@media (max-width: 1100px) {
  .builder { grid-template-columns: minmax(0, 1fr) 300px; } .b-left { grid-column: 1 / -1; max-height: none; flex-direction: row; flex-wrap: wrap; } .b-left .group { flex: 1; min-width: 260px; }
}
@media (max-width: 760px) {
  .builder { grid-template-columns: 1fr; } .b-right, .b-left { max-height: none; } .b-stage { position: static; } .b-wrap { max-height: 70vh; }
}

/* phones: segmented rows scroll sideways instead of squeezing or spilling */
@media (max-width: 600px) { .seg { overflow-x: auto; max-width: 100%; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; } .seg button { flex: 1 0 auto; white-space: nowrap; padding-left: 10px; padding-right: 10px; min-height: 34px; } }

/* Insights and Links: tokens (validated palette slots 1 and 2; one brand hue for a single measure), tiles, charts, tables, data check. */
:root { --viz-1: #2a78d6; --viz-2: #eb6834; --viz-brand: var(--accent, #0f6b4f); --viz-grid: #e1e0d9; --viz-axis: #c3c2b7; --viz-muted: #898781; --viz-empty: #efeee9; }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; }
.subnav a { padding: 9px 12px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.subnav a.on { color: var(--text); border-color: var(--accent); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.warn { background: #fab219; }
.dot.bad { background: #d03b3b; }
.page-actions .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.tiles-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 12px; }
.vtile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.vt-label { font-size: 12.5px; color: var(--muted); }
.vt-value { font-size: 24px; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.vtile.hero .vt-value { font-size: 30px; }
.vt-delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: baseline; gap: 4px; }
.vt-delta i { font-style: normal; font-size: 10px; }
.vt-delta small { font-weight: 400; color: var(--muted); }
.vt-delta.up { color: #006300; }
.vt-delta.down { color: #b42318; }
.vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.vcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; margin-bottom: 14px; }
.vgrid .vcard { margin-bottom: 0; }
.vhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.vhead h3 { margin: 0; font-size: 15px; }
.vhead p { margin: 2px 0 0; }
.vtools { display: flex; gap: 8px; }
.seg-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 4px 10px; font-size: 12.5px; }
.seg-btn.on { background: var(--accent-soft); border-color: var(--accent); }
.vempty { color: var(--muted); padding: 22px 6px; text-align: center; margin: 0; }
.vchart { position: relative; }
.vchart svg { display: block; max-width: 100%; }
.v-grid { stroke: var(--viz-grid); stroke-width: 1; }
.v-axis { stroke: var(--viz-axis); stroke-width: 1; }
.v-cross { stroke: var(--viz-axis); stroke-width: 1; }
.v-tick { fill: var(--viz-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.vlegend { display: flex; gap: 14px; list-style: none; margin: 0 0 4px; padding: 0; font-size: 12.5px; color: var(--muted); }
.vlegend li { display: inline-flex; align-items: center; gap: 6px; }
.vlegend i { width: 14px; height: 3px; border-radius: 2px; }
.vtip { position: absolute; z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; box-shadow: 0 8px 22px -10px rgba(17, 32, 26, .4); display: flex; flex-direction: column; gap: 3px; pointer-events: none; min-width: 140px; }
.vtip b { font-size: 12px; }
.vtip span { display: flex; align-items: center; gap: 6px; }
.vtip i { width: 8px; height: 8px; border-radius: 50%; }
.vtip em { margin-left: auto; font-style: normal; font-weight: 600; padding-left: 12px; }
.vtip.static { position: static; margin-top: 4px; pointer-events: none; grid-column: 1 / -1; }
.vbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.vbars li { display: grid; grid-template-columns: minmax(90px, 32%) 1fr auto; align-items: center; gap: 4px 12px; position: relative; }
.vb-label { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-label em { font-style: normal; font-size: 11px; margin-left: 6px; color: var(--accent-strong); border: 1px solid var(--accent-line, var(--line)); border-radius: 99px; padding: 0 6px; }
.vb-track { height: 14px; display: block; }
.vb-fill { display: block; height: 14px; border-radius: 0 4px 4px 0; }
.vb-value { font-size: 13px; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.vb-sub { grid-column: 2 / -1; font-size: 12px; }
.vtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.vtable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.vtable td { padding: 9px 10px; border-bottom: 1px solid var(--viz-grid); font-variant-numeric: tabular-nums; vertical-align: top; }
.vtable .right { text-align: right; }
.vtable.wide { min-width: 760px; }
.vheat { display: flex; flex-direction: column; gap: 8px; }
.vh-grid { display: grid; grid-template-columns: 34px repeat(24, minmax(0, 1fr)); gap: 2px; align-items: center; }
.vh-hour { font-size: 10.5px; color: var(--viz-muted); white-space: nowrap; overflow: visible; }
.vh-day { font-size: 11px; color: var(--muted); }
.vh-cell { aspect-ratio: 1.15 / 1; border-radius: 3px; display: block; min-height: 14px; }
.vh-cell.best { outline: 2px solid var(--text); outline-offset: 1px; position: relative; z-index: 1; }
.vh-legend { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.vh-legend i { width: 120px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--viz-brand) 14%, var(--panel)), var(--viz-brand)); }
.vh-tip { margin: 0; min-height: 20px; color: var(--muted); }
.bestlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bestlist li { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.bestlist span { color: var(--muted); font-size: 13px; }
.vnotes p { margin: 4px 0; }
.checks { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 8px; }
.check-row { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.check-row p { margin: 3px 0 0; color: var(--muted); }
.ck-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; flex: none; background: #e6f4ea; color: #006300; }
.check-row.warn .ck-icon { background: #fff4d6; color: #7a5200; }
.check-row.bad .ck-icon { background: #fde7e7; color: #b42318; }
.check-row.info .ck-icon { background: #e8eefb; color: #1c5cab; }
.check-row.bad { border-color: #f1b8b8; }
.ck-word { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 6px; }
.urlbox { font-family: ui-monospace, monospace; font-size: 12.5px; text-align: left; border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent-strong); border-radius: 8px; padding: 7px 10px; overflow-wrap: anywhere; cursor: pointer; }
.viewsf { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.viewsf input { width: 120px; padding: 5px 8px; }
.code.archived { opacity: .7; }
.mono { font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
@media (max-width: 900px) { .vgrid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .vh-grid { grid-template-columns: 28px repeat(24, minmax(0, 1fr)); gap: 1px; } .vh-cell { min-height: 10px; } .vt-value { font-size: 21px; } .vbars li { grid-template-columns: minmax(70px, 34%) 1fr auto; } }

.table-wrap { overflow-x: auto; max-width: 100%; }
.vcard, .page { min-width: 0; }
.seg button { white-space: nowrap; }
.page-actions .seg button { padding-left: 10px; padding-right: 10px; }

/* Marketing → Customers and Campaigns */
.cm-pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--pd-neutral-100, #eef0ed); color: var(--muted); white-space: nowrap; }
.cm-pill.cm-ok { background: #e6f4ec; color: #14683f; }
.cm-pill.cm-wait { background: #fff4de; color: #8a5a00; }
.cm-pill.cm-bad { background: #fde8e8; color: #a12626; }
.check { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; cursor: pointer; }
.check input { margin-top: 3px; }
.filters { margin: 10px 0 14px; flex-wrap: wrap; }
.filters input[type=search] { flex: 1; min-width: 200px; }
.pager { justify-content: center; align-items: center; margin-top: 14px; }
.plain { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 8px; }
.pick { display: grid; gap: 2px; max-height: 220px; overflow: auto; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.compose-preview { position: sticky; top: 12px; }
.mail-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.block { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: var(--panel); }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.block textarea, .block input, .block select { width: 100%; }
@media (max-width: 900px) { .composer { grid-template-columns: minmax(0, 1fr); } .compose-preview { position: static; } .mail-frame { height: 520px; } }
.row.between { justify-content: space-between; align-items: center; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 10px; align-items: stretch; }
.tpl { display: flex; flex-direction: column; align-items: stretch; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--panel); text-align: left; min-width: 0; }
.tpl > span { flex: 1 0 auto; }
.tpl > .primary { margin-top: auto; }
.tpl-blank { justify-content: center; min-height: 140px; cursor: pointer; font: inherit; }
.tpl-shot { height: 260px; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: #f7f6f1; position: relative; flex: none; }
.tpl-shot iframe { width: 560px; height: 1200px; border: 0; transform: scale(.38); transform-origin: top center; pointer-events: none; position: absolute; top: 0; left: 50%; margin-left: -280px; }
/* the editor's controls */
.mini-field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.mini-field .seg { min-width: 0; }
.mini-field .seg button { padding: 6px 10px; }
.grid2 > * { min-width: 0; }
.grow { flex: 1; min-width: 0; }
.photo-field { display: flex; gap: 12px; align-items: center; }
.photo-field img, .photo-empty { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.photo-empty { display: grid; place-items: center; font-size: 11px; color: var(--muted); background: var(--bg); }
.item-row { display: flex; gap: 8px; align-items: flex-start; }
.item-row .icon-in { width: 48px; text-align: center; font-size: 18px; flex: none; }
.colour-field { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.colour-field input[type=color] { width: 38px; height: 30px; padding: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
/* the five looks, as little cards with their own colours */
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-bottom: 12px; }
.look-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); text-align: left; cursor: pointer; font: inherit; }
.look-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft, rgba(15,107,79,.18)); }
.look-card small { font-size: 11px; color: var(--muted); line-height: 1.3; }
.look-swatch { display: flex; width: 100%; height: 34px; border-radius: 6px; overflow: hidden; margin-bottom: 6px; padding: 6px; gap: 4px; align-items: flex-end; }
.look-swatch i { display: block; flex: 1; height: 100%; border-radius: 3px; }
.look-classic .look-swatch { background: #f3efe7; } .look-classic .look-swatch i { background: #fff; } .look-classic .look-swatch i:first-child { background: var(--lk-brand); }
.look-modern .look-swatch { background: #eceff4; } .look-modern .look-swatch i { background: #fff; border-radius: 8px; } .look-modern .look-swatch i:nth-child(2) { background: var(--lk-brand); }
.look-dark .look-swatch { background: #0b0e0d; } .look-dark .look-swatch i { background: #1d2421; } .look-dark .look-swatch i:last-child { background: var(--lk-brand); }
.look-bold .look-swatch { background: var(--lk-brand); } .look-bold .look-swatch i { background: #fff; } .look-bold .look-swatch i:first-child { background: #151a18; }
.look-minimal .look-swatch { background: #fff; border: 1px solid #e6e6e6; } .look-minimal .look-swatch i { background: none; border-bottom: 2px solid #111; border-radius: 0; height: 40%; }
/* the two tabs on the left of the editor */
[hidden] { display: none !important; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; position: sticky; top: 0; z-index: 2; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px 12px; border-radius: 9px; font-weight: 600; color: var(--muted); cursor: pointer; font: inherit; font-weight: 600; }
.tabs button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tab-help { margin: 0 2px 12px; }
