/* Arpe Gestao - estilos consolidados V64. Fontes preservadas ao lado. */

/* ARPE_STYLE:app.css */
:root {
  --ink: #152033;
  --muted: #65748a;
  --line: #d8e0ec;
  --soft: #eef3f8;
  --panel: #ffffff;
  --primary: #245c93;
  --primary-2: #2f7fca;
  --danger: #d71920;
  --warning: #f59f00;
  --success: #0f9f6e;
  --assist: #30353f;
  --note: #fff4bf;
  --shadow: 0 22px 70px rgba(21, 32, 51, .22);
  --radius: 8px;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", Arial, Helvetica, sans-serif; background: var(--soft); color: var(--ink); font-size: 14px; line-height: 1.35; }
button, input, select, textarea { font: inherit; }
button { min-height: 38px; border: 1px solid #c9d4e3; border-radius: 6px; padding: 8px 13px; background: white; color: var(--ink); font-weight: 400; cursor: pointer; box-shadow: 0 1px 0 rgba(21,32,51,.04); }
button:hover { background: #eef6ff; border-color: #aebed2; }
button.primary { background: var(--primary); border-color: var(--primary); color: white; }
button.primary:hover { background: #194f84; border-color: #194f84; }
button.danger { border-color: #f0b4b4; color: var(--danger); }
button.link { border: 0; background: transparent; color: var(--primary); padding: 0; min-height: 0; text-align: left; }
.hidden { display: none !important; }

.login-screen { min-height: 100vh; display: grid; place-items: center; background: #eaf0f7; }
.login-box { width: min(380px, 92vw); background: white; border: 1px solid var(--line); border-radius: 10px; padding: 28px; box-shadow: 0 16px 40px rgba(23, 32, 51, .12); }
.brand-mark { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 10px; background: var(--primary); color: white; font-size: 28px; font-weight: 400; margin-bottom: 12px; }
.login-box h1 { margin: 0 0 4px; font-size: 30px; }
.login-box p { margin: 0 0 20px; color: var(--muted); }
.login-logo { display: block; width: 210px; max-width: 100%; height: auto; margin: 0 0 18px; }

label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; color: var(--ink); outline: none; background: white; }
input:focus, select:focus, textarea:focus { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(47, 127, 202, .14); }
.mini-input { width: 86px; min-width: 86px; }
textarea { min-height: 82px; resize: vertical; line-height: 1.35; }
label input, label select, label textarea { margin-top: 5px; margin-bottom: 12px; }
/* Checkbox dentro de grid junto com campo de texto/data/select ficava com uma
   celula bem mais baixa que as vizinhas (linha do grid segue a mais alta),
   sobrando espaco vazio embaixo e parecendo desalinhado. Centraliza o campo
   na altura da linha em vez de empurrar tudo pro topo. */
.checkbox-field { display: flex; align-items: center; align-self: center; gap: 7px; text-transform: none; letter-spacing: normal; font-size: 13px; color: var(--ink); }
.checkbox-field input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--primary); }

.topbar { height: 64px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 0 18px; background: #fbfdff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 12px rgba(21,32,51,.04); }
.brand { min-width: 132px; line-height: 1; color: #153e68; }
.brand img { display: block; width: 112px; height: 38px; object-fit: contain; object-position: left center; }
.brand small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); font-weight: 700; }
.environment-badge { white-space: nowrap; border: 1px solid #e4a11b; border-radius: 5px; background: #fff2b8; color: #704800; padding: 6px 9px; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.environment-badge.production { border-color: #9ec8b7; background: #e8f7f0; color: #176344; }
body.sandbox-mode .topbar { border-top: 4px solid #e4a11b; }
nav { flex: 1; display: flex; gap: 6px; overflow: auto; }
nav button { min-height: 36px; padding: 8px 12px; border-radius: 6px; white-space: nowrap; background: transparent; font-size: 14px; }
nav button.active { background: var(--primary); border-color: var(--primary); color: white; }
.sync { white-space: nowrap; font-size: 12px; color: var(--muted); }

.workspace { height: calc(100vh - 64px); display: block; padding: 16px; }
.list-pane, .work-pane { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 0; }
.list-pane { display: flex; flex-direction: column; height: 100%; }
.work-pane {
  position: fixed;
  top: 64px;
  right: 0;
  z-index: 25;
  width: min(880px, calc(100vw - 34px));
  height: calc(100vh - 64px);
  overflow: auto;
  border-radius: 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 24px));
  visibility: hidden;
  pointer-events: none;
  transition: transform .18s ease, visibility .18s ease;
}
.work-pane.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); background: #fbfdff; }
.search { flex: 1; position: relative; min-width: 210px; }
.search input { padding-right: 36px; }
.search button { position: absolute; right: 3px; top: 3px; min-height: 0; width: 30px; height: 30px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 20px; }
.filters { flex: 0 0 auto; min-height: 42px; border-bottom: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; background: white; position: relative; z-index: 3; }
.filters > button, .filters > .primary { align-self: flex-end; }
.filters label, .filter-field { font-size: 12px; }
.filters select, .filters input, .filters button { font-size: 14px; }
.list { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; z-index: 1; isolation: isolate; }
.filter-row { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; width: 100%; }
.filter-field { width: auto; min-width: 142px; margin: 0; }
.filter-field span { display: block; margin-bottom: 4px; }
.filter-field select { min-width: 142px; height: 36px; padding: 7px 9px; }

.table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow: auto; min-height: 0; }
.table th, .table td { border-bottom: 1px solid #e7edf5; padding: 11px 12px; text-align: left; vertical-align: top; }
.table th { position: static; background: #f5f8fb; color: #536177; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.table tr:hover td, .table tr.active td { background: #eef6ff; }
.table tr.clickable-row { cursor: pointer; }
.table tr.clickable-row:focus-visible { outline: 3px solid rgba(47,127,202,.35); outline-offset: -3px; }
.table small { display: block; color: var(--muted); margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions-cell { white-space: nowrap; min-width: 160px; }
.actions-cell button { margin-right: 5px; margin-bottom: 4px; }
.actions-cell button, .table button { font-size: 13px; }
.compact-action { min-height: 30px; padding: 5px 9px; border-color: #b7d2ef; background: #eef6ff; color: #174a78; }
.compact-action:hover { background: #dbeeff; border-color: #8bbce8; }
.assist-action { border-color: #c6cad3; background: #f2f4f7; color: var(--assist); }
.assist-action:hover { background: #e5e7eb; border-color: #aeb4bf; }
.pre { white-space: pre-line; line-height: 1.35; }

.empty { min-height: 260px; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 26px; }
.notice { margin: 12px; padding: 10px 12px; border: 1px solid #bcd7f5; background: #eef6ff; color: #164a7a; border-radius: 7px; }
.message { margin-top: 12px; color: var(--danger); font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; }

.drawer-close { position: sticky; top: 10px; float: right; z-index: 10; width: 34px; height: 34px; min-height: 34px; margin: 10px 10px -44px 0; padding: 0; border-radius: 18px; background: #f8fafc; color: #344054; font-size: 22px; line-height: 1; }
.detail-head { position: static; background: white; border-bottom: 1px solid var(--line); padding: 18px 58px 16px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.detail-head h2 { margin: 0; color: #0f2f57; font-size: 30px; }
.detail-head p { margin: 4px 0 0; color: var(--muted); }
.tabs { position: static; display: flex; gap: 6px; overflow: auto; padding: 10px 18px; background: #d3e0f2; border-bottom: 2px solid #9db8dd; }
.tabs button { min-height: 36px; padding: 8px 12px; font-size: 14px; }
.tabs button.active { background: var(--primary-2); border-color: var(--primary-2); color: white; }
.detail-body { padding: 18px; }
.work-pane { font-size: 15.5px; }
.work-pane label { font-size: 12px; }
.work-pane input, .work-pane select, .work-pane textarea, .work-pane button { font-size: 15px; }
.work-pane .hint, .work-pane small { font-size: 13px; }
.work-pane .section h3, .work-pane .summary-box h3 { font-size: 14px; }

.section { border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: 15px; margin-bottom: 14px; }
.section h3 { margin: 0 0 13px; color: #0f2f57; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.overview { display: grid; gap: 12px; }
.summary-box { border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: 15px; }
.summary-box h3 { margin: 0 0 12px; color: #0f2f57; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.summary-main { border-left: 4px solid var(--primary-2); }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.summary-line { border: 1px solid #e7edf5; border-radius: 7px; padding: 9px 10px; background: #fbfdff; }
.summary-line span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 800; margin-bottom: 4px; }
.summary-line strong { display: block; color: var(--ink); font-size: 15px; }
.summary-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; margin-top: 12px; border-top: 1px solid #edf1f7; }
.summary-title { margin: 0 0 8px; font-size: 18px; font-weight: 900; color: #0f2f57; }
.summary-list { margin: 0; padding-left: 20px; line-height: 1.55; }
.summary-list li { margin-bottom: 8px; }
.summary-list small { display: block; color: var(--muted); margin-top: 2px; }
.summary-note { margin-top: 12px; border: 1px solid #e7d88d; border-radius: 7px; background: var(--note); padding: 10px 12px; }
.summary-note p { margin: 5px 0 0; white-space: pre-wrap; }
.summary-note-internal { margin-top: 12px; border: 1px solid #b7c7e0; border-radius: 7px; background: #eef3fb; padding: 10px 12px; }
.summary-note-internal p { margin: 5px 0 0; white-space: pre-wrap; }
.flow-box { margin-top: 13px; border-top: 1px solid #edf1f7; padding-top: 13px; }
/* Cada etapa e dimensionada pelo proprio conteudo e quebra para a linha de
   baixo quando nao cabe (flex-wrap), em vez de colunas de 104px fixos em que o
   rotulo ("Aprovacao", "Liberacao") vazava para fora da borda do quadrinho. */
.flow-steps { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 5px; }
.flow-step { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid #dce5f0; border-radius: 8px; padding: 9px 11px; color: #536177; background: #f8fafc; font-weight: 800; white-space: nowrap; }
.flow-step i { width: 26px; height: 26px; flex-shrink: 0; display: inline-grid; place-items: center; border-radius: 50%; background: #e2e8f0; color: #475569; font-style: normal; font-size: 13px; line-height: 1; }
.flow-step.done { border-color: #b8e4ce; background: #effaf4; color: #146247; }
.flow-step.done i { background: var(--success); color: white; }
.flow-step.current { border-color: #9fc7ec; background: #eef6ff; color: #0f2f57; box-shadow: inset 0 0 0 1px #9fc7ec; }
.flow-step.current i { background: var(--primary-2); color: white; }
.flow-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 9px; }
.ready-panel { margin-top: 12px; border: 1px solid #dce5f0; border-radius: 8px; background: #fbfdff; padding: 12px; }
.ready-collapsed { padding: 0; }
.ready-collapsed > summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; cursor: pointer; padding: 12px 14px; color: #0f2f57; list-style: none; }
.ready-collapsed > summary::-webkit-details-marker { display: none; }
.ready-collapsed > summary::after { content: "+"; font-size: 22px; color: var(--primary-2); }
.ready-collapsed[open] > summary::after { content: "−"; }
.ready-collapsed > summary small { color: var(--muted); }
.ready-collapsed .ready-head, .ready-collapsed .ready-grid { margin-left: 12px; margin-right: 12px; }
.ready-collapsed .ready-grid { margin-bottom: 12px; }
.ready-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.ready-head strong { color: #0f2f57; font-size: 15px; }
.ready-head span { color: var(--muted); font-size: 12px; }
.ready-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ready-item { border: 1px solid #e2e8f0; border-radius: 7px; background: white; padding: 9px; display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 6px 9px; align-items: center; }
.ready-item span { border-radius: 5px; padding: 5px 7px; font-size: 11px; font-weight: 900; text-align: center; }
.ready-item strong { font-size: 13px; color: var(--ink); }
.ready-item small { grid-column: 2 / -1; color: var(--muted); }
.ready-item button { padding: 6px 9px; font-size: 12px; }
.ready-item.good span { background: #e7f7ef; color: #146247; }
.ready-item.attention { border-color: #f0d28b; background: #fffaf0; }
.ready-item.attention span { background: var(--warning); color: #111; }
.mini-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.mini-table th, .mini-table td { border: 1px solid #e2e8f0; padding: 7px 8px; text-align: left; vertical-align: top; }
.mini-table th { background: #f5f8fb; color: #536177; font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.mini-table td { font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wide { grid-column: 1 / -1; }
.yellow textarea, textarea.yellow, .note { background: var(--note); }
.fixed-actions { position: sticky; bottom: 0; padding: 12px 0 0; margin-top: 12px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); }

.scroll-x { overflow-x: auto; padding-bottom: 4px; }
.items-table { min-width: 1480px; }
.items-table-wide th:nth-child(2), .items-table-wide td:nth-child(2) { min-width: 430px; }
.items-table-wide th:nth-child(3), .items-table-wide td:nth-child(3) { min-width: 135px; }
.items-table-wide th:nth-child(4), .items-table-wide td:nth-child(4), .items-table-wide th:nth-child(5), .items-table-wide td:nth-child(5) { min-width: 210px; }
.items-table-wide th:nth-child(6), .items-table-wide td:nth-child(6) { min-width: 240px; }
.item-description-cell textarea { min-height: 74px; margin-top: 7px !important; }
.items-table input, .items-table textarea, .items-table select { margin: 0; }
.items-table textarea { min-height: 62px; }
.items-table th:first-child, .items-table td:first-child { width: 76px; }
.items-table th:nth-child(2), .items-table td:nth-child(2) { min-width: 330px; }
.shipments-table { min-width: 1450px; }
.shipments-table input, .shipments-table select { margin: 0; }
.catalog-select { margin-bottom: 6px !important; }

.pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; padding: 6px 9px; font-size: 12px; line-height: 1; font-weight: 800; white-space: nowrap; }
.late { background: var(--danger); color: white; animation: blinkLate 1s step-end infinite; }
.soon { background: var(--warning); color: #111; }
.ok { background: var(--success); color: white; }
.neutral { background: #eef1f5; color: #475569; }
.pill.delivery { background: #e0e7ff; color: #3730a3; }
@keyframes governanceFlashV66 { 0%,100% { box-shadow: 0 0 0 0 rgba(47,127,202,0); } 30% { box-shadow: 0 0 0 3px rgba(47,127,202,.55); } }
.governance-flash-v66 { animation: governanceFlashV66 1.2s ease-out; border-radius: 8px; }
.assist { background: var(--assist); color: white; }

@keyframes blinkLate {
  50% { filter: brightness(1.35); }
}

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; width: 100%; }
.kpi { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 14px; }
.kpi small { display: block; color: var(--muted); text-transform: uppercase; font-size: 11px; font-weight: 800; margin-bottom: 6px; }
.kpi strong { font-size: 24px; color: #0f2f57; }
.danger-kpi { border-color: #f2b8b8; background: #fff5f5; }
.danger-kpi strong { color: var(--danger); }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 12px; }
.report-dashboard { padding: 12px; }
.report-kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 12px; }
.report-kpi { display: block; min-height: 106px; padding: 14px; text-align: left; border-color: var(--line); background: white; }
.report-kpi small { display: block; color: var(--muted); text-transform: uppercase; font-size: 11px; }
.report-kpi strong { display: block; margin: 8px 0 5px; color: #123b63; font-size: 23px; }
.report-kpi span { color: var(--primary-2); font-size: 12px; }
.report-charts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.report-card { display: block; min-height: 260px; padding: 15px; text-align: left; border-color: var(--line); background: white; }
.report-card-title { display: block; margin-bottom: 14px; color: #123b63; font-size: 16px; }
.report-card > small { display: block; margin-top: 13px; color: var(--primary-2); }
.bar-list { display: grid; gap: 9px; }
.bar-list label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; color: var(--ink); text-transform: none; font-size: 12px; }
.bar-list i { display: block; height: 9px; border-radius: 3px; overflow: hidden; background: #e8eef5; }
.bar-list em { display: block; height: 100%; border-radius: 3px; background: #2f7fca; }
.bar-list > div:nth-child(3n+2) em { background: #0f9f6e; }
.bar-list > div:nth-child(3n+3) em { background: #f08a24; }

.dashboard-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); background: #fbfdff; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: 16px; box-shadow: 0 1px 0 rgba(21,32,51,.04); }
.metric small { display: block; color: var(--muted); text-transform: uppercase; font-size: 11px; font-weight: 800; margin-bottom: 7px; }
.metric strong { display: block; font-size: 28px; color: #0f2f57; line-height: 1.05; }
.metric span { display: block; margin-top: 7px; color: var(--muted); }
.metric.danger { border-color: #f2b8b8; background: #fff5f5; }
.metric.danger strong { color: var(--danger); }
.metric.ok { border-color: #b8e4ce; background: #effaf4; }
.metric.ok strong { color: var(--success); }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px; }
.wide-section { grid-column: 1 / -1; }
.home-focus { border-left: 4px solid var(--primary-2); }
.home-focus .mini-table td:last-child { min-width: 170px; }

.quote { border: 1px solid #e0d7bf; background: #fff8e8; border-radius: 10px; padding: 22px; max-width: 620px; box-shadow: 0 10px 24px rgba(23,32,51,.08); }
.quote-mark { display: inline-grid; place-items: center; min-width: 74px; height: 34px; border: 2px solid var(--primary); color: var(--primary); font-weight: 900; letter-spacing: .08em; margin-bottom: 14px; }
.quote ul { margin: 0 0 16px; padding-left: 20px; line-height: 1.55; }
.quote-total { font-size: 18px; font-weight: 900; color: #0f2f57; }

.calculator-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); gap: 14px; padding: 12px; align-items: start; }
.calculator-form, .calculator-preview { margin: 0; }
.calculator-preview { position: sticky; top: 0; }
.calculator-preview pre { min-height: 260px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #f7f8fa; white-space: pre-wrap; font: 14px/1.55 "Roboto Mono", Consolas, monospace; }
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-title-row .client-name { width: min(360px, 60%); }
.calc-item { border: 1px solid var(--line); border-radius: 7px; padding: 12px; margin-bottom: 10px; background: #fbfcfe; }
.calc-item-main { display: grid; grid-template-columns: 74px minmax(0, 1fr) 38px; gap: 10px; align-items: end; }
.calc-product { display: grid; grid-template-columns: 1fr; gap: 8px; }
.calc-product input { grid-column: auto; }
.calc-item-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(150px, .8fr); gap: 10px; align-items: end; margin-top: 10px; }
.calc-variations { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 10px; margin-top: 10px; padding: 10px; border: 1px solid #e0e7f0; border-radius: 6px; background: white; }
.calc-line-total { border: 1px solid #cbd6e4; border-radius: 6px; min-height: 60px; padding: 9px 11px; background: white; }
.calc-line-total span { display: block; font-size: 11px; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.calc-line-total strong { font-size: 18px; color: #0f2f57; }
.icon-button { width: 38px; min-height: 38px; padding: 0; font-size: 21px; }
.calc-final-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.calc-payment-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 12px; }
.calc-payment-head h3 { margin: 0; }
.toggle-line, .individual-toggle { display: flex; align-items: center; gap: 8px; text-transform: none; font-size: 13px; color: var(--ink); }
.toggle-line input, .individual-toggle input, .installment-option input { width: auto; margin: 0; }
.individual-toggle { width: max-content; max-width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #f7f8fa; padding: 10px 12px; margin: 12px 0; }
.installments { display: grid; grid-template-columns: repeat(6, minmax(58px, 1fr)); gap: 7px; }
.installment-option { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 42px; border: 1px solid var(--line); border-radius: 6px; background: #f7f8fa; color: var(--ink); font-size: 13px; }
.rate-settings { margin: 12px 0; border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; }
.rate-settings summary { cursor: pointer; color: #274d75; }
.rate-grid { display: grid; grid-template-columns: repeat(6, minmax(80px, 1fr)); gap: 8px; margin-top: 10px; }
.calculator-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.quote-print-body { border: 1px solid #cbd5e1; border-radius: 7px; padding: 18px; font: 13px/1.35 "Roboto Mono", Consolas, monospace; }
.quote-print-body p { margin: 0 0 4px; }
.quote-space { height: 11px; }
.quote-print footer { margin-top: 18px; border-top: 1px solid #cbd5e1; padding-top: 10px; text-align: center; color: var(--muted); }

.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.attachment { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fbfcfe; }
.attachment-upload { display: grid; grid-template-columns: minmax(180px,.35fr) minmax(280px,1fr); gap: 12px; align-items: end; }
.attachment-type { display: inline-block; margin-bottom: 7px; border-radius: 4px; padding: 4px 7px; background: #e8eef5; color: #334155; font-size: 11px; }
.attachment img { width: 100%; max-height: 260px; object-fit: contain; display: block; margin-top: 8px; border: 1px solid #edf1f7; background: white; }
.attachment button { margin-top: 8px; margin-right: 6px; }
.history-line { border-bottom: 1px solid #edf1f7; padding: 10px 0; }
.history-line small { display: block; color: var(--muted); margin-top: 2px; }
.action-output { margin-top: 14px; }
.danger-box { border: 1px solid #efb3b3; background: #fff1f1; color: #7f1d1d; border-radius: 8px; padding: 12px; }
.danger-box p { margin: 6px 0 12px; color: #7f1d1d; line-height: 1.45; }
.admin-output { margin-top: 12px; }
.audit-ok { border: 1px solid #b8e4ce; background: #eaf8f1; color: #146247; border-radius: 7px; padding: 10px 12px; font-weight: 800; }
.audit-fail { border: 1px solid #efb3b3; background: #fff1f1; color: var(--danger); border-radius: 7px; padding: 10px 12px; font-weight: 800; }
.audit-level { display: inline-flex; border-radius: 5px; padding: 5px 8px; color: white; font-size: 11px; text-transform: uppercase; font-weight: 900; }
.audit-level.critico { background: var(--danger); }
.audit-level.atencao { background: var(--warning); color: #111; }
.audit-level.info { background: var(--primary-2); }
.audit-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.audit-summary > div { border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; padding: 12px; }
.audit-summary small { display: block; color: var(--muted); text-transform: uppercase; font-size: 11px; margin-bottom: 6px; }
.audit-summary strong { font-size: 24px; color: var(--ink); }
.audit-section { margin-top: 12px; }
.image-viewer { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .82); display: grid; place-items: center; padding: 28px; }
.image-viewer img { max-width: 94vw; max-height: 90vh; object-fit: contain; background: white; border-radius: 6px; }
.image-viewer button { position: fixed; top: 18px; right: 18px; width: 42px; height: 42px; padding: 0; border-radius: 50%; font-size: 26px; background: white; }

body :where(button, label, th, strong, b, h1, h2, h3, h4, .pill, .metric strong, .kpi strong, .summary-title, .summary-line span, .flow-step, .ready-head strong, .ready-item strong, .audit-ok, .audit-fail, .audit-level, .quote-mark, .quote-total) {
  font-weight: 400 !important;
}

.print-body { background: white; }
.print-body.sandbox-print::before { content: "CAIXA DE AREIA - DOCUMENTO DE TESTE"; display: block; margin: 0 auto 12px; border: 2px solid #b77900; color: #704800; padding: 7px 10px; text-align: center; font-size: 11px; letter-spacing: .08em; }
.print-page { width: 210mm; min-height: 297mm; margin: 0 auto; padding: 18mm 16mm; background: white; color: #111827; }
.print-page + .print-page { page-break-before: always; break-before: page; }
.print-header { display: flex; gap: 18px; align-items: center; border-bottom: 2px solid #111827; padding-bottom: 12px; margin-bottom: 16px; }
.print-logo { display: block; width: 116px; height: 56px; object-fit: contain; object-position: left center; }
.print-header h1 { margin: 0; font-size: 32px; }
.print-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.print-grid > div { border: 1px solid #cbd5e1; border-radius: 6px; padding: 10px; }
.print-page h2 { font-size: 14px; text-transform: uppercase; margin: 14px 0 8px; }
.print-table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; }
.print-table th, .print-table td { border: 1px solid #cbd5e1; padding: 7px; text-align: left; vertical-align: top; }
.print-table th { background: #eef2f7; font-size: 11px; text-transform: uppercase; }
.print-table .desc { width: 54%; }
.print-note { border: 1px solid #e7d88d; border-radius: 6px; padding: 10px; white-space: pre-wrap; font-size: 16px; background: var(--note); }
.print-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.print-photos figure { margin: 0; border: 1px solid #cbd5e1; padding: 6px; page-break-inside: avoid; }
.print-photos img { width: 100%; max-height: 110mm; object-fit: contain; display: block; background: white; }
.print-photos figcaption { font-size: 11px; color: #4b5563; margin-top: 4px; }

.sales-order-print { padding-top: 16mm; font-size: 12px; }
.sales-order-head, .production-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 2px solid #18263b; padding-bottom: 10px; margin-bottom: 14px; }
.sales-order-head > div, .production-head > div { text-align: right; }
.sales-order-head span, .production-head span { display: block; color: #536177; text-transform: uppercase; font-size: 13px; }
.sales-order-head strong, .production-head strong { display: block; margin-top: 2px; color: #18263b; font-size: 34px; line-height: 1; }
.sales-kpis { display: grid; grid-template-columns: 1.4fr repeat(3, .8fr); gap: 8px; margin-bottom: 14px; }
.sales-kpis > div, .sales-money-grid > div { border: 1px solid #cbd5e1; border-radius: 5px; padding: 8px 9px; }
.sales-kpis small, .sales-data span, .sales-money-grid span { display: block; color: #64748b; text-transform: uppercase; font-size: 9px; margin-bottom: 3px; }
.sales-kpis strong { font-size: 13px; }
.sales-data { margin-bottom: 12px; }
.sales-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
.sales-data-grid p { margin: 0; padding: 3px 0; }
.sales-data-grid .wide { grid-column: 1/-1; }
.sales-items .col-number { width: 8mm; text-align: center; }
.sales-items .col-qty { width: 12mm; text-align: center; }
.sales-items .money-cell { width: 28mm; text-align: right; white-space: nowrap; }
.sales-money-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 7px 0; }
.sales-money-grid strong { font-size: 14px; }
.payment-description { margin: 8px 0; }
.payment-table { font-size: 10px; }
.approval-section { margin-top: 16px; border-top: 1px solid #94a3b8; padding-top: 10px; page-break-inside: avoid; }
.approval-section h2 { margin-top: 0; }
.approval-section p { margin: 5px 0; font-size: 10px; line-height: 1.4; }

.production-order-print { padding: 10mm 12mm 12mm; background: #f8f9fb; }
.print-body, .print-body * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
.production-head { margin-bottom: 8px; }
.production-head .print-logo { width: 102px; height: 50px; }
.production-deadline { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 2px solid #64748b; border-radius: 7px; padding: 10px 12px; margin: 8px 0 12px; }
.production-deadline > div strong { display: block; font-size: 25px; line-height: 1; }
.production-deadline > div span { display: block; font-size: 16px; margin-top: 5px; }
.production-deadline > b { font-size: 15px; }
.production-deadline.ok { border-color: #2f7e4d; background: #e8f6ee; color: #2f7e4d; }
.production-deadline.soon { border-color: #da650c; background: #fff4e6; color: #b34e00; }
.production-deadline.late { border-color: #b92323; background: #ffeded; color: #b92323; animation: none; }
.production-deadline.done { border-color: #5b6573; background: #eef1f5; color: #404853; }
.production-deadline.none { border-color: #94a3b8; background: #f5f7f9; color: #536177; }
.production-meta { display: grid; grid-template-columns: 1.25fr 1fr .75fr 1fr .5fr; gap: 7px; margin-bottom: 14px; }
.production-meta > div { border: 1px solid #cbd5e1; border-radius: 6px; background: white; padding: 8px; min-height: 54px; }
.production-meta span { display: block; color: #64748b; text-transform: uppercase; font-size: 9px; margin-bottom: 4px; }
.production-meta strong { font-size: 12px; }
.production-section-title { color: #1e2c4c; font-size: 12px !important; margin: 11px 0 5px !important; }
.production-item { display: grid; grid-template-columns: 29mm minmax(0,1fr) 36mm; min-height: 40mm; border: 1.5px solid #1e2c4c; border-radius: 7px; overflow: hidden; margin-bottom: 4mm; background: #f1f6fc; page-break-inside: avoid; }
.production-qty { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #1e2c4c; color: white; }
.production-qty span { font-size: 10px; }
.production-qty strong { font-size: 48px; line-height: 1; margin-top: 4px; }
.production-description { padding: 10px 12px; }
.production-description small { color: #64748b; font-size: 10px; }
.production-description h3 { margin: 4px 0 9px; font-size: 21px; line-height: 1.15; color: #161d27; }
.production-description ul { margin: 0; padding-left: 18px; font-size: 16px; line-height: 1.45; }
.production-ready { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 9px; border: 1px solid #cbd5e1; border-radius: 5px; background: white; }
.check-box { display: inline-block; width: 19px; height: 19px; border: 2px solid #1e2c4c; background: white; }
.production-notes { min-height: 16mm; border: 1px solid #dfc97d; border-radius: 6px; background: #fff8e1; padding: 10px; font-size: 17px; white-space: pre-wrap; page-break-inside: avoid; }
.production-writing { height: 22mm; border: 1px solid #cbd5e1; border-radius: 6px; background: white; }
.production-checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; page-break-inside: avoid; }
.production-checks > div { display: flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid #cbd5e1; border-radius: 5px; background: white; padding: 9px; }

.landscape-report { width: auto; min-height: 190mm; padding: 10mm 10mm 18mm; }
.landscape-report .print-header { margin-bottom: 8px; }
.landscape-report .print-table { font-size: 10px; }
.landscape-report .print-table th, .landscape-report .print-table td { padding: 5px 6px; }
.report-deadline { display: inline-block; border-radius: 4px; padding: 5px 7px; color: white; white-space: nowrap; }
.report-deadline.ok { background: #2f7e4d; }
.report-deadline.soon { background: #da650c; }
.report-deadline.late { background: #b92323; animation: none; }
.report-deadline.done, .report-deadline.none { background: #64748b; }
.production-report td small { display: block; margin-top: 3px; color: #536177; }
.observation-flag { display: block; width: max-content; margin-top: 5px; border-radius: 4px; background: #ffe08a; color: #4a3600; padding: 3px 6px; font-size: 9px; }

.catalog-groups { display: grid; gap: 10px; padding: 12px; }
.catalog-group { border: 1px solid var(--line); border-radius: 7px; background: white; overflow: hidden; }
.catalog-group > summary { cursor: pointer; padding: 13px 15px; color: #123b63; font-size: 16px; background: #f8fafc; }
.catalog-group > summary span { color: var(--muted); font-size: 12px; margin-left: 6px; }
.catalog-group .table th, .catalog-group .table td { padding: 7px 8px; }
.catalog-group .table input { padding: 7px 8px; margin: 0; }
.catalog-add-row { display: grid; grid-template-columns: minmax(260px,1fr) 145px 145px auto; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.catalog-add-row.with-type { grid-template-columns: minmax(240px,1fr) 150px 135px 135px auto; }
.catalog-adjust { display: flex; align-items: end; gap: 8px; padding: 0 10px 10px; }
.catalog-adjust label { width: 180px; }
.order-items-editor { display: grid; gap: 12px; }
.order-item-editor { display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 7px; padding: 12px; background: #fbfcfe; }
.item-main-row { display: grid; grid-template-columns: 90px minmax(320px,1fr) auto; gap: 10px; align-items: end; }
.item-traits-row { display: grid; grid-template-columns: repeat(4,minmax(180px,1fr)); gap: 10px; }
.item-detail-row { display: grid; grid-template-columns: minmax(280px,1fr) repeat(3,150px); gap: 10px; align-items: end; }
.item-product input, .item-traits-row select, .item-detail-row input, .item-detail-row select { min-height: 42px; font-size: 15px; }
.item-delete { align-self: end; }
.grid.four { grid-template-columns: repeat(4,minmax(170px,1fr)); }
.copy-link { display: grid; grid-template-columns: minmax(280px,1fr) auto auto; gap: 8px; }
.segmented { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #f3f5f8; }
.segmented button { border: 0; }
.segmented button.active { background: var(--primary); color: white; }
.compact-add { display: grid; grid-template-columns: minmax(220px,1fr) minmax(220px,1fr) auto; gap: 8px; margin-bottom: 10px; }
.admin-carriers { grid-column: 1/-1; }
.catalog-group .table { width: auto; min-width: 620px; }
.catalog-group .table th:first-child, .catalog-group .table td:first-child { width: 360px; }
.admin-payment .table { width: auto; min-width: 620px; }
.admin-payment .table th, .admin-payment .table td { padding: 6px 9px; }
select, .filters select, .tabs button, nav button { font-size: 15px; }
.client-print-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 18px; margin-bottom: 16px; }
.client-print-grid > div { border-bottom: 1px solid #d7dde5; padding: 6px 0; }
.client-print-grid span { display: block; color: #64748b; font-size: 9px; text-transform: uppercase; }
.client-print-grid strong { display: block; margin-top: 2px; }
.quote-ticket-print { background: #86c5c3; padding: 12mm; font-family: "Roboto Mono", Consolas, monospace; }
.quote-ticket-inner { min-height: 265mm; display: flex; flex-direction: column; background: #faf6ee; border: 2px solid #263746; outline: 1px solid #71808b; outline-offset: -5mm; padding: 20mm 18mm 16mm; position: relative; }
.quote-ticket-inner header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.quote-ticket-inner header img { width: 72mm; height: 34mm; object-fit: contain; object-position: left top; }
.quote-ticket-inner header > div { text-align: right; }
.quote-ticket-inner header h1 { margin: 0; font-size: 30px; }
.quote-ticket-inner header p { margin: 6px 0 0; font-size: 15px; color: #60708a; }
.quote-ticket-inner h2 { margin: 14mm 0 10mm; font-size: 19px; text-transform: none; }
.quote-ticket-lines { font-size: 16px; line-height: 1.5; }
.quote-ticket-lines p { margin: 0 0 4px; }
.quote-ticket-inner footer { margin-top: auto; padding-top: 10mm; text-align: center; color: #60708a; font-size: 14px; }
.quote-preview-ticket { background: #faf6ee; border: 2px solid #263746; outline: 1px solid #71808b; outline-offset: -8px; padding: 22px; font-family: "Roboto Mono", Consolas, monospace; }
.quote-preview-ticket header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.quote-preview-ticket header img { width: 150px; height: 76px; object-fit: contain; object-position: left top; }
.quote-preview-ticket header > div { text-align: right; }
.quote-preview-ticket header strong, .quote-preview-ticket header small { display: block; }
.quote-preview-ticket header strong { font-size: 22px; }
.quote-preview-ticket header small { margin-top: 5px; color: #60708a; }
.quote-preview-ticket > p { margin: 24px 0 18px; }
.quote-preview-ticket pre { border: 0; background: transparent; padding: 0; font: 15px/1.55 "Roboto Mono", Consolas, monospace; white-space: pre-wrap; }
.quote-preview-ticket footer { margin-top: 24px; text-align: center; color: #60708a; }
.production-report-order { break-inside: avoid; page-break-inside: avoid; }
.detail-head button[onclick^="createAssistance"], .actions button[onclick^="createAssistance"] { background: #30353f; border-color: #30353f; color: white; }
.admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; padding: 12px; }
.admin-payment, .admin-advanced { grid-column: 1/-1; }
.admin-advanced > summary { cursor: pointer; font-size: 15px; color: #123b63; margin-bottom: 12px; }
.purchase-selector { display: grid; grid-template-columns: minmax(260px,1fr) auto; gap: 8px; align-items: end; margin-bottom: 12px; }
.backup-list { display: grid; gap: 6px; margin-top: 10px; }
.backup-list > div { border: 1px solid var(--line); border-radius: 5px; padding: 7px 9px; background: #f8fafc; }
.backup-list span, .backup-list small { display: block; }
.backup-list small { color: var(--muted); margin-top: 2px; }

@media (max-width: 1100px) {
  .workspace { height: calc(100vh - 64px); }
  .list-pane { height: 100%; }
  .work-pane { width: 100vw; }
  .dashboard-top, .dashboard-grid, .report-grid, .kpis, .report-kpis, .report-charts { grid-template-columns: 1fr; }
  .calculator-layout { grid-template-columns: 1fr; }
  .calculator-preview { position: static; }
  .wide-section { grid-column: auto; }
}

@media (max-width: 720px) {
  .calc-product, .calc-item-values, .calc-final-fields, .calc-variations { grid-template-columns: 1fr; }
  .calc-product select, .calc-product input { grid-column: 1; }
  .installments, .rate-grid { grid-template-columns: repeat(3, minmax(58px, 1fr)); }
  .attachment-upload, .catalog-add-row, .admin-grid { grid-template-columns: 1fr; }
  .admin-payment, .admin-advanced { grid-column: auto; }
  .item-main-row, .item-traits-row, .item-detail-row, .copy-link, .compact-add, .grid.four { grid-template-columns: 1fr; }
}

@media print {
  .topbar, .toolbar, .filters, .list-pane, .tabs, .actions, .fixed-actions, .notice { display: none !important; }
  body { background: white; }
  .workspace { display: block; height: auto; padding: 0; }
  .work-pane { border: 0; overflow: visible; }
  .detail-head { position: static; border-bottom: 2px solid #111; }
  .detail-body { padding: 0; }
  .section { border: 0; padding: 0; }
  .print-page { width: auto; min-height: auto; margin: 0; }
}
/* ARPE_STYLE:v34.css */
/* V34: leitura, alinhamento e espaco operacional. */
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1.2;
  min-height: 42px;
}
.table th, .table td { vertical-align: middle; }
.actions-cell { vertical-align: middle !important; white-space: normal; }
.actions-cell button { margin: 2px 5px 2px 0; }
input, select, textarea { font-size: 15px; }
input:not([type="checkbox"]):not([type="radio"]) { min-height: 42px; }
select { min-height: 42px; }
.filters select, .filters input, .filters button, .tabs button, nav button { font-size: 15px; }
.calculator-form select, .calculator-form input, .calculator-form textarea { font-size: 16px; min-height: 44px; }
.calculator-form label { font-size: 12px; }
.pill { min-width: 132px; min-height: 34px; padding: 8px 13px; font-size: 13px; }
.inline-finance-editor { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 0 14px 14px; }
.inline-finance-editor > summary { cursor: pointer; padding: 14px 0; color: #0f2f57; font-size: 15px; }
.inline-finance-editor .section { border-left: 0; border-right: 0; border-radius: 0; }

.shipments-editor { display: grid; gap: 14px; }
.shipment-editor { border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; padding: 14px; }
.shipment-heading { display: grid; grid-template-columns: minmax(260px,1fr) auto; gap: 10px; align-items: end; }
.shipment-items { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; padding: 12px 0; border-top: 1px solid #e7edf5; border-bottom: 1px solid #e7edf5; }
.shipment-items > strong { grid-column: 1/-1; color: #0f2f57; }
.shipment-item-choice { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); text-transform: none; font-size: 14px; }
.shipment-item-choice input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; }
.shipment-stage-buttons { display: flex; gap: 7px; flex-wrap: wrap; padding: 12px 0; }
.shipment-stage-buttons button.active { background: var(--primary); border-color: var(--primary); color: white; }
.shipment-fields { display: grid; grid-template-columns: repeat(3,minmax(180px,1fr)); gap: 10px 12px; }
.shipment-fields label { min-width: 0; }
.shipment-notes { grid-column: 1/-1; }

.commissions-clean .table { min-width: 1050px; }
.commissions-clean .table th, .commissions-clean .table td { vertical-align: middle; }
.commissions-clean small { display: block; margin-top: 4px; }
.commission-balance { color: #8a3f00 !important; }
.commission-paid-input { width: 120px; margin-bottom: 6px; }
.commission-global-rate { display: grid; grid-template-columns: 150px auto; gap: 6px; align-items: end; width: 250px; }
.commission-global-rate input { grid-column: 1; margin: 0; }
.commission-global-rate button { grid-column: 2; grid-row: 2; }
.report-range { align-self: center; color: var(--muted); font-size: 13px; padding: 8px 10px; }
.admin-data-repair { grid-column: 1/-1; }

.production-detail-row { grid-template-columns: minmax(300px,1.5fr) minmax(180px,.65fr) minmax(260px,1fr); }
.production-item-editor .item-product input { font-size: 16px; }
.production-item-editor .item-traits-row select { min-width: 0; }
.sales-items tfoot th, .sales-items tfoot td { border-top: 1px solid #9aa7b8; padding: 7px; }
.sales-items tfoot th { text-align: right; }
.sales-items .sales-total-row { font-size: 12px; background: #eef6ff; }

@media (max-width: 900px) {
  .shipment-fields, .shipment-items, .production-detail-row { grid-template-columns: 1fr; }
  .shipment-items > strong, .shipment-notes { grid-column: 1; }
}
/* ARPE_STYLE:v35.css */
.panel-metrics-v35 { display:grid; grid-template-columns:repeat(7,minmax(130px,1fr)); gap:12px; padding:12px; background:#f6f8fb; border-bottom:1px solid var(--line); overflow-x:auto; }
.panel-metric-v35 { min-height:78px; border:0; border-radius:6px; padding:12px 14px; color:white; text-align:left; box-shadow:none; }
.panel-metric-v35 small { display:block; margin-bottom:7px; color:inherit; font-size:11px; text-transform:uppercase; }
.panel-metric-v35 span { display:block; font-size:24px; line-height:1; font-weight:400; white-space:nowrap; }
.panel-metric-v35.production { background:#23436b; }
.panel-metric-v35.assistance { background:#30353a; }
.panel-metric-v35.late { background:#d92d32; animation:none; }
.panel-metric-v35.today { background:#f47b00; }
.panel-metric-v35.week { background:#2878c8; }
.panel-metric-v35.priority { background:#d92545; }
.panel-metric-v35.receivable { background:#6f209c; }
button.panel-metric-v35:hover { filter:brightness(1.08); color:white; }

.type-pill-v35 { display:inline-flex; min-width:55px; min-height:30px; align-items:center; justify-content:center; border-radius:5px; padding:5px 9px; color:white; font-size:12px; }
.type-pill-v35.prod { background:#2d79df; }
.type-pill-v35.assist { background:#e0b900; color:#1c1c1c; }
.priority-star-v35 { display:inline-block; margin-right:5px; color:#d7193f; font-size:18px; vertical-align:middle; }
.observation-flag-v35 { display:block; width:max-content; margin-top:6px; border-radius:4px; background:#ffe08a; color:#4a3600; padding:4px 7px; font-size:10px; }
.production-row-v35 td { vertical-align:middle; }
.production-row-v35.assistance-row-v35 td { background:#fffdf2; }
.production-kind-v35 { margin-right:6px; }
.production-traits-v35 { grid-template-columns:repeat(3,minmax(200px,1fr)); }
.production-traits-v35 .trait-empty { grid-column:1/-1; margin:5px 0; }

.shipments-editor[data-split="0"] .shipment-editor { border-left:4px solid #2878c8; }
.shipments-editor[data-split="1"] .shipment-editor { border-left:4px solid #f47b00; }
.shipment-stage-buttons button { min-width:125px; }
.shipment-fields { grid-template-columns:repeat(3,minmax(210px,1fr)); }

.admin-safety-v35 { grid-column:1/-1; }
.safety-counts-v35 { display:grid; grid-template-columns:repeat(3,minmax(130px,1fr)); gap:8px; margin-bottom:12px; }
.safety-counts-v35 span { border:1px solid var(--line); border-radius:6px; padding:10px; background:#fbfcfe; }
.safety-counts-v35 b { display:block; margin-bottom:2px; color:#123b63; font-size:22px; font-weight:400; }
.success-line-v35 { border-left:4px solid var(--success); padding:9px 11px; background:#effaf4; }
.sanity-result-v35 { margin-top:12px; border:1px solid var(--line); border-radius:6px; padding:12px; }
.sanity-result-v35.approved { border-color:#8ed0ac; background:#effaf4; }
.sanity-result-v35.blocked { border-color:#e7a0a0; background:#fff4f4; }
.sanity-result-v35 h4 { margin:0 0 8px; }
.sanity-result-v35 ul { margin:0; padding-left:20px; }
.report-empty-warning { margin:12px; border:1px solid #e7c15e; border-radius:6px; background:#fff9e8; padding:12px; }
.report-period-summary-v35 { grid-column:1/-1; border-left:4px solid #2878c8; background:#f2f7fd; padding:10px 12px; }
.report-period-summary-v35 strong { margin-right:4px; font-size:20px; font-weight:400; }
.missing-data-v35 { background:#fff5c7; color:#624f00; }
.client-audit-hint-v35 { align-self:center; color:#6f5a00; font-size:12px; }

@media (max-width:1100px){.panel-metrics-v35{grid-template-columns:repeat(7,150px)}.production-traits-v35,.shipment-fields{grid-template-columns:1fr 1fr}}
@media (max-width:720px){.production-traits-v35,.shipment-fields,.safety-counts-v35{grid-template-columns:1fr}}
/* ARPE_STYLE:layout-v36.css */
:root {
  --ink:#202432;
  --muted:#6f7480;
  --line:#d9dee7;
  --soft:#f7f8fa;
  --panel:#ffffff;
  --primary:#203a5f;
  --primary-2:#2f80ed;
  --danger:#d32f2f;
  --warning:#f57c00;
  --success:#2e7d32;
  --assist:#2f3437;
  --note:#fff1a8;
  --shadow:0 18px 50px rgba(18,24,38,.18);
  --radius:6px;
}

body { font-family:Aptos,"Segoe UI Variable","Segoe UI",Roboto,Arial,sans-serif; background:var(--soft); color:var(--ink); font-size:14px; letter-spacing:0; }
.app:not(.hidden) { display:flex; flex-direction:column; height:100vh; overflow:hidden; }

.topbar { position:relative; top:auto; z-index:30; flex:0 0 64px; height:64px; padding:0 18px; gap:14px; background:var(--primary); color:#fff; border:0; box-shadow:none; }
.brand { min-width:205px; color:#fff; line-height:1.1; }
.brand h1 { margin:0; color:#fff; font-size:17px; font-weight:650; white-space:nowrap; }
.brand small { margin-top:5px; color:rgba(255,255,255,.68); font-size:9px; font-weight:400; }
.brand img { display:none; }
nav { min-width:0; gap:6px; scrollbar-width:thin; }
nav button { min-height:34px; padding:7px 13px; border:1px solid rgba(255,255,255,.35); border-radius:6px; background:transparent; color:#fff; font-size:12.5px; box-shadow:none; }
nav button:hover, nav button.active { background:#fff; border-color:#fff; color:var(--primary); }
.environment-badge { flex:0 0 auto; border-color:rgba(255,255,255,.4); background:rgba(255,255,255,.12); color:#fff; }
.environment-badge.production { border-color:rgba(255,255,255,.4); background:rgba(255,255,255,.15); color:#fff; }
body.sandbox-mode .topbar { border-top:4px solid #e4a11b; }
.sync { flex:0 0 27px; min-height:27px; display:flex; align-items:center; padding:4px 20px; border:0; border-bottom:1px solid #1b5e20; background:#2e7d32; color:#fff; font-size:11px; }
.sync::before { content:""; width:6px; height:6px; margin-right:7px; border-radius:50%; background:#fff; }
.sync.sync-busy { background:#455a64; border-bottom-color:#37474f; }
.sync.sync-error { background:#d32f2f; border-bottom-color:#b71c1c; }

.workspace { flex:1 1 auto; min-height:0; height:auto; padding:16px; background:var(--soft); }
.list-pane { border:1px solid var(--line); border-radius:8px; box-shadow:0 1px 4px rgba(18,24,38,.05); }
.toolbar { min-height:58px; padding:10px 12px; background:#fff; }
.toolbar button { min-height:38px; }
.search { max-width:420px; }
.search input { min-height:38px; font-size:13px; }
.filters { min-height:54px; padding:8px 12px; gap:8px; background:#fff; border-bottom:1px solid var(--line); z-index:5; }
.filter-row { gap:8px; }
.filter-field { min-width:132px; }
.filter-field select, .filters select, .filters input { min-height:36px; font-size:13px; }
.list { background:#fff; z-index:1; }

button { min-height:36px; padding:8px 14px; border:1px solid #c4cbd8; border-radius:5px; background:#fff; color:#4d5360; font-size:13px; font-weight:600; box-shadow:none; }
button:hover { background:#f2f4f7; border-color:#aeb7c4; }
button.primary { background:var(--primary); border-color:var(--primary); color:#fff; }
button.primary:hover { background:#162b47; border-color:#162b47; }
button.danger { border-color:#ebcaca; background:#fff; color:#a33a3a; }
button.link { color:var(--primary); font-weight:650; }

.table th, .table td { padding:10px 11px; border-bottom:1px solid #eef0f4; vertical-align:middle; }
.table th { background:#f1f3f7; color:var(--muted); font-size:10.5px; font-weight:650; letter-spacing:.02em; }
.table tr:hover td, .table tr.active td { background:#f7f8fa; }
.table small { font-size:11px; }
.actions-cell button, .table button { min-height:29px; padding:5px 9px; font-size:11.5px; }
.pill { min-height:26px; padding:5px 10px; border-radius:6px; font-size:11.5px; }
.late { background:#d32f2f; }
.soon { background:#f59e0b; }
.ok { background:#2e7d32; }

.panel-metrics-v35 { gap:12px; padding:12px; background:#f6f7f9; }
.panel-metric-v35 { min-height:74px; display:flex!important; flex-direction:column; align-items:flex-start; justify-content:center; border-radius:7px; padding:12px 14px; }
.panel-metric-v35 small { display:block!important; width:100%; margin:0 0 7px; font-size:10.5px; line-height:1.1; }
.panel-metric-v35 span { display:block!important; width:100%; font-size:24px; line-height:1; }
.panel-metric-v35.production { background:#203a5f; }
.panel-metric-v35.assistance { background:#2f3437; }
.panel-metric-v35.late { background:#d32f2f; }
.panel-metric-v35.today { background:#f57c00; }
.panel-metric-v35.week { background:#1976d2; }
.panel-metric-v35.priority { background:#d7263d; }
.panel-metric-v35.receivable { background:#6a1b9a; }
.metrics-expedition-v37,.metrics-orders-v37,.metrics-clients-v37,.metrics-assistance-v37 { grid-template-columns:repeat(6,minmax(150px,1fr)); }
.type-pill-v35 { border-radius:5px; min-height:28px; font-size:11px; }
.type-pill-v35.prod { background:#2f80ed; }
.type-pill-v35.assist { background:#2f3437; color:#fff; }
.priority-star-v35 { color:#d7263d; }
.observation-flag-v35 { background:#fff1a8; color:#654b00; }

.work-pane { top:91px; width:min(880px,calc(100vw - 34px)); height:calc(100vh - 91px); border-color:var(--line); box-shadow:var(--shadow); }
.drawer-close { border-radius:5px; background:#fff; }
.detail-head { padding:16px 58px 14px 18px; }
.detail-head h2 { color:var(--primary); font-size:25px; font-weight:650; }
.detail-head p { font-size:13px; }
.tabs { padding:9px 18px; gap:6px; }
.tabs button { min-height:34px; padding:7px 11px; font-size:12.5px; }
.tabs button.active { background:var(--primary); border-color:var(--primary); }
.detail-body { padding:18px; }
.work-pane { font-size:14.5px; }
.work-pane label { font-size:11.5px; }
.work-pane input, .work-pane select, .work-pane textarea, .work-pane button { font-size:14px; }
.section, .summary-box { border-radius:7px; padding:14px; }
.section h3, .summary-box h3 { color:var(--primary); font-size:13px; font-weight:700; }
.summary-main { border-left-color:#2f80ed; }
.summary-line { border-radius:6px; background:#fafbfc; }
.summary-line span { font-weight:600; }
.summary-line strong { font-weight:600; }
.summary-title { color:var(--primary); font-weight:650; }
.flow-step { border-radius:6px; font-weight:600; }
.ready-panel { border-radius:7px; }

.kpis { gap:10px; }
.kpi { border-radius:7px; padding:13px; }
.kpi strong { color:var(--primary); font-weight:600; }
.report-card, .report-kpi { border-radius:7px; }
.report-card-title, .report-kpi strong { color:var(--primary); }
.bar-list em { background:#2f80ed; }
.bar-list > div:nth-child(3n+2) em { background:#2e7d32; }
.bar-list > div:nth-child(3n+3) em { background:#f57c00; }

.login-screen { background:var(--soft); }
.login-box { width:340px; border-radius:10px; padding:34px; box-shadow:none; }
.login-logo { width:190px; margin:0 auto 16px; }
.login-box h1 { color:var(--primary); text-align:center; font-size:21px; font-weight:650; }
.login-box p { text-align:center; }

@media (max-width:1050px) {
  .topbar { gap:9px; padding:0 12px; }
  .brand { min-width:170px; }
  .brand h1 { font-size:15px; }
  nav button { padding:7px 10px; }
  .environment-badge { display:none; }
}

@media (max-width:720px) {
  .app:not(.hidden) { height:auto; min-height:100vh; overflow:visible; }
  .topbar { height:auto; min-height:104px; flex:0 0 auto; padding:10px 12px 8px; flex-wrap:wrap; }
  .brand { width:100%; }
  nav { order:3; flex-basis:100%; }
  .sync { position:sticky; top:0; z-index:29; }
  .workspace { min-height:calc(100vh - 132px); padding:8px; }
  .toolbar { flex-wrap:wrap; }
  .search { flex-basis:100%; max-width:none; }
  .filters { align-items:stretch; }
  .filter-field { flex:1 1 145px; }
  .work-pane { top:0; width:100vw; height:100vh; }
  .panel-metrics-v35 { grid-template-columns:repeat(7,138px); }
  .detail-head h2 { font-size:22px; }
}
/* ARPE_STYLE:v38.css */
.summary-heading-v38{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.summary-heading-v38 h3{margin:0}.priority-toggle-v38{min-width:154px}.priority-toggle-v38.active{background:#20242a;color:#fff;border-color:#20242a}.priority-indicator-v38{padding:7px 10px;border:1px solid #cbd3df;border-radius:5px;color:#596273}.priority-indicator-v38.active{background:#20242a;color:#fff;border-color:#20242a}.freight-responsibility-v38{margin-top:14px;padding-top:14px;border-top:1px solid #dce2ea}
.commission-sale-v38,.commission-list-v38{padding:22px;margin-bottom:16px;border:1px solid #d9dfe8;border-radius:7px;background:#fff}.commission-sale-v38 h3,.commission-list-v38 h3{margin:0 0 16px;font-weight:500}.commission-form-v38{display:grid;grid-template-columns:1fr 1.05fr 2fr 1.45fr 1.45fr auto;align-items:end;gap:10px}.commission-form-v38 label,.commission-rate-v38{display:grid;gap:6px}.commission-form-v38 .primary{grid-column:1/2;width:max-content}.checkbox-line-v38{display:flex!important;align-items:center;gap:8px;min-height:42px}.checkbox-line-v38 input{width:auto}.commission-period-v38{display:flex;align-items:center;gap:10px;margin:12px 0}.commission-period-v38 select{min-width:145px}.commission-period-v38 span{color:#697386;font-size:13px}.commission-table-wrap-v38{max-height:470px;overflow:auto;border:1px solid #e2e6ed;border-radius:6px}.commission-table-wrap-v38 table{margin:0}.commission-table-wrap-v38 th{position:sticky;top:0;z-index:2;background:#f5f7fa}.commission-value-v38{display:inline-block;padding:5px 9px;border-radius:6px;background:#e7f4d6;color:#3f7d20;white-space:nowrap}.commission-actions-v38{white-space:nowrap}.commission-actions-v38 button{margin-right:5px}.commission-summary-v38{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}.commission-summary-v38>div{padding:16px;background:#f3f5f7;border-radius:6px}.commission-summary-v38 small{display:block;margin-bottom:6px;color:#606978}.commission-summary-v38 strong{font-size:20px;font-weight:500}.commission-rate-v38{grid-template-columns:auto 90px auto;align-items:center}.commission-rate-v38 input{min-width:0}
.sales-order-head-v38{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;padding-bottom:14px;border-bottom:2px solid #283b58}.sales-order-head-v38>div:first-child{display:flex;align-items:flex-start;gap:18px}.sales-order-head-v38>div:last-child{text-align:right}.sales-order-head-v38>div:last-child span{display:block;font-size:12px;letter-spacing:.08em}.sales-order-head-v38>div:last-child strong{display:block;font-size:34px;font-weight:600}.company-data-v38{display:grid;gap:2px;font-size:10px;line-height:1.35}.company-data-v38 strong{font-size:11px}.freight-notice-v38{padding:14px 16px;border:1px solid #c9d3df;background:#f5f7fa}.freight-notice-v38 p{margin:5px 0}.freight-notice-v38>div{display:flex;gap:26px;margin-top:10px}.assistance-order-v38 .production-head{border-color:#20242a}.assistance-main-v38 .production-qty{background:#20242a}.report-type-v38{display:inline-block;min-width:54px;padding:5px 7px;border-radius:4px;text-align:center;color:#fff;font-size:10px}.report-type-v38.prod{background:#287bd1}.report-type-v38.assist{background:#20242a}.priority-report-v38{border-left:4px solid #d2233c}
@media(max-width:1100px){.commission-form-v38{grid-template-columns:repeat(2,minmax(0,1fr))}.commission-form-v38 .primary{grid-column:auto}.commission-period-v38{flex-wrap:wrap}}@media print{.sales-order-v38 .print-logo{width:115px;height:auto}.company-data-v38{color:#222}.freight-notice-v38{break-inside:avoid}.production-report-order{break-inside:avoid;page-break-inside:avoid}}
/* ARPE_STYLE:v39.css */
.balance-panel-v39{margin:0 0 14px;border:1px solid #dce2ea;border-left:5px solid #7020a8;border-radius:7px;background:#fff;overflow:hidden;box-shadow:0 1px 4px rgba(18,24,38,.05)}.balance-panel-v39>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;background:#f7f8fa;cursor:pointer;list-style:none}.balance-panel-v39>summary::-webkit-details-marker{display:none}.balance-panel-v39>summary div{display:grid;gap:3px}.balance-panel-v39>summary small{font-size:11px;color:#687386}.balance-panel-v39>summary strong{font-size:20px;font-weight:500;color:#202938}.balance-panel-v39>summary strong span{font-size:12px;font-weight:400;color:#687386}.balance-panel-v39>summary em{font-size:11px;font-style:normal;color:#687386}.balance-table-v39{overflow-x:auto;border-top:1px solid #dce2ea}.balance-table-v39 .table-wrap{border:0;border-radius:0;margin:0}.balance-table-v39 table{min-width:900px}.balance-value-v39{color:#7020a8;white-space:nowrap}.muted-pill-v39{display:inline-block;padding:7px 9px;border-radius:5px;background:#eef1f5;color:#697386}.balance-table-v39 .deadline-pill{display:block;width:max-content;margin-top:5px}
/* ARPE_STYLE:v40.css */
.print-actions-v40 th:last-child,.print-action-v40{width:92px;text-align:right;white-space:nowrap}.print-action-v40 button{min-width:76px}.production-item-editor [data-item="qty"],.items-table [data-item="qty"]{font-variant-numeric:tabular-nums}
.company-data-v40{display:grid;gap:2px;margin:8px 0 14px;padding:9px 12px;background:#f4f6f8;font-size:10px;line-height:1.35}.company-data-v40 strong{font-size:11px}
/* ARPE_STYLE:v42.css */
.environment-badge.environment-warning {
  display: inline-flex !important;
  border-color: #ffb4ab;
  background: #8f1d18;
  color: #fff;
  font-weight: 600;
}
/* ARPE_STYLE:cutover-v57.css */
.admin-cutover-v57 {
  border-left: 4px solid #234269;
}

.cutover-state-v57 {
  display: inline-flex;
  margin: 8px 0 14px;
  padding: 7px 12px;
  border: 1px solid #8da0b8;
  border-radius: 4px;
  font-size: 13px;
}

.cutover-state-v57.sandbox {
  background: #fff4cc;
  color: #5d4700;
}

.cutover-state-v57.production {
  background: #d9f2df;
  color: #174a28;
}

.cutover-result-v57 details {
  margin: 14px 0;
}

.cutover-result-v57 summary {
  cursor: pointer;
  padding: 8px 0;
}

.cutover-ready-v57,
.cutover-success-v57 {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bcc8d6;
  border-radius: 4px;
  background: #f7f9fc;
}

.cutover-success-v57 ol {
  margin: 10px 0 0 20px;
}
/* ARPE_STYLE:experience-v65.css */
/* Arpe Gestao V65 - simplificacao visual por perfil. */
.topbar { align-items: stretch; height: auto; min-height: 86px; flex: 0 0 auto; }
.topbar .brand { display: flex; flex-direction: column; justify-content: center; min-width: 220px; }
.topbar .environment-badge { align-self: center; }
.topbar .role-navigation { display: grid; gap: 0; flex: 1; min-width: 0; padding: 0; overflow: visible; }
.nav-primary,
.nav-secondary { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.nav-primary { min-height: 42px; padding: 5px 8px 3px; }
.nav-secondary { min-height: 34px; padding: 3px 8px 5px; border-top: 1px solid rgba(255,255,255,.16); }
.nav-primary button,
.nav-secondary button { flex: 0 0 auto; min-height: 30px; border: 0; border-radius: 4px; padding: 6px 12px; background: transparent; color: inherit; font-size: 14px; }
.nav-primary button.active { background: rgba(255,255,255,.18); }
.nav-secondary button { min-height: 26px; padding: 4px 10px; font-size: 13px; opacity: .78; }
.nav-secondary button.active { background: #fff; color: #17345f; opacity: 1; }
.nav-secondary > span { padding-left: 10px; font-size: 12px; opacity: .7; }

.toolbar { min-height: 50px; }
.toolbar .search { order: -10; }
.today-heading { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 18px; padding: 3px 0; }
.today-heading h2 { margin: 0 0 3px; font-size: 21px; font-weight: 500; }
.today-heading p { margin: 0; color: #667085; }
.today-queue tr { cursor: pointer; }
.today-queue tr:hover { background: #f4f7fb; }
.work-area { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 4px; background: #e7eef8; color: #1f4677; font-size: 12px; }
.work-area.financeiro { background: #eee6f7; color: #69329a; }
.work-area.vendas { background: #e5f4ed; color: #166347; }
.work-area.producao { background: #e1efff; color: #14599c; }
.work-area.expedicao { background: #f1ece5; color: #72532d; }
.work-area.assistencia { background: #f7e8d5; color: #804c0c; }

.detail-head { gap: 20px; }
.detail-head > div:first-child { min-width: 180px; }
.drawer-main-actions { align-items: center; justify-content: flex-end; }
.more-actions { position: relative; }
.more-actions > summary { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 13px; border: 1px solid #cfd8e6; border-radius: 5px; background: #fff; color: #26384f; cursor: pointer; list-style: none; }
.more-actions > summary::-webkit-details-marker { display: none; }
.more-actions > summary::after { content: '▾'; margin-left: 8px; font-size: 11px; }
.more-actions[open] > summary { border-color: #2e64a5; box-shadow: 0 0 0 2px rgba(46,100,165,.12); }
.more-actions-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 80; display: grid; width: min(300px, 80vw); max-height: 65vh; overflow-y: auto; padding: 7px; border: 1px solid #cfd8e6; border-radius: 6px; background: #fff; box-shadow: 0 16px 36px rgba(28,39,55,.18); }
.more-actions-menu button { width: 100%; min-height: 36px; border: 0; border-radius: 4px; background: transparent; text-align: left; }
.more-actions-menu button:hover { background: #eef3f9; }
.more-actions-menu button.danger { color: #a92727; }

.flow-actions,
.summary-actions { display: none !important; }
.tabs { position: sticky; top: 0; z-index: 25; background: #d3e0f2; border-bottom: 2px solid #9db8dd; }
.tabs button { min-height: 36px; padding: 7px 12px; }
.detail-body { font-size: 15px; }
.detail-body input,
.detail-body select,
.detail-body textarea,
.detail-body button { font-size: 14px; }

@media (max-width: 900px) {
  .topbar { display: block; }
  .topbar .brand { min-width: 0; }
  .topbar .role-navigation { width: 100%; }
  .nav-primary,
  .nav-secondary { padding-left: 6px; padding-right: 6px; }
  .today-heading { align-items: flex-start; }
  .detail-head { padding-right: 46px; }
  .drawer-main-actions { width: 100%; justify-content: flex-start; }
  .more-actions-menu { left: 0; right: auto; }
}

@media print {
  .more-actions,
  .nav-primary,
  .nav-secondary { display: none !important; }
}
/* ARPE_STYLE:governance-v66.css */
/* Arpe Gestao V66 - governanca do pedido. */
.governance-panel-v66 { border-left: 4px solid #2b5f91; }
.governance-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.governance-title h3 { margin-bottom: 3px; }
.governance-title p,
.governance-title > span { margin: 0; color: #667085; font-size: 13px; }
.governance-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #d9e1ec; border-radius: 6px; overflow: visible; }
.governance-grid article { min-width: 0; padding: 14px; background: #fff; }
.governance-grid article + article { border-left: 1px solid #d9e1ec; }
.governance-grid article header { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; margin-bottom: 12px; }
.governance-grid article header > span { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #e8eef6; color: #24466c; }
.governance-grid article header small { display: block; color: #667085; font-size: 10px; }
.governance-grid article header strong { display: block; margin-top: 2px; font-weight: 500; }
.governance-grid article p { color: #596579; line-height: 1.45; }
.governance-form { display: grid; gap: 9px; }
.governance-form label { min-width: 0; }
.governance-form button { justify-self: start; }
.governance-exception,
.governance-blocked-v66 { display: inline-flex; min-height: 28px; align-items: center; padding: 5px 8px; border-radius: 4px; background: #fff0d9; color: #864d00; font-size: 12px; }
.revision-list-v66 { margin-top: 14px; }
.revision-list-v66 > summary { cursor: pointer; color: #24466c; }
.revision-list-v66 .table-wrap { margin-top: 10px; }
.revision-reason-v66 { border-left: 4px solid #db8a18; }
.revision-reason-v66 textarea { min-height: 72px; }

@media (max-width: 1050px) {
  .governance-grid { grid-template-columns: 1fr; }
  .governance-grid article + article { border-left: 0; border-top: 1px solid #d9e1ec; }
}

@media (max-width: 650px) {
  .governance-title { display: block; }
  .governance-title > span { display: block; margin-top: 6px; }
  .governance-grid article header { grid-template-columns: 28px minmax(0, 1fr); }
  .governance-grid article header .pill { grid-column: 2; justify-self: start; }
}

/* Pagina unica do pedido: secoes recolhiveis por assunto (V66 fase 3). */
.order-single-v66 .order-section-v66 {
  border: 1px solid var(--line, #e2e5ea);
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--card, #fff);
}
.order-single-v66 .order-section-v66 > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
  background: #d3e0f2;
  color: #1e3a5f;
  border-radius: 7px 7px 0 0;
}
.order-single-v66 .order-section-v66:not([open]) > summary { border-radius: 7px; }
.order-single-v66 .order-section-v66 > summary::-webkit-details-marker { display: none; }
.order-single-v66 .order-section-v66 > summary::before {
  content: '\25B8';
  font-size: 12px;
  transition: transform .15s ease;
  opacity: .65;
}
.order-single-v66 .order-section-v66[open] > summary::before { transform: rotate(90deg); }
.order-single-v66 .order-section-v66[open] > summary { border-bottom: 1px solid var(--line, #e2e5ea); }
.order-single-v66 .order-section-body-v66 { padding: 4px 14px 14px; }
/* as secoes ja sao a moldura: a moldura interna de cada bloco vira ruido */
.order-single-v66 .order-section-body-v66 > .section {
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  background: transparent;
}
.order-single-v66 .order-section-body-v66 > .section > h3 { display: none; }
.order-production-v66 { width: 100%; border-collapse: collapse; font-size: 13px; }
.order-production-v66 th,
.order-production-v66 td { padding: 6px 8px; border-bottom: 1px solid var(--line, #e2e5ea); text-align: left; vertical-align: middle; }
.order-production-v66 th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.order-production-v66 td:first-child { width: 48px; }
.order-production-v66 select,
.order-production-v66 input { width: 100%; }
/* ARPE_STYLE:production-pilot-v67.css */
/* Arpe Gestao V67 - piloto industrial. */
.pilot-section-v67 { border-left: 4px solid #2877c7; }
.pilot-heading-v67 { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.pilot-heading-v67 h3,
.pilot-heading-v67 p { margin: 0; }
.pilot-heading-v67 p,
.pilot-heading-v67 > span { color: #667085; font-size: 13px; }
.pilot-item-v67 { padding: 14px 0; border-top: 1px solid #dce3ec; }
.pilot-item-v67 > h4 { margin: 0 0 10px; color: #233d60; font-weight: 500; }
.pilot-create-v67 { display: flex; gap: 8px; align-items: center; }
.pilot-create-v67 select { width: min(420px, 100%); }
.pilot-work-order-v67 { padding: 13px; border: 1px solid #d7e0eb; border-radius: 6px; background: #fbfcfe; }
.pilot-work-order-v67 > header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.pilot-work-order-v67 h4,
.pilot-work-order-v67 p { margin: 0; }
.pilot-work-order-v67 header small { color: #2877c7; }
.pilot-work-order-v67 .progress { height: 7px; margin: 8px 0 12px; border-radius: 4px; overflow: hidden; background: #e4eaf2; }
.pilot-work-order-v67 .progress i { display: block; height: 100%; background: #2877c7; }
.pilot-progress-v67 { min-width: 80px; text-align: right; }
.pilot-progress-v67 strong,
.pilot-progress-v67 span { display: block; font-weight: 500; }
.pilot-progress-v67 span { color: #667085; font-size: 12px; }
.pilot-work-order-v67 tr.not-applicable { opacity: .55; }

.pilot-filters-v67 { display: flex; align-items: flex-end; gap: 8px; width: 100%; overflow-x: auto; padding-bottom: 4px; }
.pilot-filters-v67 label { flex: 0 0 auto; min-width: 150px; }
.pilot-filters-v67 label:first-of-type { min-width: 145px; }
.pilot-filters-v67 button { flex: 0 0 auto; }
.task-product-v67 { min-width: 220px; max-width: 360px; white-space: normal; }
[data-task-v67] input[type="date"] { min-width: 142px; }
[data-task-v67] select { min-width: 150px; }
[data-task-v67] input[data-task-qty] { min-width: 80px; }
[data-task-v67] input[data-task-blocked] { display: block; min-width: 180px; margin-top: 6px; }
.task-actions-v67 { display: flex; gap: 5px; min-width: 235px; flex-wrap: wrap; }
.task-actions-v67 button { min-height: 30px; padding: 5px 9px; }
.pilot-admin-v67 input[type="number"] { width: 120px; }

@media (max-width: 760px) {
  .pilot-heading-v67,
  .pilot-work-order-v67 > header { display: block; }
  .pilot-heading-v67 > span,
  .pilot-progress-v67 { display: block; margin-top: 6px; text-align: left; }
  .pilot-create-v67 { align-items: stretch; flex-direction: column; }
}

@media print {
  .pilot-filters-v67,
  .task-actions-v67 { display: none !important; }
}
/* ARPE_STYLE:expedition-quality-v68.css */
.expedition-v68 .section-title-row { align-items: flex-start; }
.shipment-balance-v68 { background: #edf6ff; border-left: 4px solid #2478c9; padding: 14px 16px; margin-bottom: 16px; }
.shipment-balance-v68 h4 { margin: 0 0 8px; }
.shipment-balance-v68 ul { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.shipment-balance-v68 li { display: flex; justify-content: space-between; gap: 14px; }
.shipment-card-v68 { border: 1px solid #cbd7e4; border-left: 5px solid #2478c9; padding: 14px; margin: 0 0 16px; background: #fff; }
.shipment-card-v68 header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.shipment-card-v68 header > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.shipment-card-v68 header input { min-width: 220px; font-size: 16px; }
.shipment-meta-v68 { display: grid; grid-template-columns: repeat(5,minmax(160px,1fr)); gap: 10px; margin-bottom: 12px; }
.shipment-meta-v68 label { display: grid; gap: 5px; }
.shipment-meta-v68 .wide { grid-column: span 2; }
.shipment-lines-v68 th:nth-child(1) { width: auto; }
.shipment-lines-v68 th:nth-child(2), .shipment-lines-v68 th:nth-child(3) { width: 130px; }
.shipment-lines-v68 input { min-width: 105px; }
.shipment-legacy-v68 { background: #fff3cd; border: 1px solid #e0b548; padding: 10px; margin-bottom: 12px; }
.shipment-actions-v68 { margin-top: 12px; }
.quality-v68 { border-left: 5px solid #30363d; }
.corrective-order-v68 { margin-top: 14px; }
.assistance-quality-print-v68 { border: 2px solid #30363d; padding: 12px 16px; break-inside: avoid; }
.assistance-quality-print-v68 ul { margin: 0; padding-left: 20px; }
.assistance-quality-print-v68 li { margin: 0 0 7px; }
@media (max-width: 980px) { .shipment-meta-v68 { grid-template-columns: repeat(2,minmax(150px,1fr)); } .shipment-meta-v68 .wide { grid-column: span 2; } }
/* ARPE_STYLE:supply-capacity-v69.css */
.supply-tabs-v69,.horizon-v69{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.horizon-v69{margin-left:auto}.supply-kpis-v69{margin-bottom:14px}.recipe-form-v69{grid-template-columns:repeat(4,minmax(170px,1fr))}.stock-move-v69{display:grid;grid-template-columns:90px minmax(150px,1fr) auto auto;gap:6px;align-items:center;min-width:430px}.stock-value-v69{font-size:17px;white-space:nowrap}.supply-unmapped-v69{border-left:5px solid #d97706}.capacity-rule-v69{border-left:5px solid #2478c9}.plan-material-v69{border-left:5px solid #d97706}.supply-all-clear-v69{color:#167044}.move-in-v69{color:#167044}.move-out-v69{color:#b42318}.supply-tabs-v69 button,.horizon-v69 button{min-height:38px}.supply-tabs-v69 button.active,.horizon-v69 button.active{background:#23466f;color:#fff;border-color:#23466f}@media(max-width:980px){.recipe-form-v69{grid-template-columns:repeat(2,minmax(150px,1fr))}.horizon-v69{margin-left:0}.stock-move-v69{grid-template-columns:90px minmax(130px,1fr);min-width:260px}}
/* ARPE_STYLE:external-integrations-v70.css */
.admin-integrations-v70 { grid-column: 1 / -1; }
.integration-summary-v70 { display:grid; grid-template-columns:repeat(4,minmax(140px,1fr)); gap:10px; margin-bottom:12px; }
.integration-summary-v70 span { padding:12px; border:1px solid #cbd5e1; background:#f8fafc; }
.integration-preview-v70 pre { max-height:320px; overflow:auto; padding:14px; background:#f1f5f9; border:1px solid #cbd5e1; font:13px/1.5 Consolas,monospace; white-space:pre-wrap; }
.integration-clear-v70 { margin:12px 0; padding:12px; border-left:4px solid #15803d; background:#f0fdf4; }
.integration-warnings-v70 { display:grid; gap:8px; margin:12px 0; }
.integration-warning-v70 { display:flex; gap:12px; align-items:flex-start; padding:11px 12px; border-left:4px solid #d97706; background:#fffbeb; }
.integration-warning-v70.critical { border-left-color:#dc2626; background:#fef2f2; }
.integration-warning-v70 strong { min-width:74px; font-size:11px; }
.integration-error-v70 { max-width:300px; white-space:normal; }
.integration-mapping-v70 { margin-top:16px; }
.integration-mapping-v70 summary,.invoice-link-v70 summary { cursor:pointer; padding:10px 0; }
.integration-document-form-v70 .wide { grid-column:span 2; }
@media (max-width:900px) { .integration-summary-v70 { grid-template-columns:repeat(2,minmax(0,1fr)); } .integration-document-form-v70 .wide { grid-column:1 / -1; } }
/* ARPE_STYLE:order-finance-v701.css */
.order-items-v701 { display: grid; gap: 12px; }
.order-item-editor-v701 { border: 1px solid var(--line); border-radius: 6px; padding: 14px; background: #fff; display: grid; gap: 12px; }
.item-head-v701 { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.item-head-v701 button { min-height: 34px; }
.item-main-v701 { display: grid; grid-template-columns: 110px minmax(300px, 1fr); gap: 12px; }
.item-traits-v701 { display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.item-details-v701 { width: 100%; }
.item-values-v701 { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.item-no-traits-v701 { margin: 0; padding: 10px 12px; background: #f5f7fa; border-radius: 4px; }

.payments-list-v701 { display: grid; gap: 10px; }
.payment-entry-v701 { display: grid; grid-template-columns: minmax(150px, 1.35fr) minmax(150px, 1fr) repeat(3, minmax(130px, 1fr)) auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 5px; }
.payment-entry-v701 button { margin-bottom: 1px; }
.payment-presets-v701 { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.finance-summary-v701 { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.finance-summary-v701 > div { padding: 11px 13px; background: #f2f5f8; border-radius: 5px; }
.finance-summary-v701 small, .finance-summary-v701 strong { display: block; }
.finance-summary-v701 strong { margin-top: 5px; font-size: 18px; font-weight: 500; }
.finance-summary-v701 .open { border-left: 4px solid #d32f2f; }
.finance-summary-v701 .settled { border-left: 4px solid #2e7d32; }

[data-freight-modes][hidden] { display: none !important; }
.freight-section-v701 .grid { align-items: end; }

.simple-shipment-v701 { display: grid; gap: 12px; }
.shipment-editor-v701 { display: grid; gap: 12px; }
.shipment-stage-v701 { display: flex; flex-wrap: wrap; gap: 8px; }
.shipment-stage-v701 button.active { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.split-enabled-head-v701 { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; padding: 11px 14px; border-left: 4px solid #ee7b00; background: #fff6e8; }

.governance-grid article header { display: grid !important; grid-template-columns: auto minmax(0, 1fr) !important; gap: 8px 10px !important; align-items: start !important; }
.governance-grid article header > .pill { grid-column: 2; justify-self: start; position: static !important; max-width: 100%; white-space: normal; }
.governance-grid article header > div { min-width: 0; }
.governance-grid article button { width: auto; max-width: 100%; white-space: normal; }

.freight-notice-v701 { margin-top: 14px; padding: 13px 15px; border: 1px solid #b9c5d1; }
.freight-notice-v701 h2 { margin-top: 0; }
.company-footer-v701 { margin-top: 18px; padding-top: 10px; border-top: 1px solid #8b9299; display: grid; gap: 3px; font-size: 10px; color: #343a40; }
.company-footer-v701 strong { font-size: 10px; }

@media (max-width: 980px) {
  .item-traits-v701, .item-values-v701, .finance-summary-v701 { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .payment-entry-v701 { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
}

@media (max-width: 620px) {
  .item-main-v701, .item-traits-v701, .item-values-v701, .finance-summary-v701, .payment-entry-v701 { grid-template-columns: 1fr; }
}

@media print {
  .company-footer-v701 { break-inside: avoid; page-break-inside: avoid; }
}
/* ARPE_STYLE:order-ops-v702.css */
/* Arpe V70.2: ajustes operacionais finais. */
.sort-control-v702 {
  min-width: 230px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 8px 8px 0;
}

.sort-control-v702 select {
  min-width: 230px;
}

.priority-star-v702 {
  color: #be123c;
  margin-right: 6px;
  font-size: 15px;
}

.obs-badge-v702 {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 5px 8px;
  background: #fff7d6;
  color: #664d03;
  border: 1px solid #e6c95c;
  white-space: nowrap;
}

.balance-box-v702 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 12px;
}

.balance-box-v702 > div {
  border: 1px solid #d7dee8;
  border-radius: 6px;
  padding: 10px;
  background: #f8fafc;
}

.balance-box-v702 small {
  display: block;
  color: #5f6b7a;
  margin-bottom: 4px;
}

.balance-box-v702 strong {
  font-size: 17px;
}

.freight-section-v702 .hint {
  margin-top: 0;
}

.attachment-v702 {
  display: grid;
  grid-template-rows: 120px auto auto;
  gap: 8px;
}

.attachment-thumb-v702,
.attachment-pdf-v702 {
  width: 100%;
  min-height: 120px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #ccd6e2;
  background: #f8fafc;
}

.attachment-thumb-v702 img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.attachment-pdf-v702 {
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #1f3d64;
}

.payment-status-print-v702 {
  display: inline-block;
  border: 1px solid #111827;
  border-radius: 4px;
  padding: 6px 10px;
  margin: 0 0 8px;
  letter-spacing: .03em;
}

.freight-notice-v702 {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 10px 0;
  background: #f8fafc;
}

.company-footer-v702 {
  margin-top: 18mm;
  border-top: 1px solid #111827;
  padding-top: 8px;
  font-size: 10px;
  line-height: 1.45;
  display: grid;
  gap: 2px;
}

.production-note-v702 {
  background: #fff8c9;
  border: 1px solid #e7cc58;
  padding: 10px;
  font-size: 15px;
}

.label-page-v702 {
  width: 100mm;
  min-height: 70mm;
  page-break-after: always;
  break-after: page;
  border: 1px solid #111827;
  padding: 8mm;
  box-sizing: border-box;
  color: #111827;
  background: white;
}

.label-head-v702 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #111827;
  padding-bottom: 5mm;
  margin-bottom: 5mm;
}

.label-head-v702 .print-logo {
  font-size: 24px;
}

.label-head-v702 strong {
  font-size: 26px;
}

.label-page-v702 h1 {
  font-size: 17px;
  margin: 0 0 5px;
}

.label-page-v702 p {
  margin: 3px 0;
  font-size: 12px;
}

.label-page-v702 ul {
  margin: 6px 0 0;
  padding-left: 16px;
  font-size: 11px;
}

.actions-cell button {
  margin: 2px;
}

@media print {
  .label-page-v702 {
    margin: 0;
  }
  .company-footer-v702 {
    break-inside: avoid;
  }
}
/* ARPE_STYLE:expedition-labels-v703.css */
/* Arpe V70.3 */
.shipment-editor-v703 .grid.three {
  align-items: end;
}

.pay-production-v703 {
  background: #15803d;
  border-color: #15803d;
  color: #fff;
}

.thermal-label-v703 {
  background: white;
}
/* ARPE_STYLE:fiscal-layer-v704.css */
/* Arpe V70.4 */
.fiscal-preview-v704 pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
}

.fiscal-total-grid-v704 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.fiscal-total-grid-v704 > div {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  background: #fff;
}

.fiscal-total-grid-v704 small {
  display: block;
  color: var(--muted);
  margin-bottom: 4px;
}

.integration-mapping-v70 {
  display: none !important;
}
