:root {
  --bg: #F5F5F7; --card: #FFFFFF; --side: #EFEFF2; --side-line: #E2E2E7;
  --hair: #F0F0F2; --line: #E5E5EA; --fill: #E8E8ED; --fill2: #F0F0F3;
  --ink: #1D1D1F; --ink2: #3A3A3C; --muted: #6E6E73; --faint: #8E8E93; --ghost: #AEAEB2;
  --teal: #0F766E; --teal-dark: #115E59; --teal-up: #3D8F87; --teal-bg: #F0FDFA;
  --orange: #C2410C; --orange-bg: #FFF4ED; --star: #FF9F0A;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', Inter, system-ui, 'Segoe UI', sans-serif;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }

/* layout */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.side { flex: 1 1 236px; background: var(--side); border-right: 1px solid var(--side-line); padding: 20px 12px; display: flex; flex-direction: column; gap: 22px; }
.main { flex: 999 1 560px; min-width: 0; padding: 36px 44px 56px; display: flex; flex-direction: column; gap: 26px; }
@media (max-width: 760px) { .main { padding: 24px 16px 40px; } .side { border-right: 0; border-bottom: 1px solid var(--side-line); } }

/* sidebar */
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font-size: 15px; font-weight: 600; }
.logo { width: 28px; height: 28px; border-radius: 7px; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; border: 0; background: none; text-align: left; cursor: pointer; width: 100%; }
.side-item:hover { background: rgba(0,0,0,0.04); color: var(--ink); }
.side-item.on { background: #E1E1E6; font-weight: 600; }
.side-item.off { color: var(--faint); cursor: default; }
.side-item.off:hover { background: none; }
.side-item small { margin-left: auto; font-size: 11px; color: var(--faint); font-weight: 400; }
.side-group { font-size: 11px; font-weight: 600; color: var(--muted); padding: 0 10px 4px; text-transform: uppercase; letter-spacing: 0.02em; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--muted); padding: 0 10px; line-height: 1.5; }
.app-icon { flex: none; border-radius: 22%; display: grid; place-items: center; color: #fff; font-weight: 700; background: var(--ink); overflow: hidden; }
.app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* buttons */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 980px; background: var(--fill); color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; }
.pill:hover { background: #DEDEE3; color: var(--ink); }
.pill.primary { background: var(--teal); color: #fff; }
.pill.primary:hover { background: var(--teal-dark); color: #fff; }
.pill.big { min-height: 44px; padding: 0 22px; font-size: 15px; font-weight: 600; }
.pill:disabled { opacity: 0.45; cursor: not-allowed; }
.link-btn { border: 0; background: none; padding: 0; color: var(--teal); cursor: pointer; font-size: inherit; }
.link-btn:hover { color: var(--teal-dark); text-decoration: underline; }
.link-btn:disabled { color: var(--ghost); cursor: default; text-decoration: none; }
.icon-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--ghost); }
.icon-btn:hover { background: var(--fill2); color: var(--ink); }
.close-btn { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--fill2); color: var(--muted); display: grid; place-items: center; cursor: pointer; }

/* header */
.app-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.app-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.app-title h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.02em; }
.app-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.app-status { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.progress { width: 120px; height: 4px; background: var(--fill); border-radius: 999px; overflow: hidden; display: inline-block; }
.progress > span { display: block; height: 100%; background: var(--teal); transition: width .4s; }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--orange-bg); color: var(--orange); }

/* stats */
.stats { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.stat b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }
.c-teal { color: var(--teal); } .c-orange { color: var(--orange); } .c-ghost { color: var(--ghost); } .c-muted { color: var(--muted); }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { position: relative; flex: 1 1 220px; max-width: 300px; }
.search svg { position: absolute; left: 11px; top: 11px; }
.search input, .fill-select { width: 100%; height: 38px; padding: 0 12px 0 33px; border: 0; border-radius: 10px; background: var(--fill); font-size: 14px; color: var(--ink); }
.fill-select { width: auto; padding: 0 12px; }
.seg { display: inline-flex; flex-wrap: wrap; padding: 2px; border-radius: 10px; background: var(--fill); }
.seg button { height: 34px; min-width: 48px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.14); }
.seg button .n { color: var(--faint); font-weight: 400; margin-left: 4px; font-variant-numeric: tabular-nums; }
.seg.full { display: flex; } .seg.full button { flex: 1; }
.seg.small button { height: 28px; font-size: 12px; padding: 0 12px; border-radius: 6px; }

/* table */
.table-card { background: var(--card); border-radius: 18px; padding: 6px 0 10px; overflow-x: auto; }
table.kw { width: 100%; min-width: 900px; border-collapse: collapse; font-size: 14px; }
table.kw th { position: relative; color: var(--faint); font-size: 12px; font-weight: 500; text-align: left; padding: 12px 8px 10px; white-space: nowrap; }
table.kw th.r { text-align: right; }
table.kw th button { border: 0; background: none; padding: 0; color: inherit; font-size: inherit; font-weight: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
table.kw th button:hover, table.kw th button.on { color: var(--ink); }
table.kw th button.on { font-weight: 600; }
table.kw th .arr { font-size: 9px; width: 8px; }
table.kw td { position: relative; padding: 0 8px; height: 52px; border-top: 1px solid var(--hair); vertical-align: middle; }
table.kw tr:hover td { background: #FAFAFB; }
table.kw td.r { text-align: right; }
table.kw td.first, table.kw th.first { padding-left: 16px; width: 48px; }
.kw-name { font-weight: 500; }
.mkt b { font-size: 13px; font-weight: 600; cursor: default; }
.store-tag { font-size: 12px; font-weight: 500; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.cur { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cur.top { color: var(--teal); }
.cur.none { color: var(--ghost); font-weight: 500; }
.cur.stale { text-decoration: underline dotted var(--star); text-underline-offset: 4px; }
.chg { font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chg.up, .chg.new { color: var(--teal); }
.chg.down { color: var(--orange); }
.chg.flat, .chg.pending { color: var(--ghost); font-weight: 500; }
.d7 { font-size: 13px; font-variant-numeric: tabular-nums; }
.d7.up { color: var(--teal-up); } .d7.down { color: var(--orange); } .d7.flat { color: var(--ghost); }
.star { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; cursor: pointer; display: grid; place-items: center; }
.star:hover { background: var(--fill2); }
.bl-btn { white-space: nowrap; display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 6px; border: 0; background: none; padding: 6px 0; cursor: pointer; color: var(--muted); }
.bl-btn .v { font-size: 15px; font-variant-numeric: tabular-nums; }
.bl-btn .d { font-size: 11px; color: var(--faint); min-width: 40px; text-align: left; }
.bl-btn .pen { opacity: 0; transition: opacity .15s; }
.bl-btn:hover .pen, .bl-btn:focus-visible .pen { opacity: 1; }
.bl-btn.unset .v { color: var(--ghost); font-size: 13px; }
.bl-edit { display: inline-flex; align-items: center; gap: 6px; }
.bl-edit input { height: 30px; border: 1px solid #D2D2D7; border-radius: 7px; padding: 0 8px; font-size: 13px; background: #fff; }
.bl-edit input.rank { width: 52px; text-align: right; border-color: var(--teal); font-size: 14px; }
.bl-edit input.date { width: 132px; }
.bl-edit .ok { width: 30px; height: 30px; border: 0; border-radius: 7px; background: var(--teal); color: #fff; display: grid; place-items: center; cursor: pointer; }
.bl-edit .err { position: absolute; right: 8px; bottom: -2px; font-size: 11px; color: var(--orange); }
.menu { position: absolute; right: 8px; top: 44px; z-index: 30; min-width: 220px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.04); padding: 6px; display: flex; flex-direction: column; }
.menu.up { top: auto; bottom: 44px; }
.menu button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--ink); }
.menu button:hover { background: var(--fill2); }
.menu button.danger { color: var(--orange); }
.menu button:disabled { color: var(--ghost); cursor: default; background: none; }
.foot-note { font-size: 12px; color: var(--faint); }

.empty { background: var(--card); border-radius: 18px; padding: 56px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); }
.empty h2 { margin: 0; color: var(--ink); font-size: 22px; font-weight: 600; }

/* sheet + modal */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.22); z-index: 50; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 51; width: min(540px, 100%); background: #fff; border-radius: 18px 0 0 18px; box-shadow: -12px 0 40px rgba(0,0,0,0.14); display: flex; flex-direction: column; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 24px 28px 8px; }
.sheet-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.sheet-body { flex: 1; overflow-y: auto; padding: 8px 28px 24px; display: flex; flex-direction: column; gap: 22px; }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 28px 24px; border-top: 1px solid var(--hair); flex-wrap: wrap; }
.sec { display: flex; flex-direction: column; gap: 10px; }
.sec-title { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sec-title span { font-weight: 400; font-size: 12px; color: var(--muted); }
.help { font-size: 12px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea, .fill-input { min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--fill2); font-size: 14px; color: var(--ink); }
.field textarea { padding: 10px 12px; line-height: 1.5; resize: vertical; }
.found { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--teal-bg); font-size: 12px; }
.found.bad { background: var(--orange-bg); color: var(--orange); }
.found.wait { background: var(--fill2); color: var(--muted); }
.found b { display: block; font-size: 14px; color: var(--ink); }
.found .ok { margin-left: auto; color: var(--teal); font-weight: 600; white-space: nowrap; }
.app-list { display: flex; flex-direction: column; border-radius: 12px; background: #F5F5F7; padding: 4px; }
.app-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.app-opt.on { background: #fff; }
.app-opt input { accent-color: var(--teal); }
.app-opt small { display: block; font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-width: 48px; height: 34px; padding: 0 12px; border: 0; border-radius: 980px; background: var(--fill2); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.chip-more { height: 34px; border: 1px dashed #C7C7CC; border-radius: 980px; background: none; padding: 0 10px; font-size: 13px; color: var(--muted); }
.radio { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.radio input { accent-color: var(--teal); margin-top: 3px; }
.radio small { display: block; font-size: 12px; color: var(--muted); }
.notice { padding: 10px 12px; border-radius: 10px; font-size: 13px; background: var(--teal-bg); color: var(--teal-dark); }
.notice.err { background: var(--orange-bg); color: var(--orange); }
.results { border-radius: 14px; background: #F5F5F7; padding: 4px 16px 10px; }
.results table { width: 100%; border-collapse: collapse; font-size: 14px; }
.results th { color: var(--faint); font-size: 12px; font-weight: 500; text-align: right; padding: 10px 0 6px; }
.results th:first-child { text-align: left; }
.results td { padding: 9px 0; border-top: 1px solid var(--line); }
.results td.r { text-align: right; width: 64px; }
.results .grp th { text-align: left; color: var(--ink); font-size: 13px; font-weight: 600; padding: 14px 0 4px; }
.results .grp th span { color: var(--faint); font-weight: 500; margin-left: 4px; }

.modal { position: fixed; z-index: 51; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(980px, calc(100% - 32px)); max-height: 92vh; overflow: auto; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,0.2); display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 8px; }
.modal-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.modal-body { padding: 8px 24px 20px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { padding: 14px 24px 20px; border-top: 1px solid var(--hair); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border: 2px dashed #99E0D6; border-radius: 14px; background: var(--teal-bg); font-size: 13px; color: var(--ink2); text-align: center; padding: 16px; cursor: pointer; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop.over { border-color: var(--teal); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--fill2); color: var(--ink2); }
.pills span.ok { background: #CCFBF1; color: #134E4A; }
.pills span.err { background: var(--orange-bg); color: var(--orange); }
table.pre { width: 100%; border-collapse: collapse; font-size: 13px; }
table.pre th { text-align: left; font-weight: 500; color: var(--faint); font-size: 12px; padding: 8px 10px; }
table.pre td { padding: 7px 10px; border-top: 1px solid var(--hair); }
.c-ok { color: var(--teal-dark); font-weight: 500; }
.c-err { color: var(--orange); font-weight: 500; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 60; background: rgba(29,29,31,0.92); color: #fff; padding: 10px 18px; border-radius: 980px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

/* matrix view */
.mx-card { padding: 6px 0 8px; }
table.mx { border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 100%; }
table.mx th { color: var(--faint); font-size: 12px; font-weight: 500; padding: 12px 4px 10px; white-space: nowrap; background: var(--card); }
table.mx th button { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; display: inline-flex; gap: 3px; align-items: center; }
table.mx th button:hover, table.mx th button.on { color: var(--ink); }
table.mx th button.on { font-weight: 600; }
table.mx th .arr { font-size: 9px; width: 8px; }
table.mx th.mx-m { text-align: center; min-width: 68px; font-size: 13px; }
table.mx .mx-kw { position: sticky; left: 0; z-index: 2; background: var(--card); text-align: left; padding-left: 20px; padding-right: 12px; width: 150px; min-width: 150px; max-width: 150px; box-sizing: border-box; white-space: normal; }
table.mx tbody th.mx-kw { color: var(--ink); font-size: 14px; font-weight: 500; vertical-align: middle; border-top: 1px solid var(--line); }
table.mx .mx-st { position: sticky; left: 150px; z-index: 2; background: var(--card); padding: 0 8px; width: 40px; }
table.mx td { padding: 3px; border-top: 1px solid var(--hair); vertical-align: middle; }
table.mx tr:first-child td, table.mx tbody tr:first-child th { border-top: 1px solid var(--line); }
table.mx tr.grp-end + tr td { border-top: 1px solid var(--line); }
.mx-cell { position: relative; width: 100%; min-width: 62px; height: 42px; border: 0; border-radius: 8px; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; cursor: pointer; color: var(--ink); font: inherit; padding: 0 4px; }
.mx-cell b { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mx-cell i { font-style: normal; font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--faint); white-space: nowrap; }
.mx-cell .up { color: var(--teal); } .mx-cell .down { color: var(--orange); } .mx-cell .flat { color: var(--ghost); }
.mx-cell.t1 { background: #E3F4F1; } .mx-cell.t1 b { color: var(--teal-dark); }
.mx-cell.t2 { background: var(--fill2); }
.mx-cell.none b { color: var(--ghost); font-weight: 500; }
.mx-cell:hover, .mx-cell.open { box-shadow: inset 0 0 0 1.5px var(--teal); }
.mx-cell.dim { opacity: 0.3; }
.mx-cell.stale b { text-decoration: underline dotted var(--star); text-underline-offset: 3px; }
.mx-cell.na { cursor: default; border: 1px dashed var(--line); background: none; box-shadow: none; height: 42px; }
.mx-star { position: absolute; top: 2px; right: 4px; font-size: 9px; color: var(--star); }
.mx-pop { position: fixed; z-index: 40; width: 260px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.16), 0 0 0 1px rgba(0,0,0,0.04); padding: 12px 6px 6px; }
.mx-pop-head { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 2px; }
.mx-pop-head b { font-size: 14px; } .mx-pop-head span { font-size: 12px; color: var(--muted); }
.mx-pop-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0; padding: 0 8px 8px; }
.mx-pop-stats dt { font-size: 11px; color: var(--faint); } .mx-pop-stats dd { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.mx-pop-stats .chg { font-size: 14px; }
.mx-pop-trend { padding: 4px 8px 10px; border-bottom: 1px solid var(--hair); margin-bottom: 4px; }
.menu-items { display: flex; flex-direction: column; }
.mx-pop .menu-items button { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--ink); }
.mx-pop .menu-items button:hover { background: var(--fill2); }
.mx-pop .menu-items button.danger { color: var(--orange); }
.mx-pop .menu-items button:disabled { color: var(--ghost); cursor: default; background: none; }
.view-seg svg { margin-right: 4px; vertical-align: -2px; }
.mx-cell.vs-win { background: #E3F4F1; } .mx-cell.vs-win b { color: var(--teal-dark); }
.mx-cell.vs-lose { background: var(--orange-bg); } .mx-cell.vs-lose b { color: var(--orange); }
.vs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.vs-bar label { display: inline-flex; align-items: center; gap: 8px; }
.vs-bar .fill-select { height: 34px; }
.vs-score b { font-variant-numeric: tabular-nums; }
.vs-hint { font-size: 12px; color: var(--faint); }
.mx-pop-vs { padding: 0 8px 8px; font-size: 12px; color: var(--muted); } .mx-pop-vs b { color: var(--ink); }
.mx-pop-top { list-style: none; margin: 0; padding: 6px 8px 8px; border-top: 1px solid var(--hair); display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink2); }
.mx-pop-top li { display: flex; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-pop-top li span { width: 16px; text-align: right; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.mx-pop-top li.self { color: var(--teal-dark); font-weight: 600; }

/* client website settings */
.web-card { background: var(--card); border-radius: 18px; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; overflow-x: auto; }
.web-card h2 { margin: 0; font-size: 17px; font-weight: 600; }
.web-card .help { margin: 0; line-height: 1.5; }
.web-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: flex-start; }
.web-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.web-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.web-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.web-link code { font-size: 12px; background: var(--fill2); padding: 4px 8px; border-radius: 6px; word-break: break-all; }
.web-link code.pw { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; color: var(--teal-dark); background: var(--teal-bg); }
.web-clients td { vertical-align: middle; }
.pw-in { min-height: 30px !important; width: 210px; font-size: 12px !important; }
.web-status { margin-top: 8px; }

/* competitors view */
.cp-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cp-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-pick .chip { font-weight: 500; }
table.cp { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.cp th, table.cp td { padding: 0 10px; height: 46px; border-top: 1px solid var(--hair); text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.cp thead th { border-top: 0; height: auto; padding: 12px 10px 10px; color: var(--faint); font-size: 12px; font-weight: 500; vertical-align: bottom; }
table.cp th button { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; display: inline-flex; gap: 3px; align-items: flex-end; }
table.cp th button:hover, table.cp th button.on { color: var(--ink); }
table.cp th button.on { font-weight: 600; }
table.cp .arr { font-size: 9px; width: 8px; }
.cp-name { max-width: 110px; white-space: normal; line-height: 1.25; text-align: center; }
table.cp .cp-kw { position: sticky; left: 0; z-index: 1; background: var(--card); text-align: left; padding-left: 20px; font-weight: 500; color: var(--ink); min-width: 150px; white-space: normal; }
table.cp thead .cp-kw { color: var(--faint); }
table.cp td b { font-weight: 600; font-size: 15px; }
table.cp td i { font-style: normal; font-size: 11px; margin-left: 4px; }
table.cp td i.up { color: var(--teal); } table.cp td i.down { color: var(--orange); }
table.cp .cp-own { background: #F4FAF9; }
table.cp thead .cp-own { color: var(--teal-dark); }
table.cp td.lead b { color: var(--teal-dark); background: #DDF2EE; border-radius: 6px; padding: 3px 8px; }
table.cp tfoot th, table.cp tfoot td { border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); height: 38px; }
table.cp tfoot th { font-weight: 500; }

/* viewer-only additions on top of app/globals.css */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(400px, 100%); background: var(--card); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.login .brand { padding: 0; }
.login h1 { margin: 6px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.login p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.login .pill { width: 100%; }
.bl-ro { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; display: inline-flex; gap: 6px; align-items: baseline; }
.bl-ro small { font-size: 11px; color: var(--faint); min-width: 40px; text-align: left; }
table.kw.ro { min-width: 760px; }
.prospect { max-width: 1200px; margin: 0 auto; padding: 36px 24px 56px; display: flex; flex-direction: column; gap: 24px; }
.cta { background: var(--teal-bg); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--teal-dark); }
@media (max-width: 760px) { .prospect { padding: 24px 16px 40px; } }
