:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --ink: #111111;
  --ink-2: #525252;
  --ink-3: #a3a3a3;
  --line: #e5e5e5;
  --col: #ffffff;
  --brand: #FFC400;
  --brand-ink: #111111;
  --brand-soft: #FFF6CC;
  --top: #0a0a0a;
  --warn: #f59e0b;
  --warn-bg: #fff7e6;
  --late: #dc2626;
  --late-bg: #fdecec;
  --ok: #d4d4d4;
  --done: #16a34a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.25);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

/* ---------- botões e campos ---------- */
.btn {
  border: 1px solid var(--line); background: #fff; border-radius: 8px;
  padding: 7px 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: #f3f4f6; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(.95); }
.btn.danger { color: var(--late); border-color: #f5c2c2; }
.btn.danger:hover { background: var(--late-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.05); }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn.big { padding: 12px; font-size: 15px; width: 100%; justify-content: center; }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn { border: 0; background: transparent; width: 28px; height: 28px; border-radius: 6px; display: inline-grid; place-items: center; color: inherit; }
.icon-btn:hover { background: rgba(0,0,0,.07); }
.icon-btn svg, .btn svg { width: 16px; height: 16px; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field > label { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .02em; }
.field input, .field select {
  border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; outline: none;
}
.field input:focus, .field select:focus { border-color: #111; box-shadow: 0 0 0 3px var(--brand-soft); }
.field.err input, .field.err .seg, .field.err .drop { border-color: var(--late) !important; background: #fffafa; }
.field .msg { color: var(--late); font-size: 12px; min-height: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > .field { margin-bottom: 10px; }

.qty { display: flex; }
.qty button { width: 38px; border: 1.5px solid var(--line); background: #f9fafb; font-size: 18px; font-weight: 700; }
.qty button:first-child { border-radius: 8px 0 0 8px; border-right: 0; }
.qty button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.qty input { border-radius: 0 !important; text-align: center; font-weight: 700; }

.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px; font-weight: 700; color: var(--ink-2); }
.seg button + button { border-left: 1.5px solid var(--line); }
.seg button.on[data-v="parcial"] { background: var(--warn); color: #fff; }
.seg button.on[data-v="total"] { background: #111; color: var(--brand); }

.drop {
  border: 2px dashed #cbd5e1; border-radius: 10px; padding: 14px; text-align: center; color: var(--ink-2);
  background: #f8fafc; cursor: pointer; transition: .15s;
}
.drop:hover, .drop.over { border-color: #111; background: var(--brand-soft); color: #111; }
.drop b { display: block; color: var(--ink); }
.drop small { color: var(--ink-3); }
.drop-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-file { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px 4px 3px 3px; font-size: 12px; max-width: 100%; }
.chip-file img { width: 30px; height: 30px; object-fit: contain; border-radius: 5px; background: #f3f4f6; }
.chip-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.chip-file button { border: 0; background: none; color: var(--ink-3); font-size: 15px; padding: 0 4px; }

/* ---------- login ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 16px; background: #0a0a0a; border-top: 6px solid var(--brand); }
.auth-box { width: 100%; max-width: 360px; background: #fff; border-radius: 16px; padding: 28px; box-shadow: var(--shadow-lg); }
.auth-box h1 { margin: 0 0 4px; font-size: 22px; }
.auth-box p { margin: 0 0 18px; color: var(--ink-2); }
.logo-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }

/* ---------- topo ---------- */
.shell { display: flex; flex-direction: column; height: 100%; }
.top {
  background: var(--top); color: #e5e5e5; border-bottom: 3px solid var(--brand); display: flex; align-items: center; gap: 14px; padding: 8px 14px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: #fff; white-space: nowrap; }
.brand .logo-mark { width: 30px; height: 30px; border-radius: 8px; margin: 0; font-size: 12px; }
.nav { display: flex; gap: 2px; }
.nav button { background: none; border: 0; color: #cbd5e1; padding: 7px 11px; border-radius: 7px; font-weight: 600; }
.nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav button.on { background: var(--brand); color: #111; }
.top .search { position: relative; flex: 1; min-width: 160px; max-width: 340px; margin-left: auto; }
.top .search input { width: 100%; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 7px 10px; color: #fff; outline: none; }
.top .search input::placeholder { color: #94a3b8; }
.stats { display: flex; gap: 6px; }
.stat { background: rgba(255,255,255,.08); border-radius: 8px; padding: 4px 10px; text-align: center; line-height: 1.15; }
.stat b { display: block; font-size: 16px; color: var(--brand); }
.stat small { font-size: 10.5px; color: #94a3b8; text-transform: uppercase; letter-spacing: .03em; }
.stat.warn b { color: #fbbf24; }
.stat.late b { color: #f87171; }
.me { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.me small { color: #94a3b8; display: block; font-size: 11px; }
.me .icon-btn { color: #cbd5e1; }
.live { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.live.off { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.25); }

main { flex: 1; overflow: auto; position: relative; }

/* ---------- pipeline ---------- */
.board { display: flex; gap: 12px; padding: 14px; align-items: flex-start; min-height: 100%; width: max-content; }
.col {
  width: 290px; flex: none; background: var(--col); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04);
  display: flex; flex-direction: column; max-height: calc(100vh - 90px); border-top: 4px solid var(--c, var(--ok));
}
.col > header { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px 12px; }
.col > header h3 { margin: 0; font-size: 14.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col .count { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 1px 9px; font-weight: 700; font-size: 12px; }
.col .tag-final { font-size: 10.5px; font-weight: 700; color: var(--done); background: #dcfce7; border-radius: 5px; padding: 1px 6px; }
.cards { flex: 1; overflow-y: auto; padding: 2px 8px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.col .add { margin: 0 8px 8px; border: 1.5px dashed #cbd5e1; background: transparent; border-radius: 8px; padding: 7px; color: var(--ink-2); font-weight: 600; }
.col .add:hover { border-color: #111; color: #111; background: var(--brand-soft); }
.add-col { width: 240px; flex: none; border: 2px dashed #cbd5e1; border-radius: 12px; background: transparent; padding: 16px; font-weight: 700; color: var(--ink-2); }
.add-col:hover { border-color: #111; color: #111; background: var(--brand-soft); }

.card {
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 9px 10px 8px; border: 1px solid #ececec;
  cursor: grab; border-left: 4px solid var(--ok); position: relative; user-select: none;
}
.card:hover { box-shadow: 0 0 0 2px #cbd5e1, var(--shadow); }
.card.dl-warn { border-left-color: var(--warn); }
.card.dl-late { border-left-color: var(--late); background: #fffafa; }
.card.dl-done { border-left-color: var(--done); }
.card .r1 { display: flex; align-items: center; gap: 6px; }
.card .pos { background: #111; color: var(--brand); font-weight: 800; font-size: 12px; border-radius: 6px; min-width: 24px; height: 22px; display: grid; place-items: center; padding: 0 5px; }
.card .num { font-weight: 700; color: var(--ink-2); font-size: 12px; }
.card .pay { margin-left: auto; font-size: 10.5px; font-weight: 800; border-radius: 5px; padding: 2px 6px; text-transform: uppercase; }
.pay.parcial { background: #fef3c7; color: #92400e; }
.pay.total { background: #dcfce7; color: #166534; }
.card .client { font-weight: 700; font-size: 14.5px; margin: 6px 0 1px; line-height: 1.25; padding-right: 44px; word-break: break-word; }
.card .meta { color: var(--ink-2); font-size: 12.5px; }
.card .thumb { position: absolute; right: 9px; top: 34px; width: 38px; height: 38px; border-radius: 7px; object-fit: contain; background: #f3f4f6; border: 1px solid var(--line); }
.card .r3 { display: flex; align-items: center; gap: 6px; margin-top: 7px; flex-wrap: wrap; }
.dl { font-size: 11.5px; font-weight: 700; border-radius: 5px; padding: 2px 6px; background: #f4f4f4; color: #262626; }
.dl.warn { background: var(--warn-bg); color: #b45309; }
.dl.late { background: var(--late-bg); color: var(--late); }
.dl.done { background: #dcfce7; color: #166534; }
.card .ico { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--ink-2); font-weight: 600; }
.card .ico svg { width: 13px; height: 13px; }
.card .logo-ok { font-size: 10.5px; font-weight: 800; color: #166534; background: #dcfce7; border-radius: 5px; padding: 2px 6px; }
.card .logo-no { font-size: 10.5px; font-weight: 800; color: var(--ink-3); background: #f1f5f9; border-radius: 5px; padding: 2px 6px; }
.card .nologo { font-size: 10.5px; font-weight: 800; color: var(--late); background: var(--late-bg); border-radius: 5px; padding: 2px 6px; }
.card .seller { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.sortable-ghost { opacity: .35; }
.sortable-chosen { cursor: grabbing; }
.sortable-drag { transform: rotate(2deg); box-shadow: var(--shadow-lg) !important; }
.card.dim { display: none; }
.empty-col { text-align: center; color: var(--ink-3); font-size: 12.5px; padding: 14px 4px; }

/* ---------- janela flutuante ---------- */
.fp {
  position: fixed; right: 18px; bottom: 18px; width: 360px; max-height: calc(100vh - 84px);
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 50; display: flex; flex-direction: column;
  border: 1px solid #d1d5db;
}
.fp.min, .fp.away { display: none; }
body.pip .fp.away { display: flex; }
.fp > header {
  background: var(--top); color: #fff; border-bottom: 3px solid var(--brand); border-radius: 13px 13px 0 0; padding: 10px 10px 10px 14px;
  display: flex; align-items: center; gap: 6px; cursor: move; user-select: none;
}
.fp > header h2 { margin: 0; font-size: 15px; flex: 1; }
.fp > header .icon-btn { color: #cbd5e1; }
.fp > header .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.clock { background: #1e293b; color: #fff; display: flex; justify-content: space-between; align-items: baseline; padding: 6px 14px 8px; font-variant-numeric: tabular-nums; }
.clock b { font-size: 22px; letter-spacing: .02em; color: var(--brand); }
.clock span { color: #94a3b8; font-size: 12px; text-transform: capitalize; }
.fp .body { padding: 12px 14px 4px; overflow-y: auto; }
.fp .foot { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 10px; font-size: 12px; }
.linkish { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; font-size: 12px; }
.linkish.faint { color: var(--ink-3); font-size: 11px; text-decoration: none; }
.linkish.faint:hover { text-decoration: underline; }
.fp-pill {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; background: var(--brand); color: #111; border: 2px solid #111 !important; border: 0;
  border-radius: 30px; padding: 12px 18px; font-weight: 800; box-shadow: var(--shadow-lg); display: flex; gap: 8px; align-items: center;
}
.fp-pill svg { width: 18px; height: 18px; }
.ok-banner { background: #dcfce7; color: #166534; border-radius: 8px; padding: 8px 10px; font-weight: 700; margin-bottom: 10px; text-align: center; }
.err-banner { background: var(--late-bg); color: var(--late); border-radius: 8px; padding: 8px 10px; font-weight: 700; margin-bottom: 10px; text-align: center; }

/* modo "por cima de tudo" (janela Picture-in-Picture) */
body.pip { margin: 0; background: #fff; }
body.pip .fp { position: static; width: 100%; max-height: none; height: 100vh; border-radius: 0; box-shadow: none; border: 0; }
body.pip .fp > header { border-radius: 0; cursor: default; }
body.pip .fp .only-main { display: none; }

/* ---------- modais ---------- */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 100; display: grid; place-items: center; padding: 16px; }
.dialog { background: #fff; border-radius: 14px; width: 100%; max-width: 420px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.dialog.wide { max-width: 980px; }
.dialog > header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dialog > header h2 { margin: 0; font-size: 17px; flex: 1; }
.dialog .dbody { padding: 16px; overflow-y: auto; }
.dialog .dfoot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.colbadge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; color: #fff; text-shadow: 0 0 2px rgba(0,0,0,.5); }
.cm-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.cm-grid h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }
.info { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13.5px; margin-bottom: 14px; }
.info dt { color: var(--ink-2); }
.info dd { margin: 0; font-weight: 600; }
.box { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 14px; }
.files { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.file { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 6px; font-size: 13px; }
.file img, .file .ph { width: 40px; height: 40px; border-radius: 6px; object-fit: contain; background: #f3f4f6; flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: var(--ink-3); }
.file .fn { flex: 1; min-width: 0; }
.file .fn b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.file .fn small { color: var(--ink-3); }
.hist { list-style: none; margin: 0; padding: 0; font-size: 12.5px; max-height: 260px; overflow-y: auto; }
.hist li { padding: 6px 0; border-bottom: 1px solid #f1f5f9; }
.hist li b { font-weight: 700; }
.hist li small { display: block; color: var(--ink-3); }
.hist li .d { color: var(--ink-2); }

/* menu suspenso */
.menu { position: fixed; z-index: 200; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 5px; min-width: 220px; }
.menu button { display: flex; width: 100%; gap: 8px; align-items: center; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 6px; }
.menu button:hover { background: #f3f4f6; }
.menu button.danger { color: var(--late); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* páginas internas */
.page { max-width: 1000px; margin: 0 auto; padding: 20px 16px 60px; }
.page h1 { font-size: 20px; margin: 0 0 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.panel h2 { font-size: 15px; margin: 0 0 4px; }
.panel p.sub { margin: 0 0 12px; color: var(--ink-2); font-size: 13px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; text-transform: uppercase; color: var(--ink-2); padding: 8px; border-bottom: 2px solid var(--line); }
table.t td { padding: 8px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.role { font-size: 11px; font-weight: 800; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; }
.role.gerente { background: #ede9fe; color: #5b21b6; }
.role.vendedor { background: #dbeafe; color: #1e40af; }
.role.producao { background: #ffedd5; color: #9a3412; }
.inline-form { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; }
.inline-form .field { margin: 0; }
.colrow { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; background: #fff; }
.colrow .handle { cursor: grab; color: var(--ink-3); }
.colrow input[type=text] { flex: 1; border: 1.5px solid var(--line); border-radius: 7px; padding: 6px 9px; }
.colrow input[type=color] { width: 34px; height: 30px; border: 0; padding: 0; background: none; }
.colrow label { font-size: 12.5px; display: flex; gap: 5px; align-items: center; color: var(--ink-2); white-space: nowrap; }
.muted { color: var(--ink-2); }
.soon { display: inline-block; font-size: 10.5px; font-weight: 800; background: #f1f5f9; color: var(--ink-2); padding: 2px 7px; border-radius: 5px; text-transform: uppercase; margin-left: 6px; }

/* avisos */
#toasts { position: fixed; bottom: 18px; left: 18px; z-index: 300; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.toast { background: var(--top); color: #fff; padding: 9px 16px; border-radius: 9px; box-shadow: var(--shadow-lg); font-weight: 600; }
.toast.err { background: var(--late); }
.toast.ok { background: #111; color: var(--brand); }

@media (max-width: 760px) {
  .cm-grid { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr 1fr; }
  .stats { display: none; }
  .fp { right: 8px; left: 8px; width: auto; bottom: 8px; }
  .col { width: 82vw; }
}
@media print {
  body * { visibility: hidden; }
}

#search-res { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 320px; background: #fff; color: var(--ink); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 150; padding: 4px; max-height: 70vh; overflow-y: auto; }
#search-res button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 7px; }
#search-res button:hover { background: #f3f4f6; }
#search-res b { display: block; font-size: 13.5px; }
#search-res small { color: var(--ink-2); font-size: 12px; }
.sr-count { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; padding: 6px 10px 4px; }
.field textarea { border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; font: inherit; resize: vertical; outline: none; }
.field textarea:focus { border-color: #111; box-shadow: 0 0 0 3px var(--brand-soft); }
.col > header .icon-btn { width: 26px; height: 26px; color: var(--ink-2); }

/* identidade Nova Marca */
.logo-box { background: #fff; border-radius: 8px; padding: 3px 8px; height: 36px; display: flex; align-items: center; justify-content: center; font-weight: 900; color: #111; font-size: 12px; }
.logo-box img { max-height: 30px; max-width: 130px; object-fit: contain; display: block; }
.logo-box.big { height: 64px; padding: 6px 14px; margin-bottom: 16px; width: fit-content; border: 1px solid var(--line); }
.logo-box.big img { max-height: 52px; max-width: 220px; }
.logo-box.sm { height: 26px; padding: 2px 6px; border-radius: 6px; }
.logo-box.sm img { max-height: 20px; max-width: 80px; }
.brand span { color: var(--brand); font-weight: 900; letter-spacing: .04em; text-transform: uppercase; font-size: 14px; }
.hint { font-size: 12px; color: var(--ink-2); font-weight: 600; min-height: 0; }
.hint:empty { display: none; }
.dl-preview { color: #111; background: var(--brand-soft); border-radius: 5px; padding: 2px 6px; width: fit-content; }
.panel { border-top: 3px solid var(--brand); }
.page h1 { border-left: 5px solid var(--brand); padding-left: 10px; }
table.t th { border-bottom-color: #111; }
.ok-banner { background: var(--brand-soft); color: #111; border: 1px solid var(--brand); }
.pay.total { background: #111; color: var(--brand); }
.pay.parcial { background: var(--brand-soft); color: #111; border: 1px solid #f0d36b; }
.card .logo-ok { background: var(--brand); color: #111; }
.live { background: var(--brand); box-shadow: 0 0 0 3px rgba(255,196,0,.3); }
.auth-box h1 { border-left: 5px solid var(--brand); padding-left: 10px; }

/* chave "Sempre aberto" */
.fp > header .always { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: #e5e5e5; cursor: pointer; white-space: nowrap; background: rgba(255,255,255,.08); padding: 4px 8px; border-radius: 20px; }
.fp > header .always input { accent-color: var(--brand); width: 15px; height: 15px; margin: 0; cursor: pointer; }
.fp > header .always:has(input:checked) { background: var(--brand); color: #111; }

/* janelinha sempre aberto: modo compacto (só o botão) */
.pip-compact { display: none; }
body.pip.compact { background: #0a0a0a; overflow: hidden; }
body.pip.compact .fp { display: none !important; }
body.pip.compact .pip-compact { display: flex; align-items: stretch; gap: 8px; height: 100vh; padding: 8px; }
.pip-go { flex: 1; border: 0; border-radius: 10px; background: var(--brand); color: #111; font: 800 16px system-ui, sans-serif; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.pip-go:hover { filter: brightness(1.05); }
.pip-go svg { width: 22px; height: 22px; }
.pip-info { display: flex; flex-direction: column; justify-content: center; min-width: 64px; color: #fff; font-variant-numeric: tabular-nums; }
.pip-info b { color: var(--brand); font-size: 17px; }
.pip-msg { font-size: 10.5px; color: #d4d4d4; line-height: 1.2; }

/* contas: produtos + frete - pago = pendente */
.fin-box { border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 8px; padding: 8px 12px; margin: 4px 0 12px; font-size: 13px; }
.fin-box > div { display: flex; justify-content: space-between; padding: 2px 0; }
.fin-box span { color: var(--ink-2); }
.fin-box .t { border-top: 1px dashed #d4d4d4; margin-top: 3px; padding-top: 5px; font-weight: 700; }
.fin-box .t span { color: #111; }
.fin-box .p { border-top: 2px solid #111; margin-top: 3px; padding-top: 5px; font-size: 14.5px; }
.fin-box .p span { color: #111; font-weight: 700; }
.fin-box .p.open b { color: var(--late); }
.fin-box .p.ok b { color: #15803d; }
.fin-box small { display: block; margin-top: 4px; font-size: 11px; }

.money-preview { margin: -4px 0 10px; background: #fafafa; border: 1px solid var(--line); border-radius: 6px; padding: 5px 8px; color: #111; font-weight: 600; }
.money-preview .pend { color: var(--late); }
.money-preview .quit { color: #15803d; }

.btn.danger-solid { background: var(--late); border-color: var(--late); color: #fff; }
.btn.danger-solid:disabled { background: #f3b4b4; border-color: #f3b4b4; }

/* medida com cm fixo */
.unit-wrap { position: relative; }
.unit-wrap input { padding-right: 40px; }
.unit-wrap .unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-weight: 800; color: #111; background: var(--brand-soft); border-radius: 5px; padding: 1px 6px; font-size: 12.5px; pointer-events: none; }
/* aviso de servidor desatualizado */
.version-warn { background: var(--late); color: #fff; padding: 10px 16px; font-size: 13.5px; }
.version-warn code { background: rgba(0,0,0,.25); padding: 1px 6px; border-radius: 4px; }

/* página /venda (janela do botão do Windows) */
.quick { min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.quick-top { background: var(--top); color: #fff; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 3px solid var(--brand); }
.quick-top h2 { margin: 0; font-size: 16px; flex: 1; }
.quick-user { font-size: 12px; color: #a3a3a3; }
.quick-body { padding: 12px 14px 4px; flex: 1; }
.quick .foot { display: flex; justify-content: center; padding: 6px 14px 12px; }

/* janela de venda compacta */
.quick { max-width: 440px; margin: 0 auto; box-shadow: 0 0 0 1px var(--line); }
.quick .field { margin-bottom: 8px; }
.quick .field input, .quick .seg button { padding-top: 7px; padding-bottom: 7px; }
.quick .clock { padding: 5px 14px 6px; }
.quick .clock b { font-size: 19px; }
.quick .drop { padding: 10px; }

/* janelinha compacta: só o botão */
body.pip.compact .pip-compact { padding: 6px; }
body.pip.compact .pip-go { border-radius: 30px; font-size: 15px; border: 2px solid #111; }

/* botão fixo do pipeline + janela de venda acima dele */
.fp { bottom: 84px; max-height: calc(100vh - 160px); }
.fp-pill { position: fixed; }
.fp-pill .pill-badge { display: none; font-size: 10px; font-weight: 800; background: #111; color: var(--brand); border-radius: 10px; padding: 2px 7px; margin-left: 4px; text-transform: uppercase; letter-spacing: .03em; }
.fp-pill.always-on .pill-badge { display: inline-block; }
