:root {
  --bg: #050713;
  --bg-soft: #080d1d;
  --surface: rgba(10, 17, 36, 0.82);
  --surface-strong: rgba(7, 12, 27, 0.96);
  --line: rgba(124, 191, 255, 0.16);
  --line-bright: rgba(46, 211, 255, 0.48);
  --text: #f7fbff;
  --muted: #8fa3ba;
  --cyan: #28d7ff;
  --blue: #2888ff;
  --violet: #9657ff;
  --pink: #ff3daa;
  --gold: #ffbf37;
  --green: #27e68a;
  --danger: #ff5d7d;
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(30, 137, 255, 0.19), transparent 32%),
    radial-gradient(circle at 88% 20%, rgba(238, 52, 255, 0.15), transparent 31%),
    linear-gradient(180deg, #050713 0%, #040711 48%, #03050d 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
button:disabled { cursor: default; }

.ambient {
  position: fixed;
  pointer-events: none;
  filter: blur(72px);
  opacity: .38;
  z-index: 0;
  border-radius: 999px;
}
.ambient-one { width: 210px; height: 210px; background: #006eff; top: 8%; left: -120px; }
.ambient-two { width: 260px; height: 260px; background: #bc1dff; top: 32%; right: -180px; }

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(104px + var(--safe-bottom));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 18px;
  background: rgba(5, 7, 19, 0.74);
  border-bottom: 1px solid rgba(107, 172, 255, 0.11);
  backdrop-filter: blur(22px) saturate(145%);
}

.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-avatar {
  width: 45px;
  height: 45px;
  border-radius: 15px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(72, 218, 255, .48), 0 0 26px rgba(60, 135, 255, .28);
}
.brand-copy { min-width: 0; }
.brand-line { display: flex; align-items: baseline; gap: 7px; letter-spacing: .09em; }
.brand-line strong { font-size: 20px; letter-spacing: .11em; }
.brand-line span { color: var(--gold); font-size: 13px; font-weight: 900; }
.brand-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; white-space: nowrap; }

.round-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(9, 15, 31, .78);
  cursor: pointer;
}
.round-button svg { width: 20px; fill: none; stroke: #b7c7da; stroke-width: 1.8; stroke-linecap: round; }

.page-content { padding: 20px 16px 6px; }
.page { display: none; animation: page-in .24s ease both; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
.stack { display: grid; gap: 14px; }

.skeleton {
  min-height: 260px;
  border-radius: var(--radius-xl);
  background: linear-gradient(105deg, rgba(18, 30, 55, .7) 25%, rgba(40, 67, 102, .6) 40%, rgba(18, 30, 55, .7) 55%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
  border: 1px solid var(--line);
}
.profile-skeleton { min-height: 430px; }
@keyframes shimmer { to { background-position-x: -200%; } }

.glass-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(14, 26, 52, .88), rgba(5, 11, 25, .94));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 445px;
  padding: 27px 22px 22px;
  border-radius: 32px;
  border: 1px solid rgba(60, 201, 255, .34);
  background:
    linear-gradient(180deg, rgba(5, 8, 22, .17), rgba(5, 8, 22, .96) 59%),
    linear-gradient(90deg, rgba(0, 104, 255, .14), rgba(212, 34, 255, .12)),
    #071023;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255,255,255,.05);
}
.hero-card::before {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(3,7,20,.28), rgba(3,7,20,.86) 64%, rgba(3,7,20,.96)),
    url('/static/assets/shifro-hero.webp') center 8% / cover no-repeat;
  filter: blur(2.4px) brightness(.76) saturate(1.08);
  transform: scale(1.025);
  opacity: .92;
}
.hero-card > * { position: relative; }
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 44%, rgba(60, 220, 255, .09) 52%, transparent 60%);
  transform: translateX(-100%);
  animation: scan 5.8s ease-in-out infinite;
}
@keyframes scan { 45%, 100% { transform: translateX(100%); } }
.hero-content { position: relative; z-index: 2; display: flex; min-height: 394px; flex-direction: column; justify-content: flex-end; }
.kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 7px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 9px; background: currentColor; box-shadow: 0 0 10px currentColor; }
.hero-card h1 { max-width: 430px; margin: 10px 0 8px; font-size: clamp(34px, 9vw, 48px); line-height: .99; letter-spacing: -.045em; }
.hero-card p { max-width: 410px; margin: 0; color: #b1c0d4; font-size: 14px; line-height: 1.55; }

.bypass-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 13px;
  padding: 7px 10px;
  color: #fff3c9;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(255, 190, 48, .44);
  border-radius: 999px;
  background: rgba(255, 164, 20, .12);
  box-shadow: inset 0 0 18px rgba(255, 179, 24, .08);
}
.bypass-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px var(--gold); }

.trial-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 14px; }
.trial-spec {
  min-width: 0;
  padding: 12px 7px;
  text-align: center;
  border: 1px solid rgba(68, 209, 255, .23);
  border-radius: 17px;
  background: rgba(7, 20, 39, .72);
}
.trial-spec strong { display: block; font-size: 18px; }
.trial-spec span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }

.button {
  width: 100%;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 16px;
  border-radius: 17px;
  border: 0;
  font-weight: 850;
  font-size: 14px;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, border-color .16s ease;
}
.button:active { transform: scale(.985); }
.button-primary {
  color: #020817;
  background: linear-gradient(105deg, #28e2ff 0%, #3090ff 55%, #9754ff 118%);
  box-shadow: 0 13px 32px rgba(27, 153, 255, .28), inset 0 1px 0 rgba(255,255,255,.55);
}
.button-secondary {
  margin-top: 9px;
  color: var(--text);
  border: 1px solid rgba(70, 205, 255, .38);
  background: rgba(8, 21, 41, .79);
}
.button-ghost { color: #a9bad0; border: 1px solid var(--line); background: rgba(8, 13, 27, .66); }
.button-danger { color: #fff; border: 1px solid rgba(255, 82, 123, .38); background: rgba(255, 50, 99, .13); }
.button.disabled, .button:disabled { opacity: .52; filter: grayscale(.18); cursor: default; }

.status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #bfffe0;
  background: rgba(28, 224, 130, .12);
  border: 1px solid rgba(39, 230, 138, .3);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 11px var(--green); }
.status-pill.expired { color: #ffd1dc; border-color: rgba(255, 93, 125, .34); background: rgba(255, 93, 125, .13); }
.status-pill.expired::before { background: var(--danger); box-shadow: 0 0 11px var(--danger); }
.tariff-mini-label { color: var(--gold); font-size: 12px; font-weight: 900; }

.metrics-panel {
  display: grid;
  gap: 11px;
  margin: 17px 0 15px;
  padding: 14px;
  border: 1px solid rgba(90, 178, 255, .16);
  border-radius: 20px;
  background: rgba(4, 10, 24, .78);
}
.metric-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: #a6b8cf; font-size: 11px; }
.metric-head strong { color: #f4f8ff; font-size: 12px; }
.progress { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(108, 147, 196, .15); }
.progress i { display: block; height: 100%; min-width: 4px; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 15px rgba(40, 215, 255, .35); }

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-card {
  position: relative;
  min-height: 126px;
  padding: 16px;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(13, 25, 49, .84), rgba(5, 10, 22, .92));
  cursor: pointer;
}
.quick-card::after { content: ""; position: absolute; width: 80px; height: 80px; right: -30px; bottom: -35px; border-radius: 50%; background: var(--accent, #168cff); filter: blur(30px); opacity: .35; }
.quick-card .icon-box { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: rgba(56, 186, 255, .13); border: 1px solid rgba(56, 186, 255, .18); font-size: 18px; }
.quick-card strong { display: block; margin-top: 12px; font-size: 14px; }
.quick-card span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.35; }
.quick-card.wide { grid-column: 1 / -1; min-height: 96px; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; }
.quick-card.wide strong { margin: 0; }
.quick-card.wide span { margin-top: 3px; }
.quick-card .arrow { color: #8ea9c6; font-size: 22px; }

.provider-notice {
  margin-top: 12px;
  padding: 11px 12px;
  color: #93a7bf;
  border: 1px dashed rgba(87, 180, 255, .22);
  border-radius: 14px;
  background: rgba(5, 11, 24, .55);
  font-size: 10px;
  line-height: 1.45;
}

.page-heading { margin: 3px 4px 18px; }
.page-heading h1 { margin: 8px 0 8px; font-size: 29px; line-height: 1.06; letter-spacing: -.035em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.plans-stack { display: grid; gap: 14px; }

.plan-card {
  position: relative;
  overflow: hidden;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 27px;
  background: linear-gradient(145deg, rgba(13, 23, 45, .93), rgba(5, 10, 22, .96));
  box-shadow: 0 20px 55px rgba(0, 0, 0, .28);
}
.plan-card::before { content: ""; position: absolute; width: 140px; height: 140px; top: -90px; right: -60px; border-radius: 50%; background: var(--plan-accent); filter: blur(42px); opacity: .33; }
.plan-card.mini { --plan-accent: #1f95ff; }
.plan-card.lite { --plan-accent: #3ecbff; border-color: rgba(76, 208, 255, .36); background: linear-gradient(145deg, rgba(10, 24, 50, .95), rgba(7, 12, 26, .97)); box-shadow: 0 20px 55px rgba(0, 0, 0, .28), 0 0 0 1px rgba(70, 205, 255, .05); }
.plan-card.premium { --plan-accent: #ff9c27; border-color: rgba(255, 184, 47, .42); background: linear-gradient(145deg, rgba(34, 18, 45, .94), rgba(8, 8, 22, .97)); }
.plan-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.plan-title-wrap { display: flex; align-items: center; gap: 11px; }
.plan-symbol { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 15px; background: rgba(56, 179, 255, .12); border: 1px solid rgba(77, 201, 255, .18); font-size: 20px; }
.plan-card.premium .plan-symbol { background: rgba(255, 172, 36, .12); border-color: rgba(255, 190, 56, .24); }
.plan-head h2 { margin: 0; font-size: 23px; }
.plan-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.plan-badge { padding: 6px 8px; border-radius: 999px; color: #dff8ff; background: rgba(40, 197, 255, .13); border: 1px solid rgba(40, 197, 255, .25); font-size: 9px; font-weight: 900; }
.plan-card.lite .plan-badge { color: #dff8ff; background: rgba(69, 201, 255, .13); border-color: rgba(69, 201, 255, .28); }
.plan-card.premium .plan-badge { color: #fff1bd; background: rgba(255, 177, 39, .13); border-color: rgba(255, 177, 39, .27); }
.plan-features { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.feature-pill { padding: 7px 9px; border-radius: 11px; color: #c1cede; background: rgba(104, 146, 194, .09); border: 1px solid rgba(113, 169, 224, .12); font-size: 10px; }
.feature-pill.bypass { color: #ffe9a2; border-color: rgba(255, 183, 42, .24); background: rgba(255, 158, 24, .1); }
.period-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.period-button {
  position: relative;
  min-height: 67px;
  padding: 10px 11px;
  text-align: left;
  border: 1px solid rgba(93, 161, 222, .16);
  border-radius: 16px;
  background: rgba(4, 10, 23, .72);
  cursor: pointer;
}
.period-button span { display: block; color: var(--muted); font-size: 10px; }
.period-button strong { display: block; margin-top: 4px; font-size: 15px; }
.period-button em { position: absolute; top: 7px; right: 7px; padding: 3px 5px; border-radius: 7px; color: #02111a; background: var(--cyan); font-size: 7px; font-style: normal; font-weight: 900; }
.period-button:active { border-color: var(--line-bright); }
.plan-description { margin: 14px 1px 0; color: #8fa4bd; font-size: 10px; line-height: 1.5; }

.bonus-hero { min-height: 180px; display: grid; place-items: center; padding: 20px; border-radius: 27px; text-align: center; }
.bonus-hero strong { display: block; font-size: 30px; }
.bonus-hero span { color: var(--muted); font-size: 12px; }
.bonus-icon { font-size: 42px; }
.bonus-glow { position: absolute; width: 160px; height: 160px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--pink)); filter: blur(55px); opacity: .26; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 12px 0; }
.stat-card { padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: rgba(8, 15, 31, .84); }
.stat-card span { display: block; color: var(--muted); font-size: 10px; }
.stat-card strong { display: block; margin-top: 7px; font-size: 20px; }
.stat-card.green strong { color: var(--green); }

.profile-card { padding: 18px; border-radius: 28px; }
.profile-head { display: flex; align-items: center; gap: 14px; }
.user-avatar { width: 64px; height: 64px; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; border-radius: 21px; background: linear-gradient(135deg, var(--cyan), var(--violet)); color: #02101d; font-size: 20px; font-weight: 900; box-shadow: 0 0 0 1px rgba(77, 218, 255, .34), 0 12px 30px rgba(41, 144, 255, .2); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 20px; font-weight: 850; }
.profile-username { margin-top: 3px; color: var(--muted); font-size: 12px; }
.profile-data { display: grid; gap: 10px; margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--line); }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 11px; }
.profile-row span { color: var(--muted); }
.profile-row strong { text-align: right; }
.menu-list { display: grid; gap: 8px; }
.menu-item {
  width: 100%;
  min-height: 59px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(7, 13, 28, .86);
  cursor: pointer;
}
.menu-item .menu-icon { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; background: rgba(55, 181, 255, .1); font-size: 16px; }
.menu-item strong { font-size: 13px; }
.menu-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.menu-item .chevron { color: #7e96b2; font-size: 21px; }

.bottom-nav {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: calc(10px + var(--safe-bottom));
  width: min(calc(100% - 24px), 588px);
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 7px;
  border: 1px solid rgba(113, 171, 229, .14);
  border-radius: 25px;
  background: rgba(4, 8, 18, .9);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .52);
  backdrop-filter: blur(24px) saturate(150%);
}
.nav-item { min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 18px; color: #71859d; background: transparent; cursor: pointer; }
.nav-item svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item span { font-size: 9px; }
.nav-item.active { color: var(--cyan); background: linear-gradient(145deg, rgba(23, 103, 154, .26), rgba(47, 32, 108, .18)); box-shadow: inset 0 0 0 1px rgba(55, 194, 255, .08); }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 12px 12px calc(12px + var(--safe-bottom)); background: rgba(0, 3, 12, .7); backdrop-filter: blur(11px); }
.modal-backdrop[hidden] { display: none; }

/* RC9: regular website uses centered dialogs; Telegram WebApp keeps the mobile bottom-sheet behavior. */
.browser-mode .modal-backdrop {
  align-items: center;
  padding: max(18px, env(safe-area-inset-top, 0px)) 18px max(18px, var(--safe-bottom));
}
.modal { width: min(100%, 590px); max-height: 88vh; overflow-y: auto; padding: 10px 18px 19px; border: 1px solid rgba(78, 198, 255, .26); border-radius: 29px; background: linear-gradient(155deg, rgba(12, 23, 47, .98), rgba(4, 8, 19, .99)); box-shadow: 0 32px 100px rgba(0,0,0,.66); animation: modal-in .23s ease both; }
@keyframes modal-in { from { transform: translateY(30px); opacity: .4; } }
.modal-handle { width: 42px; height: 4px; margin: 0 auto 15px; border-radius: 99px; background: rgba(166, 195, 226, .35); }
.modal h2 { margin: 8px 0; font-size: 26px; line-height: 1.06; letter-spacing: -.035em; }
.modal p { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.modal .button + .button { margin-top: 9px; }
.modal-art { position: relative; min-height: 130px; display: grid; place-items: center; margin: 13px 0; overflow: hidden; border-radius: 21px; border: 1px solid var(--line); background: radial-gradient(circle, rgba(38, 184, 255, .22), transparent 55%), rgba(5, 12, 27, .82); }
.modal-art span { position: relative; z-index: 2; font-size: 50px; }
.modal-art::before { content: ""; position: absolute; width: 120px; height: 120px; border: 1px solid rgba(65, 215, 255, .24); border-radius: 35px; transform: rotate(45deg); }
.wizard-steps { display: flex; gap: 7px; margin: 13px 0; }
.wizard-steps i { height: 5px; flex: 1; border-radius: 99px; background: rgba(113, 151, 197, .16); }
.wizard-steps i.active { background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 12px rgba(40, 215, 255, .24); }
.device-list { display: grid; gap: 8px; margin: 12px 0; }
.device-option { width: 100%; min-height: 62px; display: grid; grid-template-columns: 43px 1fr auto; align-items: center; gap: 10px; padding: 9px 12px; color: var(--text); text-align: left; border: 1px solid var(--line); border-radius: 17px; background: rgba(5, 12, 27, .78); cursor: pointer; }
.device-option .device-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: rgba(38, 175, 255, .11); }
.device-option strong { display: block; font-size: 12px; }
.device-option small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.device-counter { display: flex; align-items: center; justify-content: space-between; padding: 13px; margin: 12px 0; border: 1px solid var(--line); border-radius: 17px; background: rgba(5, 12, 26, .73); }
.device-counter span { color: var(--muted); font-size: 11px; }
.device-counter strong { font-size: 18px; }
.bound-device { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: rgba(5, 12, 26, .72); }
.bound-device-copy { min-width: 0; }
.bound-device strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.bound-device small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.device-remove-button { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; padding: 0; border: 1px solid rgba(255, 82, 123, .36); border-radius: 12px; color: #ff8da9; background: rgba(255, 50, 99, .10); font: 800 18px/1 system-ui, sans-serif; cursor: pointer; }
.device-remove-button:active { transform: scale(.96); background: rgba(255, 50, 99, .18); }
.single-device-confirm { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 11px; margin: 13px 0; padding: 12px; border: 1px solid var(--line); border-radius: 17px; background: rgba(5, 12, 26, .73); }
.single-device-confirm .device-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; background: rgba(38, 175, 255, .11); }
.single-device-confirm strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.empty-devices { padding: 17px; text-align: center; border: 1px dashed rgba(98, 170, 230, .2); border-radius: 17px; color: var(--muted); font-size: 11px; }

.toast { position: fixed; z-index: 150; left: 50%; bottom: calc(92px + var(--safe-bottom)); width: max-content; max-width: calc(100% - 36px); transform: translateX(-50%); padding: 11px 15px; border: 1px solid rgba(77, 205, 255, .25); border-radius: 14px; color: #eaf8ff; background: rgba(6, 14, 28, .96); box-shadow: 0 17px 50px rgba(0,0,0,.48); font-size: 11px; text-align: center; }
.toast[hidden] { display: none; }

@media (min-width: 520px) {
  .page-content { padding-inline: 22px; }
  .hero-card { min-height: 490px; padding: 32px 28px 25px; }
  .hero-content { min-height: 428px; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-card.wide { grid-column: auto; display: block; min-height: 126px; }
  .quick-card.wide strong { margin-top: 12px; }
  .quick-card.wide .arrow { display: none; }
  .period-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 370px) {
  .brand-copy small { display: none; }
  .hero-card { padding-inline: 17px; }
  .trial-spec strong { font-size: 16px; }
  .page-heading h1 { font-size: 26px; }
}

/* v0.4.1 — защищённая админка внутри той же Telegram Web App */
.admin-page {
  margin: -20px -16px -6px;
}
.admin-frame-shell {
  min-height: calc(100vh - 176px - var(--safe-bottom));
  overflow: hidden;
  border-top: 1px solid rgba(72, 211, 255, .12);
  background: #040611;
}
.admin-frame {
  display: block;
  width: 100%;
  min-height: calc(100vh - 176px - var(--safe-bottom));
  border: 0;
  background: #040611;
}
.bottom-nav.has-admin {
  grid-template-columns: repeat(5, 1fr);
}
.bottom-nav.has-admin .nav-item {
  min-width: 0;
}
.bottom-nav.has-admin .nav-item span {
  font-size: 8px;
}
@media (max-width: 390px) {
  .bottom-nav.has-admin {
    padding-left: 7px;
    padding-right: 7px;
    gap: 1px;
  }
  .bottom-nav.has-admin {
  grid-template-columns: repeat(5, 1fr);
}
.bottom-nav.has-admin .nav-item {
    padding-left: 4px;
    padding-right: 4px;
  }
}
.nav-item[hidden] { display: none !important; }

.email-field { display:grid; gap:7px; margin:14px 0; color:var(--muted); font-size:11px; }
.email-field input { width:100%; min-height:50px; padding:0 14px; border:1px solid var(--line); border-radius:15px; color:var(--text); background:rgba(4,10,23,.82); outline:none; }
.email-field input:focus { border-color:var(--line-bright); box-shadow:0 0 0 3px rgba(40,215,255,.08); }

/* v0.4.3 — polished floating header + multi-subscription cards */
.topbar {
  top: 8px;
  margin: 8px 12px 0;
  min-height: 76px;
  padding: 13px 16px;
  border: 1px solid rgba(111, 185, 255, .17);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(8, 14, 31, .9), rgba(12, 8, 31, .86));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255,255,255,.035);
}
.brand-line strong { font-size: 21px; }
.brand-line span { font-size: 17px; letter-spacing: .08em; }
.device-reset-main { margin-top: 1px; }
.subscription-list { display: grid; gap: 10px; margin: 14px 0; }
.subscription-list-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(124,191,255,.16);
  border-radius: 18px;
  background: rgba(7, 14, 31, .72);
}
.subscription-list-card.active { border-color: rgba(39,230,138,.28); box-shadow: inset 0 0 22px rgba(39,230,138,.035); }
.subscription-list-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.subscription-list-head > div { display: grid; gap: 2px; }
.subscription-list-head strong { font-size: 16px; }
.subscription-list-head span:not(.status-pill) { color: var(--muted); font-size: 10px; }
.subscription-list-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.subscription-list-meta span { padding: 6px 8px; border-radius: 10px; background: rgba(17,31,57,.72); color: #aebed2; font-size: 10px; }

@media (max-width: 520px) {
  .topbar { margin-inline: 10px; border-radius: 21px; }
  .brand-line strong { font-size: 20px; }
  .brand-line span { font-size: 16px; }
}

/* v0.4.4 — premium actions, polished profile rows and paid device add-ons */
.button-addon {
  border-color: rgba(255, 190, 55, .34);
  color: #fff8dc;
  background:
    linear-gradient(135deg, rgba(255, 174, 35, .18), rgba(132, 75, 255, .22)),
    rgba(8, 14, 31, .92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 14px 36px rgba(145, 82, 255, .15);
}
.button-addon:not(:disabled):active { transform: translateY(1px) scale(.995); }
.button-addon:disabled { opacity: .46; }

.premium-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}
.premium-actions .quick-card {
  isolation: isolate;
  min-height: 136px;
  padding: 16px;
  border-radius: 24px;
  border-color: color-mix(in srgb, var(--accent, #25d9ff) 34%, transparent);
  background:
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--accent, #25d9ff) 25%, transparent), transparent 34%),
    linear-gradient(145deg, rgba(13, 25, 49, .96), rgba(5, 10, 23, .98));
  box-shadow: 0 18px 50px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.045);
}
.premium-actions .quick-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255,255,255,.045), transparent 28% 66%, rgba(255,255,255,.018));
}
.premium-actions .quick-card::after {
  width: 130px;
  height: 130px;
  right: -48px;
  bottom: -58px;
  opacity: .3;
  filter: blur(38px);
}
.premium-actions .quick-card.wide {
  grid-column: 1 / -1;
  min-height: 108px;
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
}
.premium-actions .quick-card-compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.premium-actions .icon-box {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  margin: 0;
  border-radius: 15px;
  border-color: color-mix(in srgb, var(--accent, #25d9ff) 34%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent, #25d9ff) 19%, transparent), rgba(8, 20, 39, .92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 9px 28px color-mix(in srgb, var(--accent, #25d9ff) 16%, transparent);
  font-size: 20px;
}
.premium-actions .quick-copy { min-width: 0; position: relative; z-index: 2; }
.premium-actions .quick-copy small {
  display: block;
  margin: 0 0 5px;
  color: color-mix(in srgb, var(--accent, #25d9ff) 86%, white 14%);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
}
.premium-actions .quick-copy strong { margin: 0; font-size: 14px; line-height: 1.18; }
.premium-actions .quick-copy span { margin-top: 5px; font-size: 9px; line-height: 1.45; }
.premium-actions .quick-value {
  min-width: 50px;
  padding: 8px 10px;
  border-radius: 14px;
  color: #f3fbff;
  background: rgba(3, 10, 25, .68);
  border: 1px solid rgba(117, 191, 255, .15);
  font-size: 15px;
  text-align: center;
}
.premium-actions .arrow {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #d7e9fb;
  background: rgba(255,255,255,.045);
  font-size: 20px;
}
.premium-actions .quick-card:active { transform: translateY(1px) scale(.995); border-color: color-mix(in srgb, var(--accent, #25d9ff) 56%, transparent); }

.menu-list { gap: 10px; }
.menu-item.menu-item-premium {
  position: relative;
  isolation: isolate;
  min-height: 72px;
  grid-template-columns: 46px 1fr 34px;
  gap: 12px;
  padding: 11px 13px;
  overflow: hidden;
  border-radius: 22px;
  border-color: rgba(107, 177, 244, .17);
  background:
    radial-gradient(circle at 5% 50%, rgba(31, 169, 255, .09), transparent 26%),
    linear-gradient(135deg, rgba(9, 18, 39, .97), rgba(5, 10, 24, .97));
  box-shadow: 0 13px 34px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.035);
}
.menu-item.menu-item-premium::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .55;
  background: linear-gradient(105deg, rgba(48, 211, 255, .035), transparent 38% 74%, rgba(151, 83, 255, .055));
}
.menu-item.menu-item-premium:nth-child(3n + 2)::before { background: linear-gradient(105deg, rgba(108, 92, 255, .045), transparent 40% 72%, rgba(255, 66, 178, .045)); }
.menu-item.menu-item-premium:nth-child(3n)::before { background: linear-gradient(105deg, rgba(255, 182, 48, .035), transparent 40% 72%, rgba(42, 212, 255, .04)); }
.menu-item.menu-item-premium .menu-icon {
  width: 45px;
  height: 45px;
  border-radius: 15px;
  border: 1px solid rgba(69, 198, 255, .17);
  background: linear-gradient(145deg, rgba(25, 131, 206, .2), rgba(12, 31, 61, .9));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 9px 22px rgba(17, 102, 180, .12);
  font-size: 18px;
}
.menu-item.menu-item-premium strong { font-size: 13.5px; letter-spacing: -.01em; }
.menu-item.menu-item-premium small { margin-top: 4px; color: #8197b1; font-size: 9.5px; line-height: 1.3; }
.menu-item.menu-item-premium .chevron {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #a9c0da;
  background: rgba(255,255,255,.035);
  font-size: 19px;
}
.menu-item.menu-item-premium:active { transform: translateY(1px); border-color: rgba(55, 204, 255, .3); }

.subscription-actions { display: grid; gap: 8px; }
.subscription-actions .button { min-height: 45px; border-radius: 15px; }

.addon-quote-card {
  display: grid;
  gap: 12px;
  margin: 15px 0 12px;
  padding: 15px;
  border: 1px solid rgba(255, 193, 58, .22);
  border-radius: 21px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 179, 45, .14), transparent 34%),
    linear-gradient(145deg, rgba(15, 23, 45, .95), rgba(6, 11, 24, .98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
}
.addon-quote-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.addon-quote-main span, .addon-quote-grid span { color: var(--muted); font-size: 9.5px; }
.addon-quote-main strong { color: #fff4c9; font-size: 28px; letter-spacing: -.04em; }
.addon-quote-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.addon-quote-grid > div { padding: 10px 11px; border-radius: 14px; background: rgba(5, 12, 27, .7); border: 1px solid rgba(112, 180, 237, .12); }
.addon-quote-grid strong { display: block; margin-top: 4px; font-size: 15px; }
.addon-quote-card > small { color: #7f94ae; font-size: 9px; line-height: 1.45; }
.addon-quantity {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
  padding: 8px;
  border-radius: 18px;
  background: rgba(5, 12, 27, .72);
  border: 1px solid var(--line);
}
.addon-quantity button { min-height: 44px; border: 1px solid rgba(101,183,244,.17); border-radius: 13px; color: #f5fbff; background: rgba(18, 36, 68, .75); font-size: 22px; cursor: pointer; }
.addon-quantity button:disabled { opacity: .35; }
.addon-quantity div { text-align: center; }
.addon-quantity span { display: block; color: var(--muted); font-size: 9px; }
.addon-quantity strong { display: block; margin-top: 2px; font-size: 18px; }
.addon-warning { margin: 11px 0; padding: 11px 12px; border: 1px solid rgba(255, 95, 125, .24); border-radius: 14px; color: #ffc0ce; background: rgba(255, 61, 100, .075); font-size: 10px; line-height: 1.45; }

@media (min-width: 520px) {
  .premium-actions .quick-card.wide { grid-column: 1 / -1; display: grid; min-height: 108px; }
  .premium-actions .quick-card.wide .arrow { display: grid; }
}

/* v0.4.5 — clearer home actions, tariff add-on notice and highlighted profile balance */
.premium-actions .quick-card-label-only .quick-copy small {
  margin-bottom: 7px;
  font-size: 12px;
  line-height: 1.05;
  letter-spacing: .085em;
  text-shadow: 0 0 20px color-mix(in srgb, var(--accent, #25d9ff) 42%, transparent);
}
.premium-actions .quick-card-label-only .quick-copy span {
  margin-top: 0;
  font-size: 9.5px;
}
.profile-identity { min-width: 0; flex: 1 1 auto; }
.profile-balance-chip {
  width: fit-content;
  min-width: 132px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 8px 11px;
  border: 1px solid rgba(255, 191, 50, .34);
  border-radius: 14px;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 194, 59, .18), transparent 46%),
    linear-gradient(135deg, rgba(45, 30, 8, .88), rgba(11, 18, 35, .94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 10px 28px rgba(255, 173, 30, .08);
}
.profile-balance-chip span { color: #ffc74d; font-size: 10px; font-weight: 850; letter-spacing: .03em; }
.profile-balance-chip strong { color: #fff4c7; font-size: 15px; font-weight: 900; white-space: nowrap; }
.tariff-device-notice {
  display: grid;
  grid-template-columns: 46px 1fr;
  align-items: center;
  gap: 12px;
  margin: 0 0 15px;
  padding: 14px 15px;
  border: 1px solid rgba(46, 213, 255, .22);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 50%, rgba(31, 207, 255, .14), transparent 34%),
    radial-gradient(circle at 100% 50%, rgba(147, 82, 255, .13), transparent 38%),
    linear-gradient(135deg, rgba(8, 21, 43, .96), rgba(9, 11, 29, .96));
  box-shadow: 0 15px 40px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.035);
}
.tariff-device-notice-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #06131f;
  background: linear-gradient(135deg, #2adfff, #7b61ff);
  box-shadow: 0 9px 28px rgba(51, 184, 255, .22);
  font-size: 20px;
  font-weight: 900;
}
.tariff-device-notice strong { display: block; color: #f4fbff; font-size: 12.5px; line-height: 1.25; }
.tariff-device-notice span:not(.tariff-device-notice-icon) { display: block; margin-top: 4px; color: #8da4bd; font-size: 9.5px; line-height: 1.45; }

/* v0.4.7 — lighter tariff UX for mobile and clearer purchase hints */
.premium-actions .quick-card-compact.quick-card-label-only .quick-copy {
  margin-top: 14px;
}
.premium-actions .quick-card-compact.quick-card-label-only .quick-copy small {
  margin-bottom: 8px;
}

.tariff-device-notice .tariff-device-price {
  margin-top: 5px;
  color: #cceaff;
  font-size: 10.5px;
  font-weight: 700;
}
.tariff-device-notice .tariff-device-price b {
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 900;
}


.plans-global-hint {
  display: grid;
  grid-template-columns: 10px 1fr;
  align-items: center;
  gap: 8px;
  margin: 4px 2px 12px;
  color: #b9cce2;
  font-size: 10.5px;
  line-height: 1.3;
}
.plans-global-hint strong { font-weight: 750; }
.period-picker-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(38, 215, 255, .28), 0 0 10px rgba(38, 215, 255, .40);
}

.period-button {
  isolation: isolate;
  overflow: hidden;
  min-height: 86px;
  padding: 11px 12px 10px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
  animation: none;
}
.period-button::before,
.period-button::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  border-radius: inherit;
}
.period-button::before {
  z-index: -1;
  background: radial-gradient(circle at 88% 12%, rgba(52, 212, 255, .05), transparent 28%);
}
.period-button::after {
  z-index: -1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.period-button .period-days { padding-right: 42px; }
.period-button .period-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(108, 177, 233, .10);
  color: #79ddff;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .02em;
}
.period-button .period-cta b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  color: #03101a;
  background: linear-gradient(135deg, #29ddff, #7865ff);
  box-shadow: 0 5px 14px rgba(39, 205, 255, .16);
  font-size: 13px;
}
.period-button:hover,
.period-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(61, 209, 255, .40);
  background: rgba(5, 14, 31, .92);
  box-shadow: 0 10px 22px rgba(0,0,0,.18), 0 0 0 1px rgba(52, 211, 255, .05);
  outline: none;
}
.period-button:active {
  transform: translateY(0) scale(.99);
  border-color: rgba(94, 224, 255, .58);
  box-shadow: inset 0 0 0 1px rgba(73, 210, 255, .08), 0 0 12px rgba(44, 186, 255, .08);
}
.plan-card.premium .period-button .period-cta { color: #ffd46b; }
.plan-card.premium .period-button .period-cta b {
  background: linear-gradient(135deg, #ffd24d, #ff9e2d);
  box-shadow: 0 5px 14px rgba(255, 183, 45, .14);
}
.plan-card.premium .period-button:hover,
.plan-card.premium .period-button:focus-visible { border-color: rgba(255, 188, 58, .40); }

@media (prefers-reduced-motion: reduce) {
  .period-picker-pulse,
  .period-picker-arrow,
  .period-button,
  .period-button::before { animation: none !important; }
  .period-button { transition: border-color .15s ease, background .15s ease; }
}

/* v0.5.2 — referrals, promocodes, documents, transactions and payments */
.referral-hero { position: relative; overflow: hidden; }
.referral-links-stack { display:grid; gap:10px; margin-top:12px; }
.referral-link-card { margin-top: 0; padding: 16px; border-radius: 22px; }
.referral-link-heading { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.02em; }
.referral-link-icon { width:24px; height:24px; display:grid; place-items:center; border-radius:9px; background:rgba(70,190,255,.1); border:1px solid rgba(83,197,255,.16); font-size:12px; }
.referral-link-card > strong { display: block; margin: 9px 0 12px; color: #dff8ff; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.referral-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.referral-list { display: grid; gap: 8px; margin-top: 16px; }
.referral-list h3 { margin: 0 2px 4px; font-size: 14px; }
.referral-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 16px; background: rgba(6,13,27,.82); }
.referral-row strong { display: block; font-size: 11px; }
.referral-row span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.promo-active-card, .balance-modal-card, .purchase-discount { margin: 12px 0; padding: 12px 13px; border: 1px solid rgba(255,188,55,.24); border-radius: 16px; background: linear-gradient(135deg, rgba(48,31,7,.74), rgba(9,16,31,.92)); }
.promo-active-card span, .balance-modal-card span, .purchase-discount span { display: block; color: #eabf5f; font-size: 9px; font-weight: 800; }
.promo-active-card strong, .balance-modal-card strong, .purchase-discount strong { display: block; margin-top: 4px; color: #fff4c9; font-size: 16px; }
.document-actions { display: grid; gap: 8px; margin: 12px 0; }
.rules-text { margin: 12px 0 16px; color: #c0ccdc; font-size: 11px; line-height: 1.65; }
.transactions-list { display: grid; gap: 7px; margin: 12px 0; max-height: 46vh; overflow-y: auto; }
.transaction-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 15px; background: rgba(5,12,25,.76); }
.transaction-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; background: rgba(48,191,255,.10); font-size: 18px; }
.transaction-row strong { display: block; font-size: 10.5px; }
.transaction-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.transaction-row b { font-size: 11px; }
.transaction-row b.credit { color: #58f0a8; }
.transaction-row b.debit { color: #ff9ab0; }
.topup-presets { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; margin: 12px 0; }
.topup-preset { min-height: 58px; display:flex; align-items:center; justify-content:space-between; }
.topup-preset span { color:#f5fbff; font-size:14px; font-weight:900; }
.topup-preset b { color:#6edcff; font-size:9px; }
.purchase-summary { display: grid; gap: 7px; margin: 12px 0; }
.purchase-summary > div { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 12px; border:1px solid var(--line); border-radius:14px; background:rgba(5,12,26,.74); }
.purchase-summary span { color:var(--muted); font-size:10px; }
.purchase-summary strong { font-size:16px; }
.purchase-summary s { color:#8294ab; font-size:12px; }
@media (max-width: 380px) { .referral-actions { grid-template-columns:1fr; } }
.transaction-row.pending { border-color: rgba(255,189,61,.24); }
.transaction-actions { display:flex; gap:6px; margin-top:6px; }
.transaction-actions button { padding:5px 8px; border:1px solid rgba(72,199,255,.18); border-radius:8px; color:#8ee7ff; background:rgba(22,118,174,.10); font-size:8px; font-weight:800; cursor:pointer; }
.profile-balance-chip { color: inherit; cursor: pointer; text-align: left; }

/* v0.5.2 — referral partner program and cleaner paid-device CTA */
.button-addon { margin-top: 15px; }

.referral-program-card,
.partner-tools,
.referral-income-split {
  padding: 17px;
  border-radius: 24px;
  margin-bottom: 12px;
}
.referral-program-title { display:flex; align-items:center; gap:12px; }
.referral-program-title > span { width:46px; height:46px; display:grid; place-items:center; border-radius:15px; background:linear-gradient(135deg,rgba(45,218,255,.2),rgba(138,81,255,.2)); border:1px solid rgba(86,204,255,.22); font-size:22px; }
.referral-program-title strong { display:block; font-size:20px; }
.referral-program-title small { display:block; margin-top:4px; color:var(--muted); font-size:10px; line-height:1.4; }
.referral-terms-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:15px; }
.referral-terms-grid > div { min-height:74px; padding:11px; border-radius:16px; background:rgba(5,12,27,.7); border:1px solid rgba(96,173,232,.13); }
.referral-terms-grid span { display:block; color:#8197b0; font-size:9px; line-height:1.3; }
.referral-terms-grid strong { display:block; margin-top:6px; font-size:16px; }
.referral-income-split { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.referral-income-split > div { padding:12px; border-radius:16px; border:1px solid rgba(72,194,255,.14); background:rgba(5,13,29,.7); }
.referral-income-split span { color:var(--muted); font-size:9px; }
.referral-income-split strong { display:block; margin-top:5px; font-size:18px; color:#dffaff; }
.referral-note { display:block; margin-top:9px; color:#7187a1; font-size:9px; }
.partner-tools-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.partner-tools-head h3 { margin:5px 0 3px; font-size:18px; }
.partner-tools-head p { max-width:390px; margin:0; color:var(--muted); font-size:10px; line-height:1.45; }
.compact-button { width:auto; min-height:40px; padding:9px 12px; margin-top:0; white-space:nowrap; font-size:11px; }
.partner-stat-list { display:grid; gap:9px; margin-top:14px; }
.partner-stat-card { padding:12px; border:1px solid rgba(89,180,242,.14); border-radius:17px; background:rgba(4,10,23,.68); }
.partner-stat-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.partner-stat-head strong { display:block; font-size:13px; }
.partner-stat-head small { display:block; max-width:380px; margin-top:4px; color:#7187a2; font-size:8.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mini-copy { padding:7px 9px; border:1px solid rgba(61,202,255,.2); border-radius:10px; color:#aeeeff; background:rgba(28,127,181,.12); font-size:9px; cursor:pointer; }
.partner-stat-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; margin-top:10px; }
.partner-stat-grid span { padding:8px; border-radius:11px; color:#7187a1; background:rgba(15,28,50,.55); font-size:8px; }
.partner-stat-grid b { display:block; margin-top:4px; color:#eef8ff; font-size:11px; }
.checkout-intent { margin:10px 0 13px; padding:11px 12px; border:1px solid rgba(72,205,255,.22); border-radius:15px; background:linear-gradient(135deg,rgba(25,151,203,.1),rgba(124,77,255,.1)); }
.checkout-intent span { display:block; color:var(--muted); font-size:9px; }
.checkout-intent strong { display:block; margin-top:4px; font-size:13px; }
.partner-admin-card { border:1px solid rgba(111,85,255,.16); border-radius:18px; padding:14px; background:rgba(44,28,82,.06); }
.partner-settings-grid { margin-top:12px; }

@media (max-width: 520px) {
  .partner-tools-head { display:grid; }
  .compact-button { width:100%; }
  .partner-stat-grid { grid-template-columns:repeat(2,1fr); }
  .referral-terms-grid { grid-template-columns:1fr; }
}

/* v0.5.3 — referral clarity, partner tools and pagination */
.referral-link-card { margin-bottom: 12px; }
.referral-income-split { margin-top: 0; }
.referral-income-split > div { min-width: 0; }
.referral-income-split span { line-height: 1.35; }
.referral-list h3 { display:flex; align-items:center; gap:7px; }
.referral-list h3 small { color:var(--muted); font-size:10px; font-weight:700; }
.partner-card-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; flex-wrap:wrap; }
.mini-delete {
  padding:7px 9px;
  border:1px solid rgba(255,91,125,.22);
  border-radius:10px;
  color:#ff9eb2;
  background:rgba(180,35,68,.10);
  font-size:9px;
  font-weight:800;
  cursor:pointer;
}
.mini-delete:active { transform:translateY(1px); }
.referral-pagination {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:8px;
  margin-top:10px;
  padding:8px;
  border:1px solid rgba(91,174,235,.13);
  border-radius:15px;
  background:rgba(5,12,26,.68);
}
.referral-pagination button {
  min-height:36px;
  padding:7px 10px;
  border:1px solid rgba(70,196,255,.18);
  border-radius:11px;
  color:#a9eaff;
  background:rgba(26,117,169,.10);
  font-size:9px;
  font-weight:850;
  cursor:pointer;
}
.referral-pagination button:last-child { justify-self:stretch; }
.referral-pagination button:disabled { opacity:.35; cursor:default; }
.referral-pagination span { color:var(--muted); font-size:9px; white-space:nowrap; }
.referral-pagination span b { color:#effaff; }
@media (max-width: 420px) {
  .referral-income-split { grid-template-columns:1fr; }
  .partner-card-actions { width:100%; justify-content:flex-start; }
  .partner-stat-head { display:grid; }
  .referral-pagination { grid-template-columns:1fr 1fr; }
  .referral-pagination span { grid-column:1 / -1; grid-row:1; text-align:center; }
}

/* v0.5.5 — referral notification preferences */
.referral-notifications { margin-top:14px; padding:16px; border-radius:22px; }
.referral-notifications-head h3 { margin:4px 0 3px; font-size:17px; }
.referral-notifications-head p { margin:0 0 12px; color:var(--muted); font-size:10px; line-height:1.45; }
.notification-toggle-grid { display:grid; gap:7px; margin:10px 0 12px; }
.notification-toggle {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  min-height:46px; padding:10px 12px; border:1px solid rgba(87,174,236,.13);
  border-radius:14px; background:rgba(5,12,27,.68); cursor:pointer;
}
.notification-toggle > span { color:#d7e5f4; font-size:10.5px; font-weight:700; }
.notification-toggle input { position:absolute; opacity:0; pointer-events:none; }
.notification-toggle i { position:relative; width:38px; height:22px; flex:0 0 auto; border-radius:999px; background:rgba(116,139,168,.25); border:1px solid rgba(120,162,205,.16); transition:.18s ease; }
.notification-toggle i::after { content:""; position:absolute; width:16px; height:16px; left:2px; top:2px; border-radius:50%; background:#8498af; transition:.18s ease; }
.notification-toggle input:checked + i { background:linear-gradient(90deg,rgba(28,196,255,.65),rgba(106,82,255,.72)); border-color:rgba(62,213,255,.35); }
.notification-toggle input:checked + i::after { transform:translateX(16px); background:#fff; box-shadow:0 0 12px rgba(62,214,255,.45); }

/* v0.6.4 — guided connection clients */
.client-recommend-card {
  display:grid;
  gap:12px;
  margin:14px 0 12px;
  padding:15px;
  border:1px solid rgba(57,211,255,.30);
  border-radius:18px;
  background:linear-gradient(145deg,rgba(7,30,52,.95),rgba(12,13,36,.96));
  box-shadow:0 16px 38px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04);
}
.client-recommend-card.alternative {
  border-color:rgba(132,106,255,.30);
  background:linear-gradient(145deg,rgba(19,18,52,.95),rgba(12,13,36,.96));
}
.client-recommend-top { display:grid; grid-template-columns:48px minmax(0,1fr); gap:12px; align-items:center; }
.client-recommend-top .client-logo {
  display:grid; place-items:center; width:48px; height:48px; border-radius:15px;
  border:1px solid rgba(54,213,255,.28); background:rgba(27,147,206,.12); font-size:23px;
}
.client-recommend-card.alternative .client-logo { border-color:rgba(146,108,255,.30); background:rgba(115,76,220,.13); }
.client-recommend-top div { display:grid; gap:2px; min-width:0; }
.client-recommend-top small { color:#35d9ff; font-size:8px; font-weight:900; letter-spacing:.11em; }
.client-recommend-card.alternative small { color:#b49cff; }
.client-recommend-top strong { color:#f7fbff; font-size:18px; line-height:1.1; }
.client-recommend-top span { color:#8ea4bb; font-size:9px; line-height:1.4; }
.client-device-line { padding:8px 10px; border-radius:11px; background:rgba(1,8,21,.55); color:#c9d7e8; font-size:10px; font-weight:750; }
.connection-link-box { display:grid; gap:7px; margin:14px 0 12px; padding:12px; border:1px dashed rgba(60,174,226,.30); border-radius:14px; background:rgba(2,10,23,.68); }
.connection-link-box span { color:#7f98b2; font-size:9px; }
.connection-link-box code { display:block; overflow-wrap:anywhere; white-space:normal; color:#dff7ff; font-size:9px; line-height:1.45; }

/* RC4: the same Shifro UI can now be used as a regular browser cabinet. */
.auth-pending .app-shell { visibility: hidden; }
.auth-gate {
  position: relative;
  z-index: 60;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}
.auth-gate[hidden] { display: none; }
.auth-card {
  width: min(100%, 470px);
  padding: 26px;
  border: 1px solid rgba(124, 191, 255, .18);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(11, 19, 42, .95), rgba(5, 10, 24, .96));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(145%);
}
.auth-brand { display:flex; align-items:center; gap:12px; margin-bottom:28px; }
.auth-brand img { width:52px; height:52px; border-radius:16px; object-fit:cover; box-shadow:0 0 36px rgba(40,215,255,.2); }
.auth-brand div { display:flex; gap:6px; align-items:baseline; letter-spacing:.08em; }
.auth-brand strong { font-size:19px; }
.auth-brand span { color:var(--cyan); font-size:13px; font-weight:800; }
.auth-copy h1 { margin:8px 0 8px; font-size:30px; line-height:1.08; }
.auth-copy p { margin:0 0 20px; color:var(--muted); line-height:1.55; }
.auth-tabs { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:5px; margin:18px 0; border:1px solid var(--line); border-radius:16px; background:rgba(1,6,18,.55); }
.auth-tab { min-height:42px; border:0; border-radius:12px; background:transparent; color:var(--muted); cursor:pointer; }
.auth-tab.active { color:var(--text); background:linear-gradient(135deg, rgba(40,136,255,.22), rgba(150,87,255,.18)); box-shadow:inset 0 0 0 1px rgba(40,215,255,.14); }
.auth-form { display:grid; gap:12px; }
.auth-field { display:grid; gap:7px; color:var(--muted); font-size:12px; }
.auth-field input { width:100%; min-height:52px; border:1px solid var(--line); border-radius:15px; padding:0 15px; color:var(--text); background:rgba(2,8,21,.78); outline:none; }
.auth-field input:focus { border-color:var(--line-bright); box-shadow:0 0 0 3px rgba(40,215,255,.08); }
.auth-error { padding:11px 13px; border:1px solid rgba(255,93,125,.25); border-radius:13px; color:#ff9caf; background:rgba(255,93,125,.08); font-size:13px; line-height:1.4; }
.auth-divider { display:flex; align-items:center; gap:12px; margin:18px 0; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.12em; }
.auth-divider::before,.auth-divider::after { content:""; flex:1; height:1px; background:var(--line); }
.auth-telegram { text-decoration:none; display:flex; align-items:center; justify-content:center; }
.auth-support { display:block; margin-top:16px; text-align:center; color:var(--muted); text-decoration:none; font-size:13px; }
.auth-support:hover { color:var(--cyan); }
.browser-mode #closeApp { display:none; }
.browser-mode .profile-username.email-only { color:var(--muted); }
@media (min-width: 760px) {
  .browser-mode .app-shell { width:min(100%, 760px); }
  .auth-card { padding:32px; }
}

/* RC5: browser login parity with the previous cabinet. */
.auth-field[hidden], .auth-tabs[hidden], .telegram-login-block[hidden], .auth-divider[hidden], .auth-link-button[hidden] { display:none !important; }
.telegram-login-block { display:grid; gap:10px; justify-items:center; margin:18px 0 4px; }
.telegram-login-widget { min-height:44px; display:flex; align-items:center; justify-content:center; width:100%; }
.telegram-fallback { color:var(--muted); text-decoration:none; font-size:12px; }
.telegram-fallback:hover { color:var(--cyan); }
.auth-link-button { width:100%; margin-top:14px; border:0; background:transparent; color:#9a65ff; cursor:pointer; font:inherit; font-size:13px; text-align:center; }
.auth-link-button:hover { color:var(--cyan); }
.auth-success { padding:11px 13px; border:1px solid rgba(66,230,162,.24); border-radius:13px; color:#9ff4cf; background:rgba(66,230,162,.08); font-size:13px; line-height:1.4; }
.browser-mode .auth-card .button-primary { color:#03111d; font-weight:800; }

@media (max-width: 560px) {
  .auth-gate { padding:18px 12px; }
  .auth-card { border-radius:24px; padding:22px 18px; }
  .auth-copy h1 { font-size:27px; }
}

/* RC6 unified account linking */
.account-link-card {
  display: grid;
  gap: 12px;
  margin: 12px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(6, 13, 29, .72);
}
.account-link-card > div { display: grid; gap: 5px; }
.account-link-card > div > span:first-child { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.account-link-card strong { font-size: 15px; word-break: break-word; }
.account-ok { color: var(--green); font-size: 12px; }
.account-warn { color: var(--gold); font-size: 12px; line-height: 1.4; }

/* RC16.13: auto-renew setup / subscription continuity */
.notice-box {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  padding: 12px 13px;
  border: 1px solid rgba(81, 210, 255, .18);
  border-radius: 15px;
  background: rgba(10, 24, 43, .72);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.notice-box strong { color: #eaf9ff; font-size: 12px; }
.notice-box span { color: #aebed2; }


/* RC16.14: keep the main auto-renew action visually separated from tariff action. */
#autoRenewMain { margin-top: 12px; }

/* === SHIFRO RENEW CTA START === */
/*
 * Firm Shifro accent for renewal actions.
 * Visual only — no purchase/renewal logic is changed.
 */
#renewTariffMain,
#chooseRenewTariff,
#subscriptionButton.expired-trial-renew,
[data-renew-sub] {
    background: linear-gradient(
        135deg,
        #675cff 0%,
        #8b50ff 52%,
        #bd45ff 100%
    ) !important;

    border: 1px solid rgba(190, 132, 255, 0.62) !important;
    color: #ffffff !important;

    box-shadow:
        0 8px 26px rgba(115, 77, 255, 0.24),
        0 0 18px rgba(166, 77, 255, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;

    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
    transition:
        filter 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease !important;
}

#renewTariffMain:hover,
#chooseRenewTariff:hover,
#subscriptionButton.expired-trial-renew:hover,
[data-renew-sub]:hover {
    filter: brightness(1.08);
    box-shadow:
        0 10px 30px rgba(115, 77, 255, 0.30),
        0 0 22px rgba(166, 77, 255, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

#renewTariffMain:active,
#chooseRenewTariff:active,
#subscriptionButton.expired-trial-renew:active,
[data-renew-sub]:active {
    transform: scale(0.985);
    filter: brightness(0.98);
}
/* === SHIFRO RENEW CTA END === */
