: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: 17px; }
.brand-line span { color: var(--gold); font-size: 12px; 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, .14), rgba(5, 8, 22, .95) 57%),
    linear-gradient(90deg, rgba(0, 104, 255, .16), rgba(212, 34, 255, .12)),
    url('/static/assets/shifro-hero.webp') center 8% / cover no-repeat;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255,255,255,.05);
}
.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: #8b4cff; }
.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.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; }
.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 1fr; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 16px; background: rgba(5, 12, 26, .72); }
.bound-device strong { display: block; font-size: 12px; }
.bound-device small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.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; }
}
