/* ============================================================
   HEADER & TOP NAVIGATION
   ============================================================ */
.app-header {
  background: #0d1426;
  color: var(--text);
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 600px;
  height: 70px;
  box-sizing: border-box;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.header-logo-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.header-logo-img {
  height: 42px;
  width: 42px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(214, 25, 32, 0.25);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease);
}
.header-logo-img:hover {
  transform: scale(1.05);
}

.header-title {
  min-width: 0;
  flex: 1;
}

.header-title h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-title > span {
  font-size: 0.82rem;
  color: var(--text-light);
  display: block;
  line-height: 1.25;
  margin-top: 2px;
}

.btn-logout {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--dur) var(--ease);
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-logout:hover {
  background: rgba(214, 25, 32, 0.15);
  border-color: rgba(214, 25, 32, 0.35);
  color: #ff5e62;
}

/* Brand Typography */
.brand-light {
  font-weight: 500;
  color: var(--text);
}
.brand-bold {
  font-weight: 800;
  color: var(--primary);
}
.app-header .brand-light {
  color: #ffffff;
  font-weight: 400;
  display: inline;
}
.app-header .brand-bold {
  font-weight: 800;
  color: #ff333d;
  display: inline;
}

/* ============================================================
   MAIN PANELS & VIEWS
   ============================================================ */
.app-view {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 88px 20px 120px; /* Space for fixed header and bottom nav */
  position: relative;
  z-index: 1;
}

.view-section {
  display: none;
}
.view-section.active {
  display: block;
}

/* ============================================================
   REFERRER DASHBOARD — POINTS CARD
   ============================================================ */
.points-summary-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.points-header {
  font-size: 0.92rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  display: block;
  text-align: center;
  position: relative;
  z-index: 2;
}

.points-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 10px 0;
  position: relative;
  z-index: 2;
}

.points-value {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #ffffff 30%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 15px rgba(255, 255, 255, 0.2));
}

.points-currency {
  font-size: 1.5rem;
  font-weight: 900;
  color: #ff5e62;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-shadow: 0 0 20px rgba(255, 94, 98, 0.4);
}

.badge-status-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.user-badge-name {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.user-badge-level {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.03em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all var(--dur) var(--ease);
}

.level-base {
  background: rgba(214, 25, 32, 0.12) !important;
  border: 1px solid rgba(214, 25, 32, 0.35) !important;
  color: #ff5c62 !important;
  box-shadow: 0 0 12px rgba(214, 25, 32, 0.2) !important;
}

.level-silver {
  background: rgba(148, 163, 184, 0.12) !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 0 12px rgba(148, 163, 184, 0.2) !important;
}

.level-gold {
  background: rgba(234, 179, 8, 0.12) !important;
  border: 1px solid rgba(234, 179, 8, 0.35) !important;
  color: #facc15 !important;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.2) !important;
}

.level-bronze {
  background: rgba(205, 127, 50, 0.12) !important;
  border: 1px solid rgba(205, 127, 50, 0.35) !important;
  color: #e8a850 !important;
  box-shadow: 0 0 12px rgba(205, 127, 50, 0.2) !important;
}

.level-diamond {
  background: rgba(185, 242, 255, 0.1) !important;
  border: 1px solid rgba(185, 242, 255, 0.35) !important;
  color: #b9f2ff !important;
  box-shadow: 0 0 16px rgba(185, 242, 255, 0.25), 0 0 30px rgba(185, 242, 255, 0.08) !important;
}

/* ============================================================
   DASHBOARD MENU CARDS â€” GLOW + 3D TILT
   ============================================================ */
.dashboard-menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
  perspective: 800px;
}

.menu-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 24px 12px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

/* Diagonal glass shine sweep */
.menu-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -80%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  animation: menuShine 7s infinite ease-in-out;
}

@keyframes menuShine {
  0% { left: -80%; }
  20% { left: 140%; }
  100% { left: 140%; }
}

#menu-card-add::after { animation-delay: 0s; animation-duration: 7s; }
#menu-card-list::after { animation-delay: 1.8s; animation-duration: 7.5s; }
#menu-card-shop::after { animation-delay: 3.5s; animation-duration: 8s; }
#menu-card-how::after { animation-delay: 5s; animation-duration: 8.5s; }
#menu-card-club::after { animation-delay: 6.5s; animation-duration: 9s; }

.menu-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.04);
}

#menu-card-add:hover {
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

#menu-card-list:hover {
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

#menu-card-shop:hover {
  border-color: rgba(244, 63, 94, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

#menu-card-how:hover {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

#menu-card-club:hover {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

#menu-card-invite:hover {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.menu-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  transition: transform var(--dur) var(--ease);
  position: relative;
}

#menu-card-add .menu-card-icon {
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.2);
}

#menu-card-list .menu-card-icon {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

#menu-card-shop .menu-card-icon {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.2);
}

#menu-card-how .menu-card-icon {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

#menu-card-add:hover .menu-card-icon { background: rgba(96, 165, 250, 0.18); transform: scale(1.1); }
#menu-card-list:hover .menu-card-icon { background: rgba(251, 191, 36, 0.18); transform: scale(1.1); }
#menu-card-shop:hover .menu-card-icon { background: rgba(244, 63, 94, 0.18); transform: scale(1.1); }
#menu-card-how:hover .menu-card-icon { background: rgba(59, 130, 246, 0.18); transform: scale(1.1); }
#menu-card-invite:hover .menu-card-icon { background: rgba(52, 211, 153, 0.18); transform: scale(1.1); }

.menu-card-icon svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.menu-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.menu-card-desc {
  display: none;
}

/* ============================================================

/* ============================================================
   REFERRALS LIST & DETAIL â€” GRADIENT BORDER
   ============================================================ */
.referral-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.referral-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 20px;
  padding-left: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

/* Gradient left border */
.referral-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary) 0%, rgba(214, 25, 32, 0.2) 100%);
  border-radius: 4px 0 0 4px;
  z-index: 2;
}

/* Subtle shimmer on hover */
.referral-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.referral-card:hover::after {
  opacity: 1;
}

.referral-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 15px rgba(214, 25, 32, 0.08);
}

.ref-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}
.ref-card-header h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.ref-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.ref-referrer {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: -6px;
}

.ref-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.ref-inner-badge {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

.ref-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.ref-hotness {
  color: #ff9f43;
}
.ref-date {
  color: rgba(255, 255, 255, 0.4);
}

.ref-status-badge {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}

/* Status colors mapping */
.ref-status-badge.status-pending {
  border-color: #3b82f6;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
}
.ref-status-badge.status-contacted {
  border-color: #fbbf24;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}
.ref-status-badge.status-negotiation {
  border-color: #a855f7;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.08);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.15);
}
.ref-status-badge.status-acquired {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}
.ref-status-badge.status-rejected {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}
.ref-status-badge.status-sold {
  border-color: #14b8a6;
  color: #14b8a6;
  background: rgba(20, 184, 166, 0.08);
  box-shadow: 0 0 8px rgba(20, 184, 166, 0.15);
}
.ref-status-badge.status-orphan {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
  animation: orphanPulse 2.5s ease-in-out infinite;
}
@keyframes orphanPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(245, 158, 11, 0.15); }
  50% { box-shadow: 0 0 14px rgba(245, 158, 11, 0.35); }
}

/* Referral detail view elements */
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.95rem;
  color: var(--text-light);
}

.detail-val {
  font-size: 0.95rem;
  font-weight: 600;
  text-align: right;
}

.whatsapp-btn {
  background: #25d366;
  color: white;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  transition: all 0.25s ease;
}
.whatsapp-btn:hover {
  background: #1fb855;
  transform: translateY(-1px);
}

.call-btn {
  background: #3b82f6;
  color: white;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  transition: all 0.25s ease;
}
.call-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

/* Timeline Notes */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary) 0%, rgba(255, 255, 255, 0.06) 100%);
}

.timeline-item {
  display: flex;
  gap: 16px;
  position: relative;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #1a1f36;
  box-shadow: 0 0 8px rgba(214, 25, 32, 0.3);
  margin-top: 4px;
  z-index: 2;
}

.timeline-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.timeline-body {
  font-size: 0.95rem;
}

/* ============================================================

/* ============================================================
   PRIZE SHOP
   ============================================================ */
.prizes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.prize-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 16px;
  align-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}

/* Gradient left border */
.prize-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary) 0%, rgba(214, 25, 32, 0.2) 100%);
  border-radius: 4px 0 0 4px;
  z-index: 2;
}

/* Subtle shimmer on hover */
.prize-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0) 50%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 1;
}

.prize-card:hover::after {
  opacity: 1;
}

.prize-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 15px rgba(214, 25, 32, 0.08);
}

.prize-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(214,25,32,0.15) 0%, rgba(255,100,100,0.08) 100%);
  font-size: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prize-details {
  flex: 1;
}

.prize-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.prize-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 2px;
}

.badge-vat-warn {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--warning);
  background: var(--warning-bg);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin: 4px 0;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-vat-ok {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--success);
  background: var(--success-bg);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin: 4px 0;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.prize-cost {
  font-size: 1rem;
  font-weight: 900;
  color: #ff5e62;
  margin-top: 4px;
  text-shadow: 0 0 10px rgba(255, 94, 98, 0.2);
}

.btn-redeem {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-inverse);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all var(--dur) var(--ease);
}
.btn-redeem:hover {
  background: var(--accent);
  transform: translateY(-1px);
}
.btn-redeem:disabled {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  cursor: not-allowed;
}

/* ============================================================

/* ============================================================
   ADMIN / MANAGER DASHBOARD
   ============================================================ */
.stats-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0.5;
}

.stat-box:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
}

.stat-val {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.stat-lbl {
  font-size: 0.82rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ============================================================
   BOTTOM NAVIGATION BAR
   ============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 100%;
  max-width: 600px;
  height: 68px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-sizing: border-box;
  background: #080d19;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #64748b;
  cursor: pointer;
  transition: color var(--dur) var(--ease);
  flex: 1;
  position: relative;
  padding: 8px 0;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur) var(--ease);
}
.nav-icon svg {
  color: #64748b;
  transition: color var(--dur) var(--ease);
}

.nav-item span:last-child {
  font-size: 0.78rem;
  font-weight: 600;
  transition: color var(--dur) var(--ease);
}

.nav-item.active {
  color: #ffffff;
}
.nav-item.active .nav-icon {
  transform: translateY(-2px);
}
.nav-item.active .nav-icon svg {
  color: var(--primary);
}

/* Static clean pill indicator */
.nav-item.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  width: 60%;
  height: 3px;
  background: var(--primary);
  border-radius: 99px;
}

/* Active background pill behind icon */
.nav-item.active::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(214, 25, 32, 0.12);
  z-index: -1;
}

/* Back button â€” glassmorphic pill */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  margin-bottom: 16px;
  padding: 8px 18px 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.btn-back svg {
  transition: transform 0.3s var(--ease);
  opacity: 0.7;
}
.btn-back:hover {
  background: rgba(214, 25, 32, 0.1);
  border-color: rgba(214, 25, 32, 0.3);
  color: var(--primary-light);
  box-shadow: 0 4px 16px rgba(214, 25, 32, 0.15);
  transform: translateX(-3px);
}
.btn-back:hover svg {
  transform: translateX(-3px);
  opacity: 1;
}

/* ============================================================
   SHOP & ACTIVITY FILTER BAR

/* ============================================================
   LEVEL PROGRESS BAR
   ============================================================ */
.level-progress-container {
  margin-bottom: 20px;
  padding: 0 4px;
}

.level-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.level-current {
  color: #94a3b8;
}

.level-next {
  color: var(--text-light);
  font-weight: 500;
}

.level-progress-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  margin-bottom: 10px;
}

.level-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), #fbbf24);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(214, 25, 32, 0.3);
}

.level-progress-dots {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}

.level-dot {
  font-size: 1rem;
  opacity: 0.3;
  transition: opacity 0.2s ease;
}

.level-dot.done {
  opacity: 1;
}

/* ============================================================

/* ============================================================
/* ============================================================
   VERTICAL STORYLINE (Vertical Progress in Detail Modal)
   ============================================================ */
.vertical-storyline {
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 16px 0;
  padding-left: 8px;
}

.story-step {
  display: flex;
  position: relative;
  padding-bottom: 22px;
}

.story-step:last-child {
  padding-bottom: 0;
}

/* Vertical connecting line */
.story-step::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 36px;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
}

.story-step:last-child::before {
  display: none;
}

.story-step.done::before {
  background: var(--success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.3);
}

.story-step.active::before {
  background: linear-gradient(180deg, var(--primary), rgba(255, 255, 255, 0.08));
}

.story-node {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  z-index: 2;
  transition: all var(--dur) var(--ease);
}

.story-step.done .story-node {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--success);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.story-step.active .story-node {
  background: rgba(214, 25, 32, 0.18);
  border-color: var(--primary);
  box-shadow: 0 0 14px rgba(214, 25, 32, 0.4);
}

.story-step.rejected .story-node {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
}

.story-body {
  flex: 1;
  margin-left: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.story-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.story-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #94a3b8;
}

.story-step.done .story-title {
  color: #ffffff;
}

.story-step.active .story-title {
  color: #ff5e62;
  font-weight: 800;
}

.story-step.rejected .story-title {
  color: #ef4444;
}

.story-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
}

.story-step.done .story-badge {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.story-step.active .story-badge {
  background: rgba(214, 25, 32, 0.15);
  color: #ff5e62;
  border: 1px solid rgba(214, 25, 32, 0.3);
}

.story-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 2px;
  line-height: 1.3;
}

.story-reward {
  font-size: 0.75rem;
  font-weight: 700;
  color: #facc15;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Action button variants */
.map-btn {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 14px;
  transition: all var(--dur) var(--ease);
}
.map-btn:hover {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

/* Management Status Button Grid */
.mgmt-status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}

@media (min-width: 480px) {
  .mgmt-status-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mgmt-status-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  text-align: center;
}

.mgmt-status-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.mgmt-status-btn.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #60a5fa;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.mgmt-status-btn.active.status-contacted,
.mgmt-status-btn.active.status-acquired {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--success);
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
  font-weight: 800;
}

.mgmt-status-btn.completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-weight: 700;
}

.mgmt-status-btn.completed:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
  color: #ffffff;
}

.mgmt-status-btn.active.status-sold {
  background: rgba(234, 179, 8, 0.2);
  border-color: #facc15;
  color: #facc15;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.4);
  font-weight: 800;
}

.mgmt-status-btn.active.status-rejected {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--danger);
  color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
  font-weight: 800;
}

/* Management Agent Card */
.mgmt-agent-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px;
  margin-top: 6px;
  transition: all var(--dur) var(--ease);
}

.mgmt-agent-preview {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

.mgmt-agent-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mgmt-agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.mgmt-agent-info {
  flex: 1 1 auto;
  min-width: 0;
}

.mgmt-agent-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mgmt-agent-role {
  font-size: 0.76rem;
  color: var(--text-light);
}

.mgmt-agent-change-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

.mgmt-agent-change-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================================

/* ============================================================
   NOTIFICATION BADGE
   ============================================================ */
.nav-item {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 50%;
  transform: translateX(14px);
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: badgePulse 2s ease-in-out infinite;
  z-index: 10;
}

@keyframes badgePulse {
  0%, 100% { transform: translateX(14px) scale(1); }
  50% { transform: translateX(14px) scale(1.15); }
}

/* ============================================================
   APP FOOTER — Agency Info + palota79 Branding
   ============================================================ */
.app-footer-info {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  padding: 0 16px;
}

.app-footer-brand {
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  padding: 16px 16px 24px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.app-footer-logo {
  height: 26px;
  width: auto;
  margin-right: 6px;
  opacity: 0.9;
}

.app-footer-brand span:first-child {
  color: #facc15;
  font-weight: 700;
}

.app-footer-brand strong {
  color: rgba(255, 255, 255, 0.6);
}

.app-footer-brand a,
.footer-contact-link {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

.app-footer-brand a:hover,
.footer-contact-link:hover {
  color: #fff;
  text-decoration: underline;
}

.app-footer-version {
  margin-top: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.05em;
}
