/* Condoport V3 — tabelas operacionais canônicas, Variação 3 ultra clean. */
:root {
  --table-divider-soft: color-mix(in oklab, var(--cp-border) 72%, transparent);
  --table-header-surface: color-mix(in oklab, var(--cp-bg) 72%, var(--cp-surface));
  --table-row-hover: color-mix(in oklab, var(--cp-accent-soft) 58%, transparent);
  --table-shell-radius: 12px;
}

/* O mesmo shell atende visitantes, entregas, operações e Histórico de plantões. */
:is(.p12-visitors-table-scroll, .p21-deliveries-table-scroll, .p11-shift-table-scroll, .table-responsive) {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  border: 1px solid var(--table-divider-soft);
  border-radius: var(--table-shell-radius);
  background: var(--cp-surface);
}

:is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) {
  width: max-content;
  min-width: 100%;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--cp-fg);
}

:is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) thead th {
  height: 42px;
  padding: 8px 11px;
  border: 0;
  border-bottom: 1px solid var(--table-divider-soft);
  background: var(--table-header-surface);
  color: var(--cp-fg);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  text-align: left;
  vertical-align: middle;
}

:is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) tbody :is(td, th) {
  height: 44px;
  padding: 8px 11px;
  border: 0;
  border-bottom: 1px solid var(--table-divider-soft);
  background: transparent;
  color: var(--cp-fg);
  font-size: .82rem;
  line-height: 1.3;
  text-align: left;
  vertical-align: middle;
}

:is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) tbody tr:hover :is(td, th) {
  background: var(--table-row-hover);
}

:is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) tbody tr:last-child :is(td, th) {
  border-bottom: 0;
}

/* A alça mantém a área de toque, sem desenhar uma grade vertical em repouso. */
.p6grip::after { width: 0; background: transparent; }
.p6grip:hover::after, .p6grip:focus-visible::after { width: 1px; background: var(--cp-accent-strong); }
.p6grip.is-active::after { width: 2px; background: var(--cp-accent-strong); }

@media (max-width: 1023px) {
  :is(.p12-visitors-table-scroll, .p21-deliveries-table-scroll, .p11-shift-table-scroll, .table-responsive) { width: 100%; max-width: 100%; min-width: 0; }
  :is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) thead th { height: 42px; padding: 8px 10px; }
  :is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) tbody :is(td, th) { height: 46px; padding: 9px 10px; }
}

@media (prefers-color-scheme: dark) {
  :root { --table-divider-soft: color-mix(in oklab, var(--cp-border) 84%, transparent); --table-header-surface: color-mix(in oklab, var(--cp-bg) 64%, var(--cp-surface)); --table-row-hover: color-mix(in oklab, var(--cp-accent-soft) 46%, transparent); }
}


/* DS-TABELAS-CANON-V3-R1 compact metrics */
:root :is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) thead th {
  height: 42px;
  padding: 2px 10px;
}
:root :is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) thead :is(.p14-sort-button, .p2op-sort) {
  min-height: 38px;
}
:root :is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) tbody :is(td, th) {
  height: 46px;
  padding: 7px 10px;
}
:root :is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) tbody .btn {
  min-height: 30px;
  padding-block: 4px;
}


/* DS-TABELAS-CANON-V3-R1 row action fit */
:root :is(.p12-visitors-table, .p21-deliveries-table, .p11-shift-table, .p2op-table) tbody .btn {
  height: 30px;
  min-height: 30px;
}
