/* PuppyPay pages — restored */

.auth-header {
  padding: 44px 24px 20px;
  text-align: center;
}
.auth-header .logo { justify-content: center; margin-bottom: 20px; }
.auth-header h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 4px;
}
.auth-header p { color: var(--text-secondary); font-size: 14px; }

.auth-card {
  margin: 0 20px 24px;
  padding: 24px 20px;
  border-radius: var(--r-xl);
}

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.auth-switch a {
  color: var(--accent);
  font-weight: 600;
  margin-left: 4px;
  cursor: pointer;
}
.forgot-link { text-align: right; margin: -4px 0 16px; }
.forgot-link a {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  cursor: pointer;
}

#loginView,
#registerView,
#forgotView {
  background: url("../assets/bg-login.jpg") center center / cover no-repeat !important;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
#loginView::before,
#registerView::before,
#forgotView::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.32);
  z-index: 0;
  pointer-events: none;
}
#loginView > *,
#registerView > *,
#forgotView > * {
  position: relative;
  z-index: 1;
}
#loginView .auth-header,
#registerView .auth-header,
#forgotView .auth-header { padding-top: 52px; }
#loginView .auth-header h1,
#registerView .auth-header h1,
#forgotView .auth-header h1,
#loginView .auth-header .logo-text,
#registerView .auth-header .logo-text,
#forgotView .auth-header .logo-text {
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
#loginView .auth-header p,
#registerView .auth-header p,
#forgotView .auth-header p {
  color: rgba(255,255,255,0.88) !important;
}
#loginView .auth-card,
#registerView .auth-card,
#forgotView .auth-card {
  background: rgba(255,255,255,0.14) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255,255,255,0.28) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28) !important;
  border-radius: 24px !important;
  margin: 0 18px 28px !important;
}
#loginView .auth-card label,
#registerView .auth-card label,
#forgotView .auth-card label {
  color: rgba(255,255,255,0.92) !important;
}
#loginView .input-shell,
#registerView .input-shell,
#forgotView .input-shell {
  background: rgba(255,255,255,0.18) !important;
  border: 1px solid rgba(255,255,255,0.32) !important;
}
#loginView .input-shell:focus-within,
#registerView .input-shell:focus-within,
#forgotView .input-shell:focus-within {
  background: rgba(255,255,255,0.25) !important;
  border-color: rgba(134,239,172,0.6) !important;
  box-shadow: 0 0 0 3px rgba(134,239,172,0.2) !important;
}
#loginView .input-shell input,
#registerView .input-shell input,
#forgotView .input-shell input { color: #fff !important; }
#loginView .input-shell input::placeholder,
#registerView .input-shell input::placeholder,
#forgotView .input-shell input::placeholder {
  color: rgba(255,255,255,0.5) !important;
}
#loginView .input-shell .icon,
#registerView .input-shell .icon,
#forgotView .input-shell .icon {
  color: rgba(255,255,255,0.7) !important;
}
#loginView .auth-switch,
#registerView .auth-switch,
#forgotView .auth-switch {
  color: rgba(255,255,255,0.85) !important;
}
#loginView .auth-switch a,
#registerView .auth-switch a,
#forgotView .auth-switch a {
  color: #86efac !important;
  font-weight: 700;
}
#loginView .forgot-link a,
#registerView .forgot-link a,
#forgotView .forgot-link a {
  color: rgba(255,255,255,0.9) !important;
}
#loginView .btn-primary,
#registerView .btn-primary,
#forgotView .btn-primary {
  background: linear-gradient(180deg, #4ade80, #16a34a) !important;
  box-shadow: 0 8px 22px rgba(22,163,74,0.45) !important;
  border: none !important;
  color: #fff !important;
}
#loginView .pill-btn,
#registerView .pill-btn,
#forgotView .pill-btn {
  background: rgba(255,255,255,0.22) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
}

body:has(#loginView.active) .support-fab,
body:has(#registerView.active) .support-fab,
body:has(#forgotView.active) .support-fab,
html:not(.has-token) .support-fab {
  display: none !important;
}

.home-header {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 100px;
  min-height: 200px;
  flex-shrink: 0;
  border-radius: 0 0 32px 32px;
  background: url("../assets/home-header.jpg") center center / cover no-repeat;
}
.home-header .deco {
  position: absolute;
  top: -50px; right: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}
.home-header .deco2 {
  position: absolute;
  bottom: 20px; left: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}
.home-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.home-top .logo-text { color: #fff; }
.home-greeting {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  color: #c7d7f5;
  font-size: 14px;
  font-weight: 600;
}
.home-greeting span { color: #fff; }
.avatar-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.12);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 0;
}
.avatar-btn svg { width: 20px; height: 20px; }

.balance-card {
  position: relative;
  z-index: 5;
  margin: -72px 16px 0;
  background: linear-gradient(160deg, #ffffff 0%, #eff6ff 40%, #dbeafe 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid #93c5fd;
  border-radius: 22px;
  padding: 20px 18px;
  box-shadow:
    0 16px 40px rgba(37, 99, 235, .16),
    0 4px 12px rgba(30, 58, 138, .08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  flex-shrink: 0;
}
.balance-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.balance-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.balance-amount {
  flex: 1;
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.eye-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15,23,42,.06);
}
.eye-btn svg { width: 17px; height: 17px; }

.carousel-wrap {
  padding: 16px 16px 0;
  margin-bottom: 4px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.carousel {
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  border: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  height: 132px;
  width: 100%;
}
.carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .4s ease;
}
.carousel-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  background: #0f172a;
}
.carousel-slide img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%) scale(1.02);
  display: block;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.carousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all .2s;
}
.carousel-dot.active {
  background: var(--accent);
  width: 16px;
  border-radius: 4px;
}

/* ===== Home stats — mixed premium cards ===== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 16px 0;
  flex-shrink: 0;
}
.stat-card {
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 82px;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.1);
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  pointer-events: none;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.stat-value {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.02em;
  position: relative;
  z-index: 1;
}

/* 1 Complete Orders — deep navy */
.stats-grid .stat-card:nth-child(1) {
  background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 55%, #2563eb 100%);
  border-color: rgba(147, 197, 253, 0.25);
  box-shadow: 0 10px 24px rgba(30, 58, 138, 0.28);
}
.stats-grid .stat-card:nth-child(1) .stat-label { color: rgba(255,255,255,0.72); }
.stats-grid .stat-card:nth-child(1) .stat-value { color: #fff; }

/* 2 Today's Buying — cool cyan */
.stats-grid .stat-card:nth-child(2) {
  background: linear-gradient(145deg, #ecfeff 0%, #a5f3fc 45%, #22d3ee 100%);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.18);
}
.stats-grid .stat-card:nth-child(2) .stat-label { color: #0e7490; }
.stats-grid .stat-card:nth-child(2) .stat-value { color: #083344; }

/* 3 Today's Sold — emerald */
.stats-grid .stat-card:nth-child(3) {
  background: linear-gradient(145deg, #ecfdf5 0%, #6ee7b7 50%, #10b981 100%);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.18);
}
.stats-grid .stat-card:nth-child(3) .stat-label { color: #047857; }
.stats-grid .stat-card:nth-child(3) .stat-value { color: #064e3b; }

/* 4 Orders Today — violet */
.stats-grid .stat-card:nth-child(4) {
  background: linear-gradient(145deg, #1e1b4b 0%, #5b21b6 55%, #8b5cf6 100%);
  border-color: rgba(196, 181, 253, 0.3);
  box-shadow: 0 10px 24px rgba(91, 33, 182, 0.28);
}
.stats-grid .stat-card:nth-child(4) .stat-label { color: rgba(255,255,255,0.72); }
.stats-grid .stat-card:nth-child(4) .stat-value { color: #fff; }

/* ===== Summary chips — mixed ===== */
.summary-row {
  display: flex;
  gap: 10px;
  padding: 12px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
  min-height: 72px;
}
.summary-row::-webkit-scrollbar { display: none; }
.summary-chip {
  flex: 1;
  min-width: 100px;
  min-height: 68px;
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.summary-chip .label {
  font-size: 11px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.summary-chip .value {
  font-size: 14px;
  font-weight: 800;
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* Total Deposit — soft mint */
.summary-row .summary-chip:nth-child(1) {
  background: linear-gradient(160deg, #f0fdf4 0%, #bbf7d0 50%, #4ade80 100%);
  border-color: rgba(34, 197, 94, 0.3);
}
.summary-row .summary-chip:nth-child(1) .label { color: #166534; }
.summary-row .summary-chip:nth-child(1) .value { color: #14532d; }

/* Total Withdraw — soft rose */
.summary-row .summary-chip:nth-child(2) {
  background: linear-gradient(160deg, #fff1f2 0%, #fecdd3 50%, #fb7185 100%);
  border-color: rgba(244, 63, 94, 0.28);
}
.summary-row .summary-chip:nth-child(2) .label { color: #9f1239; }
.summary-row .summary-chip:nth-child(2) .value { color: #881337; }

/* Referral Income — amber gold */
.summary-row .summary-chip:nth-child(3) {
  background: linear-gradient(160deg, #fffbeb 0%, #fde68a 50%, #f59e0b 100%);
  border-color: rgba(245, 158, 11, 0.35);
}
.summary-row .summary-chip:nth-child(3) .label { color: #92400e; }
.summary-row .summary-chip:nth-child(3) .value { color: #78350f; }

.action-row {
  display: flex;
  gap: 12px;
  padding: 16px 16px 8px;
  flex-shrink: 0;
}
.action-row .btn {
  flex: 1;
  height: 52px;
  border-radius: 16px;
  font-weight: 800;
}

.support-fab {
  position: fixed;
  bottom: 92px;
  right: 16px;
  width: 44px; height: 44px;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 0;
}
.support-fab img {
  width: 40px; height: 40px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
body:has(#homeView.active) .support-fab {
  display: flex !important;
}
@media (min-width: 431px) {
  .support-fab { right: calc(50% - 215px + 16px); }
}

.page-header {
  padding: 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.page-header h2 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.back-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  box-shadow: 0 1px 3px rgba(15,23,42,.05);
}
.back-btn svg { width: 18px; height: 18px; }
.page-content {
  padding: 16px 16px 24px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.referral-hero {
  background: linear-gradient(160deg, #ffffff 0%, #eff6ff 40%, #dbeafe 100%);
  border: 1.5px solid #93c5fd;
  border-radius: var(--r-xl);
  padding: 22px;
  margin-bottom: 16px;
  text-align: center;
}
.referral-code-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 12px 0;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: var(--r-md);
  padding: 12px 16px;
}
.referral-code-box .code {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--accent);
}
.copy-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  margin-bottom: 16px;
  border-radius: var(--r-lg);
}
.profile-info h3 { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.profile-info p { font-size: 13px; color: var(--text-muted); }
.menu-list { display: flex; flex-direction: column; gap: 2px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.menu-item .menu-icon {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.menu-item .menu-icon svg { width: 18px; height: 18px; }
.menu-item .arrow {
  margin-left: auto;
  color: var(--text-muted);
  width: 16px; height: 16px;
}

.eligibility-note {
  background: var(--accent-soft);
  border: 1px solid #dbeafe;
  border-radius: var(--r-md);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.pp-card { perspective: 1000px; margin-bottom: 16px; }
.pp-card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586;
  transition: transform .5s;
  transform-style: preserve-3d;
  cursor: pointer;
}
.pp-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}
.pp-card-front {
  background: linear-gradient(145deg, #1e3a8a 0%, #1e40af 40%, #2563eb 100%);
}
.pp-card-back {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  transform: rotateY(180deg);
}
.card-chip {
  width: 42px; height: 30px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 6px;
}
.card-number {
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: .1em;
}
.card-name {
  font-size: 12px;
  font-weight: 650;
  text-transform: uppercase;
}
.card-expiry { font-size: 12px; opacity: .85; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .4s ease, visibility .4s ease;
}
.splash.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-inner { text-align: center; }
.splash-logo-wrap { width: 88px; height: 88px; margin: 0 auto 16px; }
.splash-logo { width: 80px; height: 80px; margin: 0 auto; border-radius: 20px; }
.splash-brand {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 4px;
}
.splash-tag {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 24px;
}
.splash-paws {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.splash-paws span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
  animation: dotPulse 1s ease-in-out infinite;
}
.splash-paws span:nth-child(2) { animation-delay: .15s; }
.splash-paws span:nth-child(3) { animation-delay: .3s; }
@keyframes dotPulse {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; background: var(--accent); }
}

#ordersView,
#mineView,
#teamView {
  background: var(--bg) !important;
}
#ordersView > .page-header,
#mineView > .page-header,
#teamView > .page-header {
  background: rgba(240, 244, 248, 0.92) !important;
  border-bottom-color: rgba(226, 232, 240, 0.8);
}
#ordersView > .page-content,
#mineView > .page-content,
#teamView > .page-content {
  flex: 1 1 auto !important;
  flex-shrink: 1 !important;
  min-height: 0 !important;
  background: transparent !important;
  padding-bottom: 12px !important;
}
#ordersView > .nav-spacer,
#mineView > .nav-spacer,
#teamView > .nav-spacer {
  height: 96px !important;
  min-height: 96px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  flex-shrink: 0 !important;
}
#ordersView .empty-state,
#mineView .empty-state,
#teamView .empty-state {
  background: transparent !important;
}
