:root {
  --bg: #0e1116;
  --bg-elevated: #10151d;
  --surface: #151a22;
  --surface-soft: #1a212c;
  --surface-strong: #1f2733;
  --line: #253041;
  --line-strong: #314055;
  --text: #f4f7fb;
  --muted: #9aa7b8;
  --muted-strong: #c2cfdd;
  --accent: #4c8dff;
  --accent-hover: #6ea3ff;
  --accent-soft: rgba(76, 141, 255, 0.14);
  --cyan: #67d6ff;
  --success: #2ccb72;
  --warning: #f5b942;
  --error: #ff5d5d;
  --shadow-soft: 0 20px 48px rgba(0, 0, 0, 0.26);
  --shadow-glow: 0 0 0 1px rgba(103, 214, 255, 0.08), 0 18px 48px rgba(76, 141, 255, 0.14);
  --radius-card: 20px;
  --radius-field: 14px;
  --radius-button: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-height: 100vh;
  --content-width: min(100% - 1rem, 1180px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: var(--app-height);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(76, 141, 255, 0.16), transparent 28%),
    radial-gradient(circle at top left, rgba(103, 214, 255, 0.08), transparent 22%),
    linear-gradient(180deg, #0e1116 0%, #0f141b 48%, #111722 100%);
  font-family: "Inter", "Segoe UI Variable", "SF Pro Text", "Helvetica Neue", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 92%);
  pointer-events: none;
}

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

img {
  display: block;
  max-width: 100%;
}

code {
  display: inline-flex;
  max-width: 100%;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.87rem;
  word-break: break-all;
}

.page-shell {
  display: flex;
  flex-direction: column;
  min-height: var(--app-height);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  gap: 0.95rem;
  padding: calc(0.9rem + var(--safe-top)) 1rem 0.95rem;
  background: rgba(14, 17, 22, 0.84);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px);
}

.header-main,
.header-actions,
.top-nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.header-main {
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-logo {
  width: 56px;
  height: 56px;
  padding: 3px;
  flex: 0 0 auto;
  object-fit: contain;
  overflow: visible;
}

.brand-copy {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.brand-title {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.15;
}

.header-meta,
.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.header-chip,
.status-pill,
.pill,
.panel-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0.38rem 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 600;
}

.header-chip-success,
.status-pill-success {
  background: rgba(44, 203, 114, 0.12);
  color: #8ef0b4;
  border-color: rgba(44, 203, 114, 0.24);
}

.status-pill-accent {
  background: rgba(76, 141, 255, 0.16);
  color: #bcd3ff;
  border-color: rgba(76, 141, 255, 0.28);
}

.top-nav {
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.page-content {
  flex: 1 0 auto;
  width: var(--content-width);
  margin: 0 auto;
  padding: 1.1rem 0 calc(6.6rem + var(--safe-bottom));
}

.site-footer {
  width: var(--content-width);
  margin: 0 auto;
  margin-top: auto;
  padding: 1.15rem 0 calc(6.2rem + var(--safe-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0.2rem 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.1rem;
}

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

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

.hero,
.section-block,
.page-intro,
.narrow,
.page-hero-card {
  margin-bottom: 1rem;
}

.hero {
  display: grid;
  gap: 1rem;
}

.hero-copy-block,
.hero-panel,
.card,
.page-hero-card,
.miniapp-status,
.miniapp-banner,
.flash,
.notice {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(21, 26, 34, 0.92), rgba(16, 21, 29, 0.95));
  box-shadow: var(--shadow-soft);
}

.hero-copy-block,
.hero-panel,
.card,
.page-hero-card {
  padding: 1rem;
}

.hero-copy-block {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(103, 214, 255, 0.12), transparent 26%),
    radial-gradient(circle at bottom left, rgba(76, 141, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(21, 26, 34, 0.98), rgba(16, 21, 29, 0.98));
}

.hero-copy-block::after {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(76, 141, 255, 0.2), transparent 68%);
  pointer-events: none;
}

.hero h1 {
  margin: 0.32rem 0 0.8rem;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(1.9rem, 4.9vw, 3.95rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.page-hero-card h1,
.page-intro h1,
.narrow h1,
.dashboard-hero-panel h1,
.section-heading h2 {
  margin: 0.32rem 0 0.8rem;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(1.62rem, 3.35vw, 2.72rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.section-heading h2 {
  font-size: clamp(1.38rem, 3.2vw, 2.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-copy,
.page-intro p,
.card p,
.helper-text,
.text-link,
.clean-list,
.step-list,
.project-links span,
.price-caption,
.pricing-note {
  color: var(--muted);
}

.hero-copy {
  max-width: 50rem;
  font-size: clamp(1.02rem, 2.7vw, 1.18rem);
  line-height: 1.72;
}

.eyebrow {
  margin: 0;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-hero-card,
.dashboard-hero-panel {
  min-height: 252px;
  align-content: start;
}

.admin-hero-card {
  min-height: 0;
}

.page-hero-card {
  display: grid;
  gap: 1rem;
  background:
    radial-gradient(circle at top right, rgba(76, 141, 255, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(103, 214, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(21, 26, 34, 0.98), rgba(16, 21, 29, 0.98));
}

.page-hero-card > p:not(.eyebrow),
.page-hero-card > .helper-text,
.page-hero-card .legal-copy,
.page-hero-card .support-lead,
.page-hero-card .auth-lead {
  max-width: 44rem;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.hero-inline-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.hero-inline-points span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  font-size: 0.86rem;
  font-weight: 500;
}

.button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.9rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  background: linear-gradient(180deg, var(--accent), #3a79ea);
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  box-shadow: 0 10px 24px rgba(76, 141, 255, 0.28);
}

.button:hover,
.button:focus-visible,
.link-button:hover,
.link-button:focus-visible {
  transform: translateY(-1px);
  background: linear-gradient(180deg, var(--accent-hover), #518fff);
}

.button-small {
  min-height: 40px;
  padding: 0.62rem 0.88rem;
  font-size: 0.9rem;
}

.button-secondary {
  background: linear-gradient(180deg, rgba(103, 214, 255, 0.22), rgba(76, 141, 255, 0.18));
  border-color: rgba(103, 214, 255, 0.2);
  box-shadow: none;
}

.button-ghost,
.link-button {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.button-muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  box-shadow: none;
  cursor: default;
}

.button-danger {
  background: linear-gradient(180deg, #ff7e7e, var(--error));
  box-shadow: 0 10px 24px rgba(255, 93, 93, 0.24);
}

.miniapp-status,
.flash,
.notice {
  width: min(100% - 1rem, 1180px);
  margin: 0 auto 1rem;
  padding: 0.9rem 1rem;
}

.miniapp-status,
.flash-info,
.notice {
  background: linear-gradient(180deg, rgba(76, 141, 255, 0.13), rgba(76, 141, 255, 0.08));
}

.flash-success {
  background: linear-gradient(180deg, rgba(44, 203, 114, 0.16), rgba(44, 203, 114, 0.08));
}

.flash-error {
  background: linear-gradient(180deg, rgba(255, 93, 93, 0.18), rgba(255, 93, 93, 0.08));
}

.prelaunch-notice {
  margin-top: 1rem;
}

.project-card {
  display: grid;
  gap: 1rem;
}

.project-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.project-badge-grid,
.section-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.admin-stats-grid,
.admin-actions-grid {
  grid-template-columns: 1fr;
}

.admin-stat-card {
  display: grid;
  gap: 0.45rem;
  min-height: 0;
}

.admin-stat-card span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-stat-card strong {
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.admin-stat-card p,
.admin-action-card p {
  margin: 0;
}

.project-badge {
  display: grid;
  gap: 0.35rem;
  min-height: 116px;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.project-badge strong,
.feature-card h3,
.faq-card h3,
.pricing-card h2,
.card h2,
.card h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.2;
}

.project-badge span {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.project-links {
  display: grid;
  gap: 0.75rem;
}

.project-links div {
  display: grid;
  gap: 0.35rem;
}

.section-heading {
  margin-bottom: 1rem;
}

.section-grid-4 {
  grid-template-columns: 1fr;
}

.feature-card,
.faq-card,
.pricing-card,
.status-card {
  display: grid;
  gap: 0.85rem;
}

.feature-card {
  background:
    linear-gradient(180deg, rgba(21, 26, 34, 0.95), rgba(17, 23, 30, 0.98));
}

.feature-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(103, 214, 255, 0.08);
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 700;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.price {
  margin: 0;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: clamp(2rem, 6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.price-caption {
  margin: 0.35rem 0 0;
  font-size: 0.94rem;
}

.stack-form,
.stack-field,
.search-form {
  display: grid;
  gap: 0.8rem;
}

.auth-card {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
}

.auth-card-strong {
  background:
    radial-gradient(circle at top right, rgba(76, 141, 255, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(21, 26, 34, 0.98), rgba(16, 21, 29, 0.98));
}

.auth-card h1 {
  margin: 0.2rem 0 0.55rem;
  font-size: clamp(1.95rem, 5.6vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.auth-lead {
  margin: -0.15rem 0 0;
  line-height: 1.6;
}

.auth-provider-list {
  display: grid;
  gap: 0.75rem;
}

.auth-provider-grid {
  grid-template-columns: 1fr;
}

.auth-provider-list-compact {
  grid-template-columns: 1fr;
}

.auth-provider-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
  width: 100%;
}

.auth-form {
  gap: 0.95rem;
  max-width: 34rem;
}

.auth-provider-list,
.auth-lead,
.auth-footnote {
  max-width: 34rem;
}

.provider-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(17, 23, 34, 0.08);
  font-weight: 800;
}

.provider-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  object-fit: contain;
}

.auth-divider {
  position: relative;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0 0.75rem;
  background: linear-gradient(180deg, rgba(21, 26, 34, 0.92), rgba(16, 21, 29, 0.95));
}

.legal-checks {
  display: grid;
  gap: 0.75rem;
}

.legal-checkbox {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.legal-checkbox input {
  width: 20px;
  min-height: 20px;
  height: 20px;
  margin: 0.1rem 0 0;
  accent-color: var(--accent);
}

.legal-checkbox span {
  color: var(--muted-strong);
  line-height: 1.5;
}

.auth-footnote {
  margin-top: -0.1rem;
}

.dashboard-hero-panel,
.dashboard-card {
  display: grid;
  gap: 1.1rem;
}

.dashboard-hero-panel {
  margin-bottom: 1.25rem;
  padding: 1.35rem;
  background:
    radial-gradient(circle at top right, rgba(76, 141, 255, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(103, 214, 255, 0.09), transparent 34%),
    linear-gradient(180deg, rgba(21, 26, 34, 0.98), rgba(16, 21, 29, 0.98));
}

.dashboard-lead {
  max-width: 42rem;
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.dashboard-summary-card,
.dashboard-stat-card,
.security-item {
  display: grid;
  gap: 0.34rem;
  min-width: 0;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.dashboard-summary-card span,
.dashboard-stat-card span,
.security-item span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
}

.dashboard-summary-card strong,
.dashboard-stat-card strong,
.security-item strong {
  min-width: 0;
  max-width: 100%;
  font-size: 1.04rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dashboard-summary-card small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.dashboard-card {
  padding: 1.3rem;
  align-content: start;
}

.dashboard-card-accent {
  background:
    linear-gradient(180deg, rgba(21, 26, 34, 0.95), rgba(16, 21, 29, 0.98));
}

.dashboard-primary-grid,
.dashboard-secondary-section {
  margin-bottom: 1.25rem;
}

.dashboard-primary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.dashboard-hero-copy,
.dashboard-primary-grid > *,
.dashboard-summary-grid > * {
  min-width: 0;
}

.dashboard-primary-grid > .dashboard-card {
  height: 100%;
}

.dashboard-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.dashboard-card-head > div {
  min-width: 0;
}

.dashboard-card-head p {
  margin: 0.35rem 0 0;
}

.dashboard-facts {
  display: grid;
  gap: 0.9rem;
  margin: 0;
}

.dashboard-facts div {
  display: grid;
  gap: 0.32rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.dashboard-facts dt {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.dashboard-facts dd {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dashboard-actions .button {
  min-width: min(100%, 220px);
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.72rem;
}

.dashboard-empty {
  display: grid;
  gap: 0.75rem;
  padding: 1.15rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.dashboard-empty-large {
  min-height: 100%;
  align-content: center;
}

.dashboard-empty p {
  margin: 0;
}

.security-list {
  display: grid;
  gap: 0.9rem;
}

.security-list-inline {
  grid-template-columns: 1fr;
}

.dashboard-note {
  margin: 0;
  max-width: 40rem;
}

.dashboard-break-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.dashboard-form-grid {
  max-width: 44rem;
}

.dashboard-card-wide {
  width: 100%;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: calc(5.7rem + var(--safe-bottom));
  z-index: 90;
  display: grid;
  gap: 0.75rem;
  width: min(calc(100vw - 1rem), 360px);
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(21, 26, 34, 0.96), rgba(16, 21, 29, 0.98));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  pointer-events: auto;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.is-hiding {
  opacity: 0;
  transform: translateY(8px);
}

.toast-info {
  border-color: rgba(76, 141, 255, 0.22);
  background: linear-gradient(180deg, rgba(76, 141, 255, 0.18), rgba(21, 26, 34, 0.98));
}

.toast-success {
  border-color: rgba(44, 203, 114, 0.24);
  background: linear-gradient(180deg, rgba(44, 203, 114, 0.18), rgba(21, 26, 34, 0.98));
}

.toast-error {
  border-color: rgba(255, 93, 93, 0.24);
  background: linear-gradient(180deg, rgba(255, 93, 93, 0.18), rgba(21, 26, 34, 0.98));
}

.toast-body {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.toast-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font: inherit;
  font-size: 1.1rem;
  cursor: pointer;
}

.support-shell {
  margin-top: 0.2rem;
}

.support-card {
  display: grid;
  gap: 1.25rem;
}

.support-lead {
  margin: 0;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.65;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.support-item {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
}

.support-item span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.support-item strong {
  font-size: 1.04rem;
  line-height: 1.45;
}

.legal-card {
  gap: 1rem;
}

.legal-copy {
  display: grid;
  gap: 0.9rem;
}

.legal-copy h2 {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
}

.legal-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

label span {
  display: block;
  margin-bottom: 0.38rem;
  color: var(--muted-strong);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: 0.88rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-field);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font: inherit;
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(103, 214, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(76, 141, 255, 0.12);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.inline-form {
  display: inline-flex;
  align-items: center;
}

.data-list {
  display: grid;
  gap: 0.8rem;
}

.data-list div {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.data-list dt {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.data-list dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

.text-link {
  color: #bcd3ff;
}

.clean-list,
.step-list {
  margin: 0;
  padding-left: 1.1rem;
}

.clean-list li,
.step-list li {
  margin-bottom: 0.65rem;
  line-height: 1.6;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.82rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-input {
  width: 96px;
  min-height: 40px;
  padding: 0.6rem 0.7rem;
}

.qr-preview {
  display: block;
  width: min(240px, 100%);
  aspect-ratio: 1;
  object-fit: contain;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: #f4f7fb;
}

.compact {
  margin-bottom: 0.8rem;
}

.narrow,
.wide-on-mobile {
  width: 100%;
}

.status-card-success {
  box-shadow: 0 20px 48px rgba(44, 203, 114, 0.12);
}

.status-card-error {
  box-shadow: 0 20px 48px rgba(255, 93, 93, 0.1);
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.65rem 0.75rem calc(0.7rem + var(--safe-bottom));
  background: rgba(10, 13, 18, 0.94);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.bottom-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.7rem 0.4rem;
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.bottom-nav a.is-active {
  background: rgba(76, 141, 255, 0.14);
  color: var(--text);
}

.is-telegram-webapp {
  background: var(--tg-bg, linear-gradient(180deg, #0e1116 0%, #111722 100%));
  color: var(--tg-text, var(--text));
}

.is-telegram-webapp .button {
  background: var(--tg-button, linear-gradient(180deg, var(--accent), #3a79ea));
}

.platform-ios .site-header {
  padding-top: calc(1rem + var(--safe-top));
}

.platform-ios .bottom-nav,
.platform-android .bottom-nav {
  padding-bottom: calc(0.8rem + var(--safe-bottom));
}

@media (max-width: 820px) {
  .header-main {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    gap: 0.72rem;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
    padding: 2px;
  }

  .brand-title {
    font-size: 1.08rem;
  }

  .brand-subtitle {
    font-size: 0.84rem;
  }

  .header-meta,
  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-actions .button,
  .button-row .button,
  .dashboard-actions .button,
  .stack-form .button,
  .stack-field .button,
  .search-form .button {
    width: 100%;
    min-width: 0;
  }

  .dashboard-hero-panel {
    padding: 1.15rem;
  }

  .page-hero-card {
    min-height: 0;
    padding: 1.1rem;
  }

  .dashboard-card {
    padding: 1.05rem;
  }

  .dashboard-summary-card,
  .dashboard-stat-card,
  .security-item {
    padding: 0.95rem;
  }

  .toast-stack {
    right: 0.75rem;
    left: 0.75rem;
    bottom: calc(5.9rem + var(--safe-bottom));
    width: auto;
  }

  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .table td {
    display: grid;
    grid-template-columns: minmax(96px, 112px) 1fr;
    gap: 0.75rem;
    border-bottom: 0;
    padding: 0.45rem 0;
  }

  .table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
}

@media (min-width: 821px) {
  .site-header {
    grid-template-columns: minmax(320px, 1.4fr) 1fr auto;
    align-items: center;
  }

  .top-nav {
    justify-content: center;
  }

  .page-content {
    padding-top: 1.35rem;
    padding-bottom: 2.75rem;
  }

  .hero {
    grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.95fr);
    align-items: stretch;
  }

  .auth-provider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero-panel {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.95fr);
    align-items: stretch;
  }

  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
  }

  .dashboard-summary-card-wide {
    grid-column: 1 / -1;
  }

  .dashboard-primary-grid {
    grid-template-columns: minmax(320px, 0.92fr) minmax(0, 1.08fr);
    align-items: start;
    grid-auto-rows: 1fr;
  }

  .dashboard-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .security-list-inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-grid-2,
  .dashboard-grid,
  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-list div {
    grid-template-columns: minmax(130px, 170px) 1fr;
    align-items: center;
  }

  .bottom-nav {
    display: none;
  }

  .site-footer {
    padding-bottom: 2rem;
  }

  .toast-stack {
    bottom: 1.25rem;
  }
}

@media (min-width: 1080px) {
  .section-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .section-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
