/* ============================================================
   RakuOps brand override — Space Grotesk type + electric-lime
   signal accent. Loaded LAST so it wins. Colors (purple->ink in
   light, purple->lime in dark) are recolored at the source in
   each stylesheet; this layer only adds type + mode-safe accents.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root { --rk-lime: #a3e635; }

/* Mega-menu: neutral dark ink (kill the blue/purple-reading gradient) */
.mega-menu { background: #0f172a !important; }

/* ── Distinctive type ─────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.card-title, .page-title, .navbar-brand, .brand-logo,
.auth-form-light h4, .auth-form-transparent h4 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif !important;
  letter-spacing: -.02em;
}
.badge, kbd, code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ── Electric-lime signal accent (mode-agnostic) ──────────── */
.progress-bar { background-color: var(--rk-lime) !important; }
.form-control:focus, .form-select:focus, .custom-select:focus {
  border-color: var(--rk-lime) !important;
  box-shadow: 0 0 0 .2rem rgba(163,230,53,.25) !important;
}
/* Standardize ALL primary CTAs to solid ink in light mode (lime stays as accent).
   Covers the theme button + the custom feature CTAs that the recolor turned lime. */
.btn-primary, .auth-form-btn.btn-primary,
.login-cta, .cc-btn-primary, .cf-create-btn, .sp-btn-save,
#rkCookieBar .rk-cc-accept, .rk-cc-accept, #helpUnifiedSend {
  background: #111827 !important; background-image: none !important;
  border-color: #111827 !important; color: #fff !important;
}
.btn-primary:hover, .auth-form-btn.btn-primary:hover,
.login-cta:hover:not(:disabled), .cc-btn-primary:hover, .cf-create-btn:hover,
.sp-btn-save:hover, .rk-cc-accept:hover, #helpUnifiedSend:hover {
  background: #000 !important; border-color: #000 !important; color: #fff !important;
}
.btn-primary:focus, .btn-primary:active { box-shadow: 0 0 0 .2rem rgba(163,230,53,.35) !important; }
/* dark mode: primary stays lime for contrast on dark backgrounds */
.dark-mode .btn-primary, body.dark-mode .btn-primary, html.dark-mode .btn-primary {
  background: #a3e635 !important; border-color: #a3e635 !important; color: #0b0e14 !important;
}
/* active sidebar item gets a lime rail */
.sidebar .nav .nav-item.active > .nav-link,
.sidebar .nav .nav-item .nav-link.active { box-shadow: inset 3px 0 0 0 var(--rk-lime); }

/* ============================================================
   Readability guard — lime is a LIGHT colour, so lime background +
   white text is unreadable. Anything painted lime must use dark ink
   text. Covers dark-mode active/hover states (from darkmode.css) and
   any static inline lime background.
   ============================================================ */

/* Dark-mode active/hover states that darkmode.css paints lime */
html.dark-mode .list-group-item.active,
html.dark-mode .page-item.active .page-link,
html.dark-mode .cc-chip:hover,
html.dark-mode .mr-chip.active,
html.dark-mode .ops-page-btn:hover:not(:disabled),
html.dark-mode .po-chip.active,
html.dark-mode .po-page-btn.active,
html.dark-mode .po-sp-save,
html.dark-mode .verify-btn.active,
html.dark-mode .tkb-filter-chip.active,
html.dark-mode .am-devtype-tab.active,
html.dark-mode .unit-chip.active,
html.dark-mode .usage-range-btn.active,
html.dark-mode .sp-btn-save,
html.dark-mode .org-tab-btn.active,
html.dark-mode .org-submit-btn,
html.dark-mode .aic-buy-btn:hover,
html.dark-mode .aic-pg-btn.aic-pg-active,
html.dark-mode .ml-btn-download:hover,
html.dark-mode .btn-view:hover {
  color: #0b0e14 !important;
}

/* Static inline lime backgrounds (HTML/PHP-rendered) never pair with white text */
[style*="background:#a3e635"], [style*="background: #a3e635"],
[style*="background:#84cc16"], [style*="background: #84cc16"],
[style*="background-color:#a3e635"], [style*="background-color: #a3e635"],
[style*="background-color:#84cc16"], [style*="background-color: #84cc16"] {
  color: #0b0e14 !important;
}

/* Lime TEXT is only legible on dark backgrounds. When an inline style pairs a
   light-tinted background with lime (as text or accent), force readable dark
   green text. Covers both "background:#hex" and "background: #hex" spacings. */
[style*="background:#fff"][style*="#84cc16"],   [style*="background: #fff"][style*="#84cc16"],
[style*="background:#ffffff"][style*="#84cc16"],[style*="background: #ffffff"][style*="#84cc16"],
[style*="background:#f1f5f9"][style*="#84cc16"],[style*="background: #f1f5f9"][style*="#84cc16"],
[style*="background:#f8fafc"][style*="#84cc16"],[style*="background: #f8fafc"][style*="#84cc16"],
[style*="background:#e2e8f0"][style*="#84cc16"],[style*="background: #e2e8f0"][style*="#84cc16"],
[style*="background:#f9fafb"][style*="#84cc16"],[style*="background: #f9fafb"][style*="#84cc16"],
[style*="background:#f0fdf4"][style*="#84cc16"],[style*="background: #f0fdf4"][style*="#84cc16"],
[style*="background:#fff"][style*="#a3e635"],   [style*="background: #fff"][style*="#a3e635"],
[style*="background:#ffffff"][style*="#a3e635"],[style*="background: #ffffff"][style*="#a3e635"],
[style*="background:#f1f5f9"][style*="#a3e635"],[style*="background: #f1f5f9"][style*="#a3e635"],
[style*="background:#f8fafc"][style*="#a3e635"],[style*="background: #f8fafc"][style*="#a3e635"],
[style*="background:#e2e8f0"][style*="#a3e635"],[style*="background: #e2e8f0"][style*="#a3e635"],
[style*="background:#f9fafb"][style*="#a3e635"],[style*="background: #f9fafb"][style*="#a3e635"],
[style*="background:#f0fdf4"][style*="#a3e635"],[style*="background: #f0fdf4"][style*="#a3e635"] {
  color: #3f6212 !important;
}
