/* Theme for the shared data_table() macro and the vendored Tabulator skin. */
.ac-table-scroll { position: relative; margin: 0 0 18px; max-width: 100%; }
.ac-table-scroll > table.ac-table { margin: 0; }
.ac-table-scroll > table.ac-table[hidden] { display: none !important; }

.ac-table-scroll .tabulator {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 14px;
  overflow: hidden;
}
.ac-table-scroll .tabulator .tabulator-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  color: var(--muted-foreground);
  font-weight: 500;
}
.ac-table-scroll .tabulator .tabulator-col {
  background: #fff;
  border-right: 0;
}
.ac-table-scroll .tabulator .tabulator-header .tabulator-col .tabulator-col-content { padding: 12px 16px; }
.ac-table-scroll .tabulator .tabulator-col-title {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}
.ac-table-scroll .tabulator .tabulator-col.ac-num .tabulator-col-title,
.ac-table-scroll .tabulator .tabulator-cell.ac-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ac-table-scroll .tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {
  background: var(--muted);
}
.ac-table-scroll .tabulator .tabulator-row { background: #fff; border-bottom: 1px solid var(--border); }
.ac-table-scroll .tabulator .tabulator-row:hover { background: hsl(60 4.8% 95.9% / 0.7); }
.ac-table-scroll .tabulator .tabulator-tableholder { overflow-x: auto; }
.ac-table-scroll .tabulator .tabulator-cell {
  border-right: 0;
  padding: 12px 16px;
  vertical-align: top;
  white-space: nowrap;
}
.ac-table-scroll .tabulator .tabulator-cell.ac-wrap {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.ac-table-scroll .people-save { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ac-table-scroll .people-save button { white-space: nowrap; }
.ac-table-scroll .tabulator .tabulator-footer { background: #fff; border-top: 1px solid var(--border); }
.ac-table-scroll .tabulator-responsive-collapse {
  border-top: 1px solid var(--border);
  padding: 4px 16px 10px;
}
.ac-table-scroll .tabulator-responsive-collapse table { display: block; width: 100%; }
.ac-table-scroll .tabulator-responsive-collapse tr { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 8px; padding: 6px 0; }
.ac-table-scroll .tabulator-responsive-collapse td { border: 0; padding: 0; display: block; }
.ac-table-scroll .tabulator-responsive-collapse td:first-child {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 600;
}

.ac-table-scroll.is-overflowing::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  pointer-events: none;
  background: linear-gradient(to right, transparent, var(--background, #fff));
  border-radius: 0 var(--radius) var(--radius) 0;
}

@media (max-width: 639px) {
  .ac-table-scroll[data-static="1"] > table.ac-table,
  .ac-table-scroll:not([data-ready="1"]) > table.ac-table {
    display: block;
    overflow: visible;
  }
  .ac-table-scroll[data-static="1"] > table.ac-table thead,
  .ac-table-scroll:not([data-ready="1"]) > table.ac-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .ac-table-scroll[data-static="1"] > table.ac-table tbody,
  .ac-table-scroll[data-static="1"] > table.ac-table tr,
  .ac-table-scroll:not([data-ready="1"]) > table.ac-table tbody,
  .ac-table-scroll:not([data-ready="1"]) > table.ac-table tr {
    display: block;
    width: auto;
  }
  .ac-table-scroll[data-static="1"] > table.ac-table tr,
  .ac-table-scroll:not([data-ready="1"]) > table.ac-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0 0 12px;
    padding: 8px 12px;
  }
  .ac-table-scroll[data-static="1"] > table.ac-table td,
  .ac-table-scroll:not([data-ready="1"]) > table.ac-table td {
    display: grid;
    grid-template-columns: minmax(96px, 38%) 1fr;
    gap: 8px;
    border: 0;
    padding: 6px 0;
    width: auto;
  }
  .ac-table-scroll[data-static="1"] > table.ac-table td::before,
  .ac-table-scroll:not([data-ready="1"]) > table.ac-table td::before {
    content: attr(data-label);
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 600;
  }
}

.status-doc { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 18px; background: #fff; }
.status-doc h2, .status-doc h3 { margin: 14px 0 8px; }
.status-doc ul { margin: 0; padding-left: 18px; }
.status-doc li { margin: 4px 0; }

@media (max-width: 800px) {
  .ac-table-scroll > table.ac-table { display: table; overflow: visible; width: 100%; }
}

/* Inbound audit log: one table, shared column widths, full container width. */
.ac-table-scroll.ac-audit-log {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.ac-table-scroll.ac-audit-log.is-overflowing::after { content: none; display: none; }
.ac-table-scroll.ac-audit-log .pill { white-space: nowrap; }
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table {
  display: table;
  table-layout: fixed;
  width: 100%;
  min-width: 0;
  margin: 0;
  border-collapse: collapse;
  overflow: visible !important;
  border: 0;
  border-radius: 0;
}
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table thead {
  display: table-header-group;
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
}
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table tbody {
  display: table-row-group;
}
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table tr {
  display: table-row;
  width: auto;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
}
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table th,
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table td {
  display: table-cell;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: normal;
  vertical-align: top;
  padding: 12px 12px;
  width: auto;
  min-width: 0;
  max-width: none;
}
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table th {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table td { white-space: normal; }
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table td::before { content: none; display: none; }
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table th:nth-child(1),
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table td:nth-child(1) { width: 16%; white-space: nowrap; }
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table th:nth-child(2),
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table td:nth-child(2) { width: 22%; }
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table th:nth-child(3),
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table td:nth-child(3) { width: 16%; }
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table th:nth-child(4),
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table td:nth-child(4) { width: 24%; }
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table th:nth-child(5),
.ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table td:nth-child(5) { width: 22%; }
.audit-auth { margin-top: 4px; }
.audit-files {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.auth-pill {
  padding: 1px 7px;
  font-size: 10px;
  letter-spacing: 0.03em;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}

@media (max-width: 639px) {
  .ac-table-scroll.ac-audit-log {
    border: 0;
    background: transparent;
    overflow: visible;
    scrollbar-gutter: auto;
  }
  .ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table {
    display: block;
    width: auto;
    min-width: 0;
    overflow: visible;
  }
  .ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
  }
  .ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table tbody,
  .ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table tr {
    display: block;
    width: auto;
  }
  .ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 0 0 12px;
    padding: 8px 12px;
    background: #fff;
  }
  .ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table th,
  .ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table td {
    display: grid;
    grid-template-columns: minmax(96px, 38%) 1fr;
    gap: 8px;
    border: 0;
    padding: 6px 0;
    width: auto;
    min-width: 0;
    max-width: none;
    white-space: normal;
  }
  .ac-table-scroll.ac-audit-log[data-static="1"] > table.ac-table td::before {
    content: attr(data-label);
    color: var(--muted-foreground);
    font-size: 12px;
    font-weight: 600;
    display: block;
  }
}
