/* =============================================================================
   Banco do ISVOUGA — theme layer on top of Bootstrap 5.3
   A restrained, institutional look inspired by the reference design: neutral
   light surfaces, white cards, generous spacing, Manrope type. Brand colours
   (ISVOUGA purple + orange) are used deliberately — purple as the primary
   action/heading tone, orange only as a small accent — so it never turns gaudy.
   Overrides Bootstrap's component-level CSS variables (which the CDN build reads
   at runtime), not the compiled Sass, so no build step is needed.
   ============================================================================= */

:root {
  /* Brand */
  --brand-purple: #5c2e77;
  --brand-purple-dark: #472359;
  --brand-purple-050: #f5f1f8;
  --brand-orange: #ec7e10;
  --brand-orange-dark: #ca6a08;

  /* Neutrals */
  --surface: #f7f8fb;
  --surface-card: #ffffff;
  --ink: #1c1b22;
  --ink-muted: #5c5f6b;
  --line: #e5e7ee;
  --line-strong: #d3d6e0;

  --radius-card: 18px;
  --radius-control: 11px;
  --shadow-sm: 0 1px 2px rgba(20, 20, 40, 0.04), 0 1px 3px rgba(20, 20, 40, 0.06);
  --shadow-card: 0 1px 2px rgba(20, 20, 40, 0.04), 0 8px 24px -12px rgba(28, 20, 45, 0.18);

  /* Map Bootstrap tokens onto the brand */
  --bs-primary: var(--brand-purple);
  --bs-primary-rgb: 92, 46, 119;
  --bs-body-bg: var(--surface);
  --bs-body-color: var(--ink);
  --bs-secondary-color: var(--ink-muted);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--radius-control);
  --bs-link-color-rgb: 92, 46, 119;
  --bs-link-hover-color-rgb: 71, 35, 89;
  --bs-body-font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-emphasis-color: var(--ink);
  --bs-focus-ring-color: rgba(92, 46, 119, 0.25);
}

body {
  background-color: var(--surface);
  color: var(--ink);
  font-family: var(--bs-body-font-family);
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: var(--bs-body-font-family);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-orange);
}

.page-title {
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lead-muted {
  color: var(--ink-muted);
  font-size: 1.03rem;
  max-width: 42ch;
}

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

.text-accent {
  color: var(--brand-orange) !important;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: 0.6rem;
  --bs-btn-padding-x: 1.15rem;
  --bs-btn-border-radius: var(--radius-control);
  letter-spacing: -0.01em;
}

.btn-lg {
  --bs-btn-padding-y: 0.85rem;
  --bs-btn-font-size: 1.02rem;
}

.btn-primary {
  --bs-btn-bg: var(--brand-purple);
  --bs-btn-border-color: var(--brand-purple);
  --bs-btn-hover-bg: var(--brand-purple-dark);
  --bs-btn-hover-border-color: var(--brand-purple-dark);
  --bs-btn-active-bg: var(--brand-purple-dark);
  --bs-btn-active-border-color: var(--brand-purple-dark);
  --bs-btn-disabled-bg: var(--brand-purple);
  --bs-btn-disabled-border-color: var(--brand-purple);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-purple);
  --bs-btn-border-color: var(--line-strong);
  --bs-btn-hover-bg: var(--brand-purple);
  --bs-btn-hover-border-color: var(--brand-purple);
  --bs-btn-active-bg: var(--brand-purple);
  --bs-btn-active-border-color: var(--brand-purple);
}

.btn-outline-secondary {
  --bs-btn-color: var(--ink);
  --bs-btn-border-color: var(--line-strong);
  --bs-btn-hover-bg: var(--ink);
  --bs-btn-hover-border-color: var(--ink);
  --bs-btn-hover-color: #fff;
}

/* Small orange text link used for secondary actions */
.link-accent {
  color: var(--brand-orange);
  font-weight: 600;
  text-decoration: none;
}

.link-accent:hover {
  color: var(--brand-orange-dark);
  text-decoration: underline;
}

/* ---- Cards / surfaces ---------------------------------------------------- */
.card,
.surface-card {
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.surface-card {
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
}

.card {
  --bs-card-border-color: var(--line);
  --bs-card-border-radius: var(--radius-card);
}

.card-title {
  font-weight: 700;
}

/* subtle "info" panel (replaces marketing-y security boxes with a calm note) */
.note-panel {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--brand-purple-050);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

/* Also used standalone (feature cards, confirmation screens), so it is not
   scoped to .note-panel. inline-grid keeps it centerable by text-align while
   still centering its own glyph. */
.note-icon {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(236, 126, 16, 0.14);
  color: var(--brand-orange);
}

/* ---- Forms --------------------------------------------------------------- */
.form-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.form-control,
.form-select {
  border-color: var(--line-strong);
  border-radius: var(--radius-control);
  padding: 0.7rem 0.9rem;
  color: var(--ink);
  background-color: var(--surface-card);
}

.form-control::placeholder {
  color: #9aa0ad;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 0.2rem var(--bs-focus-ring-color);
}

.input-group-text {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-muted);
}

.form-text {
  color: var(--ink-muted);
}

/* ---- Navbar -------------------------------------------------------------- */
.app-navbar {
  background: var(--surface-card);
  border-bottom: 1px solid var(--line);
}

.app-navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-navbar .navbar-brand img {
  height: 30px;
  width: auto;
}

.app-navbar .nav-link {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
}

.app-navbar .nav-link:hover {
  color: var(--brand-purple);
}

.app-navbar .nav-link.active {
  color: var(--brand-purple);
}

.dropdown-menu {
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  padding: 0.4rem;
}

.dropdown-item {
  border-radius: 8px;
  font-weight: 500;
}

.dropdown-item.active,
.dropdown-item:active {
  background: var(--brand-purple);
}

.dropdown-header {
  font-weight: 700;
  color: var(--ink-muted);
}

/* the account-switcher pill in the navbar */
.account-pill {
  background: var(--brand-purple-050);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem !important;
  color: var(--brand-purple) !important;
  font-weight: 600;
}

/* ---- Tables -------------------------------------------------------------- */
.table {
  --bs-table-border-color: var(--line);
  --bs-table-color: var(--ink);
  margin-bottom: 0;
}

.table>thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-weight: 700;
  border-bottom-color: var(--line);
}

/* ---- Badges / pills ------------------------------------------------------ */
.badge.bg-success-soft {
  background: #e7f6ed;
  color: #157347;
}

.badge.bg-neutral {
  background: #eef0f5;
  color: var(--ink-muted);
}

.amount-credit {
  color: #157347;
  font-weight: 700;
}

.amount-debit {
  color: #b02a37;
  font-weight: 700;
}

/* ---- Alerts -------------------------------------------------------------- */
.alert {
  border-radius: 14px;
  border: 1px solid var(--line);
}

/* ---- Layout helpers ------------------------------------------------------ */
.app-main {
  max-width: 1140px;
}

.field-caption {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.stat-figure {
  font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.iban-mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* Caps the landing logo on wide screens, where img-fluid alone would let it
   grow to the full column width. */
/* width:auto is load-bearing. The width/height attributes on the tag are a
   presentational hint, so width is not auto — and max-height would then clamp
   the height while the width stayed put, stretching the logo. */
.hero-logo {
  max-height: 300px;
  width: auto;
}

/* The account dropdown header shows the signed-in email, which text-truncate
   can only shorten once it has a width to truncate against. */
.account-email {
  max-width: 15rem;
}