/* Sistema Tiger Tech 3D — mesma linguagem visual do catálogo (papel claro, tinta preta, laranja ácido, Sora + Manrope) */
:root {
  --paper: #f4f4f4;
  --card: #ffffff;
  --ink: #050505;
  --ink-2: #2b2b2b;
  --muted: #626262;
  --muted-2: #8b8b8b;
  --line: #e4e4e4;
  --line-2: #d7d7d7;
  --soft: #f7f7f7;
  --acid: #ff5a00;
  --acid-2: #ff7a2e;
  --acid-soft: #fff1e8;
  --acid-ring: rgba(255, 90, 0, .2);
  --side: #0a0a0a;
  --side-2: #151515;
  --side-3: #1d1d1d;
  --side-text: #bdbdbd;
  --side-muted: #6c6c6c;
  --ok: #15803d; --ok-soft: #e7f5ec;
  --warn: #a15c07; --warn-soft: #fdf2df;
  --bad: #c0262d; --bad-soft: #fdeaea;
  --info: #1d4ed8; --info-soft: #e8effd;
  --violet: #6d28d9; --violet-soft: #f1eafe;
  --r-xl: 24px; --r-lg: 20px; --r: 14px; --r-sm: 10px; --pill: 100px;
  --f-head: 'Sora', system-ui, sans-serif;
  --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Consolas, monospace;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 32px -18px rgba(0,0,0,.18);
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.35);
  --side-w: 252px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 500 14.5px/1.5 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
::selection { background: var(--acid); color: #fff; }
.mono { font-family: var(--f-mono); letter-spacing: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hide { display: none !important; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.sm { gap: 8px; }
.gap-lg { gap: 22px; }
.mt { margin-top: 18px; } .mt-sm { margin-top: 10px; } .mb { margin-bottom: 18px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bold { font-weight: 800; }
.acid { color: var(--acid); }

/* ============ estrutura ============ */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--side); color: var(--side-text);
  display: flex; flex-direction: column; padding: 18px 14px; scrollbar-width: thin; scrollbar-color: #333 transparent; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand b { display: block; font: 800 16px/1 var(--f-head); color: #fff; letter-spacing: -0.02em; }
.brand small { display: block; font-size: 11px; color: var(--side-muted); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-top: 4px; }
.nav-g { font-size: 10.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--side-muted); padding: 16px 12px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 12px;
  font-weight: 650; font-size: 14px; color: var(--side-text); transition: background .15s, color .15s;
}
.nav a svg { flex: none; opacity: .85; }
.nav a:hover { background: var(--side-2); color: #fff; }
.nav a.on { background: var(--side-3); color: #fff; }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--acid); }
.nav a.on svg { color: var(--acid); opacity: 1; }
.nav .badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: var(--pill); background: var(--acid); color: var(--ink); font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.nav .badge.dim { background: #2a2a2a; color: #d6d6d6; }
.side-foot { margin-top: auto; padding-top: 18px; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--side-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--acid); color: var(--ink); font: 800 13px var(--f-head); flex: none; }
.me b { display: block; color: #fff; font-size: 13.5px; line-height: 1.2; }
.me small { color: var(--side-muted); font-size: 12px; }
.me button { margin-left: auto; background: none; border: 0; color: var(--side-muted); padding: 6px; border-radius: 8px; }
.me button:hover { color: #fff; background: var(--side-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 30; height: 70px; display: flex; align-items: center; gap: 14px; padding: 0 32px;
  background: rgba(244,244,244,.86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 620px; }
.search input {
  width: 100%; height: 46px; border-radius: var(--pill); border: 1px solid var(--line-2); background: #fff;
  padding: 0 92px 0 48px; font-weight: 600; outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: var(--muted-2); font-weight: 500; }
.search input:focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--acid-ring); }
.search > svg { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--acid); pointer-events: none; }
.search .kbd { position: absolute; right: 52px; top: 50%; transform: translateY(-50%); }
.search .cam { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.kbd { font: 700 11px var(--f-mono); color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: var(--soft); }
.results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-lg); max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; z-index: 50;
}
.results .grp { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--acid); padding: 10px 12px 4px; }
.results a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; }
.results a:hover, .results a.sel { background: var(--soft); }
.results a .t { font-weight: 700; }
.results a .s { color: var(--muted); font-size: 12.5px; }
.results .vazio { padding: 18px; color: var(--muted); text-align: center; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.page { width: 100%; max-width: 1320px; margin: 0 auto; padding: 30px 32px 80px; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.ph h1 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.045em; }
.ph .sub { color: var(--muted); margin-top: 8px; max-width: 640px; }
.ph-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--acid); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 0 4px var(--acid-ring); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 700; font-size: 13px; margin-bottom: 14px; }
.back:hover { color: var(--ink); }

/* ============ blocos ============ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; min-width: 0; }
.card.p0 { padding: 0; overflow: hidden; }
.card.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-h h3 { font-size: 16px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.card-h h3 .n { font: 700 12px var(--f-body); color: var(--muted); background: var(--soft); border-radius: var(--pill); padding: 2px 8px; letter-spacing: 0; }
.card.p0 .card-h { padding: 18px 22px 0; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-main-l { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.sticky { position: sticky; top: 92px; }

.kpi { display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi .l { font-size: 12.5px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi .v { font: 700 32px/1.05 var(--f-head); letter-spacing: -0.05em; margin-top: 6px; }
.kpi .s { font-size: 12.5px; color: var(--muted); }
.kpi .ic { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--ink); }
.kpi.dark .l, .kpi.dark .s { color: #9b9b9b; }
.kpi.dark .v { color: var(--acid); }
.kpi.dark .ic { background: #1d1d1d; color: var(--acid); }
.kpi.alert .v { color: var(--bad); }

.hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--side); color: #fff; padding: 34px 34px 30px;
  background-image: radial-gradient(600px 300px at 85% -10%, rgba(255,90,0,.35), transparent 60%), radial-gradient(400px 260px at -10% 120%, rgba(255,90,0,.18), transparent 60%);
}
.hero h1, .hero h2 { color: #fff; }
.hero .eyebrow { color: var(--acid-2); }
.hero p { color: #b9b9b9; }

/* ============ botões ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border-radius: var(--pill);
  border: 1px solid transparent; font-weight: 800; font-size: 14px; white-space: nowrap; background: var(--ink); color: #fff;
  transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: #262626; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--acid-ring); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-acid { background: var(--acid); color: var(--ink); }
.btn-acid:hover { background: #ff6d1f; }
.btn-line { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-line:hover { background: #fff; border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: #ebebeb; }
.btn-bad { background: #fff; color: var(--bad); border-color: #f0c9cb; }
.btn-bad:hover { background: var(--bad-soft); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; gap: 5px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 15px; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn-icon.btn-xs { width: 28px; }
.btn-block { width: 100%; }
.dark .btn-line, .hero .btn-line { background: transparent; color: #fff; border-color: #3a3a3a; }
.dark .btn-line:hover, .hero .btn-line:hover { border-color: #fff; }
.lnk { font-weight: 800; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; display: inline-flex; align-items: center; gap: 4px; }
.lnk:hover { color: var(--acid); }
a.ref { font-weight: 800; color: var(--ink); border-bottom: 1px dashed var(--line-2); }
a.ref:hover { color: var(--acid); border-color: var(--acid); }

.dropdown { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 8px; z-index: 60;
}
.menu a, .menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; border: 0; background: none; font-weight: 700; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--soft); }
.menu a svg, .menu button svg { color: var(--acid); }
.menu small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }

/* ============ chips ============ */
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--pill);
  font-size: 12px; font-weight: 800; white-space: nowrap; background: #ededed; color: #464646; letter-spacing: -0.005em;
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip.nodot::before { display: none; }
.chip.orange { background: var(--acid-soft); color: #c2410c; }
.chip.green { background: var(--ok-soft); color: var(--ok); }
.chip.blue { background: var(--info-soft); color: var(--info); }
.chip.yellow { background: var(--warn-soft); color: var(--warn); }
.chip.red { background: var(--bad-soft); color: var(--bad); }
.chip.violet { background: var(--violet-soft); color: var(--violet); }
.chip.black { background: var(--ink); color: #fff; }
.chip.black::before { background: var(--acid); }
.chip.lg { height: 30px; padding: 0 14px; font-size: 13px; }

.gar { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 16px; font-weight: 800; font-size: 13.5px; line-height: 1.25; }
.gar svg { flex: none; }
.gar small { display: block; font-weight: 600; font-size: 12px; opacity: .85; }
.gar.vigente { background: var(--ok-soft); color: var(--ok); }
.gar.expirada { background: var(--bad-soft); color: var(--bad); }
.gar.sem_registro { background: #ededed; color: #4a4a4a; }

/* ============ tabelas ============ */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
  padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fcfcfc;
}
.tbl td { padding: 13px 16px; border-bottom: 1px solid #efefef; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: #fafafa; }
.tbl td.t { font-weight: 750; }
.tbl td .s { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl input { height: 34px; border-radius: 10px; }
.tbl.compact td { padding: 9px 14px; }

/* ============ formulários ============ */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 12.5px; font-weight: 800; color: #3a3a3a; }
.field .hint { font-size: 12px; color: var(--muted); }
.inp, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, select.inp {
  width: 100%; height: 44px; border-radius: 12px; border: 1px solid #d9d9d9; background: #fff; padding: 0 14px;
  font-weight: 600; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea, textarea.inp { height: auto; min-height: 96px; padding: 11px 14px; resize: vertical; line-height: 1.5; }
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px var(--acid-ring); }
.field input[readonly] { background: var(--soft); }
.inp-lg { height: 58px !important; font-size: 17px !important; border-radius: 16px !important; padding: 0 18px !important; }
.fg { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fg.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fg.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fg .full { grid-column: 1 / -1; }
.sec-t { font: 700 15px var(--f-head); letter-spacing: -0.02em; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.sec-t .num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12.5px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--acid); }
.toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.toggles label { position: relative; }
.toggles input { position: absolute; opacity: 0; pointer-events: none; }
.toggles span {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--line-2);
  background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; transition: all .15s;
}
.toggles input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.toggles input:focus-visible + span { box-shadow: 0 0 0 4px var(--acid-ring); }

.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pills button, .pills a {
  height: 38px; padding: 0 16px; border-radius: var(--pill); border: 1px solid var(--line-2); background: #fff; font-weight: 800; font-size: 13px;
  display: inline-flex; align-items: center; gap: 8px; transition: all .15s;
}
.pills button:hover, .pills a:hover { border-color: var(--ink); }
.pills .on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pills .c { font-size: 11.5px; padding: 1px 7px; border-radius: var(--pill); background: var(--soft); color: var(--muted); }
.pills .on .c { background: var(--acid); color: var(--ink); }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .inp { max-width: 320px; height: 40px; border-radius: var(--pill); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--pill); padding: 3px; background: #fff; }
.seg button { border: 0; background: none; height: 32px; padding: 0 14px; border-radius: var(--pill); font-weight: 800; font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }

/* ============ listas, dados ============ */
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; font-size: 14px; }
.dl dt { color: var(--muted); font-weight: 650; }
.dl dd { margin: 0; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.list { display: flex; flex-direction: column; }
.list > a, .list > div.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #efefef; }
.list > a:last-child, .list > div.li:last-child { border-bottom: 0; }
.list > a:hover .t { color: var(--acid); }
.list .t { font-weight: 750; }
.list .s { color: var(--muted); font-size: 12.5px; }
.empty { text-align: center; padding: 38px 18px; color: var(--muted); }
.empty svg { color: var(--line-2); margin: 0 auto 10px; }
.empty b { display: block; color: var(--ink); font-family: var(--f-head); font-size: 16px; margin-bottom: 4px; }
.serial { font: 700 15px var(--f-mono); letter-spacing: .02em; }
.serial-xl { font: 700 clamp(18px, 2.4vw, 24px) var(--f-mono); letter-spacing: .03em; }
.swatch { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); display: inline-block; vertical-align: middle; }
.prog { height: 6px; border-radius: 6px; background: #ececec; overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 6px; background: var(--ink); }
.prog.low i { background: var(--bad); }
.prog.mid i { background: var(--acid); }
.bar-row { display: grid; grid-template-columns: 150px 1fr 34px; align-items: center; gap: 12px; font-size: 13px; padding: 6px 0; }
.bar-row .prog { height: 10px; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* ============ máquina (ficha) ============ */
.ficha-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; }
.ficha-hero h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.045em; }
.ficha-actions { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }

/* ============ filamentos ============ */
.fil-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.fil { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.fil .top-r { display: flex; align-items: center; gap: 12px; }
.fil .sw { width: 46px; height: 46px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), inset 0 -6px 12px rgba(0,0,0,.18), inset 0 6px 10px rgba(255,255,255,.25); position: relative; }
.fil .sw::after { content: ''; position: absolute; inset: 15px; border-radius: 50%; background: var(--card); box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.fil .nm { font: 700 15px/1.25 var(--f-head); letter-spacing: -0.02em; }
.fil .meta { font-size: 12px; color: var(--muted); font-weight: 650; }
.fil .qt { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.fil .qt .v { font: 700 30px/1 var(--f-head); letter-spacing: -0.05em; }
.fil .qt .v small { font: 700 12px var(--f-body); color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.stepper-q { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--pill); overflow: hidden; background: #fff; }
.stepper-q button { width: 34px; height: 32px; border: 0; background: none; display: grid; place-items: center; }
.stepper-q button:hover { background: var(--soft); }

/* ============ máquinas por modelo ============ */
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mod { display: flex; flex-direction: column; gap: 14px; transition: transform .15s, box-shadow .15s; }
.mod:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mod .brand-l { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--acid); }
.mod h3 { font-size: 19px; letter-spacing: -0.035em; }
.mod .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mod .nums div { background: var(--soft); border-radius: 12px; padding: 10px 12px; }
.mod .nums b { display: block; font: 700 22px/1 var(--f-head); letter-spacing: -0.04em; }
.mod .nums span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.mod .nums div.hl { background: var(--ink); color: #fff; }
.mod .nums div.hl b { color: var(--acid); }
.mod .nums div.hl span { color: #9b9b9b; }

/* ============ status (etapas) ============ */
.steps { display: flex; gap: 0; overflow-x: auto; padding: 4px 2px 2px; scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.step { flex: 1; min-width: 104px; display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; text-align: center; font-size: 12px; font-weight: 750; color: var(--muted-2); }
.step::before { content: ''; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step i { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); display: grid; place-items: center; position: relative; z-index: 1; font-style: normal; font-size: 12px; }
.step.done { color: var(--ink); }
.step.done i { background: var(--ink); border-color: var(--ink); color: #fff; }
.step.done::before, .step.cur::before { background: var(--ink); }
.step.cur { color: var(--ink); }
.step.cur i { border-color: var(--acid); background: var(--acid); color: var(--ink); box-shadow: 0 0 0 5px var(--acid-ring); }

/* ============ quadro (kanban) ============ */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(175px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #ebebeb; border-radius: 20px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.kcol h4 { font: 800 12px var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; padding: 4px 6px; }
.kcol h4 span { background: #fff; border-radius: var(--pill); padding: 1px 8px; font-size: 11.5px; letter-spacing: 0; }
.kcard { background: #fff; border-radius: 14px; padding: 12px 14px; border: 1px solid transparent; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, transform .15s; }
.kcard:hover { border-color: var(--ink); transform: translateY(-1px); }
.kcard .n { font: 700 12px var(--f-mono); color: var(--muted); }
.kcard .e { font-weight: 800; line-height: 1.3; }
.kcard .c { font-size: 12.5px; color: var(--muted); }

/* ============ linha do tempo ============ */
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl li { position: relative; padding: 0 0 16px 26px; }
.tl li::before { content: ''; position: absolute; left: 6px; top: 8px; bottom: -6px; width: 2px; background: var(--line); }
.tl li:last-child::before { display: none; }
.tl li::after { content: ''; position: absolute; left: 1px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
.tl li:first-child::after { background: var(--acid); border-color: var(--acid); box-shadow: 0 0 0 4px var(--acid-ring); }
.tl .d { font-weight: 700; font-size: 13.5px; line-height: 1.4; }
.tl .m { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============ mensagens (ticket) ============ */
.thread { display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; gap: 10px; }
.msg .avatar { width: 32px; height: 32px; font-size: 12px; background: var(--ink); color: #fff; }
.msg .b { background: #fff; border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 10px 14px; flex: 1; min-width: 0; }
.msg .b .h { font-size: 12px; color: var(--muted); margin-bottom: 3px; display: flex; gap: 8px; align-items: center; }
.msg .b .h b { color: var(--ink); }
.msg .b .x { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.int .b { background: #fff9ec; border-color: #f3e0b5; }
.composer { border: 1px solid var(--line-2); border-radius: 18px; background: #fff; overflow: hidden; }
.composer textarea { border: 0; width: 100%; min-height: 90px; padding: 14px 16px; outline: none; resize: vertical; }
.composer .bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 16px; border-top: 1px solid var(--line); background: #fcfcfc; }

/* ============ anexos ============ */
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.file { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--soft); aspect-ratio: 1; display: flex; flex-direction: column; }
.file img { width: 100%; height: 100%; object-fit: cover; }
.file .doc { flex: 1; display: grid; place-items: center; color: var(--muted); }
.file .nm { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file.d .nm { color: var(--ink); background: none; position: static; padding: 0 8px 8px; }
.file .rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: none; place-items: center; }
.file:hover .rm { display: grid; }
.drop { border: 1.5px dashed var(--line-2); border-radius: 16px; padding: 16px; text-align: center; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; transition: all .15s; display: flex; align-items: center; justify-content: center; gap: 8px; }
button.drop { background: none; width: 100%; font: inherit; font-weight: 700; font-size: 13px; color: var(--muted); }
.drop:hover, .drop.on { border-color: var(--acid); color: var(--ink); background: var(--acid-soft); }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.doc-row .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--acid-soft); color: #c2410c; display: grid; place-items: center; flex: none; }

/* ============ assinatura ============ */
.sig-wrap { position: relative; border: 1.5px solid var(--line-2); border-radius: 18px; background: #fff; overflow: hidden; touch-action: none; }
.sig-wrap canvas { display: block; width: 100%; height: 220px; cursor: crosshair; }
.sig-wrap .base { position: absolute; left: 24px; right: 24px; bottom: 46px; border-bottom: 1.5px solid #cfcfcf; pointer-events: none; }
.sig-wrap .ph-t { position: absolute; left: 24px; bottom: 18px; font-size: 12px; color: var(--muted-2); font-weight: 700; pointer-events: none; }
.sig-wrap .clr { position: absolute; top: 10px; right: 10px; }
.sig-img { max-width: min(100%, 340px); max-height: 110px; border-bottom: 1.5px solid #cfcfcf; padding-bottom: 6px; }
.termo { white-space: pre-wrap; font-size: 13px; color: var(--ink-2); background: var(--soft); border-radius: 14px; padding: 14px 16px; max-height: 220px; overflow: auto; line-height: 1.6; }

/* ============ escâner (câmera) e consulta ============ */
.cam-box { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.cam-box video { width: 100%; height: 100%; object-fit: cover; }
.cam-box .mira { position: absolute; left: 10%; right: 10%; top: 38%; bottom: 38%; border: 2px solid var(--acid); border-radius: 12px; box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.big-scan { position: relative; max-width: 760px; }
.big-scan input { width: 100%; height: 68px; border-radius: var(--pill); border: 0; padding: 0 170px 0 62px; font: 700 20px var(--f-mono); letter-spacing: .02em; outline: none; background: #fff; color: var(--ink); box-shadow: 0 0 0 6px rgba(255,255,255,.08); }
.big-scan input:focus { box-shadow: 0 0 0 6px var(--acid-ring); }
.big-scan input::placeholder { font-family: var(--f-body); font-weight: 600; letter-spacing: 0; font-size: 16px; color: #999; }
.big-scan > svg { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--acid); }
.hero .big-scan .btn-line { background: #fff; color: var(--ink); border-color: var(--line-2); }
.hero .big-scan .btn-line:hover { border-color: var(--ink); }
.big-scan .acts { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); display: flex; gap: 6px; }
.big-scan .acts .btn { height: 52px; }
.recent { display: flex; flex-wrap: wrap; gap: 8px; }
.recent a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--pill); background: #1b1b1b; color: #d8d8d8; font: 700 12.5px var(--f-mono); }
.recent a:hover { background: #262626; color: #fff; }

/* ============ itens de venda ============ */
.scan-line { display: flex; gap: 10px; }
.scan-line .inp { font-family: var(--f-mono); font-weight: 700; }
.scan-line .inp::placeholder, .inp.mono::placeholder { font-family: var(--f-body); font-weight: 600; letter-spacing: 0; }
.ac { position: relative; }
.ac .results { top: calc(100% + 6px); }
.pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.pick .t { font-weight: 800; }
.pick .s { font-size: 12.5px; color: var(--muted); }
.tot { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 0 4px; border-top: 1px solid var(--line); }
.tot b { font: 700 28px var(--f-head); letter-spacing: -0.04em; }

/* ============ modal e aviso ============ */
.ov { position: fixed; inset: 0; background: rgba(5,5,5,.5); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s ease; overflow-y: auto; }
.dlg { background: #fff; border-radius: var(--r-xl); width: 100%; max-width: 620px; box-shadow: var(--shadow-lg); animation: up .2s ease; display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dlg.lg { max-width: 860px; }
.dlg.sm { max-width: 440px; }
.dlg-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.dlg-h h3 { font-size: 20px; letter-spacing: -0.035em; }
.dlg-b { padding: 18px 24px; overflow-y: auto; }
.dlg-f { display: flex; justify-content: flex-end; gap: 10px; padding: 0 24px 22px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--pill); font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg); animation: up .2s ease; max-width: calc(100vw - 32px); }
.toast i { width: 8px; height: 8px; border-radius: 50%; background: var(--acid); flex: none; }
.toast.bad i { background: #ff5c5c; }
.toast.ok i { background: #3ddc84; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; font-size: 13.5px; font-weight: 600; }
.alert svg { flex: none; margin-top: 1px; }
.alert.warn { background: var(--warn-soft); color: #7a4504; }
.alert.bad { background: var(--bad-soft); color: #8f1d22; }
.alert.ok { background: var(--ok-soft); color: #0f5c2e; }
.alert.info { background: var(--info-soft); color: #173d9e; }
.alert b { font-weight: 800; }

/* ============ login ============ */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art {
  background: var(--side); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  background-image: radial-gradient(700px 400px at 100% 0%, rgba(255,90,0,.38), transparent 60%), radial-gradient(500px 300px at 0% 100%, rgba(255,90,0,.16), transparent 60%);
}
.auth-art h1 { font-size: clamp(40px, 5vw, 72px); letter-spacing: -0.06em; line-height: .98; }
.auth-art h1 em { font-style: normal; color: var(--acid); }
.auth-art p { color: #a9a9a9; max-width: 440px; margin-top: 18px; font-size: 16px; }
.auth-art .pts { display: flex; gap: 26px; flex-wrap: wrap; color: #cfcfcf; font-size: 13px; }
.auth-art .pts b { display: block; color: #fff; font: 700 15px var(--f-head); }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-form form { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.auth-form h2 { font-size: 30px; letter-spacing: -0.045em; }

/* ============ loading ============ */
.skel { background: linear-gradient(90deg, #ececec 25%, #f6f6f6 50%, #ececec 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; }
@keyframes sk { to { background-position: -200% 0; } }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 80px 0; color: var(--muted); }

/* ============ impressão ============ */
.print-doc { background: #fff; max-width: 820px; margin: 0 auto; padding: 36px 40px; border-radius: 6px; box-shadow: var(--shadow); color: #111; font-size: 12.5px; }
.print-doc h1 { font-size: 20px; letter-spacing: -0.03em; }
.print-doc h4 { font: 800 10.5px var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: #c2410c; margin: 18px 0 6px; }
.pd-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 14px; }
.pd-head .emp { display: flex; gap: 12px; align-items: center; }
.pd-head .emp img { width: 52px; height: 52px; }
.pd-head .emp b { font: 800 17px var(--f-head); letter-spacing: -0.02em; display: block; }
.pd-box { border: 1px solid #ddd; border-radius: 10px; padding: 10px 12px; }
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd-dl { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; }
.pd-dl dt { color: #666; }
.pd-dl dd { margin: 0; font-weight: 700; }
.pd-sig { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 26px; align-items: end; }
.pd-sig .ln { border-top: 1px solid #111; padding-top: 6px; text-align: center; font-size: 11.5px; }
.pd-sig img { max-height: 90px; margin: 0 auto -4px; }
.pd-tbl { width: 100%; border-collapse: collapse; }
.pd-tbl th, .pd-tbl td { border-bottom: 1px solid #e3e3e3; padding: 5px 4px; text-align: left; }
.pd-tbl th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: #666; }
.pd-tbl .num { text-align: right; }
.pd-foot { margin-top: 22px; font-size: 10.5px; color: #777; text-align: center; }
.pd-via { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; color: #888; margin-top: 8px; }

@media print {
  @page { margin: 12mm; }
  body { background: #fff; }
  .side, .top, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  .page { padding: 0; max-width: none; }
  .print-doc { box-shadow: none; padding: 0; max-width: none; font-size: 11.5px; }
  .pd-quebra { page-break-before: always; }
}

/* ============ responsivo ============ */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 1020px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 35; }
  .top .menu-btn { display: inline-flex; }
  .top { padding: 0 16px; }
  .g-main, .g-main-l, .g3 { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 32px 24px; min-height: 280px; }
  .auth-art .pts { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .page { padding: 20px 16px 72px; }
  .g2, .g4, .fg, .fg.c3, .fg.c4 { grid-template-columns: minmax(0, 1fr); }
  .search .kbd { display: none; }
  .search input { padding-right: 52px; height: 44px; }
  .top-actions .btn .lbl-d { display: none; }
  .top-actions .btn { padding: 0 12px; }
  .ficha-hero { grid-template-columns: 1fr; }
  .ficha-actions { min-width: 0; }
  .card { padding: 18px; border-radius: 18px; }
  .dl { grid-template-columns: 110px 1fr; }
  .hero { padding: 26px 20px; }
  .big-scan input { height: 60px; padding: 0 16px 0 52px; font-size: 16px; }
  .big-scan .acts { position: static; transform: none; margin-top: 10px; }
  .big-scan > svg { top: 30px; left: 18px; }
  .big-scan .acts .btn { flex: 1; height: 48px; }
  .kpi .v { font-size: 26px; }
  .bar-row { grid-template-columns: 110px 1fr 28px; }
  .tbl th, .tbl td { padding: 11px 12px; }
  .print-doc { padding: 20px 16px; }
  .pd-grid, .pd-sig { grid-template-columns: 1fr; }
  .dlg-h, .dlg-b, .dlg-f { padding-left: 18px; padding-right: 18px; }
}
