/* Meshines Production Dashboard
   Two themes: "night" (dark, default) and "paper" (warm light). Accent = Meshines logo red. */

:root {
  --red: #EF404A;
  --red-ink: #d42f39;
  --green: #22c55e;
  --amber: #eab308;
  --orange: #f97316;
  --blue: #60a5fa;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.76, 0, .18, 1);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Rich MBA type: Geist everywhere — bold tight headings, regular 15px text */
  --mono: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r: 14px;
  --side: 248px;
}
:root, [data-theme="night"] {
  --bg: #09090b;
  --bg2: #0c0c0e;
  --card: #111113;
  --card2: #18181b;
  --line: #27272a;
  --line2: #1f1f23;
  --ink: #fafafa;
  --ink2: #e4e4e7;
  --muted: #a1a1aa;
  --faint: #71717a;
  --chip: #1c1c20;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 40px -24px rgba(0,0,0,.8);
  --grain: .05;
  color-scheme: dark;
}
[data-theme="paper"] {
  --bg: #ECE8E0;
  --bg2: #E6E1D8;
  --card: #F3F0EA;
  --card2: #EAE6DE;
  --line: rgba(20,20,20,.16);
  --line2: rgba(20,20,20,.09);
  --ink: #141414;
  --ink2: #262522;
  --muted: #6D6A63;
  --faint: #8d8a83;
  --chip: #E3DED4;
  --shadow: 0 18px 36px -28px rgba(40,32,20,.45);
  --grain: .55;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.num, .mono { font-family: var(--mono); font-feature-settings: "tnum"; letter-spacing: -.01em; }
.lbl { font: 600 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* paper grain (only shows in paper theme) */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 90; mix-blend-mode: multiply; opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .45  0 0 0 0 .42  0 0 0 0 .38  0 0 0 .22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
[data-theme="night"] .grain { mix-blend-mode: overlay; }

/* ---------- classic motion: mask slides, rises, draws ---------- */
.rv { display: block; overflow: hidden; }
.rv > span { display: inline-block; transform: translateY(105%); animation: rvUp .8s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes rvUp { to { transform: none; } }
.rise { animation: rise .7s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { transform: translateY(14px); clip-path: inset(0 0 100% 0); } to { transform: none; clip-path: inset(0 0 0 0); } }
.grow { transform-origin: bottom; animation: grow .9s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes grow { from { transform: scaleY(0); } }
.growx { transform-origin: left; animation: growx 1s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes growx { from { transform: scaleX(0); } }
.draw { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); animation: draw 1.6s var(--ease-io) forwards; animation-delay: var(--d, 0ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.wipe { animation: wipe 1.1s var(--ease-io) both; animation-delay: var(--d, 0ms); }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.still .rv > span, .still .rise, .still .grow, .still .growx, .still .wipe, .still .draw, .still .ring-arc {
  animation: none !important; transform: none !important; clip-path: none !important; stroke-dashoffset: 0 !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}

/* ---------- login ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; overflow: hidden; border-right: 1px solid var(--line); background: var(--bg2); display: flex; flex-direction: column; justify-content: space-between; padding: 40px; }
.auth-art .big { font: 700 clamp(44px, 6vw, 92px)/.92 var(--sans); letter-spacing: -.04em; }
.auth-art .big em { font: italic 400 1em/1 var(--serif); color: var(--red); letter-spacing: -.02em; }
.auth-art .cap { max-width: 420px; color: var(--muted); font-size: 15px; }
.ticks { display: flex; gap: 18px; flex-wrap: wrap; }
.ticks span { display: inline-flex; gap: 8px; align-items: center; }
.ticks i { width: 6px; height: 6px; background: var(--red); border-radius: 50%; }
.stage-ribbon { display: flex; gap: 0; margin: 28px 0; }
.stage-ribbon div { flex: 1; min-width: 0; border-top: 1px solid var(--line); padding: 10px 8px 0 0; position: relative; }
.stage-ribbon .lbl { display: block; line-height: 1.3; }
@media (max-width: 1200px) { .stage-ribbon .lbl { font-size: 9px; letter-spacing: .04em; } }
.stage-ribbon div::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.stage-ribbon div.on::before { background: var(--red); box-shadow: 0 0 0 4px rgba(239,64,74,.18); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(380px, 100%); }
.auth-card .logo { width: 180px; margin-bottom: 36px; }
.auth-card h1 { font: 600 28px/1.1 var(--sans); letter-spacing: -.02em; margin: 0 0 6px; }
.auth-card p { margin: 0 0 26px; color: var(--muted); }

/* ---------- form controls ---------- */
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg2); outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; min-height: 70px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,64,74,.16); }
.input[readonly], .input:disabled { opacity: .7; cursor: not-allowed; }
.pw { position: relative; }
.pw button { position: absolute; right: 6px; top: 6px; height: 30px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; }
.check { display: flex; gap: 10px; align-items: center; cursor: pointer; padding: 6px 0; }
.check input { width: 18px; height: 18px; accent-color: var(--red); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--card2); cursor: pointer; font-weight: 600; font-size: 13.5px;
  transition: transform .15s var(--ease), background .2s, border-color .2s; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.block { width: 100%; height: 46px; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.err { color: var(--red); font-size: 13px; min-height: 18px; margin: 4px 0 10px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line); background: var(--bg); padding: 22px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 22px; text-decoration: none; }
.brand img { width: 30px; }
.brand b { font: 700 13px/1 var(--sans); letter-spacing: .42em; }
.brand small { display: block; font: 600 9px/1 var(--sans); letter-spacing: .3em; color: var(--muted); margin-top: 5px; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 8px; text-decoration: none;
  color: var(--muted); font-weight: 500; position: relative; transition: background .2s, color .2s;
}
.nav a svg { width: 17px; height: 17px; flex: none; }
.nav a:hover { background: var(--card2); color: var(--ink); }
.nav a.on { background: var(--card2); color: var(--ink); }
.nav a.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 2px; background: var(--red); border-radius: 2px; }
.nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: #fff; font: 600 11px/20px var(--mono); text-align: center; }
.nav-sep { height: 1px; background: var(--line2); margin: 12px 6px; }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); font: 600 12px/1 var(--sans); flex: none; }
.avatar.red { background: var(--red); color: #fff; }
.me .who { min-width: 0; }
.me .who b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who span { display: block; font-size: 11.5px; color: var(--muted); }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: var(--faint); }
.icon-btn svg { width: 16px; height: 16px; }

.main { min-width: 0; padding: 26px 32px 60px; }
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.top h1 { font: 600 26px/1.1 var(--sans); letter-spacing: -.02em; margin: 0; }
.top .sub { color: var(--muted); margin-top: 6px; }
.top .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; background: var(--bg2); }
.seg button { height: 30px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 13px; }
.seg button.on { background: var(--card2); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }

/* ---------- cards ---------- */
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.two { grid-template-columns: 1.4fr 1fr; }
.two-even { grid-template-columns: 1fr 1fr; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { font: 600 15px/1.2 var(--sans); margin: 0; letter-spacing: -.01em; }
.card .hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.card .hd p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.kpi { padding: 16px; }
.kpi .v { font: 500 24px/1.1 var(--mono); letter-spacing: -.03em; margin-top: 12px; white-space: nowrap; }
.kpi .d { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.up { color: var(--green); } .down { color: var(--red); }
.kpi.accent { background: linear-gradient(160deg, rgba(239,64,74,.16), transparent 60%), var(--card); border-color: rgba(239,64,74,.35); }
.bar-track { height: 6px; border-radius: 6px; background: var(--chip); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: var(--red); }

/* charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--faint); font: 500 10.5px var(--mono); }
.chart .gridl { stroke: var(--line2); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.status-row { display: grid; grid-template-columns: 140px 1fr 70px 96px; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line2); font-size: 13px; }
.status-row:first-child { border-top: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 11px; font: 600 10.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; border: 1px solid transparent; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.s-ontime { color: var(--green); background: rgba(34,197,94,.1); }
.s-d12 { color: var(--amber); background: rgba(234,179,8,.1); }
.s-d3 { color: var(--orange); background: rgba(249,115,22,.12); }
.s-pending { color: var(--red); background: rgba(239,64,74,.12); }
.s-inproc { color: var(--blue); background: rgba(96,165,250,.12); }
.s-none { color: var(--muted); background: var(--chip); }
.stage-tag { font: 500 11.5px/1 var(--sans); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 4px 7px; white-space: nowrap; }

/* lists */
.list { display: grid; }
.li { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 11px 2px; border-top: 1px solid var(--line2); cursor: pointer; text-decoration: none; }
.li:first-child { border-top: 0; }
.li:hover .t { color: var(--red); }
.li .t { font-weight: 600; transition: color .2s; }
.li .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.empty { padding: 28px 10px; text-align: center; color: var(--muted); }

/* toolbar + table */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.search { position: relative; flex: 1 1 260px; max-width: 380px; }
.search svg { position: absolute; left: 11px; top: 12px; width: 16px; height: 16px; color: var(--faint); }
.search .input { padding-left: 34px; height: 40px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 16px; border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .c { font-family: var(--mono); opacity: .7; margin-left: 4px; }
.tbl-wrap { border: 1px solid var(--line); border-radius: var(--r); overflow: auto; background: var(--card); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 900px; }
.tbl th { text-align: left; font: 600 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 13px 14px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); cursor: pointer; user-select: none; white-space: nowrap; }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .15s; }
.tbl tbody tr:hover { background: var(--card2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .cust { font-weight: 600; }
.tbl .sm { color: var(--muted); font-size: 12px; }
.cards-m { display: none; }

/* pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-height: 420px; max-height: calc(100dvh - 220px); }
.col-hd { padding: 14px 14px 10px; border-bottom: 1px solid var(--line2); }
.col-hd .row { display: flex; justify-content: space-between; align-items: center; }
.col-hd b { font-size: 13.5px; }
.col-hd .n { font: 500 12px var(--mono); color: var(--muted); }
.col-hd .own { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.col-body { padding: 10px; display: grid; gap: 8px; overflow-y: auto; align-content: start; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; transition: transform .2s var(--ease), border-color .2s; }
.tile:hover { transform: translateY(-2px); border-color: var(--faint); }
.tile .t { font-weight: 600; font-size: 13.5px; }
.tile .s { color: var(--muted); font-size: 12px; margin: 3px 0 10px; }
.tile .f { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; }
.tile.mine { border-left: 2px solid var(--red); }

/* stage chips on mobile pipeline */
.stage-tabs { display: none; }

/* order drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; animation: fade .3s ease both; }
@keyframes fade { from { background: rgba(0,0,0,0); } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--bg); border-left: 1px solid var(--line);
  z-index: 51; display: flex; flex-direction: column; animation: drawerIn .55s var(--ease-io) both;
}
@keyframes drawerIn { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
.drawer.out { animation: drawerOut .35s var(--ease-io) both; }
@keyframes drawerOut { to { clip-path: inset(0 0 0 100%); } }
.dr-hd { padding: 20px 22px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.dr-hd h2 { font: 600 21px/1.15 var(--sans); letter-spacing: -.02em; margin: 6px 0 4px; }
.dr-body { overflow-y: auto; padding: 18px 22px 40px; flex: 1; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.facts div { background: var(--card); padding: 11px 12px; }
.facts b { display: block; font: 500 15px/1.2 var(--mono); margin-top: 6px; }

.steps { display: grid; gap: 0; margin: 4px 0 18px; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: 12px; position: relative; }
.step::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: -2px; width: 1px; background: var(--line); }
.step:last-child::before { display: none; }
.step .b { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font: 600 11px var(--mono); background: var(--bg); position: relative; z-index: 1; }
.step.done .b { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.step.cur .b { background: var(--red); color: #fff; border-color: var(--red); box-shadow: 0 0 0 5px rgba(239,64,74,.15); }
.step .c { padding: 3px 0 18px; min-width: 0; }
.step .c .nm { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; cursor: pointer; }
.step .c .nm b { font-size: 14px; }
.step .c .nm span { font-size: 12px; color: var(--muted); }
.step .panel { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.step.cur .panel { border-color: rgba(239,64,74,.45); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.fgrid .full { grid-column: 1 / -1; }
.who-changed { font-size: 11px; color: var(--faint); margin-top: -2px; }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; }
.kv span { color: var(--muted); }

.log { display: grid; }
.log-it { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line2); font-size: 13px; }
.log-it:first-child { border-top: 0; }
.log-it .avatar { width: 28px; height: 28px; font-size: 11px; }
.log-it .when { color: var(--faint); font-size: 11.5px; margin-top: 2px; }
.chg { font-family: var(--mono); font-size: 12px; }
.chg del { color: var(--faint); text-decoration: line-through; }
.chg ins { color: var(--ink); text-decoration: none; background: rgba(239,64,74,.12); padding: 0 4px; border-radius: 3px; }

/* voice typing */
.micwrap { position: relative; display: block; width: 100%; }
.micwrap > .input { padding-right: 44px; }
.mic {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: transparent; color: var(--faint); cursor: pointer; display: grid; place-items: center; transition: color .2s, background .2s;
}
.micwrap.ta .mic { top: 6px; transform: none; }
.mic:hover { color: var(--ink); background: var(--chip); }
.mic.live { background: var(--red); color: #fff; animation: micPulse 1.4s ease-in-out infinite; }
@keyframes micPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,64,74,.45); } 50% { box-shadow: 0 0 0 8px rgba(239,64,74,0); } }

/* Claude-style note bar at the bottom of an order */
.composer-wrap { border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--bg); }
.composer {
  display: flex; align-items: flex-end; gap: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--card);
  padding: 6px 6px 6px 14px; transition: border-color .2s, box-shadow .2s;
}
.composer:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(239,64,74,.14); }
.composer textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; padding: 8px 0; min-height: 36px; max-height: 160px; line-height: 1.45; }
.composer .mic { position: static; transform: none; flex: none; width: 36px; height: 36px; }
.composer .send { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--red); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .15s; }
.composer .send:disabled { background: var(--chip); color: var(--faint); cursor: default; }
.composer .send:not(:disabled):active { transform: scale(.94); }
.composer-hint { font-size: 11px; color: var(--faint); margin: 6px 4px 0; }
.new-badge { display: inline-block; font: 700 9.5px/1 var(--sans); letter-spacing: .12em; color: #fff; background: var(--red); padding: 3px 6px; border-radius: 4px; vertical-align: 2px; margin-left: 6px; }
.reason { margin-top: 4px; font-size: 12.5px; padding: 6px 10px; border-left: 2px solid var(--red); background: var(--card2); border-radius: 0 6px 6px 0; }
.reason b { font-weight: 600; color: var(--muted); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; margin-right: 6px; }

/* analytics */
.mini-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-tbl th { text-align: left; font: 600 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.mini-tbl td { padding: 10px 6px; border-bottom: 1px solid var(--line2); }
.mini-tbl td.r, .mini-tbl th.r { text-align: right; }
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 80px; gap: 10px; align-items: center; padding: 7px 0; font-size: 13px; }
.hbar .bar-track { height: 8px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal .box { width: min(460px, 100%); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 22px; animation: rise .5s var(--ease) both; max-height: calc(100dvh - 32px); overflow: auto; }
.modal h3 { margin: 0 0 4px; font-size: 18px; }
.modal p { margin: 0 0 16px; color: var(--muted); }
.secret { font: 500 20px/1 var(--mono); padding: 16px; border: 1px dashed var(--red); border-radius: 10px; text-align: center; letter-spacing: .04em; margin: 8px 0 14px; user-select: all; }

/* toasts */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 80; display: grid; gap: 8px; width: min(360px, calc(100vw - 36px)); }
.toast { background: var(--ink); color: var(--bg); border-radius: 10px; padding: 12px 14px; font-size: 13px; box-shadow: 0 16px 40px -16px rgba(0,0,0,.6); animation: rise .45s var(--ease) both; display: flex; gap: 10px; align-items: flex-start; }
.toast.err { background: var(--red); color: #fff; }
.toast b { font-weight: 600; }

/* mobile tab bar */
.tabbar { display: none; }
.mtop { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .two, .two-even { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 76px 16px calc(92px + env(safe-area-inset-bottom)); }
  .mtop {
    display: flex; position: fixed; top: 0; left: 0; right: 0; height: 60px; z-index: 40; align-items: center; justify-content: space-between;
    padding: 0 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  }
  .mtop { transition: top .45s var(--ease), left .45s var(--ease), right .45s var(--ease), height .45s var(--ease), border-radius .45s var(--ease), background .3s, border-color .3s; background: transparent; border-color: transparent; }
  .mtop.pill { top: 10px; left: 12px; right: 12px; height: 52px; border-radius: 26px; border: 1px solid var(--line); background: color-mix(in srgb, var(--card) 90%, transparent); box-shadow: 0 12px 30px -18px rgba(0,0,0,.6); }
  .mtop .brand { padding: 0; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { display: grid; justify-items: center; gap: 4px; padding: 6px 0; font-size: 10.5px; font-weight: 600; color: var(--faint); text-decoration: none; position: relative; }
  .tabbar a svg { width: 21px; height: 21px; }
  .tabbar a.on { color: var(--ink); }
  .tabbar a.on svg { color: var(--red); }
  .tabbar .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); color: #fff; font: 600 10px/16px var(--mono); padding: 0 4px; }
  .top h1 { font-size: 22px; }
  .top .actions { width: 100%; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi .v { font-size: 19px; }
  .status-row { grid-template-columns: 1fr 50px 84px; }
  .status-row .bar-track { display: none; }
  .tbl-wrap { display: none; }
  .cards-m { display: grid; gap: 8px; }
  .board { display: none; }
  .stage-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
  .stage-list { display: grid; gap: 8px; }
  .drawer { width: 100vw; border-left: 0; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fgrid { grid-template-columns: 1fr; }
  .input { height: 46px; font-size: 16px; } /* 16px stops phones zooming in */
  .btn { height: 44px; }
  .search { max-width: none; }
  #toasts { right: 12px; left: 12px; bottom: calc(80px + env(safe-area-inset-bottom)); width: auto; }
}
@media (min-width: 861px) { .stage-list { display: none; } }

/* =========================================================
   PREMIUM LAYER — editorial serif + Geist, refined surfaces
   ========================================================= */
html[data-theme="night"] {
  --edge: linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.035) 38%, rgba(255,255,255,.06));
  --card: #101012;
  --glow: radial-gradient(1200px 520px at 78% -12%, rgba(239,64,74,.10), transparent 60%), radial-gradient(900px 480px at -10% 110%, rgba(255,255,255,.035), transparent 60%);
}
[data-theme="paper"] {
  --edge: linear-gradient(180deg, rgba(255,255,255,.95), rgba(20,20,20,.10) 60%, rgba(20,20,20,.14));
  --glow: radial-gradient(1100px 520px at 80% -10%, rgba(239,64,74,.07), transparent 60%);
}
body { background: var(--glow), var(--bg); background-attachment: fixed; font-size: 14px; letter-spacing: -.003em; font-feature-settings: "ss01", "tnum" 0; }
.num, .mono { font-feature-settings: "tnum", "zero"; letter-spacing: -.02em; }
.lbl { font: 500 10px/1 var(--sans); letter-spacing: .18em; }

/* titles */
.top { margin-bottom: 28px; }
.top h1 { font: 400 46px/1 var(--serif); letter-spacing: -.012em; }
.top h1 em { font-style: italic; color: var(--red); }
.top .sub { font-size: 13.5px; margin-top: 10px; }
.card h3 { font: 500 14.5px/1.25 var(--sans); letter-spacing: -.01em; }
.card .hd p { font-size: 12.5px; }

/* surfaces: hairline gradient edge + soft depth */
.card, .tbl-wrap, .col, .me, .facts, .step .panel, .modal .box {
  background: linear-gradient(var(--card), var(--card)) padding-box, var(--edge) border-box;
  border: 1px solid transparent;
}
.col { background: linear-gradient(var(--bg2), var(--bg2)) padding-box, var(--edge) border-box; }
.card { padding: 22px; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.card.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 24px 44px -28px rgba(0,0,0,.7); }
.kpi { padding: 18px 18px 16px; }
.kpi .v { font: 400 38px/1 var(--serif); letter-spacing: -.01em; margin-top: 18px; }
.kpi .d { margin-top: 10px; }
.kpi.accent { background: linear-gradient(155deg, rgba(239,64,74,.22), rgba(239,64,74,.03) 55%, transparent), linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(180deg, rgba(239,64,74,.55), rgba(239,64,74,.12)) border-box; border: 1px solid transparent; background-clip: padding-box, padding-box, border-box; }
.grid { gap: 16px; }

/* buttons */
.btn { font-weight: 500; border-radius: 10px; letter-spacing: -.005em; }
.btn.primary {
  background: linear-gradient(180deg, #F35A63, #E1323C); border-color: #cf2c36;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 10px 24px -12px rgba(239,64,74,.75);
}
.btn.primary:hover { background: linear-gradient(180deg, #F4646C, #D92D37); }
.chip { font-weight: 500; }
.input { border-radius: 10px; }

/* sidebar */
.side { background: linear-gradient(180deg, rgba(255,255,255,.015), transparent 40%), var(--bg); }
[data-theme="paper"] .side { background: linear-gradient(180deg, rgba(255,255,255,.35), transparent 50%), var(--bg); }
.brand b { font: 600 12.5px/1 var(--sans); letter-spacing: .4em; }
.nav a { font-weight: 450; font-size: 13.5px; }
.nav a.on { background: linear-gradient(90deg, rgba(239,64,74,.12), transparent 80%), var(--card2); }
.nav a.on svg { color: var(--red); }

/* tables, pills, tiles */
.tbl th { font-weight: 500; letter-spacing: .14em; font-size: 10px; }
.tbl .cust { font-weight: 500; }
.pill { font: 500 10px/1 var(--sans); letter-spacing: .1em; }
.tile { border-radius: 12px; }
.tile .t { font-weight: 500; font-size: 14px; }
.li .t { font-weight: 500; }

/* order drawer, modal, login */
.dr-hd h2 { font: 400 34px/1.05 var(--serif); letter-spacing: -.01em; margin: 8px 0 6px; }
.facts b { font: 400 22px/1.1 var(--serif); letter-spacing: 0; }
.modal h3 { font: 400 28px/1.1 var(--serif); margin-bottom: 8px; }
.auth-art .big { font: 400 clamp(60px, 7.2vw, 118px)/.9 var(--serif); letter-spacing: -.02em; }
.auth-art .big em { font-family: var(--serif); font-style: italic; }
.auth-card h1 { font: 400 40px/1 var(--serif); letter-spacing: -.01em; margin-bottom: 10px; }
.secret { font-family: var(--mono); }
.step .c .nm b { font-weight: 500; }

/* overview hero */
.hero {
  position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 30px 32px; margin-bottom: 16px; border-radius: 20px; border: 1px solid transparent;
  background:
    radial-gradient(600px 260px at 88% 50%, rgba(239,64,74,.20), transparent 70%),
    linear-gradient(var(--card), var(--card)) padding-box,
    var(--edge) border-box;
  box-shadow: var(--shadow);
}
.hero::after { /* fine engineering grid, very faint */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line2) 1px, transparent 1px), linear-gradient(90deg, var(--line2) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent 35%, #000 75%, transparent);
}
.hero-l { position: relative; z-index: 1; min-width: 0; }
.hero h1 { font: 400 clamp(40px, 4.6vw, 64px)/1 var(--serif); letter-spacing: -.015em; margin: 14px 0 12px; }
.hero h1 em { font-style: italic; color: var(--red); }
.hero-sub { margin: 0; color: var(--muted); font-size: 14.5px; }
.hero-sub b { color: var(--ink); font-weight: 500; }
.hero-sub a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 3px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.hero-ring { position: relative; z-index: 1; flex: none; display: grid; place-items: center; }
.ring-arc { animation: ring 1.6s var(--ease-io) both .3s; }
@keyframes ring { from { stroke-dasharray: 0 var(--c); } }
.ring-c { position: absolute; display: grid; justify-items: center; gap: 6px; }
.ring-v { font: 400 34px/1 var(--serif); }

/* =========================================================
   RICH MBA TYPE + EASY READING (overrides everything above)
   ========================================================= */
html[data-theme="night"] { --muted: #b9b9c2; --faint: #8e8e98; --ink2: #ededf0; }
[data-theme="paper"] { --muted: #57544d; --faint: #77736b; }
body { font-size: 15px; line-height: 1.5; letter-spacing: normal; }
.num, .mono { font-family: var(--sans); font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; letter-spacing: -.01em; font-weight: 500; }
.lbl { font: 600 11px/1.2 var(--sans); letter-spacing: .1em; color: var(--muted); }

h1, h2, h3, .top h1, .hero h1, .auth-card h1, .auth-art .big, .dr-hd h2, .modal h3 { font-family: var(--sans); font-weight: 700; font-style: normal; }
.top h1 { font-size: 34px; line-height: 1.1; letter-spacing: -.04em; }
.top h1 em, .hero h1 em, .auth-art .big em { font-family: var(--sans); font-style: normal; font-weight: 700; color: var(--red); letter-spacing: inherit; }
.top .sub { font-size: 15px; }
.hero h1 { font-size: clamp(34px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -.045em; }
.hero-sub { font-size: 15.5px; }
.auth-art .big { font-size: clamp(48px, 5.6vw, 88px); line-height: .98; letter-spacing: -.05em; }
.auth-card h1 { font-size: 32px; letter-spacing: -.04em; }
.auth-card p, .auth-art .cap { font-size: 15px; }
.dr-hd h2 { font-size: 28px; line-height: 1.1; letter-spacing: -.04em; }
.modal h3 { font-size: 24px; letter-spacing: -.035em; }
.card h3 { font-size: 16px; font-weight: 700; letter-spacing: -.03em; }
.card .hd p { font-size: 13.5px; }

.kpi .v { font: 700 30px/1.05 var(--sans); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 13px; }
.facts b { font: 700 19px/1.15 var(--sans); letter-spacing: -.03em; }
.ring-v { font: 700 30px/1 var(--sans); letter-spacing: -.04em; }
.brand b { font-weight: 700; }

.nav a { font-size: 14.5px; font-weight: 500; }
.nav a.on { font-weight: 700; }
.btn { font-size: 14.5px; font-weight: 600; }
.btn.sm { font-size: 13px; }
.input { font-size: 15px; }
.field label { font-size: 13.5px; color: var(--ink2); font-weight: 500; }
.chip { font-size: 13.5px; }
.pill { font: 600 11px/1 var(--sans); letter-spacing: .06em; height: 24px; }
.stage-tag { font-size: 12.5px; }

.tbl { font-size: 14.5px; }
.tbl th { font: 600 11px/1.2 var(--sans); letter-spacing: .08em; color: var(--muted); padding: 14px; }
.tbl td { padding: 14px; }
.tbl .cust { font-weight: 700; letter-spacing: -.01em; }
.tbl .sm { font-size: 13px; }
.tile .t, .li .t { font-weight: 700; letter-spacing: -.015em; font-size: 15px; }
.tile .s, .li .s { font-size: 13.5px; }
.tile .f { font-size: 13px; }
.status-row { font-size: 14px; }
.log-it { font-size: 14px; }
.chg { font-family: var(--sans); font-size: 13.5px; }
.who-changed { font-size: 12px; }
.chart text { font: 500 11.5px var(--sans); fill: var(--faint); }
.toast { font-size: 14px; }
.composer textarea { font-size: 15px; }

.tbl td:first-child, .tbl th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; box-shadow: 1px 0 0 var(--line2); }
.tbl th:first-child { z-index: 2; }
.tbl tbody tr:hover td:first-child { background: var(--card2); }

@media (max-width: 860px) {
  .top h1 { font-size: 28px; }
  .hero h1 { font-size: 32px; }
  .kpi .v { font-size: 24px; }
  .dr-hd h2 { font-size: 24px; }
  .input { font-size: 16px; }
}

@media (max-width: 860px) {
  .hero { flex-direction: column-reverse; align-items: flex-start; padding: 22px 20px; }
  .hero-ring svg { width: 120px; height: 120px; }
  .ring-v { font-size: 26px; }
  .top h1 { font-size: 34px; }
  .kpi .v { font-size: 28px; margin-top: 14px; }
  .card { padding: 18px; }
  .dr-hd h2 { font-size: 28px; }
}

/* =========================================================
   MOBILE-FIRST RULES (Website/CLAUDE.md) — final overrides
   ========================================================= */

/* page shell / skeleton: visible before JavaScript runs */
.boot { min-height: 100dvh; padding: calc(16px + env(safe-area-inset-top)) 16px 24px; max-width: 1200px; margin: 0 auto; }
.boot-top { display: flex; align-items: center; gap: 10px; height: 40px; }
.boot-word { font: 700 12px/1 system-ui, sans-serif; letter-spacing: .4em; color: var(--ink); }
.boot-body { display: grid; gap: 14px; margin-top: 28px; }
.boot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sk { background: var(--card2); border-radius: 12px; position: relative; overflow: hidden; }
.sk { animation: skPulse 1.4s ease-in-out infinite; }
@keyframes skPulse { 50% { opacity: .55; } }
.sk-title { height: 36px; width: 70%; } .sk-line { height: 16px; width: 50%; }
.sk-card { height: 96px; } .sk-panel { height: 220px; }
@media (min-width: 861px) { .boot-grid { grid-template-columns: repeat(4, 1fr); } }

/* type: 16px+ in every input */
.input, select.input, textarea.input, .composer textarea { font-size: 16px; }

/* motion: transform + opacity only */
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wipe { from { transform: translateX(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { from { opacity: 0; } to { opacity: 1; } }
.draw { stroke-dasharray: none; stroke-dashoffset: 0; animation: draw 1.2s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes ring { from { opacity: 0; } to { opacity: 1; } }
.hero-ring svg { animation: ringIn 1.1s var(--ease) both .2s; transform-origin: center; }
@keyframes ringIn { from { transform: rotate(-90deg) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drawerOut { to { transform: translateX(100%); } }
.drawer { clip-path: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.scrim { animation: fade .3s ease both; }
.mic.live { animation: none; position: absolute; }
.composer .mic.live { position: relative; }
.mic.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--red); animation: micRing 1.4s ease-out infinite; z-index: -1; }
@keyframes micRing { from { transform: scale(1); opacity: .5; } to { transform: scale(1.8); opacity: 0; } }
.btn, .nav a, .chip, .input, .mic, .tile, .card, .icon-btn, .tbl tbody tr, .composer, .composer .send, .seg button, .li, .li .t {
  transition-property: transform, opacity; transition-duration: .2s;
}
.still .rv > span, .still .rise, .still .grow, .still .growx, .still .wipe, .still .draw, .still .hero-ring svg { opacity: 1 !important; }

/* touch: 48px targets, 8px gaps, nothing hover-only */
.chips, .toolbar, .hero-actions, .panel-actions, .top .actions { gap: 8px; }
@media (max-width: 860px) {
  .btn, .btn.sm, .chip, .seg button, .icon-btn, select.input, .input { min-height: 48px; }
  .icon-btn { width: 48px; height: 48px; }
  .input { height: 52px; }
  .micwrap > .input { padding-right: 54px; }
  .mic { width: 48px; height: 48px; right: 2px; }
  .micwrap.ta .mic { top: 2px; }
  .composer .mic, .composer .send { width: 48px; height: 48px; }
  .pw button { height: 48px; top: 2px; right: 2px; min-width: 64px; }
  .check { min-height: 48px; }
  .tabbar a { min-height: 52px; align-content: center; }
  .step .c .nm { min-height: 48px; align-items: center; }
  .chip { padding: 0 16px; }
  .seg { padding: 0; } .seg button { padding: 0 16px; }

  /* phone header: 56px max, safe-area padded, hides on scroll down (transform only, no blur) */
  .mtop {
    height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) calc(12px + env(safe-area-inset-right)) 0 calc(16px + env(safe-area-inset-left));
    background: var(--bg); border-bottom: 1px solid var(--line); backdrop-filter: none; -webkit-backdrop-filter: none;
    transition: transform .3s var(--ease); top: 0; left: 0; right: 0; border-radius: 0; box-shadow: none;
  }
  .mtop.away { transform: translateY(-100%); }
  .mtop .icon-btn { width: 44px; height: 44px; min-height: 44px; }
  .main { padding: calc(72px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
  .tabbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .drawer { padding-top: env(safe-area-inset-top); }
  .hero::after { display: none; }
}

/* =========================================================
   CLASSIC & FLAT — no decorative effects (final word)
   no grid pattern, no glows, no gradients, no grain, no shadows
   ========================================================= */
body { background: var(--bg) !important; }
.grain, .hero::after { display: none !important; }
.card, .tbl-wrap, .col, .me, .facts, .step .panel, .modal .box, .hero, .kpi.accent {
  background: var(--card) !important; border: 1px solid var(--line) !important; box-shadow: none !important;
}
.col { background: var(--bg2) !important; }
.kpi.accent { border-top: 2px solid var(--red) !important; }
.kpi.accent .lbl { color: var(--red); }
.card.kpi:hover { transform: none; box-shadow: none; }
.side { background: var(--bg) !important; }
.nav a.on { background: var(--card2) !important; }
.btn.primary { background: var(--red) !important; border-color: var(--red) !important; box-shadow: none !important; }
.btn.primary:hover { background: var(--red-ink) !important; border-color: var(--red-ink) !important; }
.toast { box-shadow: none; }
.drawer, .modal .box { box-shadow: none; }

/* analytics on phones: no sideways scroll */
@media (max-width: 860px) {
  .hbar { grid-template-columns: 1fr auto; row-gap: 6px; }
  .hbar .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .mini-tbl { display: block; overflow-x: auto; white-space: nowrap; }
  .top .seg { max-width: 100%; }
}

/* pop-up forms: clearly separate from the page behind */
.modal > .scrim, .scrim { background: rgba(0,0,0,.68) !important; }
[data-theme="paper"] .modal > .scrim, [data-theme="paper"] .scrim { background: rgba(20,18,14,.45) !important; }
.modal .box { background: var(--card2) !important; border: 1px solid var(--faint) !important; padding: 24px; }
[data-theme="paper"] .modal .box { background: #FBFAF7 !important; border-color: var(--line) !important; }
@media (min-width: 700px) {
  .modal .box:has(#newForm), .modal .box:has(#userForm) { width: min(680px, 100%); }
  #newForm, #userForm { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
  #newForm > .field:first-child, #newForm .err, #newForm .panel-actions,
  #userForm .err, #userForm .panel-actions, #userForm > .check, #userForm > .field:nth-last-of-type(1) { grid-column: 1 / -1; }
}

/* products under "Orders" in the side menu */
.subnav { display: grid; gap: 2px; margin: 2px 0 8px 18px; padding-left: 12px; border-left: 1px solid var(--line); }
.subnav a { display: flex; justify-content: space-between; align-items: center; height: 34px; padding: 0 10px; border-radius: 7px; text-decoration: none; color: var(--muted); font-size: 13.5px; }
.subnav a:hover { background: var(--card2); color: var(--ink); }
.subnav a.on { color: var(--ink); font-weight: 700; background: var(--card2); }
.subnav a.on::before { content: none; }
.subnav .c { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.subnav a.on .c { color: var(--red); }
/* product buttons on the Orders page */
.prod-chips { margin-bottom: 12px; }
.prod-chips .chip { display: inline-flex; align-items: center; text-decoration: none; }
@media (max-width: 860px) { .prod-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; } .prod-chips .chip { flex: none; } }

/* Orders table = Google Sheet columns; SL no + customer stay visible while scrolling sideways */
.tbl.sheet { min-width: 2900px; }
.tbl.sheet th { white-space: normal; min-width: 96px; max-width: 150px; line-height: 1.3; vertical-align: bottom; }
.tbl.sheet td { white-space: nowrap; }
.tbl.sheet td.wrap { white-space: normal; min-width: 200px; }
.tbl.sheet th:first-child, .tbl.sheet td.slno { width: 64px; min-width: 64px; max-width: 64px; }
.tbl.sheet th:nth-child(2), .tbl.sheet td.custcol { position: sticky; left: 64px; background: var(--card); z-index: 1; box-shadow: 1px 0 0 var(--line); min-width: 180px; }
.tbl.sheet th:nth-child(2) { z-index: 2; }
.tbl.sheet tbody tr:hover td.custcol { background: var(--card2); }
.tbl.sheet td:first-child { box-shadow: none; }

/* tables fit the screen: sideways scrollbar always visible, headings stay on top */
@media (min-width: 861px) {
  .tbl-wrap { max-height: calc(100dvh - 250px); min-height: 320px; overflow: auto; overscroll-behavior: contain; }
}
.tbl-wrap::-webkit-scrollbar { width: 14px; height: 14px; }
.tbl-wrap::-webkit-scrollbar-track { background: var(--bg2); }
.tbl-wrap::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 8px; border: 3px solid var(--bg2); }
.tbl-wrap::-webkit-scrollbar-thumb:hover { background: var(--muted); }
.tbl-wrap::-webkit-scrollbar-corner { background: var(--bg2); }
.tbl-wrap { scrollbar-width: auto; scrollbar-color: var(--faint) var(--bg2); }
.tbl th { z-index: 1; }
.scroll-btns { display: inline-flex; gap: 8px; margin-left: auto; }
.scroll-btns .btn { width: 44px; padding: 0; font-size: 18px; }
@media (max-width: 860px) { .scroll-btns { display: none; } }

/* layering fix: inside a pop-up the dim backdrop must sit BEHIND the box, never on top of it */
.modal > .scrim { z-index: 0 !important; }
.modal > .box { position: relative; z-index: 1 !important; }
/* screen layers, bottom to top: page < phone bars (40) < order panel backdrop (50) < order panel (51) < pop-up (60) < messages (80) */
.drawer + .scrim, body > .scrim { z-index: 50; }

/* Description: wraps to at most 2 lines, full text on hover */
.tbl.sheet td.desc { white-space: normal; width: 210px; min-width: 210px; max-width: 210px; }
.clamp2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; line-height: 1.35; word-break: break-word; }

/* month sheets on Analytics (Production value / Billing sales value) */
.msheet-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.msheet { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.msheet th { font: 600 11px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: right; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--card2); white-space: nowrap; }
.msheet th:first-child, .msheet td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 190px; }
.msheet th:first-child { background: var(--card2); }
.msheet td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.msheet td.tot { font-weight: 700; }
.msheet tr.b td { font-weight: 700; }
.msheet tr.tgt td { color: var(--red); }
.msheet tr.red td:not(:first-child) { color: var(--red); }
.msheet tr.days td { color: var(--muted); }
.msheet tr.bal td:first-child, .msheet tr.b td:first-child { font-weight: 700; }
.msheet tr.sec td { font: 600 11px/1 var(--sans); letter-spacing: .1em; color: var(--muted); background: var(--card2); padding: 12px 14px; text-align: left; }
.msheet tbody tr:hover td { background: var(--card2); }
.msheet-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-top: 14px; font-size: 14px; }
.msheet-foot b { font-weight: 700; }

/* month sheets: easy to read */
.msheet-hd { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.msheet-hd h3 { font-size: 19px !important; }
.msheet-hd p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.mbadge { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-weight: 700; }
.mtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.mtile { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--bg2); }
.mtile .mv { font: 700 26px/1.1 var(--sans); letter-spacing: -.04em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.mtile .msub { font-size: 13px; color: var(--muted); margin-top: 8px; }
.mtile .msub b { color: var(--ink); }
.mtile.warn { border-color: rgba(239,64,74,.45); }
.mtile.warn .mv { color: var(--red); }
.mbar { height: 6px; border-radius: 6px; background: var(--chip); margin-top: 10px; overflow: hidden; }
.mbar i { display: block; height: 100%; border-radius: 6px; }
.mbar i.ok, .pct.ok { background: var(--green); } .mbar i.mid, .pct.mid { background: var(--amber); } .mbar i.low, .pct.low { background: var(--red); }
.mbar i.plan { background: var(--ink); }
.pct { display: inline-block; min-width: 46px; text-align: center; padding: 3px 8px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 12.5px; }
.pct.mid { color: #1a1300; }
.zero { color: var(--faint); }
.ahead { color: var(--green); font-weight: 700; }
.behind { color: var(--amber); font-weight: 700; }
[data-theme="paper"] .behind { color: #b45309; } [data-theme="paper"] .ahead { color: #15803d; }
.pdot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 10px; vertical-align: 0; }
.msheet tr.tgt td { color: var(--red); font-weight: 700; }
.msheet tr.b td { font-weight: 700; font-size: 15px; }
.msheet tr.pct-row td { background: var(--bg2); }
.msheet tr.amber td:not(:first-child) { color: var(--amber); }
.msheet tr.sec td { background: var(--card2); color: var(--ink); border-left: 3px solid var(--red); font-size: 11.5px; padding: 11px 14px; }
.msheet th.now, .msheet td.now { background: rgba(239,64,74,.07) !important; }
.msheet th.now { color: var(--red); box-shadow: inset 0 3px 0 var(--red); }
.now-tag { display: block; font-size: 10px; letter-spacing: .08em; margin-top: 4px; color: var(--red); }
.msheet td.tot, .msheet th.tot { background: rgba(127,127,127,.06); }
.msheet th:first-child { color: var(--ink); }
.mlegend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 12.5px; color: var(--muted); align-items: center; }
.mlegend .pct { min-width: 0; font-size: 11px; padding: 2px 6px; margin-right: 4px; }
@media (max-width: 860px) { .mtiles { grid-template-columns: 1fr 1fr; } .mtile .mv { font-size: 21px; } }

/* =========================================================
   WHITE THEME — its own palette (readable on white), overrides everything above
   ========================================================= */
html[data-theme="paper"] {
  --bg: #F3F1ED;            /* page */
  --bg2: #F8F7F4;           /* inner panels, table headers */
  --card: #FFFFFF;          /* cards: clean white */
  --card2: #F4F2EE;         /* hover, section bands */
  --chip: #ECE9E3;
  --line: #DEDAD2;
  --line2: #ECE9E3;
  --ink: #16161A;
  --ink2: #2A2A30;
  --muted: #55524B;
  --faint: #7A766E;
  /* status colours deep enough to read on white */
  --red: #D62F3B;
  --red-ink: #B4222D;
  --green: #15803D;
  --amber: #B45309;
  --orange: #C2410C;
  --blue: #1D4ED8;
}
html[data-theme="paper"] .pct.mid { color: #fff; }
html[data-theme="paper"] .msheet th.now, html[data-theme="paper"] .msheet td.now { background: #FFF4F4 !important; }
html[data-theme="paper"] .msheet td.tot, html[data-theme="paper"] .msheet th.tot { background: #F6F5F2; }
html[data-theme="paper"] .msheet tr.pct-row td { background: #FAF9F7; }
html[data-theme="paper"] .msheet tbody tr:hover td { background: #F6F5F2; }
html[data-theme="paper"] .mtile { background: #FAF9F7; }
html[data-theme="paper"] .s-ontime { background: #E7F6EC; }
html[data-theme="paper"] .s-d12 { background: #FDF1E3; }
html[data-theme="paper"] .s-d3 { background: #FDEDE4; }
html[data-theme="paper"] .s-pending { background: #FDECEC; }
html[data-theme="paper"] .s-inproc { background: #E8EEFD; }
html[data-theme="paper"] .new-badge, html[data-theme="paper"] .nav .badge, html[data-theme="paper"] .tabbar .badge { background: #D62F3B; }

/* rows that need attention get a coloured marker on the label (both themes) */
.msheet tr.red td:first-child::before, .msheet tr.amber td:first-child::before, .msheet tr.bal td:first-child::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; vertical-align: 1px;
}
.msheet tr.red td:first-child::before { background: var(--red); }
.msheet tr.amber td:first-child::before { background: var(--amber); }
.msheet tr.bal td:first-child::before { background: var(--ink); }
.msheet tr.red td:not(:first-child), .msheet tr.amber td:not(:first-child) { font-weight: 600; }
html[data-theme="paper"] { --red: #C42331; --red-ink: #A51C28; --green: #11692F; --amber: #A14A07; --faint: #67635B; }
html[data-theme="paper"] .chip .c { opacity: 1; }

/* filled red / green with white text: deep enough to read in both themes */
.btn.primary { background: #CF2B36 !important; border-color: #CF2B36 !important; }
.btn.primary:hover { background: #B4222D !important; border-color: #B4222D !important; }
.nav .badge, .tabbar .badge, .new-badge, .avatar.red, .toast.err { background: #CF2B36 !important; }
.pct.low { background: #CF2B36; } .pct.ok { background: #15803D; } .pct.mid { background: #B45309; color: #fff; }
html[data-theme="night"] .s-pending { color: #FF7A81; }
html[data-theme="night"] .s-ontime { color: #4ADE80; }

/* =====================================================================
   COLOUR SYSTEM (final) — structure from Color Hunt palette
   #F9F7F7 · #DBE2EF · #3F72AF · #112D4E  (colorhunt.co/palette/f9f7f7dbe2ef3f72af112d4e)
   Indicator colours are IDENTICAL in white and dark mode.
   ===================================================================== */
:root {
  /* indicators — same everywhere, always shown as solid fills with fixed text colour */
  --ok: #15803D;      --ok-ink: #FFFFFF;     /* green  : on time / on target / ahead */
  --warn: #EAB308;    --warn-ink: #1A1300;   /* yellow : delay 1–2 days / close (70–99%) */
  --late: #C2410C;    --late-ink: #FFFFFF;   /* orange : delay 3+ days / still to make */
  --bad: #CF2B36;     --bad-ink: #FFFFFF;    /* red    : overdue / behind / pending */
  --info: #3F72AF;    --info-ink: #FFFFFF;   /* blue   : in process */
  --neutral: #64748B; --neutral-ink: #FFFFFF;/* grey   : not planned */
  --brand: #CF2B36;                          /* Meshines red: buttons, active menu */
}
/* white mode: Color Hunt palette */
html[data-theme="paper"] {
  --bg: #F9F7F7; --bg2: #F3F6FB; --card: #FFFFFF; --card2: #EEF2F8; --chip: #DBE2EF;
  --line: #DBE2EF; --line2: #E8EDF5;
  --ink: #112D4E; --ink2: #1C3A60; --muted: #3F5675; --faint: #5A6E89;
  --red: #B4222D; --red-ink: #9A1C26; --green: #11692F; --amber: #8A5A00; --orange: #A3360A; --blue: #2F5E99;
  color-scheme: light;
}
/* dark mode: the same palette, darkened (navy) */
html[data-theme="night"] {
  --bg: #0B1626; --bg2: #0E1C30; --card: #10203A; --card2: #162A47; --chip: #1C3354;
  --line: #22385A; --line2: #1A2F4D;
  --ink: #F9F7F7; --ink2: #E6ECF5; --muted: #B6C3D6; --faint: #8FA1BA;
  --red: #FF7A84; --red-ink: #FF9AA2; --green: #5EE08F; --amber: #F5C542; --orange: #FF9A62; --blue: #8DB4E8;
  color-scheme: dark;
}
html[data-theme="night"] meta { color: inherit; }

/* status badges: solid fill, identical in both modes */
.pill { border: 0 !important; }
.pill::before { background: currentColor; opacity: .85; }
.s-ontime  { background: var(--ok) !important;      color: var(--ok-ink) !important; }
.s-d12     { background: var(--warn) !important;    color: var(--warn-ink) !important; }
.s-d3      { background: var(--late) !important;    color: var(--late-ink) !important; }
.s-pending { background: var(--bad) !important;     color: var(--bad-ink) !important; }
.s-inproc  { background: var(--info) !important;    color: var(--info-ink) !important; }
.s-none    { background: var(--neutral) !important; color: var(--neutral-ink) !important; }
.pct.ok  { background: var(--ok) !important;   color: var(--ok-ink) !important; }
.pct.mid { background: var(--warn) !important; color: var(--warn-ink) !important; }
.pct.low { background: var(--bad) !important;  color: var(--bad-ink) !important; }
.mbar i.ok { background: var(--ok); } .mbar i.mid { background: var(--warn); } .mbar i.low { background: var(--bad); }
.mbar i.plan { background: var(--info); }

/* ahead / still-to-make in tables: small solid chips */
.ahead, .behind { display: inline-block; padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.ahead  { background: var(--ok) !important;   color: var(--ok-ink) !important; }
.behind { background: var(--late) !important; color: var(--late-ink) !important; }
html[data-theme="paper"] .ahead, html[data-theme="paper"] .behind { }

/* small up/down notes (KPI cards, greeting line): chips instead of coloured text */
.kpi .d .up, .kpi .d .down, .hero-sub .down {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 12.5px;
}
.kpi .d .up { background: var(--ok); color: var(--ok-ink); }
.kpi .d .down, .hero-sub .down { background: var(--bad); color: var(--bad-ink); }

/* tables: numbers stay in normal ink; the coloured marker on the row label shows the meaning */
.msheet tr.tgt td { color: var(--ink) !important; }
.msheet tr.tgt td:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; background: var(--info); vertical-align: 1px; }
.msheet tr.red td:not(:first-child), .msheet tr.amber td:not(:first-child) { color: var(--ink) !important; }
.msheet tr.red td:first-child::before { background: var(--bad); }
.msheet tr.amber td:first-child::before { background: var(--warn); }
.msheet tr.bal td:first-child::before { background: var(--late); }
.msheet th.now { color: var(--ink) !important; box-shadow: inset 0 3px 0 var(--info) !important; }
.msheet th.now, .msheet td.now { background: rgba(63,114,175,.10) !important; }
.now-tag { display: inline-block !important; background: var(--info); color: var(--info-ink) !important; padding: 2px 6px; border-radius: 4px; }
.mtile.warn { border-color: var(--line) !important; border-top: 3px solid var(--bad) !important; }
.mtile.warn .mv { color: var(--ink) !important; }
.mtile.warn .lbl::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); margin-right: 8px; }
.kpi.accent { border-top: 3px solid var(--brand) !important; }
.kpi.accent .lbl { color: var(--muted) !important; }
.msheet tr.sec td { border-left-color: var(--info) !important; }

/* brand red only for actions + active menu */
.btn.primary, .nav .badge, .tabbar .badge, .new-badge, .avatar.red { background: var(--brand) !important; border-color: var(--brand) !important; color: #fff !important; }
.nav a.on::before { background: var(--brand); }
.nav a.on svg { color: var(--brand); }
.input:focus { border-color: var(--info) !important; box-shadow: 0 0 0 3px rgba(63,114,175,.22) !important; }
a.li:hover .t { color: var(--info); }

/* =========================================================
   PROFESSIONAL MOTION (transform + opacity only; off for reduced-motion)
   ========================================================= */
/* buttons: slight grow + inner highlight (from the Liquid Glass brief) */
.btn { transition: transform .25s var(--ease), opacity .2s; }
.btn:hover:not(:disabled) { transform: scale(1.02); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { box-shadow: inset 0 4px 4px 0 rgba(255,255,255,.22) !important; }
.chip { transition: transform .2s var(--ease); }
.chip:hover { transform: translateY(-1px); }

/* cards / tiles lift a little on hover (desktop pointer only) */
@media (hover: hover) and (pointer: fine) {
  .mtile, .kpi, .tile { transition: transform .3s var(--ease); }
  .mtile:hover, .card.kpi:hover, .tile:hover { transform: translateY(-3px); }
}

/* side menu: marker slides in, icon nudges on hover */
.nav a::before { transition: transform .35s var(--ease), opacity .35s; }
.nav a:not(.on)::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 2px; background: var(--brand); border-radius: 2px; transform: scaleY(0); opacity: 0; }
.nav a.on::before { transform: scaleY(1); opacity: 1; animation: navMark .45s var(--ease) both; }
@keyframes navMark { from { transform: scaleY(0); opacity: 0; } }
.nav a svg { transition: transform .25s var(--ease); }
.nav a:hover svg { transform: translateX(2px); }

/* progress bars fill, % badges pop, rows slide in */
.mbar i { transform-origin: left; animation: barFill 1.1s var(--ease) both .25s; }
@keyframes barFill { from { transform: scaleX(0); } }
.pct { animation: pop .45s var(--ease) both; }
.msheet tbody tr:nth-child(1) .pct { animation-delay: .1s; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.msheet tbody tr, .tbl tbody tr:nth-child(-n+24) { animation: rowIn .5s var(--ease) both; }
.msheet tbody tr:nth-child(2), .tbl tbody tr:nth-child(2) { animation-delay: .03s; }
.msheet tbody tr:nth-child(3), .tbl tbody tr:nth-child(3) { animation-delay: .06s; }
.msheet tbody tr:nth-child(4), .tbl tbody tr:nth-child(4) { animation-delay: .09s; }
.msheet tbody tr:nth-child(5), .tbl tbody tr:nth-child(5) { animation-delay: .12s; }
.msheet tbody tr:nth-child(6), .tbl tbody tr:nth-child(6) { animation-delay: .15s; }
.msheet tbody tr:nth-child(7), .tbl tbody tr:nth-child(7) { animation-delay: .18s; }
.msheet tbody tr:nth-child(8), .tbl tbody tr:nth-child(8) { animation-delay: .21s; }
.msheet tbody tr:nth-child(n+9), .tbl tbody tr:nth-child(n+9) { animation-delay: .24s; }
@keyframes rowIn { from { transform: translateY(6px); opacity: 0; } }
/* quiet live refresh: no entrance replays */
.still .mbar i, .still .pct, .still .msheet tbody tr, .still .tbl tbody tr, .still .nav a.on::before { animation: none !important; opacity: 1 !important; transform: none !important; }

/* status badges: gentle pulse only for overdue, to draw the eye */
.s-pending::before { animation: dotPulse 1.8s ease-in-out infinite; }
@keyframes dotPulse { 50% { transform: scale(.55); opacity: .5; } }

@media (prefers-reduced-motion: reduce) {
  .btn:hover, .chip:hover, .mtile:hover, .card.kpi:hover, .tile:hover { transform: none !important; }
  .s-pending::before { animation: none !important; }
}

/* =====================================================================
   ZOHO-STYLE LAYOUT — white top bar with search, dark navy side menu,
   green pill for the open page, > arrows on items with a sub-list.
   (Look only — no Zoho data.)
   ===================================================================== */
:root { --zside: #21263C; --zside-ink: #E6E8F0; --zside-mut: #A9AEC1; --zside-hover: rgba(255,255,255,.07); --zgreen: #1E9E6A; --ztop-h: 60px; }
html[data-theme="night"] { --zside: #111B2D; --zside-hover: rgba(255,255,255,.06); }

@media (min-width: 861px) {
  .shell.zoho { grid-template-columns: 260px 1fr; grid-template-rows: var(--ztop-h) 1fr; grid-template-areas: "top top" "side main"; }
  .ztop { grid-area: top; position: sticky; top: 0; z-index: 30; height: var(--ztop-h); display: flex; align-items: center; gap: 18px;
    padding: 0 22px; background: var(--card); border-bottom: 1px solid var(--line); }
  .ztop .brand { padding: 0; width: 216px; flex: none; }
  .zsearch { flex: 0 1 460px; display: flex; align-items: center; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); overflow: hidden; }
  .zsearch:focus-within { border-color: var(--info); box-shadow: 0 0 0 3px rgba(63,114,175,.18); }
  .zs-scope { display: flex; align-items: center; gap: 4px; padding: 0 10px 0 12px; height: 100%; color: var(--muted); border-right: 1px solid var(--line); }
  .zs-scope svg:first-child { width: 17px; height: 17px; }
  .zsearch input { flex: 1; border: 0; outline: 0; background: transparent; padding: 0 12px; font-size: 15px; color: var(--ink); height: 100%; }
  .zsearch input::-webkit-search-cancel-button { cursor: pointer; }
  .ztop-r { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: 13.5px; }
  .zorg { font-weight: 700; letter-spacing: .04em; color: var(--ink); }
  .zdate { color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line); }

  .shell.zoho .side { grid-area: side; top: var(--ztop-h); height: calc(100dvh - var(--ztop-h)); background: var(--zside) !important; border-right: 0; padding: 16px 12px 14px; }
  .shell.zoho .main { grid-area: main; }
}
@media (max-width: 860px) { .ztop { display: none; } }

/* side menu items (Zoho look) */
.shell.zoho .nav { gap: 4px; }
.shell.zoho .nav a { height: 42px; padding: 0 12px 0 6px; border-radius: 8px; color: var(--zside-ink); font-size: 15px; font-weight: 500; gap: 10px; }
.shell.zoho .nav a svg { width: 19px; height: 19px; color: var(--zside-ink) !important; opacity: .9; }
.shell.zoho .nav a:hover { background: var(--zside-hover); color: #fff; }
.shell.zoho .nav a.on { background: var(--zgreen) !important; color: #fff; font-weight: 700; }
.shell.zoho .nav a.on svg { color: #fff !important; opacity: 1; }
.shell.zoho .nav a::before, .shell.zoho .nav a.on::before { display: none !important; }
.zchev { width: 12px; flex: none; color: var(--zside-mut); font-size: 18px; line-height: 1; text-align: center; transition: transform .25s var(--ease); }
.zchev.open { transform: rotate(90deg); }
.shell.zoho .nav a.on .zchev { color: #fff; }
.shell.zoho .nav .badge { background: var(--brand) !important; }

/* product sub-list under Orders, on the dark menu */
.shell.zoho .subnav { border-left-color: rgba(255,255,255,.14); margin-left: 24px; }
.shell.zoho .subnav a { color: var(--zside-mut); height: 34px; font-size: 14px; }
.shell.zoho .subnav a:hover { background: var(--zside-hover); color: #fff; }
.shell.zoho .subnav a.on { background: rgba(255,255,255,.10); color: #fff; font-weight: 700; }
.shell.zoho .subnav .c { color: var(--zside-mut); }
.shell.zoho .subnav a.on .c { color: #fff; }

/* name card at the bottom keeps its own look (white card); Settings button added inside */
.shell.zoho .side-foot .me { background: var(--card) !important; border: 1px solid var(--line) !important; }
.me .icon-btn { text-decoration: none; }
.me .icon-btn.on { color: var(--zgreen); border-color: var(--zgreen); }
.me .who { min-width: 0; flex: 1 1 auto; }
:root { --zgreen: #15803D; }
/* green pill only on the main menu items, not on the product sub-list */
.shell.zoho .subnav a.on { background: rgba(255,255,255,.12) !important; }

/* =====================================================================
   BACK TO THE PREVIOUS COLOURS (layout stays Zoho-style).
   Replaces the Color Hunt structure colours; indicator colours unchanged.
   ===================================================================== */
html[data-theme="paper"] {
  --bg: #F3F1ED; --bg2: #F8F7F4; --card: #FFFFFF; --card2: #F4F2EE; --chip: #ECE9E3;
  --line: #DEDAD2; --line2: #ECE9E3;
  --ink: #16161A; --ink2: #2A2A30; --muted: #55524B; --faint: #67635B;
  --red: #C42331; --red-ink: #A51C28; --green: #11692F; --amber: #A14A07; --orange: #C2410C; --blue: #1D4ED8;
}
html[data-theme="night"] {
  --bg: #09090B; --bg2: #0C0C0E; --card: #111113; --card2: #18181B; --chip: #1C1C20;
  --line: #27272A; --line2: #1F1F23;
  --ink: #FAFAFA; --ink2: #EDEDF0; --muted: #B9B9C2; --faint: #8E8E98;
  --red: #FF7A84; --red-ink: #FF9AA2; --green: #5EE08F; --amber: #F5C542; --orange: #FF9A62; --blue: #8DB4E8;
  --zside: #141418;
}
/* neutral highlights (no blue tint) */
.msheet th.now, .msheet td.now { background: rgba(239,64,74,.06) !important; }
html[data-theme="paper"] .msheet th.now, html[data-theme="paper"] .msheet td.now { background: #FFF6F6 !important; }
.msheet th.now { box-shadow: inset 0 3px 0 var(--brand) !important; }
.now-tag { background: var(--brand) !important; }
.msheet tr.sec td { border-left-color: var(--brand) !important; }
.input:focus, .zsearch:focus-within { border-color: var(--faint) !important; box-shadow: 0 0 0 3px rgba(127,127,127,.18) !important; }
a.li:hover .t { color: var(--ink); text-decoration: underline; }

/* product buttons on the Orders page: desktop uses the side menu (Orders > products) instead */
@media (min-width: 861px) { .prod-chips { display: none !important; } }

/* =====================================================================
   ZOHO LIST VIEW — clean, simple, very readable tables everywhere
   ===================================================================== */
:root { --zlink: #1F5BD8; --zhead: #F7F8FA; --zrow-hover: #F5F8FF; }
html[data-theme="night"] { --zlink: #8FB3FF; --zhead: #151519; --zrow-hover: #17171C; }

/* page title with dropdown: "All Orders ▾" */
.ztitle { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; padding: 0; cursor: pointer; color: var(--ink);
  font: 700 26px/1.1 var(--sans); letter-spacing: -.035em; }
.ztitle svg { color: var(--zlink); margin-top: 2px; transition: transform .2s var(--ease); }
.ztitle[aria-expanded="true"] svg { transform: rotate(180deg); }
.ztitle:hover { color: var(--zlink); }
.top h1 .ztitle { font-size: inherit; }
/* + New (Zoho green) and ⋯ */
.btn.znew { background: var(--zgreen); border-color: var(--zgreen); color: #fff; padding: 0 16px; }
.btn.znew:hover { background: #116B33; border-color: #116B33; }
.btn.zmore { width: 42px; padding: 0; }
.btn.zmore svg { width: 20px; height: 20px; }

/* dropdown menu */
.zmenu { position: fixed; z-index: 70; min-width: 230px; max-height: 70vh; overflow: auto; padding: 6px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line); box-shadow: 0 12px 32px -12px rgba(0,0,0,.35); animation: menuIn .16s var(--ease) both; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } }
.zm-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent;
  color: var(--ink); font: 400 15px var(--sans); text-align: left; cursor: pointer; text-decoration: none; }
.zm-item svg { color: var(--zlink); flex: none; }
.zm-item:hover, .zm-item.open, .zm-item:focus-visible { background: var(--zlink); color: #fff; outline: none; }
.zm-item:hover svg, .zm-item.open svg, .zm-item:focus-visible svg { color: #fff; }
.zm-item.on { font-weight: 700; }
.zm-arrow { margin-left: auto; font-size: 18px; line-height: 1; }
.zm-tick { margin-left: auto; color: var(--zgreen); font-weight: 700; }
.zm-item:hover .zm-tick { color: #fff; }
.zm-count { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.zm-item:hover .zm-count { color: #fff; }
.zm-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* tables: light grey header, plain rows, blue names */
.tbl-wrap, .msheet-wrap { border-radius: 8px !important; }
.tbl th, .msheet th, .mini-tbl th {
  background: var(--zhead) !important; color: var(--muted) !important;
  font: 600 12px/1.35 var(--sans) !important; letter-spacing: .02em !important; text-transform: uppercase;
  padding: 14px 16px !important; border-bottom: 1px solid var(--line) !important;
}
.tbl td, .msheet td, .mini-tbl td { font-size: 15px; font-weight: 400; padding: 16px !important; border-bottom: 1px solid var(--line2); color: var(--ink); }
.tbl .cust { color: var(--zlink) !important; font-weight: 500 !important; letter-spacing: 0 !important; }
.tbl tbody tr:hover td, .tbl tbody tr:hover td.custcol, .msheet tbody tr:hover td { background: var(--zrow-hover) !important; }
.tbl tbody tr:hover .cust { text-decoration: underline; }
.tbl .sm { font-size: 13.5px; color: var(--muted); }
.tbl.sheet td.custcol, .tbl td:first-child { background: var(--card); }
.msheet tr.b td { font-weight: 700; }
.mini-tbl th { background: var(--zhead) !important; }
/* list rows (team, tasks, activity) a little roomier */
.li { padding: 14px 4px; }
.li .t { font-size: 15.5px; }
/* menu highlight: same deep blue in both themes so white text stays readable */
.zm-item:hover, .zm-item.open, .zm-item:focus-visible { background: #1F5BD8 !important; color: #fff !important; }
html[data-theme="night"] .zm-tick { color: var(--green); }
/* active filter tags (filters themselves live in the ⋯ menu) */
.ftag { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid var(--zlink);
  background: transparent; color: var(--zlink); font: 600 13.5px var(--sans); cursor: pointer; }
.ftag:hover { background: #1F5BD8; color: #fff; border-color: #1F5BD8; }

/* =====================================================================
   LIST HEADER — one compact, premium row (Zoho-style)
   ===================================================================== */
.lhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 18px; }
.lh-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.lh-title { margin: 0; line-height: 1; }
.lh-title .ztitle { font: 700 26px/1 var(--sans); letter-spacing: -.035em; }
.lh-count { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 14px; background: var(--chip); color: var(--muted);
  font: 500 13.5px var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.lh-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.lh-right .btn { height: 40px; min-height: 40px; border-radius: 9px; }
/* search: icon clearly visible, 40px like the buttons */
.lsearch { position: relative; display: block; width: 300px; }
.lsearch > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted); z-index: 2; pointer-events: none; }
.lsearch .input { height: 40px !important; min-height: 40px !important; padding-left: 38px !important; border-radius: 9px; background: var(--card); font-size: 15px; }
.lsearch .micwrap > .input { padding-right: 40px; }
.lsearch .mic { width: 32px !important; height: 32px !important; min-height: 32px !important; right: 4px; }
.lsearch:focus-within > svg { color: var(--ink); }
/* ◀ ▶ joined into one control */
.lh-scroll { display: inline-flex; }
.lh-scroll .btn { width: 40px; padding: 0; border-radius: 0; }
.lh-scroll .btn:first-child { border-radius: 9px 0 0 9px; }
.lh-scroll .btn:last-child { border-radius: 0 9px 9px 0; margin-left: -1px; }
.lh-scroll .btn:hover { transform: none; position: relative; z-index: 1; }
.lhead .btn.znew { padding: 0 16px; font-weight: 700; }
.lhead .ftag { height: 28px; font-size: 13px; }
/* date picker inside the Orders header row */
.lhead .perbar.inline { margin: 0; flex-wrap: nowrap; gap: 6px; }
.lhead .perbar.inline .per-ic { width: 24px; height: 40px; }
.lhead .perbar.inline .per-sel { min-width: 150px; height: 40px; min-height: 40px; border-radius: 9px; background: var(--card); font-size: 15px; }
.lhead .perbar.inline .per-d .input { height: 40px; min-height: 40px; }
@media (max-width: 860px) {
  .lh-right { flex-wrap: wrap; }
  .lhead .perbar.inline { flex: 1 1 100%; flex-wrap: wrap; }
  .lhead .perbar.inline .per-sel, .lhead .perbar.inline .per-d .input { height: 48px; min-height: 48px; font-size: 16px; }
  .lhead .perbar.inline .per-sel { flex: 1; }
}
@media (max-width: 860px) {
  .lhead { gap: 12px; }
  .lh-right { width: 100%; margin-left: 0; }
  .lsearch { flex: 1; width: auto; }
  .lsearch .input { height: 48px !important; min-height: 48px !important; font-size: 16px; }
  .lh-scroll { display: none; }
  .lh-right .btn { height: 48px; min-height: 48px; }
}

/* every page uses the same one-row header */
.lh-title { font: 700 26px/1 var(--sans); letter-spacing: -.035em; color: var(--ink); }
.lhead .seg { height: 40px; align-items: center; }
.lhead select.input { height: 40px !important; min-height: 40px !important; }
/* pipeline board fills the window; its sideways scrollbar sits at the bottom of the screen */
@media (min-width: 861px) {
  .board { align-items: stretch; }
  .board .col { max-height: none !important; height: 100%; min-height: 0; }
  .board .col-body { flex: 1; min-height: 0; }
}
.board::-webkit-scrollbar { height: 14px; }
.board::-webkit-scrollbar-track { background: var(--bg2); border-radius: 8px; }
.board::-webkit-scrollbar-thumb { background: var(--faint); border-radius: 8px; border: 3px solid var(--bg2); }
.board { scrollbar-color: var(--faint) var(--bg2); padding-bottom: 6px; }
/* coloured dot beside each status in menus (same colours as the badges) */
.zm-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--card); }
.zm-item:hover .zm-dot { box-shadow: 0 0 0 2px #fff; }

/* =====================================================================
   STATUS COLOURS (user's choice, 14 Nov):
   On time = green · Delay 1–2 = orange · Delay 3+ = red · Production pending = yellow · In process = blue · Not planned = grey
   ===================================================================== */
.s-ontime  { background: var(--ok) !important;      color: var(--ok-ink) !important; }
.s-d12     { background: var(--late) !important;    color: var(--late-ink) !important; }
.s-d3      { background: var(--bad) !important;     color: var(--bad-ink) !important; }
.s-pending { background: var(--warn) !important;    color: var(--warn-ink) !important; }
.s-inproc  { background: var(--info) !important;    color: var(--info-ink) !important; }
.s-none    { background: var(--neutral) !important; color: var(--neutral-ink) !important; }
/* production pending shown in yellow everywhere it appears */
.kpi .d .down, .hero-sub .down { background: var(--warn) !important; color: var(--warn-ink) !important; }
.mtile.warn { border-top-color: var(--warn) !important; }
.mtile.warn .lbl::before { background: var(--warn) !important; }
.msheet tr.red td:first-child::before { background: var(--warn) !important; }
/* progress scale everywhere: green = on target · orange = a little behind · red = far behind (yellow is only Production pending) */
.pct.mid { background: var(--late) !important; color: var(--late-ink) !important; }
.mbar i.mid { background: var(--late) !important; }
/* Delay 1–2 days / "a little behind": bright true orange, clearly different from red; dark text for readability */
:root { --late: #F97316; --late-ink: #1A0E00; }
/* required fields */
.req { color: var(--bad); font-weight: 700; margin-left: 2px; }
.input.invalid, .check input.invalid { border-color: var(--bad) !important; box-shadow: 0 0 0 3px rgba(207,43,54,.18) !important; }
/* partial production: link between an order and its balance line */
.splitnote { display: block; margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--warn); background: rgba(234,179,8,.12);
  color: var(--ink); text-decoration: none; font-size: 14px; line-height: 1.45; }
.splitnote:hover { background: rgba(234,179,8,.2); }
/* finished steps that are missing required details */
.miss { margin-left: 10px; padding: 2px 8px; border-radius: 6px; background: var(--warn); color: var(--warn-ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.step .c .nm { align-items: center; }
.step .c .nm > span:last-child { margin-left: auto; }
.missnote { margin: 4px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(234,179,8,.14); border: 1px solid var(--warn); font-size: 13.5px; color: var(--ink); }
/* order panel: every sheet column, in sheet order */
.sheetview { margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); overflow: hidden; }
.sheetview summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; font-weight: 700; list-style: none; background: var(--zhead); }
.sheetview summary::-webkit-details-marker { display: none; }
.sheetview summary::before { content: "\203A"; display: inline-block; margin-right: 8px; transition: transform .2s var(--ease); font-size: 18px; line-height: 1; color: var(--muted); }
.sheetview[open] summary::before { transform: rotate(90deg); }
.sheetview summary > span:first-child { margin-right: auto; }
.sheetview dl { margin: 0; display: grid; grid-template-columns: 1fr; }
.sheetview dl > div { display: grid; grid-template-columns: minmax(150px, 46%) 1fr; gap: 12px; padding: 9px 14px; border-top: 1px solid var(--line2); font-size: 14px; align-items: center; }
.sheetview dt { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.sheetview dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; word-break: break-word; }
.sheetview dd .cust { color: var(--zlink); font-weight: 600; }
.sheetview dd .sm { color: var(--muted); font-size: 12.5px; }

/* side menu: black in both themes (was Zoho navy) */
:root, html[data-theme="paper"], html[data-theme="night"] {
  --zside: #111113;
  --zside-ink: #F4F4F5;
  --zside-mut: #A1A1AA;
  --zside-hover: rgba(255,255,255,.08);
}
html[data-theme="night"] .shell.zoho .side { border-right: 1px solid var(--line); }
.shell.zoho .subnav { border-left-color: rgba(255,255,255,.16); }

/* ---- order panel: Zoho-style form, one field per row, auto-save ---- */
:root, html[data-theme="paper"] { --zreq: #C42B36; --zok: #15803D; }
html[data-theme="night"] { --zreq: #F87171; --zok: #4ADE80; }
.zauto { margin: 4px 0 14px; font-size: 13px; color: var(--muted); }
.zform { margin-bottom: 22px; }
.zsec { border-top: 1px solid var(--line); padding: 16px 0 6px; }
.zsec:first-child { border-top: 0; padding-top: 4px; }
.zsec-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.zsec-hd b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.zn { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; border: 1px solid var(--line); color: var(--ink); flex: none; }
.zsec.cur .zn { background: #15803D; border-color: #15803D; color: #fff; }
.zsec.done .zn { background: transparent; border-color: #15803D; color: var(--zok); }
.zsub { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.zopt { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.zrow { display: grid; grid-template-columns: 190px minmax(0, 340px); gap: 6px 18px; align-items: start; margin-bottom: 12px; }
.zl { font-size: 14.5px; color: var(--ink); padding-top: 12px; line-height: 1.3; }
.zl.rq { color: var(--zreq); }
.zv { min-width: 0; }
.zv .field, .zv .check { margin: 0; }
.zv .check { min-height: 44px; display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.zbox { position: relative; }
.zbox .input, .zbox .micwrap { width: 100%; }
.zsv { display: inline-block; font-size: 12px; margin-top: 4px; min-height: 0; }
.zsv:empty { display: none; }
.zsv.ok { color: var(--zok); }
.zsv.busy { color: var(--muted); }
.zsv.err { color: var(--zreq); }
.zhint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.zact .zv { display: flex; gap: 8px; flex-wrap: wrap; }
.zact .btn { min-height: 44px; }
.zwait { font-size: 12.5px; margin: 0 0 8px; }
@media (max-width: 560px) {
  .zrow { grid-template-columns: 1fr; gap: 6px; }
  .zl { padding-top: 0; }
  .zl:empty { display: none; }
  .zsub { margin-left: 36px; width: 100%; }
}

/* one step at a time */
.zsec-hd[data-act] { cursor: pointer; min-height: 44px; }
.zsec.done .zsec-hd { margin-bottom: 6px; }
.ztog { font-size: 12.5px; font-weight: 700; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
button.ztog { background: transparent; font-family: inherit; cursor: pointer; }
.znext { font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 12px; margin: 4px 0 0; }

/* new order in the side panel: one column, Zoho rows (not the old 2-column popup grid) */
.drawer #newForm { display: block; }
.drawer #newForm .zrow { grid-template-columns: 190px minmax(0, 340px); }
.drawer #newForm .zv .input, .drawer #newForm .zbox, .drawer #newForm .micwrap { width: 100%; }
@media (max-width: 560px) { .drawer #newForm .zrow { grid-template-columns: 1fr; } }

/* ---- order dialog (new + open order): centred, follows the theme. Dark = dark, light = white ---- */
.drawer {
  --dz-bg: #111113; --dz-input: #0C0C0E; --dz-line: #2F2F34; --dz-hd: #27272A;
  --dz-ink: #FAFAFA; --dz-mut: #A1A1AA; --dz-ph: #71717A; --dz-focus: #408DFB;
  --zreq: #F87171; --zok: #4ADE80;
}
html[data-theme="paper"] .drawer {
  --dz-bg: #FFFFFF; --dz-input: #FFFFFF; --dz-line: #D9DCE1; --dz-hd: #E5E7EB;
  --dz-ink: #1F2328; --dz-mut: #6B7280; --dz-ph: #9AA1AB;
  --bg: #FFFFFF; --bg2: #FFFFFF; --card: #FFFFFF; --card2: #F7F8FA; --chip: #F1F3F5;
  --line: #D9DCE1; --line2: #ECEEF1; --ink: #1F2328; --ink2: #2B2F36; --muted: #6B7280; --faint: #9AA1AB;
  --zreq: #C42B36; --zok: #15803D;
}
.drawer {
  inset: 0; margin: auto; width: min(760px, calc(100vw - 32px)); height: fit-content;
  max-height: calc(100dvh - 32px); border: 1px solid var(--dz-line); border-radius: 12px; overflow: hidden;
  background: var(--dz-bg); color: var(--dz-ink); animation: rise .4s var(--ease) both;
}
.drawer .dr-hd { background: var(--dz-bg); border-bottom: 1px solid var(--dz-hd); padding: 16px 24px 12px; }
.drawer .dr-hd .lbl { display: none; }
.drawer .dr-hd h2 { font-size: 22px; font-weight: 400; letter-spacing: 0; color: var(--dz-ink); margin: 0 0 2px; }
.drawer .dr-body { background: var(--dz-bg); padding: 8px 24px 20px; overflow: auto; min-height: 0; }
.drawer .zrow, .drawer #newForm .zrow { grid-template-columns: 200px minmax(0, 420px); gap: 6px 24px; margin-bottom: 14px; }
.drawer .zl { font-size: 14px; padding-top: 11px; color: var(--dz-ink); }
.drawer .zl.rq { color: var(--zreq); }
.drawer .input, .drawer select.input, .drawer textarea.input {
  background: var(--dz-input); color: var(--dz-ink); border: 1px solid var(--dz-line); border-radius: 6px;
  min-height: 40px; font-size: 14px; font-weight: 400; box-shadow: none;
}
.drawer .input::placeholder { color: var(--dz-ph); }
.drawer .input:focus { border-color: var(--dz-focus); outline: 0; box-shadow: none; }
.drawer .zsec { border-top: 1px solid var(--dz-hd); }
.drawer .zsec-hd b { font-size: 16px; font-weight: 700; color: var(--dz-ink); }
.drawer .znext { border-top-color: var(--dz-line); color: var(--dz-mut); }
.drawer .btn.primary { border-radius: 6px; }
.drawer .btn.ghost { background: var(--dz-bg); color: var(--dz-ink); border: 1px solid var(--dz-line); border-radius: 6px; }
.drawer .icon-btn { background: var(--dz-bg); color: var(--dz-ink); border-color: var(--dz-line); }

/* New order: two columns, label above, one screen */
.drawer.newbox .zsec-hd { display: none; }
.drawer.newbox .zsec { border-top: 0; padding-top: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.drawer.newbox #newForm .zrow { grid-template-columns: 1fr; gap: 4px; margin-bottom: 0; }
.drawer.newbox #newForm .zl { padding-top: 0; font-size: 13px; }
.drawer.newbox #newForm .zl:empty { display: none; }
.drawer.newbox #newForm .zv { max-width: none; }
.drawer.newbox #newForm #nfFields { display: contents; }
.drawer.newbox #newForm .zsec > .err, .drawer.newbox #newForm .zact { grid-column: 1 / -1; }
.drawer.newbox #newForm .znext { margin: 8px 0 0; padding-top: 10px; }

@media (max-width: 640px) {
  .drawer { inset: 0; width: 100vw; height: 100dvh; max-height: none; border-radius: 0; margin: 0; }
  .drawer .dr-hd, .drawer .dr-body { padding-left: 16px; padding-right: 16px; }
  .drawer .zrow, .drawer #newForm .zrow { grid-template-columns: 1fr; }
  .drawer.newbox .zsec { grid-template-columns: 1fr; }
  .drawer .input, .drawer select.input { font-size: 16px; min-height: 48px; }
}

/* opened order: large dialog, Zoho CRM rows (label left, two boxes per line) */
.drawer:not(.newbox) { width: min(1120px, calc(100vw - 32px)); height: calc(100dvh - 32px); }
.drawer:not(.newbox) .dr-body { flex: 1; padding: 8px 32px 24px; }
.drawer:not(.newbox) .zsec { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: start; }
.drawer:not(.newbox) .zsec > .zsec-hd, .drawer:not(.newbox) .zsec > .zact, .drawer:not(.newbox) .zsec > .zwait,
.drawer:not(.newbox) .zsec > .err, .drawer:not(.newbox) .zsec > :not(.zrow) { grid-column: 1 / -1; }
.drawer:not(.newbox) .zrow { grid-template-columns: 150px minmax(0, 1fr); gap: 6px 16px; margin-bottom: 12px; }
.drawer:not(.newbox) .zl { text-align: right; }
.drawer:not(.newbox) .zl:empty { display: block; }
.drawer:not(.newbox) .zrow:has(.check) { grid-column: 1 / -1; }
.drawer:not(.newbox) .zrow.zact { grid-template-columns: 150px 1fr; }
@media (max-width: 900px) {
  .drawer:not(.newbox) .zsec { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .drawer:not(.newbox) { width: 100vw; height: 100dvh; }
  .drawer:not(.newbox) .dr-body { padding: 8px 16px 20px; }
  .drawer:not(.newbox) .zrow, .drawer:not(.newbox) .zrow.zact { grid-template-columns: 1fr; }
  .drawer:not(.newbox) .zl { text-align: left; }
}

/* New order: same Zoho CRM rows as the opened order (label left, two boxes per line) */
.drawer.newbox { width: min(1000px, calc(100vw - 32px)); }
.drawer.newbox .dr-body { padding: 12px 32px 22px; }
.drawer.newbox .zsec { column-gap: 40px; row-gap: 0; align-items: start; }
.drawer.newbox #newForm .zrow { grid-template-columns: 150px minmax(0, 1fr); gap: 6px 16px; margin-bottom: 14px; }
.drawer.newbox #newForm .zl { text-align: right; font-size: 14px; padding-top: 11px; }
.drawer.newbox #newForm .zl:empty { display: block; }
.drawer.newbox #newForm .zact { grid-template-columns: 150px 1fr; margin-bottom: 0; }
@media (max-width: 900px) { .drawer.newbox .zsec { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .drawer.newbox { width: 100vw; }
  .drawer.newbox .dr-body { padding: 8px 16px 20px; }
  .drawer.newbox #newForm .zrow, .drawer.newbox #newForm .zact { grid-template-columns: 1fr; }
  .drawer.newbox #newForm .zl { text-align: left; padding-top: 0; }
}

/* side menu follows the theme: white in light, black in dark (green pill stays) */
html[data-theme="paper"] {
  --zside: #FFFFFF; --zside-ink: #1F2328; --zside-mut: #6B7280; --zside-hover: rgba(0,0,0,.06);
}
html[data-theme="paper"] .shell.zoho .side { border-right: 1px solid #E5E7EB; }
html[data-theme="paper"] .shell.zoho .nav a:hover, html[data-theme="paper"] .shell.zoho .subnav a:hover { color: #1F2328; }
html[data-theme="paper"] .shell.zoho .subnav { border-left-color: #D9DCE1; }
html[data-theme="paper"] .shell.zoho .subnav a.on { background: rgba(0,0,0,.07); color: #1F2328; }
html[data-theme="paper"] .shell.zoho .subnav a.on .c { color: #1F2328; }
html[data-theme="paper"] .shell.zoho .nav a.on, html[data-theme="paper"] .shell.zoho .nav a.on svg, html[data-theme="paper"] .shell.zoho .nav a.on .zchev { color: #fff !important; }
html[data-theme="paper"] .shell.zoho .side .subnav a.on { background: rgba(0,0,0,.07) !important; color: #1F2328 !important; }
html[data-theme="paper"] .shell.zoho .side .subnav a.on .c { color: #1F2328 !important; }
html[data-theme="paper"] .shell.zoho .side .subnav a { color: #4B5563; }

/* pipeline cards: numbers never break; the status pill drops to its own line if it does not fit */
.tile .f { flex-wrap: wrap; row-gap: 6px; }
.tile .f .num { white-space: nowrap; }
.tile .f .pill { white-space: nowrap; }

/* phone: tap targets at least 48px tall */
@media (max-width: 640px) {
  .icon-btn { min-width: 48px; min-height: 48px; }
  .ztitle { min-height: 48px; }
  select.input, .input { min-height: 48px; }
  .mic { min-width: 44px; min-height: 44px; }
}

/* automatic fields (work order no., received date): shown, but not typed */
.drawer input[readonly][tabindex="-1"] { opacity: .75; cursor: not-allowed; background: var(--card2); }
.drawer input[type="date"][readonly] { pointer-events: none; }


/* quotation upload: product lines, one per row, X to remove */
.qbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.qbar .btn { min-height: 44px; }
.qlines { grid-column: 1 / -1; border: 1px solid var(--dz-line); border-radius: 10px; padding: 12px; margin-bottom: 6px; }
.qlines[hidden] { display: none; }
.qhd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.qhd b { font-size: 15px; }
.qline { display: grid; grid-template-columns: minmax(0, 1fr) 150px 80px 130px 44px; gap: 8px; align-items: center; margin-bottom: 8px; }
.qline.qcols { font-size: 12px; color: var(--dz-mut); margin-bottom: 4px; }
.qline .input { width: 100%; min-width: 0; }
.qline .q-x { width: 44px; height: 44px; min-width: 44px; padding: 0; display: grid; place-items: center; }
@media (max-width: 640px) {
  .qline { grid-template-columns: 1fr 1fr 44px; }
  .qline .q-desc { grid-column: 1 / -1; }
  .qline .q-cat { grid-column: 1 / -1; }
  .qline.qcols { display: none; }
}


/* bell, Raw material & Production side by side, indent upload, arrival circle */
.bellbtn { position: relative; }
.bellbtn .bellN { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #CF2B36; color: #fff; font: 700 11px/18px var(--font, inherit); text-align: center; }
.bellbtn .bellN[hidden] { display: none; }
.bellpop { position: fixed; top: 56px; right: 12px; z-index: 90; width: min(380px, calc(100vw - 24px)); max-height: min(70dvh, 560px); display: flex; flex-direction: column; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, .28); padding-bottom: env(safe-area-inset-bottom); }
.bellpop .bp-hd { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.bellpop .bp-list { overflow: auto; }
.bellpop .nit { display: block; padding: 12px 16px; min-height: 48px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.bellpop .nit b { display: block; font-weight: 700; font-size: 14px; }
.bellpop .nit span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.bellpop .nit.new { border-left: 3px solid #CF2B36; }

.zpart { display: block; border-top: 1px solid var(--dz-line); padding-top: 14px; margin-top: 14px; }
.zpart-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.zpart-hd b { font-size: 15px; font-weight: 700; }
.zpart .zn { width: 22px; height: 22px; font-size: 12px; }
.zpart.cur .zn { background: #15803D; border-color: #15803D; color: #fff; }
.zpart.done .zn { background: transparent; border-color: #15803D; color: #15803D; }
.zundo, .zpart-hd .ztog { min-height: 36px; margin-left: auto; }
.zsec-hd .zundo { margin-left: auto; }
.zpart-hd .zundo + .ztog { margin-left: 0; }
.drawer:not(.newbox) .zpart { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: start; }
.drawer:not(.newbox) .zpart > :not(.zrow) { grid-column: 1 / -1; }
.drawer:not(.newbox) .zpart > .zrow:has(.check) { grid-column: 1 / -1; }
@media (max-width: 900px) { .drawer:not(.newbox) .zpart { grid-template-columns: 1fr; } }

.itemsbox { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 20px; align-items: start; border: 1px solid var(--dz-line); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.ihd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.irow { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 6px; border-bottom: 1px solid var(--dz-line); cursor: pointer; }
.irow:last-child { border-bottom: 0; }
.irow input { width: 24px; height: 24px; flex: none; accent-color: #15803D; }
.irow .iname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.irow .iqty { color: var(--dz-mut); white-space: nowrap; }
.irow .iby { font-size: 12px; color: var(--dz-mut); white-space: nowrap; }
.irow.on .iname { text-decoration: line-through; color: var(--dz-mut); }
.idonut { text-align: center; position: sticky; top: 8px; }
.donut { width: 150px; height: 150px; }
.donut .d1 { font-size: 20px; font-weight: 700; fill: var(--dz-ink, currentColor); }
.donut .d2 { font-size: 14px; font-weight: 400; fill: var(--dz-mut, currentColor); }
.idl { margin-top: 4px; font-size: 13px; color: var(--dz-mut); }
@media (max-width: 640px) { .itemsbox { grid-template-columns: 1fr; } .idonut { order: -1; position: static; } }

.indbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.indbar .btn { min-height: 44px; }
.indlink { color: var(--dz-ink); text-decoration: underline; word-break: break-all; }
.indprev { border: 1px solid var(--dz-line); border-radius: 10px; padding: 12px; margin-top: 10px; }
.iline { display: grid; grid-template-columns: minmax(0, 1fr) 90px 80px 44px; gap: 8px; align-items: center; margin-bottom: 8px; }
.iline .input { width: 100%; min-width: 0; }
.iline .icon-btn { width: 44px; height: 44px; min-width: 44px; padding: 0; display: grid; place-items: center; }
.iline.saved { grid-template-columns: minmax(0, 1fr) auto 44px; min-height: 44px; border-bottom: 1px solid var(--dz-line); padding: 0 0 0 2px; margin-bottom: 0; }
.iline.saved .iqty { color: var(--dz-mut); white-space: nowrap; }
.iline.add { grid-template-columns: minmax(0, 1fr) 90px 80px auto; margin-top: 10px; }
.iline.add .btn { min-height: 48px; }
.indgo { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.indgo .btn { min-height: 44px; }
@media (max-width: 640px) {
  .iline { grid-template-columns: 1fr 1fr 44px; }
  .iline > :first-child { grid-column: 1 / -1; }
  .iline.saved { grid-template-columns: minmax(0, 1fr) auto 44px; }
  .iline.saved > :first-child { grid-column: auto; }
  .iline.add { grid-template-columns: 1fr 1fr; }
  .iline.add .btn { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .irow { flex-wrap: wrap; padding: 6px; }
  .irow .iname { flex: 1 1 calc(100% - 40px); min-width: 0; }
  .irow .iqty, .irow .iby { margin-left: 36px; font-size: 13px; }
}

/* items: Purchase ticks Arrived, QC passes or rejects */
.irow { display: grid; grid-template-columns: minmax(0, 1fr) 120px 112px; gap: 4px 12px; align-items: center; min-height: 56px; padding: 6px 6px 6px 8px; border-bottom: 1px solid var(--dz-line); cursor: default; }
.irow.icols { min-height: 0; font-size: 12px; color: var(--dz-mut); padding-bottom: 4px; }
.irow .iname { flex: none; text-decoration: none; color: inherit; overflow-wrap: anywhere; }
.irow .iqty { margin: 0 0 0 6px; color: var(--dz-mut); font-size: 13px; white-space: nowrap; }
.irow.ok { border-left: 3px solid #15803D; }
.irow.bad { border-left: 3px solid #CF2B36; }
.iarr { display: flex; align-items: center; gap: 8px; min-height: 48px; cursor: pointer; }
.iarr input { width: 24px; height: 24px; accent-color: #15803D; }
.iqc { display: flex; gap: 8px; }
.qbtn { width: 48px; height: 48px; border-radius: 10px; border: 1px solid var(--dz-line); background: transparent; color: var(--dz-ink); font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer; }
.qbtn:disabled { opacity: .35; cursor: not-allowed; }
.qbtn.pass.on { background: #15803D; border-color: #15803D; color: #fff; }
.qbtn.rej.on { background: #CF2B36; border-color: #CF2B36; color: #fff; }
.irow .iby, .irow .irem { grid-column: 1 / -1; margin: 0; font-size: 12.5px; color: var(--dz-mut); white-space: normal; }
.irow .irem { color: #E5484D; }
@media (max-width: 640px) {
  .irow { grid-template-columns: minmax(0, 1fr) auto; }
  .irow.icols { display: none; }
  .irow .iname { grid-column: 1 / -1; }
  .irow .iqty, .irow .iby { margin-left: 0; }
  .irow .iqty { margin-left: 6px; }
}

.indrow.invalid { outline: 1px solid #CF2B36; outline-offset: 6px; border-radius: 10px; }


/* live pop-ups and the My tasks "new for you" list */
.toast.note { border-left: 4px solid #CF2B36; }
.toast .nlink { display: block; color: inherit; text-decoration: none; min-height: 44px; }
.toast .nlink b { display: block; font-weight: 700; }
.toast .nlink span { display: block; margin-top: 2px; font-size: 12.5px; opacity: .75; }
.li.nfy.new { border-left: 3px solid #CF2B36; padding-left: 12px; }

.hero-ring .ring-n { text-align: center; margin-top: 8px; font-size: 13px; color: var(--muted); }

/* Purchase and Production are separate cards */
.zsec > .zpart { border-top: 0; margin-top: 0; padding-top: 0; }
.drawer:not(.newbox) .zsec > .zpart { grid-column: 1 / -1; }

/* small target-and-achieved strip at the top of Overview */
.tstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; margin-top: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.tstrip > div:not(.tbar) { display: flex; align-items: baseline; gap: 8px; }
.tstrip .lbl { font-size: 11px; }
.tstrip b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.tstrip .tbar { flex: 1 1 100%; height: 6px; border-radius: 3px; background: var(--chip); overflow: hidden; }
.tstrip .tbar i { display: block; height: 100%; background: #EF404A; border-radius: 3px; }

/* new message: the bell shakes for a moment (no sound, no pop-up); the red number is the main signal */
@keyframes bellShake { 0%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-12deg); } 30% { transform: rotate(10deg); } 40% { transform: rotate(-8deg); } 50% { transform: rotate(5deg); } 60% { transform: rotate(0); } }
@keyframes bellDot { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.bellbtn.ring svg { transform-origin: 50% 10%; animation: bellShake 1.4s ease-in-out 2; }
.bellbtn.ring .bellN { animation: bellDot 1.4s ease-in-out 2; }
@media (prefers-reduced-motion: reduce) { .bellbtn.ring svg, .bellbtn.ring .bellN { animation: none; } }

/* Items to buy: saved list, then big typing boxes (name on its own line, quantity and unit side by side) */
.isaved { border: 1px solid var(--dz-line); border-radius: 10px; padding: 4px 10px; margin-bottom: 14px; }
.addbox { border: 1px solid var(--dz-line); border-radius: 12px; padding: 16px; }
.addtitle { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.addgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; }
.addgrid .af { display: grid; gap: 6px; min-width: 0; }
.addgrid .af-name { grid-column: 1 / -1; }
.addgrid label { font-size: 13px; color: var(--dz-mut); }
.addgrid .input { width: 100%; min-height: 52px; height: 52px; font-size: 17px; padding-left: 14px; box-sizing: border-box; }
.addgrid .micwrap { display: block; width: 100%; }
.addgrid .addbtn { grid-column: 1 / -1; min-height: 52px; font-size: 16px; }


/* My tasks: a count tile per step, then one card per step with clean rows */
.ttiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.ttile { display: grid; gap: 2px; text-align: left; padding: 12px 14px; min-height: 84px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; font: inherit; }
button.ttile:hover { border-color: var(--muted); }
.ttile .lbl { font-size: 11px; }
.ttile b { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.ttile .muted { font-size: 12px; }
.ttile.all { background: transparent; border-style: dashed; cursor: default; }
.tcard { margin-bottom: 14px; padding: 0; overflow: hidden; scroll-margin-top: 72px; }
.thd { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.thd h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.thd p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.tnum { min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 10px; background: #CF2B36; color: #fff; font-weight: 700; font-size: 15px; }
.trow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) auto; gap: 8px 16px; align-items: center; min-height: 68px; padding: 10px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--card2); }
.trow.late { border-left-color: #CF2B36; }
.tt1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tt1 b { font-weight: 700; font-size: 15px; }
.tt2 { margin-top: 2px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.tmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); align-items: center; }
.tmeta .down { color: #E5484D; font-weight: 700; }
.ptag { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--ink); }
.tend { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.tgo { font-size: 22px; color: var(--muted); line-height: 1; }
.tnew { padding: 1px 8px; border-radius: 999px; background: #CF2B36; color: #fff; font-size: 11px; font-weight: 700; }
.tnews { margin-bottom: 14px; }
.tclear { display: grid; gap: 4px; justify-items: center; padding: 36px 16px; text-align: center; }
.tclear b { font-size: 18px; font-weight: 700; }
@media (max-width: 760px) {
  .ttiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trow { grid-template-columns: minmax(0, 1fr) auto; }
  .trow .tmeta { grid-column: 1 / -1; order: 3; }
  .trow .tmain { grid-column: 1; }
  .trow .tend { grid-column: 2; grid-row: 1; }
}

/* phone: search mic and the Activity filter are full-size tap targets */
@media (max-width: 640px) {
  .lsearch .mic { width: 44px !important; height: 44px !important; min-height: 44px !important; right: 2px !important; }
  .lsearch .input, .lsearch input { min-height: 48px !important; height: 48px !important; }
  select[data-act="auditwho"] { height: 48px !important; min-height: 48px !important; }
}

/* phone: Show/Hide and the note box meet the 44-48px rule */
@media (max-width: 640px) {
  .ztog, .zpart-hd .ztog, .zundo { min-height: 44px !important; padding-left: 14px; padding-right: 14px; display: inline-flex; align-items: center; justify-content: center; }
  .zsec-hd .ztog, .zpart-hd .ztog { margin-left: auto; }
  .composer textarea { min-height: 48px; }
}

/* ================= Meshro help: button, chat panel, "show me" ring ================= */
.cb-fab { position: fixed; right: calc(20px + env(safe-area-inset-right)); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 45; display: flex; align-items: center; gap: 8px; padding: 3px 16px 3px 3px; min-height: 56px; border-radius: 999px; border: 2px solid #EF404A; background: var(--card); color: var(--ink); font: 700 15px/1 var(--sans); cursor: pointer; }
.cb-fab img { width: 48px; height: 48px; border-radius: 50%; background: #fff; display: block; }
@media (max-width: 860px) {
  .cb-fab { right: calc(12px + env(safe-area-inset-right)); bottom: calc(78px + env(safe-area-inset-bottom)); padding: 2px; min-height: 0; }
  .cb-fab span { display: none; }
  .main { padding-bottom: calc(150px + env(safe-area-inset-bottom)) !important; }
}
.cb { position: fixed; z-index: 75; right: 20px; bottom: 20px; width: min(420px, calc(100vw - 40px)); height: min(680px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
@media (max-width: 860px) { .cb { inset: 0; width: auto; height: auto; border: 0; border-radius: 0; padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); } }
.cb-hd { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--line); background: var(--card); }
.cb-av { width: 40px; height: 40px; border-radius: 50%; background: #fff; flex: none; }
.cb-ttl { flex: 1; min-width: 0; display: grid; }
.cb-ttl b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.cb-ttl span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cb-lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.cb-lang button { min-height: 40px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font: 700 13px var(--sans); cursor: pointer; }
.cb-lang button.on { background: #EF404A; color: #fff; }
.cb-hd .icon-btn { width: 44px; height: 44px; min-width: 44px; flex: none; }
.cb-body { flex: 1; overflow-y: auto; padding: 14px 12px; display: grid; align-content: start; gap: 12px; overscroll-behavior: contain; scroll-padding-top: 8px; }
.cb-msg { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.cb-msg.me { justify-content: flex-end; }
.cb-mini { width: 28px; height: 28px; border-radius: 50%; background: #fff; flex: none; margin-top: 2px; }
.cb-bub { max-width: 90%; min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; }
.cb-msg.bot .cb-bub { border-top-left-radius: 4px; }
.cb-msg.me .cb-bub { background: #EF404A; border-color: #EF404A; color: #fff; border-bottom-right-radius: 4px; }
.cb-bub b { font-weight: 700; }
.cb-bub p { margin: 6px 0 0; }
.cb-bub p:first-child { margin-top: 0; }
.cb-bub ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.cb-lines { display: grid; gap: 4px; margin-top: 8px; }
.cb-note { color: var(--muted); font-size: 13.5px; }
.cb-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cb-tools .btn { min-height: 44px; }
.cb-say.on { border-color: #EF404A !important; color: #EF404A !important; }
.cb-more { margin-top: 12px; }
.cb-more > span { display: block; font-size: 12.5px; color: var(--muted); }
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cb-chip { min-height: 44px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 400 14px/1.3 var(--sans); text-align: left; cursor: pointer; }
.cb-chip:hover { border-color: #EF404A; }
.cb-orders { display: grid; gap: 6px; margin-top: 10px; }
.cb-order { display: grid; gap: 2px; text-align: left; padding: 10px 12px; min-height: 52px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; }
.cb-order span { font-size: 13px; color: var(--muted); }
.cb-order .down { color: #E5484D; font-weight: 700; }
.cb-in { display: flex; gap: 8px; align-items: center; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
.cb-in .input { flex: 1; min-width: 0; min-height: 48px; font-size: 16px; }
.cb-in .mic, .cb-send { position: static !important; width: 48px !important; height: 48px !important; min-width: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.cb-in .mic { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.cb-send { border: 0; background: #EF404A; color: #fff; }
.cb-wait { padding: 8px; }
.dr-help { width: 44px; height: 44px; min-width: 44px; display: grid; place-items: center; padding: 0; margin-right: 6px; }
.dr-help img { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: block; }
.spot { position: fixed; z-index: 96; border: 3px solid #EF404A; border-radius: 14px; pointer-events: none; animation: spotPulse 1.2s ease-in-out 3; }
@keyframes spotPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .spot { animation: none; } }

/* ================= sign-in page: Meshro says hello ================= */
.auth-card .logo { margin-bottom: 14px; }
.auth-hi { display: flex; align-items: flex-end; gap: 10px; margin: 0 0 18px; }
.auth-meshro { width: 106px; height: 160px; flex: none; object-fit: contain; }
.auth-bubble { display: grid; gap: 4px; padding: 12px 14px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; background: var(--card); font-size: 14px; line-height: 1.45; }
.auth-bubble b { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.auth-help { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 8px; width: 100%; min-height: 52px; margin-top: 12px; padding: 6px 12px; border: 1px dashed var(--line); border-radius: 12px; background: transparent; color: var(--ink); font: 400 14px/1.3 var(--sans); cursor: pointer; }
.auth-help b { font-weight: 700; }
.auth-help img { width: 28px; height: 28px; border-radius: 50%; background: #fff; }
.auth-ticks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) {
  .auth-form { padding: calc(18px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); place-items: start center; }
  .auth-card h1 { font-size: 28px; }
}

/* "Delayed" is red everywhere (status colours: On time green, Delayed red, Production ongoing yellow) */
.kpi .d .down, .hero-sub .down { background: var(--bad) !important; color: var(--bad-ink) !important; }

/* phones: greeting first, then the target ring with its count beside it */
@media (max-width: 860px) {
  .hero { flex-direction: column !important; align-items: stretch !important; }
  .hero-ring { display: flex !important; align-items: center; justify-content: flex-start; gap: 14px; margin-top: 18px; }
  .hero-ring svg { width: 96px !important; height: 96px !important; }
  .hero-ring .ring-v { font-size: 21px !important; }
  .hero-ring .ring-c .lbl { font-size: 9px !important; }
  .hero-ring .ring-n { text-align: left; margin-top: 0; font-size: 14px; }
}

/* long lists on phones: the browser skips drawing rows that are off screen until you scroll to them */
@media (max-width: 860px) {
  .cards-m > .tile, .tlist > .trow, .log > .log-it { content-visibility: auto; contain-intrinsic-size: auto 120px; }
}

/* tablets are touch screens too: same 44–48px tap targets as phones */
@media (max-width: 860px) {
  .ztitle { min-height: 44px; }
  .lsearch .mic { width: 44px !important; height: 44px !important; min-height: 44px !important; right: 2px !important; }
  .lsearch .input, .lsearch input { min-height: 48px !important; height: 48px !important; }
  #view input.input, #view select.input { min-height: 48px; }
}

/* ================= Meshro, voice first: one big mic, typing only as a backup ================= */
.cb-fab { padding-right: 18px; }
.cb-fab .cb-fab-mic { position: absolute; left: 34px; bottom: 2px; width: 22px; height: 22px; border-radius: 50%; background: #EF404A; color: #fff; display: grid; place-items: center; border: 2px solid var(--card); }
.cb-fab { position: fixed; }
.cb-fab .cb-fab-l { white-space: nowrap; }
@media (max-width: 860px) { .cb-fab .cb-fab-l { display: none; } .cb-fab { padding: 2px; } .cb-fab .cb-fab-mic { left: auto; right: -4px; bottom: -4px; } }
.cb-avw { position: relative; flex: none; display: grid; }
.cb.talking .cb-avw::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #EF404A; animation: cbTalk 1.1s ease-in-out infinite; }
@keyframes cbTalk { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.12); opacity: .4; } }
.cb-intro { display: flex; gap: 12px; align-items: flex-end; padding: 6px 2px 4px; }
.cb-intro > img { width: 96px; height: auto; flex: none; }
.cb-introt { font-size: 15px; line-height: 1.5; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px 14px 14px 4px; background: var(--card); }
.cb-intro .cb-note { margin: 8px 0 0; }
.cb-voice { border-top: 1px solid var(--line); background: var(--card); padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); display: grid; gap: 6px; }
.cb-heard { min-height: 22px; text-align: center; font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.cb-vrow { display: flex; align-items: center; justify-content: center; gap: 28px; }
.cb-mic { position: relative; width: 76px; height: 76px; border-radius: 50%; border: 0; background: #EF404A; color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.cb-mic::before, .cb-mic::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #EF404A; opacity: 0; pointer-events: none; }
.cb.listening .cb-mic::before { animation: cbRing 1.6s ease-out infinite; }
.cb.listening .cb-mic::after { animation: cbRing 1.6s ease-out .8s infinite; }
@keyframes cbRing { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }
.cb.listening .cb-mic { background: #CF2B36; }
.cb-side { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.cb-side.on { color: var(--ink); border-color: var(--ink); }
.cb-hint { text-align: center; font-size: 13px; color: var(--muted); min-height: 18px; }
.cb-voice .cb-in { padding: 6px 0 0; border-top: 0; background: transparent; }
.cb-in[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .cb.listening .cb-mic::before, .cb.listening .cb-mic::after, .cb.talking .cb-avw::after { animation: none; opacity: .6; } }

/* Final QC: ✓ / ✗ boxes, remarks, and every check listed */
.drawer:not(.newbox) .zsec > .fqc-hist, .drawer:not(.newbox) .zsec > .fqc-now { grid-column: 1 / -1; }
.fqc-hist { display: grid; gap: 8px; margin: 4px 0 12px; }
.fqc-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--dz-line); border-radius: 10px; font-size: 14px; }
.fqc-line.ok { border-left: 3px solid #15803D; }
.fqc-line.bad { border-left: 3px solid #CF2B36; }
.fqc-mark { font-weight: 700; font-size: 18px; line-height: 1.2; }
.fqc-line.ok .fqc-mark { color: #15803D; }
.fqc-line.bad .fqc-mark { color: #E5484D; }
.fqc-rem { color: var(--dz-mut); margin-top: 2px; }
.fqc-now { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px; border: 1px solid var(--dz-line); border-radius: 12px; margin: 4px 0 12px; }
.fqc-q { display: grid; gap: 4px; max-width: 520px; }
.fqc-btns { display: flex; align-items: center; gap: 8px; }
.fqc-btns span { font-size: 14px; margin-right: 10px; }
.fqc-btn { width: 56px !important; height: 56px !important; font-size: 24px !important; }
.fqc-back { padding: 10px 12px; border: 1px solid #CF2B36; border-left-width: 3px; border-radius: 10px; margin-bottom: 12px; font-size: 14px; }
.fqc-back b { color: #E5484D; }

/* indent photo: check screen */
.isup { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.irv-wrap { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.6); display: flex; justify-content: center; align-items: stretch; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.irv { background: var(--bg2, #141518); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; width: min(760px, 100%); display: flex; flex-direction: column; max-height: 100%; overflow: hidden; }
.irv-hd { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.irv-hd h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.01em; }
.irv-hd p { margin: 0; font-size: 14px; }
.irv-warnt { color: #e0a800; }
.irv-body { overflow-y: auto; padding: 12px 18px; -webkit-overflow-scrolling: touch; }
.irv-alert { border: 1px solid #c62828; background: rgba(198,40,40,.12); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.irv-top { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.irv-top label, .irv-f label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); }
.irv-top .input, .irv-f .input { font-size: 16px; min-height: 44px; width: 100%; min-width: 0; }
.irv-meta { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); }
.irv-meta a { color: var(--ink); text-decoration: underline; display: inline-block; padding: 6px 0; }
.irv-row { display: grid; grid-template-columns: 58px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.irv-row.chk .irv-main { border-left: 3px solid #e0a800; padding-left: 10px; }
.irv-row.off { opacity: .45; }
.irv-n { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.irv-n .check { min-height: 44px; display: flex; align-items: center; gap: 6px; }
.irv-flag { font-size: 11px; font-weight: 700; color: #1a1300; background: #e0a800; border-radius: 99px; padding: 2px 8px; align-self: flex-start; }
.irv-img { background-color: #fff; background-repeat: no-repeat; border-radius: 6px; border: 1px solid var(--line); max-width: 100%; margin-bottom: 8px; }
.irv-main { min-width: 0; }
.irv-f { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
.irv-f .irv-name { grid-column: 1 / -1; }
.irv-why { font-size: 12.5px; color: #e0a800; margin-top: 6px; }
.irv-ft { display: flex; gap: 10px; padding: 12px 18px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.irv-ft .btn { min-height: 48px; }

@media (max-width: 640px) { .irv-wrap { padding: 0; } .irv { border-radius: 0; border: 0; } .irv-top { grid-template-columns: 1fr; } .irv-row { grid-template-columns: 44px 1fr; } }

.irv-repl { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.irv-repl input { margin-top: 3px; }
.irv-repl input { accent-color: #EF404A; width: 20px; height: 20px; }

/* HMI Shop items (store entry by the HMI Shop team) */
.ishop-hd { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 14px 0 6px; margin-top: 6px; border-top: 2px solid var(--line); }
.ishop-hd b { font-size: 14px; }
.ishop-hd .muted { font-size: 12.5px; }
.sentry { min-height: 44px; padding: 0 14px; white-space: nowrap; }
.sentry.on { border-color: var(--ok, #1f9d55); color: var(--ok, #1f9d55); }

/* HMI Shop: its own small screen */
.shopshell { min-height: 100dvh; background: var(--bg); }
.shoptop { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); min-height: 56px; background: var(--bg2, #111); border-bottom: 1px solid var(--line); }
.shoptop .brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.shoptop .brand b { display: block; letter-spacing: .3em; font-size: 13px; }
.shoptop .brand small { display: block; letter-spacing: .25em; font-size: 9.5px; color: var(--red, #EF404A); font-weight: 700; }
.shoptop-r { display: flex; gap: 6px; }
.shopmain { max-width: 760px; margin: 0 auto; padding: 18px 16px 120px; }
.brand img.brandlogo, .brandlogo { display: block; flex: none; width: auto; max-width: 100%; }
.brandtag { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #EF404A; border: 1px solid currentColor; border-radius: 6px; padding: 2px 6px; margin-left: 8px; align-self: center; }
.sh-tabs { display: flex; gap: 8px; margin: 4px 0 14px; }
.sh-stats { padding: 16px; margin-bottom: 12px; display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
.sh-kpis { display: flex; gap: 24px; flex-wrap: wrap; }
.sh-kpis > div { display: flex; flex-direction: column; gap: 2px; min-width: 96px; }
.sh-kpis b { font-size: 28px; letter-spacing: -.02em; line-height: 1.1; }
.sh-kpis span, .sh-kpis small { font-size: 13px; }
.sh-days { display: flex; gap: 8px; align-items: flex-end; }
.sh-day { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; min-width: 32px; }
.sh-day i { display: block; width: 18px; border-radius: 4px; background: #EF404A; }
.sh-day .n { font-weight: 700; }
@media (max-width: 480px) { .sh-days { width: 100%; justify-content: space-between; } }
.sh-tabs button { flex: 1; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.sh-tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sh-tabs .c { font-weight: 400; opacity: .75; margin-left: 4px; }
.sh-card { padding: 14px 16px; margin-bottom: 12px; }
.sh-hd { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.sh-hd b { font-size: 17px; }
.sh-hd span { color: var(--muted); font-size: 14px; }
.sh-sub { color: var(--muted); font-size: 13.5px; margin: 2px 0 6px; }
.sh-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); }
.sh-row.rej { border-left: 3px solid var(--bad, #c62828); padding-left: 10px; }
.sh-main { min-width: 0; }
.sh-name { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.sh-qty { color: var(--muted); font-size: 14px; margin-top: 2px; }
.sh-qty b { color: var(--ink); font-size: 16px; }
.sh-st { font-size: 13px; color: var(--muted); margin-top: 4px; }
.sh-st.ok { color: var(--ok, #1f9d55); }
.sh-st.bad { color: var(--bad, #e04b4b); }
.sh-btn { min-height: 48px; padding: 0 18px; white-space: nowrap; flex: none; }
.sh-undo { min-height: 44px; }
.sh-empty { padding: 22px 18px; color: var(--muted); }
@media (max-width: 480px) { .sh-row { flex-wrap: wrap; } .sh-btn:not(.sh-undo) { width: 100%; } }

.sh-do { display: flex; gap: 8px; align-items: flex-end; flex: none; }
.sh-ready { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.sh-qin { width: 84px; min-height: 48px; font-size: 18px; font-weight: 700; text-align: center; }
.sh-row.bal { border-left: 3px solid var(--warn, #e0a800); padding-left: 10px; }
.sh-bal { color: var(--warn, #e0a800); }
@media (max-width: 480px) { .sh-do { width: 100%; } .sh-do .sh-btn { flex: 1; } }

/* Purchase: part arrival (Qty arrived) */
.iarr-q { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.iqlab { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); }
.iqin { width: 72px; min-height: 44px; font-size: 16px; font-weight: 700; text-align: center; padding: 4px 6px; }
.iarrl { display: flex; align-items: center; gap: 6px; min-height: 44px; }
.ibal { display: block; font-size: 12.5px; color: var(--warn, #e0a800); font-weight: 700; margin-top: 2px; }
.irow.ibalrow { box-shadow: inset 3px 0 0 var(--warn, #e0a800); }

/* the Qty arrived box is not a tick box: give it room */
.irow .iqin { width: 72px; height: auto; min-height: 44px; accent-color: auto; }
@media (min-width: 641px) { .irow { grid-template-columns: minmax(0, 1fr) minmax(120px, auto) 112px; } }
.iarr-q { flex-wrap: nowrap; }
@media (max-width: 640px) { .iarr-q { flex-wrap: wrap; } }

/* Production: three stage ticks + Completed */
.psteps { display: grid; gap: 6px; margin: 6px 0 4px; }
.pstep { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; flex-wrap: wrap; }
.pstep input[type=checkbox] { width: 26px; height: 26px; accent-color: #15803D; flex: none; }
.pstep.on { border-color: #15803D; background: rgba(21,128,61,.08); }
.pst-n { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line); flex: none; }
.pstep.on .pst-n { background: #15803D; border-color: #15803D; color: #fff; }
.pst-l { font-weight: 700; font-size: 15px; }
.pst-by { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.pstep.on .pst-by { color: #3fbf75; }
.pfin { cursor: default; }
.pmot { cursor: default; }
.pskiprow { cursor: default; }
.pskiprow .pskip { min-height: 44px; margin-left: auto; }
.pskiprow .pskip.on { background: rgba(239,64,74,.14); border-color: #EF404A; color: #EF404A; }
.pstep.skip { border-color: var(--line); background: transparent; opacity: .85; }
.pstep.skip .pst-l { text-decoration: line-through; color: var(--muted); }
.pstep.skip .pst-n { background: var(--chip); }
.pstep.skip .pst-by { color: var(--muted); }
.pskiprow .pst-by { flex-basis: 100%; padding-left: 76px; }
.pskiprow .pst-by:empty { display: none; }
.pmlab .rqt { color: #EF404A; }
.pmlab .pmotor { width: min(260px, 100%); }
.pfin-l { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.pqlab { margin-left: 8px; }
.pqin { width: 84px; }
@media (max-width: 640px) { .pst-by { margin-left: 64px; width: 100%; } .pqlab { margin-left: 64px; } }
.pst-by.pwait { color: var(--warn, #e0a800); font-weight: 700; }

/* required label: red only while the box is empty */
.zrow.filled .zl.rq, .drawer .zrow.filled .zl.rq { color: inherit; }

/* Meshro chat: small Meshro beside the hello, questions full width (no squeezed column) */
.cb-intro { display: grid; gap: 10px; padding: 4px 0; align-items: start; }
.cb-introtop { display: flex; gap: 10px; align-items: flex-end; }
.cb-introtop > img { width: 64px; height: auto; flex: none; }
.cb-introtop .cb-introt { flex: 1; min-width: 0; }
.cb-intro .cb-note { margin: 2px 0 0; }
.cb-intro .cb-chips { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 0; }
.cb-intro .cb-chip { width: 100%; border-radius: 12px; padding: 12px 14px; min-height: 48px; font-size: 15px; background: var(--card); }
@media (min-width: 520px) { .cb-intro .cb-chips { grid-template-columns: 1fr 1fr; } }
/* lighter voice bar: more room for answers */
.cb-voice { padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); gap: 4px; }
.cb-mic { width: 64px; height: 64px; }
.cb-vrow { gap: 24px; }
.cb-heard:empty { min-height: 0; }

/* Ask about the factory (Analytics) */
.ai-card { margin-bottom: 16px; }
.ai-form { display: flex; gap: 8px; align-items: stretch; }
.ai-form .input { flex: 1; min-width: 0; font-size: 16px; min-height: 48px; }
.ai-form .btn { min-height: 48px; padding: 0 20px; }
.ai-ex { margin-top: 10px; }
.ai-ans { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.ai-ans.err { color: var(--bad); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ai-txt { margin: 0 0 8px; font-weight: 700; font-size: 15.5px; line-height: 1.45; }
.ai-tbl { overflow-x: auto; max-height: 360px; overflow-y: auto; }
.cb-msg .ai-ans { margin-top: 0; padding: 0; border: 0; background: none; }
.cb-msg .ai-ans { min-width: 0; max-width: 100%; }
.cb-msg .ai-tbl { max-width: min(100%, calc(100vw - 96px)); max-height: 260px; border: 1px solid var(--line); border-radius: 10px; }
.cb-msg .ai-tbl .mini-tbl td, .cb-msg .ai-tbl .mini-tbl th { padding: 6px 8px; font-size: 13px; white-space: nowrap; }


/* new order form: quotation no. + product lines (+ to add), access table, delete requests */
.qhd { justify-content: space-between; align-items: flex-end; }
.qno { display: grid; gap: 4px; flex: 1 1 240px; max-width: 360px; font-size: 13px; color: var(--dz-mut, var(--muted)); }
.qno .input { font-size: 16px; }
.qadd { min-height: 48px; gap: 6px; margin-left: auto; }
.qline .input { font-size: 16px; min-height: 48px; }
.qline .q-x:disabled { opacity: .35; cursor: default; }
.qnote { margin: 4px 0 0; font-size: 13px; }
.qnote:empty { display: none; }
@media (max-width: 640px) {
  .qhd { align-items: stretch; }
  .qno { max-width: none; }
  .qadd { width: 100%; justify-content: center; margin-left: 0; }
  .qline { padding-bottom: 10px; border-bottom: 1px dashed var(--dz-line, var(--line)); }
}
.acc-tbl { display: grid; gap: 2px; margin-top: 8px; }
.acc-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 96px; align-items: center; min-height: 48px; border-bottom: 1px solid var(--line); }
.acc-hd { min-height: 32px; font-size: 12px; color: var(--muted); }
.acc-hd span:not(:first-child), .acc-c { text-align: center; }
.acc-c { display: grid; place-items: center; min-height: 48px; cursor: pointer; }
.acc-c input { width: 22px; height: 22px; }
.delreq { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line); }
.delreq .dr-txt { flex: 1 1 260px; min-width: 0; font-size: 14px; }
.delreq .dr-txt .muted { font-size: 13px; margin-top: 4px; }
.delreq .dr-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.delreq .btn { min-height: 44px; }
.deldone { margin-top: 12px; }
.deldone summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 700; }
/* product lines: on the PC "+ Add product" sits at the top right; on a phone it comes after the last line */
.qlines { display: flex; flex-direction: column; }
@media (max-width: 640px) {
  .qlines .qhd { display: contents; }
  .qlines .qno { order: 0; margin-bottom: 10px; flex: none; }
  .qlines .qadd { flex: none; }
  .qlines .qcols { order: 1; }
  .qlines #qrows { order: 2; }
  .qlines .qadd { order: 3; margin-top: 4px; }
  .qlines .qnote { order: 4; }
}

/* Meshro: waiting for Claude */
.cb-wait p { opacity: .75; animation: cbwait 1.2s ease-in-out infinite; }
@keyframes cbwait { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .cb-wait p { animation: none; } }

/* Where you're logged in */
#devCard .hd { gap: 12px; flex-wrap: wrap; }
#devCard .hd .btn { min-height: 44px; }
.dev-tbl { display: grid; }
.dev-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, .9fr) minmax(0, .9fr) 96px; gap: 10px; align-items: center; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.dev-hd { min-height: 34px; font-size: 12px; color: var(--muted); }
.dev-row span[role=cell]:not(.dev-name) { color: var(--muted); }
.dev-name { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.dev-cur { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(59, 130, 246, .18); color: #7fb0ff; }
.dev-act { text-align: right; }
.dev-act .btn { min-height: 44px; }
@media (max-width: 640px) {
  .dev-hd { display: none; }
  .dev-row { grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 0; }
  .dev-row .dev-name { grid-column: 1; }
  .dev-row .dev-act { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
  .dev-row span[data-l]::before { content: attr(data-l) ': '; }
  .dev-row span[data-l] { grid-column: 1; font-size: 13px; }
}
#devCard { grid-column: 1 / -1; }

/* home: leave notice + "Your work" */
.leavecard { margin-top: 14px; }
.leavecard .hd .btn, .lv-btns .btn { min-height: 44px; }
.lv-row { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.lv-row .muted { font-size: 13px; margin-top: 4px; }
.lv-txt { flex: 1 1 260px; min-width: 0; }
.lv-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.lv-me { border-left: 3px solid #3b82f6; padding-left: 12px; }
.lv-warn { border-left: 3px solid var(--bad, #EF404A); padding-left: 12px; }
.lv-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lv-work { font-size: 13px; }
.mw-hd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 22px 0 10px; }
.mw-hd h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.mw-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.mw-card .hd { margin-bottom: 6px; }
.mw-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.mw-big b { font-size: 30px; line-height: 1.1; letter-spacing: -.02em; }
.mw-big span { color: var(--muted); font-size: 14px; }
.mw-ins { margin: 8px 0 6px; font-size: 14px; line-height: 1.5; }
.mw-list .li { min-height: 48px; }
.mw-more { margin-top: 6px; min-height: 40px; }
.mw-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.mw-step { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); min-height: 48px; font-size: 13px; }
.mw-step b { font-size: 20px; }
@media (max-width: 640px) { .mw-grid { grid-template-columns: 1fr; } .lv-dates { grid-template-columns: 1fr; } }

/* QC rejects: history, explanation, re-approval */
.rj { margin-top: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: 13.5px; line-height: 1.5; grid-column: 1 / -1; }
.rj.open { border-color: rgba(239, 64, 74, .55); background: rgba(239, 64, 74, .08); }
.rj-ex { margin-top: 6px; }
.rj-wait { margin-top: 6px; color: var(--bad, #EF404A); font-weight: 700; }
.rj-ok { margin-top: 6px; color: var(--ok, #22c55e); font-weight: 700; }
.rj-btn { margin-top: 8px; min-height: 44px; }
.rj-type { border: 0; padding: 0; margin: 0 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rj-type legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.rj-opt { display: flex; gap: 10px; align-items: center; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.rj-opt input { width: 20px; height: 20px; }
.rj-opt small { display: block; color: var(--muted); font-size: 12px; }
.rj-opt:has(input:checked) { border-color: #EF404A; background: rgba(239, 64, 74, .08); }
/* delay reasons */
.dly { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 14px; }
.dly.late { border-color: rgba(239, 64, 74, .55); }
.dly-hd { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 6px; }
.dly-hd .btn { min-height: 44px; }
.dly-r { margin-top: 4px; }
/* answers needed */
.ansstrip { margin-top: 14px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-color: rgba(239, 64, 74, .55); }
.ansstrip > div { display: grid; gap: 2px; }
.ansstrip .btn { min-height: 48px; }
.ans-list { display: grid; gap: 12px; max-height: min(60dvh, 560px); overflow: auto; margin: 6px 0; }
.ans-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ans-row .ans-t { grid-column: 1 / -1; font-size: 14px; }
.ans-row .ans-t .muted { font-size: 13px; margin-top: 2px; }
.ans-row .input { font-size: 16px; min-height: 48px; }
.ans-row[data-kind=dly] { grid-template-columns: minmax(0, 1fr) auto; }
.ans-row .btn { min-height: 48px; }
.ans-done { grid-column: 1 / -1; color: var(--ok, #22c55e); font-weight: 700; }
@media (max-width: 640px) { .ans-row, .ans-row[data-kind=dly] { grid-template-columns: 1fr; } .rj-type { grid-template-columns: 1fr; } }

.rjc { grid-column: 1 / -1; margin-top: 6px; font-size: 13px; line-height: 1.5; }
.rjc b { color: var(--bad, #EF404A); }

/* indent: made in the dashboard */
.indcreate { min-height: 48px; gap: 6px; }
.indsum { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.indsum > div:first-child { display: grid; gap: 2px; }
.indbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.indbtns .btn { min-height: 44px; }
.ispec { color: var(--muted); font-weight: 400; }
.modal .box:has(.indmodal) { width: min(1040px, calc(100vw - 24px)); max-width: none; }
.indmodal .ind-head { display: grid; grid-template-columns: 160px 180px minmax(0, 1fr); gap: 10px; }
.indmodal .ind-wide { grid-column: 3; }
.indmodal .ind-head .field:nth-child(4) { grid-column: 1 / 3; }
.indmodal .ind-ro { min-height: 44px; display: flex; align-items: center; padding: 0 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 15px; }
.indmodal .input { font-size: 16px; min-height: 46px; }
/* indent form items: one card per item. Line 1: Item | Qty | Price | x. Line 2: Description | Brand | Supplier */
.ind-items-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 18px 0 8px; }
.ind-items-h b { font-size: 15px; }
.ind-items-h .muted { font-size: 13px; }
.ind-row { display: grid; grid-template-columns: 30px minmax(0, 1.25fr) minmax(0, .9fr) 92px 118px 44px;
  grid-template-areas: "sno name name qty price x" "sno spec brand sup sup ."; gap: 8px 8px; align-items: end;
  padding: 10px 10px 12px 6px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; }
.ind-row .ind-sno { grid-area: sno; align-self: start; padding-top: 30px; text-align: center; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ind-f { display: grid; gap: 4px; min-width: 0; margin: 0; }
.ind-l { font-size: 12px; color: var(--muted); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ind-f.f-name { grid-area: name; } .ind-f.f-qty { grid-area: qty; } .ind-f.f-price { grid-area: price; }
.ind-f.f-spec { grid-area: spec; } .ind-f.f-brand { grid-area: brand; } .ind-f.f-sup { grid-area: sup; }
.ind-row .ind-x { grid-area: x; width: 44px; height: 46px; }
.ind-x:disabled { opacity: .35; }
.ind-row .input { min-width: 0; width: 100%; }
.ind-row .input::placeholder { color: var(--muted); opacity: .7; }
.ind-add { min-height: 48px; margin-top: 2px; gap: 6px; }
#indRows { max-height: min(52dvh, 560px); overflow: auto; overflow-x: hidden; padding-right: 2px; }
@media (max-width: 760px) {
  .indmodal .ind-head { grid-template-columns: 1fr 1fr; }
  .indmodal .ind-wide, .indmodal .ind-head .field:nth-child(4), .indmodal .ind-head .field:nth-child(5) { grid-column: 1 / -1; }
  .ind-row { grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) 44px;
    grid-template-areas: "sno name name x" "sno qty price price" "sno spec spec spec" "sno brand sup sup"; padding: 10px 8px 12px 4px; }
  #indRows { max-height: none; }
}
/* logins that don't see prices: no Price box, Qty takes its place */
#indRows.noprice .ind-row { grid-template-areas: "sno name name qty qty x" "sno spec brand sup sup ."; }
@media (max-width: 760px) { #indRows.noprice .ind-row { grid-template-areas: "sno name name x" "sno qty qty qty" "sno spec spec spec" "sno brand sup sup"; } }
.ind-amt { font-size: 12.5px; color: var(--muted); min-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ind-total { text-align: right; margin: 4px 4px 10px; font-size: 15px; }
.ind-total b { font-size: 17px; }
/* the pick list that opens under Item / Brand / Supplier */
.ind-pop { position: fixed; z-index: 90; overflow: auto; overscroll-behavior: contain; background: var(--card2); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.35); padding: 4px; }
[data-theme="paper"] .ind-pop { background: #FBFAF7; }
.ind-opt { display: grid; gap: 2px; min-height: 48px; align-content: center; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.ind-opt b { font-weight: 700; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.ind-opt small { font-size: 13px; color: var(--muted); }
.ind-opt.on, .ind-opt:hover { background: color-mix(in srgb, #EF404A 14%, transparent); }
.ind-note { padding: 10px 12px; font-size: 13px; color: var(--muted); }

/* built-in sign-in CAPTCHA */
.capbox { display: grid; gap: 8px; margin: 4px 0 12px; }
.capbox label { font-size: 13px; color: var(--muted); }
.caprow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.caprow img { border-radius: 8px; max-width: 100%; height: auto; }
.caprow .btn { min-height: 44px; }
.capbox .input { font-size: 20px; letter-spacing: .3em; text-align: center; max-width: 220px; }

/* access per product */
.acc-per { margin: 4px 0 10px; }
.acc-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.acc-cats .chip { min-height: 44px; }
.acc-note { font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* purchase cost vs sales */
.mgn { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 14px; margin: 0 0 14px; border: 1px solid var(--line); border-radius: 12px; }
.mgn > div { display: grid; gap: 2px; }
.mgn b { font-size: 17px; }
.mgn small { font-weight: 400; color: var(--muted); }
.mgn p { grid-column: 1 / -1; margin: 0; font-size: 13px; }
.mgn.neg { border-color: rgba(239, 64, 74, .6); }
.mg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.mg-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.mg-row { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 14px; }
@media (max-width: 640px) { .mgn { grid-template-columns: 1fr 1fr; } }

/* Vendors page */
.vd-search { padding: 10px 12px; }
.vd-search .lsearch { width: 100%; max-width: none; }
.vd-search .input { font-size: 16px; min-height: 48px; }
.vd-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; }
.vd-card { text-align: left; display: grid; gap: 8px; padding: 14px; min-height: 48px; cursor: pointer; color: var(--ink); font: inherit; }
.vd-card.idle { opacity: .6; }
.vd-name { font-weight: 700; font-size: 15px; }
.vd-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.vd-chips .chip.bad { border-color: rgba(239, 64, 74, .6); color: #ff8a91; }
.vd-chips .chip.warn { border-color: rgba(234, 179, 8, .6); }
.vd-sub { font-size: 13px; }
.vd-detail { margin-top: 12px; }
.vd-detail .hd .btn { min-height: 44px; }
.vd-group { margin-top: 12px; }
.vd-group.bad > .lbl { color: #ff8a91; }
.vd-item { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); min-height: 48px; }
.vd-main { min-width: 0; flex: 1; font-size: 14px; }
.vd-main .muted { font-size: 13px; margin-top: 2px; }
.vd-side { display: grid; justify-items: end; gap: 2px; font-size: 12.5px; text-align: right; flex: 0 0 auto; max-width: 45%; }

/* date bar (Overview, Orders, Vendors) */
.perbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.perbar .per-ic { display: grid; place-items: center; width: 40px; height: 44px; color: var(--muted); }
.perbar .per-sel { width: auto; min-width: 200px; min-height: 44px; font-size: 16px; }
.perbar .per-d { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.perbar .per-d .input { min-height: 44px; font-size: 16px; width: auto; }
.perbar .btn { min-height: 44px; }
.perbar .per-note { font-size: 13px; }
.vd-chips .chip.ok { border-color: rgba(34, 197, 94, .5); }
@media (max-width: 640px) { .perbar .per-sel { flex: 1 1 100%; } .perbar .per-d { flex: 1 1 45%; } .perbar .per-d .input { flex: 1; min-width: 0; } }

/* Usage page (Meshro only) */
.us-kpis { margin-top: 4px; }
.us-card { margin-top: 14px; }
.us-tbl { display: grid; }
.us-row { display: grid; grid-template-columns: minmax(160px, 1.6fr) repeat(6, minmax(0, .6fr)) minmax(0, 1.4fr) minmax(0, .9fr); gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.us-hd { font-size: 12px; color: var(--muted); padding: 4px 0; }
.us-who { display: grid; gap: 2px; min-width: 0; }
.us-who small { color: var(--muted); font-size: 12px; }
.us-bar { display: block; height: 4px; border-radius: 2px; background: var(--chip); margin-top: 4px; }
.us-bar i { display: block; height: 100%; border-radius: 2px; background: #EF404A; }
@media (max-width: 760px) {
  .us-hd { display: none; }
  .us-row { grid-template-columns: 1fr 1fr; gap: 4px 12px; }
  .us-row .us-who { grid-column: 1 / -1; }
  .us-row span[data-l]::before { content: attr(data-l) ': '; color: var(--muted); font-size: 12px; }
}

/* Customers page */
.cu-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 10px; }
.cu-tags .chip.ok, .vd-chips .chip.ok { border-color: rgba(34, 197, 94, .5); }
.cu-tags .chip.bad, .vd-chips .chip.bad { border-color: rgba(239, 64, 74, .6); color: #ff8a91; }
.cu-kpis { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.cu-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 140px; margin-top: 8px; }
.cu-bar { display: grid; grid-template-rows: 1fr auto; height: 100%; text-align: center; font-size: 10px; color: var(--muted); }
.cu-bar i { align-self: end; display: block; background: #EF404A; border-radius: 3px 3px 0 0; min-height: 2px; }

/* Team & logins grouped by role */
.tm-sum { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 0 4px; }
.tm-grp { padding-top: 10px; }
.tm-grp > .lbl { margin: 6px 0 2px; }

/* connection bar: only when the dashboard really can't be reached */
.connbar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(8px + env(safe-area-inset-top)); z-index: 120; display: flex; gap: 10px; align-items: center;
  max-width: calc(100vw - 24px); padding: 8px 8px 8px 14px; border-radius: 12px; background: #7f1d1d; color: #fff; font-size: 14px; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.connbar .btn { min-height: 40px; background: #fff; color: #7f1d1d; border: 0; }

/* brand: the logo's own "meshines" word, with the second line where HYDRAULICS sits in the logo */
.wm { display: inline-flex; flex-direction: column; align-items: center; gap: calc(var(--wmh) * .2); line-height: 1; }
.wm img { display: block; height: var(--wmh); width: auto; }
.wm small { display: block; margin: 0; color: #B9B9BD; font: 700 calc(var(--wmh) * .38)/1 var(--sans); letter-spacing: .42em; padding-left: .42em; white-space: nowrap; }
[data-theme="paper"] .wm small { color: #5B5B5E; }

.wm small { font-size: calc(var(--wmh) * .42); }
/* customers + vendors analytics */
.how { margin: 14px 2px 4px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.how::before { content: 'ⓘ '; }
.cu-two { margin-top: 12px; gap: 12px; }
.cu-two > .card { margin: 0; }
.hbars { display: grid; gap: 8px; margin-top: 4px; }
.hb { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.hb-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-t { display: block; height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.hb-t i { display: block; height: 100%; border-radius: 4px; background: #EF404A; }
.hb b { font-variant-numeric: tabular-nums; white-space: nowrap; } .hb b small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.cu-mtot { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.cu-mtot b { color: var(--ink); font-weight: 700; }
.cu-fol { margin-top: 12px; }
.cu-frow { display: grid; gap: 4px; width: 100%; text-align: left; padding: 12px 0; min-height: 48px; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; cursor: pointer; }
.cu-frow .muted { font-size: 13.5px; }
.cu-fn { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cu-follow { display: grid; gap: 4px; margin: 4px 0 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid #22c55e; font-size: 14.5px; line-height: 1.5; }
.cu-follow.warn { border-left-color: #f59e0b; } .cu-follow.bad { border-left-color: #EF404A; }
.chip.warn { border-color: rgba(245, 158, 11, .6); color: #f5b041; }
[data-theme="paper"] .chip.warn { color: #b45309; }
.cu-segs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.cu-segs .chip { min-height: 40px; cursor: pointer; font: inherit; font-size: 14px; background: none; color: inherit; }
.cu-segs .chip.on { background: #EF404A; border-color: #EF404A; color: #fff; }
.chip.seg { font-weight: 700; }
.chip.seg-key { border-color: rgba(239, 64, 74, .7); color: #ff8a91; }
[data-theme="paper"] .chip.seg-key { color: #c81e28; }
.chip.seg-atrisk { border-color: rgba(239, 64, 74, .6); }
.cu-detail .mg-row { gap: 10px; }
@media (min-width: 900px) { .cu-detail .cu-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .grid.kpis.cu-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cu-kpis .kpi { padding: 12px; }
  .cu-kpis .kpi .v { font-size: 24px; }
  .cu-kpis .kpi .d { font-size: 12.5px; }
  .cu-two { grid-template-columns: 1fr; }
  .hb { grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr) auto; gap: 8px; font-size: 13.5px; }
}

.acc-pages { margin-top: 16px; }
.acc-pnote { display: block; font-size: 12.5px; margin-top: 2px; }

.vd-segs { margin: 12px 0 0; }
.chip.vseg-mainsupplier { border-color: rgba(34, 197, 94, .55); }
.chip.vseg-slow, .chip.vseg-qualityissue { border-color: rgba(239, 64, 74, .6); color: #ff8a91; }
[data-theme="paper"] .chip.vseg-slow, [data-theme="paper"] .chip.vseg-qualityissue { color: #c81e28; }

/* QC as its own department */
.qc-chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px; font: 600 11px/1 var(--sans); letter-spacing: .03em; white-space: nowrap;
  border: 1px solid rgba(245, 158, 11, .55); color: #f5b041; background: rgba(245, 158, 11, .08); }
.qc-chip.late { border-color: rgba(239, 64, 74, .6); color: #ff8a91; background: rgba(239, 64, 74, .1); }
[data-theme="paper"] .qc-chip { color: #b45309; } [data-theme="paper"] .qc-chip.late { color: #c81e28; }
.pills { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tend .qc-chip { margin-right: 6px; }
.qcd { margin-top: 14px; }

/* the 5 status colours as round boxes with counts (Customers, Vendors) */
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.st-chips .pill { height: 26px; padding: 0 11px; border-radius: 13px; gap: 6px; }
.st-chips .pill b { font-weight: 800; }
/* "Not planned" = grey everywhere */
.pill.s-none, .s-none { background: var(--neutral, #64748B) !important; color: var(--neutral-ink, #fff) !important; }
/* left menu: scrolls on its own; the signed-in person (settings / theme / sign out) always stays at the bottom */
@media (min-width: 861px) {
  .shell.zoho .side { overflow: hidden; display: flex; flex-direction: column; }
  .shell.zoho .side .nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-right: 4px; margin-right: -4px; align-content: start; }
  .shell.zoho .side .side-foot { flex: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
  html[data-theme="paper"] .shell.zoho .side .side-foot { border-top-color: #E5E7EB; }
}
/* Orders table page: the table runs to the bottom of the window (no empty band) */
@media (min-width: 861px) { .main:has(.tbl-wrap) { padding-bottom: 8px !important; } }

.indbtns .indup { cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; }
.indmodal input[readonly] { opacity: .85; cursor: default; }

.ai-groups { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px 0 2px; padding-bottom: 2px; }
.ai-groups::-webkit-scrollbar { display: none; }
.ai-groups .chip { flex: none; min-height: 36px; cursor: pointer; font: inherit; font-size: 13.5px; background: none; color: inherit; }
.ai-groups .chip.on { background: #EF404A; border-color: #EF404A; color: #fff; }
/* Item & vendor list (Settings, admin) */
#mastersCard { margin-bottom: 14px; }
.ms-tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.ms-tabs .chip { min-height: 40px; padding: 0 18px; cursor: pointer; font: inherit; font-weight: 600; background: none; color: inherit; }
.ms-tabs .chip.on { background: #EF404A; border-color: #EF404A; color: #fff; }
.ms-form { display: grid; gap: 4px; max-width: 640px; }
.ms-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ms-form .btn { justify-self: start; min-height: 44px; margin-top: 6px; }
.ms-list { max-width: 640px; }
@media (max-width: 560px) { .ms-row { grid-template-columns: 1fr; } }

/* Meshro: full item & vendor list */
.ms-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 4px; }
.ms-tools .ms-search { flex: 1 1 260px; min-width: 0; }
.ms-tools .btn { min-height: 44px; cursor: pointer; }
.ms-list { max-width: none !important; }
.ms-table { display: grid; border-top: 1px solid var(--line); }
.ms-tr { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr) auto; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ms-tr.v { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
.ms-th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ms-tr span { min-width: 0; overflow-wrap: anywhere; }
.ms-tr .num { text-align: right; }
.ms-act { display: flex; gap: 6px; justify-content: flex-end; }
.ms-tr.editing .input { height: 40px; font-size: 15px; }
.ms-pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 12px; }
.ms-prev { margin: 10px 0 4px; max-height: 240px; overflow: auto; }
@media (max-width: 760px) {
  .ms-th { display: none; }
  .ms-tr, .ms-tr.v { grid-template-columns: 1fr 1fr; gap: 4px 10px; }
  .ms-tr > span:first-child { grid-column: 1 / -1; }
  .ms-tr .ms-act { grid-column: 1 / -1; justify-content: flex-start; }
  .ms-tr span[data-l]:not(:first-child)::before { content: attr(data-l) ': '; color: var(--muted); font-size: 12px; }
  .ms-tr.editing > span { grid-column: 1 / -1; }
}
#mastersCard { grid-column: 1 / -1; }

/* ============ selected module in the left menu (owner, 19 Nov): dark card, red bar on the left, red icon ============ */
.shell.zoho .nav a { position: relative; overflow: hidden; isolation: isolate; }
.shell.zoho .nav a.on {
  background: transparent !important; color: #fff !important; font-weight: 700;
  border-radius: 10px;
}
/* the card behind the item: slides in from the left */
.shell.zoho .nav a.on::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 10px;
  background: rgba(255,255,255,.075); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  transform-origin: left center; animation: navCard .42s cubic-bezier(.2,.8,.2,1) both;
}
/* the red bar on the left: grows from the middle */
.shell.zoho .nav a.on::before {
  display: block !important; content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 4px;
  border-radius: 0 4px 4px 0; background: #EF404A; box-shadow: 0 0 12px rgba(239,64,74,.55);
  transform-origin: center; animation: navBar .5s cubic-bezier(.2,.8,.2,1) both .05s;
}
.shell.zoho .nav a.on svg { color: #EF404A !important; opacity: 1; animation: navIcon .5s cubic-bezier(.2,.8,.2,1) both .08s; }
.shell.zoho .nav a.on .zchev { color: #EF404A; }
.shell.zoho .nav a:not(.on):hover svg { color: #EF404A !important; transition: color .2s; }
@keyframes navCard { from { opacity: 0; transform: scaleX(.6); } to { opacity: 1; transform: scaleX(1); } }
@keyframes navBar { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: scaleY(1); } }
@keyframes navIcon { 0% { transform: scale(.7) rotate(-12deg); opacity: .4; } 60% { transform: scale(1.15) rotate(3deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
/* light (paper) menu */
html[data-theme="paper"] .shell.zoho .nav a.on { color: #1F2328 !important; }
html[data-theme="paper"] .shell.zoho .nav a.on::after { background: rgba(0,0,0,.05); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
html[data-theme="paper"] .shell.zoho .nav a.on svg, html[data-theme="paper"] .shell.zoho .nav a.on .zchev { color: #EF404A !important; }
/* phone tab bar: red icon and a small red bar on the selected tab */
@media (max-width: 860px) {
  .tabbar a.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: #EF404A; animation: navTab .4s cubic-bezier(.2,.8,.2,1) both; }
  .tabbar a.on svg { color: #EF404A !important; animation: navIcon .45s cubic-bezier(.2,.8,.2,1) both; }
}
@keyframes navTab { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .shell.zoho .nav a.on::after, .shell.zoho .nav a.on::before, .shell.zoho .nav a.on svg, .tabbar a.on::before, .tabbar a.on svg { animation: none !important; }
}

/* =====================================================================================
   COLOUR SET A — "Graphite Red" (owner's choice, 19 Nov 2026). Final layer: wins over every palette above.
   Meshines red #EF404A + logo grey #5B5B5E are fixed; only surfaces / greys / status shades changed.
   ===================================================================================== */
:root {
  /* status colours (same in both themes) */
  --ok: #16A34A;      --ok-ink: #FFFFFF;     /* On time */
  --bad: #E5333F;     --bad-ink: #FFFFFF;    /* Delayed */
  --warn: #F5B301;    --warn-ink: #241A00;   /* Production ongoing */
  --info: #3B6FD8;    --info-ink: #FFFFFF;   /* In process */
  --neutral: #6B6B70; --neutral-ink: #FFFFFF;/* Not planned */
  --late: #F97316;    --late-ink: #1A0E00;
  --brand: #E5333F;   --zgreen: #16A34A;
}
html[data-theme="night"] {
  --bg: #0B0B0D; --bg2: #0F0F12; --card: #17171A; --card2: #1F1F23; --chip: #222226;
  --line: #2A2A2F; --line2: #212125;
  --ink: #F5F5F6; --ink2: #E4E4E8; --muted: #A3A3AA; --faint: #7E7E86;
  --red: #FF6B73; --red-ink: #FF8A91; --green: #4ADE80; --amber: #F5C542; --orange: #FF9A62; --blue: #8DB4E8;
  --zside: #111113; --zside-ink: #F5F5F6; --zside-mut: #A3A3AA; --zside-hover: rgba(255,255,255,.06);
  --zlink: #8FB3FF; --zhead: #141417; --zrow-hover: #1A1A1E;
}
html[data-theme="paper"] {
  --bg: #F5F5F7; --bg2: #FAFAFB; --card: #FFFFFF; --card2: #EFEFF2; --chip: #ECECEF;
  --line: #E4E4E8; --line2: #EEEEF1;
  --ink: #16161A; --ink2: #2A2A30; --muted: #5B5B5E; --faint: #74747A;
  --red: #C8202C; --red-ink: #A51C28; --green: #15803D; --amber: #A14A07; --orange: #C2410C; --blue: #1D4ED8;
  --zside: #FFFFFF; --zside-ink: #16161A; --zside-mut: #5B5B5E; --zside-hover: rgba(0,0,0,.05);
  --zlink: #1F5BD8; --zhead: #F7F7F9; --zrow-hover: #F7F7FA;
}
html[data-theme="paper"] .shell.zoho .side { border-right: 1px solid #E4E4E8; }
html[data-theme="night"] .shell.zoho .side { border-right: 1px solid #1F1F23; }
/* selected module: red-tinted card (A) */
.shell.zoho .nav a.on::after { background: rgba(239,64,74,.12); box-shadow: inset 0 0 0 1px rgba(239,64,74,.16); }
html[data-theme="paper"] .shell.zoho .nav a.on::after { background: rgba(239,64,74,.08); box-shadow: inset 0 0 0 1px rgba(239,64,74,.12); }
/* "+ New" and other green action buttons: pill — white on dark, black on light (A) */
.btn.znew { border-radius: 999px !important; }
html[data-theme="night"] .btn.znew { background: #FFFFFF !important; color: #111113 !important; border-color: #FFFFFF !important; }
html[data-theme="paper"] .btn.znew { background: #16161A !important; color: #FFFFFF !important; border-color: #16161A !important; }

/* Light theme like "Atrium MTL" (owner, 19 Nov): soft grey page, white panels floating on it with a soft shadow */
html[data-theme="paper"] {
  --bg: #E9E8E6; --bg2: #F2F1EF; --card: #FFFFFF; --card2: #F4F3F1; --chip: #EEEDEB;
  --line: #E0DFDC; --line2: #EAE9E7;
  --zhead: #F7F6F4; --zrow-hover: #F7F6F4;
}
html[data-theme="paper"] body { background: #E9E8E6; }
html[data-theme="paper"] .card, html[data-theme="paper"] .kpi.card, html[data-theme="paper"] .vd-card, html[data-theme="paper"] .tbl-wrap {
  border-color: rgba(0,0,0,.05) !important;
  box-shadow: 0 1px 2px rgba(17,17,17,.04), 0 10px 28px -12px rgba(17,17,17,.10);
}
html[data-theme="paper"] .card { border-radius: 16px; }
html[data-theme="paper"] .shell.zoho .ztop { background: #FFFFFF; border-bottom: 1px solid #E0DFDC; box-shadow: 0 1px 2px rgba(17,17,17,.04); }
html[data-theme="paper"] .shell.zoho .side { background: #FFFFFF; }
html[data-theme="paper"] .modal .box { box-shadow: 0 24px 60px -20px rgba(17,17,17,.25); }

/* =====================================================================================
   CLASSIC PREMIUM LAYER (owner, 19 Nov 2026) — final layer, wins over everything above.
   Light mode = Apple "grouped" white (soft grey page, white rounded cards, hairlines, near-black text).
   Both themes: calm cards, pill buttons, clear type, almost no motion. Meshines red #EF404A stays the accent.
   ===================================================================================== */
html[data-theme="paper"] {
  --bg: #F5F5F7; --bg2: #FAFAFC; --card: #FFFFFF; --card2: #F5F5F7; --chip: #EDEDF0;
  --line: #E5E5EA; --line2: #EEEEF0;
  --ink: #1D1D1F; --ink2: #333336; --muted: #6E6E73; --faint: #86868B;
  --red: #D7262F; --red-ink: #B81E26;
  --zside: #F5F5F7; --zside-ink: #1D1D1F; --zside-mut: #6E6E73; --zside-hover: rgba(0,0,0,.045);
  --zlink: #0066CC; --zhead: #FAFAFC; --zrow-hover: #FAFAFC;
}
html[data-theme="paper"] body { background: #F5F5F7; color: #1D1D1F; }
/* cards: white, no border, soft shadow, 18px corners */
html[data-theme="paper"] .card, html[data-theme="paper"] .vd-card, html[data-theme="paper"] .tbl-wrap {
  background: #FFFFFF; border: 0 !important; border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.035) !important;
}
html[data-theme="paper"] .kpi.card { box-shadow: 0 1px 2px rgba(0,0,0,.04) !important; }
/* menu: same soft grey as the page (no hard divider); top bar: white with a hairline */
html[data-theme="paper"] .shell.zoho .side { background: #F5F5F7 !important; border-right: 0 !important; }
html[data-theme="paper"] .shell.zoho .ztop { background: #FBFBFD !important; border-bottom: 1px solid rgba(0,0,0,.08) !important; box-shadow: none !important; }
html[data-theme="paper"] .shell.zoho .nav a { color: #1D1D1F; }
html[data-theme="paper"] .shell.zoho .nav a svg { color: #6E6E73 !important; }
html[data-theme="paper"] .shell.zoho .nav a.on::after { background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04); }
html[data-theme="paper"] .shell.zoho .nav a.on svg { color: #EF404A !important; }
html[data-theme="paper"] .shell.zoho .side-foot .me { background: #FFFFFF !important; border: 0 !important; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
/* inputs like Apple's: white, hairline, 12px corners */
html[data-theme="paper"] .input, html[data-theme="paper"] select.input { background: #FFFFFF; border-color: #D2D2D7; }
html[data-theme="paper"] .input:focus { border-color: #86868B; box-shadow: 0 0 0 4px rgba(239,64,74,.12); outline: none; }
html[data-theme="paper"] .tbl th, html[data-theme="paper"] .tbl.sheet th { background: #FAFAFC; color: #6E6E73; }
html[data-theme="paper"] .tbl td { border-color: #EEEEF0; }
html[data-theme="paper"] .chip:not(.on):not(.bad):not(.ok):not(.warn):not(.seg) { background: #FFFFFF; border-color: #D2D2D7; }
html[data-theme="paper"] .chip.on { background: #1D1D1F; color: #FFFFFF; border-color: #1D1D1F; }
/* dark: quiet hairline cards, no glow */
html[data-theme="night"] .card, html[data-theme="night"] .vd-card, html[data-theme="night"] .tbl-wrap { border: 1px solid rgba(255,255,255,.06) !important; border-radius: 18px; box-shadow: none !important; }

/* both themes: classic type + shapes */
.top h1 { font-weight: 700; letter-spacing: -.025em; }
.card { border-radius: 18px; }
.input { border-radius: 12px; }
.btn { border-radius: 980px; font-weight: 600; letter-spacing: -.005em; }
.btn.sm { border-radius: 980px; }
.btn.primary { background: #EF404A !important; border-color: #EF404A !important; color: #FFFFFF !important; box-shadow: none !important; }
.btn.primary:hover { background: #D8323C !important; border-color: #D8323C !important; }
.tbl th { letter-spacing: .06em; font-weight: 600; }
.kpi .v { letter-spacing: -.02em; }

/* calm motion: no entrance animations or lifting cards; the menu bar only fades in */
.rise, .growx, .grow { animation: none !important; }
.card, .card:hover, .vd-card:hover { transform: none !important; }
.shell.zoho .nav a.on::after { animation: none !important; }
.shell.zoho .nav a.on svg { animation: none !important; }
.shell.zoho .nav a.on::before { animation: navFade .25s ease-out both !important; }
@keyframes navFade { from { opacity: 0; } to { opacity: 1; } }
.tabbar a.on svg { animation: none !important; }

/* =====================================================================================
   TYPE SCALE (owner, 19 Nov 2026): calmer, Zoho-Books-like sizes on PC; slightly larger on phones.
   Final layer. Phone input boxes stay 16px (stops iPhone zoom), tap targets stay 44px+.
   ===================================================================================== */
@media (min-width: 861px) {
  body { font-size: 14px; }
  .shell.zoho .nav a { font-size: 14px; height: 38px; }
  .shell.zoho .nav a svg { width: 17px; height: 17px; }
  .shell.zoho .subnav a { font-size: 13px; height: 32px; }
  .zorg { font-size: 13px; }
  .zsearch input { font-size: 14px; }
  .top h1, .lh-title { font-size: 22px !important; line-height: 1.2 !important; letter-spacing: -.02em !important; }
  .top p, .top .sub, .lh-sub { font-size: 13px; }
  .hero h1 { font-size: 32px !important; line-height: 1.15 !important; }
  .hero-sub, .hero p { font-size: 14px !important; }
  .card .hd h3 { font-size: 15px; } .card .hd p { font-size: 12.5px; }
  .kpi .lbl { font-size: 10.5px; } .kpi .v { font-size: 24px !important; } .kpi .d { font-size: 12px; }
  .tbl td { font-size: 13px; padding-top: 10px; padding-bottom: 10px; }
  .tbl th { font-size: 11px !important; }
  .btn { font-size: 13.5px; } .btn.sm { font-size: 12.5px; }
  .input, select.input { font-size: 14px; }
  .chip { font-size: 12.5px; } .pill { font-size: 10.5px; }
  .vd-name { font-size: 14px; } .vd-sub { font-size: 12.5px; }
  .how { font-size: 12px; }
  .li .t { font-size: 14px; } .li .s { font-size: 12.5px; }
  .mg-row, .hb, .hbar { font-size: 13px; }
  .dr-hd h2 { font-size: 20px !important; } .dr-hd .muted { font-size: 13.5px; }
  .zsec-hd b { font-size: 15px; } .zl { font-size: 13px; } .zhint, .zauto, .znext { font-size: 12.5px; }
  .log { font-size: 13.5px; } .mgn b { font-size: 15px; }
  .cu-follow { font-size: 13.5px; } .cu-mtot { font-size: 12.5px; }
}
@media (max-width: 860px) {
  body { font-size: 15px; }
  .top h1, .lh-title { font-size: 24px !important; }
  .hero h1 { font-size: 28px !important; line-height: 1.15 !important; }
  .kpi .v { font-size: 22px !important; }
  .card .hd h3 { font-size: 15px; }
  .dr-hd h2 { font-size: 19px !important; }
}
@media (min-width: 861px) {
  .tbl.sheet td, .tbl.sheet td.num, .tbl.sheet td.sm { font-size: 13px !important; padding-top: 11px !important; padding-bottom: 11px !important; }
  .tbl.sheet td.custcol small, .tbl.sheet td .sm, .tbl.sheet .muted { font-size: 12px; }
}
/* no row-by-row fade-in on tables (classic, calm) */
.tbl tbody tr, .msheet tbody tr, .mbar i, .pct, .list .li, .vd-list > *, .kpis > * { animation: none !important; opacity: 1 !important; }
/* calm: no decorative motion (text reveal, ring draw, wipes, pulsing status dot, bell shake) */
.rv > span { animation: none !important; transform: none !important; }
.draw { animation: none !important; stroke-dashoffset: 0 !important; }
.wipe, .ring-arc, .hero-ring svg { animation: none !important; }
.s-pending::before { animation: none !important; }
.bellbtn.ring svg, .bellbtn.ring .bellN { animation: none !important; }
.drawer { animation-duration: .28s !important; }

/* light mode: white menu + white top bar frame the grey work area (owner, 19 Nov: left and right must look different) */
html[data-theme="paper"] .shell.zoho .side { background: #FFFFFF !important; border-right: 1px solid rgba(0,0,0,.08) !important; }
html[data-theme="paper"] .shell.zoho .ztop { background: #FFFFFF !important; }
html[data-theme="paper"] .shell.zoho .nav a.on::after { background: #F2F2F5; box-shadow: none; }
html[data-theme="paper"] .shell.zoho .nav a:not(.on):hover { background: #F5F5F7; }
html[data-theme="paper"] .shell.zoho .side-foot { border-top-color: rgba(0,0,0,.08) !important; }
html[data-theme="paper"] .shell.zoho .side-foot .me { background: #F5F5F7 !important; box-shadow: none; }
/* dark mode: menu a step darker than the work area, with a hairline */
html[data-theme="night"] .shell.zoho .side { background: #0E0E10 !important; border-right: 1px solid rgba(255,255,255,.06) !important; }

/* sizes the sweep found too big / too small */
@media (min-width: 861px) {
  #view b.num, .mw .num, .mw-big, .stuck .num { font-size: 24px !important; }
  .tk-n b, .tasks-sum b, .tsum b { font-size: 22px !important; }
  .perbar .per-sel, .perbar .per-d .input { font-size: 14px; min-height: 38px; height: 38px; }
  .perbar .per-ic { height: 38px; }
}
.hero-ring .lbl, .ring .lbl { font-size: 10.5px !important; }
.cu-bar span { font-size: 10.5px; }
.new-badge { font-size: 10px; }
/* big numbers: calm on every screen size */
#view b.num { font-size: 24px !important; letter-spacing: -.02em; }
.ttile b { font-size: 22px !important; letter-spacing: -.02em; }
@media (max-width: 560px) { #view b.num { font-size: 22px !important; } .ttile b { font-size: 20px !important; } }

/* boxes fit their content (owner, 19 Nov: boxes were bigger than their data) */
.mw-grid, .grid.two, .grid.two-even, .cu-two, .grid.mw-grid { align-items: start; }
@media (min-width: 861px) {
  .card { padding: 18px 20px; }
  .kpi.card, .card.kpi { padding: 14px 16px; }
  .hero { padding: 24px 28px !important; }
  .hero h1 { font-size: 40px !important; line-height: 1.1 !important; letter-spacing: -.03em !important; }
  .card .hd { margin-bottom: 10px; }
}
@media (max-width: 860px) {
  .hero h1 { font-size: 30px !important; }
}

/* =====================================================================================
   LIGHT MODE, clearer split (owner, 19 Nov): mirror the dark mode the owner likes.
   White menu with a visible edge | clearer grey work area | white cards | red-tinted selected item.
   ===================================================================================== */
html[data-theme="paper"] { --bg: #EEEEF0; --bg2: #F6F6F8; --card2: #F6F6F8; --line: #E3E3E8; --line2: #ECECEF; --zhead: #F6F6F8; --zrow-hover: #F6F6F8; }
html[data-theme="paper"] body { background: #EEEEF0 !important; }
html[data-theme="paper"] .shell.zoho .side { background: #FFFFFF !important; border-right: 1px solid #DCDCE1 !important; box-shadow: 1px 0 0 rgba(0,0,0,.02), 6px 0 18px -14px rgba(0,0,0,.18) !important; }
html[data-theme="paper"] .shell.zoho .ztop { background: #FFFFFF !important; border-bottom: 1px solid #DCDCE1 !important; }
/* selected module: same idea as dark — red tint, red bar, red icon, bold dark text */
html[data-theme="paper"] .shell.zoho .nav a.on { color: #1D1D1F !important; }
html[data-theme="paper"] .shell.zoho .nav a.on::after { background: rgba(239,64,74,.09) !important; box-shadow: inset 0 0 0 1px rgba(239,64,74,.16) !important; }
html[data-theme="paper"] .shell.zoho .nav a:not(.on):hover { background: #F2F2F5 !important; }
/* Orders sub-list: the open product reads clearly too */
html[data-theme="paper"] .shell.zoho .subnav a.on { background: #F2F2F5 !important; color: #1D1D1F !important; }
/* cards stand off the grey with a hairline + soft shadow */
html[data-theme="paper"] .card, html[data-theme="paper"] .vd-card, html[data-theme="paper"] .tbl-wrap { border: 1px solid rgba(0,0,0,.06) !important; box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px -16px rgba(0,0,0,.14) !important; }
/* Pipeline columns: light grey lanes on the grey page, white cards inside */
html[data-theme="paper"] .col { background: #F6F6F8 !important; border-color: #E3E3E8 !important; }
html[data-theme="paper"] .col .tile, html[data-theme="paper"] .tile { background: #FFFFFF; border-color: #E6E6EA; }
html[data-theme="paper"] .side-foot .me { background: #F6F6F8 !important; }
/* target ring: tap to show / hide the target details (owner, 19 Nov) */
.hero-ring.tap { cursor: pointer; border-radius: 16px; padding: 6px; transition: background .2s; }
.hero-ring.tap:hover { background: rgba(127,127,127,.06); }
.hero-ring.tap:focus-visible { outline: 2px solid #EF404A; outline-offset: 2px; }
.ring-hint { margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
#tgtStrip { margin-top: 12px; }
/* Production & billing value (Analytics) */
.vs-hd { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.vs-hd h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.vs-nav { display: flex; gap: 6px; align-items: center; } .vs-nav b { min-width: 92px; text-align: center; font-size: 14px; }
.vs-nav .btn { min-width: 36px; min-height: 36px; }

/* ===== Meshro chat: same question groups as Analytics (19 Nov) — keep everything inside the panel ===== */
.cb-intro, .cb-intro > *, .cb-askbox { min-width: 0; max-width: 100%; }
.cb-askbox { display: grid; gap: 8px; }
.cb-askbox .ai-groups { margin: 0; }
.cb-intro .cb-askbox .cb-chips { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 520px) { .cb-intro .cb-askbox .cb-chips { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cb-askbox .cb-chip { white-space: normal; overflow-wrap: anywhere; }

/* ===== QA fix 19 Nov (BUG-03/04): one very long word (no spaces) in a customer name or description must wrap
   inside its card instead of pushing the whole page sideways on phones and tablets ===== */
.cards-m > *, .list > .li > div, .mw-list > .li > div { min-width: 0; }
.tile .t, .tile .s, .li .t, .li .s { overflow-wrap: anywhere; }

/* ---- clean sidebar layout: logo at the top of the left menu, grouped menu, top bar only over the page ---- */
@media (min-width: 861px) {
  .shell.zoho { grid-template-columns: 260px 1fr !important; grid-template-areas: "side top" "side main" !important; }
  .shell.zoho .side { grid-area: side; position: sticky !important; top: 0 !important; height: 100dvh !important; padding: 18px 12px 14px !important; }
  .shell.zoho .ztop { padding-left: 28px !important; padding-right: 28px !important; }
  .side-brand { display: flex; align-items: center; height: 92px; box-sizing: border-box; padding: 6px 0 0 20px; margin: -18px -12px 6px; border-bottom: 0; flex: none; }
  html[data-theme="paper"] .side-brand { border-bottom-color: #DCDCE1; }
  .shell.zoho .nav { gap: 2px !important; }
  .shell.zoho .nav a { height: 38px !important; font-size: 14px !important; padding: 0 10px 0 4px !important; }
  .shell.zoho .nav a svg { width: 17px !important; height: 17px !important; }
  .nav-hd { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px 20px; }
  .nav-hd:first-child { padding-top: 2px; }
}
@media (max-width: 860px) { .side-brand, .nav-hd { display: none; } }

/* no outline box after a mouse click on menu links (keyboard focus ring stays) */
.side a:focus:not(:focus-visible), .side-brand:focus:not(:focus-visible), .subnav a:focus:not(:focus-visible), .tabbar a:focus:not(:focus-visible) { outline: none; box-shadow: none; }

/* ---- light theme whites (warm): cards #FFFFFF, page #F7F5F0, shaded boxes #FBF9F5, hover #F3F0E9, lines #E8E3DA ---- */
html[data-theme="paper"] {
  --bg: #F7F5F0; --bg2: #FBF9F5; --card: #FFFFFF; --card2: #FBF9F5; --chip: #F3F0E9;
  --line: #E8E3DA; --line2: #E8E3DA;
  --zside-hover: #F3F0E9; --zhead: #FBF9F5; --zrow-hover: #F3F0E9;
}
html[data-theme="paper"] body { background: #F7F5F0 !important; }
html[data-theme="paper"] .shell.zoho .side { background: #FFFFFF !important; border-right: 1px solid #E8E3DA !important; box-shadow: none !important; }
html[data-theme="paper"] .shell.zoho .ztop { background: #FFFFFF !important; border-bottom: 1px solid #E8E3DA !important; }
html[data-theme="paper"] .shell.zoho .nav a:not(.on):hover, html[data-theme="paper"] .shell.zoho .subnav a:hover { background: #F3F0E9 !important; }
html[data-theme="paper"] .shell.zoho .side-foot { border-top-color: #E8E3DA !important; }
html[data-theme="paper"] .shell.zoho .side-foot .me, html[data-theme="paper"] .side-foot .me { background: #FBF9F5 !important; }
html[data-theme="paper"] .card, html[data-theme="paper"] .tbl-wrap { background: #FFFFFF; border-color: #E8E3DA; }
html[data-theme="paper"] .tbl tbody tr:hover { background: #F3F0E9; }

/* ---- light theme: flat warm cards like the finance dashboard (thin border, small radius, no heavy shadow); left menu stays white ---- */
html[data-theme="paper"] .card, html[data-theme="paper"] .tbl-wrap, html[data-theme="paper"] .kpi.card, html[data-theme="paper"] .vd-card {
  background: #FFFFFF !important; border: 1px solid #E8E3DA !important; border-radius: 12px !important; box-shadow: 0 1px 2px rgba(60,45,20,.04) !important;
}
html[data-theme="paper"] .card .card, html[data-theme="paper"] .tile { background: #FBF9F5 !important; border: 1px solid #E8E3DA !important; border-radius: 10px !important; box-shadow: none !important; }
html[data-theme="paper"] .shell.zoho .nav a.on::after { background: #F3F0E9 !important; box-shadow: inset 0 0 0 1px #E8E3DA !important; }
html[data-theme="paper"] .zsearch, html[data-theme="paper"] .input, html[data-theme="paper"] select { background: #FFFFFF; border-color: #E8E3DA !important; }
html[data-theme="paper"] .icon-btn { border-color: #E8E3DA; }

/* ---- light theme palette (text, brand, status) — sidebar stays white as asked ---- */
html[data-theme="paper"] {
  --ink: #141312; --ink2: #2E2C29; --muted: #5C5852; --faint: #706B63;
  --red: #BE202E; --red-ink: #A01623; --brand: #C41E2D;
  --green: #167A4E; --amber: #A86208; --blue: #54688C; --orange: #A86208;
  --zside-ink: #141312; --zside-mut: #5C5852;
}
html[data-theme="paper"] body { color: #141312; }
html[data-theme="paper"] .btn.primary, html[data-theme="paper"] .nav .badge, html[data-theme="paper"] .tabbar .badge, html[data-theme="paper"] .avatar.red { background: #C41E2D !important; border-color: #C41E2D !important; color: #fff !important; }
html[data-theme="paper"] .btn.primary:hover, html[data-theme="paper"] .btn.primary:active { background: #A01623 !important; border-color: #A01623 !important; }
html[data-theme="paper"] .shell.zoho .nav a.on::before { background: #C41E2D !important; }
html[data-theme="paper"] .shell.zoho .nav a.on svg, html[data-theme="paper"] .shell.zoho .nav a.on .zchev { color: #C41E2D !important; }
html[data-theme="paper"] .nav-hd { color: #706B63; }

/* Master data: "already in the list" hints under the name / brand fields */
.ms-hint { margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.ms-hint:empty { display: none; }
.ms-hint .ok { color: var(--green); font-weight: 600; }
.ms-hint .bad { color: var(--red); }
.ms-sug { margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg2); max-height: 260px; overflow-y: auto; }
.ms-sug > div { padding: 8px 12px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.ms-sug > div:first-child { border-top: 0; }
.ms-sug > div.hit { background: rgba(190,32,46,.08); }
.ms-form button[type="submit"]:disabled { opacity: .45; cursor: not-allowed; }

/* Master data: column filters for the item list */
.ms-filters { display: grid; grid-template-columns: 2fr 2fr 1.4fr 1fr 1fr auto auto; gap: 10px; align-items: end; margin: 14px 0 4px; padding: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; }
.ms-filters label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.ms-filters .input { height: 40px; font-size: 14px; }
.ms-filters .ms-chk { display: flex; align-items: center; gap: 6px; height: 40px; white-space: nowrap; }
@media (max-width: 1100px) { .ms-filters { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 560px) { .ms-filters { grid-template-columns: 1fr 1fr; } .ms-filters label:first-child, .ms-filters label:nth-child(2) { grid-column: 1 / -1; } .ms-filters .input { font-size: 16px; } }

/* Purchase "Arrived": ticked but not saved yet, and the Save bar */
.irow.ipend { background: rgba(168,98,8,.07); border-radius: 10px; }
.isavebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(168,98,8,.35); background: rgba(168,98,8,.08); border-radius: 12px; font-size: 14px; }
.isavebar .btn { min-height: 44px; padding: 0 22px; }

.zlock { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--bg2); border: 1px solid var(--line); }

/* Overview: big bell with the number of new notifications, in the middle of the welcome card */
.hero { position: relative; }
.hero-bell { position: relative; display: grid; justify-items: center; gap: 8px; align-self: center; margin: 0 auto; padding: 18px 26px; min-width: 150px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg2); color: var(--ink); cursor: pointer; font: inherit; transition: transform .2s, border-color .2s; }
.hero-bell:hover { border-color: #C41E2D; transform: translateY(-2px); }
.hero-bell svg { color: #C41E2D; }
.hero-bell .bellN { position: absolute; top: 8px; right: 30px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; background: #C41E2D; color: #fff; font: 700 15px/30px var(--sans); text-align: center; box-shadow: 0 0 0 3px var(--card); }
.hero-bell .hb-l { font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
@media (max-width: 860px) { .hero-bell { margin: 14px 0 0; flex-direction: row; } }

/* new notification pop-ups, bottom right (above the Ask Meshro button) */
#npops { position: fixed; right: calc(20px + env(safe-area-inset-right)); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 80; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.npop { display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px; border-radius: 14px; background: var(--card); color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-left: 4px solid #C41E2D; box-shadow: 0 10px 30px rgba(20,15,10,.18); animation: npIn .35s cubic-bezier(.2,.8,.2,1) both; }
.npop.out { opacity: 0; transform: translateX(24px); transition: opacity .3s, transform .3s; }
.np-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(196,30,45,.1); color: #C41E2D; }
.np-ic svg { width: 18px; height: 18px; }
.np-t { flex: 1; display: grid; gap: 4px; font-size: 14px; line-height: 1.4; }
.np-t b { font-weight: 600; }
.np-t small { color: var(--muted); font-size: 12.5px; }
.np-x { flex: none; width: 28px; height: 28px; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; border-radius: 8px; }
.np-x:hover { background: var(--card2); }
@keyframes npIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .npop { animation: none; } }
@media (max-width: 860px) { #npops { bottom: calc(150px + env(safe-area-inset-bottom)); right: 16px; } }

button.zlock { cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; }
button.zlock:hover { border-color: #C41E2D; color: #C41E2D; }
.zlock.wait { color: var(--amber); }

.tunl { border-left: 4px solid #C41E2D; }
.tunl[hidden] { display: none; }

/* Left-menu name card: the classic one-row card (avatar, name, three buttons), sized so it always fits inside the menu */
.shell.zoho .side-foot .me { display: flex; align-items: center; gap: 6px; padding: 8px; width: 100%; box-sizing: border-box; overflow: hidden; }
.shell.zoho .side-foot .me .avatar { flex: none; width: 32px; height: 32px; }
.shell.zoho .side-foot .me .who { flex: 1 1 0; min-width: 0; margin-left: 2px; }
.shell.zoho .side-foot .me .who b, .shell.zoho .side-foot .me .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell.zoho .side-foot .me .icon-btn { flex: none; width: 30px; height: 30px; min-width: 0; margin: 0 !important; padding: 0; }
.shell.zoho .side-foot .me .icon-btn svg { width: 15px; height: 15px; }
/* date boxes: visible dd/mm/yyyy text box + calendar button; the real date box sits invisibly underneath */
.dtw { position: relative; display: flex; align-items: center; width: 100%; min-width: 0; }
.dtw .dt-view { flex: 1 1 auto; min-width: 0; padding-right: 44px; }
.dtw .dt-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.dtw .dt-btn:hover:not(:disabled) { color: #C41E2D; background: var(--card2); }
.dtw .dt-btn:disabled { opacity: .35; cursor: default; }
.dtw .dt-native { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.zbox .dtw, .field .dtw, .per-d .dtw { width: 100%; }

/* HMI Shop: marked but not yet saved */
.sh-row.sh-pend { background: rgba(168,98,8,.08); border-radius: 10px; }
.sh-savebar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(168,98,8,.45); background: var(--card); border-radius: 12px; box-shadow: 0 8px 24px rgba(20,15,10,.18); font-size: 14px; }
.sh-savebar .btn { min-height: 48px; padding: 0 26px; }

.sh-notes{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.sh-note{min-height:48px}.sh-note.sh-mk{background:var(--accent,#EF404A);color:#fff}
.sh-note.sh-sent{opacity:.7;background:transparent;border:1px solid var(--line,#444)}
.sh-note.sh-sent{opacity:1;background:#1f9d55;border-color:#1f9d55;color:#fff}
.sh-chk{margin-right:12px;font-weight:600}.sh-ready{display:flex;flex-direction:column;font-size:12px}
.sh-note.sh-mk{background:#22c55e;border-color:#22c55e;color:#fff}
.sh-note.sh-sent{background:#15803d;border-color:#15803d;color:#fff;opacity:1}
.sh-dbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0;padding:10px 12px;border:1px solid var(--line,#444);border-radius:12px}.sh-dbar[hidden]{display:none}.ishop .sh-notes{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end}
.sh-pair{display:inline-flex;align-items:flex-end;gap:6px}.sh-pair .sh-qin{width:72px}

/* ---------------- Customize (Meshro / admin): boxes per product and step, new boxes, messages, menu pages ---------------- */
.cz { display: grid; gap: 14px; padding-bottom: 96px; }
.cz-tabs, .cz-prods { display: flex; gap: 8px; flex-wrap: wrap; }
.cz-tabs .chip, .cz-prods .chip { height: 44px; padding: 0 16px; font-size: 14px; border-radius: 22px; }
.cz-wrap { display: grid; grid-template-columns: 1fr; gap: 14px; align-items: start; }
@media (min-width: 900px) { .cz-wrap { grid-template-columns: 300px minmax(0, 1fr); } .cz-pal { position: sticky; top: 12px; } }
.cz-pal { display: grid; gap: 10px; }
.cz-pal-hd h3 { margin: 0 0 4px; font-size: 16px; }
.cz-pal-hd p { margin: 0; font-size: 13px; }
.cz-pal-list { display: grid; gap: 8px; max-height: min(52dvh, 520px); overflow: auto; padding: 2px; }
.cz-chip { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; min-height: 48px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 12px; background: var(--card2); color: var(--ink); cursor: grab; text-align: left; font: inherit; }
.cz-chip b { font-weight: 700; font-size: 14px; }
.cz-chip small { grid-column: 2; color: var(--muted); font-size: 12px; }
.cz-chip:hover, .cz-chip:focus-visible { border-color: var(--red); outline: none; }
.cz-pick { display: grid; gap: 8px; max-height: 50dvh; overflow: auto; margin: 6px 0 12px; }
.cz-pick .cz-chip { grid-template-columns: 1fr; cursor: pointer; }
.cz-pick .cz-chip small { grid-column: 1; }
.cz-steps { display: grid; gap: 12px; min-width: 0; }
.cz-step { padding: 14px; }
.cz-step-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cz-step-hd b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin-right: 8px; }
.cz-step-hd .btn { min-height: 44px; }
.cz-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-height: 56px; border-radius: 12px; }
.cz-step.cz-over, .cz-pal.cz-over { outline: 2px dashed var(--red); outline-offset: 2px; }
.cz-row { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); cursor: grab; }
.cz-row.core { background: var(--card2); }
.cz-row.cz-dragging, .cz-chip.cz-dragging { opacity: .45; }
.cz-grip { color: var(--faint); font-size: 18px; line-height: 1; user-select: none; }
.cz-name { display: grid; min-width: 0; }
.cz-name b { font-weight: 700; font-size: 14.5px; overflow-wrap: anywhere; }
.cz-name small { color: var(--muted); font-size: 12px; }
.cz-ctl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (min-width: 1100px) { .cz-row { grid-template-columns: auto minmax(0, 1fr) auto; } .cz-ctl { grid-column: auto; justify-content: flex-end; } }
.cz-ctl .icon-btn { width: 44px; height: 44px; }
.cz-tog { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 22px; font-size: 13px; cursor: pointer; }
.cz-tog input { width: 18px; height: 18px; accent-color: var(--red); }
.cz-tog.off { color: var(--muted); cursor: default; border-style: dashed; }
.cz-x:hover { color: var(--red); }
.cz-empty { padding: 14px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.cz-mark { height: 4px; border-radius: 2px; background: var(--red); list-style: none; }
.cz-note { font-size: 13px; margin: 0; }
.cz-savebar { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--red); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.cz-savebar div { display: flex; gap: 8px; }
.cz-savebar .btn { min-height: 48px; }
.cz-newlist { display: grid; gap: 8px; }
.cz-nb { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.cz-nb > div:first-child { display: grid; gap: 2px; min-width: 0; }
.cz-nb .muted { font-size: 13px; }
.cz-nb-btns { display: flex; gap: 8px; }
.cz-nb-btns .btn { min-height: 44px; }
.cz-same { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin: 6px 0; font-size: 14px; }
.cz-same input { width: 20px; height: 20px; accent-color: var(--red); }
.cz-mx-wrap { overflow-x: auto; margin-top: 8px; }
.cz-mx { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 13.5px; }
.cz-mx th, .cz-mx td { border-bottom: 1px solid var(--line2); padding: 6px 8px; text-align: center; }
.cz-mx thead th { font-weight: 700; color: var(--muted); font-size: 12.5px; }
.cz-mx tbody th { text-align: left; font-weight: 500; position: sticky; left: 0; background: var(--card); min-width: 200px; }
.cz-mx td input { width: 22px; height: 22px; accent-color: var(--red); margin: 13px; cursor: pointer; }
.cz-row-btns { margin-top: 10px; }
.cz-pages { display: grid; gap: 8px; }
.cz-page { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.cz-page > span { display: grid; }
.cz-page .muted { font-size: 13px; }
.cz-page input { width: 44px; height: 24px; accent-color: var(--red); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .cz-row, .cz-chip { transition: none; } }
/* Machining (indent tick, production / QC block, new indent) */
.ind-mach { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: 13px; cursor: pointer; }
.ind-mach input { width: 20px; height: 20px; accent-color: var(--red); }
.mach-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 700; background: var(--chip); color: var(--ink2); vertical-align: middle; }
.mach-box { margin: 8px 0 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; }
.mach-box h4 { margin: 0; font-size: 14.5px; }
.mach-it { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 10px; background: var(--card2); }
.mach-it > div:first-child { display: grid; min-width: 0; }
.mach-it .muted { font-size: 12.5px; }
.mach-it.bad { border-left: 4px solid var(--red); }
.mach-it.ok { border-left: 4px solid var(--green); }
.mach-btns { display: flex; gap: 8px; align-items: center; }
.mach-btns .btn { min-height: 44px; }
.reind { margin: 8px 0; padding: 12px 14px; border: 1px solid var(--red); border-radius: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.reind .btn { min-height: 48px; }
.ind-round { margin: 10px 0 6px; padding: 8px 12px; border-radius: 10px; background: var(--chip); font-size: 13px; font-weight: 700; }
/* indent: the Machining tick is a third line under each item */
.ind-row { grid-template-areas: "sno name name qty price x" "sno spec brand sup sup ." "sno mach mach mach mach ."; }
#indRows.noprice .ind-row { grid-template-areas: "sno name name qty qty x" "sno spec brand sup sup ." "sno mach mach mach mach ."; }
@media (max-width: 760px) {
  .ind-row { grid-template-areas: "sno name name x" "sno qty price price" "sno spec spec spec" "sno brand sup sup" "sno mach mach mach"; }
  #indRows.noprice .ind-row { grid-template-areas: "sno name name x" "sno qty qty qty" "sno spec spec spec" "sno brand sup sup" "sno mach mach mach"; }
}
.ind-row .ind-mach { grid-area: mach; justify-self: start; }
.ind-old { margin: 0 0 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; font-size: 13px; color: var(--muted); }
.ind-old b { color: var(--ink); }
/* Approvals page */
.ap { display: grid; gap: 14px; }
.ap-sec h3 .badge { margin-left: 6px; vertical-align: middle; }
.ap-it { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 14px; padding: 12px 0; border-top: 1px solid var(--line2); }
.ap-it:first-of-type { border-top: 0; }
.ap-main { display: grid; gap: 4px; min-width: 0; flex: 1 1 320px; }
.ap-main .muted { font-size: 13px; }
.ap-items { font-size: 13.5px; line-height: 1.6; }
.ap-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-btns .btn { min-height: 48px; }
/* Pipeline cards: where the order is inside its step, and how late */
.tile .pt-where { display: grid; gap: 2px; margin-top: 8px; padding: 6px 8px; border-radius: 8px; background: var(--card2); font-size: 12.5px; color: var(--ink2); }
.tile .pt-time { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; font-size: 12.5px; }
.tile .pt-late { color: #fff; background: var(--red); border-radius: 10px; padding: 1px 8px; font-weight: 700; }
.tile .pt-soon { color: var(--amber); font-weight: 700; }
.lh-count { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-intro { margin: -8px 0 12px; font-size: 14px; }
/* Customize: the "All boxes" panel keeps everything inside its own width */
.cz-pal { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.cz-pal > * { min-width: 0; }
.cz-pal .lsearch { width: 100%; max-width: 100%; box-sizing: border-box; }
.cz-pal .lsearch .input { width: 100%; min-width: 0; }
.cz-chip { min-width: 0; }
.cz-chip b, .cz-chip small { overflow-wrap: anywhere; }
.cz-wrap > * { min-width: 0; }
/* Customize: "When completed, tell …" on each step, the user's own steps */
.cz-tell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cz-tell-l { font-size: 13px; font-weight: 700; margin-right: 4px; }
.cz-team { min-height: 40px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.cz-team.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.cz-tell-none { font-size: 12.5px; }
.cz-step-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cz-step-btns .btn { min-height: 44px; }
.cz-own { border-color: var(--red); }
.cz-addstep { width: 100%; justify-content: center; }
.cz-cats { display: grid; gap: 4px; }
/* boxes made in Customize: section headings, ticks for several choices, ? / % signs */
.zsechead { margin: 14px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 14.5px; letter-spacing: -.01em; }
.zmulti { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.zmulti .check { min-height: 44px; }
.zadorn { display: flex; align-items: center; gap: 6px; }
.zadorn .input { flex: 1; min-width: 0; }
.zpre, .zpost { color: var(--muted); font-weight: 700; }
textarea.input { min-height: 88px; padding-top: 10px; resize: vertical; font: inherit; }
/* Customize: new box types, box settings with preview, page names */
.cz-pal-sec { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.cz-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cz-types .cz-chip { grid-template-columns: auto 1fr; min-height: 44px; border-style: solid; cursor: grab; }
.cz-ic { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--chip); font-size: 12px; font-weight: 700; }
.cz-boxmodal { width: min(860px, calc(100vw - 32px)); }
.cz-bm-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 760px) { .cz-bm-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); } }
.cz-prev { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; align-self: start; }
.cz-prev-box .zrow { display: grid; gap: 6px; }
.cz-mm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cz-page { flex-wrap: wrap; }
.cz-pname { display: grid; gap: 4px; flex: 1 1 220px; }
.cz-sw { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; }
/* box settings: a wider window (form + live preview side by side on a PC; one column on a phone) */
.modal .box:has(.cz-boxmodal) { width: min(900px, 100%); }
.cz-boxmodal { width: 100%; }

/* the hidden calendar box under a date box stays hidden, also when the box is read-only (it showed the date twice, US style) */
.dtw .dt-native { opacity: 0 !important; }

/* reminders settings (Customize) and pending list (My tasks) */
.cz-rem-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.cz-rem-row label { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; }
.cz-rem-row .input { width: 80px; }
.tover { border-color: var(--red); }

/* who sees what (owner, 22 Nov): the New order form without price access has no price column */
.qline.noprice { grid-template-columns: minmax(0, 1fr) 150px 80px 44px; }
@media (max-width: 640px) { .qline.noprice { grid-template-columns: 1fr 44px; } }
/* who sees what (owner, 22 Nov): tags on Customize box rows, Who sees this box, home page parts by team, Access: home page */
.cz-tag { display: inline-block; align-self: flex-start; margin-top: 4px; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 700; background: var(--chip); color: var(--ink2); }
.cz-tag.money { background: rgba(239, 64, 74, .12); color: #EF404A; }
.cz-see { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.cz-see .check { min-height: 44px; }
.cz-money { margin: 2px 0 12px; font-size: 13px; }
.cz-hm-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-top: 6px; }
.cz-hm { display: grid; min-width: max-content; }
.cz-hm-row { display: grid; grid-template-columns: minmax(210px, 2.4fr) repeat(var(--n), minmax(68px, 1fr)); align-items: center; min-height: 52px; border-bottom: 1px solid var(--line); gap: 4px; }
.cz-hm-hd { min-height: 36px; font-size: 12px; color: var(--muted); font-weight: 700; }
.cz-hm-hd span:not(:first-child) { text-align: center; }
.cz-hm-p { display: flex; flex-direction: column; gap: 2px; padding-right: 8px; }
.cz-hm-p small { font-size: 12px; }
.cz-hm-c { display: grid; place-items: center; justify-self: center; width: 48px; height: 48px; cursor: pointer; }
.cz-hm-c input, .acc-home .acc-c input { width: 20px; height: 20px; }
.acc-home { margin-top: 14px; }
.acc-note .btn { margin-left: 6px; }

/* fixes (22 Nov): the page rename boxes were 44px wide (the switch rule above also hit them); the home page table fits a computer screen */
.cz-page .cz-pname .input { width: 100%; max-width: 320px; height: auto; min-height: 44px; cursor: text; accent-color: auto; }
.cz-hm { min-width: calc(220px + var(--n) * 76px); }
.cz-hm-row { grid-template-columns: minmax(220px, 1fr) repeat(var(--n), 76px); }

/* pop-ups on this computer (owner, 22 Nov): the one-time ask on entering (bottom left; Ask Meshro is bottom right), the line in the bell */
.noteask { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 80; width: min(420px, calc(100vw - 32px)); display: grid; grid-template-columns: 40px 1fr; gap: 10px 12px; align-items: start; padding: 14px 16px; border-radius: 16px; background: var(--card); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .28); }
.noteask .na-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(239, 64, 74, .12); color: #EF404A; }
.noteask .na-ic svg { width: 22px; height: 22px; }
.noteask .na-t { display: grid; gap: 4px; }
.noteask .na-t small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.noteask .na-b { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.noteask .na-b .btn { min-height: 44px; }
.bp-note { padding: 8px 16px 10px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.bp-note .btn { margin-left: 4px; }
@media (prefers-reduced-motion: no-preference) { .noteask { animation: na-in .25s ease-out; } }
@keyframes na-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* My tasks: the pop-up setting (only when off or blocked) */
.tnote { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }
.tnote .btn { min-height: 44px; }

/* readability fixes from the full check (22 Nov, WCAG): only text that was hard to read (below 3:1), using colours of
   the owner's Graphite Red palette; the palette itself is unchanged */
html[data-theme="paper"] .dev-cur { color: var(--blue); background: rgba(29, 78, 216, .10); }
html[data-theme="paper"] .vd-chips .chip.bad, html[data-theme="paper"] .cu-tags .chip.bad { color: var(--red-ink); border-color: rgba(200, 32, 44, .45); }
.tile .pt-late { background: var(--bad); color: var(--bad-ink); }
.cz-tag.money { color: var(--red-ink); }

/* production stages (owner, 22 Nov): QC check line under a stage, tags, the 2-minute take-back button */
.pstep.prow { cursor: default; }
.pstep .pqc-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; font-weight: 700; background: var(--chip); color: var(--ink2); }
.pstep .pqc-tag.opt { font-weight: 400; }
.pqc { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-left: 64px; padding: 6px 10px; border-radius: 8px; border-left: 4px solid var(--line); background: var(--card2); font-size: 12.5px; color: var(--ink2); }
.pqc.wait { border-left-color: #d97706; }
.pqc.ok { border-left-color: var(--green, #15803D); }
.pqc.bad { border-left-color: var(--red, #EF404A); }
.pqc-btns { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.undo2 { min-height: 48px; border-color: #d97706; }
.undo2 .u2t { font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .pqc { margin-left: 0; } }
/* Customize: production stages per product */
.cz-ps { display: grid; gap: 8px; margin-top: 12px; }
.cz-ps-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 56px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; }
.cz-ps-row .input { flex: 1 1 180px; min-width: 0; }
.cz-ps-row .chip { min-height: 48px; }
.cz-ps-mv { display: inline-flex; gap: 4px; margin-left: auto; }
.cz-ps-mv .btn { min-width: 48px; min-height: 48px; }
.cz-ps-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* indent change (owner, 22 Nov): lines cut from the indent, struck through */
.irow.icut, .iline.icut { opacity: .62; }
.irow.icut s, .iline.icut s { text-decoration-thickness: 2px; }
.mach-tag.cut-tag { background: rgba(239, 64, 74, .12); color: #EF404A; }
.ind-cut { display: grid; gap: 4px; margin: 0 0 12px; }
.ind-cut > b { margin-bottom: 4px; }
.ind-cutl { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 4px 8px; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 10px; cursor: pointer; }
.ind-cutl input { width: 20px; height: 20px; flex: none; }
.ind-cutl:has(input:checked) span b { text-decoration: line-through; color: #EF404A; }
.ap-items.ap-cut s { color: #EF404A; }
.itemsbox .ihd .ind-chg-btn { margin-left: auto; min-height: 48px; }
/* Settings: work-order numbers (Meshro) */
.wo-form { display: grid; gap: 4px; }
.wo-in { display: flex; align-items: center; gap: 8px; }
.wo-pre { font-weight: 700; white-space: nowrap; }
.wo-in .input { min-height: 48px; max-width: 160px; }
.wo-form .btn { min-height: 48px; justify-self: start; }
/* Team & logins: a login suspended by the security check */
.susp { color: #EF404A; font-size: 13px; margin: 2px 0 4px; }
/* ===== Contrast fix (owner approved 23 Nov): small white text gets a darker red / green behind it (WCAG 4.5:1).
   The Meshines logo and large accents keep #EF404A. ===== */
:root { --bad: #C8303B; --bad-ink: #FFFFFF; --brand: #C8303B; --ok: #15803D; --ok-ink: #FFFFFF; }
.s-d3, .pt-late, .tile .pt-late, .pct.low, .kpi .d .down, .hero-sub .down, .new-badge, .badge, .nav .badge, .tabbar .badge,
.avatar.red, .btn.primary, .btn.sm.primary, .now-tag, .chip.on, .cu-segs .chip.on, .ai-groups .chip.on, .ms-tabs .chip.on, .behind
  { background: #C8303B !important; border-color: #C8303B !important; color: #FFFFFF !important; }
.s-ontime, .pct.ok, .ahead, .kpi .d .up { background: #15803D !important; color: #FFFFFF !important; }
html[data-theme="paper"] .tmeta .down, html[data-theme="paper"] .cb-order .down, html[data-theme="paper"] .down:not(.kpi .d .down):not(.hero-sub .down) { color: #B4222D !important; }
html[data-theme="night"] .del, html[data-theme="night"] .when, html[data-theme="night"] .log-it .when { color: #9A9AA3 !important; }
html[data-theme="night"] del { color: #9A9AA3 !important; }
/* Overview: deleted orders (admin / Meshro) */
.del-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.del-kpis div { display: grid; gap: 2px; }
.del-kpis b { font-size: 24px; line-height: 1.1; }
.del-kpis span { font-size: 12.5px; color: var(--muted); }
.del-steps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* top-bar bell: bigger, taller bell drawing; button size unchanged (owner, 23 Nov) */
.bellbtn svg, .shell.zoho .bellbtn svg { width: 22px !important; height: 24px !important; }

/* Overview welcome card: bigger greeting + counts line fill the card, no empty middle (owner, 23 Nov) */
@media (min-width: 861px) {
  .hero-l { flex: 1 1 auto; }
  .hero h1 { font-size: clamp(36px, 3.4vw, 46px) !important; line-height: 1.05 !important; margin: 16px 0 14px !important; }
  .hero p.hero-sub { font-size: 16px !important; line-height: 1.5; }
  .hero p.hero-sub .down { font-size: 14px; }
  .hero-actions { margin-top: 24px; }
  .hero-ring { margin-right: 48px; }
  .hero-ring svg { width: 180px; height: 180px; }
  .hero-ring .ring-v { font-size: 34px; }
  .hero-ring .ring-c .lbl { font-size: 11.5px !important; }
  .hero-ring .ring-n { font-size: 14px; }
  .hero { padding-left: 76px !important; }   /* same gap as the circle has on the right (28 + 48) */
}

/* top-bar bell styled like the active menu item: red bell, soft red tint, faint red edge (owner, 23 Nov night) */
.bellbtn, .shell.zoho .bellbtn { color: #EF404A !important; background: rgba(239,64,74,.12) !important; border-color: rgba(239,64,74,.22) !important; border-radius: 10px; }
.bellbtn:hover, .shell.zoho .bellbtn:hover { background: rgba(239,64,74,.18) !important; border-color: rgba(239,64,74,.35) !important; }
.bellbtn svg, .shell.zoho .bellbtn svg { width: 24px !important; height: 26px !important; stroke-width: 2.1; }
@media (min-width: 861px) { .shell.zoho .ztop-r .bellbtn { width: 42px; height: 42px; } }
html[data-theme="paper"] .bellbtn, html[data-theme="paper"] .shell.zoho .bellbtn { color: #C41E2D !important; background: rgba(239,64,74,.09) !important; border-color: rgba(239,64,74,.18) !important; }

/* top bar: "Notifications" box like the active Overview menu item - red bell, word, red number badge (owner, 23 Nov night) */
.shell.zoho .ztop-r .bellbtn { width: auto; min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; gap: 9px; color: #fff !important; font: 700 14.5px/1 var(--font, inherit); white-space: nowrap; }
.shell.zoho .ztop-r .bellbtn svg { color: #EF404A; flex: none; }
.shell.zoho .ztop-r .bellbtn .bellN { position: static; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: #CF2B36; color: #fff; font: 700 12px/22px var(--font, inherit); text-align: center; box-shadow: none; }
.shell.zoho .ztop-r .bellbtn .bellN[hidden] { display: none; }
.bellT { display: none; }
.shell.zoho .ztop-r .bellbtn .bellT { display: inline; }
html[data-theme="paper"] .shell.zoho .ztop-r .bellbtn { color: #1D1D1F !important; }
html[data-theme="paper"] .shell.zoho .ztop-r .bellbtn svg { color: #C41E2D; }
