/* /var/www/kiosks.systems/public/admin/css/admin-theme-dark.css */
/*
 * Shared admin dark theme: CSS variables, Bootstrap 5 dark surfaces, .page-wrap.
 * Status dashboard loads this first; page-specific rules live in /status/dashboard-dark.css
 */

:root {
  --adm-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --adm-font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
  --adm-text: #e8eaef;
  --adm-text-muted: #8b929e;
  --adm-border: rgba(255, 255, 255, 0.08);
  --adm-border-strong: rgba(255, 255, 255, 0.14);
  --adm-bg: #0b0e14;
  --adm-bg-surface: #141820;
  --adm-bg-elevated: #1a2029;
  --adm-radius: 12px;
  --adm-radius-sm: 8px;
  --adm-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --adm-success: #3dd68c;
  --adm-success-dim: rgba(61, 214, 140, 0.12);
  --adm-accent: #f0a030;
  --adm-accent-dim: rgba(240, 160, 48, 0.15);
  --adm-danger: #e85d5d;
  --adm-danger-dim: rgba(232, 93, 93, 0.12);
}

body.admin-theme-dark {
  font-family: var(--adm-font);
  background-color: var(--adm-bg);
  color: var(--adm-text);
  color-scheme: dark;
  --bs-body-bg: var(--adm-bg);
  --bs-body-color: var(--adm-text);
  /* Bootstrap 5.3 tables/cards still pull emphasis/secondary; defaults are dark-on-light */
  --bs-emphasis-color: var(--adm-text);
  --bs-secondary-color: var(--adm-text-muted);
  --bs-tertiary-color: var(--adm-text-muted);
  --bs-secondary-bg: var(--adm-bg-elevated);
  --bs-tertiary-bg: rgba(0, 0, 0, 0.2);
  --bs-border-color: #30363d;
  --bs-card-bg: var(--adm-bg-surface);
  --bs-card-border-color: var(--adm-border-strong);
  --bs-heading-color: #f0f6fc;
}

body.admin-theme-dark .page-wrap {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12px;
  padding-right: 12px;
}

body.admin-theme-dark .navbar {
  background-color: var(--adm-bg-surface) !important;
  border-bottom: 1px solid var(--adm-border-strong);
}

body.admin-theme-dark .navbar-brand,
body.admin-theme-dark .nav-link {
  color: var(--adm-text) !important;
}

body.admin-theme-dark .card {
  background-color: var(--bs-card-bg);
  border-color: var(--bs-card-border-color);
  border-radius: var(--adm-radius-sm);
}

body.admin-theme-dark .card-header {
  background-color: rgba(0, 0, 0, 0.2);
  border-bottom-color: var(--adm-border);
  color: var(--adm-text);
  font-weight: 600;
}

body.admin-theme-dark .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--adm-text);
  --bs-table-border-color: var(--adm-border);
  --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
  --bs-table-striped-color: var(--adm-text);
  --bs-table-active-bg: rgba(255, 255, 255, 0.08);
  --bs-table-active-color: var(--adm-text);
  --bs-table-hover-bg: rgba(255, 255, 255, 0.08);
  --bs-table-hover-color: var(--adm-text);
  color: var(--adm-text);
}

/* BS 5.3 default table text is dark; force light body copy inside tables */
body.admin-theme-dark .table > :not(caption) > * > * {
  color: var(--adm-text);
}

body.admin-theme-dark .table thead th {
  color: var(--adm-text-muted);
  font-weight: 600;
}

body.admin-theme-dark .table tbody td,
body.admin-theme-dark .table tbody th {
  color: var(--adm-text);
}

body.admin-theme-dark .table .text-muted {
  color: var(--adm-text-muted) !important;
}

/* Striped tbody rules in BS can beat generic `.table > * > *` on specificity */
body.admin-theme-dark .table-striped > tbody > tr:nth-of-type(odd) > *,
body.admin-theme-dark .table-striped > tbody > tr:nth-of-type(even) > * {
  color: var(--adm-text);
}

body.admin-theme-dark .text-muted {
  color: var(--adm-text-muted) !important;
}

body.admin-theme-dark .modal-content {
  background-color: var(--adm-bg-surface);
  border: 1px solid var(--adm-border-strong);
  color: var(--adm-text);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
}

body.admin-theme-dark .modal-header,
body.admin-theme-dark .modal-footer {
  border-color: var(--adm-border);
}

body.admin-theme-dark .btn-outline-secondary {
  color: #c9d1d9;
  border-color: #484f58;
}

body.admin-theme-dark .btn-outline-secondary:hover {
  background-color: #30363d;
  color: #f0f6fc;
}

body.admin-theme-dark .btn-primary {
  border-color: transparent;
}

body.admin-theme-dark code {
  color: #d8b4fe;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}
