/* Painel Cobrão — padrões copiados da identidade do sistema (docs/identidade-visual.md, D-177 a D-180).
   Três camadas: paleta → papéis → componentes. Componentes só usam os papéis. */
:root {
  /* 1. PALETA BASE */
  --of-orange-500: #f97316;
  --of-orange-600: #c45000;
  --of-orange-700: #a84400;
  --of-blue-600: #0066cc;
  --of-green-700: #177a33;
  --of-amber-800: #856404;
  --of-red-700: #c4001a;

  /* 2. PAPÉIS */
  --of-primary: var(--of-orange-600);
  --of-primary-hover: var(--of-orange-700);
  --of-primary-text: var(--of-orange-700);
  --of-accent: var(--of-orange-500);
  --of-info: var(--of-blue-600);
  --of-success: var(--of-green-700);
  --of-warning: var(--of-amber-800);
  --of-danger: var(--of-red-700);
  --of-primary-tint: color-mix(in srgb, var(--of-primary) 8%, transparent);
  --of-primary-edge: color-mix(in srgb, var(--of-primary) 35%, transparent);
  --of-focus-ring: 0 0 0 3px color-mix(in srgb, var(--of-primary) 15%, transparent);

  --of-text: #1d1d1f; --of-text-secondary: #3a3a3c; --of-text-soft: #6e6e73; --of-text-muted: #6e6e73; --of-text-faint: #86868b;
  --of-bg: #f5f5f7; --of-surface: #ffffff;
  --of-fill: rgba(0,0,0,0.04); --of-fill-strong: rgba(0,0,0,0.06);
  --of-hairline: rgba(0,0,0,0.06); --of-border: rgba(0,0,0,0.10); --of-border-hover: rgba(0,0,0,0.22);
  --of-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --of-font-mono: "SF Mono", Consolas, monospace;
  --of-radius-pill: 9999px; --of-radius-modal: 24px; --of-radius-card: 20px; --of-radius-lg: 16px; --of-radius-md: 12px; --of-radius-input: 10px; --of-radius-sm: 8px;
  --of-shadow-card: 0 2px 12px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.05);
  --of-shadow-soft: 0 1px 6px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.04);
  --of-shadow-nav: 0 4px 24px rgba(0,0,0,0.11), 0 1px 3px rgba(0,0,0,0.06);
  --of-shadow-menu: 0 12px 40px rgba(0,0,0,0.14), 0 2px 10px rgba(0,0,0,0.07);
  --of-shadow-modal: 0 32px 80px rgba(0,0,0,0.26), 0 0 0 1px rgba(0,0,0,0.055);
  --of-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --of-content-max: 1240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--of-font); }
body { background: var(--of-bg); color: var(--of-text); min-height: 100vh; -webkit-font-smoothing: antialiased; font-size: 14px; }
a { color: var(--of-primary-text); }
.mono { font-family: var(--of-font-mono); }
.muted { color: var(--of-text-muted); }
.small { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ── Barra superior em pílula (D-179) ── */
.nav-outer { position: sticky; top: 0; z-index: 100; background: var(--of-bg); padding: 12px 24px 10px; }
.nav { max-width: var(--of-content-max); height: 54px; margin: 0 auto; padding: 0 10px 0 20px; display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.72); backdrop-filter: blur(30px) saturate(200%); -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.7); border-radius: var(--of-radius-pill); box-shadow: var(--of-shadow-nav); }
.logo { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.logo-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--of-primary); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-links > a, .nav-links .menu > button { font-size: 13px; font-weight: 500; color: var(--of-text); opacity: .72; text-decoration: none; padding: 7px 12px; border-radius: var(--of-radius-pill); border: none; background: none; cursor: pointer; white-space: nowrap; position: relative; }
.nav-links > a:hover, .nav-links .menu > button:hover { opacity: 1; background: var(--of-fill); }
.nav-links > a.active, .nav-links .menu > button.active { opacity: 1; font-weight: 600; background: var(--of-surface); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.nav-links > a.active::after, .nav-links .menu > button.active::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 14px; height: 2px; margin-left: -7px; border-radius: 2px; background: var(--of-accent); }
.menu { position: relative; }
.menu-list { position: absolute; top: calc(100% + 8px); left: 0; min-width: 200px; background: var(--of-surface); border-radius: var(--of-radius-md); box-shadow: var(--of-shadow-menu); padding: 6px; display: none; z-index: 10; }
.menu.open .menu-list { display: block; }
.menu-list a { display: block; padding: 9px 12px; border-radius: var(--of-radius-sm); text-decoration: none; color: var(--of-text); font-size: 13px; }
.menu-list a:hover { background: var(--of-fill); }
.menu-list a small { display: block; color: var(--of-text-muted); font-size: 11px; margin-top: 1px; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.kbd { font-family: var(--of-font-mono); font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: var(--of-fill-strong); color: var(--of-text-soft); margin-left: 4px; }
.count-dot { display: inline-block; min-width: 18px; padding: 0 5px; height: 18px; line-height: 18px; border-radius: 9px; background: color-mix(in srgb, var(--of-warning) 14%, transparent); color: var(--of-warning); font-size: 11px; font-weight: 700; margin-left: 4px; text-align: center; }

/* ── Layout ── */
.wrapper { max-width: var(--of-content-max); margin: 0 auto; padding: 22px 24px 60px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 32px; font-weight: 700; letter-spacing: -0.8px; }
.page-sub { color: var(--of-text-muted); font-size: 13px; margin-top: 4px; }
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g2 { grid-template-columns: 1fr 1fr; }
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
@media (max-width: 980px) { .g4 { grid-template-columns: 1fr 1fr; } .g3, .g2, .split { grid-template-columns: 1fr; } .nav-links > a, .nav-links .menu > button { padding: 7px 8px; } }
.section-gap { margin-top: 16px; }

/* ── Cartões (sólidos, D-180) ── */
.card { background: var(--of-surface); border-radius: var(--of-radius-card); box-shadow: var(--of-shadow-card); padding: 22px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.card-title { font-size: 16px; font-weight: 600; }
.label { font-size: 11px; font-weight: 600; color: var(--of-text-muted); text-transform: uppercase; letter-spacing: .5px; }
.stat { background: var(--of-surface); border-radius: var(--of-radius-lg); padding: 18px 20px; box-shadow: var(--of-shadow-soft); transition: all .25s; display: flex; flex-direction: column; gap: 6px; border: 1px solid transparent; }
.stat.click { cursor: pointer; } .stat.click:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -.5px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--of-text-muted); }
.stat.warning .stat-value { color: var(--of-warning); } .stat.danger .stat-value { color: var(--of-danger); } .stat.info .stat-value { color: var(--of-info); } .stat.success .stat-value { color: var(--of-success); }
.delta-up { color: var(--of-success); font-weight: 600; } .delta-down { color: var(--of-danger); font-weight: 600; }

/* ── Botões ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; padding: 9px 18px; border-radius: var(--of-radius-pill); border: none; cursor: pointer; transition: all .2s; text-decoration: none; }
.btn-primary { background: var(--of-primary); color: #fff; } .btn-primary:hover { background: var(--of-primary-hover); }
.btn-secondary { background: rgba(255,255,255,.9); color: var(--of-text); border: 1px solid rgba(0,0,0,.12); }
.btn-secondary:hover { background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.btn-tonal { background: rgba(0,0,0,.055); color: var(--of-text-secondary); font-weight: 500; padding: 7px 14px; } .btn-tonal:hover { background: rgba(0,0,0,.09); }
.btn-outline { background: transparent; color: var(--of-primary-text); font-weight: 600; padding: 7px 16px; border: 1px solid var(--of-primary-edge); } .btn-outline:hover { background: var(--of-primary-tint); border-color: var(--of-primary); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-whats { background: color-mix(in srgb, var(--of-success) 9%, transparent); color: var(--of-success); padding: 5px 12px; font-size: 12px; border: 1px solid color-mix(in srgb, var(--of-success) 25%, transparent); }
.btn-whats:hover { background: color-mix(in srgb, var(--of-success) 16%, transparent); }

/* ── Pílulas de filtro ── */
.pills { display: inline-flex; gap: 2px; padding: 3px; background: var(--of-fill); border-radius: var(--of-radius-pill); flex-wrap: wrap; }
.pill { font-size: 12px; font-weight: 600; white-space: nowrap; padding: 6px 13px; border-radius: var(--of-radius-pill); border: none; background: transparent; color: var(--of-text-muted); cursor: pointer; transition: all .2s; }
.pill:hover { color: var(--of-text); }
.pill.active { background: var(--of-surface); color: var(--of-text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ── Formulários ── */
.input, select.input { height: 38px; padding: 0 14px; border-radius: var(--of-radius-input); border: 1px solid var(--of-border); background: var(--of-surface); font-size: 13.5px; color: var(--of-text); outline: none; transition: border-color .2s, box-shadow .2s; }
.input:focus { border-color: var(--of-primary-edge); box-shadow: var(--of-focus-ring); }
.search { min-width: 300px; padding-left: 36px; background: var(--of-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat 12px center; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
input[type=date].input { padding: 0 10px; }

/* ── Tabelas ── */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--of-text-muted); background: #fafafa; padding: 9px 10px; border-bottom: 1px solid var(--of-hairline); white-space: nowrap; position: sticky; top: 0; }
.t th.num { text-align: right; }
.t td { padding: 9px 10px; border-bottom: 1px solid var(--of-hairline); vertical-align: middle; }
.t tbody tr.click { cursor: pointer; } .t tbody tr.click:hover td { background: color-mix(in srgb, var(--of-primary) 4%, transparent); }
.t tfoot td { font-weight: 700; border-top: 1px solid var(--of-border); border-bottom: none; }
.t .sub { color: var(--of-text-muted); font-size: 11.5px; margin-top: 1px; }
.more { text-align: center; padding: 12px; }
.empty { text-align: center; color: var(--of-text-muted); padding: 34px 10px; font-size: 13px; }

/* ── Selos (badges) — fundo da cor a 10% e texto na cor cheia ── */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: var(--of-radius-pill); white-space: nowrap; }
.b-info { background: color-mix(in srgb, var(--of-info) 10%, transparent); color: var(--of-info); }
.b-success { background: color-mix(in srgb, var(--of-success) 10%, transparent); color: var(--of-success); }
.b-warning { background: color-mix(in srgb, var(--of-warning) 10%, transparent); color: var(--of-warning); }
.b-danger { background: color-mix(in srgb, var(--of-danger) 10%, transparent); color: var(--of-danger); }
.b-neutral { background: rgba(134,134,139,.12); color: var(--of-text-soft); }
.b-primary { background: var(--of-primary-tint); color: var(--of-primary-text); }
.plate { font-family: var(--of-font-mono); font-size: 12px; font-weight: 600; background: var(--of-fill-strong); padding: 2px 8px; border-radius: 6px; letter-spacing: .5px; white-space: nowrap; }

/* ── Listas em cartão ── */
.row-list { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; gap: 10px; padding: 10px 10px; margin: 0 -10px; border-radius: var(--of-radius-md); cursor: pointer; transition: background .15s; }
.row-item:hover { background: var(--of-fill); }
.row-item .grow { flex: 1; min-width: 0; }
.row-item .t1 { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .t2 { font-size: 11.5px; color: var(--of-text-muted); margin-top: 1px; }

/* ── Grade de informações ── */
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px 20px; }
.info-grid .k { font-size: 11px; font-weight: 600; color: var(--of-text-muted); text-transform: uppercase; letter-spacing: .4px; }
.info-grid .v { font-size: 14px; margin-top: 3px; font-weight: 500; }

/* ── Modal (vidro só no fundo, D-180) ── */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.38); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 50px 20px; overflow-y: auto; }
.modal { width: min(920px, 100%); background: var(--of-bg); border-radius: var(--of-radius-modal); box-shadow: var(--of-shadow-modal); overflow: hidden; animation: pop .3s var(--of-ease-out); }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 24px; background: rgba(255,255,255,.85); border-bottom: 1px solid var(--of-hairline); }
.modal-title { font-size: 20px; font-weight: 700; letter-spacing: -.3px; }
.modal-body { padding: 20px 24px 24px; display: flex; flex-direction: column; gap: 14px; }
.x { width: 32px; height: 32px; border-radius: 50%; border: none; background: var(--of-fill-strong); cursor: pointer; font-size: 18px; color: var(--of-text-soft); flex: none; }
.x:hover { background: rgba(0,0,0,.1); }

/* ── Consulta rápida (F2) ── */
.f2 { width: min(760px, 100%); }
.f2 .input { width: 100%; height: 46px; font-size: 16px; }
.f2-group { margin-top: 6px; }
.f2-group .label { padding: 8px 4px 4px; }
.f2 .row-item.sel { background: var(--of-primary-tint); }

/* ── Tela de abertura ── */
.welcome { max-width: 640px; margin: 60px auto; text-align: center; }
.drop { margin-top: 26px; border: 2px dashed color-mix(in srgb, var(--of-primary) 35%, transparent); border-radius: var(--of-radius-card); padding: 44px 24px; background: var(--of-surface); transition: all .2s; }
.drop.on, body.dragging .drop { background: var(--of-primary-tint); border-color: var(--of-primary); }
.welcome h1 { font-size: 34px; letter-spacing: -.8px; }
.welcome p { color: var(--of-text-muted); margin-top: 8px; line-height: 1.5; }
.drag-veil { position: fixed; inset: 0; z-index: 300; background: color-mix(in srgb, var(--of-primary) 12%, rgba(245,245,247,.85)); display: none; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: var(--of-primary-text); }
body.dragging .drag-veil { display: flex; }
.loading { position: fixed; inset: 0; z-index: 400; background: rgba(245,245,247,.8); display: none; align-items: center; justify-content: center; flex-direction: column; gap: 12px; font-weight: 600; }
.loading.on { display: flex; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--of-primary-tint); border-top-color: var(--of-primary); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 500; background: var(--of-surface); border-radius: var(--of-radius-md); box-shadow: 0 4px 24px rgba(0,0,0,.13); padding: 12px 16px 12px 14px; border-left: 4px solid var(--of-success); font-size: 13px; max-width: 420px; animation: pop .3s var(--of-ease-out); }
.toast.erro { border-left-color: var(--of-danger); }

/* ── Avisos ── */
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--of-radius-md); font-size: 13px; line-height: 1.45; }
.banner .grow { flex: 1; }
.banner.info { background: color-mix(in srgb, var(--of-info) 7%, transparent); }
.banner.warning { background: color-mix(in srgb, var(--of-warning) 8%, transparent); }
.banner.danger { background: color-mix(in srgb, var(--of-danger) 6%, transparent); }

/* ── Gráfico de barras ── */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--of-primary); transition: opacity .15s; }
.chart .bar.dim { opacity: .35; }
.chart .grid line { stroke: var(--of-hairline); }
.chart text { font-size: 11px; fill: var(--of-text-muted); font-family: var(--of-font); }
.chart .hit { fill: transparent; cursor: pointer; }
.tip { position: absolute; pointer-events: none; background: var(--of-text); color: #fff; font-size: 12px; padding: 7px 10px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.tip b { font-size: 13px; }
.share { height: 6px; border-radius: 3px; background: var(--of-fill-strong); overflow: hidden; min-width: 80px; }
.share > i { display: block; height: 100%; background: var(--of-primary); border-radius: 3px; }

/* ── Impressão (lista de compras, ficha) ── */
@media print {
  .nav-outer, .toolbar, .no-print, .toast, .x { display: none !important; }
  body { background: #fff; }
  .card, .stat { box-shadow: none; border: 1px solid #ddd; }
  .overlay { position: static; background: none; backdrop-filter: none; padding: 0; }
  .modal { box-shadow: none; width: 100%; }
  body.printing-modal #app { display: none; }
}

/* ── Formulários de lançamento ── */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.f { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--of-text-soft); }
.f .input { width: 100%; font-weight: 400; }
.span2 { grid-column: span 2; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.combo { position: relative; }
.combo-res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--of-surface); border-radius: var(--of-radius-md); box-shadow: var(--of-shadow-menu); padding: 6px 16px; max-height: 360px; overflow-y: auto; }
.combo-res:empty { display: none; }
.num-in { width: 96px; text-align: right; height: 32px; padding: 0 8px; }
.tot-linha { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--of-hairline); font-size: 14px; }
.tot-linha.grande { border: none; font-size: 20px; padding-top: 12px; }
.pg-linha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--of-hairline); }
.pg-resumo { padding-top: 12px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
@media (max-width: 980px) { .form-grid { grid-template-columns: 1fr 1fr; } }

/* ── Visualizador rápido da peça ── */
.vp { width: min(560px, 100%); }
.vp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.vp-box { background: var(--of-surface); border-radius: var(--of-radius-md); padding: 12px 14px; box-shadow: var(--of-shadow-soft); display: flex; flex-direction: column; gap: 6px; }
.vp-v { font-size: 17px; font-weight: 700; }
.vp-precos { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; background: var(--of-surface); border-radius: var(--of-radius-md); padding: 12px 14px; box-shadow: var(--of-shadow-soft); }
.vp-precos > div { display: flex; flex-direction: column; gap: 3px; }
.vp-precos b { font-size: 16px; font-variant-numeric: tabular-nums; }
.link-peca { color: var(--of-primary-text); text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--of-primary) 45%, transparent); cursor: pointer; }
a.link-peca:hover, tr.click:hover .link-peca { border-bottom-style: solid; }

/* ── v4: recebimentos e entrada de compra ── */
.pg-campo { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 600; color: var(--of-text-soft); }
.pg-campo .input { width: 120px; }
.itens-rolagem { max-height: 52vh; overflow-y: auto; margin-top: 8px; border: 1px solid var(--of-hairline); border-radius: var(--of-radius-md); overscroll-behavior: contain; }
.itens-rolagem thead th { position: sticky; top: 0; z-index: 1; }
.sticky-foot { position: sticky; bottom: -24px; background: var(--of-bg); padding: 12px 0 4px; margin-bottom: -4px; z-index: 5; align-items: center; }
.sticky-foot .grow { flex: 1; }
.disabled-card { opacity: .6; }
body.modal-aberto { overflow: hidden; }
.modal.largo { width: min(1240px, 100%); }
.itens-rolagem .num-in { width: 84px; }

/* ── Sistema na nuvem ── */
.login-card { max-width: 380px; margin: 22px auto 0; text-align: left; }
.login-card .f { margin-bottom: 10px; }
.menu-info { padding: 9px 12px 10px; border-bottom: 1px solid var(--of-fill); margin-bottom: 4px; font-size: 13px; }
.menu-info small { display: block; color: var(--of-text-muted); font-size: 11px; margin-top: 2px; }
.card.click { cursor: pointer; transition: transform .15s, box-shadow .15s; } .card.click:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.grid.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 820px) { .grid.g3 { grid-template-columns: 1fr; } }
tr.muted td { color: var(--of-text-muted); }

/* ── Celular ── */
@media (max-width: 720px) {
  .nav-outer { padding: 8px 8px 6px; }
  .nav { height: auto; flex-wrap: wrap; padding: 8px 10px; gap: 6px 8px; border-radius: 22px; }
  .nav .logo { order: 1; }
  .nav-right { order: 2; margin-left: auto; gap: 6px; }
  .nav-right .kbd, #btn-recarregar { display: none; }
  .nav-links { order: 3; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links .menu-list { position: fixed; top: 110px; left: 12px; right: 12px; }
  .wrapper { padding: 14px 12px 50px; }
  .grid { gap: 10px; }
  .g4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat { padding: 14px; min-width: 0; }
  .stat-value { font-size: 22px; overflow-wrap: anywhere; }
  .page-title { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .overlay { padding: 8px; }
  .modal { border-radius: 18px; }
  .table-wrap, .card { overflow-x: auto; }
  .pg-linha { flex-wrap: wrap; }
  .toolbar .input { min-width: 0; }
}
