/* One geometry contract for every entity registry, including grid-based tasks.
   24px selection inset = the former Companies 16px inset + the requested 2mm (~8px). */
.registry-quick-menu { max-height: calc(100dvh - 16px); overflow-y: auto; }
.registry-export-dialog { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-sizing: border-box; padding: 24px; border: 1px solid var(--line, #dce1d8); border-radius: 18px; background: #fff; color: var(--text, #20251f); font: inherit; }
.registry-export-dialog::backdrop { background: rgb(20 25 18 / .28); }
.registry-export-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.registry-export-dialog h2 { margin: 0; font-size: 20px; }
.registry-export-dialog p { line-height: 1.5; color: var(--muted, #687162); }
.registry-export-dialog [data-close] { border: 0; background: transparent; font: inherit; font-size: 24px; padding: 4px 8px; }
.registry-export-formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.registry-export-formats button { padding: 16px 8px; border: 1px solid var(--line, #dce1d8); border-radius: 12px; background: #f7f8f5; font: inherit; font-weight: 400; }
.registry-export-formats button:hover { background: #edf3e1; }
.registry-export-formats small { display: block; margin-top: 6px; color: var(--muted, #687162); }
.registry-export-dialog button:focus-visible { outline: 2px solid #648a12; outline-offset: 2px; }
.registry-export-dialog [role="status"]:empty { display: none; }
:root {
  --registry-header-height: 56px;
  --registry-header-font-size: var(--type-body, 14px);
  --registry-selection-inset: 24px;
  --registry-control-size: 14px;
  --registry-column-guide: rgba(112, 119, 110, .10);
}
.table-card[data-registry-schema] { padding: 0 !important; overflow: auto; }
.table-card[data-registry-schema] > table { width: 100%; border-collapse: collapse; }
.table-card[data-registry-schema] > table > thead > tr { height: var(--registry-header-height); }
.table-card[data-registry-schema] > table > thead > tr > th,
.task-table[data-registry-schema="tasks"] > header {
  box-sizing: border-box !important;
  height: var(--registry-header-height) !important;
  min-height: var(--registry-header-height) !important;
  padding-block: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  background: #fff !important;
  vertical-align: middle;
}
.table-card[data-registry-schema] > table > thead > tr > th,
.task-table[data-registry-schema="tasks"] > header > [data-column-key],
[data-registry-schema] .registry-header-sort,
[data-registry-schema] .registry-header-sort > span {
  font: 400 var(--registry-header-font-size)/1.4 Geometria, Arial, sans-serif !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  color: var(--muted) !important;
  text-align: left !important;
  white-space: nowrap;
}
.table-card[data-registry-schema] > table > thead > tr > th:not(.registry-number) { padding-inline: 16px !important; }
[data-registry-schema] .registry-header-sort { max-width: 100%; min-height: 28px; gap: 5px; padding: 0 !important; }
[data-registry-schema] .registry-header-sort > span { overflow: hidden; text-overflow: ellipsis; }
[data-registry-schema] .registry-header-sort > img { width: 10px !important; height: 10px !important; flex: 0 0 10px; opacity: .55; }
.table-card[data-registry-schema] table th.registry-number,
.table-card[data-registry-schema] table td.registry-number,
.task-table[data-registry-schema="tasks"] > header > .registry-number,
.task-table[data-registry-schema="tasks"] > .task-table-row > .registry-number {
  box-sizing: border-box !important;
  min-width: 88px !important; width: auto !important; max-width: none !important;
  padding: 0 12px 0 var(--registry-selection-inset) !important;
}
[data-registry-schema] .registry-number .registry-cell-controls {
  display: flex !important; align-items: center; justify-content: flex-start;
  width: 58px; height: 28px !important; min-height: 28px !important; gap: 16px;
  line-height: 1; margin: 0 !important; padding: 0 !important;
}
[data-registry-schema] .registry-cell-controls .registry-select {
  width: var(--registry-control-size) !important; height: var(--registry-control-size) !important;
  min-width: var(--registry-control-size) !important; min-height: 0 !important;
  flex: 0 0 var(--registry-control-size); margin: 0 !important; padding: 0 !important; cursor: pointer;
  align-self: center !important; position: static !important; transform: none !important;
}
[data-registry-schema] .registry-cell-controls .registry-inline-settings,
.task-table[data-registry-schema="tasks"] .registry-cell-controls .registry-inline-settings {
  flex: 0 0 28px !important; max-width: 28px; margin: 0 !important;
  display: flex !important; align-items: center !important; height: 28px !important;
  /* Move only the header gear 1mm towards the checkbox; keep row actions intact. */
  position: relative; left: -4px;
}
[data-registry-schema] .registry-cell-controls .registry-column-settings-button,
[data-registry-schema] .registry-cell-controls .registry-quick-action,
.task-table[data-registry-schema="tasks"] .registry-cell-controls .registry-quick-action {
  width: 28px !important; min-width: 28px !important; height: 28px !important; min-height: 28px !important;
  flex: 0 0 28px !important; padding: 7px !important; font-weight: 400 !important;
}
[data-registry-schema] .registry-cell-controls button img {
  width: var(--registry-control-size) !important; height: var(--registry-control-size) !important;
  flex: 0 0 var(--registry-control-size); opacity: .65;
}
[data-registry-schema] .registry-select:focus-visible,
[data-registry-schema] .registry-cell-controls button:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
.task-table[data-registry-schema="tasks"] > header { align-items: stretch !important; }
.task-table[data-registry-schema="tasks"] > header > [data-column-key] { display: flex !important; align-items: center !important; }
.task-table[data-registry-schema="tasks"] .task-title-cell > button { width: 100%; border: 0; background: transparent; text-align: left; padding: 0; }
.task-table[data-registry-schema="tasks"] [data-column-key="dueAt"] > button { border: 0; background: transparent; text-align: left; padding: 0; font: inherit; }
.task-table[data-registry-schema="tasks"] [data-column-key="dueAt"] > button small { display: block; }
/* A single solid guide spans the complete rendered column, not just its header. */
.table-card[data-registry-schema] > table > thead > tr > th.resizable-column,
.task-table[data-registry-schema] > header > .resizable-column,
.registry-grid[data-registry-schema] > header > .resizable-column { position: relative !important; }
[data-registry-schema] .resizable-column > [data-column-resizer] { top: 0 !important; bottom: 0 !important; }
[data-registry-schema] .resizable-column > [data-column-resizer] { cursor: ew-resize; }
[data-registry-schema] .resizable-column > [data-column-resizer]::before {
  top: 0 !important; bottom: auto !important;
  height: var(--registry-guide-height, 100%) !important;
  width: 1px !important; background: var(--registry-column-guide) !important;
  box-shadow: none !important; opacity: 0 !important;
  pointer-events: none;
}
[data-registry-schema] .resizable-column > [data-column-resizer]:hover::before,
[data-registry-schema] .resizable-column > [data-column-resizer]:focus-visible::before,
[data-registry-schema] .resizable-column > [data-column-resizer].active::before { opacity: 1 !important; }
[data-registry-schema] .resizable-column > [data-column-resizer]:focus-visible { outline: 1px solid rgba(112,119,110,.32); outline-offset: -4px; }
.table-card[data-registry-schema] td > .entity-link { display: block; }
.deals-table-scroll[data-registry-schema] { border: 1px solid var(--line); border-radius: var(--radius, 14px); }
/* The import preview is a data table, but has no selectable business records. */
.bulk-import-table thead th { height: var(--registry-header-height); font: 400 var(--registry-header-font-size)/1.4 Geometria,Arial,sans-serif; text-transform: none; }
/* Administrative grids share headers and resizing, without inventing bulk access actions. */
.registry-grid[data-registry-schema] { overflow: auto; min-width: 0; }
.registry-grid[data-registry-schema] > header,
.registry-grid[data-registry-schema] > article {
  display: grid !important; gap: 0 !important; padding: 0 !important; align-items: stretch !important;
}
.registry-grid[data-registry-schema] > header {
  height: var(--registry-header-height) !important; min-height: var(--registry-header-height) !important;
  box-sizing: border-box; border-bottom: 1px solid var(--line); background: #fff;
}
.registry-grid[data-registry-schema] > header > [data-column-key] {
  display: flex; align-items: center; padding: 0 16px; min-width: 0;
  font: 400 var(--registry-header-font-size)/1.4 Geometria, Arial, sans-serif !important;
  text-transform: none !important; letter-spacing: normal !important; color: var(--muted);
}
.registry-grid[data-registry-schema] > article > .registry-grid-cell {
  display: flex; align-items: center; padding: 12px 16px; min-width: 0; overflow-wrap: anywhere;
}
.registry-grid[data-registry-schema] .registry-grid-cell > * { min-width: 0; max-width: 100%; }
.registry-grid[data-registry-schema] .registry-grid-cell > select { width: 100%; }
.registry-grid[data-registry-schema] .registry-grid-cell > .directory-state { align-self: center; justify-self: start; }
.registry-grid[data-registry-schema] .directory-row-actions { flex-wrap: wrap; }
.service-directory-table.registry-grid .registry-grid-cell > button {
  border: 0; background: transparent; color: var(--accent-dark);
  padding: 4px 0; font: 400 12px/1.4 Geometria, Arial, sans-serif; cursor: pointer;
}
.registry-grid[data-registry-schema] .row-icon-button { width: 28px; height: 28px; padding: 7px; }
.registry-grid[data-registry-schema] .row-icon-button img { width: 14px; height: 14px; }
.table-card[data-registry-schema] [data-column-key][hidden],
.task-table[data-registry-schema="tasks"] > header > [data-column-key][hidden],
.task-table[data-registry-schema="tasks"] > .task-table-row > [data-column-key][hidden],
.registry-grid[data-registry-schema] > header > [data-column-key][hidden],
.registry-grid[data-registry-schema] > article > [data-column-key][hidden] { display: none !important; }
@media (max-width: 980px) {
  [data-registry-schema] .resizable-column > [data-column-resizer] { display: block !important; }
}
