/* Raptom — режим обзвону. Нейтральний робочий інтерфейс; фірмовий жовтий лише як акцент. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/inter-cyrillic-ext-n-0.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/inter-cyrillic-n-1.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/inter-latin-n-2.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; }

:root {
  --bg: #F3F4F6; --surface: #FFFFFF; --subtle: #F9FAFB; --hover: #F3F4F6;
  --border: #E5E7EB; --border-2: #D1D5DB;
  --text: #111827; --text-2: #4B5563; --text-3: #6B7280; --text-4: #9CA3AF;
  --brand: #FFDF3A; --brand-ink: #15161A;
  --green: #15803D; --green-500: #16A34A; --green-50: #F0FDF4; --green-100: #DCFCE7;
  --blue: #1D4ED8; --blue-50: #EFF6FF; --blue-100: #DBEAFE;
  --amber: #B45309; --amber-50: #FFFBEB; --amber-100: #FEF3C7;
  --red: #B91C1C; --red-50: #FEF2F2; --red-100: #FEE2E2;
  --r-lg: 12px; --r: 8px; --r-sm: 6px;
  --sh-1: 0 1px 2px rgba(16,24,40,.05);
  --sh-2: 0 4px 12px rgba(16,24,40,.08), 0 1px 3px rgba(16,24,40,.06);
  --sh-3: 0 12px 32px rgba(16,24,40,.16);
  --top-h: 60px;
  --font: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 14px/1.5 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
b, strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.i { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.i-sm { width: 14px; height: 14px; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; font: 500 11px/1 var(--font); color: var(--text-3); background: var(--surface); border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 5px; }
body.busy .outcomes, body.busy .sheet { opacity: .55; pointer-events: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: var(--r); border: 1px solid transparent; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-secondary { background: var(--surface); border-color: var(--border-2); color: var(--text); box-shadow: var(--sh-1); }
.btn-secondary:hover { background: var(--subtle); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-success { background: var(--green-500); color: #fff; }
.btn-success:hover { background: var(--green); }
.btn kbd { margin-left: auto; background: transparent; color: inherit; opacity: .6; border-color: currentColor; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r); border: 0; background: transparent; color: var(--text-3); text-decoration: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn-line { border: 1px solid var(--border); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; height: var(--top-h); padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 17px; line-height: 1; }
.brand-sep { color: var(--border-2); }
.brand-app { color: var(--text-3); font-weight: 500; }
.metrics { display: flex; align-items: stretch; margin: 0 auto 0 12px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--subtle); }
.metric { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 6px 16px; border-left: 1px solid var(--border); min-width: 88px; }
.metric:first-child { border-left: 0; }
.metric dt { font-size: 11px; color: var(--text-3); font-weight: 500; }
.metric dd { margin: 0; display: flex; align-items: baseline; gap: 4px; font-variant-numeric: tabular-nums; }
.metric b { font-size: 16px; font-weight: 600; }
.metric .of { color: var(--text-4); font-size: 12px; }
.metric .pos { color: var(--green); }
.metric-goal { min-width: 130px; padding-bottom: 9px; }
.meter { position: absolute; left: 16px; right: 16px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--text); border-radius: 3px; transition: width .4s; }
.metric-goal.done .meter i { background: var(--green-500); }
.top-right { display: flex; align-items: center; gap: 6px; }
.user { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 8px; margin-left: 4px; border-left: 1px solid var(--border); }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: #fff; font-size: 12px; font-weight: 600; }
.user-name { font-weight: 600; }

.banner { max-width: 1640px; margin: 12px auto 0; padding: 10px 14px; border: 1px solid #FCD34D; background: var(--amber-50); color: var(--amber); border-radius: var(--r); font-size: 13px; }

/* ---------- layout ---------- */
.desk { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(300px, 340px); grid-template-areas: "lead script result"; gap: 16px; max-width: 1640px; margin: 0 auto; padding: 16px 20px 40px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); min-width: 0; }
.lead { grid-area: lead; } .script { grid-area: script; overflow: hidden; } .result { grid-area: result; }
@media (min-width: 1101px) {
  .lead, .result { position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 32px); overflow: auto; scrollbar-width: thin; }
}
@media (max-width: 1100px) { .desk { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "lead result" "script script"; } }
@media (max-width: 760px) { .desk { grid-template-columns: 1fr; grid-template-areas: "lead" "result" "script"; padding: 10px 10px 80px; gap: 10px; } }

.panel-head { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-aside { margin-left: auto; font-size: 12px; color: var(--text-3); }
.panel-body { padding: 16px; }
.panel-sub { padding: 14px 16px 16px; border-top: 1px solid var(--border); }
.sub-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.sub-note { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-4); }
.panel-sub-details > summary { list-style: none; cursor: pointer; margin: 0; }
.panel-sub-details > summary::-webkit-details-marker { display: none; }
.panel-sub-details[open] > summary { margin-bottom: 10px; }
.panel-sub-details[open] > summary .i { transform: rotate(180deg); }

/* badges */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--green-50); color: var(--green); border: 1px solid var(--green-100); white-space: nowrap; }
.badge.st-2 { background: var(--amber-50); color: var(--amber); border-color: var(--amber-100); }
.badge.st-3 { background: var(--blue-50); color: var(--blue); border-color: var(--blue-100); }
.badge-dark { background: var(--text); color: #fff; border-color: var(--text); }

/* ---------- lead ---------- */
.ident { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.ident-av { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--text); color: var(--brand); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.ident-text { min-width: 0; }
.c-name { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
.c-meta { display: flex; align-items: center; gap: 4px; margin: 3px 0 0; color: var(--text-3); font-size: 13px; }
.attrs { display: grid; grid-template-columns: auto 1fr; gap: 0; margin: 0 0 14px; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.attrs dt, .attrs dd { margin: 0; padding: 7px 12px; border-top: 1px solid var(--border); font-size: 13px; }
.attrs dt { color: var(--text-3); background: var(--subtle); white-space: nowrap; }
.attrs dd { font-weight: 500; font-variant-numeric: tabular-nums; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attrs dt:nth-of-type(1), .attrs dd:nth-of-type(1) { border-top: 0; }
.attrs .star { color: #D97706; }
.attrs .neg { color: var(--red); }
.attrs .muted { color: var(--text-4); font-weight: 400; }
.score { display: inline-flex; align-items: center; gap: 8px; }
.score-bar { width: 60px; height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--text); }
.insight { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 10px 12px; border-radius: var(--r); background: var(--blue-50); color: var(--blue); }
.insight p { margin: 0; font-size: 13px; color: #1E3A8A; }

.callbox { padding: 12px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--subtle); margin-bottom: 14px; }
.callbox.live { border-color: #86EFAC; background: var(--green-50); }
.phone-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.phone-num { font-size: 20px; font-weight: 600; letter-spacing: .01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.btn-call { width: 100%; height: 44px; background: var(--green-500); color: #fff; font-size: 15px; box-shadow: 0 1px 2px rgba(22,163,74,.3); }
.btn-call:hover { background: var(--green); }
.btn-call kbd { color: #fff; }
.btn-call.disabled { opacity: .4; pointer-events: none; }
.callbox.live .btn-call { background: var(--surface); color: var(--green); border-color: #86EFAC; box-shadow: none; }
.callbox.live .btn-call kbd { color: var(--green); }
.msg-wrap { margin-top: 8px; }
.msg-wrap .btn kbd { color: var(--text-3); border-color: var(--border-2); opacity: 1; }
.msg-pop { margin-top: 8px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-2); }
.msg-text { white-space: pre-wrap; font-size: 13px; background: var(--subtle); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px; margin: 10px 0; color: var(--text-2); }
.msg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: var(--r); border: 1px solid var(--border-2); background: var(--surface); font-size: 13px; font-weight: 600; text-decoration: none; }
.mbtn:hover { background: var(--subtle); }
.mbtn-viber .i { color: #7360F2; } .mbtn-tg .i { color: #229ED9; } .mbtn-wa .i { color: #25D366; } .mbtn-copy .i { color: var(--text-3); }
.hint { font-size: 12px; color: var(--text-4); margin: 8px 0 0; }
.links { display: flex; flex-direction: column; gap: 2px; }
.lnk { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-sm); text-decoration: none; color: var(--text-2); font-size: 13px; }
.lnk:hover { background: var(--hover); color: var(--text); }
.lnk .i { color: var(--text-4); }
.lnk .ext { margin-left: auto; width: 14px; height: 14px; opacity: 0; }
.lnk:hover .ext { opacity: .6; }
.lnk-hot { color: var(--text); font-weight: 600; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 20px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--border-2); }
.timeline li::after { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline li:first-child::before { background: var(--text); }
.timeline time { display: block; font-size: 11px; color: var(--text-4); font-weight: 500; }
.timeline p { margin: 1px 0 0; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.inline-link { color: var(--blue); text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

/* ---------- script ---------- */
.panel-head-tabs { padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.tabs { display: flex; gap: 2px; height: 48px; align-items: stretch; }
.tab { position: relative; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 0; background: none; color: var(--text-3); font-weight: 500; font-size: 13px; white-space: nowrap; }
.tab i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-2); font-style: normal; font-size: 11px; font-weight: 600; }
.tab:hover { color: var(--text); }
.tab.past { color: var(--text-2); }
.tab.past i { background: var(--text); border-color: var(--text); color: #fff; }
.tab.on { color: var(--text); font-weight: 600; }
.tab.on i { background: var(--brand); border-color: #E6C200; color: var(--brand-ink); }
.tab.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--text); border-radius: 2px; }
.stage { padding: 20px 24px 8px; }
.stage-title { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.stage-goal { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0 18px; font-size: 13px; color: var(--text-3); }
.stage-goal .i { margin-top: 2px; color: var(--text-4); }
.block-label { display: block; margin: 0 0 6px; font-size: 11px; font-weight: 600; color: var(--text-4); text-transform: uppercase; letter-spacing: .06em; }
.say { margin: 0 0 10px; padding: 12px 16px; font-size: 16px; line-height: 1.6; color: var(--text); background: var(--subtle); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: var(--r); }
.ask { margin: 0 0 10px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r); }
.ask-q { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.tag-row, .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags { margin: 0 0 8px; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid var(--border-2); background: var(--surface); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.tag:hover { border-color: var(--text-3); color: var(--text); }
.tag.on { background: var(--text); border-color: var(--text); color: #fff; }
.tag .i { width: 12px; height: 12px; }
.stage-tip { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; padding: 10px 12px; border-radius: var(--r); background: var(--green-50); color: var(--green); font-size: 13px; font-weight: 500; }
.branches { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 14px; }
.branch { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 14px; border-radius: var(--r); border: 1px solid var(--border-2); background: var(--surface); font-weight: 600; box-shadow: var(--sh-1); }
.branch:hover { border-color: var(--text); }
.branch .i { color: var(--text-3); }
.objections { padding: 14px 24px 20px; border-top: 1px solid var(--border); background: var(--subtle); }
.obj-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.obj-chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--text-2); }
.obj-chip:hover { border-color: var(--text-3); color: var(--text); }
.obj-chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.obj-card { scroll-margin-top: calc(var(--top-h) + 12px); margin: 16px 24px 0; border: 1px solid var(--border-2); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-2); overflow: hidden; }
.obj-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: 1px solid var(--border); background: var(--subtle); font-weight: 600; }
.obj-head .i { color: var(--text-4); }
.obj-head .icon-btn { margin-left: auto; }
.laer { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); align-items: baseline; }
.obj-head + .laer { border-top: 0; }
.laer span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-4); }
.laer p { margin: 0; font-size: 15px; line-height: 1.55; }
.laer-say { background: var(--subtle); }
.laer-say p { font-weight: 500; }
@media (max-width: 760px) { .stage { padding: 16px; } .objections { padding: 14px 16px; } .obj-card { margin: 12px 16px 0; } .say { font-size: 15px; } .laer { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- result ---------- */
.live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--green-50); color: var(--green); font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; border: 1px solid var(--green-100); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.field-label { display: flex; align-items: center; justify-content: space-between; margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.input { width: 100%; padding: 8px 10px; border: 1px solid var(--border-2); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); }
.input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
textarea.input { resize: vertical; min-height: 72px; display: block; margin-bottom: 14px; }
.outcomes { display: flex; flex-direction: column; gap: 6px; }
.o { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 8px 10px; text-align: left; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); transition: border-color .12s, background .12s; }
.o:hover { border-color: var(--border-2); background: var(--subtle); }
.o-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; flex: none; background: var(--hover); color: var(--text-3); }
.o-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.o-text b { font-size: 14px; font-weight: 600; }
.o-text small { font-size: 12px; color: var(--text-3); }
.o kbd { flex: none; }
.o-no .o-ico { background: var(--amber-50); color: var(--amber); }
.o-cb .o-ico { background: var(--blue-50); color: var(--blue); }
.o-yes { border-color: #86EFAC; background: var(--green-50); }
.o-yes:hover { border-color: var(--green-500); background: var(--green-100); }
.o-yes .o-ico { background: var(--green-500); color: #fff; }
.o-yes b { color: var(--green); }
.o-ref .o-ico { background: var(--red-50); color: var(--red); }
.o-wrong .o-ico, .o-skip .o-ico { background: var(--hover); color: var(--text-4); }
.o-skip { border-style: dashed; }
.o-wrong b, .o-skip b { font-weight: 500; color: var(--text-2); }
@media (max-width: 1100px) and (min-width: 761px) { .outcomes { display: grid; grid-template-columns: 1fr 1fr; } }

.sheet { scroll-margin-top: calc(var(--top-h) + 12px); border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: 12px 14px 14px; box-shadow: var(--sh-2); background: var(--surface); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.sheet-title { margin: 0; font-size: 15px; font-weight: 600; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.choice-grid .btn { height: 38px; }
.choice-list { display: flex; flex-direction: column; gap: 6px; }
.choice { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); font-weight: 500; text-align: left; }
.choice:hover { border-color: var(--red); background: var(--red-50); color: var(--red); }
.custom-time { display: flex; gap: 6px; }
.custom-time .input { flex: 1; min-width: 0; }
.field { display: block; margin-bottom: 12px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { height: 30px; padding: 0 11px; border: 1px solid var(--border-2); background: var(--surface); border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.seg button:hover { border-color: var(--text-3); color: var(--text); }
.seg button.on { background: var(--text); border-color: var(--text); color: #fff; }
.sheet .btn-success { height: 40px; margin-top: 4px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--border); font-size: 13px; }
.list li:first-child { border-top: 0; padding-top: 0; }
.list .when { flex: none; min-width: 92px; font-weight: 600; font-variant-numeric: tabular-nums; }
.list .what { min-width: 0; color: var(--text-2); }
.list .what small { display: block; color: var(--text-4); }
.list .muted { color: var(--text-4); }

/* ---------- empty / toast / modal ---------- */
.empty { max-width: 480px; margin: 64px auto; padding: 32px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.empty-ico { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--hover); color: var(--text-3); }
.empty-ico .i { width: 24px; height: 24px; }
.empty-title { margin: 14px 0 4px; font-size: 18px; font-weight: 700; }
.empty-text { margin: 0 0 20px; color: var(--text-3); }
.empty .list { text-align: left; }
.empty .sub-title { justify-content: center; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 24px); padding: 10px 10px 10px 16px; border-radius: 10px; background: var(--text); color: #fff; box-shadow: var(--sh-3); font-size: 13px; font-weight: 500; }
.toast-err { background: var(--red); }
.toast-text { min-width: 0; }
.toast-undo { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; font-weight: 600; white-space: nowrap; }
.toast-undo:hover { background: rgba(255,255,255,.16); }
.toast-undo kbd { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(17,24,39,.4); }
.modal-box { width: min(420px, 100%); padding: 16px 20px 20px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-3); }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0; align-items: center; }
.keys dt { white-space: nowrap; color: var(--text-4); }
.keys dd { margin: 0; color: var(--text-2); }

/* ---------- responsive header ---------- */
@media (max-width: 1280px) { .metric-time { display: none; } .brand-sep, .brand-app { display: none; } }
@media (max-width: 960px) { .user-name { display: none; } }
@media (max-width: 760px) {
  .top { position: static; height: auto; flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .metrics { order: 3; flex: 1 1 100%; margin: 0; overflow-x: auto; }
  .metric { min-width: 0; flex: 1; padding: 6px 10px; }
  .metric-goal { min-width: 100px; }
  .meter { left: 10px; right: 10px; }
  .top-right { margin-left: auto; }
  #help-btn, kbd { display: none; }
  .phone-num { font-size: 18px; }
}

/* ---------- login ---------- */
body.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-box { max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: 28px; }
.login-box .brand { margin: 0; }
.login-box h1 { font-size: 18px; margin: 18px 0 6px; }
.login-box p { color: var(--text-3); margin: 0; }

/* ---------- laptops: keep all six script tabs visible ---------- */
@media (max-width: 1440px) and (min-width: 1101px) {
  .desk { grid-template-columns: minmax(280px, 320px) minmax(0, 1fr) minmax(280px, 300px); gap: 14px; padding-left: 16px; padding-right: 16px; }
  .tab { padding: 0 6px; gap: 5px; }
  .stage { padding: 18px 20px 8px; }
  .objections { padding: 14px 20px 18px; }
  .obj-card { margin: 14px 20px 0; }
}
@media (max-width: 760px) {
  .panel-head-tabs { padding: 6px 8px; }
  .tabs { flex-wrap: wrap; height: auto; row-gap: 2px; }
  .tab { height: 34px; padding: 0 8px; border-radius: 8px; }
  .tab.on { background: var(--hover); }
  .tab.on::after { display: none; }
}

/* ================= app navigation ================= */
.appnav { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--subtle); }
.appnav a { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 7px; text-decoration: none; color: var(--text-3); font-weight: 500; font-size: 13px; white-space: nowrap; }
.appnav a:hover { color: var(--text); }
.appnav a.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); font-weight: 600; }
.badge-gray { background: var(--hover); color: var(--text-3); border-color: var(--border); }
body.noscroll { overflow: hidden; }

/* ================= catalog ================= */
.page-catalog .top-right { margin-left: auto; }
.cat { max-width: 1440px; margin: 0 auto; padding: 24px 20px 60px; }
.cat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.cat-sub { margin: 4px 0 0; color: var(--text-3); }
.cat-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 12px; width: 340px; max-width: 100%; border: 1px solid var(--border-2); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-1); color: var(--text-4); }
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.seg-filter { padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--subtle); }
.seg-filter button { border: 0; background: transparent; height: 30px; border-radius: 7px; color: var(--text-3); }
.seg-filter button.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); font-weight: 600; }
.howto { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 0 0 20px; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); font-size: 13px; color: var(--text-3); }
.howto b { color: var(--text); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.cat-empty { text-align: center; color: var(--text-3); padding: 40px; }

.tcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); overflow: hidden; transition: box-shadow .15s, border-color .15s, transform .15s; }
.tcard:hover { box-shadow: var(--sh-2); border-color: var(--border-2); transform: translateY(-1px); }
.thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; border-bottom: 1px solid var(--border); background: var(--hover); overflow: hidden; cursor: pointer; }
.thumb > img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.thumb-phone { position: absolute; right: 12px; bottom: -28px; width: 74px; aspect-ratio: 390 / 844; padding: 3px; border-radius: 14px; background: #111827; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.thumb-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 11px; display: block; }
.thumb-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-4); font-size: 13px; background: repeating-linear-gradient(45deg, var(--subtle), var(--subtle) 10px, #F1F2F4 10px, #F1F2F4 20px); }
.thumb-empty .i { width: 32px; height: 32px; }
.thumb-badge { position: absolute; left: 10px; top: 10px; box-shadow: var(--sh-1); }
.tcard-preview .thumb > img, .tcard-preview .thumb-phone img { filter: saturate(.85); }
.tcard-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 14px; flex: 1; }
.tcard-head { display: flex; gap: 10px; align-items: center; }
.tcard-ico, .d-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--subtle); border: 1px solid var(--border); color: var(--text-2); flex: none; }
.tcard-title { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.tcard-sub { margin: 1px 0 0; font-size: 12px; color: var(--text-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-i { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--subtle); border: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--text-2); }
.chip-i .i { color: var(--text-3); }
.tcard-meta { margin: 0; font-size: 12px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.tcard-actions { display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 4px; }
.tcard-actions .btn-secondary { margin-right: auto; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 70; }
.drawer-back { position: absolute; inset: 0; background: rgba(17,24,39,.45); }
.drawer-box { position: absolute; top: 0; right: 0; bottom: 0; width: min(1180px, 100%); display: flex; flex-direction: column; background: var(--bg); box-shadow: var(--sh-3); }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.d-headtext { min-width: 0; flex: 1; }
.d-headtext h2 { margin: 0; font-size: 17px; font-weight: 700; }
.d-headtext p { margin: 0; font-size: 12px; color: var(--text-3); }
.drawer-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.viewer { display: flex; flex-direction: column; min-height: 0; padding: 12px 16px 16px; }
.viewer-bar { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.viewer-bar .seg { padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.viewer-bar .seg button { border: 0; height: 28px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); background: transparent; }
.viewer-bar .seg button.on { background: var(--text); color: #fff; }
.stagewrap { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-lg); background: #E8EAEE; border: 1px solid var(--border); }
.device { position: relative; overflow: hidden; }
.device iframe { border: 0; display: block; transform-origin: 0 0; background: #fff; }
.device-mobile { padding: 8px; border-radius: 36px; background: #111827; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.device-mobile iframe { border-radius: 28px; }
.device-desktop { align-self: start; justify-self: center; background: #fff; }
.noexample { max-width: 360px; text-align: center; color: var(--text-3); }
.noexample p { margin: 12px 0 0; }
.noexample b { color: var(--text); }
.info { overflow: auto; padding: 16px 20px 32px; background: var(--surface); border-left: 1px solid var(--border); }
.info .sub-title { margin-top: 22px; }
.d-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.d-actions .btn-primary { flex: 1 1 100%; height: 40px; }
.warnline { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r); background: var(--amber-50); color: var(--amber); font-size: 13px; border: 1px solid var(--amber-100); }
.warnline .i { margin-top: 2px; }
.d-hero { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.d-lead { margin: 6px 0 0; color: var(--text-2); }
.d-text { margin: 0 0 8px; color: var(--text-2); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.checks .i { color: var(--green-500); margin-top: 3px; }
.secs { margin: 0; padding: 0 0 0 22px; display: grid; gap: 4px; color: var(--text-2); font-size: 13px; }
.secs li::marker { color: var(--text-4); font-variant-numeric: tabular-nums; }
.prices { width: 100%; border-collapse: collapse; font-size: 13px; }
.prices td { padding: 6px 0; border-top: 1px solid var(--border); }
.prices tr:first-child td { border-top: 0; }
.prices .num { text-align: right; white-space: nowrap; font-weight: 500; font-variant-numeric: tabular-nums; padding-left: 12px; }
.prices .more td { color: var(--text-4); }
.d-price { margin: 0; font-weight: 500; }

@media (max-width: 1100px) { .drawer-body { grid-template-columns: 1fr; overflow: auto; } .viewer { min-height: 620px; } .info { border-left: 0; border-top: 1px solid var(--border); overflow: visible; } }
@media (max-width: 760px) {
  .howto { grid-template-columns: 1fr; }
  .search { width: 100%; }
  .cat-tools { width: 100%; }
  .appnav a { padding: 0 9px; }
  .page-catalog .user { display: none; }
  .grid { grid-template-columns: 1fr; }
  .viewer { min-height: 560px; padding: 10px; }
}
@media (max-width: 760px) {
  .appnav { order: 2; flex: 1 1 100%; }
  .appnav a { flex: 1; justify-content: center; }
  .top .brand { order: 0; } .top-right { order: 1; }
  #crm-link { display: none; }
}

/* ================= niche menu ================= */
.cat-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.nichenav { position: sticky; top: calc(var(--top-h) + 16px); max-height: calc(100vh - var(--top-h) - 32px); overflow: auto; scrollbar-width: thin; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.nn-all, .nn-item, .nn-head { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; text-align: left; border-radius: 7px; }
.nn-all { height: 34px; padding: 0 10px; font-weight: 600; }
.nn-all .nn-count { margin-left: auto; font-size: 12px; color: var(--text-4); font-weight: 500; }
.nn-group { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.nn-head { height: 26px; padding: 0 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-4); }
.nn-head:hover { color: var(--text); }
.nn-item { height: 32px; padding: 0 10px; font-size: 13px; color: var(--text-2); }
.nn-item .i { color: var(--text-4); }
.nn-item:hover, .nn-all:hover { background: var(--hover); color: var(--text); }
.nn-item.on, .nn-all.on { background: var(--text); color: #fff; }
.nn-item.on .i, .nn-all.on .i { color: var(--brand); }
.nn-all.on .nn-count { color: rgba(255,255,255,.6); }
.nn-item.dim { opacity: .35; }
.nn-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nn-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }
.dot-demo { background: var(--green-500); } .dot-preview { background: #F59E0B; } .dot-none { background: var(--border-2); }
.nn-legend { display: grid; gap: 4px; margin-top: 12px; padding: 10px 10px 4px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-4); }
.nn-legend span { display: flex; align-items: center; gap: 7px; }
.grp { scroll-margin-top: calc(var(--top-h) + 16px); margin-bottom: 28px; }
.grp-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.grp-head .i { color: var(--text-3); }
.grp-count { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; color: var(--text-3); font-weight: 500; }
.cat-main .grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.d-nav { display: flex; align-items: center; gap: 4px; }
.d-pos { min-width: 44px; text-align: center; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
@media (max-width: 960px) {
  .cat-layout { grid-template-columns: 1fr; gap: 12px; }
  .nichenav { position: sticky; top: 0; z-index: 15; max-height: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px; border-radius: 0; margin: 0 -20px; border-left: 0; border-right: 0; scrollbar-width: none; }
  .nn-group { display: contents; }
  .nn-head, .nn-legend { display: none; }
  .nn-all, .nn-item { width: auto; flex: none; height: 32px; border: 1px solid var(--border); border-radius: 999px; }
  .nn-item.dim { display: none; }
}
@media (max-width: 760px) { .nichenav { margin: 0 -20px; } .d-pos { display: none; } }

/* niche sections (v2 menu) */
.niche { scroll-margin-top: calc(var(--top-h) + 16px); margin-bottom: 28px; border-radius: var(--r-lg); }
.niche-head { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.niche-head .i { color: var(--text-3); }
.niche.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 6px rgba(255,223,58,.9); background: rgba(255,223,58,.12); } 100% { box-shadow: 0 0 0 6px rgba(255,223,58,0); background: transparent; } }
p.nn-head { margin: 0; display: flex; align-items: center; cursor: default; }
.nn-item .nn-count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--hover); color: var(--text-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nn-item .nn-count.zero { background: transparent; color: var(--text-4); font-weight: 500; }
.nn-item.on .nn-count { background: rgba(255,255,255,.18); color: #fff; }
.nn-item.dim { opacity: .4; }
@media (max-width: 960px) { .nn-item.dim { display: inline-flex; } .niche { scroll-margin-top: 64px; } }
