:root {
  --bg: #eef3fb;
  --bg-accent: #dfe7f7;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --text: #101725;
  --muted: #66718a;
  --line: rgba(24, 40, 76, 0.1);
  --primary: #1f6fff;
  --primary-dark: #184fc7;
  --secondary: #e9eef9;
  --support: #141c2b;
  --shadow: 0 24px 60px rgba(27, 48, 92, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes soft-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-4px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 106, 77, 0.22);
  }

  50% {
    box-shadow: 0 0 0 10px rgba(255, 106, 77, 0);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Avenir Next", "SF Pro Display", "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 30%),
    radial-gradient(circle at bottom right, rgba(31, 111, 255, 0.16), transparent 28%),
    linear-gradient(145deg, var(--bg) 0%, var(--bg-accent) 100%);
}

.app-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(40px + env(safe-area-inset-bottom, 0px));
}

.hidden {
  display: none !important;
}

.welcome-screen {
  display: grid;
  gap: 18px;
  min-height: calc(100vh - 64px);
  align-content: center;
  padding: 10px 0 6px;
  animation: fade-up 0.55s ease both;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(31, 111, 255, 0.1);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-title {
  margin: 0;
  max-width: 560px;
  font-size: clamp(38px, 8vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.welcome-subtitle {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.45;
}

.welcome-card,
.welcome-referral-card {
  background: rgba(255, 255, 255, 0.9);
}

.benefits-list {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.benefits-list li {
  color: var(--text);
  font-size: 17px;
  line-height: 1.45;
}

.welcome-referral-copy {
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text);
}

.welcome-code-block {
  margin-top: 14px;
}

.welcome-price {
  margin: 2px 2px 0;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.welcome-enter-button {
  width: 100%;
  padding: 18px 20px;
  font-size: 18px;
}

.hero {
  padding: 14px 2px 22px;
  animation: fade-up 0.5s ease both;
}

.dashboard-hero {
  padding: 8px 2px 14px;
}

.dashboard-hero-shell {
  padding: 18px 18px 10px;
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.44) 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 20px 60px rgba(27, 48, 92, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 46px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 560px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.hero-copy strong {
  color: var(--text);
}

.content {
  display: grid;
  gap: 16px;
}

.dashboard-content {
  gap: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 20px;
  animation: fade-up 0.55s ease both;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease,
    background 0.24s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 64px rgba(27, 48, 92, 0.16);
  border-color: rgba(24, 40, 76, 0.14);
}

.dashboard-balance-card,
.dashboard-actions-card,
.dashboard-soft-card {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 18px 50px rgba(27, 48, 92, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.content > .card:nth-child(1),
.welcome-screen > *:nth-child(1),
.payment-screen > *:nth-child(1) {
  animation-delay: 0.04s;
}

.content > .card:nth-child(2),
.welcome-screen > *:nth-child(2),
.payment-screen > *:nth-child(2) {
  animation-delay: 0.1s;
}

.content > .card:nth-child(3),
.welcome-screen > *:nth-child(3),
.payment-screen > *:nth-child(3) {
  animation-delay: 0.16s;
}

.content > .card:nth-child(4),
.welcome-screen > *:nth-child(4),
.payment-screen > *:nth-child(4) {
  animation-delay: 0.22s;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-label {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-label-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.label-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(31, 111, 255, 0.1);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.profile-summary-card .profile-list {
  margin-top: 18px;
}

.profile-summary-card {
  padding: 18px 18px 20px;
}

.profile-summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-summary-status {
  display: grid;
  gap: 10px;
}

.profile-summary-id {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-id-copy {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.profile-id-label {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.1;
}

.profile-id-value {
  font-size: clamp(18px, 4vw, 28px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, rgba(113, 147, 205, 0.88) 0 20%, transparent 21%),
    radial-gradient(circle at 50% 82%, rgba(154, 177, 220, 0.95) 0 34%, transparent 35%),
    linear-gradient(180deg, rgba(227, 234, 248, 1) 0%, rgba(210, 221, 243, 1) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.profile-summary-divider {
  height: 1px;
  margin: 18px -2px 14px;
  background: linear-gradient(90deg, rgba(24, 40, 76, 0.04) 0%, rgba(24, 40, 76, 0.1) 50%, rgba(24, 40, 76, 0.04) 100%);
}

.profile-balance-panel {
  padding: 4px 2px 2px;
}

.profile-balance-label {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.2;
}

.profile-balance-value {
  margin-top: 10px;
  font-size: clamp(40px, 10vw, 66px);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.profile-days-wrap {
  margin-top: 18px;
}

.profile-days-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffbf82 0%, #f39a54 100%);
  color: #fff;
  font-size: clamp(22px, 5vw, 36px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  box-shadow: 0 10px 26px rgba(243, 154, 84, 0.26);
}

.profile-hidden-value {
  display: none;
}

.dashboard-main-panel {
  display: grid;
  gap: 18px;
  padding: 6px;
}

.dashboard-status-block {
  display: grid;
  gap: 10px;
}

.dashboard-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(24, 40, 76, 0.06);
}

.dashboard-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dashboard-identity-copy {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.dashboard-id-value {
  font-size: clamp(18px, 4vw, 28px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, rgba(113, 147, 205, 0.88) 0 20%, transparent 21%),
    radial-gradient(circle at 50% 82%, rgba(154, 177, 220, 0.95) 0 34%, transparent 35%),
    linear-gradient(180deg, rgba(227, 234, 248, 1) 0%, rgba(210, 221, 243, 1) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.dashboard-balance-panel {
  padding: 22px 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 40, 76, 0.06);
}

.dashboard-balance-value {
  margin-top: 10px;
  font-size: clamp(42px, 10vw, 72px);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.dashboard-days-wrap {
  margin-top: 16px;
}

.dashboard-days-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffbf82 0%, #f39a54 100%);
  color: #fff;
  font-size: clamp(22px, 5vw, 38px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  box-shadow: 0 10px 26px rgba(243, 154, 84, 0.26);
}

.dashboard-balance-copy {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.dashboard-status-note {
  margin: 0 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.2;
}

.vpn-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.vpn-status-active {
  color: #167a46;
  background: rgba(22, 122, 70, 0.1);
}

.vpn-status-inactive {
  color: #c63c4b;
  background: rgba(198, 60, 75, 0.1);
}

.vpn-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  animation: vpnStatusPulse 1.4s ease-in-out infinite;
}

.vpn-status-active .vpn-status-dot {
  background: #22b35f;
}

.vpn-status-inactive .vpn-status-dot {
  background: #eb4a5b;
}

.profile-status-note {
  margin: 0 0 0 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.4;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  margin-top: 6px;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.metric-card {
  padding: 16px 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(24, 40, 76, 0.06);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.metric-card-balance .metric-value {
  font-size: clamp(30px, 7vw, 44px);
}

.metric-card-days .metric-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffbf82 0%, #f39a54 100%);
  color: #fff;
  font-size: clamp(20px, 4vw, 26px);
  box-shadow: 0 10px 22px rgba(243, 154, 84, 0.24);
}

.profile-list {
  margin: 14px 0 0;
}

.profile-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.profile-row:first-child {
  border-top: 0;
}

.profile-row dt {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.profile-row dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 10px;
  background: rgba(31, 111, 255, 0.1);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.tariff-inline {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.tariff-inline-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.tariff-inline-price {
  margin-top: 10px;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.04em;
}

.tariff-inline-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.profile-estimate-copy {
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.topup-button {
  width: 100%;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.dashboard-actions-card {
  display: grid;
  gap: 16px;
}

.dashboard-device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 2px 2px;
}

.dashboard-row-copy {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
}

.dashboard-row-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(80, 150, 255, 0.2) 0%, rgba(53, 111, 227, 0.18) 100%);
}

.dashboard-row-value {
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.dashboard-info-card {
  padding: 18px 18px 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(24, 40, 76, 0.06);
}

.dashboard-info-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

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

.dashboard-shortcut-button,
.dashboard-nav-button {
  border: 0;
  border-radius: 999px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  transition: transform 0.18s ease, background 0.18s ease;
}

.dashboard-shortcut-button:hover,
.dashboard-nav-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.88);
}

.dashboard-shortcut-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.dashboard-shortcut-icon,
.dashboard-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #77b5ff 0%, #4d8cff 100%);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(77, 140, 255, 0.22);
}

.dashboard-topup-button {
  width: 100%;
  margin-top: 2px;
  padding: 18px 20px;
  border-radius: 22px;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  box-shadow: 0 18px 36px rgba(31, 111, 255, 0.24);
}

.dashboard-topup-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.dashboard-utility-card {
  padding: 14px 16px;
}

.dashboard-bottom-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dashboard-nav-danger {
  color: #d64a5c;
  background: rgba(255, 244, 246, 0.92);
}

.dashboard-hint {
  margin-top: 0;
}

.devices-card {
  display: grid;
  gap: 14px;
}

.devices-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.devices-add-button {
  padding: 12px 16px;
  white-space: nowrap;
  align-self: center;
}

.devices-title {
  margin: 10px 0 0;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.devices-summary {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.devices-summary strong {
  color: var(--text);
}

.devices-list {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.device-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(24, 40, 76, 0.08);
  background: rgba(255, 255, 255, 0.94);
  animation: fade-up 0.45s ease both;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.device-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(27, 48, 92, 0.1);
}

.device-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2f8cff 0%, #1757d5 100%);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
}

.device-meta {
  min-width: 0;
}

.device-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.device-type {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.device-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.device-date {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.device-edit-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(31, 111, 255, 0.1);
  color: var(--primary-dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.device-edit-input {
  width: 100%;
  border: 1px solid rgba(24, 40, 76, 0.12);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}

.device-empty {
  padding: 18px 16px;
  color: var(--muted);
  font-size: 15px;
  border-radius: 20px;
  border: 1px dashed rgba(24, 40, 76, 0.14);
  background: rgba(255, 255, 255, 0.72);
}

.action-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.primary-button,
.secondary-button,
.ghost-button,
.support-button,
.sos-button {
  border: 0;
  border-radius: var(--radius-md);
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
  text-decoration: none;
  text-align: center;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.support-button:hover,
.sos-button:hover,
.amount-button:hover,
.method-button:hover,
.device-option-button:hover,
.store-download-button:hover,
.danger-button:hover {
  transform: translateY(-2px);
  filter: saturate(1.05);
}

.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.support-button:active,
.sos-button:active {
  transform: translateY(1px) scale(0.995);
}

.primary-button {
  padding: 16px 18px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.secondary-button {
  padding: 14px 18px;
  color: var(--text);
  background: var(--secondary);
}

.support-button {
  padding: 14px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--support) 0%, #2a3958 100%);
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(20, 28, 43, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sos-button {
  padding: 14px 18px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #ff6a4d 0%, #d83a2e 100%);
  box-shadow: 0 14px 28px rgba(216, 58, 46, 0.24);
  animation: pulse-glow 2.6s ease-in-out infinite;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.ghost-button {
  padding: 10px 14px;
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
  background: rgba(31, 143, 98, 0.08);
}

.hint {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.sos-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 18px;
  animation: fade-in 0.2s ease both;
}

.sos-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 23, 37, 0.36);
  backdrop-filter: blur(8px);
}

.sos-modal-sheet {
  position: relative;
  width: min(100%, 520px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 20px;
  animation: fade-up 0.28s ease both;
}

.sos-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sos-modal-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.sos-modal-title {
  margin: 14px 0 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.sos-reason-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.sos-reason-button {
  width: 100%;
  padding: 15px 18px;
  font-weight: 700;
}

.code-block {
  margin: 16px 0 0;
  padding: 16px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(52, 38, 22, 0.18);
  background: rgba(255, 250, 242, 0.88);
  color: #2b241d;
  font-family: "SF Mono", "JetBrains Mono", "Menlo", monospace;
  font-size: 13px;
  line-height: 1.5;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: currentColor;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

.button-icon-light {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
}

.button-icon-secondary {
  background: rgba(31, 111, 255, 0.1);
  color: var(--primary-dark);
}

.button-icon-alert {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.referral-copy {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.stat-chip {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: rgba(31, 111, 255, 0.08);
}

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

.stat-chip strong {
  font-size: 22px;
}

.referral-button {
  width: 100%;
  margin-top: 12px;
}

.history-card {
  display: grid;
  gap: 16px;
}

.history-list {
  display: grid;
  gap: 10px;
  max-height: min(48vh, 440px);
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 40, 76, 0.18) transparent;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: transparent;
}

.history-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(24, 40, 76, 0.18);
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(24, 40, 76, 0.08);
  background: rgba(255, 255, 255, 0.94);
}

.history-main {
  min-width: 0;
}

.history-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.history-details {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.history-side {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 96px;
}

.history-date {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.history-amount {
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.history-amount-negative {
  color: #d64a5c;
}

@keyframes vpnStatusPulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.12);
    opacity: 0.72;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.device-settings-hero {
  padding-top: 18px;
}

.device-settings-card {
  display: grid;
  gap: 14px;
}

.device-settings-input {
  margin-top: 4px;
}

.device-settings-copy {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.danger-card {
  display: grid;
  gap: 14px;
  border-color: rgba(234, 74, 91, 0.16);
  background: rgba(255, 247, 248, 0.92);
}

.danger-label {
  color: #d64a5c;
}

.danger-copy {
  margin: 0;
  color: #7c4a53;
  font-size: 15px;
  line-height: 1.55;
}

.danger-button {
  border: 0;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  background: linear-gradient(135deg, #ff7c8c 0%, #eb4e62 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.payment-screen {
  display: grid;
  gap: 18px;
  animation: fade-up 0.5s ease both;
}

.payment-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.inline-back-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.topbar-balance {
  display: grid;
  justify-items: end;
  color: var(--muted);
  font-size: 14px;
}

.topbar-balance strong {
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.payment-header {
  text-align: center;
}

.payment-header h1 {
  margin: 0;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.payment-header p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.topup-card {
  padding: 26px 20px;
}

.topup-amount {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.topup-amount strong {
  font-size: clamp(44px, 12vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.topup-amount span {
  color: var(--muted);
  font-size: 18px;
}

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

.amount-button {
  border: 1px solid rgba(31, 111, 255, 0.15);
  border-radius: 16px;
  padding: 15px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.amount-button.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 14px 24px rgba(31, 111, 255, 0.2);
}

.amount-button:active,
.method-button:active {
  transform: translateY(1px) scale(0.995);
}

.payment-note {
  margin: 2px auto 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}

.payment-next-button {
  width: 100%;
  padding: 18px 20px;
  font-size: 18px;
}

.methods-card {
  display: grid;
  gap: 16px;
}

.method-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.method-label {
  color: var(--muted);
  font-size: 15px;
}

.method-summary strong {
  font-size: 28px;
  letter-spacing: -0.04em;
}

.method-button {
  width: 100%;
  border: 1px solid rgba(31, 111, 255, 0.16);
  border-radius: 18px;
  padding: 18px 16px;
  background: linear-gradient(135deg, rgba(31, 111, 255, 0.08) 0%, rgba(31, 111, 255, 0.18) 100%);
  color: var(--text);
  font: inherit;
  font-size: 18px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.method-button-active {
  border-color: rgba(31, 111, 255, 0.2);
}

.device-option-button {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title check"
    "copy check";
  gap: 4px 14px;
  border: 1px solid rgba(31, 111, 255, 0.14);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.device-option-button.active {
  border-color: rgba(31, 111, 255, 0.28);
  background: linear-gradient(135deg, rgba(31, 111, 255, 0.08) 0%, rgba(31, 111, 255, 0.16) 100%);
  box-shadow: inset 0 0 0 1px rgba(31, 111, 255, 0.06);
}

.device-option-title {
  grid-area: title;
  font-size: 22px;
  font-weight: 700;
}

.device-option-copy {
  grid-area: copy;
  color: var(--muted);
  font-size: 15px;
}

.device-option-check {
  grid-area: check;
  align-self: center;
  justify-self: center;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(31, 111, 255, 0.1);
  color: transparent;
  font-size: 18px;
  font-weight: 800;
}

.device-option-button.active .device-option-check {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
}

.method-note {
  margin-top: 0;
}

.device-install-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
  padding-top: 10px;
}

.device-install-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(31, 111, 255, 0.1);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: soft-float 3.2s ease-in-out infinite;
}

.device-install-kicker {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.device-install-hero h1 {
  margin: 0;
  font-size: clamp(34px, 8vw, 50px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.device-install-copy {
  max-width: 520px;
  margin: 4px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.45;
}

.device-install-card {
  display: grid;
  gap: 16px;
}

.store-app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
}

.store-app-meta {
  display: grid;
  gap: 6px;
}

.store-app-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.store-app-subtitle {
  color: var(--muted);
  font-size: 18px;
}

.store-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 124px;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(31, 111, 255, 0.1) 0%, rgba(31, 111, 255, 0.18) 100%);
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.device-install-note {
  margin-top: 0;
}

.device-link-card {
  display: grid;
  gap: 16px;
}

.instruction-row {
  padding: 18px;
  border-radius: 18px;
  background: rgba(31, 111, 255, 0.08);
}

.instruction-title {
  font-size: 20px;
  font-weight: 700;
}

@media (max-width: 640px) {
  .app-shell {
    padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .welcome-screen {
    min-height: calc(100vh - 46px);
    align-content: start;
    padding-top: 10px;
  }

  .card {
    padding: 18px;
    border-radius: 24px;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .referral-stats {
    grid-template-columns: 1fr;
  }

  .amount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-row {
    grid-template-columns: 1fr;
  }

  .store-app-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .store-download-button {
    width: 100%;
  }

  .profile-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-row dd {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .hero {
    padding: 6px 2px 18px;
  }

  .hero-copy,
  .welcome-subtitle {
    font-size: 15px;
  }

  .devices-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .devices-add-button {
    width: 100%;
  }

  .dashboard-topline {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-identity {
    justify-content: space-between;
  }

  .dashboard-identity-copy {
    justify-items: start;
  }

  .dashboard-shortcuts,
  .dashboard-bottom-nav {
    grid-template-columns: 1fr;
  }

  .history-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .history-side {
    width: 100%;
    min-width: 0;
    grid-auto-flow: column;
    justify-content: space-between;
    align-items: center;
  }

  .device-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .device-side {
    grid-column: 2;
    justify-items: start;
    grid-auto-flow: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .topbar-balance strong {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .welcome-screen {
    gap: 14px;
    min-height: auto;
    padding-top: 8px;
  }

  .welcome-title {
    font-size: clamp(32px, 11vw, 44px);
  }

  .hero h1,
  .payment-header h1,
  .device-install-hero h1 {
    font-size: clamp(28px, 11vw, 38px);
  }

  .dashboard-hero-shell,
  .card {
    border-radius: 28px;
  }

  .dashboard-balance-panel {
    padding: 18px 16px;
  }

  .dashboard-balance-value {
    font-size: clamp(38px, 14vw, 54px);
  }

  .dashboard-days-pill {
    font-size: 18px;
    padding: 9px 14px;
  }

  .dashboard-row-copy {
    font-size: 16px;
  }

  .metric-value {
    font-size: 28px;
  }

  .devices-title {
    font-size: 22px;
  }

  .devices-summary,
  .referral-copy,
  .tariff-inline-copy,
  .hint,
  .payment-note,
  .device-settings-copy,
  .danger-copy {
    font-size: 14px;
  }

  .device-item {
    padding: 14px;
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .device-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 22px;
  }

  .device-name {
    font-size: 15px;
  }

  .device-type,
  .device-date {
    font-size: 13px;
  }

  .device-edit-button,
  .primary-button,
  .secondary-button,
  .support-button,
  .sos-button,
  .danger-button {
    width: 100%;
  }

  .payment-topbar {
    align-items: flex-start;
  }

  .inline-back-button {
    font-size: 16px;
  }

  .code-block {
    font-size: 12px;
    padding: 14px;
  }
}
