.header-global-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  margin-left: auto;
}
.header-global-controls[hidden] { display: none !important; }
.header-data-corte-wrap {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.header-param-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #717172);
  white-space: nowrap;
  margin: 0;
}
.header-param-date {
  padding: 6px 8px;
  border: 1px solid var(--line, #dddcdc);
  border-radius: 9px;
  background: #fff;
  color: var(--amorim-red-dark, #7a1215);
  font-size: 12px;
  font-weight: 600;
  min-width: 132px;
  box-shadow: none;
}
.header-param-date:focus {
  outline: none;
  border-color: var(--amorim-red, #94161A);
  box-shadow: 0 0 0 2px rgba(148, 22, 26, 0.18);
}
.header-obra-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-end;
}
.header-obra-filter[hidden] { display: none !important; }
.header-obra-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #717172);
  white-space: nowrap;
}
.header-obra-multiselect {
  position: relative;
  min-width: 200px;
  max-width: min(460px, 44vw);
}
.header-obra-trigger {
  width: 100%;
  text-align: left;
  padding: 7px 28px 7px 10px;
  border: 1px solid var(--line, #dddcdc);
  border-radius: 9px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394161A' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: var(--amorim-red-dark, #7a1215);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  box-shadow: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-obra-trigger:hover { border-color: var(--amorim-red, #94161A); }
.header-obra-trigger:focus {
  outline: none;
  border-color: var(--amorim-red, #94161A);
  box-shadow: 0 0 0 2px rgba(148, 22, 26, 0.18);
}
.header-obra-trigger:disabled {
  opacity: 0.75;
  cursor: wait;
}
#panelObraGlobalList {
  max-height: min(300px, 52vh);
  overflow: auto;
  overflow-x: auto;
}
.header-obra-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1200;
  width: min(560px, 94vw);
  min-width: 420px;
  max-height: min(360px, 60vh);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(148, 22, 26, 0.25);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  padding: 8px 0;
}
.header-obra-panel[hidden] { display: none !important; }
.header-obra-group {
  border-top: 1px solid rgba(148, 22, 26, 0.08);
}
.header-obra-group:first-child { border-top: none; }
.header-obra-group-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 4px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  font-weight: inherit;
}
.header-obra-group-toggle:hover { background: rgba(148, 22, 26, 0.05); }
.header-obra-group-toggle input {
  margin: 0;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  padding: 0;
  accent-color: var(--amorim-red, #94161A);
}
.header-obra-group-label {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--amorim-red, #94161A);
}
.header-obra-group-hint {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  color: #888;
}
.header-obra-option {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 20px;
  font-size: 12px;
  color: var(--text, #2b2b2c);
  cursor: pointer;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  line-height: 1.2;
}
.header-obra-option input {
  margin: 0;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  padding: 0;
  accent-color: var(--amorim-red, #94161A);
}
.header-obra-option span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-obra-option:hover,
.header-obra-option:has(input:checked) {
  background: rgba(148, 22, 26, 0.06);
}
.header-obra-panel-empty {
  padding: 12px;
  margin: 0;
  font-size: 12px;
  color: #666;
}
.header-obra-panel-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 8px 12px 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin-top: 6px;
}
.header-obra-panel-actions button {
  border: 1px solid rgba(148, 22, 26, 0.35);
  background: #fff;
  color: var(--amorim-red-dark, #7a1215);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.header-obra-panel-actions button.header-obra-apply {
  background: var(--amorim-red, #94161A);
  color: #fff;
  border-color: var(--amorim-red, #94161A);
}

body.header-collapsed .header-global-controls {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100vw - 56px);
}
body.header-collapsed .header-obra-filter {
  flex: 1 1 auto;
  min-width: 0;
}
body.header-collapsed .header-obra-multiselect {
  max-width: none;
  width: 100%;
}
