/* =================================================================
   ATLAS VPN — Cyber Neon Design System
   Shared CSS for all user-facing pages
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* === Palette === */
  --bg: #06060A;
  --bg-elev: #0E0E16;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.55);
  --muted-2: rgba(255, 255, 255, 0.35);

  --accent: #2F6DF6;
  --accent-2: #68A1FF;
  --accent-glow: rgba(47, 109, 246, 0.45);
  --accent-soft: rgba(47, 109, 246, 0.12);

  --danger: #EF4444;
  --warn: #F59E0B;
  --info: #3B82F6;
  --purple: #A855F7;

  /* === Radius === */
  --r-s: 12px;
  --r-m: 16px;
  --r-l: 22px;
  --r-xl: 28px;
  --r-full: 100px;

  /* === Shadows === */
  --shadow: 0 12px 40px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 60px rgba(0,0,0,0.6);
  --glow: 0 0 30px var(--accent-glow);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a.btn, a.btn:hover, a.btn:active, .btn:hover, .btn:active { text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* =================================================================
   PHONE / PAGE FRAME
   ================================================================= */
.stage {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(47,109,246,0.10), transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(104,161,255,0.08), transparent 45%),
    #000;
  position: relative;
}
.stage::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 30%, transparent 70%);
  pointer-events: none;
}
.stage-layout {
  display: flex;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.stage-info {
  max-width: 340px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  display: none;
}
@media (min-width: 1100px) { .stage-info { display: block; } }
.stage-info .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--accent-soft);
  border: 1px solid rgba(47,109,246,0.25);
  color: var(--accent);
  font-weight: 600; font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase;
  margin-bottom: 18px;
}
.stage-info h1 {
  color: var(--text);
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 14px;
}
.stage-info h1 .accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.stage-info p { margin-bottom: 14px; }
.stage-info ul { list-style: none; margin-top: 18px; }
.stage-info li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; color: rgba(255,255,255,0.75);
  font-size: 13px;
}
.stage-info li::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
  flex-shrink: 0;
}

/* Phone frame */
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  max-height: calc(100vh - 48px);
  border-radius: 52px;
  background: #000;
  padding: 12px;
  box-shadow:
    0 0 0 2px #1a1a22,
    0 0 0 12px #0a0a10,
    0 40px 100px rgba(0,0,0,0.8),
    0 0 80px rgba(47,109,246,0.10);
  flex-shrink: 0;
}
@media (max-width: 500px) {
  .stage { padding: 0; }
  .phone {
    width: 100vw; height: 100vh; max-height: 100vh;
    border-radius: 0; padding: 0; box-shadow: none;
  }
}
.screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
  display: flex;
  flex-direction: column;
}
@media (max-width: 500px) { .screen { border-radius: 0; } }

.island {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  width: 118px; height: 34px;
  background: #000;
  border-radius: var(--r-full);
  z-index: 100;
  pointer-events: none;
}

/* =================================================================
   ANIMATED BACKGROUND
   ================================================================= */
.bg-orbs {
  position: absolute; inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.orb-1 {
  width: 280px; height: 280px;
  background: radial-gradient(circle, #2F6DF6, transparent 70%);
  top: -80px; left: -60px;
  animation: float1 14s ease-in-out infinite;
}
.orb-2 {
  width: 220px; height: 220px;
  background: radial-gradient(circle, #68A1FF, transparent 70%);
  bottom: 100px; right: -80px;
  animation: float2 18s ease-in-out infinite;
}
.orb-3 {
  width: 180px; height: 180px;
  background: radial-gradient(circle, #06B6D4, transparent 70%);
  top: 40%; left: 50%;
  animation: float3 22s ease-in-out infinite;
  opacity: 0.3;
}
@keyframes float1 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(40px, 60px) scale(1.15); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-60px, -40px) scale(1.2); }
}
@keyframes float3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-30%, -70%) scale(1.3); }
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 50% 40%, black 0%, transparent 80%);
  pointer-events: none;
  z-index: 1;
}

/* =================================================================
   STATUS BAR
   ================================================================= */
.status-bar {
  position: relative;
  z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 32px 8px;
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.status-right { display: flex; align-items: center; gap: 6px; }
.status-right svg { width: 16px; height: 11px; fill: #fff; }
.battery {
  width: 24px; height: 12px;
  border: 1.5px solid rgba(255,255,255,0.6);
  border-radius: 4px;
  position: relative;
  padding: 1px;
}
.battery::after {
  content: ""; position: absolute;
  right: -3px; top: 3px;
  width: 2px; height: 4px;
  background: rgba(255,255,255,0.6);
  border-radius: 0 2px 2px 0;
}
.battery-fill {
  width: 75%; height: 100%;
  background: #fff;
  border-radius: 2px;
}

/* =================================================================
   CONTENT WRAPPER
   ================================================================= */
.content {
  position: relative;
  z-index: 10;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 22px 110px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.content::-webkit-scrollbar { display: none; }
.content.no-nav { padding-bottom: 32px; }

/* =================================================================
   TOPBAR
   ================================================================= */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
}
.brand-logo {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  filter: drop-shadow(0 0 12px rgba(47,109,246,0.5)) drop-shadow(0 0 30px rgba(47,109,246,0.25)) drop-shadow(0 0 60px rgba(47,109,246,0.12));
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.brand-logo svg { width: 18px; height: 18px; stroke: #062014; stroke-width: 2.4; fill: none; }
.brand-name {
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-name .sub { color: var(--accent); }
.topbar-title {
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.02em;
  flex: 1;
}
.icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--r-s);
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  transition: all .2s ease;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  position: relative;
}
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 18px; height: 18px; stroke: var(--text); stroke-width: 2; fill: none; }
.icon-btn .dot-badge {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--danger);
}

.back-btn {
  width: 40px; height: 40px;
  border-radius: var(--r-s);
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  transition: all .2s ease;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}
.back-btn:active { transform: scale(0.92); }
.back-btn svg { width: 18px; height: 18px; stroke: var(--text); stroke-width: 2.4; fill: none; }

/* =================================================================
   CARDS
   ================================================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 16px;
  backdrop-filter: blur(20px);
  margin-bottom: 14px;
}
.card.compact { padding: 12px; }
.card.elevated {
  background: linear-gradient(135deg, rgba(47,109,246,0.05), var(--surface));
  border-color: rgba(47,109,246,0.18);
}
.card-title {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* =================================================================
   INPUTS
   ================================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.field-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
  padding-left: 4px;
}
.input-wrap {
  position: relative;
  width: 100%;
}
.input {
  width: 100%;
  height: 52px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--r-m);
  padding: 0 16px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all .2s ease;
  backdrop-filter: blur(10px);
}
.input.with-icon { padding-right: 52px; }
.input::placeholder { color: var(--muted-2); }
.input:focus {
  border-color: rgba(47,109,246,0.5);
  background: var(--surface-2);
  box-shadow: 0 0 0 4px rgba(47,109,246,0.08);
}
textarea.input {
  height: auto;
  min-height: 100px;
  padding: 12px 16px;
  line-height: 1.5;
  resize: vertical;
}
.input-icon-right {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  color: var(--muted);
  transition: all .2s ease;
}
.input-icon-right:active { transform: translateY(-50%) scale(0.9); }
.input-icon-right svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }

.field-error {
  font-size: 11px;
  color: var(--danger);
  padding-left: 4px;
  min-height: 0;
  opacity: 0;
  transition: all .25s ease;
  overflow: hidden;
}
.field.error .input { border-color: var(--danger); }
.field.error .field-error { min-height: 14px; opacity: 1; margin-top: 2px; }

/* =================================================================
   BUTTONS
   ================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border: none;
  border-radius: var(--r-m);
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.01em;
  transition: all .2s ease;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 10px 28px var(--accent-glow);
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(10px);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-block { display: flex; width: 100%; }
.btn-sm {
  height: 40px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: var(--r-s);
}
.btn-icon {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: var(--r-s);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: grid; place-items: center;
}
.btn-icon:active { transform: scale(0.92); }
.btn-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }

/* =================================================================
   TOGGLE
   ================================================================= */
.toggle {
  width: 46px; height: 28px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  position: relative;
  transition: all .3s ease;
  flex-shrink: 0;
}
.toggle::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.toggle.on {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 0 16px var(--accent-glow);
}
.toggle.on::after { left: 21px; }

/* =================================================================
   LIST ITEM
   ================================================================= */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  transition: all .2s ease;
  backdrop-filter: blur(10px);
  margin-bottom: 8px;
}
.list-item:active { transform: scale(0.985); }
.list-item + .list-item { margin-top: 0; }
.list-item-icon {
  width: 42px; height: 42px;
  border-radius: var(--r-s);
  background: var(--surface-2);
  display: grid; place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  font-size: 22px;
}
.list-item-icon.accent {
  background: var(--accent-soft);
  border-color: rgba(47,109,246,0.2);
}
.list-item-icon.accent svg { stroke: var(--accent); }
.list-item-icon svg { width: 20px; height: 20px; stroke: var(--text); stroke-width: 2; fill: none; }
.list-item-info { flex: 1; min-width: 0; }
.list-item-title {
  font-size: 14px; font-weight: 600;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 6px;
}
.list-item-sub {
  font-size: 12px; color: var(--muted);
  margin-top: 2px;
}
.list-item-arrow { color: var(--muted-2); flex-shrink: 0; }
.list-item-arrow svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }

/* =================================================================
   BADGES
   ================================================================= */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em;
}
.badge-success { background: rgba(47,109,246,0.15); color: var(--accent); }
.badge-warn { background: rgba(245,158,11,0.15); color: var(--warn); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-info { background: rgba(59,130,246,0.15); color: var(--info); }
.badge-purple { background: rgba(168,85,247,0.15); color: var(--purple); }
.badge-pro {
  background: linear-gradient(135deg, #F59E0B, #F97316);
  color: #1a0a00;
}

/* =================================================================
   BOTTOM NAV
   ================================================================= */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(8, 8, 14, 0.7);
  backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 16px;
  z-index: 50;
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  padding: 8px 4px;
  color: var(--muted-2);
  transition: color .25s ease;
  position: relative;
  text-decoration: none !important;
  border-bottom: none !important;
}
.nav-item:hover, .nav-item:active, .nav-item:focus { text-decoration: none !important; border-bottom: none !important; }
.nav-item svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; transition: all .25s ease; }
.nav-item .nm { font-size: 10px; font-weight: 600; }
.nav-item.active { color: var(--accent); }
.nav-item.active svg { filter: drop-shadow(0 0 8px var(--accent-glow)); }
.nav-item.active::before {
  content: "";
  position: absolute;
  top: 2px;
  width: 24px; height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px var(--accent-glow);
}
.home-ind { display: none; }

/* =================================================================
   TOAST
   ================================================================= */
.toast {
  position: absolute;
  top: 90px; left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(8,8,14,0.95);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(20px);
  padding: 12px 18px;
  border-radius: var(--r-m);
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
  opacity: 0;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
  z-index: 200;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  pointer-events: none;
  white-space: nowrap;
  max-width: 90%;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast .ic {
  width: 18px; height: 18px;
  stroke: var(--accent); stroke-width: 2.4; fill: none;
  flex-shrink: 0;
}
.toast.warn .ic { stroke: var(--warn); }
.toast.danger .ic { stroke: var(--danger); }

/* =================================================================
   SECTION HEADER
   ================================================================= */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 4px 10px;
}
.section-head h3 {
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.01em;
}
.section-head .link {
  font-size: 12px; color: var(--accent); font-weight: 600;
  cursor: pointer;
}

/* =================================================================
   STAT GRID
   ================================================================= */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  padding: 14px;
  backdrop-filter: blur(20px);
}
.stat-card .label {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.stat-card .label svg { width: 12px; height: 12px; stroke: var(--accent); stroke-width: 2.2; fill: none; }
.stat-card .value {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.stat-card .unit { font-size: 13px; color: var(--muted); font-weight: 500; }

/* =================================================================
   DIVIDER
   ================================================================= */
.divider {
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted-2);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px;
  background: var(--border);
}

/* =================================================================
   RIPPLE
   ================================================================= */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  pointer-events: none;
  animation: ripple .6s ease-out forwards;
  transform: scale(0);
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* =================================================================
   ANIMATIONS
   ================================================================= */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Stagger reveal */
.stagger > * {
  opacity: 0;
  transform: translateY(8px);
  animation: stag .5s ease forwards;
}
.stagger > *:nth-child(1) { animation-delay: .05s; }
.stagger > *:nth-child(2) { animation-delay: .1s; }
.stagger > *:nth-child(3) { animation-delay: .15s; }
.stagger > *:nth-child(4) { animation-delay: .2s; }
.stagger > *:nth-child(5) { animation-delay: .25s; }
.stagger > *:nth-child(6) { animation-delay: .3s; }
.stagger > *:nth-child(7) { animation-delay: .35s; }
.stagger > *:nth-child(8) { animation-delay: .4s; }
.stagger > *:nth-child(9) { animation-delay: .45s; }
.stagger > *:nth-child(10) { animation-delay: .5s; }
@keyframes stag {
  to { opacity: 1; transform: translateY(0); }
}

/* =================================================================
   ACCORDION
   ================================================================= */
.accordion-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  margin-bottom: 8px;
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.accordion-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  cursor: pointer;
  gap: 12px;
}
.accordion-head .q {
  font-size: 14px; font-weight: 600;
  flex: 1;
}
.accordion-head .arrow {
  width: 20px; height: 20px;
  color: var(--muted);
  transition: transform .3s ease;
  flex-shrink: 0;
}
.accordion-head .arrow svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 2; fill: none; }
.accordion-item.open .accordion-head .arrow { transform: rotate(180deg); color: var(--accent); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.accordion-item.open .accordion-body { max-height: 600px; }
.accordion-body-inner {
  padding: 0 16px 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* =================================================================
   MODAL
   ================================================================= */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal {
  width: 100%;
  max-width: 416px;
  background: rgba(12,12,20,0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  padding: 22px;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
}
.modal-overlay.show .modal { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 20px;
  position: relative;
  margin: 0 auto 16px;
  cursor: grab;
  touch-action: none;
  display: flex; align-items: center; justify-content: center;
}
.modal-handle::after {
  content: '';
  width: 40px; height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
}
.modal-title {
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  text-align: center;
}
.modal-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* =================================================================
   TARIFF CARD
   ================================================================= */
.tariff-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-l);
  padding: 18px;
  backdrop-filter: blur(20px);
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.tariff-card.popular {
  border-color: rgba(47,109,246,0.4);
  background: linear-gradient(135deg, rgba(47,109,246,0.08), var(--surface));
}
.tariff-card.popular::before {
  content: "ПОПУЛЯРНЫЙ";
  position: absolute;
  top: 14px; right: 14px;
  font-size: 9px; font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  letter-spacing: 0.08em;
}
.tariff-name {
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.tariff-desc {
  font-size: 12px; color: var(--muted);
  margin-bottom: 14px;
}
.tariff-price {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 14px;
}
.tariff-price .num {
  font-size: 32px; font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.tariff-price .unit { font-size: 13px; color: var(--muted); }
.tariff-features {
  list-style: none;
  margin-bottom: 14px;
}
.tariff-features li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}
.tariff-features li::before {
  content: "";
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
  background-size: 12px;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* =================================================================
   TABS / SEGMENT
   ================================================================= */
.segment {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  padding: 4px;
  margin-bottom: 16px;
  position: relative;
  backdrop-filter: blur(10px);
}
.segment .seg-btn {
  padding: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px; font-weight: 600;
  border-radius: 10px;
  transition: color .25s ease;
  font-family: inherit;
  position: relative;
  z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.segment .seg-btn svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; }
.segment .seg-btn.active { color: #062014; }
.segment .seg-indicator {
  position: absolute;
  top: 4px; left: 4px;
  width: calc((100% - 8px) / var(--cols, 2));
  height: calc(100% - 8px);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 10px;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 4px 12px var(--accent-glow);
  z-index: 1;
}

/* =================================================================
   MISC HELPERS
   ================================================================= */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-warn { color: var(--warn); }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.tabular { font-variant-numeric: tabular-nums; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-14 { margin-bottom: 14px; }
.mb-18 { margin-bottom: 18px; }
.mt-8 { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }
.hidden { display: none; }
