/* Shared operational surfaces, based on the Porteira vehicle drawer. */
html[data-frontend="modular"] body.command-center #v-ncs .g-nc-tracking form { grid-template-columns: minmax(0,1fr); }
html[data-frontend="modular"] body.command-center #v-ncs .g-nc-tracking input[name="responsavel"] { height: 44px; background: #edf2f5; }
html[data-frontend="modular"] body.command-center #v-ncs .g-ncs-actions { display: flex; flex-direction: column; }
html[data-frontend="modular"] body.command-center #v-ncs .ui-button-success { color: #f5fbf7 !important; background: #286447 !important; border-color: #286447 !important; }
html[data-frontend="modular"] body.command-center #v-ncs .ui-button-success:hover:not(:disabled) { background: #1d5037 !important; border-color: #1d5037 !important; }
html[data-frontend="modular"] body.command-center .g-nc-closure-message { margin: 0 0 20px; padding: 12px 16px; border-left: 3px solid #c49434; background: #edf4f8; color: #28485e; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 8em; overflow: auto; line-height: 1.5; }
html[data-frontend="modular"] body.command-center #v-triagem .g-workbench-queue-panel { display: flex; flex-direction: column; }
html[data-frontend="modular"] body.command-center #v-triagem .g-workbench-queue-body { flex: 1; min-height: 0; height: auto; }
html[data-frontend="modular"] body.command-center #v-triagem .g-workbench-queue-panel > .g-case-farm-filter { display: grid; flex: none; gap: 7px; padding: 14px 12px; border-bottom: 1px solid #cedce5; color: #28485e; font-size: 13px; font-weight: 650; }
html[data-frontend="modular"] body.command-center #v-triagem .g-case-farm-filter select { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; }
html[data-frontend="modular"] body.command-center #triagem-lista { scrollbar-width: thin; scrollbar-color: #93acbb transparent; }
html[data-frontend="modular"] #triagem-lista::-webkit-scrollbar { width: 6px; }
html[data-frontend="modular"] #triagem-lista::-webkit-scrollbar-track { background: transparent; }
html[data-frontend="modular"] #triagem-lista::-webkit-scrollbar-thumb { background: #93acbb; border-radius: 8px; }
html[data-frontend="modular"] #triagem-lista::-webkit-scrollbar-thumb:hover { background: #52768c; }
html[data-frontend="modular"] body.command-center #v-triagem .g-workbench-main-header { display: flex; justify-content: space-between; }
html[data-frontend="modular"] body.command-center #v-triagem .g-triage-farm-highlight { display: grid; gap: 2px; flex: 0 1 auto; min-width: 0; max-width: 45%; padding: 8px 16px; border: 1px solid #dec185; border-radius: 8px; background: #fbf1db; color: #654713; text-align: right; overflow-wrap: anywhere; }
html[data-frontend="modular"] body.command-center #v-triagem .g-triage-farm-highlight span { font-size: 12px; font-weight: 550; }
html[data-frontend="modular"] body.command-center #v-triagem .g-triage-farm-highlight strong { color: #654713; font-size: 20px; line-height: 1.2; font-weight: 750; }
@media(max-width:760px) {
  html[data-frontend="modular"] body.command-center #v-triagem .g-triage-farm-highlight { padding: 8px 10px; }
  html[data-frontend="modular"] body.command-center #v-triagem .g-triage-farm-highlight strong { font-size: 17px; }
  html[data-frontend="modular"] body.command-center #v-triagem .g-workbench-queue-body { flex: none; }
}
html[data-frontend="modular"] body.command-center { min-width: 0; }
html[data-frontend="modular"] body.command-center .g-users-password-header {
  background: #042c53 !important; color: #f5f8fa !important; border-bottom: 3px solid #c49434 !important;
}
html[data-frontend="modular"] body.command-center .g-users-password-header h2 { color: #f5f8fa; }
html[data-frontend="modular"] body.command-center .g-users-password-header > button { color: #f5f8fa; background: #174266; border-color: #7290a8; }
html[data-frontend="modular"] body.command-center #rel-corpo .modal-heading { padding: 18px; background: #042c53; color: #f5f8fa; border-bottom: 3px solid #c49434; border-radius: 8px 8px 0 0; }
html[data-frontend="modular"] body.command-center #rel-corpo .modal-actions .ui-button-ghost-light { color: #28485e; background: #edf4f8; border-color: #aebfcd; }
html[data-frontend="modular"] body.command-center #v-rastreabilidade .g-history-people-drawer { background: #f5f8fa; }
html[data-frontend="modular"] body.command-center #v-rastreabilidade .g-history-people-heading {
  margin: -24px -24px 20px; padding: 20px 24px;
  background: #042c53; color: #f5f8fa; border-bottom: 3px solid #c49434;
}
html[data-frontend="modular"] body.command-center #v-rastreabilidade .g-history-people-heading h2 { color: #f5f8fa; }
html[data-frontend="modular"] body.command-center #v-rastreabilidade .g-history-people-heading p { color: #e6c689; }
html[data-frontend="modular"] body.command-center #v-rastreabilidade .g-history-people-heading button { color: #f5f8fa; background: #174266; border-color: #7290a8; }
@media(max-width:760px) {
  html[data-frontend="modular"] body.command-center #v-rastreabilidade .g-history-people-heading { margin: -20px -20px 20px; padding: 20px; }
}
html[data-frontend="modular"] body.command-center #topo-fixo > header {
  grid-template-columns: auto auto minmax(160px, 1fr) auto auto;
  grid-template-areas: "brand status search report account";
  gap: 16px;
}
html[data-frontend="modular"] #topo-fixo .brand-block { grid-area: brand; }
html[data-frontend="modular"] #topo-fixo .system-status { grid-area: status; min-width: 0; white-space: nowrap; }
html[data-frontend="modular"] #topo-fixo .busca-wrap { grid-area: search; min-width: 0; }
html[data-frontend="modular"] #topo-fixo .header-action { grid-area: report; }
html[data-frontend="modular"] #topo-fixo .session-account { grid-area: account; min-width: 0; }
@media (min-width: 761px) and (max-width: 1150px) {
  html[data-frontend="modular"] #topo-fixo .session-account-identity { display: none; }
  html[data-frontend="modular"] body.command-center #topo-fixo > header { gap: 12px; }
}
@media (max-width: 760px) {
  html[data-frontend="modular"] body.command-center #topo-fixo > header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "brand status account" "search search report";
    gap: 8px 10px;
  }
  html[data-frontend="modular"] body.command-center #topo-fixo .brand-block { min-width: 0; }
  html[data-frontend="modular"] body.command-center #topo-fixo .logo { font-size: 16px; }
  html[data-frontend="modular"] body.command-center #topo-fixo .system-status { padding: 0; }
  html[data-frontend="modular"] body.command-center #topo-fixo .system-status strong { font-size: 12px; }
}

html[data-frontend="modular"] body.command-center :is(.g-case-dialog, .g-detail-panel, .g-identity-link-dialog) {
  --panel-padding: 24px;
  color: #193b52;
  background: #f5f8fa;
  border-color: #c5d3de;
  box-shadow: 0 20px 65px rgb(4 24 44 / 24%);
}
html[data-frontend="modular"] body.command-center :is(.g-case-dialog > header, .g-detail-panel-heading, .g-identity-link-dialog > header, .app-dialog-cab, .emp-modal-cab, .drawer-operacional-cabecalho) {
  background: #042c53;
  color: #f5f8fa;
  border-bottom: 3px solid #c49434;
  box-shadow: none;
}
html[data-frontend="modular"] body.command-center :is(.g-case-dialog > header, .g-detail-panel-heading) {
  margin: calc(-1 * var(--panel-padding)) calc(-1 * var(--panel-padding)) 20px;
  padding: 20px var(--panel-padding);
  min-height: 0;
  flex: 0 0 auto;
}
html[data-frontend="modular"] body.command-center :is(.g-case-dialog > header, .g-detail-panel-heading, .g-identity-link-dialog > header, .app-dialog-cab, .emp-modal-cab, .drawer-operacional-cabecalho) :is(h2, strong) {
  color: #f5f8fa;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
}
html[data-frontend="modular"] body.command-center :is(.app-dialog-cab, .emp-modal-cab, .drawer-operacional-cabecalho, .g-identity-link-dialog > header) :is(p, span) { color: #e6c689; }
html[data-frontend="modular"] body.command-center :is(.g-case-dialog > header, .g-detail-panel-heading, .g-identity-link-dialog > header, .app-dialog-cab, .emp-modal-cab, .drawer-operacional-cabecalho) > button {
  color: #f5f8fa !important;
  background: #174266 !important;
  border: 1px solid #7290a8 !important;
  min-height: 44px;
  flex-shrink: 0;
}
html[data-frontend="modular"] body.command-center :is(.g-case-dialog > header, .g-detail-panel-heading, .g-identity-link-dialog > header, .app-dialog-cab, .emp-modal-cab, .drawer-operacional-cabecalho) > button:hover { background: #285677 !important; }
html[data-frontend="modular"] body.command-center :is(.g-case-dialog, .g-detail-panel, .g-identity-link-dialog, .md-box, .drawer-operacional) :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid #aebfcd;
  border-radius: 8px;
  background: #fdfefe;
  color: #193b52;
  font: inherit;
  padding: 10px 12px;
}
html[data-frontend="modular"] body.command-center :is(.g-case-dialog, .g-detail-panel, .g-identity-link-dialog, .md-box, .drawer-operacional) label > span:first-child { color: #28485e; font-size: 14px; font-weight: 650; }
html[data-frontend="modular"] body.command-center :is(.g-case-dialog, .g-detail-panel, .g-identity-link-dialog, .md-box, .drawer-operacional) :is(input, select, textarea):focus-visible { outline: 3px solid #b6d4e5; outline-offset: 2px; border-color: #256487; }
html[data-frontend="modular"] body.command-center input[type="file"] {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: 8px;
  border: 1px dashed #86a7be;
  border-radius: 8px;
  background: #eef5f9;
  color: #28485e;
  font-size: 14px;
}
html[data-frontend="modular"] body.command-center input[type="file"]::file-selector-button {
  min-height: 40px;
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid #174b70;
  border-radius: 6px;
  background: #174b70;
  color: #f5f8fa;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
html[data-frontend="modular"] body.command-center input[type="file"]:disabled::file-selector-button { opacity: .5; cursor: default; }
html[data-frontend="modular"] body.command-center .g-nc-tracking { padding-top: 0; border-top: 0; }
html[data-frontend="modular"] body.command-center .g-nc-tracking h3 { font-size: 20px; color: #153d59; margin: 0 0 10px; }
html[data-frontend="modular"] body.command-center .g-nc-tracking-intro { margin: 0 0 20px; color: #526978; line-height: 1.55; }
html[data-frontend="modular"] body.command-center .g-nc-tracking-actions { justify-content: flex-end; padding-top: 16px; border-top: 1px solid #d0dce5; }
html[data-frontend="modular"] body.command-center .g-nc-tracking [role="alert"]:empty { display: none; }
html[data-frontend="modular"] body.command-center .g-nc-tracking [role="alert"]:not(:empty) { padding: 12px; border-left: 3px solid #ac4541; background: #fff0ee; color: #802e2b; }
html[data-frontend="modular"] body.command-center :is(#v-triagem, #v-ncs) .g-case-message {
  padding: 10px 14px;
  border-left: 3px solid #c49434;
  background: #edf4f8;
  border-radius: 0 8px 8px 0;
}
html[data-frontend="modular"] body.command-center :is(#v-triagem, #v-ncs) .g-case-message h3 { color: #486679; font-size: 12px; margin: 0 0 5px; }
html[data-frontend="modular"] body.command-center :is(#v-triagem, #v-ncs) .g-case-message .g-workbench-message { color: #12374f; font-weight: 550; font-size: 19px; line-height: 1.45; }
@media (max-width: 760px) {
  html[data-frontend="modular"] body.command-center :is(.g-case-dialog, .g-detail-panel) { --panel-padding: 18px; padding: var(--panel-padding); }
  html[data-frontend="modular"] body.command-center :is(.g-case-dialog > header, .g-detail-panel-heading) { gap: 12px; padding-block: 16px; }
  html[data-frontend="modular"] body.command-center :is(.g-case-dialog > header, .g-detail-panel-heading) :is(h2, strong) { font-size: 20px; }
  html[data-frontend="modular"] body.command-center .g-case-dialog > header > button { max-width: 130px; white-space: normal; }
  html[data-frontend="modular"] body.command-center .g-nc-tracking-actions > button { flex: 1; }
}

/* O vínculo ocupa a linha inteira para preservar a leitura do nome completo. */
html[data-frontend="modular"] #v-ncs .g-workbench-facts > .g-ncs-assignment-fact {
  grid-column: 1 / -1;
}
html[data-frontend="modular"] #v-ncs .g-ncs-assignment-fact > strong {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
  max-height: none;
}

html[data-frontend="modular"] #v-ncs .g-ncs-assignment-fact > .ui-button {
  justify-self: start;
  width: auto;
  max-width: 100%;
  margin-top: 6px;
}

/* Optional closure evidence: explicit action and uncropped previews. */
html[data-frontend="modular"] body.command-center .g-nc-attachments {
  min-width: 0; margin: 0; padding: 16px;
  border: 1px solid var(--g-color-border); border-radius: var(--g-radius-md);
  background: var(--g-color-surface-subtle);
}
.g-nc-attachments legend { padding: 0 6px; font-size: 14px; font-weight: 700; color: var(--g-color-brand-strong); }
.g-nc-attachment-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.g-nc-attachment-hint, .g-nc-attachment-status { font-size: 13px; color: var(--g-color-muted); line-height: 1.5; margin: 10px 0 0; }
.g-nc-attachment-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.g-nc-attachment-previews:not(:empty) { margin-top: 16px; }
.g-nc-attachment { min-width: 0; display: grid; align-content: start; gap: 8px; padding: 10px; border: 1px solid var(--g-color-border); border-radius: var(--g-radius-sm); background: var(--g-color-surface); }
.g-nc-attachment img { width: 100%; height: 150px; object-fit: contain; background: var(--g-color-brand-soft); border-radius: 4px; }
.g-nc-attachment-name { font-size: 13px; overflow-wrap: anywhere; color: var(--g-color-ink); }
.g-nc-attachment > button { justify-self: start; }

.g-nc-image-dropzone {
  display: grid; place-content: center; gap: 6px; min-height: 112px;
  padding: 18px; margin-bottom: 14px; border: 2px dashed var(--g-color-selected-border);
  border-radius: var(--g-radius-md); background: var(--g-color-brand-soft);
  color: var(--g-color-brand-strong); text-align: center; cursor: pointer;
}
.g-nc-image-dropzone strong { font-size: 15px; }
.g-nc-image-dropzone span { font-size: 13px; line-height: 1.5; }
.g-nc-attachments:not(:disabled) .g-nc-image-dropzone:is(:hover, :focus-visible, .is-dragging) {
  border-color: var(--g-color-accent); background: var(--g-color-accent-soft);
  outline: 2px solid var(--g-color-focus); outline-offset: 2px;
}
.g-nc-attachments:disabled .g-nc-image-dropzone { opacity: .55; cursor: wait; }
