:root {
  --bg: #95b4e9;
  --surface: rgba(239, 247, 255, 0.84);
  --surface-soft: rgba(248, 252, 255, 0.92);
  --ink: #304878;
  --ink-muted: #5f729d;
  --line: #b9d0f6;
  --black-card: #5f83d8;
  --black-soft: #e5f2ff;
  --white: #f9fcff;
  --status-ok: #3ccd92;
  --status-trial: #ebb866;
  --status-expired: #ff8c9e;
  --radius-xxl: 34px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background:
    radial-gradient(
      circle at 16% 12%,
      rgba(255, 255, 255, 0.5),
      transparent 38%
    ),
    radial-gradient(
      circle at 84% 72%,
      rgba(231, 243, 255, 0.44),
      transparent 40%
    ),
    linear-gradient(180deg, #8fb0e8 0%, #a6c1ee 46%, #b8cef2 100%);
  color: var(--ink);
  color-scheme: light;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 470px;
  margin: 0 auto;
  padding-top: calc(env(safe-area-inset-top) + 18px);
  padding-right: 18px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 26px);
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.brand-row {
  display: flex;
  justify-content: center;
  padding: 2px 0 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 80px;
  height: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand__avatar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.brand__name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  box-shadow: 0 12px 26px rgba(95, 123, 185, 0.16);
  backdrop-filter: blur(4px);
}

.sub-card {
  background: linear-gradient(
    180deg,
    rgba(248, 252, 255, 0.92) 0%,
    rgba(232, 243, 255, 0.88) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: var(--radius-xxl);
  padding: 22px 22px 20px;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 14px 30px rgba(79, 111, 181, 0.22);
}

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

.sub-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(70, 97, 150, 0.82);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(204, 240, 223, 0.84);
  border: 1px solid rgba(60, 205, 146, 0.24);
  color: #2b8f66;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill--ok {
  color: var(--status-ok);
}

.status-pill--trial {
  color: var(--status-trial);
}

.status-pill--expired {
  color: var(--status-expired);
}

.sub-card__number {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.sub-card__divider {
  height: 1px;
  background: rgba(92, 125, 191, 0.22);
}

.sub-card__row--bottom {
  margin-top: 2px;
}

.sub-card__expires {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(72, 98, 150, 0.88);
  font-size: 14px;
  font-weight: 500;
}

.sub-card__expires .icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sub-card__expires .icon svg {
  width: 100%;
  height: 100%;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: linear-gradient(180deg, #89abf0 0%, #6d8de3 100%);
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(73, 107, 188, 0.22);
}

.link-btn__icon {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-btn__icon svg {
  width: 100%;
  height: 100%;
}

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

.section-head__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head__hint {
  font-size: 13px;
  color: var(--ink-muted);
  font-weight: 500;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.tab {
  appearance: none;
  border: 2px solid var(--line);
  background: rgba(245, 251, 255, 0.85);
  border-radius: var(--radius-lg);
  min-height: 96px;
  padding: 12px 6px 10px;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background-color 180ms ease;
}

.tab__icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab__icon svg {
  width: 22px;
  height: 22px;
}

.tab__label {
  font-size: 15px;
  font-weight: 500;
}

.tab[aria-selected="true"] {
  border-color: #7da1ea;
  border-width: 3px;
  color: #375a97;
  background: rgba(224, 238, 255, 0.94);
  box-shadow: 0 6px 16px rgba(104, 135, 206, 0.2);
}

.step-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-card__num {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(180deg, #8fb0ef 0%, #7394e4 100%);
  color: var(--white);
  font-size: 22px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.step-card__desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
  line-height: 1.42;
}

.btn {
  width: 100%;
  min-height: 62px;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    filter 180ms ease,
    transform 180ms ease;
}

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

.btn:active {
  transform: translateY(1px);
}

.btn__icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn__icon svg {
  width: 100%;
  height: 100%;
}

.btn-secondary {
  background: linear-gradient(180deg, #9db8f4 0%, #7f9ee9 100%);
  color: var(--white);
  border: 0;
  box-shadow: 0 10px 22px rgba(81, 112, 190, 0.2);
}

.btn-primary {
  background: linear-gradient(180deg, #7f9ee9 0%, #6c8be1 100%);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(81, 112, 190, 0.22);
}

.btn-primary[disabled] {
  background: #9ab2e2;
  color: rgba(249, 252, 255, 0.84);
  cursor: not-allowed;
}

.hint {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.fallback {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.fallback__title {
  margin: 0;
  font-size: 14px;
  color: var(--ink-muted);
}

.fallback__url {
  background: var(--black-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  max-height: 96px;
  overflow: auto;
  word-break: break-all;
}

.fallback__url code {
  font-family: "SFMono-Regular", "Consolas", "Menlo", monospace;
  font-size: 12px;
  color: var(--ink);
  line-height: 1.45;
}

.help-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.help-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
}

.help-card__icon svg {
  width: 22px;
  height: 22px;
}

.help-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.help-card__title {
  font-size: 16px;
  font-weight: 700;
}

.help-card__desc {
  font-size: 13px;
  color: var(--ink-muted);
}

.help-card__chev {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
}

.help-card__chev svg {
  width: 100%;
  height: 100%;
}

.state {
  min-height: 86vh;
  justify-content: center;
  align-items: center;
}

.state__card {
  max-width: 300px;
  text-align: center;
}

.state__text {
  margin: 0;
  color: var(--ink-muted);
}

.spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 3px solid #c7d9f8;
  border-top-color: #6f93e6;
  animation: spin 0.9s linear infinite;
}

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

@media (max-width: 420px) {
  .container {
    padding-right: 16px;
    padding-left: 16px;
    gap: 14px;
  }

  .brand__name {
    font-size: 17px;
  }

  .sub-card__label {
    font-size: 11px;
  }

  .status-pill {
    font-size: 12px;
    padding: 6px 10px;
  }

  .sub-card__number {
    font-size: 48px;
  }

  .sub-card__expires {
    font-size: 13px;
  }

  .sub-card__expires .icon {
    width: 13px;
    height: 13px;
  }

  .link-btn {
    font-size: 14px;
  }

  .section-head__title {
    font-size: 20px;
  }

  .section-head__hint {
    font-size: 13px;
  }

  .step-card__title {
    font-size: 16px;
  }

  .step-card__desc {
    font-size: 14px;
  }

  .btn {
    font-size: 15px;
    min-height: 58px;
  }

  .btn__icon {
    width: 18px;
    height: 18px;
  }

  .hint {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}
