/* ==========================================================================
   GAIA MEMBERSHIP - MOBILE FIRST DESIGN SYSTEM & APP VIEWPORT
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --app-bg: #f8fafc;
  --app-card-bg: #ffffff;
  --primary-dark: #0f172a;
  --primary-slate: #1e293b;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --accent-gold: #d4af37;
  --accent-gold-dark: #b8860b;
  --accent-gold-gradient: linear-gradient(135deg, #dfba4e 0%, #c59b27 100%);
  --card-gradient: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --card-gold-gradient: linear-gradient(135deg, #2a2415 0%, #17140b 100%);
  --emerald-success: #10b981;
  --rose-danger: #f43f5e;
  --border-light: #e2e8f0;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 50px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
}

/* Global Reset & App Background */
body {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  background-color: #0b0f19 !important;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Desktop Centered Mobile App Container */
.app-viewport {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--app-bg);
  position: relative;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  box-sizing: border-box;
}

.app-viewport>main {
  flex: 1 0 auto;
  padding-bottom: 80px;
}

/* Top App Bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-brand-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.app-header-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.app-header-btn:hover,
.app-header-btn:active {
  background: #f1f5f9;
  color: var(--accent-gold-dark);
}

/* Digital Membership Card Component */
.digital-membership-card {
  position: relative;
  background: var(--card-gradient);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #ffffff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 20px;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.digital-membership-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.digital-membership-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gold-gradient);
}

.card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.card-brand-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.card-member-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.card-number-formatted {
  font-family: 'Courier New', Courier, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #cbd5e1;
  margin-bottom: 24px;
}

.card-bottom-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 14px;
}

.card-info-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.card-info-value {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

.btn-card-qr {
  background: var(--accent-gold-gradient);
  color: #0f172a;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
}

.btn-card-qr:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.4);
}

/* Brand Outlet Switcher Tabs */
.outlet-tab-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 16px 0;
  scrollbar-width: none;
  /* Firefox */
}

.outlet-tab-nav::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.outlet-pill-tab {
  flex: 0 0 auto;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-sm);
}

.outlet-pill-tab img {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.outlet-pill-tab.active {
  background: var(--primary-dark);
  color: #ffffff;
  border-color: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
}

.outlet-pill-tab.active img {
  filter: brightness(0) invert(1);
}

/* Bottom Navigation Bar Component */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 72px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1030;
  padding: 0 12px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.nav-item-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
  width: 60px;
}

.nav-item-link i {
  font-size: 20px;
  margin-bottom: 2px;
}

.nav-item-link.active {
  color: var(--accent-gold-dark);
  font-weight: 700;
}

.nav-item-link.active i {
  color: var(--accent-gold-dark);
  transform: translateY(-2px);
}

/* Floating Center QR Action Button in Nav */
.nav-qr-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-gold-gradient);
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 4px solid #ffffff;
  box-shadow: 0 6px 18px rgba(212, 175, 55, 0.4);
  transform: translateY(-16px);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.nav-qr-fab:hover,
.nav-qr-fab:active {
  transform: translateY(-18px) scale(1.05);
}

/* Modern Card Containers */
.modern-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.modern-card:hover {
  box-shadow: var(--shadow-md);
}

/* Voucher Ticket Stub */
.voucher-ticket-stub {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
}

.voucher-ticket-header {
  padding: 16px 20px;
}

.voucher-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.voucher-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.voucher-ticket-divider {
  position: relative;
  border-top: 2px dashed #e2e8f0;
  margin: 0;
}

.voucher-ticket-divider::before,
.voucher-ticket-divider::after {
  content: '';
  position: absolute;
  top: -10px;
  width: 20px;
  height: 20px;
  background-color: var(--app-bg);
  border-radius: 50%;
  border: 1px solid var(--border-light);
}

.voucher-ticket-divider::before {
  left: -11px;
}

.voucher-ticket-divider::after {
  right: -11px;
}

.voucher-ticket-footer {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafafa;
}

.btn-redeem-gold {
  background: var(--accent-gold-gradient);
  color: #0f172a;
  border: none;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
  transition: all 0.2s ease;
}

.btn-redeem-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(212, 175, 55, 0.35);
}

/* Floating Input Styling for Auth Pages */
.modern-auth-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px 24px;
  border: 1px solid var(--border-light);
}

.modern-btn-primary {
  background: var(--primary-dark);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 20px;
  font-weight: 700;
  font-size: 15px;
  border: none;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modern-btn-primary:hover {
  background: #1e293b;
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
}

/* Global Icon Alignment Fixes */
i.bi,
.bi {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  line-height: 1 !important;
}

.avatar {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1 !important;
}

.avatar i.bi,
.avatar svg {
  display: block;
  margin: 0 auto;
}

.nav-item-link i {
  font-size: 22px;
  margin-bottom: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-qr-fab i {
  font-size: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin: 0;
}

.app-header-btn i {
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Chevron Icon Rotation on Collapse & Dropdown Toggle */
.bi-chevron-down {
  transition: transform 0.25s ease-in-out;
}

[aria-expanded="true"] .bi-chevron-down,
[data-bs-toggle="collapse"][aria-expanded="true"] .bi-chevron-down,
[data-bs-toggle="dropdown"][aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}