/* ═══════════════════════════════════════════════════
   Arain Shadi - Premium CSS
   Mobile First | Muzz/Tinder Inspired Design
═══════════════════════════════════════════════════ */

:root {
  --primary:      #c8274a;
  --primary-dark: #9e1d38;
  --primary-light:#f7d0d8;
  --gold:         #f5a623;
  --gold-dark:    #d4880f;
  --dark:         #1a1a2e;
  --darker:       #0f0f1a;
  --surface:      #ffffff;
  --surface2:     #f8f9fa;
  --text:         #2c2c3e;
  --text-muted:   #8e8ea0;
  --border:       #e8e8f0;
  --online:       #22c55e;
  --shadow-sm:    0 2px 8px rgba(0,0,0,.06);
  --shadow-md:    0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.14);
  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-xl:    32px;
  --transition:   all .25s cubic-bezier(.4,0,.2,1);
  --navbar-h:     64px;
  --bottom-nav-h: 68px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--surface2);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── Gradient Backgrounds ── */
.bg-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--primary-dark) 50%, #6b1a2e 100%);
}
.bg-primary-grad {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.bg-gold-grad {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
}

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.3; }
.text-primary { color: var(--primary) !important; }
.text-gold    { color: var(--gold) !important; }
.text-muted   { color: var(--text-muted) !important; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ══════════════════════════════
   NAVBAR
══════════════════════════════ */
.site-navbar {
  height: var(--navbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.navbar-brand img { height: 38px; }
.navbar-brand .brand-text {
  font-size: 1.3rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

/* ══════════════════════════════
   BOTTOM NAVIGATION (Mobile)
══════════════════════════════ */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: .72rem; font-weight: 500;
  transition: var(--transition);
  position: relative;
}
.bottom-nav a i { font-size: 1.35rem; }
.bottom-nav a.active,
.bottom-nav a:hover { color: var(--primary); }
.bottom-nav a .badge-dot {
  position: absolute; top: 6px; right: calc(50% - 14px);
  width: 8px; height: 8px;
  background: var(--primary); border-radius: 50%;
  border: 2px solid var(--surface);
}

@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  body { padding-bottom: var(--bottom-nav-h); }
  .site-navbar .desktop-nav { display: none !important; }
}

/* ══════════════════════════════
   CARDS
══════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 1.5rem; }

/* Profile Card */
.profile-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 3/4;
  background: var(--dark);
}
.profile-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.profile-card:hover img { transform: scale(1.04); }
.profile-card .card-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, transparent 100%);
  padding: 2rem 1.2rem 1.2rem;
  color: #fff;
}
.profile-card .card-overlay h5 { font-size: 1.1rem; font-weight: 700; margin-bottom: 2px; }
.profile-card .card-overlay small { opacity: .85; font-size: .82rem; }
.profile-card .quick-actions {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.profile-card .online-dot {
  position: absolute; top: 12px; left: 12px;
  width: 12px; height: 12px;
  background: var(--online);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

/* ── Badge Gold ── */
.badge-gold {
  display: inline-flex; align-items: center; gap: 4px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem; font-weight: 700;
  box-shadow: 0 2px 8px rgba(245,166,35,.35);
}
.badge-free {
  display: inline-flex; align-items: center;
  background: var(--border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem; font-weight: 600;
}

/* ══════════════════════════════
   SWIPE SYSTEM
══════════════════════════════ */
.swipe-container {
  position: relative;
  width: 100%; max-width: 400px;
  margin: 0 auto;
  height: 520px;
}
.swipe-card {
  position: absolute;
  width: 100%; height: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--dark);
  box-shadow: var(--shadow-lg);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow .2s;
}
.swipe-card:active { cursor: grabbing; }
.swipe-card img {
  width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
}
.swipe-card .swipe-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.9) 0%, transparent 60%);
  padding: 2.5rem 1.5rem 1.5rem;
  color: #fff;
}
.swipe-card .swipe-overlay h3 { font-size: 1.5rem; }
.swipe-card .swipe-overlay p  { font-size: .9rem; opacity: .85; }

/* Stamp overlays */
.stamp-like, .stamp-nope {
  position: absolute; top: 40px;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 2rem; font-weight: 900;
  letter-spacing: 2px;
  opacity: 0; transition: opacity .15s;
  pointer-events: none;
  border-width: 4px; border-style: solid;
}
.stamp-like {
  left: 20px; color: #22c55e; border-color: #22c55e;
  transform: rotate(-15deg);
}
.stamp-nope {
  right: 20px; color: #ef4444; border-color: #ef4444;
  transform: rotate(15deg);
}

.swipe-buttons {
  display: flex; justify-content: center;
  align-items: center; gap: 1.5rem;
  margin-top: 1.5rem;
}
.swipe-btn {
  width: 60px; height: 60px;
  border-radius: 50%;
  border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.swipe-btn-pass  { background: var(--surface); color: #ef4444; }
.swipe-btn-like  { background: var(--surface); color: #22c55e; }
.swipe-btn-super { background: var(--surface); color: var(--gold); }
.swipe-btn:hover { transform: scale(1.12); }

/* ══════════════════════════════
   FORMS
══════════════════════════════ */
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  font-size: .95rem;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200,39,74,.12);
  outline: none;
}
.form-label { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  border-radius: var(--radius-sm);
  padding: .75rem 2rem;
  font-weight: 700; font-size: 1rem;
  color: #fff;
  transition: var(--transition);
  cursor: pointer;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,39,74,.35);
  background: linear-gradient(135deg, var(--primary-dark), #7a1228);
  color: #fff;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none;
  border-radius: var(--radius-sm);
  padding: .75rem 2rem;
  font-weight: 700; color: #fff;
  transition: var(--transition);
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,166,35,.4); color: #fff; }
.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  border-radius: var(--radius-sm);
  padding: .7rem 1.8rem;
  font-weight: 600;
  transition: var(--transition);
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

/* ══════════════════════════════
   CHAT
══════════════════════════════ */
.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - var(--navbar-h));
}
@media (max-width: 768px) {
  .chat-layout { grid-template-columns: 1fr; }
  .chat-sidebar { display: none; }
  .chat-sidebar.active { display: flex; flex-direction: column; }
  .chat-main.hidden { display: none; }
}
.chat-sidebar {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: var(--surface);
  display: flex; flex-direction: column;
}
.chat-thread {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}
.chat-thread:hover, .chat-thread.active { background: var(--primary-light); }
.chat-thread img {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.chat-thread .thread-info { flex: 1; min-width: 0; }
.chat-thread .thread-name { font-weight: 700; font-size: .9rem; }
.chat-thread .thread-preview { font-size: .82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread .thread-time  { font-size: .75rem; color: var(--text-muted); flex-shrink: 0; }

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: 1rem;
  display: flex; flex-direction: column; gap: .75rem;
}
.msg-bubble {
  max-width: 70%;
  padding: .6rem 1rem;
  border-radius: var(--radius-md);
  font-size: .92rem;
  line-height: 1.5;
  position: relative;
}
.msg-bubble.sent {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-bubble.received {
  align-self: flex-start;
  background: var(--surface2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.msg-bubble .msg-time { font-size: .7rem; opacity: .7; margin-top: 4px; text-align: right; }
.chat-input-bar {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex; gap: 8px; align-items: center;
}
.chat-input-bar textarea {
  flex: 1; border-radius: var(--radius-xl);
  padding: .6rem 1rem;
  resize: none; max-height: 100px;
  border: 1.5px solid var(--border);
  font-size: .93rem;
}
.chat-input-bar textarea:focus { outline: none; border-color: var(--primary); }

/* ══════════════════════════════
   DASHBOARD
══════════════════════════════ */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem;
}
.stat-card .stat-number { font-size: 2rem; font-weight: 800; }
.stat-card .stat-label  { color: var(--text-muted); font-size: .85rem; font-weight: 500; }

/* ══════════════════════════════
   ADMIN SIDEBAR
══════════════════════════════ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; flex-shrink: 0;
  background: var(--darker);
  color: #fff;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.admin-sidebar .sidebar-brand {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-size: 1.2rem; font-weight: 800;
}
.admin-sidebar .sidebar-brand span {
  background: linear-gradient(135deg, var(--primary), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 12px;
  padding: .75rem 1.5rem;
  color: rgba(255,255,255,.65);
  font-size: .9rem; font-weight: 500;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  background: rgba(255,255,255,.06);
  color: #fff;
  border-left-color: var(--primary);
}
.admin-sidebar nav a i { width: 20px; text-align: center; font-size: 1rem; }
.admin-content { flex: 1; overflow-x: hidden; background: var(--surface2); }
@media (max-width: 992px) {
  .admin-sidebar { display: none; }
  .admin-sidebar.open { display: flex; position: fixed; z-index: 2000; }
}

/* ══════════════════════════════
   MEMBERSHIP / GOLD
══════════════════════════════ */
.membership-card {
  background: linear-gradient(135deg, #1a1a2e 0%, #3d1a0a 50%, #2d0e1a 100%);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.membership-card::before {
  content: '';
  position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(245,166,35,.25) 0%, transparent 70%);
  border-radius: 50%;
}
.membership-card .price { font-size: 3rem; font-weight: 900; color: var(--gold); }
.membership-card .price span { font-size: 1rem; font-weight: 400; opacity: .8; }

.feature-list li {
  padding: .5rem 0;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li i { color: var(--primary); width: 20px; }

/* ══════════════════════════════
   PROFILE PAGE
══════════════════════════════ */
.profile-hero {
  position: relative;
  height: 320px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.profile-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.profile-hero .profile-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
  color: #fff;
}
.profile-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 4px solid var(--surface);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.gallery-grid img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.gallery-grid img:hover { transform: scale(1.03); }

/* ══════════════════════════════
   NOTIFICATIONS
══════════════════════════════ */
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  cursor: pointer;
}
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: var(--primary-light); }
.notif-item img {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.notif-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}

/* ══════════════════════════════
   HERO / AUTH
══════════════════════════════ */
.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px;
}
.hero-section {
  min-height: 100vh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  filter: brightness(.35);
}

/* ══════════════════════════════
   UTILITIES
══════════════════════════════ */
.online-indicator {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--online);
  border-radius: 50%;
  border: 2px solid var(--surface);
  flex-shrink: 0;
}
.rounded-pill { border-radius: 50rem !important; }
.shadow-soft  { box-shadow: var(--shadow-sm) !important; }
.shadow-card  { box-shadow: var(--shadow-md) !important; }

/* Loader spinner */
.spinner-ring {
  width: 40px; height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Page loader */
#page-loader {
  position: fixed; inset: 0;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity .4s;
}
#page-loader.hidden { opacity: 0; pointer-events: none; }

/* ══════════════════════════════
   ANIMATIONS
══════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp .5s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* ══════════════════════════════
   MODAL PREMIUM
══════════════════════════════ */
.modal-premium .modal-content {
  border: none;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.modal-premium .modal-header {
  background: linear-gradient(135deg, var(--dark), var(--primary-dark));
  color: #fff; border: none;
  padding: 1.5rem 2rem;
}

/* ══════════════════════════════
   SEARCH PAGE
══════════════════════════════ */
.filter-sidebar {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border);
  position: sticky; top: calc(var(--navbar-h) + 1rem);
}
.filter-group { margin-bottom: 1.25rem; }
.filter-group label { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: .5rem; display: block; }

/* ══════════════════════════════
   RESPONSIVE HELPERS
══════════════════════════════ */
@media (max-width: 576px) {
  .auth-card { padding: 1.75rem 1.25rem; border-radius: var(--radius-lg); }
  .swipe-container { height: 460px; }
  .chat-layout { height: calc(100vh - var(--navbar-h) - var(--bottom-nav-h)); }
}

/* PWA full screen */
@media (display-mode: standalone) {
  .site-navbar { padding-top: env(safe-area-inset-top); height: calc(var(--navbar-h) + env(safe-area-inset-top)); }
  body { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
}


/* ═══════════════════════════════════════════════
   PWA INSTALL BANNER
═══════════════════════════════════════════════ */

#pwa-install-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 10000;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  will-change: transform;
}

#pwa-install-banner.pwa-banner-visible {
  transform: translateY(0);
}

.pwa-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-top: 3px solid var(--primary, #c8274a);
  box-shadow: 0 -4px 24px rgba(0,0,0,.15);
  padding: 14px 16px;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

/* Push above bottom nav on mobile */
@media (max-width: 768px) {
  #pwa-install-banner { bottom: 65px; }
  #pwa-install-banner .pwa-banner-inner {
    padding-bottom: 14px;
  }
}

.pwa-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

.pwa-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pwa-text strong {
  font-size: .88rem;
  color: #1a1a2e;
  line-height: 1.3;
}

.pwa-text span {
  font-size: .75rem;
  color: #888;
  margin-top: 2px;
}

.pwa-install-btn {
  background: var(--primary, #c8274a);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 8px 16px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(200,39,74,.35);
}

.pwa-install-btn:active { transform: scale(.95); }

.pwa-close-btn {
  background: none; border: none;
  color: #aaa; font-size: 1rem;
  cursor: pointer; padding: 4px 6px;
  flex-shrink: 0;
}

/* iOS Guide Modal */
.ios-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 10001;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}

.ios-modal-card {
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 1.5rem;
  width: 100%; max-width: 500px;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0));
}

.ios-modal-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 1.5rem;
}

.ios-modal-header div {
  flex: 1;
  display: flex; flex-direction: column;
}

.ios-modal-header strong { font-size: 1rem; color: #1a1a2e; }
.ios-modal-header span { font-size: .8rem; color: #888; }
.ios-modal-header button { background:none;border:none;font-size:1.2rem;color:#aaa;cursor:pointer;padding:4px }

.ios-steps { display: flex; flex-direction: column; gap: 16px; }

.ios-step {
  display: flex; align-items: center; gap: 14px;
  background: #fafafa; border-radius: 12px; padding: 14px;
  font-size: .9rem; color: #333;
}

.ios-step-num {
  width: 32px; height: 32px;
  background: var(--primary, #c8274a);
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem; flex-shrink: 0;
}

/* Download button in navbar (desktop) */
.btn-install-pwa {
  background: linear-gradient(135deg, #c8274a, #8a1730);
  color: #fff !important;
  border: none;
  border-radius: 50px;
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(200,39,74,.35);
}
.btn-install-pwa:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(200,39,74,.4); }
.btn-install-pwa:active { transform: scale(.96); }

/* Already installed check */
@media (display-mode: standalone) {
  #pwa-install-banner { display: none !important; }
  .pwa-install-only { display: none !important; }
}


/* ═══════════════════════════════════════════════
   AUTH PAGES (Login / Register)
═══════════════════════════════════════════════ */
.auth-page {
  min-height: calc(100vh - var(--navbar-h));
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #fde8ed 100%);
  padding: 1.5rem 0;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.10);
  border: 1px solid var(--border);
}

@media (max-width: 575px) {
  .auth-card { padding: 1.5rem; border-radius: 16px; }
  .auth-page { padding: 1rem 0; align-items: flex-start; padding-top: .5rem; }
}

/* ═══════════════════════════════════════════════
   MAIN CONTENT spacing
═══════════════════════════════════════════════ */
.main-content {
  min-height: calc(100vh - var(--navbar-h));
}

/* Hide page-loader if it doesn't exist */
#page-loader { display: none !important; }

/* fw helpers */
.fw-800 { font-weight: 800 !important; }
.fw-700 { font-weight: 700 !important; }
.fw-600 { font-weight: 600 !important; }

/* stat-card helper */
.stat-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
