/* ═══════════════════════════════════════════════════════════
   XASU VPN — Premium Design System
   Stack: HTML + CSS + Vanilla JS
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Palette — deep cinematic dark */
  --bg-deep: #050508;
  --bg-base: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-surface: rgba(22, 22, 32, 0.72);

  --text-primary: #f4f4f8;
  --text-secondary: rgba(244, 244, 248, 0.62);
  --text-muted: rgba(244, 244, 248, 0.38);

  --accent: #5b8cff;
  --accent-bright: #7aa4ff;
  --accent-glow: rgba(91, 140, 255, 0.45);
  --accent-hover: #4a7aef;
  --accent-secondary: #a78bfa;
  --danger: #ff6b6b;
  --success: #34d399;

  /* Legacy aliases (cabinet.js / admin) */
  --bg: var(--bg-base);
  --card: var(--bg-elevated);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --ios-blue: var(--accent);
  --ios-bg: var(--bg-deep);
  --ios-card: rgba(24, 24, 36, 0.65);
  --ios-muted: var(--text-secondary);
  --ios-separator: rgba(255, 255, 255, 0.06);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-blur: 20px;

  /* Radius & shadows */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius: var(--radius-md);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-glow: 0 0 40px var(--accent-glow), 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.7s;

  --font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ─── Custom font (resources/font/) ─── */
@font-face {
  font-family: "SF Pro Text";
  src: url("/resources/font/SFProText-Medium.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Text";
  src: url("/resources/font/SFProText-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Text";
  src: url("/resources/font/SFProText-Medium.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SF Pro Text";
  src: url("/resources/font/SFProText-Medium.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-family);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

.page-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 16px 32px;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: max(32px, env(safe-area-inset-bottom));
}

body.modal-open { overflow: hidden; }

/* ─── Water ripple background (WebGL) ─── */
.water-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("/static/water-bg.svg") center / cover no-repeat #020810;
}

.water-bg.water-fallback,
html:not(.water-ready) .water-bg {
  background: url("/static/water-bg.svg") center / cover no-repeat #020810;
}

.water-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(2, 8, 16, 0.35) 0%,
    rgba(2, 8, 16, 0.15) 40%,
    rgba(2, 8, 16, 0.45) 100%
  );
}

#water-bg canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
}

/* ─── Scroll reveal & stagger ─── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out-expo),
              transform var(--duration-slow) var(--ease-out-expo);
  will-change: transform, opacity;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reduce-motion .reveal {
  opacity: 1;
  transform: none;
}

.stagger-in {
  animation: stagger-up var(--duration-normal) var(--ease-out-expo) both;
  animation-delay: calc(var(--stagger-i, 0) * 0.06s);
}

@keyframes stagger-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Press feedback */
.pressable,
button, .btn, .action-card, .device-item, .guide-row, .tab, .link-btn, .menu-btn {
  transition: transform var(--duration-fast) var(--ease-spring),
              opacity var(--duration-fast) var(--ease-out-expo),
              background var(--duration-fast) var(--ease-out-expo),
              border-color var(--duration-fast) var(--ease-out-expo),
              box-shadow var(--duration-fast) var(--ease-out-expo);
  will-change: transform;
}

.pressable.is-pressed,
button.is-pressed, .action-card.is-pressed, .device-item.is-pressed,
.guide-row.is-pressed, .tab.is-pressed, .link-btn.is-pressed, .menu-btn.is-pressed {
  transform: scale(0.97);
}

/* ─── Glass components ─── */
.glass-nav,
.glass-card,
.devices-card,
.referral-card,
.guides-card,
.stat-box,
.balance-card,
.modal-content {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

/* ─── Buttons ─── */
button, .btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
  color: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #4f6ef7 100%);
  color: #fff;
  width: 100%;
  box-shadow: 0 4px 20px rgba(91, 140, 255, 0.35);
}

.btn-inline {
  width: auto !important;
  display: inline-flex;
}

.btn-block {
  width: 100%;
  margin-bottom: 12px;
}

.btn-block-spaced {
  width: 100%;
  margin-top: 8px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 100%);
  box-shadow: var(--shadow-glow);
}

.btn-glow {
  position: relative;
  overflow: hidden;
}

.btn-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-out-expo);
}

.btn-glow:hover::after { transform: translateX(100%); }

.btn-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: blur(12px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }

.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE
   ═══════════════════════════════════════════════════════════ */
.landing-page .page-shell {
  padding-top: max(16px, env(safe-area-inset-top));
  padding-bottom: max(40px, env(safe-area-inset-bottom));
}

.glass-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.landing-page .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark { font-size: 1.2rem; }

.landing-page .brand-name {
  font-size: 1.05rem;
  font-weight: 600;
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-bright);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(91, 140, 255, 0.12);
  border: 1px solid rgba(91, 140, 255, 0.25);
}

.hero { margin-bottom: 40px; }

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2.2rem, 8vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 36ch;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-actions .btn { width: 100%; }

.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.glass-card {
  padding: 22px 20px;
  border-radius: var(--radius-lg);
}

.feature-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 12px;
}

.glass-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.glass-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cta-block {
  text-align: center;
  padding: 28px 22px;
  margin-bottom: 32px;
}

.cta-block h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.cta-block p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.cta-block .btn { max-width: 280px; margin: 0 auto; }

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.landing-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.landing-footer .dot { opacity: 0.4; }

/* ═══════════════════════════════════════════════════════════
   CABINET PAGE
   ═══════════════════════════════════════════════════════════ */
body.cabinet-page .page-shell {
  padding-top: max(12px, env(safe-area-inset-top));
}

.cabinet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 0;
}

.cabinet-page .brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cabinet-page .brand-icon { font-size: 1.1rem; }

.cabinet-page .brand-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.menu-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(91, 140, 255, 0.3);
  background: linear-gradient(135deg, var(--accent) 0%, #4f6ef7 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* Balance */
.balance-section {
  text-align: center;
  padding: 28px 0 12px;
}

.balance-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.balance-amount {
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff;
}

.balance-num {
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255, 0.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.balance-currency {
  font-size: 0.55em;
  font-weight: 500;
  color: var(--text-secondary);
  -webkit-text-fill-color: var(--text-secondary);
}

.balance-days {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Action grid */
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0 24px;
}

.action-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--accent-bright);
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.action-card:hover {
  border-color: rgba(91, 140, 255, 0.25);
  box-shadow: 0 8px 24px rgba(91, 140, 255, 0.12);
}

.action-icon { color: var(--accent-bright); }

.action-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-bright);
}

/* Devices & cards */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.devices-card,
.guides-card {
  padding: 0;
  overflow: hidden;
}

.devices-card { padding: 18px 18px 6px; }

.referral-card {
  position: relative;
  padding: 28px 22px 26px !important;
  text-align: center;
  overflow: hidden;
  border: 1px solid rgba(91, 140, 255, 0.22) !important;
  box-shadow:
    0 8px 40px rgba(91, 140, 255, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

#view-admin .card,
#admin-payments .card,
#admin-users .card,
#admin-activity .card,
#history-list .card {
  padding: 14px 16px;
}

.devices-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.devices-title {
  font-size: 1.05rem;
  font-weight: 600;
}

.link-btn {
  background: none;
  border: none;
  color: var(--accent-bright);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
}

.devices-connected {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.devices-list { margin: 0 -18px; }

.device-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: none;
  border-top: 1px solid var(--ios-separator);
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

.device-item:first-child { border-top: none; }

.device-item:hover { background: rgba(255, 255, 255, 0.03); }

.device-info { flex: 1; min-width: 0; }

.device-name {
  font-size: 1rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.device-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.device-chevron {
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 300;
}

.devices-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.tariff-foot {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 4px 0 24px;
}

/* Referral block (padding in .referral-card above) */
body.await-ui .page-shell {
  opacity: 0;
}

body.ui-ready .page-shell {
  opacity: 1;
  transition: opacity 0.55s var(--ease-out-expo);
}

.enter-seq {
  opacity: 0;
  transform: translateY(18px);
}

body.ui-ready .enter-seq {
  animation: enter-fade-up 0.65s var(--ease-out-expo) forwards;
  animation-delay: calc(0.12s + var(--enter-i, 0) * 0.07s);
}

body.ui-ready .brand-sticker.tgs-sticker {
  animation: enter-sticker 0.75s var(--ease-spring) forwards;
  animation-delay: 0.08s;
}

@keyframes enter-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes enter-sticker {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}

.reduce-motion .enter-seq,
.reduce-motion body.ui-ready .enter-seq,
.reduce-motion body.ui-ready .brand-sticker {
  opacity: 1;
  transform: none;
  animation: none !important;
}

.reduce-motion body.await-ui .page-shell,
.reduce-motion body.ui-ready .page-shell {
  opacity: 1;
}

.brand-sticker.tgs-sticker.sticker-loaded,
.brand-sticker.tgs-sticker.sticker-fallback {
  opacity: 1;
}

/* Brand column: sticker on top, shimmer name below */
.brand-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.brand-sticker {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  pointer-events: none;
  opacity: 0;
}

.brand-sticker svg {
  width: 100% !important;
  height: 100% !important;
}

.brand-shimmer {
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(
    100deg,
    #7aa4ff 0%,
    #a78bfa 22%,
    #5b8cff 44%,
    #6ee7ff 66%,
    #7aa4ff 88%,
    #c4b5fd 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brand-shimmer 4.5s ease-in-out infinite;
}

@keyframes brand-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.cabinet-header {
  align-items: flex-start;
}

.cabinet-page .brand-name.brand-shimmer {
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.landing-page .brand-name.brand-shimmer,
.landing-page .brand-shimmer {
  font-size: 1.05rem;
  background: linear-gradient(
    100deg,
    #7aa4ff 0%,
    #a78bfa 22%,
    #5b8cff 44%,
    #6ee7ff 66%,
    #7aa4ff 88%,
    #c4b5fd 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: brand-shimmer 4.5s ease-in-out infinite;
}

.landing-page .brand-column {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.referral-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 220px;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(91, 140, 255, 0.28) 0%,
    rgba(167, 139, 250, 0.14) 38%,
    transparent 72%
  );
  pointer-events: none;
}

.referral-sticker {
  position: relative;
  z-index: 1;
  width: 128px;
  height: 128px;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.referral-sticker svg {
  width: 100% !important;
  height: 100% !important;
}

.referral-sticker.sticker-fallback {
  font-size: 3rem;
  line-height: 1;
}

.referral-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: rgba(91, 140, 255, 0.12);
  border: 1px solid rgba(91, 140, 255, 0.28);
  box-shadow: 0 0 24px rgba(91, 140, 255, 0.15);
}

.referral-title {
  position: relative;
  z-index: 1;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.referral-bonus {
  position: relative;
  z-index: 1;
  margin: 0 auto 18px;
  padding: 18px 20px 16px;
  max-width: 280px;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    145deg,
    rgba(91, 140, 255, 0.14) 0%,
    rgba(167, 139, 250, 0.08) 50%,
    rgba(110, 231, 255, 0.06) 100%
  );
  border: 1px solid rgba(122, 164, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 32px rgba(91, 140, 255, 0.1);
}

.referral-bonus-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.referral-bonus-amount {
  margin: 0;
  font-size: clamp(2.4rem, 9vw, 3rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(
    100deg,
    #7aa4ff 0%,
    #c4b5fd 25%,
    #6ee7ff 50%,
    #5b8cff 75%,
    #a78bfa 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brand-shimmer 3.5s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(91, 140, 255, 0.35));
}

.referral-bonus-currency {
  font-size: 0.62em;
  font-weight: 600;
  opacity: 0.92;
}

.referral-bonus-note {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.referral-text {
  position: relative;
  z-index: 1;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.referral-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.referral-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.referral-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-bright);
  background: rgba(91, 140, 255, 0.16);
  border: 1px solid rgba(91, 140, 255, 0.28);
}

.referral-step-text {
  font-size: 0.68rem;
  line-height: 1.25;
  color: var(--text-secondary);
}

.btn-copy-ref {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 210px;
  margin: 0 auto;
  padding: 14px 22px !important;
  border-radius: 999px !important;
  box-shadow:
    0 4px 24px rgba(91, 140, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

@media (max-width: 360px) {
  .referral-steps {
    grid-template-columns: 1fr;
  }

  .referral-step {
    flex-direction: row;
    justify-content: flex-start;
    padding: 10px 12px;
  }
}

/* Guides */
.cabinet-page .section-label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 18px 4px 10px;
}

.guides-card { padding: 0 !important; }

.guide-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-top: 1px solid var(--ios-separator);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: left;
}

.guide-row:first-child { border-top: none; }
.guide-row:hover { background: rgba(255, 255, 255, 0.03); }

.guide-label { flex: 1; font-size: 1rem; }

.chevron {
  color: var(--text-muted);
  font-size: 1.4rem;
  font-weight: 300;
}

/* Platform icons (GIF) */
.platform-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.04);
}

.platform-icon-lg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

.device-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
  padding: 2px 0;
}

.device-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--accent-bright);
  font-size: 1rem;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
  font-family: inherit;
}

.device-topbar-balance {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.device-topbar-balance strong {
  color: var(--text-primary);
  font-weight: 600;
}

.device-hero {
  text-align: center;
  padding: 8px 0 20px;
}

.device-hero-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.device-hero-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.device-hero-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
}

.device-name-card {
  padding: 0 !important;
  overflow: hidden;
  margin-bottom: 8px;
}

.device-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.device-name-glyph {
  color: var(--success);
  display: flex;
  flex-shrink: 0;
}

.device-name-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  min-width: 0;
}

.device-name-input::placeholder {
  color: var(--text-muted);
}

.device-panel {
  padding: 16px !important;
  margin-bottom: 12px;
}

.device-panel-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.device-panel-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.device-panel-icon-warn {
  background: rgba(251, 146, 60, 0.18);
  color: #fb923c;
}

.device-panel-icon-ok {
  background: rgba(52, 211, 153, 0.16);
  color: var(--success);
}

.device-panel-icon-danger {
  background: rgba(255, 107, 107, 0.16);
  color: var(--danger);
}

.device-panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
}

.device-panel-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.device-panel-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm) !important;
}

.device-link-box {
  margin-bottom: 10px;
}

.device-link-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--ios-separator);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-family: inherit;
  word-break: break-all;
}

.device-quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.btn-sm {
  padding: 10px 14px !important;
  font-size: 0.88rem !important;
  width: auto !important;
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  text-decoration: none;
  text-align: center;
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: var(--danger);
}

.device-panel-danger .device-panel-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.device-delete-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.device-download-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px !important;
  margin-bottom: 8px;
}

.device-download-info {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.device-download-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.device-download-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.device-help-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 16px !important;
  border: none;
  background: var(--glass-bg);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  margin-bottom: 8px;
}

.device-help-icon {
  color: var(--text-secondary);
  display: flex;
}

.device-help-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
}

.device-help-chevron {
  color: var(--text-muted);
  font-size: 1.3rem;
  transition: transform var(--duration-fast) var(--ease-out-expo);
}

.device-help-chevron.is-open {
  transform: rotate(90deg);
}

.device-help-body {
  padding: 16px 18px !important;
  margin-bottom: 24px;
}

.device-help-body .guide-steps {
  margin: 0 0 0 18px;
}

.foot-tip {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
}

.cabinet-main.hidden { display: none; }

.content-hidden {
  display: none !important;
}

/* Skeleton loaders */
.skeleton-screen {
  position: relative;
  z-index: 3;
  transition: opacity 0.32s var(--ease-out-expo);
  margin-bottom: 8px;
}

.skeleton-screen.is-hiding {
  opacity: 0;
  pointer-events: none;
}

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 1.4s var(--ease-out-expo) infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.sk-balance {
  height: 48px;
  width: 140px;
  margin: 32px auto 12px;
  border-radius: 12px;
}

.sk-line {
  height: 14px;
  width: 160px;
  margin: 0 auto 24px;
}

.sk-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.sk-action {
  height: 88px;
  border-radius: var(--radius-md);
}

.sk-card {
  height: 160px;
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
}

/* Tabs & admin */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tab {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-weight: 600;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  font-family: inherit;
}

.tab.active {
  background: linear-gradient(135deg, var(--accent) 0%, #4f6ef7 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.tab[data-tab="admin"] {
  background: rgba(255, 179, 71, 0.08);
  color: #ffb347;
  border-color: rgba(255, 179, 71, 0.2);
}

.tab[data-tab="admin"].active {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
  color: #fff;
}

.admin-badge {
  background: rgba(255, 179, 71, 0.12);
  color: #ffb347;
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid rgba(255, 179, 71, 0.25);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-grid .stat-box {
  margin-bottom: 0;
  padding: 16px;
}

.stat-box .num { font-size: 1.5rem; font-weight: 700; }
.stat-box .lbl { color: var(--text-secondary); font-size: 0.75rem; margin-top: 4px; }
.stat-box { text-align: center; border-radius: var(--radius-md); }

.admin-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.admin-row button { flex: 1; min-width: 100px; padding: 10px; font-size: 0.85rem; }

/* Modals */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  align-items: flex-end;
  justify-content: center;
  z-index: 300;
  transition: background var(--duration-normal) var(--ease-out-expo),
              backdrop-filter var(--duration-normal) var(--ease-out-expo);
}

.modal.open { display: flex; }

.modal.is-active {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-content {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 28px 24px max(28px, env(safe-area-inset-bottom));
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  opacity: 0;
  transition: transform var(--duration-normal) var(--ease-spring),
              opacity var(--duration-normal) var(--ease-out-expo);
  will-change: transform, opacity;
}

.modal.is-active .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.reduce-motion .modal-content {
  transform: none;
  opacity: 1;
}

.modal h2 { margin-bottom: 12px; font-size: 1.25rem; }

/* Custom confirm / alert */
.xasu-dialog {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  visibility: hidden;
  pointer-events: none;
}

.xasu-dialog.open {
  visibility: visible;
  pointer-events: auto;
}

.xasu-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition:
    background 0.45s var(--ease-out-expo),
    backdrop-filter 0.45s var(--ease-out-expo),
    -webkit-backdrop-filter 0.45s var(--ease-out-expo);
  will-change: backdrop-filter, background;
}

.xasu-dialog.is-open .xasu-dialog-backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.xasu-dialog-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  padding: 26px 22px 22px;
  border-radius: var(--radius-xl);
  background: rgba(18, 18, 28, 0.92);
  border: 1px solid rgba(91, 140, 255, 0.22);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 40px rgba(91, 140, 255, 0.12);
  transform: scale(0.94) translateY(8px);
  opacity: 0;
  transition:
    transform 0.45s var(--ease-spring),
    opacity 0.45s var(--ease-out-expo);
  text-align: center;
}

.xasu-dialog.is-open .xasu-dialog-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.xasu-dialog-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(91, 140, 255, 0.22), rgba(167, 139, 250, 0.12));
  border: 1px solid rgba(122, 164, 255, 0.28);
  color: var(--accent-bright);
}

.xasu-dialog-panel[data-tone="danger"] .xasu-dialog-icon {
  background: linear-gradient(145deg, rgba(255, 107, 107, 0.2), rgba(255, 107, 107, 0.08));
  border-color: rgba(255, 107, 107, 0.28);
  color: var(--danger);
}

.xasu-dialog-panel[data-tone="info"] .xasu-dialog-icon,
.xasu-dialog-panel[data-tone="success"] .xasu-dialog-icon {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.18), rgba(91, 140, 255, 0.1));
  border-color: rgba(52, 211, 153, 0.28);
  color: var(--success);
}

.xasu-dialog-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.xasu-dialog-title {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.xasu-dialog-message {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.xasu-dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.xasu-dialog-actions .xasu-dialog-cancel.hidden {
  display: none;
}

.xasu-dialog-actions:has(.xasu-dialog-cancel.hidden) {
  grid-template-columns: 1fr;
}

.xasu-dialog-actions .btn {
  width: 100%;
  border-radius: var(--radius-sm) !important;
  padding: 13px 16px !important;
}

.btn-danger-solid {
  background: linear-gradient(135deg, #ff6b6b 0%, #e85555 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 107, 107, 0.35);
}

.reduce-motion .xasu-dialog-backdrop {
  transition: none;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.reduce-motion .xasu-dialog-panel {
  transform: none;
  opacity: 1;
}

.menu-item {
  width: 100%;
  text-align: left;
  padding: 14px 0;
  border: none;
  border-bottom: 1px solid var(--ios-separator);
  background: none;
  color: var(--accent-bright);
  font-size: 1.05rem;
  cursor: pointer;
  font-family: inherit;
}

/* Add device wizard */
.add-intro {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  visibility: hidden;
  pointer-events: none;
}

.add-intro.is-open {
  visibility: visible;
  pointer-events: auto;
}

.add-intro-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition:
    background 0.45s var(--ease-out-expo),
    backdrop-filter 0.45s var(--ease-out-expo),
    -webkit-backdrop-filter 0.45s var(--ease-out-expo);
}

.add-intro.open .add-intro-backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.add-intro-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  padding: 28px 22px 22px;
  border-radius: var(--radius-xl);
  background: rgba(18, 22, 32, 0.96);
  border: 1px solid rgba(91, 140, 255, 0.18);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(91, 140, 255, 0.1);
  text-align: center;
  transform: scale(0.92) translateY(10px);
  opacity: 0;
  transition:
    transform 0.45s var(--ease-spring),
    opacity 0.45s var(--ease-out-expo);
}

.add-intro.open .add-intro-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.add-intro-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease-spring);
}

.add-intro-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.18);
}

.add-intro-close:active {
  transform: scale(0.92);
}

.add-flow-sticker {
  width: 120px;
  height: 120px;
  margin: 0 auto 12px;
}

.add-flow-sticker svg {
  width: 100% !important;
  height: 100% !important;
}

.add-intro-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.add-intro-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.add-intro-btn {
  width: 100%;
}

#view-add,
#view-device {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 80px);
}

#view-add:not(.hidden),
#view-device:not(.hidden) {
  animation: cabinet-view-in 0.4s var(--ease-out-expo);
}

@keyframes cabinet-view-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.add-steps-viewport {
  flex: 1;
  position: relative;
  min-height: 280px;
  overflow: hidden;
}

.add-step {
  width: 100%;
  text-align: center;
  padding: 4px 0 12px;
  transition:
    opacity 0.42s var(--ease-out-expo),
    transform 0.42s var(--ease-out-expo);
}

.add-step.hidden:not(.add-step-animating) {
  display: none;
}

.add-step.add-step-animating {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
}

.add-step.add-step-from-right {
  opacity: 0;
  transform: translateX(32px);
}

.add-step.add-step-from-left {
  opacity: 0;
  transform: translateX(-32px);
}

.add-step.add-step-active {
  opacity: 1;
  transform: translateX(0);
}

.add-step.add-step-exit-left {
  opacity: 0;
  transform: translateX(-32px);
}

.add-step.add-step-exit-right {
  opacity: 0;
  transform: translateX(32px);
}

.add-step:not(.add-step-animating):not(.hidden) {
  position: relative;
  z-index: 2;
}

.add-step-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.add-step-eyebrow {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.add-step-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 18px;
  padding: 0 4px;
}

.add-step-hint {
  margin-top: 16px;
  font-size: 0.85rem;
}

.add-platform-list {
  padding: 0 !important;
  overflow: hidden;
  text-align: left;
}

.add-platform-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--ios-separator);
  cursor: pointer;
  width: 100%;
  background: none;
  border-left: none;
  border-right: none;
  border-bottom: none;
  font-family: inherit;
  color: inherit;
}

.add-platform-row:first-child {
  border-top: none;
}

.add-platform-label {
  flex: 1;
  font-size: 0.98rem;
  font-weight: 500;
  text-align: left;
}

.add-platform-row input[type="radio"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.add-platform-row input[type="radio"]:checked {
  border-color: var(--accent-bright);
  background: radial-gradient(circle, var(--accent-bright) 40%, transparent 42%);
}

.add-footer {
  margin-top: auto;
  padding: 8px 0 max(12px, env(safe-area-inset-bottom));
}

.add-footer .btn.add-btn-done {
  background: rgba(30, 38, 58, 0.95);
  color: var(--accent-bright);
  border: 1px solid rgba(91, 140, 255, 0.25);
}

.add-setup-help {
  margin-top: 12px;
  width: 100%;
  text-align: left;
}

#add-step-setup .device-link-box,
#add-step-setup .device-panel-btn,
#add-step-setup .device-quick-links {
  text-align: left;
}

.reduce-motion .add-intro-backdrop,
.reduce-motion .add-intro-card,
.reduce-motion .add-step,
.reduce-motion #view-add:not(.hidden),
.reduce-motion #view-device:not(.hidden),
.reduce-motion .guide-sheet-backdrop,
.reduce-motion .guide-sheet-panel,
.reduce-motion .guide-panel-body {
  transition: none !important;
  animation: none !important;
}

/* Premium guide sheet */
.guide-sheet {
  position: fixed;
  inset: 0;
  z-index: 360;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  visibility: hidden;
  pointer-events: none;
}

.guide-sheet.is-open {
  visibility: visible;
  pointer-events: auto;
}

.guide-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition:
    background 0.45s var(--ease-out-expo),
    backdrop-filter 0.45s var(--ease-out-expo),
    -webkit-backdrop-filter 0.45s var(--ease-out-expo);
}

.guide-sheet.open .guide-sheet-backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.guide-sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  max-height: min(88vh, 640px);
  overflow-y: auto;
  padding: 26px 22px 22px;
  border-radius: var(--radius-xl);
  background: rgba(18, 22, 32, 0.96);
  border: 1px solid rgba(91, 140, 255, 0.18);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(91, 140, 255, 0.1);
  transform: scale(0.92) translateY(10px);
  opacity: 0;
  transition:
    transform 0.45s var(--ease-spring),
    opacity 0.45s var(--ease-out-expo);
}

.guide-sheet.open .guide-sheet-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.guide-sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease-spring);
}

.guide-sheet-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.18);
}

.guide-sheet-head {
  text-align: center;
  margin-bottom: 18px;
  padding-top: 4px;
}

.guide-sheet-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-sheet-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px;
}

.guide-sheet-eyebrow {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  margin-bottom: 6px;
  font-weight: 600;
}

.guide-sheet-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.guide-sheet-btn {
  width: 100%;
}

.guide-step-list {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guide-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
}

.guide-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-bright);
  background: linear-gradient(145deg, rgba(91, 140, 255, 0.28), rgba(91, 140, 255, 0.1));
  border: 1px solid rgba(122, 164, 255, 0.32);
}

.guide-step-text {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-secondary);
  padding-top: 3px;
}

.guide-panel-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  transition:
    max-height 0.45s var(--ease-out-expo),
    opacity 0.35s var(--ease-out-expo),
    margin 0.35s var(--ease-out-expo);
}

.guide-panel-body.is-open {
  max-height: 520px;
  opacity: 1;
  margin-bottom: 16px;
}

.guide-panel-body .guide-step-list {
  margin-bottom: 0;
  padding-top: 4px;
}

/* Premium sheets (topup, history, pay result) */
.premium-sheet {
  position: fixed;
  inset: 0;
  z-index: 355;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  visibility: hidden;
  pointer-events: none;
}

.premium-sheet.is-open {
  visibility: visible;
  pointer-events: auto;
}

.premium-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition:
    background 0.45s var(--ease-out-expo),
    backdrop-filter 0.45s var(--ease-out-expo),
    -webkit-backdrop-filter 0.45s var(--ease-out-expo);
}

.premium-sheet.open .premium-sheet-backdrop {
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.premium-sheet-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: 26px 22px 22px;
  border-radius: var(--radius-xl);
  background: rgba(18, 22, 32, 0.97);
  border: 1px solid rgba(91, 140, 255, 0.18);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(91, 140, 255, 0.1);
  transform: scale(0.92) translateY(10px);
  opacity: 0;
  transition:
    transform 0.45s var(--ease-spring),
    opacity 0.45s var(--ease-out-expo);
}

.premium-sheet.open .premium-sheet-panel {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.premium-sheet-tall .premium-sheet-panel {
  max-height: min(92vh, 780px);
  display: flex;
  flex-direction: column;
}

.premium-sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.premium-sheet-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.premium-sheet-head {
  text-align: center;
  margin-bottom: 18px;
}

.premium-sheet-head-left {
  text-align: left;
}

.premium-sheet-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(91, 140, 255, 0.22), rgba(91, 140, 255, 0.08));
  border: 1px solid rgba(122, 164, 255, 0.28);
  color: var(--accent-bright);
}

.premium-sheet-head-left .premium-sheet-icon-wrap {
  margin-left: 0;
}

.premium-sheet-icon-wallet {
  color: #7eb6ff;
}

.premium-sheet-icon-ok {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.2), rgba(52, 211, 153, 0.08));
  border-color: rgba(52, 211, 153, 0.3);
  color: #34d399;
}

.premium-sheet-eyebrow {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  margin-bottom: 6px;
  font-weight: 600;
}

.premium-sheet-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.premium-sheet-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.premium-sheet-btn {
  width: 100%;
  margin-top: 8px;
}

.pay-method-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.pay-method-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.pay-method-card:has(input:checked) {
  border-color: rgba(91, 140, 255, 0.45);
  background: linear-gradient(145deg, rgba(91, 140, 255, 0.14), rgba(91, 140, 255, 0.06));
  box-shadow: 0 0 0 1px rgba(91, 140, 255, 0.15);
}

.pay-method-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-bright);
  flex-shrink: 0;
}

.pay-method-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.pay-method-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.pay-method-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.amount-grid-premium {
  margin-bottom: 18px;
}

.amount-grid-premium button {
  padding: 14px 8px;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.25s, background 0.25s;
}

.amount-grid-premium button.selected {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(91, 140, 255, 0.35);
}

.pay-info-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.65;
  white-space: pre-wrap;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.pay-id-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
}

.history-scroll {
  flex: 1;
  overflow-y: auto;
  margin: 0 -4px 12px;
  padding: 0 4px;
  min-height: 120px;
}

.history-group {
  margin-bottom: 18px;
}

.history-date-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-left: 4px;
  font-weight: 600;
}

.history-group-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
}

.history-row-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-bright);
}

.history-row[data-tone="success"] .history-row-icon {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
}

.history-row[data-tone="danger"] .history-row-icon {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.history-row[data-tone="warn"] .history-row-icon {
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

.history-row-body {
  flex: 1;
  min-width: 0;
}

.history-row-title {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 3px;
}

.history-row-details {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  word-break: break-word;
}

.history-row-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 2px;
}

.history-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 32px 12px;
  font-size: 0.92rem;
}

.device-delete-note.is-admin {
  color: var(--accent-bright);
}

.reduce-motion .premium-sheet-backdrop,
.reduce-motion .premium-sheet-panel {
  transition: none !important;
}

/* HitVPN-style topup & history pages */
.flow-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 8px 0 6px;
  text-align: center;
}

.flow-page-title-center {
  margin-bottom: 16px;
}

.flow-page-sub {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.45;
}

.flow-footer {
  margin-top: 20px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
}

.flow-footer-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.topup-amount-card {
  padding: 24px 18px 18px !important;
  text-align: center;
}

.topup-amount-display {
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 6px;
  letter-spacing: -0.03em;
}

.topup-amount-display-lg {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 20px;
  letter-spacing: -0.03em;
}

.topup-amount-display .topup-amount-currency,
.topup-amount-display-lg .topup-amount-currency {
  font-weight: 500;
  opacity: 0.85;
}

.topup-amount-display.has-value {
  color: var(--text-primary);
}

.topup-amount-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.amount-grid-hit {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.amount-grid-hit button {
  padding: 14px 6px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.amount-grid-hit button.selected {
  background: linear-gradient(135deg, var(--accent) 0%, #4f6ef7 100%);
  border-color: transparent;
  box-shadow: 0 6px 22px rgba(91, 140, 255, 0.35);
  transform: scale(1.02);
}

.topup-method-card {
  padding: 0 !important;
  overflow: hidden;
  margin-bottom: 12px;
}

.topup-method-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-top: 1px solid var(--ios-separator);
  cursor: pointer;
  width: 100%;
}

.topup-method-row:first-child {
  border-top: none;
}

.topup-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-bright);
  flex-shrink: 0;
}

.topup-method-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
}

.topup-method-row input[type="radio"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}

.topup-method-row input[type="radio"]:checked {
  border-color: var(--accent-bright);
  background: radial-gradient(circle, var(--accent-bright) 40%, transparent 42%);
}

.topup-requisites {
  padding: 16px !important;
  margin-bottom: 12px;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.topup-req-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topup-req-row:last-child {
  border-bottom: none;
}

.topup-req-label {
  color: var(--text-muted);
  flex-shrink: 0;
}

.topup-req-value {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}

.topup-comment-card {
  padding: 16px !important;
  margin-bottom: 12px;
}

.topup-comment-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.topup-comment-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(91, 140, 255, 0.12);
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topup-comment-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.topup-comment-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-bright);
  word-break: break-word;
}

.topup-warn {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px !important;
  margin-bottom: 8px;
  background: rgba(251, 191, 36, 0.08) !important;
  border-color: rgba(251, 191, 36, 0.22) !important;
}

.topup-warn.hidden {
  display: none !important;
}

.topup-warn-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.topup-warn p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.history-hit-card {
  padding: 8px 0 !important;
  overflow: hidden;
}

.history-hit-group {
  padding: 0 16px 8px;
}

.history-hit-date {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 0 8px;
}

.history-hit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--ios-separator);
}

.history-hit-group .history-hit-row:first-of-type {
  border-top: none;
}

.history-hit-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.history-hit-body {
  flex: 1;
  min-width: 0;
}

.history-hit-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.history-hit-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.history-hit-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.admin-pay-badge {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.platform-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--ios-separator);
  cursor: pointer;
}

.platform-pick span:nth-child(2) { flex: 1; }

.pay-opt { display: block; padding: 12px 0; cursor: pointer; }

.guide-steps {
  margin: 12px 0 20px 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.95rem;
}

.guide-steps li { margin-bottom: 8px; }

/* Forms & misc */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.logo { font-size: 1.25rem; font-weight: 700; }

.balance-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}

.balance-card .amount { font-size: 2.5rem; font-weight: 700; }
.balance-card .hint { color: var(--text-secondary); font-size: 0.9rem; margin-top: 6px; }

.row-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.section-title {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 20px 0 10px;
}

.device-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.device-row small { color: var(--text-secondary); display: block; margin-top: 4px; }

.platform-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--ios-separator);
  cursor: pointer;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.amount-grid button {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  padding: 12px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
}

.amount-grid button.selected {
  background: linear-gradient(135deg, var(--accent) 0%, #4f6ef7 100%);
  border-color: transparent;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.pay-info {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.85rem;
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 12px 0;
}

.copy-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.copy-row input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px;
  font-size: 0.8rem;
  font-family: inherit;
}

.input-dark {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 12px;
  margin: 10px 0;
  font-family: inherit;
  transition: border-color var(--duration-fast) var(--ease-out-expo);
}

.input-dark:focus {
  outline: none;
  border-color: rgba(91, 140, 255, 0.5);
}

.back-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.tip {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* ─── Premium cursor ─── */
@media (pointer: fine) {
  html.custom-cursor-active,
  html.custom-cursor-active * {
    cursor: none !important;
  }
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 10000;
  will-change: transform;
  mix-blend-mode: difference;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  transition: opacity 0.25s var(--ease-out-expo);
}

.cursor-ring {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.85);
  transition: width 0.35s var(--ease-spring), height 0.35s var(--ease-spring), opacity 0.25s var(--ease-out-expo);
}

.cursor-dot[data-variant="pointer"],
.cursor-ring[data-variant="pointer"] {
  mix-blend-mode: difference;
}

.cursor-ring[data-variant="pointer"] {
  width: 48px;
  height: 48px;
}

.cursor-dot[data-variant="pointer"] {
  width: 3px;
  height: 3px;
}

.cursor-dot[data-variant="hidden"],
.cursor-ring[data-variant="hidden"] {
  opacity: 0;
}

.reduce-motion .cursor-dot,
.reduce-motion .cursor-ring {
  display: none !important;
}

/* ─── Magnetic targets ─── */
.magnetic-target {
  will-change: transform;
  transition: transform 0.15s var(--ease-out-expo);
}

/* ─── Animated icons ─── */
.anim-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-bright);
  transition: transform 0.45s var(--ease-spring);
}

.anim-icon svg {
  transition: transform 0.45s var(--ease-spring), stroke-width 0.35s var(--ease-out-expo);
}

.anim-icon[data-icon-preset="lift"].is-icon-hover svg,
.feature-icon-svg.is-icon-hover svg {
  transform: translateY(-2px) rotate(-6deg);
  stroke-width: 2.25;
}

.anim-icon[data-icon-preset="nudge"].is-icon-hover svg {
  transform: translateX(2px) rotate(8deg);
  stroke-width: 2.1;
}

.anim-icon[data-icon-preset="rotate"].is-icon-hover svg {
  transform: rotate(14deg);
  stroke-width: 2.15;
}

.anim-icon[data-icon-preset="draw"].is-icon-hover svg {
  transform: translate(-1px, 1px) rotate(-4deg);
  stroke-width: 2.4;
}

.feature-icon-svg {
  margin-bottom: 12px;
  color: var(--accent-bright);
}

.landing-page .brand {
  gap: 10px;
}

.brand-shield {
  color: var(--accent-bright);
}

.btn-primary.btn-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-inner {
  flex: 1;
}

.btn-icon {
  flex-shrink: 0;
}

.inline-flex {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cabinet-page .brand-icon {
  display: inline-flex;
  color: var(--accent-bright);
}
