
:root {

  --color-primary:         #8b1a1a;
  --color-primary-hover:   #6b1212;
  --color-accent:          #ffae00;
  --color-nav-bg:          #6b1212;
  --color-nav-text:        #ffffff;
  --color-card-bg:         #ffffff;
  --color-page-bg:         #f9fafb;
  --color-text-primary:    #1f2937;
  --color-text-muted:      #6b7280;
  --color-btn-primary-bg:  #6b1212;
  --color-btn-primary-text:#ffffff;
  --color-border:          #e5e7eb;
}
body > nav, .site-nav {
  background-color: var(--color-nav-bg) !important;
  color: var(--color-nav-text) !important;
}
body {
  background-color: var(--color-page-bg) !important;
  color: var(--color-text-primary) !important;
}
.card,
.bg-white.rounded, .bg-white.rounded-md, .bg-white.rounded-lg, .bg-white.rounded-xl, .bg-white.rounded-2xl {
  background-color: var(--color-card-bg);
}
.bg-gray-50 {
  background-color: var(--color-page-bg) !important;
}
.bg-white.border, .bg-white.border-gray-100, .bg-white.border-gray-200, .bg-white.border-gray-300,
.bg-white.border-gray-400, .bg-white.border-gray-500,
.bg-gray-50.border, .bg-gray-50.border-gray-100, .bg-gray-50.border-gray-200, .bg-gray-50.border-gray-300 {
  border-color: var(--color-border);
}
.btn-primary, a.btn-primary, button.btn-primary {
  background-color: var(--brand-btn-bg, var(--color-btn-primary-bg)) !important;
  color: var(--brand-btn-text, var(--color-btn-primary-text)) !important;
}
.accent { color: var(--color-accent) !important; }
/* Solid primary-action buttons: the templates hardcode Tailwind's indigo-600 / blue-600 (white
   text) as the de-facto "primary button" convention everywhere (Save, Submit, Login, Upload...)
   instead of the unused .btn-primary class above. Theme them directly, including their hover
   state, so the admin-configured button colours actually take effect sitewide. */
/* 17 Nov (user decision): the brand-class buttons (button/a/input/label with .bg-brand) follow the same
   Button primary colours; brand-coloured headings, badges and strips stay on Primary. The tag-qualified
   selectors outrank templates/base.html's .bg-brand rule. */
.bg-indigo-600, .bg-blue-600,
button.bg-brand, a.bg-brand, input.bg-brand, label.bg-brand {
  background-color: var(--brand-btn-bg, var(--color-btn-primary-bg)) !important;
  color: var(--brand-btn-text, var(--color-btn-primary-text)) !important;
}
/* 17 Nov branding audit: Muted text and Text colour reach the page text (they only reached <body>). */
.text-gray-500 { color: var(--color-text-muted) !important; }
.text-gray-800, .text-gray-900 { color: var(--color-text-primary) !important; }
.hover\:bg-indigo-700:hover, .hover\:bg-blue-700:hover {
  background-color: var(--color-primary-hover) !important;
}
/* Soft/pastel action buttons (e.g. "Edit User"), excluding decorative icon badges that reuse the
   same pastel colour classes on a rounded-full avatar/icon circle. */
.bg-blue-100.text-blue-700:not(.rounded-full), .bg-indigo-100.text-indigo-700:not(.rounded-full) {
  background-color: var(--brand-btn-bg, var(--color-btn-primary-bg)) !important;
  color: var(--brand-btn-text, var(--color-btn-primary-text)) !important;
}
