:root {
  --bg: #070b12;
  --surface: #0e1623;
  --surface-2: #152134;
  --surface-glass: rgba(14, 22, 35, 0.86);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #f5b731;
  --accent-2: #10b981;
  --accent-glow: rgba(245, 183, 49, 0.34);
  --tg-blue: #229ed9;
  --tg-blue-2: #1682b7;
  --danger: #ef4444;
  --success: #10b981;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

[data-theme="emerald-gold"] {
  --bg: #070b12;
  --surface: #0d1620;
  --surface-2: #132230;
  --accent: #f5b731;
  --accent-2: #10b981;
  --accent-glow: rgba(245, 183, 49, 0.32);
}

[data-theme="royal-blue"] {
  --bg: #050a18;
  --surface: #0b1429;
  --surface-2: #112040;
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --accent-glow: rgba(56, 189, 248, 0.34);
}

[data-theme="crimson-sport"] {
  --bg: #0d0609;
  --surface: #180c12;
  --surface-2: #26121b;
  --accent: #f43f5e;
  --accent-2: #f59e0b;
  --accent-glow: rgba(244, 63, 94, 0.34);
}

[data-theme="cyber-violet"] {
  --bg: #090612;
  --surface: #130e24;
  --surface-2: #1c1534;
  --accent: #a855f7;
  --accent-2: #06b6d4;
  --accent-glow: rgba(168, 85, 247, 0.34);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background-image:
    radial-gradient(ellipse 80% 45% at 50% 0%, rgba(16, 185, 129, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 35% at 85% 12%, rgba(245, 183, 49, 0.08), transparent 65%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

/* Boot Loader */
.app-booting {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.boot-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile-First Shell Frame */
.mobile-shell {
  width: 100%;
  max-width: 470px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (min-width: 520px) {
  body[data-page="landing"] .mobile-shell,
  body[data-page="updates"] .mobile-shell {
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  }
}

/* Shared Top Header (Landing & Updates) */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 14px 10px;
  background: rgba(7, 11, 18, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mini-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid var(--accent);
  flex-shrink: 0;
  background: var(--surface);
}

.brand-mini-text {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.brand-mini-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verified-icon {
  width: 16px;
  height: 16px;
  color: #38bdf8;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.download-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent), #eab308);
  color: #0b0f17;
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-glow);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.download-pill-btn:active {
  transform: scale(0.96);
}

/* Landing Hero Cover Pic */
.cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 195px;
  max-height: 245px;
  overflow: hidden;
  background: var(--surface);
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 18, 0.12) 0%,
    rgba(7, 11, 18, 0.35) 55%,
    var(--bg) 100%
  );
}

.cover-live-tag {
  position: absolute;
  top: 12px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(7, 11, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #e2e8f0;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  70% {
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Profile Identity Block */
.profile-section {
  position: relative;
  margin-top: -54px;
  padding: 0 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 2;
}

.profile-avatar-ring {
  position: relative;
  width: 104px;
  height: 104px;
  padding: 3.5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 24px var(--accent-glow);
  margin-bottom: 12px;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
  background: var(--surface);
  display: block;
}

.profile-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 5px;
}

.profile-title-row h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.2px;
}

.profile-title-row .verified-icon {
  width: 20px;
  height: 20px;
}

.profile-tagline {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 340px;
  margin-bottom: 10px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 18px;
}

/* Primary Telegram CTA */
.tg-cta-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, var(--tg-blue), var(--tg-blue-2));
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 15.5px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(34, 158, 217, 0.35);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.tg-cta-btn:active {
  transform: scale(0.98);
}

.btn-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Ticker Strip */
.ticker-bar {
  margin: 0 16px 14px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(245, 183, 49, 0.11), rgba(16, 185, 129, 0.09));
  border: 1px solid rgba(245, 183, 49, 0.25);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #fde68a;
  overflow: hidden;
}

.ticker-scroll {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Landing Cards & Share App */
.landing-cards {
  padding: 0 16px calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.pwa-install-card {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pwa-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--accent);
  object-fit: cover;
  flex-shrink: 0;
}

.pwa-card-info h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 2px;
}

.pwa-card-info p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.pwa-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.btn-gold {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--accent), #eab308);
  color: #090d14;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-glass {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.share-app-btn {
  margin-top: auto;
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
}

.share-app-btn:active {
  background: rgba(255, 255, 255, 0.09);
}

/* =========================================================
   PWA /UPDATES APP SHELL (Viewport-locked 100dvh)
   ========================================================= */
.updates-shell {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

.icon-btn.notify-alert::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulseDot 1.6s infinite;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.live-badge.offline {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.updates-main {
  flex: 1;
  min-height: 0;
  padding: 10px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.updates-main .ticker-bar {
  margin: 0;
  flex-shrink: 0;
}

/* Notification Prompt Card */
.notify-banner {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 183, 49, 0.14), rgba(16, 185, 129, 0.12));
  border: 1px solid rgba(245, 183, 49, 0.35);
}

.notify-banner-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #fef3c7;
}

.notify-banner-copy span {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
}

.notify-allow-btn {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 9px;
  border: none;
  background: var(--accent);
  color: #090d14;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

/* Update Selector Chips */
.chip-strip {
  flex-shrink: 0;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chip-strip::-webkit-scrollbar {
  display: none;
}

.update-chip {
  flex-shrink: 0;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  max-width: 190px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.update-chip.active {
  background: rgba(245, 183, 49, 0.14);
  border-color: var(--accent);
  color: var(--text);
}

/* Main Message Box (Exact Wireframe Match) */
.msg-box {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--surface) 0%, #0a111c 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.msg-box-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.msg-sender {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.msg-sender img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent);
  flex-shrink: 0;
}

.msg-sender-meta {
  min-width: 0;
}

.msg-sender-name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

.msg-category {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-time-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.msg-time-pill {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.07);
  padding: 4px 9px;
  border-radius: 8px;
}

.msg-countdown {
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  font-weight: 700;
  color: #6ee7b7;
}

/* Long Scrollable Message Body */
.msg-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 15px 15px 18px;
  font-size: var(--msg-font-size, 14.5px);
  line-height: 1.65;
  color: #e2e8f0;
}

.msg-scroll-body::-webkit-scrollbar {
  width: 5px;
}

.msg-scroll-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.msg-headline {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.3;
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.pin-tag {
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(245, 183, 49, 0.18);
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
  margin-top: 3px;
}

.msg-attachment {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  cursor: zoom-in;
  display: block;
}

.msg-para {
  margin-bottom: 6px;
  word-break: break-word;
}

.msg-para strong {
  color: #ffffff;
}

.msg-para a {
  color: #38bdf8;
  text-decoration: underline;
}

.msg-para code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 0.9em;
}

.msg-gap {
  height: 9px;
}

.msg-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 183, 49, 0.35), transparent);
  margin: 12px 0;
}

.msg-bullet {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.bullet-dot {
  color: var(--accent);
  font-weight: 800;
}

.bullet-num {
  color: var(--accent);
  font-weight: 700;
  min-width: 18px;
}

/* Message Footer Engagement Strip */
.msg-box-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.msg-stats-group,
.msg-tools-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 9px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.mini-pill-btn.liked {
  border-color: rgba(245, 183, 49, 0.45);
  background: rgba(245, 183, 49, 0.14);
  color: #fde68a;
}

/* Bottom 2-Button Fixed Bar (SHARE | JOIN TG) */
.bottom-two-bar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 10px;
  padding: 10px 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(7, 11, 18, 0.94);
  border-top: 1px solid var(--border);
}

.bottom-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
}

.bottom-tg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--tg-blue), var(--tg-blue-2));
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(34, 158, 217, 0.32);
}

/* Modals, Bottom Sheets & Toasts */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 12, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
}

.sheet-modal {
  width: 100%;
  max-width: 470px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  padding: 10px 18px max(22px, env(safe-area-inset-bottom));
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.65);
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  margin: 2px auto 12px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sheet-head h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
}

.icon-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.share-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 15px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

.share-tile span {
  font-size: 22px;
}

.ios-steps {
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 13.5px;
  color: #e2e8f0;
  line-height: 1.5;
}

.ios-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.ios-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #090d14;
  font-weight: 800;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lightbox-backdrop {
  align-items: center;
  padding: 16px;
}

.lightbox-wrap {
  position: relative;
  max-width: 94vw;
  max-height: 88dvh;
  text-align: center;
}

.lightbox-wrap img {
  max-width: 100%;
  max-height: 78dvh;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #fff;
  cursor: pointer;
}

.lightbox-cap {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.toast-root {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 390px);
}

.toast {
  background: rgba(14, 22, 35, 0.96);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  color: #fff;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  border-left-color: var(--success);
}

.toast-error {
  border-left-color: var(--danger);
}

/* =========================================================
   ADMIN DASHBOARD (/admin)
   ========================================================= */
.admin-login-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.admin-login-head {
  text-align: center;
  margin-bottom: 22px;
}

.admin-login-head img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid var(--accent);
  margin-bottom: 12px;
}

.admin-login-head h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  font-weight: 800;
}

.admin-login-head p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.admin-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 14px 48px;
}

.admin-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
  display: none;
}

.admin-tab {
  flex-shrink: 0;
  padding: 10px 15px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.admin-tab.active {
  background: linear-gradient(135deg, var(--accent), #eab308);
  color: #090d14;
  border-color: transparent;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 880px) {
  .admin-grid-2 {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.admin-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.form-field {
  margin-bottom: 13px;
}

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.input-ctrl,
.textarea-ctrl,
.select-ctrl {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.input-ctrl:focus,
.textarea-ctrl:focus,
.select-ctrl:focus {
  border-color: var(--accent);
}

.textarea-ctrl {
  min-height: 170px;
  resize: vertical;
  line-height: 1.55;
}

.pw-wrap {
  position: relative;
}

.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 6px;
  font-size: 13px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tool-chip {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}

.check-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-danger {
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.stat-tile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px;
}

.stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--accent);
}

.stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.media-ctrl-box {
  padding: 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: 12px;
}

.media-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.media-thumb {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
  border: 1.5px solid var(--accent);
  background: var(--bg);
}

.media-thumb-wide {
  width: 110px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.swatch-btn {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.swatch-btn.active {
  border-color: var(--accent);
  background: rgba(245, 183, 49, 0.12);
}

.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.update-item {
  padding: 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: 10px;
}

.update-item-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.update-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.mini-phone-preview {
  max-width: 310px;
  margin: 0 auto;
  border-radius: 26px;
  border: 3px solid #293548;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.error-msg {
  color: #fca5a5;
  font-size: 13px;
  margin-bottom: 10px;
}
