/* Senda · back office — same quiet structure as the storefront: warm white, ink, hairlines, a leather accent. */
:root {
  --paper: #f6f5f1;
  --surface: #ffffff;
  --sunk: #efede7;
  --ink: #1d1c1a;
  --ink-2: #57554f;
  --ink-3: #8b887f;
  --line: #e3e0d8;
  --line-2: #d2cec3;
  --accent: #8b3f22;
  --accent-soft: #f4e8e2;
  --good: #2f6a45;
  --warn: #a15c12;
  --bad: #a3392c;
  --r: 6px;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --serif: "Instrument Serif", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--paper); color: var(--ink); font: 14px/1.5 "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--ink-3); }
.boot { padding: 40px; color: var(--ink-3); }
::selection { background: var(--accent-soft); }

/* ---- buttons and fields */
.b { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.b:hover { border-color: var(--ink-3); }
.b:disabled { opacity: .45; cursor: not-allowed; }
.b.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.b.primary:hover { background: #33312d; }
.b.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.b.danger { color: var(--bad); }
.b.danger.primary, .dlg .b.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.b.ghost { border-color: transparent; background: none; }
.b.ghost:hover { background: var(--sunk); }
.b.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.link { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
input, select, textarea { height: 34px; width: 100%; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-size: 13.5px; }
textarea { height: auto; min-height: 90px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(139, 63, 34, .12); }
.f { display: grid; gap: 5px; min-width: 0; }
.f > span { font-size: 12.5px; color: var(--ink-2); }
.f small { font-size: 12px; color: var(--ink-3); }
.f.wide { grid-column: 1 / -1; }
.fg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fg3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.chk input { margin-top: 2px; flex: none; }

/* ---- status labels: a dot and a word */
.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.st.good::before { background: var(--good); } .st.warn::before { background: #d08a2a; }
.st.bad { color: var(--bad); } .st.bad::before { background: var(--bad); }
.st.accent::before { background: var(--accent); } .st.muted { color: var(--ink-3); } .st.muted::before { background: var(--line-2); }

/* ---- login */
.login { min-height: 100vh; min-height: calc(100dvh - var(--ej-barra, 0px)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-brand { padding: 56px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.word { font-family: var(--serif); font-size: 30px; font-weight: 400; letter-spacing: -0.02em; line-height: 1; text-decoration: none; }
.word i { font-style: normal; color: var(--ink-3); font-family: "Instrument Sans", sans-serif; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-left: 8px; vertical-align: middle; }
.login-brand h1 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; max-width: 15ch; }
.login-brand p { color: var(--ink-2); max-width: 46ch; margin-top: 18px; font-size: 15px; }
.login-brand ul { list-style: none; margin-top: 28px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
.login-brand li::before { content: "—"; color: var(--ink-3); margin-right: 10px; }
.login-brand .fine { font-size: 12.5px; color: var(--ink-3); }
.login-pick { padding: 56px; display: flex; flex-direction: column; justify-content: center; max-width: 520px; }
.login-pick h2 { font-size: 18px; }
.login-pick > p { color: var(--ink-2); margin: 6px 0 22px; }
.users { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.users button { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; width: 100%; padding: 12px 14px; border: 0;
  border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.users button:last-child { border-bottom: 0; }
.users button:hover { background: var(--paper); }
.users b { font-weight: 500; display: block; } .users small { color: var(--ink-3); font-size: 12.5px; }
.users .go { color: var(--ink-3); font-size: 13px; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--sunk); color: var(--ink-2); display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em; flex: none; }

/* ---- shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow: auto; display: flex; flex-direction: column; border-right: 1px solid var(--line); padding: 20px 14px 14px; }
.side .word { font-size: 28px; padding: 0 10px; }
.side .co { padding: 2px 10px 0; font-size: 12.5px; color: var(--ink-3); }
.back { display: inline-flex; align-self: flex-start; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--surface); }
.back:hover { border-color: var(--ink); }
.side .back { margin: 14px 10px 0; }
.login-brand .back { display: flex; width: max-content; margin-bottom: 24px; }
.nav { margin-top: 22px; display: grid; gap: 18px; }
.nav h6 { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 0 10px 4px; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-radius: var(--r); color: var(--ink-2);
  text-decoration: none; font-size: 14px; }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a.on { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: inset 0 0 0 1px var(--line); }
.nav a .n { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.nav a .n.bad { color: var(--bad); }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.side-foot .who { display: flex; gap: 10px; align-items: center; }
.side-foot .who b { font-weight: 500; display: block; font-size: 13.5px; } .side-foot .who small { color: var(--ink-3); font-size: 12px; }
.side-foot nav { display: flex; gap: 14px; font-size: 13px; }
.side-foot nav a, .side-foot nav button { color: var(--ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0; }
.side-foot nav a:hover, .side-foot nav button:hover { color: var(--ink); text-decoration: underline; }
.sandbox { font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
.topbar { display: none; }
.main { padding: 28px 40px 80px; min-width: 0; max-width: 1340px; }

/* ---- page */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { font-size: 23px; letter-spacing: -0.02em; }
.head .sub { color: var(--ink-3); margin-top: 2px; font-size: 13.5px; }
.head .crumb { font-size: 13px; color: var(--ink-3); margin-bottom: 4px; }
.head .crumb a { color: var(--ink-3); text-decoration: none; } .head .crumb a:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.ph { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ph h2 { font-size: 14.5px; }
.ph .muted, .ph a { font-size: 13px; }
.ph a { color: var(--ink-2); }
.pad { padding: 16px 18px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols.wide-left { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.cols.wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); }
.cols > * + * { margin-top: 0 !important; }
.note { background: var(--sunk); border-radius: var(--r); padding: 10px 14px; font-size: 13px; color: var(--ink-2); }
.note.bad { background: #f7e9e6; color: var(--bad); }
.note.good { background: var(--accent-soft); color: var(--accent); }

/* ---- KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 16px; }
.kpi { padding: 16px 18px; border-right: 1px solid var(--line); min-width: 0; text-decoration: none; }
.kpi:last-child { border-right: 0; }
.kpi span { font-size: 12.5px; color: var(--ink-3); display: block; }
.kpi b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { font-size: 12.5px; color: var(--ink-3); }
.kpi small.up { color: var(--good); } .kpi small.down { color: var(--bad); }
.kpi.bad b { color: var(--bad); }
a.kpi:hover { background: var(--paper); }

/* ---- tables */
.tw { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.t th { text-align: left; font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3);
  padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t .num { text-align: right; white-space: nowrap; }
.t .nowrap { white-space: nowrap; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: #faf9f6; }
.t td .sec { display: block; font-size: 12.5px; color: var(--ink-3); }
.t td a { text-decoration: none; } .t td a:hover { text-decoration: underline; }
.t tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); border-bottom: 0; }
.t td.strong { font-weight: 500; }
.t .low td { color: var(--bad); }
.more { padding: 12px 14px; font-size: 13px; color: var(--ink-3); border-top: 1px solid var(--line); }

/* ---- filters and tabs */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.filters input[type=search] { max-width: 280px; }
.filters select { width: auto; min-width: 150px; }
.filters .grow { flex: 1; }
.filters .count { font-size: 13px; color: var(--ink-3); }
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 8px 0 10px; text-decoration: none; color: var(--ink-3); font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg a, .seg button { padding: 6px 12px; font-size: 13px; text-decoration: none; color: var(--ink-2); border: 0; background: none; cursor: pointer; border-right: 1px solid var(--line); }
.seg > :last-child { border-right: 0; }
.seg .on { background: var(--ink); color: var(--paper); }

/* ---- lists */
.list { list-style: none; }
.list li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .when { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.list .sec { display: block; font-size: 12.5px; color: var(--ink-3); }
.list a { text-decoration: none; } .list a:hover { text-decoration: underline; }
.list li.done .grow > :first-child { text-decoration: line-through; color: var(--ink-3); }
.list li.late .when { color: var(--bad); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); } .kv dd { min-width: 0; overflow-wrap: anywhere; }
.empty { padding: 34px 18px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; border: 1px solid var(--line-2); border-radius: 4px; padding: 0 6px; color: var(--ink-2); }

/* ---- charts */
.bars { position: relative; display: flex; align-items: flex-end; gap: 6px; height: calc(var(--h) + 22px); padding-top: 18px; }
.bars-max { position: absolute; top: 0; left: 0; font-size: 11.5px; color: var(--ink-3); }
.bars::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; border-top: 1px dashed var(--line); }
.bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; }
.bar i { display: block; background: #d9d5ca; border-radius: 3px 3px 0 0; min-height: 1px; }
.bar.hi i { background: var(--accent); }
.bar:hover i { background: var(--ink-2); }
.bar span { font-size: 11.5px; color: var(--ink-3); text-align: center; margin-top: 6px; height: 16px; white-space: nowrap; overflow: hidden; }
.hbars { list-style: none; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13.5px; }
.hbars .hl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars .hl a { text-decoration: none; } .hbars .hl a:hover { text-decoration: underline; }
.hbars .hv { color: var(--ink-2); }
.hbars .ht { grid-column: 1 / -1; height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; }
.hbars .ht i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---- document editor lines */
.lines td { padding: 6px 8px; }
.lines input, .lines select { height: 32px; }
.lines .q { width: 80px; } .lines .p { width: 110px; } .lines .d { width: 74px; }
.lines .x { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 18px; padding: 0 6px; }
.lines .x:hover { color: var(--bad); }
.sumbox { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; font-size: 13.5px; margin-left: auto; max-width: 320px; padding: 14px 18px; }
.sumbox .tot { font-size: 16px; font-weight: 600; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
.warnline { color: var(--warn); font-size: 12.5px; }

/* ---- invoice document */
.doc { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 44px 48px; }
.doc-h { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.doc-h .word { font-size: 16px; }
.doc-co { font-size: 13px; color: var(--ink-2); margin-top: 8px; line-height: 1.6; }
.doc-title { text-align: right; }
.doc-title h2 { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.doc-title .mono { color: var(--ink-2); }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 34px 0 24px; font-size: 13.5px; line-height: 1.6; }
.doc-parties h4 { font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 4px; }
.doc .t th { padding-left: 0; } .doc .t td { padding-left: 0; }
.doc-foot { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; margin-top: 20px; align-items: start; }
.doc-vf { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--ink-2); }
.doc-vf b { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--ink); }
.doc-note { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }
.qr-miss { display: grid; place-items: center; background: var(--sunk); color: var(--ink-3); font-size: 11px; }
.stamp { display: inline-block; border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 8px; font-size: 12px; color: var(--ink-3); }
.vf-steps { list-style: none; display: grid; gap: 8px; font-size: 13px; }
.vf-steps li { display: flex; gap: 10px; align-items: center; color: var(--ink-3); }
.vf-steps li.on { color: var(--ink); }
.vf-steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; }
.vf-steps li.on::before { background: var(--accent); border-color: var(--accent); }
.vf-steps li.run::before { animation: pulse 1s ease-in-out infinite; background: var(--ink-3); }
@keyframes pulse { 50% { opacity: .3; } }
.hash { font-family: var(--mono); font-size: 11.5px; word-break: break-all; color: var(--ink-2); }

/* ---- mail */
.mail { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.mail-h { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-2); display: grid; gap: 2px; }
.mail-h b { color: var(--ink); font-weight: 500; font-size: 14px; }
.mail-b { padding: 16px; white-space: pre-wrap; font-size: 14px; line-height: 1.6; }
.vars { display: flex; flex-wrap: wrap; gap: 6px; }
.vars button { font-family: var(--mono); font-size: 11.5px; border: 1px solid var(--line-2); background: var(--paper); border-radius: 4px; padding: 1px 6px; cursor: pointer; color: var(--ink-2); }
.vars button:hover { border-color: var(--ink-3); color: var(--ink); }
.switch { position: relative; width: 34px; height: 20px; flex: none; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(14px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px rgba(139, 63, 34, .25); }

/* ---- dialog and toast */
#dlg { margin: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); box-shadow: 0 24px 60px rgba(29, 28, 26, .18); }
#dlg.wide { width: min(860px, calc(100vw - 32px)); }
#dlg::backdrop { background: rgba(29, 28, 26, .32); }
.dlg header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg header h2 { font-size: 16px; }
.dlg .x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; }
.dlg-body { padding: 18px 20px; display: grid; gap: 14px; max-height: calc(100vh - 190px); overflow: auto; }
.dlg-text { color: var(--ink-2); }
.dlg footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--paper); border-radius: 0 0 10px 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); max-width: min(520px, calc(100vw - 32px)); background: var(--ink); color: var(--paper);
  padding: 11px 16px; border-radius: 8px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--bad); color: #fff; }

/* ---- responsive */
@media (max-width: 1100px) {
  .cols, .cols.wide-left, .cols.wide-right { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi:nth-child(2) { border-right: 0; }
  .kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 260px; background: var(--paper); transform: translateX(-100%); transition: transform .2s; }
  .shell.menu .side { transform: none; box-shadow: 0 0 0 100vmax rgba(29, 28, 26, .3); }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 20; }
  .topbar .word { font-size: 17px; }
  .main { padding: 20px 16px 60px; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-brand { border-right: 0; border-bottom: 1px solid var(--line); padding: 32px 20px; gap: 28px; }
  .login-pick { padding: 28px 20px 48px; }
  .fg, .fg3 { grid-template-columns: minmax(0, 1fr); }
  .doc { padding: 24px 18px; }
  .doc-parties, .doc-foot { grid-template-columns: minmax(0, 1fr); }
  .t th, .t td { padding: 9px 10px; }
  .hide-sm { display: none; }
}

/* ---- print: only the invoice */
@media print {
  body { background: #fff; }
  .side, .topbar, .head .actions, .no-print, #toast { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .cols { display: block; }
  .doc { border: 0; padding: 0; }
}

/* ---- Senda additions */
.thumb { width: 40px; height: 50px; flex: none; display: grid; place-items: center; overflow: hidden; position: relative; font-family: var(--serif); font-size: 20px; color: rgba(29, 28, 26, .3); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sizegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.sizegrid label { display: grid; gap: 3px; font-size: 12px; color: var(--ink-3); text-align: center; }
.sizegrid input { text-align: center; }
.sizegrid .zero input { border-color: var(--bad); color: var(--bad); }
.cells { display: flex; gap: 4px; flex-wrap: wrap; }
.cells span { font-size: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; color: var(--ink-2); white-space: nowrap; }
.cells span.zero { color: var(--bad); border-color: #e6c3bd; background: #fbf1ef; }
.cells span.one { color: var(--warn); border-color: #ecd7b8; }
.funnel { display: grid; gap: 10px; }
.funnel div { display: grid; grid-template-columns: 140px 1fr 90px; gap: 12px; align-items: center; font-size: 13.5px; }
.funnel i { display: block; height: 22px; background: var(--accent); border-radius: 2px; opacity: .85; }
.funnel b { font-weight: 500; text-align: right; }
