/**
 * Scodex custom theme overrides.
 * Layered on top of the vendor Bootstrap admin theme (app.css/app.min.css) —
 * do not edit those vendor files directly. This file only redefines the
 * Bootstrap CSS custom properties + a small set of reusable helper classes,
 * so every page inherits the brand palette automatically.
 *
 * Palette is aligned with the public marketing page (network-page.html):
 * deep navy primary + gold accent for premium/achievement highlights.
 */

:root,
[data-bs-theme=light] {
  --brand-navy: #1a2a50;
  --brand-navy-deep: #0a1128;
  --brand-gold: #d4af37;
  --brand-gold-soft: #f7ecc8;

  --bs-primary: var(--brand-navy);
  --bs-primary-rgb: 26, 42, 80;
  --bs-primary-text-emphasis: #111b33;
  --bs-primary-bg-subtle: #e8ecf5;
  --bs-primary-border-subtle: #c3ccdf;

  --bs-link-color: var(--brand-navy);
  --bs-link-color-rgb: 26, 42, 80;
  --bs-link-hover-color: #2c3f70;
  --bs-link-hover-color-rgb: 44, 63, 112;

  --bs-focus-ring-color: rgba(26, 42, 80, 0.25);
}

[data-bs-theme=dark] {
  --brand-navy: #3a4d85;
  --brand-navy-deep: #0a1128;
  --brand-gold: #e0c15c;
  --brand-gold-soft: #3a331a;

  --bs-primary-text-emphasis: #aab8dd;
  --bs-primary-bg-subtle: #111b33;
  --bs-primary-border-subtle: #2c3f70;

  --bs-link-color: #aab8dd;
  --bs-link-hover-color: #c3ccef;
  --bs-link-color-rgb: 170, 184, 221;
  --bs-link-hover-color-rgb: 195, 204, 239;
}

/* ---------------------------------------------------------------------
   Reusable helpers used across the redesigned pages
   --------------------------------------------------------------------- */

.gold-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--brand-gold-soft);
  color: #6b5613;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 50rem;
  font-size: 0.85rem;
}

[data-bs-theme=dark] .gold-badge {
  color: var(--brand-gold);
}

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

.brand-gradient {
  background: linear-gradient(135deg, var(--brand-navy-deep) 0%, var(--brand-navy) 100%);
  color: #fff;
}

.section-card {
  border: none;
  border-radius: var(--bs-border-radius-lg);
  box-shadow: 0 2px 12px rgba(10, 17, 40, 0.06);
}

.hover-lift {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.hover-lift:hover {
  box-shadow: 0 10px 28px rgba(10, 17, 40, 0.1);
  transform: translateY(-2px);
}

.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-state .empty-state-icon {
  font-size: 3rem;
  opacity: 0.5;
  display: block;
  margin-bottom: 0.75rem;
}

.stat-tile {
  background: var(--bs-secondary-bg);
  border: none;
  border-radius: var(--bs-border-radius-lg);
  box-shadow: 0 2px 12px rgba(10, 17, 40, 0.06);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-tile .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary);
}

.stat-tile .stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-tile .stat-label {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Per-week bonus breakdown — every bonus type on its own tile, wrapping
   naturally so nothing is ever hidden behind a horizontal scrollbar. */
.bonus-week-card {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  padding: 1.25rem;
}

.bonus-week-card + .bonus-week-card {
  margin-top: 1rem;
}

.bonus-week-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.bonus-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.bonus-breakdown-item {
  background: var(--bs-secondary-bg);
  border-radius: var(--bs-border-radius);
  padding: 0.6rem 0.85rem;
}

.bonus-breakdown-item .label {
  display: block;
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

.bonus-breakdown-item .amount {
  font-weight: 700;
  font-size: 0.95rem;
}

.bonus-breakdown-item.is-zero {
  opacity: 0.55;
}

/* Selectable package/option card (registration, upgrade flow) */
.package-option {
  display: block;
  cursor: pointer;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
}

.package-option:hover {
  border-color: var(--brand-navy);
  background: var(--bs-primary-bg-subtle);
}

.package-option:has(input:checked) {
  border-color: var(--brand-navy);
  border-width: 2px;
  background: var(--bs-primary-bg-subtle);
}

.amount-due-badge {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  background: var(--brand-navy);
  padding: 6px 16px;
  border-radius: 8px;
}

.amount-due-badge .fs-6 {
  font-size: 0.85rem !important;
  opacity: 0.9;
}

.amount-due-summary {
  background: var(--brand-gold-soft);
  border: 2px solid var(--brand-gold);
  border-radius: var(--bs-border-radius-lg);
  padding: 20px;
  text-align: center;
}

/* SweetAlert2 (public/assets/js/sweet-confirm.js) — default title is a
   heavy 1.875em that reads oversized against this UI's compact type scale.
   Trimmed down and tightened for a slicker, less shouty popup header. */
.swal2-popup {
  border-radius: var(--bs-border-radius-lg);
  padding-bottom: 1.5em;
}

.swal2-title {
  font-size: 1.15rem !important;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand-navy-deep);
  padding: 0.75em 1em 0.25em;
}

[data-bs-theme=dark] .swal2-title {
  color: #fff;
}

.swal2-html-container {
  font-size: 0.9rem !important;
  color: var(--bs-secondary-color);
}

.swal2-icon {
  transform: scale(0.8);
  margin-top: 1.25em;
}
