/* ================= orçamento ================= */
.stack { display: grid; gap: 12px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.accent { color: var(--accent); }
.warn-text { margin: 0; color: #ffb454; font-size: 13px; }
h3 { margin: 0; font-size: 16px; font-weight: 700; }
.lead { width: 20px; height: 20px; margin: 0 8px 0 0 !important; }
body.noscroll { overflow: hidden; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip-btn { flex: 0 0 auto; padding: 8px 14px; border-radius: 99px; background: var(--panel-solid); color: var(--muted); font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.chip-btn.active { color: #fff; background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: none; }

.tag.ok { color: #4fd18b; box-shadow: inset 0 0 0 1px #4fd18b; }
.tag.info { color: #6cb6ff; box-shadow: inset 0 0 0 1px #6cb6ff; }
.tag.warn { color: #ffb454; box-shadow: inset 0 0 0 1px #ffb454; }
.tag.bad { color: var(--err); box-shadow: inset 0 0 0 1px var(--err); }
.top .tag { align-self: center; }

.item.static { cursor: default; }
.item .between b { font-weight: 700; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); font-size: 14px; }
.kv b { font-weight: 600; text-align: right; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--line); font-size: 18px; }
.total b { color: var(--accent); font-size: 22px; }

.line { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 15px; }
.line span { color: var(--muted); }
.line.strong b { font-weight: 800; }
.line.accent b { color: var(--accent); }
.price-row { display: grid; gap: 6px; }
.price-input { font-size: 22px; font-weight: 700; text-align: right; }
.link { background: transparent; color: var(--accent); padding: 4px 0; text-align: right; font-size: 14px; text-decoration: underline; }

.picker { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; text-align: left; color: var(--ink);
  background: var(--field); border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); }
.picker > span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.picker small { color: var(--muted); font-size: 13px; }
.picker svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.picker.static { cursor: default; }
.placeholder { color: var(--muted); }
.swatch { width: 26px; height: 26px; border-radius: 7px; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.color-row { display: flex; align-items: center; gap: 12px; }
.color-row > span:not(.swatch) { display: grid; gap: 2px; min-width: 0; text-align: left; }

.est-head { display: flex; gap: 12px; align-items: center; }
.est-head > div { display: grid; gap: 2px; min-width: 0; }
.est-head strong { overflow-wrap: anywhere; font-size: 14px; }
.est-head small { color: var(--muted); font-size: 12px; }
.thumb { width: 72px; height: 72px; object-fit: contain; border-radius: 10px; background: #fff; flex: none; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.stat { display: grid; gap: 2px; padding: 8px 4px; text-align: center; background: var(--field); border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.stat small { color: var(--muted); font-size: 11px; }
.stat b { font-size: 12px; font-weight: 700; }

.row2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; align-items: end; }
.stepper { display: grid; grid-template-columns: 44px 1fr 44px; gap: 6px; }
.stepper input { text-align: center; }
.step { height: 100%; min-height: 46px; border-radius: 10px; background: var(--field); color: var(--accent); font-size: 22px; font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); }
.panel input, .panel textarea, .panel select { font: inherit; color: var(--ink); width: 100%; padding: 13px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); }
.panel input:focus, .panel textarea:focus, .panel select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); }
.panel .field input { border: 0; padding: 2px 0 0; background: transparent; box-shadow: none; }
.panel input[type="checkbox"] { width: 20px; height: 20px; padding: 0; accent-color: var(--accent); }
.panel input[type="file"] { display: none; }
.panel label { color: var(--muted); }

/* ================= diálogos e seletor ================= */
.layer { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .65); display: grid; align-items: end; justify-items: center; }
.dialog { align-self: center; width: min(92vw, 420px); margin: 0 auto; padding: 20px; border-radius: 18px; background: var(--panel-solid); display: grid; gap: 12px;
  box-shadow: inset 0 0 0 1px var(--edge), 0 20px 60px rgba(0, 0, 0, .7); }
.dialog p { margin: 0; color: #d4d9e2; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }
.dialog-actions .btn { flex: 1; }
.ask-input { width: 100%; min-height: 72px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--field); color: var(--ink); font: inherit; }
.sheet { width: min(100vw, 560px); max-height: 86vh; overflow-y: auto; padding: 16px 16px max(18px, env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0;
  background: var(--panel-solid); display: grid; gap: 12px; align-content: start; box-shadow: inset 0 0 0 1px var(--edge), 0 -10px 40px rgba(0, 0, 0, .6); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet .search input { background: var(--field); }
.sheet .item { background: var(--field); }

/* ================= vincular aparelho ================= */
.code-input { text-align: center; text-transform: uppercase; letter-spacing: .22em; font-size: 24px !important; font-weight: 700; padding: 16px 12px !important; }
.dialog.scan { width: min(94vw, 460px); }
.dialog.scan video { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; background: #000; box-shadow: inset 0 0 0 1px var(--edge); }
