.detail.detail-orc {
  padding: 10px 0 32px;
  background: transparent;
}

.eng-layout {
  display: grid;
  gap: 16px;
}

.eng-subnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.eng-orc-page {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.eng-orc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eng-orc-title {
  margin: 0;
  color: #122c4f;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.eng-orc-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.led-orc-select {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.led-orc-select-bar {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  flex-wrap: wrap;
}

.led-orc-select-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-left: auto;
}

.orc-ai-spend-panel {
  margin: 0;
  flex: 1 1 280px;
  min-width: 240px;
  max-width: 420px;
}

.orc-ai-spend {
  padding: 14px 16px;
  border-radius: 0.75rem;
  background: #f8f7f6;
  border: 1px solid #e8ebee;
  font-family: Poppins, sans-serif;
}

.orc-ai-spend.is-blocked {
  border-color: #a83b2a;
  background: #fdf6f4;
}

.orc-ai-spend-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #122c4f;
  margin-bottom: 4px;
}

.orc-ai-spend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 0.875rem;
  color: #1b1b1b;
}

.orc-ai-spend-row strong {
  font-size: 1.125rem;
  color: #143156;
}

.orc-ai-spend-meta {
  color: #686868;
  font-size: 0.75rem;
}

.orc-ai-spend-model {
  margin-top: 4px;
  font-size: 0.6875rem;
  color: #686868;
}

.orc-ai-spend-hint,
.orc-ai-spend-lock {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: #686868;
  line-height: 1.4;
}

.orc-ai-spend-lock {
  color: #a83b2a;
}

.orc-ai-spend-live {
  margin-top: 8px;
  font-size: 0.8125rem;
}

.import-ai-progress {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f4f6f8;
  border: 1px solid #e5e8eb;
}

.import-ai-progress .job-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.import-ai-progress .job-head strong {
  color: #122c4f;
  font-size: 0.875rem;
}

.import-ai-progress .job-elapsed {
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  color: #55635f;
}

.import-ai-progress .progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #dce0e6;
  overflow: hidden;
}

.import-ai-progress .progress-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #647fa2, #122c4f);
  transition: width 0.45s ease;
}

.import-ai-progress .hint {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  color: #55635f;
  line-height: 1.4;
}

.import-run-host {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 20px 14px;
  background: #e8ecf2;
  border-bottom: 2px solid #143156;
  box-shadow: 0 6px 16px rgba(20, 49, 86, 0.12);
  font-family: Poppins, sans-serif;
}

.import-run-host[hidden] {
  display: none !important;
}

.import-run-host.is-error {
  background: #fdf6f6;
  border-bottom-color: #efc3c3;
}

.import-run-host.is-done {
  background: #eef7ef;
  border-bottom-color: #8fbf8f;
}

.import-run-banner {
  margin: 0;
  font-size: 0.8125rem;
  color: #1b1b1b;
}

.import-run-host .progress-wrap {
  margin-top: 8px;
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f4f6f8;
}

.import-run-host .job-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.import-run-host .job-head strong {
  color: #122c4f;
  font-size: 0.875rem;
}

.import-run-host .progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #dce0e6;
  overflow: hidden;
}

.import-run-host .progress-bar > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #647fa2, #122c4f);
  transition: width 0.45s ease;
}

.import-run-host .hint {
  margin: 8px 0 0;
  font-size: 0.8125rem;
  color: #55635f;
}

.led-orc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.led-orc-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  padding: 20px 22px 16px;
  background: #F8F7F6;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: none;
  cursor: pointer;
  position: relative;
}

.led-orc-card:hover {
  box-shadow: 0 8px 24px rgba(18, 44, 79, 0.1);
}

.led-orc-card.is-selected {
  outline: 2px solid #122c4f;
  outline-offset: 1px;
  background: #eff2f6;
  box-shadow: 0 8px 24px rgba(18, 44, 79, 0.12);
}

.led-orc-card-name {
  color: #122c4f;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
  padding-right: 72px;
}

.led-orc-card-val {
  margin-top: auto;
  color: #122c4f;
  font-size: 1.375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.led-orc-card-meta {
  color: #8a8a8a;
  font-size: 0.75rem;
}

.led-orc-card-acts {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
}

.led-orc-card-acts button {
  height: 1.75rem;
  padding: 0 8px;
  font-size: 0.6875rem;
}

.eng-pill {
  display: inline-flex;
  align-items: center;
  height: 1.25rem;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  background: #f0f3f6;
  color: #122c4f;
  font-size: 0.6875rem;
  font-weight: 500;
  font-style: normal;
}

.led-sint th.col-toggle {
  position: relative;
}

.led-gear {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #8a8a8a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.led-gear:hover {
  background: #f0f3f6;
  color: #122c4f;
}

.led-gear-menu {
  position: absolute;
  left: 8px;
  top: 36px;
  min-width: 200px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(18, 44, 79, 0.16);
  padding: 6px;
  z-index: 12;
}

.led-gear-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8125rem;
  color: #122c4f;
  cursor: pointer;
}

.led-gear-menu button:hover {
  background: #f0f3f6;
}

.eng-sint-wrap {
  position: relative;
}

.eng-relat {
  position: relative;
}

.eng-relat-btn {
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #122c4f;
  border-radius: 8px;
  background: #fff;
  color: #122c4f;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.eng-relat-btn svg {
  flex: 0 0 auto;
}

.eng-relat-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 220px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(18, 44, 79, 0.16);
  padding: 6px;
  z-index: 20;
}

.eng-relat-menu button,
.eng-relat-menu a {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 0.8125rem;
  color: #122c4f;
  text-decoration: none;
  cursor: pointer;
}

.eng-relat-menu button:hover,
.eng-relat-menu a:hover {
  background: #f0f3f6;
}

.eng-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.eng-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 16px;
  align-items: start;
  min-height: 92px;
  box-shadow: 0 1px 0 rgba(18, 44, 79, 0.04);
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.eng-card:disabled {
  cursor: default;
}

.eng-card-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #122c4f;
}

.eng-card-k {
  color: #122c4f;
  font-size: 0.8125rem;
  font-weight: 500;
}

.eng-card-vals {
  grid-column: 2;
  justify-self: end;
  text-align: right;
  color: #122c4f;
  font-size: 0.75rem;
  line-height: 1.45;
}

.eng-card-vals .big {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 2px;
}

.eng-card-vals span {
  display: block;
}

.eng-section-title {
  margin: 8px 0 10px;
  color: #122c4f;
  font-size: 1.125rem;
  font-weight: 500;
}

.eng-sint-wrap {
  background: #fff;
  border-radius: 12px;
  overflow: auto;
}

.led-sint {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  color: #1e1e1e;
}

.led-sint th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 400;
  font-size: 0.6875rem;
  color: #8a8a8a;
  white-space: nowrap;
  border-bottom: 1px solid #eee;
}

.led-sint th.num,
.led-sint td.num {
  text-align: right;
}

.led-sint td {
  padding: 6px 8px;
  vertical-align: middle;
}

.led-sint .col-toggle {
  width: 36px;
}

.led-sint .col-item {
  width: 56px;
}

.led-sint .col-cod {
  width: 72px;
}

.led-sint .col-base {
  width: 110px;
  color: #686868;
  font-size: 0.6875rem;
}

.led-sint .col-un {
  width: 64px;
}

.led-sint .col-qtd,
.led-sint .col-vu,
.led-sint .col-bdi,
.led-sint .col-vv,
.led-sint .col-tot {
  width: 108px;
}

.led-sint tr.led-etapa td {
  background: #122c4f;
  color: #fdfcfc;
  padding: 8px;
}

.led-sint tr.led-etapa + tr.led-serv td {
  border-top: 0;
}

.led-item-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.75rem;
}

.led-serv .led-item-no {
  border-color: #d3d0cf;
  color: #122c4f;
  background: #fff;
}

.led-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  color: #fdfcfc;
  cursor: pointer;
}

.led-toggle svg {
  display: block;
  transition: transform 0.15s ease;
}

.led-toggle:not(.is-open) svg {
  transform: rotate(-90deg);
}

.led-etapa-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-left: calc(var(--d, 0) * 18px);
}

.led-etapa-inner .led-desc {
  flex: 1;
  min-width: 0;
  width: auto;
}

.led-serv td:nth-child(2) {
  padding-left: calc(8px + max(0, var(--d, 1) - 1) * 16px);
}

.led-etapa .led-desc {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.8125rem;
  color: #1e1e1e;
  background: #fff;
}

.led-serv .led-desc {
  width: 100%;
  min-width: 180px;
  height: 30px;
  border: 1px solid #e4e1de;
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  font-size: 0.75rem;
  background: #fff;
}

.led-mini {
  width: 88px;
  height: 28px;
  border: 1px solid #e4e1de;
  border-radius: 6px;
  padding: 0 6px;
  font: inherit;
  font-size: 0.75rem;
  text-align: right;
  background: #fff;
}

.led-item {
  width: 46px;
  height: 26px;
  border: 1px solid #e4e1de;
  border-radius: 6px;
  padding: 0 2px;
  font: inherit;
  font-size: 0.75rem;
  text-align: center;
  background: #fff;
}

.tab-orc table.tab-led-1 td.col-sel {
  text-align: center;
  vertical-align: middle;
}

.tab-orc table.tab-led-1 input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-content: center;
  background-color: #fff;
  border: 1px solid #5c7697;
  border-radius: 0.25rem;
  box-shadow: 0 2px 10px 0 rgba(38, 51, 77, 0.03);
  cursor: pointer;
}

.tab-orc table.tab-led-1 input[type='checkbox']::before {
  content: '';
  width: 0.65em;
  height: 0.65em;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  background-color: #122c4f;
}

.tab-orc table.tab-led-1 input[type='checkbox']:checked::before {
  transform: scale(1);
}

.acoes-tab-orc .bt-excluir-sels {
  gap: 0.5rem;
  padding: 0 0.9375rem;
  border: 1px solid #652828;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* .led-button define display:flex e anularia o atributo hidden */
.acoes-tab-orc .bt-excluir-sels[hidden] {
  display: none;
}

.led-cod {
  color: #122c4f;
  font-weight: 600;
  text-decoration: none;
}

.led-cod:hover {
  text-decoration: underline;
}

.led-sint .money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.led-etapa .money {
  font-weight: 500;
}

.led-row-acts {
  display: inline-flex;
  gap: 2px;
  margin-left: 6px;
  opacity: 0;
  flex: 0 0 auto;
}

.led-sint tr:hover .led-row-acts {
  opacity: 1;
}

.led-etapa .led-row-acts {
  opacity: 1;
  margin-left: 0;
  color: #fdfcfc;
}

.led-row-acts button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.led-row-acts button svg {
  display: block;
}

.led-etapa .led-row-acts button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.led-serv .led-row-acts button {
  color: #a83b2a;
}

.eng-add-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  padding: 12px 0 0;
}

.eng-add-bar .led-field {
  margin: 0;
  min-width: 140px;
}

.eng-add-bar input,
.eng-add-bar select {
  height: 2rem;
  border: 1px solid #d3d0cf;
  border-radius: 8px;
  padding: 0 8px;
  font: inherit;
  font-size: 0.75rem;
  background: #fff;
}

.eng-pane-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px 20px;
}

.eng-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: end;
  margin-bottom: 12px;
}

.eng-toolbar .led-field {
  margin: 0;
  min-width: 160px;
}

.eng-money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.eng-muted {
  color: #5d646e;
  font-size: 13px;
}

.eng-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 280px;
  padding: 40px 24px;
  color: #686868;
  text-align: center;
  background: #fff;
  border-radius: 12px;
}

.eng-empty strong {
  color: #122c4f;
  font-size: 1.125rem;
  font-weight: 500;
}

.eng-empty p {
  margin: 0 0 8px;
  font-size: 0.875rem;
}

#eng-led-modal.drawer-backdrop {
  z-index: 90;
}

#eng-led-modal .drawer.drawer-wide {
  width: min(1100px, calc(100vw - 32px));
}

#eng-led-modal .eng-toolbar {
  margin-bottom: 16px;
}

.eng-abc-a { background: #fde8e8; }
.eng-abc-b { background: #fff4d6; }
.eng-abc-c { background: #eaf6ea; }

.eng-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lic-table input.eng-mini { width: 88px; }
.lic-table input.eng-mini-lg { width: 120px; }

.eng-orc-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.eng-orc-list-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #efece9;
}

.eng-orc-list-bar h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #122c4f;
}

.eng-orc-list .lic-table tbody tr {
  cursor: pointer;
}

.eng-orc-list .lic-table tbody tr:hover {
  background: #f0f3f6;
}

@media (max-width: 1100px) {
  .eng-cards { grid-template-columns: 1fr; }
}

/* ——— Orçamento: grade e página ——— */
/* Scroll vertical fica no .canvas (como .scrollable-viewport do LED).
   overflow-x sozinho vira overflow-y:auto por spec e cria scroll aninhado + corta menus. */
.eng-orc-page .tab-orc {
  overflow: visible;
  background: #fff;
  border-radius: 0 0 0.5rem 0.5rem;
  position: relative;
}
.eng-orc-page .tab-orc-x {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}
.eng-orc-page .tab-orc table.tab-led-1 {
  min-width: 1100px;
}
.eng-orc-page .tab-orc table.tab-led-1 td.col-row-menu {
  overflow: visible;
}
.eng-orc-page #orc-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.eng-orc-page .titulo-tab-orc {
  flex: 0 0 auto;
}
.eng-orc-page .tab-orc table.tab-led-1 .led-item {
  width: 100%;
  max-width: 4.5rem;
  margin: 0 auto;
  text-align: center;
  font: inherit;
  font-size: 0.75rem;
  border-radius: 0.3125rem;
  border: 1px solid #d3d0cf;
  background: #fff;
  padding: 2px 4px;
  box-sizing: border-box;
}
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-0 .led-item,
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-1 .led-item,
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-2 .led-item {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
}
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-0 .led-desc,
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-1 .led-desc,
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-2 .led-desc {
  color: inherit;
  background: transparent;
  border-color: transparent;
}
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-0 .led-desc:focus,
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-1 .led-desc:focus,
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-2 .led-desc:focus,
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-0 .led-item:focus,
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-1 .led-item:focus,
.eng-orc-page .tab-orc table.tab-led-1 .orc-row-level-2 .led-item:focus {
  outline: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.18);
}
.eng-orc-page .info-acompanhamento {
  gap: 1rem;
}
.eng-orc-page .info-acompanhamento .card-generico {
  min-width: 0;
}
.eng-orc-page .titulo-acompanhamento-inner {
  gap: 0.75rem;
  flex-wrap: wrap;
}
.eng-orc-page .titulo-orc {
  min-width: 0;
  flex: 1 1 auto;
}
.eng-orc-page .titulo-orc span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eng-orc-page .acoes-orc {
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.eng-orc-page .titulo-tab-orc {
  flex-wrap: wrap;
  gap: 0.75rem;
}
.eng-orc-page .acoes-tab-orc {
  flex-wrap: wrap;
  gap: 0.5rem;
}
.eng-orc-page .menu-relat-orc {
  max-height: min(70vh, 28rem);
  overflow: auto;
}
.eng-pane-card {
  overflow-x: auto;
}
.eng-pane-card .lic-table {
  min-width: 640px;
}

@media (max-width: 1100px) {
  .eng-orc-page .info-acompanhamento {
    flex-direction: column;
  }
  .eng-orc-page .info-acompanhamento .card-generico {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .eng-orc-page .titulo-acompanhamento,
  .eng-orc-page .titulo-tab-orc,
  .eng-orc-page .info-acompanhamento {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .eng-orc-page .acoes-orc,
  .eng-orc-page .acoes-tab-orc {
    width: 100%;
    justify-content: stretch;
  }
  .eng-orc-page .acoes-orc .led-button,
  .eng-orc-page .acoes-tab-orc .led-button {
    flex: 1 1 auto;
    justify-content: center;
  }
}

.eng-base-block {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e8ebee;
}
.eng-base-block:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.eng-base-block .eng-arred-base {
  margin-top: 0.75rem;
}
.form-bases-orc .eng-muted {
  margin: 0 0 1rem;
  color: #5c636d;
  font-size: 0.9rem;
}
