/* Mobile-first redesign for Telegram Web App */
:root {
  --bg-1: #050812;
  --bg-2: #0d1730;
  --bg-3: #172246;
  --card: rgba(18, 26, 56, 0.82);
  --card-soft: rgba(255, 255, 255, 0.10);
  --line: rgba(255,255,255,.10);
  --text: #f6f8ff;
  --muted: #aeb8dc;
  --violet: #8b66ff;
  --blue: #5383ff;
  --cyan: #27c1ff;
  --danger: #ff7b91;
  --success: #55d39a;
  --shadow: 0 20px 56px rgba(0,0,0,.38);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-1);
}
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  overflow-x: hidden;
}
button, input { font: inherit; }
button { border: 0; }
img { max-width: 100%; display: block; }

.app-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(139, 102, 255, .24), transparent 24%),
    radial-gradient(circle at 94% 6%, rgba(39, 193, 255, .18), transparent 22%),
    radial-gradient(circle at 82% 36%, rgba(83, 131, 255, .12), transparent 24%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 52%, var(--bg-3) 100%);
}

.app-shell {
  position: relative;
  z-index: 2;
  width: min(100%, 430px);
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top, 14px)) 14px calc(100px + env(safe-area-inset-bottom, 18px));
}
.screen { display: none; }
.screen.active { display: block; }

.glass, .glass-soft {
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
}
.glass-soft {
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.07));
}

.topbar, .hero-card, .profile-card, .balance-card, .status-card, .step-card, .news-card, .news-headline, .sync-modal, .sheet, .empty-card, .subscription-compact {
  border-radius: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}
.topbar-brand { display: flex; align-items: center; min-width: 0; }
.brand-logo-wrap { position: relative; width: min(220px, 56vw); min-width: 148px; }
.brand-logo-wrap::before {
  content: "";
  position: absolute;
  inset: -10px -18px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(176, 104, 255, .24), transparent 55%),
    radial-gradient(circle at 74% 46%, rgba(84, 178, 255, .14), transparent 36%);
  filter: blur(24px);
  opacity: .85;
  pointer-events: none;
}
.brand-logo {
  position: relative;
  z-index: 1;
  opacity: .95;
  filter: saturate(.96) drop-shadow(0 10px 20px rgba(143, 95, 255, .16));
}

.screen-header h2, .section-head h3, .sheet-head h3 { margin: 6px 0 0; }
.status-text, .step-card p, .news-excerpt, .sync-text, .sheet-description, .news-article, .subscription-compact p {
  color: #dbe4ff;
  line-height: 1.5;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head, .screen-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
}
.section-gap { margin-top: 22px; }

.icon-btn, .primary-btn, .secondary-btn, .nav-btn {
  min-height: 48px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 800;
  color: var(--text);
}
.icon-btn {
  min-width: 48px;
  padding: 0 14px;
  background: rgba(255,255,255,.08);
}
.icon-btn--sm { min-width: 42px; min-height: 42px; }
.primary-btn {
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #fff;
  padding: 0 16px;
}
.secondary-btn, .nav-btn {
  background: rgba(255,255,255,.08);
  padding: 0 16px;
}

.tariff-list, .cards-stack, .news-list, .steps-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.tariff-card {
  position: relative;
  overflow: hidden;
  padding: 4px 18px;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05)),
    radial-gradient(circle at top right, rgba(83,131,255,.22), transparent 36%),
    radial-gradient(circle at bottom left, rgba(139,102,255,.20), transparent 34%);
}

.tariff-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.tariff-card::after {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(39,193,255,.15), transparent 70%);
}

.tariff-card > * {
  position: relative;
  z-index: 1;
}

.tariff-card--classic {
  border-color: rgba(122, 193, 255, .26);
  box-shadow: 0 0 0 1px rgba(122, 193, 255, .10) inset, var(--shadow);
}

.tariff-card--classic::before {
  background:
    linear-gradient(180deg, rgba(122, 193, 255, .16), rgba(122, 193, 255, .05)),
    radial-gradient(circle at top left, rgba(170, 225, 255, .20), transparent 42%),
    radial-gradient(circle at bottom right, rgba(83, 131, 255, .16), transparent 40%);
}

.tariff-card--classic::after {
  background: radial-gradient(circle, rgba(122, 193, 255, .22), transparent 70%);
}

.tariff-card--multi {
  border-color: rgba(255, 174, 84, .28);
  box-shadow: 0 0 0 1px rgba(255, 174, 84, .10) inset, var(--shadow);
}

.tariff-card--multi::before {
  background:
    linear-gradient(180deg, rgba(255, 174, 84, .18), rgba(255, 174, 84, .05)),
    radial-gradient(circle at top left, rgba(255, 210, 132, .22), transparent 42%),
    radial-gradient(circle at bottom right, rgba(255, 122, 59, .16), transparent 40%);
}

.tariff-card--multi::after {
  background: radial-gradient(circle, rgba(255, 174, 84, .22), transparent 70%);
}

.tariff-card--breaker {
  border-color: rgba(255, 104, 104, .28);
  box-shadow: 0 0 0 1px rgba(255, 104, 104, .10) inset, var(--shadow);
}

.tariff-card--breaker::before {
  background:
    linear-gradient(180deg, rgba(255, 104, 104, .18), rgba(255, 104, 104, .05)),
    radial-gradient(circle at top left, rgba(255, 150, 150, .22), transparent 42%),
    radial-gradient(circle at bottom right, rgba(255, 83, 83, .18), transparent 40%);
}

.tariff-card--breaker::after {
  background: radial-gradient(circle, rgba(255, 104, 104, .22), transparent 70%);
}
.tariff-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.tariff-name { font-size: 22px; font-weight: 800; line-height: 1.12; }
.tariff-subtitle { margin-top: 8px; color: #dbe4ff; line-height: 1.4; }
.tariff-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}
.tariff-price-preview {
  font-size: 13px;
  color: #dfe6ff;
  max-width: 60%;
}
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  font-size: 12px;
  font-weight: 800;
}


.badge--active {
  background: rgba(109, 229, 165, .16);
  color: #d9ffe8;
}

.badge--inactive {
  background: rgba(255, 132, 132, .14);
  color: #ffdcdc;
}

.badge--frozen {
  background: rgba(39, 193, 255, .16);
  color: #dff7ff;
  border: 1px solid rgba(39, 193, 255, .20);
}


.badge--active {
  background: rgba(109, 229, 165, .16);
  color: #d9ffe8;
}

.badge--inactive {
  background: rgba(255, 132, 132, .14);
  color: #ffdcdc;
}

.badge--frozen {
  background: rgba(39, 193, 255, .16);
  color: #dff7ff;
  border: 1px solid rgba(39, 193, 255, .20);
}




.badge--new { background: linear-gradient(135deg, rgba(139,102,255,.35), rgba(39,193,255,.35)); }
.badge--pinned { background: rgba(255, 123, 145, .18); color: #ffd7df; }
.badge--unread { background: rgba(85, 211, 154, .18); color: #d9ffec; }

.news-card--unread {
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset, var(--shadow);
}

.profile-card, .balance-card, .status-card, .news-headline { padding: 18px; }
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(139,102,255,.70), rgba(39,193,255,.70));
}
.profile-name { font-size: 18px; font-weight: 800; }
.profile-username { margin-top: 4px; color: var(--muted); }
.profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.info-box {
  padding: 14px;
  border-radius: 18px;
  background: rgba(20, 28, 58, .56);
  border: 1px solid rgba(255,255,255,.09);
}
.info-box span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.info-box strong { font-size: 22px; line-height: 1.1; }
.info-box--highlight strong { font-size: 24px; }
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.action-grid .primary-btn:first-child { grid-column: 1 / -1; }

.balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.balance-value { font-size: 34px; font-weight: 900; margin-top: 6px; }
.status-card { margin-top: 12px; }
.status-title { font-size: 16px; font-weight: 800; }
.status-text { margin: 8px 0 0; }





.screen-header--center {
  margin-top: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.section-head--center {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

.screen-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: .01em;
  text-align: center;
  color: #f6f8ff;
  text-shadow: 0 8px 24px rgba(0,0,0,.22);
}

.section-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: .01em;
  text-align: center;
  color: #f6f8ff;
  text-shadow: 0 8px 24px rgba(0,0,0,.18);
}

#pendingPaymentCard,
#paymentHistoryCard {
  text-align: center;
}

#pendingPaymentCard .status-title,
#paymentHistoryCard .status-title {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0;
}

#pendingPaymentCard .status-text,
#paymentHistoryCard .status-text {
  margin: 8px 0 0;
  text-align: center;
}

.payment-history-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.payment-history-page-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.payment-history-page-btn:active {
  transform: scale(.96);
}

.payment-history-page-btn.is-active {
  border-color: rgba(255, 187, 115, .34);
  background: linear-gradient(135deg, rgba(255, 187, 115, .32), rgba(255, 155, 84, .24));
  box-shadow: 0 0 0 1px rgba(255, 187, 115, .10) inset;
}










.subscription-compact {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(109, 229, 165, .24);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  box-shadow: 0 0 0 1px rgba(109, 229, 165, .10) inset, var(--shadow);
  isolation: isolate;
}

.subscription-compact::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(85, 211, 154, .16), rgba(85, 211, 154, .05)),
    radial-gradient(circle at top left, rgba(149, 255, 198, .18), transparent 42%),
    radial-gradient(circle at bottom right, rgba(45, 160, 104, .16), transparent 40%);
}

.subscription-compact::after {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(109, 229, 165, .20), transparent 70%);
}

.subscription-compact > * {
  position: relative;
  z-index: 1;
}
.subscription-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.subscription-compact h4 {
  margin: 4px 0 0;
  font-size: 18px;
}
.subscription-compact p { margin: 6px 0 0; }
.subscription-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.meta-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  color: #e8eeff;
  font-size: 12px;
}

.step-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  text-align: left;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.step-card:active {
  transform: scale(.99);
}

.step-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.step-card::after {
  content: "";
  position: absolute;
  inset: auto -28px -36px auto;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  pointer-events: none;
}

.step-card > * {
  position: relative;
  z-index: 1;
}

.step-card h3 { margin: 0; font-size: 17px; }
.step-card p { margin: 8px 0 0; }

.step-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-weight: 900;
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  background: rgba(255,255,255,.14);
}

#stepsMainBtn {
  border-color: rgba(196, 164, 255, .24);
  box-shadow: 0 0 0 1px rgba(196, 164, 255, .10) inset, var(--shadow);
}

#stepsMainBtn::before {
  background:
    linear-gradient(180deg, rgba(196, 164, 255, .18), rgba(196, 164, 255, .05)),
    radial-gradient(circle at top left, rgba(222, 204, 255, .20), transparent 42%),
    radial-gradient(circle at bottom right, rgba(164, 140, 255, .16), transparent 40%);
}

#stepsMainBtn::after {
  background: radial-gradient(circle, rgba(196, 164, 255, .20), transparent 70%);
}

#stepsMainBtn .step-icon {
  background: linear-gradient(135deg, rgba(196, 164, 255, .90), rgba(164, 140, 255, .72));
}

#openGuideBtn {
  border-color: rgba(128, 233, 226, .24);
  box-shadow: 0 0 0 1px rgba(128, 233, 226, .10) inset, var(--shadow);
}

#openGuideBtn::before {
  background:
    linear-gradient(180deg, rgba(128, 233, 226, .18), rgba(128, 233, 226, .05)),
    radial-gradient(circle at top left, rgba(187, 255, 248, .20), transparent 42%),
    radial-gradient(circle at bottom right, rgba(78, 205, 196, .16), transparent 40%);
}

#openGuideBtn::after {
  background: radial-gradient(circle, rgba(128, 233, 226, .20), transparent 70%);
}

#openGuideBtn .step-icon {
  background: linear-gradient(135deg, rgba(128, 233, 226, .92), rgba(78, 205, 196, .72));
}

#openAndroidVideoBtn {
  border-color: rgba(156, 235, 166, .24);
  box-shadow: 0 0 0 1px rgba(156, 235, 166, .10) inset, var(--shadow);
}

#openAndroidVideoBtn::before {
  background:
    linear-gradient(180deg, rgba(156, 235, 166, .18), rgba(156, 235, 166, .05)),
    radial-gradient(circle at top left, rgba(210, 255, 199, .20), transparent 42%),
    radial-gradient(circle at bottom right, rgba(108, 204, 122, .16), transparent 40%);
}

#openAndroidVideoBtn::after {
  background: radial-gradient(circle, rgba(156, 235, 166, .20), transparent 70%);
}

#openAndroidVideoBtn .step-icon {
  background: linear-gradient(135deg, rgba(156, 235, 166, .92), rgba(108, 204, 122, .72));
}

#openIphoneVideoBtn {
  border-color: rgba(255, 187, 115, .26);
  box-shadow: 0 0 0 1px rgba(255, 187, 115, .10) inset, var(--shadow);
}

#openIphoneVideoBtn::before {
  background:
    linear-gradient(180deg, rgba(255, 187, 115, .18), rgba(255, 187, 115, .06)),
    radial-gradient(circle at top left, rgba(255, 223, 166, .18), transparent 42%),
    radial-gradient(circle at bottom right, rgba(255, 155, 84, .16), transparent 40%);
}

#openIphoneVideoBtn::after {
  background: radial-gradient(circle, rgba(255, 187, 115, .20), transparent 70%);
}

#openIphoneVideoBtn .step-icon {
  background: linear-gradient(135deg, rgba(255, 223, 166, .92), rgba(255, 155, 84, .72));
}

.news-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 14px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  min-height: 148px;
}

.news-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.news-card::after {
  content: "";
  position: absolute;
  inset: auto -28px -36px auto;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  pointer-events: none;
}

.news-card > * {
  position: relative;
  z-index: 1;
}

.news-card--uniform {
  min-height: 148px;
}

.news-card--tone-0 {
  border-color: rgba(196, 164, 255, .24);
  box-shadow: 0 0 0 1px rgba(196, 164, 255, .10) inset, var(--shadow);
}

.news-card--tone-0::before {
  background:
    linear-gradient(180deg, rgba(196, 164, 255, .18), rgba(196, 164, 255, .05)),
    radial-gradient(circle at top left, rgba(222, 204, 255, .20), transparent 42%),
    radial-gradient(circle at bottom right, rgba(164, 140, 255, .16), transparent 40%);
}

.news-card--tone-0::after {
  background: radial-gradient(circle, rgba(196, 164, 255, .20), transparent 70%);
}

.news-card--tone-1 {
  border-color: rgba(128, 233, 226, .24);
  box-shadow: 0 0 0 1px rgba(128, 233, 226, .10) inset, var(--shadow);
}

.news-card--tone-1::before {
  background:
    linear-gradient(180deg, rgba(128, 233, 226, .18), rgba(128, 233, 226, .05)),
    radial-gradient(circle at top left, rgba(187, 255, 248, .20), transparent 42%),
    radial-gradient(circle at bottom right, rgba(78, 205, 196, .16), transparent 40%);
}

.news-card--tone-1::after {
  background: radial-gradient(circle, rgba(128, 233, 226, .20), transparent 70%);
}

.news-card--tone-2 {
  border-color: rgba(156, 235, 166, .24);
  box-shadow: 0 0 0 1px rgba(156, 235, 166, .10) inset, var(--shadow);
}

.news-card--tone-2::before {
  background:
    linear-gradient(180deg, rgba(156, 235, 166, .18), rgba(156, 235, 166, .05)),
    radial-gradient(circle at top left, rgba(210, 255, 199, .20), transparent 42%),
    radial-gradient(circle at bottom right, rgba(108, 204, 122, .16), transparent 40%);
}

.news-card--tone-2::after {
  background: radial-gradient(circle, rgba(156, 235, 166, .20), transparent 70%);
}

.news-card-main {
  min-width: 0;
  padding: 0;
  text-align: center;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 118px;
  text-align: center;
}

.news-delete-btn {
  align-self: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 123, 145, .28);
  background: rgba(255, 123, 145, .14);
  color: #ffd7df;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.news-delete-btn:disabled {
  opacity: .6;
  cursor: default;
}

.news-media {
  width: 100%;
  max-height: 260px;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(255,255,255,.06);
  margin-top: 10px;
}

.news-card h3 {
  margin: 8px 0 0;
  font-size: 18px;
  line-height: 1.22;
  text-align: center;
}

.news-date {
  color: rgba(246, 248, 255, .78);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: center;
}

.news-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 12px 0 0;
  text-align: center;
}

.news-card-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 0;
}


.screen[data-screen="news"] .screen-header {
  margin-top: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.screen[data-screen="news"] .screen-header .eyebrow {
  font-size: 12px;
  letter-spacing: .18em;
}

.screen[data-screen="news"] .screen-header h2 {
  margin-top: 2px;
  font-size: 24px;
  line-height: 1.18;
}

.screen[data-screen="news"] .news-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  border: 1px solid rgba(255, 187, 115, .26);
  background:
    linear-gradient(180deg, rgba(255, 187, 115, .18), rgba(255, 187, 115, .06)),
    radial-gradient(circle at top left, rgba(255, 223, 166, .18), transparent 42%),
    radial-gradient(circle at bottom right, rgba(255, 155, 84, .16), transparent 40%);
  box-shadow: 0 0 0 1px rgba(255, 187, 115, .10) inset, var(--shadow);
}





.screen[data-screen="balance"] .balance-card {
  border: 1px solid rgba(255, 187, 115, .26);
  background:
    linear-gradient(180deg, rgba(255, 187, 115, .18), rgba(255, 187, 115, .06)),
    radial-gradient(circle at top left, rgba(255, 223, 166, .18), transparent 42%),
    radial-gradient(circle at bottom right, rgba(255, 155, 84, .16), transparent 40%);
  box-shadow: 0 0 0 1px rgba(255, 187, 115, .10) inset, var(--shadow);
}

.screen[data-screen="balance"] .balance-card .eyebrow {
  color: #ffe1bf;
}






.screen[data-screen="profile"] .profile-card {
  border: 1px solid rgba(255, 187, 115, .26);
  background:
    linear-gradient(180deg, rgba(255, 187, 115, .18), rgba(255, 187, 115, .06)),
    radial-gradient(circle at top left, rgba(255, 223, 166, .18), transparent 42%),
    radial-gradient(circle at bottom right, rgba(255, 155, 84, .16), transparent 40%);
  box-shadow: 0 0 0 1px rgba(255, 187, 115, .10) inset, var(--shadow);
}





.screen[data-screen="news"] .news-headline > div {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.screen[data-screen="news"] .news-headline .eyebrow {
  color: #ffe1bf;
}

.screen[data-screen="news"] .news-headline strong {
  font-size: 18px;
  line-height: 1.24;
}

.screen[data-screen="steps"] .screen-header {
  margin-top: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
}

.screen[data-screen="steps"] .screen-header .eyebrow {
  font-size: 12px;
  letter-spacing: .18em;
}

.screen[data-screen="steps"] .screen-header h2 {
  margin-top: 2px;
  font-size: 24px;
  line-height: 1.18;
}






.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 5;
  width: min(calc(100% - 16px), 430px);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  border-radius: 22px;
}
.nav-btn {
  min-height: 50px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
}
.nav-btn.active {
  background: linear-gradient(135deg, rgba(139,102,255,.92), rgba(39,193,255,.88));
  color: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(6, 9, 21, .58);
}
.sheet {
  position: fixed;
  z-index: 12;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  transform: none;
  overflow: hidden;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(18,24,56,.98), rgba(10,14,34,.99));
}
.sheet-handle {
  width: 46px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  margin: 12px auto 0;
}
.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 0;
}
.sheet-content {
  padding: 16px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow: auto;
  max-height: calc(100dvh - 72px);
}
.sheet-content--news { padding-top: 12px; }
.sheet-description p { margin: 0 0 10px; }
.sheet-description ul { margin: 0 0 14px; padding-left: 18px; color: #dce4ff; }
.sheet-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.news-sheet-media {
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 14px;
}
.news-article p { margin: 0 0 12px; }
.news-article img {
  border-radius: 18px;
  margin: 0 0 12px;
}

.hidden { display: none !important; }

.sync-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(5, 9, 19, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sync-modal {
  width: min(100%, 390px);
  max-height: calc(100dvh - 32px);
  margin: auto 0;
  padding: 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sync-label { display: block; margin-top: 16px; margin-bottom: 8px; color: var(--muted); }
.sync-input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(5, 9, 19, .58);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .18em;
  text-align: center;
}
.sync-error { min-height: 20px; margin-top: 10px; color: #ffb0bd; font-size: 13px; }
.sync-submit { width: 100%; margin-top: 12px; }


.sync-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}


.sync-modal .sync-actions {
  position: sticky;
  bottom: 0;
  padding-top: 12px;
  padding-bottom: 4px;
  background: linear-gradient(180deg, rgba(18, 26, 56, 0), rgba(18, 26, 56, 0.96) 28%);
}



.sync-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: var(--text);
}


.sync-accordion-toggle {
  width: 100%;
  min-height: 52px;
  margin-top: 14px;
  padding: 0 16px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.sync-accordion-icon {
  font-size: 18px;
  line-height: 1;
  opacity: .9;
}

.sync-accordion-panel {
  margin-top: 10px;
}





.sync-remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
}



.account-exit-fab {
  position: fixed;
  top: 50%;
  right: calc(12px + env(safe-area-inset-right, 0px));
  transform: translateY(-50%);
  z-index: 6;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  color: #ffffff;
  cursor: pointer;
}

.account-exit-fab:active {
  transform: translateY(-50%) scale(.97);
}

.account-exit-fab-icon {
  width: 24px;
  height: 24px;
  display: block;
  fill: currentColor;
  opacity: .96;
}

@media (max-width: 380px) {
  .account-exit-fab {
    width: 52px;
    height: 52px;
    right: 10px;
  }

  .account-exit-fab-icon {
    width: 22px;
    height: 22px;
  }
}




.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 16px);
  z-index: 30;
  min-width: 160px;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(14, 20, 48, .92);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  color: #fff;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

.toast--center {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, calc(-50% + 16px));
}

.toast--center.visible {
  transform: translate(-50%, -50%);
}

.empty-card {
  padding: 18px;
  text-align: left;
}
.empty-card strong { display: block; font-size: 18px; }
.empty-card p { color: #dce4ff; margin: 8px 0 0; }

@media (max-width: 380px) {
  .nav-btn { font-size: 11px; padding: 0 6px; }
  .tariff-name { font-size: 20px; }
  .balance-card { align-items: stretch; flex-direction: column; }
  .news-card {
    min-height: 136px;
    grid-template-columns: 1fr;
  }
  .news-delete-btn {
    width: 100%;
  }
  .news-media { width: 100%; height: auto; max-height: 220px; }
}


.payment-history-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.payment-history-item {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.07);
}

.payment-history-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-history-amount {
  font-size: 16px;
  font-weight: 800;
}

.payment-history-date {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.payment-history-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.payment-history-item--confirmed {
  background: linear-gradient(180deg, rgba(45, 160, 104, .18), rgba(45, 160, 104, .10));
  border-color: rgba(109, 229, 165, .24);
}

.payment-history-item--confirmed .payment-history-status {
  background: rgba(109, 229, 165, .16);
  color: #d9ffe8;
}

.payment-history-item--cancelled,
.payment-history-item--rejected,
.payment-history-item--declined {
  background: linear-gradient(180deg, rgba(199, 78, 78, .18), rgba(199, 78, 78, .10));
  border-color: rgba(255, 132, 132, .22);
}

.payment-history-item--cancelled .payment-history-status,
.payment-history-item--rejected .payment-history-status,
.payment-history-item--declined .payment-history-status {
  background: rgba(255, 132, 132, .14);
  color: #ffdcdc;
}

.tariff-open-btn {
  position: relative;
  z-index: 2;
}

.tariff-card {
  isolation: isolate;
}

.modal-backdrop {
  cursor: pointer;
}

.sheet {
  border-radius: 0;
  box-shadow: none;
}


.profile-card--compact { padding: 14px; }
.profile-head--compact { gap: 10px; }
.profile-avatar--compact { width: 42px; height: 42px; border-radius: 14px; font-size: 18px; }
.profile-head-text { min-width: 0; }
.profile-card--compact .profile-name { font-size: 16px; }
.profile-card--compact .profile-username { margin-top: 2px; font-size: 13px; }
.profile-summary-grid--compact { margin-top: 12px; gap: 8px; }
.info-box--compact { padding: 12px; }
.info-box--compact strong { font-size: 18px; }
.action-grid--compact { margin-top: 12px; gap: 8px; }
.action-grid--compact .primary-btn, .action-grid--compact .secondary-btn { min-height: 44px; font-size: 14px; }

.subscription-compact {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 22px;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.subscription-compact::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.subscription-compact::after {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  pointer-events: none;
}

.subscription-compact > * {
  position: relative;
  z-index: 1;
}

.subscription-compact--active {
  border-color: rgba(109, 229, 165, .24);
  box-shadow: 0 0 0 1px rgba(109, 229, 165, .10) inset, var(--shadow);
}

.subscription-compact--active::before {
  background:
    linear-gradient(180deg, rgba(85, 211, 154, .16), rgba(85, 211, 154, .05)),
    radial-gradient(circle at top left, rgba(149, 255, 198, .18), transparent 42%),
    radial-gradient(circle at bottom right, rgba(45, 160, 104, .16), transparent 40%);
}

.subscription-compact--active::after {
  background: radial-gradient(circle, rgba(109, 229, 165, .20), transparent 70%);
}

.subscription-compact--frozen {
  border-color: rgba(39, 193, 255, .28);
  box-shadow: 0 0 0 1px rgba(39, 193, 255, .10) inset, var(--shadow);
}

.subscription-compact--frozen::before {
  background:
    linear-gradient(180deg, rgba(39,193,255,.16), rgba(39,193,255,.05)),
    radial-gradient(circle at top left, rgba(160, 230, 255, .18), transparent 42%),
    radial-gradient(circle at bottom right, rgba(83, 131, 255, .14), transparent 40%),
    repeating-linear-gradient(
      127deg,
      transparent 0 18px,
      rgba(210, 245, 255, .10) 18px 19px,
      transparent 19px 36px
    ),
    repeating-linear-gradient(
      43deg,
      transparent 0 24px,
      rgba(210, 245, 255, .08) 24px 25px,
      transparent 25px 46px
    );
}

.subscription-compact--frozen::after {
  background: radial-gradient(circle, rgba(39,193,255,.18), transparent 70%);
}

.subscription-compact--inactive {
  border-color: rgba(255, 132, 132, .22);
  box-shadow: 0 0 0 1px rgba(255, 132, 132, .10) inset, var(--shadow);
}

.subscription-compact--inactive::before {
  background:
    linear-gradient(180deg, rgba(199, 78, 78, .18), rgba(199, 78, 78, .06)),
    radial-gradient(circle at top left, rgba(255, 185, 185, .14), transparent 42%),
    radial-gradient(circle at bottom right, rgba(199, 78, 78, .14), transparent 40%);
}

.subscription-compact--inactive::after {
  background: radial-gradient(circle, rgba(255, 132, 132, .16), transparent 70%);
}

.subscription-compact:active { transform: scale(.99); }
.subscription-compact h4 { font-size: 20px; }
.subscription-compact p { font-size: 14px; }
.subscription-meta { margin-top: 14px; gap: 10px; }
.meta-chip { padding: 9px 12px; font-size: 12.5px; }
.subscription-open-row { display:flex; justify-content:space-between; align-items:center; margin-top:14px; }
.subscription-open-hint { color: var(--muted); font-size: 13px; }
.subscription-open-btn { min-height: 40px; padding: 0 14px; }

.subscription-sheet-status-row { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.subscription-sheet-date { color: var(--muted); font-size: 13px; }
.subscription-sheet-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }

.info-box--action {
  width: 100%;
  text-align: left;
}

.info-box--action.is-actionable {
  cursor: pointer;
}

.info-box--action.is-active {
  border-color: rgba(39, 193, 255, .38);
  background: linear-gradient(180deg, rgba(39,193,255,.16), rgba(255,255,255,.05));
  box-shadow: 0 0 0 1px rgba(39,193,255,.10) inset;
}

.subscription-traffic-details {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.subscription-traffic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.09);
}

.subscription-traffic-row span {
  color: var(--muted);
  font-size: 13px;
}

.subscription-traffic-row strong {
  font-size: 14px;
  text-align: right;
}

.subscription-sheet-extra { margin-top: 12px; display:grid; gap:8px; }

.subscription-sheet-line {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.09);
}

.subscription-sheet-line span { color: var(--muted); font-size: 13px; }
.subscription-sheet-line strong { font-size: 14px; text-align:right; }

.subscription-sheet-line--stack {
  align-items: stretch;
  flex-direction: column;
}

.subscription-sheet-key-row {
  display: grid;
  gap: 8px;
  width: 100%;
}

.subscription-sheet-key {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  background: rgba(22, 30, 60, .60);
  border: 1px solid rgba(255,255,255,.09);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-all;
  cursor: pointer;
}

.subscription-sheet-key-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.subscription-open-btn,
.subscription-copy-btn {
  min-height: 40px;
  padding: 0 10px;
  font-size: 13px;
}

.sheet-actions--stack { grid-template-columns: 1fr; }

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

#closeSubscriptionFooterBtn {
  grid-column: 1 / -1;
}

@media (max-width: 380px) {
  .subscription-sheet-grid { grid-template-columns: 1fr; }
  .action-grid--compact { grid-template-columns: 1fr 1fr; }

  .subscription-sheet-key-actions {
    grid-template-columns: 1fr;
  }

  .subscription-help-grid {
    grid-template-columns: 1fr;
  }

  .subscription-sheet-actions {
    grid-template-columns: 1fr;
  }

  #closeSubscriptionFooterBtn {
    grid-column: auto;
  }
}


.tariff-sheet-options {
  margin-top: 14px;
  display: grid;
  gap: 14px;
}

.tariff-sheet-group {
  display: grid;
  gap: 10px;
}

.tariff-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tariff-chip {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.tariff-chip.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
}

.subscription-help-text {
  margin-top: 8px;
  color: #dbe4ff;
  line-height: 1.55;
  font-size: 14px;
}

.subscription-help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.subscription-help-col {
  min-width: 0;
  padding: 10px 10px 9px;
  border-radius: 14px;
  background: rgba(22, 30, 60, .42);
  border: 1px solid rgba(255,255,255,.07);
}

.subscription-help-col-title {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
}

.subscription-help-text--compact {
  margin-top: 0;
  font-size: 12px;
  line-height: 1.42;
}





.breaker-help-text {
  display: grid;
  gap: 14px;
  color: #dbe4ff;
  line-height: 1.6;
}

.breaker-help-block {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
}

.breaker-help-block strong {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--text);
}

.breaker-help-note {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(139,102,255,.16), rgba(39,193,255,.12));
  border: 1px solid rgba(255,255,255,.10);
  color: #f6f8ff;
}





.tariff-bonus-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tariff-bonus-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  color: #e8eeff;
  font-size: 12px;
  font-weight: 700;
}

.tariff-inline-link {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ffd4a3;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}








.payment-history-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 38px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}




.topbar--hero {
  padding: 0;
  min-height: 80px;
  overflow: hidden;
}

.hero-brand-btn {
  display: block;
  width: 100%;
  height: 80px;
  padding: 0;
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.hero-brand-btn:active {
  transform: scale(.99);
}

.hero-banner-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(135deg, rgba(139,102,255,.32), rgba(39,193,255,.24)),
    linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05));
  box-shadow:
    0 0 0 1px rgba(255,255,255,.06) inset,
    0 14px 30px rgba(0,0,0,.24),
    0 0 28px rgba(95, 155, 255, .16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}



.hero-brand-btn:active {
  transform: scale(.99);
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 10px 24px rgba(0,0,0,.22),
    0 0 22px rgba(95, 155, 255, .14);
}



@media (max-width: 380px) {
  .hero-brand-btn {
    padding: 0 12px;
  }

  .hero-brand-hand {
    font-size: 16px;
  }

  .hero-brand-title {
    font-size: 22px;
  }
}