/*
  Finchakra brand overrides for the Kanakku theme. Loaded AFTER /assets/css/style.css; style.css itself is never edited.
  Values come from design.md (Navy, Primary Blue, Accent Gold). Gold is an action colour: text on gold is always Navy.
  Accessibility fixes from the dashboard-ui design-system audit live here too.
*/
:root {
  /* Primary = Primary Blue (links, focus, active text pass contrast on white). Gold is used for CTAs and the active nav item below. */
  --primary: #0050a8;
  --primary-hover: #003d82;
  --primary-rgb: 0, 80, 168;
  --primary-transparent: #eef4fb;
  --primary-200: #cfe0f3;
  --primary-300: #b3cde9;
  --primary-500: #6a9bd0;
  --primary-600: #3b79bd;
  --primary-700: #1a62b0;
  --secondary: #001028;
  --secondary-hover: #0a1c3a;
  --bs-primary: #0050a8;
  --bs-primary-rgb: 0, 80, 168;
  --bs-link-color: #0050a8;
  --bs-link-hover-color: #003d82;

  --fc-accent-gold: #e0a13a;
  --fc-accent-gold-600: #b57a12;
  --fc-navy: #001028;

  /* Accessible text shades for soft badges (audit fix) */
  --fc-badge-success: #1e8449;
  --fc-badge-warning: #8a6d0b;
  --fc-badge-info: #0a7f9b;
  --fc-badge-danger: #c41414;
}

body {
  font-family: var(--fc-font-sans), system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Primary CTA = Accent Gold with Navy text (design.md D10); never white on gold */
.btn-primary {
  color: var(--fc-navy);
  background-color: var(--fc-accent-gold);
  border-color: var(--fc-accent-gold);
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active,
.btn-primary.show,
.btn-check:checked + .btn-primary,
:not(.btn-check) + .btn-primary:active,
.btn-check + .btn-primary:hover {
  color: var(--fc-navy);
  background-color: var(--fc-accent-gold-600);
  border-color: var(--fc-accent-gold-600);
}
.btn-primary:disabled,
.btn-primary.disabled {
  color: var(--fc-navy);
  background-color: var(--fc-accent-gold);
  border-color: var(--fc-accent-gold);
  opacity: 0.55;
}

/* Soft badges: darker text, same tint (audit fix) */
.badge-soft-success, .badge.bg-success-transparent, .badge-success-transparent { color: var(--fc-badge-success); }
.badge-soft-warning, .badge.bg-warning-transparent, .badge-warning-transparent { color: var(--fc-badge-warning); }
.badge-soft-info, .badge.bg-info-transparent, .badge-info-transparent { color: var(--fc-badge-info); }
.badge-soft-danger, .badge.bg-danger-transparent, .badge-danger-transparent { color: var(--fc-badge-danger); }
.btn-success, .btn-info, .btn-warning { color: var(--fc-navy); }

/* Visible focus on form controls (audit fix) */
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: none;
}

/* Placeholder and muted text no lighter than gray-500 (audit fix) */
.form-control::placeholder,
.form-select::placeholder { color: var(--gray-500, #6b7280); opacity: 1; }
.text-muted, .text-gray-3, .text-gray-4 { color: var(--gray-500, #6b7280) !important; }

/* Page canvas from design.md */
body { background-color: #f6f7fd; }
[data-bs-theme="dark"] body { background-color: var(--bs-body-bg); }

/* Input boundaries need 3:1 against the surface (WCAG 1.4.11); the theme's default border is too light */
.form-control,
.form-select {
  border-color: var(--gray-500, #6b7280);
  background-color: var(--bs-body-bg, #fff);
}
.form-check-input { border-color: var(--gray-500, #6b7280); }
