/* ============================================
   CREDO VPN — v3
   Outfit font · Login page · Compact mobile
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  min-height: 100dvh;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: #cdccca;
  background-color: #080a0e;
  overflow-x: hidden;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; line-height: 1.15; }
p, li, figcaption { text-wrap: pretty; }
button { cursor: pointer; background: none; border: none; }
a { text-decoration: none; color: inherit; }

::selection {
  background: rgba(0, 180, 216, 0.25);
  color: #fff;
}

:focus-visible {
  outline: 2px solid #00b4d8;
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #particleCanvas, .bg-orb { display: none !important; }
}

/* --- Design Tokens --- */
:root {
  --bg: #080a0e;
  --bg-surface: #0d1117;
  --bg-surface-2: #131920;
  --bg-surface-3: #1a2230;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #e8e8e6;
  --text-muted: #8b8f96;
  --text-faint: #4a4f56;
  --accent: #00b4d8;
  --accent-hover: #0096c7;
  --accent-glow: rgba(0, 180, 216, 0.15);
  --accent-gradient: linear-gradient(135deg, #00b4d8 0%, #0077b6 50%, #4361ee 100%);
  --accent-gradient-text: linear-gradient(135deg, #48cae4 0%, #00b4d8 40%, #4895ef 100%);
  --success: #4ade80;
  --warning: #fbbf24;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-hero: clamp(2.25rem, 1rem + 4vw, 4.25rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem; --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem; --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
  --radius-xl: 20px; --radius-full: 9999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(0, 180, 216, 0.15);

  --content-wide: 1200px;
  --content-default: 960px;
  --content-narrow: 640px;
}

/* --- Utility --- */
.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--space-8); }
}

.gradient-text {
  background: var(--accent-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.bg-effects {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  contain: layout style paint;
}

.bg-orb-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.12) 0%, transparent 70%);
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  animation: orb-float-1 20s ease-in-out infinite;
}

.bg-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(67, 97, 238, 0.1) 0%, transparent 70%);
  top: 40%;
  right: -10%;
  animation: orb-float-2 25s ease-in-out infinite;
}

.bg-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 119, 182, 0.08) 0%, transparent 70%);
  bottom: 10%;
  left: -5%;
  animation: orb-float-3 22s ease-in-out infinite;
}

@keyframes orb-float-1 {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  33% { transform: translateX(-45%) translateY(30px); }
  66% { transform: translateX(-55%) translateY(-20px); }
}

@keyframes orb-float-2 {
  0%, 100% { transform: translateY(0) translateX(0); }
  40% { transform: translateY(-40px) translateX(-20px); }
  70% { transform: translateY(20px) translateX(10px); }
}

@keyframes orb-float-3 {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-30px) translateX(20px); }
}

/* Mobile performance: reduce blur + orb sizes to prevent zoom lag/flicker */
@media (max-width: 768px) {
  .bg-effects {
    contain: layout style paint;
  }
  .bg-orb {
    filter: blur(40px);
    will-change: auto;
    animation-play-state: paused !important;
  }
  .bg-orb-1 {
    width: 350px;
    height: 350px;
  }
  .bg-orb-2 {
    width: 250px;
    height: 250px;
  }
  .bg-orb-3 {
    width: 200px;
    height: 200px;
  }
}

#particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 10, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.header--scrolled {
  background: rgba(8, 10, 14, 0.92);
}

.header--hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-6);
}

.logo-link { display: flex; align-items: center; flex-shrink: 0; }
.logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.nav-desktop {
  display: none;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 768px) {
  .nav-desktop { display: flex; }
}

.nav-desktop a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}
.nav-desktop a:hover { color: var(--text); }
.nav-desktop a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
  border-radius: 1px;
}
.nav-desktop a:hover::after { width: 100%; }

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Desktop login button */
.btn-header-login {
  display: none;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text);
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-header-login svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-header-login:hover {
  border-color: var(--accent);
  background: rgba(0, 180, 216, 0.06);
  transform: translateY(-1px);
}
@media (min-width: 768px) {
  .btn-header-login { display: inline-flex; }
}

/* Mobile "Войти" button next to burger */
.btn-mobile-login-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  padding: 6px 14px;
  border: 1px solid rgba(0, 180, 216, 0.25);
  border-radius: var(--radius-full);
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-mobile-login-top svg { flex-shrink: 0; width: 14px; height: 14px; }
.btn-mobile-login-top:hover {
  background: rgba(0, 180, 216, 0.08);
  border-color: var(--accent);
}
@media (min-width: 768px) {
  .btn-mobile-login-top { display: none; }
}

/* Hide mobile login button when menu is open */
.btn-mobile-login-top.hidden { display: none; }

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  padding: var(--space-2);
}
@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  background: rgba(8, 10, 14, 0.95);
}
.mobile-menu.open { display: block; }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.mobile-nav a {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-muted);
  padding: var(--space-2) 0;
  transition: color var(--transition);
}
.mobile-nav a:hover { color: var(--text); }

.btn-mobile-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-weight: 600;
  color: #fff;
  background: var(--accent-gradient);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  margin-top: var(--space-2);
  text-align: center;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(64px + var(--space-16)) var(--space-4) var(--space-16);
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

/* Hero title — SMALLER than v2, beautiful entrance */
.hero-title {
  font-size: var(--text-hero);
  font-weight: 800;
  color: #fff;
  line-height: 1.08;
  margin-bottom: var(--space-6);
  letter-spacing: -0.03em;
}

/* Hero lines — elegant clip-path wipe reveal */
.hero-line {
  display: block;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
}

.hero-line.animate-in {
  animation: hero-wipe-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-line-2.animate-in {
  animation-delay: 0.25s;
}

@keyframes hero-wipe-in {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0% 0 0);
  }
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
  line-height: 1.6;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
}

.hero-subtitle.animate-in {
  animation: hero-fade-wipe 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

@keyframes hero-fade-wipe {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0% 0 0);
  }
}

/* Hero CTA Button */
.btn-hero {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.2rem);
  font-weight: 700;
  color: #fff;
  background: var(--accent-gradient);
  padding: 18px 48px;
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  box-shadow:
    0 4px 24px rgba(0, 180, 216, 0.35),
    0 0 80px rgba(0, 180, 216, 0.12);
  clip-path: inset(50% 0 50% 0 round 9999px);
  cursor: pointer;
}

.btn-hero.animate-in {
  animation: btn-hero-open 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.75s forwards;
}

@keyframes btn-hero-open {
  0% {
    clip-path: inset(50% 0 50% 0 round 9999px);
  }
  100% {
    clip-path: inset(0% 0 0% 0 round 9999px);
  }
}

.btn-hero-glow {
  position: absolute;
  inset: -2px;
  background: var(--accent-gradient);
  border-radius: inherit;
  filter: blur(20px);
  opacity: 0.5;
  z-index: -1;
  transition: opacity 0.3s;
}

.btn-hero:hover .btn-hero-glow { opacity: 0.8; }

.btn-hero:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 8px 36px rgba(0, 180, 216, 0.45),
    0 0 100px rgba(0, 180, 216, 0.18);
}

.btn-hero:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 12px rgba(0, 180, 216, 0.2);
}

.btn-hero-content {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
  z-index: 1;
}

.btn-hero-content svg {
  transition: transform 0.3s var(--ease-out);
}
.btn-hero:hover .btn-hero-content svg {
  transform: translateX(4px);
}

.hero-trial {
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-top: var(--space-5);
  opacity: 0;
  clip-path: inset(0 100% 0 0);
}
.hero-trial.animate-in {
  animation: hero-fade-wipe 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

/* ============================================
   SECTION COMMON
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  flex-wrap: wrap;
}

.section-desc {
  font-size: var(--text-base);
  color: var(--text-muted);
  margin-top: var(--space-3);
  max-width: 540px;
  margin-inline: auto;
}

/* Inline logo in section title */
.inline-logo {
  display: inline-block;
  height: 1.1em;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
  margin-bottom: 0.05em;
}

/* ============================================
   FEATURES
   ============================================ */
.features {
  position: relative;
  z-index: 1;
  padding: var(--space-16) 0 var(--space-20);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Feature Cards — glass + glow */
.feature-card {
  position: relative;
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.feature-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 180, 216, 0.06) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
}

.feature-card:hover {
  border-color: rgba(0, 180, 216, 0.2);
  transform: translateY(-2px);
}
.feature-card:hover .feature-card-glow { opacity: 1; }

/* Large feature card (VLESS) */
.feature-card-lg {
  grid-column: 1 / -1;
}
@media (min-width: 960px) {
  .feature-card-lg {
    grid-column: span 2;
  }
}

.feature-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 180, 216, 0.08);
  border-radius: var(--radius-md);
  color: var(--accent);
  margin-bottom: var(--space-4);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.feature-card:hover .feature-icon-wrap {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(0, 180, 216, 0.15);
}

.feature-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================
   PRICING
   ============================================ */
.pricing {
  position: relative;
  z-index: 1;
  padding: var(--space-16) 0 var(--space-20);
}

.period-selector {
  display: inline-flex;
  justify-content: center;
  gap: var(--space-1);
  margin-bottom: var(--space-10);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px;
  width: auto;
  margin-left: auto;
  margin-right: auto;
}

/* Center the period selector wrapper */
.section-header + .period-selector,
.pricing .period-selector {
  display: flex;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.period-btn {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  transition: color var(--transition), background var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
  position: relative;
}
.period-btn:hover {
  color: var(--text);
}
.period-btn.active {
  color: #fff;
  background: rgba(0, 180, 216, 0.15);
}

.discount-badge {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 1px 5px;
  border-radius: var(--radius-full);
  line-height: 1.4;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}
@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
}

/* Price cards */
.price-card {
  position: relative;
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.price-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

/* Popular card */
.price-card-popular {
  border-color: rgba(0, 180, 216, 0.3);
  background: linear-gradient(180deg, rgba(0, 180, 216, 0.06) 0%, rgba(13, 17, 23, 0.7) 40%);
  box-shadow: 0 0 40px rgba(0, 180, 216, 0.08);
}
.price-card-popular:hover {
  border-color: rgba(0, 180, 216, 0.5);
  box-shadow: 0 0 60px rgba(0, 180, 216, 0.12);
}

.popular-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--accent-gradient);
  padding: 4px 20px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.price-card-header {
  margin-bottom: var(--space-4);
}

.price-card-header h3 {
  font-size: var(--text-lg);
  font-weight: 800;
  color: #fff;
}

.price-devices {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

.price-amount-wrap {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--border);
}

.price-amount {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.2s, transform 0.2s;
}

.price-amount.changing {
  opacity: 0;
  transform: translateY(-8px);
}

.price-period {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.price-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
  flex-grow: 1;
}

.price-features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.price-features li svg {
  flex-shrink: 0;
  color: var(--success);
}

.btn-plan {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  transition: border-color var(--transition), background var(--transition), transform var(--transition), color var(--transition);
}
.btn-plan:hover {
  border-color: var(--accent);
  background: rgba(0, 180, 216, 0.06);
  color: #fff;
  transform: translateY(-1px);
}

.btn-plan-primary {
  color: #fff;
  background: var(--accent-gradient);
  border: none;
  box-shadow: 0 4px 20px rgba(0, 180, 216, 0.25);
}
.btn-plan-primary:hover {
  box-shadow: 0 8px 30px rgba(0, 180, 216, 0.4);
  transform: translateY(-2px);
}

/* Payment Methods */
.payment-methods {
  text-align: center;
}

.payment-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}

.payment-icons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.payment-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--transition);
}
.payment-item:hover { color: var(--text); }

/* Payment icons from real images */
.pay-icon {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: brightness(0.9);
  transition: filter var(--transition);
}
.payment-item:hover .pay-icon {
  filter: brightness(1.1);
}
.pay-icon-wide {
  height: 20px;
}

/* ============================================
   FAQ
   ============================================ */
.faq {
  position: relative;
  z-index: 1;
  padding: var(--space-16) 0 var(--space-20);
}

.faq-list {
  max-width: 720px;
  margin-inline: auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-5) 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: color var(--transition);
  gap: var(--space-4);
}
.faq-question:hover { color: #fff; }

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-faint);
  transition: transform 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.4s var(--ease-out);
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: var(--space-5);
}

.faq-answer p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 600px;
}

/* ============================================
   CONTACTS
   ============================================ */
.contacts {
  position: relative;
  z-index: 1;
  padding: var(--space-16) 0 var(--space-20);
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  max-width: 720px;
  margin-inline: auto;
}
@media (min-width: 640px) {
  .contacts-grid { grid-template-columns: repeat(2, 1fr); }
}

.contact-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.contact-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact-card-tg { border-color: rgba(42, 171, 238, 0.15); }
.contact-card-tg:hover { border-color: rgba(42, 171, 238, 0.35); }

.contact-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 180, 216, 0.08);
  border-radius: var(--radius-md);
  color: var(--accent);
}

.contact-card-tg .contact-icon {
  background: rgba(42, 171, 238, 0.08);
  color: #2AABEE;
}

.contact-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.contact-method {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-note {
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-top: var(--space-1);
}

.contact-arrow {
  flex-shrink: 0;
  color: var(--text-faint);
  transition: transform var(--transition), color var(--transition);
}
.contact-card:hover .contact-arrow {
  transform: translate(3px, -3px);
  color: var(--accent);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: var(--space-12) 0 var(--space-8);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer-brand { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
@media (max-width: 767px) {
  .footer-brand { align-items: center; text-align: center; }
}

.footer-logo {
  height: 26px;
  width: auto;
  object-fit: contain;
}

.footer-tagline {
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.footer-links {
  display: flex;
  gap: var(--space-12);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-1);
}

.footer-col a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--text-faint);
  text-align: center;
}

/* Sticky CTA removed — no longer needed */

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
[data-animate] {
  opacity: 0;
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

[data-animate="fade"] {
  transform: translateY(16px);
}

[data-animate="card"] {
  transform: translateY(24px);
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.features-grid [data-animate="card"]:nth-child(1) { transition-delay: 0s; }
.features-grid [data-animate="card"]:nth-child(2) { transition-delay: 0.06s; }
.features-grid [data-animate="card"]:nth-child(3) { transition-delay: 0.12s; }
.features-grid [data-animate="card"]:nth-child(4) { transition-delay: 0.18s; }
.features-grid [data-animate="card"]:nth-child(5) { transition-delay: 0.24s; }
.features-grid [data-animate="card"]:nth-child(6) { transition-delay: 0.3s; }

.pricing-grid [data-animate="card"]:nth-child(1) { transition-delay: 0s; }
.pricing-grid [data-animate="card"]:nth-child(2) { transition-delay: 0.08s; }
.pricing-grid [data-animate="card"]:nth-child(3) { transition-delay: 0.16s; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.page-login {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(64px + var(--space-8)) var(--space-4) var(--space-8);
}

.login-container {
  width: 100%;
  max-width: 440px;
  position: relative;
}

.login-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  transition: color var(--transition);
  padding: var(--space-1) 0;
}
.login-back svg { flex-shrink: 0; }
.login-back:hover { color: var(--text); }

.login-card {
  position: relative;
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(0, 180, 216, 0.05);
  overflow: hidden;
}

.login-card-glow {
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.08) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
}

.login-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.login-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}

.login-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}
.login-subtitle strong {
  color: var(--accent);
  font-weight: 600;
}

/* Login Tabs */
.login-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-6);
  border: 1px solid var(--border);
}

.login-tab {
  flex: 1;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px var(--space-4);
  border-radius: calc(var(--radius-md) - 2px);
  transition: color var(--transition), background var(--transition);
}
.login-tab:hover { color: var(--text); }
.login-tab.active {
  color: #fff;
  background: rgba(0, 180, 216, 0.15);
}

/* Login Tab Content */
.login-tab-content {
  display: none;
}
.login-tab-content.active {
  display: block;
  animation: login-tab-in 0.3s var(--ease-out);
}

@keyframes login-tab-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Login Hint */
.login-hint {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: rgba(0, 180, 216, 0.04);
  border: 1px solid rgba(0, 180, 216, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
  align-items: flex-start;
}
.login-hint svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

.login-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.login-link:hover { color: #48cae4; }

/* Login Input */
.login-field {
  margin-bottom: var(--space-4);
}

.login-input {
  width: 100%;
  padding: 14px var(--space-4);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.login-input::placeholder {
  color: var(--text-faint);
}
.login-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

/* Login Submit Button */
.login-submit {
  width: 100%;
  padding: 14px;
  font-size: var(--text-base);
  font-weight: 700;
  color: #fff;
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(0, 180, 216, 0.25);
}
.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(0, 180, 216, 0.35);
}
.login-submit:active {
  transform: translateY(0);
}

/* Login Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-5) 0;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.login-divider span {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: lowercase;
}

/* Telegram login button */
.login-tg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  background: rgba(42, 171, 238, 0.1);
  border: 1px solid rgba(42, 171, 238, 0.25);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.login-tg-btn svg {
  flex-shrink: 0;
  color: #2AABEE;
}
.login-tg-btn:hover {
  background: rgba(42, 171, 238, 0.18);
  border-color: rgba(42, 171, 238, 0.4);
  transform: translateY(-1px);
}

/* ============================================
   OTP INPUT & AUTH UI
   ============================================ */
.otp-sent-to {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-5);
  text-align: center;
}
.otp-sent-to strong {
  color: var(--accent);
  font-weight: 600;
}

.otp-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.otp-digit {
  width: 46px;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  caret-color: var(--accent);
}
.otp-digit:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
  background: rgba(0, 180, 216, 0.04);
}
.otp-digit.error {
  border-color: #ef4444;
  animation: otp-shake 0.4s ease-out;
}
@keyframes otp-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}
.otp-digit.success {
  border-color: var(--success);
  background: rgba(74, 222, 128, 0.06);
}

.otp-dash {
  color: var(--text-faint);
  font-size: 20px;
  margin: 0 var(--space-1);
  user-select: none;
}

.otp-resend {
  text-align: center;
  margin-top: var(--space-4);
  min-height: 32px;
}

.otp-timer {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.otp-resend-btn {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  transition: color var(--transition);
}
.otp-resend-btn:hover { color: #48cae4; }

.otp-change-btn {
  display: block;
  margin: var(--space-3) auto 0;
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
  padding: var(--space-1);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(139, 143, 150, 0.3);
}
.otp-change-btn:hover { color: var(--text); }

.login-error {
  font-size: var(--text-xs);
  color: #ef4444;
  text-align: center;
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: var(--radius-md);
  line-height: 1.5;
}

/* Success state */
.success-state {
  text-align: center;
  padding: var(--space-8) 0;
}
.success-icon {
  color: var(--success);
  margin-bottom: var(--space-5);
  animation: success-pop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.success-icon svg { display: inline-block; }
@keyframes success-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.success-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}
.success-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.btn-logout svg { flex-shrink: 0; }
.btn-logout:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

/* Logout confirmation overlay */
.logout-confirm {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
  pointer-events: none;
}
.logout-confirm.visible {
  opacity: 1;
  pointer-events: auto;
}
.logout-confirm-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  max-width: 360px;
  width: 90%;
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.3s var(--ease-out);
}
.logout-confirm.visible .logout-confirm-card {
  transform: scale(1);
}
.logout-confirm h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}
.logout-confirm p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}
.logout-confirm-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}
.logout-cancel {
  padding: 10px 24px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
}
.logout-cancel:hover { color: var(--text); border-color: var(--border-hover); }
.logout-do {
  padding: 10px 24px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  background: #ef4444;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}
.logout-do:hover { background: #dc2626; }

/* Loading state on buttons */
.login-submit.loading {
  pointer-events: none;
  opacity: 0.7;
}
.login-submit.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: var(--space-2);
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 400px) {
  .otp-digit {
    width: 40px;
    height: 48px;
    font-size: 18px;
  }
  .otp-inputs {
    gap: 5px;
  }
  .otp-dash {
    margin: 0 2px;
  }
}

/* ============================================
   PAGE TRANSITIONS
   ============================================ */
#pageHome, #pageLogin {
  transition: opacity 0.3s var(--ease-out);
}

.page-fade-out {
  opacity: 0 !important;
  pointer-events: none;
}

/* Login page entrance animation */
.login-container {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-login.login-visible .login-container {
  opacity: 1;
  transform: translateY(0);
}

.login-card {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s, opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s;
}

.page-login:not(.login-visible) .login-card {
  opacity: 0;
  transform: scale(0.97);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
  .hero {
    min-height: auto;
    min-height: 100svh;
    padding: calc(64px + var(--space-10)) var(--space-4) var(--space-10);
  }

  .hero-title { letter-spacing: -0.02em; }

  .btn-hero {
    padding: 16px 36px;
    font-size: 1rem;
  }

  .price-card { padding: var(--space-6); }

  .footer {
    padding-bottom: var(--space-8);
  }

  /* Compact features on mobile */
  .features {
    padding: var(--space-10) 0 var(--space-12);
  }

  .section-header {
    margin-bottom: var(--space-8);
  }

  .features-grid {
    gap: var(--space-3);
  }

  .feature-card {
    padding: var(--space-4) var(--space-5);
  }

  .feature-icon-wrap {
    width: 40px;
    height: 40px;
    margin-bottom: var(--space-3);
  }
  .feature-icon-wrap svg {
    width: 22px;
    height: 22px;
  }

  .feature-card h3 {
    font-size: var(--text-base);
    margin-bottom: var(--space-1);
  }

  .feature-card p {
    font-size: var(--text-xs);
    line-height: 1.55;
  }

  /* Period selector fix — symmetric layout */
  .period-selector {
    flex-wrap: nowrap;
    gap: 0;
    padding: 3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .period-btn {
    padding: 7px 12px;
    font-size: 13px;
    flex-shrink: 0;
  }

  .discount-badge {
    font-size: 9px;
    padding: 0px 4px;
  }

  /* Login page mobile */
  .page-login {
    padding-top: calc(64px + var(--space-4));
    padding-bottom: var(--space-4);
    align-items: flex-start;
  }

  .login-card {
    padding: var(--space-6) var(--space-4);
  }
}

@media (max-width: 400px) {
  .period-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .hero-title {
    font-size: clamp(2rem, 0.8rem + 5vw, 2.5rem);
  }
}

/* ============================================
   DASHBOARD PAGE
   ============================================ */

/* ---- Dashboard Layout ---- */
.page-dashboard {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.db-container {
  max-width: 960px;
  margin-inline: auto;
  padding-inline: var(--space-4);
  width: 100%;
}
@media (min-width: 768px) {
  .db-container { padding-inline: var(--space-8); }
}

/* ---- Dashboard Header ---- */
.db-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 10, 14, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.db-header-inner {
  max-width: 960px;
  margin-inline: auto;
  padding-inline: var(--space-4);
  height: 60px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
@media (min-width: 768px) {
  .db-header-inner { padding-inline: var(--space-8); }
}

.db-header-logo {
  flex-shrink: 0;
}

.db-logo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.db-header-user {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.db-user-id {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
@media (min-width: 480px) {
  .db-user-id { max-width: 300px; }
}

/* ---- Copy Button ---- */
.db-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}
.db-copy-btn:hover {
  color: var(--accent);
  border-color: rgba(0, 180, 216, 0.3);
  background: rgba(0, 180, 216, 0.06);
}
.db-copy-btn.copied {
  color: var(--success);
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.06);
}
.db-copy-uid {
  padding: 4px 8px;
}

/* ---- Logout Button (header) ---- */
.db-logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.db-logout-btn:hover {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.06);
}
@media (max-width: 479px) {
  .db-logout-btn span { display: none; }
}

/* ---- Dashboard Main ---- */
.db-main {
  flex: 1;
  padding: var(--space-6) 0 var(--space-16);
}

/* ---- Loading State ---- */
.db-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-20) var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.db-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: db-spin 0.8s linear infinite;
}

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

.db-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.db-retry-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
}

/* ---- Dashboard Section ---- */
.db-section {
  margin-bottom: var(--space-8);
}

.db-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-5);
  letter-spacing: -0.01em;
}

/* ============================================
   SUBSCRIPTION STATUS CARD
   ============================================ */
.db-sub-card {
  position: relative;
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-6) var(--space-6) var(--space-5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow:
    0 0 60px rgba(0, 180, 216, 0.06),
    0 20px 60px rgba(0, 0, 0, 0.3);
}

.db-sub-card-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.1) 0%, transparent 70%);
  filter: blur(60px);
  pointer-events: none;
}

.db-sub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.db-sub-plan-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.db-sub-plan-name {
  font-size: var(--text-xl);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.db-sub-devices {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* Status badge */
.db-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}

.badge-active {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.badge-trial {
  background: rgba(0, 180, 216, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 180, 216, 0.25);
}

.badge-inactive {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Expiry */
.db-sub-expiry {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.db-expiry-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.db-expiry-date {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
}

.db-expiry-countdown {
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 600;
}

.db-countdown-expired {
  color: #f87171;
}

/* ---- Traffic Bars ---- */
.db-traffic-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.db-traffic-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.db-traffic-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  font-weight: 500;
}

.db-traffic-type {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.db-traffic-val {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.db-traffic-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.db-traffic-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #00b4d8, #0077b6);
  transition: width 0.8s var(--ease-out);
}

.db-traffic-fill-wl {
  background: linear-gradient(90deg, #4361ee, #7b2ff7);
}

.db-traffic-fill-warn {
  background: linear-gradient(90deg, #fbbf24, #f97316) !important;
}

/* ---- No Subscription State ---- */
.db-no-sub {
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6) 0 var(--space-2);
  gap: var(--space-3);
}

.db-no-sub-icon {
  color: var(--text-faint);
  margin-bottom: var(--space-1);
}

.db-no-sub-text {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
}

.db-no-sub-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 380px;
}

/* ============================================
   CONNECTION LINKS
   ============================================ */
.db-links-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: rgba(0, 180, 216, 0.06);
  border: 1px solid rgba(0, 180, 216, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.5;
}

.db-links-note svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 1px;
}

.db-links-note strong {
  color: var(--text);
}

.db-links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) {
  .db-links-grid { grid-template-columns: repeat(2, 1fr); }
}

.db-link-card {
  position: relative;
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s var(--ease-out);
  overflow: hidden;
}

.db-link-card-wifi {
  border-color: rgba(0, 180, 216, 0.15);
}
.db-link-card-wifi:hover { border-color: rgba(0, 180, 216, 0.35); }

.db-link-card-wl {
  border-color: rgba(67, 97, 238, 0.15);
}
.db-link-card-wl:hover { border-color: rgba(67, 97, 238, 0.35); }

.db-link-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 0 0, rgba(0, 180, 216, 0.04), transparent 60%);
  pointer-events: none;
}
.db-link-card-wl .db-link-card-glow {
  background: radial-gradient(ellipse at 0 0, rgba(67, 97, 238, 0.04), transparent 60%);
}

.db-link-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.db-link-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 180, 216, 0.1);
  border-radius: var(--radius-md);
  color: var(--accent);
  flex-shrink: 0;
}

.db-link-icon-wl {
  background: rgba(67, 97, 238, 0.1);
  color: #4361ee;
}

.db-link-type {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.db-link-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
}

.db-link-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.db-link-url-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.db-link-url {
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  word-break: break-all;
  flex: 1;
  min-width: 0;
  transition: color var(--transition);
  line-height: 1.4;
}
.db-link-url:hover { color: var(--accent); }

/* ============================================
   INSTRUCTIONS
   ============================================ */
.db-instruct-card {
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.db-instruct-device {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.db-device-icon { font-size: 20px; }

.db-device-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.db-instruct-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  counter-reset: none;
}

.db-instruct-steps li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

.db-instruct-steps li strong { color: #fff; }

.db-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(0, 180, 216, 0.1);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.db-step-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.db-instruct-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 180, 216, 0.08);
  border: 1px solid rgba(0, 180, 216, 0.2);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  transition: background var(--transition), border-color var(--transition);
  display: inline-block;
}
.db-instruct-link:hover {
  background: rgba(0, 180, 216, 0.15);
  border-color: rgba(0, 180, 216, 0.4);
}

/* ============================================
   MANAGE SUBSCRIPTION
   ============================================ */
.db-upgrade-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.5;
}
.db-upgrade-note svg { flex-shrink: 0; color: #fbbf24; margin-top: 1px; }
.db-upgrade-note strong { color: var(--text); }

.db-plan-period-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ---- Plan Cards ---- */
.db-plan-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 479px) {
  .db-plan-cards { grid-template-columns: 1fr; }
}

.db-plan-card {
  position: relative;
  background: rgba(13, 17, 23, 0.7);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), background 0.2s, transform 0.2s var(--ease-out);
  text-align: center;
}
.db-plan-card:hover {
  border-color: rgba(0, 180, 216, 0.3);
  transform: translateY(-1px);
}
.db-plan-card.selected {
  border-color: var(--accent);
  background: rgba(0, 180, 216, 0.06);
}

.db-plan-card-popular {
  border-color: rgba(0, 180, 216, 0.25);
}

.db-plan-popular-tag {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--accent-gradient);
  padding: 2px 12px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.db-plan-card-top {
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
}

.db-plan-card-name {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
}

.db-plan-card-devices {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.db-plan-card-features {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.db-plan-card-features li {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ---- Period Selector ---- */
.db-period-wrap {}

.db-period-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-3);
}

.db-period-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.db-period-btn {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  white-space: nowrap;
  cursor: pointer;
}
.db-period-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
}
.db-period-btn.active {
  color: #fff;
  border-color: var(--accent);
  background: rgba(0, 180, 216, 0.1);
}

/* ---- Price Display + Action ---- */
.db-price-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.db-price-display {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.db-price-main {
  font-size: var(--text-xl);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.db-price-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ---- Primary Button ---- */
.db-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  background: var(--accent-gradient);
  padding: 12px 28px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(0, 180, 216, 0.3);
  white-space: nowrap;
}
.db-btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 180, 216, 0.45);
}
.db-btn-primary:active { transform: translateY(0); }
.db-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.db-btn-primary.loading {
  opacity: 0.7;
  cursor: wait;
}

.db-pay-btn { min-width: 160px; }

/* ---- Ghost Button ---- */
.db-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  white-space: nowrap;
}
.db-btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.04);
}

/* ---- Danger Button ---- */
.db-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  background: #ef4444;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}
.db-btn-danger:hover { opacity: 0.85; transform: translateY(-1px); }

/* ============================================
   PAYMENT STUB
   ============================================ */
.db-payment-stub {
  margin-bottom: var(--space-5);
}

.db-stub-card {
  background: rgba(13, 17, 23, 0.85);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  box-shadow: 0 0 60px rgba(0, 180, 216, 0.08);
}

.db-stub-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 180, 216, 0.08);
  border-radius: 50%;
  color: var(--accent);
  margin-inline: auto;
  margin-bottom: var(--space-4);
}

.db-stub-card h4 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-3);
}

.db-stub-amount {
  font-size: var(--text-base);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.db-stub-amount strong { color: #fff; font-size: var(--text-xl); }

.db-stub-info {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.db-stub-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ============================================
   PAYMENT HISTORY TABLE
   ============================================ */
.db-payments-wrap {
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.db-payments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-10) var(--space-4);
  color: var(--text-faint);
  font-size: var(--text-sm);
}

.db-payments-table-wrap {
  overflow-x: auto;
}

.db-payments-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.db-payments-table th {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.db-payments-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  white-space: nowrap;
}

.db-payments-table tr:last-child td { border-bottom: none; }
.db-payments-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.db-pay-status {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.status-ok {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

.status-pending {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.status-fail {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================================
   DASHBOARD FAQ
   ============================================ */
.db-faq-list {
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.db-faq-item {
  border-bottom: 1px solid var(--border);
}
.db-faq-item:last-child { border-bottom: none; }

.db-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: color var(--transition);
  gap: var(--space-4);
  cursor: pointer;
  background: none;
  border: none;
}
.db-faq-q:hover { color: #fff; }

.db-faq-item.open .db-faq-q { color: #fff; }
.db-faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.db-faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.4s var(--ease-out);
}

.db-faq-item.open .db-faq-a {
  max-height: 200px;
  padding-bottom: var(--space-4);
}

.db-faq-a p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
  padding: 0 var(--space-5);
}

/* ============================================
   DASHBOARD CONTACTS
   ============================================ */
.db-contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) {
  .db-contacts-grid { grid-template-columns: repeat(2, 1fr); }
}

.db-contact-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-4);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.db-contact-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.db-contact-tg { border-color: rgba(42, 171, 238, 0.12); }
.db-contact-tg:hover { border-color: rgba(42, 171, 238, 0.3); }

.db-contact-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 180, 216, 0.08);
  border-radius: var(--radius-md);
  color: var(--accent);
  flex-shrink: 0;
}
.db-contact-tg .db-contact-icon { color: #2AABEE; background: rgba(42, 171, 238, 0.08); }

.db-contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.db-contact-title {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.db-contact-val {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   DASHBOARD FOOTER
   ============================================ */
.db-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-6) 0;
}

.db-footer .db-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.db-footer p {
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.db-footer a {
  font-size: var(--text-xs);
  color: var(--text-muted);
  transition: color var(--transition);
}
.db-footer a:hover { color: var(--accent); }

/* ============================================
   LOGOUT OVERLAY
   ============================================ */
.db-logout-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease-out);
}

.db-logout-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.db-logout-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.2s var(--ease-out);
}

.db-logout-overlay.visible .db-logout-card {
  transform: scale(1);
}

.db-logout-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}

.db-logout-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.db-logout-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.db-toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  max-width: 380px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.db-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.db-toast button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
  transition: color var(--transition);
}
.db-toast button:hover { color: var(--text); }

.db-toast-success { border-color: rgba(74, 222, 128, 0.3); }
.db-toast-success::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

.db-toast-error { border-color: rgba(239, 68, 68, 0.3); }
.db-toast-error::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .db-toast {
    bottom: var(--space-4);
    right: var(--space-4);
    left: var(--space-4);
    max-width: none;
  }
}

/* ============================================
   HOME PAGE: Contacts grid-4
   ============================================ */
.contacts-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  max-width: 960px;
  margin-inline: auto;
}
@media (min-width: 480px) {
  .contacts-grid-4 { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================
   DASHBOARD v2 — NEW REDESIGN
   ============================================ */

/* Dashboard Page Container */
#pageDashboard {
  display: none;
  flex-direction: row;
  width: 100%;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

/* ---- DASHBOARD HEADER ---- */
.dash-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 60px;
  background: rgba(8, 10, 14, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-5);
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .dash-header {
    padding: 0 var(--space-6);
  }
}

.dash-header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.dash-logo-img {
  height: 30px;
  width: auto;
  object-fit: contain;
}

.dash-header-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.dash-user-email {
  font-size: var(--text-sm);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

@media (min-width: 480px) {
  .dash-user-email { max-width: 280px; }
}

.dash-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  color: var(--text-faint);
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.dash-copy-btn:hover {
  color: var(--accent);
  background: rgba(0, 180, 216, 0.08);
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.dash-logout-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  white-space: nowrap;
}
.dash-logout-btn:hover {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.05);
}

.dash-burger-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.dash-burger-btn:hover { background: rgba(255,255,255,0.06); }

@media (min-width: 768px) {
  .dash-burger-btn { display: none; }
}

/* ---- DASHBOARD LAYOUT ---- */
.dash-layout {
  display: flex;
  width: 100%;
  padding-top: 60px;
  min-height: 100dvh;
}

/* ---- SIDEBAR ---- */
.dash-sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  width: 220px;
  background: rgba(8, 10, 14, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 150;
  overflow-y: auto;
  transition: transform 0.3s var(--ease-out);
}

@media (max-width: 767px) {
  .dash-sidebar {
    transform: translateX(-100%);
  }
  .dash-sidebar.open {
    transform: translateX(0);
  }
}

.dash-sidebar-nav {
  flex: 1;
  padding: var(--space-4) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.dash-nav-item:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.dash-nav-item.active {
  color: #fff;
  background: rgba(0, 180, 216, 0.1);
}
.dash-nav-item.active svg {
  color: var(--accent);
}

.dash-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-faint);
  transition: color var(--transition);
}
.dash-nav-item:hover svg { color: var(--text-muted); }

.dash-nav-separator {
  height: 1px;
  background: var(--border);
  margin: var(--space-3) var(--space-3);
}

.dash-sidebar-footer {
  padding: var(--space-4) var(--space-3);
  border-top: 1px solid var(--border);
}

.dash-sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
}

.dash-sidebar-brand-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dash-sidebar-brand-tagline {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.dash-sidebar-legal {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-3) var(--space-3) 0;
  margin-top: var(--space-2);
  border-top: 1px solid var(--border);
}

.dash-sidebar-legal a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 1;
  transition: color var(--transition);
}
.dash-sidebar-legal a:hover {
  color: #fff;
}

/* Mobile sidebar overlay */
.dash-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
}
.dash-overlay.open { display: block; }

@media (min-width: 768px) {
  .dash-overlay { display: none !important; }
}

/* ---- MAIN CONTENT AREA ---- */
.dash-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: var(--space-8) var(--space-5) var(--space-12);
}

@media (min-width: 768px) {
  .dash-content {
    margin-left: 220px;
    padding: var(--space-8) var(--space-8) var(--space-12);
  }
}

/* ---- SECTIONS ---- */
.dash-section {
  display: none;
  animation: sectionFadeIn 0.25s var(--ease-out) forwards;
}
.dash-section.active { display: block; }

@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-page-title {
  margin-bottom: var(--space-6);
}
.section-page-title h2 {
  font-size: var(--text-xl);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}

/* ---- SUBSCRIPTION CARD ---- */
.sub-selector {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.sub-selector-btn {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.sub-selector-btn:hover {
  color: var(--text);
  border-color: var(--border-hover);
}
.sub-selector-btn.active {
  color: #fff;
  border-color: rgba(0, 180, 216, 0.4);
  background: rgba(0, 180, 216, 0.1);
}

.sub-card {
  position: relative;
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  margin-bottom: var(--space-6);
  box-shadow: 0 0 40px rgba(0, 180, 216, 0.06);
}

.sub-card-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 300px;
  background: radial-gradient(ellipse at center, rgba(0, 180, 216, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.sub-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.sub-card-plan {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sub-plan-name {
  font-size: var(--text-lg);
  font-weight: 800;
  color: #fff;
}

/* Status badges */
.sub-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sub-badge-active {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.sub-badge-trial {
  background: rgba(0, 180, 216, 0.15);
  color: var(--accent);
  border: 1px solid rgba(0, 180, 216, 0.25);
}

.sub-badge-expired {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.sub-card-expiry {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.sub-card-expiry strong { color: #fff; }

/* Traffic */
.sub-traffic {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
@media (min-width: 520px) {
  .sub-traffic { grid-template-columns: 1fr 1fr; }
}

.traffic-item {}

.traffic-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.traffic-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.traffic-value {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.traffic-bar {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.traffic-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  transition: width 0.8s var(--ease-out);
}
.traffic-fill-warn { background: linear-gradient(90deg, #f59e0b, #f97316); }
.traffic-fill-danger { background: linear-gradient(90deg, #ef4444, #dc2626); }

.sub-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.sub-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-faint);
}

/* ---- CONNECTION BUTTONS ---- */
.connect-section {
  margin-bottom: var(--space-6);
}

.connect-hint {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: rgba(0, 180, 216, 0.06);
  border: 1px solid rgba(0, 180, 216, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}
.connect-hint svg { flex-shrink: 0; color: var(--accent); margin-top: 1px; }
.connect-hint strong { color: #fff; }

.connect-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 600px) {
  .connect-buttons { grid-template-columns: 1fr 1fr; }
}

.connect-btn-wrap {
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}

.connect-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-5);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 80px;
}

.connect-btn:hover {
  transform: translateY(-2px);
}

.connect-btn-wifi {
  border-color: rgba(0, 180, 216, 0.2);
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.06) 0%, rgba(13, 17, 23, 0.8) 60%);
}
.connect-btn-wifi:hover {
  border-color: rgba(0, 180, 216, 0.4);
  box-shadow: 0 0 30px rgba(0, 180, 216, 0.12);
}

.connect-btn-wl {
  border-color: rgba(67, 97, 238, 0.2);
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.06) 0%, rgba(13, 17, 23, 0.8) 60%);
}
.connect-btn-wl:hover {
  border-color: rgba(67, 97, 238, 0.4);
  box-shadow: 0 0 30px rgba(67, 97, 238, 0.12);
}

.connect-btn-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.connect-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(0, 180, 216, 0.1);
  color: var(--accent);
  flex-shrink: 0;
}
.connect-btn-wl .connect-btn-icon {
  background: rgba(67, 97, 238, 0.1);
  color: #6c8ef5;
}

.connect-btn-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.connect-btn-text strong {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.connect-btn-text span {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.connect-btn-arrow {
  flex-shrink: 0;
  color: var(--text-faint);
  transition: transform var(--transition), color var(--transition);
}
.connect-btn:hover .connect-btn-arrow {
  transform: translateX(3px);
  color: var(--accent);
}

.connect-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-faint);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  cursor: pointer;
}
.connect-copy-btn:hover {
  color: var(--accent);
  background: rgba(0, 180, 216, 0.08);
  border-color: rgba(0, 180, 216, 0.2);
}

/* ---- ACTION BUTTONS ---- */
.dash-action-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.btn-dash-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  background: var(--accent-gradient);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0, 180, 216, 0.25);
}
.btn-dash-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(0, 180, 216, 0.35);
}
.btn-dash-primary:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-dash-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  background: transparent;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
}
.btn-dash-secondary:hover {
  color: #fff;
  border-color: var(--accent);
  background: rgba(0, 180, 216, 0.06);
  transform: translateY(-1px);
}

/* ---- NO SUBSCRIPTION VIEW ---- */
.no-sub-hero {
  text-align: center;
  padding: var(--space-10) var(--space-4);
}

.no-sub-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 180, 216, 0.08);
  border: 1px solid rgba(0, 180, 216, 0.15);
  border-radius: var(--radius-xl);
  color: var(--accent);
  margin: 0 auto var(--space-5);
}

.no-sub-hero h3 {
  font-size: var(--text-xl);
  font-weight: 800;
  color: #fff;
  margin-bottom: var(--space-3);
}

.no-sub-hero p {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 420px;
  margin-inline: auto;
}

.no-sub-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}
@media (min-width: 600px) {
  .no-sub-features { grid-template-columns: repeat(2, 1fr); }
}

.no-sub-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  background: rgba(13, 17, 23, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.no-sub-feature-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 180, 216, 0.08);
  border-radius: var(--radius-md);
  color: var(--accent);
  flex-shrink: 0;
}

.no-sub-feature strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}
.no-sub-feature p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
}

/* ---- PLAN CARDS (dashboard version) ---- */
.plans-container {
  margin-bottom: var(--space-6);
}

.plans-period-selector {
  display: inline-flex;
  gap: var(--space-1);
  margin-bottom: var(--space-6);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px;
}

.plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 640px) {
  .plans-grid { grid-template-columns: repeat(3, 1fr); }
}

.plan-card {
  position: relative;
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
.plan-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.plan-card-popular {
  border-color: rgba(0, 180, 216, 0.3);
  background: linear-gradient(180deg, rgba(0, 180, 216, 0.06) 0%, rgba(13, 17, 23, 0.7) 40%);
  box-shadow: 0 0 30px rgba(0, 180, 216, 0.08);
}
.plan-card-popular:hover {
  border-color: rgba(0, 180, 216, 0.5);
}

.plan-card-header {
  margin-bottom: var(--space-4);
}
.plan-card-header h3 {
  font-size: var(--text-lg);
  font-weight: 800;
  color: #fff;
}
.plan-devices {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 3px;
}

.plan-price-wrap {
  display: flex;
  align-items: baseline;
  gap: var(--space-1);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.plan-price-amount {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: opacity 0.2s, transform 0.2s;
}
.plan-price-amount.changing {
  opacity: 0;
  transform: translateY(-8px);
}

.plan-price-period {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.plan-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  flex-grow: 1;
}
.plan-features li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.plan-features li svg { flex-shrink: 0; color: var(--success); }

/* ---- INSTRUCTIONS SECTION ---- */
.instr-rec {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: rgba(0, 180, 216, 0.06);
  border: 1px solid rgba(0, 180, 216, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}
.instr-rec strong { color: #fff; }
.instr-rec-icon { flex-shrink: 0; color: var(--accent); margin-top: 1px; }

.os-tabs-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-5);
  scrollbar-width: none;
}
.os-tabs-wrap::-webkit-scrollbar { display: none; }

.os-tabs {
  display: inline-flex;
  gap: var(--space-1);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 4px;
  white-space: nowrap;
  min-width: max-content;
}

.os-tab-btn {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  transition: color var(--transition), background var(--transition);
}
.os-tab-btn:hover { color: var(--text); }
.os-tab-btn.active {
  color: #fff;
  background: rgba(0, 180, 216, 0.15);
}

.os-content { display: none; }
.os-content.active { display: block; }

.instr-downloads {
  margin-bottom: var(--space-6);
}

.instr-sub-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.instr-download-btns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.btn-download:hover { transform: translateY(-1px); }

.btn-download-primary {
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: 0 4px 16px rgba(0, 180, 216, 0.25);
}
.btn-download-primary:hover { box-shadow: 0 6px 24px rgba(0, 180, 216, 0.35); }

.btn-download-secondary {
  color: var(--text);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}
.btn-download-secondary:hover {
  color: #fff;
  border-color: var(--border-hover);
}

.instr-methods {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
@media (min-width: 640px) {
  .instr-methods { grid-template-columns: 1fr 1fr; }
}

.instr-method {
  background: rgba(13, 17, 23, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.instr-method-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}

.instr-method-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 180, 216, 0.15);
  color: var(--accent);
  border: 1px solid rgba(0, 180, 216, 0.2);
  white-space: nowrap;
}
.instr-method-badge-2 {
  background: rgba(67, 97, 238, 0.15);
  color: #6c8ef5;
  border-color: rgba(67, 97, 238, 0.2);
}

.instr-method-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.6;
}

.instr-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.instr-step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}
.instr-step strong { color: #fff; }

.instr-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 180, 216, 0.1);
  border: 1px solid rgba(0, 180, 216, 0.2);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.alt-clients-section {
  margin-top: var(--space-8);
}

.alt-clients-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-4);
}

.alt-clients-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 580px) {
  .alt-clients-grid { grid-template-columns: repeat(2, 1fr); }
}

.alt-client-card {
  position: relative;
  display: block;
  background: rgba(13, 17, 23, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition);
}
.alt-client-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.alt-client-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-1);
}
.alt-client-header strong {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
}
.alt-client-platforms {
  font-size: var(--text-xs);
  color: var(--text-faint);
  white-space: nowrap;
}
.alt-client-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

/* ---- SUBSCRIPTIONS SECTION ---- */
.subs-section {
  margin-bottom: var(--space-8);
}

.subs-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}

.subs-section-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-5);
  line-height: 1.6;
}

.subs-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  color: var(--text-faint);
  font-size: var(--text-xs);
}
.subs-divider::before,
.subs-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.renew-sub-select {
  margin-bottom: var(--space-5);
}

.field-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.dash-select {
  width: 100%;
  max-width: 320px;
  background: rgba(13, 17, 23, 0.8);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: 10px var(--space-4);
  font-size: var(--text-sm);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.dash-select:hover, .dash-select:focus {
  border-color: var(--accent);
  outline: none;
}

/* ---- PAYMENTS SECTION ---- */
.payments-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.payment-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 80px 100px;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.4);
  transition: background var(--transition);
}
.payment-row:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.payment-row:last-child {
  border-bottom: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.payment-row:hover { background: rgba(13, 17, 23, 0.7); }

.payment-row-date {
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.payment-row-plan strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
}
.payment-row-plan span {
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.payment-row-amount {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.payment-row-status {
  display: flex;
  justify-content: flex-end;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}
.status-success { background: rgba(74, 222, 128, 0.12); color: #4ade80; }
.status-warn { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
.status-error { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.status-muted { background: rgba(255,255,255,0.05); color: var(--text-faint); }

@media (max-width: 500px) {
  .payment-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .payment-row-amount { text-align: left; }
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-4);
}
.empty-state-icon {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-xl);
  color: var(--text-faint);
  margin: 0 auto var(--space-5);
}
.empty-state h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}
.empty-state p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 320px;
  margin-inline: auto;
  margin-bottom: var(--space-5);
}

/* ---- LOADING STATE ---- */
.dash-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) 0;
}

.loader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0, 180, 216, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ---- FAQ section ---- */
.dash-faq-list {
  max-width: 720px;
}

/* ---- LINKING SECTION ---- */
.linking-info {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: rgba(0, 180, 216, 0.06);
  border: 1px solid rgba(0, 180, 216, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}
.linking-info-icon { flex-shrink: 0; color: var(--accent); margin-top: 1px; }

.linking-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 600px) {
  .linking-cards { grid-template-columns: 1fr 1fr; }
}

.linking-card {
  background: rgba(13, 17, 23, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.linking-card-linked {
  border-color: rgba(74, 222, 128, 0.2);
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.03) 0%, rgba(13, 17, 23, 0.7) 40%);
}

.linking-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.linking-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 180, 216, 0.08);
  border-radius: var(--radius-md);
  color: var(--accent);
  flex-shrink: 0;
}
.linking-icon-tg {
  background: rgba(42, 171, 238, 0.08);
  color: #2AABEE;
}

.linking-card-header > div {
  flex: 1;
  min-width: 0;
}
.linking-card-header h3 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
}
.linking-card-header p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linking-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.25);
  white-space: nowrap;
  flex-shrink: 0;
}

.linking-hint {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}
.linking-hint svg { flex-shrink: 0; color: var(--text-faint); margin-top: 1px; }

.linking-form {
  margin-top: var(--space-4);
}

.linking-step { }

.link-accent {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---- PAYMENT MODAL ---- */
.payment-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-out);
}
.payment-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.payment-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
  max-width: 400px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s var(--ease-out);
}
.payment-modal-overlay.open .payment-modal-card {
  transform: scale(1) translateY(0);
}

.payment-modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.payment-modal-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }

.payment-modal-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-6);
}

.payment-modal-rows {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.payment-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
}
.payment-modal-row span:first-child { color: var(--text-muted); }
.payment-modal-row span:last-child { color: #fff; font-weight: 600; }
.payment-modal-row.payment-modal-total span:last-child {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--accent);
}
.payment-modal-id {
  font-size: var(--text-xs) !important;
  color: var(--text-faint) !important;
  font-variant-numeric: tabular-nums;
}

.payment-modal-hint {
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-bottom: var(--space-5);
  text-align: center;
  line-height: 1.6;
}

.payment-modal-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ---- TOAST NOTIFICATIONS ---- */
#toastContainer {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 360px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(19, 25, 32, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateX(100%);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
  pointer-events: auto;
}
.toast.toast-show {
  opacity: 1;
  transform: translateX(0);
}

.toast-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.toast-success .toast-icon { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.toast-error .toast-icon { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.toast-info .toast-icon { background: rgba(0, 180, 216, 0.12); color: var(--accent); }
.toast-success { border-color: rgba(74, 222, 128, 0.15); }
.toast-error { border-color: rgba(239, 68, 68, 0.15); }

.toast-msg { flex: 1; min-width: 0; }

@media (max-width: 640px) {
  #toastContainer {
    bottom: var(--space-4);
    right: var(--space-4);
    left: var(--space-4);
    max-width: none;
  }
}


/* Hide desktop logout button on mobile (it's in the sidebar) */
@media (max-width: 767px) {
  .dash-logout-btn {
    display: none;
  }
  /* Hide user email copy btn on very small screens */
  .dash-user-email {
    max-width: 130px;
    font-size: 12px;
  }
}

/* ============================================
   DASHBOARD FIXES — New Styles
   ============================================ */

@media (max-width: 768px) {
  .dash-header {
    padding: 10px 12px;
  }
}

/* --- Connection buttons: card layout for mobile copy visibility --- */
.connect-btn-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  overflow: hidden;
  transition: border-color 0.2s;
  flex: 1;
  min-width: 0;
}
.connect-btn-card:hover {
  border-color: rgba(0,180,216,0.25);
}
.connect-btn-card .connect-btn {
  border: none;
  border-radius: 0;
  margin: 0;
}
.connect-btn-card.connect-btn-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.connect-copy-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  background: rgba(255,255,255,0.04);
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}
.connect-copy-inline:hover {
  background: rgba(0,180,216,0.1);
  color: rgba(0,180,216,0.9);
}
.connect-copy-inline svg {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .connect-buttons {
    flex-direction: column;
    gap: 12px;
  }
  .connect-btn-card {
    width: 100%;
  }
}

/* --- Sub card warnings --- */
.sub-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.4;
}
.sub-warning svg {
  flex-shrink: 0;
}
.sub-warning-notice {
  background: rgba(255,170,0,0.08);
  border: 1px solid rgba(255,170,0,0.15);
  color: rgba(255,200,80,0.9);
}
.sub-warning-warning {
  background: rgba(255,130,0,0.1);
  border: 1px solid rgba(255,130,0,0.2);
  color: rgba(255,180,60,0.95);
}
.sub-warning-critical {
  background: rgba(255,60,60,0.1);
  border: 1px solid rgba(255,60,60,0.2);
  color: rgba(255,100,100,0.95);
}
.warning-renew-btn {
  background: none;
  border: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  font-weight: 600;
  padding: 0;
  margin-left: 4px;
}
.warning-renew-btn:hover {
  opacity: 0.8;
}

/* --- Sub card expired/cancelled states --- */
.sub-card-expired {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.1);
}
.sub-card-expired .sub-card-glow {
  display: none;
}
.sub-card-cancelled .sub-card-glow {
  display: none;
}
.sub-card-meta-expired {
  opacity: 0.85;
  color: rgba(255, 255, 255, 0.7);
}

/* --- Cancelled badge --- */
.sub-badge-cancelled {
  background: rgba(255,170,0,0.15);
  color: #ffaa00;
}

/* --- Sub selector expired tab --- */
.sub-selector-expired {
  opacity: 0.5;
}

/* --- Three-dot menu on sub card --- */
.sub-card-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sub-card-menu {
  position: relative;
}
.sub-menu-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  transition: background 0.2s, color 0.2s;
  padding: 0;
}
.sub-menu-trigger:hover {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
}
.sub-menu-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  min-width: 180px;
  background: rgba(20,25,35,0.98);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 6px;
  z-index: 100;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.sub-menu-dropdown.open {
  display: block;
}
.sub-menu-item {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
  font-family: inherit;
}
.sub-menu-item:hover {
  background: rgba(255,255,255,0.06);
}
.sub-menu-danger {
  color: #ff6b6b;
}
.sub-menu-danger:hover {
  background: rgba(255,60,60,0.1);
}

/* --- Cancel modal --- */
.cancel-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.cancel-modal-overlay.open {
  display: flex;
}
.cancel-modal-card {
  background: linear-gradient(180deg, #1a1f2e 0%, #141820 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  position: relative;
}
.cancel-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255,60,60,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #ff6b6b;
}
.cancel-modal-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
}
.cancel-modal-text {
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 8px;
}
.cancel-modal-date {
  text-align: center;
  color: rgba(0,180,216,0.8);
  font-size: 14px;
  margin: 0 0 24px;
}
.cancel-modal-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}
.cancel-modal-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}
.cancel-modal-feature svg {
  color: rgba(255,60,60,0.6);
  flex-shrink: 0;
}
.cancel-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-cancel-stay {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #00b4d8, #0077b6);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.2s;
}
.btn-cancel-stay:hover {
  opacity: 0.9;
}
.btn-cancel-confirm {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,60,60,0.2);
  background: rgba(255,60,60,0.06);
  color: rgba(255,100,100,0.8);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.btn-cancel-confirm:hover {
  background: rgba(255,60,60,0.12);
}

/* --- Sidebar user info (mobile) --- */
.dash-sidebar-user {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  margin-bottom: 4px;
}
.dash-sidebar-user-email {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.dash-sidebar-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(255,255,255,0.06);
  border-radius: 5px;
  cursor: pointer;
  color: rgba(255,255,255,0.3);
  transition: background 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.dash-sidebar-copy-btn:hover {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
}
@media (max-width: 768px) {
  .dash-sidebar-user { display: flex; }
  .dash-header-user { display: none !important; }
  .dash-burger-btn {
    width: 42px !important;
    height: 42px !important;
  }
  .dash-burger-btn svg {
    width: 26px !important;
    height: 26px !important;
  }
}

/* ============================================
   QR CODES & AUTO-RENEWAL
   ============================================ */
.qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}
.qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.qr-code-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
}
.qr-code-wrap svg {
  width: 100%;
  height: 100%;
}
.qr-label {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}
.btn-qr-codes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s;
}
.btn-qr-codes:hover {
  border-color: rgba(0,180,216,0.3);
  color: rgba(0,180,216,0.8);
}
.sub-meta-autorenewal {
  margin-left: auto;
}
@media (max-width: 480px) {
  .qr-grid { grid-template-columns: 1fr; }
}

/* ============================================
   BONUSES SECTION
   ============================================ */
.bonus-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.bonus-grid-2 {
  grid-template-columns: 1fr 1fr;
}
.bonus-card-wide {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .bonus-grid { grid-template-columns: 1fr; }
}
.bonus-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
}
.bonus-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 15px;
  color: #fff;
}
.bonus-card-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  margin: 0 0 16px;
}
.bonus-card-warn {
  font-size: 12px;
  color: #ffaa00;
  margin: 0 0 12px;
}
.bonus-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.bonus-card-actions .btn-dash-primary,
.bonus-card-actions .btn-dash-secondary {
  flex: 1;
  min-width: 140px;
}
.bonus-ref-link {
  display: flex;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  overflow: hidden;
}
.bonus-ref-input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: none;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.bonus-promo-form {
  display: flex;
  gap: 10px;
}
.bonus-promo-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.bonus-promo-input::placeholder {
  color: rgba(255,255,255,0.3);
}
.bonus-stats-grid {
  display: flex;
  gap: 32px;
  margin-top: 8px;
}
.bonus-stat {
  display: flex;
  flex-direction: column;
}
.bonus-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}
.bonus-stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ============================================
   MOBILE BONUSES FIX — compact layout
   ============================================ */
@media (max-width: 480px) {
  .bonus-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .bonus-grid-2 {
    grid-template-columns: 1fr;
  }
  .bonus-ref-link {
    flex-direction: column;
  }
  .bonus-ref-input {
    border-radius: 10px 10px 0 0;
  }
  .bonus-ref-link .connect-copy-inline {
    border-radius: 0 0 10px 10px;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .bonus-promo-form {
    flex-direction: column;
  }
}

/* ============================================
   QR MODAL FIX — compact on mobile
   ============================================ */
@media (max-width: 480px) {
  .qr-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .qr-code-wrap {
    padding: 8px;
  }
  .cancel-modal-card {
    padding: 20px;
    margin: 12px;
  }
}

/* ============================================
   SUBSCRIPTION RENEW FIX — wider on PC
   ============================================ */
#renewPlanContainer .plans-grid {
  max-width: 480px;
  margin: 0;
}
@media (min-width: 769px) {
  #renewPlanContainer .plan-card {
    min-width: 320px;
  }
}

/* ============================================
   PAYMENT METHOD ICONS
   ============================================ */
.payment-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.payment-methods img {
  height: 24px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.payment-methods img:hover {
  opacity: 1;
}
.payment-methods-label {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  text-align: center;
  margin-top: 6px;
}
@media (max-width: 480px) {
  .payment-methods {
    gap: 12px;
    flex-wrap: wrap;
  }
  .payment-methods img {
    height: 24px;
  }
}

/* ============================================
   BURGER BUTTON MOBILE FIX
   ============================================ */
@media (max-width: 768px) {
  .dash-header {
    justify-content: space-between;
  }
  .dash-header-right {
    margin-left: auto;
  }
  .dash-sidebar-user { display: flex; }
  .dash-header-user { display: none !important; }
  .dash-burger-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,0.06) !important;
  }
  .dash-burger-btn svg {
    width: 28px !important;
    height: 28px !important;
  }
}

/* ============================================
   MOBILE BONUSES FIX — compact layout
   ============================================ */
@media (max-width: 480px) {
  .bonus-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .bonus-grid-2 {
    grid-template-columns: 1fr;
  }
  .bonus-ref-link {
    flex-direction: column;
  }
  .bonus-ref-input {
    border-radius: 10px 10px 0 0;
  }
  .bonus-ref-link .connect-copy-inline {
    border-radius: 0 0 10px 10px;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .bonus-promo-form {
    flex-direction: column;
  }
}

/* ============================================
   QR MODAL FIX — compact on mobile
   ============================================ */
@media (max-width: 480px) {
  .qr-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .qr-code-wrap {
    padding: 8px;
  }
  .cancel-modal-card {
    padding: 20px;
    margin: 12px;
  }
}

/* ============================================
   SUBSCRIPTION RENEW FIX — wider on PC
   ============================================ */
#renewPlanContainer .plans-grid {
  max-width: 480px;
  margin: 0;
}
@media (min-width: 769px) {
  #renewPlanContainer .plan-card {
    min-width: 320px;
  }
}

/* ============================================
   PAYMENT METHOD ICONS
   ============================================ */
.payment-methods {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.payment-methods img {
  height: 24px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
  opacity: 0.6;
  transition: opacity 0.2s;
}
.payment-methods img:hover {
  opacity: 1;
}
.payment-methods-label {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  text-align: center;
  margin-top: 6px;
}
@media (max-width: 480px) {
  .payment-methods {
    gap: 12px;
    flex-wrap: wrap;
  }
  .payment-methods img {
    height: 24px;
  }
}

/* ============================================
   BURGER BUTTON MOBILE FIX
   ============================================ */
@media (max-width: 768px) {
  .dash-header {
    justify-content: space-between;
  }
  .dash-header-right {
    margin-left: auto;
  }
  .dash-sidebar-user { display: flex; }
  .dash-header-user { display: none !important; }
  .dash-burger-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,0.06) !important;
  }
  .dash-burger-btn svg {
    width: 28px !important;
    height: 28px !important;
  }
}


/* ============================================
   PROMO MOBILE — fix horizontal overflow
   ============================================ */
@media (max-width: 767px) {
  .footer-links {
    flex-wrap: wrap;
    gap: 24px 16px;
  }
  .header-inner {
    padding: 0 12px;
  }
  #pageHome {
    max-width: 100vw;
  }
}
* { -webkit-tap-highlight-color: transparent; }
