@font-face {
  font-family: "Manrope";
  src: url("./manrope-variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #060913;
  --bg-soft: #0a1020;
  --surface: rgba(15, 24, 46, 0.72);
  --surface-strong: rgba(18, 30, 57, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(164, 187, 255, 0.14);
  --line-strong: rgba(164, 187, 255, 0.24);
  --text: #f5f7ff;
  --muted: #9aa9ca;
  --muted-2: #7483a5;
  --mint: #7cf7c4;
  --mint-deep: #35d9a1;
  --peri: #9bb0ff;
  --coral: #ff8a80;
  --amber: #ffd48a;
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 28px 70px -32px rgba(0, 0, 0, 0.85);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  font-family: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-lg {
  width: 34px;
  height: 34px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -20%, #101d3c 0%, transparent 58%),
    linear-gradient(180deg, #070b16 0%, #060913 55%, #070a12 100%);
}

.orb {
  position: absolute;
  display: block;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.3;
}

.orb-a {
  width: 330px;
  height: 330px;
  top: -100px;
  left: -100px;
  background: #3e6bff;
}

.orb-b {
  width: 290px;
  height: 290px;
  top: 240px;
  right: -140px;
  background: #1de1a2;
  opacity: 0.16;
}

.grid {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(155, 176, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 176, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(70% 55% at 50% 0%, #000 20%, transparent 72%);
  mask-image: radial-gradient(70% 55% at 50% 0%, #000 20%, transparent 72%);
}

.noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.shell {
  width: 100%;
  max-width: 620px;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(14px + env(safe-area-inset-top))
    clamp(14px, 4.2vw, 28px)
    calc(104px + env(safe-area-inset-bottom));
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 46px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--mint);
  filter: drop-shadow(0 0 16px rgba(124, 247, 196, 0.26));
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.1;
}

.brand-name em {
  color: var(--mint);
  font-style: normal;
}

.brand-tag {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.icon-btn {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.07);
}

.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn.is-busy .icon {
  animation: spin 0.9s linear infinite;
}

.view {
  margin-top: 20px;
}

.pages {
  animation: page-in 0.45s var(--ease) both;
}

.page {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: page-in 0.35s var(--ease) both;
}

/* Loading */
.loading-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.045);
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.07) 50%, transparent 80%);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.5s infinite;
}

.skeleton-hero {
  height: 270px;
  border-radius: var(--radius-xl);
}

.skeleton-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.skeleton-stat {
  height: 84px;
}

.skeleton-line {
  width: 42%;
  height: 18px;
  border-radius: 8px;
}

.skeleton-card {
  height: 92px;
}

/* State views */
.state-view {
  display: flex;
  max-width: 420px;
  margin: 9vh auto 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.state-icon {
  display: grid;
  width: 78px;
  height: 78px;
  margin-bottom: 20px;
  place-items: center;
  border: 1px solid rgba(124, 247, 196, 0.22);
  border-radius: 26px;
  background: radial-gradient(circle at 30% 20%, rgba(124, 247, 196, 0.2), rgba(124, 247, 196, 0.03) 70%);
  color: var(--mint);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.state-icon-danger {
  border-color: rgba(255, 138, 128, 0.24);
  background: radial-gradient(circle at 30% 20%, rgba(255, 138, 128, 0.18), rgba(255, 138, 128, 0.03) 70%);
  color: var(--coral);
}

.state-view h1 {
  margin: 0 0 9px;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.state-view p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(46, 73, 148, 0.36) 0%, rgba(15, 24, 46, 0.74) 46%, rgba(11, 19, 38, 0.92) 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero::before {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(124, 247, 196, 0.24) 0%, transparent 68%);
  content: "";
  pointer-events: none;
}

.hero::after {
  position: absolute;
  bottom: -150px;
  left: -110px;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(92, 124, 255, 0.24) 0%, transparent 68%);
  content: "";
  pointer-events: none;
}

.hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.plan-kicker .icon {
  width: 13px;
  height: 13px;
  color: var(--peri);
}

.plan-name {
  margin: 0;
  font-size: 25px;
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.status-pill {
  display: inline-flex;
  height: 30px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(124, 247, 196, 0.22);
  border-radius: 999px;
  background: rgba(124, 247, 196, 0.09);
  color: var(--mint);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  content: "";
  box-shadow: 0 0 0 4px rgba(124, 247, 196, 0.12);
}

.status-pill.is-warn {
  border-color: rgba(255, 212, 138, 0.26);
  background: rgba(255, 212, 138, 0.1);
  color: var(--amber);
}

.status-pill.is-warn::before {
  box-shadow: 0 0 0 4px rgba(255, 212, 138, 0.12);
}

.status-pill.is-danger {
  border-color: rgba(255, 138, 128, 0.26);
  background: rgba(255, 138, 128, 0.1);
  color: var(--coral);
}

.status-pill.is-danger::before {
  box-shadow: 0 0 0 4px rgba(255, 138, 128, 0.12);
}

.hero-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 20px;
}

.hero-value {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-value strong {
  font-size: clamp(28px, 8.4vw, 38px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.hero-value span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
}

.hero-orbit {
  position: relative;
  display: grid;
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(6, 9, 19, 0.35) 46%, transparent 48%),
    conic-gradient(from 140deg, rgba(124, 247, 196, 0.09), var(--mint), rgba(155, 176, 255, 0.9), rgba(124, 247, 196, 0.18), rgba(124, 247, 196, 0.09));
  box-shadow: 0 0 48px rgba(124, 247, 196, 0.12), inset 0 0 24px rgba(6, 9, 19, 0.5);
}

.hero-orbit::before {
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: inherit;
  background: #0a1122;
  content: "";
}

.hero-orbit .icon {
  position: relative;
  width: 38px;
  height: 38px;
  color: var(--mint);
  filter: drop-shadow(0 0 14px rgba(124, 247, 196, 0.35));
}

.hero-orbit.is-danger {
  background:
    radial-gradient(circle at 50% 50%, rgba(6, 9, 19, 0.35) 46%, transparent 48%),
    conic-gradient(from 140deg, rgba(255, 138, 128, 0.08), var(--coral), rgba(255, 212, 138, 0.8), rgba(255, 138, 128, 0.16), rgba(255, 138, 128, 0.08));
}

.hero-orbit.is-danger .icon {
  color: var(--coral);
  filter: drop-shadow(0 0 14px rgba(255, 138, 128, 0.3));
}

.hero-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric {
  min-width: 0;
  padding: 0 10px;
  border-left: 1px solid var(--line);
}

.metric:first-child {
  padding-left: 0;
  border-left: 0;
}

.metric:last-child {
  padding-right: 0;
}

.metric-label {
  overflow: hidden;
  margin-bottom: 3px;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.metric-value {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-value.is-mint {
  color: var(--mint);
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 9px;
}

.hero-actions .btn-primary {
  flex: 1 1 auto;
}

.hero-actions .btn-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

/* Buttons */
.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s var(--ease), filter 0.2s, border-color 0.2s, background 0.2s, opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn:hover {
  filter: brightness(1.06);
}

.btn:active {
  transform: scale(0.975);
}

.btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.5);
  opacity: 0.48;
}

.btn-primary {
  border-color: rgba(124, 247, 196, 0.3);
  background: linear-gradient(112deg, var(--mint) 0%, #8ff8d0 42%, #b9c8ff 100%);
  color: #07120f;
  box-shadow: 0 16px 36px -18px rgba(124, 247, 196, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-primary .icon {
  stroke-width: 2.1;
}

.btn-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.btn-ghost {
  min-height: 40px;
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.btn-danger {
  border-color: rgba(255, 138, 128, 0.34);
  background: rgba(255, 138, 128, 0.11);
  color: var(--coral);
}

.btn-danger-solid {
  border-color: rgba(255, 138, 128, 0.4);
  background: var(--coral);
  color: #240806;
}

.btn-icon {
  display: grid;
  width: 48px;
  min-height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.09);
}

.btn-icon:active {
  transform: scale(0.95);
}

.btn-block {
  width: 100%;
}

.btn.is-loading {
  pointer-events: none;
}

.btn.is-loading .btn-label {
  opacity: 0.55;
}

.btn.is-loading::before {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  content: "";
  animation: spin 0.7s linear infinite;
}

/* Section */
.section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 3px 0;
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.025em;
}

.section-link {
  border: 0;
  background: none;
  color: var(--mint);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.section-link:hover {
  color: #a9ffdc;
}

/* Quick actions */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.quick-card {
  display: flex;
  min-width: 0;
  min-height: 91px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}

.quick-card:hover {
  border-color: var(--line-strong);
  background: rgba(25, 39, 74, 0.8);
}

.quick-card:active {
  transform: scale(0.975);
}

.quick-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(124, 247, 196, 0.16);
  border-radius: 10px;
  background: rgba(124, 247, 196, 0.07);
  color: var(--mint);
}

.quick-icon .icon {
  width: 16px;
  height: 16px;
}

.quick-icon.is-peri {
  border-color: rgba(155, 176, 255, 0.18);
  background: rgba(155, 176, 255, 0.08);
  color: var(--peri);
}

.quick-icon.is-coral {
  border-color: rgba(255, 138, 128, 0.18);
  background: rgba(255, 138, 128, 0.08);
  color: var(--coral);
}

.quick-label {
  overflow: hidden;
  width: 100%;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-value {
  overflow: hidden;
  width: 100%;
  margin-top: -3px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cards */
.card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card-soft {
  background: rgba(12, 20, 39, 0.56);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 13px;
}

.card-icon {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--peri);
}

.card-icon.is-mint {
  border-color: rgba(124, 247, 196, 0.18);
  background: rgba(124, 247, 196, 0.07);
  color: var(--mint);
}

.card-icon .icon {
  width: 19px;
  height: 19px;
}

.card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.015em;
}

.card-sub {
  margin: 1px 0 0;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.4;
}

.card-body {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(5, 9, 20, 0.48);
}

.link-box code {
  overflow: hidden;
  flex: 1 1 auto;
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-box .icon-btn {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 10px;
}

.link-box .icon {
  width: 16px;
  height: 16px;
}

.inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 11px;
}

.inline-actions .btn {
  min-height: 42px;
  flex: 1 1 0;
  font-size: 12px;
}

/* Warning banner */
.banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 212, 138, 0.22);
  border-radius: var(--radius-md);
  background: rgba(255, 212, 138, 0.07);
  color: #f2d9a9;
  font-size: 11.5px;
  line-height: 1.55;
}

.banner.is-danger {
  border-color: rgba(255, 138, 128, 0.24);
  background: rgba(255, 138, 128, 0.07);
  color: #ffc0bb;
}

.banner.is-mint {
  border-color: rgba(124, 247, 196, 0.2);
  background: rgba(124, 247, 196, 0.06);
  color: #bffbe3;
}

.banner .icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  flex: 0 0 auto;
}

.banner-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 15px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.step > span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(124, 247, 196, 0.22);
  border-radius: 8px;
  background: rgba(124, 247, 196, 0.07);
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
}

.step p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.stat span {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.stat strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Summary */
.summary {
  overflow: hidden;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(5, 9, 20, 0.38);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.summary-row:last-child {
  border-bottom: 0;
}

.summary-row strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  text-align: right;
}

.summary-row.is-total {
  background: rgba(124, 247, 196, 0.045);
}

.summary-row.is-total strong {
  color: var(--mint);
  font-size: 15px;
}

body.has-sheet {
  overflow: hidden;
}

.sheet.is-closing,
.sheet-backdrop.is-closing {
  animation: fade-out 0.18s ease both;
}

/* Devices */
.device-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.device {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 12px 13px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(12, 20, 39, 0.58);
}

.device-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(155, 176, 255, 0.17);
  border-radius: 13px;
  background: rgba(155, 176, 255, 0.07);
  color: var(--peri);
}

.device-icon .icon {
  width: 20px;
  height: 20px;
}

.device-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.device-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-meta {
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-remove {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 138, 128, 0.16);
  border-radius: 11px;
  background: rgba(255, 138, 128, 0.05);
  color: rgba(255, 138, 128, 0.8);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.device-remove:hover {
  background: rgba(255, 138, 128, 0.12);
  color: var(--coral);
}

.device-remove .icon {
  width: 16px;
  height: 16px;
}

.device-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 650;
}

.device-count strong {
  color: var(--text);
}

.empty {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted-2);
  text-align: center;
}

.empty .icon {
  width: 26px;
  height: 26px;
  margin-bottom: 2px;
  color: var(--muted-2);
}

.empty strong {
  color: var(--muted);
  font-size: 13px;
}

.empty span {
  max-width: 280px;
  font-size: 11px;
  line-height: 1.5;
}

/* Balance */
.balance-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid rgba(155, 176, 255, 0.2);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(140% 150% at 100% 0%, rgba(155, 176, 255, 0.18) 0%, transparent 55%),
    linear-gradient(145deg, rgba(27, 42, 82, 0.8), rgba(12, 20, 39, 0.86));
}

.balance-card::after {
  position: absolute;
  right: -46px;
  bottom: -70px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(155, 176, 255, 0.1);
  border-radius: 999px;
  content: "";
}

.balance-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.balance-label .icon {
  width: 14px;
  height: 14px;
  color: var(--peri);
}

.balance-value {
  position: relative;
  z-index: 1;
  font-size: 31px;
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.balance-note {
  position: relative;
  z-index: 1;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 11px;
}

/* Renewal */
.renewal-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.period-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 14px 0;
}

.period {
  position: relative;
  display: flex;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 9px 6px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(5, 9, 20, 0.3);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.period:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
}

.period:active {
  transform: scale(0.97);
}

.period.is-selected {
  border-color: rgba(124, 247, 196, 0.62);
  background: rgba(124, 247, 196, 0.08);
  box-shadow: inset 0 0 0 1px rgba(124, 247, 196, 0.16), 0 0 20px -8px rgba(124, 247, 196, 0.25);
}

.period-title {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.period-price {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.period.is-selected .period-price {
  color: var(--mint);
}

.period-badge {
  position: absolute;
  top: -7px;
  right: 6px;
  padding: 2px 6px;
  border: 1px solid rgba(124, 247, 196, 0.28);
  border-radius: 999px;
  background: #0e1d22;
  color: var(--mint);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.period-old {
  color: var(--muted-2);
  font-size: 9px;
  text-decoration: line-through;
}

.renewal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10.5px;
}

.renewal-foot strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.renewal-card .btn {
  margin-top: 12px;
}

/* Promo */
.promo-form {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

.input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(5, 9, 20, 0.46);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input::placeholder {
  color: var(--muted-2);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.input:focus {
  border-color: rgba(124, 247, 196, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 247, 196, 0.08);
}

.promo-form .btn {
  min-height: 46px;
  padding: 0 16px;
}

/* Link rows */
.row-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  padding: 2px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.row {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s;
}

.row:last-child {
  border-bottom: 0;
}

.row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.row-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--peri);
}

.row-icon.is-mint {
  border-color: rgba(124, 247, 196, 0.15);
  background: rgba(124, 247, 196, 0.055);
  color: var(--mint);
}

.row-icon .icon {
  width: 17px;
  height: 17px;
}

.row-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.row-title {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-sub {
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-chevron {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--muted-2);
}

/* Footer */
.footer-note {
  padding: 12px 7px 0;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.5;
  text-align: center;
}

.footer-note a {
  color: var(--muted);
}

/* Tabbar */
.tabbar {
  position: fixed;
  z-index: 40;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%;
  display: grid;
  width: min(calc(100% - 24px), 596px);
  height: 64px;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(164, 187, 255, 0.18);
  border-radius: 21px;
  background: rgba(10, 16, 32, 0.86);
  box-shadow: 0 15px 40px -16px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateX(-50%);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  backdrop-filter: blur(22px) saturate(1.2);
}

.tab {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.tab .icon {
  width: 21px;
  height: 21px;
  transition: transform 0.25s var(--ease);
}

.tab.is-active {
  background: rgba(124, 247, 196, 0.075);
  color: var(--mint);
}

.tab.is-active .icon {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 8px rgba(124, 247, 196, 0.3));
}

.tab:active .icon {
  transform: scale(0.9);
}

/* Sheet */
.sheet-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  background: rgba(3, 6, 13, 0.66);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  animation: fade-in 0.22s ease both;
}

.sheet {
  position: fixed;
  z-index: 81;
  bottom: 0;
  left: 50%;
  width: min(100%, 620px);
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  padding: 10px clamp(16px, 4.5vw, 26px) calc(22px + env(safe-area-inset-bottom));
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background:
    radial-gradient(100% 60% at 50% 0%, rgba(39, 59, 115, 0.4), transparent 60%),
    #0a1121;
  box-shadow: 0 -24px 70px -20px rgba(0, 0, 0, 0.85);
  transform: translateX(-50%);
  animation: sheet-in 0.34s var(--ease) both;
  overscroll-behavior: contain;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 17px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.sheet-title {
  margin: 0;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.sheet-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.sheet-close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
}

.sheet-close .icon {
  width: 16px;
  height: 16px;
}

.sheet-body {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.sheet-body strong {
  color: var(--text);
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.option:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
}

.option .icon:first-child {
  width: 19px;
  height: 19px;
  color: var(--mint);
}

.option-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.option-title {
  font-size: 12.5px;
  font-weight: 700;
}

.option-sub {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10px;
}

.option .row-chevron {
  color: var(--muted-2);
}

/* Toast */
.toast-root {
  position: fixed;
  z-index: 120;
  bottom: calc(90px + env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  width: min(calc(100% - 32px), 520px);
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 247, 196, 0.24);
  border-radius: 14px;
  background: rgba(13, 30, 30, 0.94);
  color: #c7ffe8;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.8);
  animation: toast-in 0.32s var(--ease) both;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.toast.is-error {
  border-color: rgba(255, 138, 128, 0.3);
  background: rgba(39, 17, 18, 0.95);
  color: #ffc7c2;
}

.toast .icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  flex: 0 0 auto;
}

.toast.is-leaving {
  animation: toast-out 0.24s ease both;
}

/* Misc */
.mt-4 {
  margin-top: 4px;
}

.mt-8 {
  margin-top: 8px;
}

.text-mint {
  color: var(--mint);
}

.text-muted {
  color: var(--muted);
}

.text-danger {
  color: var(--coral);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid rgba(124, 247, 196, 0.8);
  outline-offset: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fade-out {
  to { opacity: 0; }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translate(-50%, 28px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px); }
}

@media (max-width: 420px) {
  .shell {
    padding-right: 13px;
    padding-left: 13px;
  }

  .hero {
    padding: 18px;
    border-radius: 26px;
  }

  .plan-name {
    font-size: 22px;
  }

  .hero-orbit {
    width: 86px;
    height: 86px;
  }

  .hero-orbit .icon {
    width: 34px;
    height: 34px;
  }

  .hero-actions .btn-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .metric {
    padding: 0 7px;
  }

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

  .quick-card {
    padding: 11px;
  }

  .quick-label {
    font-size: 9.5px;
  }

  .quick-value {
    font-size: 12px;
  }

  .period-grid {
    gap: 6px;
  }

  .period {
    min-height: 60px;
    padding: 8px 4px;
  }

  .period-title {
    font-size: 10.5px;
  }

  .period-price {
    font-size: 9.5px;
  }

  .brand-tag {
    max-width: 180px;
  }
}

@media (max-width: 350px) {
  .brand-tag {
    display: none;
  }

  .hero-main {
    gap: 6px;
  }

  .hero-orbit {
    width: 76px;
    height: 76px;
  }

  .hero-value strong {
    font-size: 25px;
  }

  .quick-card {
    min-height: 84px;
  }

  .quick-label {
    display: none;
  }

  .quick-value {
    margin-top: 0;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
