:root {
  --bg: #f4f1ea;
  --bg-accent: #e6dccb;
  --surface: rgba(255, 252, 247, 0.84);
  --surface-strong: #fffdf9;
  --text: #1e1b16;
  --muted: #6b6258;
  --line: rgba(30, 27, 22, 0.08);
  --primary: #0c7c59;
  --primary-dark: #085941;
  --shadow: 0 24px 80px rgba(54, 44, 26, 0.12);
  --radius: 24px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.7), transparent 32%),
    radial-gradient(circle at bottom right, rgba(12,124,89,0.12), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, #efe8dc 100%);
  min-height: 100vh;
}

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

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

.brand {
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.2rem;
  max-width: 18ch;
}

.topnav {
  display: flex;
  gap: 18px;
}

.topnav a,
.inline-link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.topnav a:hover,
.inline-link:hover { border-color: currentColor; }

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 32px;
}

.hero-copy h1,
.card h1,
.card h2 {
  margin: 0 0 12px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-copy h1 { font-size: clamp(2.4rem, 5vw, 4.8rem); }
.card h1 { font-size: clamp(2rem, 4vw, 3rem); }
.card h2 { font-size: 1.5rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(12,124,89,0.08);
  color: var(--primary-dark);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.muted,
.hero-copy p,
.footnote {
  color: var(--muted);
  line-height: 1.65;
}

.hero-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.hero-list li::before {
  content: "•";
  color: var(--primary);
  margin-right: 10px;
}

.stack {
  display: grid;
  gap: 12px;
}

label { font-weight: 700; }
input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font: inherit;
}

select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  font: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: rgba(30,27,22,0.06);
  color: var(--text);
}

.dual-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.login-card-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.login-card-button {
  min-width: 220px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(30, 27, 22, 0.06);
}

.auth-tab {
  appearance: none;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font: inherit;
  font-weight: 800;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.auth-tab.is-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 10px 24px rgba(20, 18, 14, 0.08);
}

.auth-stack {
  display: grid;
  gap: 18px;
}

.auth-panel {
  display: block;
}

.auth-section {
  display: grid;
  gap: 12px;
}

.auth-section h2 {
  margin-bottom: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.forgot-password-form {
  margin-top: 6px;
}

.text-link-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

.forgot-password-note {
  margin-top: -4px;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.flash {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
}

.flash-success { background: rgba(12,124,89,0.1); color: var(--primary-dark); }
.flash-error { background: rgba(187, 60, 27, 0.1); color: #8a2d12; }

.dashboard-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.profile-list {
  display: grid;
  gap: 12px;
}

.profile-item {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
  transition: opacity 220ms ease, transform 220ms ease, filter 220ms ease;
}

.profile-item-removing {
  opacity: 0.42;
  filter: grayscale(0.1);
}

.status {
  display: inline-flex;
  margin-left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.status-active { background: rgba(12,124,89,0.1); color: var(--primary-dark); }
.status-pending { background: rgba(213,153,31,0.14); color: #7b5a0e; }
.status-blocked { background: rgba(187,60,27,0.1); color: #8a2d12; }
.status-deleted,
.status-revoked,
.status-canceled {
  background: rgba(30,27,22,0.08);
  color: var(--muted);
}
.status-failed {
  background: rgba(187,60,27,0.1);
  color: #8a2d12;
}
.status-succeeded {
  background: rgba(12,124,89,0.1);
  color: var(--primary-dark);
}

.narrow {
  width: min(720px, 100%);
  margin: 0 auto;
}

.plan-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
}

@media (max-width: 860px) {
  .hero,
  .grid-two,
  .dashboard-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .dashboard-head {
    align-items: start;
  }

  .topbar {
    flex-direction: column;
    align-items: start;
    gap: 12px;
  }
}

.profile-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.profile-secondary-action {
  margin-top: 2px;
}

.inline-link-strong {
  font-weight: 800;
}

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

.profile-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.profile-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-name-block {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.profile-name-value {
  font-weight: 800;
}

.expiry-date-button {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  border-bottom: 1px dashed rgba(30, 27, 22, 0.24);
}

.expiry-date-button:hover {
  border-bottom-color: rgba(30, 27, 22, 0.5);
}

.rename-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.8);
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
}

.icon-button:hover {
  background: rgba(187,60,27,0.08);
}

.icon-button-quiet:hover {
  background: rgba(12,124,89,0.08);
}

.tg-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.tg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #229ed9;
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
}

.manual-card {
  margin-top: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(12,124,89,0.06);
  border: 1px solid rgba(12,124,89,0.16);
  display: grid;
  gap: 14px;
}

.manual-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.dashboard-legal {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.95rem;
}

.dashboard-legal a {
  color: var(--primary-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(12,124,89,0.25);
}

.dashboard-support {
  margin-top: 22px;
  text-align: center;
}

.account-card {
  margin-top: 24px;
}

.verification-card {
  margin-bottom: 24px;
  display: grid;
  gap: 14px;
}

.password-form {
  width: min(520px, 100%);
}

.feedback-form {
  width: min(680px, 100%);
}

.feedback-form textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
}

.dashboard-support a,
.support-email-link {
  color: var(--primary-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(12,124,89,0.25);
}

.legal-page {
  display: grid;
  gap: 12px;
  line-height: 1.7;
}

.legal-page h2 {
  margin: 18px 0 0;
}

.legal-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.admin-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
}

.admin-stats {
  margin-bottom: 24px;
}

.manual-fields {
  display: grid;
  gap: 10px;
}

.manual-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
}

.manual-label {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 4px;
}

.instruction-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.instruction-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.78);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  text-align: center;
}

.instruction-button {
  font: inherit;
  cursor: pointer;
}

.instruction-link:hover {
  border-color: rgba(12,124,89,0.3);
  background: rgba(12,124,89,0.08);
}

.instruction-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.profile-item-deleting {
  opacity: 0.55;
  transform: scale(0.995);
  transition: opacity 180ms ease, transform 180ms ease;
}

.manual-value {
  font-weight: 800;
  word-break: break-all;
}

.copy-button {
  border: 1px solid rgba(12,124,89,0.22);
  background: rgba(12,124,89,0.08);
  color: var(--primary-dark);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-width: 108px;
}

.copy-button:hover,
.copy-button-done {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}


.billing-form {
  gap: 16px;
}

.billing-topbar {
  margin-bottom: 10px;
}

.qty-card,
.names-card {
  padding: 22px 24px;
  border-radius: 22px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  display: grid;
  gap: 18px;
}

.qty-labels,
.names-head {
  display: grid;
  gap: 6px;
}

.billing-consents {
  display: grid;
  gap: 12px;
}

.qty-controls {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  gap: 12px;
  align-items: center;
}

.qty-button {
  height: 56px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(12,124,89,0.08);
  color: var(--primary-dark);
  font: inherit;
  font-size: 1.8rem;
  cursor: pointer;
}

.qty-button:hover {
  background: rgba(12,124,89,0.14);
}

.qty-input {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 800;
}

.profile-names-list {
  display: grid;
  gap: 12px;
}

.name-field {
  display: grid;
  gap: 8px;
}

.pay-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pay-button {
  min-height: 60px;
  text-align: center;
  flex-direction: column;
  gap: 4px;
}

.pay-button-note {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0.9;
}

.plan-card {
  display: block;
  cursor: pointer;
}

.plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-card-ui {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border-radius: 22px;
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  transition: 160ms ease;
}

.plan-main {
  display: grid;
  gap: 6px;
}

.plan-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.plan-subtitle {
  color: var(--muted);
  line-height: 1.5;
  font-weight: 500;
}

.plan-price {
  font-size: 1.5rem;
  font-weight: 800;
  white-space: nowrap;
}

.plan-card:hover .plan-card-ui {
  border-color: rgba(12,124,89,0.28);
  transform: translateY(-1px);
}

.plan-card input:checked + .plan-card-ui {
  background: rgba(12,124,89,0.12);
  border-color: rgba(12,124,89,0.42);
  box-shadow: inset 0 0 0 1px rgba(12,124,89,0.14);
}

@media (max-width: 720px) {
  .plan-card-ui {
    align-items: start;
    flex-direction: column;
  }

  .plan-price {
    font-size: 1.35rem;
  }

  .rename-form,
  .pay-actions {
    grid-template-columns: 1fr;
  }
}


.consent-row {
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--line);
  font-weight: 500;
  color: var(--muted);
}

.consent-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.legal-copy {
  margin-bottom: 8px;
}

.legal-copy a,
.consent-row a {
  color: var(--primary-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(12,124,89,0.25);
}

@media (max-width: 640px) {
  .manual-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .copy-button {
    width: 100%;
  }

  .qty-controls {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
  }

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

.legal-copy a:hover,
.consent-row a:hover {
  border-color: currentColor;
}
