/* Febris brand overrides + AGPL footer style. Served as an external
   stylesheet so Metabase's strict CSP (which blocks unsigned inline styles)
   doesn't drop it. !important is needed because Metabase injects a later
   stylesheet at runtime that redefines --mb-color-brand from
   `application-colors`; on OSS without an EE license the setting isn't
   wired up, so the injected sheet falls back to the default blue and
   would otherwise win the cascade. */
/* Palette sourced from mosqitter.com:
   --  #347958  brand primary (forest)
   --  #108474  brand accent  (teal)
   --  #87bba2  brand mint    (badges, soft fills)
   --  #e0f4e8  brand tint    (surfaces/banners)
   Darker shades below interpolated along the same hue so hover/active/pressed
   states stay in-family. */
:root, :host {
  --mb-color-brand: #347958 !important;
  --mb-color-brand-alpha-04: rgba(52, 121, 88, 0.04) !important;
  --mb-color-brand-alpha-88: rgba(52, 121, 88, 0.88) !important;
  --mb-color-background-brand: #347958 !important;
  --mb-color-focus: #87bba2 !important;
  --mb-color-filter: #108474 !important;

  /* Metabase's "blue-40" is the semantic brand base — its 5…100 scale is used
     for headers, disabled states, subtle backgrounds, etc. Remap each rung to
     the corresponding shade in our green family. */
  --mb-base-color-blue-5:   #f3faf6 !important;
  --mb-base-color-blue-10:  #e0f4e8 !important;  /* mosqitter tint  */
  --mb-base-color-blue-20:  #b7decb !important;
  --mb-base-color-blue-30:  #87bba2 !important;  /* mosqitter mint  */
  --mb-base-color-blue-40:  #347958 !important;  /* mosqitter brand */
  --mb-base-color-blue-50:  #2e6b4e !important;
  --mb-base-color-blue-60:  #1f5139 !important;
  --mb-base-color-blue-70:  #143d29 !important;
  --mb-base-color-blue-80:  #0a2519 !important;
  --mb-base-color-blue-90:  #05180e !important;
  --mb-base-color-blue-100: #020a05 !important;

  /* Admin top-nav is a separate purple palette in stock Metabase — remap. */
  --mb-color-admin-navbar: #347958 !important;
  --mb-color-admin-navbar-inverse: #1f5139 !important;
  --mb-color-admin-navbar-secondary: #87bba2 !important;
}

/* Size the inline nav-logo SVG. width:auto + fixed height lets the swapped
   wordmark's aspect ratio drive the rendered width. */
svg[data-testid="main-logo"] {
  width: auto !important;
  height: 36px !important;
  max-width: 180px !important;
}
/* Keep the anchor wrapper from clipping the widened wordmark. */
a[data-testid="main-logo-link"] {
  width: auto !important;
  max-width: 200px !important;
}

/* Auth pages (/auth/login, /setup) render the logo via <img src=logo-url>
   sized small by default. Scale it up so the wordmark reads at a glance. */
img[src$="/logo.svg"],
img[src*="/app/assets/img/logo.svg"] {
  max-width: 260px;
  height: auto;
}

.febris-legal-footer {
  position: fixed;
  bottom: 4px;
  right: 8px;
  z-index: 9999;
  font: 10px/1.2 system-ui, sans-serif;
  color: #8a8a8a;
  opacity: 0.55;
  transition: opacity 0.15s;
}
.febris-legal-footer:hover { opacity: 1; }
.febris-legal-footer a { color: inherit; text-decoration: none; }
.febris-legal-footer a:hover { text-decoration: underline; }
