.app-shell.catalog-shell { height: var(--catalog-viewport-height, 100vh); height: var(--catalog-viewport-height, 100dvh); min-height: 0; grid-template-rows: var(--ribbon-height) minmax(0, 1fr); }
.catalog-shell > .catalog-main-panel { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; height: 100%; }
.catalog-shell .catalog-main-panel > .topbar { flex: 0 0 auto; }
.topbar.catalog-topbar { container: catalog-header / inline-size; flex-wrap: wrap; gap: 6px; min-width: 0; padding-inline: 18px; }
.catalog-topbar > .topbar-heading { flex: 1 0 auto; }
.catalog-top-navigation { display: flex; order: 2; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; margin-inline-start: auto; }
.catalog-top-link { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; gap: 5px; box-sizing: border-box; min-width: 36px; min-height: 36px; padding: 5px 8px; border: 1px solid transparent; border-radius: 6px; color: var(--text-secondary); font-size: 13px; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.catalog-top-link svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.catalog-top-link:hover { border-color: var(--border-default); background: var(--surface-subtle); }
.catalog-top-link.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-hover); text-decoration: underline; text-underline-offset: 4px; }
.catalog-top-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@container catalog-header (max-width: 820px) {
  .catalog-top-link-label { display: none; }
  .catalog-top-link { width: 36px; padding: 6px; }
}
@container catalog-header (max-width: 380px) {
  .catalog-top-navigation { flex-basis: 100%; justify-content: flex-end; }
}
@supports not (container-type: inline-size) {
  @media (max-width: 1100px) { .catalog-top-link-label { display: none; } .catalog-top-link { width: 36px; padding: 6px; } }
  @media (max-width: 420px) { .catalog-top-navigation { flex-basis: 100%; } }
}
.catalog-shell .catalog-page-content { display: grid; grid-template-rows: minmax(0, 1fr); min-width: 0; min-height: 0; overflow: visible; padding: 12px 18px 18px; }
.catalog-shell .catalog-page-content > .catalog-management-layout { min-width: 0; min-height: 0; height: 100%; }
.catalog-shell > .sidebar { height: calc(var(--catalog-viewport-height, 100vh) - var(--ribbon-height)); height: calc(var(--catalog-viewport-height, 100dvh) - var(--ribbon-height)); min-height: 0; }
.catalog-shell .sidebar > :is(.brand-block, .sidebar-profile) { flex: 0 0 auto; }
.catalog-shell .sidebar > .sidebar-nav { flex: 1 1 0; min-height: 0; overflow-y: auto; padding-block: 2px 8px; padding-inline-end: 6px; scroll-padding-block: 8px; overscroll-behavior-y: contain; }
.catalog-shell .sidebar-nav > * { flex: 0 0 auto; }
.catalog-shell .sidebar:not(.is-collapsed) .nav-subitem { align-items: center; min-width: 0; }
.catalog-shell .sidebar:not(.is-collapsed) .nav-subitem .nav-text { flex: 1 1 0; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.sidebar:not(.is-collapsed) .nav-subitem[href="/app/catalog/templates"] { min-width: 0; }
.sidebar:not(.is-collapsed) .nav-subitem[href="/app/catalog/templates"] .nav-text { flex: 1 1 0; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
.catalog-shell :is(.sidebar-nav, .catalog-module-records, .catalog-module-editor, .catalog-form-fields, .catalog-choice-page, .catalog-selection-chips, .catalog-scope-filters, .message-template-records, .message-template-information, .message-template-configuration, .message-template-filter-scopes, .message-template-rich-preview, .message-template-form textarea, .is-scrollable .rich-editor-content) { scrollbar-width: auto; scrollbar-color: auto; scrollbar-gutter: stable; }
.catalog-shell :is(.sidebar-nav, .catalog-module-records, .catalog-module-editor, .catalog-form-fields, .catalog-choice-page, .catalog-selection-chips, .catalog-scope-filters, .message-template-records, .message-template-information, .message-template-configuration, .message-template-filter-scopes, .message-template-rich-preview, .message-template-form textarea, .is-scrollable .rich-editor-content)::-webkit-scrollbar { width: 6px; height: 6px; }
.catalog-shell :is(.sidebar-nav, .catalog-module-records, .catalog-module-editor, .catalog-form-fields, .catalog-choice-page, .catalog-selection-chips, .catalog-scope-filters, .message-template-records, .message-template-information, .message-template-configuration, .message-template-filter-scopes, .message-template-rich-preview, .message-template-form textarea, .is-scrollable .rich-editor-content)::-webkit-scrollbar-track { background: transparent; }
.catalog-shell :is(.sidebar-nav, .catalog-module-records, .catalog-module-editor, .catalog-form-fields, .catalog-choice-page, .catalog-selection-chips, .catalog-scope-filters, .message-template-records, .message-template-information, .message-template-configuration, .message-template-filter-scopes, .message-template-rich-preview, .message-template-form textarea, .is-scrollable .rich-editor-content)::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--scrollbar-thumb, #a9bdb8); }
.catalog-shell :is(.sidebar-nav, .catalog-module-records, .catalog-module-editor, .catalog-form-fields, .catalog-choice-page, .catalog-selection-chips, .catalog-scope-filters, .message-template-records, .message-template-information, .message-template-configuration, .message-template-filter-scopes, .message-template-rich-preview, .message-template-form textarea, .is-scrollable .rich-editor-content)::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover, #7f9c94); }
@supports (-moz-appearance: none) {
  .catalog-shell :is(.sidebar-nav, .catalog-module-records, .catalog-module-editor, .catalog-form-fields, .catalog-choice-page, .catalog-selection-chips, .catalog-scope-filters, .message-template-records, .message-template-information, .message-template-configuration, .message-template-filter-scopes, .message-template-rich-preview, .message-template-form textarea, .is-scrollable .rich-editor-content) { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb, #a9bdb8) transparent; }
}
.catalog-module { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.catalog-module [hidden], .catalog-remote-scope [hidden] { display: none; }
.catalog-module > :is(.catalog-ticket-workspace, .catalog-module-panel) { flex: 1 1 0; min-height: 0; }
.catalog-ticket-workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); grid-template-rows: minmax(0, 1fr); gap: 14px; align-items: stretch; min-width: 0; min-height: 0; }
.catalog-module-panel { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; height: 100%; padding: 14px; border: 1px solid var(--border-default); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.catalog-module-heading { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 8px; }
.catalog-module-heading h2 { flex: 1; min-width: 120px; margin: 0; font-size: 17px; }
.catalog-result-count { color: var(--text-muted); font-size: 12px; }
.catalog-module-filters { display: flex; flex: 0 0 auto; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.catalog-module-filters input { flex: 1 1 170px; }
.catalog-module-filters select { flex: 0 1 150px; }
.catalog-module :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 36px; padding: 7px 9px; font: inherit; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); }
.catalog-command { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; gap: 6px; padding: 7px 10px; font-size: 13px; font-weight: 600; max-width: 100%; min-width: 0; white-space: normal; }
.catalog-command svg { flex: 0 0 17px; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.catalog-command.is-icon-only { padding: 6px; width: 36px; }
.catalog-command.is-icon-only .record-action-label { display: none; }
.catalog-command.catalog-action-edit { color: var(--text-secondary); background: var(--surface); border-color: var(--border-default); }
.catalog-command.catalog-action-danger { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 32%, var(--border-default)); }
.catalog-command.catalog-action-success { color: var(--brand); background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 32%, var(--border-default)); }
.catalog-command:hover:not(:disabled) { border-color: var(--brand); }
.catalog-command.catalog-action-danger:hover:not(:disabled) { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 15%, var(--surface)); }
.catalog-command:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.catalog-category-drawer .catalog-command { min-height: 36px; font-size: 13px; font-weight: 600; }
.catalog-module-records { display: flex; flex-direction: column; flex: 1 1 0; gap: 7px; min-width: 0; min-height: 0; overflow-y: auto; padding: 2px; scroll-padding-block: 8px; overscroll-behavior-y: contain; }
.catalog-module-records > * { flex: 0 0 auto; min-width: 0; }
.catalog-module-record { min-width: 0; }
.catalog-module-row { display: flex; align-items: center; min-width: 0; gap: 8px; padding: 9px; border: 1px solid var(--border-subtle); border-radius: 9px; }
.catalog-module-record.is-selected > .catalog-module-row { border-color: var(--brand); background: var(--brand-soft); }
.catalog-module-identity, .catalog-select-record { display: grid; gap: 3px; flex: 1; min-width: 0; text-align: left; color: var(--text-primary); }
.catalog-select-record { border: 0; background: transparent; padding: 0; cursor: pointer; font: inherit; }
.catalog-module-row strong { font-size: 13px; overflow-wrap: anywhere; }
.catalog-module-row .catalog-module-identity > span, .catalog-module-row .catalog-select-record > span { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.catalog-module-row-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.catalog-module-editor { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 0; max-block-size: calc(var(--catalog-viewport-height, 100vh) * .72); padding: 11px; margin-block-start: 7px; border: 1px solid var(--brand); border-radius: 9px; background: var(--surface-subtle); }
.catalog-module-editor h3 { flex: 0 0 auto; margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.catalog-module-editor > form { display: flex; flex-direction: column; flex: 1 1 auto; gap: 9px; min-width: 0; min-height: 0; width: 100%; margin: 0; }
.catalog-module-editor > form.catalog-editor-form { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.catalog-module-editor .catalog-form-fields { display: grid; flex: 1 1 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; align-items: start; gap: 12px; min-width: 0; min-height: 0; width: 100%; margin: 0; padding: 3px; overflow-y: auto; scroll-padding-block: 8px; overscroll-behavior-y: contain; }
.catalog-module-editor .catalog-form-fields > :is(label, div, fieldset) { min-width: 0; max-width: 100%; width: 100%; box-sizing: border-box; }
.catalog-module-editor .catalog-form-fields > .full-span { grid-column: 1 / -1; }
.catalog-module-editor .catalog-form-fields.catalog-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.catalog-form-region { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; min-width: 0; margin: 0; }
.catalog-form-region > label { display: grid; gap: 5px; min-width: 0; font-size: 13px; font-weight: 500; }
.catalog-form-region > :is(div, fieldset, label, p) { min-width: 0; max-width: 100%; }
.catalog-form-region > .full-span { grid-column: 1; }
.catalog-association-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; }
.catalog-association-pair > .catalog-remote-scope { grid-column: auto; }
.catalog-module-editor :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea) { width: 100%; }
.catalog-module-editor > form > .form-error { flex: 0 0 auto; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.catalog-module-editor .entity-form-actions { position: static; display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; grid-column: 1 / -1; min-width: 0; margin: 0; padding-block-start: 8px; border-top: 1px solid var(--border-subtle); }
.catalog-module-editor .entity-form-actions :is(.primary-button, .ghost-button) { min-width: 0; max-width: 100%; width: auto; white-space: normal; overflow-wrap: anywhere; }
@supports (container-type: size) and (max-block-size: 1cqb) {
  .catalog-module-panel { container-type: size; }
  .catalog-module-editor { max-block-size: 82cqb; }
}
.catalog-pagination { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; min-width: 0; gap: 6px; }
.catalog-pagination > span { color: var(--text-muted); font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.catalog-pagination .record-action-label { display: none; }
.catalog-local-feedback { flex: 0 0 auto; margin: 0; font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.catalog-local-feedback:empty { display: none; }
.catalog-remote-scope { display: flex; flex-direction: column; gap: 7px; min-width: 0; min-height: 0; margin: 0; padding: 10px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); box-sizing: border-box; }
.catalog-remote-scope legend { font-size: 13px; font-weight: 600; max-width: 100%; overflow-wrap: anywhere; padding-inline: 3px; }
.catalog-scope-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 6px; min-height: 36px; width: 100%; max-width: 100%; padding: 6px 8px; font: inherit; font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.catalog-scope-toggle > svg { order: 1; }
.catalog-scope-toggle[aria-expanded=true] > svg { transform: rotate(180deg); }
.catalog-scope-toggle[aria-expanded=true] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-hover); }
.catalog-remote-scope input[type=search] { width: 100%; min-width: 0; }
.catalog-selection-modes { display: flex; flex-wrap: wrap; gap: 7px 12px; min-height: 24px; }
.catalog-selection-modes:empty { display: none; }
.catalog-association-pair .catalog-selection-modes:empty { display: flex; }
.catalog-association-pair .catalog-selection-modes { min-block-size: 55px; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 7px; }
.catalog-remote-scope .catalog-scope-mode, :is(.catalog-remote-scope, .catalog-association-options-panel) .catalog-scope-option { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-width: 0; gap: 8px; font-size: 13px; font-weight: 400; color: var(--text-primary); box-sizing: border-box; }
.catalog-remote-scope .catalog-scope-mode { width: auto; white-space: nowrap; min-height: 24px; }
.catalog-remote-scope input[type=checkbox], .catalog-association-options-panel input[type=checkbox], .catalog-editor-form .catalog-inherit-check input[type=checkbox] { flex: 0 0 16px; width: 16px; height: 16px; min-height: 16px; max-width: 16px; margin: 0; padding: 0; accent-color: var(--brand); box-shadow: none; }
.catalog-choice-page { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; min-height: 0; max-block-size: clamp(96px, calc(var(--catalog-viewport-height, 100vh) * .22), 220px); overflow-y: auto; padding: 3px; scroll-padding-block: 6px; overscroll-behavior-y: contain; }
:is(.catalog-remote-scope, .catalog-association-options-panel) .catalog-scope-option { flex: 0 0 auto; min-height: 34px; padding: 5px 4px; cursor: pointer; border-radius: 5px; }
.catalog-scope-option:hover { background: var(--surface-subtle); }
.catalog-scope-option:has(:focus-visible) { outline: 2px solid var(--brand); outline-offset: -2px; }
.catalog-scope-option-label { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.catalog-selection-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; min-height: 30px; font-size: 12px; }
.catalog-scope-count { flex: 1 1 100%; color: var(--text-muted); }
.catalog-association-pair .catalog-selection-chips { min-height: 56px; align-content: start; }
.catalog-selection-chip { display: inline-flex; align-items: center; gap: 5px; max-width: min(210px, calc(100% - 38px)); min-width: 0; min-height: 24px; padding: 2px 6px; border: 1px solid var(--border-subtle); border-radius: 5px; background: var(--surface-subtle); color: var(--text-secondary); font: inherit; font-size: 12px; font-weight: 400; }
.catalog-selection-chip .record-action-label { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.catalog-selection-chip svg { flex: 0 0 13px; width: 13px; height: 13px; fill: none; stroke: var(--text-muted); stroke-width: 1.7; }
.catalog-selection-chip:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.catalog-selection-chip:disabled { opacity: .65; }
.catalog-editor-form .catalog-inherit-check { display: flex; gap: 7px; align-items: center; font-weight: 400; }
.catalog-editor-form[aria-busy=true] button[type=submit] { opacity: .65; cursor: wait; }
.catalog-discard-notice { position: fixed; display: flex; align-items: flex-start; gap: 8px; width: min(270px, calc(100vw - 20px)); padding: 10px; box-sizing: border-box; border: 1px solid var(--border-default); border-radius: 8px; box-shadow: var(--shadow-sm); background: var(--surface); color: var(--text-secondary); }
.catalog-discard-notice > svg { flex: 0 0 18px; width: 18px; height: 18px; stroke: var(--brand); stroke-width: 1.7; fill: none; }
.catalog-discard-notice-title { margin: 0; font-size: 13px; font-weight: 400; line-height: 1.4; }
.catalog-discard-notice-body, .catalog-discard-notice-actions { display: none; }
.catalog-scope-filters { display: grid; flex: 0 1 auto; align-content: start; gap: 8px; min-width: 0; min-height: 0; max-block-size: min(360px, calc(var(--catalog-viewport-height, 100vh) * .4)); overflow-y: auto; padding: 3px; }
.catalog-mobile-navigation { display: none; }
.catalog-module :is(button,input,select,textarea):focus-visible, .catalog-remote-scope :is(button,input):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.catalog-shell :is(.catalog-module-records, .catalog-choice-page, .message-template-records, .message-template-rich-preview):focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

/* One inline category row, shared by Empresas and Setores. */
.entity-category-picker { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; min-width: 0; }
.entity-category-picker.is-creating-category { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.catalog-company-identification > .entity-category-picker, .catalog-department-identification > .entity-category-picker { grid-column: 1 / -1; }
.entity-category-picker .entity-category-picker-line { align-items: end; gap: 6px; min-width: 0; }
.entity-category-picker .entity-category-picker-label, .entity-category-picker .entity-category-quick-form > label { display: grid; gap: 4px; min-width: 0; font-size: 13px; font-weight: 500; }
.entity-category-picker :is(select, input:not([type=checkbox])) { box-sizing: border-box; width: 100%; min-width: 0; height: 36px; min-height: 36px; }
.entity-category-picker .entity-category-add { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; width: 36px; height: 36px; min-height: 36px; padding: 6px; }
.entity-category-picker .entity-category-quick-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 6px; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.entity-category-picker .entity-category-quick-form[hidden] { display: none; }
.entity-category-picker .entity-category-quick-actions { display: flex; flex-wrap: nowrap; gap: 4px; }
.entity-category-picker .entity-category-quick-actions > button { flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; padding: 6px; }
.entity-category-picker .entity-category-quick-form > .form-error { grid-column: 1 / -1; grid-row: 2; margin: 0; font-size: 12px; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .entity-category-picker.is-creating-category { grid-template-columns: minmax(0, 1fr); }
}

/* Empresas owns a horizontal form; no other scope consumer opts into this variant. */
.catalog-company-editor > form.catalog-company-form { flex: 0 1 auto; gap: 8px; }
.catalog-company-editor .catalog-company-fields { display: flex; flex-direction: column; flex: 0 1 auto; align-items: stretch; gap: 10px; }
.catalog-company-identification { display: grid; flex: 0 0 auto; grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr) max-content; align-content: start; align-items: start; gap: 8px; min-width: 0; }
.catalog-company-identification > h4 { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 600; }
.catalog-company-identification > label:not(.company-receives-toggle), .catalog-company-identification .entity-category-picker-label, .catalog-company-identification .entity-category-quick-form > label { display: grid; gap: 4px; min-width: 0; color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.catalog-company-editor .entity-category-picker-label select, .catalog-company-editor .entity-category-add { height: 36px; min-height: 36px; }
.catalog-company-editor .entity-category-add { flex-basis: 36px; width: 36px; }
.catalog-company-identification > .company-receives-toggle { display: flex; grid-column: 3; grid-row: 2; align-self: end; align-items: center; gap: 6px; min-height: 36px; margin: 0; padding: 0; font-size: 13px; font-weight: 400; white-space: nowrap; }
.catalog-company-fields > .catalog-company-visibility { flex: 0 1 auto; width: 100%; gap: 6px; padding: 8px; container: company-visibility / inline-size; }
.catalog-company-scope-options { display: flex; flex-direction: column; flex: 0 1 auto; gap: 6px; min-width: 0; min-height: 0; }
.catalog-company-scope-options > :not(.catalog-choice-page) { flex: 0 0 auto; }
.catalog-company-scope-options .catalog-selection-modes { min-height: 24px; }
.catalog-company-scope-options > .catalog-choice-page { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; align-items: start; gap: 3px 8px; flex: 0 1 auto; min-block-size: 34px; max-block-size: clamp(68px, calc(var(--catalog-viewport-height, 100vh) * .22), 204px); }
.catalog-company-visibility > .catalog-local-feedback { flex: 0 0 auto; }
.catalog-company-editor .entity-form-actions { flex-wrap: nowrap; padding-block-start: 8px; }
.catalog-company-info { position: fixed; z-index: 1000; box-sizing: border-box; width: min(360px, calc(100vw - 20px)); padding: 10px; overflow-y: auto; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); color: var(--text-secondary); box-shadow: var(--shadow-sm); }
.catalog-company-info-title { margin: 0; font-size: 13px; font-weight: 600; }
.catalog-company-info-header p { margin: 6px 0 0; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.catalog-company-info-body, .catalog-company-info-actions { display: none; }
@container company-visibility (min-width: 600px) {
  .catalog-company-scope-options > .catalog-choice-page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container company-visibility (min-width: 960px) {
  .catalog-company-scope-options > .catalog-choice-page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@supports (container-type: size) and (max-block-size: 1cqb) {
  .catalog-empresas .catalog-module-records { container-type: size; }
  .catalog-empresas .catalog-company-record { display: flex; flex-direction: column; max-block-size: calc(100cqb - 8px); }
  .catalog-company-record > .catalog-module-row { flex: 0 0 auto; border-color: var(--brand); }
  .catalog-empresas .catalog-company-editor { flex: 0 1 auto; box-sizing: border-box; max-block-size: calc(100cqb - 8px); }
  .catalog-empresas .catalog-company-record > .catalog-company-editor { max-block-size: none; }
}
@media (max-width: 760px) {
  .catalog-company-identification { grid-template-columns: minmax(0, 1fr); }
  .catalog-company-identification > .company-receives-toggle { grid-column: 1; grid-row: auto; min-height: 36px; }
}

/* Setores shares one exclusive options area, below its compact identification. */
.catalog-department-editor { flex: 0 0 auto; max-block-size: none; }
.catalog-department-editor > form.catalog-department-form { flex: 0 0 auto; gap: 8px; }
.catalog-department-editor .catalog-department-fields { display: flex; flex-direction: column; flex: 0 0 auto; align-items: stretch; gap: 8px; overflow: visible; }
.catalog-department-identification { display: grid; flex: 0 0 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; align-items: start; gap: 8px; min-width: 0; }
.catalog-department-identification > h4 { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 600; }
.catalog-department-identification > label, .catalog-department-identification .entity-category-picker-label, .catalog-department-identification .entity-category-quick-form > label { display: grid; gap: 4px; min-width: 0; color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.catalog-department-editor .entity-category-picker-label select, .catalog-department-editor .entity-category-add { height: 36px; min-height: 36px; }
.catalog-department-editor .entity-category-add { flex-basis: 36px; width: 36px; }
.catalog-department-fields > .catalog-department-associations { display: flex; flex-direction: column; flex: 0 1 auto; gap: 8px; min-height: 0; padding-block-start: 8px; container: department-associations / inline-size; }
.catalog-department-associations > :is(.catalog-association-heading, .catalog-association-controls, .catalog-department-load-state) { flex: 0 0 auto; }
.catalog-department-associations > .catalog-association-controls { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.catalog-department-associations .catalog-department-association-control .catalog-scope-mode { white-space: nowrap; gap: 6px; }
.catalog-department-associations > .catalog-association-options { display: flex; flex-direction: column; flex: 0 1 auto; align-items: stretch; min-height: 0; }
.catalog-department-associations .catalog-association-options-panel { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; gap: 6px; }
.catalog-department-associations .catalog-association-options-panel > :not(.catalog-choice-page) { flex: 0 0 auto; }
.catalog-department-associations .catalog-association-options-panel .catalog-choice-page { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; align-items: start; gap: 6px 8px; flex: 0 1 auto; min-block-size: 34px; max-block-size: clamp(68px, calc(var(--catalog-viewport-height, 100vh) * .22), 204px); }
.catalog-department-load-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; margin: 0; }
.catalog-department-load-state > span { flex: 1 1 180px; overflow-wrap: anywhere; }
.catalog-department-editor .entity-form-actions { flex-wrap: nowrap; padding-block-start: 8px; }
.catalog-department-editor .catalog-department-associations [hidden] { display: none; }
@container department-associations (min-width: 600px) {
  .catalog-department-associations > .catalog-association-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-department-associations .catalog-association-options-panel .catalog-choice-page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container department-associations (min-width: 960px) {
  .catalog-department-associations .catalog-association-options-panel .catalog-choice-page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@supports (container-type: size) and (max-block-size: 1cqb) {
  .catalog-setores .catalog-module-records { container-type: size; }
  .catalog-setores .catalog-department-record { display: flex; flex-direction: column; }
  .catalog-department-record > .catalog-module-row { flex: 0 0 auto; border-color: var(--brand); }
}
@media (max-width: 760px) {
  .catalog-department-identification { grid-template-columns: minmax(0, 1fr); }
}

/* Requerentes keeps identification above one exclusive, full-width options area. */
.catalog-requester-editor > form.catalog-requester-form { flex: 0 1 auto; gap: 8px; }
.catalog-requester-editor .catalog-requester-fields { display: flex; flex-direction: column; flex: 0 1 auto; align-items: stretch; gap: 8px; }
.catalog-requester-identification { display: grid; flex: 0 0 auto; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; min-width: 0; }
.catalog-requester-identification > label { display: grid; gap: 4px; min-width: 0; color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.catalog-requester-fields > .catalog-requester-associations { display: flex; flex-direction: column; flex: 0 1 auto; gap: 8px; min-height: 0; padding-block-start: 8px; container: requester-associations / inline-size; }
.catalog-requester-associations > :is(.catalog-association-heading, .catalog-association-controls, .catalog-local-feedback) { flex: 0 0 auto; }
.catalog-requester-associations > .catalog-association-controls { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.catalog-requester-associations .catalog-requester-association-control .catalog-selection-chip { max-width: min(210px, calc(100% - 32px)); }
.catalog-requester-associations > .catalog-association-options { display: flex; flex-direction: column; flex: 0 1 auto; align-items: stretch; min-height: 0; }
.catalog-requester-associations .catalog-association-options-panel { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; gap: 6px; padding: 8px; }
.catalog-requester-associations .catalog-association-options-panel > :not(.catalog-choice-page) { flex: 0 0 auto; }
.catalog-requester-associations .catalog-selection-modes { gap: 6px; min-height: 0; }
.catalog-requester-associations .catalog-scope-mode { display: flex; align-items: center; gap: 6px; min-width: 0; min-height: 24px; font-size: 13px; font-weight: 400; color: var(--text-primary); }
.catalog-requester-associations .catalog-scope-option { gap: 6px; }
.catalog-requester-associations .catalog-association-options-panel .catalog-choice-page { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; align-items: start; gap: 6px 8px; flex: 0 1 auto; min-block-size: 34px; max-block-size: clamp(68px, calc(var(--catalog-viewport-height, 100vh) * .22), 204px); }
.catalog-requester-associations .catalog-choice-page:empty { min-block-size: 0; }
.catalog-requester-editor .entity-form-actions { flex-wrap: nowrap; padding-block-start: 8px; }
.catalog-requester-editor .catalog-requester-associations [hidden] { display: none; }
@container requester-associations (min-width: 600px) {
  .catalog-requester-associations > .catalog-association-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-requester-associations .catalog-association-options-panel .catalog-choice-page { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container requester-associations (min-width: 900px) {
  .catalog-requester-associations .catalog-association-options-panel .catalog-choice-page { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container requester-associations (min-width: 1200px) {
  .catalog-requester-associations .catalog-association-options-panel .catalog-choice-page { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@supports (container-type: size) and (max-block-size: 1cqb) {
  .catalog-requerentes .catalog-module-records { container-type: size; }
  .catalog-requerentes .catalog-requester-record { display: flex; flex-direction: column; max-block-size: calc(100cqb - 8px); }
  .catalog-requester-record > .catalog-module-row { flex: 0 0 auto; border-color: var(--brand); }
  .catalog-requerentes .catalog-requester-editor { flex: 0 1 auto; box-sizing: border-box; max-block-size: calc(100cqb - 8px); }
  .catalog-requerentes .catalog-requester-record > .catalog-requester-editor { max-block-size: none; }
}

/* Chamado opts into compact controls and a separate, adaptive options region. */
.catalog-ticket-editor > form.catalog-ticket-form { flex: 0 1 auto; }
.catalog-ticket-editor .catalog-ticket-form-body { flex: 0 1 auto; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; gap: 12px; }
.catalog-ticket-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px 12px; min-width: 0; }
.catalog-ticket-field-row > label, .catalog-ticket-field-row .catalog-inheritable-control { display: grid; gap: 5px; min-width: 0; color: var(--text-secondary); font-size: 13px; font-weight: 500; }
.catalog-ticket-field-row .catalog-inheritable-control { padding: 7px; }
.catalog-ticket-field-row .catalog-inherited-field { display: grid; gap: 6px; min-width: 0; }
.catalog-association-area { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 8px; min-width: 0; padding-top: 10px; border-top: 1px solid var(--border-subtle); }
.catalog-association-heading { margin: 0; font-size: 13px; font-weight: 600; }
.catalog-association-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 6px 10px; min-width: 0; }
.catalog-association-control { align-self: start; padding: 8px; }
.catalog-scope-header { display: grid; grid-template-columns: minmax(0, 1fr) 36px; align-items: start; gap: 6px; min-width: 0; }
.catalog-scope-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.catalog-scope-title-line { display: flex; align-items: center; gap: 4px; min-width: 0; min-height: 36px; }
.catalog-scope-title-line > .catalog-scope-heading { margin: 0; min-width: 0; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.catalog-scope-title-line > .catalog-command { flex: 0 0 26px; width: 26px; height: 26px; min-height: 26px; padding: 4px; }
.catalog-scope-copy > .catalog-selection-modes { flex-direction: column; align-items: flex-start; min-height: 0; gap: 4px; }
.catalog-expandable-scope > .catalog-scope-header > .catalog-scope-toggle { display: inline-flex; align-self: start; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; padding: 5px; line-height: 1; }
.catalog-scope-header > .catalog-scope-toggle > svg { order: 0; flex: 0 0 17px; margin: 0; }
.catalog-scope-copy > .catalog-selection-chips { min-height: 24px; flex-wrap: wrap; }
.catalog-scope-copy .catalog-scope-count { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.catalog-association-control .catalog-scope-mode { min-height: 20px; white-space: normal; }
.catalog-association-control .catalog-scope-count { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.catalog-association-control .catalog-selection-chip { flex: 0 1 auto; max-width: min(160px, 45%); }
.catalog-association-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px; min-width: 0; }
.catalog-association-options[data-expanded="1"] { grid-template-columns: minmax(0, 1fr); }
.catalog-association-options-panel { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; min-width: 0; padding: 8px; border: 1px solid var(--border-default); border-radius: 8px; background: var(--surface); box-sizing: border-box; }
.catalog-association-options-panel > input[type=search] { width: 100%; min-width: 0; }
.catalog-association-options-panel .catalog-choice-page { max-block-size: clamp(96px, calc(var(--catalog-viewport-height, 100vh) * .22), 200px); }
.catalog-ticket-editor .entity-form-actions { flex-wrap: nowrap; }
@supports (container-type: size) and (max-block-size: 1cqb) {
  .catalog-chamado .catalog-module-records { container-type: size; }
  .catalog-chamado .catalog-ticket-record { display: flex; flex-direction: column; flex: 0 0 auto; max-block-size: calc(100cqb - 8px); }
  .catalog-ticket-record > .catalog-module-row { flex: 0 0 auto; }
  .catalog-chamado .catalog-ticket-editor { flex: 0 1 auto; box-sizing: border-box; max-block-size: calc(100cqb - 8px); }
  .catalog-chamado .catalog-ticket-record > .catalog-ticket-editor { max-block-size: none; }
}
/* Creation is outside the records scroller: only the list gives up spare height.
   If the complete form cannot fit, this region scrolls without shrinking it. */
.catalog-ticket-content { display: flex; flex-direction: column; flex: 1 1 0; gap: 7px; min-width: 0; min-height: 0; overflow-y: auto; scroll-padding-block: 8px; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb, #a9bdb8) transparent; }
.catalog-ticket-content::-webkit-scrollbar { width: 6px; height: 6px; }
.catalog-ticket-content::-webkit-scrollbar-track { background: transparent; }
.catalog-ticket-content::-webkit-scrollbar-thumb { border-radius: 999px; background: var(--scrollbar-thumb, #a9bdb8); }
.catalog-ticket-content::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover, #7f9c94); }
.catalog-ticket-content > .catalog-ticket-editor { flex: 0 0 auto; max-block-size: none; margin-block-start: 0; }
.catalog-ticket-content > .catalog-ticket-editor > form.catalog-ticket-form,
.catalog-ticket-content > .catalog-ticket-editor .catalog-ticket-form-body { flex: 0 0 auto; }
.catalog-ticket-content > .catalog-ticket-editor .catalog-ticket-form-body { overflow: visible; }
/* Keep a usable list viewport when the form needs the outer scroll region. */
.catalog-ticket-content:has(> .catalog-ticket-editor) > .catalog-module-records { flex: 1 0 0; min-block-size: min(100%, 8rem); overscroll-behavior-y: auto; }
@media (max-width: 1100px) {
  .catalog-ticket-workspace { grid-template-columns: minmax(0, 1fr); }
  .catalog-mobile-navigation { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
  .catalog-mobile-navigation > button { flex: 1 1 140px; }
  .catalog-chamado[data-mobile-panel=types] .catalog-mobile-navigation > :first-child,
  .catalog-chamado[data-mobile-panel=categories] .catalog-mobile-navigation > :last-child { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-hover); }
  .catalog-chamado[data-mobile-panel=types] .catalog-ticket-workspace > :last-child,
  .catalog-chamado[data-mobile-panel=categories] .catalog-ticket-workspace > :first-child { display: none; }
}
@media (max-width: 980px) {
  .catalog-shell > .sidebar { height: var(--catalog-viewport-height, 100vh); height: var(--catalog-viewport-height, 100dvh); }
}
@media (max-width: 760px) {
  .catalog-shell .catalog-page-content { padding: 8px; padding-block-end: max(8px, env(safe-area-inset-bottom)); }
  .catalog-module, .catalog-ticket-workspace { gap: 8px; }
  .catalog-module-panel { padding: 10px; }
  .catalog-module-row { flex-wrap: wrap; }
  .catalog-module-row > :first-child { flex-basis: calc(100% - 80px); }
  .catalog-module-row-actions { margin-inline-start: auto; }
  .catalog-module-editor { padding: 8px; }
  .catalog-module-editor .catalog-form-fields { grid-template-columns: minmax(0, 1fr); }
  .catalog-module-editor .catalog-form-fields.catalog-columns, .catalog-association-pair { grid-template-columns: minmax(0, 1fr); }
  .catalog-association-pair .catalog-selection-modes { min-block-size: 24px; }
  .catalog-module-editor .catalog-form-fields > * { grid-column: 1 / -1; }
  .catalog-ticket-field-row, .catalog-association-controls, .catalog-association-options { grid-template-columns: minmax(0, 1fr); }
  .catalog-requester-associations > .catalog-association-controls,
  .catalog-requester-associations .catalog-association-options-panel .catalog-choice-page { grid-template-columns: minmax(0, 1fr); }
  .catalog-module :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { font-size: 16px; }
  .catalog-command { min-height: 40px; }
}
