/* Small custom overrides on top of the Tailwind CDN build loaded in _Layout.cshtml. */

[x-cloak] {
  display: none !important;
}

/* --- DataTables: more breathing room in the header/toolbar rows --------------------- */

table.dataTable thead th,
table.dataTable thead td {
  padding: 0.75rem 1rem !important;
}

table.dataTable tbody th,
table.dataTable tbody td {
  padding: 0.6rem 1rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding: 0.75rem 1rem;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  margin-left: 0.5rem;
}

/* --- Dark theme: DataTables ships white-only chrome, so override it explicitly ------ */

html.dark table.dataTable {
  color: #e2e8f0;
  border-color: #334155;
}

html.dark table.dataTable thead th,
html.dark table.dataTable thead td {
  color: #94a3b8;
  border-bottom-color: #334155;
}

html.dark table.dataTable tbody tr {
  background-color: transparent;
  border-color: #1e293b;
}

html.dark table.dataTable tbody tr:hover {
  background-color: #1e293b;
}

html.dark .dataTables_wrapper .dataTables_length,
html.dark .dataTables_wrapper .dataTables_filter,
html.dark .dataTables_wrapper .dataTables_info,
html.dark .dataTables_wrapper .dataTables_paginate {
  color: #94a3b8;
}

html.dark .dataTables_wrapper .dataTables_filter input,
html.dark .dataTables_wrapper .dataTables_length select {
  background-color: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

html.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #e2e8f0 !important;
}

html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: #334155 !important;
  border-color: #475569 !important;
  color: #f8fafc !important;
}

html.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  color: #475569 !important;
}

html.dark .dataTables_processing {
  background-color: #0f172a;
  color: #e2e8f0;
}

/* Row links (rendered client-side by DataTables' render() callbacks, so Tailwind's CDN JIT may
   not reliably pick up dark: variants baked into those JS strings) - fall back to plain CSS. */
html.dark table.dataTable tbody a,
html.dark table:not(.dataTable) tbody a {
  color: #38bdf8;
}

html.dark table.dataTable tbody a:hover,
html.dark table:not(.dataTable) tbody a:hover {
  color: #7dd3fc;
}

