.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }

/* sidebar */
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px; padding: 20px 16px; background: var(--surface); border-right: 1px solid var(--border); }
.side .logo { padding: 4px 8px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14px; }
.side-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.side-nav a.active { background: var(--primary-soft); color: var(--primary-text); }
.side-nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.count { margin-left: auto; font-size: 11px; background: var(--bg-soft); color: var(--muted); padding: 2px 8px; border-radius: 999px; }
.side-nav a.active .count { background: var(--primary); color: #fff; }
.plan-card { margin-top: auto; padding: 16px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border); }
.plan-card p { font-size: 12px; color: var(--muted); margin: 10px 0 12px; }
.plan-row { display: flex; justify-content: space-between; font-size: 13px; }
.plan-row span { color: var(--muted); }
.bar { height: 6px; border-radius: 999px; background: var(--border); margin-top: 10px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #0ea5e9); border-radius: inherit; width: 0; transition: width .4s; }

/* main */
.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; height: 68px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--faint); }
.search[hidden] { display: none; }
.search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); min-width: 0; }
.ai-pill { margin-left: auto; font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; }
.ai-pill.on { background: var(--success-soft); color: var(--success); border-color: transparent; }
.menu-btn { display: none; }
.content { padding: 28px; max-width: 1280px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.025em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.card-h h3 { margin: 0; font-size: 15px; }
.card-h a { font-size: 13px; font-weight: 600; color: var(--primary-text); }
.card-b { padding: 18px; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 18px; }
.kpi small { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: 13px; }
.kpi .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; background: var(--bg-soft); }
.kpi b { display: block; font-size: 30px; letter-spacing: -.03em; margin-top: 10px; }
.kpi span { font-size: 12px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }

.cat-bars { display: grid; gap: 12px; }
.cat-bar { display: grid; grid-template-columns: 170px 1fr 36px; align-items: center; gap: 12px; font-size: 13px; cursor: pointer; }
.cat-bar .track { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.cat-bar .fill { height: 100%; border-radius: inherit; }
.cat-bar b { text-align: right; }
.cat-bar .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.src-list { display: grid; gap: 10px; }
.src { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.src b { margin-left: auto; }
.src i { width: 10px; height: 10px; border-radius: 3px; }

/* filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border); }
.seg button { border: 0; background: transparent; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--primary); width: 16px; height: 16px; }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.cat-chips .chip { cursor: pointer; height: 32px; padding: 0 12px; background: var(--surface); flex: none; }
.cat-chips .chip.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* lead list */
.leads { display: grid; gap: 10px; }
.lead { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; padding: 16px 18px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.lead:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.lead .avatar { width: 44px; height: 44px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.lead-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead-top b { font-size: 15px; }
.lead-top .meta { color: var(--muted); font-size: 13px; }
.lead-text { margin: 6px 0 10px; color: var(--ink-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags .chip { height: 24px; font-size: 12px; }
.chip.ok { color: var(--success); background: var(--success-soft); border-color: transparent; }
.chip.hot { color: var(--warn); background: var(--warn-soft); border-color: transparent; }

.lead-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.score { font-weight: 800; font-size: 14px; padding: 4px 10px; border-radius: 9px; color: var(--success); background: var(--success-soft); }
.score.mid { color: var(--warn); background: var(--warn-soft); }
.score.low { color: var(--muted); background: var(--bg-soft); }
.status { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); text-transform: capitalize; }
.status.contacted { color: var(--accent); border-color: transparent; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.status.won { color: var(--success); border-color: transparent; background: var(--success-soft); }
.status.archived { opacity: .6; }
.star { border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--faint); padding: 0; line-height: 1; }
.star.on { color: #f59e0b; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty .big { font-size: 40px; }

/* discover */
.disc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.query { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.query code { flex: 1; min-width: 0; font-family: ui-monospace, 'Cascadia Code', Menlo, monospace; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: var(--primary-soft); color: var(--ink-2); font-size: 14px; margin-bottom: 18px; border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); }
.tip b { color: var(--ink); }
.custom-q { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.custom-q .input { flex: 1 1 220px; }

/* analyze */
.an-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.form { display: grid; gap: 12px; }
.form label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: grid; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.result { padding: 22px; }
.gauge { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.ring { --p: 0; --c: var(--success); width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--bg-soft) 0); flex: none; }
.ring span { width: 72px; height: 72px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 24px; font-weight: 800; }
.verdict { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 14px; margin: 16px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; word-break: break-word; }
.reasons { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: grid; gap: 4px; }

/* drawer */
.drawer-bg { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s ease; z-index: 50; display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-bg.open { opacity: 1; pointer-events: auto; }
.dr-h { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.dr-h .avatar { width: 44px; height: 44px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-weight: 700; }
.dr-h small { color: var(--muted); display: block; }
.dr-b { padding: 20px; overflow: auto; flex: 1; display: grid; gap: 18px; align-content: start; }
.dr-b h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.post { white-space: pre-wrap; font-size: 14px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); padding: 14px; border-radius: 12px; }
.contact { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.dr-f { display: flex; gap: 8px; padding: 16px 20px; border-top: 1px solid var(--border); }
mark { background: var(--primary-soft); color: var(--primary-text); padding: 0 2px; border-radius: 4px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; opacity: 0; transition: all .2s; z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.set-grid { display: grid; gap: 18px; max-width: 820px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: 0; }
.set-row p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
code.k { background: var(--bg-soft); padding: 2px 6px; border-radius: 6px; font-size: 13px; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .an-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 45; width: 264px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .top { padding: 0 16px; }
  .content { padding: 20px 16px; }
  .disc-grid { grid-template-columns: minmax(0, 1fr); }
  .ai-pill, .hide-sm { display: none; }
}
@media (max-width: 560px) {
  .lead { grid-template-columns: 1fr; }
  .lead .avatar { display: none; }
  .lead-side { flex-direction: row; align-items: center; }
  .cat-bar { grid-template-columns: 110px 1fr 28px; }
  .form-row { grid-template-columns: 1fr; }
  .kpi b { font-size: 24px; }
}

.pack-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; flex-wrap: wrap; }
.pack-head h3 { margin: 0; font-size: 17px; }
.pack-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.pack-head > div { flex: 1; min-width: 220px; }
.pack-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--c) 14%, transparent); }


.ai-form { display: grid; gap: 10px; }
.ai-form > label, .key-top label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.ai-help { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.ai-note { margin: 0; color: var(--muted); font-size: 12px; }
#aiProv { justify-self: start; }
.key-block { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 10px; background: var(--surface-2); }
.key-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.key-get { font-size: 13px; font-weight: 600; color: var(--primary-text); }
.key-saved { font-size: 13px; font-weight: 600; color: var(--success); font-family: ui-monospace, 'Cascadia Code', Menlo, monospace; }
.link-btn { border: 0; background: none; color: var(--danger); font-weight: 600; cursor: pointer; padding: 0 0 0 6px; font-family: var(--font); }
.key-row { display: flex; gap: 8px; flex-wrap: wrap; }
.key-row .input { flex: 1 1 260px; }
.key-row .key-model { flex: 0 1 190px; font-family: ui-monospace, 'Cascadia Code', Menlo, monospace; font-size: 13px; }
.ai-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ai-result { display: grid; gap: 4px; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.ai-result.good { background: var(--success-soft); color: var(--success); }
.ai-result.bad { background: var(--danger-soft); color: var(--danger); }
.ai-result span { color: var(--ink-2); }


.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); }
.me-card > div { min-width: 0; flex: 1; }
.me-card b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; background: linear-gradient(135deg, #6366f1, #0ea5e9); flex: none; }
.side { overflow-y: auto; }
.plan-card { margin-top: auto; }
.feed-page { height: calc(100vh - 68px - 56px); min-height: 480px; }
.feed-page .chat { height: 100%; }
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; height: 100%; }
.feed-side { display: grid; gap: 14px; align-content: start; }
.bill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bill-plan { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.bill-plan.cur { border: 2px solid var(--primary); }
.bill-plan .price { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.bill-plan .price span { font-size: 14px; color: var(--muted); font-weight: 600; }
.bill-plan ul { margin: 6px 0 12px; padding-left: 18px; color: var(--muted); font-size: 13px; display: grid; gap: 4px; flex: 1; }
@media (max-width: 1100px) { .feed-layout { grid-template-columns: 1fr; } .feed-side { display: none; } .bill-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .feed-page { height: calc(100vh - 68px - 40px); } }

.bill-plan ul { align-content: start; }
.bill-plan .chip { height: auto; min-height: 26px; padding: 5px 10px; align-self: flex-start; }

.bill-plan ul li { line-height: 1.4; }
.dev-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dev-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.dev-row b .chip { height: 20px; font-size: 11px; margin-left: 6px; }

/* live feed: full width + search + trending */
.feed-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.feed-search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--faint); }
.feed-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.feed-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); min-width: 0; font-size: 14px; }
.feed-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.feed-chips .fl { font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 4px 0 8px; }
.feed-chips .fl:first-child { margin-left: 0; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.fchip i { font-style: normal; font-size: 11px; color: var(--muted); background: var(--bg-soft); border-radius: 999px; padding: 1px 7px; }
.fchip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.fchip.on i { background: rgba(255,255,255,.2); color: #fff; }
.fnone { color: var(--muted); font-size: 13px; }
.trend-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: 100%; }
.trend-grid h4 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.trow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--ink); font-family: var(--font); }
.trow:hover, .trow.on { background: var(--primary-soft); }
.trow span { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--bg-soft); color: var(--muted); flex: none; }
.trow b { flex: 1; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow i { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 700; }
.feed-page.full { height: calc(100vh - 68px - 56px - 110px); min-height: 460px; }
@media (max-width: 1000px) { .trend-grid { grid-template-columns: 1fr; } }
.msg-row { padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--ink); }
.msg-row:last-child { border-bottom: 0; }
.msg-top { font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.msg-top a { color: var(--primary-text); }
.msg-top span { margin-left: auto; color: var(--muted); font-size: 12px; }
.msg-row p { margin: 6px 0 0; font-size: 14px; color: var(--ink-2); white-space: pre-line; }
.trend-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; width: 100%; margin-bottom: 12px; }
.trend-top h4, .trend-grid h4 { margin: 0 0 4px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tsub { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.just { display: grid; gap: 10px; max-height: 520px; overflow-y: auto; }
.just .msg .agent-av { display: none; }
.trow b small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.trow i.times { font-size: 11px; font-weight: 800; color: var(--primary-text); background: var(--primary-soft); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
@media (max-width: 1000px) { .trend-top { grid-template-columns: 1fr; } }
.an-tabs { margin-bottom: 14px; }
.an-h { margin: 16px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.ex-table { display: grid; gap: 6px; margin-top: 4px; }
.ex-row { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ex-row .input { height: 34px; font-size: 13px; }
.ex-row.none .input { background: var(--bg-soft); }
.an-search { display: flex; flex-wrap: wrap; gap: 6px; }
.an-q { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--primary-text); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.an-q:hover { background: var(--primary-soft); border-color: transparent; }
.an-sim { display: grid; gap: 12px; max-height: 760px; overflow-y: auto; }
.sim-item { position: relative; }
.sim-item .agent-av { display: none; }
.sim-score { position: absolute; top: 10px; right: 56px; z-index: 1; font-size: 11px; font-weight: 800; color: var(--primary-text); background: var(--primary-soft); padding: 3px 8px; border-radius: 999px; }
@media (max-width: 600px) { .ex-row { grid-template-columns: 1fr; gap: 4px; } }
.cat-open { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font: 600 13px var(--font); cursor: pointer; }
.cat-open:hover { color: var(--ink); background: var(--bg-soft); }
.cat-open.on { border-color: var(--primary); color: var(--primary-text); background: var(--primary-soft); }
.cat-open i { font-style: normal; font-size: 11px; font-weight: 800; background: var(--primary); color: #fff; border-radius: 999px; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.feed-chips[hidden] { display: none; }
.cat-bg { position: fixed; inset: 0; z-index: 950; background: rgba(8, 10, 20, .55); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; }
.cat-pop { width: 100%; max-width: 640px; max-height: 84vh; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.cat-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; }
.cat-h b { display: block; font-size: 16px; }
.cat-h small { color: var(--muted); font-size: 12.5px; }
.cat-x { border: 0; background: transparent; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.cat-find { padding: 0 18px 10px; }
.cat-find input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--ink); padding: 0 12px; font: 500 13.5px var(--font); outline: none; }
.cat-find input:focus { border-color: var(--primary); }
.cat-body { overflow-y: auto; padding: 0 18px 12px; }
.cat-body h5 { margin: 12px 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.cat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cat-item { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font: 600 13px var(--font); text-align: left; cursor: pointer; }
.cat-item:hover { background: var(--bg-soft); color: var(--ink); }
.cat-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-item em { font-style: normal; font-size: 11px; color: var(--muted); background: var(--bg-soft); border-radius: 999px; padding: 1px 8px; }
.cat-item .cdot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cat-item.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.cat-item.on em { background: rgba(255,255,255,.2); color: #fff; }
.cat-item[hidden] { display: none; }
.cat-f { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); }
@media (max-width: 600px) { .cat-list { grid-template-columns: 1fr; } .cat-bg { padding-top: 4vh; } }
/* layout: never wider than the screen */
.app { grid-template-columns: 252px minmax(0, 1fr); }
@media (max-width: 860px) { .app { grid-template-columns: minmax(0, 1fr); } }
#view { min-width: 0; overflow-x: clip; }
.trend-top { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.trend-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trend-top > *, .trend-grid > * { min-width: 0; }
.trow { min-width: 0; }
.trow i.times { flex-shrink: 0; }
.cat-open i[hidden] { display: none; }
@media (max-width: 1100px) { .trend-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1000px) { .trend-grid { grid-template-columns: minmax(0, 1fr); } }
.sform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.sf { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); min-width: 0; }
.sf.wide, .sf-actions { grid-column: 1 / -1; }
.sf input:disabled { opacity: .7; cursor: not-allowed; background: var(--bg-soft); }
.sf small { font-weight: 500; font-size: 11.5px; color: var(--faint); }
.sf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .sform { grid-template-columns: minmax(0, 1fr); } }
/* ---------- my business leads ---------- */
.ph-acts { display: flex; gap: 8px; }
.biz-setup .card-b { max-width: 720px; }
.biz-setup h2 { margin: 10px 0 6px; font-size: 20px; letter-spacing: -.01em; }
.biz-setup > .card-b > p { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.bs-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.biz-head { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.bh-l { min-width: 0; flex: 1 1 320px; }
.bh-l b { font-size: 18px; }
.bh-l p { margin: 4px 0 8px; color: var(--muted); font-size: 13px; }
.bh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bh-r { flex: 0 1 auto; }
.ext-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ext-pill { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--bg-soft); color: var(--muted); }
.ext-pill.on { background: var(--success-soft); color: var(--success); }
.ext-pill.off { background: var(--danger-soft); color: var(--danger); }
.ext-pill.warn { background: var(--warn-soft); color: var(--warn); }
.ext-help { font-size: 12.5px; color: var(--muted); }
.biz-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.biz-bar .feed-search { flex: 1 1 280px; }
.biz-rows { display: grid; gap: 8px; }
.brow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--c, var(--primary)); border-radius: 12px; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.brow:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.br-top { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.br-top b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.br-top span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-text { margin-top: 3px; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-why { margin-top: 3px; font-size: 11.5px; color: var(--primary-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-ct { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; max-width: 190px; }
.ct, .ct-lock { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--success-soft); color: var(--success); white-space: nowrap; }
.ct.none { background: var(--bg-soft); color: var(--muted); }
.ct-lock { background: var(--warn-soft); color: var(--warn); }
.mp { display: inline-grid; place-items: center; min-width: 48px; height: 30px; padding: 0 8px; border-radius: 9px; font-size: 13px; font-weight: 800; background: var(--bg-soft); color: var(--ink-2); }
.mp.mid { background: var(--warn-soft); color: var(--warn); }
.mp.hi { background: var(--success-soft); color: var(--success); }
.biz-table-wrap { overflow-x: auto; }
.biz-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.biz-table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; }
.biz-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.biz-table tbody tr { cursor: pointer; }
.biz-table tbody tr:hover { background: var(--bg-soft); }
.biz-table td small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.biz-table td.req { min-width: 280px; max-width: 420px; }
.biz-table td.req small { color: var(--primary-text); }
.biz-table td .cdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.biz-table td .ct, .biz-table td .ct-lock { display: inline-block; margin: 0 3px 3px 0; }
.biz-table .nw { white-space: nowrap; color: var(--muted); }
.biz-empty h3 { margin: 0 0 6px; }
.biz-empty p { margin: 0 0 14px; color: var(--muted); max-width: 620px; line-height: 1.55; }
.lead-bg { justify-content: flex-end; padding: 0; align-items: stretch; }
.lead-pop { width: min(680px, 100%); height: 100%; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.lead-body { flex: 1; overflow-y: auto; padding: 0 16px 20px; }
.lead-body .agent-av, .lead-body .msg-meta { display: none; }
@media (max-width: 760px) {
  .brow { grid-template-columns: auto minmax(0, 1fr); }
  .br-ct { grid-column: 2; justify-content: flex-start; max-width: none; }
  .brow > .btn { grid-column: 1 / -1; }
}
.sf > span small { display: block; margin-top: 2px; font-weight: 500; font-size: 11.5px; color: var(--faint); }
.chip.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.btn.danger-soft { color: var(--danger); background: var(--danger-soft); border-color: transparent; }
.cancel-card { border-style: dashed; }
.dr-links { display: flex; flex-wrap: wrap; gap: 8px; }
.dr-links .btn.find { border-style: dashed; }
.dr-links .btn-primary.find { background: var(--primary-soft); color: var(--primary-text); border: 1px dashed var(--primary); box-shadow: none; }
.dr-dates { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); font-size: 13px; }
.dr-dates dt { color: var(--muted); font-weight: 600; }
.dr-dates dd { margin: 0; color: var(--ink); }
.dr-dates dd small, .dr-dates dd.muted { color: var(--muted); }
.drawer .cdot, .dr-b .cdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.how-btn { width: 100%; justify-content: center; background: var(--primary-soft); color: var(--primary-text); border-color: transparent; font-weight: 700; }
.how-btn.on { background: var(--surface); border-color: var(--border); color: var(--ink-2); }
#drHowto { margin-top: 10px; }

/* ===== v1.0 tabs: AI Employee, extension, billing, profile, settings, support ===== */
.announce { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin: 0 24px; margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: var(--primary-soft); color: var(--ink); font-size: 14px; }
.announce button { background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); }
.side-nav .count.pro-tag { background: var(--warn-soft); color: var(--warn); }
.up-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; margin-bottom: 16px; border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-soft); flex-wrap: wrap; }
.up-banner p { margin: 4px 0 0; color: var(--ink-2); font-size: 13.5px; max-width: 640px; }
.status-strip a { color: var(--primary-text); font-weight: 700; }
.exp-note { font-size: 12.5px; color: var(--muted); }
.muted { color: var(--muted); }

.emp-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.emp-train h3 { font-size: 15px; margin: 18px 0 8px; } .emp-train h3:first-child { margin-top: 0; }
.emp-s { margin-bottom: 8px; width: 100%; }
.emp-pick { display: grid; gap: 6px; max-height: 360px; overflow: auto; padding-right: 4px; }
.pay-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 8px; background: rgba(113,75,103,.07); margin-bottom: 12px; font-size: 14px; }
.pay-status.warn { background: rgba(245,158,11,.14); }
.pay-status.bad { background: rgba(220,38,38,.12); }
.chip.bad { background: rgba(220,38,38,.12); color: #c0362c; }
.ext-me { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.ext-me-pic { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--brand, #714B67); color: #fff; font-weight: 700; font-size: 18px; }
.ext-me-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 200px; }
.ext-me-txt .muted { font-size: 13px; }
.ext-me-act { display: flex; gap: 8px; flex-wrap: wrap; }
.emp-pick-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.emp-pick-bar .input { flex: 1; min-width: 160px; }
.emp-pl { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.emp-pl b { color: var(--ink); }
.emp-how ol { padding-left: 18px; display: grid; gap: 10px; color: var(--ink-2); font-size: 14px; }
.emp-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.emp-av { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--accent, var(--primary))); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.emp-info { flex: 1; min-width: 220px; } .emp-info p { margin: 2px 0 8px; color: var(--ink-2); }
.emp-stat { text-align: center; min-width: 110px; } .emp-stat b { display: block; font-size: 28px; } .emp-stat span { color: var(--muted); font-size: 12.5px; }
.emp-stat em { display: inline-block; margin-top: 4px; font-style: normal; font-size: 12px; font-weight: 700; color: var(--success); background: var(--success-soft); padding: 2px 8px; border-radius: 99px; }
.emp-list { display: grid; gap: 14px; overflow: visible; max-height: none; }
.emp-why { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); margin: 0 0 6px 4px; flex-wrap: wrap; }

.ext-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.ext-grid h3 { margin-top: 0; font-size: 16px; }
.steps { padding-left: 20px; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.ticks { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.ticks li::before { content: "✓"; color: var(--success); font-weight: 800; margin-right: 8px; }

.cur-plan { display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cur-plan h2 { margin: 2px 0 4px; font-size: 22px; } .cur-plan p { margin: 0; color: var(--ink-2); }
.cp-u { min-width: 260px; display: grid; gap: 8px; } .cp-u .plan-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.cp-u .plan-row b { color: var(--ink); }
.cp-u .bar { height: 8px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; } .cp-u .bar span { display: block; height: 100%; background: var(--primary); }

.cc-row { display: grid; grid-template-columns: minmax(0, 1fr) 42px minmax(0, 2fr) 36px; gap: 8px; align-items: start; margin-bottom: 10px; }
.cc-row input[type=color] { width: 42px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.switch-l { position: relative; width: 42px; height: 24px; flex: none; }
.switch-l input { opacity: 0; width: 0; height: 0; }
.switch-l span { position: absolute; inset: 0; border-radius: 99px; background: var(--border-strong, #ccc); cursor: pointer; transition: .2s; }
.switch-l span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch-l input:checked + span { background: var(--primary); } .switch-l input:checked + span::before { transform: translateX(18px); }

.sup-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sup-grid h3 { margin-top: 0; }
.sup-side a { color: var(--primary-text); font-weight: 700; }
.tk { border-bottom: 1px solid var(--border); padding: 10px 0; }
.tk summary { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.tk summary small { margin-left: auto; color: var(--muted); }
.tk-thread { display: grid; gap: 10px; padding: 12px 0 4px; }
.tk-msg { padding: 10px 12px; border-radius: 10px; background: var(--bg-soft); max-width: 720px; }
.tk-msg.admin { background: var(--primary-soft); margin-left: 24px; }
.tk-msg small { color: var(--muted); } .tk-msg p { margin: 4px 0 0; }
.tk-reply { display: flex; gap: 8px; align-items: flex-end; } .tk-reply textarea { flex: 1; }

@media (max-width: 1000px) { .emp-grid, .sup-grid, .ext-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .cc-row { grid-template-columns: minmax(0, 1fr) 42px; } .cc-row textarea { grid-column: 1 / -1; } .announce { margin: 10px 16px 0; } }
.announce[hidden] { display: none; }
.side-nav a[hidden], .side-nav .count[hidden] { display: none !important; }
.emp-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; position: sticky; top: 0; z-index: 3; }
.emp-why .emp-ck { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.emp-why .emp-rs { flex: 1; min-width: 160px; }
.emp-why .emp-cp { margin-left: auto; }
.brow .g-ck, .biz-table .g-ck { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; flex: none; }
/* Global Leads rows: [checkbox] score · text · contacts · copy · view */
.brow { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
.brow.has-ck { grid-template-columns: auto auto minmax(0, 1fr) auto auto auto; }
.brow > .chip.ok, .brow > .btn { white-space: nowrap; }
@media (max-width: 760px) {
  .brow, .brow.has-ck { grid-template-columns: auto auto minmax(0, 1fr); }
  .brow:not(.has-ck) { grid-template-columns: auto minmax(0, 1fr); }
  .brow .br-main { grid-column: span 1; }
  .brow .br-ct, .brow > .btn, .brow > .chip { grid-column: 1 / -1; justify-self: start; }
}

/* ===== v1.1: insights, contact views, global rows, live teaser feed, client alerts ===== */
.ins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 18px; }
.ins-card .card-h small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; font-weight: 500; }
.ins-card .card-b { display: grid; gap: 4px; }
.ins-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; color: inherit; text-decoration: none; min-width: 0; }
a.ins-row:hover { background: var(--bg-soft); }
.ins-t { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-t b { margin-right: 6px; color: var(--ink); }
.ins-row em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ins-wrap.locked { position: relative; margin-bottom: 18px; }
.ins-wrap.locked .ins-grid { filter: blur(3px); opacity: .55; pointer-events: none; user-select: none; margin-bottom: 0; }
.ins-ghost { display: grid; gap: 10px; padding: 4px 0; }
.ins-ghost span { height: 12px; border-radius: 6px; background: var(--bg-soft); }
.ins-ghost span:nth-child(2n) { width: 70%; }
.ins-lock { position: absolute; inset: 0; margin: auto; height: max-content; max-width: 460px; text-align: center; padding: 22px 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg, 0 12px 40px rgba(0,0,0,.12)); }
.ins-lock b { font-size: 17px; }
.ins-lock p { color: var(--muted); font-size: 13.5px; margin: 6px 0 14px; }

.rv-box { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.rv-box p { margin: 3px 0 0; color: var(--muted); font-size: 13px; max-width: 720px; }
.rv-box > div:nth-child(2) { flex: 1; min-width: 0; }
.rv-n { display: grid; place-items: center; min-width: 72px; padding: 8px 10px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); line-height: 1.1; }
.rv-n b { font-size: 22px; } .rv-n span { font-size: 11px; font-weight: 700; }
.rv-box.empty .rv-n { background: var(--warn-soft); color: var(--warn); }
.biz-sum { margin: 0 0 10px; color: var(--muted); font-size: 13.5px; }

.brow.g-row, .brow.g-row:not(.has-ck) { grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; }
.g-row .br-top b { display: inline-flex; align-items: center; gap: 6px; max-width: 60%; }
.g-row .br-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; line-height: 1.45; }
.g-row .br-why { white-space: normal; }
.br-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.hot-t { font-style: normal; color: var(--warn); font-weight: 700; }
.ct-locked, .ct-open { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--border); }
.ct-open { display: grid; gap: 4px; }
.ct-open > b { font-size: 13.5px; } .ct-open > small { color: var(--muted); font-size: 12px; }
.ct-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.biz-table .ct-cell .ct-locked, .biz-table .ct-cell .ct-open { margin: 0; padding: 0; border: 0; }
@media (max-width: 760px) {
  .brow.g-row, .brow.g-row:not(.has-ck) { grid-template-columns: auto minmax(0, 1fr); }
  .br-acts { grid-column: 1 / -1; flex-direction: row; }
  .rv-box { flex-wrap: wrap; }
}

/* live feed: category + what they need only */
.feed-top .select { height: 42px; min-width: 220px; }
.tcard { border: 1px solid var(--border); border-left: 3px solid var(--c); border-radius: 12px; background: var(--surface); padding: 12px 14px; max-width: 680px; }
.tc-cat { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; font-size: 14px; }
.tc-need { margin-top: 6px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.tc-need span { display: block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.tc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.tc-foot .btn { margin-left: auto; }

/* client alerts */
.al-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 18px; align-items: start; }
.al-form { display: grid; gap: 10px; }
.al-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.al-list { display: grid; gap: 8px; margin-top: 4px; }
.al-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.al-item > div { flex: 1; min-width: 0; }
.al-item b { display: block; font-size: 14px; } .al-item small { color: var(--muted); font-size: 12px; }
.al-item .switch-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.al-feed .msg { max-width: none; }
.al-tag { display: inline-block; font-size: 11px; font-weight: 800; color: var(--primary-text); background: var(--primary-soft); padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }
.why-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0; }
.why-card div { padding: 14px 16px; border-radius: 14px; background: var(--bg-soft); }
.why-card b { display: block; margin-bottom: 4px; }
.why-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
@media (max-width: 900px) { .al-grid { grid-template-columns: 1fr; } }

/* lead details: posted date & time, earlier / same-company contacts */
.posted-cell b { display: block; font-weight: 600; font-size: 12.5px; }
.posted-cell small { color: var(--muted); font-size: 11.5px; }
.lockpill.rel { background: var(--success-soft); color: var(--success); border-color: transparent; }
.rel-box { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg-soft); border: 1px dashed var(--border); }
.rel-box b { display: block; font-size: 12.5px; }
.rel-box small { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 4px; }

/* DialModal — our own popup (no browser alert/confirm boxes) */
.dm-bg { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(15, 12, 20, .45); backdrop-filter: blur(3px); animation: dmIn .14s ease-out; }
.dm-bg.out { opacity: 0; transition: opacity .14s; }
.dm { width: min(440px, 100%); background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.25); animation: dmUp .16s ease-out; }
.dm h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.3; }
.dm-body { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.dm-body p { margin: 0 0 8px; }
.dm-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 12px; background: var(--primary-soft); color: var(--primary-text); }
.dm-ic.danger { background: var(--warn-soft); color: var(--danger, #b91c1c); }
.dm-ic.ok { background: var(--success-soft); color: var(--success); }
.dm-perks { margin: 10px 0; padding: 12px 14px 12px 32px; border-radius: 12px; background: var(--bg-soft); display: grid; gap: 6px; font-size: 13.5px; }
.dm-fine { font-size: 12.5px; color: var(--muted); }
.dm-input { width: 100%; margin-top: 12px; }
.dm-acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.dm-acts .btn { min-width: 96px; justify-content: center; }
.dm-danger { background: var(--danger, #b91c1c); color: #fff; border-color: transparent; }
.dm-danger:hover { filter: brightness(1.08); }
@keyframes dmIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes dmUp { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 480px) { .dm-acts .btn { flex: 1; } }

/* live feed card: poster (masked), title and the post */
.pcard.tcard { max-width: 860px; padding: 14px 16px; }
.pcard.tcard .pc-who small { white-space: normal; }

/* My keywords */
.kw-info { width: 38px; padding: 0; font-size: 16px; }
.kw-undo { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 14px; border-radius: 12px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.kw-undo > div { flex: 1; min-width: 0; }
.kw-undo b { display: block; font-size: 14px; }
.kw-undo span { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.kw-add h3 { margin: 0; }
.kw-add .muted { margin: 4px 0 10px; font-size: 13.5px; }
.kw-add-row { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto; gap: 8px; }
.kw-add-row #kwNewCat:not([hidden]) { grid-column: 1 / -1; order: 1; }
.kw-add-row #kwWord, .kw-add-row #kwAddBtn { order: 0; }
.kw-tools { display: flex; align-items: center; gap: 12px; margin: 16px 0 10px; flex-wrap: wrap; }
.kw-tools .input { max-width: 320px; }
.kw-tools .muted { font-size: 12.5px; }
.kw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.kw-cat { border: 1px solid var(--border); border-top: 3px solid var(--c); border-radius: 12px; background: var(--surface); padding: 12px 14px; }
.kw-cat-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.kw-cat-h b { flex: 1; min-width: 0; font-size: 14px; }
.kw-del-cat { color: var(--danger); }
.kw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-chip { display: inline-flex; align-items: center; gap: 2px; height: 28px; padding: 0 4px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); font-size: 12.5px; color: var(--ink-2); }
.kw-chip.on { background: color-mix(in srgb, #f59e0b 14%, var(--surface)); border-color: color-mix(in srgb, #f59e0b 45%, transparent); }
.kw-chip button { all: unset; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted); font-size: 13px; }
.kw-chip button:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.kw-chip .kw-star { color: #d97706; }
.kw-chip button:focus-visible { outline: 2px solid var(--primary); }
@media (max-width: 640px) { .kw-add-row { grid-template-columns: 1fr; } .kw-grid { grid-template-columns: 1fr; } }
.ks-act { display: flex; gap: 6px; align-items: center; } .ks-act .select { height: 32px; min-width: 180px; }
#kwReset:disabled { opacity: .5; cursor: not-allowed; }

/* pagination: rows per page + Prev / Page N / Next (no totals shown) */
.pager-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: 13px; color: var(--muted); }
.pager-bar label { display: inline-flex; align-items: center; gap: 8px; }
.pager-bar .select { height: 32px; min-width: 76px; }
.pg-nav { display: inline-flex; align-items: center; gap: 10px; }
.pg-nav b { color: var(--ink); font-weight: 700; min-width: 56px; text-align: center; }

/* profile: phone with country code, WhatsApp tick, password show/hide */
.phone-in { display: grid; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr); gap: 6px; }
.phone-in .select { min-width: 0; }
.sf .req, .sf i.req { color: var(--danger); font-style: normal; }
.wa-f { display: grid; gap: 8px; align-content: start; }
.wa-f > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.wa-f .phone-f > span { display: none; }
.check-l { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check-l input { width: 16px; height: 16px; accent-color: var(--primary); }
.pw-in { position: relative; }
.pw-in .input { padding-right: 44px; width: 100%; }
.pw-eye { all: unset; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); cursor: pointer; }
.pw-eye:hover { color: var(--ink); background: var(--bg-soft); }
.pw-eye.on { color: var(--primary); }
.pw-eye.on svg path { stroke-dasharray: 2 0; }
.form-err { margin: 0; padding: 8px 12px; border-radius: 8px; background: var(--danger-soft, #fde8e8); color: var(--danger, #b91c1c); font-size: 13px; font-weight: 600; }
.form-err[hidden] { display: none !important; }

/* Business profile page */
.bp h3 { margin: 22px 0 6px; font-size: 16px; }
.bp h3:first-child { margin-top: 0; }
.bp > .muted { margin: 0 0 10px; font-size: 13.5px; }
.ai-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ai-row small { font-size: 12.5px; }
.chips-in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: text; }
.chips-in:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chips-in > span { display: contents; }
.chips-in input { flex: 1; min-width: 160px; border: 0; outline: 0; background: transparent; font: inherit; color: inherit; padding: 4px; }
.chip-x { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-text); font-size: 13px; font-weight: 600; }
.chip-x button { all: unset; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; }
.chip-x button:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.bp-kwcat { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--border); border-left: 3px solid var(--c); border-radius: 10px; background: var(--surface); }
.bp-kwh { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.bp-kws { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-pick { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-soft); font-size: 13px; cursor: pointer; user-select: none; }
.kw-pick input { width: 14px; height: 14px; accent-color: var(--primary); margin: 0; }
.kw-pick.on { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 40%, transparent); color: var(--primary-text); font-weight: 600; }
.bp-addkw, .bp-addcat { display: flex; gap: 8px; margin-top: 10px; }
.bp-addkw .input, .bp-addcat .input { max-width: 360px; }
.bp-addcat { margin-top: 14px; }
.bp-empty { margin: 10px 0 0; }
.bp .form-err { margin-top: 14px; }

/* My Leads row: contact details + outreach guide */
.lead-ct { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.lead-ct [data-howto] { margin-left: auto; }
.lead-ct .ct.none { font-size: 12.5px; color: var(--muted); }
.lead-howto { margin-top: 10px; padding: 12px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--border); cursor: default; }

/* Global Leads table: fits the page — no sideways scrolling; text and contact pills wrap inside their own column */
.g-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.g-table { table-layout: fixed; min-width: 1180px; }
.g-table th:nth-child(1), .g-table td:nth-child(1) { width: 64px; }
.g-table th:nth-child(2) { width: 28%; }
.g-table td.req { min-width: 0; max-width: none; }
.g-table th:nth-child(3) { width: 12%; }
.g-table th:nth-child(4) { width: 8%; }
.g-table th:nth-child(5) { width: 24%; }
.g-table th:nth-child(6) { width: 11%; }
.g-table th:nth-child(7) { width: 130px; }
.g-table th { white-space: normal; }
.g-table td { overflow: hidden; overflow-wrap: anywhere; }
.g-table .nw { white-space: normal; }
.g-table td > *, .g-table td .ct-cell * { max-width: 100%; }
.g-table td .ct, .g-table td .ct-lock, .g-table td .contact-pill, .g-table td .chip { white-space: normal; height: auto; min-height: 26px; line-height: 1.3; text-align: left; }
.g-table td:last-child .btn, .g-table td:last-child .chip { display: inline-flex; margin: 0 0 6px; }
.kw-undo-x { all: unset; cursor: pointer; width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); font-size: 14px; } .kw-undo-x:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); }
.al-kind { margin-bottom: 4px; } .al-kind button { flex: 1; }
.al-form [hidden] { display: none !important; }
.set-tabs { margin: 0 0 16px; display: inline-flex; }
.set-tabs a { text-decoration: none; }
.set-tabs a { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.set-tabs a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tk summary .tk-open { margin-left: 4px; }
.tk[open] summary .tk-open { display: none; }
.me-card .logout-btn { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; flex: none; color: var(--muted); }
.me-card .logout-btn:hover { color: var(--danger, #c0362c); }
.bp-kw-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bp-kw-h h3 { margin-bottom: 0; }
.al-mail { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.al-mail .seg { flex-wrap: wrap; }
.emp-24 { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; border-left: 3px solid var(--primary); }
.emp-24-ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: var(--primary); }
.emp-24 p { margin: 6px 0 0; font-size: 14px; }
/* Global Leads → SPOCs */
.gl-tabs { margin: 4px 0 12px; }
.sp-card { margin-bottom: 12px; }
.sp-top { display: flex; align-items: center; gap: 12px; }
.sp-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; background: var(--primary-soft, #f3edf2); color: var(--primary, #714b67); }
.sp-count { text-align: center; font-size: 20px; font-weight: 700; color: var(--primary, #714b67); line-height: 1; }
.sp-count small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.sp-need { margin: 10px 0; font-size: 14px; }
.sp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sp-act { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.sp-kv { width: 100%; border-collapse: collapse; font-size: 13.5px; text-align: left; }
.sp-kv td { padding: 6px 6px; border-bottom: 1px solid var(--border, #eee); vertical-align: top; }
.sp-kv td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }
.sp-kv td:last-child { width: 1%; text-align: right; }
.sp-post { padding: 8px 0; border-bottom: 1px solid var(--border, #eee); text-align: left; font-size: 13.5px; }
.dm-body .sp-kv, .dm-body h4 { text-align: left; }
.bp-kw-h { margin-top: 26px; margin-bottom: 4px; }
.bp-kw-h h3 { margin-top: 0; }
/* SPOC details popup: the details scroll, the popup fits the screen */
.sp-scroll { max-height: min(58vh, 520px); overflow-y: auto; padding-right: 6px; margin-right: -6px; overscroll-behavior: contain; }
.sp-scroll::-webkit-scrollbar { width: 6px; } .sp-scroll::-webkit-scrollbar-thumb { background: var(--border, #ddd); border-radius: 6px; }
.dm { position: relative; }
.dm-x { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted, #888); display: grid; place-items: center; cursor: pointer; }
.dm-x:hover { background: var(--bg-soft, #f2f2f2); color: var(--ink, #222); }
.al-form .al-mail { margin: 4px 0 2px; flex-direction: column; align-items: stretch; gap: 6px; }
.al-form .al-mail .seg { display: flex; }
.al-form .al-mail .seg button { flex: 1; white-space: normal; height: auto; min-height: 34px; padding: 6px 8px; }
/* small (i) button that opens the longer explanation */
.biz-sum { display: flex; align-items: center; gap: 6px; }
.info-i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; color: var(--muted, #888); font: italic 700 12px/1 Georgia, serif; display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.info-i:hover { color: var(--primary, #714b67); }
.al-note { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.al-rec { display: inline-block; margin-left: 4px; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--success-soft, #e6f4ea); color: var(--success, #1a7f37); vertical-align: 1px; }
.about-agent { margin: 0; padding-left: 18px; text-align: left; } .about-agent li { margin: 0 0 8px; font-size: 13.5px; }
.dm-body h4 { text-align: left; }
/* Refer & get 1 month free */
.ref-card p { font-size: 13.5px; margin: 6px 0 10px; }
.ref-prog .bar { height: 8px; border-radius: 999px; background: var(--bg-soft, #f2f2f2); overflow: hidden; } .ref-prog .bar span { display: block; height: 100%; background: var(--primary, #714b67); }
.ref-prog small { display: block; margin-top: 4px; color: var(--muted); }
.ref-link { display: flex; gap: 6px; margin: 10px 0 8px; } .ref-link .input { flex: 1; min-width: 0; font-size: 12.5px; }
.ref-share { display: flex; gap: 6px; flex-wrap: wrap; }

/* ★ hint: stars train your AI agent */
.star-hint { position: fixed; z-index: 1200; width: 290px; max-width: calc(100vw - 24px); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.22); padding: 12px 14px; animation: shIn .18s ease-out; }
.star-hint::before { content: ''; position: absolute; top: -7px; left: calc(var(--ax, 50%) - 7px); width: 12px; height: 12px; background: var(--surface); border-left: 1px solid var(--border); border-top: 1px solid var(--border); transform: rotate(45deg); }
.star-hint.up::before { top: auto; bottom: -7px; transform: rotate(225deg); }
.star-hint b { display: block; font-size: 14px; color: #b45309; }
.star-hint p { margin: 4px 0 10px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.star-hint .sh-acts { display: flex; gap: 8px; }
@keyframes shIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.dr-h .star { font-size: 20px; margin-right: 4px; }
/* an opened post in My Leads: the full LinkedIn post, not the 2-line summary */
.lead-text.full { display: block; -webkit-line-clamp: unset; overflow: visible; white-space: pre-line; max-height: none; }

/* Support → How to use */
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .how-grid { grid-template-columns: 1fr; } }
.how-steps { counter-reset: hs; list-style: none; margin: 14px 0 0; padding: 0; }
.how-steps li { counter-increment: hs; position: relative; padding: 0 0 18px 46px; }
.how-steps li::before { content: counter(hs); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.how-steps li > b { display: block; }
.how-steps li > span { display: block; color: var(--muted); font-size: 14px; margin: 2px 0 6px; }

/* Global Leads table: the last column = two equal small buttons */
.g-table th:nth-child(7) { width: 132px; }
.g-table td.g-acts { vertical-align: middle; }
.g-table td.g-acts .btn, .g-table td.g-acts .chip { display: flex; width: 100%; justify-content: center; margin: 0 0 8px; white-space: nowrap; font-size: 13px; padding: 6px 8px; min-height: 32px; }
.g-table td.g-acts > :last-child { margin-bottom: 0; }
.g-table td.g-acts .btn-ghost { border: 1px solid var(--border); background: var(--bg-soft); color: var(--ink); }

/* My keywords → Make keywords with AI */
.kw-ai { margin-bottom: 14px; display: grid; gap: 10px; border-left: 4px solid var(--primary); }
.kw-ai h3, .kw-ai > p { margin: 0; }
.kw-ai .seg { justify-self: start; }
.kw-ai-from { margin: 0; font-size: 13.5px; color: var(--muted); }
.kw-ai .textarea { width: 100%; }
.kw-ai-res { display: grid; gap: 12px; border-top: 1px dashed var(--border); padding-top: 12px; }
.kw-ai-gh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.kw-ai-pick { cursor: pointer; border: 1px solid var(--border); background: var(--surface); font: inherit; font-size: 13px; }
.kw-ai-pick.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text, var(--primary)); font-weight: 600; }
.kw-ai-have { opacity: .55; }
.kw-ai-act { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* My Leads → suggestions from the DialClient network */
.net-sug { margin: 0 0 14px; border-left: 4px solid var(--primary); }
.net-sug .ns-top, .net-sug.card-b { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.net-sug .ns-h { flex: 1; min-width: 240px; } .net-sug .ns-h b { display: block; } .net-sug .ns-h span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.ns-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); border-left: 3px solid var(--c); }
.ns-m { font-weight: 800; font-size: 12px; color: #166534; background: #dcfce7; border-radius: 6px; padding: 3px 7px; flex: none; }
.ns-t { flex: 1; min-width: 0; } .ns-t small { color: var(--muted); font-size: 12px; } .ns-t small b { color: var(--ink); }
.ns-t p { margin: 3px 0 0; font-size: 14px; font-weight: 600; }
@media (max-width: 640px) { .ns-row { flex-wrap: wrap; } }

.trial-tip { margin-bottom: 14px; border-left: 4px solid var(--primary); }

/* ---------- Apps grid (Odoo-style) ---------- */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 18px 12px; margin-top: 8px; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 6px; border-radius: 14px; color: var(--ink); text-align: center; transition: background .15s, transform .15s; }
.app-tile:hover { background: var(--bg-soft); transform: translateY(-2px); }
.app-tile:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.app-ic { position: relative; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; background: var(--ac); box-shadow: 0 6px 16px color-mix(in srgb, var(--ac) 35%, transparent); }
.app-ic svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.app-count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font: 700 11px/20px system-ui; font-style: normal; border: 2px solid var(--bg); }
.app-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.apps-mode { margin: 0; } .apps-note { margin-top: 22px; font-size: 13px; }
.apps-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 520px) { .apps-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 6px; } .app-ic { width: 54px; height: 54px; border-radius: 14px; } .app-ic svg { width: 26px; height: 26px; } .app-name { font-size: 12.5px; } }

/* Grid menu: the left menu shows icons only (names on hover) — wide screens only */
.rail-tip { position: fixed; z-index: 4000; transform: translateY(-50%); background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 8px; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow-lg); }
.rail-tip[hidden] { display: none; }
@media (min-width: 861px) {
  html.nav-grid .app { grid-template-columns: 76px minmax(0, 1fr); }
  html.nav-grid .side { padding: 18px 10px; gap: 18px; align-items: center; overflow-x: hidden; }
  html.nav-grid .side .logo span:not(.logo-mark) { display: none; }
  html.nav-grid .side-nav { width: 100%; }
  html.nav-grid .side-nav a { position: relative; justify-content: center; padding: 0; height: 44px; gap: 0; }
  html.nav-grid .side-nav a > span:not(.count) { display: none; }
  html.nav-grid .side-nav a svg { width: 21px; height: 21px; }
  html.nav-grid .side-nav .count { position: absolute; top: 3px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; }
  html.nav-grid .side .plan-card { display: none; }
  html.nav-grid .side .me-card { flex-direction: column; padding: 8px 0; gap: 6px; background: none; border: 0; }
  html.nav-grid .side .me-card > div { display: none; }
}
.apps-head-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.apps-head-acts .btn svg { vertical-align: -3px; }
.inst-steps { margin: 10px 0 0; padding-left: 20px; line-height: 1.7; }
/* opened from the home screen (standalone app) */
@media (display-mode: standalone) { .top { padding-top: max(10px, env(safe-area-inset-top)); } }

/* Admin → Overview: 2-step sign-in set-up */
.tf-steps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 12px; line-height: 1.5; }
.tf-key { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0; }
.tf-key code { font: 600 15px/1.4 ui-monospace, monospace; letter-spacing: .06em; background: var(--bg-soft); padding: 6px 10px; border-radius: 8px; word-break: break-all; }
.tf-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; } .tf-row .input { width: 180px; }
.tf-backup { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 12px 0; }
.tf-backup code { font: 600 14px ui-monospace, monospace; background: var(--bg-soft); padding: 8px; border-radius: 8px; text-align: center; }

/* Admin → Website traffic: funnel */
.fn-card { margin-bottom: 16px; }
.fn { display: grid; gap: 8px; }
.fn-step { position: relative; display: grid; grid-template-columns: 1fr auto minmax(140px, auto); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; overflow: hidden; }
.fn-step > *:not(.fn-bar) { position: relative; z-index: 1; } .fn-step b { font-size: 18px; } .fn-step small { color: var(--muted); text-align: right; }
.fn-bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--primary-soft); border-radius: 10px; }
.fn-note { font-size: 13px; margin: 6px 0 0; }
@media (max-width: 560px) { .fn-step { grid-template-columns: 1fr auto; } .fn-step small { grid-column: 1 / -1; text-align: left; } }
.rm-box { margin: 8px 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); line-height: 1.8; }
/* 2-step sign-in: app and email side by side */
.tf-ms { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 900px) { .tf-ms { grid-template-columns: 1fr; } }
.tf-m { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 10px; align-content: start; }
.tf-m.on { border-color: var(--success); }
.tf-mh { display: flex; gap: 10px; align-items: flex-start; }
.tf-mh > div { flex: 1; } .tf-mh b { display: block; } .tf-mh small { color: var(--muted); font-size: 12.5px; }
.tf-ic { font-size: 20px; line-height: 1; }
.tf-m .btn { justify-self: start; }
.tf-sent { font-size: 13px; margin: 0 0 6px; }
