/* Theme surfaces are loaded independently of application JS.
 * Scoped upstream table rules hard-code blue-gray colors and do not use Tailwind tokens.
 * Override backgrounds only; leave sorting, sticky geometry, selection, and action colors intact.
 */
.zhaocaimao-console {
  --zcm-table-head: #f0f1f3;
  --zcm-table-row: #ffffff;
  --zcm-table-hover: #f5f5f5;
  --zcm-table-selected: #ededed;
}
.dark .zhaocaimao-console {
  --zcm-table-head: #242424;
  --zcm-table-row: #1b1b1b;
  --zcm-table-hover: #262626;
  --zcm-table-selected: #303030;
}

/* Hide only the badge beneath the sidebar brand. Keep backend version/update logic intact. */
.zhaocaimao-console .sidebar-brand > .relative { display: none !important; }

.zhaocaimao-console .table-wrapper table,
.zhaocaimao-console .table-wrapper tbody {
  background: var(--zcm-table-row) !important;
}
.zhaocaimao-console .table-wrapper .table-header,
.zhaocaimao-console .table-wrapper .sticky-header-cell {
  background: var(--zcm-table-head) !important;
  color: var(--zcm-text-secondary) !important;
  border-color: var(--zcm-border) !important;
}
.zhaocaimao-console .table-wrapper tbody tr,
.zhaocaimao-console .table-wrapper tbody td,
.zhaocaimao-console .table-wrapper tbody .sticky-col {
  background: var(--zcm-table-row) !important;
  border-color: var(--zcm-border) !important;
}
.zhaocaimao-console .table-wrapper tbody tr:hover,
.zhaocaimao-console .table-wrapper tbody tr:hover > td,
.zhaocaimao-console .table-wrapper tbody tr:hover > .sticky-col {
  background: var(--zcm-table-hover) !important;
}
.zhaocaimao-console .table-wrapper tbody tr[class~="bg-primary-50/40"],
.zhaocaimao-console .table-wrapper tbody tr[class~="bg-primary-50/40"] > td,
.zhaocaimao-console .table-wrapper tbody tr[class~="bg-primary-50/40"] > .sticky-col {
  background: var(--zcm-table-selected) !important;
}
/* Account bulk toolbar is a direct slot child, not a status badge or action button. */
.zhaocaimao-console .table-scroll-container > [class~="bg-primary-50"] {
  background: var(--zcm-table-head) !important;
  color: var(--zcm-text-secondary) !important;
  border-bottom: 1px solid var(--zcm-border);
}
.zhaocaimao-console .table-scroll-container > [class~="bg-primary-50"] > div:first-child > span {
  color: var(--zcm-text-secondary) !important;
}
.zhaocaimao-console .card:hover,
.zhaocaimao-console .card-hover:hover {
  border-color: var(--zcm-border) !important;
}

/* Neutralize remaining legacy gray/slate surfaces, including teleported form help. */
.dark body.zhaocaimao-console-active :is([class~="dark:bg-gray-700"], [class~="dark:bg-slate-700"]) {
  background-color: #353535 !important;
}
.dark body.zhaocaimao-console-active :is([class~="dark:bg-gray-800"], [class~="dark:bg-slate-800"]) {
  background-color: #242424 !important;
}
.dark body.zhaocaimao-console-active :is([class~="dark:bg-gray-900"], [class~="dark:bg-slate-900"]) {
  background-color: #1b1b1b !important;
}
.dark body.zhaocaimao-console-active :is([class~="dark:bg-gray-950"], [class~="dark:bg-slate-950"]) {
  background-color: #171717 !important;
}
.dark body.zhaocaimao-console-active :is([class~="dark:bg-gray-800/50"], [class~="dark:bg-slate-800/50"]) {
  background-color: rgb(36 36 36 / .5) !important;
}
