/* Tarqumi · Fleet — soft bento look copied from the approved Leads Hub demo (_reference/leads-demo/styles.css). Fleet-only additions are at the end. */
:root{
  --canvas:#DFE2E8; --frame:#F2F3F6; --card:#FFFFFF; --soft:#F2F3F6; --soft-2:#E8EAEF;
  --ink:#14161B; --t2:#5C626E; --t3:#9AA0AC; --line:#EDEFF3;
  --accent:#2556FF; --accent-soft:#E8EDFF; --accent-t:#1D44D4;
  --grad:linear-gradient(140deg,#5A82FF 0%,#2556FF 52%,#1A3CCB 100%);
  --green:#149A56; --green-soft:#E1F5EA; --amber:#C2740A; --amber-soft:#FFF1DB; --red:#E0453F; --red-soft:#FDE9E8;
  --wa:#1FAF5A;
  --r:24px; --r-in:16px;
  --f:"Outfit","Tajawal",system-ui,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--canvas);color:var(--ink);font:500 14.5px/1.6 var(--f);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
input,select,textarea{font:inherit;color:inherit}
h1,h2,h3,h4,p,ol,ul{margin:0}
svg.lucide{width:18px;height:18px;stroke-width:1.75;flex:none}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.t2{color:var(--t2)} .t3{color:var(--t3)}
.clip{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.clip2{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ltr{direction:ltr;unicode-bidi:plaintext}

/* ---------- frame & top bar ---------- */
.frame{margin:14px;padding:20px 24px 28px;background:var(--frame);border-radius:36px;min-height:calc(100vh - 28px)}
.top{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px}
.brand{justify-self:start;display:flex;align-items:center;height:52px;padding:0 20px;border-radius:26px;background:var(--card)}
.brand img{height:26px;display:block}
.nav{display:flex;gap:2px;padding:6px;border-radius:999px;background:var(--card)}
.nav a{display:flex;align-items:center;gap:7px;height:40px;padding:0 18px;border-radius:999px;color:var(--t2);font-weight:500;white-space:nowrap;transition:background .2s,color .2s}
.nav a:hover{color:var(--ink)}
.nav a.on{background:var(--ink);color:#fff}
.cnt{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--red);color:#fff;font:600 11px/18px "Outfit";text-align:center}
.cnt.wa{background:var(--wa)}
.cnt:empty{display:none}
.tools{justify-self:end;display:flex;align-items:center;gap:8px}
.round{position:relative;width:46px;height:46px;border-radius:50%;background:var(--card);display:grid;place-items:center;color:var(--ink);flex:none;transition:transform .15s,background .2s,color .2s}
.round:hover{background:var(--ink);color:#fff}
.round:active{transform:scale(.94)}
.round.dark{background:var(--ink);color:#fff}
.round.dark:hover{background:var(--accent)}
.round.sm{width:36px;height:36px;background:var(--soft)}
.round.sm svg.lucide{width:16px;height:16px}
.round .dot{position:absolute;top:11px;inset-inline-end:12px;width:9px;height:9px;border-radius:50%;background:var(--red);box-shadow:0 0 0 2px var(--card)}
.user{display:flex;align-items:center;gap:10px;height:52px;padding:0 6px 0 18px;border-radius:26px;background:var(--card)}
.user b{display:block;font-weight:700;font-size:14px;line-height:1.25}
.user span{font-size:12px;color:var(--t3)}
.user .av{width:40px;height:40px;font-size:16px}

/* ---------- shell ---------- */
.shell{display:grid;grid-template-columns:58px minmax(0,1fr);gap:20px;margin-top:24px;align-items:start}
.rail{position:sticky;top:20px;display:flex;flex-direction:column;justify-content:space-between;gap:16px;min-height:calc(100vh - 170px)}
.rail-g{display:flex;flex-direction:column;gap:6px;padding:6px;border-radius:29px;background:var(--card)}
.rail .round{background:transparent}
.rail .round:hover{background:var(--soft);color:var(--ink)}
.rail .round.dark{background:var(--ink)}
.rail .round.dark:hover{background:var(--accent);color:#fff}
.view{min-width:0}
.page.enter>*{animation:rise .5s cubic-bezier(.2,.7,.2,1) both}
.page.enter>*:nth-child(2){animation-delay:.06s}.page.enter>*:nth-child(3){animation-delay:.12s}.page.enter>*:nth-child(4){animation-delay:.18s}
@keyframes rise{from{opacity:0;transform:translateY(10px)}}

/* ---------- common pieces ---------- */
.hello{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:22px}
.hello h1{font-size:34px;font-weight:500;line-height:1.3;letter-spacing:-.01em}
.hello h1 span{color:var(--t3)}
.hello p{color:var(--t2);margin-top:2px}
.hello .end{margin-inline-start:auto;display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:46px;padding:0 20px;border-radius:999px;background:var(--card);font-weight:700;white-space:nowrap;transition:background .2s,color .2s,transform .12s}
.btn:hover{background:var(--soft-2)}
.btn:active{transform:scale(.97)}
.btn.dark{background:var(--ink);color:#fff}
.btn.dark:hover{background:#2A2E37}
.btn.accent{background:var(--accent);color:#fff}
.btn.accent:hover{background:#1C47E6}
.btn.wa{background:var(--wa);color:#fff}
.btn.wa:hover{background:#199A4E}
.btn.soft{background:var(--soft)}
.btn.soft:hover{background:var(--soft-2)}
.btn.sm{height:36px;padding:0 14px;font-size:13.5px}
.btn.sm svg.lucide{width:15px;height:15px}
.btn.grow{flex:1}
.pill{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 10px;border-radius:999px;font-size:12.5px;font-weight:700;background:var(--soft);color:var(--t2);white-space:nowrap}
.pill svg.lucide{width:13px;height:13px}
.pill.red{background:var(--red-soft);color:var(--red)} .pill.amber{background:var(--amber-soft);color:var(--amber)}
.pill.green{background:var(--green-soft);color:var(--green)} .pill.blue{background:var(--accent-soft);color:var(--accent-t)}
.st{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:500;white-space:nowrap}
.st::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--c,var(--t3))}
.st.red{--c:var(--red)} .st.amber{--c:var(--amber)} .st.green{--c:var(--green)} .st.blue{--c:var(--accent)}
.av{--h:222;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;flex:none;font:700 15px/1 "Tajawal";color:hsl(var(--h) 60% 34%);background:hsl(var(--h) 80% 92%)}
.av.s{width:28px;height:28px;font-size:12.5px}
.av.xs{width:22px;height:22px;font-size:10.5px}
.av.l{width:56px;height:56px;font-size:23px}
.av.xl{width:72px;height:72px;font-size:30px;border-radius:24px}
.ring{position:relative;display:inline-grid;place-items:center;flex:none}
.ring svg{position:absolute;inset:0;width:100%;height:100%;transform:rotate(-90deg)}
.ring .rt{stroke:var(--soft-2)} .ring .rv{stroke:var(--accent)}
.ring b{font:600 14px "Outfit"}
.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:28px 12px;color:var(--t3);text-align:center}
.empty svg.lucide{width:22px;height:22px}

.g{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px}
.c3{grid-column:span 3}.c4{grid-column:span 4}.c5{grid-column:span 5}.c6{grid-column:span 6}.c7{grid-column:span 7}.c8{grid-column:span 8}.c12{grid-column:span 12}
.card{background:var(--card);border-radius:var(--r);padding:20px;min-width:0}
.card.flush{padding:0;overflow:hidden}
.ch{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.ch h3{font-size:17px;font-weight:700;line-height:1.3}
.ch p{font-size:12.5px;color:var(--t3)}
.ch .end{margin-inline-start:auto;display:flex;gap:6px;align-items:center}
.col{display:flex;flex-direction:column;gap:16px;min-width:0}

/* ---------- home: focus card ---------- */
.focus{display:flex;flex-direction:column}
.focus .lbl{display:flex;align-items:center;justify-content:space-between;color:var(--t2);font-size:13.5px}
.focus h2{font-size:23px;font-weight:700;line-height:1.45;margin:10px 0 12px}
.focus .who{display:flex;align-items:center;gap:10px;font-size:13.5px;color:var(--t2);margin-bottom:16px}
.focus .who b{color:var(--ink);font-weight:700}
.focus .acts{display:flex;gap:8px;margin-bottom:16px}
.nexts{margin-top:auto;background:var(--soft);border-radius:20px;padding:12px}
.nexts-h{display:flex;gap:8px;align-items:center;font-size:13px;font-weight:700;padding:0 4px 10px}
.nexts-h span{color:var(--t3);font-weight:500;padding-inline-start:8px;border-inline-start:1px solid var(--soft-2)}
.nexts-g{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.nx{display:flex;flex-direction:column;gap:6px;background:var(--card);border-radius:14px;padding:10px;font-size:12.5px;transition:transform .15s}
.nx:hover{transform:translateY(-2px)}
.nx .co{display:flex;align-items:center;gap:6px;font-weight:700;font-size:12.5px}
.nx p{line-height:1.5;color:var(--t2);min-height:38px}
.nx small{font-weight:700;font-size:11.5px}
.nx small.over{color:var(--red)} .nx small.tod{color:var(--amber)} .nx small.up{color:var(--accent-t)}

/* tiles */
.tiles{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.tile{display:flex;flex-direction:column;justify-content:space-between;gap:10px;background:var(--card);border-radius:var(--r);padding:18px;min-height:146px}
.tile .tl{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:13.5px;color:var(--t2)}
.tile .ti{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--soft);color:var(--ink)}
.tile .ti svg.lucide{width:16px;height:16px}
.tile b{font:500 34px/1.1 "Outfit";letter-spacing:-.02em}
.tile b small{font-size:18px;color:var(--t3);font-weight:400}
.tile .tf{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--t3)}
.tile .tf .mini{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:999px;background:var(--soft);color:var(--ink);font-weight:700;font-size:12px}
.tile.accent{background:var(--grad);color:#fff;box-shadow:0 14px 28px -16px rgba(37,86,255,.8)}
.tile.accent .tl{color:rgba(255,255,255,.85)}
.tile.accent .ti{background:rgba(255,255,255,.2);color:#fff}
.tile.accent .tf{color:rgba(255,255,255,.8)}
.tile.accent .tf .mini{background:rgba(255,255,255,.22);color:#fff}

/* bar chart */
.legend{display:flex;gap:14px;font-size:12.5px;color:var(--t2)}
.legend span{display:flex;align-items:center;gap:6px}
.legend i{width:10px;height:10px;border-radius:3px;background:var(--ink)}
.legend i.h{background:repeating-linear-gradient(135deg,var(--accent) 0 3px,#8EA8FF 3px 5px)}
.chart{display:grid;grid-template-columns:22px 1fr;gap:10px;height:200px}
.yax{display:flex;flex-direction:column;justify-content:space-between;padding-bottom:28px;font:400 11.5px "Outfit";color:var(--t3);text-align:center}
.bars{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;background:linear-gradient(var(--line),var(--line)) 0 0/100% 1px no-repeat,linear-gradient(var(--line),var(--line)) 0 calc((100% - 28px)/2)/100% 1px no-repeat,linear-gradient(var(--line),var(--line)) 0 calc(100% - 28px)/100% 1px no-repeat}
.bcol{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
.bstack{flex:1;width:100%;max-width:34px;display:flex;flex-direction:column;gap:3px;min-height:0}
.bstack i{display:block;flex-basis:0;border-radius:9px;min-height:0}
.bstack .out{background:var(--ink)}
.bstack .in{background:repeating-linear-gradient(135deg,var(--accent) 0 5px,#8EA8FF 5px 8px)}
.bstack .none{flex:0 0 6px;background:var(--soft-2);border-radius:3px}
.bcol span{font-size:11.5px;color:var(--t3);height:20px;white-space:nowrap}
.bcol.today span{color:var(--ink);font-weight:700}

/* hot cards (credit-card style) */
.ccards{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:12px}
.ccard{position:relative;overflow:hidden;display:flex;flex-direction:column;justify-content:space-between;gap:18px;min-height:168px;padding:16px;border-radius:20px;background:var(--ink);color:#fff;transition:transform .2s}
.ccard:hover{transform:translateY(-3px)}
.ccard.blue{background:var(--grad)}
.ccard::before,.ccard::after{content:"";position:absolute;top:14px;width:26px;height:26px;border-radius:50%;background:rgba(255,255,255,.28)}
.ccard::before{inset-inline-end:14px}
.ccard::after{inset-inline-end:30px;background:rgba(255,255,255,.14)}
.cc-chip{align-self:flex-start;display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px;border-radius:999px;background:rgba(255,255,255,.14);font-size:12px;font-weight:700}
.cc-chip i{width:6px;height:6px;border-radius:50%;background:#7CF0AE}
.cc-name{font-size:19px;font-weight:700;line-height:1.3}
.cc-name small{display:block;font:400 11.5px "Outfit";opacity:.6;direction:ltr;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cc-row{display:flex;justify-content:space-between;gap:8px}
.cc-row small{display:block;font-size:10.5px;opacity:.6}
.cc-row b{font-size:13px;font-weight:700;white-space:nowrap}

/* table */
.tsearch{display:flex;align-items:center;gap:8px;height:40px;width:220px;padding:0 14px;border-radius:999px;background:var(--soft);color:var(--t3)}
.tsearch input{flex:1;min-width:0;border:0;outline:0;background:transparent;color:var(--ink)}
.tsearch svg.lucide{width:16px;height:16px}
.trow{display:grid;grid-template-columns:24px minmax(0,2.6fr) minmax(0,1.2fr) 96px 110px 110px 36px;align-items:center;gap:14px;padding:0 14px;min-height:54px;border-bottom:1px solid var(--line);font-size:14px}
.trow:last-child{border-bottom:0}
.trow.th{min-height:42px;background:var(--soft);border-radius:14px;border:0;font-size:12.5px;color:var(--t3)}
.trow:not(.th):hover{background:#FAFBFC}
.trow.done .tt{text-decoration:line-through;color:var(--t3)}
.trow .tt{font-weight:700}
.trow .co{display:flex;align-items:center;gap:8px;min-width:0}
.trow .co:hover{color:var(--accent)}
.cb{width:20px;height:20px;border-radius:6px;border:1.5px solid #C9CDD6;display:grid;place-items:center;color:#fff;transition:.15s;background:#fff}
.cb svg.lucide{width:13px;height:13px;stroke-width:3;opacity:0}
.cb:hover{border-color:var(--ink)}
.cb.on{background:var(--ink);border-color:var(--ink)} .cb.on svg.lucide{opacity:1}
.more{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;color:var(--t3)}
.more:hover{background:var(--soft);color:var(--ink)}
.more svg.lucide{width:16px;height:16px}

/* pipeline strip */
.pstages{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.ps{display:flex;flex-direction:column;gap:6px;padding:12px;border-radius:var(--r-in);background:var(--soft);min-height:132px}
.ps-h{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--t2);white-space:nowrap}
.ps-h i{width:7px;height:7px;border-radius:50%;background:var(--c)}
.ps b{font:500 28px/1.1 "Outfit";color:var(--t3)}
.ps.has{background:var(--accent-soft)}
.ps.has b{color:var(--accent-t)}
.ps-cos{display:flex;flex-direction:column;gap:4px;margin-top:auto}
.chipco{display:flex;align-items:center;gap:6px;padding:3px 8px 3px 3px;border-radius:999px;background:var(--card);font-size:12px;font-weight:700;min-width:0}
.chipco:hover{background:var(--ink);color:#fff}

/* message list */
.msg{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}
.msg:last-child{border-bottom:0;padding-bottom:0}
.msg:first-child{padding-top:0}
.msg .b{flex:1;min-width:0}
.msg .h{display:flex;justify-content:space-between;gap:8px;font-size:13.5px}
.msg .h b{font-weight:700}
.msg .h span{font-size:12px;color:var(--t3);white-space:nowrap}
.msg p{font-size:13px;color:var(--t2);line-height:1.55;margin-top:2px}
.msg.in p{color:var(--ink)}

/* ---------- companies: filters + dark master-detail ---------- */
.filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.fpill{display:flex;align-items:center;gap:8px;height:42px;padding:0 16px;border-radius:999px;background:var(--card);color:var(--t2);font-weight:500}
.fpill b{font:600 12px "Outfit";min-width:20px;height:20px;border-radius:10px;background:var(--soft);display:grid;place-items:center;color:var(--ink)}
.fpill.on{background:var(--ink);color:#fff} .fpill.on b{background:rgba(255,255,255,.18);color:#fff}
.filters .tsearch{margin-inline-start:auto;background:var(--card);height:42px;width:260px}
.md{display:grid;grid-template-columns:360px minmax(0,1fr);gap:16px;padding:16px;border-radius:30px;background:var(--ink);color:#fff}
.md-list{display:flex;flex-direction:column;gap:6px;max-height:620px;overflow:auto}
.md-h{display:flex;justify-content:space-between;align-items:center;padding:6px 8px 12px;font-weight:700;font-size:16px}
.md-h span{font:400 12.5px "Outfit";color:#8A909C}
.md-row{display:flex;align-items:center;gap:12px;width:100%;padding:12px;border-radius:18px;text-align:right;transition:background .2s}
.md-row:hover{background:rgba(255,255,255,.06)}
.md-row.on{background:var(--accent)}
.md-row .t{flex:1;min-width:0}
.md-row .t b{display:block;font-weight:700;font-size:15px;line-height:1.3}
.md-row .t span{font-size:12px;color:#9AA0AC}
.md-row.on .t span{color:rgba(255,255,255,.75)}
.md-row .sc{font:500 20px "Outfit"}
.md-row .tag{height:24px;padding:0 10px;border-radius:999px;background:rgba(255,255,255,.1);font-size:12px;font-weight:700;display:grid;place-items:center;white-space:nowrap}
.md-row.on .tag{background:#fff;color:var(--ink)}
.md-detail{position:relative;overflow:hidden;display:flex;flex-direction:column;gap:20px;padding:24px;border-radius:22px;background:var(--grad)}
.md-detail::before{content:"";position:absolute;width:380px;height:380px;border-radius:50%;background:rgba(255,255,255,.08);top:-200px;inset-inline-end:-120px;pointer-events:none}
.md-detail>*{position:relative}
.md-top{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto;gap:20px;align-items:start}
.md-top small{display:block;font-size:12px;opacity:.7;margin-bottom:4px}
.md-top h2{font-size:28px;font-weight:700;line-height:1.25}
.md-top .dm{display:flex;align-items:center;gap:10px}
.md-top .dm b{display:block;font-weight:700;line-height:1.3}
.md-top .dm span{font-size:12px;opacity:.7}
.md-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.md-tile{padding:14px;border-radius:16px;background:rgba(255,255,255,.14);min-height:98px;display:flex;flex-direction:column;justify-content:space-between}
.md-tile b{font:500 26px/1.1 "Outfit"}
.md-tile span{font-size:12.5px;opacity:.8}
button.md-tile{align-items:center;justify-content:center;gap:6px;background:transparent;border:1.5px dashed rgba(255,255,255,.4);color:#fff;font-weight:700;font-size:13px}
button.md-tile:hover{background:rgba(255,255,255,.1)}
.md-next{padding:16px;border-radius:16px;background:rgba(14,22,60,.28)}
.md-next small{font-size:12px;opacity:.7}
.md-next p{font-weight:700;font-size:16px;line-height:1.6;margin-top:2px}
.md-foot{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:auto}
.md-foot .sp{flex:1}
.md-foot .round{background:rgba(255,255,255,.16);color:#fff}
.md-foot .round:hover{background:#fff;color:var(--ink)}
.md-foot .btn{background:#fff;color:var(--ink)}
.md .av{background:rgba(255,255,255,.14);color:#fff}

/* ---------- company file ---------- */
.back{display:inline-flex;align-items:center;gap:6px;color:var(--t2);font-size:13.5px;margin-bottom:12px}
.back:hover{color:var(--ink)}
.file-h{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.file-h h1{font-size:30px;font-weight:700;line-height:1.25}
.file-h .en{font:400 13px "Outfit";color:var(--t3);direction:ltr;text-align:right}
.file-h .tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.file-h .end{margin-inline-start:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.status-line{display:flex;align-items:center;gap:8px;margin-top:16px;padding:12px 16px;border-radius:var(--r-in);background:var(--soft);color:var(--t2)}
.status-line p{flex:1}
.track{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin-top:16px}
.stg{display:flex;align-items:center;justify-content:center;gap:6px;height:44px;border-radius:999px;background:var(--soft);color:var(--t3);font-weight:700;font-size:13.5px;transition:background .2s,color .2s}
.stg:hover{background:var(--soft-2);color:var(--ink)}
.stg svg.lucide{width:14px;height:14px;stroke-width:2.5}
.stg.past{background:var(--accent-soft);color:var(--accent-t)}
.stg.cur{background:var(--ink);color:#fff}
.stg.won.cur{background:var(--green)}
.lost-note{display:flex;align-items:center;gap:8px;margin-top:12px;padding:12px 16px;border-radius:var(--r-in);background:var(--red-soft);color:var(--red);font-weight:700}
.nextc{position:relative;overflow:hidden;background:var(--grad);color:#fff;box-shadow:0 18px 32px -20px rgba(37,86,255,.9)}
.nextc::before{content:"";position:absolute;width:260px;height:260px;border-radius:50%;background:rgba(255,255,255,.1);top:-150px;inset-inline-end:-70px}
.nextc>*{position:relative}
.nextc small{font-size:13px;opacity:.8}
.nextc p{font-size:19px;font-weight:700;line-height:1.6;margin:6px 0 16px}
.nextc .f{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.nextc .pill{background:rgba(255,255,255,.2);color:#fff}
.nextc .btn{background:#fff;color:var(--ink)}
.mtiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.mt{padding:14px;border-radius:var(--r-in);background:var(--soft)}
.mt b{display:block;font:500 24px/1.2 "Outfit";direction:ltr;text-align:right;unicode-bidi:plaintext}
.mt span{font-size:12.5px;color:var(--t2)}
.mt small{display:block;font-size:11px;color:var(--t3)}
.pts{list-style:none;padding:0;display:flex;flex-direction:column;gap:8px}
.pts li{display:flex;gap:12px;align-items:flex-start;padding:12px;border-radius:var(--r-in);background:var(--soft);line-height:1.6}
.pts li i{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:var(--ink);color:#fff;font:600 12.5px "Outfit";font-style:normal}
.pts.warn li i{background:var(--red)}
.opps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.opp{padding:16px;border-radius:var(--r-in);background:var(--soft)}
.opp i{font:500 13px "Outfit";font-style:normal;color:var(--accent)}
.opp b{display:block;font-weight:700;font-size:15.5px;margin:4px 0 6px}
.opp p{font-size:13px;color:var(--t2);line-height:1.6}
.about{color:var(--t2);line-height:1.85}
.tagrow{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.prs{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.prs:last-of-type{border-bottom:0}
.prs .who{flex:1;min-width:0}
.prs .who b{display:block;font-weight:700;line-height:1.3}
.prs .who span{font-size:12.5px;color:var(--t3)}
.crow{display:flex;align-items:center;gap:6px;padding:10px 12px;border-radius:14px;background:var(--soft);margin-top:6px}
.crow .k{flex:1;min-width:0}
.crow .k small{display:block;font-size:11.5px;color:var(--t3)}
.crow .k b{font:500 14px "Outfit";direction:ltr;display:block;text-align:right}
.ib{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;color:var(--t2);background:var(--card)}
.ib:hover{background:var(--ink);color:#fff}
.ib svg.lucide{width:15px;height:15px}
.lrow{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.lrow a{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;background:var(--soft);font-size:12.5px;font-weight:700;color:var(--t2)}
.lrow a:hover{background:var(--ink);color:#fff}
.lrow svg.lucide{width:13px;height:13px}
.kv{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line);font-size:13.5px}
.kv:last-child{border-bottom:0}
.kv span{color:var(--t3)} .kv b{font-weight:700;text-align:left} .kv b small{display:block;font-weight:400;color:var(--t3);font-size:11.5px}
.task{display:flex;gap:12px;align-items:flex-start;padding:12px 0;border-bottom:1px solid var(--line)}
.task:last-child{border-bottom:0}
.task .body{flex:1;min-width:0}
.task .body b{display:block;font-weight:700;line-height:1.5}
.task.done .body b{text-decoration:line-through;color:var(--t3)}
.task .meta{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-top:4px;font-size:12.5px;color:var(--t3)}
.task .meta a{font-weight:700;color:var(--t2)} .task .meta a:hover{color:var(--accent)}
.task .cb{margin-top:2px;border-radius:50%}
.task .x{display:flex;gap:4px}
.ev{display:grid;grid-template-columns:32px 1fr;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.ev:last-child{border-bottom:0}
.ev .i{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--soft);color:var(--t2)}
.ev .i svg.lucide{width:15px;height:15px}
.ev.in .i{background:var(--green-soft);color:var(--green)}
.ev .h{display:flex;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--t3)}
.ev p{font-size:13.5px;line-height:1.55}
.bot{font:600 10px "Outfit";letter-spacing:.04em;color:#6E47E0;background:#F0EBFE;border-radius:5px;padding:1px 6px}
details.log summary{list-style:none;cursor:pointer}
details.log summary::-webkit-details-marker{display:none}
details.log summary .ch{margin:0}
details.log[open] summary .ch{margin-bottom:12px}
details.log[open] .chev{transform:rotate(180deg)}

/* ---------- chat ---------- */
.chat{display:flex;flex-direction:column;min-height:0;height:100%}
.chat-h{display:flex;align-items:center;gap:10px;padding:16px 18px;flex:none}
.chat-h .t{flex:1;min-width:0}
.chat-h .t b{display:block;font-weight:700;line-height:1.3;font-size:15.5px}
.chat-h .t span{font-size:12.5px;color:var(--t3)}
.chat-body{flex:1;overflow:auto;margin:0 10px;padding:16px;border-radius:20px;background:var(--soft);display:flex;flex-direction:column;gap:8px;min-height:220px}
.chat-day{align-self:center;font-size:11.5px;color:var(--t3);background:var(--card);border-radius:999px;padding:2px 12px;margin:4px 0}
.bub{max-width:min(80%,460px);padding:9px 13px 6px;border-radius:18px;line-height:1.6;font-size:14px}
.bub.in{align-self:flex-start;background:var(--card);border-end-start-radius:6px}
.bub.out{align-self:flex-end;background:var(--accent);color:#fff;border-end-end-radius:6px}
.bub .who{display:flex;gap:6px;align-items:center;font-size:11.5px;font-weight:700;color:var(--accent-t);margin-bottom:1px}
.bub.out .who{color:rgba(255,255,255,.8)}
.bub .tm{display:flex;align-items:center;gap:3px;justify-content:flex-end;font:400 10.5px "Outfit";color:var(--t3);margin-top:2px}
.bub.out .tm{color:rgba(255,255,255,.7)}
.bub .tm svg.lucide{width:13px;height:13px}
.bub.out .bot{background:rgba(255,255,255,.2);color:#fff}
.composer{padding:12px 14px 14px;display:flex;flex-direction:column;gap:8px;flex:none}
.tpls{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.tpls button{flex:none;height:30px;padding:0 12px;border-radius:999px;background:var(--soft);font-size:12.5px;font-weight:700;color:var(--t2)}
.tpls button:hover{background:var(--ink);color:#fff}
.composer textarea{border:0;border-radius:16px;padding:12px 14px;background:var(--soft);resize:none;outline:0;line-height:1.6}
.composer textarea:focus{box-shadow:inset 0 0 0 2px var(--accent)}
.cbar{display:flex;align-items:center;gap:8px}
.cbar .to{flex:1;display:flex;align-items:center;gap:6px;color:var(--t3);font-size:13px;min-width:0}
.cbar select{border:0;background:transparent;outline:0;font-weight:700;color:var(--ink);min-width:0}

/* ---------- inbox ---------- */
.inbox{display:grid;grid-template-columns:320px minmax(0,1fr) 320px;gap:16px;height:calc(100vh - 250px);min-height:580px}
.inbox>.card{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.threads{display:flex;flex-direction:column;gap:4px;overflow:auto;margin:0 -8px}
.th-i{display:flex;gap:10px;align-items:center;width:100%;padding:12px;border-radius:18px;text-align:right;transition:background .15s}
.th-i:hover{background:var(--soft)}
.th-i.on{background:var(--ink);color:#fff}
.th-i .t{flex:1;min-width:0}
.th-i .t b{display:block;font-weight:700;line-height:1.35}
.th-i .t span{display:block;font-size:12.5px;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.th-i .r{display:flex;flex-direction:column;align-items:flex-end;gap:6px;font:400 11.5px "Outfit";color:var(--t3)}
.unread{width:9px;height:9px;border-radius:50%;background:var(--wa)}
.ctx{overflow:auto;display:flex;flex-direction:column;gap:16px}
.conn{display:flex;align-items:center;gap:10px;height:46px;padding:0 8px 0 16px;border-radius:999px;background:var(--card);font-size:13px;color:var(--t2)}
.conn i{width:9px;height:9px;border-radius:50%;background:var(--amber);box-shadow:0 0 0 4px var(--amber-soft)}

/* ---------- board ---------- */
.board{display:grid;grid-template-columns:repeat(8,minmax(210px,1fr));gap:12px;overflow-x:auto;padding-bottom:8px}
.lane{background:var(--card);border-radius:var(--r);padding:12px;min-height:calc(100vh - 290px);transition:box-shadow .2s}
.lane.over{box-shadow:inset 0 0 0 2px var(--accent)}
.lane-h{display:flex;align-items:center;gap:8px;padding:4px 4px 12px;font-weight:700}
.lane-h i{width:8px;height:8px;border-radius:50%;background:var(--c)}
.lane-h b{margin-inline-start:auto;font:600 12px "Outfit";min-width:24px;height:24px;border-radius:12px;background:var(--soft);display:grid;place-items:center}
.kc{display:block;background:var(--soft);border-radius:18px;padding:14px;margin-bottom:8px;cursor:grab;transition:transform .2s,background .2s}
.kc:hover{background:var(--soft-2);transform:translateY(-2px)}
.kc.dragging{opacity:.4}
.kc .r{display:flex;align-items:center;gap:8px}
.kc .r b{font-weight:700;line-height:1.3}
.kc .dm{font-size:12.5px;color:var(--t3);margin:6px 0 12px}
.kc .f{display:flex;align-items:center;justify-content:space-between;gap:6px}
.kc .f .pill{background:var(--card)}
.drop{height:72px;border:1.5px dashed var(--soft-2);border-radius:18px;display:grid;place-items:center;color:var(--t3);font-size:12.5px}

/* ---------- tasks page ---------- */
.week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.wd{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 6px;border-radius:20px;background:var(--soft);font-size:12.5px;color:var(--t2)}
.wd b{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;font:500 16px "Outfit";background:var(--card);color:var(--ink)}
.wd.today{background:var(--ink);color:#fff}
.wd.today b{background:var(--accent);color:#fff}
.wd .dots{display:flex;gap:3px;height:6px}
.wd .dots i{width:6px;height:6px;border-radius:50%;background:var(--accent)}
.wd.today .dots i{background:#fff}

/* ---------- integrations ---------- */
.steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.step{padding:16px;border-radius:var(--r-in);background:var(--soft)}
.step i{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--card);font:600 13px "Outfit";font-style:normal;margin-bottom:10px}
.step.done{background:var(--green-soft)} .step.done i{background:var(--green);color:#fff}
.step b{display:block;font-weight:700;margin-bottom:4px}
.step p{font-size:13px;color:var(--t2);line-height:1.6}
pre.code{margin:0;background:var(--ink);color:#C9CED8;padding:18px;border-radius:20px;overflow:auto;font:12.5px/1.7 ui-monospace,Menlo,monospace;direction:ltr;text-align:left}
.types{display:flex;flex-direction:column;gap:6px}
.type{display:flex;gap:12px;align-items:flex-start;padding:12px;border-radius:14px;background:var(--soft)}
.type code{font:600 12.5px ui-monospace,Menlo,monospace;background:var(--ink);color:#fff;border-radius:8px;padding:2px 8px;white-space:nowrap}
.type b{display:block;font-weight:700;font-size:13.5px}
.type span{font:400 11.5px ui-monospace,Menlo,monospace;color:var(--t3);direction:ltr;display:block;text-align:right}

/* ---------- dialogs & toast ---------- */
dialog{border:0;border-radius:28px;padding:0;background:var(--card);color:var(--ink);width:min(540px,94vw);box-shadow:0 40px 90px -30px rgba(20,22,27,.5)}
dialog::backdrop{background:rgba(20,22,27,.35);backdrop-filter:blur(3px)}
dialog[open]{animation:pop .2s ease}
@keyframes pop{from{opacity:0;transform:translateY(8px) scale(.98)}}
dialog form{padding:24px;display:flex;flex-direction:column;gap:14px}
dialog h3{font-size:21px;font-weight:700}
dialog label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--t2)}
dialog input,dialog select,dialog textarea{border:0;border-radius:14px;padding:12px 14px;outline:0;background:var(--soft);font-size:14.5px}
dialog input:focus,dialog select:focus,dialog textarea:focus{box-shadow:inset 0 0 0 2px var(--accent)}
dialog .row2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
dialog .acts{display:flex;gap:8px;margin-top:6px}
.cmd{width:min(620px,94vw);margin-top:12vh}
.cmd-in{display:flex;align-items:center;gap:12px;padding:20px 22px;color:var(--t3)}
.cmd-in input{flex:1;border:0;outline:0;background:transparent;font-size:17px;color:var(--ink)}
.cmd-list{max-height:400px;overflow:auto;padding:0 10px 12px}
.cmd-g{font-size:12px;color:var(--t3);padding:10px 12px 4px}
.cmd-i{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:16px;width:100%;text-align:right}
.cmd-i.sel{background:var(--soft)}
.cmd-i .ci{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--soft)}
.cmd-i.sel .ci{background:var(--card)}
.cmd-i .t{flex:1;min-width:0;font-weight:700}
.cmd-i .t span{display:block;font-weight:400;font-size:12.5px;color:var(--t3)}
.toast{position:fixed;bottom:28px;left:50%;transform:translate(-50%,16px);opacity:0;display:flex;gap:8px;align-items:center;background:var(--ink);color:#fff;padding:12px 20px;border-radius:999px;transition:.25s;pointer-events:none;z-index:60;font-weight:700}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- responsive ---------- */
@media (max-width:1320px){
  .user div{display:none}.user{padding:0 6px}
  .c4.home-a,.c4.home-b{grid-column:span 6}
  .c4.home-c{grid-column:span 12}
  .hot{grid-column:span 12}.tasks{grid-column:span 12}
  .pipe{grid-column:span 12}.wa-card{grid-column:span 12}
  .md{grid-template-columns:300px minmax(0,1fr)}
  .md-top{grid-template-columns:1fr}
  .inbox{grid-template-columns:280px minmax(0,1fr)}.inbox .ctx-card{display:none}
  .file-main{grid-column:span 12}.file-side{grid-column:span 12}
}
@media (max-width:900px){
  .frame{margin:0;border-radius:0;padding:14px 14px 28px;min-height:100vh}
  .top{grid-template-columns:auto 1fr}
  .brand{height:46px;padding:0 14px}.brand img{height:22px}
  .tools{grid-column:2}
  .nav{grid-column:1/-1;grid-row:2;overflow-x:auto;scrollbar-width:none;justify-content:flex-start}
  .nav a{height:38px;padding:0 14px}
  .shell{grid-template-columns:1fr;margin-top:16px}
  .rail{display:none}
  .hello h1{font-size:26px}
  .g>*{grid-column:1/-1!important}
  .nexts-g{grid-template-columns:1fr}
  .nx p{min-height:0}
  .trow{grid-template-columns:24px minmax(0,1fr) 36px;padding:8px 10px}.trow .hide-sm{display:none}.trow.th{display:none}
  .tsearch{width:150px}
  .pstages{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:130px;overflow-x:auto}
  .ccards{grid-auto-columns:240px;overflow-x:auto}
  .filters .tsearch{width:100%;margin:0}
  .md{grid-template-columns:1fr;padding:12px;border-radius:24px}
  .md-list{max-height:none}
  .md-tiles{grid-template-columns:1fr 1fr}
  .track{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:120px;overflow-x:auto}
  .file-h h1{font-size:24px}.file-h .end{margin:0;width:100%}
  .mtiles{grid-template-columns:1fr 1fr}
  .opps{grid-template-columns:1fr}
  .inbox{grid-template-columns:1fr;height:auto}
  .threads{flex-direction:row;overflow-x:auto;margin:0}
  .th-i{width:auto;flex:none;max-width:230px}
  .inbox .chat-card{height:74vh}
  .week{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:76px;overflow-x:auto}
  .steps{grid-template-columns:1fr}
  dialog .row2{grid-template-columns:1fr}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.tiles{grid-auto-rows:1fr}
/* fixes after first visual pass */
.hot{display:flex;flex-direction:column}
.ccards{flex:1}
.ccard{min-height:190px}
.cc-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end}
.cc-row b{display:block;overflow:hidden;text-overflow:ellipsis}
.cc-row .sc b{font:500 26px/1 "Outfit"}
.trow{min-height:60px}
.trow .tt{white-space:normal;line-height:1.45}

/* ================= polish pass ================= */
*{scrollbar-width:thin;scrollbar-color:#CFD3DB transparent}
::selection{background:var(--accent);color:#fff}

/* top bar stays reachable while scrolling */
.top{position:sticky;top:0;z-index:30;margin:-20px -24px 0;padding:20px 24px 14px;border-radius:36px 36px 0 0;
  background:linear-gradient(var(--frame) 78%,rgba(242,243,246,0))}
.rail{top:104px;min-height:calc(100vh - 190px)}
.shell{margin-top:10px}

/* rail: active page + tooltips */
.rail .round.on{background:var(--ink);color:#fff}
.rail .round::after{content:attr(aria-label);position:absolute;inset-inline-start:calc(100% + 12px);top:50%;transform:translate(6px,-50%);
  background:var(--ink);color:#fff;font-size:12.5px;font-weight:700;white-space:nowrap;padding:6px 12px;border-radius:999px;opacity:0;pointer-events:none;transition:.18s;z-index:40}
.rail .round:hover::after{opacity:1;transform:translate(0,-50%)}

/* date pill */
.datepill{display:inline-flex;align-items:center;gap:8px;height:46px;padding:0 18px;border-radius:999px;background:var(--card);color:var(--t2);font-weight:500;white-space:nowrap}

/* focus card: next-up as rows */
.focus h2{text-wrap:balance}
.nexts-g{display:flex;flex-direction:column;gap:6px}
.nx{flex-direction:row;align-items:center;gap:10px;padding:10px 12px}
.nx:hover{transform:translateX(-3px)}
.nx .t{flex:1;min-width:0}
.nx .t b{display:block;font-weight:700;font-size:13.5px;line-height:1.4}
.nx .t span{font-size:12px;color:var(--t3)}
.nx small{white-space:nowrap}

/* chart: summary + value labels */
.csum{display:flex;align-items:baseline;gap:8px;margin:-4px 0 14px;color:var(--t2);font-size:13.5px}
.csum b{font:500 34px/1 "Outfit";color:var(--ink);letter-spacing:-.02em}
.csum .pill{margin-inline-start:auto;align-self:center}
.chart{height:170px}
.bstack .sp{display:flex;align-items:flex-end;justify-content:center;padding-bottom:3px;font:600 12px "Outfit";font-style:normal;color:var(--ink);overflow:visible}

/* pipeline strip: stages with companies get more room */
.pstages{display:flex}
.ps{flex:1 1 0;min-width:0;transition:transform .2s}
.ps.has{flex:1.9 1 0}
.ps:hover{transform:translateY(-2px)}
.chipco{transition:background .2s,color .2s}

/* soft depth on the two hero surfaces only */
.tile.accent,.nextc{position:relative;overflow:hidden}
.tile.accent::before{content:"";position:absolute;width:170px;height:170px;border-radius:50%;background:rgba(255,255,255,.1);top:-80px;inset-inline-end:-50px}
.tile.accent>*{position:relative}
.tile:not(.accent){transition:transform .2s}
.tile:not(.accent):hover{transform:translateY(-2px)}
.ccard{box-shadow:0 16px 28px -20px rgba(20,22,27,.7)}
.ccard.blue{box-shadow:0 16px 28px -18px rgba(37,86,255,.8)}

/* table + lists */
.trow:not(.th){border-radius:14px;border-bottom-color:transparent;transition:background .15s}
.trow:not(.th):hover{background:var(--soft)}
.trow.th{margin-bottom:4px}
.msg{transition:padding .2s}
.msg:hover .h b{color:var(--accent)}
.md-row .sc{min-width:28px;text-align:left}

/* entrance motion: bars grow, rings draw */
.page.enter .bstack .in,.page.enter .bstack .out{transform-origin:bottom;animation:growY .8s .15s cubic-bezier(.2,.7,.2,1) both}
@keyframes growY{from{transform:scaleY(0)}}
.page.enter .ring .rv{animation:ringDraw 1s .15s cubic-bezier(.2,.7,.2,1) both}
@keyframes ringDraw{from{stroke-dasharray:0 100}}
.page.enter .stg.cur{animation:popIn .5s .2s cubic-bezier(.2,1.4,.4,1) both}
@keyframes popIn{from{transform:scale(.9);opacity:.4}}

@media (max-width:900px){
  .top{margin:-14px -14px 0;padding:14px 14px 10px;border-radius:0;background:var(--frame)}
  .pstages{overflow-x:auto}
  .ps,.ps.has{flex:0 0 132px}
  .rail .round::after{display:none}
}
.home-c{display:flex;flex-direction:column}
.home-c .chart{flex:1;height:auto;min-height:170px}

/* =================================================================
   Fleet additions — built only from the tokens and shapes above
   ================================================================= */
.num{font-family:"Outfit";font-feature-settings:"tnum";direction:ltr;unicode-bidi:isolate}
.cur{font-size:.62em;color:var(--t3);font-weight:400;margin-inline-start:4px}
.tile.accent .cur,.ccard .cur,.md-detail .cur{color:inherit;opacity:.65}
.plate{display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:8px;background:var(--soft);border:1.5px solid var(--soft-2);font:700 13px "Tajawal";letter-spacing:.06em;white-space:nowrap;color:var(--ink)}
.route{display:inline-flex;align-items:center;gap:6px;min-width:0;white-space:nowrap}
.route svg.lucide{width:14px;height:14px;color:var(--t3);flex:none}
.route span{overflow:hidden;text-overflow:ellipsis}
.green-t{color:var(--green)} .red-t{color:var(--red)} .amber-t{color:var(--amber)} .blue-t{color:var(--accent-t)}
.mono{font:500 12.5px ui-monospace,Menlo,monospace;direction:ltr;unicode-bidi:isolate}
.sp{flex:1}
.mt16{margin-top:16px}.mb16{margin-bottom:16px}

/* nav: nine sections need tighter pills */
.nav a{padding:0 14px}

/* generic table: each table sets its columns with --cols, phones fall back to --cols-sm */
.tbl{display:flex;flex-direction:column}
.tr{display:grid;grid-template-columns:var(--cols);align-items:center;gap:12px;padding:0 14px;min-height:56px;border-radius:14px;font-size:14px;transition:background .15s}
.tr.th{min-height:42px;background:var(--soft);font-size:12.5px;color:var(--t3);margin-bottom:4px}
a.tr:hover,.tr.click:hover{background:var(--soft);cursor:pointer}
.tr b{font-weight:700}
.tr .sub{display:block;font-size:12px;color:var(--t3);font-weight:400;line-height:1.4}
.tr .end{text-align:left}
.tr.total{background:var(--ink);color:#fff;margin-top:6px}
.tr.total .sub{color:rgba(255,255,255,.6)}
.more-row{display:flex;justify-content:center;padding-top:12px}

/* tabs reuse filter pills; a sub-heading row on pages */
.tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}

/* stat strip inside cards */
.stats{display:grid;grid-template-columns:repeat(var(--n,4),minmax(0,1fr));gap:10px}
.stat{padding:14px;border-radius:var(--r-in);background:var(--soft);min-width:0}
.stat>span{display:block;font-size:12.5px;color:var(--t2)}
.stat b{display:block;font:500 24px/1.25 "Outfit";letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stat small{display:block;font-size:11.5px;color:var(--t3)}
.stat.dark{background:var(--ink);color:#fff}.stat.dark>span,.stat.dark small,.stat.dark .cur{color:rgba(255,255,255,.65)}

/* alerts */
.alert{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;background:var(--soft);font-size:13.5px;line-height:1.5;transition:background .15s}
.alert+.alert{margin-top:6px}
.alert:hover{background:var(--soft-2)}
.alert .i{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;flex:none;background:var(--amber-soft);color:var(--amber)}
.alert.red .i{background:var(--red-soft);color:var(--red)}
.alert .i svg.lucide{width:15px;height:15px}

/* today's trip status strip on the dashboard */
.tstat{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.tstat a{display:flex;flex-direction:column;gap:4px;padding:12px;border-radius:var(--r-in);background:var(--soft);transition:transform .2s}
.tstat a:hover{transform:translateY(-2px)}
.tstat b{font:500 30px/1.1 "Outfit"}
.tstat .st{font-size:12.5px;color:var(--t2)}

/* fleet mini bars (share of trucks per state) */
.split{display:flex;gap:4px;height:12px;margin:14px 0 10px}
.split i{border-radius:6px;min-width:6px}
.split .a{background:var(--ink)} .split .b{background:repeating-linear-gradient(135deg,var(--accent) 0 4px,#8EA8FF 4px 7px)} .split .c{background:var(--amber)} .split .d{background:var(--red)}
.keys{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12.5px;color:var(--t2)}
.keys span{display:flex;align-items:center;gap:6px}
.keys i{width:9px;height:9px;border-radius:3px}

/* trips board (4 lanes) */
.board.trips{grid-template-columns:repeat(4,minmax(240px,1fr))}
.board.trips .lane{min-height:420px}
.kc{cursor:pointer}
.kc .route{font-size:13px;color:var(--t2);margin:8px 0 10px;display:flex}
.kc .f b{font:600 15px "Outfit"}
.kc .acts{display:flex;gap:6px;margin-top:10px}
.kc .acts .btn{flex:1;background:var(--card)}
.kc .acts .btn:hover{background:var(--ink);color:#fff}
.kc .meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:12px;color:var(--t3)}

/* stepper (new trip) */
.wiz{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start}
.wiz .track{grid-template-columns:repeat(6,minmax(0,1fr));margin:0 0 18px}
.stg .n{font:600 12px "Outfit"}
.opts{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.opt{display:flex;flex-direction:column;gap:4px;padding:14px;border-radius:var(--r-in);background:var(--soft);text-align:right;border:2px solid transparent;transition:background .15s,border-color .15s}
.opt:hover{background:var(--soft-2)}
.opt.on{border-color:var(--ink);background:var(--card)}
.opt[disabled]{opacity:.45;cursor:not-allowed}
.opt b{font-weight:700;line-height:1.35}
.opt small{font-size:12px;color:var(--t3);line-height:1.5}
.opt .r{display:flex;align-items:center;justify-content:space-between;gap:6px}
.seg{display:inline-flex;gap:4px;padding:4px;border-radius:999px;background:var(--soft);margin-bottom:14px}
.seg button{height:38px;padding:0 18px;border-radius:999px;font-weight:700;color:var(--t2)}
.seg button.on{background:var(--ink);color:#fff}
.wiz-nav{display:flex;gap:8px;margin-top:18px}
.sum-card{position:sticky;top:110px}
.sum-card .kv{border-color:rgba(255,255,255,.14)}
.sum-card .kv span{color:rgba(255,255,255,.7)}
.price-big{font:500 44px/1.1 "Outfit";letter-spacing:-.02em;margin:6px 0 2px}

/* page-level form controls (same look as the dialog fields) */
.field{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--t2);min-width:0}
.field input,.field select,.field textarea,.inp{border:0;border-radius:14px;padding:12px 14px;outline:0;background:var(--soft);font-size:14.5px;color:var(--ink);min-width:0;width:100%}
.field input:focus,.field select:focus,.inp:focus{box-shadow:inset 0 0 0 2px var(--accent)}
.fgrid{display:grid;grid-template-columns:repeat(var(--n,2),minmax(0,1fr));gap:12px}
dialog .hint,.hint{font-size:12.5px;color:var(--t3);line-height:1.6}
dialog .err{color:var(--red);font-size:13px;font-weight:700}

/* price matrix */
.mx{overflow:auto}
.mx table{border-collapse:separate;border-spacing:4px;width:100%;min-width:640px}
.mx th{font-size:12.5px;color:var(--t3);font-weight:500;padding:8px;text-align:center;white-space:nowrap}
.mx th.rowh{text-align:right;color:var(--ink);font-weight:700}
.mx td{background:var(--soft);border-radius:12px;text-align:center;padding:10px 6px;font:500 14px "Outfit";white-space:nowrap}
.mx td.none{background:transparent;color:var(--t3)}
.mx td.hit{background:var(--ink);color:#fff}
.mx td small{display:block;font:400 11px "Outfit";color:var(--t3)}
.mx td.hit small{color:rgba(255,255,255,.6)}

/* trip timeline */
.tl{display:flex;flex-direction:column}
.tl-i{display:grid;grid-template-columns:32px 1fr auto;gap:10px;align-items:center;padding:8px 0;position:relative}
.tl-i .i{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--soft);color:var(--t3);position:relative;z-index:1}
.tl-i .i svg.lucide{width:15px;height:15px}
.tl-i.done .i{background:var(--ink);color:#fff}
.tl-i.now .i{background:var(--accent);color:#fff;box-shadow:0 0 0 5px var(--accent-soft)}
.tl-i:not(:last-child)::after{content:"";position:absolute;top:40px;bottom:-8px;inset-inline-start:15px;width:2px;background:var(--soft-2)}
.tl-i b{font-weight:700}
.tl-i span{font-size:12.5px;color:var(--t3)}

/* profit bar inside trip details */
.pbar{display:flex;height:14px;border-radius:7px;overflow:hidden;gap:3px;margin:12px 0 8px}
.pbar i{display:block}
.pbar .c{background:var(--ink);border-radius:7px}
.pbar .p{background:repeating-linear-gradient(135deg,var(--accent) 0 5px,#8EA8FF 5px 8px);border-radius:7px}

/* banks: cards row */
.bcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
button.ccard{text-align:right;width:100%;font:inherit}
.ccard.light{background:var(--card);color:var(--ink);box-shadow:none;outline:2px solid var(--soft-2)}
.ccard.light::before{background:var(--soft-2)}.ccard.light::after{background:var(--soft)}
.ccard.light .cc-chip{background:var(--soft)}
.ccard.sel{outline:3px solid var(--ink);outline-offset:3px}
.cc-bal{font:500 30px/1.1 "Outfit";letter-spacing:-.02em;direction:ltr;text-align:right;unicode-bidi:plaintext}
.ccard .cc-sub{font-size:12px;opacity:.65}
.ccard.flash .cc-bal{animation:flash 1.2s ease}
@keyframes flash{0%{opacity:.2;transform:translateY(-4px)}100%{opacity:1}}

/* e-invoice document preview */
.doc{background:var(--soft);border-radius:20px;padding:18px}
.doc .dh{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px dashed var(--soft-2);margin-bottom:10px}
.qr{width:84px;height:84px;border-radius:12px;background:var(--card);display:grid;place-items:center;color:var(--ink)}
.qr svg.lucide{width:56px;height:56px;stroke-width:1.25}

/* print: only the statement */
.print-only{display:none}
@media print{
  @page{size:A4;margin:14mm}
  body{background:#fff}
  .frame{margin:0;padding:0;background:#fff;border-radius:0;min-height:0}
  .top,.rail,.no-print,.toast,.hello .end,.tabs,.filters{display:none!important}
  .shell{display:block;margin:0}
  .card{padding:0 0 12px;break-inside:avoid}
  .tr{min-height:34px;font-size:12px;border-bottom:1px solid #ddd;border-radius:0}
  .tr.th{background:#eee}
  .tr.total{background:#111;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .print-only{display:block}
  .page.enter>*{animation:none}
}

/* responsive for the additions */
@media (max-width:1320px){
  .wiz{grid-template-columns:minmax(0,1fr)}
  .sum-card{position:relative;top:0}
  .nav a{padding:0 11px;font-size:13.5px}
}
@media (max-width:1100px){
  .top{grid-template-columns:auto 1fr}
  .tools{grid-column:2}
  .nav{grid-column:1/-1;grid-row:2;overflow-x:auto;scrollbar-width:none;justify-content:flex-start}
}
@media (max-width:900px){
  .tr{grid-template-columns:var(--cols-sm,minmax(0,1fr) auto);padding:10px;min-height:0}
  .tr .hide-sm{display:none}
  .tr.th{display:none}
  .stats{grid-template-columns:1fr 1fr}
  .tstat{grid-template-columns:1fr 1fr}
  .board.trips{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:82vw}
  .wiz .track{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:120px;overflow-x:auto}
  .fgrid{grid-template-columns:1fr}
  .price-big{font-size:36px}
}

/* dashboard: revenue and cost side by side per month */
.bpair{flex:1;width:100%;display:flex;justify-content:center;gap:4px;min-height:0}
.bpair .bstack{max-width:22px}
.bpair .bstack .sp{font-size:11px;white-space:nowrap}

/* reference rules like ".kv span" also hit the number spans inside values; keep values in ink */
.kv b span{color:inherit}.kv b .cur{color:var(--t3)}
.kv b small{display:block}
.kv .sp{display:block;padding:0 12px}.kv .sp .split{width:100%}
.kc .num{white-space:nowrap}
.wiz .stg{white-space:nowrap;padding:0 10px;font-size:13px}
.c9{grid-column:span 9}
@media (max-width:900px){
  .shell{grid-template-columns:minmax(0,1fr)}
  .top{grid-template-columns:auto minmax(0,1fr)}
  .nav{min-width:0}
}
/* a few px of decorative overhang (top bar bleed, card circles) must never make the phone page scroll sideways; clip keeps the sticky top bar working */
@media (max-width:900px){ html{overflow-x:hidden} }
.chart{overflow:hidden}
@media (max-width:900px){ .ch{flex-wrap:wrap} .ch .end{flex-wrap:wrap} }
@media (max-width:900px){ .csum{flex-wrap:wrap;row-gap:6px} .csum b{font-size:28px} }

/* =================================================================
   Phone-first layer (≤900px). Same soft-bento pieces, arranged for one thumb:
   compact sticky header, floating bottom tab bar (black active pill like the desktop nav),
   one-line scrolling chips, swipeable card rows, dialogs as bottom sheets.
   ================================================================= */
.tabbar{display:none}
.chips{display:contents}
.sheet-in{padding:0 16px 20px}
.sheet .grab{width:44px;height:5px;border-radius:3px;background:var(--soft-2);margin:10px auto 6px}
.more-g{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px 6px;padding-top:8px}
.more-g a,.more-g button{display:flex;flex-direction:column;align-items:center;gap:7px;font-size:12.5px;font-weight:700;color:var(--t2)}
.more-g .mi{width:58px;height:58px;border-radius:20px;display:grid;place-items:center;background:var(--soft);color:var(--ink);transition:background .2s,color .2s}
.more-g .mi svg.lucide{width:22px;height:22px}
.more-g .on{color:var(--ink)} .more-g .on .mi{background:var(--ink);color:#fff}

@media (max-width:900px){
  body{background:var(--frame)}
  .frame{padding:0 14px calc(108px + env(safe-area-inset-bottom));border-radius:0;margin:0;min-height:100vh}

  /* header: one compact row, the section nav lives in the tab bar */
  .top{grid-template-columns:auto minmax(0,1fr);margin:0 -14px;padding:calc(10px + env(safe-area-inset-top)) 14px 10px;background:rgba(242,243,246,.9);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  .nav{display:none}
  .brand{height:44px;padding:0 16px}.brand img{height:21px}
  .tools .round{width:44px;height:44px}
  .user{height:44px;padding:0 3px}.user .av{width:38px;height:38px;font-size:15px}
  .shell{margin-top:4px}

  /* bottom tab bar */
  .tabbar{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;position:fixed;z-index:45;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));height:68px;padding:7px;border-radius:999px;background:var(--card);box-shadow:0 20px 40px -16px rgba(20,22,27,.35),0 0 0 1px rgba(20,22,27,.04)}
  .tabbar a,.tabbar button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;height:54px;border-radius:999px;color:var(--t3);font-size:11px;font-weight:700;transition:background .2s,color .2s}
  .tabbar svg.lucide{width:20px;height:20px}
  .tabbar .on{background:var(--ink);color:#fff}
  .tabbar .fab{justify-self:center;width:54px;height:54px;border-radius:50%;background:var(--accent);color:#fff;box-shadow:0 12px 22px -10px rgba(37,86,255,.9)}
  .tabbar .fab svg.lucide{width:24px;height:24px;stroke-width:2.2}
  .tabbar a:active,.tabbar button:active{transform:scale(.94)}
  .toast{bottom:calc(96px + env(safe-area-inset-bottom));max-width:calc(100vw - 32px);white-space:normal;text-align:center;line-height:1.5}

  /* dialogs become bottom sheets */
  dialog{width:100%;max-width:none;margin:auto 0 0;border-radius:28px 28px 0 0;max-height:90vh;overflow:auto;padding-bottom:env(safe-area-inset-bottom)}
  dialog[open]{animation:sheetUp .3s cubic-bezier(.2,.8,.2,1)}
  @keyframes sheetUp{from{transform:translateY(48px);opacity:.3}}
  dialog form{padding:20px 16px 18px}
  dialog form::before{content:"";display:block;width:44px;height:5px;border-radius:3px;background:var(--soft-2);margin:-8px auto 4px}
  dialog h3{font-size:19px}
  dialog input,dialog select,dialog textarea{font-size:16px} /* 16px stops iOS zooming into the field */
  dialog .acts{position:sticky;bottom:-18px;margin:4px -16px -18px;padding:12px 16px 18px;background:var(--card)}
  dialog .acts .btn{flex:1;height:50px}

  /* page head: title, one line of actions that scrolls if it must, primary action first */
  .hello{gap:12px;margin-bottom:16px}
  .hello h1{font-size:27px}
  .hello p{font-size:13.5px;line-height:1.6}
  .hello .end{width:calc(100% + 28px);margin:0 -14px;padding:2px 14px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .hello .end::-webkit-scrollbar,.filters::-webkit-scrollbar,.chips::-webkit-scrollbar,.tabs::-webkit-scrollbar{display:none}
  .hello .end>*{flex:1 0 auto}
  .hello .end .btn{height:46px;padding:0 18px}
  .hello .end .btn.dark{order:-1}
  .hello .datepill{display:none}
  .hello .conn{height:46px}

  /* chips: one line, swipe sideways; a search box gets its own full-width row */
  .filters,.tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -14px 14px;padding:2px 14px}
  .filters:has(.chips){flex-direction:column;align-items:stretch;overflow:visible;padding:0;margin:0 0 14px}
  .chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;margin:0 -14px;padding:2px 14px}
  .fpill{flex:none;height:40px;padding:0 15px;white-space:nowrap}
  .filters .tsearch{width:100%;height:46px;margin:0}
  .filters select.fpill{flex:none}
  .ch .end .tabs{margin:0;padding:0;overflow:visible}

  /* cards */
  .g{gap:12px}
  .card{padding:16px;border-radius:22px}
  .ch{margin-bottom:12px}
  .ch h3{font-size:16px}
  .stats{gap:8px}
  .stat{padding:12px}
  .stat b{font-size:20px}
  .tile{min-height:128px;padding:16px}
  .tile b{font-size:30px}
  .tiles{gap:12px}

  /* list rows read as a list, not a squeezed table */
  .tr{gap:10px;padding:12px 2px;border-radius:0;border-bottom:1px solid var(--line)}
  .tbl>.tr:last-child,.tr.total{border-bottom:0}
  .tr.total{border-radius:14px;padding:12px 14px;margin-top:8px}
  a.tr:active,.tr.click:active{background:var(--soft)}
  .tr .route{white-space:normal;flex-wrap:wrap;row-gap:0}
  .tr b.clip,.tr .clip{white-space:nowrap}

  /* file headers */
  .file-h{gap:12px}
  .file-h .av.xl{width:54px;height:54px;border-radius:18px;font-size:22px}
  .file-h h1{font-size:22px}
  .file-h .end{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;width:calc(100% + 32px);margin:4px -16px 0;padding:2px 16px}
  .file-h .end .btn{flex:1 0 auto;height:46px;padding:0 16px}
  .file-h .end .btn.dark{order:-1}
  .back{margin-bottom:10px;height:36px}

  /* customers: the dark list is the page; the side detail is the customer file itself */
  .md{padding:8px;border-radius:24px}
  .md-detail{display:none}
  .md-row{padding:12px 10px}

  /* swipeable rows: trips board lanes, bank cards */
  .board.trips{grid-auto-columns:86%;scroll-snap-type:x mandatory;margin:0 -14px;padding:0 14px 8px;scroll-padding-inline:14px;gap:10px}
  .board.trips .lane{scroll-snap-align:start;min-height:0}
  .bcards{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:80%;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin:0 -16px;padding:4px 16px 6px;scroll-padding-inline:16px}
  .bcards .ccard{scroll-snap-align:start}
  .ccards{scroll-snap-type:x mandatory}.ccards .ccard{scroll-snap-align:start}

  /* new trip: price on top while picking, sticky next/back above the tab bar */
  .wiz .sum-card{order:-1;padding:16px 18px}
  .wiz .sum-card .kv{display:none}
  .wiz .sum-card .price-big{font-size:32px;margin:2px 0}
  .wiz .sum-card p{margin:0!important}
  .wiz .track{margin:0 -16px 14px;padding:0 16px;grid-auto-columns:max-content;scrollbar-width:none}
  .wiz .stg{height:40px;padding:0 14px}
  .opts{grid-template-columns:1fr}
  .opt{padding:14px 16px}
  .wiz-nav{position:sticky;bottom:calc(88px + env(safe-area-inset-bottom));margin:16px -16px -16px;padding:12px 16px;background:rgba(255,255,255,.94);backdrop-filter:blur(10px);border-radius:0 0 22px 22px;flex-wrap:wrap}
  .wiz-nav .btn.dark{flex:1}

  /* forms on the page */
  .fgrid.two{grid-template-columns:1fr 1fr}
  .field input,.field select,.inp{font-size:16px}

  /* price matrix: route column stays put while swiping */
  .mx{margin:0 -16px;padding:0 16px}
  .mx th.rowh{position:sticky;right:0;z-index:1;background:var(--card);box-shadow:-8px 0 8px -8px rgba(20,22,27,.15)}

  /* dashboard */
  .tstat b{font-size:26px}
  .csum b{font-size:28px}
  .alert{padding:12px}
  .nx{padding:12px}
}
@media (max-width:900px){
  .hello .end a[href="#/trips/new"]{display:none} /* the tab bar's + already does this */
  .md-row.on{background:transparent}.md-row.on .t span{color:#9AA0AC}.md-row.on .tag{background:rgba(255,255,255,.1);color:#fff}
}
.lane-jump{display:none}
@media (max-width:900px){ .lane-jump{display:flex} .tabs+.lane-jump{margin-top:-4px} }
@media (max-width:900px){
  .hello .end .btn.soft,.tiles>.btn.soft{background:var(--card)} /* soft grey disappears on the grey page; white pills read as buttons */
  .tiles>.btn{height:50px}
}
.row-acts{display:flex;gap:6px;justify-content:flex-end}
@media (max-width:900px){
  .row-acts{grid-column:1/-1;justify-content:stretch}.row-acts .btn{flex:1;height:42px}
  .wiz-nav .sp{display:none}.wiz-nav .btn.dark{order:-1}
}
@media (max-width:900px){ .file-h>.av+div{flex:1;min-width:0} .file-h .tags{gap:5px} }
