/*
 * SIMPUS — University Brand Layer
 *
 * This file is the ONLY place where institutional visual identity
 * should override the neutral design system.
 *
 * Replace the placeholder institutional values below with approved
 * official brand guidelines when supplied.
 */
:root {
  /* Institutional identity */
  --brand-primary: #0b5ed7;
  --brand-primary-dark: #084298;
  --brand-primary-light: #cfe2ff;
  --brand-secondary: #198754;
  --brand-accent: #f0ad00;

  /* Institutional surfaces */
  --brand-surface: #ffffff;
  --brand-surface-muted: #f5f8fb;

  /* Institutional text */
  --brand-text: #172033;
  --brand-text-muted: #5f6b7a;

  /* Institutional border */
  --brand-border: #dbe2ea;

  /* Logo */
  --brand-logo-height: 48px;
  --brand-logo-height-mobile: 40px;

  /* Header */
  --brand-header-bg: #ffffff;
  --brand-header-text: var(--brand-text);

  /* Footer */
  --brand-footer-bg: #101828;
  --brand-footer-text: #f8fafc;
  --brand-footer-muted: #b8c2d1;
}

/* Brand application */
.brand-primary { color: var(--brand-primary); }
.brand-secondary { color: var(--brand-secondary); }
.brand-accent { color: var(--brand-accent); }

.bg-brand-primary { background-color: var(--brand-primary); }
.bg-brand-secondary { background-color: var(--brand-secondary); }
.bg-brand-accent { background-color: var(--brand-accent); }

.border-brand { border-color: var(--brand-border) !important; }

.library-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-height: var(--brand-logo-height);
}

.library-brand-logo img,
.library-brand-logo svg {
  width: auto;
  height: var(--brand-logo-height);
  object-fit: contain;
}

.library-brand-name {
  color: var(--brand-text);
  font-weight: 700;
  line-height: 1.15;
}

.library-brand-unit {
  display: block;
  color: var(--brand-text-muted);
  font-size: .75rem;
  font-weight: 500;
}

.brand-header {
  background: var(--brand-header-bg);
  color: var(--brand-header-text);
}

.brand-footer {
  background: var(--brand-footer-bg);
  color: var(--brand-footer-text);
}

.brand-footer a {
  color: inherit;
}

.brand-footer .text-muted {
  color: var(--brand-footer-muted) !important;
}

@media (max-width: 575.98px) {
  .library-brand-logo img,
  .library-brand-logo svg {
    height: var(--brand-logo-height-mobile);
  }
}

/* Dynamic multi-unit branding. Values are injected by the active portal context. */
.library-portal {
  --portal-primary: var(--portal-primary-color, #1f4e79);
  --portal-secondary: var(--portal-secondary-color, #2f75b5);
  --portal-accent: var(--portal-accent-color, #f0ad4e);
  --portal-sidebar: var(--portal-sidebar-color, #17324d);
  --portal-topbar: var(--portal-topbar-color, #102a43);
  --portal-background: var(--portal-background-color, #f6f8fb);
  background-color: var(--portal-background);
}
.library-portal .library-topbar { background-color: var(--portal-topbar); }
.library-portal .library-navbar { --bs-primary: var(--portal-primary); }
.library-portal .btn-primary { background-color: var(--portal-primary); border-color: var(--portal-primary); }
.library-portal .btn-outline-primary { color: var(--portal-primary); border-color: var(--portal-primary); }
.library-portal .text-primary { color: var(--portal-primary) !important; }
.library-portal a:not(.btn):not(.dropdown-item) { --link-color: var(--portal-primary); }
