/* Regra visual comum da aplicacao. Nao altera os documentos A4. */
:root {
  --ui-font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ui-ink: #18313b;
  --ui-muted: #6b7f88;
  --ui-line: #d5e2e6;
  --ui-surface: #ffffff;
  --ui-soft: #f1f6f7;
  --ui-radius: 13px;
  --ui-control-radius: 10px;
  --ui-teal: #078298;
}

body,
button,
input,
select,
textarea {
  font-family: var(--ui-font);
}

.hidden,
.top-actions.hidden,
.quote-actions.hidden,
.budget-actions.hidden,
.work-actions.hidden,
.production-actions.hidden {
  display: none !important;
}

.data-tools {
  box-sizing: border-box;
  min-height: 56px;
  margin: 0 0 18px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--ui-line);
  border-radius: 11px;
  background: #ffffff;
}

.data-tools > strong {
  color: var(--ui-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.data-tools > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.data-tools .button {
  min-height: 34px;
  height: 34px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 11px;
}

.data-tools .data-tool-test {
  color: var(--ui-muted);
  border-style: dashed;
}

/* Cabeçalho de pagina */
.topbar,
.budget-toolbar,
.work-toolbar,
.production-toolbar {
  box-sizing: border-box !important;
  min-height: 76px !important;
  height: 76px !important;
  max-height: 76px !important;
  padding: 12px 36px !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  background: #08aec2 !important;
  border-bottom: 1px solid #0799ab !important;
}

.topbar > div:first-child > p:first-child,
.budget-toolbar > div:first-child > p:first-child,
.work-toolbar > div:first-child > p:first-child,
.production-toolbar > div:first-child > p:first-child {
  margin: 0 0 4px !important;
  color: rgba(255,255,255,.78) !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  font-weight: 900 !important;
  letter-spacing: .17em !important;
  text-transform: uppercase !important;
}

.topbar > div:first-child > h1,
.budget-toolbar > div:first-child > h1,
.work-toolbar > div:first-child > h1,
.production-toolbar > div:first-child > h1 {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  white-space: nowrap !important;
}

.topbar h1,
.budget-toolbar h1,
.work-toolbar h1,
.production-toolbar h1 {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 25px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
  letter-spacing: -.02em !important;
  white-space: nowrap !important;
}

.topbar > div:first-child > p:not(:first-child),
.budget-toolbar > div:first-child > p:not(:first-child),
.work-toolbar > div:first-child > p:not(:first-child),
.production-toolbar > div:first-child > p:not(:first-child) {
  margin: 5px 0 0 !important;
  color: rgba(255,255,255,.86) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

/* Acoes e botoes dos cabeçalhos */
.top-actions,
.quote-actions,
.budget-actions,
.work-actions,
.production-actions {
  margin-left: auto !important;
  display: flex !important;
  flex: 0 0 auto !important;
  width: max-content !important;
  max-width: none !important;
  min-width: max-content !important;
  align-items: center !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
}

.budget-action-feedback,
#workFeedback {
  display: none !important;
}

.topbar > div:first-child > p,
.topbar > div:first-child > small,
.topbar > div:first-child > span,
.budget-toolbar > div:first-child > p,
.budget-toolbar > div:first-child > small,
.work-toolbar > div:first-child > p,
.work-toolbar > div:first-child > small,
.production-toolbar > div:first-child > p,
.production-toolbar > div:first-child > small,
#pageEyebrow {
  display: none !important;
}

.topbar > div:not(.top-actions):not(.quote-actions) > p,
.topbar > div:not(.top-actions):not(.quote-actions) > small,
.topbar > div:not(.top-actions):not(.quote-actions) > span {
  display: none !important;
}

/* Regra comum: indicação de contexto e título aparecem sempre em duas linhas. */
.topbar > div:not(.top-actions):not(.quote-actions) > p:first-child,
.budget-toolbar > div:not(.budget-actions) > p:first-child,
.work-toolbar > div:not(.work-actions) > p:first-child,
.production-toolbar > div:not(.production-actions) > p:first-child {
  display: block !important;
}

#pageEyebrow {
  display: block !important;
}

.budget-toolbar small,
.work-toolbar small,
.production-toolbar small,
.topbar .quote-save-state {
  display: none !important;
}

.topbar .quote-save-state,
.budget-toolbar small,
.work-toolbar small,
.production-toolbar small,
.production-toolbar #periodLabel {
  color: rgba(255,255,255,.86) !important;
}

.top-actions button,
.top-actions .button,
.quote-actions button,
.quote-actions .button,
.budget-actions button,
.budget-actions .button,
.work-actions button,
.work-actions .button,
.production-actions button,
.production-actions .button {
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 56px !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 16px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 750 !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
}

.top-actions select,
.quote-actions select,
.budget-actions select,
.work-actions select,
.production-actions select {
  box-sizing: border-box !important;
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}

.top-actions .button.secondary,
.quote-actions .button.secondary,
.budget-actions .button.secondary,
.work-actions .button.secondary,
.production-actions .button.secondary {
  color: #ffffff !important;
  background: rgba(255,255,255,.13) !important;
  border-color: rgba(255,255,255,.52) !important;
}

.top-actions .button.primary,
.quote-actions .button.primary,
.budget-actions .button.primary,
.work-actions .button.primary,
.production-actions .button.primary {
  color: #ffffff !important;
  background: #102d3a !important;
  border-color: #102d3a !important;
}

.top-actions .button.danger,
.quote-actions .button.danger,
.budget-actions .button.danger,
.work-actions .button.danger,
.production-actions .button.danger {
  color: #ffffff !important;
  background: rgba(145,35,45,.32) !important;
  border-color: rgba(255,255,255,.52) !important;
}

.topbar .icon-button,
.budget-toolbar .icon-button,
.work-toolbar .icon-button,
.production-toolbar .icon-button {
  color: #ffffff !important;
}

/* Cartoes de consulta e barras de origem */
.customer-card,
.calculation-index,
.budget-index,
.work-index,
.source-bar {
  box-sizing: border-box;
  background: var(--ui-surface);
  border: 1px solid var(--ui-line);
  border-radius: var(--ui-radius);
}

.panel-heading,
.calculation-index-head,
.budget-index-heading,
.work-index-heading {
  padding: 22px !important;
}

.panel-heading h2,
.calculation-index-head h2,
.budget-index-heading h2,
.work-index-heading h2 {
  margin: 0 0 6px !important;
  color: var(--ui-ink) !important;
  font-size: 20px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  letter-spacing: -.015em !important;
}

.panel-heading p,
.calculation-index-head p,
.budget-index-heading p,
.work-index-heading p {
  margin: 0 !important;
  color: var(--ui-muted) !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.panel-search,
.calculation-index-search,
.budget-index-search,
.work-index-search {
  box-sizing: border-box !important;
  min-height: 39px !important;
  margin-top: 16px !important;
  border-radius: var(--ui-control-radius) !important;
  background: var(--ui-soft) !important;
}

.panel-search input,
.calculation-index-search input,
.budget-index-search input,
.work-index-search input {
  min-height: 39px !important;
  font-size: 13px !important;
}

.source-bar {
  padding: 14px 18px !important;
  gap: 10px !important;
}

.source-bar label {
  font-size: 11px !important;
  line-height: 1.25 !important;
  font-weight: 750 !important;
}

.source-bar select,
.source-bar button {
  box-sizing: border-box !important;
  min-height: 39px !important;
  height: 39px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}

/* Ritmo horizontal comum, preservando as larguras proprias de cada modulo. */
.calculation-workspace,
.budget-workspace,
.work-workspace {
  gap: 24px !important;
  margin-top: 22px !important;
}

.production-content {
  padding: 28px 36px 50px !important;
}

@media (max-width: 1100px) {
  .topbar,
  .budget-toolbar,
  .work-toolbar,
  .production-toolbar {
    padding: 16px 20px !important;
  }

  .production-content {
    padding: 24px 20px 44px !important;
  }
}

@media (max-width: 720px) {
  .data-tools,
  .data-tools > div {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .budget-toolbar,
  .work-toolbar,
  .production-toolbar {
    height: auto !important;
    max-height: none !important;
    align-items: flex-start !important;
    flex-direction: column !important;
    padding: 14px 16px !important;
  }

  .topbar > .menu-button,
  .budget-toolbar > .menu-button,
  .work-toolbar > .menu-button,
  .production-toolbar > .menu-button {
    order: 1 !important;
    margin: 0 !important;
  }

  .topbar > div:not(.top-actions):not(.quote-actions),
  .budget-toolbar > div:not(.budget-actions),
  .work-toolbar > div:not(.work-actions),
  .production-toolbar > div:not(.production-actions) {
    order: 2 !important;
    width: 100% !important;
  }

  .topbar > div:first-child > h1,
  .budget-toolbar > div:first-child > h1,
  .work-toolbar > div:first-child > h1,
  .production-toolbar > div:first-child > h1 {
    font-size: 22px !important;
  }

  .top-actions,
  .quote-actions,
  .budget-actions,
  .work-actions,
  .production-actions {
    order: 3 !important;
    width: 100% !important;
    margin-left: 0 !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  .panel-heading,
  .calculation-index-head,
  .budget-index-heading,
  .work-index-heading {
    padding: 18px !important;
  }
}
