/* Aiva whitelabel layer. Colour values arrive as CSS variables injected at
   boot (desk) / head_html (website) from SaaS Provider Settings — this file
   only declares fallbacks and structural rules, never tenant-specific data. */

:root {
  --aiva-primary: #3e7c59;
  --aiva-ink: #10201a;
  --aiva-surface: #f7f6f1;
  --aiva-accent: #8fbe4f;
}

/* ---- Brand accents ------------------------------------------------------ */
/* Frappe v16 styles everything through design tokens; remapping the tokens
   recolours the whole desk + website consistently (buttons, links, checkboxes,
   sidebar, focus rings) without per-component overrides. */

/* :root:root (0-2-0) outguns frappe's `:root, [data-theme=...]` (0-1-0)
   declarations regardless of stylesheet load order — login.bundle.css loads
   AFTER app-included css and re-declares --btn-primary. */
:root:root {
  --primary: var(--aiva-primary);
  --primary-color: var(--aiva-primary);
  --btn-primary: var(--aiva-primary);
  --checkbox-color: var(--aiva-primary);
  --checkbox-gradient: linear-gradient(
    180deg,
    var(--aiva-primary) -124.51%,
    var(--aiva-primary) 100%
  );
  --sidebar-active-color: var(--aiva-primary);
}

.navbar .app-logo,
.navbar-brand img {
  max-height: 28px;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--aiva-primary);
  border-color: var(--aiva-primary);
}

a.text-primary,
.text-primary {
  color: var(--aiva-primary) !important;
}

/* Login page */
.for-login .page-card-head img,
.login-content .app-logo {
  max-height: 42px;
}

/* ---- Hide residual "Powered by" chrome ---------------------------------- */
/* Belt: CSS. Braces: JS MutationObserver in aiva_branding.js. */

.web-footer .footer-powered,
.footer-powered,
a[href*="frappe.io"],
a[href*="erpnext.com"],
a[href*="frappecloud.com"],
.splash img[src*="frappe"],
.splash img[src*="erpnext"] {
  display: none !important;
}

/* Email footer branding is handled server-side; keep web fallback anyway */
.email-footer .powered-by {
  display: none !important;
}
