/* ---------- PHONE (< 760 px): native layout, no scaling; same data, actions and materials as the desktop ---------- */
body.m { overflow: hidden; }
body.m #app { position: fixed; inset: 0; width: 100vw; height: 100dvh; padding: 0; gap: 0; display: flex; flex-direction: column; font-size: 15px; transform: none; }
body.m .side { display: none; }
body.m .screen { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px 12px 14px; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
body.m .screen > * { flex: none; }
body.m .hs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; padding-bottom: 2px; }
body.m .hs::-webkit-scrollbar { display: none; }
body.m .mhead { display: flex; align-items: baseline; gap: 10px; padding: 4px 2px 0; }
body.m .mhead h1 { font-size: 30px; font-weight: 600; letter-spacing: -.3px; }
body.m .search { margin: 0; height: 46px; }
body.m .filters, body.m .chfilters { padding: 0; border: 0; }
body.m .chip { height: 38px; font-size: 14px; flex: none; }
body.m .chip.ch.icon-only { width: 48px; height: 40px; }
body.m .chhint { display: none; }
/* tab bar */
body.m .mtab { flex: none; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: #202125; box-shadow: 0 -1px 0 var(--edge); }
body.m .mt { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0 4px; color: #B8B8B4; font-size: 11px; border-radius: 10px; }
body.m .mt.on { color: #fff; background: #34353A; }
body.m .mt.on::before { content: ''; position: absolute; top: -6px; left: 30%; right: 30%; height: 3px; border-radius: 2px; background: var(--orange); }
body.m .mt .badge { position: absolute; top: 0; left: calc(50% + 6px); height: 18px; min-width: 18px; font-size: 11px; padding: 0 5px; }
body.m .mt .badge.over3d { background: #E9E8E5; color: #1C1D20; box-shadow: 0 0 0 2px #202125; }
body.m .mt.on .badge.over3d { box-shadow: 0 0 0 2px #34353A; }
/* inbox list */
body.m .rows { flex: none; padding: 6px; overflow: visible; }
body.m .row { grid-template-columns: 44px 1fr auto; gap: 10px; padding: 10px; }
body.m .row .nm { font-size: 15px; }
body.m .row .pv { font-size: 13px; }
body.m .row .rt .pill { font-size: 12px; height: 24px; padding: 0 8px; }
/* chat */
body.m .mchat { padding: 0; gap: 0; overflow: hidden; }
body.m .mchat .conv { flex: 1; min-height: 0; border-radius: 0; box-shadow: none !important; }
body.m .chead { gap: 8px; padding: 10px 10px; padding-top: calc(10px + env(safe-area-inset-top)); }
body.m .chead .back { width: 34px; color: var(--text); }
body.m .chead .who b { font-size: 16px; }
body.m .chead .who span { font-size: 12px; }
body.m .aiswitch { height: 38px; padding: 0 10px 0 6px; gap: 6px; font-size: 13px; }
body.m .aiswitch .toggle { width: 42px; height: 24px; }
body.m .aiswitch .toggle::after { width: 18px; height: 18px; }
body.m .aiswitch .toggle.on::after { left: 21px; }
body.m .msgs { padding: 12px 10px 6px; gap: 10px; }
body.m .m { max-width: 86%; font-size: 15px; padding: 10px 13px 8px; }
body.m .m.note { max-width: 100%; grid-template-columns: 20px 1fr; }
body.m .m.note time { grid-column: 2; }
body.m .media { flex-wrap: wrap; }
body.m .media img { width: 230px; height: 101px; }
body.m .file { min-width: 0; }
body.m .quick { flex-wrap: nowrap; overflow-x: auto; padding: 4px 10px 8px; scrollbar-width: none; }
body.m .quick::-webkit-scrollbar { display: none; }
body.m .quick .btn { flex: none; height: 36px; font-size: 13px; }
body.m .composer { gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
body.m .composer .in { height: 46px; }
body.m .composer input { font-size: 16px; }
body.m .send { width: 46px; height: 46px; }
/* sheets (client & deal, «Ще», client card, channel settings) */
body.m .drawer { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 86dvh; border-radius: 18px 18px 0 0; animation: sheetup .25s ease-out; padding-bottom: env(safe-area-inset-bottom); }
@keyframes sheetup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
body.m .drawer .dh h2 { font-size: 20px; }
body.m .drawer .db { overflow-y: auto; padding: 4px 12px 16px; }
body.m .drawer .rcol { overflow: visible; padding: 0; }
body.m .hist.big { padding: 14px 12px; font-size: 16px; margin-top: 8px; }
body.m .kv { grid-template-columns: 110px 1fr; font-size: 15px; }
/* CRM: one stage per screen width, swipe between stages */
body.m .crm { display: flex; overflow: hidden; }
body.m .head { flex-wrap: wrap; gap: 8px; padding: 12px; }
body.m .head h1 { font-size: 26px; width: 100%; margin: 0; }
body.m .head .grow { display: none; }
body.m .head .sel { height: 38px; font-size: 13px; padding: 0 10px; }
body.m .head .btn.primary { height: 40px !important; font-size: 14px !important; }
body.m .sumbar { font-size: 14px; width: 100%; order: 5; }
body.m .board { flex: 1; min-height: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 2px; }
body.m .col { flex: 0 0 88%; scroll-snap-align: start; }
body.m .colh b { font-size: 20px; }
body.m .colh .sum { font-size: 16px; }
body.m .card { grid-template-columns: 92px 1fr; gap: 10px; }
body.m .card .th { width: 92px; height: 90px; }
body.m .card .ti { font-size: 15px; }
body.m .card .am { font-size: 17px; }
body.m .card .more { opacity: 1; position: absolute; top: auto; bottom: 8px; right: 44px; }
/* orders & clients lists */
body.m .olist { display: flex; flex-direction: column; gap: 10px; }
body.m .ocard { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px; text-align: left; color: var(--ink); }
body.m .ocard .th { width: 64px; height: 62px; border-radius: 8px; overflow: hidden; position: relative; display: block; background: #DCDBD7; }
body.m .ocard .th img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.m .ocard .th .sp-req span { height: 16px; font-size: 8px; padding: 0 4px; }
body.m .ocard .th .sp-wf div { font-size: 7px; }
body.m .ocard .th .sp-lab, body.m .ocard .th .sp-bar span, body.m .ocard .th .sp-done { font-size: 8px; }
body.m .ocard .oc { display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: flex-start; }
body.m .ocard .oc b { font-size: 15px; }
body.m .ocard .oc > span:not(.stagechip) { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
body.m .ocard .stagechip { height: 24px; font-size: 12px; }
body.m .ocard .or { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; font-size: 14px; }
/* order detail */
body.m .order { display: flex; }
body.m .ohead { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
body.m .ohead h1 { font-size: 22px; }
body.m .crumbs { font-size: 15px; }
body.m .owho { border: 0; padding: 0; font-size: 14px; order: 3; }
body.m .ohead > .btn.primary { order: 4; height: 46px !important; font-size: 15px !important; width: 100%; white-space: normal; }
body.m .oclient { flex-wrap: wrap; order: 2; }
body.m .oclient .sep { display: none; }
body.m .oclient .chip { height: 34px; font-size: 13px; }
body.m .stepper { overflow-x: auto; padding: 10px 12px; gap: 10px; scrollbar-width: none; }
body.m .stepper::-webkit-scrollbar { display: none; }
body.m .stp { font-size: 14px; gap: 8px; flex: none; }
body.m .stp .n { width: 30px; height: 30px; font-size: 14px; }
body.m .stepper .dash { min-width: 16px; flex: 0 0 16px; }
body.m .ogrid { display: flex; flex-direction: column; gap: 10px; }
body.m .prev { order: -1; display: block; }
body.m .prevbox { height: 62vw; }
body.m .wt td, body.m .wt th { padding: 8px 10px; font-size: 14px; }
body.m .wt td.desc, body.m .wt th:nth-child(2) { display: none; }
body.m .wt tfoot td { font-size: 17px; } body.m .wt tfoot td.s { font-size: 19px; }
body.m .pay .prow { grid-template-columns: 16px 1fr auto; font-size: 14px; }
body.m .pay .prow .pill { grid-column: 2 / -1; justify-self: start; }
body.m .fromchat .m.ai-tile { grid-template-columns: 30px 1fr; }
body.m .fromchat .m.ai-tile time { grid-column: 2; }
/* AI manager */
body.m .aim, body.m .aim .left, body.m .aim .right { display: flex; flex-direction: column; gap: 10px; }
body.m .aim { overflow-y: auto; }
body.m .aimhead { flex-wrap: wrap; gap: 10px; padding: 12px; }
body.m .aimhead h1 { font-size: 26px; width: 100%; flex: none; }
body.m .tone { grid-template-columns: 1fr; gap: 14px; padding: 14px; }
body.m .tone .vl { display: none; }
body.m .slider { grid-template-columns: 80px 1fr 80px; gap: 10px; font-size: 14px; }
body.m .kgrid { grid-template-columns: 1fr 1fr; }
body.m .know .top, body.m .rulesp .top { flex-direction: column; gap: 10px; align-items: flex-start; }
body.m .rule { grid-template-columns: 24px 1fr 36px 36px; gap: 8px; }
body.m .rule .tx { font-size: 15px; }
body.m .cancreate { grid-template-columns: 1fr auto; padding: 12px 14px; }
body.m .cancreate .sel { grid-column: 1 / -1; }
body.m .savebar { height: 50px; font-size: 16px; }
body.m .tester { height: 560px; flex: none; }
body.m .tester h3 { font-size: 20px; }
body.m .sbox b { font-size: 26px; }
body.m .sbox span { font-size: 13px; }
/* analytics */
body.m .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
body.m .kpi { grid-template-columns: 40px 1fr; padding: 12px; }
body.m .kpi .ic { width: 40px; height: 40px; }
body.m .kpi .k { font-size: 14px; } body.m .kpi .v { font-size: 24px; } body.m .kpi .d { font-size: 12px; } body.m .kpi .d b { font-size: 13px; }
body.m .kpi:last-child { grid-column: 1 / -1; }
body.m .arow { grid-template-columns: 1fr; gap: 10px; }
body.m .ap { padding: 4px 14px 14px; }
body.m .ap .ptitle { flex-wrap: wrap; font-size: 17px; } body.m .ap .ptitle .r { width: 100%; margin: 0; font-size: 13px; }
body.m .fun { grid-template-columns: 94px 1fr 58px; gap: 10px 8px; }
body.m .fun .lb { font-size: 14px; } body.m .fun .tr { height: 36px; } body.m .fun .tr b { font-size: 15px; min-width: 46px; padding-right: 8px; } body.m .fun .cv { font-size: 12px; }
body.m .bars { grid-template-columns: 112px 1fr 36px; gap: 10px; } body.m .bars .lb { font-size: 13px; gap: 8px; } body.m .bars .tr { height: 30px; } body.m .bars .v { font-size: 15px; }
body.m .axis { margin: 6px 36px 0 122px; font-size: 11px; }
body.m .toptab td { font-size: 14px; padding: 8px; } body.m .toptab .mb { width: 70px; } body.m .toptab th { font-size: 12px; padding: 0 8px; }
body.m .airow { font-size: 15px; } body.m .airow b { font-size: 22px; } body.m .aibanner { font-size: 15px; }
/* channels */
body.m .chs .head h1 { font-size: 26px; } body.m .chs .head .sub { font-size: 14px; } body.m .okpill { height: 38px; font-size: 14px; }
body.m .chgrid, body.m .exgrid, body.m .setgrid, body.m .dsgrid { grid-template-columns: 1fr; gap: 10px; }
body.m .chc { padding: 12px; }
body.m .chc .t { grid-template-columns: 52px 1fr; gap: 10px; }
body.m .chc .t b { font-size: 19px; } body.m .chc .t > div > span { font-size: 13px; flex-wrap: wrap; }
body.m .chc .t .aisw { grid-column: 1 / 2; grid-row: 2; font-size: 13px; }
body.m .chc .t .btn { grid-column: 2; grid-row: 2; justify-self: end; height: 38px; }
body.m .chc .meta { grid-template-columns: 1fr 1fr; gap: 8px; } body.m .chc .meta > div { padding: 8px 10px; grid-template-columns: 24px 1fr; gap: 8px; } body.m .chc .meta b { font-size: 14px; } body.m .chc .meta small { font-size: 12px; }
body.m .lastc button { grid-template-columns: 36px 1fr auto 16px; gap: 10px; padding: 8px 12px 10px; } body.m .lastc b { font-size: 15px; } body.m .lastc span { font-size: 13px; }
body.m .exc { grid-template-columns: 48px 1fr auto; padding: 12px; } body.m .exc .ico { width: 48px; height: 48px; } body.m .exc b { font-size: 17px; } body.m .exc span { font-size: 13px; }
body.m .infob { font-size: 14px; padding: 12px; }
body.m .list-body { padding: 0; }
body.m .setp { padding: 14px; } body.m .setrow { font-size: 14px; gap: 10px; }
body.m .dsp .rowx { flex-wrap: wrap; }
/* overlays */
body.m .modal, body.m .modal.wide { width: 94vw; max-height: 88dvh; }
body.m .modal .mh h2 { font-size: 20px; }
body.m .form .two { grid-template-columns: 1fr; }
body.m .toasts { top: calc(10px + env(safe-area-inset-top)); bottom: auto; width: 92vw; }
body.m .toast { font-size: 14px; }
body.m .intro video, body.m .intro .intro-still { width: 78vw; height: 78vw; }
body.m .intro-still.pop-in { width: 46vw; height: 46vw; }
body.m .intro-wm { margin-top: -4px; } body.m .intro-wm b { font-size: 30px; } body.m .intro-wm span { font-size: 15px; }
body.m .mcard { width: 94vw; height: calc(94vw * 9 / 16); }
body.m .om-t { height: 34px; font-size: 12px; padding: 0 10px; gap: 6px; } body.m .om-t i { width: 18px; height: 18px; }
body.m .om-t.t1, body.m .om-t.t3 { left: 12px; } body.m .om-t.t2, body.m .om-t.t4 { right: 12px; } body.m .om-t.t1, body.m .om-t.t2 { top: 30px; } body.m .om-t.t3, body.m .om-t.t4 { bottom: 30px; }
body.m .om-final { width: 80%; padding: 14px 16px; gap: 4px; } body.m .om-final small { font-size: 11px; } body.m .om-final b { font-size: 15px; } body.m .om-final em { font-size: 20px; }
body.m .menu { min-width: 0; width: 250px; }
body.m .kpi .v { font-size: 21px; white-space: nowrap; }
body.m .tester .top { flex-wrap: wrap; gap: 8px; padding: 14px; }
body.m .tester .top > div { flex: 1 1 100%; }
body.m .tester .top .btn { height: 36px; font-size: 13px; }
body.m .kf { grid-template-columns: 26px 1fr 22px; padding: 10px; gap: 8px; }
body.m .kf b { font-size: 14px; } body.m .kf span { font-size: 12px; }
/* composer on the phone */
body.m .cmp { margin: 0 8px calc(8px + env(safe-area-inset-bottom)); padding: 8px 8px 6px; }
body.m .cmp textarea { font-size: 16px; min-height: 40px; }
body.m .tb { height: 36px; min-width: 36px; padding: 0 7px; }
body.m .tb span { display: none; }
body.m .ccount { display: none; }
body.m .cmp .btn.primary { height: 38px; padding: 0 12px; font-size: 14px; }
body.m .pop { left: 0; right: 0; width: auto; }
body.m .emogrid { grid-template-columns: repeat(8, 1fr); height: 210px; }
body.m .emocats button { width: 32px; font-size: 18px; }
body.m .emorecent .emo { width: 32px; font-size: 19px; }
body.m .tpllist { max-height: 46vh; }
body.m .closedbar { margin: 0 8px 6px; font-size: 13px; }
body.m .tplgrid { grid-template-columns: 1fr; gap: 10px; }
body.m .list-screen .head .search { width: 100% !important; }
body.m .deal { grid-template-columns: 1fr 1fr; }
body.m .deal label.sel { grid-column: 1 / -1; order: 3; }
body.m .sumopen { flex-direction: column; align-items: stretch; }
body.m .s3d.ico { width: 30px; height: 30px; margin: -2px 0 -4px; }
body.m .nexik.nx-head { width: 70px; height: 70px; }
body.m .nxbody { grid-template-columns: 1fr; }
body.m .nexik.nx-hero { min-height: 300px; height: 300px; flex: none; }
body.m .nxlabel b { font-size: 18px; text-align: center; }
body.m .nxg { grid-template-columns: 92px repeat(var(--cols), 64px); }
body.m .nxgrid { overflow-x: auto; }
body.m .casegrid { grid-template-columns: 1fr; }
body.m .nexik.nx-cele { width: 90px; height: 90px; }
body.m .setrow.team { grid-template-columns: 30px 1fr auto; } body.m .setrow.team .tact { grid-column: 2 / -1; grid-row: 2; }
/* phone: a compact Нексік so the dock does not cover the conversation (owner 26.10); the bubble is only his line (the «ШІ» switch
   in the header takes the conversation); buttons appear only when a person is needed */
body.m .msgs.with-nx { padding-bottom: 92px; }
body.m .msgs.with-nx.nx-tall { padding-bottom: 138px; }
body.m .nexik.nx-dock { width: 80px; height: 80px; margin-bottom: -6px; }
body.m .nxbub { max-width: 176px; font-size: 12px; line-height: 1.3; padding: 6px 10px; margin-bottom: 10px; border-radius: 10px 10px 3px 10px; }
body.m .nxbub b { font-size: 11px; }
body.m .nxacts { margin-top: 5px; gap: 5px; }
body.m .nxacts .btn { height: 28px; font-size: 12px; padding: 0 8px; }
body.m .nxwrap:not(.st-handoff) .nxacts { display: none; }
body.m .nxwrap { right: 6px; }
