/* Zyron Food Inbox. Palette B: warm white, jaggery brown, gold, espresso. Desktop >= 901px, phone <= 900px. */
:root {
  --bg: #FBF8F3; --card: #FFFFFF; --line: #EADFCF; --line2: #F2EBE0;
  --brown: #7A4A2A; --brown-d: #5A3420; --gold: #C8963E; --gold-d: #9A6B22; --esp: #2A1F18;
  --ink: #2A1F18; --muted: #8A7A6C; --soft: #F5EEE3;
  --wa: #1F8F5F; --wa-soft: #E6F4EC; --red: #C0392B; --red-soft: #FBEAE7; --ai: #FFF6E3; --ai-line: #EED9AE;
  --r: 14px; --sh: 0 1px 2px rgba(42,31,24,.06), 0 6px 20px rgba(42,31,24,.06);
  --f: 'Montserrat', 'Hind Siliguri', system-ui, sans-serif; --fb: 'Hind Siliguri', 'Montserrat', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--fb); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brown); }
.boot { height: 100vh; display: grid; place-content: center; gap: 12px; justify-items: center; color: var(--muted); }
.boot img { width: 64px; height: 64px; border-radius: 16px; }
.hide { display: none !important; }
.num { font-family: var(--f); font-variant-numeric: tabular-nums; }

/* buttons: slight zoom + ring on hover */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); font-weight: 600; transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { transform: scale(1.03); box-shadow: 0 0 0 3px rgba(200,150,62,.22); }
.btn:active { transform: scale(.98); }
.btn.pri { background: var(--esp); color: #fff; border-color: var(--esp); }
.btn.gold { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn.wa { background: var(--wa); color: #fff; border-color: var(--wa); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--red); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.ico { width: 20px; height: 20px; flex: none; }
.ibtn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: transparent; color: var(--ink); transition: background .15s, transform .15s; }
.ibtn:hover { background: var(--soft); transform: scale(1.06); }
input.in, textarea.in, select.in { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px 12px; outline: none; transition: border .15s, box-shadow .15s; }
input.in:focus, textarea.in:focus, select.in:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,150,62,.18); }
label.lb { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
.hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--esp); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 99; box-shadow: var(--sh); max-width: calc(100vw - 32px); }
.toast.err { background: var(--red); }

/* switch */
.sw { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 13px; user-select: none; }
.sw input { position: absolute; opacity: 0; pointer-events: none; }
.sw .tr { width: 40px; height: 24px; border-radius: 99px; background: #D9CDBD; position: relative; transition: background .2s; flex: none; }
.sw .tr::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sw input:checked + .tr { background: var(--gold); }
.sw input:checked + .tr::after { transform: translateX(16px); }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 80% -10%, #3A2A1F, var(--esp)); }
.login-card { width: 100%; max-width: 380px; background: var(--card); border-radius: 20px; padding: 28px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login-card .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-card .brand img { width: 48px; height: 48px; border-radius: 12px; }
.login-card h1 { font-size: 22px; margin: 0; }
.login-card h1 b { color: var(--gold-d); }
.login-card .btn { width: 100%; margin-top: 18px; min-height: 46px; }
.login-card .err { color: var(--red); font-size: 14px; margin-top: 10px; min-height: 20px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 72px 1fr; height: 100vh; height: 100dvh; }
.rail { background: var(--esp); display: flex; flex-direction: column; align-items: center; padding: 14px 0; gap: 6px; }
.rail img { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 14px; }
.rail a { position: relative; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; color: #CBB9A5; text-decoration: none; transition: background .15s, color .15s, transform .15s; }
.rail a:hover { background: rgba(255,255,255,.08); color: #fff; transform: scale(1.05); }
.rail a.on { background: rgba(200,150,62,.2); color: var(--gold); }
.rail a .tip { position: absolute; left: 60px; background: var(--esp); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 9; }
.rail a:hover .tip { opacity: 1; }
.rail .badge { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--wa); color: #fff; font: 700 11px/18px var(--f); }
.rail .sp { flex: 1; }
.main { min-width: 0; height: 100%; overflow: hidden; }
.tabbar { display: none; }

/* ---------- inbox ---------- */
.inbox { display: grid; grid-template-columns: 340px 1fr; height: 100%; }
.inbox.with-panel { grid-template-columns: 340px 1fr 320px; }
.list { border-right: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; min-height: 0; }
.list-h { padding: 16px 16px 8px; }
.list-h .t { display: flex; align-items: center; justify-content: space-between; }
.list-h h2 { margin: 0; font: 700 20px var(--f); }
.list-h .aim { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--wa-soft); color: var(--wa); }
.list-h .aim.off { background: var(--red-soft); color: var(--red); }
.search { position: relative; margin-top: 12px; }
.search input { padding-left: 38px; background: var(--bg); border-color: transparent; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; transition: all .15s; }
.chip:hover { border-color: var(--gold); }
.chip.on { background: var(--esp); color: #fff; border-color: var(--esp); }
.chip .n { margin-left: 4px; font-family: var(--f); opacity: .8; }
.convs { flex: 1; overflow-y: auto; }
.cv { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid var(--line2); transition: background .12s; align-items: center; }
.cv:hover { background: var(--bg); }
.cv.on { background: var(--soft); box-shadow: inset 3px 0 0 var(--gold); }
.av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 700 15px var(--f); color: #fff; background: var(--brown); flex: none; }
.cv .nm { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv .pv { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.cv.unread .pv { color: var(--ink); font-weight: 600; }
.cv .rt { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.cv .tm { font: 500 11.5px var(--f); color: var(--muted); }
.cv .un { min-width: 20px; height: 20px; border-radius: 10px; background: var(--wa); color: #fff; font: 700 11px/20px var(--f); text-align: center; padding: 0 6px; }
.tagrow { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--brown); }
.pill.ai { background: var(--ai); color: var(--gold-d); }
.pill.hu { background: #EEF0F4; color: #4A5568; }
.pill.esc { background: var(--red-soft); color: var(--red); }
.pill.ord { background: var(--wa-soft); color: var(--wa); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 6px; }

/* chat */
.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #F4EEE4; }
.chat-h { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); min-height: 64px; }
.chat-h .who { flex: 1; min-width: 0; }
.chat-h .who b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-h .who span { font-size: 12.5px; color: var(--muted); }
.chat-h .back { display: none; }
.win { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--wa-soft); color: var(--wa); white-space: nowrap; }
.win.closed { background: var(--red-soft); color: var(--red); }
.aisw { padding: 6px 10px; border-radius: 12px; background: var(--bg); }
.banner { margin: 10px 16px 0; padding: 10px 14px; border-radius: 12px; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.banner.esc { background: var(--red-soft); color: var(--red); }
.banner.pause { background: #EEF0F4; color: #4A5568; }
.banner .btn { margin-left: auto; }
.msgs { flex: 1; overflow-y: auto; padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 6px;
  background-image: radial-gradient(rgba(122,74,42,.05) 1px, transparent 1px); background-size: 18px 18px; }
.day { align-self: center; font: 600 11.5px var(--f); color: var(--muted); background: rgba(255,255,255,.8); padding: 4px 10px; border-radius: 99px; margin: 8px 0; }
.b { max-width: min(560px, 78%); padding: 8px 12px 6px; border-radius: 14px; background: #fff; box-shadow: 0 1px 1px rgba(42,31,24,.06); line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; position: relative; }
.b.in { align-self: flex-start; border-top-left-radius: 4px; }
.b.out { align-self: flex-end; border-top-right-radius: 4px; background: #F3E6D6; }
.b.out.ai { background: var(--ai); border: 1px solid var(--ai-line); }
.b .who { font: 700 11px var(--f); color: var(--gold-d); margin-bottom: 2px; display: flex; align-items: center; gap: 4px; }
.b.out:not(.ai) .who { color: var(--brown); }
.b .meta { font: 500 10.5px var(--f); color: var(--muted); text-align: right; margin-top: 2px; display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.b .meta .tick.read { color: #2E86DE; }
.b .meta .tick.failed { color: var(--red); }
.b .err { font-size: 12px; color: var(--red); margin-top: 4px; }
.b img.media { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; margin: 2px 0 4px; cursor: zoom-in; background: var(--soft); min-width: 120px; min-height: 80px; object-fit: cover; }
.b audio, .b video { max-width: 100%; display: block; margin: 2px 0 4px; }
.b .doc { display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 10px; background: rgba(0,0,0,.04); text-decoration: none; color: inherit; }
.b.react { background: transparent; box-shadow: none; padding: 0 4px; font-size: 20px; }
.typing { align-self: flex-end; font-size: 13px; color: var(--gold-d); font-weight: 600; padding: 6px 12px; background: var(--ai); border-radius: 12px; border: 1px solid var(--ai-line); }
.typing i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin-left: 3px; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }

.composer { background: var(--card); border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.composer .row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; max-height: 160px; min-height: 44px; border-radius: 14px; background: var(--bg); border-color: transparent; line-height: 1.45; }
.composer .send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--wa); color: #fff; display: grid; place-items: center; flex: none; transition: transform .15s, box-shadow .2s; }
.composer .send:hover { transform: scale(1.06); box-shadow: 0 0 0 4px rgba(31,143,95,.2); }
.composer .tools { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.composer .closed { padding: 10px 12px; border-radius: 12px; background: var(--red-soft); color: var(--red); font-size: 14px; }
.qr-pop { position: absolute; bottom: 100%; left: 12px; right: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh); max-height: 280px; overflow-y: auto; margin-bottom: 6px; z-index: 5; }
.qr-pop div { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line2); }
.qr-pop div:hover { background: var(--bg); }
.qr-pop b { display: block; font-size: 13px; }
.qr-pop span { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nochat { display: grid; place-content: center; text-align: center; color: var(--muted); gap: 10px; height: 100%; background: #F4EEE4; }
.nochat img { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto; opacity: .9; }
.nochat b { color: var(--ink); font-size: 18px; }

/* customer panel */
.panel { background: var(--card); border-left: 1px solid var(--line); overflow-y: auto; padding: 0 0 24px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line2); }
.panel-h b { font: 700 15px var(--f); }
.panel .sec { padding: 14px 16px; border-bottom: 1px solid var(--line2); }
.panel .sec h4 { margin: 0 0 10px; font-size: 14px; }
.prof { display: flex; gap: 12px; align-items: center; }
.prof .av { width: 52px; height: 52px; font-size: 18px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 14px; margin-top: 12px; }
.kv span { color: var(--muted); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags .pill { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; padding: 4px 8px; }
.tags .pill button { border: 0; background: none; padding: 0; color: inherit; font-weight: 700; }
.ord-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 13.5px; }
.ord-card b { font-family: var(--f); }
.oline { display: grid; grid-template-columns: 1fr 1fr 64px 32px; gap: 6px; margin-bottom: 6px; }

/* ---------- pages ---------- */
.page { height: 100%; overflow-y: auto; padding: 28px 32px 48px; }
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-h h1 { margin: 0; font: 800 24px var(--f); }
.page-h h1 em { font-style: normal; color: var(--gold-d); }
.seg { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13px; }
.seg button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); }
.card .k { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.card .v { font: 800 30px var(--f); margin-top: 6px; }
.card .s { font-size: 13px; color: var(--muted); margin-top: 4px; }
.card .v small { font-size: 14px; font-weight: 600; color: var(--muted); }
.card.hero { grid-column: span 2; background: var(--esp); color: #fff; border-color: transparent; position: relative; overflow: hidden; }
.card.hero .k, .card.hero .s { color: #CBB9A5; }
.card.hero .v { color: var(--gold); font-size: 38px; }
/* moving border light on the one key card */
.glow { position: relative; isolation: isolate; }
.glow::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; z-index: -1;
  background: conic-gradient(from var(--a, 0deg), transparent 0 70%, var(--gold) 82%, #fff3 88%, transparent 94%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 6s linear infinite; }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --a: 360deg; } }
.grid2 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; margin-top: 14px; }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 180px; margin-top: 16px; }
.chart .col { flex: 1; display: flex; flex-direction: column-reverse; min-width: 2px; border-radius: 4px 4px 0 0; overflow: hidden; }
.chart .col i { display: block; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.bar2 { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; margin: 8px 0 4px; }
.bar2 i { display: block; height: 100%; background: var(--gold); }
table.t { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); }
table.t th, table.t td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line2); font-size: 14px; vertical-align: top; }
table.t th { font-size: 12.5px; color: var(--muted); background: var(--bg); }
.mob-orders { display: none; }

/* settings */
.set { display: grid; grid-template-columns: 220px 1fr; gap: 24px; max-width: 1100px; }
.set nav { display: flex; flex-direction: column; gap: 4px; }
.set nav button { text-align: left; border: 0; background: transparent; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.set nav button.on { background: var(--card); box-shadow: var(--sh); color: var(--brown); }
.set .body { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--sh); min-width: 0; }
.set h3 { margin: 0 0 4px; font: 700 18px var(--f); }
.opt { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.opt label { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: border .15s; }
.opt label:has(input:checked) { border-color: var(--gold); background: #FFFBF2; }
.opt input { margin-right: 6px; accent-color: var(--gold); }
.opt small { display: block; color: var(--muted); margin-top: 4px; }
textarea.big { min-height: 320px; font-size: 14px; line-height: 1.6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--bg); padding: 8px 10px; border-radius: 8px; word-break: break-all; }
.log { font-size: 13px; border-bottom: 1px solid var(--line2); padding: 8px 0; }
.log .e { color: var(--red); }

/* playground */
.play { display: grid; grid-template-columns: 1fr 340px; gap: 18px; height: calc(100% - 60px); min-height: 520px; }
.play .phone { background: #F4EEE4; border-radius: 22px; border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--sh); }
.play .steps { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; overflow-y: auto; }
.step { font-size: 13px; padding: 8px 10px; background: var(--bg); border-radius: 10px; margin-bottom: 8px; white-space: pre-wrap; word-break: break-word; }
.step b { color: var(--brown); }

.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: grid; place-items: center; z-index: 50; padding: 16px; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* ---------- phone layout (separate design, not squeezed desktop) ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; min-height: 56px; justify-content: center; }
  .tabbar a.on { color: var(--brown); }
  .tabbar a.on svg { color: var(--gold); }
  .tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--wa); color: #fff; font: 700 10.5px/18px var(--f); padding: 0 5px; }
  .shell.chatting { grid-template-rows: 1fr; }
  .shell.chatting .tabbar { display: none; }

  .inbox, .inbox.with-panel { grid-template-columns: 1fr; }
  .inbox .chat, .inbox .panel { display: none; }
  .inbox.open .list { display: none; }
  .inbox.open .chat { display: flex; height: 100%; }
  .inbox.open.with-panel .chat { display: none; }
  .inbox.open.with-panel .panel { display: block; height: 100%; border: 0; }
  .list-h { padding: 14px 16px 6px; }
  .list-h h2 { font-size: 22px; }
  .cv { padding: 12px 16px; grid-template-columns: 48px 1fr auto; }
  .cv .av { width: 48px; height: 48px; }
  .chat-h { padding: 8px 8px 8px 4px; gap: 6px; min-height: 58px; }
  .chat-h .back { display: inline-grid; }
  .chat-h .av { width: 38px; height: 38px; font-size: 13px; }
  .chat-h .win { display: none; }
  .chat-h .aisw { padding: 4px 6px; }
  .chat-h .aisw .lbl { display: none; }
  .chat-h .resolve { display: none; }
  .msgs { padding: 12px 10px 6px; }
  .b { max-width: 86%; }
  .banner { margin: 8px 10px 0; font-size: 13px; }
  .mwin { display: block !important; text-align: center; font-size: 12px; padding: 6px; color: var(--wa); background: var(--wa-soft); }
  .mwin.closed { color: var(--red); background: var(--red-soft); }

  .page { padding: 16px 16px 32px; }
  .page-h h1 { font-size: 22px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card { padding: 14px; }
  .card .v { font-size: 24px; }
  .card.hero { grid-column: span 2; }
  .card.hero .v { font-size: 32px; }
  .grid2 { grid-template-columns: 1fr; }
  .chart { height: 130px; }
  table.t { display: none; }
  .mob-orders { display: block; }
  .set { grid-template-columns: 1fr; gap: 12px; }
  .set nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .set nav button { flex: none; }
  .set .body { padding: 16px; }
  .opt, .row2 { grid-template-columns: 1fr; }
  .play { grid-template-columns: 1fr; height: auto; }
  .play .phone { height: 70vh; }
}
.mwin { display: none; }
.pill.lv-hot { background: #FDE4DE; color: #B23A1E; }
.pill.lv-warm { background: #FFF1D6; color: #9A6B22; }
.pill.lv-cold { background: #E8EEF4; color: #4A5A7A; }
.pill.lv-ordered { background: var(--wa-soft); color: var(--wa); }
.pill.lv-not_lead { background: #EEE; color: #666; }
.badge.fu { background: var(--gold) !important; }
.ainote { background: var(--ai); border: 1px solid var(--ai-line); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.5; margin-top: 8px; }
.ainote .who { font: 700 11px var(--f); color: var(--gold-d); display: flex; gap: 4px; align-items: center; margin-bottom: 4px; }
.ainote b { display: block; margin-bottom: 2px; }
.ainote .nx { margin-top: 6px; color: var(--brown); font-weight: 600; }
.fulist { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.fu-top { display: flex; gap: 12px; align-items: center; }
.fu-card .due { font: 600 12px var(--f); color: var(--muted); margin-top: 6px; }
.fu-card .due.over { color: var(--red); }
.fu-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.fu-log { margin-top: 8px; font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 8px; }
.fu-form { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 4px; }
@media (max-width: 900px) {
  .tabbar { grid-template-columns: repeat(6, 1fr) !important; }
  .tabbar a { font-size: 10px; }
  .fulist { grid-template-columns: 1fr; gap: 10px; }
}
.testbox { margin: 0 16px 4px; padding: 10px 12px; border-radius: 12px; background: var(--ai); border: 1px dashed var(--gold); }
.simbar { display: flex; gap: 8px; align-items: center; padding: 8px 12px; background: var(--ai); border-top: 1px dashed var(--gold); }
.simbar input { flex: 1; min-height: 38px; padding: 8px 12px; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }
.composer .mic { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--brown); display: grid; place-items: center; flex: none; transition: transform .15s, box-shadow .2s; }
.composer .mic:hover { transform: scale(1.06); box-shadow: 0 0 0 4px rgba(200,150,62,.2); }
.recbar { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-weight: 600; color: var(--red); }
.recbar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: blink 1s infinite; }
.recbar .btn span svg { width: 16px; height: 16px; }
/* CRM and হিসাব inside the portal */
#frames iframe { position: fixed; top: 0; right: 0; bottom: 0; left: 72px; width: calc(100% - 72px); height: 100%; border: 0; background: #fff; display: none; z-index: 5; }
#frames iframe.on { display: block; }
.morelist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.morelist .card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-decoration: none; color: var(--ink); }
.morelist .card .ico { color: var(--gold-d); width: 24px; height: 24px; }
@media (max-width: 900px) {
  #frames iframe { left: 0; width: 100%; bottom: auto; height: calc(100vh - 57px - env(safe-area-inset-bottom)); height: calc(100dvh - 57px - env(safe-area-inset-bottom)); }
  .tabbar { grid-template-columns: repeat(5, 1fr) !important; }
  .tabbar a { font-size: 11px; }
}
