:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --text: #16201b;
  --muted: #5d6b63;
  --line: #d7ded8;
  --accent: #007c6c;
  --accent-strong: #005d51;
  --panel: #ffffff;
  --warm: #f3c969;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--accent-strong);
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 36px;
  align-items: center;
  min-height: 70vh;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 18px;
  font-size: 26px;
  letter-spacing: 0;
}

h3 {
  margin: 16px 0 8px;
}

.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 18px 60px rgb(22 32 27 / 8%);
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--text);
  font: inherit;
}

.plans {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.plan {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 4px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
}

.plan.selected {
  border-color: var(--accent);
  background: #eefaf7;
}

.plan input {
  width: 18px;
  min-height: 18px;
}

.plan small {
  grid-column: 2 / 4;
  color: var(--muted);
}

button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.result {
  min-height: 24px;
  color: var(--muted);
  line-height: 1.5;
}

.notice {
  margin: 18px 0;
  border-left: 4px solid var(--warm);
  background: #fff8e6;
  border-radius: 6px;
  padding: 12px 14px;
  color: #5c4b19;
  line-height: 1.45;
}

.success-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.subscription-link {
  display: block;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf8;
  padding: 12px;
  overflow-wrap: anywhere;
}

.qr-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
  padding: 16px;
  text-align: center;
}

.qr-card img {
  width: min(260px, 100%);
  aspect-ratio: 1;
  border-radius: 6px;
  background: white;
}

.secondary-button {
  background: var(--text);
}

.secondary-button:hover {
  background: #2d3832;
}

.steps {
  padding: 36px 0 16px;
}

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

.step-grid article {
  border-top: 3px solid var(--warm);
  padding-top: 18px;
}

.step-grid span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--text);
  color: white;
  font-weight: 800;
}

.step-grid p {
  color: var(--muted);
  line-height: 1.5;
}

.pay-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.pay-panel {
  width: min(520px, 100%);
}

.pay-panel h1 {
  font-size: 42px;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.admin-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.admin-header h1 {
  font-size: 52px;
}

.admin-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
}

.admin-login button,
.small-button {
  min-height: 44px;
}

.hidden {
  display: none;
}

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

.stat-card,
.vpn-status-card,
.admin-table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 12px 40px rgb(22 32 27 / 6%);
}

.stat-card {
  display: grid;
  gap: 8px;
}

.vpn-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

.vpn-status-card h2 {
  margin-bottom: 4px;
}

.status-ok {
  color: #08613d;
}

.status-error {
  color: #a12828;
}

.stat-card span,
.muted,
td small {
  color: var(--muted);
}

.stat-card strong {
  font-size: 30px;
}

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

.table-title h2 {
  margin: 0;
}

.small-button {
  width: auto;
  padding: 0 14px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 850px;
}

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

th {
  color: var(--muted);
  font-size: 13px;
}

td {
  line-height: 1.45;
}

td strong,
td small,
td a {
  display: block;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.badge.good {
  background: #e5f7ef;
  color: #08613d;
}

.badge.wait {
  background: #fff4d6;
  color: #805500;
}

@media (max-width: 840px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

  .admin-header,
  .vpn-status-card,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-login {
    grid-template-columns: 1fr;
  }
}
