:root {
  --brand-dark: #0a1230;
  --brand-primary: #16224f;
  --brand-medium: #1e2f6b;
  --brand-light: #eef1fa;
  --brand-gold: #c18b3f;
  --brand-gold-hover: #a87818;
  --brand-gold-light: #f5e6c2;
  --text: #1e2a23;
  --radius: 8px;
  --font-display: "Poppins", sans-serif;
  --font-body: "Open Sans", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: #f8faf8;
}
h1,h2,h3,h4,h5,h6,.navbar-brand,.eyebrow { font-family: var(--font-display); }

.utility-bar {
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.85rem;
  padding: 0.4rem 0;
}
.utility-bar a { color: #fff; text-decoration: none; }

.navbar-aficta {
  background: #fff;
  border-bottom: 3px solid var(--brand-primary);
}
.navbar-aficta .nav-link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--brand-dark) !important;
}
.navbar-aficta .nav-link:hover { color: var(--brand-gold) !important; }

.page-hero {
  background: linear-gradient(135deg, #0a1230, #16224f, #1e2f6b);
  color: #fff;
  padding: 3.5rem 0 2.5rem;
}
.page-hero .eyebrow {
  color: var(--brand-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.44px;
  text-transform: uppercase;
}

.btn-navy {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.btn-navy:hover { background: var(--brand-dark); color: #fff; }
.btn-gold {
  background: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #fff;
}
.btn-gold:hover { background: var(--brand-gold-hover); color: #fff; }

.is-busy { cursor: progress; pointer-events: none; }
.btn.is-busy:disabled, .btn.is-busy.disabled { opacity: .8; }
.busy-spinner { margin-right: .5rem; vertical-align: -0.125em; }
a.is-busy:not(.btn) { opacity: .7; text-decoration: none; }

.membership-tier {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(10,18,48,0.08);
  padding: 1.5rem;
  height: 100%;
  border: 1px solid #eef1fa;
}
.membership-tier.featured {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(10,18,48,0.14);
  border-color: var(--brand-gold-light);
}
.badge-popular {
  background: var(--brand-gold);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
}

.footer-aficta {
  background: var(--brand-dark);
  color: #aab4c8;
  padding: 2.5rem 0;
  margin-top: 3rem;
}
.footer-aficta a { color: #f5e6c2; text-decoration: none; }
.footer-aficta h6 { color: #fff; font-family: var(--font-display); }
.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: .85rem;
}
.footer-bottom .powered-by { display: inline-flex; align-items: center; gap: .4rem; }
.footer-bottom .powered-by a { display: inline-flex; }
.footer-bottom .powered-by img {
  height: 10px;
  background: #fff;
  border-radius: 2px;
  padding: 2px 3px;
  box-sizing: content-box;
}

.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
  width: 260px;
  background: var(--brand-dark);
  color: #fff;
  padding: 1.25rem;
  flex-shrink: 0;
}
.app-sidebar a {
  display: block;
  color: #cfd6e6;
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}
.app-sidebar a:hover, .app-sidebar a.active {
  background: var(--brand-primary);
  color: #fff;
}
.app-sidebar .brand {
  font-family: var(--font-display);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: #fff;
}
.app-sidebar .brand span { color: var(--brand-gold); }
.app-main { flex: 1; background: var(--brand-light); }
.app-topbar {
  background: #fff;
  border-bottom: 1px solid #dde3f0;
  padding: 0.9rem 1.5rem;
}
.app-content { padding: 1.5rem; }
.card-aficta {
  background: #fff;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(10,18,48,0.06);
}
.status-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-active { background: #e6f6ec; color: #157347; }
.status-expired { background: #fde8e8; color: #b02a37; }
.status-pending { background: #fff3cd; color: #997404; }

@media (max-width: 991px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { width: 100%; }
}

/* Invoice document (pay page) */
.invoice-page { background: var(--brand-light); }
.invoice-doc {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(10, 18, 48, 0.08);
  border: 1px solid #e5e9f5;
}
.invoice-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--brand-dark);
  color: #fff;
  padding: 1.5rem 2rem;
  border-bottom: 4px solid var(--brand-gold);
}
.invoice-logo { width: 60px; height: 60px; border-radius: 50%; background: #fff; }
.invoice-brand { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: 0.5px; }
.invoice-brand span { color: var(--brand-gold); }
.invoice-brand-sub { font-size: 0.8rem; color: #c7cde3; }
.invoice-title { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; letter-spacing: 4px; line-height: 1; }
.invoice-no { color: #c7cde3; margin-top: 0.35rem; }
.invoice-body { padding: 2rem; }
.invoice-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: #6b7280; margin-bottom: 0.35rem; }
.invoice-meta { font-size: 0.9rem; }
.invoice-meta th { font-weight: 400; color: #6b7280; padding: 0.15rem 1.5rem 0.15rem 0; white-space: nowrap; }
.invoice-meta td { text-align: right; padding: 0.15rem 0; white-space: nowrap; }
.invoice-head > .text-end { margin-left: auto; }
.invoice-status { display: inline-block; padding: 0.15rem 0.7rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #fff; background: #b54708; }
.invoice-status-overdue { background: #b42318; }
.invoice-status-paid { background: #067647; }
.invoice-status-void { background: #6b7280; }
.invoice-items thead th {
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 0;
}
.invoice-items td { padding-top: 0.9rem; padding-bottom: 0.9rem; }
.invoice-total {
  display: flex;
  justify-content: space-between;
  background: var(--brand-dark);
  color: #fff;
  font-weight: 700;
  padding: 0.7rem 0.75rem;
  border-radius: 6px;
  margin-top: 0.25rem;
}
.invoice-total span:last-child { font-size: 1.15rem; }
.invoice-foot { border-top: 1px solid #e5e9f5; padding: 1rem 2rem 1.25rem; font-size: 0.85rem; color: #6b7280; }
.invoice-stamp {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 8px;
  text-transform: uppercase;
  padding: 0 1.25rem;
  border: 6px solid;
  border-radius: 12px;
  opacity: 0.16;
  pointer-events: none;
  z-index: 1;
}
.invoice-stamp-paid { color: #067647; }
.invoice-stamp-void { color: #b42318; }

@media print {
  .navbar-aficta, .footer-aficta, .no-print { display: none !important; }
  .invoice-page { background: #fff; padding: 0 !important; }
  .invoice-doc { box-shadow: none; border: 0; }
  .invoice-head, .invoice-total, .invoice-status, .invoice-items thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
