:root {
  /* Brand */
  --accent: #1a73e8;
  --accent-dim: rgba(26,115,232,.10);
  --accent-hover: #1558d6;
  --accent-border: rgba(26,115,232,.26);
  --accent-glow: rgba(26,115,232,.18);
  /* Semantic */
  --green: #188038;
  --green-dim: rgba(24,128,56,.10);
  --green-border: rgba(24,128,56,.24);
  --red: #d93025;
  --red-dim: rgba(217,48,37,.10);
  --red-border: rgba(217,48,37,.24);
  /* Dark surfaces */
  --bg: #0f1115;
  --surface: #17191f;
  --surface2: #20232b;
  --surface3: #2a2e38;
  --surface4: #343946;
  /* Borders */
  --border: rgba(232,234,237,.08);
  --border2: rgba(232,234,237,.14);
  /* Text */
  --text: #f8fafd;
  --muted: #a9b1c0;
  --faint: #6f7787;
  /* Radius */
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px;
  /* Layout */
  --sidebar-w: 210px;
  --panel-w: 440px;
  --topbar-h: 56px;

/* ── Responsive layout por tamanho de tela ── */
@media (max-width: 1400px) {
  :root { --sidebar-w: 196px; --panel-w: 400px; }
}
@media (max-width: 1280px) {
  :root { --sidebar-w: 186px; --panel-w: 360px; }
}
@media (max-width: 1100px) {
  :root { --sidebar-w: 172px; --panel-w: 320px; }
}
@media (min-width: 1920px) {
  :root { --sidebar-w: 224px; --panel-w: 480px; }
}
@media (min-width: 2560px) {
  :root { --sidebar-w: 256px; --panel-w: 540px; }
}
  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.22), 0 1px 3px rgba(0,0,0,.18);
  --shadow-md: 0 6px 18px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.18);
  --shadow-lg: 0 18px 42px rgba(0,0,0,.32), 0 6px 14px rgba(0,0,0,.22);
}
body[data-theme="light"] {
  --bg: #f8fafd;
  --surface: #ffffff;
  --surface2: #f1f4f9;
  --surface3: #e8eef7;
  --surface4: #dce5f2;
  --border: rgba(60,64,67,.105);
  --border2: rgba(60,64,67,.18);
  --text: #202124;
  --muted: #5f6368;
  --faint: #8a9099;
  --accent: #1a73e8;
  --accent-dim: rgba(26,115,232,.075);
  --accent-border: rgba(26,115,232,.22);
  --accent-glow: rgba(26,115,232,.16);
  --green: #188038;
  --green-dim: rgba(24,128,56,.08);
  --green-border: rgba(24,128,56,.22);
  --shadow-sm: 0 1px 2px rgba(60,64,67,.08), 0 1px 3px rgba(60,64,67,.06);
  --shadow-md: 0 6px 18px rgba(60,64,67,.13), 0 2px 6px rgba(60,64,67,.07);
  --shadow-lg: 0 18px 44px rgba(60,64,67,.16), 0 6px 16px rgba(60,64,67,.09);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html, body { height: 100%; font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5 }
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer; border: none; background: none }
input, select, textarea { transition: border-color .16s, box-shadow .16s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-border) !important; box-shadow: 0 0 0 3px var(--accent-glow) !important; }
::-webkit-scrollbar { width: 4px; height: 4px }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--faint) 72%, transparent); border-radius: 999px; border: 1px solid transparent; background-clip: padding-box }
::-webkit-scrollbar-track { background: transparent }
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--panel-w);
  grid-template-rows: var(--topbar-h) 1fr;
  height: 100vh;
  overflow: hidden;
}
/* Nas áreas administrativas, o painel lateral direito é recolhido para liberar espaço útil. */
.app.app-no-right-panel {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) 0px;
}
.app.app-no-right-panel .panel {
  display: none !important;
}
.app.app-no-right-panel .main {
  grid-column: 2 / 3;
}

/* ── RESIZE HANDLES ── */
.resize-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  touch-action: none;
}
.resize-handle::after {
  content: '';
  width: 2px;
  height: 40px;
  border-radius: 2px;
  background: var(--border2);
  transition: background .15s, height .15s;
}
.resize-handle:hover::after,
.resize-handle.dragging::after {
  background: var(--accent);
  height: 60px;
}
.resize-handle-left {
  right: -3px;
}
.resize-handle-right {
  left: -3px;
}
.sidebar { position: relative; }
.panel   { position: relative; }
.topbar {
  grid-column: 1 / -1;
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}
.topbar-brand {
  width: var(--sidebar-w);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  border-right: 1px solid var(--border);
  height: 100%;
  overflow: hidden;
}
.brand-logo {
  display: block;
  width: 100%;
  max-width: 172px;
  max-height: 42px;
  object-fit: contain;
}
.topbar-center {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  height: 100%;
}
.client-fields {
  display: flex;
  align-items: center;
  gap: 8px;
}
.client-field {
  display: flex;
  align-items: center;
  gap: 6px;
}
.client-field label {
  font-size: 10px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}
.client-field input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  width: 200px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.client-field input:focus {
  border-color: var(--accent-border);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.sep { width: 1px; height: 20px; background: var(--border); flex: none }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-right: 4px;
}
.topbar-right {
  width: var(--panel-w);
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-left: 1px solid var(--border);
  height: 100%;
}
.totals-inline {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}
.total-item { display: flex; flex-direction: column; gap: 0 }
.total-label { font-size: 9px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em }
.total-value { font-size: 14px; font-weight: 700; font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums; letter-spacing: -.3px; line-height: 1.2 }
.total-value.accent { color: var(--accent) }
.total-value.green { color: var(--green) }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-section {
  padding: 14px 12px 8px;
}
.sidebar-section + .sidebar-section {
  border-top: 1px solid var(--border);
}
.sidebar-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: 2px 8px 6px;
  display: block;
}
.product-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  transition: all .15s;
  text-align: left;
  border: 1px solid transparent;
  position: relative;
  background: transparent;
}
.product-btn:hover {
  color: var(--text);
  background: var(--surface2);
  border-color: var(--border);
}
.product-btn.active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-border);
}
.product-btn.active .nav-icon{
  background: color-mix(in srgb, currentColor 12%, transparent);
  border-color: color-mix(in srgb, currentColor 32%, transparent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);
}
.nav-icon{
  width: 18px;
  height: 18px;
  border-radius: 6px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--icon-color, currentColor);
  border: 1px solid transparent;
  background: transparent;
  transition: transform .15s, box-shadow .15s, background-color .15s, border-color .15s, color .15s;
}
.nav-icon svg{
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon.fill-grid svg rect,
.nav-icon.fill-grid svg circle{
  fill: currentColor;
  stroke: none;
}
.nav-icon.tag-soft svg path:last-child{
  fill: currentColor;
  stroke: none;
}
.product-count {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 6px;
  letter-spacing: .02em;
}
.product-btn.active .product-count {
  color: var(--accent);
  background: rgba(249,115,22,.12);
  border-color: rgba(249,115,22,.22);
}
.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 10px 12px;
}
.sidebar-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  transition: all .15s;
  text-align: left;
}
.sidebar-btn:hover { color: var(--text); background: var(--surface2) }
.sidebar-btn svg { opacity: .5; flex: none }
.main {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: hidden;
  min-width: 0;
  min-height: 0;
  background: var(--bg);
}
.items-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--accent) 4%), var(--surface));
}
.items-header h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
}
.product-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.items-count {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 2px 8px;
  font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.items-header-actions { margin-left: auto; display: flex; gap: 7px; align-items: center }
.items-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 14px 80px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: visible;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, opacity .2s, box-shadow .18s ease, transform .18s ease;
}
.item-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-md);
}
.item-card.inactive { opacity: .45 }
.item-card.inactive:hover { opacity: .65 }
.ic-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  cursor: default;
}
.ic-icon {
  width: 28px; height: 28px; border-radius: var(--r-sm);
  background: var(--accent-dim); display: grid; place-items: center;
  font-size: 14px; flex: none; border: 1px solid var(--accent-border);
}
.ic-name {
  font-size: 13px; font-weight: 600; letter-spacing: -.2px;
}
.ic-sub { font-size: 10px; color: var(--muted); margin-top: 1px }
.ic-controls { margin-left: auto; display: flex; align-items: center; gap: 6px }
.ic-price {
  font-size: 13px;
  font-weight: 700;
  font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 3px 10px;
  border-radius: 99px;
}
.ic-margin {
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-dim);
  border: 1px solid var(--green-border);
  padding: 3px 7px;
  border-radius: 99px;
}
.ic-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  align-items: start;
}
.ic-fields { display: grid; gap: 10px }
.fields-row {
  display: grid;
  gap: 8px;
}
.f4 { grid-template-columns: 1.3fr .9fr .9fr .65fr }
.f3 { grid-template-columns: repeat(3, 1fr) }
.f2 { grid-template-columns: repeat(2, 1fr) }
.f1 { grid-template-columns: 1fr }
.field { display: grid; gap: 4px }
.field label {
  font-size: 9px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .09em;
}
input, select, textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px rgba(249,115,22,.07);
}
.extras-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.toggle-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  min-height: 34px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}
.toggle-pill:hover {
  border-color: var(--border2);
  color: var(--text);
  transform: translateY(-1px);
}
.toggle-pill.on {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.toggle-pill input { display: none }
.pill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--faint); flex: none; transition: background .15s;
}
.toggle-pill.on .pill-dot { background: var(--accent) }
.lona-add-wrap{padding-top:2px}
.lona-add-inline{padding:6px 12px;font-size:11px}
.bd-stack{display:grid;gap:10px;width:100%}
.bd-card{background:var(--surface2);border:1px solid var(--border);border-radius:var(--r-md);overflow:hidden;width:100%}
.bd-title{padding:10px 12px;background:var(--surface3);border-bottom:1px solid var(--border);font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--faint)}
.bd-row{display:grid;grid-template-columns:minmax(170px,1fr) minmax(140px,160px);gap:16px;padding:9px 12px;border-bottom:1px solid var(--border);font-size:12px;align-items:start}
.bd-row:last-child{border-bottom:none}
.bd-val{font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 500;font-weight:600;text-align:right;word-break:break-word;line-height:1.45}
.bd-row > span:first-child{line-height:1.45}
.bd-profit .bd-val{color:var(--green)}
.bd-total{background:var(--accent-dim)}
.bd-total .bd-val{color:var(--accent);font-weight:700}
.ipm-chip{display:inline-flex;align-items:center;gap:4px;padding:5px 9px;border-radius:999px;border:1px solid var(--border);background:var(--surface2);font-size:10px;font-weight:600;color:var(--muted)}
.ipm-chip.good{background:rgba(34,197,94,.08);border-color:rgba(34,197,94,.22);color:var(--green)}
.ipm-chip.warn{background:rgba(249,115,22,.08);border-color:rgba(249,115,22,.22);color:var(--accent)}
.ipm-note{font-size:10px;color:var(--muted);line-height:1.45}
.ipm-check-btn{padding:8px 16px;font-size:12px;font-weight:700;border-radius:999px;background:#1e8e3e;border:1px solid rgba(30,142,62,.25);color:#fff;box-shadow:0 2px 8px rgba(30,142,62,.18);transition:all .18s ease}
.ipm-check-btn:hover{background:#188038;border-color:rgba(30,142,62,.32);color:#fff;transform:translateY(-1px);box-shadow:0 6px 16px rgba(30,142,62,.28)}
.ipm-check-btn.active{background:#137333;border-color:rgba(19,115,51,.34);color:#fff;box-shadow:0 6px 18px rgba(30,142,62,.32)}
.orc-meta > .bd-stack{grid-column:1 / -1;width:100%}
.orc-meta > .bd-stack .bd-card{width:100%}
.orc-meta:has(> .bd-stack){grid-template-columns:1fr}
.notice-chips { display: flex; gap: 6px; flex-wrap: wrap }
.notice-chip {
  display: flex; flex-direction: column; gap: 1px;
  padding: 6px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.lona-meta-row{
  display:grid;
  grid-template-columns:minmax(130px,170px) minmax(150px,190px) minmax(0,1fr);
  gap:10px;
  align-items:end;
}
.lona-meta-row .field{min-width:0 !important}
.lona-meta-row .notice-chips{
  display:grid;
  grid-template-columns:repeat(3,minmax(110px,1fr));
  gap:8px;
  min-width:0;
}
.lona-meta-row .notice-chip{
  padding:10px 12px;
  min-height:100%;
  justify-content:center;
}
.lona-meta-row .nc-value{font-size:13px;font-weight:700}
.lona-action-row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.lona-action-row .ipm-check-btn{
  margin-left:auto;
  white-space:nowrap;
}
.lona-ipm-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
@media (max-width: 1180px){
  .lona-meta-row{grid-template-columns:1fr 1fr}
  .lona-meta-row .notice-chips{grid-column:1 / -1}
}
@media (max-width: 760px){
  .lona-meta-row{grid-template-columns:1fr}
  .lona-meta-row .notice-chips{grid-template-columns:1fr}
  .lona-action-row .ipm-check-btn{margin-left:0;width:100%}
}
.notice-chip {
  display: flex; flex-direction: column; gap: 1px;
  padding: 6px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.nc-label { font-size: 9px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .07em }
.nc-value { font-size: 12px; font-weight: 600; font-family: 'Inter', monospace }
.ic-result {
  width: 148px;
  display: grid;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.irr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
}
.irr-label { font-size: 10px; color: var(--muted) }
.irr-val { font-size: 11px; font-weight: 600; font-family: 'Inter', monospace }
.irr-val.ok { color: var(--green) }
.irr-divider { height: 1px; background: var(--border); margin: 3px 0 }
.irr-total {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 6px; border-top: 1px solid var(--border); margin-top: 3px;
}
.irr-total-label { font-size: 10px; font-weight: 700; color: var(--muted) }
.irr-total-val { font-size: 15px; font-weight: 700; color: var(--accent); font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums; letter-spacing: -.3px }

/* ── SISTEMA DE CARDS GOOGLE — TODOS OS PRODUTOS ── */
.g-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: visible;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .18s;
}
.g-card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-md);
}
/* cabeçalho do card */
.g-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 14px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.g-head-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex: none;
  border: 1px solid var(--accent-border);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.g-head-info { flex: 1; min-width: 0; }
.g-head-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.g-head-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.g-head-right { display: flex; align-items: center; gap: 8px; flex: none; }
.g-price {
  font-size: 20px; font-weight: 800; color: var(--accent);
  font-family: 'Plus Jakarta Sans','Inter',system-ui,sans-serif;
  letter-spacing: -.04em;
}
.g-margin {
  font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: 99px;
  background: var(--green-dim); color: var(--green); border: 1px solid var(--green-border);
}
.g-margin.warn {
  background: rgba(245,158,11,.1); color: #f59e0b; border-color: rgba(245,158,11,.25);
}
.g-del {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); background: transparent; border: none; cursor: pointer;
  font-size: 14px; transition: all .15s;
}
.g-del:hover { background: var(--red-dim); color: var(--red); }
/* faixa de métricas */
.g-metrics {
  display: grid;
  border-bottom: 1px solid var(--border);
}
.g-metrics.cols-3 { grid-template-columns: repeat(3,1fr); }
.g-metrics.cols-4 { grid-template-columns: repeat(4,1fr); }
.g-metrics.cols-5 { grid-template-columns: repeat(5,1fr); }
.g-metric {
  padding: 10px 24px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.g-metric:last-child { border-right: none; }
.g-metric-label {
  font-size: 9px; font-weight: 800; color: var(--faint);
  text-transform: uppercase; letter-spacing: .1em;
}
.g-metric-value {
  font-size: 14px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.g-metric-value.green { color: var(--green); }
.g-metric-value.accent { color: var(--accent); }
.g-metric-value.muted { color: var(--muted); font-size: 12px; }
/* corpo de campos */
.g-body {
  padding: 16px 24px;
  display: grid; gap: 12px;
}
.g-row { display: grid; gap: 10px; }
.g-row.c2 { grid-template-columns: 1fr 1fr; }
.g-row.c3 { grid-template-columns: 1fr 1fr 1fr; }
.g-row.c4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.g-row.c1 { grid-template-columns: 1fr; }
.g-field { display: flex; flex-direction: column; gap: 4px; }
.g-field label {
  font-size: 10px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .08em;
}
/* inputs com contraste melhorado */
.g-field input, .g-field select {
  background: color-mix(in srgb, var(--surface3) 60%, var(--surface));
  border: 1px solid var(--border2);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text); outline: none;
  transition: border-color .15s, background .15s;
  width: 100%;
}
.g-field input:focus, .g-field select:focus {
  border-color: var(--accent-border);
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}
.g-field input:disabled { opacity: .4; cursor: not-allowed; }
/* chips de info */
.g-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.g-chip {
  display: inline-flex; flex-direction: column; gap: 1px;
  padding: 6px 10px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--surface3) 60%, var(--surface));
  border: 1px solid var(--border);
}
.g-chip-label { font-size: 9px; font-weight: 800; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.g-chip-value { font-size: 12px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
/* botão de ação */
.g-add-btn {
  margin: 0 16px 14px;
  width: calc(100% - 32px);
  padding: 10px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; font-size: 13px; font-weight: 700;
  border: none; cursor: pointer; transition: opacity .15s;
  letter-spacing: .02em;
}
.g-add-btn:hover { opacity: .96; box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 26%, transparent); }
/* pills dentro de g-body */
.g-pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* nota de rodapé */
.g-note {
  margin: 0 16px 14px;
  font-size: 11px; color: var(--muted);
  padding: 8px 10px;
  background: color-mix(in srgb, var(--surface3) 60%, var(--surface));
  border-radius: var(--r-sm);
  border-left: 3px solid var(--accent-border);
  line-height: 1.5;
}
/* também melhora contraste dos inputs do sistema antigo (field) */
.field input, .field select,
.fields-row .field input, .fields-row .field select {
  background: color-mix(in srgb, var(--surface3) 60%, var(--surface)) !important;
  border-color: var(--border2) !important;
}
.field input:focus, .field select:focus,
.fields-row .field input:focus, .fields-row .field select:focus {
  border-color: var(--accent-border) !important;
  background: color-mix(in srgb, var(--accent) 4%, var(--surface)) !important;
}
/* também aplica nos inputs do placas-card existente */
.placas-field input, .placas-field select {
  background: color-mix(in srgb, var(--surface3) 60%, var(--surface));
  border-color: var(--border2);
}
.placas-field input:focus, .placas-field select:focus {
  border-color: var(--accent-border);
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}
/* também aplica nos inputs da calculadora de alumínio */
.alum-field input, .alum-field select,
.alum-mrow-qty, .alum-sim-grid input, .alum-sim-grid select {
  background: color-mix(in srgb, var(--surface3) 60%, var(--surface)) !important;
  border-color: var(--border2) !important;
}
.alum-field input:focus, .alum-field select:focus,
.alum-mrow-qty:focus { border-color: var(--accent-border) !important; }
.placas-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  transition: border-color .15s, box-shadow .18s;
}
.placas-card:hover {
  border-color: var(--border2);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
}
.placas-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 6%, var(--surface)), var(--surface));
}
.placas-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid var(--accent-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex: none;
}
.placas-card-title-wrap { flex: 1; min-width: 0; }
.placas-card-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.placas-card-sub {
  font-size: 11px; color: var(--muted); margin-top: 2px;
}
.placas-card-price {
  font-size: 20px; font-weight: 800; color: var(--accent);
  font-family: 'Plus Jakarta Sans','Inter',system-ui,sans-serif;
  letter-spacing: -.04em; flex: none;
}
.placas-card-margin {
  font-size: 11px; font-weight: 700; padding: 3px 9px;
  border-radius: 99px; flex: none;
  background: var(--green-dim); color: var(--green); border: 1px solid var(--green-border);
}
.placas-card-margin.warn {
  background: rgba(245,158,11,.1); color: #f59e0b; border-color: rgba(245,158,11,.25);
}
.placas-card-del {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); background: transparent; border: none; cursor: pointer;
  font-size: 14px; transition: all .15s;
}
.placas-card-del:hover { background: var(--red-dim); color: var(--red); }

.placas-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.placas-metric {
  padding: 10px 24px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.placas-metric:last-child { border-right: none; }
.placas-metric-label {
  font-size: 9px; font-weight: 800; color: var(--faint);
  text-transform: uppercase; letter-spacing: .1em;
}
.placas-metric-value {
  font-size: 14px; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  color: var(--text);
}
.placas-metric-value.green { color: var(--green); }
.placas-metric-value.accent { color: var(--accent); }

.placas-fields {
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}
.placas-fields-row {
  display: grid;
  gap: 10px;
}
.placas-fields-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.placas-fields-row.cols-2 { grid-template-columns: 1fr 1fr; }
.placas-fields-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.placas-field { display: flex; flex-direction: column; gap: 4px; }
.placas-field label {
  font-size: 10px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .08em;
}
.placas-field input, .placas-field select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text); outline: none;
  transition: border-color .15s;
  width: 100%;
}
.placas-field input:focus, .placas-field select:focus { border-color: var(--accent-border); }
.placas-field input:disabled { opacity: .4; cursor: not-allowed; }

.placas-add-btn {
  margin: 0 16px 14px;
  width: calc(100% - 32px);
  padding: 10px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff; font-size: 13px; font-weight: 700;
  border: none; cursor: pointer; transition: opacity .15s;
  letter-spacing: .02em;
}
.placas-add-btn:hover { opacity: .96; box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 26%, transparent); }
.panel {
  border-left: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.ptab {
  flex: 1;
  padding: 10px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  border-bottom: 2px solid transparent;
  transition: all .15s;
  letter-spacing: .02em;
}
.ptab:hover { color: var(--text) }
.ptab.active { color: var(--accent); border-bottom-color: var(--accent); background: linear-gradient(180deg, transparent, var(--accent-dim)); font-weight: 800 }
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.ptab-content { display: none; gap: 12px }
.ptab-content.active { display: grid; animation: _viewFadeInFast .18s cubic-bezier(.4,0,.2,1) both; }
.orc-header { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px }
.orc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px }
.orc-meta-cell {
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.orc-meta-label { font-size: 9px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em }
.orc-meta-val { font-size: 12px; font-weight: 600; margin-top: 2px; font-family: 'Inter', monospace }
.orc-meta-val.accent { color: var(--accent) }
.orc-meta-val.green { color: var(--green) }
.orc-text-area {
  font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  line-height: 1.8;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  min-height: 220px;
  resize: none;
  color: var(--text);
  width: 100%;
  outline: none;
}
.orc-text-area:focus { border-color: var(--accent-border) }
.formal-preset-dock{display:grid;gap:10px;margin-bottom:10px}
.formal-preset-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.formal-preset-title{font-size:10px;font-weight:800;color:var(--faint);text-transform:uppercase;letter-spacing:.1em}
.formal-preset-sub{font-size:11px;color:var(--muted)}
.formal-preset-grid{display:grid;gap:8px}
.formal-preset-card{width:100%;text-align:left;padding:12px 14px;border-radius:14px;background:linear-gradient(180deg,var(--surface),var(--surface2));border:1px solid var(--border);transition:all .16s ease;display:grid;gap:4px}
.formal-preset-card:hover{border-color:var(--border2);transform:translateY(-1px)}
.formal-preset-card.active{background:linear-gradient(180deg,var(--accent-dim),rgba(249,115,22,.05));border-color:var(--accent-border);box-shadow:0 8px 18px rgba(0,0,0,.08)}
.formal-preset-name{font-size:12px;font-weight:800;letter-spacing:.02em}
.formal-preset-note{font-size:11px;color:var(--muted);line-height:1.5}
.formal-quick-rail{padding:12px;border:1px solid var(--border);border-radius:16px;background:linear-gradient(180deg,var(--surface),var(--surface2));display:none;gap:10px;margin-bottom:12px;box-shadow:0 6px 18px rgba(0,0,0,.05)}
.formal-quick-rail.show{display:grid}
.formal-quick-rail-head{display:flex;flex-direction:column;gap:2px}
.formal-quick-rail-title{font-size:10px;font-weight:800;color:var(--faint);text-transform:uppercase;letter-spacing:.1em}
.formal-quick-rail-sub{font-size:11px;color:var(--muted);line-height:1.45}
.formal-quick-rail .formal-preset-card{border-radius:16px;padding:13px 14px}
.formal-preview-box{display:grid;gap:6px;padding:10px 12px;border-radius:14px;background:var(--surface2);border:1px solid var(--border)}
.formal-preview-label{font-size:9px;font-weight:800;color:var(--faint);text-transform:uppercase;letter-spacing:.08em}
.formal-preview-text{font-size:11px;line-height:1.6;color:var(--text)}
.formal-preview-box{display:grid;gap:6px;padding:12px;border-radius:14px;background:var(--surface2);border:1px solid var(--border)}
.formal-preview-label{font-size:10px;font-weight:800;color:var(--faint);text-transform:uppercase;letter-spacing:.08em}
.formal-preview-text{font-size:11px;line-height:1.75;white-space:pre-wrap;color:var(--text)}
.resumo-items { display: grid; gap: 6px }
.resumo-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.ri-left .ri-name { font-size: 12px; font-weight: 600 }
.ri-left .ri-sub { font-size: 10px; color: var(--muted); margin-top: 1px }
.ri-price {
  font-size: 12px; font-weight: 700; font-family: 'Inter', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--accent); white-space: nowrap;
}
.totals-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
  display: grid;
  gap: 6px;
}
.totals-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
}
.totals-row .tl { color: var(--muted) }
.totals-row .tv { font-weight: 600; font-family: 'Inter', monospace }
.totals-row .tv.accent { color: var(--accent) }
.totals-row .tv.green { color: var(--green) }
.totals-row.big .tv { font-size: 15px; font-weight: 700 }
.totals-divider { height: 1px; background: var(--border); margin: 3px 0 }
.param-section-title {
  font-size: 9px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 7px; margin-top: 12px;
}
.param-section-title:first-child { margin-top: 0 }
.param-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.param-row:last-child { border-bottom: none }
.param-key { color: var(--muted) }
.param-val { font-weight: 600; font-family: 'Inter', monospace }
.param-input{width:118px;max-width:100%;text-align:right;font-weight:600;font-family:'Inter',system-ui,sans-serif;font-variant-numeric:tabular-nums;padding:6px 10px;border-radius:10px;background:var(--surface2);border:1px solid var(--border)}
.param-help{font-size:11px;color:var(--muted);line-height:1.45;background:var(--surface2);border:1px solid var(--border);border-radius:var(--r-sm);padding:10px 12px;margin-bottom:10px}
.control-actions{display:flex;gap:8px}
.control-note{font-size:11px;color:var(--muted);line-height:1.45;background:var(--surface2);border:1px solid var(--border);border-radius:var(--r-sm);padding:10px 12px}
.control-section{display:grid;gap:10px;background:var(--surface2);border:1px solid var(--border);border-radius:var(--r-md);padding:12px}
.control-title{font-size:10px;font-weight:700;color:var(--faint);text-transform:uppercase;letter-spacing:.08em}
.control-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:1100px){.control-grid{grid-template-columns:1fr}}
.main-control-view{display:none;flex:1;overflow-y:auto;padding:20px;background:var(--bg)}
.main-control-view.active{display:block}
.main-control-wrap{max-width:1020px;display:grid;gap:16px}
.main-control-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:0 2px 12px rgba(0,0,0,.04)}
.main-control-title{font-size:17px;font-weight:800;letter-spacing:-.03em}
.main-control-sub{font-size:12px;color:var(--muted);margin-top:3px}
.main-hidden{display:none !important}

/* ── PANFLETOS CARD ──────────────────────────────── */
.rot-pill-disabled { opacity: .35; cursor: not-allowed !important; }
.rot-pill-disabled:hover { background: var(--surface2) !important; border-color: var(--border2) !important; color: var(--muted) !important; }
.pf-auto-pill.active { background: rgba(6,182,212,.15); border-color: rgba(6,182,212,.5); color: #22d3ee; }
.pf-compare { background: var(--surface2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.pf-compare-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pf-compare-grid { display: flex; flex-direction: column; gap: 6px; }
.pf-compare-row { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); transition: border-color .15s; }
.pf-compare-row.pf-best { border-color: rgba(29,185,84,.35); background: rgba(29,185,84,.05); }
.pf-compare-row.pf-selected { border-color: rgba(6,182,212,.4); background: rgba(6,182,212,.05); }
.pf-compare-nome { font-size: 12px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.pf-compare-prazo { font-size: 10px; font-weight: 500; color: var(--muted); background: var(--surface3); padding: 2px 7px; border-radius: 99px; }
.pf-compare-vals { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-compare-custo { font-size: 11px; color: var(--muted); }
.pf-compare-venda { font-size: 12px; font-weight: 700; color: var(--text); }
.pf-badge-best { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; background: rgba(29,185,84,.15); color: var(--green); border: 1px solid rgba(29,185,84,.3); padding: 2px 7px; border-radius: 99px; }

/* ── RÓTULOS CARD ────────────────────────────────── */
.rot-body { display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 24px; }
.rot-section-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: -4px; }
.rot-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.rot-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.rot-pill:hover { border-color: rgba(168,85,247,.4); color: var(--text); background: var(--surface3); }
.rot-pill.active { background: rgba(168,85,247,.15); border-color: rgba(168,85,247,.5); color: #c084fc; font-weight: 700; }
.rot-pill-qty { font-size: 11px; }
.rot-custom-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.rot-field-name { grid-column: 1; }
.rot-chips { margin-top: 2px; }
/* rot-card uses rot-body for padding */
@media (max-width: 1100px) { .rot-custom-row { grid-template-columns: 1fr 1fr; } }
@keyframes _viewFadeIn {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes _viewFadeInFast {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.main-control-view.active,
.pedido-view.active,
.dashboard-view.active,
.formal-quote-view.active,
.hist-pedidos-view.active,
.home-view.active,
.clientes-view.active {
  animation: _viewFadeIn .23s cubic-bezier(.4,0,.2,1) both;
}

/* Produto: fade nos elementos ao aparecer */
@keyframes _prodFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
.items-header.prod-entering,
.wind-subtab-bar.prod-entering,
.items-body.prod-entering {
  animation: _prodFadeIn .2s cubic-bezier(.4,0,.2,1) both;
}

/* Sidebar: transição suave no estado active */
.product-btn,
.sidebar-btn {
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease !important;
}
.control-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.control-toolbar{display:grid;gap:12px;padding:16px;background:var(--surface);border:1px solid var(--border);border-radius:20px;box-shadow:0 2px 12px rgba(0,0,0,.04)}
.control-toolbar-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.control-search-wrap{position:relative;flex:1;min-width:260px}
.control-search{width:100%;padding:12px 14px 12px 42px;border-radius:12px;background:var(--surface2);border:1px solid var(--border);font-size:13px;font-weight:500;outline:none;color:var(--text);transition:border-color .15s}
.control-search:focus{border-color:var(--accent-border);box-shadow:0 0 0 3px rgba(26,115,232,.07)}
.control-search-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--faint);pointer-events:none}
.control-search-icon svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.control-quickstats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.control-stat{background:var(--surface2);border:1px solid var(--border);border-radius:12px;padding:10px 14px;display:flex;align-items:center;gap:10px}
.control-stat-icon{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;flex:none;background:var(--accent-dim);color:var(--accent)}
.control-stat-icon svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.control-stat-body{display:grid;gap:1px}
.control-stat-label{font-size:9px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--faint)}
.control-stat-value{font-size:16px;font-weight:800;letter-spacing:-.03em}
.control-nav{display:flex;flex-wrap:wrap;gap:6px;padding-top:4px}
.control-nav-btn{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:999px;background:var(--surface2);border:1px solid var(--border);color:var(--muted);font-size:11px;font-weight:700;letter-spacing:.02em;transition:all .15s}
.control-nav-btn:hover{color:var(--text);border-color:var(--border2);background:var(--surface)}
.control-nav-btn.active{color:#fff;border-color:transparent}
.control-nav-btn[data-control-jump="lonas"].active{background:#0b7a36}
.control-nav-btn[data-control-jump="labor"].active{background:#7c3aed}
.control-nav-btn[data-control-jump="adesivos"].active{background:#c2410c}
.control-nav-btn[data-control-jump="adesivosBolinha"].active{background:#0369a1}
.control-nav-btn[data-control-jump="tapetes"].active{background:#b45309}
.control-nav-btn[data-control-jump="placas"].active{background:#be185d}
.control-nav-btn[data-control-jump="wind"].active{background:#0f766e}
.control-nav-badge{min-width:18px;height:18px;border-radius:999px;padding:0 5px;display:inline-flex;align-items:center;justify-content:center;background:rgba(255,255,255,.22);font-size:10px;font-weight:800;color:inherit}
.control-nav-btn:not(.active) .control-nav-badge{background:var(--surface);border:1px solid var(--border);color:var(--faint)}
.control-groups{display:grid;gap:12px}
[data-control-section="lonas"] .control-product-head{border-left:4px solid #16a34a}
[data-control-section="lonas"] .control-product-icon{background:rgba(22,163,74,.12);border-color:rgba(22,163,74,.3);color:#16a34a}
[data-control-section="lonas"] .control-product-title{color:#15803d}
[data-control-section="labor"] .control-product-head{border-left:4px solid #7c3aed}
[data-control-section="labor"] .control-product-icon{background:rgba(124,58,237,.12);border-color:rgba(124,58,237,.3);color:#7c3aed}
[data-control-section="labor"] .control-product-title{color:#6d28d9}
[data-control-section="adesivos"] .control-product-head{border-left:4px solid #ea580c}
[data-control-section="adesivos"] .control-product-icon{background:rgba(234,88,12,.12);border-color:rgba(234,88,12,.3);color:#ea580c}
[data-control-section="adesivos"] .control-product-title{color:#c2410c}
[data-control-section="adesivosBolinha"] .control-product-head{border-left:4px solid #0284c7}
[data-control-section="adesivosBolinha"] .control-product-icon{background:rgba(2,132,199,.12);border-color:rgba(2,132,199,.3);color:#0284c7}
[data-control-section="adesivosBolinha"] .control-product-title{color:#0369a1}
[data-control-section="tapetes"] .control-product-head{border-left:4px solid #d97706}
[data-control-section="tapetes"] .control-product-icon{background:rgba(217,119,6,.12);border-color:rgba(217,119,6,.3);color:#d97706}
[data-control-section="tapetes"] .control-product-title{color:#b45309}
[data-control-section="placas"] .control-product-head{border-left:4px solid #db2777}
[data-control-section="placas"] .control-product-icon{background:rgba(219,39,119,.12);border-color:rgba(219,39,119,.3);color:#db2777}
[data-control-section="placas"] .control-product-title{color:#be185d}
[data-control-section="wind"] .control-product-head{border-left:4px solid #0d9488}
[data-control-section="wind"] .control-product-icon{background:rgba(13,148,136,.12);border-color:rgba(13,148,136,.3);color:#0d9488}
[data-control-section="wind"] .control-product-title{color:#0f766e}
[data-control-section="rotulos"] .control-product-head{border-left:4px solid #a855f7}
[data-control-section="rotulos"] .control-product-icon{background:rgba(168,85,247,.12);border-color:rgba(168,85,247,.32);color:#a855f7}
[data-control-section="rotulos"] .control-product-title{color:#7e22ce}
.control-nav-btn[data-control-jump="rotulos"].active{background:#7e22ce}

[data-control-section="panfletos"] .control-product-head{border-left:4px solid #06b6d4}
[data-control-section="panfletos"] .control-product-icon{background:rgba(6,182,212,.12);border-color:rgba(6,182,212,.32);color:#06b6d4}
[data-control-section="panfletos"] .control-product-title{color:#0e7490}
.control-nav-btn[data-control-jump="panfletos"].active{background:#0e7490}

[data-control-section="cartoes"] .control-product-head{border-left:4px solid #f43f5e}
[data-control-section="cartoes"] .control-product-icon{background:rgba(244,63,94,.12);border-color:rgba(244,63,94,.32);color:#f43f5e}
[data-control-section="cartoes"] .control-product-title{color:#be123c}
.control-nav-btn[data-control-jump="cartoes"].active{background:#be123c}

[data-control-section="tags"] .control-product-head{border-left:4px solid #8b5cf6}
[data-control-section="tags"] .control-product-icon{background:rgba(139,92,246,.12);border-color:rgba(139,92,246,.32);color:#8b5cf6}
[data-control-section="tags"] .control-product-title{color:#6d28d9}
.control-nav-btn[data-control-jump="tags"].active{background:#6d28d9}

[data-control-section="imas"] .control-product-head{border-left:4px solid #f97316}
[data-control-section="imas"] .control-product-icon{background:rgba(249,115,22,.12);border-color:rgba(249,115,22,.32);color:#f97316}
[data-control-section="imas"] .control-product-title{color:#c2410c}
.control-nav-btn[data-control-jump="imas"].active{background:#c2410c}

.control-product-card{background:var(--surface);border:1px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,.04);transition:box-shadow .18s}
.control-product-card:hover{box-shadow:0 6px 20px rgba(0,0,0,.08)}
.control-product-card.is-hidden{display:none}
.control-product-card.is-collapsed .control-product-body{display:none}
.control-product-head{width:100%;display:flex;align-items:flex-start;gap:14px;padding:16px 18px;text-align:left;background:var(--surface);border-bottom:1px solid var(--border);transition:background .14s}
.control-product-head:hover{background:var(--surface2)}
.control-product-icon{width:44px;height:44px;border-radius:14px;flex:none;display:grid;place-items:center;font-size:18px;font-weight:800;border:1px solid transparent}
.control-product-meta{flex:1;min-width:0;display:grid;gap:5px}
.control-product-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.control-product-title{font-size:15px;font-weight:800;letter-spacing:-.02em}
.control-product-tag{display:inline-flex;align-items:center;padding:3px 9px;border-radius:999px;background:var(--surface2);border:1px solid var(--border);font-size:9px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
.control-product-sub{font-size:12px;color:var(--muted);line-height:1.5;max-width:80ch}
.control-product-legend{display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}
.control-legend-chip{display:inline-flex;align-items:center;gap:6px;padding:4px 9px;border-radius:999px;background:var(--surface2);border:1px solid var(--border);font-size:10px;font-weight:700;color:var(--muted)}
.control-legend-dot{width:7px;height:7px;border-radius:999px;background:var(--faint)}
.control-legend-dot.cost{background:#16a34a}
.control-legend-dot.rule{background:#d97706}
.control-legend-dot.price{background:#2563eb}
.control-legend-dot.supplier{background:#dc2626}
.control-product-toggle{margin-left:auto;flex:none;width:30px;height:30px;border-radius:999px;display:grid;place-items:center;background:var(--surface2);border:1px solid var(--border);color:var(--muted);font-size:14px;transition:transform .16s ease}
.control-product-card.is-collapsed .control-product-toggle{transform:rotate(-90deg)}
.control-product-body{padding:16px 18px 18px;display:grid;gap:12px;background:var(--bg)}
.control-section-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.control-subcard{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:14px;display:grid;gap:10px}
.control-subcard-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:2px}
.control-subcard-title{font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--faint)}
.control-subcard-help{font-size:11px;color:var(--muted);line-height:1.45;margin-top:2px}
.control-subcard-badge{font-size:9px;font-weight:800;padding:3px 8px;border-radius:999px;border:1px solid var(--border);background:var(--surface2);color:var(--faint);text-transform:uppercase;letter-spacing:.08em;white-space:nowrap;flex:none}
.control-subcard-badge.cost{color:#15803d;border-color:rgba(22,163,74,.25);background:rgba(22,163,74,.08)}
.control-subcard-badge.rule{color:#92400e;border-color:rgba(217,119,6,.25);background:rgba(217,119,6,.1)}
.control-subcard-badge.price{color:#1d4ed8;border-color:rgba(37,99,235,.22);background:rgba(37,99,235,.08)}
.control-subcard-badge.supplier{color:#b91c1c;border-color:rgba(220,38,38,.22);background:rgba(220,38,38,.08)}
.control-field-grid{display:grid;grid-template-columns:1fr;gap:8px}
.control-field{background:var(--surface2);border:1px solid var(--border);border-radius:12px;padding:11px 12px;display:grid;gap:6px;transition:border-color .14s}
.control-field:focus-within{border-color:var(--accent-border);box-shadow:0 0 0 3px rgba(26,115,232,.06)}
.control-field-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.control-field label{font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--text)}
.control-field-path{font-size:9px;color:var(--faint);font-family:'Inter',system-ui,sans-serif;font-variant-numeric:tabular-nums;display:none}
.control-field-help{font-size:11px;color:var(--muted);line-height:1.4}
.control-field input{background:var(--surface);border-radius:9px;padding:9px 11px;border:1px solid var(--border);font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;transition:border-color .14s;width:100%}
.control-field input:focus{outline:none;border-color:var(--accent-border)}
.control-field-unit{font-size:9px;font-weight:800;color:var(--faint);text-transform:uppercase;letter-spacing:.08em;padding:3px 7px;border-radius:999px;background:var(--surface);border:1px solid var(--border);white-space:nowrap;flex:none}
.control-empty{padding:20px 16px;border-radius:14px;border:1px dashed var(--border2);background:var(--surface);text-align:center;color:var(--muted);font-size:12px;display:none}
.control-empty.show{display:block}
@media (max-width:980px){.control-quickstats{grid-template-columns:1fr 1fr}.control-section-grid{grid-template-columns:1fr}}
@media (max-width:760px){.control-toolbar-top{align-items:stretch}.control-search-wrap{min-width:0}.control-product-head{padding:14px}.control-product-body{padding:14px}.control-product-legend{display:none}.control-quickstats{grid-template-columns:1fr}}
.pedido-obs-wrap{margin:12px 0 0;background:var(--surface);border:1px solid rgba(245,158,11,.25);border-radius:var(--r-lg);overflow:hidden}
.pedido-obs-header{display:flex;align-items:center;gap:6px;padding:10px 14px;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#f59e0b;background:rgba(245,158,11,.07);border-bottom:1px solid rgba(245,158,11,.15)}
.pedido-obs-header svg{stroke:#f59e0b}
.pedido-obs-text{width:100%;min-height:80px;background:transparent;border:none;padding:12px 14px;font-size:13px;color:var(--text);resize:vertical;outline:none;font-family:inherit;line-height:1.6}
.pedido-obs-text::placeholder{color:var(--faint)}
.pedido-urgente-stamp{display:none;align-items:center;gap:6px;padding:4px 10px;background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.3);border-radius:6px;color:#ef4444;font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}

/* Botão de remover item dentro da aba Pedido (não aparece no PDF) */
.pedido-remove-cell{width:34px;text-align:center}
.pedido-remove-item{
  width:24px;height:24px;border-radius:999px;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:15px;font-weight:900;line-height:1;
  color:#d93025;background:rgba(217,48,37,.08);
  border:1px solid rgba(217,48,37,.22);
  cursor:pointer;transition:background .15s,border-color .15s,transform .15s;
}
.pedido-remove-item:hover{background:rgba(217,48,37,.14);border-color:rgba(217,48,37,.34);transform:translateY(-1px)}
.pedido-remove-item:active{transform:translateY(0)}
@media print{
  .no-print{display:none!important}
  .pedido-urgente-stamp.show{display:inline-flex!important}
}
.wind-model-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.wind-model-card{
  position:relative;
  border:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.08));
  border-radius:var(--r-lg);
  padding:16px;
  cursor:pointer;
  transition:all .18s ease;
  min-height:110px;
  overflow:hidden;
}
.wind-model-card::before{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(255,255,255,.035), transparent 42%);
  opacity:.9;
  pointer-events:none;
}
.wind-model-card:hover{
  border-color:rgba(26,115,232,.6);
  transform:translateY(-2px);
  box-shadow:0 8px 24px rgba(0,0,0,.25);
}
.wind-model-card.active{
  border-color:#1a73e8;
  background:linear-gradient(180deg, rgba(26,115,232,.15), rgba(0,0,0,.1));
  box-shadow:0 0 0 1px rgba(26,115,232,.25) inset, 0 10px 28px rgba(26,115,232,.25);
}
.wind-model-title{
  font-size:13px;
  font-weight:700;
  margin-bottom:6px;
}
.wind-model-price{
  font-size:20px;
  line-height:1.1;
  font-weight:800;
  color:var(--accent);
  letter-spacing:-.3px;
  margin-bottom:4px;
}
.wind-model-card.active .wind-model-price{
  text-shadow:0 0 10px rgba(26,115,232,.35);
}
.wind-model-cost{
  font-size:11px;
  color:var(--muted);
  margin-bottom:8px;
}
.wind-model-badge{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:600;
  background:rgba(245,158,11,.12);
  color:#d97706;
  border:1px solid rgba(245,158,11,.18);
}
.wind-qty-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.wind-note{
  font-size:11px;
  color:var(--muted);
  line-height:1.45;
}
.wind-resale-wrap{
  display:grid;
  gap:8px;
  margin-top:2px;
}
.wind-resale-label{
  font-size:10px;
  font-weight:700;
  color:var(--faint);
  text-transform:uppercase;
  letter-spacing:.09em;
}
.wind-resale-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.wind-resale-card{
  background:linear-gradient(180deg,var(--surface2),rgba(138,180,248,.08));
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
  min-height:84px;
  display:grid;
  align-content:start;
  gap:4px;
  text-align:left;
  transition:all .16s ease;
}
.wind-resale-card:hover{
  border-color:rgba(138,180,248,.34);
  background:linear-gradient(180deg,var(--surface2),rgba(138,180,248,.14));
  transform:translateY(-1px);
}
.wind-resale-card:active{
  transform:translateY(0);
}
.wind-resale-title{
  font-size:11px;
  font-weight:700;
  color:var(--text);
}
.wind-resale-price{
  font-size:18px;
  line-height:1.05;
  font-weight:700;
  color:var(--accent);
}
.wind-resale-sub{
  font-size:10px;
  color:var(--muted);
}
.wind-resale-tag{
  display:inline-flex;
  width:max-content;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
  color:var(--accent);
  background:var(--accent-dim);
  border:1px solid var(--accent-border);
}
.wind-variant-wrap{
  display:grid;
  gap:8px;
}
.wind-variant-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:8px;
}
.wind-variant-card{
  position:relative;
  min-height:88px;
  display:grid;
  align-content:start;
  gap:4px;
  text-align:left;
  padding:12px 13px;
  border-radius:14px;
  border:1px solid var(--border);
  background:linear-gradient(180deg,var(--surface2),rgba(26,115,232,.045));
  transition:all .16s ease;
}
.wind-variant-card:hover{
  border-color:var(--accent-border);
  background:linear-gradient(180deg,var(--surface2),rgba(26,115,232,.10));
  transform:translateY(-1px);
}
.wind-variant-card.active{
  border-color:var(--accent);
  background:linear-gradient(180deg,var(--accent-dim),rgba(26,115,232,.07));
  box-shadow:0 0 0 1px rgba(26,115,232,.18) inset,0 8px 18px rgba(26,115,232,.12);
}
.wind-variant-title{
  font-size:11px;
  font-weight:800;
  color:var(--text);
  text-transform:uppercase;
  letter-spacing:.03em;
}
.wind-variant-price{
  font-size:17px;
  line-height:1.05;
  font-weight:800;
  color:var(--accent);
  letter-spacing:-.03em;
}
.wind-variant-sub{
  font-size:10px;
  line-height:1.35;
  color:var(--muted);
}
.wind-variant-card.base{
  background:linear-gradient(180deg,var(--surface2),rgba(24,128,56,.06));
}
.wind-variant-card.base.active{
  border-color:var(--green);
  background:linear-gradient(180deg,var(--green-dim),rgba(24,128,56,.07));
  box-shadow:0 0 0 1px rgba(24,128,56,.16) inset,0 8px 18px rgba(24,128,56,.12);
}
.wind-variant-card.base .wind-variant-price{color:var(--green)}
@media (max-width:1180px){.wind-variant-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.wind-variant-grid{grid-template-columns:1fr}}
.tapete-item-body{
  align-items:stretch;
}
.tapete-item-result{
  min-height:340px;
}
.tapete-hero{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border:1px solid rgba(132,204,22,.18);
  background:linear-gradient(180deg, rgba(132,204,22,.08), rgba(249,115,22,.05));
  border-radius:14px;
}
.tapete-hero-title{
  font-size:13px;
  font-weight:700;
}
.tapete-hero-sub{
  font-size:11px;
  color:var(--muted);
  margin-top:2px;
}
.tapete-hero-price{
  font-size:20px;
  font-weight:700;
  color:var(--accent);
}
.tapete-metrics-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.tapete-metric-card{
  background:var(--surface2);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  display:grid;
  gap:3px;
}
.tapete-metric-label{
  font-size:10px;
  color:var(--faint);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-weight:700;
}
.tapete-metric-value{
  font-size:13px;
  font-weight:700;
}
.tapete-breakdown{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px 12px;
  background:var(--surface2);
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
}
.tapete-breakdown-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
}
.tapete-breakdown-row span{color:var(--muted)}
.tapete-note{
  font-size:11px;
  line-height:1.5;
  color:var(--muted);
}
@media (max-width:1100px){
  .tapete-metrics-grid,
  .tapete-breakdown{
    grid-template-columns:1fr;
  }
}
.product-btn{
  overflow:hidden;
}
.product-btn::before{
  content:"";
  position:absolute;
  left:0;
  top:8px;
  bottom:8px;
  width:3px;
  border-radius:999px;
  background:var(--accent);
  opacity:0;
  transform:scaleY(.55);
  transition:opacity .16s ease, transform .16s ease;
}
.product-btn.active::before{
  opacity:1;
  transform:scaleY(1);
}
.product-btn .nav-icon,
.product-btn .product-count,
.item-card,
.ipm-chip,
.notice-chip,
.toggle-pill,
.bd-card,
.irr-total-val,
.bd-total .bd-val,
.total-value,
.product-chip{
  transition:
    background-color .16s ease,
    border-color .16s ease,
    color .16s ease,
    box-shadow .16s ease,
    opacity .16s ease,
    transform .16s ease;
}
.product-btn:hover .nav-icon{
  transform:scale(1.08);
}
.item-list-switch,
.panel-switch{
  animation:viewSoftFade .12s ease;
}
@keyframes viewSoftFade{
  from{opacity:.88}
  to{opacity:1}
}
.item-card.entering{
  animation:itemEnterSoft .20s ease both;
}
@keyframes itemEnterSoft{
  from{opacity:0; transform:translateY(4px)}
  to{opacity:1; transform:translateY(0)}
}
.price-pulse{
  animation:priceGlow .36s ease;
}
@keyframes priceGlow{
  0%{box-shadow:0 0 0 0 rgba(249,115,22,0); background-color:transparent}
  45%{box-shadow:0 0 0 3px rgba(249,115,22,.08); background-color:rgba(249,115,22,.06)}
  100%{box-shadow:0 0 0 0 rgba(249,115,22,0); background-color:transparent}
}
.orc-text-area.ready{
  box-shadow:0 0 0 3px rgba(37,211,102,.10);
  border-color:rgba(37,211,102,.26);
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-md);
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
  transition: all .15s; line-height: 1; white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 3px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 3px 8px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }
.btn-whatsapp {
  position: relative;
  overflow: hidden;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 18px;
  min-height: 54px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .15s ease;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
}
.btn-whatsapp::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  left:-36%;
  width:28%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transform:skewX(-18deg);
  transition:left .45s ease;
}
.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp:hover::after{
  left:116%;
}
.btn-whatsapp:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-ghost:hover {
  color: var(--text);
  background: var(--surface2);
  border-color: var(--border2);
}
.btn-danger {
  background: var(--red-dim);
  border: 1px solid var(--red-border);
  color: var(--red);
}
.btn-danger:hover { background: rgba(239,68,68,.18) }
.btn-sm { padding: 5px 11px; font-size: 11px; border-radius: var(--r-sm) }
.pedido-add-btn { white-space: nowrap; }
.btn-icon {
  width: 28px; height: 28px; padding: 0;
  display: grid; place-items: center;
  border-radius: var(--r-sm); flex: none;
}
.sw { position: relative; width: 32px; height: 18px; flex: none }
.sw input { opacity: 0; width: 0; height: 0; position: absolute }
.sw-track {
  position: absolute; inset: 0; border-radius: 9px;
  background: var(--surface3); cursor: pointer; transition: .15s;
  border: 1px solid var(--border2);
}
.sw input:checked + .sw-track { background: var(--accent); border-color: transparent }
.sw-track::after {
  content: ''; position: absolute;
  width: 12px; height: 12px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%;
  transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.sw input:checked + .sw-track::after { transform: translateX(14px) }
.config-section { margin-bottom: 20px }
.config-section h3 {
  font-size: 11px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .1em;
  margin-bottom: 10px;
}
.config-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  margin-bottom: 4px;
}
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 10px;
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}
.empty-icon { font-size: 28px; opacity: .4 }
.empty-text { font-size: 13px }
.empty-sub { font-size: 11px; color: var(--faint) }
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.6);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 22px;
  width: 380px;
  max-width: 95vw;
  transform: translateY(8px);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: translateY(0) }
.modal h3 { font-size: 15px; font-weight: 600; margin-bottom: 14px }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px }
.hidden { display: none !important }
.mt8 { margin-top: 8px }
.mt12 { margin-top: 12px }
@media (max-width: 1100px) {
  :root { --panel-w: 260px }
  .ic-body { grid-template-columns: 1fr }
  .ic-result { width: 100% }
  /* .bd-row em grid 2 colunas exige ~310px mínimos (170+140+gap) —
     maior que os 260px de --panel-w nesta faixa. Sem isso, o valor
     (.bd-val) fica cortado/empurrado para fora do painel à direita.
     Empilhar label/valor verticalmente resolve sem precisar aumentar
     --panel-w (que afetaria o layout em telas maiores). */
  .bd-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .bd-row > span:last-child {
    font-weight: 600;
  }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: var(--topbar-h) auto 1fr }
  .sidebar { display: none }
  .panel { display: none }
  .topbar-right { display: none }
}
.wind-item-body{
  align-items: stretch;
}
.wind-item-result{
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
:root {
  --accent: #1a73e8;
  --accent-dim: rgba(26,115,232,.10);
  --accent-hover: #1558b0;
  --accent-border: rgba(26,115,232,.24);
  --green: #188038;
  --green-dim: rgba(24,128,56,.10);
  --green-border: rgba(24,128,56,.18);
  --red: #d93025;
  --red-dim: rgba(217,48,37,.10);
  --red-border: rgba(217,48,37,.18);
  --bg: #f6f8fc;
  --surface: rgba(255,255,255,.88);
  --surface2: #ffffff;
  --surface3: #eef3fd;
  --border: rgba(60,64,67,.10);
  --border2: rgba(60,64,67,.18);
  --text: #202124;
  --muted: #5f6368;
  --faint: #80868b;
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 20px; --r-xl: 28px;
  --sidebar-w: 232px;
  --panel-w: 392px;
  --shell-shadow: 0 10px 36px rgba(60,64,67,.10), 0 2px 10px rgba(60,64,67,.06);
  --card-shadow: 0 1px 2px rgba(60,64,67,.10), 0 4px 14px rgba(60,64,67,.05);
}
body[data-theme="dark"] {
  --accent: #8ab4f8;
  --accent-dim: rgba(138,180,248,.13);
  --accent-hover: #a8c7fa;
  --accent-border: rgba(138,180,248,.24);
  --green: #81c995;
  --green-dim: rgba(129,201,149,.12);
  --green-border: rgba(129,201,149,.16);
  --red: #f28b82;
  --red-dim: rgba(242,139,130,.12);
  --red-border: rgba(242,139,130,.18);
  --bg: #202124;
  --surface: rgba(32,33,36,.88);
  --surface2: #282a2d;
  --surface3: #31343b;
  --border: rgba(232,234,237,.09);
  --border2: rgba(232,234,237,.16);
  --text: #e8eaed;
  --muted: #bdc1c6;
  --faint: #9aa0a6;
  --shell-shadow: 0 18px 38px rgba(0,0,0,.28);
  --card-shadow: 0 1px 2px rgba(0,0,0,.18), 0 10px 24px rgba(0,0,0,.20);
}
html, body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(26,115,232,.07), transparent 28%),
    radial-gradient(circle at top right, rgba(52,168,83,.05), transparent 24%),
    var(--bg);
}
body[data-theme="dark"] {
  background:
    radial-gradient(circle at top left, rgba(138,180,248,.06), transparent 30%),
    radial-gradient(circle at top right, rgba(129,201,149,.04), transparent 26%),
    var(--bg);
}
body { padding: 18px; }
.app {
  height: calc(100vh - 36px);
  border: 1px solid var(--border);
  border-radius: 30px;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
  box-shadow: var(--shell-shadow);
}
.topbar, .sidebar, .panel, .items-header, .item-card, .orc-meta-cell, .resumo-item, .totals-block, .control-section, .bd-card, .tapete-breakdown, .tapete-metric-card, .ic-result, .wind-model-card, .wind-resale-card {
  box-shadow: none;
}
.topbar {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(16px);
}
.topbar-brand {
  justify-content: flex-start;
  padding-left: 22px;
}
.brand-logo {
  max-width: 164px;
  max-height: 36px;
  filter: saturate(1.04);
}
.topbar-center {
  gap: 16px;
  padding: 0 22px;
}
.client-fields {
  gap: 12px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}
.client-field label {
  display: none;
}
.client-field input {
  background: transparent;
  border: none;
  width: 280px;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
}
.client-field input::placeholder { color: var(--faint); }
.client-field input:focus {
  background: var(--surface2);
  box-shadow: 0 0 0 1px var(--accent-border), 0 1px 2px rgba(60,64,67,.15);
}
.sep {
  height: 28px;
  background: linear-gradient(180deg, transparent, var(--border2), transparent);
}
.topbar-right {
  padding: 0 18px;
}
.total-label {
  font-size: 10px;
  letter-spacing: .12em;
}
.total-value {
  font-size: 15px;
  font-weight: 800;
}
.sidebar {
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 98%, transparent), color-mix(in srgb, var(--surface2) 98%, transparent));
}
.sidebar-section {
  padding: 18px 14px 10px;
}
.sidebar-label {
  padding: 0 10px 12px;
  font-size: 11px;
  letter-spacing: .08em;
}
.product-btn, .sidebar-btn {
  border-radius: 18px;
  transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.product-btn {
  padding: 13px 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--muted);
}
.product-btn::before {
  display: none;
}
.product-btn:hover {
  background: var(--surface3);
  border-color: transparent;
}
.product-btn.active {
  background: linear-gradient(180deg, rgba(26,115,232,.14), rgba(26,115,232,.10));
  border-color: transparent;
  color: var(--accent);
}
body[data-theme="dark"] .product-btn.active {
  background: linear-gradient(180deg, rgba(138,180,248,.20), rgba(138,180,248,.13));
}
.product-count {
  min-width: 26px;
  height: 26px;
  font-size: 11px;
  background: transparent;
  border: none;
}
.main, .panel {
  background: transparent;
}
.items-header {
  padding: 20px 24px 16px;
  background: transparent;
}
.items-header h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.product-chip, .items-count {
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
}
.items-body {
  padding: 0 24px 80px;
  gap: 14px;
}
.item-card {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface2) 96%, transparent);
  box-shadow: var(--card-shadow);
}
.item-card:hover {
  border-color: var(--accent-border);
  box-shadow: 0 1px 3px rgba(60,64,67,.14), 0 10px 28px rgba(26,115,232,.10);
}
.ic-head {
  background: transparent;
  padding: 16px 18px;
}
.ic-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--surface3);
  border: 1px solid transparent;
}
.ic-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.ic-sub {
  font-size: 12px;
}
.ic-price {
  padding: 8px 12px;
  background: transparent;
  border: none;
  font-size: 16px;
  font-weight: 800;
}
.ic-margin {
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 10px;
}
.ic-body {
  padding: 0 18px 18px;
  gap: 16px;
}
.field label, .wind-resale-label, .tapete-metric-label, .param-section-title, .control-title, .orc-meta-label, .sidebar-label, .total-label {
  font-weight: 800;
}
input, select, textarea, .orc-text-area {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
input:hover, select:hover, textarea:hover {
  border-color: var(--border2);
}
input:focus, select:focus, textarea:focus, .orc-text-area:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,115,232,.14);
}
.toggle-pill {
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}
.toggle-pill.on {
  box-shadow: inset 0 0 0 1px var(--accent-border);
}
.ic-result {
  width: 280px;
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--surface3), color-mix(in srgb, var(--surface2) 96%, transparent));
  border-radius: 18px;
}
.irr {
  padding: 6px 0;
}
.irr-label {
  font-size: 12px;
}
.irr-val {
  font-size: 13px;
  font-weight: 700;
}
.irr-total-val {
  font-size: 22px;
  font-weight: 800;
}
.btn {
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.btn-primary {
  background: var(--accent);
  box-shadow: 0 1px 2px rgba(26,115,232,.25), 0 4px 12px rgba(26,115,232,.18);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--surface2);
  color: var(--text);
}
.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}
.panel {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px);
}
.panel-tabs {
  padding: 0 12px;
}
.ptab {
  padding: 18px 8px 14px;
  font-size: 14px;
  font-weight: 700;
}
.panel-body {
  padding: 18px;
}
.ptab-content {
  gap: 14px;
}
.orc-meta {
  gap: 10px;
}
.orc-meta-cell, .resumo-item, .totals-block, .control-section, .bd-card, .tapete-breakdown, .tapete-metric-card, .wind-model-card, .wind-resale-card, .orc-text-area {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface2) 98%, transparent);
}
.notice-chip {
  border-radius: 14px;
  padding: 8px 12px;
}
.wind-model-grid, .wind-resale-grid {
  gap: 12px;
}
.wind-model-card {
  min-height: 124px;
  padding: 18px;
  border-color: color-mix(in srgb, var(--border2) 88%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface2) 98%, transparent), color-mix(in srgb, var(--surface3) 72%, transparent));
}
.wind-model-card:hover {
  border-color: rgba(138,180,248,.62);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface2) 98%, transparent), color-mix(in srgb, rgba(138,180,248,.12) 100%, transparent));
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.wind-model-card.active {
  border-color: #8ab4f8;
  background: linear-gradient(180deg, rgba(138,180,248,.16), color-mix(in srgb, var(--surface3) 94%, transparent));
  box-shadow: inset 0 0 0 1px rgba(138,180,248,.24), 0 14px 34px rgba(15,23,42,.24);
}
.wind-model-title, .wind-resale-title {
  font-size: 15px;
  font-weight: 800;
}
.wind-model-price, .wind-resale-price, .tapete-hero-price {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
}
.wind-model-price, .wind-resale-price {
  color: #8ab4f8;
}
.wind-model-card.active .wind-model-price {
  text-shadow: 0 0 14px rgba(138,180,248,.28);
}
.wind-model-badge, .wind-resale-tag {
  border-radius: 999px;
  font-weight: 700;
}
.tapete-hero {
  border-radius: 20px;
  padding: 16px 18px;
}
.tapete-hero-title {
  font-size: 15px;
  font-weight: 800;
}
.tapete-breakdown {
  padding: 16px;
}
.bd-title {
  background: transparent;
  font-size: 11px;
  color: var(--muted);
}
.bd-row {
  padding: 12px 14px;
}
.control-note, .wind-note, .tapete-note, .ipm-note, .bolinha-note {
  line-height: 1.6;
}
.main-control-view {
  padding: 24px;
}
@media (max-width: 1500px) {
  .client-field input { width: 220px; }
  .ic-result { width: 240px; }
}
@media (max-width: 1280px) {
  body { padding: 10px; }
  .app { height: calc(100vh - 20px); border-radius: 24px; }
  .client-fields { padding: 4px 8px; }
  .client-field input { width: 180px; }
  .ic-body { grid-template-columns: 1fr; }
  .ic-result { width: 100%; }
}
.ipm-check-btn,
.ipm-check-btn:hover,
.ipm-check-btn:focus,
.ipm-check-btn:active,
.ipm-check-btn.active{
  color:#fff !important;
}
.btn-primary-google{
  padding:9px 18px !important;
  font-size:12px !important;
  font-weight:700 !important;
  letter-spacing:.02em !important;
  border-radius:999px !important;
  background:#1a73e8 !important;
  color:#fff !important;
  border:none !important;
  box-shadow:0 1px 4px rgba(26,115,232,.25), 0 3px 10px rgba(26,115,232,.18) !important;
  transition:all .16s cubic-bezier(.4,0,.2,1) !important;
}
.btn-primary-google:hover,
.btn-primary-google:focus{
  background:#1967d2 !important;
  color:#fff !important;
  box-shadow:0 2px 8px rgba(26,115,232,.3), 0 6px 20px rgba(26,115,232,.22) !important;
  transform:translateY(-1px) !important;
}
.btn-primary-google:active{
  background:#1558b0 !important;
  color:#fff !important;
  transform:translateY(0) !important;
  box-shadow:0 1px 3px rgba(26,115,232,.2) !important;
}
body[data-theme="light"] .wind-model-price{
  color:#1a73e8;
}
body[data-theme="light"] .wind-model-card.active{
  border-color:#1a73e8;
  background:rgba(26,115,232,.08);
  box-shadow:
    0 0 0 1px rgba(26,115,232,.25) inset,
    0 6px 18px rgba(26,115,232,.18);
}
body[data-theme="light"] .wind-model-card:hover{
  border-color:rgba(26,115,232,.45);
  background:rgba(26,115,232,.04);
}
body[data-theme="light"] .wind-resale-price{
  color:#1a73e8;
}
.pix-card{
  display:grid;
  gap:10px;
  padding:12px;
  background:var(--surface2);
  border:1px solid var(--border);
  border-radius:16px;
  margin-top:8px;
}
.pix-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.pix-title{
  font-size:13px;
  font-weight:800;
  letter-spacing:-.01em;
}
.pix-sub{
  font-size:11px;
  color:var(--muted);
  margin-top:2px;
  line-height:1.45;
}
.pix-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:5px 10px;
  border-radius:999px;
  font-size:10px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--green);
  background:var(--green-dim);
  border:1px solid var(--green-border);
  white-space:nowrap;
}
.pix-qr-wrap{
  display:grid;
  place-items:center;
  padding:12px;
  background:#fff;
  border-radius:14px;
  border:1px solid var(--border);
}
.pix-qr-wrap img{
  width:100%;
  max-width:220px;
  border-radius:8px;
  display:block;
}
.pix-meta{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.pix-mini{
  padding:9px 10px;
  border-radius:12px;
  background:var(--surface);
  border:1px solid var(--border);
}
.pix-mini-label{
  font-size:9px;
  font-weight:800;
  color:var(--faint);
  text-transform:uppercase;
  letter-spacing:.08em;
}
.pix-mini-value{
  margin-top:3px;
  font-size:12px;
  font-weight:700;
}
.pix-copy{
  display:flex;
  gap:8px;
  align-items:stretch;
}
.pix-copy-box{
  flex:1;
  min-height:44px;
  padding:10px 12px;
  border-radius:12px;
  background:var(--surface);
  border:1px solid var(--border);
  font-size:11px;
  line-height:1.45;
  color:var(--muted);
  word-break:break-all;
}
.pix-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.btn.btn-pix{
  background:#1a73e8;
  color:#fff;
  border:1px solid rgba(26,115,232,.24);
  box-shadow:0 2px 10px rgba(26,115,232,.18);
}
.btn.btn-pix:hover{
  background:#1558b0;
  color:#fff;
}
.btn.btn-proof{
  background:#22c55e;
  color:#fff;
  border:1px solid rgba(34,197,94,.24);
  box-shadow:0 2px 10px rgba(34,197,94,.18);
}
.btn.btn-proof:hover{
  background:#16a34a;
  color:#fff;
}
body[data-theme="light"] .pix-qr-wrap{
  background:#fff;
}
@media (max-width:1100px){
  .pix-meta,.pix-actions{grid-template-columns:1fr}
}
.pix-collapsed{display:none !important}
.pix-toggle-wrap{display:flex;justify-content:flex-start}
.pix-open-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 16px;border-radius:999px;
  background:linear-gradient(180deg, rgba(26,115,232,.18), rgba(26,115,232,.1));
  border:1px solid rgba(26,115,232,.28);
  color:var(--accent);font-size:12px;font-weight:800;letter-spacing:.02em;
  box-shadow:0 6px 18px rgba(26,115,232,.14);
}
.pix-open-btn:hover{filter:brightness(1.04)}
.pix-open-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
    .pix-force-hide{display:none !important}

/* ── WIND SUB-TABS ────────────────────────────────────── */
.wind-subtab-bar {
  display: none;
  gap: 4px;
  padding: 8px 14px 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.wind-subtab-bar.visible { display: flex; }
.wind-stab {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  color: var(--muted);
  border: 1px solid transparent;
  border-bottom: none;
  cursor: pointer;
  background: none;
  transition: all .15s;
  letter-spacing: .02em;
}
.wind-stab:hover { color: var(--text); background: var(--surface2); }
.wind-stab.active {
  color: var(--accent);
  background: var(--bg);
  border-color: var(--border);
  border-bottom-color: var(--bg);
}

/* ── ALUMÍNIO VIEW ────────────────────────────────────── */
#windAluminioView {
  display: none;
  flex-direction: column;
  overflow-y: auto;
  padding: 18px;
  gap: 18px;
  background: var(--bg);
  flex: 1;
  min-height: 0;
}
#windAluminioView.visible { display: flex; }
.alum-section-title {
  font-size: 10px;
  font-weight: 800;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 10px;
}
.alum-params-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 10px;
}
.alum-tube-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
}
.alum-tube-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.alum-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}
.alum-field:last-child { margin-bottom: 0; }
.alum-field label {
  font-size: 10px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.alum-field input {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  width: 100%;
  transition: border-color .15s;
  font-variant-numeric: tabular-nums;
}
.alum-field input:focus { border-color: var(--accent-border); }
.alum-models-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.alum-model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
}
.alum-model-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: .02em;
  margin-bottom: 10px;
}
.alum-model-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.alum-model-row:last-child { border-bottom: none; }
.alum-model-row span:first-child { color: var(--muted); }
.alum-model-row span:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }
.alum-cost-avista { color: var(--green) !important; font-size: 14px !important; }
.alum-cost-cartao { color: var(--accent) !important; }
.alum-sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  align-items: end;
}
.alum-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.alum-result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
}
.alum-result-card.full { grid-column: 1 / -1; }
.alum-result-card-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.alum-result-card-title .alum-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}
.alum-rrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
}
.alum-rrow:last-child { border-bottom: none; }
.alum-rrow span:first-child { color: var(--muted); }
.alum-rrow .alum-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.alum-rrow .alum-val.green { color: var(--green); font-size: 14px; }
.alum-rrow .alum-val.accent { color: var(--accent); font-size: 14px; }
.alum-rrow .alum-val.red { color: var(--red); }
.alum-cut-line {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.alum-cut-line:last-child { margin-bottom: 0; }
.alum-cut-tube-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 8px 0 4px;
}
.alum-note {
  font-size: 11px;
  color: var(--muted);
  padding: 8px 10px;
  background: var(--surface2);
  border-radius: var(--r-sm);
  border-left: 3px solid var(--accent-border);
  line-height: 1.5;
}
.alum-sim-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
}
.alum-sim-btn:hover { opacity: .9; }
.alum-multimodel-header {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 12px;
  align-items: start;
}
.alum-multimodel-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alum-mrow {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
}
.alum-mrow-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  min-width: 100px;
}
.alum-mrow-qty {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 15px;
  font-weight: 700;
  outline: none;
  width: 90px;
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: border-color .15s;
}
.alum-mrow-qty:focus { border-color: var(--accent-border); }
.alum-mrow-qty:not([value="0"]):not(:placeholder-shown) { border-color: var(--accent-border); color: var(--accent); }
.alum-mrow-unit {
  font-size: 11px;
  color: var(--faint);
  font-weight: 600;
  width: 18px;
}
.alum-multimodel-aside {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.alum-wpp-btn {
  width: 100%;
  padding: 10px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #25d366, #128c4e);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 8px;
}
.alum-wpp-btn:hover { opacity: .9; }
.alum-wpp-btn svg { width: 16px; height: 16px; fill: #fff; flex: none; }
.alum-wpp-card {
  border-color: rgba(37,211,102,.2) !important;
  background: color-mix(in srgb, var(--surface) 96%, #25d366) !important;
}
.alum-wpp-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.alum-wpp-textarea-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alum-wpp-textarea {
  width: 100%;
  min-height: 200px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  resize: vertical;
  font-family: 'Inter', system-ui, sans-serif;
  outline: none;
  white-space: pre-wrap;
}
.alum-wpp-textarea:focus { border-color: rgba(37,211,102,.4); }
.alum-wpp-copy-btn {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #25d366, #128c4e);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity .15s, background .3s;
  letter-spacing: .02em;
}
.alum-wpp-copy-btn:hover { opacity: .9; }
.alum-no-result {
  text-align: center;
  color: var(--faint);
  font-size: 13px;
  padding: 24px 0;
}


/* ─────────────────────────────────────────────
   AJUSTE SOLICITADO — PILLS AZUIS + PARÂMETROS MAIS LIMPO
   Escopo: CSS visual no bloco de estilos existente. Sem JS/HTML.
───────────────────────────────────────────── */
/* Traz as pills/abas novas que estavam em rosa/roxo para o azul Google */
.rot-pill:hover {
  border-color: rgba(26,115,232,.34) !important;
  color: var(--accent) !important;
  background: color-mix(in srgb, var(--surface2) 94%, var(--accent) 6%) !important;
}
.rot-pill.active,
.pf-auto-pill.active {
  background: rgba(26,115,232,.072) !important;
  border-color: rgba(26,115,232,.28) !important;
  color: #1a73e8 !important;
  box-shadow: 0 6px 16px rgba(26,115,232,.10) !important;
}
.rot-card .g-head {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 5.5%, var(--surface)), var(--surface)) !important;
}
.rot-card .g-head-icon {
  background: rgba(26,115,232,.075) !important;
  border-color: rgba(26,115,232,.22) !important;
  color: #1a73e8 !important;
}
[data-control-section="placas"] .control-product-head {
  border-left-color: #1a73e8 !important;
}
[data-control-section="placas"] .control-product-icon {
  background: rgba(26,115,232,.075) !important;
  border-color: rgba(26,115,232,.22) !important;
  color: #1a73e8 !important;
}
[data-control-section="placas"] .control-product-title {
  color: #1a73e8 !important;
}
.control-nav-btn[data-control-jump="placas"].active {
  background: #1a73e8 !important;
}

/* Azul das pills um pouco mais claro/sutil no tema claro */
body[data-theme="light"] .product-chip,
body[data-theme="light"] .toggle-pill.on,
body[data-theme="light"] .rot-pill.active,
body[data-theme="light"] .pf-auto-pill.active,
body[data-theme="light"] .notice-chip,
body[data-theme="light"] .g-chip,
body[data-theme="light"] .ipm-chip.warn,
body[data-theme="light"] .bd-total,
body[data-theme="light"] .alum-result-card-title .alum-badge {
  background: rgba(26,115,232,.056) !important;
}
body[data-theme="light"] .product-chip,
body[data-theme="light"] .toggle-pill.on,
body[data-theme="light"] .rot-pill.active,
body[data-theme="light"] .pf-auto-pill.active {
  border-color: rgba(26,115,232,.18) !important;
}

/* Aba Parâmetros: menos ruído visual dentro dos cards */
body[data-theme="light"] .main-control-header,
body[data-theme="light"] .control-toolbar,
body[data-theme="light"] .control-product-card {
  background: #ffffff !important;
  border-color: #e6eaf2 !important;
  box-shadow: 0 1px 2px rgba(60,64,67,.05), 0 8px 22px rgba(60,64,67,.055) !important;
}
body[data-theme="light"] .control-product-head {
  background: linear-gradient(180deg, #ffffff, #f8fafd) !important;
  border-bottom-color: #eef2f7 !important;
}
body[data-theme="light"] .control-product-body {
  background: #f7f9fc !important;
}
body[data-theme="light"] .control-subcard {
  background: #ffffff !important;
  border-color: #e8edf5 !important;
  box-shadow: 0 1px 2px rgba(60,64,67,.035) !important;
}
body[data-theme="light"] .control-field {
  background: #f8fafd !important;
  border-color: #edf1f7 !important;
  box-shadow: none !important;
}
body[data-theme="light"] .control-field:focus-within {
  border-color: rgba(26,115,232,.22) !important;
  box-shadow: 0 0 0 4px rgba(26,115,232,.055) !important;
}
body[data-theme="light"] .control-field label,
body[data-theme="light"] .control-subcard-title,
body[data-theme="light"] .control-product-title {
  color: #3c4043 !important;
}
body[data-theme="light"] .control-field-help,
body[data-theme="light"] .control-product-sub,
body[data-theme="light"] .control-subcard-help {
  color: #6f7785 !important;
}
body[data-theme="light"] .control-field input {
  background: #ffffff !important;
  border-color: #dfe5ee !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85) !important;
}
body[data-theme="light"] .control-field-unit,
body[data-theme="light"] .control-product-tag,
body[data-theme="light"] .control-legend-chip,
body[data-theme="light"] .control-subcard-badge {
  background: #f2f5fa !important;
  border-color: #e3e8f1 !important;
  color: #77808f !important;
  box-shadow: none !important;
}
body[data-theme="light"] .control-subcard-badge.cost,
body[data-theme="light"] .control-subcard-badge.rule,
body[data-theme="light"] .control-subcard-badge.price,
body[data-theme="light"] .control-subcard-badge.supplier {
  background: #f2f5fa !important;
  border-color: #e3e8f1 !important;
  color: #5f6877 !important;
}
body[data-theme="light"] .control-product-card:hover,
body[data-theme="light"] .control-subcard:hover {
  border-color: #d9e3f3 !important;
  box-shadow: 0 2px 6px rgba(60,64,67,.055), 0 12px 28px rgba(60,64,67,.065) !important;
}



/* ────────────────────────────────────────────────
   MODO ATENDIMENTO / PRIVACIDADE
   Oculta custos, margens, lucro e parâmetros quando
   a tela estiver de frente para o cliente.
   Ativado por: body[data-privacy="client"]
──────────────────────────────────────────────── */
.btn-privacy{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid var(--border2);
  background:var(--surface2);
  color:var(--muted);
  font-weight:800;
  letter-spacing:.01em;
  white-space:nowrap;
}
.btn-privacy:hover{
  border-color:var(--accent-border);
  background:var(--accent-dim);
  color:var(--accent);
}
body[data-privacy="client"] .btn-privacy{
  background:linear-gradient(135deg,#188038,#1e8e3e);
  border-color:rgba(24,128,56,.35);
  color:#fff;
  box-shadow:0 6px 18px rgba(24,128,56,.22);
}
body[data-privacy="client"] .privacy-sensitive,
body[data-privacy="client"] .privacy-sensitive-auto,
body[data-privacy="client"] .wind-resale-wrap,
body[data-privacy="client"] #ptab-resumo,
body[data-privacy="client"] #ptab-params,
body[data-privacy="client"] #ptab-controle,
body[data-privacy="client"] .pedido-obs-wrap,
body[data-privacy="client"] #windAluminioView,
body[data-privacy="client"] .control-toolbar,
body[data-privacy="client"] .control-product-card,
body[data-privacy="client"] .control-note,
body[data-privacy="client"] .control-section,
body[data-privacy="client"] .main-control-view,
body[data-privacy="client"] #configModal{
  display:none !important;
}
body[data-privacy="client"] .ptab[data-ptab="resumo"],
body[data-privacy="client"] .ptab[data-ptab="params"],
body[data-privacy="client"] .ptab[data-ptab="controle"],
body[data-privacy="client"] .wind-stab[data-stab="aluminio"],
body[data-privacy="client"] #configBtn,
body[data-privacy="client"] #sidebarControleBtn,
body[data-privacy="client"] [data-control-section],
body[data-privacy="client"] [data-sidebar-panel="dashboard"],
body[data-privacy="client"] .control-nav,
body[data-privacy="client"] .alum-section-title,
body[data-privacy="client"] .alum-params-grid,
body[data-privacy="client"] .alum-models-grid,
body[data-privacy="client"] .alum-results-grid{
  display:none !important;
}
body[data-privacy="client"] .topbar-right .totals-inline{
  justify-content:flex-start;
}
body[data-privacy="client"] .panel-tabs{
  grid-template-columns:1fr;
}
body[data-privacy="client"] .ptab[data-ptab="orcamento"]{
  border-bottom-color:var(--accent);
  color:var(--accent);
  background:linear-gradient(180deg, transparent, var(--accent-dim));
  font-weight:800;
}
body[data-privacy="client"] .items-header,
body[data-privacy="client"] .ic-head,
body[data-privacy="client"] .g-head{
  background:linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--accent) 4%), var(--surface));
}
body[data-privacy="client"] .bd-total,
body[data-privacy="client"] .totals-row.big,
body[data-privacy="client"] .sidebox-total-val,
body[data-privacy="client"] .sidebox-restante-val{
  font-weight:800;
}
body[data-privacy="client"] .main-control-view.active{
  display:none !important;
}


/* ──────────────────────────────────────────────
   UX PROFUNDA — ABA PARÂMETROS POR INTENÇÃO
   Mantém data-configs e lógica existentes; muda a leitura.
────────────────────────────────────────────── */
.main-control-wrap{
  max-width:1180px;
  width:100%;
  margin:0 auto;
  gap:18px;
}
.main-control-header{
  align-items:flex-start;
  padding:22px 24px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 13%, transparent), transparent 38%),
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 92%, var(--bg)));
}
.main-control-title{
  font-size:20px;
  letter-spacing:-.045em;
}
.main-control-sub{
  max-width:72ch;
  line-height:1.65;
}
.control-toolbar{
  padding:18px;
  gap:16px;
}
.control-intent-area{
  display:grid;
  gap:10px;
}
.control-intent-kicker{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.control-intent-title{
  font-size:10px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
  color:var(--faint);
}
.control-intent-hint{
  font-size:11px;
  color:var(--muted);
}
.control-intent-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:10px;
}
.control-intent-btn{
  min-height:78px;
  padding:13px 14px;
  border-radius:18px;
  border:1px solid var(--border);
  background:linear-gradient(180deg, color-mix(in srgb, var(--surface2) 84%, var(--surface)), var(--surface));
  color:var(--muted);
  text-align:left;
  display:grid;
  grid-template-columns:auto 1fr;
  gap:10px;
  align-items:start;
  transition:background .18s ease,border-color .18s ease,color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.control-intent-btn:hover{
  transform:translateY(-1px);
  color:var(--text);
  border-color:var(--border2);
  box-shadow:var(--shadow-sm);
}
.control-intent-btn.active{
  color:var(--accent);
  border-color:var(--accent-border);
  background:linear-gradient(180deg, color-mix(in srgb, var(--accent-dim) 88%, var(--surface)), color-mix(in srgb, var(--surface) 92%, var(--accent)));
  box-shadow:0 8px 22px color-mix(in srgb, var(--accent) 14%, transparent);
}
.control-intent-ico{
  width:34px;
  height:34px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:var(--surface);
  border:1px solid var(--border);
  font-size:16px;
  line-height:1;
}
.control-intent-copy{display:grid;gap:2px;min-width:0}
.control-intent-name{
  font-size:12px;
  font-weight:900;
  letter-spacing:-.02em;
  color:var(--text);
}
.control-intent-btn.active .control-intent-name{color:var(--accent)}
.control-intent-desc{
  font-size:10px;
  line-height:1.45;
  color:var(--muted);
}
.control-product-filter{
  display:grid;
  gap:8px;
  padding-top:2px;
}
.control-product-filter-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.control-product-filter-title{
  font-size:10px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
  color:var(--faint);
}
.control-product-filter-sub{
  font-size:11px;
  color:var(--muted);
}
.control-nav{
  padding-top:0;
  gap:8px;
}
.control-nav-btn{
  padding:9px 13px;
  background:var(--surface2);
}
.control-nav-btn.active{
  background:linear-gradient(135deg, #1a73e8, #4285f4) !important;
  color:#fff;
}
.control-quickstats{
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.control-stat{
  min-height:64px;
}
.control-groups{
  gap:14px;
}
.control-product-card{
  border-radius:22px;
  overflow:hidden;
}
.control-product-head{
  padding:18px 20px;
  align-items:center;
}
.control-product-icon{
  width:48px;
  height:48px;
  border-radius:16px;
}
.control-product-title{
  font-size:16px;
}
.control-product-sub{
  max-width:92ch;
}
.control-product-body{
  padding:18px 20px 20px;
  background:linear-gradient(180deg, color-mix(in srgb, var(--bg) 90%, var(--surface)), var(--bg));
}
.control-section-grid{
  grid-template-columns:repeat(2,minmax(280px,1fr));
  align-items:start;
}
.control-subcard{
  border-radius:18px;
  padding:16px;
  gap:12px;
}
.control-subcard.is-hidden{display:none !important}
.control-subcard-header{
  padding-bottom:4px;
  border-bottom:1px solid var(--border);
}
.control-subcard-title{
  font-size:11px;
  color:var(--text);
}
.control-subcard-help{
  max-width:56ch;
}
.control-field{
  grid-template-columns:minmax(0,1fr) minmax(118px,150px);
  align-items:center;
  column-gap:14px;
  row-gap:4px;
  padding:12px;
}
.control-field-top{
  grid-column:1;
  grid-row:1;
  justify-content:flex-start;
}
.control-field-help{
  grid-column:1;
  grid-row:2;
}
.control-field input{
  grid-column:2;
  grid-row:1 / span 2;
  text-align:right;
  font-size:14px;
  padding:10px 12px;
}
.control-field-unit{
  margin-left:6px;
}
.control-empty{
  padding:26px 18px;
  border-radius:20px;
}
body[data-theme="light"] .control-intent-btn{
  background:linear-gradient(180deg,#fff,color-mix(in srgb,#fff 90%,var(--surface2)));
}
@media (max-width:1180px){
  .control-intent-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .control-section-grid{grid-template-columns:1fr}
}
@media (max-width:820px){
  .main-control-header{flex-direction:column}
  .control-intent-grid{grid-template-columns:1fr}
  .control-field{grid-template-columns:1fr}
  .control-field input{grid-column:1;grid-row:auto;text-align:left}
}


/* ── PATCH UX: nomenclatura clara na aba Parâmetros ───────────── */
.control-field-top{align-items:flex-start}
.control-field label{line-height:1.28;white-space:normal;text-transform:none;letter-spacing:.01em;font-size:12px;color:var(--text)}
.control-field-help{font-size:10.5px;line-height:1.45;color:var(--muted)}
.control-field-unit{margin-top:1px}
.control-field{grid-template-columns:minmax(0,1fr) minmax(130px,150px);align-items:center;gap:8px 12px}
.control-field-top,.control-field-help,.control-field-path{grid-column:1}
.control-field input{grid-column:2;grid-row:1 / span 3;align-self:center;text-align:right;font-size:14px;min-height:42px}
@media (max-width:760px){.control-field{grid-template-columns:1fr}.control-field input{grid-column:1;grid-row:auto;text-align:left}}

/* ══════════════════════════════════════════════
   TELA DE SELEÇÃO DE PERFIL
══════════════════════════════════════════════ */
#profileScreen {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg, #f8fafc);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 32px;
}
#profileScreen.hidden { display: none; }
.profile-logo {
  font-size: 28px; font-weight: 800;
  color: var(--accent, #2563eb);
  letter-spacing: -1px;
}
.profile-sub {
  font-size: 14px; color: var(--muted, #64748b);
  margin-top: -24px;
}
.profile-grid {
  display: flex; gap: 20px;
}
.profile-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 32px 40px;
  background: var(--surface, #fff);
  border: 2px solid var(--border, #e2e8f0);
  border-radius: 20px;
  cursor: pointer;
  transition: all .18s ease;
  min-width: 160px;
}
.profile-card:hover {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 8px 32px rgba(37,99,235,.12);
  transform: translateY(-2px);
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800;
  color: #fff;
}
.profile-name {
  font-size: 16px; font-weight: 700;
  color: var(--text, #1e293b);
}
.profile-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; padding: 3px 10px;
  border-radius: 99px; background: var(--border2, #f1f5f9);
  color: var(--muted, #64748b);
}
/* ── CHIP DE PERFIL ATIVO NO HEADER ── */
#activeProfileChip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 6px;
  background: var(--surface, #fff);
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 99px; cursor: pointer;
  font-size: 12px; font-weight: 700;
  color: var(--text, #1e293b);
  transition: all .18s ease;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
#activeProfileChip:hover {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 2px 10px rgba(37,99,235,.15);
  transform: translateY(-1px);
}
#activeProfileChip .chip-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: #fff;
  flex-shrink: 0;
}
#activeProfileChip .chip-label {
  display: flex; flex-direction: column; line-height: 1.2;
}
#activeProfileChip .chip-name {
  font-size: 12px; font-weight: 700;
}
#activeProfileChip .chip-hint {
  font-size: 9px; font-weight: 500; color: var(--muted, #64748b);
  text-transform: uppercase; letter-spacing: .4px;
}


.profile-card.is-active {
  border-color: var(--accent, #2563eb);
  background: rgba(37,99,235,.04);
}
.profile-card.is-active::after {
  content: '● Ativo';
  font-size: 9px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .5px; color: var(--accent, #2563eb);
  margin-top: -8px;
}


/* ── FOTO DE PERFIL ── */
.profile-avatar {
  position: relative;
  overflow: hidden;
}
.profile-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute; inset: 0;
}
/* overlay foto removido */
.profile-avatar-input { display: none; }
.chip-avatar img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}



/* ── MENU DE OPÇÕES DO PERFIL ── */
.profile-card { position: relative; }
.profile-menu-btn {
  position: absolute; top: 8px; right: 8px;
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--muted, #94a3b8);
  padding: 3px 7px; border-radius: 6px;
  transition: background .15s, color .15s;
  opacity: 0; line-height: 1;
}
.profile-card:hover .profile-menu-btn { opacity: 1; }
.profile-menu-btn:hover { background: var(--border, #e2e8f0); color: var(--text); }
.profile-menu {
  position: absolute; top: 32px; right: 6px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  min-width: 160px; z-index: 100;
  display: none; flex-direction: column; overflow: hidden;
}
.profile-menu.open { display: flex; }
.profile-menu button {
  background: none; border: none; text-align: left;
  padding: 10px 14px; font-size: 13px; font-weight: 600;
  color: var(--text, #1e293b); cursor: pointer;
  transition: background .12s;
}
.profile-menu button:hover { background: var(--surface2, #f8fafc); }

/* ── RENOMEAR PERFIL ── */
.profile-name-wrap {
  display: flex; align-items: center; gap: 6px;
  position: relative;
}
.profile-name-input {
  font-size: 16px; font-weight: 700;
  color: var(--text, #1e293b);
  border: none; outline: none;
  background: transparent;
  text-align: center;
  width: 100%; min-width: 60px; max-width: 140px;
  border-bottom: 1.5px solid transparent;
  transition: border-color .15s;
  padding: 2px 4px;
  border-radius: 4px 4px 0 0;
}
.profile-name-input:focus {
  border-bottom-color: var(--accent, #2563eb);
  background: var(--surface2, #f8fafc);
}
.profile-edit-btn {
  background: none; border: none; cursor: pointer;
  font-size: 11px; padding: 2px 4px; border-radius: 4px;
  color: var(--muted, #94a3b8); line-height: 1;
  transition: color .15s, opacity .15s;
  opacity: 0;
}
.profile-card:hover .profile-edit-btn { opacity: 1; }
.profile-edit-btn:hover { color: var(--accent, #2563eb); }



/* ── AJUSTE UX/UI TOPBAR RESPONSIVA ─────────────────────────────
   Mantém perfil, sincronização e tema sempre visíveis sem estourar a tela. */
.topbar{
  width:100%;
  min-width:0;
  overflow:hidden;
}
.topbar-brand{
  flex:0 0 var(--sidebar-w);
}
.topbar-center{
  flex:1 1 220px;
  min-width:170px;
  overflow:hidden;
}
.client-fields{
  min-width:0;
  max-width:100%;
}
.client-field,
.client-field input{
  min-width:0;
}
.client-field input{
  width:clamp(170px, 18vw, 280px) !important;
}
.topbar-actions{
  flex:0 1 auto;
  min-width:0;
  overflow:hidden;
  gap:7px;
}
.topbar-actions .btn{
  white-space:nowrap;
  flex:0 0 auto;
}
.topbar-right{
  width:auto !important;
  flex:0 0 auto;
  min-width:0;
  max-width:min(44vw, 560px);
  padding-inline:10px !important;
  gap:8px;
  overflow:hidden;
}
.topbar-right .totals-inline{
  flex:0 1 auto;
  min-width:142px;
  gap:10px;
}
.topbar-right .total-item{
  min-width:56px;
}
#activeProfileChip{
  flex:0 0 auto;
  max-width:154px;
  overflow:hidden;
}
#activeProfileChip .chip-label{
  min-width:0;
  overflow:hidden;
}
#activeProfileChip .chip-name,
#activeProfileChip .chip-hint{
  display:block;
  max-width:96px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#fbStatus{
  flex:0 1 auto;
  max-width:112px;
  overflow:hidden;
  text-overflow:ellipsis;
}
#themeToggle{
  flex:0 0 34px;
  width:34px;
  min-width:34px;
}

@media (max-width: 1680px){
  .topbar-center{padding-inline:14px !important;}
  .topbar-actions{gap:6px;}
  #copyTopBtn{display:none !important;}
  .topbar-right{max-width:min(46vw, 520px);}
}
@media (max-width: 1520px){
  .client-field input{width:clamp(150px, 16vw, 220px) !important;}
  #addItemBtn,
  #addSpecialBtn{display:none !important;}
  #fbStatus{display:none !important;}
  .topbar-right{max-width:360px;}
  #activeProfileChip .chip-hint{display:none;}
  #activeProfileChip{padding-right:10px;max-width:132px;}
}
@media (max-width: 1280px){
  .topbar-actions .btn-privacy span:not(#privacyModeIcon){display:none;}
  .topbar-actions .btn-privacy{width:38px;padding-inline:0;justify-content:center;}
  .topbar-right .totals-inline{min-width:118px;gap:7px;}
  .total-label{font-size:8px;}
  .total-value{font-size:12px;}
}
