/* Ponto Norte · Painel de pedidos e estoque (demonstração ZENT, marca fictícia) */
:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --line: #e3e7f0;
  --line-2: #d3d9e6;
  --ink: #0d1324;
  --ink-2: #2f3a52;
  --muted: #586379;
  --primary: #3346d3;
  --primary-600: #2536b5;
  --primary-soft: #eef0fe;
  --primary-ring: rgba(51, 70, 211, 0.28);
  --side: #0b1124;
  --side-2: #131a33;
  --side-line: rgba(255, 255, 255, 0.07);
  --side-text: #d3d8ec;
  --side-muted: #98a1c2;
  --novo-bg: #eceefe; --novo-ink: #3730a3; --novo-dot: #5b5ef0;
  --sep-bg: #fff3dc; --sep-ink: #8a3c06; --sep-dot: #f59e0b;
  --agu-bg: #e3f4fc; --agu-ink: #0b5a82; --agu-dot: #0ea5e9;
  --env-bg: #f2e9fe; --env-ink: #6b21a8; --env-dot: #a855f7;
  --ent-bg: #e5f6ec; --ent-ink: #15633a; --ent-dot: #22c55e;
  --warn-bg: #fff5e6; --warn-ink: #8a3c06; --warn-line: #f6d39a;
  --danger-bg: #fdecec; --danger-ink: #a11a1a; --danger: #e5484d;
  --ok: #18a058;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow-1: 0 1px 2px rgba(13, 19, 36, 0.05), 0 1px 1px rgba(13, 19, 36, 0.03);
  --shadow-2: 0 1px 2px rgba(13, 19, 36, 0.05), 0 8px 24px -12px rgba(13, 19, 36, 0.16);
  --shadow-3: 0 24px 60px -20px rgba(13, 19, 36, 0.35), 0 8px 20px -10px rgba(13, 19, 36, 0.18);
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Sora", "Inter", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--sans); font-feature-settings: "cv11" 1, "ss03" 1; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.noscript { margin: 24px; padding: 16px; border-radius: var(--r-md); background: var(--warn-bg); color: var(--warn-ink); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip:focus { top: 12px; }

/* ---------- Aviso fora da moldura ---------- */
.zent-bar { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; align-items: center; padding: 9px 16px; font-size: 13px; color: #e8e6ff; background: #1b1238; }
.zent-bar a { color: #d8ccff; font-weight: 600; }
.in-frame .zent-bar { display: none; }

/* ---------- Estrutura (computador: aplicativo do tamanho da tela) ---------- */
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.app { flex: 1; min-height: 0; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.content { flex: 1; min-height: 0; overflow: auto; padding: 20px 24px 24px; outline: none; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.view[hidden] { display: none !important; }
.view { animation: viewIn 0.45s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Barra lateral ---------- */
.side { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px 14px; color: var(--side-text); background: radial-gradient(120% 60% at 0% 0%, rgba(91, 94, 240, 0.22), transparent 60%), linear-gradient(180deg, var(--side) 0%, #0d1430 100%); border-right: 1px solid #070b18; overflow: hidden; }
.side::after { content: ""; position: absolute; inset: auto -40% -30% -40%; height: 50%; background: radial-gradient(closest-side, rgba(14, 165, 233, 0.12), transparent); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 10px; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; background: linear-gradient(140deg, #5b5ef0 0%, #3346d3 55%, #1e2a9c 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 18px -6px rgba(91, 94, 240, 0.8); }
.brand-mark svg { width: 22px; height: 22px; }
.brand-mark.sm { width: 30px; height: 30px; border-radius: 9px; }
.brand-mark.sm svg { width: 18px; height: 18px; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font: 650 15.5px/1.2 var(--display); letter-spacing: -0.02em; color: #fff; }
.brand-text span { font-size: 12px; color: var(--side-muted); }
.workspace { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; padding: 8px 10px; font-size: 12.5px; font-weight: 550; color: var(--side-text); border: 1px solid var(--side-line); border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.workspace .ic { width: 15px; height: 15px; color: var(--side-muted); }
.side-label { margin: 12px 8px 6px; font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--side-muted); }
.side-nav ul { display: grid; gap: 2px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 8px 10px; border-radius: 10px; color: var(--side-text); font-weight: 550; text-decoration: none; transition: background-color 0.2s, color 0.2s; }
.side-nav a .ic { color: var(--side-muted); transition: color 0.2s; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.side-nav a[aria-current="page"] { color: #fff; background: linear-gradient(90deg, rgba(91, 94, 240, 0.3), rgba(91, 94, 240, 0.08)); box-shadow: inset 0 0 0 1px rgba(140, 146, 255, 0.22); }
.side-nav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #8c92ff; }
.side-nav a[aria-current="page"] .ic { color: #c7cbff; }
.side-nav span { flex: 1; }
.badge { min-width: 24px; padding: 1px 7px; font-size: 11.5px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; border-radius: 999px; color: #dfe3ff; background: rgba(255, 255, 255, 0.1); }
.badge.is-alert { color: #3b1d00; background: #fbbf24; }
.badge.is-alert[data-zero] { color: #dfe3ff; background: rgba(255, 255, 255, 0.1); }
.side-foot { margin-top: auto; display: grid; gap: 10px; position: relative; z-index: 1; }
.sync { display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: 12px; color: var(--side-muted); }
.pulse, .live-dot { position: relative; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--ok); }
.pulse::after, .live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok); opacity: 0; animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { transform: scale(0.5); opacity: 0.7; } 80%, 100% { transform: scale(1.4); opacity: 0; } }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--side-line); background: rgba(255, 255, 255, 0.04); }
.me-text { display: grid; min-width: 0; line-height: 1.25; }
.me-text strong { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-text span { font-size: 12px; color: var(--side-muted); }
.sample-tag { justify-self: start; margin-left: 4px; padding: 2px 8px; font-size: 11px; font-weight: 600; border-radius: 6px; color: var(--side-muted); border: 1px dashed rgba(152, 161, 194, 0.45); }

.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em; color: #fff; background: var(--av, #64748b); }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.av-me { --av: linear-gradient(135deg, #f472b6, #a855f7); background: var(--av); }
.av-bruna { --av: #c2410c; }
.av-diego { --av: #0f766e; }
.av-lia { --av: #6d28d9; }
.av-otavio { --av: #1d4ed8; }
.av-none { --av: transparent; color: var(--muted); border: 1.5px dashed var(--line-2); }

/* ---------- Topo ---------- */
.top { display: flex; align-items: center; gap: 14px; padding: 14px 24px; background: rgba(255, 255, 255, 0.82); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); position: relative; z-index: 5; }
.top-mobile { display: none; }
.title { min-width: 0; margin-right: auto; }
.title h1 { font: 650 22px/1.15 var(--display); letter-spacing: -0.03em; }
.sub { white-space: nowrap; display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.search { position: relative; display: flex; align-items: center; width: 220px; flex: 0 1 220px; min-width: 150px; }
.search .ic { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 0 30px 0 34px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-1); transition: border-color 0.2s, box-shadow 0.2s; }
.search input::placeholder { color: #6b7488; }
.search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { position: absolute; right: 9px; display: grid; place-items: center; min-width: 20px; height: 20px; font: 600 11px/1 var(--sans); color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2); }
.role { display: flex; align-items: center; gap: 8px; }
.role-label { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg { display: flex; padding: 3px; border-radius: 11px; background: #e8ebf3; box-shadow: inset 0 1px 2px rgba(13, 19, 36, 0.06); }
.seg button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: transparent; transition: background-color 0.2s, color 0.2s, box-shadow 0.2s; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(13, 19, 36, 0.12), 0 2px 8px -2px rgba(13, 19, 36, 0.12); }
.top-actions { display: flex; align-items: center; gap: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; font-size: 13.5px; font-weight: 600; white-space: nowrap; transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s, color 0.2s; }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { color: #fff; background: linear-gradient(180deg, #4053e0, var(--primary)); border-color: var(--primary-600); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 6px 16px -8px rgba(51, 70, 211, 0.8); }
.btn-primary:hover { background: linear-gradient(180deg, #3a4cd8, var(--primary-600)); }
.btn-outline { color: var(--ink); background: var(--surface); border-color: var(--line-2); box-shadow: var(--shadow-1); }
.btn-outline:hover { border-color: #b9c1d4; background: var(--surface-2); }
.btn-ghost { color: var(--ink-2); background: transparent; }
.btn-ghost:hover { background: #eef0f6; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn[aria-disabled="true"], .icon-btn[aria-disabled="true"] { cursor: not-allowed; color: #6b7488; background: #eef0f5; border-color: var(--line); box-shadow: none; }
.btn[aria-disabled="true"]:active { transform: none; }
.icon-btn { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-1); }
.icon-btn:hover { background: var(--surface-2); }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; font-size: 11px; font-weight: 700; border-radius: 999px; color: #fff; background: var(--danger-ink); border: 2px solid var(--surface); }
.bell-count[data-zero] { display: none; }

/* Dica de permissão (aparece ao passar o mouse ou focar uma ação bloqueada) */
.tip { position: relative; }
.tip[aria-disabled="true"]::after { content: attr(data-tip); position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: max-content; max-width: 240px; padding: 8px 10px; font-size: 12px; font-weight: 500; line-height: 1.4; text-align: left; white-space: normal; color: #fff; background: var(--ink); border-radius: 8px; box-shadow: var(--shadow-2); opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.15s, transform 0.15s; }
.tip[aria-disabled="true"]:hover::after, .tip[aria-disabled="true"]:focus-visible::after { opacity: 1; transform: none; }
.tip.tip-up[aria-disabled="true"]::after { top: auto; bottom: calc(100% + 8px); }
.lock-ic { width: 14px; height: 14px; }

/* ---------- Cartões ---------- */
.card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px; }
.card-head h2 { font: 650 15px/1.3 var(--display); letter-spacing: -0.015em; }
.card-sub { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.link-sm { font-size: 12.5px; font-weight: 600; color: var(--primary-600); text-decoration: none; }
.link-sm:hover { text-decoration: underline; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { position: relative; overflow: hidden; padding: 14px 16px 12px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--k, var(--primary)); opacity: 0.9; }
.kpi-top { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.kpi-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--k-ink, var(--primary)); background: var(--k-bg, var(--primary-soft)); }
.kpi-ic .ic { width: 15px; height: 15px; }
.delta { margin-left: auto; padding: 1px 7px; font-size: 11.5px; font-weight: 650; border-radius: 999px; font-variant-numeric: tabular-nums; }
.delta.up { color: #15633a; background: #e5f6ec; }
.delta.down { color: #a11a1a; background: var(--danger-bg); }
.kpi-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 10px; }
.kpi-val { font: 650 28px/1 var(--display); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.kpi-val small { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--muted); margin-right: 2px; }
.kpi-val.is-bump { animation: bump 0.6s var(--ease); }
@keyframes bump { 40% { transform: translateY(-3px); color: var(--primary); } }
.kpi-note { margin-top: 6px; font-size: 12px; color: var(--muted); }
.spark { width: 96px; height: 34px; flex: none; overflow: visible; }
.spark .area { fill: var(--k-bg, var(--primary-soft)); }
.spark .line { fill: none; stroke: var(--k, var(--primary)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .end { fill: var(--surface); stroke: var(--k, var(--primary)); stroke-width: 2; }
.kpi-lock { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); border-radius: 10px; background: repeating-linear-gradient(135deg, #f1f3f8 0 6px, #f7f8fb 6px 12px); border: 1px dashed var(--line-2); }
.k-novo { --k: var(--novo-dot); --k-bg: var(--novo-bg); --k-ink: var(--novo-ink); }
.k-sep { --k: var(--sep-dot); --k-bg: var(--sep-bg); --k-ink: var(--sep-ink); }
.k-agu { --k: var(--agu-dot); --k-bg: var(--agu-bg); --k-ink: var(--agu-ink); }
.k-ent { --k: var(--ent-dot); --k-bg: var(--ent-bg); --k-ink: var(--ent-ink); }
.k-rev { --k: var(--primary); --k-bg: var(--primary-soft); --k-ink: var(--primary-600); }

/* Layout pedidos */
.view-pedidos { display: flex; flex-direction: column; min-height: 100%; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 14px; flex: 1; min-height: 0; }
.split-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 14px; }
.orders { min-height: 0; }
.orders .card-head { flex-wrap: wrap; align-items: flex-end; border-bottom: 1px solid var(--line); }
.rail { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.feed { flex: 1; min-height: 0; overflow: hidden; }

/* Filtros */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--ink-2); transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.chip:hover { border-color: #b9c1d4; }
.chip b { font-weight: 650; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip .sdot { width: 7px; height: 7px; border-radius: 50%; background: var(--d, var(--muted)); }
.chip[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.chip[aria-pressed="true"] b { color: #c4cad9; }

/* Tabela */
.tbl-wrap { position: relative; flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl th { position: sticky; top: 0; z-index: 1; padding: 0 12px; height: 38px; text-align: left; font-size: 11.5px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: rgba(248, 249, 252, 0.96); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl th button { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.tbl th button:hover { color: var(--ink); }
.sort-ic { width: 13px; height: 13px; opacity: 0; transition: opacity 0.2s, transform 0.2s; }
.tbl th button:hover .sort-ic { opacity: 0.5; }
.tbl th[aria-sort="ascending"] .sort-ic, .tbl th[aria-sort="descending"] .sort-ic { opacity: 1; color: var(--primary); }
.tbl th[aria-sort="descending"] .sort-ic { transform: rotate(180deg); }
.tbl th[aria-sort="ascending"], .tbl th[aria-sort="descending"] { color: var(--ink); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid #edf0f6; vertical-align: middle; }
.tbl tbody tr { transition: background-color 0.25s; }
.tbl-orders tbody tr, .tbl [data-row] { cursor: pointer; }
.tbl tbody tr:hover { background: #f7f8fd; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.is-new { animation: rowNew 2.6s var(--ease); }
@keyframes rowNew { 0% { background: #dfe3ff; } 100% { background: transparent; } }
.tbl tr.is-changed .pill { animation: pillPop 0.9s var(--ease); }
@keyframes pillPop { 30% { transform: scale(1.08); box-shadow: 0 0 0 5px var(--ring, rgba(91, 94, 240, 0.18)); } }
.oid { display: inline-flex; padding: 3px 6px; margin: -3px -6px; border: 0; border-radius: 6px; background: none; font: 650 13px/1.2 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.oid:hover { color: var(--primary-600); background: var(--primary-soft); }
.cli { display: grid; line-height: 1.3; min-width: 0; }
.cli strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.cli span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.cli span b { font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cli .oid { justify-self: start; max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.who-none { font-size: 12.5px; color: var(--muted); font-style: italic; }
.money { font-weight: 600; white-space: nowrap; }
.restricted { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.due { font-weight: 600; white-space: nowrap; }
.due.is-late { color: var(--danger-ink); }
.due small { display: block; font-size: 11.5px; font-weight: 550; color: var(--muted); }
.due.is-late small { color: var(--danger-ink); }

/* Pílula de situação */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; color: var(--p-ink); background: var(--p-bg); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--p-dot); box-shadow: 0 0 0 2px color-mix(in srgb, var(--p-dot) 22%, transparent); }
.s-novo { --p-ink: var(--novo-ink); --p-bg: var(--novo-bg); --p-dot: var(--novo-dot); --d: var(--novo-dot); }
.s-separacao { --p-ink: var(--sep-ink); --p-bg: var(--sep-bg); --p-dot: var(--sep-dot); --d: var(--sep-dot); }
.s-aguardando { --p-ink: var(--agu-ink); --p-bg: var(--agu-bg); --p-dot: var(--agu-dot); --d: var(--agu-dot); }
.s-enviado { --p-ink: var(--env-ink); --p-bg: var(--env-bg); --p-dot: var(--env-dot); --d: var(--env-dot); }
.s-entregue { --p-ink: var(--ent-ink); --p-bg: var(--ent-bg); --p-dot: var(--ent-dot); --d: var(--ent-dot); }
.s-critico { --p-ink: var(--danger-ink); --p-bg: var(--danger-bg); --p-dot: var(--danger); }
.s-baixo { --p-ink: var(--sep-ink); --p-bg: var(--sep-bg); --p-dot: var(--sep-dot); }
.s-ok { --p-ink: var(--ent-ink); --p-bg: var(--ent-bg); --p-dot: var(--ent-dot); }
.s-compra { --p-ink: var(--novo-ink); --p-bg: var(--novo-bg); --p-dot: var(--novo-dot); }

/* Cartões de pedido (celular) */
.ocards { display: none; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); }

/* Atividade */
.live-chip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 9px; font-size: 11.5px; font-weight: 650; border-radius: 999px; color: #15633a; background: #e5f6ec; }
.live-chip .live-dot { width: 6px; height: 6px; }
.feed-list { position: relative; padding: 0 16px 14px; overflow: auto; flex: 1; min-height: 0; scrollbar-width: thin; }
.feed-list li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; padding: 9px 0; }
.feed-list li + li { border-top: 1px dashed #e6e9f1; }
.feed-list li.is-new { animation: feedIn 0.6s var(--ease); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-8px); } }
.f-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--p-ink, var(--ink-2)); background: var(--p-bg, #eef0f5); }
.f-ic .ic { width: 15px; height: 15px; }
.f-body { min-width: 0; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.f-body strong { color: var(--ink); font-weight: 650; }
.f-time { display: block; margin-top: 1px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Estoque crítico (resumo) */
.crit-list { padding: 0 16px 14px; display: grid; gap: 10px; }
.crit-list li { display: grid; gap: 5px; }
.crit-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.crit-top strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crit-top span { flex: none; font-weight: 650; color: var(--danger-ink); font-variant-numeric: tabular-nums; }
.crit-top span.is-low { color: var(--sep-ink); }

/* Barra de estoque */
.bar { position: relative; height: 8px; border-radius: 999px; background: #edf0f6; overflow: visible; }
.bar i { position: absolute; inset: 0 auto 0 0; width: var(--w, 50%); border-radius: inherit; background: var(--bar, var(--ok)); transition: width 0.8s var(--ease); }
.bar b { position: absolute; top: -3px; bottom: -3px; left: var(--m, 30%); width: 2px; border-radius: 2px; background: var(--ink-2); }
.bar.is-crit { --bar: linear-gradient(90deg, #e5484d, #f87171); }
.bar.is-low { --bar: linear-gradient(90deg, #f59e0b, #fbbf24); }
.bar.is-ok { --bar: linear-gradient(90deg, #18a058, #4ade80); }

/* ---------- Estoque ---------- */
.alert-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: linear-gradient(90deg, #fff6e6, #fffaf2); border: 1px solid var(--warn-line); box-shadow: var(--shadow-1); color: var(--warn-ink); }
.alert-banner .ab-ic { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 11px; background: #fde5b8; }
.alert-banner p { font-size: 13px; line-height: 1.45; color: #5c2a06; }
.alert-banner strong { color: var(--warn-ink); }
.alert-banner .btn { margin-left: auto; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.stat { padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.stat p { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.stat strong { display: block; margin-top: 6px; font: 650 24px/1.1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.lg-min { width: 2px; height: 12px; border-radius: 2px; background: var(--ink-2); }
.tbl-stock td { padding-top: 11px; padding-bottom: 11px; }
.prod { display: grid; line-height: 1.3; }
.prod strong { font-weight: 600; }
.prod span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stock-cell { display: grid; gap: 6px; min-width: 170px; }
.stock-cell span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stock-cell span strong { color: var(--ink); font-weight: 650; }

/* ---------- Equipe ---------- */
.team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.member { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.member-top { display: flex; align-items: center; gap: 11px; }
.member-top div { display: grid; line-height: 1.3; min-width: 0; }
.member-top strong { font-weight: 650; }
.member-top span { font-size: 12px; color: var(--muted); }
.load { display: grid; gap: 6px; }
.load-row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); }
.load-row b { font-variant-numeric: tabular-nums; }
.member .bar { height: 7px; }
.member .bar i { --bar: linear-gradient(90deg, #5b5ef0, #8c92ff); }
.member .bar.is-full i { --bar: linear-gradient(90deg, #f59e0b, #fbbf24); }
.mchips { display: flex; flex-wrap: wrap; gap: 5px; min-height: 26px; }
.mchips span { padding: 2px 7px; font-size: 11.5px; font-weight: 650; border-radius: 6px; color: var(--p-ink); background: var(--p-bg); font-variant-numeric: tabular-nums; }
.mchips .none { color: var(--muted); background: none; font-weight: 500; padding-left: 0; }
.queue { padding: 0 16px 14px; display: grid; gap: 8px; }
.queue li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); }
.queue li.is-new { animation: feedIn 0.6s var(--ease); }
.queue .cli { flex: 1; }
.queue-empty { justify-content: center; color: var(--muted); font-size: 13px; }
.perm { font-size: 13px; }
.perm th, .perm td { padding: 10px 12px; }
.perm thead th { position: static; text-align: center; }
.perm thead th:first-child { text-align: left; }
.perm tbody th { position: static; height: auto; text-align: left; font-size: 13px; font-weight: 550; letter-spacing: 0; text-transform: none; color: var(--ink-2); background: none; border-bottom: 1px solid #edf0f6; }
.perm td { text-align: center; }
.perm .is-me { background: var(--primary-soft); }
.perm thead .is-me { color: var(--primary-600); background: #e4e7fd; }
.perm tbody tr:hover { background: transparent; }
.yes, .no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; }
.yes { color: #15633a; background: #dcf3e5; }
.no { color: #7b8499; background: #eef0f5; }
.yes .ic, .no .ic { width: 14px; height: 14px; }

/* ---------- Relatórios ---------- */
.reports { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.r-line { grid-column: span 4; }
.r-status { grid-column: span 2; }
.r-bars { grid-column: span 3; }
.r-rev { grid-column: span 3; }
.r-model { grid-column: 1 / -1; }
.chart { padding: 0 16px 16px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.big-num { font: 650 24px/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; text-align: right; }
.big-num span { display: block; margin-top: 4px; font: 600 12px/1 var(--sans); letter-spacing: 0; color: #15633a; }
.ax { font: 500 11px var(--sans); fill: #5d6780; }
.grid-l { stroke: #e9ecf3; stroke-width: 1; }
.c-area { fill: url(#gArea); }
.c-line { fill: none; stroke: var(--primary); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.c-dot { fill: var(--surface); stroke: var(--primary); stroke-width: 2; }
.c-peak { fill: var(--primary); }
.c-tag rect { fill: var(--ink); }
.c-tag text { font: 650 11px var(--sans); fill: #fff; }
.hbar-name { font: 600 12px var(--sans); fill: var(--ink-2); }
.hbar-val { font: 650 12px var(--sans); fill: var(--ink); }
.hbar-bg { fill: #eef0f6; }
.stack { display: grid; gap: 14px; }
.stack-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #eef0f6; }
.stack-bar i { display: block; height: 100%; width: var(--w); background: var(--p-dot); transition: width 0.8s var(--ease); }
.stack-bar i + i { box-shadow: inset 2px 0 0 #fff; }
.stack-legend { display: grid; gap: 8px; }
.stack-legend li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.stack-legend li::before { content: ""; width: 9px; height: 9px; border-radius: 3px; background: var(--p-dot); }
.stack-legend b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink); }
.rev-lock { display: grid; place-items: center; gap: 8px; min-height: 170px; padding: 16px; text-align: center; border-radius: 12px; color: var(--ink-2); font-size: 13px; background: repeating-linear-gradient(135deg, #f1f3f8 0 8px, #f8f9fc 8px 16px); border: 1px dashed var(--line-2); }
.rev-lock .ic { width: 22px; height: 22px; color: var(--muted); }

/* Modelo de dados */
.model { position: relative; padding: 4px 16px 18px; }
.model svg { display: block; width: 100%; height: auto; }
.m-box rect { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; }
.m-box .m-head { fill: var(--surface-2); stroke: none; }
.m-box.is-key rect.m-frame { stroke: var(--primary); stroke-width: 1.6; }
.m-title { font: 700 13px var(--display); fill: var(--ink); letter-spacing: -0.01em; }
.m-field { font: 500 11.5px var(--sans); fill: var(--ink-2); }
.m-pk { font: 650 11.5px var(--sans); fill: var(--primary-600); }
.m-link { fill: none; stroke: #9aa5c4; stroke-width: 1.5; stroke-dasharray: 4 4; }
.m-card { font: 700 11px var(--sans); fill: var(--primary-600); }
.m-flow { fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-dasharray: 4 8; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }

/* ---------- Gaveta (detalhe do pedido) ---------- */
dialog { color: var(--ink); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(440px, 100vw); max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-3); }
.drawer[open] { animation: drawerIn 0.38s var(--ease); }
@keyframes drawerIn { from { transform: translateX(40px); opacity: 0; } }
.drawer::backdrop, .modal::backdrop { background: rgba(10, 15, 32, 0.38); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.dr-inner { display: flex; flex-direction: column; height: 100%; }
.dr-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.dr-head > div { flex: 1; min-width: 0; }
.dr-kicker { font-size: 12px; font-weight: 600; color: var(--muted); }
.dr-head h2 { margin-top: 2px; font: 650 21px/1.2 var(--display); letter-spacing: -0.03em; }
.dr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.dr-close { width: 36px; height: 36px; }
.dr-body { flex: 1; min-height: 0; overflow: auto; padding: 16px 20px 20px; display: grid; align-content: start; gap: 18px; }
.dr-sec h3 { margin-bottom: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.steps li { display: grid; gap: 6px; font-size: 11px; font-weight: 600; line-height: 1.25; color: var(--muted); }
.steps li::before { content: ""; height: 5px; border-radius: 999px; background: #e6e9f1; }
.steps li.is-done { color: var(--ink-2); }
.steps li.is-done::before { background: var(--primary); }
.steps li[aria-current="step"] { color: var(--primary-600); }
.steps li[aria-current="step"]::before { background: linear-gradient(90deg, var(--primary), #8c92ff); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 5px; }
.field label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.select { position: relative; }
.select select { width: 100%; height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); appearance: none; -webkit-appearance: none; font-size: 13px; font-weight: 550; }
.select select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring); }
.select select:disabled { color: #6b7488; background: #eef0f5; cursor: not-allowed; }
.select .ic { position: absolute; right: 11px; top: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.field-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.client-card { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; }
.client-card dt { color: var(--muted); }
.client-card dd { margin: 0; font-weight: 550; text-align: right; }
.items li { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #edf0f6; font-size: 13px; }
.items li:last-child { border-bottom: 0; }
.it-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #f1f3f9; color: var(--ink-2); }
.it-ic .ic { width: 17px; height: 17px; }
.items .prod span { font-size: 12px; }
.items .qty { font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.items .qty span { display: block; font-size: 11.5px; font-weight: 550; color: var(--muted); }
.items-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2); font-weight: 650; }
.timeline { position: relative; display: grid; gap: 12px; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: #e6e9f1; }
.timeline li { position: relative; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--p-dot, var(--primary)); }
.timeline li:first-child::before { background: var(--p-dot, var(--primary)); }
.timeline li.is-new { animation: feedIn 0.5s var(--ease); }
.timeline time { display: block; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dr-foot { display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface-2); }
.dr-foot .btn-primary { flex: 1; }

/* ---------- Modal de exportação ---------- */
.modal { width: min(520px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-3); }
.modal[open] { animation: modalIn 0.32s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.modal-inner { display: grid; gap: 16px; padding: 22px; }
.mh { display: flex; align-items: flex-start; gap: 12px; }
.mh > div { flex: 1; }
.mh h2 { font: 650 19px/1.25 var(--display); letter-spacing: -0.025em; }
.mh p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.m-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; color: var(--primary-600); background: var(--primary-soft); }
.m-ic.is-ok { color: #15633a; background: #dcf3e5; }
.cols { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.cols legend { margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cb { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface); cursor: pointer; }
.cb input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.cb:has(input:checked) { border-color: #b9c0f6; background: var(--primary-soft); color: var(--primary-600); }
.cb:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.cb:has(input:disabled) { cursor: not-allowed; color: #6b7488; background: #eef0f5; }
.preview { overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: #0d1324; }
.preview p { padding: 8px 12px; font-size: 11.5px; font-weight: 600; color: #aab3cc; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.preview pre { margin: 0; padding: 10px 12px 12px; overflow: auto; font: 500 11.5px/1.6 ui-monospace, "Cascadia Code", Consolas, monospace; color: #d6dcf0; white-space: pre; }
.audit { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; }
.audit dt { color: var(--muted); }
.audit dd { margin: 0; font-weight: 600; }
.m-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Avisos ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; gap: 12px; padding: 12px 14px; border-radius: 14px; color: #e9ecf8; background: rgba(13, 19, 36, 0.94); box-shadow: var(--shadow-3); font-size: 13px; line-height: 1.45; pointer-events: auto; animation: toastIn 0.45s var(--ease); }
.toast.is-out { animation: toastOut 0.35s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
.toast strong { display: block; color: #fff; font-weight: 650; }
.t-ic { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; color: #fde68a; background: rgba(251, 191, 36, 0.16); }
.t-ic.is-ok { color: #86efac; background: rgba(34, 197, 94, 0.16); }
.t-ic.is-info { color: #c7cbff; background: rgba(140, 146, 255, 0.18); }
.t-ic .ic { width: 16px; height: 16px; }

/* ---------- Barra inferior (celular) ---------- */
.tabbar { display: none; }

/* ---------- Telas médias ---------- */
@media (max-width: 1180px) {
  .top { flex-wrap: wrap; }
  .search { width: 200px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .rail { flex-direction: row; }
  .rail > * { flex: 1; }
  .feed-list { max-height: 300px; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-even { grid-template-columns: minmax(0, 1fr); }
  .orders { min-height: 420px; }
}
@media (max-width: 1000px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .brand-text, .workspace span, .side-label, .side-nav span, .badge, .sync span:last-child, .me-text, .sample-tag { display: none; }
  .side { align-items: center; padding: 16px 10px; }
  .brand { padding: 4px 0 10px; }
  .workspace { padding: 8px; margin: 0 0 6px; }
  .side-nav a { justify-content: center; width: 48px; padding: 10px; }
  .side-nav a[aria-current="page"]::before { left: -10px; }
  .me { padding: 6px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reports { grid-template-columns: minmax(0, 1fr); }
  .reports > * { grid-column: auto; }
}

/* ---------- Celular ---------- */
@media (max-width: 767px) {
  body { display: block; height: auto; overflow: visible; }
  .app { display: block; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .side { display: none; }
  .main { display: block; }
  .content { overflow: visible; padding: 14px 14px 20px; }
  .top { position: sticky; top: 0; flex-wrap: wrap; gap: 10px; padding: 10px 14px 12px; }
  .top-mobile { display: flex; align-items: center; gap: 9px; width: 100%; }
  .tm-name { flex: 1; font: 650 15px/1 var(--display); letter-spacing: -0.02em; }
  .title { width: 100%; margin: 4px 0 0; }
  .title h1 { font-size: 24px; }
  .search { width: 100%; order: 5; }
  .search input { height: 42px; font-size: 16px; }
  .search kbd { display: none; }
  .role { width: 100%; order: 4; }
  .role-label { display: none; }
  .seg { flex: 1; }
  .seg button { flex: 1; min-height: 38px; padding: 0 6px; }
  .top-actions { position: absolute; right: 14px; top: 10px; }
  .top-actions .btn span { display: none; }
  .top-actions .btn { width: 40px; min-height: 40px; padding: 0; }
  .top-actions .icon-btn { width: 40px; height: 40px; }
  .top-mobile .avatar { display: none; }
  .tip[aria-disabled="true"]::after { right: -48px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
  .kpi { padding: 12px; }
  .kpi-top { font-size: 12px; }
  .kpi-top .delta { display: none; }
  .kpi-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .kpi-val { font-size: 24px; }
  .spark { width: 100%; height: 28px; }
  .spark .end { display: none; }
  .kpi-note { display: none; }
  .kpi-lock { margin-top: 10px; font-size: 12px; }
  .split { display: grid; gap: 12px; }
  .rail { flex-direction: column; }
  .orders { min-height: 0; }
  .orders .card-head { padding: 14px 14px 12px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 28px); margin: 2px -14px 0; padding: 2px 14px 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; min-height: 36px; }
  .tbl-wrap { overflow: visible; }
  .orders .tbl { display: none; }
  .ocards { display: grid; gap: 10px; padding: 12px; }
  .ocard { display: grid; gap: 10px; width: 100%; padding: 13px 14px; text-align: left; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); }
  .ocard.is-new { animation: rowNew 2.6s var(--ease); }
  .oc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
  .oc-id { font-weight: 700; font-variant-numeric: tabular-nums; }
  .oc-mid { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .oc-bot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px dashed #e6e9f1; font-size: 12.5px; color: var(--muted); }
  .feed-list { max-height: none; }
  .stats { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .alert-banner { flex-wrap: wrap; }
  .alert-banner .btn { margin-left: 52px; }
  .tbl-stock thead { display: none; }
  .tbl-stock, .tbl-stock tbody, .tbl-stock tr, .tbl-stock td { display: block; }
  .tbl-stock tr { position: relative; padding: 12px 14px; border-bottom: 1px solid #edf0f6; }
  .tbl-stock td { padding: 3px 0; border: 0; text-align: left; }
  .tbl-stock td.num { text-align: left; }
  .tbl-stock td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
  .tbl-stock td:first-child { margin-bottom: 4px; }
  .tbl-stock .stock-cell { min-width: 0; }
  .tbl-stock td:last-child { margin-top: 8px; }
  .team { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .card-head { flex-wrap: wrap; }
  .perm th, .perm td { padding: 9px 8px; }
  .perm { font-size: 12.5px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.92); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; min-height: 52px; padding: 6px 4px; border-radius: 12px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--primary-600); background: var(--primary-soft); }
  .dot-badge { position: absolute; top: 6px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: #f59e0b; border: 2px solid #fff; }
  .drawer { inset: auto 0 0 0; width: 100%; height: auto; max-height: 90dvh; border-left: 0; border-radius: 22px 22px 0 0; }
  .drawer[open] { animation: sheetIn 0.4s var(--ease); }
  @keyframes sheetIn { from { transform: translateY(40px); opacity: 0; } }
  .dr-inner { max-height: 90dvh; }
  .dr-head { padding: 22px 16px 12px; }
  .dr-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line-2); }
  .dr-body { padding: 14px 16px 16px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .dr-foot { padding-left: 16px; padding-right: 16px; }
  .modal-inner { padding: 18px; }
  .m-actions { flex-direction: column-reverse; }
  .m-actions .btn { width: 100%; min-height: 44px; }
  .toasts { left: 16px; right: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); width: auto; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
