:root {
  --bg: #f3f6fb;
  --bg-soft: #f6f8fc;
  --surface: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --line: #e4e9f2;
  --orange: #ff5a00;
  --orange-dark: #eb5200;
  --blue: #2563eb;
  --green: #079455;
  --danger: #b42318;
  --shadow: 0 18px 42px rgba(16, 24, 40, 0.07);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 54%, var(--bg-soft) 100%);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

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

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

button,
input {
  font: inherit;
}

main {
  min-height: calc(100vh - 164px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  padding: 0 max(32px, calc((100vw - 1160px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 18px;
  font-weight: 900;
}

.brand-mark {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--orange);
  box-shadow: 0 8px 20px rgba(255, 90, 0, 0.16);
  flex: 0 0 44px;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-name {
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.nav-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav a,
.ghost-button {
  transition: color 0.16s ease;
}

.nav a:hover,
.nav-active,
.ghost-button:hover {
  color: var(--orange);
}

.nav-active {
  position: relative;
}

.nav-active::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -29px;
  height: 3px;
  background: var(--orange);
  border-radius: 99px;
  content: "";
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.ghost-button,
.icon-link {
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.ghost-button.nav-item {
  padding: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #475467;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  font-weight: 800;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  gap: 54px;
  width: min(1160px, calc(100% - 48px));
  min-height: 580px;
  margin: 0 auto;
  padding: 62px 0 46px;
  align-items: center;
}

.hero-copy,
.auth-copy {
  max-width: 560px;
}

.hero-copy h1,
.auth-copy h1,
.about-hero h1,
.page-heading h1,
.pending-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 50px;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-text,
.auth-copy p,
.about-hero p,
.public-section p,
.about-grid p,
.pending-card p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.eyebrow.blue {
  color: var(--blue);
}

.hero-actions,
.pending-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.hero-logout {
  display: inline-flex;
}

.primary-button,
.secondary-button,
.text-button,
.blue-button,
.orange-button,
.wide-outline,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 900;
}

.button-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.primary-button,
.orange-button {
  color: white;
  background: linear-gradient(180deg, #ff6b00, var(--orange));
  box-shadow: 0 8px 18px rgba(255, 90, 0, 0.18);
}

.primary-button:hover,
.orange-button:hover {
  background: var(--orange-dark);
}

.secondary-button,
.wide-outline {
  color: #344054;
  background: #fff;
  border-color: #d7dfeb;
}

.text-button {
  min-height: 42px;
  padding: 0 8px;
  color: var(--orange);
  background: transparent;
}

.blue-button {
  width: 100%;
  color: white;
  background: var(--blue);
}

.hero-panel,
.subscription-card,
.auth-card,
.plan-card,
.history-card,
.pending-card,
.admin-card,
.public-grid article,
.about-grid article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  min-height: 292px;
  padding: 34px;
  overflow: hidden;
}

.panel-orbit,
.subscription-card::after {
  position: absolute;
  width: 300px;
  height: 300px;
  right: -82px;
  bottom: -106px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 90, 0, 0.14) 0 18%, transparent 19%),
    repeating-radial-gradient(circle, rgba(255, 90, 0, 0.14) 0 1px, transparent 1px 46px);
  content: "";
}

.status-preview {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 900;
}

.status-badge-icon,
.card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  background: #fff1e8;
  border-radius: 12px;
}

.status-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 90, 0, 0.12);
}

.status-badge-icon svg,
.card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--orange);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.status-badge-icon svg {
  width: 17px;
  height: 17px;
}

.status-dot {
  width: 11px;
  height: 11px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(255, 90, 0, 0.12);
}

.hero-panel h2 {
  position: relative;
  z-index: 1;
  max-width: 300px;
  margin: 56px 0 14px;
  font-size: 32px;
  line-height: 1.16;
}

.hero-panel p {
  position: relative;
  z-index: 1;
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.public-section,
.about-page,
.dashboard,
.admin-page {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}

.public-section {
  padding: 24px 0 64px;
}

.public-section h2,
.about-hero h1 {
  max-width: 640px;
}

.public-section h2 {
  margin: 0 0 24px;
  font-size: 34px;
  line-height: 1.18;
}

.public-grid,
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.public-grid article,
.about-grid article {
  padding: 24px;
}

.public-grid h3,
.about-grid h2 {
  margin: 12px 0 10px;
  font-size: 19px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 70px;
  width: min(940px, calc(100% - 48px));
  min-height: 560px;
  margin: 0 auto;
  padding: 64px 0 54px;
  align-items: center;
}

.auth-copy h1 {
  font-size: 46px;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  color: var(--muted);
}

.security-note strong,
.security-note span {
  display: block;
}

.auth-copy code {
  color: var(--ink);
  font-family: inherit;
  font-weight: 900;
}

.telegram-steps {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.telegram-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.telegram-step strong,
.telegram-step span {
  display: block;
}

.telegram-step strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 15px;
}

.step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: white;
  background: linear-gradient(180deg, #ff7a1a, var(--orange));
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(255, 90, 0, 0.16);
}

.telegram-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.telegram-card-text {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.telegram-status {
  margin-top: 14px;
  padding: 12px 14px;
  color: #475467;
  background: #f6f8fc;
  border: 1px solid #dbe6f4;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.telegram-status.is-confirmed {
  color: #067647;
  background: #ecfdf3;
  border-color: #abefc6;
}

.telegram-status.is-expired,
.telegram-status.is-error {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.telegram-manual-form {
  margin: 0;
}

.telegram-hint {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 14px 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #dbe6f4;
  border-radius: 8px;
}

.telegram-hint strong,
.telegram-hint span {
  display: block;
}

.telegram-hint strong {
  color: var(--ink);
  font-size: 14px;
}

.round-icon,
.large-icon,
.calendar-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--orange);
  background: #fff1e8;
}

.round-icon svg,
.large-icon svg,
.calendar-icon svg {
  width: 60%;
  height: 60%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.round-icon {
  width: 42px;
  height: 42px;
  color: var(--blue);
  background: #eaf1ff;
  border-radius: 50%;
}

.auth-card {
  padding: 28px;
}

.auth-card h2 {
  margin: 0 0 22px;
}

.auth-card label {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  color: #475467;
  font-size: 14px;
  font-weight: 800;
}

.field-help {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-card input,
.copy-row input,
.admin-copy input,
.mini-form input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  border: 1px solid #d9e1ec;
  border-radius: 6px;
}

.input-shell {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background: white;
  border: 1px solid #d9e1ec;
  border-radius: 6px;
}

.input-shell svg {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  color: #98a2b3;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.input-shell input {
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.input-shell input:focus {
  outline: 0;
}

.input-shell:focus-within {
  outline: 2px solid rgba(255, 90, 0, 0.14);
  border-color: var(--orange);
}

.auth-card label > input:focus,
.copy-row input:focus,
.admin-copy input:focus {
  outline: 2px solid rgba(255, 90, 0, 0.14);
  border-color: var(--orange);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 20px;
  color: #667085;
  font-size: 14px;
}

.checkbox {
  display: flex !important;
  align-items: center;
  margin: 0 !important;
}

.checkbox input {
  width: 16px;
  height: 16px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: #98a2b3;
  font-weight: 800;
}

.divider::before,
.divider::after {
  flex: 1;
  height: 1px;
  background: var(--line);
  content: "";
}

.form-error,
.notice.danger {
  padding: 12px 14px;
  margin-bottom: 16px;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 7px;
}

.about-page {
  padding: 60px 0 70px;
}

.about-hero {
  max-width: 760px;
  margin-bottom: 30px;
}

.about-hero p {
  max-width: 620px;
  margin-bottom: 26px;
}

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

.dashboard,
.admin-page {
  padding: 38px 0 62px;
}

.page-heading {
  margin-bottom: 28px;
}

.page-heading p,
.page-heading span {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-weight: 800;
}

.page-heading h1 {
  margin-bottom: 10px;
  font-size: 38px;
}

.subscription-card {
  position: relative;
  min-height: 168px;
  padding: 24px;
  overflow: hidden;
}

.subscription-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 640px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.large-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  font-size: 30px;
}

.subscription-main p,
.muted,
.plan-card p {
  margin: 0;
  color: var(--muted);
}

.subscription-main h2 {
  margin: 7px 0;
  font-size: 27px;
}

.subscription-muted {
  position: relative;
  z-index: 1;
  margin-top: 16px;
}

.subscription-link {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-top: 18px;
}

.subscription-link label {
  display: block;
  margin-bottom: 8px;
  color: #667085;
  font-weight: 900;
}

.copy-row,
.admin-copy {
  display: flex;
  gap: 10px;
}

.small-button,
.admin-copy button {
  color: white;
  background: var(--ink);
  border: 0;
}

.section-title {
  margin: 26px 0 16px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.plan-card {
  padding: 22px 20px 18px;
}

.plan-card h3 {
  margin: 0 0 16px;
  font-size: 17px;
}

.calendar-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 8px;
  font-size: 18px;
}

.plan-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 28px;
  line-height: 1;
}

.plan-card form {
  margin-top: 16px;
}

.orange-button {
  width: 100%;
}

.history-card,
.admin-card {
  margin-top: 20px;
  padding: 22px;
}

.history-card h2,
.admin-card h2 {
  margin: 0 0 18px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title svg {
  width: 28px;
  height: 28px;
  color: var(--orange);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.card-title.large {
  gap: 12px;
}

.card-title.large svg {
  width: 34px;
  height: 34px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  color: #7b8495;
  text-align: left;
  font-size: 12px;
}

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.status-pill {
  display: inline-flex;
  padding: 4px 10px;
  color: #9a3412;
  background: #ffedd5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill.paid,
.status-pill.active {
  color: #047857;
  background: #d1fae5;
}

.status-pill.not_active,
.status-pill.pending {
  color: #9a3412;
  background: #ffedd5;
}

.status-pill.expired,
.status-pill.manual_review,
.status-pill.activation_failed {
  color: var(--danger);
  background: #fee4e2;
}

.row-link {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.row-link:hover {
  background: #fff1e8;
}

.row-link svg {
  width: 16px;
  height: 16px;
  color: var(--orange);
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.pending-layout {
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: 56px 24px;
}

.pending-card {
  width: min(620px, 100%);
  padding: 34px;
}

.pending-card dl {
  display: grid;
  gap: 12px;
  margin: 28px 0;
}

.pending-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.pending-card dt {
  color: var(--muted);
}

.pending-card dd {
  margin: 0;
  font-weight: 900;
}

.mock-box {
  margin-top: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

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

.mini-form {
  display: flex;
  gap: 8px;
}

.mini-form input {
  width: 82px;
}

.mini-form button,
.admin-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  color: white;
  background: var(--ink);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 800;
}

.admin-copy input {
  width: min(340px, 42vw);
  height: 36px;
  font-size: 12px;
}

.admin-copy button {
  min-height: 36px;
}

.footer {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 82px;
  color: #8a94a6;
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 14px;
}

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

@media (max-width: 980px) {
  .hero,
  .auth-layout,
  .plans-grid,
  .public-grid,
  .about-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 46px 0;
  }

  .auth-layout {
    min-height: auto;
    gap: 34px;
    padding: 46px 0;
  }

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

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

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 18px 22px;
  }

  .nav {
    flex-wrap: wrap;
    gap: 14px;
  }

  .nav-active::after {
    display: none;
  }

  .hero-copy h1,
  .auth-copy h1,
  .about-hero h1 {
    font-size: 40px;
  }

  .page-heading h1,
  .pending-card h1 {
    font-size: 32px;
  }

  .plans-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .copy-row,
  .admin-copy,
  .subscription-main,
  .pending-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-copy input {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero,
  .auth-layout,
  .public-section,
  .about-page,
  .dashboard,
  .admin-page {
    width: min(100% - 32px, 1160px);
  }

  .brand-name {
    white-space: normal;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-logout,
  .primary-button,
  .secondary-button,
  .text-button {
    width: 100%;
  }
}
