/* Akshar CRM design system (spec section 9) */
:root {
  --t-red: #FDE3DE; --t-red2: #FDF1F0; --t-orange: #FCEBD9; --t-blue: #E4EEFB; --t-green: #E3F2E7; --t-green-strong: #D5E8DB; --t-purple: #EFEAFD;
  --surface-2: #FBFAF6; --surface-3: #F4F3EE; --line-soft: #EFEDE6;
  --green: #1E6B3F; --green-ink: #1E6B3F; --green-press: #14502E; --green-tint: #E6F0E9;
  --bg: #F5F4EE; --card: #FFFFFF; --border: #E2E0D6;
  --text: #1B1F1A; --muted: #5B6157;
  --amber: #9A5B00; --amber-bg: #FBF0DF;
  --red: #A3261C; --red-bg: #F8E6E4;
  --blue: #2F3E66; --blue-bg: #EEF0F6;
  --grey-bg: #ECEBE5;
  --r-card: 16px; --r-ctl: 12px;
  --font: 'Hind Vadodara', 'Noto Sans Gujarati', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; }
a { color: var(--green-ink); }
h1 { font-size: 24px; margin: 0 0 4px; font-weight: 600; }
h2 { font-size: 20px; margin: 0 0 12px; font-weight: 600; }
h3 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }

/* layout */
.shell { display: grid; grid-template-columns: 228px 1fr; min-height: 100vh; }
.side { background: var(--card); border-right: 1px solid var(--border); padding: 20px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; font-weight: 700; font-size: 17px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--green); display: grid; place-items: center; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; min-height: 44px; }
.nav a:hover { background: var(--bg); }
.nav a.on { background: var(--green-tint); color: var(--green-press); }
.side .who { margin-top: auto; padding: 12px; border-top: 1px solid var(--border); font-size: 13px; }
.main { padding: 24px 28px 80px; max-width: 1280px; width: 100%; }
.topbar { display: none; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--border); padding: 8px 12px; gap: 6px; overflow-x: auto; }
  .topbar a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; }
  .topbar a.on { background: var(--green-tint); color: var(--green-press); }
  .main { padding: 16px 16px 96px; }
}
.embed .side, .embed .topbar { display: none; }
.embed .shell { grid-template-columns: 1fr; }
.embed .main { padding: 12px 12px 110px; }

/* cards & grid */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 18px; }
.card + .card { margin-top: 14px; }
.grid > .card, .stack > .card { margin-top: 0; }
.stack > .card + .card { margin-top: 12px; }
.check .dot { margin-top: 7px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.review-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .review-grid { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* KPI tiles */
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px 16px; }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-size: 28px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 13px; color: var(--muted); }

/* forms */
label.f { display: block; font-size: 13px; color: var(--muted); font-weight: 500; }
label.f > span.lbl { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 10px 12px; min-height: 44px; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green-ink); }
.confirm input, .confirm select, .confirm textarea { border-color: var(--amber); background: var(--surface-2); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: 15px; margin-bottom: 10px; padding: 0; }
.fgroup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fgroup .wide { grid-column: 1 / -1; }
@media (max-width: 520px) { .fgroup { grid-template-columns: 1fr; } }

/* buttons */
button, .btn { font: inherit; font-weight: 600; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 10px 16px; min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
button:hover, .btn:hover { border-color: #cfccbf; }
button.primary, .btn.primary { background: var(--green); border-color: var(--green-ink); color: #fff; min-height: 52px; padding: 12px 22px; }
button.primary:hover { background: var(--green-press); }
button.small, .btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
button.danger { color: var(--red); }
button.link { border: 0; background: none; color: var(--green-ink); padding: 0; min-height: 0; font-weight: 600; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* tags & chips */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--grey-bg); color: var(--muted); }
.tag.green, .tag.Interested, .tag.saved, .tag.Polite, .tag.Happy { background: var(--green-tint); color: var(--green-press); }
.tag.amber, .tag.Follow-up, .tag.ready, .tag.Rushed, .tag.Confused { background: var(--amber-bg); color: var(--amber); }
.tag.blue, .tag.Ordered, .tag.processing, .tag.queued { background: var(--blue-bg); color: var(--blue); }
.tag.red, .tag.failed, .tag.Rude, .tag.Angry, .tag.Upset, .tag.Do-not-call { background: var(--red-bg); color: var(--red); }
.tag.Not-interested, .tag.Wrong-number { background: var(--t-red2); color: #6E4B45; }
.tag.confirm-tag { background: var(--amber-bg); color: var(--amber); font-size: 12px; padding: 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: 14px; min-height: 36px; cursor: pointer; user-select: none; }
.chip.on { background: var(--green-tint); border-color: var(--green-ink); color: var(--green-press); font-weight: 600; }
.chip .x { border: 0; background: none; padding: 0; min-height: 0; font-size: 16px; line-height: 1; color: var(--muted); }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* score card */
.score { display: flex; gap: 16px; align-items: center; }
.score .big { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 700; background: var(--green-tint); color: var(--green-press); flex: none; }
.score .big.mid { background: var(--amber-bg); color: var(--amber); }
.score .big.low { background: var(--red-bg); color: var(--red); }
.score .big small { font-size: 13px; font-weight: 500; }
.bars { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 10px; align-items: center; font-size: 13px; }
.bar { height: 8px; background: var(--grey-bg); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.bar.amber > i { background: var(--amber); }
.bar.red > i { background: var(--red); }
.tip { background: var(--blue-bg); color: var(--blue); border-radius: var(--r-ctl); padding: 10px 12px; font-size: 14px; }
.banner { border-radius: var(--r-ctl); padding: 10px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.banner.amber { background: var(--amber-bg); color: var(--amber); }
.banner.blue { background: var(--blue-bg); color: var(--blue); }
.banner.red { background: var(--red-bg); color: var(--red); }
.banner.green { background: var(--green-tint); color: var(--green-press); }
.transcript { white-space: pre-wrap; font-size: 14px; max-height: 420px; overflow: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 12px; }
audio { width: 100%; height: 44px; }

/* sticky action bar on review */
.actionbar { position: sticky; bottom: 0; background: rgba(245, 244, 238, .96); backdrop-filter: blur(6px); padding: 12px 0; margin-top: 16px; display: flex; gap: 10px; border-top: 1px solid var(--border); z-index: 4; }
.actionbar .primary { flex: 1; }
.embed .actionbar { position: fixed; left: 0; right: 0; padding: 12px; }

/* drop zone */
.drop { border: 2px dashed #cfccbf; border-radius: var(--r-card); padding: 32px 16px; text-align: center; background: var(--card); cursor: pointer; }
.drop.over { border-color: var(--green-ink); background: var(--green-tint); }

/* tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { min-height: 40px; border-radius: 999px; }
.tabs button.on { background: var(--green); border-color: var(--green-ink); color: #fff; }

/* modal */
.modal-bg { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(27, 31, 26, .35); display: grid; place-items: center; z-index: 20; padding: 16px; }
.modal { background: var(--card); border-radius: var(--r-card); padding: 20px; width: min(520px, 100%); max-height: 90vh; overflow: auto; }

/* toast */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120%); background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; transition: transform .2s; z-index: 30; max-width: calc(100% - 32px); }
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--red); }

.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(400px, 100%); padding: 28px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.ok { background: var(--green); } .dot.bad { background: var(--red); } .dot.warn { background: var(--amber); }
.check { display: grid; grid-template-columns: 18px 1fr; gap: 8px; align-items: start; font-size: 14px; }
details > summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.hidden { display: none !important; }

/* ================= Salesmax-style layout (v2) ================= */
:root { --pipe-new: #1E6B3F; --pipe-pros: #2F5DA8; --pipe-opp: #9A5B00; --pipe-won: #14502E; --pipe-lost: #7A4A44; }
body { background: var(--bg); }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.appwrap { max-width: 600px; margin: 0 auto; min-height: 100vh; padding: 0 12px 96px; }
.appwrap.wide { max-width: 1240px; }
.screen { padding-top: 8px; }
.banner.slim { margin: 8px 0 0; padding: 6px 12px; font-size: 13px; }
.spacer { flex: 1; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34%; }
.redtxt { color: var(--red); }
.link { color: var(--green-ink); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; min-height: 0; cursor: pointer; }

/* bottom navigation */
.bottomnav { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: min(600px, 100%); background: var(--card); border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 10; }
.bottomnav a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: .3px; min-height: 48px; justify-content: center; }
.bottomnav .navic { width: 52px; height: 30px; border-radius: 15px; display: grid; place-items: center; }
.bottomnav a.on { color: var(--green-ink); }
.bottomnav a.on .navic { background: var(--green-tint); }

/* top areas */
.hometop { display: flex; align-items: center; gap: 10px; padding: 6px 0 12px; }
.logodots { display: grid; grid-template-columns: 8px 8px; gap: 4px; flex: none; }
.logodots i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: block; }
.logodots i:nth-child(2), .logodots i:nth-child(3) { background: #8BB89C; }
.logodots.sm { transform: scale(.85); }
.ws { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ws b { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; background: none; border-radius: 12px; display: inline-grid; place-items: center; color: var(--text); cursor: pointer; text-decoration: none; }
.iconbtn:hover { background: rgba(0,0,0,.05); }
.iconbtn.light { color: #fff; }
.iconbtn.done { color: var(--pipe-pros); }
.topbar2 { display: flex; align-items: center; gap: 6px; padding: 6px 0 10px; }
.tb-title { font-size: 20px; margin: 0; }
.searchbar { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; }
.sbox { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 0 14px; color: var(--muted); }
.sbox input { border: 0; background: none; padding: 10px 0; min-height: 44px; outline: none; }
.sbox:focus-within { border-color: var(--green-ink); }

/* blocks */
.block { margin: 4px 0 16px; }
.bhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.bhead h2, .bhead h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 17px; }
.emptysm { text-align: center; color: var(--muted); padding: 22px 12px; background: var(--card); border: 1px dashed var(--border); border-radius: 14px; font-size: 14px; }
.daygroup { font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 4px 6px; letter-spacing: .4px; }

/* pipeline tiles */
.ptiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ptile { border-radius: 16px; padding: 12px; color: #fff; text-decoration: none; min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; }
.pt-top { display: flex; justify-content: space-between; align-items: flex-start; }
.pt-top b { font-size: 26px; line-height: 1; }
.pt-top small { font-size: 12px; font-weight: 600; opacity: .9; }
.pt-label { font-size: 15px; font-weight: 500; line-height: 1.2; }
.p-new { background: var(--pipe-new); } .p-pros { background: var(--pipe-pros); } .p-opp { background: var(--pipe-opp); } .p-won { background: var(--pipe-won); } .p-lost { background: var(--pipe-lost); }
.pmini { display: flex; gap: 16px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.pmini a { color: var(--muted); text-decoration: none; }

/* work plan */
.workplan { margin-bottom: 16px; }
.wrow { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; min-height: 52px; }
.wrow:last-of-type { border-bottom: 0; }
.wl { flex: 1; font-size: 15px; }
.wn { font-size: 18px; min-width: 32px; text-align: right; font-variant-numeric: tabular-nums; }
.wic { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; flex: none; }
.wic .ic { width: 19px; height: 19px; }
.wic.blue, .eic.blue { background: var(--blue-bg); color: var(--pipe-pros); }
.wic.red, .eic.red { background: var(--red-bg); color: var(--red); }
.wic.amber, .eic.amber { background: var(--amber-bg); color: var(--amber); }
.wic.green, .eic.green { background: var(--green-tint); color: var(--green-ink); }
.eic.grey { background: var(--grey-bg); color: var(--muted); }
.delta { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--green-tint); color: var(--green-press); }
.moreplan summary { list-style: none; padding: 8px 2px 0; min-height: 36px; }
.moreplan summary::-webkit-details-marker { display: none; }
.moreplan[open] summary { display: none; }

/* task / deal cards */
.tcard { background: var(--surface-2); border: 1px solid #EEDFD3; border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.tcard.pros { background: var(--t-blue); border-color: #DCE4F1; }
.tcard.done { opacity: .7; }
.trow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.num { font-variant-numeric: tabular-nums; font-size: 16px; }
.kindpill { display: inline-block; margin: 8px 0 6px; background: var(--card); border-radius: 8px; padding: 4px 10px; font-size: 12px; font-weight: 600; letter-spacing: .3px; }
.stage { font-weight: 600; font-size: 14px; }
.tnote { font-size: 13px; margin-top: 2px; }
.tfoot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--pipe-pros); margin-top: 6px; }
.tfoot .ic { width: 15px; height: 15px; }
.donetick { color: var(--green-ink); display: inline-grid; place-items: center; width: 44px; }
.ochip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.odot { width: 18px; height: 18px; border-radius: 50%; background: var(--blue-bg); color: var(--pipe-pros); display: inline-grid; place-items: center; font-size: 11px; }

/* avatars */
.av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px; flex: none; }
.av.sm { width: 28px; height: 28px; font-size: 14px; }
.av.lg { width: 48px; height: 48px; font-size: 20px; background: rgba(255,255,255,.25); }
.avcol { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 46px; flex: none; }
.avtag { font-size: 10px; font-weight: 700; color: #fff; border-radius: 6px; padding: 0 6px; }

/* leads list */
.chiprow { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.chiprow::-webkit-scrollbar { display: none; }
.fchip, .tchip { white-space: nowrap; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.fchip.on { background: var(--green-tint); border-color: var(--green-ink); color: var(--green-press); }
.fchip.sel { width: auto; min-height: 38px; padding: 6px 12px; font-size: 14px; }
.tchip { border-radius: 10px; }
.tchip.on { background: var(--green); border-color: var(--green-ink); color: #fff; }
.leadlist { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 4px 12px; }
.leadlist .daygroup { margin: 10px 0 4px; }
.lrow { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.lrow:last-child { border-bottom: 0; }
.lmain { flex: 1; min-width: 0; }
.lmain .num { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lsub { font-size: 13px; margin-top: 2px; color: var(--muted); }
.lsub b { color: var(--text); }
.lside { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ltime { display: inline-flex; align-items: center; gap: 2px; }
.ltime .ic { width: 14px; height: 14px; }
.callbtn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--green-tint); color: var(--green-ink); }
.callbtn .ic { width: 19px; height: 19px; }

/* lead detail */
.lhead { border-radius: 18px; padding: 12px 14px 14px; color: #fff; margin-top: 6px; }
.lh-row { display: flex; align-items: center; gap: 10px; }
.lh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lh-num { font-size: 21px; font-variant-numeric: tabular-nums; }
.lh-num.dark { color: var(--text); }
.lh-sub { font-size: 14px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lh-tag { background: rgba(255,255,255,.92); color: var(--text); font-size: 12px; font-weight: 700; border-radius: 10px; padding: 7px 12px; white-space: nowrap; }
.lh-chips { display: flex; gap: 8px; margin: 12px 0 10px; flex-wrap: wrap; }
.wchip { background: rgba(255,255,255,.92); color: var(--text); border-radius: 10px; padding: 6px 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.wchip .ic { width: 16px; height: 16px; }
.wchip.red { color: var(--red); }
.lh-link { width: 100%; background: none; border: 0; color: #fff; font-weight: 600; min-height: 40px; text-decoration: underline; text-underline-offset: 3px; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; margin: 10px 0 6px; border-bottom: 1px solid var(--border); }
.tabs2 button { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; min-height: 46px; font-weight: 600; color: var(--muted); }
.tabs2 button.on { color: var(--green-ink); border-bottom-color: var(--green-ink); }
.lbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 64px; width: min(600px, 100%); display: grid; grid-template-columns: repeat(6, 1fr); background: var(--card); border-top: 1px solid var(--border); padding: 4px 8px; z-index: 9; }
.lbar .iconbtn { width: 100%; color: var(--green-ink); }
.lbar .iconbtn:first-child { color: var(--text); }
.screen:has(.lbar) { padding-bottom: 70px; }
.screen.has-lbar { padding-bottom: 70px; }

/* activity cards */
.ecard { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.ecard[data-call] { cursor: pointer; }
.erow { display: flex; align-items: center; gap: 10px; }
.eic { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.eic .ic { width: 17px; height: 17px; }
.etime { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ebody { font-size: 14px; margin: 6px 0 0 42px; color: var(--text); }
.ehl { margin: 8px 0 0 42px; background: var(--green-tint); border-radius: 10px; padding: 8px 10px; font-size: 13px; text-align: center; }
.ecard audio { margin: 8px 0 0 42px; width: calc(100% - 42px); }
.efoot { display: flex; align-items: center; gap: 8px; margin: 10px 0 0 42px; }
.lchip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--red); text-decoration: none; background: var(--red-bg); padding: 2px 10px; border-radius: 999px; }

/* call detail */
.cdhead { display: flex; justify-content: space-between; gap: 10px; padding: 0 2px 8px; }
.cdhead .right { text-align: right; }
.cdbtns { margin: 0 0 12px; }
.primary-lite { background: var(--green-tint) !important; color: var(--green-press) !important; border-color: var(--green-ink) !important; }
.btn .ic, button .ic { width: 18px; height: 18px; }
.cdcall audio { margin-top: 12px; }
.cdout { margin-top: 12px; font-size: 15px; }
.cdout b { display: block; margin-bottom: 4px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--green-tint); border-top-color: var(--green-ink); border-radius: 50%; margin: 0 auto 12px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* stats */
.stats { margin-bottom: 16px; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--bg); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.seg3 button { border: 0; background: none; border-radius: 999px; min-height: 40px; color: var(--muted); }
.seg3 button.on { background: var(--green); color: #fff; }
.segsm { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.segsm button { border: 0; border-radius: 0; min-height: 34px; padding: 4px 12px; font-size: 13px; font-weight: 600; background: var(--card); color: var(--muted); }
.segsm button.on { background: var(--grey-bg); color: var(--text); }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.mlabel { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .3px; }
.mval { display: flex; align-items: baseline; gap: 8px; }
.mval b { font-size: 22px; font-variant-numeric: tabular-nums; }
.pct { font-size: 12px; font-weight: 700; }
.pct.up { color: var(--green-ink); } .pct.down { color: var(--red); }

/* floating buttons */
.fabs { position: fixed; right: max(16px, calc(50% - 300px + 16px)); bottom: 84px; display: flex; flex-direction: column; gap: 10px; z-index: 8; }
.fab { width: 54px; height: 54px; min-height: 54px; border-radius: 16px; padding: 0; background: var(--green); border-color: var(--green-ink); color: #fff; box-shadow: 0 2px 8px rgba(27,31,26,.18); }
.fab .ic { width: 24px; height: 24px; }

/* more + profile */
.mlist { padding: 4px 14px; }
.mitem { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; min-height: 60px; }
.mitem:last-child { border-bottom: 0; }
.mitem > .ic { color: var(--muted); width: 18px; }
.pcard { text-align: center; padding: 24px; }
.bigav { width: 96px; height: 96px; border-radius: 50%; border: 4px solid var(--green); display: inline-grid; place-items: center; color: var(--green-ink); margin-bottom: 8px; }
.bigav .ic { width: 56px; height: 56px; }
.pcard h2 { margin: 4px 0 0; font-size: 24px; }
.plist { padding: 4px 16px; }
.prow { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.prow:last-child { border-bottom: 0; }
.pic { color: var(--muted); }

/* embedded in Android app */
.embed .appwrap { padding-bottom: 96px; }
.embed .actionbar { bottom: 0; }
.actionbar .ic { width: 20px; height: 20px; }
@media (min-width: 900px) { .appwrap:not(.wide) .screen { padding-top: 16px; } }
.appwrap .actionbar { bottom: 66px; }
.embed .appwrap .actionbar { bottom: 0; }
#toast { bottom: 88px; opacity: 0; pointer-events: none; transition: transform .2s, opacity .2s; }
#toast.show { opacity: 1; }
.lh-num { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- v3: farmer fields, queue, templates, insights ---------- */
.temp { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .3px; border-radius: 8px; padding: 3px 8px; text-transform: uppercase; background: var(--grey-bg); color: var(--muted); }
.temp.hot { background: var(--t-red); color: #A3261C; }
.temp.warm { background: var(--amber-bg); color: var(--amber); }
.temp.cold { background: var(--t-blue); color: #2B4F80; }
.chip.tempc.hot.on { background: var(--t-red); border-color: #A3261C; color: #A3261C; }
.chip.tempc.warm.on { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }
.chip.tempc.cold.on { background: var(--t-blue); border-color: #2B4F80; color: #2B4F80; }
.aitag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .4px; background: var(--green-tint); color: var(--green-press); border-radius: 6px; padding: 2px 6px; vertical-align: middle; }
.ffield { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ffield .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.ffield .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ffield .chip { font: inherit; font-size: 14px; color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.sheetbg { place-items: end center; padding: 0; }
.sheet { width: min(560px, 100%); border-radius: 20px 20px 0 0; max-height: 88vh; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 700px) { .sheetbg { place-items: center; padding: 16px; } .sheet { border-radius: var(--r-card); } }
.mitem.plain { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--border); text-align: left; font: inherit; cursor: pointer; }
.mitem .ell2 { min-width: 0; }
.mitem .ell2 .muted { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aopt { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-ctl); cursor: pointer; }
.aopt:has(input:checked) { border-color: var(--green-ink); background: var(--green-tint); }
.aopt.checked { border-color: var(--green-ink); background: var(--green-tint); }
.aopt input { width: 20px; height: 20px; accent-color: var(--green-ink); }
.croplist { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--r-ctl); }
.cropopt { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); min-height: 48px; }
.cropopt input { width: 22px; height: 22px; accent-color: var(--green-ink); }
.script { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 12px; margin-top: 8px; font-size: 14px; }

.ncrow { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.chip.nc { font: inherit; font-size: 13px; color: var(--text); }
.chip.nc:active { background: var(--red-bg); }
.ordercard { background: var(--green-tint); border: 1px solid #C8DECF; border-radius: var(--r-card); padding: 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.ordercard.comp { background: var(--red-bg); border-color: #EBC9C5; }
.ordercard .ic { width: 16px; height: 16px; vertical-align: -3px; }
.tcard.comp { background: var(--t-red2); border-color: #EFD3D0; }
.kindpill.overdue { background: var(--red); color: #fff; margin-left: 6px; }
.ltags { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.mini { font-size: 11px; background: var(--grey-bg); border-radius: 6px; padding: 2px 6px; color: var(--muted); font-weight: 600; }
.fbtn { position: relative; }
.badge { position: absolute; top: 4px; right: 2px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; }

.lh-ai { background: rgba(255,255,255,.92); color: var(--text); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin-top: 10px; }
.lh-fu { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.92); color: var(--text); border-radius: 10px; padding: 6px 8px 6px 12px; font-size: 13px; margin-top: 8px; }
.lh-fu .ic { width: 16px; height: 16px; }
.lh-fu.over { color: var(--red); }
.lh-chg { min-height: 32px; padding: 4px 12px; font-size: 13px; border-radius: 8px; }
.lhead .temp { margin-left: auto; }

.startbtn { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 12px 0; min-height: 52px; font-size: 16px; }
.focuscard { background: linear-gradient(135deg, #1E6B3F, #2E8B57); color: #fff; border-radius: var(--r-card); padding: 16px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.fc-title { font-size: 18px; } .fc-n { font-size: 28px; }
.fc-btn { background: #fff !important; color: var(--green-press) !important; border: 0 !important; display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px; font-weight: 700; text-decoration: none; }
.qlist { padding: 4px 12px; }
.qrow { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; min-height: 60px; }
.qrow:last-child { border-bottom: 0; }
.qn { width: 22px; color: var(--muted); font-size: 13px; text-align: center; }
.qmain { display: flex; flex-direction: column; min-width: 0; }
.qkind { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.qcount { font-size: 18px; }
.caught { color: var(--green-ink); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.caught .ic { width: 16px; height: 16px; }
.dialcard { border-radius: var(--r-card); padding: 16px; color: #fff; display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.dialcard .temp { margin-left: auto; }
.dial-note { background: rgba(255,255,255,.92); color: var(--text); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.dialbtn { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 56px; font-size: 18px; margin-bottom: 12px; text-decoration: none; }

.tplcard .av.sm { width: 32px; height: 32px; }
.insights .ins-sec { margin-top: 12px; }
.insights .mlabel { margin-bottom: 6px; }
.ichip { display: inline-flex; gap: 6px; align-items: center; background: var(--bg); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.tbar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin-top: 8px; gap: 2px; }
.tbar i.hot { background: #C8442F; } .tbar i.warm { background: #D99A2B; } .tbar i.cold { background: #5B83B8; }
.irow { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.irow:last-child { border-bottom: 0; }
.lfrow { display: grid; grid-template-columns: 1.2fr 120px 64px 2fr auto; gap: 8px; align-items: center; }
.ncrow2 { display: flex; gap: 8px; align-items: center; }
@media (max-width: 700px) { .lfrow { grid-template-columns: 1fr 1fr; padding-bottom: 10px; border-bottom: 1px solid var(--border); } .lfrow .lfopts { grid-column: 1 / -1; } }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; } .toggle input { width: 20px; height: 20px; accent-color: var(--green-ink); }
.caught { white-space: nowrap; } .qmain b { line-height: 1.25; }
.lh-chips .temp { align-self: center; padding: 7px 10px; }

/* ---------- v5: polish after phone video review ---------- */
* { -webkit-tap-highlight-color: transparent; }
a, button, .mitem, .lrow, .tcard, .ecard, .wrow, .qrow { transition: background-color .12s, transform .08s; }
.mitem:active, .wrow:active, .qrow:active, .lrow:active, .ecard:active, .tcard:active { background: rgba(27,31,26,.05); }
button:active, .btn:active, .fab:active, .dpk:active { transform: scale(.97); }
.mlabel { font-size: 12.5px; }
.metric .mval b { font-size: 21px; }
.ws b { font-size: 18px; white-space: normal; line-height: 1.15; }
.greet { display: flex; flex-direction: column; margin: -4px 2px 12px; }
.greet b { font-size: 17px; }
.greet span { color: var(--muted); font-size: 14px; }
.wrow.zero { opacity: .6; }
.fabspace { height: 76px; }
.screen:has(.fabs) .actionbar { margin-bottom: 0; }
.screen.has-fabs .actionbar { margin-bottom: 0; }

/* Forms open as a full-screen page on phones so the keyboard never squashes them */
@media (max-width: 699px) {
  .modal-bg:not(.sheetbg) { padding: 0; place-items: stretch; background: var(--bg); }
  .modal-bg:not(.sheetbg) > .modal { width: 100%; height: 100%; max-height: none; border-radius: 0; padding: 16px 16px 0; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
  .modal-bg:not(.sheetbg) > .modal > h2 { position: sticky; top: -16px; background: var(--card); margin: -16px -16px 0; padding: 16px; border-bottom: 1px solid var(--border); z-index: 1; }
  .modal-bg:not(.sheetbg) > .modal > .row:last-child { position: sticky; bottom: 0; background: var(--card); margin: auto -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
  .modal-bg:not(.sheetbg) > .modal > .row:last-child .primary { flex: 1; }
  .modal .fgroup { grid-template-columns: 1fr; }
}
.modal input, .modal select, .modal textarea { font-size: 16px; }

/* Recording play button */
.playbtn { --p: 0%; display: flex; align-items: center; gap: 10px; width: calc(100% - 42px); margin: 10px 0 0 42px; min-height: 46px; border-radius: 12px; border: 1px solid #C8DECF;
  background: linear-gradient(90deg, var(--t-green-strong) var(--p), var(--green-tint) var(--p)); color: var(--green-press); font-weight: 600; justify-content: flex-start; padding: 8px 14px; }
.playbtn .ic { width: 20px; height: 20px; }
.playbtn .pdur { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 500; }

/* To-do */
.tcount { display: inline-grid; place-items: center; min-width: 22px; height: 20px; border-radius: 999px; background: var(--grey-bg); color: var(--muted); font-size: 12px; padding: 0 6px; margin-left: 4px; }
.tchip.on .tcount { background: rgba(255,255,255,.25); color: #fff; }
.emptybig { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 40px 16px; color: var(--text); }
.emptybig .ic { width: 44px; height: 44px; color: var(--green-ink); }
.emptybig b { font-size: 17px; }

/* More */
.mgroup { font-size: 12.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin: 18px 4px 6px; }
.mecard { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); padding: 14px; }
.mecard .av { color: #fff; }
.av.xl { width: 72px; height: 72px; font-size: 30px; color: #fff; margin: 0 auto 8px; display: grid; place-items: center; border-radius: 50%; }

/* Dialpad */
.dpwrap { max-width: 420px; margin: 0 auto; }
.dpnum { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 64px; padding: 4px 0; }
.dpnum #dpn { font-size: 32px; font-weight: 600; letter-spacing: 1px; font-variant-numeric: tabular-nums; text-align: center; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.dpnum #dpn.muted { font-size: 20px; font-weight: 500; }
.dpmatch { min-height: 30px; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 8px; }
.dpm { min-height: 36px; padding: 4px 14px; border-radius: 999px; background: var(--green-tint); border-color: #C8DECF; font-weight: 500; }
.dpkeys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dpk { min-height: 64px; border-radius: 18px; flex-direction: column; gap: 0; background: var(--card); }
.dpk b { font-size: 26px; font-weight: 500; line-height: 1.1; }
.dpk small { font-size: 10.5px; color: var(--muted); letter-spacing: 1.5px; min-height: 13px; }
.dpact { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; justify-items: center; margin: 14px 0 6px; }
.dpcall { width: 68px; height: 68px; min-height: 68px; border-radius: 50%; padding: 0; background: var(--green); border-color: var(--green-ink); color: #fff; box-shadow: 0 4px 12px rgba(30,107,63,.3); }
.dpcall .ic { width: 30px; height: 30px; }
.dpwa { color: var(--green-ink); }
.callbtn { color: var(--green-ink); }
.mecard .av { background: var(--green); }

/* Conversation (transcript) */
.convo { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; position: relative; }
.convo-head { flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.langseg button { min-height: 34px; }
.convo-body { display: flex; flex-direction: column; gap: 6px; }
.convo.clipped .convo-body { max-height: 330px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.bub { max-width: 86%; padding: 8px 12px; border-radius: 14px; font-size: 15px; line-height: 1.4; }
.bub .who { display: block; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; margin-bottom: 2px; }
.bub.exec { align-self: flex-end; background: var(--green-tint); color: var(--green-press); border-bottom-right-radius: 4px; }
.bub.farmer { align-self: flex-start; background: var(--blue-bg); color: #1f2c4d; border-bottom-left-radius: 4px; }
.bub.other { align-self: stretch; background: var(--bg); }
.convo-more { background: none; border: 0; min-height: 36px; padding: 4px 0; color: var(--green-ink); font-weight: 600; }
.convo-load { padding: 10px 0; }
/* Dialpad button: round, icon centred */
a.fab, .fab { display: grid; place-items: center; text-decoration: none; width: 60px; height: 60px; min-height: 60px; border-radius: 50%; border: 0; box-shadow: 0 4px 14px rgba(30,107,63,.35); }
.fab .ic { width: 26px; height: 26px; display: block; }
.callrow { display: flex; gap: 10px; margin: 12px 0; }
.callrow .startbtn { flex: 1; margin: 0; }
.dialbtn2 { min-height: 52px; padding: 0 18px; border-radius: var(--r-ctl); background: var(--card); color: var(--green-press); border: 1.5px solid var(--green); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.dialbtn2 .ic { width: 22px; height: 22px; }

/* Material icons are filled shapes (the old set was line drawings) */
.ic.mi { fill: currentColor; stroke: none; }

/* =====================================================================
   v7 REDESIGN – follows the approved mock-up (green bars, soft cards)
   ===================================================================== */
:root { --g1: #1E6B3F; --g2: #2A8A53; --g0: #14502E; --shadow: 0 1px 2px rgba(20,40,25,.06), 0 4px 14px rgba(20,40,25,.06); --r-card: 18px; }
body { -webkit-font-smoothing: antialiased; }
.card { border: 0; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.appwrap { padding: 0 14px 96px; }

/* green header bar (all inner pages) */
.gbar { position: sticky; top: 0; z-index: 7; margin: 0 -14px 12px; padding: 10px 10px 10px 14px; min-height: 58px; background: var(--g1); color: #fff; box-shadow: 0 2px 8px rgba(20,80,46,.18); }
.gbar .tb-title { color: #fff; font-size: 19px; font-weight: 600; }
.gbar .tb-title .muted { color: rgba(255,255,255,.8) !important; }
.gbar .iconbtn { color: #fff; }
.gbar .iconbtn:active { background: rgba(255,255,255,.15); }
.gbar .addbtn { display: inline-flex; align-items: center; gap: 6px; background: var(--card); color: var(--g1); border: 0; border-radius: 999px; min-height: 38px; padding: 0 14px; font-weight: 700; font-size: 14px; }
.gbar .addbtn .ic { width: 18px; height: 18px; }
.gbar .roundadd { width: 38px; height: 38px; min-height: 38px; border-radius: 50%; background: var(--card); color: var(--g1); display: grid; place-items: center; padding: 0; border: 0; }
.screen { padding-top: 0; }
.banner.slim { margin-top: 8px; }

/* bottom navigation */
.bottomnav { box-shadow: 0 -2px 12px rgba(20,40,25,.06); border-top: 0; padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { font-size: 11.5px; letter-spacing: 0; font-weight: 600; }
.bottomnav .navic { transition: background-color .2s, transform .2s; }
.bottomnav a.on .navic { background: var(--green-tint); transform: translateY(-1px); }
.bottomnav .ic { width: 24px; height: 24px; }

/* avatars with initials */
.ava { --c: #2E7D4F; width: 44px; height: 44px; border-radius: 50%; flex: none; display: inline-grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: .3px;
  color: var(--c); background: var(--card); border: 1.5px solid var(--c);
  background: color-mix(in srgb, var(--c) 14%, var(--card)); border: 1.5px solid color-mix(in srgb, var(--c) 28%, var(--card)); }
.ava.lg { width: 72px; height: 72px; font-size: 24px; }
.ava.sm { width: 34px; height: 34px; font-size: 13px; }

/* brand mark */
.brandmark { display: inline-flex; align-items: center; gap: 8px; color: #fff; }
.brandmark svg { width: 34px; height: 34px; }
.bm-text { display: flex; flex-direction: column; line-height: 1; }
.bm-text b { font-size: 20px; letter-spacing: 1px; font-style: italic; font-weight: 800; }
.bm-text small { font-size: 9px; letter-spacing: 3.5px; opacity: .9; margin-top: 2px; }

/* ---------- HOME ---------- */
.hero { margin: 0 -14px; padding: 12px 14px 54px; color: #fff; border-radius: 0 0 26px 26px;
  background: linear-gradient(180deg, rgba(16,70,40,.35) 0%, rgba(16,70,40,.82) 100%), url('/img/home-hero.jpg') center/cover no-repeat, linear-gradient(135deg, #1E6B3F 0%, #2A8A53 55%, #5FA36F 100%); }
.hero-top { display: flex; align-items: center; gap: 4px; min-height: 48px; }
.iconbtn.light { color: #fff; }
.bellbtn { position: relative; }
.dotbadge { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #E5484D; color: #fff; font-size: 10.5px; font-style: normal; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--g1); }
.hero-greet { display: flex; flex-direction: column; margin-top: 14px; }
.hero-greet span { font-size: 17px; opacity: .95; }
.hero-greet b { font-size: 30px; line-height: 1.15; }
.hero-greet small { font-size: 14.5px; opacity: .9; margin-top: 4px; }
.todaycard { position: relative; margin: -38px 4px 14px; display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; color: var(--text); z-index: 2; }
.tc-ic { width: 46px; height: 46px; border-radius: 50%; background: var(--green-tint); color: var(--green-ink); display: grid; place-items: center; flex: none; }
.tc-ic .ic { width: 24px; height: 24px; }
.tc-main { flex: 1; min-width: 0; }
.tc-lbl { font-size: 14px; color: var(--muted); font-weight: 600; }
.tc-num b { font-size: 26px; font-variant-numeric: tabular-nums; }
.tc-num span { font-size: 20px; color: var(--muted); font-weight: 600; }
.tc-bar { height: 8px; border-radius: 4px; background: var(--grey-bg); overflow: hidden; margin-top: 6px; }
.tc-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, var(--g1), #4CAF6D); transition: width .9s cubic-bezier(.2,.8,.2,1); }
.tc-pct { align-self: flex-end; font-size: 13px; font-weight: 700; color: var(--green-ink); }
.ptiles2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ptile2 { border-radius: 16px; padding: 12px; min-height: 92px; display: flex; flex-direction: column; text-decoration: none; transition: transform .12s; }
.ptile2 span { font-size: 13.5px; font-weight: 700; }
.ptile2 b { font-size: 28px; margin-top: auto; font-variant-numeric: tabular-nums; }
.ptile2 small { font-size: 11px; font-weight: 600; }
.t-new { background: var(--t-blue); color: #2458A6; }
.t-prospecting { background: var(--t-orange); color: #9A4A08; }
.t-opportunity { background: var(--t-green); color: #1E6B3F; }
.pmini { display: flex; gap: 14px; align-items: center; margin: 8px 4px 14px; font-size: 13.5px; }
.pmini a { color: var(--muted); text-decoration: none; }
.plan { padding: 14px 14px 10px; }
.plan .bhead h3 { font-size: 17px; }
.prow2 { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.prow2:last-of-type { border-bottom: 0; }
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-main b { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-main span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-when { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pr-when .ic { width: 15px; height: 15px; }
.pr-when.late { color: var(--red); }
.callfab { width: 42px; height: 42px; border-radius: 50%; background: var(--g1); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 2px 8px rgba(30,107,63,.3); text-decoration: none; }
.callfab .ic { width: 21px; height: 21px; }
.callfab:active { transform: scale(.92); }
.emptyline { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 10px 0; font-size: 14px; }
.emptyline .ic { color: var(--green-ink); width: 20px; height: 20px; }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px; }
.qchips:empty { display: none; }
.qchip { font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--blue-bg); color: var(--blue); text-decoration: none; font-weight: 600; }
.qchip.red { background: var(--red-bg); color: var(--red); }
.qchip.amber { background: var(--amber-bg); color: var(--amber); }
.callrow { margin: 14px 0; }
.callrow .startbtn { min-height: 56px; font-size: 17px; border-radius: 16px; box-shadow: 0 4px 14px rgba(30,107,63,.28); }
.dialbtn2 { min-height: 56px; border-radius: 16px; background: var(--t-green); border: 0; color: var(--g0); font-size: 16px; }

/* ---------- motion ---------- */
@keyframes inRight { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes inLeft { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes inFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes shimmer { from { background-position: -200px 0; } to { background-position: 200px 0; } }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(229,72,77,0); } 50% { box-shadow: 0 0 0 5px rgba(229,72,77,.18); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(30,107,63,.45); } 100% { box-shadow: 0 0 0 14px rgba(30,107,63,0); } }
.screen.in-right { animation: inRight .26s cubic-bezier(.2,.8,.2,1) both; }
.screen.in-left { animation: inLeft .24s cubic-bezier(.2,.8,.2,1) both; }
.screen.in-fade { animation: inFade .22s ease-out both; }
.sheetbg { animation: fadeIn .18s ease-out both; }
.sheetbg .sheet { animation: sheetUp .28s cubic-bezier(.2,.8,.2,1) both; }
.modal-bg:not(.sheetbg) { animation: fadeIn .15s ease-out both; }
.modal-bg:not(.sheetbg) > .modal { animation: inRight .24s cubic-bezier(.2,.8,.2,1) both; }
.callfab:active, .dpcall:active { animation: pulse .5s ease-out; }
.skwrap { padding: 16px 0; }
.skrow { display: flex; gap: 12px; align-items: center; padding: 12px 0; }
.skl { display: block; height: 12px; border-radius: 6px; margin: 6px 0; background: linear-gradient(90deg, #ECEAE3 0, #F6F5F0 40px, #ECEAE3 80px) #ECEAE3; background-size: 400px 100%; animation: shimmer 1.1s linear infinite; }
.skl.circ { width: 44px; height: 44px; border-radius: 50%; margin: 0; flex: none; }
.temp.hot { animation: glow 1.6s ease-in-out 1; }
#toast { transition: transform .25s cubic-bezier(.2,.8,.2,1), opacity .2s; border-radius: 14px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- LEADS ---------- */
.sbox.big { background: var(--card); border: 0; box-shadow: var(--shadow); border-radius: 14px; margin-bottom: 10px; }
.sbox.big input { font-size: 15px; min-height: 48px; width: 100%; }
.fchip { display: inline-flex; align-items: center; gap: 5px; }
.fchip .ic { width: 17px; height: 17px; }
.fchip.on { background: var(--g1); border-color: var(--g1); color: #fff; }
.fchip.t-hot:not(.on) { color: #B23A2E; } .fchip.t-warm:not(.on) { color: #A15C00; } .fchip.t-cold:not(.on) { color: #2B5C9A; }
.listhead { display: flex; align-items: center; gap: 10px; margin: 4px 2px 8px; font-size: 14px; }
.sortbtn { background: none; border: 0; min-height: 34px; padding: 0 4px; color: var(--g1); font-weight: 600; font-size: 13.5px; }
.sortbtn .ic { width: 18px; height: 18px; }
.leadlist2 { padding: 4px 14px; }
.lrow2 { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.lrow2:last-child { border-bottom: 0; }
.lr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: 13px; color: var(--muted); }
.lr-main > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-top { display: flex; align-items: center; gap: 8px; }
.lr-top b { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-num { font-variant-numeric: tabular-nums; }
.lr-meta { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.lr-meta .ic { width: 14px; height: 14px; }
.ncdot { width: 7px; height: 7px; border-radius: 50%; background: #E5484D; display: inline-block; }
.callfab { width: 46px; height: 46px; }
.temp { text-transform: none; font-size: 11.5px; padding: 3px 9px; border-radius: 6px; letter-spacing: 0; }

/* ---------- LEAD DETAIL ---------- */
.gbar .tb-title:empty { display: none; }
.lhead2 { display: flex; gap: 14px; align-items: flex-start; padding: 16px; }
.lh2-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.lh2-main > span { display: flex; align-items: center; gap: 6px; }
.lh2-main > span .ic { width: 16px; height: 16px; color: var(--g1); flex: none; }
.lh2-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lh2-name b { font-size: 20px; color: var(--text); }
.lh2-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.stagepill { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--grey-bg); color: var(--muted); }
.s-new { background: var(--t-blue); color: #2458A6; } .s-prospecting { background: var(--t-orange); color: #B4570B; } .s-opportunity { background: var(--t-green); color: #1E6B3F; }
.s-won { background: #1E6B3F; color: #fff; } .s-lost { background: var(--red-bg); color: var(--red); }
.ownpill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.ownpill .ic { width: 14px; height: 14px; }
.tabs4 { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 0 10px; border-bottom: 1px solid var(--border); position: relative; }
.tabs4 button { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; min-height: 46px; font-weight: 600; color: var(--muted); font-size: 14.5px; padding: 0 4px; transition: color .2s, border-color .2s; }
.tabs4 button.on { color: var(--g1); border-bottom-color: var(--g1); }
.fucard { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--t-green); box-shadow: none; border: 1px solid #D5E8DB; }
.fucard.late { background: var(--t-red2); border-color: #F2D2CE; }
.fu-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--card); color: var(--g1); display: grid; place-items: center; flex: none; }
.fucard.late .fu-ic { color: var(--red); }
.fu-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fu-main small { color: var(--muted); font-size: 12.5px; }
.fu-main b { font-size: 16px; }
.fu-main span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fu-act { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.btn.sm, button.primary.sm { min-height: 38px; padding: 6px 14px; font-size: 14px; border-radius: 10px; }
.link { background: none; border: 0; padding: 0; min-height: 0; color: var(--g1); font-weight: 600; }
.aicard { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; }
.aicard .ic { color: #6B4FD8; width: 22px; height: 22px; flex: none; }
.aicard small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.quickacts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.qact { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--card); border: 0; border-radius: 14px; box-shadow: var(--shadow); padding: 10px 4px; min-height: 64px; font-size: 12px; font-weight: 600; color: var(--text); text-decoration: none; cursor: pointer; }
.qact .ic { color: var(--g1); width: 22px; height: 22px; }
.tlhead { margin-top: 16px; }
.tlhead .fchip.sel { min-height: 34px; }
.timeline { position: relative; padding-left: 4px; }
.tl { position: relative; display: flex; gap: 12px; padding: 0 0 16px; cursor: default; background: none; border: 0; box-shadow: none; }
.tl.ecard { cursor: pointer; }
.tl::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: #E2E0D6; }
.tl:last-child::before { display: none; }
.tl-ic { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; position: relative; z-index: 1; }
.tl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--muted); }
.tl-body small { font-size: 12px; }
.tl-body > b { color: var(--text); font-size: 15px; }
.tl-hl { background: var(--surface-3); border-radius: 8px; padding: 6px 10px; margin-top: 4px; color: var(--text); font-size: 13px; }
.tl .playbtn { margin: 6px 0 0; width: 100%; }
.pchip { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--green-tint); color: var(--g0); font-weight: 600; font-size: 13.5px; }
.lbar2 { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(60px + env(safe-area-inset-bottom)); width: min(600px, 100%); display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 8px; padding: 8px 12px; background: var(--card); box-shadow: 0 -2px 12px rgba(20,40,25,.08); z-index: 9; }
.lbar2 > * { min-height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: 15px; text-decoration: none; }
.lb-call { background: var(--g1); color: #fff; box-shadow: 0 3px 10px rgba(30,107,63,.3); }
.lb-btn { background: var(--card); border: 1px solid var(--border); color: var(--text); }
.lb-btn .ic, .lb-call .ic { width: 22px; height: 22px; }
.lb-btn .ic { color: var(--g1); }
.screen:has(.lbar2) { padding-bottom: 76px; }
.screen.has-lbar2 { padding-bottom: 76px; }
.ava.anon { --c: #7A8278; }
.ava.anon .ic { width: 55%; height: 55%; }
.lbar2 > * { font-size: 14.5px; white-space: nowrap; }
.aicard > .ic { display: block; }

/* ---------- CALL DETAIL ---------- */
.cdhead2 { display: flex; align-items: center; gap: 12px; padding: 14px; }
.cd2-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cd2-main b { font-size: 17px; }
.cd2-main span { font-size: 13px; color: var(--muted); }
.statpill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--amber-bg); color: var(--amber); white-space: nowrap; }
.statpill.ok { background: var(--green-tint); color: var(--g1); }
.playbtn.big { width: 100%; margin: 10px 0 0; min-height: 52px; font-size: 15px; border-radius: 14px; }
.aisum { margin-top: 12px; padding: 14px; }
.ais-head { display: flex; gap: 10px; align-items: center; }
.ais-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--t-purple); color: #6B4FD8; display: grid; place-items: center; flex: none; }
.ais-ic .ic { width: 22px; height: 22px; }
.ais-head b { display: block; font-size: 16px; }
.ais-head small { color: var(--muted); font-size: 12px; }
.ais-body { margin-top: 10px; background: var(--t-green); border-radius: 12px; padding: 12px; font-size: 15px; line-height: 1.5; }
.ais-out { margin-top: 8px; font-size: 13.5px; color: var(--muted); }
.scorecard { display: flex; gap: 16px; align-items: center; padding: 14px; }
.dial { position: relative; width: 96px; flex: none; display: flex; flex-direction: column; align-items: center; }
.dial svg { width: 86px; height: 86px; transform: rotate(-90deg); }
.dial .d-bg { fill: none; stroke: #ECEAE3; stroke-width: 8; }
.dial .d-fg { fill: none; stroke: var(--g1); stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.dial.mid .d-fg { stroke: #D99A2B; } .dial.low .d-fg { stroke: #D2463A; }
.d-num { position: absolute; top: 26px; left: 0; right: 0; text-align: center; }
.d-num b { font-size: 24px; } .d-num small { color: var(--muted); font-size: 12px; }
.d-lbl { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.checks li { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.checks li .ic { width: 20px; height: 20px; color: #B9B6AC; flex: none; }
.checks li.ok { color: var(--text); }
.checks li.ok .ic { color: var(--g1); }
.tip2 { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; }
.tip2 .ic { color: #D99A2B; width: 20px; height: 20px; flex: none; }
.sbreak { margin-top: 12px; padding: 12px 14px; }
.sbreak summary { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.tabs4.two { grid-template-columns: 1fr 1fr; }
.needdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #E5484D; vertical-align: 2px; }
.pane.in-fade { animation: inFade .2s ease-out both; }
.convo { border-top: 0; padding-top: 0; margin-top: 0; }
.bub { animation: bubbleIn .28s ease-out both; animation-delay: calc(var(--i, 0) * 45ms); }
.notebox { display: flex; gap: 8px; align-items: center; margin-top: 12px; background: var(--card); border-radius: 999px; box-shadow: var(--shadow); padding: 4px 4px 4px 16px; }
.notebox input { flex: 1; border: 0; background: none; min-height: 44px; font-size: 15px; outline: none; padding: 0; }
.sendbtn { width: 44px; height: 44px; min-height: 44px; border-radius: 50%; padding: 0; background: var(--g1); border: 0; color: #fff; }
.sendbtn .ic { width: 20px; height: 20px; }

/* ---------- TASKS ---------- */
.ttabs { margin-top: 0; }
.ttabs button { font-size: 14px; }
.tasklist { padding: 4px 14px; }
.trow2 { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: opacity .3s, transform .35s, max-height .35s; max-height: 140px; }
.trow2:last-child { border-bottom: 0; }
.trow2.leaving { opacity: 0; transform: translateX(40px); }
.tcheck { width: 26px; height: 26px; min-height: 26px; padding: 0; border-radius: 7px; border: 2px solid #B9B6AC; background: var(--card); color: transparent; flex: none; display: grid; place-items: center; transition: background .15s, border-color .15s; }
.tcheck .ic { width: 18px; height: 18px; transform: scale(0); transition: transform .25s cubic-bezier(.2,1.6,.4,1); }
.tcheck.on { background: var(--g1); border-color: var(--g1); color: #fff; }
.tcheck.on .ic { transform: scale(1); }
.tr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tr-main b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-main span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-own { display: inline-flex; align-items: center; gap: 3px; font-size: 12px !important; }
.tr-own .ic { width: 13px; height: 13px; }
.tr-when { display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tr-when .ic { width: 15px; height: 15px; }
.tr-when.late { color: #D2463A; }
.trow2.isdone .tr-main b { text-decoration: line-through; color: var(--muted); }
.trow2.comp .tr-main b { color: var(--red); }
.callfab.sm { width: 40px; height: 40px; background: var(--green-tint); color: var(--g1); box-shadow: none; }
.callfab.sm .ic { width: 20px; height: 20px; }
.ttabs2 { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 0 10px; border-bottom: 1px solid var(--border); }
.ttabs2::-webkit-scrollbar { display: none; }
.ttabs2 button { background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; min-height: 44px; padding: 0 12px; font-weight: 600; color: var(--muted); white-space: nowrap; font-size: 14.5px; }
.ttabs2 button.on { color: var(--g1); border-bottom-color: var(--g1); }
/* dialpad */
.dpnum.card { padding: 6px 6px 6px 18px; min-height: 60px; justify-content: space-between; margin-bottom: 8px; }
.dpnum #dpn { text-align: left; font-size: 28px; }
.dpmatch { align-items: stretch; gap: 0; }
.dpm2 { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.dpm-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dpm-t small { color: var(--muted); font-size: 12.5px; }
.dpk { background: transparent; border: 0; min-height: 60px; }
.dpk:active { background: var(--green-tint); }
.dpkeys { gap: 4px 10px; }
.dpcall { width: 72px; height: 72px; }
.dpaddl { display: flex; align-items: center; gap: 4px; margin: 4px auto 12px; }
.dpaddl .ic { width: 18px; height: 18px; }
/* more */
.mecard .ava.lg { width: 60px; height: 60px; font-size: 21px; }
.mepin { display: flex; align-items: center; gap: 3px; }
.mepin .ic { width: 14px; height: 14px; }
.mitem .eic { width: 36px; height: 36px; border-radius: 10px; }
.logoutrow b { color: var(--red); }
.todaycard.flat { margin: 0 0 12px; }
.pcard { display: flex; flex-direction: column; align-items: center; }

/* real brand images */
.hero { background: linear-gradient(180deg, rgba(14,60,34,.30) 0%, rgba(14,60,34,.20) 45%, rgba(14,60,34,.78) 100%), url('/img/home-hero.jpg') center 65%/cover no-repeat, linear-gradient(135deg, #1E6B3F 0%, #2A8A53 55%, #5FA36F 100%); }
.hero-greet b, .hero-greet span, .hero-greet small { text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.logopill { display: inline-flex; align-items: center; background: rgba(255,255,255,.94); border-radius: 14px; padding: 6px 10px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.logopill img { display: block; height: 30px; width: auto; }
.emptyart { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 24px 16px 32px; animation: inFade .3s ease-out both; }
.emptyart img { width: 170px; height: 170px; border-radius: 24px; mix-blend-mode: multiply; }
.emptyart b { font-size: 17px; margin-top: 4px; }
.login { display: flex; flex-direction: column; align-items: center; }
.loginart { width: min(300px, 80vw); height: auto; border-radius: 24px; margin: 16px auto -24px; position: relative; z-index: 0; }
.login .card { position: relative; z-index: 1; }
.loginlogo { display: block; width: 200px; height: auto; margin: 0 auto 4px; }

/* =====================================================================
   DARK MODE  (html[data-theme="dark"])
   ===================================================================== */
html[data-theme="dark"] {
  color-scheme: dark;
  --green-ink: #7FD39B;   /* green text and links: readable on dark cards */
  --bg: #121614; --card: #1B211D; --border: #2E3832; --line-soft: #26302A;
  --text: #E8ECE8; --muted: #A3ADA5;
  --green-tint: #1C3024; --grey-bg: #27302A;
  --amber: #E3A64A; --amber-bg: #3A2D17; --red: #F08A80; --red-bg: #3B201E; --blue: #9DB5E8; --blue-bg: #1D2636;
  --t-red: #3B201E; --t-red2: #2E1D1C; --t-orange: #3A2A17; --t-blue: #1C2738; --t-green: #1C2E23; --t-green-strong: #24412F; --t-purple: #2A2440;
  --surface-2: #1F2621; --surface-3: #262E29;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.25);
}
html[data-theme="dark"] body { background: var(--bg); color: var(--text); }
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { background: var(--surface-2); color: var(--text); border-color: var(--border); }
html[data-theme="dark"] button:not(.primary):not(.fab):not(.dpcall):not(.sendbtn):not(.tcheck), html[data-theme="dark"] .btn:not(.primary) { background-color: var(--card); color: var(--text); border-color: var(--border); }
html[data-theme="dark"] .gbar { background: #17442B; }
html[data-theme="dark"] .gbar .addbtn, html[data-theme="dark"] .gbar .roundadd { background: #E8ECE8 !important; color: #17442B !important; }
html[data-theme="dark"] .bottomnav { background: #171C19; }
html[data-theme="dark"] .bottomnav a.on { color: #7FD39B; }
html[data-theme="dark"] .t-new { color: #9DBDF0; } html[data-theme="dark"] .t-prospecting { color: #F0B27A; } html[data-theme="dark"] .t-opportunity { color: #86D19F; }
html[data-theme="dark"] .fchip.on, html[data-theme="dark"] .tchip.on, html[data-theme="dark"] .seg3 button.on, html[data-theme="dark"] .segsm button.on { background: #237A49 !important; color: #fff !important; border-color: #2A8A53 !important; }
html[data-theme="dark"] .tabs4 button.on, html[data-theme="dark"] .ttabs2 button.on, html[data-theme="dark"] .tabs2 button.on { color: #7FD39B; border-bottom-color: #7FD39B; }
html[data-theme="dark"] .link, html[data-theme="dark"] a.link, html[data-theme="dark"] .sortbtn, html[data-theme="dark"] .convo-more { color: #7FD39B; }
html[data-theme="dark"] .bub.exec { background: #1C3326; color: #CFEBD8; }
html[data-theme="dark"] .bub.farmer { background: #1E2A3D; color: #D3DFF5; }
html[data-theme="dark"] .ais-body { color: var(--text); }
html[data-theme="dark"] .tl::before { background: var(--border); }
html[data-theme="dark"] .skl { background: linear-gradient(90deg, #232B26 0, #2C3530 40px, #232B26 80px) #232B26; background-size: 400px 100%; }
html[data-theme="dark"] .emptyart img { mix-blend-mode: normal; opacity: .92; }
html[data-theme="dark"] .logopill { background: rgba(255,255,255,.94); }
html[data-theme="dark"] .temp.hot { background: #4A2420; color: #FF9C8F; } html[data-theme="dark"] .temp.warm { background: #3E2F14; color: #F2B85B; } html[data-theme="dark"] .temp.cold { background: #1F2E44; color: #9CC0F0; }
html[data-theme="dark"] .ava { color: #E6ECE7; color: color-mix(in srgb, var(--c) 55%, #fff); }
html[data-theme="dark"] .tcheck { background: var(--card); border-color: #5A665D; }
html[data-theme="dark"] .callfab.sm { color: #7FD39B; }
html[data-theme="dark"] .modal-bg:not(.sheetbg) { background: rgba(0,0,0,.55); }
html[data-theme="dark"] .ttabs2, html[data-theme="dark"] .tabs4 { border-bottom-color: var(--border); }
html[data-theme="dark"] .playbtn { color: #9FE0B4; border-color: #2B4A36; }
html[data-theme="dark"] .pchip { color: #9FE0B4; }
html[data-theme="dark"] .stagepill.s-new { color: #9DBDF0; } html[data-theme="dark"] .stagepill.s-prospecting { color: #F0B27A; } html[data-theme="dark"] .stagepill.s-opportunity { color: #86D19F; }
html[data-theme="dark"] table th { background: var(--surface-2); color: var(--muted); }
html[data-theme="dark"] .banner.amber { color: #F2C46F; }
html[data-theme="dark"] .hero { filter: brightness(.9); }
html[data-theme="dark"] #toast { background: #E8ECE8; color: #121614; }

/* Text size (set on <html> as --zoom by the Display setting) */
html.zoomed body { zoom: var(--zoom, 1); }

/* first-time tour */
.tour { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 60; }
.tour-dim { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(10,20,14,.62); animation: fadeIn .2s both; }
.tour-hole { position: absolute; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(10,20,14,.62); outline: 3px solid #F2C14E; transition: all .25s; animation: fadeIn .2s both; pointer-events: none; }
.tour-tip { position: absolute; left: 16px; right: 16px; max-width: 420px; margin: 0 auto; background: var(--card); color: var(--text); border-radius: 18px; padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: inFade .25s ease-out both; }
.tour-tip b { font-size: 18px; display: block; margin-top: 2px; }
.tour-tip p { margin: 6px 0 12px; color: var(--muted); font-size: 15px; }
.tour-step { font-size: 12px; font-weight: 700; color: #B4870B; letter-spacing: .4px; text-transform: uppercase; }
.lr-top { flex-wrap: wrap; row-gap: 2px; } .lr-top b { white-space: normal; }

/* Google Sheet card */
.pill{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;background:var(--surface-2,#F0EFE9);color:var(--muted,#5B6157)}
.pill.green{background:#DDF1E4;color:#1E6B3F}
html[data-theme=dark] .pill.green{background:#1F3A2A;color:#9FDDB4}
#sheetcard details summary{cursor:pointer}

/* My calls: call cards */
.callchips { margin: 4px 0 6px; overflow-x: auto; flex-wrap: nowrap; }
.callchips .fchip { white-space: nowrap; }
.cday { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 16px 6px 8px; }
.clist { padding: 2px 14px; }
.crow2 { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.crow2:last-child { border-bottom: 0; }
.crow2:active { opacity: .7; }
.cr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cr-top { display: flex; align-items: center; gap: 8px; }
.cr-top b { font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-time { color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.cr-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); font-size: 13.5px; }
.cdir { display: inline-flex; width: 18px; height: 18px; }
.cdir .ic { width: 18px; height: 18px; }
.cdir.in { color: #1E7BC2; } .cdir.out { color: #1E6B3F; } .cdir.up { color: #8A6D1F; }
.cr-nth { background: var(--surface-2, #F0EFE9); border-radius: 6px; padding: 0 6px; font-weight: 700; font-size: 12px; }
.cr-line { font-size: 14px; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cr-ai .ic { width: 15px; height: 15px; color: #5B3FC4; vertical-align: -2px; margin-right: 4px; }
.cr-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 3px; }
.cstat { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.cstat.green { background: #DDF1E4; color: #1E6B3F; } .cstat.amber { background: #FBF0DF; color: #9A5B00; }
.cstat.blue { background: #E3ECF8; color: #2B4F80; } .cstat.red { background: #FDE3DE; color: #A3261C; }
.cstat.grey { background: var(--surface-2, #F0EFE9); color: var(--muted); }
html[data-theme=dark] .cstat.green { background: #1F3A2A; color: #9FDDB4; } html[data-theme=dark] .cstat.amber { background: #3A2F1C; color: #F2C77C; }
html[data-theme=dark] .cstat.blue { background: #1D2C40; color: #9DBFEA; } html[data-theme=dark] .cstat.red { background: #3D1F1B; color: #F2A79C; }
.cr-score { font-size: 12.5px; color: var(--muted); } .cr-score b { color: var(--ink); }
.cr-exec { font-size: 12.5px; color: var(--muted); margin-left: auto; }

/* Targeting (farmer categories, admins only) */
.catcard { display: flex; flex-direction: column; gap: 8px; border-left: 4px solid #6B46C1; }
.cat-top { display: flex; gap: 10px; align-items: flex-start; }
.cat-ic { color: #6B46C1; } .cat-ic .ic { width: 22px; height: 22px; }
.cat-top small { display: block; color: var(--muted); font-size: 12.5px; }
.cat-top b { font-size: 16px; }
.cat-act { font-size: 14px; color: var(--ink); background: var(--surface-2, #F0EFE9); border-radius: 10px; padding: 8px 10px; }
.catcard select { align-self: flex-start; max-width: 100%; }
.tgt { padding: 4px 14px; }
.tgt-row { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.tgt-row:last-child { border-bottom: 0; }
.tgt-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.tgt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.tgt-top { display: flex; gap: 8px; align-items: baseline; } .tgt-top b { flex: 1; font-size: 15.5px; }
.tgt-n { font-size: 20px; font-weight: 800; }
.tgt-bar { height: 6px; background: var(--surface-2, #F0EFE9); border-radius: 4px; overflow: hidden; } .tgt-bar i { display: block; height: 100%; border-radius: 4px; }
.tgt-act { font-size: 13px; color: var(--muted); }
.catbanner { display: flex; align-items: center; gap: 8px; background: #EFEAFB; color: #4C2F9E; border-radius: 12px; padding: 8px 12px; margin: 6px 0; }
.catbanner .ic { width: 18px; height: 18px; } .catbanner button { color: inherit; padding: 2px; }
html[data-theme=dark] .catbanner { background: #2A2340; color: #C9B8F5; }
.lr-cat { font-size: 12px; font-weight: 700; color: #5B3FC4; }
html[data-theme=dark] .lr-cat { color: #B9A6F5; }

/* Home: farmers waiting for a call back */
.cbalert { border: 1.5px solid #E8A69D; background: #FFF5F3; display: flex; flex-direction: column; gap: 10px; }
.cb-head { display: flex; gap: 12px; align-items: center; }
.cb-head b { display: block; font-size: 16px; color: #A3261C; }
.cb-head span:not(.cb-ic) { font-size: 13.5px; color: var(--muted); }
.cb-ic { width: 40px; height: 40px; border-radius: 12px; background: #FDE3DE; color: #A3261C; display: grid; place-items: center; flex: none; }
.cb-ic .ic { width: 22px; height: 22px; }
.cb-row { display: flex; gap: 12px; align-items: center; padding: 4px 0; }
.cb-row .pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cb-row .pr-main span { font-size: 13px; color: var(--muted); }
.cb-btn { background: #C0392B; color: #fff; justify-content: center; font-weight: 700; }
.cb-btn .ic { width: 20px; height: 20px; }
html[data-theme=dark] .cbalert { background: #2E1B19; border-color: #6B3029; }
html[data-theme=dark] .cb-head b { color: #F2A79C; }
html[data-theme=dark] .cb-ic { background: #3D1F1B; color: #F2A79C; }

/* Call details: AI reasoning, logic checks, solved complaint */
.ais-why { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #F3F0FC; color: #3F2C8C; font-size: 14.5px; }
html[data-theme=dark] .ais-why { background: #262040; color: #CFC3F7; }
.checkcard { border: 1.5px solid #E9C27A; background: #FFF9EE; }
.ck-head { display: flex; align-items: center; gap: 8px; color: #8A5300; }
.ck-head .ic { width: 20px; height: 20px; }
.ck-head span { margin-left: auto; background: #F5DDB0; color: #6B4100; font-weight: 700; font-size: 12px; border-radius: 999px; padding: 1px 8px; }
.checkcard ul { margin: 8px 0 4px; padding-left: 20px; display: grid; gap: 6px; font-size: 14.5px; }
.checkcard i { color: #8A5300; font-style: normal; font-weight: 600; }
html[data-theme=dark] .checkcard { background: #2E2617; border-color: #6B5121; }
html[data-theme=dark] .ck-head, html[data-theme=dark] .checkcard i { color: #F2C77C; }
html[data-theme=dark] .ck-head span { background: #4A3A1B; color: #F2C77C; }
.solvedcard { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid #9FD3B1; background: #EEF8F1; }
.solvedcard .ic { width: 22px; height: 22px; color: #1E6B3F; flex: none; margin-top: 2px; }
.solvedcard b { display: block; color: #1E6B3F; } .solvedcard span { font-size: 14px; color: var(--muted); }
html[data-theme=dark] .solvedcard { background: #1C3325; border-color: #2F5A3E; }
html[data-theme=dark] .solvedcard b, html[data-theme=dark] .solvedcard .ic { color: #9FDDB4; }

/* Offline banner */
.banner.offl { display: flex; gap: 8px; align-items: center; background: #3B4A41; color: #fff; }
.banner.offl .ic { width: 18px; height: 18px; flex: none; }
/* Voice notes */
.vncard .bhead { display: flex; align-items: center; justify-content: space-between; }
.vnrow { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.vnplay { width: 42px; height: 42px; min-height: 42px; padding: 0; border-radius: 50%; background: #F3F0FC; color: #5B3FC4; border: 0; flex: none; }
.vnplay .ic { width: 22px; height: 22px; }
.vn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vn-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .vn-top span { color: var(--muted); font-size: 13px; }
.vn-top .vndel { margin-left: auto; color: var(--muted); }
.vn-sum { font-size: 15px; }
.vnrec { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 10px 0; }
.vnbig { width: 92px; height: 92px; border-radius: 50%; background: #1E6B3F; color: #fff; border: 0; }
.vnbig .ic { width: 42px; height: 42px; }
.vnbig.on { background: #C0392B; animation: vnpulse 1.2s infinite; }
@keyframes vnpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,.45); } 50% { box-shadow: 0 0 0 14px rgba(192,57,43,0); } }
@media (prefers-reduced-motion: reduce) { .vnbig.on { animation: none; } }
.micbtn { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; border: 0; background: #F3F0FC; color: #5B3FC4; flex: none; }
.micbtn .ic { width: 20px; height: 20px; }
html[data-theme=dark] .vnplay, html[data-theme=dark] .micbtn { background: #262040; color: #B9A6F5; }

/* Product knowledge page */
.kn-state { border-left: 4px solid var(--muted, #8A9189); }
.kn-state.on { border-left-color: var(--green-ink); background: var(--green-tint); }
.kn-text { width: 100%; box-sizing: border-box; min-height: 55vh; margin-top: 8px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 10px; border: 1px solid var(--line, #DDE3DC); border-radius: 10px; background: var(--card); color: var(--ink); resize: vertical; }

/* Privacy & legal */
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--green-ink); }
.legalfoot { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; text-align: center; line-height: 1.5; }
.legalfoot a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pglist { margin: 0 0 0 18px; padding: 0; font-size: 14px; line-height: 1.5; }
.pglist li { margin: 4px 0; }
.storagebar { position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 70; display: flex; gap: 12px; align-items: center;
  background: var(--card); color: var(--text); border: 1px solid var(--line, #DDE3DC); border-radius: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.45; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.storagebar span { flex: 1; }
.storagebar a { color: var(--green-ink); }
@media (min-width: 900px) { .storagebar { left: auto; max-width: 460px; bottom: 16px; } }

/* Keyboard: a clear focus ring on everything you can Tab to (not shown for taps) */
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 8px; }
.btn:focus-visible, button:focus-visible, a:focus-visible, [role="link"]:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.gbar :focus-visible, .hero :focus-visible { outline-color: #FFFFFF; }
[role="link"][tabindex="0"] { cursor: pointer; }
.skiplink { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--green); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skiplink:focus { left: 12px; }

/* Visually hidden but still reachable by keyboard and screen readers (chip checkboxes). */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fchip:focus-within { outline: 3px solid var(--green); outline-offset: 2px; }
.tablewrap:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
