/* LeadDNA mobile app design (navy → teal hero, bottom tabs, card lists) plus shared pieces used at all sizes. */
.page-head { display: block; }
.ph-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ph-main h1 { font: 800 26px/1.2 var(--display); letter-spacing: -.8px; margin: 0 0 5px; color: var(--text); }
.ph-main p { color: var(--text-2); margin: 0; font-size: 13.5px; max-width: 72ch; }
.ph-main .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mh-top, .bottom-nav, .m-only, .m-search { display: none; }

.cat-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.cat-ico svg { width: 21px; height: 21px; }
.cat-sun { background: var(--sun-weak); color: #d0790a; } .cat-blue { background: var(--blue-weak); color: var(--blue); } .cat-teal { background: var(--accent-weak); color: var(--accent); }
.cat-violet { background: var(--violet-weak); color: var(--violet); } .cat-green { background: var(--tier-a-bg); color: var(--tier-a); } .cat-red { background: var(--danger-weak); color: var(--danger); }
.scorebox { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 54px; height: 50px; border-radius: 10px; background: var(--bg-sub); color: var(--text-2); flex: none; }
.scorebox b { font: 800 19px/1 var(--display); } .scorebox small { font-size: 10px; margin-top: 2px; font-weight: 600; }
.scorebox.tA { background: var(--tier-a-bg); color: var(--tier-a); } .scorebox.tB { background: var(--sun-weak); color: #c96f00; } .scorebox.tC { background: var(--tier-c-bg); color: var(--tier-c); }
.stage-pill { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 30px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--blue-weak); color: var(--blue); }
.stage-pill.s-Qualified, .stage-pill.s-Won { background: var(--tier-a-bg); color: var(--tier-a); }
.stage-pill.s-Contacted, .stage-pill.s-Research { background: var(--sun-weak); color: #c96f00; }
.stage-pill.s-Meeting, .stage-pill.s-SiteSurvey { background: var(--violet-weak); color: var(--violet); }
.stage-pill.s-Proposal, .stage-pill.s-Negotiation { background: var(--accent-weak); color: var(--accent-ink); }
.stage-pill.s-Lost { background: var(--danger-weak); color: var(--danger); }

/* AI banner + quick actions (all sizes) */
.agent-banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 16px; margin-bottom: 22px; color: #fff; background: radial-gradient(120% 160% at 100% 0%, rgba(255,255,255,.18), transparent 50%), linear-gradient(110deg, #0d9b8f 0%, #0b7f8a 55%, #0b5f80 100%); box-shadow: 0 10px 26px -12px rgba(11,140,140,.7); }
.agent-banner .bico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.18); flex: none; }
.agent-banner .bico svg { width: 26px; height: 26px; }
.agent-banner h3 { margin: 0 0 3px; font: 800 17px var(--display); color: #fff; }
.agent-banner p { margin: 0; color: #d7f3ef; font-size: 13px; line-height: 1.45; }
.agent-banner .grow { flex: 1; min-width: 0; }
.agent-banner .btn { background: #fff; color: var(--navy); border-color: #fff; border-radius: 30px; height: 40px; padding: 0 18px; box-shadow: none; }
.agent-banner .btn svg { color: var(--navy); }
.qa-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.qa { border: 0; border-radius: 14px; padding: 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 700; font-size: 12.5px; color: var(--text); line-height: 1.3; text-decoration: none; }
.qa:hover { filter: brightness(.97); text-decoration: none; }
.qa svg { width: 28px; height: 28px; }
.qa small { font-weight: 500; color: var(--text-2); font-size: 11px; }
.qa.teal { background: var(--accent-weak); } .qa.teal svg { color: var(--accent); }
.qa.blue { background: var(--blue-weak); } .qa.blue svg { color: var(--blue); }
.qa.sun { background: var(--sun-weak); } .qa.sun svg { color: #e9800d; }
.qa.violet { background: var(--violet-weak); } .qa.violet svg { color: var(--violet); }
.opp { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); box-shadow: var(--shadow-card); cursor: pointer; margin-bottom: 10px; }
.opp .grow { flex: 1; min-width: 0; }
.opp .t { font: 700 14.5px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opp .s { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opp > svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.sec-title { display: flex; align-items: center; margin: 4px 0 12px; }
.sec-title h2 { font: 800 18px var(--display); margin: 0; letter-spacing: -.3px; flex: 1; }
.sec-title a { font-weight: 700; font-size: 13px; }

/* lead cards + discovery */
.lcard { border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); box-shadow: var(--shadow-card); margin-bottom: 12px; overflow: hidden; }
.lcard .top { display: flex; gap: 12px; padding: 14px; align-items: center; cursor: pointer; }
.lcard .cat-ico { width: 62px; height: 62px; border-radius: 12px; } .lcard .cat-ico svg { width: 28px; height: 28px; }
.lcard .info { flex: 1; min-width: 0; }
.lcard .nm { font: 800 15px/1.3 var(--display); }
.lcard .pl, .lcard .mt { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcard .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.lcard .acts { display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-top: 1px solid var(--border); }
.lcard .acts a, .lcard .acts button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--text-2); font-size: 12.5px; font-weight: 600; padding: 7px 8px; border-radius: 8px; text-decoration: none; }
.lcard .acts a svg, .lcard .acts button svg { width: 15px; height: 15px; color: var(--blue); }
.lcard .acts .pri { margin-left: auto; background: var(--blue-weak); color: var(--blue); border-radius: 20px; padding: 7px 12px; }
.disc { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 18px; padding: 16px; box-shadow: var(--shadow-card); margin-bottom: 16px; }
.disc .grid2 { gap: 12px; }
.disc .field > span { font-size: 12.5px; color: var(--text); }
.btn.grad { width: 100%; height: 50px; border-radius: 14px; border: 0; color: #fff; font-size: 15px; background: linear-gradient(100deg, #0d3f73 0%, #0b6f88 55%, #0bb3a2 100%); box-shadow: 0 10px 24px -12px rgba(11,111,136,.8); margin-top: 14px; }
.btn.grad svg { color: #fff; width: 19px; height: 19px; }
.stabs { display: flex; gap: 6px; overflow-x: auto; margin: 4px 0 14px; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.stabs button { border: 0; background: none; padding: 10px 8px; font-weight: 700; color: var(--text-3); white-space: nowrap; border-bottom: 3px solid transparent; display: inline-flex; gap: 6px; align-items: center; }
.stabs button span { background: var(--bg-sub); border-radius: 12px; padding: 1px 8px; font-size: 12px; }
.stabs button.on { color: var(--accent-ink); border-bottom-color: var(--accent); }
.stabs button.on span { background: var(--accent-weak); }

/* AI agents + campaigns */
.agent-tiles { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.agent-tile { border: 1px solid var(--border); background: var(--bg-elev); border-radius: 14px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text); text-align: center; line-height: 1.25; box-shadow: var(--shadow-sm); }
.agent-tile svg { width: 28px; height: 28px; color: var(--navy); }
.agent-tile.on { border-color: var(--accent); background: var(--accent-weak); box-shadow: inset 0 -3px 0 var(--accent); }
.agent-card { display: flex; gap: 14px; align-items: flex-start; }
.agent-card .av { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, #0bb3a2, #0b6f88); color: #fff; flex: none; }
.agent-card .av svg { width: 30px; height: 30px; }
.agent-card h3 { margin: 0 0 4px; font: 800 18px var(--display); }
.caps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 14px; }
.caps button { border: 0; background: var(--bg-sub); border-radius: 10px; padding: 10px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text); text-align: left; }
.caps button svg { width: 18px; height: 18px; color: var(--blue); flex: none; }
.taskbox .chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.taskbox .chips label { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px; border-radius: 10px; background: var(--blue-weak); font-size: 12.5px; font-weight: 600; }
.taskbox .chips label svg { color: var(--navy); width: 15px; height: 15px; flex: none; }
.taskbox .chips input { border: 0; background: none; outline: none; width: 150px; font-weight: 600; }
.act-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); cursor: pointer; }
.act-row:first-child { border-top: 0; }
.act-row:hover { background: var(--bg-hover); }
.act-row .ai-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent); flex: none; }
.act-row .ai-ic svg { width: 19px; height: 19px; }
.act-row .grow { flex: 1; min-width: 0; }
.act-row .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-row .s { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-row .time { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.act-row > svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.ch-tabs { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.ch-tabs button { border: 1px solid var(--border); background: var(--bg-elev); border-radius: 12px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--text); }
.ch-tabs button svg { width: 22px; height: 22px; color: var(--navy); }
.ch-tabs button.on { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.mstats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.mstat { border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 10px; background: var(--bg-elev); border: 1px solid var(--border); }
.mstat .ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mstat .ic svg { width: 19px; height: 19px; }
.mstat b { display: block; font: 800 20px/1.1 var(--display); }
.mstat small { font-size: 11.5px; color: var(--text-3); }
.ccard { border: 1px solid var(--border); border-radius: 16px; background: var(--bg-elev); box-shadow: var(--shadow-card); margin-bottom: 12px; padding: 14px; display: flex; gap: 12px; align-items: center; }
.ccard .grow { flex: 1; min-width: 0; }
.ccard .t { font: 800 15px var(--display); }
.ccard .s { font-size: 12.5px; color: var(--text-3); }

/* lead detail (side panel, all sizes) */
.ld-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); }
.ld-chips span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ld-chips span b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-chips svg { width: 16px; height: 16px; color: var(--navy); flex: none; }
.ld-score { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 16px; align-items: center; background: var(--blue-weak); border-radius: 16px; padding: 16px 18px; margin: 4px 0 12px; }
.ld-score .k { font: 800 13px var(--display); margin-bottom: 6px; }
.ld-score .sep { background: var(--border-strong); height: 70%; }
.ld-score .gauge.lg { width: 78px; height: 78px; } .ld-score .gauge.lg b { font-size: 24px; } .ld-score .gauge.lg::before { inset: 7px; }
.ld-score .pot { display: flex; align-items: center; gap: 10px; }
.ld-score .pot svg { width: 34px; height: 34px; color: var(--navy); flex: none; }
.ld-score .pot b { display: block; font: 800 19px var(--display); }
.ld-score .pot small { color: var(--text-2); font-size: 12px; }
.ld-insight { display: flex; gap: 12px; background: var(--accent-weak); border-radius: 14px; padding: 14px 16px; margin-bottom: 14px; }
.ld-insight svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.ld-insight b { display: block; font: 800 13.5px var(--display); color: var(--accent-ink); margin-bottom: 2px; }
.ld-insight span { font-size: 13px; line-height: 1.5; }
.irows { padding: 0 20px 10px; }
.irow { display: grid; grid-template-columns: 22px 130px minmax(0,1fr); gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--border); font-size: 13px; }
.irow:first-child { border-top: 0; }
.irow svg { width: 17px; height: 17px; color: var(--navy); }
.irow .k { color: var(--text-2); }
.irow .v { min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.next-acts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; padding: 0 16px 16px; }
.ld-foot { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 20px; background: var(--bg-elev); border-top: 1px solid var(--border); z-index: 3; }
.ld-foot .btn { height: 46px; border-radius: 12px; font-size: 14px; }
.ld-foot .btn.primary { background: linear-gradient(100deg, #0b6f88, #0bb3a2); border: 0; }
:root[data-theme="dark"] .agent-tile svg, :root[data-theme="dark"] .ld-chips svg, :root[data-theme="dark"] .irow svg, :root[data-theme="dark"] .ld-score .pot svg, :root[data-theme="dark"] .ch-tabs button svg { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .agent-tile svg, :root:not([data-theme="light"]) .ld-chips svg, :root:not([data-theme="light"]) .irow svg, :root:not([data-theme="light"]) .ld-score .pot svg, :root:not([data-theme="light"]) .ch-tabs button svg { color: var(--accent); } }

@media (max-width: 860px) {
  .header { display: none; }
  .view { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .page { padding: 0 14px 24px; }
  .m-only { display: block; }
  .m-hide { display: none !important; }
  .page-head { margin: 0 -14px; padding: calc(12px + env(safe-area-inset-top)) 18px 24px; color: #fff; border-radius: 0 0 26px 26px;
    background: radial-gradient(90% 90% at 100% 0%, rgba(32,190,170,.35), transparent 55%), linear-gradient(160deg, #0a2448 0%, #0c3d6b 55%, #0d5f7f 100%); }
  .page-head ~ * { position: relative; }
  .page-head + * { margin-top: 16px; }
  .mh-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
  .mh-top .spacer { flex: 1; }
  .mh-brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
  .mh-brand:hover { text-decoration: none; }
  .mh-plane { width: 40px; height: 40px; color: #23c7b5; filter: drop-shadow(0 4px 10px rgba(35,199,181,.45)); }
  .mh-brand b { display: block; font: 800 24px/1 var(--display); letter-spacing: -1px; color: #fff; }
  .mh-brand b em { font-style: normal; color: #2fd2bf; }
  .mh-brand small { display: block; font-size: 11.5px; color: #a9c2dc; margin-top: 3px; }
  .mh-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; }
  .mh-btn svg { width: 22px; height: 22px; }
  .mh-avatar { background: #0e2d52; box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); }
  .badge { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px; background: #ef4444; color: #fff; font: 700 10.5px/18px var(--font); text-align: center; }
  .ph-main h1 { color: #fff; font-size: 28px; }
  .ph-main p { color: #c9d9ea; font-size: 14px; }
  .ph-main .actions .btn:not(.primary) { display: none; }
  .ph-main .actions .btn.primary { background: transparent; border: 1.5px solid rgba(255,255,255,.7); box-shadow: none; border-radius: 14px; height: 40px; }
  .ph-main .actions .btn .kbd { display: none; }
  .m-search { display: flex; align-items: center; gap: 10px; margin-top: 16px; height: 50px; padding: 0 14px; border-radius: 14px; background: #fff; color: #8392a8; border: 0; width: 100%; font-size: 14px; box-shadow: 0 8px 20px -10px rgba(0,0,0,.45); }
  .m-search svg { width: 20px; height: 20px; color: #101f3b; }
  .m-search span { flex: 1; text-align: left; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--bg-elev); border-top: 1px solid var(--border); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px -10px rgba(16,31,59,.2); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 5px; color: var(--text-3); font-size: 11.5px; font-weight: 600; text-decoration: none; position: relative; }
  .bottom-nav a svg { width: 25px; height: 25px; }
  .bottom-nav a.on { color: var(--accent); }
  .bottom-nav a.on::after { content: ''; position: absolute; bottom: -4px; width: 24px; height: 3px; border-radius: 3px; background: var(--accent); }
  .peek, .peek-back { z-index: 47; }
  .bulkbar { bottom: 96px; }
  /* home tiles */
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { min-height: 0; padding: 12px; display: grid; grid-template-columns: 46px minmax(0,1fr) 12px; grid-template-areas: "ic val ch" "ic lbl ch"; align-items: center; column-gap: 10px; border: 0; box-shadow: none; background: var(--blue-weak); }
  .kpi .label { display: contents; }
  .kpi .label > span { grid-area: lbl; font-size: 12.5px; font-weight: 500; color: var(--text-2); line-height: 1.2; }
  .kpi .label > svg { grid-area: ic; width: 46px; height: 46px; padding: 11px; border-radius: 50%; background: rgba(58,111,216,.14); color: var(--blue); }
  .kpi .value { grid-area: val; padding: 0; font-size: 22px; }
  .kpi .sub { display: none; }
  .kpi::after { content: '›'; grid-area: ch; font-size: 22px; color: var(--text-3); }
  .kpi.green { background: var(--tier-a-bg); } .kpi.green .label > svg { background: rgba(18,160,92,.14); color: var(--tier-a); }
  .kpi.sun { background: var(--sun-weak); } .kpi.sun .label > svg { background: rgba(240,160,32,.2); color: #e9800d; }
  .kpi.blue { background: var(--violet-weak); } .kpi.blue .label > svg { background: rgba(122,92,240,.15); color: var(--violet); }
  .agent-banner { padding: 16px; gap: 12px; }
  .agent-banner h3 { font-size: 16px; } .agent-banner p { font-size: 12.5px; }
  .agent-banner .bico { width: 46px; height: 46px; }
  .agent-banner .btn { padding: 0 14px; height: 38px; }
  .qa-grid { gap: 8px; }
  .qa { padding: 14px 6px; font-size: 12px; } .qa svg { width: 26px; height: 26px; }
  .agent-tiles { grid-template-columns: repeat(6, 92px); overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .caps { grid-template-columns: 1fr 1fr; }
  .mstats { grid-template-columns: 1fr 1fr; }
  .next-acts { padding: 0 12px 14px; }
  .next-acts .qa { padding: 12px 4px; font-size: 11.5px; }
  .ld-score { grid-template-columns: auto 1px 1fr; }
  .irow { grid-template-columns: 22px 96px minmax(0,1fr); }
  .board-wrap .page { padding-bottom: 0; }
  .board { padding-top: 16px; }
  .chat-log { padding-top: 0; }
  .chat-inner { padding: 0 14px; }
  .chat-inner > .page-head { margin: 0 -14px 16px; }
}
.cat-ico.big { width: 72px; height: 72px; border-radius: 14px; } .cat-ico.big svg { width: 32px; height: 32px; }
.peek-head .crumb { margin-left: 2px; }
@media (max-width: 860px) { .chat-hero-m .page-head { margin: 0 0 16px; } .chat-hero-m + .chat-inner .chat-hero { padding-top: 0; } .chat-compose { padding-bottom: 12px; } }
@media (max-width: 860px) { .disc .grid2 { grid-template-columns: 1fr 1fr; } .disc .field > span { font-size: 12px; } .stabs.m-only { display: flex; flex-wrap: nowrap; } .disc .select, .disc .input { padding-left: 10px; font-size: 13px; } }

/* ---------------------------------------------------------------- mockup fidelity pass (components, all sizes) */
.thumb { position: relative; display: inline-grid; flex: none; border-radius: 12px; overflow: hidden; }
.thumb > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg-sub); }
.lcard .thumb, .lcard .thumb .cat-ico { width: 78px; height: 72px; border-radius: 10px; }
.thumb.big, .thumb.big .cat-ico { width: 96px; height: 84px; border-radius: 12px; }
.thumb.big .cat-ico svg { width: 34px; height: 34px; }
.sat-wrap { position: relative; margin: 0 20px 12px; border-radius: 12px; overflow: hidden; background: var(--bg-sub); }
.sat-wide { display: block; width: 100%; aspect-ratio: 480 / 300; object-fit: cover; }
.roof-box { position: absolute; right: 10px; bottom: 26px; display: flex; gap: 8px; align-items: center; background: rgba(255,255,255,.94); color: #172b4d; border-radius: 10px; padding: 8px 12px; box-shadow: var(--shadow-md); }
.roof-box svg { width: 20px; height: 20px; color: #101f3b; }
.roof-box small { display: block; font-size: 10.5px; color: #55657e; } .roof-box b { display: block; font: 800 15px var(--display); }
.stage-sel { height: 30px; width: auto; font-size: 12.5px; font-weight: 700; padding: 0 28px 0 12px; border-radius: 20px; background-color: var(--tier-a-bg); color: var(--tier-a); border: 0; flex: none; }
.ifield { position: relative; }
.ifield > svg { position: absolute; left: 11px; bottom: 11px; width: 17px; height: 17px; color: var(--navy); pointer-events: none; }
.ifield .input, .ifield .select { padding-left: 36px; }
.sec-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent); flex: none; }
.sec-ic svg { width: 17px; height: 17px; }
.attach { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 13px; cursor: pointer; }
.attach svg { width: 17px; height: 17px; }
.cmetrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.cmetrics div { padding-left: 8px; border-left: 1px solid var(--border); } .cmetrics div:first-child { border-left: 0; padding-left: 0; }
.cmetrics b { display: block; font: 800 15px var(--display); } .cmetrics small { font-size: 11px; color: var(--text-3); }
.ccard { cursor: pointer; }
/* campaign builder */
.wiz { display: flex; align-items: flex-start; margin: 4px 0 16px; }
.wiz .ws { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-3); flex: none; width: 74px; text-align: center; }
.wiz .ws i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: #6b7a90; color: #fff; font-size: 13px; }
.wiz .ws.now i, .wiz .ws.done i { background: var(--accent); } .wiz .ws.now { color: var(--text); } .wiz .ws.done { color: var(--text-2); }
.wiz .wl { flex: 1; height: 2px; background: var(--border-strong); margin-top: 14px; }
.seg-tiles { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; }
.seg-tile { position: relative; border: 1px solid var(--border); background: var(--bg-elev); border-radius: 12px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.seg-tile .cat-ico { width: 38px; height: 38px; } .seg-tile b { font-size: 12px; } .seg-tile small { font-size: 11px; color: var(--text-3); }
.seg-tile.on { border: 2px solid var(--accent); background: var(--accent-weak); }
.seg-tile em { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; }
.seg-tile em svg { width: 12px; height: 12px; }
.rcp-list { max-height: 340px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.rcp { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--border); cursor: pointer; }
.rcp:first-child { border-top: 0; }
.rcp .cat-ico { width: 34px; height: 34px; border-radius: 9px; } .rcp .cat-ico svg { width: 16px; height: 16px; }
.rcp .grow { flex: 1; min-width: 0; } .rcp b { display: block; font-size: 13px; } .rcp small { font-size: 11.5px; color: var(--text-3); }
.rcp input { width: 18px; height: 18px; accent-color: var(--accent); }
.msg-grid { display: grid; grid-template-columns: minmax(0,1fr) 150px; gap: 10px; align-items: start; }
.ins { display: flex; flex-direction: column; gap: 6px; padding-top: 24px; }
.ins button { border: 0; background: var(--blue-weak); color: var(--blue); border-radius: 8px; padding: 7px 8px; font-size: 11.5px; font-weight: 700; display: flex; gap: 6px; align-items: center; text-align: left; }
.ins button svg { width: 14px; height: 14px; flex: none; }
.rcp-row { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; padding: 0 20px 16px; }
.rcp-card { display: flex; gap: 8px; align-items: center; border: 1px solid var(--border); border-radius: 10px; padding: 8px; min-width: 0; }
.rcp-card .cat-ico { width: 32px; height: 32px; border-radius: 8px; } .rcp-card .cat-ico svg { width: 16px; height: 16px; }
.rcp-card b { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .rcp-card small { font-size: 11px; color: var(--text-3); }
.rcp-card > div { min-width: 0; } .rcp-card.more { justify-content: center; font-weight: 700; color: var(--accent-ink); }
pre.prev { white-space: pre-wrap; font: 13px/1.6 var(--font); background: var(--bg-sub); border-radius: 10px; padding: 12px; margin: 0; color: var(--text-2); }
.wiz-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.wiz-foot .btn { height: 46px; border-radius: 12px; font-size: 14px; }
.wiz-foot .btn.primary { background: linear-gradient(100deg, #0b6f88, #0bb3a2); border: 0; }

@media (max-width: 860px) {
  body { font-size: 13px; }
  /* compact hero with a rounded white sheet underneath, as in the mockups */
  .page-head { border-radius: 0; padding: calc(8px + env(safe-area-inset-top)) 16px 0; }
  .page-head::after { content: ''; display: block; height: 22px; margin: 18px -16px 0; background: var(--bg); border-radius: 22px 22px 0 0; }
  .page-head + * { margin-top: 0; }
  .mh-top { margin-bottom: 12px; gap: 8px; }
  .mh-plane { width: 34px; height: 34px; }
  .mh-brand b { font-size: 21px; } .mh-brand small { font-size: 10.5px; margin-top: 2px; }
  .mh-btn { width: 38px; height: 38px; } .mh-btn svg { width: 20px; height: 20px; }
  .mh-avatar { background: #fff; color: #101f3b; box-shadow: none; }
  .mh-avatar svg { fill: #101f3b; }
  .ph-main { flex-wrap: nowrap; align-items: center; gap: 10px; }
  .ph-main > div:first-child { min-width: 0; flex: 1; }
  .ph-main h1 { font-size: 23px; margin-bottom: 2px; }
  .ph-main p { font-size: 12.5px; line-height: 1.35; }
  .ph-main .actions { flex: none; }
  .ph-main .actions .btn.primary { height: 34px; padding: 0 10px; font-size: 12px; border-radius: 11px; gap: 5px; }
  .ph-main .actions .btn.primary svg { width: 14px; height: 14px; }
  .m-search { height: 44px; margin-top: 14px; font-size: 13px; border-radius: 12px; }
  .page-head:has(.m-search)::after { margin-top: -20px; position: relative; z-index: -1; }
  .page-head:has(.m-search) { padding-bottom: 0; position: relative; z-index: 1; }
  /* denser tiles and cards */
  .kpis { gap: 8px; margin-bottom: 14px; }
  .kpi { padding: 10px; grid-template-columns: 40px minmax(0,1fr) 10px; column-gap: 9px; border-radius: 12px; }
  .kpi .label > svg { width: 40px; height: 40px; padding: 10px; }
  .kpi .value { font-size: 18px; } .kpi .label > span { font-size: 11.5px; }
  .agent-banner { padding: 12px 14px; gap: 10px; margin-bottom: 16px; border-radius: 14px; }
  .agent-banner .bico { width: 42px; height: 42px; } .agent-banner .bico svg { width: 22px; height: 22px; }
  .agent-banner h3 { font-size: 14.5px; margin-bottom: 1px; } .agent-banner p { font-size: 11.5px; line-height: 1.35; }
  .agent-banner .btn { height: 34px; padding: 0 12px; font-size: 12px; }
  .sec-title { margin: 2px 0 8px; } .sec-title h2 { font-size: 16px; } .sec-title a { font-size: 12.5px; }
  .opp { padding: 9px 11px; margin-bottom: 8px; border-radius: 12px; gap: 10px; }
  .opp .cat-ico { width: 40px; height: 40px; border-radius: 10px; } .opp .cat-ico svg { width: 19px; height: 19px; }
  .opp .t { font-size: 13.5px; } .opp .s { font-size: 11.5px; }
  .stage-pill { height: 24px; padding: 0 10px; font-size: 11.5px; }
  .qa-grid { gap: 7px; margin-bottom: 16px; } .qa { padding: 12px 4px; font-size: 11.5px; border-radius: 12px; gap: 6px; } .qa svg { width: 24px; height: 24px; } .qa small { font-size: 10px; }
  /* lead discovery */
  .disc { padding: 12px; border-radius: 16px; margin-bottom: 12px; }
  .disc .grid2 { gap: 10px; }
  .disc .field { gap: 4px; } .disc .field > span { font-size: 11.5px; }
  .disc .input, .disc .select { height: 38px; font-size: 12.5px; }
  .btn.grad { height: 44px; font-size: 14px; margin-top: 12px; border-radius: 12px; }
  .stabs { margin: 0 0 10px; } .stabs button { font-size: 12.5px; padding: 8px 6px; }
  .lcard { border-radius: 14px; margin-bottom: 10px; }
  .lcard .top { padding: 10px; gap: 10px; align-items: flex-start; }
  .lcard .nm { font-size: 14px; } .lcard .pl, .lcard .mt { font-size: 11.5px; }
  .lcard .side { flex-direction: row; align-items: flex-start; gap: 6px; }
  .lcard .scorebox { width: 46px; height: 46px; } .lcard .scorebox b { font-size: 17px; } .lcard .scorebox small { font-size: 9.5px; }
  .lcard .top > .status-ico { align-self: center; }
  .lcard .acts { padding: 4px 8px; } .lcard .acts a, .lcard .acts button { font-size: 12px; padding: 6px; }
  /* AI agents */
  .agent-tiles { grid-template-columns: repeat(6, minmax(0,1fr)); gap: 5px; overflow: visible; }
  .agent-tile { padding: 8px 2px; font-size: 9.5px; border-radius: 10px; gap: 4px; }
  .agent-tile svg { width: 22px; height: 22px; }
  .card { padding: 14px; } .card h3 { font-size: 15px; }
  .agent-card .av { width: 52px; height: 52px; } .agent-card .av svg { width: 26px; height: 26px; }
  .agent-card h3 { font-size: 16px; } .agent-card p { font-size: 12.5px; }
  .caps { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; margin-top: 10px; }
  .caps button { flex-direction: column; text-align: center; padding: 8px 4px; font-size: 10.5px; gap: 4px; }
  .taskbox .chips label { height: 32px; font-size: 11.5px; } .taskbox .chips input { width: 110px; }
  .act-row { padding: 10px 12px; gap: 10px; } .act-row .ai-ic { width: 36px; height: 36px; } .act-row .t { font-size: 12.5px; } .act-row .s { font-size: 11px; } .act-row .time { font-size: 11px; }
  /* campaigns */
  .ch-tabs { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .ch-tabs button { flex: none; min-width: 74px; padding: 8px 8px; font-size: 11px; gap: 4px; border-radius: 10px; }
  .ch-tabs button svg { width: 19px; height: 19px; }
  .mstats { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px; }
  .mstat { flex-direction: column; text-align: center; padding: 8px 4px; gap: 4px; border-radius: 12px; }
  .mstat .ic { width: 32px; height: 32px; } .mstat .ic svg { width: 16px; height: 16px; }
  .mstat b { font-size: 16px; } .mstat small { font-size: 10px; line-height: 1.2; display: block; }
  .ccard { padding: 10px 12px; border-radius: 14px; align-items: flex-start; }
  .ccard .t { font-size: 14px; } .ccard .s { font-size: 11.5px; }
  .seg-tiles { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .msg-grid { grid-template-columns: minmax(0,1fr) 108px; }
  .ins { padding-top: 22px; } .ins button { font-size: 10.5px; padding: 6px; }
  .rcp-row { grid-template-columns: 1fr 1fr; padding: 0 12px 12px; }
  .wiz .ws { width: 62px; font-size: 10.5px; }
  /* lead detail: gradient brand bar on top, bottom tabs stay visible */
  .peek { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .bottom-nav { z-index: 48; }
  .peek-head.ld-bar { background: linear-gradient(160deg, #0a2448 0%, #0c3d6b 60%, #0d5f7f 100%); border-bottom: 0; padding: 8px 12px; color: #fff; }
  .peek-head.ld-bar .btn.ghost { color: #fff; } .peek-head.ld-bar .btn.ghost svg { color: #fff; }
  .peek-head.ld-bar .mh-brand { display: flex; } .peek-head.ld-bar .mh-plane { width: 30px; height: 30px; } .peek-head.ld-bar .mh-brand b { font-size: 18px; }
  .peek-head.ld-bar .mh-btn { width: 34px; height: 34px; display: grid; }
  .peek-hero { padding: 14px 14px 0; border-radius: 18px 18px 0 0; margin-top: -2px; }
  .peek-title { gap: 10px; margin-bottom: 10px; }
  .thumb.big, .thumb.big .cat-ico { width: 104px; height: 88px; }
  .peek-title h2 { font-size: 17px; }
  .peek-title .addr { font-size: 12px; }
  .stage-sel { height: 26px; font-size: 11.5px; padding: 0 24px 0 9px; }
  .ld-chips { grid-template-columns: 1fr 1fr; font-size: 11.5px; gap: 4px 8px; }
  .ld-score { padding: 12px 14px; margin: 0 0 10px; gap: 12px; } .ld-score .gauge.lg { width: 70px; height: 70px; } .ld-score .gauge.lg b { font-size: 21px; }
  .ld-score .k { font-size: 12px; } .ld-score .pot b { font-size: 16px; } .ld-score .pot svg { width: 30px; height: 30px; }
  .ld-insight { padding: 10px 12px; margin-bottom: 8px; } .ld-insight span { font-size: 12px; }
  .tabs { overflow-x: auto; scrollbar-width: none; } .tabs button { font-size: 12.5px; padding: 10px 8px; white-space: nowrap; }
  .peek-pane { padding: 12px 12px 16px; }
  .peek-pane .panel-head { padding: 12px 14px 8px; } .peek-pane .panel-head h2 { font-size: 14.5px; }
  .irows { padding: 0 14px 6px; } .irow { font-size: 12.5px; padding: 7px 0; }
  .sat-wrap { margin: 0 14px 10px; }
  .ld-foot { padding: 10px 12px; } .ld-foot .btn { height: 42px; font-size: 13px; }
}

@media (max-width: 860px) {
  /* app.css makes .page-head .actions full width on phones; in the hero the action sits beside the title */
  .page-head .ph-main .actions { width: auto; max-width: 48%; }
  .page-head .ph-main .actions .btn.primary { white-space: nowrap; }
  .ld-insight span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .ld-foot { position: static; margin: 0 12px 16px; padding: 0; background: none; border: 0; }
}
