:root {
  --bg: #eef2ec;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --text: #17332a;
  --muted: #66756f;
  --line: rgba(23, 51, 42, 0.12);
  --green: #12703d;
  --green-deep: #0a4f2b;
  --yellow: #f6e48a;
  --yellow-soft: #fdf6cf;
  --blue: #0d6ea8;
  --blue-soft: #d9ecfa;
  --red: #ba2e2e;
  --red-soft: #ffe2df;
  --shadow: 0 18px 60px rgba(24, 49, 41, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --transition: 180ms ease;
}

html.theme-dark {
  --bg: #0b1020;
  --surface: rgba(15, 23, 42, 0.92);
  --surface-strong: #111827;
  --text: #e5e7eb;
  --muted: #aab4c3;
  --line: rgba(226, 232, 240, 0.14);
  --green: #22c55e;
  --green-deep: #86efac;
  --yellow: #facc15;
  --yellow-soft: rgba(250, 204, 21, 0.18);
  --blue: #60a5fa;
  --blue-soft: rgba(96, 165, 250, 0.14);
  --red: #fb7185;
  --red-soft: rgba(248, 113, 113, 0.16);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(18, 112, 61, 0.12), transparent 28%),
    linear-gradient(180deg, #f7faf5 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Aptos", "Segoe UI", "Trebuchet MS", "Verdana", sans-serif;
}

html.theme-dark body {
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.12), transparent 28%),
    linear-gradient(180deg, #0f172a 0%, var(--bg) 100%);
}

html.orc-embedded body {
  min-height: 100vh;
  background: transparent;
}

html.orc-embedded .brand-bar {
  display: none !important;
}

html.orc-embedded .app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 2px 8px;
  gap: 6px;
}

html.orc-embedded .quick-nav {
  top: 0;
  margin: 0;
  padding: 4px;
  gap: 5px;
  border-radius: 10px;
}

html.orc-embedded .section-heading {
  margin-top: 0;
  gap: 1px;
}

html.orc-embedded .quick-link {
  min-height: 29px;
  padding: 0 10px;
  font-size: 0.8rem;
  border-radius: 8px;
}

html.orc-embedded .section-block {
  gap: 6px;
}

html.orc-embedded .section-heading h2 {
  font-size: clamp(0.98rem, 1.25vw, 1.22rem);
}

html.orc-embedded .section-heading p {
  display: none;
}

html.orc-embedded .section-block .eyebrow {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.background-orb {
  position: fixed;
  border-radius: 999px;
  filter: blur(14px);
  opacity: 0.55;
  pointer-events: none;
}

.orb-a {
  top: -80px;
  right: -40px;
  width: 240px;
  height: 240px;
  background: rgba(18, 112, 61, 0.14);
}

.orb-b {
  bottom: 8%;
  left: -60px;
  width: 210px;
  height: 210px;
  background: rgba(13, 110, 168, 0.12);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1680px, calc(100% - 24px));
  margin: 16px auto 56px;
  display: grid;
  gap: 20px;
}

.hero-card,
.panel-card,
.formula-card,
.memory-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

.brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(18, 112, 61, 0.12);
  box-shadow: 0 10px 28px rgba(19, 47, 38, 0.08);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-symbol {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: #f8fffb;
  box-shadow: 0 12px 24px rgba(18, 112, 61, 0.2);
}

.brand-symbol svg {
  width: 34px;
  height: 34px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.brand-copy h1 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1;
  font-family: "Georgia", "Cambria", serif;
}

.brand-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.brand-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.brand-pill {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(18, 112, 61, 0.08);
  color: var(--green-deep);
  font-weight: 700;
  border: 1px solid rgba(18, 112, 61, 0.12);
}

.hero-card {
  border-radius: var(--radius-xl);
  padding: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 0.8fr);
  gap: 20px;
  background:
    linear-gradient(135deg, rgba(18, 112, 61, 0.94), rgba(9, 72, 40, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent);
  color: #f8fffb;
}

.hero-card h1 {
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.02;
  font-family: "Georgia", "Cambria", serif;
}

.hero-card p {
  max-width: 64ch;
  margin: 0;
  color: rgba(248, 255, 251, 0.84);
  font-size: 1.02rem;
}

.hero-side {
  display: grid;
  align-content: start;
  gap: 10px;
  justify-items: start;
}

.hero-chip {
  padding: 11px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  letter-spacing: 0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(248, 255, 251, 0.84);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-block .eyebrow {
  color: var(--green);
  font-weight: 700;
}

.quick-nav {
  position: sticky;
  top: 16px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.quick-link {
  appearance: none;
  border: 1px solid rgba(18, 112, 61, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--green-deep);
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(19, 47, 38, 0.06);
  transition: background var(--transition), transform var(--transition),
    box-shadow var(--transition), border-color var(--transition);
}

.quick-link.is-active {
  background: linear-gradient(135deg, rgba(18, 112, 61, 0.2), rgba(18, 112, 61, 0.1));
  border-color: rgba(18, 112, 61, 0.3);
  box-shadow: 0 12px 26px rgba(18, 112, 61, 0.12);
}

.quick-link:hover,
.quick-link:focus-visible {
  background: rgba(255, 255, 255, 1);
  border-color: rgba(18, 112, 61, 0.24);
  transform: translateY(-1px);
}

.section-block {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: grid;
  gap: 4px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.4rem);
  font-family: "Georgia", "Cambria", serif;
}

.section-heading p,
.subheading p,
.table-muted,
.formula-card p,
.memory-card li,
.readout {
  color: var(--muted);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 20px;
}

.section-grid.history-full-grid {
  grid-template-columns: minmax(0, 1fr);
}

.quote-layout {
  display: grid;
  gap: 18px;
}

.section-stack {
  display: grid;
  gap: 20px;
}

.panel-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  min-width: 0;
}

.panel-main,
.panel-side {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.quote-main {
  gap: 18px;
}

.panel-compact {
  padding: 20px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.budget-additional-costs {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 16px;
  align-items: end;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(18, 112, 61, 0.16);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(18, 112, 61, 0.045), rgba(255, 249, 222, 0.5));
}

.budget-additional-costs > div:first-child {
  display: grid;
  gap: 5px;
  align-self: center;
}

.budget-additional-costs strong {
  color: var(--green-deep);
}

.budget-additional-costs small {
  color: var(--muted);
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 8px;
}

.field-inline {
  min-width: min(100%, 360px);
}

.field span,
.segment-label,
.mini-fieldset legend {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--green-deep);
}

.field-input,
.readout {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition),
    transform var(--transition);
}

.field-input:focus,
.field-input:focus-visible {
  outline: none;
  border-color: rgba(18, 112, 61, 0.42);
  box-shadow: 0 0 0 4px rgba(18, 112, 61, 0.08);
  transform: translateY(-1px);
}

.field-input--accent {
  background: linear-gradient(180deg, #fff9de 0%, var(--yellow-soft) 100%);
  border-color: rgba(180, 145, 20, 0.28);
}

textarea.field-input {
  min-height: 92px;
  resize: vertical;
}

.field-readonly .readout {
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(13, 110, 168, 0.07), rgba(13, 110, 168, 0.03));
}

.segment-group {
  display: grid;
  gap: 10px;
}

.segment-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.segment-option {
  position: relative;
  cursor: pointer;
}

.segment-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.segment-option span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(18, 112, 61, 0.16);
  background: #f7faf5;
  color: var(--green-deep);
  font-weight: 700;
  transition: all var(--transition);
}

.segment-option input:checked + span {
  background: linear-gradient(135deg, rgba(18, 112, 61, 0.18), rgba(18, 112, 61, 0.08));
  border-color: rgba(18, 112, 61, 0.44);
  box-shadow: 0 12px 30px rgba(18, 112, 61, 0.1);
}

.inset-card {
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.92));
}

.subheading {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.subheading h3,
.formula-card h3,
.memory-card h4 {
  margin: 0;
  font-size: 1.1rem;
}

.print-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.print-colors-field {
  flex: 1 1 320px;
  margin-left: auto;
}

.switch-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
}

.switch-control input {
  position: absolute;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 58px;
  height: 32px;
  border-radius: 999px;
  background: rgba(18, 112, 61, 0.18);
  transition: background var(--transition);
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 8px 18px rgba(19, 44, 35, 0.16);
  transition: transform var(--transition);
}

.switch-control input:checked + .switch-track {
  background: rgba(18, 112, 61, 0.72);
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(26px);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  appearance: none;
  border: none;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.button-primary {
  background: linear-gradient(135deg, var(--green), var(--green-deep));
  color: #fff;
  box-shadow: 0 12px 24px rgba(18, 112, 61, 0.18);
}

.button-secondary {
  background: linear-gradient(135deg, rgba(13, 110, 168, 0.16), rgba(13, 110, 168, 0.08));
  color: var(--blue);
}

.button-ghost {
  background: rgba(18, 112, 61, 0.08);
  color: var(--green-deep);
}

.action-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.action-card .button {
  width: 100%;
}

.quote-items-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.client-catalog-panel {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(15, 111, 61, 0.2);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(241, 250, 245, 0.98), rgba(255, 255, 255, 0.98));
}

.client-catalog-head,
.client-catalog-toolbar,
.client-catalog-card-head,
.client-catalog-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-catalog-toolbar {
  align-items: end;
  margin-top: 12px;
}

.client-catalog-toolbar .field {
  flex: 1 1 420px;
  max-width: 680px;
}

.client-catalog-status {
  color: var(--text-soft, #5b665f);
  font-size: 0.86rem;
  text-align: right;
}

.client-catalog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.client-catalog-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(22, 94, 55, 0.16);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(24, 65, 43, 0.06);
}

.client-catalog-card-head {
  align-items: flex-start;
}

.client-catalog-card-head strong {
  display: block;
  overflow-wrap: anywhere;
  color: #124b2d;
}

.client-catalog-card-head small,
.client-catalog-card-foot {
  color: var(--text-soft, #657269);
  font-size: 0.78rem;
}

.client-catalog-usage {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e9f6ee;
  color: #12633a;
  font-size: 0.75rem;
  font-weight: 700;
}

.client-catalog-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 12px;
}

.client-catalog-facts div {
  min-width: 0;
}

.client-catalog-facts span {
  display: block;
  color: var(--text-soft, #68756d);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.client-catalog-facts b {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 2px;
  color: #233c2f;
  font-size: 0.86rem;
}

.client-catalog-card-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: auto;
}

.client-catalog-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed rgba(22, 94, 55, 0.25);
  border-radius: 12px;
  color: var(--text-soft, #657269);
  text-align: center;
}

@media (max-width: 720px) {
  .client-catalog-head,
  .client-catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .client-catalog-toolbar .field {
    flex-basis: auto;
  }

  .client-catalog-status {
    text-align: left;
  }

  .client-catalog-facts {
    grid-template-columns: 1fr;
  }
}

.pcp-panel {
  max-width: 100%;
  border: 1px solid rgba(18, 112, 61, 0.16);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.pcp-panel[hidden] {
  display: none;
}

.pcp-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.pcp-panel summary::-webkit-details-marker {
  display: none;
}

.pcp-panel summary span {
  display: grid;
  gap: 2px;
}

.pcp-panel summary strong {
  color: var(--green-deep);
  font-size: 0.95rem;
}

.pcp-panel summary small,
.pcp-sheet-drawing small {
  color: var(--muted);
  font-size: 0.78rem;
}

.pcp-panel summary b {
  color: var(--green);
  font-size: 0.8rem;
}

.pcp-panel[open] summary {
  border-bottom: 1px solid var(--border);
}

.pcp-panel[open] summary b {
  font-size: 0;
}

.pcp-panel[open] summary b::after {
  content: "Recolher";
  font-size: 0.8rem;
}

#pcp-optimization-content {
  display: grid;
  gap: 12px;
  padding: 12px;
  max-width: 100%;
  overflow-x: hidden;
}

.pcp-toolbar,
.pcp-group-head,
.pcp-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pcp-summary-cards,
.pcp-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.pcp-summary-cards span,
.pcp-kpis span {
  display: grid;
  gap: 2px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.pcp-summary-cards small,
.pcp-kpis small {
  color: var(--muted);
  font-size: 0.72rem;
}

.pcp-summary-cards strong,
.pcp-kpis strong {
  color: var(--green-deep);
  font-size: 1rem;
}

.pcp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pcp-tab {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.pcp-tab.is-active {
  border-color: rgba(18, 112, 61, 0.42);
  background: rgba(18, 112, 61, 0.12);
  color: var(--green-deep);
}

.pcp-tab-panel {
  display: grid;
  gap: 10px;
  max-width: 100%;
  overflow-x: hidden;
}

.pcp-group-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.pcp-group-head h4 {
  margin: 0;
  color: var(--green-deep);
  font-size: 0.95rem;
}

.pcp-group-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.pcp-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.pcp-status.is-good {
  background: rgba(22, 163, 74, 0.14);
  color: #166534;
}

.pcp-status.is-warning {
  background: rgba(245, 158, 11, 0.18);
  color: #92400e;
}

.pcp-status.is-danger {
  background: rgba(220, 38, 38, 0.14);
  color: #991b1b;
}

.pcp-status.is-muted {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
}

.pcp-recommendation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.75fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.pcp-sheet-drawing {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.pcp-drawing-title {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}

.pcp-drawing-title strong {
  color: var(--green-deep);
  font-size: 0.9rem;
}

.pcp-drawing-title small,
.pcp-recommendation-note {
  color: var(--muted);
  font-size: 0.78rem;
}

.pcp-recommendation-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(13, 110, 168, 0.18);
  border-radius: 10px;
  background: rgba(13, 110, 168, 0.08);
}

.pcp-sheet-preview {
  width: 100%;
  max-width: 100%;
  max-height: 380px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.pcp-sheet-drawing svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  margin: 0 auto;
  border-radius: 8px;
  background: #fff;
}

.pcp-svg-label {
  fill: #fff;
  font-size: 52px;
  font-weight: 800;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.32);
  stroke-width: 7px;
}

.pcp-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  font-size: 0.82rem;
  white-space: nowrap;
}

.pcp-table th,
.pcp-table td {
  white-space: normal;
  min-width: 96px;
}

.pcp-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.pcp-rule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.82rem;
}

.pcp-rule i {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #cbd5e1;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.pcp-rule.is-on i {
  background: var(--green);
}

.pcp-rules-grid p {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.sheetopt-shell {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.sheetopt-quote-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.sheetopt-quote-summary > div,
.sheetopt-metrics > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.sheetopt-quote-summary small,
.sheetopt-metrics small {
  color: var(--muted);
  font-size: 0.7rem;
}

.sheetopt-quote-summary strong,
.sheetopt-metrics strong {
  overflow-wrap: anywhere;
  color: var(--green-deep);
  font-size: 0.9rem;
}

.sheetopt-scenarios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.sheetopt-best-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sheetopt-best-cards article {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #cfe0d5;
  border-left: 4px solid #168348;
  border-radius: 6px;
  background: #f8fcf9;
}

.sheetopt-best-cards small,
.sheetopt-best-cards span {
  color: var(--muted);
}

.sheetopt-best-cards strong {
  color: var(--green-900);
}

.sheetopt-scenario {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.sheetopt-scenario.is-featured {
  border-color: rgba(18, 112, 61, 0.48);
  box-shadow: inset 0 3px 0 var(--green);
}

.sheetopt-scenario__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sheetopt-scenario__head strong {
  color: var(--green-deep);
  font-size: 0.9rem;
}

.sheetopt-scenario > p,
.pcp-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.sheetopt-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.sheetopt-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sheetopt-guidance-grid article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(18, 112, 61, 0.22);
  border-radius: 8px;
  background: rgba(18, 112, 61, 0.06);
}

.sheetopt-guidance-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.sheetopt-guidance-grid strong {
  color: var(--green-deep);
  font-size: 0.95rem;
}

.sheetopt-guidance-grid p {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.sheetopt-highlight-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sheetopt-highlight-row span {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.75rem;
}

.sheetopt-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.sheetopt-table td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.sheetopt-maps,
.sheetopt-opportunities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.sheetopt-map-card {
  background: var(--surface);
}

.sheetopt-opportunity {
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.sheetopt-opportunity strong {
  color: var(--green-deep);
}

.sheetopt-opportunity p,
.sheetopt-opportunity ul,
.sheetopt-opportunity small {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.sheetopt-alerts {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.sheetopt-alerts p {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid #d97706;
  background: rgba(245, 158, 11, 0.1);
  color: #78350f;
  font-size: 0.8rem;
}

.sheetopt-alerts p.is-ok {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.09);
  color: #166534;
}

@media (max-width: 860px) {
  .pcp-summary-cards,
  .pcp-kpis,
  .pcp-recommendation-grid {
    grid-template-columns: 1fr;
  }

  .pcp-toolbar,
  .pcp-actions {
    align-items: stretch;
  }

  .pcp-actions .button {
    width: 100%;
  }

  .pcp-sheet-preview {
    max-height: 320px;
    padding: 8px;
  }

  .pcp-sheet-drawing svg {
    max-height: 280px;
  }

  .sheetopt-quote-summary,
  .sheetopt-scenarios,
  .sheetopt-best-cards,
  .sheetopt-guidance-grid {
    grid-template-columns: 1fr;
  }
}

.quote-items-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quote-items-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.quote-items-actions .button {
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.82rem;
}

.quote-items-list {
  display: grid;
  gap: 8px;
}

.quote-item-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(360px, 1.5fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.quote-item-row.is-editing {
  border-color: rgba(18, 112, 61, 0.55);
  box-shadow: 0 0 0 3px rgba(18, 112, 61, 0.09);
}

.quote-item-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px;
  align-items: center;
  min-width: 0;
}

.quote-item-main strong,
.quote-item-main p {
  overflow-wrap: anywhere;
}

.quote-item-main p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.quote-item-number {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(18, 112, 61, 0.1);
  color: var(--green-deep);
  font-size: 0.76rem;
  font-weight: 800;
}

.quote-item-facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.quote-item-facts span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px;
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: right;
}

.quote-item-facts small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
}

.quote-item-memory {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
}

.quote-item-memory summary {
  cursor: pointer;
  font-weight: 800;
}

.quote-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.quote-items-total {
  display: flex;
  justify-content: flex-end;
}

.quote-items-total-card {
  display: grid;
  gap: 1px;
  min-width: min(100%, 280px);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(18, 112, 61, 0.18);
  background: linear-gradient(135deg, rgba(18, 112, 61, 0.12), rgba(18, 112, 61, 0.04));
  text-align: right;
}

.quote-items-total-card span,
.quote-items-total-card small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.quote-items-total-card strong {
  color: var(--green-deep);
  font-size: 1.25rem;
}

.resale-product-meta {
  grid-column: span 2;
  align-self: stretch;
  min-height: 44px;
}

.resale-meta-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  height: 100%;
}

.resale-meta-grid div {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid rgba(18, 112, 61, 0.14);
  border-radius: 8px;
  background: rgba(18, 112, 61, 0.05);
}

.resale-meta-grid span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.resale-meta-grid strong {
  color: var(--text);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

html.theme-dark .resale-meta-grid div {
  border-color: rgba(147, 197, 164, 0.22);
  background: rgba(147, 197, 164, 0.08);
}

.quote-support-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
}

.messages-stack {
  display: grid;
  gap: 10px;
}

.message-panel {
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid transparent;
  font-weight: 600;
}

.is-error {
  background: var(--red-soft);
  border-color: rgba(186, 46, 46, 0.16);
  color: var(--red);
}

.is-warning {
  background: linear-gradient(180deg, #fff6d8, #fff9e8);
  border-color: rgba(180, 145, 20, 0.2);
  color: #8a6400;
}

.is-success {
  background: rgba(18, 112, 61, 0.08);
  border-color: rgba(18, 112, 61, 0.18);
  color: var(--green-deep);
}

.is-info {
  background: rgba(13, 110, 168, 0.08);
  border-color: rgba(13, 110, 168, 0.16);
  color: var(--blue);
}

.metrics-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-card {
  border-radius: var(--radius-lg);
  padding: 18px;
  border: 1px solid transparent;
  display: grid;
  gap: 10px;
  min-height: 140px;
}

.metric-label {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 700;
}

.metric-value {
  font-size: 1.1rem;
  line-height: 1.3;
}

.tone-green {
  background: linear-gradient(180deg, rgba(18, 112, 61, 0.12), rgba(18, 112, 61, 0.06));
  border-color: rgba(18, 112, 61, 0.16);
}

.tone-yellow {
  background: linear-gradient(180deg, rgba(246, 228, 138, 0.3), rgba(246, 228, 138, 0.16));
  border-color: rgba(180, 145, 20, 0.16);
}

.tone-blue {
  background: linear-gradient(180deg, rgba(13, 110, 168, 0.16), rgba(13, 110, 168, 0.08));
  border-color: rgba(13, 110, 168, 0.16);
}

.tone-red {
  background: linear-gradient(180deg, rgba(186, 46, 46, 0.16), rgba(186, 46, 46, 0.08));
  border-color: rgba(186, 46, 46, 0.16);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.data-table thead th {
  text-align: left;
  padding: 14px 12px;
  background: rgba(18, 112, 61, 0.08);
  font-size: 0.85rem;
  color: var(--green-deep);
}

.data-table tbody td,
.data-table tfoot td {
  padding: 14px 12px;
  border-top: 1px solid rgba(23, 51, 42, 0.08);
  vertical-align: top;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.56);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: capitalize;
}

.status-badge.is-active {
  background: rgba(18, 112, 61, 0.12);
  color: var(--green-deep);
}

.status-badge.is-inactive {
  background: rgba(186, 46, 46, 0.1);
  color: var(--red);
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-action {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(18, 112, 61, 0.14);
  background: rgba(18, 112, 61, 0.07);
  color: var(--green-deep);
  cursor: pointer;
}

.table-action.is-danger {
  border-color: rgba(186, 46, 46, 0.16);
  background: rgba(186, 46, 46, 0.08);
  color: var(--red);
}

.summary-list {
  display: grid;
  gap: 12px;
}

.summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 51, 42, 0.06);
}

.summary-list span {
  color: var(--muted);
}

.summary-list strong {
  color: var(--text);
}

.summary-list.compact div {
  padding: 10px 12px;
}

.ideal-price-card {
  display: grid;
  gap: 16px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(18, 112, 61, 0.14), rgba(13, 110, 168, 0.08));
  border: 1px solid rgba(18, 112, 61, 0.16);
}

.ideal-price-card--empty {
  background: rgba(255, 255, 255, 0.72);
}

.field-spotlight {
  gap: 10px;
}

.field-input--hero {
  min-height: 64px;
  font-size: 1.65rem;
  font-weight: 800;
  text-align: center;
}

.manual-unit-echo {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(13, 110, 168, 0.12), rgba(13, 110, 168, 0.06));
  border: 1px solid rgba(13, 110, 168, 0.14);
}

.manual-unit-echo span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.manual-unit-echo strong {
  font-size: 1.9rem;
  line-height: 1;
  color: var(--blue);
}

.manual-unit-echo--soft {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(23, 51, 42, 0.08);
}

.ideal-price-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.ideal-price-label {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ideal-price-number {
  display: block;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1;
  color: var(--green-deep);
}

.ideal-price-description {
  margin: 8px 0 0;
  color: var(--muted);
}

.ideal-price-badge {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(18, 112, 61, 0.14);
  color: var(--green-deep);
  font-weight: 700;
  text-align: center;
}

.ideal-price-methods {
  display: grid;
  gap: 10px;
}

.ideal-price-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ideal-price-cell {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 51, 42, 0.06);
}

.ideal-price-cell--spotlight {
  background: linear-gradient(180deg, rgba(13, 110, 168, 0.12), rgba(13, 110, 168, 0.06));
  border-color: rgba(13, 110, 168, 0.16);
}

.ideal-price-cell--markup-green {
  background: linear-gradient(180deg, rgba(18, 112, 61, 0.18), rgba(18, 112, 61, 0.08));
  border-color: rgba(18, 112, 61, 0.24);
}

.ideal-price-cell--markup-yellow {
  background: linear-gradient(180deg, rgba(246, 228, 138, 0.42), rgba(246, 228, 138, 0.2));
  border-color: rgba(180, 145, 20, 0.24);
}

.ideal-price-cell--markup-red {
  background: linear-gradient(180deg, rgba(186, 46, 46, 0.18), rgba(186, 46, 46, 0.08));
  border-color: rgba(186, 46, 46, 0.22);
}

.ideal-price-cell--editable {
  align-content: start;
  cursor: text;
}

.ideal-price-cell--wide {
  grid-column: span 2;
}

.ideal-price-grid span {
  color: var(--muted);
  font-size: 0.86rem;
}

.ideal-price-grid strong {
  color: var(--text);
}

.ideal-price-cell--markup-green strong,
.ideal-price-cell--markup-green span:last-of-type,
.ideal-price-cell--markup-green .field-help {
  color: var(--green-deep);
}

.ideal-price-cell--markup-yellow strong,
.ideal-price-cell--markup-yellow .field-help {
  color: #8a6400;
}

.ideal-price-cell--markup-red strong,
.ideal-price-cell--markup-red .field-help {
  color: var(--red);
}

.ideal-price-inline-input {
  width: 100%;
  min-height: 52px;
  padding: 6px 0 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
}

.ideal-price-currency-field {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
}

.ideal-price-currency-prefix {
  color: var(--blue);
  font-size: 1.05rem !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

.ideal-price-inline-input:focus,
.ideal-price-inline-input:focus-visible {
  outline: none;
}

.ideal-price-config {
  display: grid;
  gap: 14px;
  padding-top: 4px;
  border-top: 1px solid rgba(18, 112, 61, 0.1);
}

.subheading--tight {
  margin-bottom: 0;
}

.segment-group--tight {
  gap: 8px;
}

.ideal-price-inputs {
  display: block;
}

.ideal-price-input-field {
  margin: 0;
}

.ideal-price-manual-note {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(18, 112, 61, 0.18);
  background: rgba(255, 255, 255, 0.56);
}

.ideal-price-manual-note strong {
  color: var(--green-deep);
}

.ideal-price-manual-note p {
  margin: 0;
  color: var(--muted);
}

.field-help {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.empty-state {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(18, 112, 61, 0.18);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
}

.memory-grid,
.formula-grid {
  display: grid;
  gap: 18px;
}

.memory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.formula-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.memory-card,
.formula-card {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.memory-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.formula-card p {
  margin: 12px 0 0;
}

.card-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.catalog-tab {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(18, 112, 61, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--green-deep);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
}

.catalog-tab.is-active {
  background: linear-gradient(135deg, rgba(18, 112, 61, 0.16), rgba(18, 112, 61, 0.08));
  border-color: rgba(18, 112, 61, 0.38);
  box-shadow: 0 12px 24px rgba(18, 112, 61, 0.1);
}

.catalog-panel[hidden] {
  display: none;
}

.mini-fieldset {
  margin: 0;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(18, 112, 61, 0.12);
  background: rgba(255, 255, 255, 0.56);
}

.filters-row {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  margin: 10px 0 16px;
}

.history-preview {
  display: grid;
  gap: 16px;
}

.history-filters {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffdf8;
}

.commission-payment-panel,
.commission-ledger-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

#comissoes,
#comissoes .panel-card,
#comissoes .panel-card > *,
#comissoes .history-filters,
#comissoes .metrics-grid,
#comissoes .commission-payment-panel,
#comissoes .commission-ledger-section {
  min-width: 0;
  max-width: 100%;
}

#comissoes .history-filters,
#comissoes .metrics-grid,
#comissoes .commission-payment-panel,
#comissoes .commission-ledger-section {
  width: 100%;
}

#comissoes .complete-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.commission-payment-notes-field {
  grid-column: 1 / -1;
}

.commission-payment-submit-field .button {
  width: 100%;
}

.commission-payment-submit-field .button-row {
  align-items: stretch;
  flex-wrap: wrap;
}

.commission-payment-submit-field .button-row .button {
  width: auto;
  flex: 1 1 150px;
}

.commission-movement-feedback {
  grid-column: 1 / -1;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #f0b9b9;
  border-radius: 9px;
  background: #fff1f1;
  color: #8f2020;
  font-weight: 750;
}

.commission-movement-feedback[data-tone="success"] {
  border-color: #a8ddbd;
  background: #e9f8ef;
  color: #08763c;
}

.commission-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fff7d6;
  color: #8a5a00;
  white-space: nowrap;
}

.commission-status-badge.is-partial {
  background: #e8f2ff;
  color: #1555a0;
}

.commission-status-badge.is-paid {
  background: #e5f7ec;
  color: #08763c;
}

.commission-status-badge.is-credit {
  background: #dcf8e7;
  color: #056b35;
}

.commission-status-badge.is-missing {
  background: #f1f3f5;
  color: #68727d;
}

.commission-credit-value {
  color: #08763c;
  font-weight: 800;
}

.commission-financial-alert {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #f4c8c8;
  border-radius: 6px;
  background: #fff2f2;
  color: #9d2525;
  font-weight: 700;
}

.commission-rule-guide {
  display: grid;
  gap: 4px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid #cfe4d7;
  border-radius: 8px;
  background: #f7fcf8;
  color: #385248;
  font-size: 12px;
  line-height: 1.35;
}

.commission-rule-guide strong {
  color: #075b35;
  font-size: 13px;
}

.commission-rule-guide b {
  color: #1e4937;
}

.commission-rule-guide small {
  margin-top: 2px;
  color: #587066;
}

#commission-statement-table .data-table td,
#commission-balance-table .data-table td {
  vertical-align: middle;
}

.commission-balance-positive {
  color: var(--green-deep);
  font-weight: 800;
}

.commission-balance-settled {
  color: var(--muted);
  font-weight: 700;
}

#history-table {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.history-filter-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.history-status-filter {
  width: min(220px, 100%);
}

.history-show-deleted {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  font-weight: 700;
  color: var(--green-deep);
}

.history-row-deleted {
  background: #f8faf9;
  color: #64748b;
}

.price-review-master-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 16px;
  padding: 16px 18px;
  border: 2px solid #e6b93f;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff4c8 0%, #fffdf5 76%);
  color: #614200;
  box-shadow: 0 12px 28px rgba(141, 90, 0, .13);
}

.price-review-master-alert[hidden] { display: none !important; }
.price-review-master-alert strong,
.price-review-master-alert span { display: block; }
.price-review-master-alert strong { font-size: 1rem; }
.price-review-master-alert span { margin-top: 3px; font-size: .82rem; color: #7a5a12; }
.price-review-master-alert .button { border-color: #b57a00; background: #8d5a00; color: #fff; white-space: nowrap; }

.history-row-price-review > td {
  background: #fff9e6 !important;
  border-color: #efd98d !important;
}

.history-row-price-review.history-data-row > td:first-child {
  box-shadow: inset 5px 0 0 #dfa900;
}

@media (max-width: 720px) {
  .price-review-master-alert { align-items: stretch; flex-direction: column; }
}

.history-deleted-badge {
  display: inline-flex;
  padding: 3px 8px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff1f2;
  color: #b91c1c;
  font-weight: 800;
}

.history-delete-audit {
  display: block;
  margin-top: 5px;
  line-height: 1.3;
  color: #64748b;
}

.order-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}

.order-delete-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 17, 0.56);
}

.order-delete-dialog {
  position: relative;
  width: min(620px, 100%);
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(185, 28, 28, 0.25);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 22, 17, 0.3);
}

.order-delete-head h2,
.order-delete-head p {
  margin: 0;
}

.order-delete-head p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.order-delete-reference {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 51, 42, 0.1);
  border-radius: 8px;
  background: #f7faf8;
}

.order-delete-error {
  margin: -6px 0 0;
  color: #b91c1c;
  font-weight: 700;
}

.order-delete-actions {
  justify-content: flex-end;
}

.button-danger {
  border-color: #b91c1c;
  background: #b91c1c;
  color: #fff;
}

.history-table-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: 560px;
  overflow: auto;
  border: 1px solid rgba(23, 51, 42, 0.08);
  border-radius: 10px;
}

.history-table {
  min-width: 1240px;
}

.history-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.history-table .cell-number,
.history-table .cell-money {
  text-align: right;
  white-space: nowrap;
}

.history-data-row td {
  border-bottom: 0;
}

.history-quote-number {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(18, 112, 61, 0.14);
  border-radius: 999px;
  background: rgba(18, 112, 61, 0.08);
  color: var(--green-deep);
  font-weight: 900;
  white-space: nowrap;
}

.history-actions-row td {
  padding-top: 0 !important;
  padding-bottom: 10px !important;
  border-top: 0 !important;
}

.history-actions-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(18, 112, 61, 0.035);
}

.history-actions-label {
  margin-right: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.history-actions-bar .table-action {
  min-height: 28px;
  white-space: nowrap;
}

.history-data-row:hover + .history-actions-row,
.history-actions-row:hover {
  background: rgba(255, 255, 255, 0.56);
}

html.theme-dark .history-quote-number {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(34, 197, 94, 0.12);
}

html.theme-dark .history-actions-bar {
  background: rgba(34, 197, 94, 0.07);
}

.history-total {
  color: var(--green-deep);
  font-weight: 900;
}

.tone-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.tone-badge.tone-green {
  color: #0f5d34;
}

.tone-badge.tone-yellow {
  color: #795f00;
}

.tone-badge.tone-red {
  color: var(--red);
}

.history-copy-box {
  display: grid;
  gap: 5px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(13, 110, 168, 0.14);
  background: rgba(13, 110, 168, 0.06);
}

.history-copy-box span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.history-copy-box p {
  max-height: 120px;
  margin: 0;
  overflow: auto;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.4;
}

@media print {
  body {
    background: #fff;
  }

  .background-orb,
  .quick-nav,
  .button,
  .catalog-tabs,
  .filters-row,
  #quote-messages,
  #quote-notice,
  #historico,
  #cadastros,
  #regras {
    display: none !important;
  }

  body.print-budget-mode .app-shell {
    width: 100%;
    margin: 0;
    gap: 14px;
  }

  body.print-budget-mode .brand-bar,
  body.print-budget-mode .panel-card,
  body.print-budget-mode .memory-card,
  body.print-budget-mode .formula-card {
    box-shadow: none;
    backdrop-filter: none;
    background: #fff;
    border-color: rgba(0, 0, 0, 0.12);
  }

  body.print-budget-mode .section-block {
    display: none !important;
  }

  body.print-budget-mode #nova-cotacao,
  body.print-budget-mode #resultado,
  body.print-budget-mode #memoria {
    display: grid !important;
  }

  body.print-budget-mode .quote-support-grid,
  body.print-budget-mode .section-grid,
  body.print-budget-mode .memory-grid,
  body.print-budget-mode .metrics-grid,
  body.print-budget-mode .ideal-price-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Orçamentos — identidade visual executiva v1 */
@media screen {
  .app-shell > .quick-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    max-width: 100%;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid rgba(18, 112, 61, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 28px rgba(18, 63, 42, 0.08);
    backdrop-filter: blur(14px);
    scrollbar-width: thin;
  }

  .app-shell > .quick-nav .quick-link {
    flex: 0 0 auto;
    min-height: 39px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 850;
  }

  .app-shell > .quick-nav .quick-link.is-active {
    background: linear-gradient(135deg, #11713f, #07572f);
    color: #fff;
    box-shadow: 0 7px 18px rgba(10, 79, 43, 0.2);
  }

  #nova-cotacao {
    gap: 14px;
    color: var(--text);
    font-size: 15px;
    scroll-margin-top: 70px;
  }

  #nova-cotacao > .section-heading {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 94px;
    padding: 18px 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background:
      radial-gradient(circle at 88% 10%, rgba(126, 231, 177, 0.28), transparent 28%),
      linear-gradient(135deg, #0c6238, #08492c);
    color: #fff;
    box-shadow: 0 14px 36px rgba(8, 73, 44, 0.16);
  }

  #nova-cotacao > .section-heading::after {
    content: "";
    position: absolute;
    z-index: -1;
    right: 9%;
    width: 190px;
    height: 190px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
  }

  #nova-cotacao > .section-heading > div {
    display: grid;
    gap: 3px;
  }

  html.orc-embedded #nova-cotacao > .section-heading .eyebrow,
  #nova-cotacao > .section-heading .eyebrow {
    display: inline-flex;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.1em;
  }

  #nova-cotacao > .section-heading h2 {
    margin: 0;
    color: #fff;
    font-family: inherit;
    font-size: clamp(1.42rem, 2vw, 1.8rem);
    line-height: 1.1;
  }

  html.orc-embedded #nova-cotacao > .section-heading p,
  #nova-cotacao > .section-heading p {
    display: block;
    max-width: 72ch;
    margin: 2px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .quote-workspace-badge {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 850;
    white-space: nowrap;
  }

  #nova-cotacao .quote-layout,
  #nova-cotacao .quote-main,
  #nova-cotacao #quote-form,
  #nova-cotacao .budget-result-area {
    gap: 14px;
  }

  #nova-cotacao .quote-main {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #nova-cotacao #quote-form > .form-block,
  #nova-cotacao .client-catalog-panel,
  #nova-cotacao .quote-items-panel,
  #nova-cotacao .pcp-panel,
  #nova-cotacao .result-spotlight,
  #nova-cotacao .quote-support-grid > .panel-card,
  #nova-cotacao .technical-details,
  #nova-cotacao .action-card {
    border: 1px solid rgba(23, 51, 42, 0.11);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 24px rgba(24, 65, 43, 0.055);
  }

  #nova-cotacao #quote-form > .form-block {
    gap: 13px;
    padding: 17px 18px;
  }

  #nova-cotacao #quote-form > .form-block > .subheading {
    display: flex;
    align-items: center;
    min-height: 28px;
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(23, 51, 42, 0.08);
  }

  #nova-cotacao #quote-form > .form-block > .subheading h3,
  #nova-cotacao .quote-items-head h3,
  #nova-cotacao .result-spotlight h3,
  #nova-cotacao .quote-support-grid h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #123b2a;
    font-size: 1.04rem;
    font-weight: 900;
    line-height: 1.2;
  }

  #nova-cotacao #quote-form > .form-block > .subheading h3::before,
  #nova-cotacao .quote-items-head h3::before,
  #nova-cotacao .result-spotlight h3::before,
  #nova-cotacao .quote-support-grid h3::before {
    content: "";
    width: 4px;
    height: 18px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(180deg, #35c879, #08753e);
  }

  #nova-cotacao .subheading p {
    margin: 3px 0 0;
    color: #687a72;
    font-size: 0.83rem;
    line-height: 1.4;
  }

  #nova-cotacao .form-grid,
  #nova-cotacao .segment-group,
  #nova-cotacao .segment-controls,
  #nova-cotacao .quote-support-grid,
  #nova-cotacao .metrics-grid,
  #nova-cotacao .button-row,
  #nova-cotacao .messages-stack {
    gap: 11px;
  }

  #nova-cotacao .field {
    gap: 6px;
  }

  #nova-cotacao .field span,
  #nova-cotacao .segment-label,
  #nova-cotacao .mini-fieldset legend {
    color: #22563e;
    font-size: 0.79rem;
    font-weight: 850;
  }

  #nova-cotacao .field-input,
  #nova-cotacao .readout {
    min-height: 43px;
    padding: 9px 11px;
    border-color: rgba(34, 86, 62, 0.16);
    border-radius: 10px;
    background: #fff;
    color: #17332a;
    font-size: 0.9rem;
  }

  #nova-cotacao .field-input::placeholder {
    color: #98a7a0;
  }

  #nova-cotacao .field-input:focus,
  #nova-cotacao .field-input:focus-visible {
    border-color: rgba(13, 117, 62, 0.56);
    box-shadow: 0 0 0 3px rgba(18, 112, 61, 0.1);
  }

  #nova-cotacao .field-input--accent {
    border-color: rgba(190, 151, 28, 0.24);
    background: #fffdf5;
  }

  #nova-cotacao textarea.field-input {
    min-height: 82px;
  }

  #nova-cotacao .segment-option span {
    min-height: 37px;
    padding: 0 13px;
    border-color: rgba(18, 112, 61, 0.18);
    border-radius: 10px;
    background: #f5f9f6;
    color: #24583f;
    font-size: 0.83rem;
    font-weight: 850;
  }

  #nova-cotacao .segment-option input:checked + span {
    border-color: #0c7540;
    background: #0c7540;
    color: #fff;
    box-shadow: 0 6px 16px rgba(12, 117, 64, 0.18);
  }

  #nova-cotacao .button {
    min-height: 39px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 850;
  }

  #nova-cotacao .button-primary {
    background: linear-gradient(135deg, #16844c, #08713d);
    box-shadow: 0 7px 16px rgba(8, 113, 61, 0.16);
  }

  #nova-cotacao .button-secondary {
    border: 1px solid rgba(13, 110, 168, 0.14);
    background: #f1f7fb;
  }

  #nova-cotacao .button-ghost {
    border: 1px solid rgba(18, 112, 61, 0.11);
    background: #f3f7f4;
  }

  #nova-cotacao .compact-basic-grid {
    grid-template-columns: minmax(250px, 1.25fr) minmax(210px, 1fr) minmax(230px, 1.2fr) minmax(150px, 0.7fr);
  }

  #nova-cotacao .compact-basic-grid #main-material-field {
    grid-column: span 2;
  }

  #nova-cotacao .quote-client-actions {
    gap: 7px;
  }

  #nova-cotacao .quote-client-actions .button {
    flex: 1 1 0;
    min-height: 34px;
  }

  #nova-cotacao .ideal-price-card--compact {
    gap: 11px;
    margin-top: 4px;
    padding: 15px;
    border: 1px solid rgba(18, 112, 61, 0.14);
    border-radius: 14px;
    background: linear-gradient(135deg, #f1f9f4, #f8fbff);
  }

  #nova-cotacao .ideal-price-head--compact {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(18, 112, 61, 0.1);
  }

  #nova-cotacao .ideal-price-head--compact .ideal-price-label {
    font-size: 0.72rem;
  }

  #nova-cotacao .ideal-price-head--compact .ideal-price-number {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  }

  #nova-cotacao .ideal-price-head--compact .ideal-price-description {
    max-width: 68ch;
    font-size: 0.8rem;
    line-height: 1.35;
  }

  #nova-cotacao .ideal-price-head--compact .ideal-price-badge {
    min-height: 29px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  #nova-cotacao .ideal-price-grid--main {
    gap: 9px;
  }

  #nova-cotacao .ideal-price-cell {
    gap: 5px;
    min-height: 78px;
    padding: 11px 12px;
    border-radius: 11px;
  }

  #nova-cotacao .ideal-price-grid span {
    font-size: 0.76rem;
  }

  #nova-cotacao .ideal-price-inline-input {
    min-height: 38px;
    font-size: 1rem;
  }

  #nova-cotacao .message-panel {
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 0.84rem;
    line-height: 1.35;
  }

  #nova-cotacao .quote-items-panel,
  #nova-cotacao .client-catalog-panel,
  #nova-cotacao .result-spotlight,
  #nova-cotacao .quote-support-grid > .panel-card,
  #nova-cotacao .action-card {
    padding: 17px 18px;
  }

  #nova-cotacao .quote-items-head {
    align-items: center;
    gap: 16px;
  }

  #nova-cotacao .quote-items-actions {
    gap: 7px;
  }

  #nova-cotacao .quote-items-actions .button {
    min-height: 36px;
    font-size: 0.8rem;
  }

  #nova-cotacao .quote-item-row {
    padding: 12px;
    border-color: rgba(23, 51, 42, 0.1);
    border-radius: 12px;
    background: #f9fbfa;
  }

  #nova-cotacao .pcp-panel summary {
    min-height: 58px;
    padding: 12px 16px;
  }

  #nova-cotacao .pcp-panel summary strong {
    font-size: 0.92rem;
  }

  #nova-cotacao .pcp-panel summary small {
    margin-top: 2px;
    font-size: 0.76rem;
  }

  #nova-cotacao .result-spotlight {
    gap: 12px;
    border-color: rgba(18, 112, 61, 0.18);
    background: linear-gradient(135deg, #f5faf7, #fbfdfc);
  }

  #nova-cotacao .metrics-grid {
    gap: 10px;
  }

  #nova-cotacao .metric-card {
    min-height: 88px;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(23, 51, 42, 0.08);
    border-radius: 12px;
  }

  #nova-cotacao .metric-label {
    font-size: 0.75rem;
    font-weight: 800;
  }

  #nova-cotacao .metric-value {
    font-size: 1.02rem;
    font-weight: 900;
  }

  #nova-cotacao .summary-list div,
  #nova-cotacao .summary-list.compact div {
    min-height: 37px;
    padding: 8px 10px;
    border-radius: 9px;
    background: #f8faf9;
  }

  #nova-cotacao .summary-list span,
  #nova-cotacao .summary-list strong {
    font-size: 0.82rem;
  }

  #nova-cotacao .technical-details {
    overflow: hidden;
  }

  #nova-cotacao .technical-details summary {
    min-height: 46px;
    padding: 11px 15px;
    background: #f7faf8;
    font-size: 0.87rem;
  }

  #nova-cotacao .action-card {
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 9px;
  }

  #nova-cotacao .action-card .button {
    width: 100%;
    min-height: 42px;
  }

  html.theme-dark .app-shell > .quick-nav,
  html.theme-dark #nova-cotacao #quote-form > .form-block,
  html.theme-dark #nova-cotacao .client-catalog-panel,
  html.theme-dark #nova-cotacao .quote-items-panel,
  html.theme-dark #nova-cotacao .pcp-panel,
  html.theme-dark #nova-cotacao .result-spotlight,
  html.theme-dark #nova-cotacao .quote-support-grid > .panel-card,
  html.theme-dark #nova-cotacao .technical-details,
  html.theme-dark #nova-cotacao .action-card {
    border-color: var(--line);
    background: rgba(15, 23, 42, 0.94);
    color: var(--text);
  }

  html.theme-dark #nova-cotacao #quote-form > .form-block > .subheading h3,
  html.theme-dark #nova-cotacao .quote-items-head h3,
  html.theme-dark #nova-cotacao .result-spotlight h3,
  html.theme-dark #nova-cotacao .quote-support-grid h3 {
    color: var(--text);
  }

  html.theme-dark #nova-cotacao .field-input,
  html.theme-dark #nova-cotacao .readout,
  html.theme-dark #nova-cotacao .summary-list div,
  html.theme-dark #nova-cotacao .quote-item-row,
  html.theme-dark #nova-cotacao .technical-details summary {
    border-color: var(--line);
    background: rgba(30, 41, 59, 0.92);
    color: var(--text);
  }

  html.theme-dark #nova-cotacao .ideal-price-card--compact {
    border-color: var(--line);
    background: linear-gradient(135deg, rgba(22, 101, 52, 0.18), rgba(30, 58, 138, 0.12));
  }
}

@media screen and (max-width: 1180px) {
  #nova-cotacao .compact-basic-grid,
  #nova-cotacao .form-grid-5,
  #nova-cotacao .form-grid-4,
  #nova-cotacao .form-grid-3,
  #nova-cotacao .ideal-price-grid--main,
  #nova-cotacao .metrics-grid,
  #nova-cotacao .action-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #nova-cotacao .compact-basic-grid #main-material-field {
    grid-column: span 2;
  }

  #nova-cotacao .quote-items-head {
    align-items: stretch;
    flex-direction: column;
  }

  #nova-cotacao .quote-items-actions {
    justify-content: flex-start;
  }
}

@media screen and (max-width: 720px) {
  .budget-additional-costs {
    grid-template-columns: 1fr;
  }

  html.orc-embedded .app-shell {
    padding-right: 6px;
    padding-left: 6px;
  }

  #nova-cotacao > .section-heading {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
  }

  .quote-workspace-badge {
    min-height: 30px;
  }

  #nova-cotacao .compact-basic-grid,
  #nova-cotacao .form-grid-5,
  #nova-cotacao .form-grid-4,
  #nova-cotacao .form-grid-3,
  #nova-cotacao .form-grid-2,
  #nova-cotacao .ideal-price-grid--main,
  #nova-cotacao .metrics-grid,
  #nova-cotacao .quote-support-grid,
  #nova-cotacao .action-card {
    grid-template-columns: 1fr;
  }

  #nova-cotacao .compact-basic-grid #main-material-field,
  #nova-cotacao .field-span-2 {
    grid-column: auto;
  }

  #nova-cotacao #quote-form > .form-block,
  #nova-cotacao .quote-items-panel,
  #nova-cotacao .client-catalog-panel,
  #nova-cotacao .result-spotlight,
  #nova-cotacao .quote-support-grid > .panel-card,
  #nova-cotacao .action-card {
    padding: 14px;
  }

  #nova-cotacao .quote-items-actions,
  #nova-cotacao .quote-client-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #nova-cotacao .quote-items-actions .button,
  #nova-cotacao .quote-client-actions .button {
    width: 100%;
  }
}

@media (max-width: 1180px) {
  .section-grid,
  .memory-grid,
  .formula-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid-5,
  .form-grid-4,
  .quote-support-grid,
  .ideal-price-inputs,
  .ideal-price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    margin-top: 14px;
  }

  .quick-nav {
    position: static;
    gap: 10px;
  }

  .brand-bar,
  .brand-lockup,
  .brand-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid-2,
  .form-grid-3,
  .form-grid-5,
  .form-grid-4,
  .filters-row,
  .metrics-grid,
  .quote-support-grid,
  .ideal-price-inputs,
  .ideal-price-grid {
    grid-template-columns: 1fr;
  }

  .card-topline,
  .button-row,
  .quick-client-head,
  .segment-controls,
  .actions-cell,
  .catalog-tabs,
  .ideal-price-head,
  .print-compact-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ideal-price-cell--wide {
    grid-column: span 1;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}


/* Simplified operational layout */
:root {
  --bg: #f3f5f1;
  --surface: #ffffff;
  --shadow: 0 8px 24px rgba(24, 49, 41, 0.08);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

body {
  background: var(--bg);
}

.app-shell {
  width: min(1440px, calc(100% - 28px));
  gap: 16px;
}

.brand-bar {
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: none;
}

.brand-symbol {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: none;
}

.brand-symbol svg {
  width: 28px;
  height: 28px;
}

.brand-copy h1 {
  font-family: inherit;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.brand-copy p {
  font-size: 0.95rem;
}

.brand-pill {
  min-height: 30px;
  font-size: 0.86rem;
  background: #f2f6f1;
  color: var(--muted);
  border-color: var(--line);
}

.quick-nav {
  position: sticky;
  top: 10px;
  gap: 8px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(243, 245, 241, 0.92);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.quick-link,
.catalog-tab,
.button,
.table-action,
.segment-option span,
.status-badge {
  border-radius: 8px;
}

.quick-link {
  min-height: 40px;
  box-shadow: none;
  background: #fff;
}

.quick-link.is-active {
  background: var(--green-deep);
  color: #fff;
  box-shadow: none;
}

.section-heading h2 {
  font-family: inherit;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.panel-card,
.formula-card,
.memory-card {
  border-color: var(--line);
  box-shadow: none;
  backdrop-filter: none;
}

.panel-card {
  padding: 18px;
}

.quote-main {
  align-items: start;
}

.form-block {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.form-grid-align-end {
  align-items: end;
}

.print-switch-field {
  min-height: 48px;
  align-self: end;
}

.field-input,
.readout {
  border-radius: 8px;
  min-height: 50px;
  background: #fff;
}

.field-input--accent {
  background: #fffdf2;
}

.subheading {
  margin-bottom: 0;
}

.subheading p,
.section-heading p {
  max-width: 70ch;
}

.ideal-price-card {
  margin-top: 14px;
  border-radius: 12px;
  background: #f8fbf7;
}

.ideal-price-number {
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
}

.ideal-price-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ideal-price-cell--wide {
  grid-column: span 1;
}

.budget-result-area {
  display: grid;
  gap: 16px;
}

.result-spotlight {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(18, 112, 61, 0.18);
  border-radius: 14px;
  background: #f8fbf7;
}

.metrics-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  min-height: 104px;
  padding: 14px;
  border-radius: 10px;
}

.metric-value {
  font-size: 1rem;
}

.quote-support-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
}

.technical-details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.technical-details summary {
  min-height: 48px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--green-deep);
  font-weight: 800;
}

.technical-stack {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.action-card {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
}

.action-card .button {
  width: 100%;
}

.button-primary {
  box-shadow: none;
}

.catalog-tabs {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8faf7;
}

.catalog-tab {
  box-shadow: none;
}

.catalog-tab.is-active {
  background: var(--green-deep);
  color: #fff;
  box-shadow: none;
}

.data-table thead th {
  background: #edf4ec;
}

#resultado,
#memoria,
#regras {
  display: none !important;
}

@media print {
  body.print-budget-mode #nova-cotacao {
    display: grid !important;
  }

  body.print-budget-mode .technical-details {
    display: block !important;
  }
}

@media (max-width: 1180px) {
  .metrics-grid,
  .ideal-price-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 18px, 100%);
  }

  .brand-bar {
    gap: 12px;
  }

  .quick-nav {
    position: static;
  }

  .quick-link {
    flex: 1 1 120px;
  }

  .form-block {
    padding: 14px;
  }

  .metrics-grid,
  .quote-support-grid,
  .action-card,
  .ideal-price-grid {
    grid-template-columns: 1fr;
  }
}

[hidden],
.section-block[hidden],
.catalog-panel[hidden] {
  display: none !important;
}

.stack-form {
  gap: 10px;
}

.form-block--compact,
.form-block {
  gap: 10px;
  padding: 14px;
}

.form-grid {
  gap: 10px;
}

.field {
  gap: 6px;
}

.field-input,
.readout {
  min-height: 44px;
  padding: 9px 11px;
}

.segment-option span {
  min-height: 40px;
  padding: 0 12px;
}

@media (min-width: 861px) {
  .measures-block #normal-dimensions .form-grid-3,
  .form-grid-align-end {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quote-main,
  .budget-result-area {
    grid-template-columns: 1fr;
  }

  .budget-result-area {
    position: static;
  }
}

.panel-card {
  padding: 14px;
}

.result-spotlight {
  padding: 14px;
}

.metric-card {
  min-height: 86px;
  gap: 6px;
}

.summary-list {
  gap: 8px;
}

.summary-list div {
  padding: 9px 10px;
}

/* Compact density pass */
body {
  font-size: 14px;
}

.app-shell {
  gap: 10px;
  margin: 10px auto 32px;
}

.brand-bar {
  padding: 10px 14px;
}

.brand-symbol {
  width: 38px;
  height: 38px;
}

.brand-symbol svg {
  width: 24px;
  height: 24px;
}

.brand-copy h1 {
  font-size: 1.16rem;
}

.brand-copy p,
.section-heading p,
.subheading p,
.table-muted,
.field-help,
.readout {
  font-size: 0.82rem;
}

.brand-pill {
  min-height: 26px;
  padding: 0 9px;
  font-size: 0.78rem;
}

.quick-nav {
  gap: 6px;
  padding: 6px;
  top: 8px;
}

.quick-link,
.catalog-tab {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.section-block {
  gap: 8px;
}

.section-heading {
  gap: 2px;
}

.section-heading h2 {
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
}

.eyebrow,
.section-block .eyebrow,
.ideal-price-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.quote-layout,
.section-stack,
.panel-main,
.panel-side,
.quote-main,
.budget-result-area,
.technical-stack {
  gap: 10px;
}

.stack-form {
  gap: 8px;
}

.form-block,
.form-block--compact,
.panel-card,
.result-spotlight,
.memory-card,
.formula-card {
  padding: 10px;
  border-radius: 10px;
}

.subheading {
  gap: 3px;
  margin-bottom: 0;
}

.subheading h3,
.formula-card h3,
.memory-card h4 {
  font-size: 0.96rem;
}

.form-grid,
.segment-group,
.segment-controls,
.messages-stack,
.quote-support-grid,
.metrics-grid,
.summary-list,
.catalog-tabs,
.filters-row,
.button-row {
  gap: 8px;
}

.field {
  gap: 4px;
}

.field span,
.segment-label,
.mini-fieldset legend {
  font-size: 0.78rem;
}

.field-input,
.readout {
  min-height: 38px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 0.9rem;
}

textarea.field-input {
  min-height: 72px;
}

.segment-option span {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.84rem;
}

.print-switch-field {
  min-height: 38px;
}

.switch-control {
  gap: 8px;
  font-size: 0.86rem;
}

.switch-track {
  width: 46px;
  height: 26px;
}

.switch-track::after {
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(20px);
}

.button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.message-panel {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.86rem;
}

.ideal-price-card {
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border-radius: 10px;
}

.ideal-price-head {
  gap: 10px;
}

.ideal-price-number {
  font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.ideal-price-description {
  margin-top: 5px;
  font-size: 0.82rem;
}

.ideal-price-badge {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.ideal-price-grid {
  gap: 8px;
}

.ideal-price-cell {
  gap: 4px;
  padding: 9px 10px;
}

.ideal-price-grid span {
  font-size: 0.78rem;
}

.ideal-price-inline-input {
  min-height: 38px;
  font-size: 0.98rem;
}

.ideal-price-manual-note {
  gap: 4px;
  padding: 10px;
}

.result-spotlight {
  gap: 8px;
}

.metric-card {
  min-height: 72px;
  padding: 9px 10px;
  gap: 4px;
}

.metric-label {
  font-size: 0.76rem;
}

.metric-value {
  font-size: 0.92rem;
  line-height: 1.18;
}

.summary-list div,
.summary-list.compact div {
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
}

.summary-list span,
.summary-list strong {
  font-size: 0.84rem;
}

.technical-details summary {
  min-height: 38px;
  padding: 9px 11px;
  font-size: 0.88rem;
}

.technical-stack {
  padding: 0 10px 10px;
}

.data-table thead th,
.data-table tbody td,
.data-table tfoot td {
  padding: 9px 8px;
  font-size: 0.82rem;
}

.table-action {
  min-height: 28px;
  padding: 0 9px;
  font-size: 0.78rem;
}

.status-badge {
  min-height: 26px;
  min-width: 68px;
  padding: 0 9px;
  font-size: 0.76rem;
}

.mini-fieldset {
  padding: 10px;
  border-radius: 9px;
}

.empty-state {
  padding: 12px;
  font-size: 0.84rem;
}

@media (max-width: 860px) {
  body {
    font-size: 14px;
  }

  .field-input,
  .button,
  .quick-link,
  .catalog-tab,
  .segment-option span {
    min-height: 40px;
  }

  .form-block,
  .form-block--compact,
  .panel-card,
  .result-spotlight {
    padding: 10px;
  }
}

/* Extra compact quote density */
body {
  font-size: 13.5px;
}

.app-shell {
  gap: 8px;
  margin-top: 8px;
}

.brand-bar {
  padding: 8px 12px;
}

.quick-nav {
  padding: 5px;
}

.quick-link,
.catalog-tab {
  min-height: 31px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.section-heading h2 {
  font-size: clamp(1rem, 1.35vw, 1.32rem);
}

.section-heading p {
  font-size: 0.78rem;
}

.stack-form,
.quote-layout,
.quote-main,
.budget-result-area,
.section-stack {
  gap: 7px;
}

.form-block,
.form-block--compact,
.panel-card,
.result-spotlight {
  padding: 8px 9px;
  border-radius: 9px;
}

.subheading h3 {
  font-size: 0.9rem;
}

.subheading,
.segment-group,
.field {
  gap: 3px;
}

.form-grid,
.segment-controls,
.metrics-grid,
.quote-support-grid,
.button-row,
.messages-stack {
  gap: 6px;
}

.field span,
.segment-label,
.mini-fieldset legend {
  font-size: 0.73rem;
}

.field-input,
.readout {
  min-height: 34px;
  padding: 5px 8px;
  font-size: 0.84rem;
}

.segment-option span {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.8rem;
}

.button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.print-switch-field {
  min-height: 34px;
}

.switch-control {
  gap: 7px;
  font-size: 0.82rem;
}

.switch-track {
  width: 40px;
  height: 22px;
}

.switch-track::after {
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(18px);
}

.ideal-price-card {
  gap: 8px;
  margin-top: 6px;
  padding: 10px;
  border-radius: 10px;
}

.ideal-price-head {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 2px 0 4px;
}

.ideal-price-head > div:first-child {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.ideal-price-label {
  margin: 0;
  color: var(--green-deep);
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.ideal-price-number {
  font-size: clamp(1.9rem, 3.1vw, 2.55rem);
  line-height: 0.96;
  color: var(--green-deep);
}

.ideal-price-description {
  max-width: 58ch;
  margin: 0;
  color: #52635b;
  font-size: 0.82rem;
  font-weight: 650;
}

.ideal-price-badge {
  min-height: 24px;
  padding: 0 9px;
  font-size: 0.7rem;
  opacity: 0.82;
}

.ideal-price-methods {
  gap: 6px;
}

.ideal-price-grid {
  gap: 6px;
}

.ideal-price-cell {
  gap: 3px;
  padding: 7px 8px;
}

.ideal-price-grid span {
  font-size: 0.72rem;
}

.ideal-price-inline-input {
  min-height: 32px;
  font-size: 0.92rem;
}

.ideal-price-currency-prefix {
  font-size: 0.92rem !important;
}

.ideal-price-config {
  gap: 8px;
}

.ideal-price-manual-note {
  padding: 8px;
}

.result-spotlight {
  gap: 6px;
}

.metric-card {
  min-height: 64px;
  padding: 7px 8px;
}

.metric-label {
  font-size: 0.72rem;
}

.metric-value {
  font-size: 0.88rem;
}

.summary-list {
  gap: 6px;
}

.summary-list div,
.summary-list.compact div {
  padding: 6px 7px;
}

.summary-list span,
.summary-list strong {
  font-size: 0.8rem;
}

.compact-measure-block {
  gap: 8px;
}

.measure-quantity-grid,
.quantity-print-grid {
  gap: 8px;
}

.financial-summary-list {
  gap: 5px;
}

.financial-summary-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.financial-summary-list strong {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.summary-money {
  font-variant-numeric: tabular-nums;
}

.summary-percent {
  min-width: 52px;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.summary-row--featured {
  border-width: 1px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.summary-row--featured span:first-child {
  color: var(--text);
  font-weight: 800;
}

.summary-row--featured strong,
.summary-row--featured .summary-percent {
  color: var(--text);
  font-weight: 900;
}

.metric-card {
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease,
    transform 180ms ease;
}

.metric-card--featured {
  border-width: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.metric-card--featured .metric-label,
.metric-card--featured .metric-value {
  color: var(--text);
}

.message-panel {
  padding: 8px 10px;
  font-size: 0.82rem;
}

.technical-details summary {
  min-height: 34px;
  padding: 8px 10px;
}

@media (max-width: 860px) {
  body {
    font-size: 13.5px;
  }

  .field-input,
  .button,
  .quick-link,
  .catalog-tab,
  .segment-option span {
    min-height: 38px;
  }

  .switch-track {
    width: 44px;
    height: 24px;
  }

  .switch-track::after {
    width: 18px;
    height: 18px;
  }

  .switch-control input:checked + .switch-track::after {
    transform: translateX(20px);
  }

  .ideal-price-number {
    font-size: 2rem;
  }

  .financial-summary-list div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .financial-summary-list strong {
    justify-content: space-between;
    width: 100%;
  }

  .history-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .history-status-filter {
    width: 100%;
  }
}

/* Price UX feedback */
.ideal-price-card {
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.ideal-price-card--success {
  border-color: rgba(18, 112, 61, 0.22);
}

.ideal-price-card--warning {
  border-color: rgba(180, 145, 20, 0.28);
  background: linear-gradient(180deg, #fffdf4 0%, #fffaf0 100%);
}

.ideal-price-card--critical {
  border-color: rgba(186, 46, 46, 0.28);
  background: linear-gradient(180deg, #fff8f7 0%, #fff2f0 100%);
}

.ideal-price-input-card {
  position: relative;
  border-width: 2px;
  background: #fffef8;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.ideal-price-input-card.is-success {
  border-color: rgba(18, 112, 61, 0.45);
  box-shadow: inset 0 0 0 1px rgba(18, 112, 61, 0.05);
}

.ideal-price-input-card.is-warning {
  border-color: rgba(180, 145, 20, 0.55);
  background: #fff9e8;
  animation: priceAttentionPulse 1.4s ease-out 1;
}

.ideal-price-input-card.is-critical {
  border-color: rgba(186, 46, 46, 0.62);
  background: #fff2ef;
  animation: priceCriticalPulse 1.6s ease-out 1;
}

.edit-pill {
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(13, 110, 168, 0.1);
  color: var(--blue);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.price-status-cell {
  transition: border-color 180ms ease, background 180ms ease;
}

.ideal-price-input-card label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.price-status-cell.is-success {
  border-color: rgba(18, 112, 61, 0.28);
  background: rgba(18, 112, 61, 0.1);
}

.price-status-cell.is-warning {
  border-color: rgba(180, 145, 20, 0.3);
  background: #fff4cf;
  animation: priceAttentionPulse 1.4s ease-out 1;
}

.price-status-cell.is-critical {
  border-color: rgba(186, 46, 46, 0.34);
  background: #ffe1dc;
  animation: priceCriticalPulse 1.6s ease-out 1;
}

.price-decision-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
}

.price-decision-summary div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.price-decision-summary span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.price-decision-summary strong {
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.15;
}

.price-decision-summary.is-success {
  border-color: rgba(18, 112, 61, 0.22);
}

.price-decision-summary.is-warning {
  border-color: rgba(180, 145, 20, 0.26);
  background: #fffaf0;
}

.price-decision-summary.is-critical {
  border-color: rgba(186, 46, 46, 0.28);
  background: #fff4f2;
}

.price-reference-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.price-reference-card {
  display: grid;
  gap: 2px;
  padding: 7px 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
}

.price-reference-card span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.price-reference-card strong {
  color: var(--text);
  font-size: 0.95rem;
}

.price-reference-card small {
  color: var(--muted);
  font-size: 0.68rem;
}

.price-reference-card.is-success {
  border-color: rgba(18, 112, 61, 0.22);
  background: rgba(18, 112, 61, 0.08);
}

.price-reference-card.is-warning {
  border-color: rgba(180, 145, 20, 0.24);
  background: #fff8df;
}

.price-reference-card.is-critical {
  border-color: rgba(186, 46, 46, 0.2);
  background: #fff5f3;
}

.ideal-price-card--compact {
  gap: 7px;
  padding: 8px;
}

.ideal-price-head--compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-items: start;
  gap: 10px;
  padding: 0 0 3px;
  text-align: left;
}

.ideal-price-head--compact > div:first-child {
  justify-items: start;
  gap: 1px;
}

.ideal-price-head--compact .ideal-price-label {
  font-size: 0.68rem;
}

.ideal-price-head--compact .ideal-price-number {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1;
}

.ideal-price-head--compact .ideal-price-description {
  max-width: 72ch;
  font-size: 0.72rem;
  font-weight: 600;
}

.ideal-price-head--compact .ideal-price-badge {
  min-height: 22px;
  padding: 0 8px;
  font-size: 0.64rem;
  white-space: nowrap;
}

.ideal-price-grid--main {
  grid-template-columns: minmax(190px, 1.25fr) repeat(4, minmax(118px, 1fr));
  align-items: stretch;
}

.ideal-price-grid--main .ideal-price-cell--wide {
  grid-column: auto;
}

.ideal-price-cell--subtle {
  border-color: var(--line);
  background: #fff;
}

.price-technical-details {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.price-technical-details summary {
  position: relative;
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 7px 34px 7px 10px;
  color: var(--blue);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
  list-style: none;
}

.price-technical-details summary::-webkit-details-marker {
  display: none;
}

.price-technical-details summary::after {
  content: "+";
  position: absolute;
  right: 11px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
}

.price-technical-details[open] summary::after {
  content: "-";
}

.price-technical-content {
  display: grid;
  gap: 6px;
  padding: 0 7px 7px;
}

.price-technical-details:not([open]) .price-technical-content {
  display: none;
}

.price-technical-details .price-reference-strip,
.price-technical-details .price-decision-summary {
  margin: 0;
}

.price-technical-details .price-reference-card {
  padding: 6px 7px;
  background: #fff;
}

.price-technical-details .price-reference-card.is-success,
.price-technical-details .price-reference-card.is-warning,
.price-technical-details .price-reference-card.is-critical {
  background: #fff;
}

.price-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.price-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 17, 0.42);
}

.price-confirm-dialog {
  position: relative;
  width: min(560px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(186, 46, 46, 0.24);
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 22, 17, 0.28);
}

.price-confirm-head {
  display: grid;
  gap: 4px;
}

.price-confirm-head h2 {
  margin: 0;
  font-size: 1.18rem;
}

.price-confirm-head p {
  margin: 0;
  color: var(--muted);
}

.price-confirm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.price-confirm-grid div {
  display: grid;
  gap: 3px;
  padding: 9px;
  border-radius: 8px;
  background: #fff5f3;
  border: 1px solid rgba(186, 46, 46, 0.12);
}

.price-confirm-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.price-confirm-grid strong {
  font-size: 0.95rem;
}

.price-confirm-actions {
  justify-content: end;
}

.quick-client-modal {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 18px;
}

.quick-client-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 17, 0.5);
}

.quick-client-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(8, 22, 17, 0.3);
}

.quick-client-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.quick-client-head h2,
.quick-client-head p {
  margin: 0;
}

.quick-client-head p {
  color: var(--muted);
}

.quick-client-form {
  display: grid;
  gap: 14px;
}

.quick-client-actions-footer {
  justify-content: end;
  position: sticky;
  bottom: -18px;
  z-index: 1;
  margin: 0 -18px -18px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.quick-client-save-message {
  flex: 1 1 320px;
  align-self: center;
  margin: 0 auto 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
}

.quick-client-save-message[data-tone="success"] {
  color: var(--success, #13713f);
}

.quick-client-save-message[data-tone="warning"],
.quick-client-save-message[data-tone="error"] {
  color: var(--danger, #b42318);
}

.official-budget-modal {
  position: fixed;
  inset: 0;
  z-index: 22;
  display: grid;
  place-items: center;
  padding: 18px;
}

.official-budget-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 17, 0.48);
}

.official-budget-dialog {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(8, 22, 17, 0.3);
}

.official-budget-head {
  display: grid;
  gap: 4px;
}

.official-budget-head h2,
.official-budget-head p,
.official-budget-group h3 {
  margin: 0;
}

.official-budget-head p {
  color: var(--muted);
}

.official-budget-form-grid,
.official-budget-group {
  display: grid;
  gap: 12px;
}

.official-budget-group {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.field-span-2 {
  grid-column: span 2;
}

.field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.quote-client-field {
  min-width: 0;
}

.quote-client-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.quote-customer-combobox {
  position: relative;
  min-width: 0;
}

.quote-customer-search {
  padding-right: 40px;
}

.quote-customer-results {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 288px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.quote-customer-results[hidden] {
  display: none;
}

.quote-customer-result {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.quote-customer-result:hover,
.quote-customer-result.is-active {
  background: var(--green-soft);
}

.quote-customer-result strong {
  overflow-wrap: anywhere;
  font-size: 0.84rem;
}

.quote-customer-result small,
.quote-customer-search-message {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.quote-customer-search-message {
  display: block;
  padding: 10px 11px;
}

.quote-client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-client-actions .button {
  flex: 1 1 auto;
}

.button-compact {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.field-hint {
  display: block;
  min-height: 14px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.field-hint.is-error {
  color: var(--danger);
}

.field-hint.is-success {
  color: var(--success);
}

.official-budget-actions {
  justify-content: flex-end;
}

.history-items-mini {
  display: grid;
  gap: 6px;
}

.history-items-mini div {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.history-items-mini span {
  display: inline-flex;
  justify-content: center;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(18, 112, 61, 0.1);
  color: var(--green-deep);
  font-size: 0.72rem;
  font-weight: 800;
}

.history-items-mini em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.orc-print-area {
  display: none;
}

.orc-print-document {
  color: #17251f;
  font-family: "Aptos", "Segoe UI", Arial, sans-serif;
  font-size: 10.2pt;
  line-height: 1.22;
}

.orc-print-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10mm;
  padding-bottom: 4mm;
  margin-bottom: 4mm;
  border-bottom: 1.4pt solid #12703d;
}

.orc-print-brand {
  color: #0a4f2b;
  font-size: 18pt;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.orc-print-header span,
.orc-print-info span,
.orc-print-commercial span,
.orc-print-footer,
.orc-print-money-row em {
  color: #5b665f;
}

.orc-print-title {
  text-align: right;
}

.orc-print-title h1 {
  margin: 0 0 1mm;
  font-size: 20pt;
  line-height: 1;
}

.orc-print-section {
  margin: 0 0 3.2mm;
  break-inside: avoid;
  page-break-inside: avoid;
}

.orc-print-section h2 {
  margin: 0 0 1.6mm;
  color: #0a4f2b;
  font-size: 9.3pt;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.orc-print-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.8mm;
}

.orc-print-grid--identity {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.orc-print-info,
.orc-print-money-row,
.orc-print-note {
  padding: 2mm 2.4mm;
  border: 0.7pt solid #d7ddd8;
  border-radius: 3mm;
  background: #fbfcfb;
}

.orc-print-info {
  display: grid;
  gap: 0.8mm;
}

.orc-print-info span,
.orc-print-commercial span {
  font-size: 7.4pt;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.orc-print-info strong {
  font-size: 9.4pt;
}

.orc-print-commercial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2mm;
}

.orc-print-commercial div {
  display: grid;
  gap: 0.8mm;
  padding: 3mm;
  border-radius: 3mm;
  border: 1pt solid rgba(18, 112, 61, 0.28);
  background: #eef7ef;
}

.orc-print-commercial strong {
  color: #0a4f2b;
  font-size: 17pt;
  line-height: 1;
}

.orc-print-money-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6mm;
}

.orc-print-money-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3mm;
  min-height: 8.6mm;
}

.orc-print-money-row span {
  font-weight: 650;
}

.orc-print-money-row strong {
  white-space: nowrap;
}

.orc-print-money-row em {
  margin-left: 1.5mm;
  font-style: normal;
  font-size: 8pt;
}

.orc-print-note {
  margin: 0;
  min-height: 9mm;
}

.orc-print-footer {
  display: flex;
  justify-content: space-between;
  gap: 6mm;
  padding-top: 3mm;
  margin-top: 3mm;
  border-top: 0.7pt solid #d7ddd8;
  font-size: 7.8pt;
}

html.theme-dark .hero-card,
html.theme-dark .panel-card,
html.theme-dark .formula-card,
html.theme-dark .memory-card,
html.theme-dark .form-block,
html.theme-dark .result-spotlight,
html.theme-dark .technical-details summary,
html.theme-dark .price-technical-details,
html.theme-dark .price-decision-summary,
html.theme-dark .price-reference-card,
html.theme-dark .price-confirm-dialog {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
  box-shadow: var(--shadow);
}

html.theme-dark .brand-bar,
html.theme-dark .quick-link,
html.theme-dark .field-input,
html.theme-dark .segment-option span,
html.theme-dark .button,
html.theme-dark .data-table,
html.theme-dark .data-table tbody td,
html.theme-dark .summary-list div,
html.theme-dark .ideal-price-cell,
html.theme-dark .ideal-price-cell--subtle,
html.theme-dark .metric-card,
html.theme-dark .price-confirm-grid div {
  background: rgba(15, 23, 42, 0.88);
  border-color: var(--line);
  color: var(--text);
}

html.theme-dark .field-input,
html.theme-dark select,
html.theme-dark textarea,
html.theme-dark .ideal-price-inline-input {
  background: #0f172a;
  color: var(--text);
  border-color: var(--line);
}

html.theme-dark option {
  background: #0f172a;
  color: var(--text);
}

html.theme-dark .quote-customer-results {
  background: #0f172a;
  border-color: var(--line);
}

html.theme-dark .quote-customer-result:hover,
html.theme-dark .quote-customer-result.is-active {
  background: rgba(34, 197, 94, 0.18);
}

html.theme-dark .quick-link.is-active,
html.theme-dark .segment-option input:checked + span,
html.theme-dark .catalog-tab.is-active {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(34, 197, 94, 0.32);
  color: var(--green-deep);
}

html.theme-dark .pcp-panel,
html.theme-dark .pcp-group-card,
html.theme-dark .pcp-summary-cards span,
html.theme-dark .pcp-kpis span,
html.theme-dark .pcp-rule,
html.theme-dark .pcp-tab {
  background: rgba(15, 23, 42, 0.78);
  border-color: var(--line);
}

html.theme-dark .pcp-sheet-drawing svg {
  background: #f8fafc;
}

html.theme-dark .pcp-sheet-preview {
  background: #f8fafc;
  border-color: var(--line);
}

html.theme-dark .pcp-status.is-good {
  color: #bbf7d0;
}

html.theme-dark .pcp-status.is-warning {
  color: #fde68a;
}

html.theme-dark .pcp-status.is-danger {
  color: #fecaca;
}

html.theme-dark .button-primary {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #f8fffb;
}

html.theme-dark .button-secondary {
  background: rgba(96, 165, 250, 0.14);
  border-color: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}

html.theme-dark .is-success,
html.theme-dark .tone-green,
html.theme-dark .ideal-price-cell--markup-green,
html.theme-dark .price-status-cell.is-success,
html.theme-dark .ideal-price-input-card.is-success {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.34);
  color: #bbf7d0;
}

html.theme-dark .is-warning,
html.theme-dark .tone-yellow,
html.theme-dark .ideal-price-cell--markup-yellow,
html.theme-dark .price-status-cell.is-warning,
html.theme-dark .ideal-price-input-card.is-warning {
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(250, 204, 21, 0.38);
  color: #fde68a;
}

html.theme-dark .is-error,
html.theme-dark .tone-red,
html.theme-dark .ideal-price-cell--markup-red,
html.theme-dark .price-status-cell.is-critical,
html.theme-dark .ideal-price-input-card.is-critical {
  background: rgba(248, 113, 113, 0.16);
  border-color: rgba(248, 113, 113, 0.38);
  color: #fecdd3;
}

html.theme-dark .ideal-price-cell--markup-green strong,
html.theme-dark .ideal-price-cell--markup-green span:last-of-type,
html.theme-dark .ideal-price-cell--markup-green .field-help {
  color: #bbf7d0;
}

html.theme-dark .ideal-price-cell--markup-yellow strong,
html.theme-dark .ideal-price-cell--markup-yellow .field-help {
  color: #fde68a;
}

html.theme-dark .ideal-price-cell--markup-red strong,
html.theme-dark .ideal-price-cell--markup-red .field-help {
  color: #fecdd3;
}

html.theme-dark .table-muted,
html.theme-dark .field-help,
html.theme-dark .section-heading p,
html.theme-dark .brand-copy p,
html.theme-dark .summary-percent {
  color: var(--muted);
}

html.theme-dark .data-table thead th {
  background: rgba(34, 197, 94, 0.12);
  border-color: var(--line);
  color: var(--green-deep);
}

html.theme-dark .price-technical-details .price-reference-card.is-success,
html.theme-dark .price-technical-details .price-reference-card.is-warning,
html.theme-dark .price-technical-details .price-reference-card.is-critical {
  background: rgba(15, 23, 42, 0.88);
}

@keyframes priceAttentionPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(180, 145, 20, 0.28);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(180, 145, 20, 0);
  }
}

@keyframes priceCriticalPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(186, 46, 46, 0.32);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(186, 46, 46, 0);
  }
}

@media (max-width: 860px) {
  .ideal-price-head--compact {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .ideal-price-head--compact > div:first-child {
    justify-items: center;
  }

  .ideal-price-grid--main {
    grid-template-columns: 1fr 1fr;
  }

  .price-decision-summary,
  .price-confirm-grid,
  .price-reference-strip {
    grid-template-columns: 1fr 1fr;
  }

  .price-confirm-dialog {
    padding: 14px;
  }
}

@media (max-width: 520px) {
  .ideal-price-grid--main {
    grid-template-columns: 1fr;
  }

  .price-decision-summary,
  .price-confirm-grid,
  .price-reference-strip {
    grid-template-columns: 1fr;
  }
}

.material-minimum-hint {
  align-self: end;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid rgba(18, 112, 61, 0.14);
  border-radius: 9px;
  background: rgba(18, 112, 61, 0.06);
  color: var(--green-deep);
  font-size: 0.75rem;
  line-height: 1.25;
}

.quantity-print-grid {
  grid-template-columns: minmax(120px, 0.72fr) minmax(138px, 0.68fr) minmax(265px, 1.58fr) minmax(165px, 1fr) !important;
}

.quantity-print-grid .print-switch-field {
  justify-content: center;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.quantity-print-grid .print-colors-field {
  min-width: 0;
  margin-left: 0;
}

.material-minimum-hint[hidden] {
  display: none;
}

.material-minimum-hint__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.material-minimum-hint__text strong,
.material-minimum-hint__text span {
  overflow-wrap: anywhere;
}

.material-minimum-hint__button {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 0 9px;
  font-size: 0.72rem;
}

.material-minimum-hint.is-warning {
  border-color: rgba(180, 145, 20, 0.3);
  background: linear-gradient(180deg, #fff6d8, #fffaf0);
  color: #7b5b00;
}

.material-minimum-hint.is-success {
  border-color: rgba(18, 112, 61, 0.2);
  background: rgba(18, 112, 61, 0.08);
  color: var(--green-deep);
}

.material-minimum-hint.is-pending {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface);
}

html.theme-dark .material-minimum-hint {
  background: rgba(80, 190, 123, 0.11);
  border-color: rgba(126, 221, 155, 0.22);
  color: #dff8e8;
}

html.theme-dark .material-minimum-hint.is-warning {
  background: rgba(250, 204, 21, 0.14);
  border-color: rgba(250, 204, 21, 0.26);
  color: #f8e2a0;
}

@media (max-width: 860px) {
  .material-minimum-hint {
    align-items: stretch;
    flex-direction: column;
  }

  .material-minimum-hint__button {
    width: 100%;
  }
}

.subheading-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.accessories-list {
  display: grid;
  gap: 12px;
}

.fefco-plan-panel {
  min-width: 0;
}

.fefco-plan-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.fefco-plan-head .subheading {
  flex: 1 1 auto;
  min-width: 0;
}

.fefco-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.fefco-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1;
}

.fefco-plan-content {
  display: grid;
  gap: 9px;
}

.fefco-plan-content[hidden] {
  display: none;
}

.fefco-plan-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.fefco-orientation-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.fefco-summary {
  display: grid;
  grid-template-columns: minmax(110px, 0.7fr) minmax(280px, 2fr) repeat(2, minmax(150px, 1fr));
  gap: 8px;
}

.fefco-summary--collapsed {
  margin-top: 6px;
}

.fefco-summary__pending {
  grid-column: 1 / -1;
}

.fefco-summary span {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.fefco-summary strong {
  color: var(--text);
  font-size: 0.83rem;
  line-height: 1.35;
}

.fefco-drawing-wrap {
  min-width: 0;
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.fefco-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.fefco-svg {
  display: block;
  width: min(100%, 1040px);
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  background: var(--card);
}

.fefco-svg--rotated {
  width: min(100%, 1040px);
  max-height: min(500px, 70vh);
}

.fefco-svg__body {
  fill: rgba(18, 112, 61, 0.06);
}

.fefco-svg__glue {
  fill: rgba(202, 138, 4, 0.16);
}

.fefco-svg__flap {
  fill: rgba(18, 112, 61, 0.11);
}

.fefco-svg__cut {
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
}

.fefco-svg__crease {
  fill: none;
  stroke: #0f766e;
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
}

.fefco-svg__panel-label,
.fefco-svg__panel-value,
.fefco-svg__dimension-text {
  fill: var(--text);
  font-family: inherit;
  font-size: 12px;
  text-anchor: middle;
}

.fefco-svg__panel-label {
  font-weight: 750;
}

.fefco-svg__panel-value,
.fefco-svg__dimension-text {
  fill: var(--muted);
  font-size: 11px;
}

.fefco-svg__dimension {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1;
  marker-start: none;
  marker-end: none;
}

.fefco-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.77rem;
}

.fefco-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fefco-legend i {
  display: inline-block;
  width: 18px;
  height: 3px;
}

.fefco-legend .is-cut {
  background: var(--text);
}

.fefco-legend .is-crease {
  border-top: 2px dashed #0f766e;
}

.fefco-legend .is-flap {
  height: 10px;
  border: 1px solid rgba(18, 112, 61, 0.22);
  background: rgba(18, 112, 61, 0.11);
}

.fefco-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.accessory-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 112, 61, 0.03);
}

.accessory-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.accessory-remove {
  min-height: 30px;
  padding: 0 10px;
}

.accessory-fields {
  padding-top: 2px;
}

.accessory-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.accessory-result {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.accessory-result span {
  padding: 7px 10px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.accessory-result strong {
  color: var(--text);
}

.accessory-technical-summary,
.accessory-preview {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.accessory-technical-summary h4,
.accessory-preview h4 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.accessory-explanation {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.accessory-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 7px;
}

.accessory-facts span {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 7px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.accessory-facts strong {
  color: var(--text);
  font-size: 0.82rem;
}

.accessory-cut-list {
  display: grid;
  gap: 5px;
  padding: 10px;
  border-radius: 7px;
  background: var(--card);
  color: var(--text);
  font-size: 0.8rem;
}

.accessory-cut-list p {
  margin: 0;
  line-height: 1.4;
}

.accessory-validation {
  margin: 0;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 700;
}

.accessory-validation.is-success {
  color: #166534;
  background: rgba(34, 197, 94, 0.13);
}

.accessory-validation.is-warning {
  color: #92400e;
  background: rgba(245, 158, 11, 0.16);
}

.accessory-validation.is-error {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.14);
}

.accessory-preview-empty {
  padding: 11px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.accessory-svg {
  display: block;
  width: min(100%, 430px);
  height: auto;
  min-height: 205px;
  border-radius: 8px;
  background: var(--card);
}

.accessory-svg__box {
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
}

.accessory-svg__useful {
  fill: rgba(18, 112, 61, 0.04);
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.accessory-svg__longitudinal {
  stroke: #0f766e;
  stroke-width: 2.5;
}

.accessory-svg__transversal {
  stroke: #ca8a04;
  stroke-width: 2.5;
}

.accessory-svg__tray {
  fill: rgba(18, 112, 61, 0.12);
  stroke: var(--accent);
  stroke-width: 2;
}

.accessory-svg__measure,
.accessory-svg__caption {
  fill: var(--muted);
  font-size: 11px;
  font-family: inherit;
  text-anchor: middle;
}

.accessory-svg__caption {
  text-anchor: start;
  font-weight: 700;
}

.accessory-preview__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.accessory-preview__legend span {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.accessory-preview__legend i {
  display: inline-block;
  width: 15px;
  height: 3px;
  border-radius: 99px;
}

.accessory-preview__legend .is-longitudinal {
  background: #0f766e;
}

.accessory-preview__legend .is-transversal {
  background: #ca8a04;
}

.accessory-preview__legend .is-tray {
  height: 9px;
  border: 1px solid var(--accent);
  background: rgba(18, 112, 61, 0.12);
}

html.theme-dark .accessory-card {
  background: rgba(34, 197, 94, 0.06);
}

html.theme-dark .accessory-validation.is-success {
  color: #86efac;
}

html.theme-dark .accessory-validation.is-warning {
  color: #fcd34d;
}

html.theme-dark .accessory-validation.is-error {
  color: #fca5a5;
}

@media (max-width: 1180px) and (min-width: 861px) {
  .quantity-print-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 860px) {
  .quantity-print-grid {
    grid-template-columns: 1fr !important;
  }

  .subheading-action {
    flex-direction: column;
  }

  .fefco-plan-head {
    flex-direction: column;
  }

  .fefco-plan-actions,
  .fefco-toggle {
    width: 100%;
  }

  .fefco-plan-actions .button {
    flex: 1 1 0;
  }

  .fefco-summary {
    grid-template-columns: 1fr;
  }

  .accessory-svg {
    min-height: 0;
  }
}

@page {
  size: A4 portrait;
  margin: 10mm;
}

@media (max-width: 920px) {
  .quote-items-head,
  .quote-item-row {
    grid-template-columns: 1fr;
  }

  .quote-items-head {
    display: grid;
  }

  .quote-items-actions,
  .quote-item-actions,
  .quote-items-total {
    justify-content: stretch;
  }

  .resale-product-meta {
    grid-column: 1 / -1;
  }

  .resale-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-items-actions .button,
  .quote-item-actions .table-action {
    flex: 1 1 auto;
  }

  .quote-item-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-span-2 {
    grid-column: auto;
  }
}

@media print {
  html,
  body {
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    color: #17251f !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.print-budget-mode > :not(#orcPrintArea) {
    display: none !important;
  }

  body.print-budget-mode #orcPrintArea {
    display: block !important;
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: visible !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body.print-budget-mode #orcPrintArea * {
    visibility: visible !important;
  }

  body.print-budget-mode .orc-print-document {
    width: 100%;
    max-height: none;
    overflow: visible;
  }

  body.print-budget-mode .orc-print-section,
  body.print-budget-mode .orc-print-header,
  body.print-budget-mode .orc-print-footer {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
/* Política comercial e revisão formal de preço — v1 2026-07-21 */
.pricing-policy-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #b9dcc9;
  border-radius: 18px;
  background: linear-gradient(135deg, #f4fbf7 0%, #ffffff 72%);
  box-shadow: 0 14px 34px rgba(15, 93, 55, 0.08);
}

.pricing-policy-card.is-reviewing {
  border-color: #7c9cff;
  background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 72%);
}

.pricing-policy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.pricing-policy-head h4 { margin: 3px 0 4px; font-size: 1.08rem; color: #103c29; }
.pricing-policy-head p { margin: 0; color: #607266; font-size: 0.88rem; }

.pricing-policy-status,
.price-review-badge {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.pricing-policy-status { background: #e1f5e9; color: #11633c; }
.pricing-policy-status.is-pending,
.price-review-badge.is-pending { background: #fff2c7; color: #8d5a00; }
.pricing-policy-status.is-approved,
.price-review-badge.is-approved { background: #ddf7e8; color: #0e6b3a; }
.price-review-badge.is-returned { background: #fee8e8; color: #a62a2a; }
.price-review-badge { display: flex; margin-top: 6px; }
.price-review-target-label {
  display: block;
  margin-top: 5px;
  color: #486055;
  font-size: .75rem;
  font-weight: 750;
}

.pricing-policy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pricing-policy-grid > div,
.policy-price-editor {
  min-height: 86px;
  padding: 12px;
  border: 1px solid #d9e8df;
  border-radius: 13px;
  background: rgba(255,255,255,.92);
}

.pricing-policy-grid span,
.pricing-policy-grid small { display: block; color: #647469; font-size: 0.76rem; }
.pricing-policy-grid strong { display: block; margin-top: 7px; color: #10281e; font-size: 1.12rem; }
.pricing-policy-grid small { margin-top: 3px; }
.policy-price-editor { grid-column: span 2; }

.table-action.is-review { color: #725100; border-color: #e8c354; background: #fff8dd; }
.table-action.is-review-master { color: #fff; border-color: #3158d5; background: #3158d5; }

.price-review-modal { position: fixed; inset: 0; z-index: 10050; display: grid; place-items: center; padding: 24px; }
.price-review-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .62); backdrop-filter: blur(5px); }
.price-review-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 96vw);
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15,23,42,.28);
}
.price-review-dialog.is-master { width: min(960px, 96vw); }
.price-review-dialog header { margin-bottom: 18px; }
.price-review-dialog header h2 { margin: 4px 0 6px; color: #10251c; }
.price-review-dialog header p { margin: 0; color: #627168; }
.price-review-dialog-error { color: #b42318; font-weight: 750; }
.seller-review-list,
.master-review-list { display: grid; gap: 10px; margin-bottom: 16px; }
.seller-review-item,
.master-review-item {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(180px, .7fr);
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid #dce7e1;
  border-radius: 14px;
  background: #f8fbf9;
}
.seller-review-item strong,
.seller-review-item small,
.master-review-item strong,
.master-review-item small { display: block; }
.seller-review-item small,
.master-review-item small { margin-top: 5px; color: #65756b; }
.price-review-guidance {
  display: grid;
  gap: 3px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #e7c979;
  border-radius: 13px;
  background: #fff9e7;
  color: #70510b;
}
.price-review-guidance span { font-size: .84rem; line-height: 1.45; }
.price-review-request-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.price-review-request-summary > div {
  padding: 11px 13px;
  border: 1px solid #dce7e1;
  border-radius: 13px;
  background: #f8fbf9;
}
.price-review-request-summary .is-wide { grid-column: 1 / -1; }
.price-review-request-summary span,
.price-review-request-summary strong { display: block; }
.price-review-request-summary span { color: #65756b; font-size: .76rem; }
.price-review-request-summary strong { margin-top: 4px; color: #10281e; }
.master-review-target {
  display: inline-flex;
  gap: 5px;
  margin-top: 8px;
  color: #765300;
  font-size: .8rem;
  font-weight: 750;
}
.master-review-target strong { display: inline; color: #765300; }

@media (max-width: 900px) {
  .pricing-policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-policy-head,
  .seller-review-item,
  .master-review-item { grid-template-columns: 1fr; display: grid; }
  .price-review-request-summary { grid-template-columns: 1fr; }
  .price-review-request-summary .is-wide { grid-column: auto; }
}

[data-theme="dark"] .pricing-policy-card,
body.theme-dark .pricing-policy-card,
html.theme-dark .pricing-policy-card,
[data-theme="dark"] .price-review-dialog,
body.theme-dark .price-review-dialog,
html.theme-dark .price-review-dialog {
  background: #14231c;
  border-color: #315341;
  color: #edf8f1;
}
[data-theme="dark"] .pricing-policy-grid > div,
[data-theme="dark"] .policy-price-editor,
[data-theme="dark"] .seller-review-item,
[data-theme="dark"] .master-review-item,
[data-theme="dark"] .price-review-request-summary > div,
body.theme-dark .pricing-policy-grid > div,
body.theme-dark .policy-price-editor,
body.theme-dark .seller-review-item,
body.theme-dark .master-review-item,
body.theme-dark .price-review-request-summary > div,
html.theme-dark .pricing-policy-grid > div,
html.theme-dark .policy-price-editor,
html.theme-dark .seller-review-item,
html.theme-dark .master-review-item,
html.theme-dark .price-review-request-summary > div { background: #1b2d24; border-color: #365544; }

html.theme-dark .pricing-policy-head h4,
html.theme-dark .pricing-policy-grid strong,
html.theme-dark .price-review-dialog header h2,
html.theme-dark .seller-review-item strong,
html.theme-dark .price-review-request-summary strong,
html.theme-dark .master-review-item strong { color: var(--text); }

html.theme-dark .pricing-policy-head p,
html.theme-dark .pricing-policy-grid span,
html.theme-dark .pricing-policy-grid small,
html.theme-dark .price-review-dialog header p,
html.theme-dark .seller-review-item small,
html.theme-dark .price-review-request-summary span,
html.theme-dark .master-review-item small { color: var(--muted); }

[data-theme="dark"] .price-review-guidance,
body.theme-dark .price-review-guidance,
html.theme-dark .price-review-guidance {
  border-color: #7a621e;
  background: #342d18;
  color: #f4d77d;
}

[data-theme="dark"] .price-review-target-label,
body.theme-dark .price-review-target-label,
html.theme-dark .price-review-target-label { color: var(--muted); }
