:root {
  color-scheme: dark;
  --bg: #090d14;
  --panel: rgba(22, 28, 38, 0.82);
  --panel-strong: rgba(24, 33, 47, 0.94);
  --border: rgba(255, 255, 255, 0.12);
  --border-blue: rgba(46, 143, 255, 0.42);
  --text: #f5f7fb;
  --muted: #a9b2c2;
  --soft: #747f91;
  --blue: #2b8cff;
  --blue-dark: #1266d7;
  --green: #18b25f;
  --red: #ff4d5e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --radius: 28px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: #090d14;
}

body {
  min-height: 100vh;
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 10%, rgba(43, 140, 255, 0.2), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(24, 178, 95, 0.13), transparent 34%),
    linear-gradient(180deg, #0b1421 0%, var(--bg) 46%, #07090e 100%);
  background-repeat: no-repeat;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

body.cabinet-mode .topbar {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-logo,
.app-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(48, 18, 255, 0.28);
}

.top-actions,
.hero-actions,
.action-row,
.button-grid,
.footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  align-items: center;
  gap: 34px;
}

.landing-simple {
  min-height: min(660px, calc(100vh - 150px));
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
}

.landing-logo {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 22px;
  box-shadow: 0 18px 46px rgba(48, 18, 255, 0.3);
}

.landing-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 16px;
  background: rgba(22, 28, 38, 0.7);
  box-shadow: var(--shadow);
}

.landing-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.045);
}

.landing-row span {
  grid-row: span 2;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: rgba(43, 140, 255, 0.22);
  font-size: 13px;
  font-weight: 760;
}

.landing-row strong {
  align-self: end;
  font-size: 18px;
  line-height: 1.15;
}

.landing-row small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 14px 0 16px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 610px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.eyebrow,
.section-label,
.muted-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-card {
  position: relative;
  min-height: 540px;
  border: 1px solid var(--border);
  border-radius: 42px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hero-card:hover,
.hero-card:focus-visible {
  border-color: rgba(46, 143, 255, 0.55);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  transform: translateY(-2px);
}

.hero-card:active {
  transform: translateY(0) scale(0.995);
}

.hero-card img {
  width: 100%;
  height: 100%;
  min-height: 540px;
  object-fit: cover;
  filter: saturate(1.05);
}

.glass-card {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  background: rgba(8, 12, 18, 0.7);
  backdrop-filter: blur(18px);
}

.glass-card strong {
  font-size: 24px;
}

.glass-card span {
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.features article,
.card,
.auth-card,
.cabinet-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.features article {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 88px;
  padding: 18px 20px;
}

.feature-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: rgba(43, 140, 255, 0.22);
}

.feature-icon svg {
  width: 23px;
  height: 23px;
}

.feature-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.features h2 {
  min-width: 0;
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: break-word;
}

.features p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 30px 0 0;
  color: var(--soft);
  font-size: 14px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.doc-page {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 54px;
}

.doc-back {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 760;
}

.doc-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 46px);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.doc-card h1 {
  margin: 10px 0 12px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1;
}

.doc-card h2 {
  margin: 30px 0 10px;
  font-size: 22px;
}

.doc-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.62;
}

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

.auth-wrap {
  min-height: 560px;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(520px, 100%);
  padding: 30px;
}

.auth-card h1,
.screen h1 {
  margin: 10px 0;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
}

.auth-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-card .auth-hint {
  margin-top: -10px;
  margin-bottom: 18px;
  font-size: 14px;
}

.field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.field label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 18px;
  color: var(--text);
  outline: none;
  background: rgba(255, 255, 255, 0.06);
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(43, 140, 255, 0.14);
}

.primary,
.secondary,
.ghost,
.danger,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  border: 0;
  border-radius: 18px;
  padding: 0 22px;
  color: #fff;
  font-weight: 680;
  letter-spacing: 0;
  line-height: 1.16;
  transition: transform 0.14s ease, opacity 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.primary:active,
.secondary:active,
.ghost:active,
.danger:active,
.text-button:active {
  transform: scale(0.985);
}

.primary {
  background: linear-gradient(180deg, #2f99ff, var(--blue-dark));
}

.primary.green {
  background: linear-gradient(180deg, #20c974, #0c944e);
}

.primary.red {
  background: linear-gradient(180deg, #ff6977, #d91d34);
}

.secondary,
.ghost,
.danger {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.07);
}

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

.danger {
  color: #ffd4d9;
}

.text-button {
  min-height: auto;
  padding: 0;
  color: var(--muted);
  background: transparent;
}

.small {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 16px;
}

.wide {
  width: 100%;
}

.status-note {
  min-height: 22px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.screen {
  display: grid;
  gap: 18px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.refresh {
  width: 58px;
  min-width: 58px;
  height: 58px;
  padding: 0;
  border-radius: 20px;
  font-size: 24px;
}

.cabinet-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.cabinet-card,
.card {
  padding: 26px;
}

.featured-card {
  border-color: rgba(43, 140, 255, 0.34);
  background:
    linear-gradient(135deg, rgba(43, 140, 255, 0.12), rgba(24, 178, 95, 0.08)),
    var(--panel-strong);
}

.account-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(24, 178, 95, 0.45);
  border-radius: 999px;
  padding: 10px 16px;
  color: #dfffee;
  background: rgba(24, 178, 95, 0.16);
  font-weight: 760;
}

.pill.red {
  border-color: rgba(255, 77, 94, 0.55);
  color: #ffe0e4;
  background: rgba(255, 77, 94, 0.16);
}

.sub-details {
  display: grid;
  gap: 12px;
  margin: 18px 0 22px;
}

.detail-line {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  align-items: start;
}

.detail-action {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.detail-line span:first-child {
  color: var(--muted);
}

.detail-line span:last-child {
  color: var(--text);
}

.app-id {
  margin-top: 8px;
  color: var(--soft);
  font-size: 13px;
}

.button-grid {
  align-items: stretch;
}

.button-grid button {
  flex: 1 1 220px;
}

.card > * + .button-grid,
.card > * + .action-row,
.card > * + button.wide,
.cabinet-card > * + .button-grid {
  margin-top: 18px;
}

.footer-actions {
  align-items: stretch;
}

.footer-actions button {
  width: 100%;
}

.side-menu {
  display: grid;
  gap: 12px;
}

.menu-button {
  width: 100%;
  min-height: 78px;
  padding: 16px 22px;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.menu-button svg {
  flex: 0 0 auto;
}

.menu-button > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.menu-button strong {
  display: block;
  font-size: 18px;
  line-height: 1.15;
}

.menu-button > span > span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.2;
}

.plans {
  display: grid;
  gap: 10px;
}

.plan-button {
  min-height: 74px;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 14px 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
}

.plan-button strong {
  display: block;
  font-size: 20px;
}

.plan-button span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.plans + .plan-mobile-link {
  margin-top: 22px;
}

.connect-box {
  display: grid;
  gap: 16px;
}

.copy-box {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: #d8e8ff;
  background: rgba(0, 0, 0, 0.18);
  overflow-wrap: anywhere;
}

.subscription-qr {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(238px, 100%);
  margin: 8px auto 4px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.18);
}

.subscription-qr img {
  width: min(190px, 100%);
  aspect-ratio: 1;
  display: block;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
}

.subscription-qr span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.message-text {
  color: var(--text);
  font-size: 18px;
  line-height: 1.58;
}

.message-text strong {
  font-weight: 780;
}

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

.warn {
  color: #ffd18a;
}

.instruction-alert {
  display: grid;
  gap: 6px;
  margin: 16px 0;
  padding: 16px 18px;
  border: 1px solid rgba(255, 209, 138, 0.42);
  border-radius: 18px;
  color: #fff4dc;
  background: rgba(255, 183, 51, 0.14);
}

.instruction-alert strong {
  font-size: 18px;
  font-weight: 820;
}

.instruction-alert span {
  color: rgba(255, 244, 220, 0.86);
  font-size: 15px;
  line-height: 1.35;
}

.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

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

.footer-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--muted);
  text-decoration: none;
}

.footer-link:hover {
  color: var(--text);
}

.hidden {
  display: none !important;
}

@media (max-width: 860px) {
  body {
    background:
      radial-gradient(circle at 18% 8%, rgba(43, 140, 255, 0.2), transparent 42%),
      radial-gradient(circle at 92% 8%, rgba(24, 178, 95, 0.12), transparent 42%),
      linear-gradient(180deg, #0b1421 0%, var(--bg) 48%, #07090e 100%);
  }

  .shell {
    width: min(760px, calc(100% - 24px));
    padding-top: 14px;
  }

  .hero,
  .cabinet-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .landing-simple {
    gap: 22px;
  }

  .hero-card,
  .hero-card img {
    min-height: 360px;
  }

  .features {
    grid-template-columns: 1fr;
  }

  .topbar {
    margin-bottom: 22px;
  }

  .detail-line {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .cabinet-card,
  .card,
  .auth-card {
    padding: 20px;
    border-radius: 24px;
  }
}
