/* Culprit Rewards admin. Calm, Polaris-compatible chrome on the Culprit Rewards palette (DESIGN.md at the repo root).
   Variable names are kept from the first build so page modules keep working; the values are the new palette:
   ink #14141A text and primary actions, paper #FAF8F4 surfaces, signal orange #FF5B2E only for the active marker. */
:root {
  --ink: #14141A; --mid: #5C5B60; --soft: #45444A; --line: #E7E5E0; --line-2: #DAD8D3; --line-3: #CBC9C4;
  --page: #F3F1EC; --bar: #FAF8F4; --tray: #FCFBF8; --white: #fff;
  --rail: #14141A; --nav: #14141A; --nav-active: #FFFFFF;
  --signal: #FF5B2E; --signal-ink: #B83A12; --focus: #E0461B;
  --teal: #B83A12; --teal-2: #FF5B2E; --teal-dark: #1D7A45; --teal-btn: #14141A; --teal-link: #14141A; --teal-light: #FFF0EA;
  --navy-btn: #14141A; --info: #2E55C9; --info-light: #EEF2FD; --blue: #3D63DD;
  --red: #C42B1C; --red-2: #D93A2B; --red-light: #FBEAE7; --warn: #9A5B00; --warn-light: #FBF1DC; --pos-light: #EAF3EC;
  --gold: #F5B300; --star-empty: #DAD8D5; --star-navy: #14141A;
  --shadow: 0 0 0 1px rgb(20 20 26 / .07), 0 1px 2px rgb(20 20 26 / .05); --shadow-lg: 0 0 0 1px rgb(20 20 26 / .06), 0 12px 32px -12px rgb(20 20 26 / .28);
  --r: 8px; --r6: 10px;
  --font: -apple-system, BlinkMacSystemFont, "San Francisco", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--page); color: var(--ink); font: 14px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--signal-ink); text-decoration: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: var(--ink); }
.muted { color: var(--mid); }
.small { font-size: 12px; }
.b { font-weight: 600; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
.app { display: flex; min-height: 100vh; }
.rail { position: fixed; inset: 0 auto 0 0; width: 72px; background: #FFFFFF; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: stretch; z-index: 20; }
.rail-logo { height: 88px; display: flex; align-items: center; justify-content: center; }
.rail-logo svg { width: 34px; height: 34px; }
/* the logo mark is drawn in core.js with a fixed stroke; CSS outranks SVG presentation attributes */
.rail-logo svg { stroke: var(--ink); }
.rail-logo svg circle:last-child { stroke: var(--signal); }
.rail-items { display: flex; flex-direction: column; padding-left: 7px; }
.rail-item { height: 48px; margin-bottom: 1px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--mid); font-size: 10.5px; font-weight: 600; line-height: 12px; border-radius: 10px; margin-right: 7px; padding: 6px 0; position: relative; text-decoration: none !important; }
.rail-item i { font-size: 18px; line-height: 18px; }
.rail-item:hover { background: var(--page); color: var(--ink); }
.rail-item:hover::after { content: none; }
.rail-item.on { background: var(--page); color: var(--ink); }
.rail-item.on::after { content: ""; position: absolute; left: -7px; top: 12px; bottom: 12px; width: 3px; background: var(--signal); border-radius: 0 3px 3px 0; }
.rail-item.on { cursor: default; }
.rail-bottom { margin-top: auto; padding-left: 7px; position: relative; }
.rail-avatar { margin: 14px auto 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--bar); box-shadow: 0 0 0 1px var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 0; padding: 0; cursor: pointer; font: 700 14px/1 inherit; color: var(--rail); }
.user-menu { position: absolute; bottom: 16px; left: 64px; z-index: 40; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-lg, 0 2px 15px rgba(0,0,0,.15)); min-width: 150px; }
.user-menu a { display: block; padding: 12px 16px; font-size: 13px; white-space: nowrap; color: var(--ink); text-decoration: none; }
.user-menu a:first-child { border-radius: 8px 8px 0 0; } .user-menu a:last-child { border-radius: 0 0 4px 4px; }
.user-menu a:hover { background: var(--page); }
.rail-avatar img { width: 30px; height: 30px; object-fit: contain; }
.nav { position: fixed; inset: 0 auto 0 72px; width: 168px; background: var(--bar); border-right: 1px solid var(--line); color: var(--ink); padding-top: 20px; display: flex; flex-direction: column; z-index: 19; overflow-y: auto; }
.nav-group { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--mid); padding: 12px 12px 6px 19px; }
.nav-link { position: relative; display: block; color: var(--ink); font-size: 13px; line-height: 15.6px; padding: 10px 12px; margin: 1px 8px 1px 7px; border-radius: 8px; text-decoration: none !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link:hover { background: rgb(20 20 26 / .05); }
.nav-link.on { background: var(--nav-active); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(20 20 26 / .05); }
.nav-link.on::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--signal); }
.nav-gap { height: 14px; }
.nav-usage { margin: auto 10px 12px; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); border-radius: 10px; padding: 10px; font-size: 11px; line-height: 15px; }
.nav-usage .usage-link { color: var(--ink); text-decoration: none; display: block; }
.img-broken { visibility: hidden; }
.main { margin-left: 240px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.head { height: 64px; background: #fff; box-shadow: 0 1px 0 var(--line); display: flex; align-items: center; padding: 0 24px; position: sticky; top: 0; z-index: 10; }
.head h1 { font-size: 20px; font-weight: 650; letter-spacing: -.01em; line-height: 32px; margin: 0; }
.head .head-extra { margin-left: 14px; display: flex; gap: 8px; align-items: center; }
.content { padding: 24px 24px 40px; width: 100%; }
.narrow { max-width: 1210px; }
.narrow-s { max-width: 1075px; }
.content.full { max-width: none; }

/* ---------- page control bars ---------- */
.pagebar { background: var(--bar); margin: -24px -24px 0; padding: 16px 24px 0; box-shadow: 0 1px 0 var(--line); display: flex; align-items: flex-start; gap: 16px; position: relative; z-index: 5; }
.pagebar.plain { padding: 16px 24px; align-items: center; box-shadow: none; border-bottom: 1px solid var(--line); background: var(--bar); }
.pagebar .left { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pagebar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-bottom: 14px; }
.pagebar.plain .right { padding-bottom: 0; }
.subbar { background: var(--page); margin: 0 -24px; padding: 16px 24px; display: flex; align-items: center; gap: 12px; }
.subbar .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lbl-inline { font-size: 13px; font-weight: 600; margin-right: 6px; }

/* filter pill (Okendo c-popSelect) */
.pop { position: relative; display: inline-block; margin-bottom: 16px; }
.pop-btn { display: inline-flex; flex-direction: column; align-items: flex-start; background: #fff; border: 0; border-top: 2px solid transparent; border-radius: 8px 8px 0 0; padding: 8px 12px 7px; width: 150px; height: 48px; box-sizing: border-box; box-shadow: none; cursor: pointer; text-align: left; border-radius: 0; }
.pop-btn:hover { background: #fff; }
.pop.active .pop-btn, .pop.open .pop-btn { border-top-color: var(--teal-2); }
.pop-lbl { font-size: 11px; font-weight: 500; color: var(--mid); letter-spacing: 0; text-transform: none; line-height: 13px; margin-bottom: 2px; }
.pop-val { font-size: 13px; font-weight: 600; line-height: 17px; height: 17px; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.pop-menu { position: absolute; top: 100%; left: 0; min-width: 298px; background: #fff; border-radius: 0 10px 10px 10px; box-shadow: var(--shadow-lg); z-index: 30; display: none; }
.pop.open .pop-menu { display: block; }
.pop-menu-head { padding: 12px; font-size: 13px; color: var(--mid); display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.pop-menu-body { padding: 12px; max-height: 360px; overflow: auto; }
.pop-opt { display: flex; align-items: center; gap: 16px; padding: 10px 8px; font-size: 13px; font-weight: 500; cursor: pointer; border-radius: 8px; }
.pop-opt:hover { background: var(--bar); }
.pop-opt .cnt { margin-left: auto; color: var(--mid); font-weight: 400; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 1px solid #8A8890; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #fff; }
.radio.on { background: var(--ink); border-color: var(--ink); }
.radio.on::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.check { width: 18px; height: 18px; border-radius: 5px; border: 1px solid #8A8890; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #fff; }
.check.on { background: var(--ink); border-color: var(--ink); }
.check.on::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.pop-date { display: grid; gap: 8px; }
.pop-date input { height: 32px; border: 1px solid var(--line-3); border-radius: 8px; padding: 0 8px; }

/* search */
.search { position: relative; display: inline-block; }
.search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink); font-size: 16px; }
.search input { height: 32px; width: 196px; border: 1px solid var(--line-3); border-radius: 8px; background: #fff; padding: 6px 12px 6px 35px; font-size: 13px; outline: none; }
.search input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(224 70 27 / .2); }
.search.lg input { height: 36px; width: 179px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid transparent; background: var(--line); color: var(--ink); font-size: 13px; line-height: 30px; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { filter: brightness(.97); }
.btn i { font-size: 15px; }
.btn.lg { height: 36px; padding: 0 15px; font-size: 13px; }
.btn.white { background: #fff; border-color: var(--line-3); box-shadow: 0 1px 0 rgb(20 20 26 / .05); }
.btn.teal { background: var(--teal-btn); color: #FAF8F4; font-weight: 600; box-shadow: inset 0 -1px 0 rgb(0 0 0 / .3); }
.btn.navy { background: var(--navy-btn); color: #FAF8F4; font-weight: 600; box-shadow: inset 0 -1px 0 rgb(0 0 0 / .3); }
.btn.teal:hover, .btn.navy:hover { filter: none; background: #2B2B33; }
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; }
.btn.dim, .btn[disabled] { background: #E7E5E0; color: #8A8890; cursor: default; filter: none; }
.btn.sq { width: 32px; padding: 0; }
.dots { width: 28px; height: 28px; border-radius: 8px; background: var(--bar); border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--soft); }
.iconbtn { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--mid); background: transparent; border: 0; }
.iconbtn.on { background: var(--line); color: var(--ink); }

/* ---------- cards, tables ---------- */
.card { background: #fff; border-radius: 12px; box-shadow: var(--shadow); }
.card + .card { margin-top: 24px; }
.card-head { padding: 16px 20px; font-weight: 650; font-size: 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.card-head.grey { background: var(--bar); border-bottom: 0; border-radius: 12px 12px 0 0; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 20px; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; }
.tbl-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tbl th { background: var(--bar); text-align: left; font-size: 13px; font-weight: 600; padding: 12px 24px; border-bottom: 1px solid var(--line); height: 41px; white-space: nowrap; }
.tbl th.sort { cursor: pointer; }
.tbl th.sort i { font-size: 11px; margin-left: 6px; color: var(--mid); }
.tbl td { padding: 10px 24px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--mid); height: 65px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.ink { color: var(--ink); }
.tbl td .name { color: var(--teal-link); font-weight: 600; font-size: 13px; }
.tbl td .sub { font-size: 12px; color: var(--mid); }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl.compact td { height: 51px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--page); display: inline-flex; align-items: center; justify-content: center; color: #A6A4A0; flex: none; overflow: hidden; }
.avatar i { font-size: 22px; }
.who { display: flex; align-items: center; gap: 14px; }
.thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); background: var(--page); flex: none; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 16px; }
.showmore { display: flex; justify-content: center; margin: 16px 0; }

/* chips, badges, status text */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--mid); background: var(--page); border-radius: 6px; padding: 2px 8px; line-height: 19px; }
.chip.teal { background: var(--pos-light); color: #1D7A45; }
.chip.red { background: var(--red-light); color: var(--red); }
.chip.warn { background: var(--warn-light); color: var(--warn); }
.chip.info { background: var(--info-light); color: var(--info); }
.chip.ai { background: var(--info-light); color: var(--info); font-weight: 500; }
.chip.lock { background: var(--pos-light); color: var(--teal-dark); font-weight: 500; }
.pill-buyer { display: inline-block; font-size: 11px; font-weight: 600; color: #1D7A45; background: var(--pos-light); padding: 1px 8px; border-radius: 10px; border: 0; line-height: 16px; letter-spacing: 0; text-transform: none; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 12px; font-weight: 500; }
.status-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #2E9D5B; box-shadow: 0 0 0 3px #EAF3EC; }
.status-dot.off::before { background: #CBC9C4; }
.t-ok { color: #1D7A45; } .t-bad { color: var(--red); } .t-mid { color: var(--mid); }

/* segmented tabs (Products | Sentiment ...) */
.seg { display: inline-flex; background: var(--page); padding: 4px; border-radius: 10px; gap: 4px; }
.seg.bar { display: flex; background: var(--page); }
.seg-wrap { background: var(--page); border-radius: 10px; padding: 4px; display: flex; align-items: center; }
.seg button { border: 0; background: transparent; padding: 0 14px; height: 32px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--ink); }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(20 20 26 / .08); }
.seg.light button.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: var(--shadow); }
.seg .seg-more { width: 28px; color: var(--mid); }
.tabs-line { display: flex; border-bottom: 1px solid var(--line); background: #fff; }
.tabs-line button { flex: 1; border: 0; background: transparent; height: 44px; font-size: 13px; color: var(--mid); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs-line button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--teal-2); }

/* forms */
.field { margin-bottom: 18px; }
.field label, .flabel { display: block; font-size: 13px; margin-bottom: 6px; }
.help { font-size: 12px; color: var(--mid); margin-top: 2px; }
.inp, .sel, textarea.inp { height: 32px; border: 1px solid var(--line-3); border-radius: 8px; background: #fff; padding: 0 10px; font-size: 13px; width: 100%; outline: none; }
textarea.inp { height: auto; min-height: 90px; padding: 8px 10px; resize: vertical; }
.inp:focus, .sel:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgb(224 70 27 / .2); }
.inp[disabled] { background: var(--bar); color: var(--mid); }
.sel { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%2314141A'/%3E%3C/svg%3E") no-repeat right 10px center; padding-right: 28px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.setrow { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 12px 0; }
.setrow .l { flex: 1; }
.setrow .l .t { font-size: 13px; }
.setrow .ctl { flex: none; width: 287px; display: flex; justify-content: flex-end; }
.sec-title { font-size: 14px; font-weight: 650; padding: 0 0 10px; border-bottom: 1px solid var(--line); margin: 26px 0 12px; }
.toggle { width: 32px; height: 18px; border-radius: 10px; background: #CBC9C4; position: relative; cursor: pointer; flex: none; border: 0; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: left .1s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.toggle.on { background: var(--ink); }
.toggle.on::after { left: 16px; }
.togrow { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; }
.togrow .toggle { margin-top: 2px; }
.togrow .t { font-size: 13px; }

/* settings layout (left sub-menu inside a card) */
.settings { display: flex; background: #fff; border-radius: 8px; box-shadow: var(--shadow); max-width: 1075px; padding: 10px 21px 21px 10px; }
.settings-menu { width: 178px; flex: none; padding-top: 0; }
.settings-menu a { display: flex; align-items: center; gap: 14px; height: 35px; padding: 0 10px; border-radius: 8px; color: var(--ink); font-size: 13px; text-decoration: none !important; }
.settings-menu a i { font-size: 16px; width: 18px; color: var(--ink); }
.settings-menu a.on { background: var(--page); font-weight: 600; }
.settings-body { flex: 1; padding-left: 43px; padding-top: 6px; min-width: 0; }
.settings-body h2 { font-size: 18px; font-weight: 400; margin: 6px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.settings-foot { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; display: flex; justify-content: flex-end; gap: 8px; }

/* info banners */
.tip { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; display: flex; gap: 18px; align-items: flex-start; }
.tip .ic { width: 28px; height: 28px; border-radius: 8px; background: var(--info-light); color: var(--info); display: flex; align-items: center; justify-content: center; flex: none; }
.tip .t { font-size: 13px; }
.tip .s { font-size: 12px; color: var(--mid); }
.tip .x { margin-left: auto; }
.intro { background: var(--bar); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; gap: 22px; }
.intro .t { font-weight: 600; font-size: 13px; }
.intro .s { font-size: 13px; color: var(--ink); line-height: 25px; }
.alert-red { border: 1px solid var(--red); border-radius: 8px; padding: 18px; color: var(--red); display: flex; gap: 12px; }

/* list rows (displays, templates) */
.rowlist { background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.rowlist-item { display: flex; align-items: center; gap: 28px; padding: 20px 21px; border-bottom: 1px solid var(--line); cursor: pointer; }
.rowlist-item:last-child { border-bottom: 0; }
.rowlist-item .t { font-weight: 600; font-size: 13px; }
.rowlist-item .s { font-size: 13px; color: var(--ink); }
.rowlist-item .go { margin-left: auto; }
.illus { width: 107px; height: 68px; border: 1px solid var(--line-3); border-radius: 6px; background: #fff; flex: none; display: flex; align-items: center; justify-content: center; color: var(--teal); }

/* KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.kpis.k4 { grid-template-columns: repeat(4, 1fr); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; align-items: center; gap: 14px; min-height: 76px; }
.kpi .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--page); display: flex; align-items: center; justify-content: center; color: var(--soft); flex: none; }
.kpi .t { font-size: 13px; }
.kpi .v { font-size: 18px; line-height: 24px; }
.kpi .v small { font-size: 11px; color: var(--mid); margin-right: 2px; }
.kpi .spark { margin-left: auto; }
.skel { background: linear-gradient(90deg, #EFECE6 25%, #F7F5F1 50%, #EFECE6 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

/* empty state */
.empty { text-align: center; padding: 46px 20px; color: var(--mid); }
.empty .ill { font-size: 64px; color: var(--teal-2); line-height: 1; }
.empty .t { color: var(--ink); font-size: 15px; margin-top: 12px; }
.empty .s { font-size: 12px; }

/* stars */
.stars { display: inline-flex; gap: 1px; color: var(--star-empty); }
.stars i { font-size: 17px; }
.stars i.on { color: var(--gold); }
.stars.navy i.on { color: var(--star-navy); }
.stars.sm i { font-size: 13px; }

/* moderation card (Okendo c-moderationCard) */
.mod-item { display: flex; margin-bottom: 24px; }
.mod-item .mod { flex: 1; min-width: 0; margin-bottom: 0 !important; }
.mod-list .mod { display: flex; background: #fff; border-radius: 8px; box-shadow: var(--shadow); margin-bottom: 24px; position: relative; }
.mod-chk { width: 0; overflow: hidden; transition: width .1s; flex: none; }
.mod-list.multi .mod-chk { width: 60px; }
.chkbox { display: inline-flex; background: var(--line); padding: 16px 12px; border-radius: 8px; }
.tray { width: 320px; flex: none; background: var(--tray); border-right: 1px solid var(--line); padding-bottom: 32px; position: relative; }
.tray-head { display: flex; padding: 16px; gap: 16px; }
.tray-head img, .tray-head .noimg { width: 60px; height: 60px; border-radius: 8px; border: 1px solid var(--line-3); object-fit: cover; flex: none; background: var(--page); }
.tray-head .pn { font-weight: 700; color: var(--ink); font-size: 13px; line-height: 20px; }
.tray-head .pv { color: var(--mid); font-size: 13px; }
.tdiv { background: var(--page); padding: 16px 24px; font-weight: 600; text-align: center; font-size: 13px; line-height: 17px; }
.tsec { padding: 16px 16px 24px; }
.cust { display: flex; gap: 14px; align-items: center; }
.cust .avatar { width: 50px; height: 50px; }
.cust .nm { font-size: 13px; }
.cust .em { font-size: 13px; color: var(--mid); display: flex; align-items: center; gap: 4px; word-break: break-all; }
.cust .em i { color: #1D7A45; }
.recline { margin-top: 18px; font-size: 13px; color: var(--mid); display: flex; gap: 8px; align-items: center; }
.recline i.no { color: var(--red-2); } .recline i.yes { color: #1D7A45; }
.attr .k { font-weight: 600; font-size: 13px; }
.attr .v { color: var(--mid); font-size: 13px; }
.attr + .attr { margin-top: 10px; }
.addtag { font-size: 11px; font-weight: 600; color: var(--soft); letter-spacing: 0; text-transform: none; border: 1px solid var(--line-2); background: var(--bar); border-radius: 6px; padding: 2px 6px; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
.tagx { display: inline-flex; align-items: center; gap: 4px; margin: 0 4px 4px 0; }
.tray-toggle { position: absolute; right: -1px; bottom: 0; width: 21px; height: 28px; background: #fff; border: 1px solid var(--line); border-radius: 3px 0 0 0; display: flex; align-items: center; justify-content: center; color: var(--mid); cursor: pointer; }
.mod.collapsed .tray { width: 0; overflow: hidden; border: 0; }
.mod-body { flex: 1; padding: 32px; min-width: 0; }
.mod-body .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.mod-body .date { font-size: 13px; color: var(--mid); }
.mod-body .title { font-size: 20px; line-height: 32px; font-weight: 400; margin: 0 0 8px; }
.mod-body .body { color: var(--mid); font-size: 14px; line-height: 23.8px; white-space: pre-wrap; margin-top: 10px; }
.mod-body .q { margin-top: 18px; }
.mod-body .q .k { font-weight: 600; font-size: 13px; }
.mod-body .q .v { color: var(--mid); font-size: 13px; }
.bars { display: flex; gap: 48px; flex-wrap: wrap; }
.bar-attr { width: 302px; margin-top: 18px; }
.bar-attr .k { font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.bar-track { position: relative; height: 8px; display: flex; gap: 2px; align-items: center; }
.bar-track span { flex: 1; height: 3px; background: var(--line); border-radius: 6px; }
.bar-track span.fill { background: var(--blue); }
.bar-dot { position: absolute; top: 0; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); box-shadow: 0 0 0 2px #fff; transform: translateX(-50%); }
.bar-lbls { display: flex; justify-content: space-between; font-size: 12px; margin-top: 10px; }
.media-strip { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.media-strip a { width: 90px; height: 120px; border-radius: 6px; border: 1px solid var(--line-3); overflow: hidden; display: block; position: relative; background: var(--page); }
.media-strip img, .media-strip video { width: 100%; height: 100%; object-fit: cover; }
.reply-box { margin-top: 18px; border-left: 3px solid var(--line); padding: 8px 14px; background: var(--bar); font-size: 13px; }
.toolbar { width: 77px; flex: none; background: var(--bar); border-left: 1px solid var(--line); padding: 16px; display: flex; flex-direction: column; align-items: center; }
.tb-lbl { font-size: 10px; color: var(--mid); text-transform: none; line-height: 10px; letter-spacing: 0; text-align: center; }
.stbtn { width: 45px; height: 45px; background: #fff; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 20px; }
.stbtn.pub { border-radius: 8px 8px 0 0; color: #1D7A45; margin-top: 6px; }
.stbtn.rej { border-radius: 0 0 4px 4px; color: var(--red-2); border-top: 0; margin-bottom: 6px; }
.stbtn.pub.on { background: #1D7A45; color: #fff; border-color: #1D7A45; }
.stbtn.rej.on { background: var(--red-2); color: #fff; border-color: var(--red-2); }
.tb-sep { width: 40px; border-top: 1px solid var(--line); margin: 12px 0; }
.sent { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-2); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; margin: 16px 0 6px; }
.sent.neg { color: var(--red-2); } .sent.pos { color: #1D7A45; } .sent.neu { color: var(--mid); }
.tbi { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; display: flex; align-items: center; justify-content: center; color: var(--mid); cursor: pointer; margin: 8px 0 6px; }
.tbi.on { color: var(--gold); }
.mod.compact .tray { display: none; }
.mod.compact .mod-body { padding: 18px 24px; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(5,17,64,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 80px 20px; overflow: auto; }
.modal { background: #fff; border-radius: 14px; width: 560px; max-width: 100%; box-shadow: var(--shadow-lg); }
.modal-head { padding: 18px 22px; font-size: 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--mid); }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* toast */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; border-radius: 8px; padding: 10px 16px; font-size: 13px; box-shadow: var(--shadow-lg); }
.toast.err { background: var(--red); }

/* login */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--rail); }
.login form { background: #fff; padding: 32px; border-radius: 6px; width: 340px; }
.login h1 { font-size: 20px; font-weight: 400; margin: 0 0 18px; }

/* charts */
.chart { width: 100%; height: 260px; display: block; }
.legend { display: flex; gap: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.legend i.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.rating-bars .r { display: flex; align-items: center; gap: 10px; height: 32px; font-size: 13px; }
.rating-bars .track { flex: 1; height: 4px; background: var(--line); border-radius: 6px; overflow: hidden; }
.rating-bars .track i { display: block; height: 100%; background: var(--blue); }

/* label / value grid (review detail, survey detail) */
.kv { display: grid; grid-template-columns: 162px 1fr; align-items: start; padding: 22px 0 22px 21px; row-gap: 14px; }
.kv > .k { font-weight: 600; font-size: 13px; padding-top: 2px; }
.kv > .v { min-width: 0; font-size: 13px; }
.bar-mid { position: absolute; left: 50%; top: -3px; height: 14px; border-left: 1px dashed var(--blue); }
.sent.mix { color: var(--warn); }

/* moderation page extras (Okendo spec 2.x) */
.sticky-top { position: sticky; top: 64px; z-index: 8; margin: -24px -24px 0; padding: 24px 24px 0; background: var(--page); }
.sticky-top .pagebar { margin-top: -24px; }
.adv-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px; min-width: 300px; cursor: pointer; }
.adv-row.dis { opacity: .45; cursor: default; }
.yn { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.yn button { border: 0; background: #fff; font-size: 12px; padding: 3px 10px; cursor: pointer; }
.yn button.on { background: var(--nav); color: #fff; }
.batch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.batch-all { display: inline-flex; background: var(--line); border-radius: 8px; padding: 7px 12px; }
.vdiv { width: 1px; height: 32px; background: var(--line-2); margin: 0 8px; display: inline-block; }
.subbar .right .iconbtn { width: 32px; height: 32px; }
.tray-closed-only { display: none; }
.mod.collapsed .tray { width: 92px; overflow: visible; border-right: 1px solid var(--line); }
.mod.collapsed .tray .tray-open-only { display: none; }
.mod.collapsed .tray .tray-closed-only { display: block; }
.rtag { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--page); font-size: 11px; font-weight: 600; letter-spacing: 0; line-height: 20px; color: var(--soft); text-transform: none; padding: 0 6px; margin: 0 4px 4px 0; cursor: default; }
button.rtag { cursor: pointer; }
.rtag-x { border: 0; background: none; padding: 0 2px 0 0; color: var(--soft); cursor: pointer; font-size: 12px; line-height: 1; }
.rtag-x:hover { color: var(--red-2); }
.reply-block { border-top: 1px solid var(--line-2); padding-top: 24px; margin-top: 24px; font-size: 14px; }
.reply-av { width: 28px; height: 28px; border-radius: 8px; background: var(--rail); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.reply-txt { color: var(--mid); line-height: 24px; white-space: pre-wrap; }
ul.media-strip { list-style: none; padding: 0; margin: 16px 0 0; display: flex; gap: 12px; flex-wrap: wrap; }
.media-tile { position: relative; width: 90px; height: 120px; border-radius: 6px; border: 1px solid var(--line-3); overflow: hidden; background: var(--page); }
.media-tile a { display: block; width: 100%; height: 100%; cursor: pointer; }
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; }
.media-tile.is-hidden img, .media-tile.is-hidden video { opacity: .3; }
.media-tile .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; pointer-events: none; }
.media-eye { position: absolute; right: 4px; bottom: 4px; width: 26px; height: 26px; border-radius: 8px; border: 0; background: rgba(0,0,0,.5); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.queue-end { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 0 40px; color: var(--mid); }
.queue-end .qline { width: 1px; height: 80px; background: var(--line-2); }
.loader { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--teal-2); margin: 24px auto; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-mark-wrap { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; background: var(--line); border-radius: 8px; font-weight: 600; font-size: 13px; }
.status-mark { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #8A8890; }
.status-mark.approved { background: #2E9D5B; border-color: #2E9D5B; }
.status-mark.rejected { background: var(--red-2); border-color: var(--red-2); }
.tabbar { background: var(--bar); margin: 48px -24px 24px; padding: 7px 24px; }
.sent-graph { display: flex; gap: 32px; }
.sg-col { text-align: center; width: 80px; color: var(--mid); }
.sg-col.on { color: var(--ink); font-weight: 600; }
.sg-bar { height: 90px; background: var(--page); border-radius: 8px; display: flex; align-items: flex-end; overflow: hidden; }
.sg-bar i { display: block; width: 100%; background: var(--teal-2); opacity: .5; }
.timeline { padding: 12px 24px; }
.tl-row { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.tl-row[data-tl] { cursor: pointer; }
.tl-row:last-child { border-bottom: 0; }
.tl-ic { width: 28px; height: 28px; border-radius: 50%; background: var(--page); display: flex; align-items: center; justify-content: center; color: var(--soft); flex: none; }

/* review detail header card: grey label column, white values (Okendo c-definitionList--fullCard) */
.kv.fullcard { padding: 0; row-gap: 0; }
.kv.fullcard > .k { background: var(--bar); padding: 14px 21px 8px; align-self: stretch; }
.kv.fullcard > .v { padding: 14px 24px 8px; }
.kv.fullcard > .k:first-child, .kv.fullcard > .k:first-child + .v { padding-top: 24px; }
.kv.fullcard > .k:nth-last-child(2), .kv.fullcard > .v:last-child { padding-bottom: 24px; }

/* product detail (Okendo product-detail-page) */
.pd-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.pd-head .iconbtn.round { width: 36px; height: 36px; border-radius: 8px; background: var(--page); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.pd-title { font-size: 20px; font-weight: 400; line-height: 28px; margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.pd-cards { display: grid; grid-template-columns: 4fr 8fr; gap: 22px; margin-bottom: 22px; }
.pd-card { border: 1px solid var(--line); box-shadow: none; margin: 0; }
.pd-img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--page); flex: none; display: block; }
.pd-dl { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; font-size: 13px; }
.pd-dl > .b { width: 176px; flex: none; }
.pd-alert { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; font-size: 13px; margin-bottom: 14px; background: #fff; }
.pd-alert > i { color: var(--info); font-size: 18px; flex: none; background: var(--info-light); border-radius: 8px; padding: 4px; }
.pd-media { position: relative; display: inline-block; border-radius: 8px; overflow: hidden; background: var(--page); flex: none; }
.pd-media img, .pd-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-media .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 22px; }
.pd-grid .pd-media { height: 240px !important; }
.pd-tabs { display: flex; gap: 4px; background: var(--page); border-radius: 8px; padding: 7px; margin-bottom: 22px; flex-wrap: wrap; }
.pd-tabs button { border: 0; background: transparent; border-radius: 8px; padding: 8px 14px; font-size: 13px; color: var(--ink); cursor: pointer; font-family: inherit; }
.pd-tabs button.on { background: var(--nav); color: #fff; }
.pd-item { display: flex; gap: 14px; padding: 16px 21px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.pd-item:last-child { border-bottom: 0; }
.pd-clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.pd-answer { background: var(--bar); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
.pd-attrq { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pd-attrq:last-child { border-bottom: 0; }
.pd-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 10px 0 6px; max-width: 520px; }
.pd-scale span { height: 28px; background: var(--page); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--mid); }
.pd-scale.centered span.mid::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--nav); }
.pd-preview { position: relative; display: inline-block; }
.pd-preview .r2-menu-list { position: absolute; right: 0; top: calc(100% + 4px); background: #fff; box-shadow: var(--shadow-lg); border-radius: 8px; min-width: 190px; z-index: 30; display: none; padding: 4px; }
.pd-preview.open .r2-menu-list { display: block; }
.pd-preview .r2-menu-list a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; font-size: 13px; color: var(--ink); border-radius: 8px; text-decoration: none; }
.pd-preview .r2-menu-list a:hover { background: var(--page); }
.pd-preview .r2-menu-list a.dis { color: #A6A4A0; cursor: default; }
@media (max-width: 1000px) { .pd-cards { grid-template-columns: 1fr; } }
.pd-more { align-self: center; color: var(--signal-ink); cursor: pointer; font-size: 13px; }

/* Okendo "new" layout pages (Products, Summaries, Groups): header and content capped at 1400px, the rest of the window left empty */
.main.capped { max-width: 1400px; box-shadow: 1px 0 0 var(--line); }
.main.capped .content { background: #fff; min-height: calc(100vh - 64px); }
.main.capped .head { box-shadow: none; border-bottom: 1px solid var(--line); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- plan banner (over the monthly order limit) and Settings > Plan and billing / API Keys ---------- */
.plan-banner { display: flex; align-items: center; gap: 12px; margin: 16px 24px 0; padding: 12px 16px; border-radius: var(--r); background: var(--warn-light); color: var(--ink); border: 1px solid #EAD3A3; font-size: 13px; line-height: 20px; }
.plan-banner > i { color: var(--warn); font-size: 20px; flex: none; }
.plan-banner .t { flex: 1; min-width: 0; }
.plan-banner .a { display: flex; gap: 8px; flex: none; }
.bl-plan { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bl-plan .nm { font-size: 28px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.bl-tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--page); font-size: 12.5px; font-weight: 500; color: var(--ink); }
.bl-tag.sig::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }
.bl-meter { height: 8px; border-radius: 999px; background: var(--page); overflow: hidden; margin: 10px 0 6px; }
.bl-meter i { display: block; height: 100%; background: var(--ink); border-radius: 999px; }
.bl-meter.over i { background: var(--red); }
.bl-feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.bl-feats li { display: flex; gap: 8px; align-items: center; }
.bl-feats li i { font-size: 16px; color: var(--teal-dark); }
.bl-feats li.off { color: var(--mid); }
.bl-feats li.off i { color: var(--line-3); }
.bl-redeem { display: flex; gap: 8px; max-width: 480px; }
.bl-redeem .inp { flex: 1; }
.ak-row { display: flex; align-items: flex-start; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ak-row:first-child { padding-top: 0; }
.ak-row:last-child { border-bottom: 0; padding-bottom: 0; }
.ak-row .l { flex: 1; min-width: 0; }
.ak-row .nm { font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.ak-row .st { font-size: 12.5px; color: var(--mid); margin-top: 2px; }
.ak-row .ep { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--soft); margin-top: 6px; word-break: break-all; }
.ak-row .a { display: flex; gap: 8px; flex: none; }
.ak-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-3); display: inline-block; }
.ak-dot.on { background: var(--teal-dark); }
.ak-secret { display: flex; gap: 8px; }
.ak-secret .inp { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
@media (max-width: 900px) { .plan-banner { flex-direction: column; align-items: flex-start; } .bl-feats { grid-template-columns: 1fr 1fr; } .ak-row { flex-direction: column; } }
