@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-alt: #F6F7F9;
  --panel: #FFFFFF;
  --panel-strong: #ECEEF1;
  --line: rgba(0, 0, 0, 0.06);
  --line-strong: rgba(0, 0, 0, 0.12);
  --text: #1E2024;
  --text-muted: #6E727A;
  --muted: #8E9299;
  --kicker: #8E9299;
  --red: #FB3546;
  --red-deep: #E02030;
  --red-glow: rgba(251, 53, 70, 0.28);
  --success: #34C759;
  --danger: #FB3546;
  --radius-card: 24px;
  --radius-btn: 16px;
  --radius-sm: 12px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

/* Interactive Right-Edge Scroll Slider */
.site-scroll-slider {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 18px;
  z-index: 99990;
  touch-action: none;
  user-select: none;
  cursor: pointer;
}
.site-scroll-thumb {
  position: absolute;
  top: 0;
  right: 3px;
  width: 6px;
  height: 52px;
  background: #EE2D44;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(238, 45, 68, 0.45);
  cursor: grab;
  will-change: transform;
  transition: width 0.15s ease, right 0.15s ease, background 0.15s ease;
  touch-action: none;
}
.site-scroll-slider:hover .site-scroll-thumb,
.site-scroll-thumb.is-dragging {
  width: 9px;
  right: 2px;
  background: #DF2037;
  cursor: grabbing;
  box-shadow: 0 2px 12px rgba(238, 45, 68, 0.65);
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

body:before, body:after, body.ambient:before, body.ambient:after, .desktop-login:before, .desktop-login:after {
  display: none !important;
}

a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
[hidden] { display: none !important; }

svg { max-width: 100%; }
img { max-width: 100%; height: auto; }
.desktop-rail, aside.desktop-rail, [aria-label="Навигация на компьютере"] {
  display: none !important;
}
.desktop-only, .desktop-notice, .desktop-center {
  display: none !important;
}
.mobile-only {
  display: block !important;
}
.svg-icon { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; display: inline-block; }

.glass-card {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  border-radius: 22px !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03) !important;
  backdrop-filter: none !important;
}

.device-pictograms {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  margin: 14px 0 !important;
}
.device-pictograms svg {
  width: 24px !important;
  height: 24px !important;
  color: var(--muted) !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
}

/* Payment Status Screen */
.payment-panel {
  display: flex;
  flex-direction: column;
}

.payment-status-card {
  padding: 24px 20px 20px !important;
  border-radius: var(--radius-card, 20px) !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
  margin-bottom: 8px;
}

.payment-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4px 0 0;
}

.payment-pulse-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 4px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.payment-pulse {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 53, 70, 0.3) 0%, rgba(251, 53, 70, 0.06) 60%, transparent 72%);
  animation: paymentPulseRing 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes paymentPulseRing {
  0% {
    transform: scale(0.75);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.45;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.payment-pulse-core {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FB3546 0%, #DE182A 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(251, 53, 70, 0.38);
  z-index: 2;
  transition: all 0.3s ease;
}

.payment-pulse-icon {
  width: 24px;
  height: 24px;
  display: none;
}

.icon-pending {
  animation: iconBreathe 2.4s ease-in-out infinite;
}

@keyframes iconBreathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.9); opacity: 0.85; }
}

/* Tone handling */
.payment-state:not([data-tone="success"]):not([data-tone="danger"]) .icon-pending,
.payment-state[data-tone="pending"] .icon-pending,
[data-order-status]:not([data-tone="success"]):not([data-tone="danger"]) .icon-pending,
[data-order-status][data-tone="pending"] .icon-pending {
  display: block;
}

[data-order-status][data-tone="success"] .payment-pulse,
.payment-state[data-tone="success"] .payment-pulse {
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, rgba(16, 185, 129, 0.06) 60%, transparent 72%);
  animation: none;
  opacity: 0.8;
}

[data-order-status][data-tone="success"] .payment-pulse-core,
.payment-state[data-tone="success"] .payment-pulse-core {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.42);
}

[data-order-status][data-tone="success"] .icon-pending,
.payment-state[data-tone="success"] .icon-pending {
  display: none !important;
}
[data-order-status][data-tone="success"] .icon-danger,
.payment-state[data-tone="success"] .icon-danger {
  display: none !important;
}
[data-order-status][data-tone="success"] .icon-success,
.payment-state[data-tone="success"] .icon-success {
  display: block !important;
}

[data-order-status][data-tone="success"] .payment-state h2,
.payment-state[data-tone="success"] h2 {
  color: #059669 !important;
}

[data-order-status][data-tone="danger"] .payment-pulse,
.payment-state[data-tone="danger"] .payment-pulse {
  display: none !important;
}

[data-order-status][data-tone="danger"] .payment-pulse-core,
.payment-state[data-tone="danger"] .payment-pulse-core {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

[data-order-status][data-tone="danger"] .icon-pending,
.payment-state[data-tone="danger"] .icon-pending {
  display: none !important;
}
[data-order-status][data-tone="danger"] .icon-success,
.payment-state[data-tone="danger"] .icon-success {
  display: none !important;
}
[data-order-status][data-tone="danger"] .icon-danger,
.payment-state[data-tone="danger"] .icon-danger {
  display: block !important;
}

[data-order-status][data-tone="danger"] .payment-state h2,
.payment-state[data-tone="danger"] h2 {
  color: #DC2626 !important;
}

.payment-state h2 {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  margin: 0 0 6px !important;
  text-align: center !important;
  line-height: 1.25 !important;
}

.payment-state p {
  font-size: 13.5px !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
  text-align: center !important;
  max-width: 290px;
  line-height: 1.45 !important;
}

.payment-card-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.07);
  margin: 22px 0 16px;
}

.order-summary-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 4px !important;
}

.order-summary-row span {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--text-muted) !important;
}

.order-summary-row strong {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: var(--red) !important;
  letter-spacing: -0.02em !important;
}


.skip {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  background: #fff;
  color: #111;
  padding: .7rem 1rem;
  border-radius: .7rem;
}
.skip:focus { top: 1rem; }

/* Global Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
  box-sizing: border-box;
  text-decoration: none;
  box-shadow: none !important;
}
.button:hover { transform: translateY(-1px); box-shadow: none !important; }
.button:active { transform: scale(.98); box-shadow: none !important; }

.primary-button {
  background: var(--red) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  border: none !important;
}
.primary-button:hover {
  background: #E02030 !important;
  box-shadow: none !important;
}

.quiet-button {
  background: var(--surface-alt) !important;
  border-color: transparent !important;
  color: var(--text) !important;
}
.quiet-button:hover {
  background: #E2E4E8 !important;
}

.full { width: 100%; }
.stack { display: grid; gap: 12px; }
.kicker {
  display: block;
  color: var(--kicker);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.1px;
}
.muted { color: var(--text-muted); line-height: 1.5; }

/* ========================================================== */
/* 1. LANDING PAGE (Desktop & Mobile)                         */
/* ========================================================== */
.login-page { background: var(--bg); color: var(--text); }

/* Desktop View */
@media (min-width: 1024px) {
  .mobile-login { display: none !important; }
  .desktop-login {
    display: grid !important;
    grid-template-rows: auto 1fr auto;
    width: min(100% - 64px, 1100px);
    min-height: 100dvh;
    margin: 0 auto;
    padding: 32px 0 24px;
    box-sizing: border-box;
  }
  .desktop-login-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .desktop-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
  }
  .desktop-login-head a:last-child {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
  }
  .desktop-login-head a:last-child:hover { color: var(--text); }

  .desktop-login-main {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 56px;
    padding: 60px 0;
  }
  .desktop-login-kicker {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--kicker);
    margin-bottom: 18px;
  }
  .desktop-login-copy h1 {
    font-size: clamp(52px, 5vw, 76px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -1.8px;
    color: var(--text);
    margin: 0 0 22px;
  }
  .desktop-login-copy p {
    font-size: 17px;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 0 32px;
  }
  .desktop-login-actions { display: flex; align-items: center; gap: 14px; }
  .desktop-try-btn {
    min-height: 56px !important;
    padding: 0 40px !important;
    font-size: 16.5px !important;
    font-weight: 800 !important;
    border-radius: 18px !important;
    background: var(--red) !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
  }
  .desktop-login-copy small {
    display: block;
    margin-top: 18px;
    font-size: 12px;
    color: var(--muted);
  }
  .desktop-login-copy small a { color: var(--text); text-decoration: underline; }

  .desktop-login-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
  }
  .desktop-login-halo {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 53, 70,0.14) 0%, rgba(251, 53, 70,0.02) 60%, transparent 70%);
    pointer-events: none;
  }
  .desktop-login-logo {
    width: 170px;
    height: 170px;
    border-radius: 40px;
    object-fit: cover;
    box-shadow: 0 20px 50px rgba(251, 53, 70,0.25);
    z-index: 1;
  }
  .desktop-benefit {
    position: absolute;
    width: 175px;
    padding: 16px 18px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
    z-index: 2;
  }
  .desktop-benefit span { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
  .desktop-benefit strong { display: block; font-size: 19px; font-weight: 800; color: var(--red); margin: 3px 0; }
  .desktop-benefit small { display: block; font-size: 11px; color: var(--text-muted); line-height: 1.35; }
  .desktop-benefit-speed { top: 30px; right: 10px; }
  .desktop-benefit-trial { bottom: 30px; left: 10px; }

  .desktop-login-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid rgba(0,0,0,0.06);
    font-size: 13px;
    color: var(--muted);
  }
  .desktop-login-footer a { color: var(--text-muted); }
  .desktop-login-footer a:hover { color: var(--text); }
}

/* Mobile Landing View */
@media (max-width: 1023px) {
  .desktop-login { display: none !important; }
  .mobile-login { display: block !important; }

  /* Mobile Top Header */
  .mobile-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: max(16px, env(safe-area-inset-top)) 24px 12px;
    background: #FFFFFF;
    position: relative;
    z-index: 50;
  }
  .mobile-top-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
  }
  .mobile-top-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
  }
  .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 20px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #111111;
    border-radius: 4px;
  }

  /* Mobile Hero Section (Screenshot match) */
  .mobile-hero-section {
    padding: 20px 24px 14px;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    box-sizing: border-box;
    border-bottom: none;
  }
  .mobile-hero-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(32px, 8.8vw, 40px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.035em;
    color: #111111;
    margin: 8px 0 24px;
    text-align: left;
  }

  /* Mobile Hero CTA Button with FREE badge */
  .mobile-hero-cta {
    position: relative;
    display: inline-flex;
    margin-bottom: 20px;
  }
  .mobile-hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #EE2D44;
    color: #FFFFFF !important;
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 800;
    padding: 16px 36px;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: none !important;
    position: relative;
    transition: transform 0.15s ease, background 0.15s ease;
  }
  .mobile-hero-btn:active {
    transform: scale(0.97);
    box-shadow: none !important;
  }
  .mobile-hero-btn:hover {
    background: #DF2037;
    box-shadow: none !important;
  }

  /* FREE Badge */
  .mobile-hero-badge {
    position: absolute;
    top: -14px;
    right: -12px;
    background: #545760;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    padding: 4px 10px;
    border-radius: 7px;
    transform: rotate(13deg);
    transform-origin: center center;
    box-shadow: none !important;
    pointer-events: none;
    line-height: 1.2;
  }

  /* Verified line */
  .mobile-hero-verified {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 1.4;
    color: #555555;
    margin: 0;
    text-align: left;
    font-weight: 500;
  }
  .mobile-hero-verified .verified-date {
    font-weight: 600;
    color: #333333;
    border-bottom: 2.5px solid #22C55E;
    padding-bottom: 1px;
    display: inline-block;
  }

  .seo-content {
    margin: 8px 16px 40px !important;
    padding: 24px 20px !important;
    border-radius: 28px !important;
    background: #FFFFFF !important;
    border: 1.5px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.02) !important;
  }

  /* Bottom Blocks Shell */
  .mobile-login-shell {
    width: min(100% - 32px, 460px);
    margin: 0 auto;
    padding: 24px 0 44px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
  }
  .mobile-login-hero { text-align: center; margin-bottom: 22px; }
  .mobile-login-hero h1 { font-size: 26px; font-weight: 900; color: var(--text); margin: 8px 0 4px; letter-spacing: -0.4px; }
  .mobile-login-hero p { font-size: 14px; color: var(--text-muted); margin: 0; }
  
  .mobile-benefits {
    background: var(--surface-alt);
    border-radius: 22px;
    padding: 20px 18px;
    margin-bottom: 12px;
  }
  .mobile-benefits ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
  .mobile-benefits li { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--text); }
  .mobile-benefits svg { width: 20px; height: 20px; color: var(--red); flex-shrink: 0; }

  .mobile-referral {
    background: var(--surface-alt);
    border-radius: 22px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
  }
  .mobile-referral svg { width: 22px; height: 22px; color: var(--success); flex-shrink: 0; }
  .mobile-referral p { margin: 0; font-size: 13px; color: var(--text); line-height: 1.45; }

  .mobile-tariff-note { text-align: center; font-size: 12.5px; color: var(--text-muted); margin: 0 0 16px; }
  .mobile-try-btn {
    width: 100% !important;
    min-height: 52px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    border-radius: 16px !important;
    background: var(--red) !important;
    color: #FFFFFF !important;
    box-shadow: none !important;
  }
  .mobile-rules-button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 18px;
    cursor: pointer;
    text-decoration: underline;
  }
}

/* SEO Content Section */
.seo-content {
  width: min(100% - 32px, 920px);
  margin: 20px auto 60px;
  padding: 36px 32px;
  background: #FFFFFF;
  border-radius: 28px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.02);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}
.seo-kicker {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 800;
  color: #EE2D44;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: rgba(238, 45, 68, 0.08);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.seo-intro h1 { font-size: 26px; font-weight: 800; color: var(--text); margin: 6px 0 12px; }
.seo-intro p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin: 0; }
.seo-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 28px 0;
}
.seo-benefits article {
  background: var(--surface-alt);
  border-radius: 18px;
  padding: 18px 20px;
}
.seo-benefits svg { width: 24px; height: 24px; color: var(--red); margin-bottom: 8px; stroke: currentColor; stroke-width: 2; fill: none; }
.seo-benefits h2 { font-size: 16px; font-weight: 800; color: var(--text); margin: 0 0 6px; }
.seo-benefits p { font-size: 13px; color: var(--text-muted); line-height: 1.45; margin: 0; }

.seo-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.seo-heading h2 { font-size: 22px; font-weight: 800; color: var(--text); margin: 6px 0; }
.seo-heading p { font-size: 13.5px; color: var(--text-muted); margin: 0 0 18px; }

.seo-tariffs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.seo-tariffs article {
  padding: 16px 18px;
  background: var(--surface-alt);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid transparent;
}
.seo-tariffs article.featured {
  background: #FFFFFF;
  border-color: var(--red);
  box-shadow: 0 6px 20px rgba(251, 53, 70, 0.1);
}
.seo-tariffs span { font-size: 14.5px; font-weight: 700; }
.seo-tariffs strong { font-size: 17px; font-weight: 800; color: var(--red); }

.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.platform-list span {
  padding: 8px 18px;
  background: var(--surface-alt);
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.seo-steps {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.seo-steps li {
  background: var(--surface-alt);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.seo-steps li > span {
  font-size: 16px;
  font-weight: 900;
  color: var(--red);
}
.seo-steps strong { font-size: 15px; font-weight: 800; color: var(--text); display: block; margin-bottom: 4px; }
.seo-steps p { font-size: 12.5px; color: var(--text-muted); line-height: 1.45; margin: 0; }

.seo-faq details {
  background: var(--surface-alt);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.seo-faq summary {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.seo-faq details p {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.seo-cta {
  margin-top: 36px;
  padding: 28px 24px;
  background: linear-gradient(135deg, rgba(251, 53, 70, 0.08), rgba(251, 53, 70, 0.02));
  border: 1.5px solid rgba(251, 53, 70, 0.2);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}
.seo-cta h2 { font-size: 22px; font-weight: 900; color: var(--text); margin: 4px 0; }
.seo-cta p { font-size: 14px; color: var(--text-muted); margin: 0; }
.seo-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ========================================================== */
/* 2. AUTH SCREEN (Login / Register)                          */
/* ========================================================== */
.auth-page { background: var(--bg); min-height: 100dvh; }
.auth-page-shell {
  width: min(100% - 32px, 460px);
  margin: 0 auto;
  padding: 24px 0 44px;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  box-sizing: border-box;
}
.auth-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 24px;
}
.auth-back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.auth-back-button:hover { color: var(--text); }
.auth-page-logo { height: 32px; width: auto; object-fit: contain; }

.app-style-card, .auth-card {
  background: #FFFFFF !important;
  border-radius: 28px !important;
  padding: 34px 24px !important;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.04) !important;
  box-sizing: border-box !important;
}
.app-auth-brand-badge {
  width: 82px;
  height: 82px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(251, 53, 70, 0.12);
}
.app-auth-claw-img { width: 54px; height: 54px; object-fit: contain; }
.app-auth-title {
  font-size: 26px !important;
  font-weight: 900 !important;
  letter-spacing: -0.5px !important;
  color: var(--text) !important;
  margin: 0 0 4px !important;
  text-align: center !important;
}
.app-auth-subtitle {
  font-size: 13.5px !important;
  line-height: 1.5 !important;
  color: var(--text-muted) !important;
  margin: 0 auto 22px !important;
  text-align: center !important;
  max-width: 32ch !important;
}
.app-auth-tabs, .auth-tabs {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  background: var(--surface-alt) !important;
  border-radius: 14px !important;
  padding: 4px !important;
  gap: 4px !important;
  margin-bottom: 20px !important;
}
.app-auth-tabs .auth-tab, .auth-tab {
  border: none !important;
  background: transparent !important;
  color: var(--text-muted) !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  padding: 10px !important;
  border-radius: 11px !important;
  cursor: pointer !important;
  transition: all .2s !important;
}
.app-auth-tabs .auth-tab.active, .auth-tab.active {
  background: #FFFFFF !important;
  color: var(--text) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.auth-form { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.auth-form .field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.auth-form .field label { font-size: 13px; font-weight: 700; color: var(--text); }
.auth-form .field input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--surface-alt);
  border: 1.5px solid transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  box-sizing: border-box;
  outline: none;
  transition: all .2s;
}
.auth-form .field input:focus {
  background: #FFFFFF;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(251, 53, 70, 0.15);
}
.auth-code-input {
  text-align: center !important;
  font-size: 24px !important;
  letter-spacing: 8px !important;
  font-weight: 800 !important;
  font-family: monospace !important;
}
.auth-code-hint { color: var(--text-muted); font-size: 13px; text-align: center; margin: 0 0 6px; }
.auth-code-hint b { color: var(--text); }
.auth-error-msg {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(251, 53, 70, 0.1);
  border: 1px solid rgba(251, 53, 70, 0.25);
  color: var(--red);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}
.auth-divider {
  display: flex;
  align-items: center;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-divider:before, .auth-divider:after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-strong);
}
.auth-divider span { padding: 0 12px; }

.telegram-auth-btn {
  width: 100% !important;
  min-height: 48px !important;
  gap: 10px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  background: var(--surface-alt) !important;
  color: #229ED9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.telegram-auth-btn:hover { background: #E2E4E8 !important; }

.text-link {
  background: none;
  border: none;
  padding: 6px;
  color: var(--red);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.text-link:hover { text-decoration: underline; }

.auth-page-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.auth-page-footer a { color: var(--text); text-decoration: underline; }

/* ========================================================== */
/* 3. CABINET & DASHBOARD (Exact App Design)                  */
/* ========================================================== */
.app-cabinet-container {
  width: min(100% - 32px, 460px);
  margin: 0 auto;
  padding: 20px 0 44px;
  min-height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
.app-cabinet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 18px;
}
.app-cabinet-brand { display: flex; align-items: center; }
.app-top-logo { height: 34px; width: auto; object-fit: contain; }
.app-header-actions { display: flex; align-items: center; gap: 10px; }
.app-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-alt);
  color: var(--text);
  border: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all .15s;
}
.app-icon-btn:hover { background: #E2E4E8; }
.app-cabinet-main { display: flex; flex-direction: column; gap: 14px; }

/* Profile Card */
.app-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--surface-alt);
  border-radius: 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}
.app-avatar-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--red);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.app-profile-info { min-width: 0; flex: 1; }
.app-profile-name { font-size: 16.5px; font-weight: 800; color: var(--text); }
.app-profile-email { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* Subscription Card */
.app-subscription-card {
  padding: 22px 20px;
  background: #FFFFFF;
  border: 1.5px solid var(--red);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(251, 53, 70, 0.08);
}
.app-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.app-sub-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.app-status-badge {
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(52, 199, 89, 0.12);
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.app-status-badge.expired {
  background: rgba(251, 53, 70, 0.12);
  color: var(--red);
}
.app-sub-days { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.4px; margin-bottom: 4px; }
.app-sub-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.app-sub-btn { width: 100% !important; min-height: 50px !important; gap: 8px !important; }
.app-sub-recurring {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.app-recurring-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.app-recurring-icon {
  font-size: 20px;
  line-height: 1;
}
.app-recurring-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}
.app-recurring-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.cancel-subscription-btn {
  align-self: flex-start;
  font-size: 12.5px;
  color: #FB3546;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  opacity: 0.88;
  transition: opacity 0.15s ease;
}
.cancel-subscription-btn:hover {
  opacity: 1;
}
.cancel-subscription-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.app-key-card {
  padding: 18px 20px;
  background: var(--surface-alt);
  border-radius: 22px;
}
.app-key-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.app-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 11px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  transition: all .15s;
}
.app-copy-btn:hover { background: #F0F2F5; }
.app-key-code {
  display: block;
  padding: 13px 15px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-family: monospace;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 14px;
}
.app-connect-vpn-btn {
  width: 100% !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  color: var(--text) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
  gap: 8px !important;
  min-height: 48px !important;
}
.app-connect-vpn-btn:hover { background: #F0F2F5 !important; }

/* Menu Sections */
.app-menu-section { margin-top: 8px; }
.app-section-kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.1px;
  color: var(--kicker);
  margin-bottom: 8px;
  padding-left: 4px;
  text-transform: uppercase;
}
.app-menu-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-alt);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.02);
}
.app-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  color: var(--text);
  text-decoration: none;
  transition: background-color .15s;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.app-menu-item:last-child { border-bottom: none; }
.app-menu-item:hover { background-color: rgba(255, 255, 255, 0.7); }
.app-menu-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.app-menu-text { flex: 1; min-width: 0; }
.app-menu-title { font-size: 15px; font-weight: 800; color: var(--text); }
.app-menu-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.app-menu-arrow { font-size: 20px; color: #B0B4BA; font-weight: 700; }
.app-badge-pill {
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(52, 199, 89, 0.12);
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
}
.app-action-link {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--red);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}
.app-action-link:hover { background: #F0F2F5; }

/* ========================================================== */
/* 4. BILLING & PAYMENTS                                      */
/* ========================================================== */
.app-shell {
  width: min(100% - 32px, 460px);
  margin: 0 auto;
  padding: 20px 0 max(64px, env(safe-area-inset-bottom, 44px));
  min-height: 100dvh;
  box-sizing: border-box;
}
body[data-page="devices"] .app-shell {
  width: min(100% - 32px, 860px);
}
body[data-app-page="referrals"] .app-shell {
  width: min(100% - 32px, 560px);
}
.page-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 8px 0 20px;
  position: relative;
}
.page-back-btn, .page-head > a {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.page-back-btn:hover, .page-head > a:hover { color: var(--text); }
.page-head-title, .page-head > span {
  justify-self: center;
  text-align: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}
.page-head > .icon-button, .page-head > :last-child {
  justify-self: end;
}
.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-alt) !important;
  border: none !important;
  color: var(--text) !important;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: all .15s;
}
.icon-button:hover { background: #E2E4E8 !important; }
.icon-button svg, .icon-button .svg-icon {
  width: 20px !important;
  height: 20px !important;
  stroke: var(--text) !important;
  stroke-width: 2 !important;
  fill: none !important;
}

.page-title h1 { font-size: 26px; font-weight: 900; color: var(--text); margin: 6px 0; letter-spacing: -0.4px; }
.page-title p { font-size: 13.5px; color: var(--text-muted); margin: 0 0 20px; }

.tariff-carousel, .plans {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.plan {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 3px;
  padding: 15px 18px;
  border-radius: 18px;
  background: var(--surface-alt);
  border: 2px solid transparent;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
  box-sizing: border-box;
}

.plan:hover {
  background: #EAEAEF;
}

.plan.active {
  background: #FFFFFF;
  border-color: var(--red);
  box-shadow: 0 8px 24px rgba(251, 53, 70, 0.12);
}

.plan span {
  grid-column: 1;
  grid-row: 1;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap;
}

.plan em {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2.5px 7px;
  border-radius: 6px;
  background: rgba(251, 53, 70, 0.12);
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  font-style: normal;
  line-height: 1.2;
  white-space: nowrap;
}

.plan small {
  grid-column: 1 / span 2;
  grid-row: 2;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.25;
  white-space: nowrap;
  margin-top: 1px;
}

.plan strong {
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.plan.active strong {
  color: var(--red);
}

/* VIP Lifetime Plan with Gleam / Shimmer Highlights */
.plan[data-duration="36500"] {
  position: relative;
  overflow: hidden;
  border-color: rgba(251, 53, 70, 0.22);
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF8F9 100%);
  box-shadow: 0 4px 16px rgba(251, 53, 70, 0.06);
}

.plan[data-duration="36500"]::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -130%;
  width: 70%;
  height: 220%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 15%,
    rgba(255, 255, 255, 0.75) 48%,
    rgba(251, 53, 70, 0.28) 52%,
    rgba(255, 255, 255, 0.85) 56%,
    rgba(255, 255, 255, 0) 85%,
    transparent 100%
  );
  transform: rotate(25deg);
  pointer-events: none;
  animation: lifetimeGleam 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes lifetimeGleam {
  0% {
    left: -130%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  30% {
    left: 170%;
    opacity: 0.9;
  }
  40%, 100% {
    left: 170%;
    opacity: 0;
  }
}

.plan[data-duration="36500"]:hover {
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF2F4 100%);
  border-color: rgba(251, 53, 70, 0.35);
}

.plan[data-duration="36500"].active {
  background: linear-gradient(135deg, #FFF5F6 0%, #FFFFFF 100%);
  border-color: var(--red);
  box-shadow: 0 8px 26px rgba(251, 53, 70, 0.2);
}

.plan[data-duration="36500"] em {
  background: linear-gradient(135deg, #FFF0F2 0%, #FFE4E7 100%);
  color: var(--red);
  border: 1px solid rgba(251, 53, 70, 0.28);
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(251, 53, 70, 0.1);
}

.plan-discount-tag {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  background: #10B981 !important;
  color: #FFFFFF !important;
  border-radius: 6px !important;
  padding: 2.5px 7px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  border: none !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25) !important;
}

.plan-old-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  margin-right: 5px;
  opacity: 0.75;
}

.lifetime-discount-banner {
  background: #F0FDF4;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #065F46;
  line-height: 1.45;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.06);
}

.lifetime-discount-banner svg {
  color: #10B981;
  flex-shrink: 0;
}

@media (max-width: 360px) {
  .plan {
    padding: 12px 14px;
    column-gap: 6px;
  }
  .plan span {
    font-size: 14.5px;
  }
  .plan em {
    font-size: 10px;
    padding: 2px 5px;
  }
  .plan strong {
    font-size: 17.5px;
  }
  .plan small {
    font-size: 11.5px;
  }
}

.device-picker {
  background: var(--surface-alt) !important;
  border-radius: 22px !important;
  padding: 18px 20px !important;
  border: none !important;
  margin-bottom: 16px !important;
}
.device-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 14px 0 8px;
}
.device-stepper button {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid rgba(0,0,0,0.06);
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.15s ease;
  display: grid;
  place-items: center;
}
.device-stepper button:hover {
  background: #F4F5F7;
}
.device-stepper button:active {
  transform: scale(0.94);
}
.device-stepper button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}
.device-stepper strong { font-size: 24px; font-weight: 800; color: var(--text); }
.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 14px;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
}
.total-row strong { font-size: 22px; font-weight: 900; color: var(--text); white-space: nowrap; }

/* Dialogs */
.legal-dialog {
  border: none;
  background: transparent;
  padding: 0;
  width: min(calc(100% - 32px), 460px);
  margin: auto;
  outline: none;
}
.legal-dialog:focus {
  outline: none;
}
.legal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.legal-dialog-card {
  background: #FFFFFF;
  border-radius: 26px;
  padding: 26px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16);
  border: 1px solid var(--border);
  box-sizing: border-box;
  width: 100%;
}
.legal-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.legal-dialog-head h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
  letter-spacing: -0.02em;
}
.legal-dialog-head button {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  outline: none;
  -webkit-tap-highlight-color: transparent;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  padding: 0;
  box-sizing: border-box;
}
.legal-dialog-head button:hover {
  background: #EAEAEF;
  color: var(--text);
}
.legal-dialog-head button:focus {
  outline: none;
}
.legal-dialog-head button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.legal-dialog-head button svg,
.legal-dialog-head svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  min-height: 18px;
  stroke: currentColor;
  fill: none;
  display: block;
}
.legal-lead {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 16px;
}
.legal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.legal-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  box-sizing: border-box;
}
.legal-list a:hover {
  background: #ECECED;
  border-color: #DFDFE2;
}
.legal-list a:active {
  transform: scale(0.985);
}
.legal-list a span {
  flex: 1;
  padding-right: 12px;
  line-height: 1.35;
}
.legal-list a svg {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex-shrink: 0;
  stroke: var(--text-muted);
  fill: none;
  display: block;
  transition: stroke 0.15s, transform 0.15s;
}
.legal-list a:hover svg {
  stroke: var(--accent);
  transform: translateX(2px);
}
.legal-contact {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.legal-contact a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.legal-contact a:hover {
  text-decoration: underline;
}

/* Toast */
.toast {
  position: fixed;
  z-index: 999999;
  left: 50%;
  bottom: 36px;
  transform: translate(-50%, 12px);
  background: #1E2024;
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all .2s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Mobile Drawer Menu (White & Red Theme) */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: #FFFFFF;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px 0 0 24px;
  z-index: 99999;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  box-shadow: -10px 0 36px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}
.mobile-menu-drawer.open {
  transform: translateX(0);
}
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  margin-bottom: 18px;
}
.mobile-menu-brand {
  display: flex;
  align-items: center;
}
.mobile-menu-brand img {
  height: 30px;
  width: auto;
  object-fit: contain;
}
.mobile-menu-close {
  background: var(--surface-alt);
  border: none;
  color: var(--text);
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 12px;
  transition: all .15s;
}
.mobile-menu-close:hover { background: #E2E4E8; }
.mobile-menu-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
}
.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
  transition: all .15s ease;
}
.mobile-menu-link svg {
  width: 22px;
  height: 22px;
  color: var(--muted);
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.mobile-menu-link:hover, .mobile-menu-link.active {
  background: rgba(251, 53, 70, 0.1);
  color: var(--red);
}
.mobile-menu-link:hover svg, .mobile-menu-link.active svg {
  color: var(--red);
}
.mobile-menu-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: auto;
}
.mobile-menu-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  color: var(--red);
  background: rgba(251, 53, 70, 0.08);
  border: 1px solid rgba(251, 53, 70, 0.18);
  border-radius: 14px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 800;
  transition: all .15s ease;
}
.mobile-menu-logout:hover { background: rgba(251, 53, 70, 0.15); }
.mobile-menu-logout svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}



/* ==========================================================================
   Common Form Fields, Modals & Dialogs (Password, Confirm, Toast)
   ========================================================================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  text-align: left;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--surface-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field input:focus {
  background: #FFFFFF;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.password-dialog .legal-dialog-card {
  max-width: 440px;
}
.password-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.ghost-button {
  background: transparent !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--line-strong) !important;
}
.ghost-button:hover {
  background: var(--surface-alt) !important;
  color: var(--text) !important;
}
.toast {
  position: fixed;
  z-index: 999;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: #1E2024;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Flow & Page Header */
.flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  margin-bottom: 20px;
}
.flow-back {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-alt);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: 0.2s;
  text-decoration: none;
}
.flow-back:hover {
  background: #E2E4E8;
}
.flow-back .svg-icon {
  width: 20px;
  height: 20px;
}
.text-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  padding: 6px 10px;
}

/* ==========================================================================
   Devices Management (devices.html)
   ========================================================================== */
.devices-desktop-grid {
  display: grid;
  gap: 24px;
  margin-top: 10px;
}
@media (min-width: 900px) {
  .devices-desktop-grid {
    grid-template-columns: 380px minmax(0, 1fr);
    align-items: start;
  }
}
.device-limit-card {
  background: #FFFFFF;
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.limit-overview span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}
.limit-overview strong {
  font-size: 26px;
  font-weight: 900;
  color: var(--text);
  display: block;
  margin: 2px 0;
}
.limit-overview small {
  font-size: 12px;
  color: var(--text-muted);
}
.limit-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface-alt);
  border-radius: 18px;
}
.limit-control span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.limit-estimate {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}
.limit-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.limit-total span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.limit-total strong {
  font-size: 24px;
  font-weight: 900;
  color: var(--red);
}

.managed-device-section {
  margin-top: 24px;
}
@media (min-width: 900px) {
  .managed-device-section {
    margin-top: 0;
  }
}
.managed-device-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.managed-device-heading h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 2px 0 0;
  color: var(--text);
}
.managed-device-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.device-usage-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--surface-alt);
  color: var(--text);
}
.managed-device-retry {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #FFFFFF;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.managed-device-list {
  display: grid;
  gap: 12px;
}
@media (min-width: 600px) {
  .managed-device-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.managed-device-card {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.managed-device-card:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
}
.managed-device-icon, .managed-device-empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: rgba(251, 53, 70, 0.1);
  color: var(--red);
  display: grid;
  place-items: center;
}
.managed-device-icon svg, .managed-device-empty-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.managed-device-copy {
  min-width: 0;
}
.managed-device-copy b {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.managed-device-copy small {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.managed-device-action {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--surface-alt);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.2s;
}
.managed-device-action:hover {
  background: rgba(251, 53, 70, 0.12);
  border-color: rgba(251, 53, 70, 0.25);
  color: var(--red);
}
.managed-device-action span {
  display: none;
}
.managed-device-action .svg-icon {
  width: 18px;
  height: 18px;
}
.device-management-skeleton {
  min-height: 80px;
  border-radius: 20px;
  background: linear-gradient(90deg, #ECEEF1 25%, #F7F7F8 50%, #ECEEF1 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.device-management-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: #FFFFFF;
  border-radius: 24px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.managed-device-empty-icon {
  width: 60px;
  height: 60px;
  border-radius: 20px;
}
.managed-device-empty-copy b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.managed-device-empty-copy small {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
}
.device-empty-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 14px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 8px;
  transition: 0.2s;
}
.device-empty-action:hover {
  background: #E2E4E8;
}

/* Device Confirm Dialog */
.device-confirm-dialog {
  border: none;
  background: transparent;
  padding: 0;
  width: min(calc(100% - 32px), 480px);
}
.device-confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}
.device-confirm-card {
  background: #FFFFFF;
  border-radius: 26px;
  padding: 28px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.device-confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(251, 53, 70, 0.12);
  color: var(--red);
  display: grid;
  place-items: center;
}
.device-confirm-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.device-confirm-card h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}
.device-confirm-card p {
  font-size: 13.5px;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
}
.device-confirm-card small {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}
.device-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  margin-top: 8px;
}

/* ==========================================================================
   Referral & Bonuses Page (referrals.html)
   ========================================================================== */
.referral-dashboard {
  max-width: 600px;
  margin: 0 auto;
  padding-bottom: 80px;
}
.referral-hero {
  text-align: center;
  padding: 10px 0 24px;
}
.referral-hero-icon {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: rgba(251, 53, 70, 0.1);
  color: var(--red);
  display: grid;
  place-items: center;
  margin: 14px auto 16px;
}
.referral-hero-icon .svg-icon {
  width: 28px;
  height: 28px;
}
.referral-hero h1 {
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 900;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}
.referral-hero p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.bonus-task-card {
  background: #FFFFFF;
  border-radius: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  margin-bottom: 16px;
}
.bonus-task-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.bonus-task-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
}
.bonus-task-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  background: #EBFBF0;
  color: #1B873F;
}
.bonus-task-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 14px;
}
.bonus-task-desc b {
  color: var(--text);
}
.bonus-task-tg-notice {
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 14px;
}
.bonus-task-tg-notice a {
  color: #229ED9;
  font-weight: 600;
  text-decoration: underline;
}
.bonus-task-actions {
  display: flex;
  gap: 10px;
}
.bonus-task-actions .button {
  flex: 1;
}
.bonus-status-claimed {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #EBFBF0;
  color: #1B873F;
  font-weight: 700;
  font-size: 13.5px;
}

.bonus-task-badge.highlight {
  background: rgba(251, 53, 70, 0.12);
  color: var(--red);
}

.referral-main-card,
.referral-link-card {
  background: #FFFFFF;
  border-radius: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
  margin-bottom: 16px;
}
.referral-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.referral-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}
.referral-card-title .svg-icon {
  width: 22px;
  height: 22px;
}

.referral-rewards-banner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  background: var(--surface-alt);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.reward-col {
  display: flex;
  align-items: center;
  gap: 10px;
}
.reward-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}
.reward-info {
  display: flex;
  flex-direction: column;
}
.reward-who {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.reward-value {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
}
.reward-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 1px;
}
.reward-divider {
  width: 1px;
  height: 38px;
  background: var(--line);
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.referral-stats > div,
.stat-box {
  background: var(--surface-alt);
  border-radius: 16px;
  padding: 12px 6px;
  text-align: center;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.stat-box.highlight {
  background: rgba(251, 53, 70, 0.04);
  border-color: rgba(251, 53, 70, 0.18);
}
.referral-stats span,
.stat-label {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: block;
  margin-bottom: 2px;
}
.referral-stats strong,
.stat-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
  display: block;
  line-height: 1.2;
}
.referral-stats strong i,
.stat-val i {
  font-style: normal;
  color: var(--red);
}
.stat-hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.2;
}

.referral-link-section {
  margin-top: 4px;
}
.referral-section-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 8px;
}
.referral-tabs {
  display: flex;
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 6px;
}
.referral-tabs button {
  flex: 1;
  min-height: 38px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.referral-tabs button .svg-icon {
  width: 16px;
  height: 16px;
}
.referral-tabs button.active {
  background: #FFFFFF;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.referral-tab-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.45;
}

.referral-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 6px 6px 6px 14px;
  margin-bottom: 12px;
}
.referral-link-row span {
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.referral-link-row button {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: none;
  background: #FFFFFF;
  color: var(--red);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: 0.15s ease;
}
.referral-link-row button:hover {
  transform: scale(1.05);
}

.referral-actions-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
}
.referral-tg-btn {
  background: linear-gradient(135deg, #229ED9 0%, #1585BA 100%) !important;
  color: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.3) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.referral-tg-btn:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}
.referral-share-btn,
.referral-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 440px) {
  .referral-rewards-banner {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .reward-divider {
    width: 100%;
    height: 1px;
  }
  .referral-actions-row {
    grid-template-columns: 1fr;
  }
}

.referral-how {
  background: #FFFFFF;
  border-radius: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}
.referral-how h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--text);
}
.referral-how ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.referral-how li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.referral-how li > span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(251, 53, 70, 0.1);
  color: var(--red);
  font-weight: 800;
  font-size: 15px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.referral-how li b {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}
.referral-how li p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ==========================================================================
   Setup & Instructions (setup.html & instructions.html)
   ========================================================================== */
.setup-shell, .instruction-shell {
  max-width: 520px;
  margin: 0 auto;
  padding-bottom: 80px;
}
.setup-panel, .instruction-panel {
  text-align: center;
}
.setup-hero-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: rgba(251, 53, 70, 0.1);
  color: var(--red);
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
}
.setup-hero-icon .svg-icon {
  width: 32px;
  height: 32px;
}
.setup-panel h1, .instruction-panel h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}
.setup-panel > p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 24px;
}
.setup-choices {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.setup-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: #FFFFFF;
  border-radius: 20px;
  border: 1.5px solid var(--line);
  cursor: pointer;
  text-align: left;
  transition: 0.15s ease;
}
.setup-choice span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.setup-choice span b {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.setup-choice span small {
  font-size: 12px;
  color: var(--text-muted);
}
.setup-choice > .svg-icon {
  width: 26px;
  height: 26px;
  color: var(--text-muted);
  transition: 0.15s ease;
}
.setup-choice:hover {
  background: #FAFAFB;
  border-color: var(--line-strong);
}
.setup-choice.active {
  border-color: var(--red);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px var(--red-glow);
}
.setup-choice.active > .svg-icon {
  color: var(--red);
}
.platform-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.platform-picker button {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #FFFFFF;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s ease;
}
.platform-picker button:hover {
  border-color: var(--text);
}
.platform-picker button.active {
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.platform-picker button:last-child {
  grid-column: 1 / -1;
}
.setup-next {
  margin-top: 10px;
}

/* Instructions Details */
.instruction-panel {
  text-align: left;
}
.instruction-panel h1 {
  text-align: left;
}
.instruction-panel p.muted {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.client-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.client-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #FFFFFF;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  cursor: pointer;
  text-align: left;
  transition: 0.15s ease;
}
.client-choice span b {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: block;
}
.client-choice span small {
  font-size: 11.5px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}
.client-choice > .svg-icon {
  width: 18px;
  height: 18px;
  opacity: 0;
  color: var(--red);
  transition: opacity 0.15s ease;
}
.client-choice.active {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-glow);
}
.client-choice.active > .svg-icon {
  opacity: 1;
}

.subscription-key {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.subscription-key span {
  min-width: 0;
}
.subscription-key b {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  display: block;
}
.subscription-key code {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

.incy-fallback, .happ-fallback {
  background: var(--surface-alt);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.incy-fallback b, .happ-fallback b {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}
.incy-fallback p, .happ-fallback p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.45;
}
.incy-fallback-actions, .happ-fallback-actions {
  display: flex;
  gap: 8px;
}

.instruction-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  counter-reset: instruction-step;
}
.instruction-steps li {
  counter-increment: instruction-step;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.instruction-steps li > div:before {
  content: counter(instruction-step);
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(251, 53, 70, 0.1);
  color: var(--red);
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
}
.instruction-steps b {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}
.instruction-steps p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.instruction-steps .button {
  min-height: 44px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}


/* ==========================================================================
   SPECIFIC OVERRIDES FOR MOBILE DEVICES, REFERRALS & MODALS
   ========================================================================== */

/* Password Modal Fixes */
.password-dialog .legal-dialog-card {
  max-width: 440px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.password-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  margin-top: 14px !important;
}
.password-form .field {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  margin-bottom: 0 !important;
  text-align: left !important;
  width: 100% !important;
}
.password-form .field label {
  display: block !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin-bottom: 2px !important;
}
.password-form .field input {
  display: block !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 0 16px !important;
  border-radius: 14px !important;
  border: 1px solid var(--line-strong) !important;
  background: var(--surface-alt) !important;
  color: var(--text) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  box-sizing: border-box !important;
  outline: none !important;
}
.password-form .field input:focus {
  background: #FFFFFF !important;
  border-color: var(--red) !important;
  box-shadow: 0 0 0 3px var(--red-glow) !important;
}
.password-dialog-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-top: 8px !important;
}

/* Devices Page Refinements */
.device-limit-card, section.device-limit-card {
  background: #FFFFFF !important;
  border-radius: 24px !important;
  padding: 24px !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  box-sizing: border-box !important;
}
.limit-overview {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}
.limit-overview span {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
}
.limit-overview strong {
  font-size: 26px !important;
  font-weight: 900 !important;
  color: var(--text) !important;
  display: block !important;
}
.limit-overview small {
  font-size: 12px !important;
  color: var(--text-muted) !important;
}
.limit-control {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: var(--surface-alt) !important;
  border-radius: 18px !important;
  padding: 12px 18px !important;
}
.limit-control span {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
}
.device-stepper {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}
.device-stepper button {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  border: none !important;
  background: #FFFFFF !important;
  color: var(--text) !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06) !important;
  cursor: pointer !important;
}
.device-stepper strong {
  font-size: 20px !important;
  font-weight: 800 !important;
  min-width: 32px !important;
  text-align: center !important;
}
.managed-device-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  margin-top: 14px !important;
}
.managed-device-card {
  background: #FFFFFF !important;
  border-radius: 20px !important;
  padding: 18px 20px !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  box-sizing: border-box !important;
}
.managed-device-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  background: rgba(251, 53, 70, 0.1) !important;
  color: var(--red) !important;
  display: grid !important;
  place-items: center !important;
  flex-shrink: 0 !important;
}
.managed-device-icon svg {
  width: 22px !important;
  height: 22px !important;
  stroke: currentColor !important;
  fill: none !important;
}
.managed-device-copy {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-width: 0 !important;
}
.managed-device-copy b {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  word-break: break-word !important;
}
.managed-device-copy small {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  line-height: 1.4 !important;
  word-break: break-all !important;
}
.managed-device-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 42px !important;
  padding: 0 16px !important;
  border-radius: 12px !important;
  border: 1px solid var(--line-strong) !important;
  background: var(--surface-alt) !important;
  color: var(--text-muted) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  width: 100% !important;
  margin-top: 4px !important;
  transition: 0.15s ease !important;
}
.managed-device-action:hover {
  background: rgba(251, 53, 70, 0.1) !important;
  border-color: rgba(251, 53, 70, 0.25) !important;
  color: var(--red) !important;
}
.managed-device-action svg {
  width: 16px !important;
  height: 16px !important;
}

/* Referrals Page Refinements */
.referral-stats {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 10px !important;
  margin: 16px 0 !important;
}
.referral-stats > div {
  background: #FFFFFF !important;
  border-radius: 18px !important;
  padding: 16px 10px !important;
  text-align: center !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
  box-sizing: border-box !important;
}
.referral-stats span {
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  display: block !important;
  margin-bottom: 4px !important;
}
.referral-stats strong {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: var(--text) !important;
  display: block !important;
}
.referral-stats strong i {
  font-style: normal !important;
  color: var(--red) !important;
}
.bonus-task-card {
  background: #FFFFFF !important;
  border-radius: 22px !important;
  padding: 22px !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
  margin: 16px 0 !important;
  box-sizing: border-box !important;
}
.referral-link-card {
  background: #FFFFFF !important;
  border-radius: 22px !important;
  padding: 22px !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
}
.referral-how ol {
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}
.referral-how li {
  list-style: none !important;
  list-style-type: none !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 14px !important;
}

/* ========================================================== */
/* QUICK SETUP SCREEN (White & Red Theme, Reference-matched)  */
/* ========================================================== */
.setup-quick-shell {
  width: min(100% - 32px, 440px);
  margin: 0 auto;
  padding: 16px 0 44px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.setup-quick-head {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.setup-quick-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.setup-quick-close:hover {
  background: #EAEAEF;
  color: var(--text);
}

/* ========================================================== */
/* ANIMATED 3D SMARTPHONE MODEL                               */
/* ========================================================== */
.setup-3d-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
  perspective-origin: 50% 45%;
  height: 220px;
  margin: 4px 0 18px;
  user-select: none;
}

.setup-3d-halo {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 53, 70, 0.22) 0%, rgba(251, 53, 70, 0.04) 55%, transparent 72%);
  animation: haloPulse 4.5s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes haloPulse {
  0% { transform: scale(0.92); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 1; }
}

.setup-3d-phone-wrap {
  position: relative;
  width: 104px;
  height: 198px;
  transform-style: preserve-3d;
  animation: phone3DFloat 6.5s ease-in-out infinite alternate;
  transition: transform 0.12s ease-out;
}

@keyframes phone3DFloat {
  0% {
    transform: rotateX(14deg) rotateY(-18deg) rotateZ(3deg) translateY(0px);
  }
  50% {
    transform: rotateX(16deg) rotateY(-2deg) rotateZ(0deg) translateY(-10px);
  }
  100% {
    transform: rotateX(12deg) rotateY(16deg) rotateZ(-3deg) translateY(2px);
  }
}

.setup-3d-phone {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* 3D Extruded Slices: perfectly identical smooth rounded squircle corners */
.phone-slice {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  background: #181A1F;
  border: 1.5px solid #2F333C;
  box-sizing: border-box;
  pointer-events: none;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  outline: 1px solid transparent;
}

.phone-slice-1 { transform: translateZ(-4px); }
.phone-slice-2 { transform: translateZ(-3px); }
.phone-slice-3 { transform: translateZ(-2px); }
.phone-slice-4 { transform: translateZ(-1px); }
.phone-slice-mid {
  transform: translateZ(0px);
  background: #20232A;
  border-color: #4A505C;
}
.phone-slice-6 { transform: translateZ(1px); }
.phone-slice-7 { transform: translateZ(2px); }
.phone-slice-8 { transform: translateZ(3px); }
.phone-slice-9 { transform: translateZ(4px); }

/* Titanium Buttons integrated along straight edge at slice-mid (never near corners) */
.phone-btn {
  position: absolute;
  background: #5A606E;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.phone-btn-vol-up {
  left: -2px;
  top: 48px;
  width: 2px;
  height: 18px;
  border-radius: 2px 0 0 2px;
}
.phone-btn-vol-down {
  left: -2px;
  top: 72px;
  width: 2px;
  height: 18px;
  border-radius: 2px 0 0 2px;
}
.phone-btn-power {
  right: -2px;
  top: 56px;
  width: 2px;
  height: 28px;
  border-radius: 0 2px 2px 0;
}

/* Front & Back Faces */
.phone-face {
  position: absolute;
  inset: 0;
  border-radius: 30px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  box-sizing: border-box;
  outline: 1px solid transparent;
}

/* Front Face (Slim Bezel & OLED Screen) */
.phone-front {
  transform: translateZ(5px);
  background: #0B0D11;
  border: 2px solid #3A3E48;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 4px 20px rgba(0, 0, 0, 0.35);
  padding: 3.5px;
  display: flex;
  overflow: hidden;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 26px;
  background: radial-gradient(ellipse at 50% 15%, #181B24 0%, #090A0D 100%);
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 6px;
  box-sizing: border-box;
}

/* Dynamic Glass Shimmer */
.phone-shimmer {
  position: absolute;
  inset: -60%;
  background: linear-gradient(
    115deg,
    transparent 38%,
    rgba(255, 255, 255, 0.28) 50%,
    transparent 62%
  );
  pointer-events: none;
  z-index: 6;
  animation: glassSheen 4.2s ease-in-out infinite;
}
@keyframes glassSheen {
  0% { transform: translateX(-120%) rotate(22deg); }
  40% { transform: translateX(120%) rotate(22deg); }
  100% { transform: translateX(120%) rotate(22deg); }
}

/* Mini Status Bar */
.phone-status-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  box-sizing: border-box;
  z-index: 5;
}

.phone-status-time {
  font-size: 8px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

/* Dynamic Island */
.phone-island {
  position: relative;
  width: 32px;
  height: 9px;
  background: #000000;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  z-index: 5;
}
.phone-island-cam {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #1B293E;
}

.phone-status-icons {
  display: flex;
  align-items: center;
  gap: 3px;
}
.phone-mini-bat {
  width: 12px;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 2px;
  position: relative;
  padding: 0.5px;
  box-sizing: border-box;
}
.phone-mini-bat::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 1.5px;
  width: 1px;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0 0.5px 0.5px 0;
}
.phone-mini-bat-fill {
  display: block;
  height: 100%;
  width: 80%;
  background: #34C759;
  border-radius: 0.5px;
}

/* Screen Internal UI */
.phone-screen-content {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.phone-ui-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 8px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.04em;
}
.phone-ui-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #34C759;
  box-shadow: 0 0 6px #34C759;
  animation: dotPulse 1.8s infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.phone-ui-shield {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 53, 70, 0.32) 0%, rgba(251, 53, 70, 0.05) 70%);
  border: 1.5px solid rgba(251, 53, 70, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  box-shadow: 0 0 18px rgba(251, 53, 70, 0.35);
}
.phone-ui-shield-icon svg {
  display: block;
}
.phone-ui-pulse {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(251, 53, 70, 0.5);
  animation: pulseRing 2.2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
.phone-ui-pulse-2 {
  animation-delay: 1.1s;
}
@keyframes pulseRing {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

.phone-ui-speed {
  display: flex;
  align-items: center;
  gap: 4px;
}
.phone-ui-bar {
  width: 2.5px;
  background: var(--red);
  border-radius: 2px;
  animation: speedBar 1.2s ease-in-out infinite alternate;
}
.phone-ui-bar.b1 { height: 6px; animation-delay: 0.1s; }
.phone-ui-bar.b2 { height: 10px; animation-delay: 0.3s; }
.phone-ui-bar.b3 { height: 8px; animation-delay: 0.5s; }
@keyframes speedBar {
  0% { transform: scaleY(0.7); }
  100% { transform: scaleY(1.3); }
}

.phone-ui-speed-txt {
  font-size: 7.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.02em;
}

.phone-home-indicator {
  width: 36px;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 2px;
  z-index: 5;
}

/* Back Face */
.phone-back {
  transform: rotateY(180deg) translateZ(5px);
  background: radial-gradient(circle at 35% 30%, #2A2D35 0%, #15161B 100%);
  border: 2px solid #363942;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.phone-camera-bump {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #1C1E24;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  gap: 3px;
  box-sizing: border-box;
}

.phone-lens {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, #08090C 30%, #1E2530 100%);
  border: 1px solid #3E434E;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

.phone-flash {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E8B342;
  box-shadow: 0 0 4px rgba(232, 179, 66, 0.6);
  margin: 3px;
}

.phone-back-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D Floor Shadow */
.setup-3d-shadow {
  position: absolute;
  bottom: -24px;
  left: 50%;
  width: 104px;
  height: 24px;
  margin-left: -52px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.05) 60%, transparent 80%);
  border-radius: 50%;
  filter: blur(6px);
  transform: rotateX(75deg);
  animation: shadowFloat 6.5s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes shadowFloat {
  0% { transform: rotateX(75deg) scale(0.95); opacity: 0.35; }
  50% { transform: rotateX(75deg) scale(0.8); opacity: 0.18; filter: blur(10px); }
  100% { transform: rotateX(75deg) scale(1.1); opacity: 0.42; filter: blur(5px); }
}

/* Steps */
.setup-step-card {
  margin-bottom: 24px;
}

.setup-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.setup-step-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1C1E22;
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.setup-step-head h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

.setup-hint-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  margin-bottom: 12px;
}

.setup-hint-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--text-muted);
}
.setup-hint-card b {
  color: var(--text);
  font-weight: 700;
}

.setup-app-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  background: #1C1E22;
  color: #FFFFFF;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.setup-app-download-btn:hover {
  background: #2D3037;
  transform: translateY(-1px);
}

.setup-other-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  text-align: center;
  padding: 14px 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}
.setup-other-link:hover {
  color: var(--red);
}

.setup-other-platforms {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin-top: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}
.setup-other-title {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.setup-platforms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.setup-platform-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.setup-platform-item:hover {
  background: #ECECED;
  border-color: #DFDFE2;
}
.setup-platform-item svg {
  color: var(--red);
  flex-shrink: 0;
}

/* Step 2 Key Row */
.setup-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 18px;
  height: 52px;
  padding: 0 8px 0 16px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.setup-key-text {
  font-size: 13.5px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", monospace;
  flex: 1;
  padding-right: 10px;
}

.setup-copy-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.setup-copy-btn:hover {
  background: #EAEAEF;
}

/* HERO Auto-Import Button */
.setup-auto-btn {
  width: 100%;
  height: 68px;
  background: var(--red);
  color: #FFFFFF;
  border: none;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.15s ease;
}
.setup-auto-btn:hover {
  background: #E02030;
  box-shadow: none !important;
  transform: translateY(-1px);
}
.setup-auto-btn:active {
  transform: scale(0.985);
}

.setup-auto-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.setup-auto-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.setup-auto-copy {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.setup-auto-copy strong {
  font-size: 16.5px;
  font-weight: 800;
  line-height: 1.2;
}

.setup-auto-copy span {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 2px;
}

.setup-auto-finger {
  font-size: 24px;
  animation: setupFingerBounce 1.6s infinite ease-in-out;
}

@keyframes setupFingerBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Fallback card */
.setup-fallback-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  margin-top: 12px;
}
.setup-fallback-card b {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}
.setup-fallback-card p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}
.setup-fallback-btns {
  display: flex;
  gap: 10px;
}

/* Done button */
.setup-done-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 18px;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
  margin-top: 8px;
}
.setup-done-btn:hover {
  background: #ECECED;
}

/* ========================================================== */
/* 9. FAQ / HELP PAGE ACCORDION & SUPPORT CONTACTS           */
/* ========================================================== */
body[data-app-page="help"] .app-shell,
.help-shell {
  width: min(100% - 32px, 600px) !important;
}

.kicker {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 4px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0 28px;
}

.faq-group-title {
  margin: 28px 4px 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}
.faq-group-title:first-child {
  margin-top: 8px;
}

.faq-item {
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  border-radius: 18px !important;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.faq-item:hover {
  border-color: rgba(0, 0, 0, 0.13) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

.faq-item h3 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.faq-item button,
[data-faq-toggle] {
  width: 100% !important;
  min-height: 56px !important;
  padding: 16px 20px !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  color: var(--text) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  text-align: left !important;
  cursor: pointer !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  line-height: 1.4;
  transition: color 0.15s ease;
}
.faq-item button:hover {
  color: var(--red) !important;
}

.faq-item button .svg-icon,
[data-faq-toggle] .svg-icon {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px;
  stroke: var(--text-muted) !important;
  stroke-width: 2.2 !important;
  fill: none !important;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), stroke 0.15s ease;
}
.faq-item button:hover .svg-icon {
  stroke: var(--red) !important;
}

.faq-item button[aria-expanded="true"] {
  color: var(--red) !important;
}
.faq-item button[aria-expanded="true"] .svg-icon {
  transform: rotate(180deg);
  stroke: var(--red) !important;
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  padding: 0 20px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  transition: grid-template-rows 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.2s ease,
              padding 0.25s ease;
}
.faq-answer p {
  min-height: 0;
  overflow: hidden;
  margin: 0;
}
.faq-answer.is-opening {
  grid-template-rows: 1fr;
  opacity: 1;
  padding-bottom: 18px;
}
.faq-answer.is-closing {
  grid-template-rows: 0fr;
  opacity: 0;
  padding-bottom: 0;
}

/* Support Contacts */
.support-contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0 32px;
}
@media (max-width: 480px) {
  .support-contacts {
    grid-template-columns: 1fr;
  }
}
.support-contact {
  min-width: 0;
  padding: 16px 18px;
  border-radius: 18px !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.07) !important;
  display: grid;
  grid-template-columns: 32px 1fr 18px;
  gap: 12px;
  align-items: center;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.support-contact:hover {
  border-color: rgba(251, 53, 70, 0.3) !important;
  box-shadow: 0 6px 20px rgba(251, 53, 70, 0.08) !important;
  transform: translateY(-1px);
}
.support-contact > .svg-icon:first-child {
  width: 24px !important;
  height: 24px !important;
  color: var(--red) !important;
  stroke: var(--red) !important;
}
.support-contact > .svg-icon:last-child {
  width: 16px !important;
  height: 16px !important;
  color: var(--text-muted) !important;
  stroke: var(--text-muted) !important;
}
.support-contact small,
.support-contact b {
  display: block;
}
.support-contact small {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
}
.support-contact b {
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* Floating Promo Tablo (Всплывающее табло под дизайн сайта) */
.promo-tablo {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  width: min(calc(100% - 24px), 430px);
  background: #FFFFFF;
  border: 1.5px solid var(--red);
  border-radius: 24px;
  padding: 20px 20px 18px;
  box-sizing: border-box;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.16), 0 2px 10px rgba(251, 53, 70, 0.1);
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.promo-tablo.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.promo-tablo-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-alt);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}

.promo-tablo-close:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.promo-tablo-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding-right: 32px;
}

.promo-tablo-emoji {
  font-size: 28px;
  line-height: 1.1;
  flex-shrink: 0;
}

.promo-tablo-title-wrap {
  flex: 1;
}

.promo-tablo-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  margin: 0;
}

.promo-tablo-timer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #B45309;
  background: rgba(245, 158, 11, 0.12);
  padding: 6px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.promo-tablo-pricing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 18px;
  margin-bottom: 10px;
}

.promo-tablo-col {
  display: flex;
  flex-direction: column;
}

.promo-tablo-col--old {
  text-align: right;
}

.promo-tablo-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.promo-tablo-price-now {
  font-size: 24px;
  font-weight: 900;
  color: #10B981;
  letter-spacing: -0.5px;
}

.promo-tablo-price-old {
  font-size: 17px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: line-through;
}

.promo-tablo-note {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.4;
  text-align: center;
}

.promo-tablo-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 48px !important;
  padding: 12px 20px !important;
  background: #10B981 !important;
  color: #FFFFFF !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  border-radius: var(--radius-btn) !important;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35) !important;
  border: none !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease !important;
}

.promo-tablo-btn:hover {
  opacity: 0.94 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
}

/* ==========================================================================
   Tsar VPN Brand Overrides
   ========================================================================== */
[data-brand="tsar"] {
  --primary: #FFD000;
  --primary-hover: #FFEB00;
  --primary-contrast: #1C1C1C;
  --red: #FFD000;
  --red-hover: #FFEB00;
  --accent: #FFD000;
}

[data-brand="tsar"] .primary-button,
[data-brand="tsar"] .button-primary,
[data-brand="tsar"] .mobile-hero-btn,
[data-brand="tsar"] .brand-btn,
[data-brand="tsar"] [data-pay-btn],
[data-brand="tsar"] .checkout-submit,
[data-brand="tsar"] .tariff-badge-best {
  background: #FFD000 !important;
  color: #1C1C1C !important;
  border-color: #FFD000 !important;
}

[data-brand="tsar"] .primary-button:hover,
[data-brand="tsar"] .button-primary:hover,
[data-brand="tsar"] .mobile-hero-btn:hover,
[data-brand="tsar"] [data-pay-btn]:hover {
  background: #FFEB00 !important;
}

[data-brand="tsar"] .mobile-top-logo,
[data-brand="tsar"] .brand-logo-img,
[data-brand="tsar"] .brand-icon {
  content: url("/assets/tsar/tsar_logo.svg") !important;
}



