:root {
  --bg: #f4f1e8;
  --surface: rgba(255, 251, 240, 0.9);
  --surface-strong: #fffaf0;
  --ink: #1e1c17;
  --muted: #6a6255;
  --line: rgba(30, 28, 23, 0.14);
  --accent: #ad2f19;
  --accent-soft: #f0c5a1;
  --accent-dark: #6a1d11;
  --ok: #126b48;
  --warn: #b45309;
  --shadow: 0 24px 70px rgba(73, 48, 17, 0.14);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 183, 94, 0.35), transparent 28%),
    radial-gradient(circle at bottom right, rgba(141, 60, 34, 0.18), transparent 22%),
    linear-gradient(135deg, #f7f0de 0%, #f2ebe1 52%, #efe4d2 100%);
}

code {
  font-family: "Consolas", "Courier New", monospace;
  background: rgba(30, 28, 23, 0.08);
  padding: 2px 6px;
  border-radius: 6px;
}

.landing-page,
.portal-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.landing-shell {
  width: min(860px, 100%);
}

.hero-card,
.portal-card {
  background: var(--surface);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 48px;
}

.portal-card {
  width: min(980px, 100%);
  padding: 36px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-card p,
.subtitle {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 720px;
}

.hero-actions,
.action-row,
.payment-box-header,
.card-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.hero-actions {
  margin-top: 26px;
  flex-wrap: wrap;
}

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

.primary-button,
.ghost-button,
.tab-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  font: inherit;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--accent) 0%, #de7e39 100%);
  color: #fff8f0;
  text-decoration: none;
  box-shadow: 0 16px 30px rgba(173, 47, 25, 0.24);
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
}

.small-button {
  min-height: 40px;
}

.wide {
  width: 100%;
}

.primary-button:hover,
.ghost-button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.card-header {
  align-items: flex-start;
  margin-bottom: 28px;
}

.back-link {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 600;
}

.flash {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  line-height: 1.5;
}

.flash.info {
  background: rgba(18, 107, 72, 0.1);
  color: var(--ok);
}

.flash.error {
  background: rgba(173, 47, 25, 0.12);
  color: var(--accent-dark);
}

.tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(30, 28, 23, 0.08);
}

.tab-button {
  padding: 12px 18px;
  background: transparent;
  color: var(--muted);
}

.tab-button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 20px rgba(30, 28, 23, 0.08);
}

.stack {
  display: flex;
  flex-direction: column;
}

.gap-14 {
  gap: 14px;
}

.gap-20 {
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-size: 14px;
  font-weight: 600;
}

.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(30, 28, 23, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
}

.field input:focus {
  outline: 2px solid rgba(173, 47, 25, 0.22);
  border-color: rgba(173, 47, 25, 0.36);
}

.hidden {
  display: none !important;
}

.account-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
}

.account-card,
.payment-card,
.payment-box {
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  border: 1px solid rgba(30, 28, 23, 0.08);
  padding: 22px;
}

.muted,
.support-text {
  color: var(--muted);
  line-height: 1.6;
}

.badge-row {
  margin: 18px 0 14px;
}

.plan-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(173, 47, 25, 0.1);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

.plan-option {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 244, 230, 0.9), rgba(255, 250, 240, 1));
  border: 1px solid rgba(173, 47, 25, 0.12);
}

.plan-option .price {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.plan-option .meta {
  color: var(--muted);
  line-height: 1.5;
}

.payment-box-header {
  margin-bottom: 18px;
}

.payment-actions {
  margin-top: 18px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.payment-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
  align-items: center;
}

.payment-info {
  display: grid;
  gap: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(30, 28, 23, 0.12);
}

.info-row span {
  color: var(--muted);
}

.payment-qr-wrap {
  display: flex;
  justify-content: center;
}

.payment-qr {
  width: 220px;
  height: 220px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(30, 28, 23, 0.08);
  background: #fff;
  padding: 14px;
}

.primary-button:disabled,
.ghost-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 900px) {
  .portal-card,
  .hero-card {
    padding: 24px;
  }

  .account-grid,
  .plans,
  .payment-layout {
    grid-template-columns: 1fr;
  }

  .card-header,
  .payment-box-header,
  .action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .payment-qr-wrap {
    justify-content: flex-start;
  }
}
