/* ============================================================
   UATAG CRM — the 2026 redesign (Figma Uatag_CRM → «New», «DesignSystem»).
   Loaded last on index.html only: the design tokens (dark / light, Material 3 role names), Geist, the shell
   (top header, mobile tab bar, popovers), the shared controls and the data-display parts every screen uses.
   The older stylesheets stay for the secondary pages; their token names are mapped onto the new palette here.
   ============================================================ */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/assets/c4p/fonts/geist-400-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/assets/c4p/fonts/geist-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('/assets/c4p/fonts/geist-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- tokens: the Figma «color» collection, dark and light modes ---------- */
:root, :root[data-theme="dark"] {
  --cx-surface: #1a1d21; --cx-lowest: #1c1f24; --cx-low: #212429; --cx-container: #272a30; --cx-high: #30343a; --cx-highest: #393d44; --cx-inverse: #ededef;
  --cx-logo: #ededef; /* the UATAG navy #2B295C cannot be read on a dark surface */
  --cx-on: #ededef; --cx-variant: #a1a1aa; --cx-muted: #6b6b74; --cx-disabled: #4a4a52; --cx-on-inverse: #1a1d21;
  --cx-line: #2c3036; --cx-outline: #474c54; --cx-raised: #393d44;
  --cx-primary: #7c8cff; --cx-on-primary: #1a1d21; --cx-primary-container: #323a80; --cx-on-primary-container: #c9cfff; --cx-primary-strong: #7a8afb; --cx-primary-medium: #626fd3; --cx-primary-soft: #5662be; --cx-primary-faint: #39428c; --cx-primary-deep: #2c3156; --cx-bar-muted: #323a80; --cx-link: #7c8cff;
  --cx-secondary: #b49cff; --cx-secondary-container: #342b4f;
  --cx-success: #3dd68c; --cx-success-container: #213f2e; --cx-success-deep: #21342a;
  --cx-warning: #f5b544; --cx-warning-container: #463b26; --cx-warning-deep: #36322a; --cx-warning-text: #f5b544;
  --cx-error: #ff6b5e; --cx-error-container: #472a2c;
  --cx-info: #4c9ff5; --cx-orange: #ff8a3d; --cx-pink: #ff7a9c; --cx-gold: #d69700; --cx-sand: #d9a066;
  --cx-neutral-bar: rgba(237,237,239,.2); --cx-stripe: #7c8cff; --cx-pressed: #272a30; --cx-popover: #272a30; --cx-floating: #212429; --cx-selected: #30343a; --cx-ring: #ededef;
  --cx-shadow: 0 16px 48px rgba(0,0,0,.5); --cx-shadow-float: none;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --cx-surface: #ffffff; --cx-lowest: #ffffff; --cx-low: #fafafb; --cx-container: #f6f6f8; --cx-high: #ececef; --cx-highest: #e3e3e8; --cx-inverse: #18181c;
  --cx-logo: #2B295C; /* the UATAG logo colour */
  --cx-on: #0b0b0f; --cx-variant: #5e5e68; --cx-muted: #8c8c96; --cx-disabled: #b6b6be; --cx-on-inverse: #ffffff;
  --cx-line: #efeff2; --cx-outline: #cfcfd6; --cx-raised: #efeff2;
  --cx-primary: #5465f0; --cx-on-primary: #ffffff; --cx-primary-container: #dfe3ff; --cx-on-primary-container: #2d389e; --cx-primary-strong: #5f6ff2; --cx-primary-medium: #8693f5; --cx-primary-soft: #aeb6f8; --cx-primary-faint: #d3d8fb; --cx-primary-deep: #eef0ff; --cx-bar-muted: #aeb6f8; --cx-link: #4050d8;
  --cx-secondary: #7f5cf0; --cx-secondary-container: #eee8ff;
  --cx-success: #14a464; --cx-success-container: #ddf5e8; --cx-success-deep: #eaf8f0;
  --cx-warning: #e8920e; --cx-warning-container: #fbf0d6; --cx-warning-deep: #fdf6e7; --cx-warning-text: #b56a00;
  --cx-error: #e2483b; --cx-error-container: #fde3e0;
  --cx-info: #2b7fd8; --cx-orange: #e26a1c; --cx-pink: #e0507a; --cx-gold: #b07c00; --cx-sand: #b9783a;
  --cx-neutral-bar: #ececef; --cx-stripe: #a9b2f8; --cx-pressed: #e6e6ea; --cx-popover: #ffffff; --cx-floating: #ffffff; --cx-selected: #f6f6f8; --cx-ring: #ffffff;
  --cx-shadow: 0 16px 48px rgba(11,11,15,.08), 0 0 0 1px rgba(11,11,15,.06); --cx-shadow-float: 0 4px 16px rgba(11,11,15,.06);
  color-scheme: light;
}
/* the older token names, mapped onto the new palette (secondary pages, dialogs, the public-page preview) */
:root, :root[data-theme="dark"], :root[data-theme="light"], .glass, .header, .rail, :root[data-theme="light"] .glass {
  --font-sans: 'Geist', -apple-system, 'Helvetica Neue', Arial, system-ui, sans-serif; --font-mono: 'Geist', ui-monospace, 'SF Mono', Menlo, monospace;
  --bg: var(--cx-surface); --bg-subtle: var(--cx-low); --bg-muted: var(--cx-container); --surface: var(--cx-lowest); --surface-raised: var(--cx-popover); --glass-solid: var(--cx-surface);
  --border: var(--cx-line); --border-strong: var(--cx-outline); --text: var(--cx-on); --text-2: var(--cx-variant); --text-3: var(--cx-muted); --text-inverse: var(--cx-on-inverse);
  --ink: var(--cx-inverse); --ink-hover: var(--cx-on); --accent: var(--cx-primary); --accent-hover: var(--cx-primary-strong); --accent-soft: color-mix(in srgb, var(--cx-primary) 14%, transparent); --accent-text: var(--cx-link);
  --success: var(--cx-success); --success-soft: var(--cx-success-container); --warning: var(--cx-warning-text); --warning-soft: var(--cx-warning-container); --danger: var(--cx-error); --danger-soft: var(--cx-error-container);
  --info: var(--cx-info); --info-soft: color-mix(in srgb, var(--cx-info) 14%, transparent); --neutral: var(--cx-variant); --neutral-soft: var(--cx-container);
  --shadow-menu: var(--cx-shadow); --shadow-dialog: var(--cx-shadow); --shadow-float: var(--cx-shadow);
  --chart-1: var(--cx-on); --chart-2: var(--cx-primary); --chart-3: var(--cx-error); --chart-grid: var(--cx-line);
  --r-1: 6px; --r-2: 8px; --r-3: 12px; --header-h: 56px;
}

html, body { background: var(--cx-surface); }
body { font: 400 14px/20px var(--font-sans); color: var(--cx-on); -webkit-font-smoothing: antialiased; font-feature-settings: 'ss01' 0; }
.cx svg { flex: none; }
.cx-ic { width: 16px; height: 16px; display: inline-grid; place-items: center; flex: none; }
.cx-ic svg { width: 100%; height: 100%; stroke-width: 1.5; }
.cx-ic.s14 { width: 14px; height: 14px; } .cx-ic.s12 { width: 12px; height: 12px; } .cx-ic.s20 { width: 20px; height: 20px; }
.cx-num { font-variant-numeric: tabular-nums; }

/* ---------- shell ---------- */
.cx { height: 100dvh; display: flex; flex-direction: column; background: var(--cx-surface); color: var(--cx-on); overflow: hidden; }
.cx-top { flex: none; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 24px; border-bottom: 1px solid var(--cx-line); background: var(--cx-surface); position: relative; z-index: 1100; }
.cx-logo { display: inline-flex; color: var(--cx-logo); } .cx-logo .logo-mark { width: 56px; height: 18px; }
.cx-sp { flex: 1 1 0; min-width: 0; }
.cx-nav { display: flex; gap: 24px; height: 56px; }
.cx-nav a { display: flex; align-items: center; font: 500 14px/20px var(--font-sans); color: var(--cx-variant); border-bottom: 2px solid transparent; border-top: 2px solid transparent; text-decoration: none; transition: color .15s; white-space: nowrap; }
.cx-nav a:hover { color: var(--cx-on); } .cx-nav a.on { color: var(--cx-on); border-bottom-color: var(--cx-inverse); }
.cx-search { width: 240px; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 8px; background: var(--cx-container); color: var(--cx-variant); position: relative; }
.cx-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--cx-on); font: 400 14px/20px var(--font-sans); padding: 0; -webkit-appearance: none; appearance: none; }
.cx-search > .cx-ic { color: var(--cx-muted); } .cx-search > .cx-ic svg, #bell > .cx-ic svg { stroke-width: 1.33333; }
.cx-search input::placeholder { color: var(--cx-variant); } .cx-search input::-webkit-search-cancel-button { display: none; }
.cx-search:focus-within { box-shadow: 0 0 0 1px var(--cx-outline); }
.cx-ibtn { width: 36px; height: 36px; border-radius: 8px; background: var(--cx-container); color: var(--cx-on); display: inline-grid; place-items: center; border: 0; cursor: pointer; position: relative; flex: none; transition: background .15s; }
.cx-ibtn:hover { background: var(--cx-high); } .cx-ibtn.plain { background: none; } .cx-ibtn.plain:hover { background: var(--cx-container); }
#bell > .cx-ic { color: var(--cx-variant); }
.cx-ibtn .n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 16px; padding: 0 5px; box-sizing: border-box; border-radius: 8px; background: var(--cx-error); color: #fff; font: 500 11px/16px var(--font-sans); text-align: center; }
.cx-ibtn .n:empty, .cx-ibtn .n.hide { display: none; }
.cx-acct { display: flex; align-items: center; border: 0; background: none; padding: 0; cursor: pointer; flex: none; }
.cx-acct .cx-av + .cx-av { margin-left: -8px; }
.cx-av { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; font: 500 13px/1 var(--font-sans); flex: none; overflow: hidden; background: var(--cx-container); color: var(--cx-variant); }
.cx-av img { width: 100%; height: 100%; object-fit: cover; }
.cx-av.user { width: 36px; height: 36px; box-shadow: inset 0 0 0 2px var(--cx-surface); background: var(--cx-primary-container); color: var(--cx-on-primary-container); border: 2px solid var(--cx-surface); box-sizing: border-box; }
.cx-av.t0 { background: var(--cx-success-container); color: var(--cx-gold); } .cx-av.t1 { background: color-mix(in srgb, var(--cx-pink) 16%, var(--cx-surface)); color: var(--cx-pink); }
.cx-av.t2 { background: color-mix(in srgb, var(--cx-orange) 14%, var(--cx-surface)); color: var(--cx-orange); } .cx-av.t3 { background: var(--cx-warning-deep); color: var(--cx-sand); }
.cx-av.t4 { background: var(--cx-primary-deep); color: var(--cx-primary); } .cx-av.t5 { background: var(--cx-secondary-container); color: var(--cx-secondary); }
.cx-av.all { background: var(--cx-container); color: var(--cx-on); }

.cx-main { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; }
.cx-view { position: absolute; inset: 0; overflow: auto; display: none; scrollbar-width: thin; scrollbar-color: var(--cx-high) transparent; }
.cx-main[data-base="overview"] > #view-overview, .cx-main[data-base="tags"] > #tags-stage, .cx-main[data-base="promo"] > #view-promo, .cx-main[data-base="products"] > #view-products { display: block; }
.cx-main > #map-stage { position: absolute; inset: 0; visibility: hidden; } .cx-main[data-base="map"] > #map-stage { visibility: visible; }
/* secondary pages (pages, imports, settings, a sticker opened by link…) slide in from the right */
.cx-sheet, .cx-sheet.sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(680px, 100%); background: var(--cx-surface); border: 0; border-left: 1px solid var(--cx-line); border-radius: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; left: auto; min-width: 0; padding: 0; opacity: 1; transform: translateX(100%); transition: transform .25s cubic-bezier(.2,.7,.2,1); z-index: 1050; display: flex; flex-direction: column; visibility: hidden; }
.cx-main.sheet-open .cx-sheet { transform: none; visibility: visible; box-shadow: var(--cx-shadow); }
.cx-sheet .sheet-body { flex: 1; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--cx-high) transparent; }
.cx-sheet .sheet-close { position: absolute; top: 16px; right: 16px; z-index: 2; }
.cx-sheet .content { padding: 20px 24px 32px; max-width: none; }
.cx-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 1040; }
.cx-main.sheet-open .cx-scrim { opacity: 1; pointer-events: auto; }

/* mobile tab bar */
.cx-tabbar { display: none; flex: none; border-top: 1px solid var(--cx-line); background: var(--cx-surface); padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)); justify-content: space-around; position: relative; z-index: 1100; }
.cx-tabbar a { flex: 1; max-width: 96px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--cx-muted); font: 500 11px/14px var(--font-sans); text-decoration: none; }
.cx-tabbar a .cx-ic { width: 20px; height: 20px; } .cx-tabbar a.on { color: var(--cx-on); }

/* ---------- popovers: profile menu, alerts, dropdowns ---------- */
.cx-pop { position: absolute; top: calc(100% + 0px); right: 0; z-index: 1200; background: var(--cx-popover); border-radius: 12px; box-shadow: var(--cx-shadow); color: var(--cx-on); animation: cx-pop .16s cubic-bezier(.2,.7,.2,1); }
@keyframes cx-pop { from { opacity: 0; transform: translateY(-4px); } }
.cx-top .cx-pop { top: 55px; right: 24px; }
.cx-menu { width: 300px; padding: 0 0 8px; max-height: calc(100dvh - 72px); overflow: auto; }
.cx-menu-user { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; text-decoration: none; color: inherit; }
.cx-menu-user .cx-av { width: 40px; height: 40px; font-size: 14px; border: 0; }
.cx-menu-user b { display: block; font: 500 14px/20px var(--font-sans); } .cx-menu-user small { display: block; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); }
.cx-menu-user > span:not(.cx-av) { flex: 1; min-width: 0; } .cx-menu-user .cx-ic { color: var(--cx-variant); }
.cx-menu hr { border: 0; border-top: 1px solid var(--cx-raised); margin: 0; }
.cx-menu-h { display: flex; justify-content: space-between; padding: 12px 20px 8px; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); }
.cx-menu-list { padding: 0 8px; display: flex; flex-direction: column; }
.cx-mi { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 4px 12px; border-radius: 8px; border: 0; background: none; color: var(--cx-on); font: 400 14px/20px var(--font-sans); text-align: left; text-decoration: none; cursor: pointer; width: 100%; }
.cx-mi:hover { background: var(--cx-selected); } .cx-mi > span:not(.cx-av) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-mi .cx-ic { color: var(--cx-variant); } .cx-mi.prod { min-height: 48px; gap: 12px; } .cx-mi.prod.on { background: var(--cx-selected); } .cx-mi.prod .chk { color: var(--cx-primary); }
.cx-mi.link { color: var(--cx-link); } .cx-mi.link .cx-ic { color: var(--cx-link); } .cx-mi.danger, .cx-mi.danger .cx-ic { color: var(--cx-error); }
.cx-mi small { color: var(--cx-variant); font-size: 12px; }
.cx-menu-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px 6px 20px; min-height: 44px; }
.cx-menu-sec { padding: 8px 0; }
.cx-alerts { width: 380px; padding: 8px 8px 12px; }
.cx-alerts-h { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 8px; } .cx-alerts-h b { font: 600 14px/20px var(--font-sans); } .cx-alerts-h a { color: var(--cx-variant); font: 400 14px/20px var(--font-sans); text-decoration: none; }
.cx-alert { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: inherit; }
.cx-alert:hover { background: var(--cx-selected); } .cx-alert > span:not(.cx-tile) { flex: 1; min-width: 0; } .cx-alert b { display: block; font: 500 14px/20px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-alert small { display: block; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-alert time { font: 400 12px/16px var(--font-sans); color: var(--cx-variant); flex: none; }
.cx-tile { width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; flex: none; background: var(--cx-primary-deep); color: var(--cx-primary); }
.cx-tile.err { background: var(--cx-error-container); color: var(--cx-error); } .cx-tile.warn { background: var(--cx-warning-container); color: var(--cx-warning); }
.cx-tile.ok { background: var(--cx-success-container); color: var(--cx-success); } .cx-tile.sec { background: var(--cx-secondary-container); color: var(--cx-secondary); } .cx-tile.info { background: color-mix(in srgb, var(--cx-info) 14%, transparent); color: var(--cx-info); }
.cx-results { width: 320px; padding: 8px; left: auto; }
.cx-search .cx-pop { top: 44px; right: 0; }
.cx-empty { padding: 24px 12px; text-align: center; color: var(--cx-variant); font: 400 13px/18px var(--font-sans); }

/* ---------- controls ---------- */
.cx-btn { height: 36px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--cx-container); color: var(--cx-on); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 500 14px/20px var(--font-sans); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s; }
.cx-btn:hover { background: var(--cx-high); } .cx-btn:active { background: var(--cx-pressed); } .cx-btn.danger { color: var(--cx-error); } .cx-btn.sm { height: 32px; padding: 0 10px; }
.cx-btn.wide { flex: 1; } .cx-btn[disabled] { color: var(--cx-disabled); cursor: default; } .cx-btn.primary { background: var(--cx-primary); color: var(--cx-on-primary); } .cx-btn.primary:hover { background: var(--cx-primary-strong); filter: brightness(1.06); } .cx-btn.primary:active { filter: brightness(.94); }
.cx-seg { display: inline-flex; gap: 4px; border-radius: 8px; }
.cx-seg button { height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: none; color: var(--cx-variant); font: 500 14px/20px var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cx-seg button:hover { color: var(--cx-on); } .cx-seg button[aria-pressed="true"] { background: var(--cx-container); color: var(--cx-on); }
 
.cx-seg.icons button { width: 32px; padding: 0; justify-content: center; } .cx-seg.icons button[aria-pressed="true"] { background: var(--cx-selected); }
.cx-chip { display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--cx-container); color: var(--cx-variant); font: 500 12px/16px var(--font-sans); white-space: nowrap; }
.cx-chip.primary { background: var(--cx-primary-deep); color: var(--cx-primary); } .cx-chip.secondary { background: var(--cx-secondary-container); color: var(--cx-secondary); }
.cx-chip.success { background: var(--cx-success-deep); color: var(--cx-success); } .cx-chip.info { background: color-mix(in srgb, var(--cx-info) 14%, transparent); color: var(--cx-info); }
.cx-chip.warning { background: color-mix(in srgb, var(--cx-warning) 14%, transparent); color: var(--cx-warning-text); } .cx-chip.error { background: color-mix(in srgb, var(--cx-error) 14%, transparent); color: var(--cx-error); }
.cx-status { display: inline-flex; align-items: center; gap: 8px; font: 400 14px/20px var(--font-sans); color: var(--cx-variant); white-space: nowrap; }
.cx-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cx-success); flex: none; }
.cx-status.warn { color: var(--cx-warning-text); } .cx-status.warn::before { background: var(--cx-warning); } .cx-status.err { color: var(--cx-error); } .cx-status.err::before { background: var(--cx-error); }
.cx-status.off { color: var(--cx-muted); } .cx-status.off::before { background: var(--cx-muted); } .cx-status.on-text { color: var(--cx-on); }
.cx-check { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--cx-highest); background: var(--cx-surface); display: inline-grid; place-items: center; cursor: pointer; flex: none; color: transparent; padding: 0; -webkit-appearance: none; appearance: none; margin: 0; }
.cx-check:checked, .cx-check.on { background: var(--cx-primary); border-color: var(--cx-primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%231a1d21' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 6.2 2.3 2.3 4.7-5'/%3E%3C/svg%3E"); }
:root[data-theme="light"] .cx-check:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m2.5 6.2 2.3 2.3 4.7-5'/%3E%3C/svg%3E"); }
.cx-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--cx-line); padding: 0 24px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; } .cx-tabs::-webkit-scrollbar { display: none; }
.cx-tabs button, .cx-tabs a { height: 42px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--cx-variant); font: 500 14px/20px var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; text-decoration: none; margin-bottom: -1px; }
.cx-tabs button small, .cx-vtab small { font: 400 12px/16px var(--font-sans); color: var(--cx-variant); }
.cx-tabs button:hover { color: var(--cx-on); } .cx-tabs [aria-selected="true"] { color: var(--cx-on); border-bottom-color: var(--cx-primary); }
.cx-vtab { height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: none; color: var(--cx-variant); font: 500 14px/20px var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.cx-vtab:hover { color: var(--cx-on); } .cx-vtab[aria-pressed="true"] { background: var(--cx-container); color: var(--cx-on); }
.cx-filter { height: 32px; padding: 0 10px; border-radius: 8px; border: 0; background: var(--cx-container); color: var(--cx-variant); font: 400 14px/20px var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; position: relative; }
.cx-filter b { font-weight: 500; color: var(--cx-on); } .cx-filter:hover { background: var(--cx-high); } .cx-filter .cnt { color: var(--cx-primary); font-weight: 500; }
.cx-dd { position: relative; display: inline-flex; } .cx-dd .cx-pop { top: 36px; right: 0; min-width: 200px; padding: 8px; max-height: 320px; overflow: auto; }
.cx-dd .cx-pop.left { right: auto; left: 0; }

/* ---------- page furniture & data display ---------- */
.cx-bar { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--cx-line); min-height: 69px; box-sizing: border-box; }
.cx-bar h1 { font: 600 20px/28px var(--font-sans); letter-spacing: -.03em; margin: 0; display: flex; align-items: baseline; gap: 12px; } .cx-bar h1 small { font: 400 14px/20px var(--font-sans); color: var(--cx-variant); letter-spacing: 0; }
.cx-bar .r { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.cx-sec { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cx-h { display: flex; align-items: center; gap: 8px; min-height: 20px; } .cx-h b { font: 600 14px/20px var(--font-sans); flex: 1; min-width: 0; }
.cx-h .cx-link { color: var(--cx-variant); font: 400 14px/20px var(--font-sans); text-decoration: none; } .cx-h .cx-link:hover { color: var(--cx-on); }
.cx-legend { display: flex; gap: 16px; flex-wrap: wrap; } .cx-legend span { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); }
.cx-legend i, .cx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cx-primary); flex: none; display: inline-block; }
.cx-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--cx-line); }
.cx-kpi { padding: 24px; display: flex; flex-direction: column; gap: 5px; min-width: 0; position: relative; text-decoration: none; color: inherit; }
.cx-kpi + .cx-kpi::before { content: ""; position: absolute; left: 0; top: 24px; bottom: 24px; width: 1px; background: var(--cx-line); }
.cx-kpi > span { font: 400 13px/17px var(--font-sans); color: var(--cx-variant); }
.cx-kpi .v { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.cx-kpi .vg { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cx-kpi b { font: 300 46px/60px var(--font-sans); letter-spacing: -.03em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cx-kpi .d { display: flex; gap: 8px; font: 400 13px/17px var(--font-sans); color: var(--cx-variant); white-space: nowrap; }
.cx-delta { font-weight: 500; color: var(--cx-success); } .cx-delta.neg { color: var(--cx-error); } .cx-delta.flat { color: var(--cx-variant); }
.cx-spark { width: 147px; height: 52px; flex: none; display: block; margin-bottom: 0; } /* its bars stand on the bottom of the delta line, as in the design */
.cx-kpi.compact { padding: 16px 24px; } .cx-kpi.compact b { font: 300 30px/36px var(--font-sans); } .cx-kpi.compact .cx-spark { width: 58px; height: 32px; } .cx-kpi.compact .d { font-size: 12px; line-height: 16px; }
.cx-kpi.simple b { font: 300 36px/44px var(--font-sans); } .cx-kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cx-prow { display: flex; flex-direction: column; gap: 8px; } .cx-prow .l { display: flex; align-items: baseline; gap: 8px; }
.cx-prow .l > span:first-child { flex: 1; min-width: 0; font: 500 14px/20px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-prow .l small { font: 400 12px/16px var(--font-sans); color: var(--cx-variant); font-variant-numeric: tabular-nums; } .cx-prow .l b { font: 500 14px/20px var(--font-sans); min-width: 48px; text-align: right; font-variant-numeric: tabular-nums; }
.cx-track { height: 6px; border-radius: 2px; background: var(--cx-high); overflow: hidden; display: flex; gap: 2px; } .cx-track i { display: block; height: 100%; border-radius: 2px; background: var(--cx-primary); min-width: 2px; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.cx-track.split { background: none; }
.cx-kv { display: flex; flex-direction: column; gap: 10px; } .cx-kv > div { display: flex; justify-content: space-between; gap: 16px; font: 400 14px/20px var(--font-sans); }
.cx-kv > div > span:first-child { color: var(--cx-variant); flex: none; } .cx-kv > div > span:last-child { text-align: right; min-width: 0; } .cx-kv em { font-style: normal; color: var(--cx-variant); margin-left: 6px; }
.cx-sk { border-radius: 8px; background: linear-gradient(90deg, var(--cx-low), var(--cx-container), var(--cx-low)); background-size: 200% 100%; animation: cx-sk 1.2s linear infinite; min-height: 20px; }
@keyframes cx-sk { to { background-position: -200% 0; } }
.cx-none { color: var(--cx-muted); }

/* ---------- the older components in the new skin (secondary pages, dialogs) ---------- */
.cx .btn, dialog .btn { border-radius: 8px; font-family: var(--font-sans); text-transform: none; letter-spacing: 0; }
.cx .btn.primary, dialog .btn.primary { background: var(--cx-primary); border-color: var(--cx-primary); color: var(--cx-on-primary); } .cx .btn.primary:hover, dialog .btn.primary:hover { background: var(--cx-primary-strong); border-color: var(--cx-primary-strong); filter: brightness(1.06); }
.cx .input, .cx select.input, .cx textarea.input, dialog .input { border-radius: 8px; background: var(--cx-container); border-color: transparent; color: var(--cx-on); font-family: var(--font-sans); }
.cx .input:focus, dialog .input:focus { border-color: var(--cx-outline); }
.cx .card { border-radius: 12px; background: var(--cx-low); border-color: var(--cx-line); box-shadow: none; }
.cx .page-head h1 { font: 600 20px/28px var(--font-sans); letter-spacing: -.03em; }
dialog { border-radius: 16px; background: var(--cx-popover); color: var(--cx-on); border: 0; box-shadow: var(--cx-shadow); font-family: var(--font-sans); }
dialog::backdrop { background: rgba(0,0,0,.5); }
.toast { border-radius: 10px; font-family: var(--font-sans); }

@media (max-width: 1100px) { .cx-search { width: 180px; } .cx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cx-kpi:nth-child(3)::before { display: none; } .cx-kpi:nth-child(n+3) { border-top: 1px solid var(--cx-line); } .cx-kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .cx-top { padding: 0 16px; gap: 12px; border-bottom: 0; } .cx-top .cx-nav, .cx-top .cx-search, .cx-top .cx-sp + .cx-sp { display: none; } .cx-logo .logo-mark { width: 62px; height: 20px; }
  .cx-tabbar { display: flex; } .cx-top .cx-pop { right: 8px; left: 8px; width: auto; }
  .cx-sheet, .cx-sheet.sheet { width: 100%; border-left: 0; left: 0; top: 0; bottom: 0; } .cx-bar { padding: 12px 16px; min-height: 0; } .cx-bar h1 { font-size: 22px; } .cx-bar .r { gap: 8px; } .cx-sec { padding: 20px 16px; }
  .cx-kpi { padding: 16px; } .cx-kpi b { font: 300 28px/34px var(--font-sans); } .cx-kpi .cx-spark { width: 58px; height: 32px; } .cx-kpi .d .vs { display: none; } .cx-kpi + .cx-kpi::before { top: 0; bottom: 0; } .cx-kpi:nth-child(odd)::before { display: none; }
  .cx-tabs { padding: 0 16px; }
  /* the profile menu becomes a bottom sheet */
  .cx-top .cx-pop.cx-menu { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 16px 16px 0 0; max-height: 86dvh; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); animation: cx-up .25s cubic-bezier(.2,.7,.2,1); }
  .cx-top { z-index: 1110; } .cx-top .cx-pop.cx-menu { box-shadow: 0 0 0 100vmax rgba(0,0,0,.5); }
  .cx-top .cx-pop.cx-menu::before { content: ""; display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--cx-outline); margin: 8px auto 0; }
  .cx-alerts { width: auto; }
}
@keyframes cx-up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cx *, .cx *::before { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- Overview ---------- */
.cx-row { display: flex; border-bottom: 1px solid var(--cx-line); }
.cx-row > .grow { flex: 1 1 0; min-width: 0; } .cx-row > .side { flex: 0 0 440px; width: 440px; box-sizing: border-box; }
.cx-row.trend > .grow, .cx-row.breakdown > .side { border-right: 1px solid var(--cx-line); }
.cx-chart { position: relative; height: 240px; touch-action: pan-y; margin-top: 6px; }
.cx-chart-svg { display: block; overflow: visible; } .cx-chart-svg .g { stroke: var(--cx-line); stroke-width: 1; } .cx-chart-svg .ax { fill: var(--cx-variant); font: 400 12px/16px var(--font-sans); }
.cx-chart-svg .mk { stroke: var(--cx-primary); stroke-width: 1; stroke-dasharray: 2 3; }
.cx-note { position: absolute; top: 0; z-index: 3; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 8px; background: var(--cx-popover); box-shadow: var(--cx-shadow); pointer-events: none; white-space: nowrap; font: 400 12px/16px var(--font-sans); color: var(--cx-on); } /* a plate next to the bar, inside the chart */
:root[data-theme="dark"] .cx-note { box-shadow: 0 8px 24px rgba(0,0,0,.45), inset 0 0 0 1px var(--cx-raised); }
.cx-note b { font-weight: 500; color: var(--cx-primary); }
.cx-sec.ctx { gap: 16px; } .cx-sec.ctx > .cx-h { margin-bottom: -4px; } .cx-sec hr { border: 0; border-top: 1px solid var(--cx-line); margin: 0; width: 100%; }
.cx-devs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cx-dev { display: flex; flex-direction: column; } .cx-dev b { font: 300 32px/32px var(--font-sans); letter-spacing: -.02em; } .cx-dev span { font: 400 12px/16px var(--font-sans); color: var(--cx-variant); margin: 2px 0 12px; }
.cx-sub { display: flex; justify-content: space-between; align-items: center; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); } .cx-sub span { display: inline-flex; align-items: center; gap: 6px; } .cx-sub b { font-weight: 500; color: var(--cx-primary); }
.cx-hbars { height: 64px; display: flex; flex-direction: row; align-items: flex-end; justify-content: space-between; padding: 0 4px; border-bottom: 1px solid var(--cx-line); }
.cx-hbars i { width: 8px; border-radius: 2px 2px 0 0; background: var(--cx-neutral-bar); } .cx-hbars i.pk { background: var(--cx-primary); }
.cx-hours .ax { display: flex; justify-content: space-between; margin-top: 6px; font: 400 11px/14px var(--font-sans); color: var(--cx-variant); }
.cx-langs { display: flex; flex-direction: column; gap: 12px; } .cx-langs .lg { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cx-langs .lg span { display: inline-flex; align-items: center; gap: 6px; font: 400 14px/20px var(--font-sans); } .cx-langs .lg em { font-style: normal; color: var(--cx-variant); }
.cx-cities { display: flex; gap: 48px; align-items: center; min-height: 320px; }
.cx-bubbles { flex: 1 1 512px; max-width: 512px; height: 320px; position: relative; min-width: 0; }
.cx-bub { position: absolute; transform: translate(-50%, -50%); text-align: center; pointer-events: none; display: flex; flex-direction: column; align-items: center; line-height: 1.15; white-space: nowrap; }
.cx-bub b { font-weight: 600; letter-spacing: -.02em; color: var(--cx-on); } .cx-bub span { font-size: .78em; font-weight: 500; color: var(--cx-on-primary-container); margin-top: 2px; } .cx-bub.big span { font-size: .64em; margin-top: 6px; }
:root[data-theme="light"] .cx-bub span { color: var(--cx-on-primary-container); }
.cx-citylist { flex: 1 1 392px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cx-city { display: flex; flex-direction: column; gap: 8px; } .cx-city .l { display: flex; align-items: baseline; gap: 8px; }
.cx-city .l > span:first-child { flex: 1; min-width: 0; font: 500 14px/20px var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cx-city .l .cx-delta { font: 400 12px/16px var(--font-sans); } .cx-city .l b { font: 500 14px/20px var(--font-sans); font-variant-numeric: tabular-nums; }
.cx-city.top { gap: 16px; padding-bottom: 8px; } .cx-city.top .l > span:first-child, .cx-city.top .l b { font: 500 22px/29px var(--font-sans); } .cx-city.top .l .cx-delta { font-size: 14px; }
@media (max-width: 1100px) { .cx-row { flex-direction: column; } .cx-row > .side { flex: none; width: auto; } .cx-row.trend > .grow, .cx-row.breakdown > .side { border-right: 0; border-bottom: 1px solid var(--cx-line); } .cx-cities { gap: 24px; } }
@media (max-width: 767px) { .cx-cities { flex-direction: column; align-items: stretch; min-height: 0; } .cx-bubbles { flex: none; max-width: none; height: 250px; } .cx-citylist { flex: none; } .cx-chart { height: 150px; margin-top: 12px; } .cx-note { display: none !important; } .cx-chart-svg .mk { display: none; } .cx-bar .cx-btn span { display: none; } }

/* ---------- Map ---------- */
.cx-main > #map-stage { background: var(--cx-surface); z-index: 1; }
.cx-map { position: absolute; inset: 0; display: flex; }
.cx-geo { flex: 0 0 400px; width: 400px; border-right: 1px solid var(--cx-line); background: var(--cx-surface); display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 2; }
.cx-grip { display: none; }
.cx-geo-h { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--cx-line); min-height: 75px; box-sizing: border-box; flex: none; }
.cx-geo-h b { display: block; font: 600 16px/24px var(--font-sans); } .cx-geo-h small { display: block; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); margin-top: 2px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-geo-body { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--cx-high) transparent; }
.cx-geo-body > .cx-sec { padding: 16px 24px 20px; border-bottom: 1px solid var(--cx-line); } .cx-geo-body > .cx-sec:last-child { border-bottom: 0; }
.cx-kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 0; }
.cx-kpis.two .cx-kpi { border-bottom: 1px solid var(--cx-line); gap: 6px; } .cx-kpis.two .cx-kpi::before { top: 0; bottom: 0; } .cx-kpis.two .cx-kpi:nth-child(odd)::before { display: none; }
.cx-kpis.two .cx-kpi .v { align-items: flex-end; } .cx-kpis.two .cx-kpi .vg { gap: 2px; } .cx-kpis.two .cx-kpi .d .vs, .cx-kpis.two .cx-kpi .d > span:not(.cx-delta) { display: none; }
.cx-kpis.two .cx-kpi .d { min-height: 16px; }
.cx-hint { font: 400 12px/16px var(--font-sans); color: var(--cx-variant); }
.cx-mini { display: block; width: 100%; height: 88px; } .cx-mini-ax { display: flex; justify-content: space-between; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); margin-top: -4px; }
.cx-geo .cx-legend { gap: 12px; }
.cx-mapc { flex: 1 1 0; min-width: 0; position: relative; background: var(--cx-surface); }
.cx-leaf { position: absolute; inset: 0; background: var(--cx-surface) !important; outline: 0; }
.cx-leaf .leaflet-tile-pane { opacity: .75; transition: opacity .3s; filter: grayscale(.85) contrast(.95) brightness(1.02); } .cx-leaf.street .leaflet-tile-pane { opacity: 1; }
:root[data-theme="dark"] .cx-leaf .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) grayscale(.75) brightness(.72) contrast(.92); }
.cx-dots { position: absolute; pointer-events: none; }
.cx-cl { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; background: color-mix(in srgb, var(--cx-primary) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cx-primary) 60%, transparent); display: grid; place-items: center; cursor: pointer; transition: background .15s; }
.cx-cl:hover { background: color-mix(in srgb, var(--cx-primary) 26%, transparent); }
.cx-cl b { font: 500 12px/16px var(--font-sans); color: var(--cx-on); white-space: nowrap; }
.cx-cl span { position: absolute; top: calc(100% + 2px); left: 50%; transform: translateX(-50%); font: 500 12px/16px var(--font-sans); color: var(--cx-variant); white-space: nowrap; pointer-events: none; text-shadow: 0 0 4px var(--cx-surface), 0 0 2px var(--cx-surface); }
.cx-fl { position: absolute; z-index: 800; background: var(--cx-floating); border-radius: 10px; padding: 4px; display: flex; gap: 4px; box-shadow: var(--cx-shadow-float); }
.cx-fl button { height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--cx-variant); font: 500 14px/20px var(--font-sans); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.cx-fl button:hover { color: var(--cx-on); }
.cx-layers { left: 12px; top: 12px; } .cx-layers button[aria-pressed="false"] { opacity: .45; } .cx-layers button[aria-pressed="true"] { color: var(--cx-on); }
.cx-modes { right: 12px; top: 12px; } .cx-modes button[aria-pressed="true"] { background: var(--cx-container); color: var(--cx-on); }
.cx-zoom, .cx-locate { right: 12px; flex-direction: column; gap: 2px; } .cx-zoom { bottom: 12px; } .cx-locate { bottom: 98px; }
.cx-zoom button, .cx-locate button { width: 32px; padding: 0; justify-content: center; color: var(--cx-on); } .cx-zoom button:hover, .cx-locate button:hover { background: var(--cx-container); }
:root[data-theme="dark"] .cx-fl { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
@media (max-width: 1100px) { .cx-geo { flex-basis: 340px; width: 340px; } }
@media (max-width: 767px) {
  .cx-map { display: block; } .cx-mapc { position: absolute; inset: 0; }
  .cx-geo { position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 40%; border-right: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 32px rgba(0,0,0,.4); z-index: 900; transition: height .25s cubic-bezier(.2,.7,.2,1); overflow: hidden; }
  .cx-grip { display: grid; place-items: center; height: 20px; flex: none; touch-action: none; cursor: grab; } .cx-grip i { width: 36px; height: 4px; border-radius: 2px; background: var(--cx-outline); }
  .cx-geo-h { padding: 4px 16px 12px; min-height: 0; } .cx-geo-body > .cx-sec { padding: 16px; }
  .cx-layers { left: 8px; top: 8px; right: 8px; overflow-x: auto; scrollbar-width: none; } .cx-modes { display: none; } .cx-zoom { display: none; } .cx-locate { right: 8px; bottom: calc(40% + 8px); }
}

/* ---------- Tags ---------- */
.cx-main > #tags-stage { padding: 0; overflow: hidden; }
.cx-tags { position: absolute; inset: 0; display: flex; max-width: none; margin: 0; }
.cx-tg-main { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; position: relative; }
.cx-tg-main > .cx-bar { border-bottom: 0; padding: 20px 24px 8px; min-height: 0; flex: none; } /* rows of the column keep their height: the table is what scrolls */
.cx-tg-tools { display: flex; align-items: center; gap: 12px; padding: 8px 24px 16px; border-bottom: 1px solid var(--cx-line); flex: none; }
.cx-vtabs { display: flex; gap: 2px; flex: none; }
.cx-fbar { display: flex; gap: 8px; margin-left: auto; min-width: 0; flex-wrap: nowrap; }
.cx-fall { margin-left: auto; display: none; }
.cx-fgrid { display: flex; flex-direction: column; gap: 10px; padding: 8px; width: 260px; } .cx-fgrid label { display: flex; flex-direction: column; gap: 4px; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); }
.cx-fgrid select, .cx-tg-foot select { height: 32px; border-radius: 8px; border: 0; background: var(--cx-container); color: var(--cx-on); font: 400 14px/20px var(--font-sans); padding: 0 8px; }
.cx-popover-dark .cx-fgrid select { background: var(--cx-high); }
.cx-dd .cx-pop .cx-fgrid select { background: var(--cx-high); }
.cx-tg-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--cx-high) transparent; }
.cx-table { width: 100%; border-collapse: collapse; table-layout: auto; }
.cx-table th { position: sticky; top: 0; z-index: 2; background: var(--cx-surface); text-align: left; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); padding: 10px 12px; border-bottom: 1px solid var(--cx-line); white-space: nowrap; }
.cx-table th.srt { cursor: pointer; } .cx-table th.srt:hover, .cx-table th.on { color: var(--cx-on); }
.cx-table td { padding: 10px 12px; height: 58px; box-sizing: border-box; border-bottom: 1px solid var(--cx-line); font: 400 14px/20px var(--font-sans); vertical-align: middle; white-space: nowrap; }
.cx-table th:first-child, .cx-table td:first-child { padding-left: 24px; width: 40px; } .cx-table th:last-child, .cx-table td:nth-last-child(2) { padding-right: 24px; }
.cx-table .num { text-align: right; } .cx-table .age { text-align: right; color: var(--cx-variant); font-size: 12px; } .cx-table th.age, .cx-table th.num { text-align: right; }
.cx-table tbody tr { cursor: pointer; transition: background .12s; } .cx-table tbody tr:hover { background: var(--cx-low); } .cx-table tbody tr.sk { cursor: default; background: none; }
.cx-table tr.open { background: var(--cx-container); box-shadow: inset 2px 0 0 var(--cx-primary); } .cx-table tr.sel { background: color-mix(in srgb, var(--cx-primary) 6%, transparent); }
.cx-table .c-code { font-weight: 500; } .cx-table td small { display: block; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); } .cx-table td b { font-weight: 500; display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.cx-table .c-last { display: table-cell; } .cx-table .c-last .cx-ico { display: inline-grid; vertical-align: middle; margin-right: 8px; color: var(--cx-secondary); } .cx-table .c-last .two { display: inline-block; vertical-align: middle; }
.cx-table .m-meta { display: none; }
.cx-table tbody.stale { opacity: .45; pointer-events: none; transition: opacity .15s; } /* the previous rows, while the next view loads */
.cx-tg-foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 24px; border-top: 1px solid var(--cx-line); font: 400 12px/16px var(--font-sans); color: var(--cx-variant); }
.cx-tg-foot label { display: flex; align-items: center; gap: 8px; margin-right: auto; } .cx-ibtn.sm { width: 32px; height: 32px; } .cx-ibtn[disabled] { opacity: .4; cursor: default; }
.cx-bulk { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 20; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 12px; background: var(--cx-popover); box-shadow: var(--cx-shadow); font: 500 14px/20px var(--font-sans); white-space: nowrap; }
.cx-bulk[hidden] { display: none; } .cx-bulk .cx-btn { background: var(--cx-high); } .cx-bulk .cx-dd .cx-pop { top: auto; bottom: 40px; }
.cx-a { color: var(--cx-link); text-decoration: none; font: 400 12px/16px var(--font-sans); display: inline-flex; align-items: center; gap: 4px; } .cx-a:hover { text-decoration: underline; }
/* the sticker panel */
.cx-panel { flex: 0 0 0; width: 0; overflow: hidden; background: var(--cx-surface); }
.cx-tags.has-panel .cx-panel, .cx-panel.over.open { flex: 0 0 520px; width: 520px; border-left: 1px solid var(--cx-line); }
.cx-panel.over { position: absolute; top: 0; right: 0; bottom: 0; z-index: 950; } .cx-panel.over.open { box-shadow: var(--cx-shadow); }
.cx-pn { height: 100%; display: flex; flex-direction: column; min-width: 0; width: 520px; max-width: 100vw; }
.cx-pn-h { display: flex; align-items: center; gap: 8px; padding: 20px 16px 4px 24px; flex: none; } .cx-pn-h > b { font: 600 20px/28px var(--font-sans); letter-spacing: -.02em; }
.cx-pn-sub { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 24px 20px; border-bottom: 1px solid var(--cx-line); flex: none; }
.cx-pn-sub b { display: block; font: 500 14px/20px var(--font-sans); } .cx-pn-sub small { display: block; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); margin-top: 2px; }
.cx-pn-note { display: flex; gap: 8px; align-items: center; padding: 10px 24px; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); border-bottom: 1px solid var(--cx-line); background: var(--cx-low); flex: none; } .cx-pn-note.err { color: var(--cx-error); background: var(--cx-error-container); }
.cx-pn-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--cx-line); flex: none; }
.cx-pn-stats > div { padding: 16px 24px; display: flex; flex-direction: column; gap: 2px; min-width: 0; } .cx-pn-stats > div + div { border-left: 1px solid var(--cx-line); }
.cx-pn-stats span { font: 400 13px/17px var(--font-sans); color: var(--cx-variant); } .cx-pn-stats b { font: 300 24px/32px var(--font-sans); letter-spacing: -.02em; white-space: nowrap; }
.cx-pn-acts { display: flex; gap: 8px; padding: 20px 24px 12px; flex: none; }
.cx-pn .cx-tabs { flex: none; }
.cx-pn-body { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; scrollbar-width: thin; scrollbar-color: var(--cx-high) transparent; }
.cx-pn-body .cx-h .cx-ic { color: var(--cx-secondary); }
.cx-acts { gap: 4px; } .cx-act { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.cx-act > span:nth-child(2) { flex: 1; min-width: 0; } .cx-act b { display: block; font: 500 14px/20px var(--font-sans); } .cx-act small { display: block; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cx-act time { font: 400 12px/16px var(--font-sans); color: var(--cx-variant); flex: none; }
.cx-pg-h { display: flex; justify-content: space-between; align-items: center; gap: 16px; } .cx-pg-h b { display: block; font: 500 14px/20px var(--font-sans); } .cx-pg-h small { display: block; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); } .cx-pg-h .cx-a { font-size: 14px; line-height: 20px; flex: none; }
.cx-pg { border-radius: 12px; overflow: hidden; background: var(--cx-low); } .cx-pg .pp-wrap { align-items: stretch; } .cx-pg .pp { max-width: none; width: 100%; border-radius: 0; margin: 0; }
.cx-pn-map { position: absolute; inset: 0; } .cx-pn-loc { left: 12px; top: 12px; padding: 8px 12px; align-items: center; gap: 8px; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); } .cx-pn-loc b { font: 500 14px/20px var(--font-sans); color: var(--cx-on); } .cx-pn-loc .cx-ic { color: var(--cx-secondary); }
.cx-pn-map .cx-zoom { right: 12px; bottom: 12px; }
/* narrower: the panel pushes the table to its essential columns; below 1100 it lies over the table */
.cx-tags.has-panel .cx-table .x, .cx-tags.has-panel .cx-fbar, .cx-tags.has-panel .cx-vtab.opt { display: none; } .cx-tags.has-panel .cx-fall { display: inline-flex; }
@media (max-width: 1320px) { .cx-fbar { display: none; } .cx-fall { display: inline-flex; } }
@media (max-width: 1100px) { .cx-tags.has-panel .cx-panel { position: absolute; top: 0; right: 0; bottom: 0; z-index: 30; box-shadow: var(--cx-shadow); } .cx-table .c-loc, .cx-table th:nth-child(8) { display: none; } }
@media (max-width: 767px) {
  .cx-tg-tools { padding: 8px 16px 12px; overflow-x: auto; scrollbar-width: none; } .cx-fall .cx-filter { padding: 0 10px; }
  .cx-tg-main > .cx-bar { padding: 12px 16px 8px; }
  .cx-table thead { display: none; } .cx-table, .cx-table tbody { display: block; } .cx-table td.x, .cx-table .c-chk, .cx-table .c-scans, .cx-table .c-age { display: none; }
  .cx-table tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px; border-bottom: 1px solid var(--cx-line); } .cx-table tbody tr.sk { display: block; }
  .cx-table td { height: auto; padding: 0 !important; border: 0; } .cx-table .c-code { grid-area: 1 / 1; } .cx-table .c-st { grid-area: 1 / 2; justify-self: end; }
  .cx-table .c-prod { grid-area: 2 / 1; min-width: 0; } .cx-table .c-prod b { font: 400 12px/16px var(--font-sans); color: var(--cx-variant); max-width: none; } .cx-table .c-prod small { display: none; }
  .cx-table .m-meta { display: block; grid-area: 2 / 2; justify-self: end; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); }
  .cx-tg-foot { padding: 8px 16px; } .cx-tg-foot label { display: none; } .cx-tg-foot #tg-range { margin-right: auto; }
  .cx-tags.has-panel .cx-panel, .cx-panel.over.open { position: fixed; inset: 0; width: auto; z-index: 1150; border-left: 0; } .cx-pn { width: 100%; }
  .cx-pn-h { padding: 12px 8px 4px 16px; } .cx-pn-sub { padding: 4px 16px 16px; } .cx-pn-stats > div { padding: 12px 8px 12px 12px; } .cx-pn-stats b { font-size: 20px; line-height: 26px; } .cx-pn-acts { padding: 16px 16px 8px; } .cx-pn .cx-tabs { padding: 0 16px; }
  .cx-bulk { left: 8px; right: 8px; transform: none; bottom: 56px; overflow-x: auto; } .cx-bulk .cx-btn span { display: none; }
}

/* ---------- Promo ---------- */
.cx-pr-h { border-bottom: 0; padding-bottom: 8px; align-items: flex-start; }
.cx-pr-t { min-width: 0; } .cx-pr-t h1 { flex-wrap: wrap; gap: 8px; align-items: center; } .cx-pr-t h1 .cx-chip { letter-spacing: 0; } .cx-pr-t small { display: block; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); margin-top: 4px; }
.cx-pr-h .r { gap: 16px; flex-wrap: wrap; justify-content: flex-end; } .cx-pr-btns { display: flex; gap: 8px; }
.cx-promo > .cx-tabs { padding-top: 4px; }
.cx-kpis.six .cx-kpi { padding: 24px; } .cx-kpis.six .cx-kpi .d { flex-wrap: wrap; white-space: normal; }
.cx-jrows { display: flex; flex-direction: column; gap: 16px; }
.cx-jrow { display: grid; grid-template-columns: 162px 1fr 64px 44px; align-items: center; gap: 12px; font: 400 14px/20px var(--font-sans); }
.cx-jrow > span { color: var(--cx-variant); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cx-jrow small { text-align: right; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); font-variant-numeric: tabular-nums; } .cx-jrow b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.cx-jrow .cx-track { height: 4px; }
/* scrolls sideways only: the table's outer cell spacing is pulled in by a negative margin, which would otherwise leave 4px to scroll down */
.cx-ret-wrap { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; } .cx-ret-wrap::-webkit-scrollbar { display: none; }
.cx-ret { width: 100%; border-collapse: separate; border-spacing: 4px; margin: -4px; table-layout: fixed; }
.cx-ret th { font: 400 12px/16px var(--font-sans); color: var(--cx-variant); text-align: center; padding: 4px 0 8px; } .cx-ret th:first-child { text-align: left; width: 80px; }
.cx-ret tbody th { font: 500 14px/20px var(--font-sans); color: var(--cx-on); padding: 0; white-space: nowrap; } .cx-ret .u { width: 72px; text-align: left; font: 400 12px/16px var(--font-sans); color: var(--cx-variant); }
.cx-ret td { padding: 0; height: 32px; } .cx-ret td i { display: grid; place-items: center; height: 32px; border-radius: 4px; font: 400 12px/16px var(--font-sans); font-style: normal; color: var(--cx-on); background: color-mix(in srgb, var(--cx-secondary) calc(var(--a) * 100%), var(--cx-container)); }
.cx-bots { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px 48px; }
.cx-bot { display: flex; flex-direction: column; gap: 12px; } .cx-bot-h { display: flex; align-items: center; gap: 12px; } .cx-bot-h b { flex: 1; font: 500 14px/20px var(--font-sans); }
.cx-bot-n { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .cx-bot-n b { display: block; font: 500 14px/20px var(--font-sans); font-variant-numeric: tabular-nums; } .cx-bot-n span { font: 400 12px/16px var(--font-sans); color: var(--cx-variant); }
.cx-promo .cx-tg-tools { border-bottom: 1px solid var(--cx-line); padding-top: 16px; }
@media (max-width: 767px) {
  .cx-pr-h { flex-direction: column; gap: 12px; padding-bottom: 12px; } .cx-pr-h .r { margin: 0; width: 100%; justify-content: space-between; } .cx-pr-btns .cx-btn span { display: inline; } .cx-pr-h .cx-seg { order: 2; }
  .cx-kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cx-kpis.six .cx-kpi { padding: 16px; } .cx-kpis.six .cx-kpi:nth-child(n+3) { border-top: 1px solid var(--cx-line); }
  .cx-jrow { grid-template-columns: 120px 1fr 52px 40px; gap: 8px; } .cx-bots { grid-template-columns: 1fr; } .cx-ret { min-width: 520px; }
}

/* ---------- All Products ---------- */
.cx-prods .cx-bar .r { gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.cx-prods .cx-tg-wrap { overflow: visible; }
.cx-ptable td { height: 72px; } .cx-ptable th:first-child, .cx-ptable td:first-child { width: auto; padding-left: 24px; } .cx-ptable th:last-child, .cx-ptable td:last-child { padding-right: 24px; }
.cx-pcell { display: flex; align-items: center; gap: 16px; min-width: 0; } .cx-ptable .c-prod .two { min-width: 0; display: block; } .cx-ptable .c-prod small { max-width: 520px; overflow: hidden; text-overflow: ellipsis; } .cx-ptable .c-prod b { max-width: 520px; }
.cx-pthumb { width: 44px; height: 44px; border-radius: 10px; background: var(--cx-container); display: block; position: relative; overflow: hidden; flex: none; } .cx-pthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; } .cx-pthumb .cx-av { width: 100%; height: 100%; border-radius: 0; }
.cx-ptable .c-act { white-space: nowrap; } .cx-ptable .c-act > * { vertical-align: middle; } .cx-cur { display: inline-flex; align-items: center; gap: 6px; color: var(--cx-primary); font: 500 12px/16px var(--font-sans); margin-right: 8px; }
.cx-ptable tr.arch { opacity: .6; }
@media (max-width: 767px) {
  .cx-prods .cx-bar { flex-direction: column; align-items: stretch; gap: 12px; } .cx-prods .cx-bar .r { margin: 0; justify-content: space-between; } .cx-prods .cx-search { width: 100% !important; order: 3; }
  .cx-ptable tbody tr { grid-template-columns: 1fr auto; align-items: center; } .cx-ptable td { display: none; } .cx-ptable td.c-prod { display: block; grid-area: 1 / 1; border: 0; min-width: 0; } .cx-ptable td.c-act { display: block; grid-area: 1 / 2; } .cx-ptable .c-prod b, .cx-ptable .c-prod small { max-width: 56vw; white-space: nowrap; }
  .cx-ptable .c-prod b { font: 500 14px/20px var(--font-sans); color: var(--cx-on); } .cx-ptable .c-prod small { display: block; } .cx-cur { font-size: 0; margin-right: 0; }
}

/* ---------- Sign-in ---------- */
.cx-auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; box-sizing: border-box; background: var(--cx-surface); color: var(--cx-on); font: 400 14px/20px var(--font-sans); }
.cx-auth-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
.cx-auth-logo { display: flex; justify-content: center; color: var(--cx-logo); margin-bottom: 24px; } .cx-auth-logo .logo-mark { width: 94px; height: 30px; }
.cx-auth-card h1 { font: 600 20px/28px var(--font-sans); letter-spacing: -.03em; text-align: center; margin: 0 0 8px; }
.cx-auth .field { display: flex; flex-direction: column; gap: 6px; margin: 0; } .cx-auth .field label { font: 400 13px/17px var(--font-sans); color: var(--cx-variant); }
.cx-input { height: 44px; width: 100%; box-sizing: border-box; border-radius: 8px; border: 1px solid transparent; background: var(--cx-container); color: var(--cx-on); font: 400 14px/20px var(--font-sans); padding: 0 12px; outline: 0; transition: border-color .15s; -webkit-appearance: none; appearance: none; }
.cx-input:focus { border-color: var(--cx-outline); } .cx-auth .field.invalid .cx-input { border-color: var(--cx-error); }
.cx-auth .field .error { font: 400 12px/16px var(--font-sans); color: var(--cx-error); } .cx-auth .hide { display: none; }
.cx-pass { position: relative; } .cx-pass .cx-input { padding-right: 96px; }
.cx-pass button { position: absolute; right: 4px; top: 4px; height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--cx-variant); font: 500 13px/17px var(--font-sans); cursor: pointer; } .cx-pass button:hover { color: var(--cx-on); }
.cx-auth-err { padding: 10px 12px; border-radius: 8px; background: var(--cx-error-container); color: var(--cx-error); font: 400 13px/18px var(--font-sans); }
.cx-auth-submit { height: 44px; width: 100%; margin-top: 8px; } .cx-auth-submit[disabled] { opacity: .6; color: var(--cx-on-primary); }
.cx-auth-foot { margin: 4px 0 0; text-align: center; font: 400 12px/16px var(--font-sans); color: var(--cx-muted); }
/* Phones, everywhere in the CRM: iOS Safari zooms the whole page when a field with text smaller than 16px gets
   focus, and leaves it zoomed — the screen then scrolls sideways. 16px in every field keeps the page at its width. */
@media (max-width: 767px) {
  .cx input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), .cx select, .cx textarea,
  .cx-auth input, dialog input:not([type="checkbox"]):not([type="radio"]), dialog select, dialog textarea { font-size: 16px !important; }
  html, body { overflow-x: clip; } /* nothing may push the page wider than the screen */
}
/* On a phone: the form starts near the top, so both fields and the button stay above the keyboard; controls are
   finger-sized; inputs are 16px (iOS zooms the whole page when a smaller field gets focus); the notch and the
   home indicator are respected. */
@media (max-width: 767px) {
  .cx-auth { place-items: start center; padding: calc(env(safe-area-inset-top, 0px) + clamp(40px, 9dvh, 96px)) max(20px, env(safe-area-inset-left, 0px)) calc(env(safe-area-inset-bottom, 0px) + 24px) max(20px, env(safe-area-inset-right, 0px)); }
  .cx-auth-card { max-width: 420px; gap: 18px; }
  .cx-auth-logo { margin-bottom: 20px; }
  .cx-auth-card h1 { font-size: 24px; line-height: 32px; }
  .cx-auth .field label { font-size: 14px; line-height: 20px; }
  .cx-auth .cx-input { height: 52px; padding: 0 16px; font-size: 16px; line-height: 24px; }
  .cx-auth .cx-pass .cx-input { padding-right: 112px; }
  .cx-auth .cx-pass button { top: 4px; right: 4px; height: 44px; padding: 0 12px; font-size: 14px; line-height: 20px; }
  .cx-auth .field .error, .cx-auth-err { font-size: 14px; line-height: 20px; }
  .cx-auth-submit { height: 52px; margin-top: 12px; font-size: 16px; line-height: 24px; }
  .cx-auth-foot { margin-top: 8px; font-size: 13px; line-height: 18px; }
}
/* A short screen (a small phone, a zoomed display, Safari's bars taking their share): everything tighter, so the whole
   form with its button and note still fits without scrolling down to 320 × 450. */
@media (max-width: 767px) and (max-height: 620px) {
  .cx-auth { padding-top: calc(env(safe-area-inset-top, 0px) + 24px); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); }
  .cx-auth-card { gap: 12px; }
  .cx-auth-logo { margin-bottom: 8px; } .cx-auth-logo .logo-mark { width: 82px; height: 26px; }
  .cx-auth-card h1 { font-size: 20px; line-height: 28px; margin: 0; }
  .cx-auth .field label { font-size: 13px; line-height: 17px; }
  .cx-auth .cx-input, .cx-auth-submit { height: 48px; }
  .cx-auth .cx-pass button { height: 40px; }
  .cx-auth-submit { margin-top: 4px; }
  .cx-auth-foot { margin: 0; font-size: 12px; line-height: 16px; }
}
