/* ─────────────────────────────────────────────────────────────────────
   Balagtas Business Portal — design system
   Style: Accessible & Ethical (WCAG AAA-ready), gov-friendly.
   Font:  Atkinson Hyperlegible — dyslexia-friendly, high-legibility.
   No frameworks, no Tailwind. Pure vanilla CSS for a small, fast bundle.
   ───────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');

/* ── Design tokens ────────────────────────────────────────── */
:root {
  /* Accessible palette — high-contrast navy + sky-blue CTA */
  --bp-primary:        #0F172A;  /* deep navy — headings + nav */
  --bp-primary-soft:   #1E293B;  /* hover variant for primary */
  --bp-secondary:      #334155;  /* body subtitles */
  --bp-cta:            #0369A1;  /* primary CTA blue — 4.6:1 on white */
  --bp-cta-strong:     #075985;  /* CTA hover */
  --bp-cta-soft:       #E0F2FE;  /* CTA tinted background */
  --bp-success:        #15803D;  /* WCAG-AA green */
  --bp-success-soft:   #DCFCE7;
  --bp-warning:        #B45309;  /* amber, AA-on-white */
  --bp-warning-soft:   #FEF3C7;
  --bp-danger:         #B91C1C;
  --bp-danger-soft:    #FEE2E2;
  --bp-info:           #1D4ED8;
  --bp-info-soft:      #DBEAFE;

  --bp-text:           #020617;  /* near-black body text */
  --bp-text-muted:     #475569;  /* AA on white */
  --bp-text-faint:     #64748B;
  --bp-border:         #E2E8F0;
  --bp-border-strong:  #CBD5E1;
  --bp-bg:             #F8FAFC;
  --bp-surface:        #FFFFFF;
  --bp-surface-tint:   #F1F5F9;

  /* Focus ring — 3 px solid with offset, brand color */
  --bp-focus-ring:     0 0 0 3px rgba(3, 105, 161, 0.45);
  --bp-shadow-xs:      0 1px 2px rgba(15, 23, 42, 0.04);
  --bp-shadow-sm:      0 2px 4px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --bp-shadow-md:      0 6px 14px rgba(15, 23, 42, 0.07), 0 2px 4px rgba(15, 23, 42, 0.05);

  /* Spacing scale (8-px base) — keep token-driven so spacing stays consistent */
  --bp-space-1: 0.25rem;
  --bp-space-2: 0.5rem;
  --bp-space-3: 0.75rem;
  --bp-space-4: 1rem;
  --bp-space-5: 1.25rem;
  --bp-space-6: 1.5rem;
  --bp-space-8: 2rem;
  --bp-space-10: 2.5rem;
  --bp-space-12: 3rem;

  --bp-radius-sm: 0.4rem;
  --bp-radius-md: 0.65rem;
  --bp-radius-lg: 1rem;
  --bp-radius-pill: 9999px;

  --bp-fast: 150ms;
  --bp-base: 200ms;
}

/* ── Reset + base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Atkinson Hyperlegible', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bp-bg);
  color: var(--bp-text);
  line-height: 1.6;
  font-size: 16px; /* readable-font-size baseline */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  color: var(--bp-primary);
  line-height: 1.25;
  margin: 0 0 var(--bp-space-3);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p  { margin: 0 0 var(--bp-space-3); }
a  { color: var(--bp-cta); text-decoration: none; transition: color var(--bp-fast) ease; }
a:hover { color: var(--bp-cta-strong); text-decoration: underline; text-underline-offset: 3px; }

/* Global focus ring — accessible, brand-coloured, never removed */
*:focus { outline: none; }
*:focus-visible {
  outline: none;
  box-shadow: var(--bp-focus-ring);
  border-radius: var(--bp-radius-sm);
}

/* Skip link — keyboard users jump past the nav */
.bp-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--bp-primary); color: white;
  padding: 0.75rem 1.25rem; font-weight: 700;
  border-radius: 0 0 var(--bp-radius-sm) 0; z-index: 100;
}
.bp-skip:focus { left: 0; }

.bp-container { max-width: 1120px; margin: 0 auto; padding: 0 var(--bp-space-4); }
.bp-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── Header ────────────────────────────────────────────────── */
.bp-top {
  background: var(--bp-surface);
  border-bottom: 1px solid var(--bp-border);
  box-shadow: var(--bp-shadow-xs);
  position: sticky; top: 0; z-index: 50;
}
.bp-top-inner {
  display: flex; align-items: center; gap: var(--bp-space-6);
  padding: var(--bp-space-3) var(--bp-space-4); min-height: 64px;
}
.bp-brand {
  font-weight: 700; font-size: 1.05rem; color: var(--bp-primary);
  display: inline-flex; align-items: center; gap: var(--bp-space-2);
}
.bp-brand:hover { color: var(--bp-cta); text-decoration: none; }
.bp-brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--bp-radius-sm);
  background: linear-gradient(135deg, var(--bp-cta) 0%, var(--bp-primary) 100%);
  color: white;
}

.bp-nav {
  display: flex; gap: var(--bp-space-5); flex: 1;
  align-items: center;
}
.bp-nav a {
  color: var(--bp-secondary); font-weight: 500; padding: 0.45rem 0;
  border-bottom: 2px solid transparent; transition: color var(--bp-fast) ease, border-color var(--bp-fast) ease;
  min-height: 44px; display: inline-flex; align-items: center;
}
.bp-nav a:hover { color: var(--bp-primary); border-bottom-color: var(--bp-cta); text-decoration: none; }
.bp-nav a[aria-current="page"] { color: var(--bp-primary); border-bottom-color: var(--bp-cta); }

.bp-account { display: flex; align-items: center; gap: var(--bp-space-2); }
.bp-greet {
  font-size: 0.88rem; color: var(--bp-text-muted);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.bp-greet-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--bp-success);
  box-shadow: 0 0 0 3px var(--bp-success-soft);
}

/* Mobile-nav toggle (CSS-only via :checked) */
.bp-nav-toggle { display: none; }
.bp-burger {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--bp-radius-sm);
  background: transparent; border: 1px solid var(--bp-border); cursor: pointer;
  color: var(--bp-primary);
}
.bp-burger:hover { background: var(--bp-surface-tint); }
.bp-burger svg { width: 22px; height: 22px; }

/* ── Buttons ──────────────────────────────────────────────── */
.bp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1.15rem; border-radius: var(--bp-radius-sm);
  font: inherit; font-weight: 600; font-size: 0.94rem;
  cursor: pointer; border: 1px solid transparent;
  text-decoration: none; line-height: 1.3; min-height: 44px;
  transition: background var(--bp-base) ease, color var(--bp-base) ease,
              border-color var(--bp-base) ease, box-shadow var(--bp-base) ease;
  white-space: nowrap;
}
.bp-btn:hover { text-decoration: none; }
.bp-btn:active { transform: translateY(1px); }
.bp-btn[disabled], .bp-btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.bp-btn-primary { background: var(--bp-cta); color: white; }
.bp-btn-primary:hover { background: var(--bp-cta-strong); color: white; box-shadow: var(--bp-shadow-sm); }
.bp-btn-ghost { background: transparent; color: var(--bp-cta); border-color: var(--bp-border-strong); }
.bp-btn-ghost:hover { background: var(--bp-surface-tint); color: var(--bp-primary); }
.bp-btn-success { background: var(--bp-success); color: white; }
.bp-btn-success:hover { background: #166534; color: white; }
.bp-btn-danger { background: var(--bp-danger); color: white; }
.bp-btn-danger:hover { background: #991b1b; color: white; }
.bp-btn-outline { background: var(--bp-surface); color: var(--bp-cta); border: 1px solid var(--bp-cta); }
.bp-btn-outline:hover { background: var(--bp-cta-soft); }
.bp-btn-sm { font-size: 0.85rem; padding: 0.45rem 0.85rem; min-height: 36px; }
.bp-btn-block { width: 100%; }

/* Spinner inside button for async submits — JS toggles aria-busy */
.bp-btn[aria-busy="true"] { position: relative; color: transparent !important; }
.bp-btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border: 2px solid currentcolor; border-top-color: transparent; border-radius: 50%;
  color: white;
  animation: bp-spin 700ms linear infinite;
}
@keyframes bp-spin { to { transform: rotate(360deg); } }

/* ── Main + alerts ────────────────────────────────────────── */
.bp-main { padding: var(--bp-space-6) var(--bp-space-4) var(--bp-space-12); min-height: 65vh; }
.bp-alert {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.85rem 1.05rem; border-radius: var(--bp-radius-md); margin-bottom: var(--bp-space-4);
  font-size: 0.92rem; border: 1px solid transparent;
}
.bp-alert svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.bp-alert-success { background: var(--bp-success-soft); color: #14532D; border-color: #BBF7D0; }
.bp-alert-danger  { background: var(--bp-danger-soft);  color: #7F1D1D; border-color: #FECACA; }
.bp-alert-info    { background: var(--bp-info-soft);    color: #1E3A8A; border-color: #BFDBFE; }
.bp-alert-warning { background: var(--bp-warning-soft); color: #78350F; border-color: #FDE68A; }

/* ── Cards ────────────────────────────────────────────────── */
.bp-card {
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-lg);
  box-shadow: var(--bp-shadow-xs);
  margin-bottom: var(--bp-space-5);
  overflow: hidden;
  transition: box-shadow var(--bp-base) ease, border-color var(--bp-base) ease;
}
.bp-card:hover { box-shadow: var(--bp-shadow-sm); }
.bp-card-header {
  padding: var(--bp-space-4) var(--bp-space-5);
  border-bottom: 1px solid var(--bp-border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--bp-space-3);
}
.bp-card-title {
  margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--bp-primary);
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.bp-card-title svg { width: 18px; height: 18px; color: var(--bp-cta); }
.bp-card-body { padding: var(--bp-space-5); }
.bp-card-actions {
  padding: var(--bp-space-3) var(--bp-space-5);
  border-top: 1px solid var(--bp-border); background: var(--bp-surface-tint);
  display: flex; gap: var(--bp-space-2); flex-wrap: wrap;
}
.bp-card-emphasis { border-top: 3px solid var(--bp-cta); }

/* ── Tables ──────────────────────────────────────────────── */
.bp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.bp-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.bp-table th {
  text-align: left; padding: 0.75rem 0.85rem;
  background: var(--bp-surface-tint); color: var(--bp-text-muted);
  font-weight: 700; font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.05em; border-bottom: 1px solid var(--bp-border);
}
.bp-table td {
  padding: 0.85rem; border-bottom: 1px solid var(--bp-border);
  vertical-align: middle;
}
.bp-table tr:last-child td { border-bottom: none; }
.bp-table-hover tbody tr { transition: background var(--bp-fast) ease; }
.bp-table-hover tbody tr:hover { background: var(--bp-surface-tint); }

/* ── Badges (status pills) ───────────────────────────────── */
.bp-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.22rem 0.65rem; border-radius: var(--bp-radius-pill);
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.bp-badge-success { background: var(--bp-success-soft); color: var(--bp-success); border-color: #BBF7D0; }
.bp-badge-warning { background: var(--bp-warning-soft); color: var(--bp-warning); border-color: #FDE68A; }
.bp-badge-danger  { background: var(--bp-danger-soft);  color: var(--bp-danger);  border-color: #FECACA; }
.bp-badge-info    { background: var(--bp-info-soft);    color: var(--bp-info);    border-color: #BFDBFE; }
.bp-badge-muted   { background: var(--bp-surface-tint); color: var(--bp-text-muted); border-color: var(--bp-border); }
.bp-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentcolor;
}

/* ── Forms ───────────────────────────────────────────────── */
.bp-form-row { margin-bottom: var(--bp-space-4); }
.bp-label {
  display: block; font-weight: 600; margin-bottom: 0.35rem;
  font-size: 0.9rem; color: var(--bp-primary);
}
.bp-label-hint { font-weight: 400; color: var(--bp-text-muted); font-size: 0.82rem; }
.bp-req { color: var(--bp-danger); font-weight: 700; margin-left: 0.12rem; }
.bp-req-legend { font-size: 0.8rem; color: var(--bp-text-muted); margin: 0 0 var(--bp-space-4); }

/* Split auth screens (login / register / verify) — shared welcome panel + form */
.bp-auth { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 0; max-width: 940px; margin: 1.5rem auto; border: 1px solid var(--bp-border); border-radius: var(--bp-radius-lg); overflow: hidden; box-shadow: var(--bp-shadow-md); background: var(--bp-surface); }
.bp-auth-hero { position: relative; color: #fff; padding: 2.75rem 2.25rem; background: linear-gradient(150deg, var(--bp-primary) 0%, var(--bp-cta-strong) 100%); display: flex; align-items: center; }
.bp-auth-badge { display: inline-flex; align-items: center; gap: 0.4rem; background: rgba(255,255,255,0.16); color: #fff; padding: 0.3rem 0.8rem; border-radius: var(--bp-radius-pill); font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1.1rem; }
.bp-auth-badge svg { width: 14px; height: 14px; }
.bp-auth-hero h1 { color: #fff; font-size: 1.9rem; line-height: 1.15; margin: 0 0 0.6rem; }
.bp-auth-hero .bp-auth-sub { color: rgba(255,255,255,0.92); font-size: 0.97rem; line-height: 1.55; margin: 0 0 1.4rem; }
.bp-auth-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.65rem; }
.bp-auth-points li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; color: rgba(255,255,255,0.96); }
.bp-auth-points svg { width: 18px; height: 18px; flex: none; opacity: 0.95; }
.bp-auth-flag { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, #0038A8 0 33.33%, #CE1126 33.33% 66.66%, #FCD116 66.66% 100%); }
.bp-auth-form { padding: 1.75rem; display: flex; align-items: center; }
.bp-auth-form .bp-card { width: 100%; border: none; box-shadow: none; background: transparent; }
.bp-auth-form .bp-card-header, .bp-auth-form .bp-card-body { padding-left: 0; padding-right: 0; }
@media (max-width: 760px) { .bp-auth { grid-template-columns: 1fr; max-width: 460px; } .bp-auth-hero { padding: 1.9rem 1.6rem; } .bp-auth-hero h1 { font-size: 1.5rem; } }
.bp-input, .bp-select, .bp-textarea {
  width: 100%; padding: 0.7rem 0.85rem;
  border: 1px solid var(--bp-border-strong);
  border-radius: var(--bp-radius-sm);
  font: inherit; font-size: 0.95rem;
  background: var(--bp-surface);
  color: var(--bp-text); min-height: 44px;
  transition: border-color var(--bp-fast) ease, box-shadow var(--bp-fast) ease;
}
.bp-input:hover, .bp-select:hover, .bp-textarea:hover { border-color: var(--bp-secondary); }
.bp-input:focus-visible, .bp-select:focus-visible, .bp-textarea:focus-visible {
  border-color: var(--bp-cta); box-shadow: var(--bp-focus-ring); outline: none;
}
.bp-input::placeholder, .bp-textarea::placeholder { color: var(--bp-text-faint); }
.bp-textarea { min-height: 7rem; resize: vertical; }

.bp-check {
  display: flex; align-items: flex-start; gap: 0.55rem;
  font-size: 0.9rem; color: var(--bp-text);
}
.bp-check input[type=checkbox] {
  width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
  accent-color: var(--bp-cta); cursor: pointer;
}

.field-validation-error { color: var(--bp-danger); font-size: 0.84rem; display: block; margin-top: 0.3rem; }
.input-validation-error { border-color: var(--bp-danger); }
.input-validation-error:focus-visible { box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.25); }
.validation-summary-errors {
  background: var(--bp-danger-soft); border: 1px solid #FECACA;
  color: #7F1D1D; padding: 0.7rem 1rem; border-radius: var(--bp-radius-sm);
  margin-bottom: var(--bp-space-4); font-size: 0.88rem;
}
.validation-summary-errors ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }

/* ── Hero (home) ─────────────────────────────────────────── */
.bp-hero {
  position: relative;
  padding: var(--bp-space-12) 0 var(--bp-space-10); text-align: center;
}
.bp-hero h1 { margin: 0 0 var(--bp-space-3); max-width: 28ch; margin-inline: auto; }
.bp-hero p  { color: var(--bp-secondary); font-size: 1.08rem; max-width: 44ch; margin: 0 auto var(--bp-space-6); }
.bp-hero-actions {
  display: flex; gap: var(--bp-space-3); justify-content: center; flex-wrap: wrap;
}
.bp-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--bp-cta-soft); color: var(--bp-cta-strong);
  padding: 0.3rem 0.85rem; border-radius: var(--bp-radius-pill);
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: var(--bp-space-4);
}
.bp-hero-eyebrow svg { width: 14px; height: 14px; }

.bp-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--bp-space-3); margin-top: var(--bp-space-10);
  max-width: 720px; margin-inline: auto;
}
.bp-stat {
  background: var(--bp-surface); border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-md); padding: var(--bp-space-4);
  text-align: center;
}
.bp-stat-num { font-size: 1.85rem; font-weight: 700; color: var(--bp-primary); letter-spacing: -0.02em; }
.bp-stat-label {
  font-size: 0.74rem; color: var(--bp-text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.2rem;
}

/* Feature cards (home) */
.bp-feature {
  background: var(--bp-surface); border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-md); padding: var(--bp-space-5);
  transition: transform var(--bp-base) ease, box-shadow var(--bp-base) ease;
}
.bp-feature:hover {
  transform: translateY(-2px); box-shadow: var(--bp-shadow-md);
  border-color: var(--bp-cta);
}
.bp-feature-icon {
  width: 44px; height: 44px; border-radius: var(--bp-radius-md);
  background: var(--bp-cta-soft); color: var(--bp-cta);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--bp-space-3);
}
.bp-feature-icon svg { width: 22px; height: 22px; }
.bp-feature h3 { margin: 0 0 0.4rem; }
.bp-feature p  { color: var(--bp-text-muted); font-size: 0.92rem; margin: 0; }

/* ── Grid utils ──────────────────────────────────────────── */
.bp-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--bp-space-4); }
.bp-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--bp-space-4); }

.bp-field { font-size: 0.9rem; }
.bp-field .bp-field-label {
  display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--bp-text-muted); margin-bottom: 0.2rem; font-weight: 600;
}
.bp-field strong { font-weight: 600; color: var(--bp-text); }

/* ── Empty state ─────────────────────────────────────────── */
.bp-empty {
  text-align: center; padding: var(--bp-space-10) var(--bp-space-4);
}
.bp-empty-illust {
  width: 96px; height: 96px; margin: 0 auto var(--bp-space-4);
  color: var(--bp-text-faint);
}
.bp-empty h3 { margin: 0 0 0.4rem; color: var(--bp-primary); font-size: 1.05rem; }
.bp-empty p  { color: var(--bp-text-muted); margin: 0 auto var(--bp-space-4); max-width: 38ch; }

/* ── Workflow timeline (application details) ────────────── */
.bp-timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.bp-timeline::before {
  content: ""; position: absolute; left: 13px; top: 12px; bottom: 12px;
  width: 2px; background: var(--bp-border);
}
.bp-timeline li {
  position: relative; padding: 0 0 var(--bp-space-4) 2.25rem;
  font-size: 0.94rem;
}
.bp-timeline li:last-child { padding-bottom: 0; }
.bp-timeline-dot {
  position: absolute; left: 4px; top: 4px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bp-surface); border: 2px solid var(--bp-border-strong);
  display: flex; align-items: center; justify-content: center;
}
.bp-timeline-dot svg { width: 11px; height: 11px; }
.bp-timeline li.is-done .bp-timeline-dot {
  background: var(--bp-success); border-color: var(--bp-success); color: white;
}
.bp-timeline li.is-current .bp-timeline-dot {
  background: var(--bp-cta); border-color: var(--bp-cta); color: white;
  box-shadow: 0 0 0 4px var(--bp-cta-soft);
}
.bp-timeline li small { color: var(--bp-text-muted); display: block; font-size: 0.8rem; margin-top: 0.1rem; }
.bp-timeline li.is-done   { color: var(--bp-text); }
.bp-timeline li.is-current strong { color: var(--bp-primary); }
.bp-timeline li.is-pending { color: var(--bp-text-faint); }

/* ── Footer ──────────────────────────────────────────────── */
.bp-foot {
  background: var(--bp-primary); color: #CBD5E1;
  padding: var(--bp-space-8) var(--bp-space-4); margin-top: var(--bp-space-12);
}
.bp-foot-inner {
  display: flex; gap: var(--bp-space-8); flex-wrap: wrap;
  justify-content: space-between; font-size: 0.9rem;
}
.bp-foot strong { color: white; font-size: 1rem; }
.bp-foot a { color: white; text-decoration: underline; text-underline-offset: 3px; }
.bp-foot small { display: block; margin-top: var(--bp-space-2); color: #94A3B8; }

/* ── eBPLS product logo (system branding, distinct from the official LGU
   seal): auth-hero chip + footer "powered by" credit ── */
.bp-auth-logo { display: flex; width: max-content; max-width: 100%; background: #fff; border-radius: 14px; padding: 0.55rem 0.85rem; margin-bottom: 1.25rem; box-shadow: 0 8px 20px rgba(0,0,0,0.18); }
.bp-auth-logo img { height: 60px; width: auto; display: block; }
.bp-foot-credit { display: flex; align-items: center; justify-content: center; gap: 0.65rem; margin-top: var(--bp-space-6); padding-top: var(--bp-space-5); border-top: 1px solid rgba(255,255,255,0.12); color: #94A3B8; font-size: 0.85rem; text-align: center; }
.bp-foot-credit strong { color: #fff; }
.bp-foot-credit-logo { display: inline-flex; background: #fff; border-radius: 8px; padding: 4px 6px; flex: none; }
.bp-foot-credit-logo img { height: 22px; width: auto; display: block; }
@media (max-width: 760px) { .bp-foot-credit { flex-direction: column; } }

/* ── Mobile-card layout (tables collapse to stacked cards) ── */
@media (max-width: 640px) {
  .bp-table-stacked thead { display: none; }
  .bp-table-stacked, .bp-table-stacked tbody,
  .bp-table-stacked tr, .bp-table-stacked td { display: block; width: 100%; }
  .bp-table-stacked tr {
    margin-bottom: var(--bp-space-3);
    border: 1px solid var(--bp-border); border-radius: var(--bp-radius-md);
    background: var(--bp-surface); padding: var(--bp-space-3) var(--bp-space-4);
  }
  .bp-table-stacked td {
    border: none; padding: 0.4rem 0;
    display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap;
  }
  .bp-table-stacked td::before {
    content: attr(data-label);
    flex-basis: 110px; color: var(--bp-text-muted);
    font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em;
    font-weight: 600;
  }
}

/* ── Mobile-nav ──────────────────────────────────────────── */
@media (max-width: 820px) {
  .bp-top-inner { flex-wrap: wrap; gap: var(--bp-space-3); }
  .bp-burger { display: inline-flex; margin-left: auto; }
  .bp-nav {
    order: 99; flex-basis: 100%;
    flex-direction: column; gap: 0; align-items: stretch;
    border-top: 1px solid var(--bp-border); margin: 0 calc(var(--bp-space-4) * -1);
    max-height: 0; overflow: hidden;
    transition: max-height var(--bp-base) ease;
  }
  .bp-nav-toggle:checked ~ .bp-nav { max-height: 60vh; }
  .bp-nav a {
    padding: 0.85rem var(--bp-space-4);
    border-bottom: 1px solid var(--bp-border);
  }
  .bp-nav a:hover { background: var(--bp-surface-tint); border-bottom-color: var(--bp-border); }
  .bp-account { order: 5; margin-left: auto; }
  .bp-greet { display: none; }
  .bp-foot-inner { flex-direction: column; text-align: center; }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  .bp-top, .bp-foot, .bp-btn, .bp-card-actions { display: none !important; }
  body { background: white; }
}

/* ── Motion: respect prefers-reduced-motion ─────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}
