:root {
  --ink: #1b1422;
  --muted: #5e5368;
  --plum: #6d2b86;
  --plum-deep: #43185a;
  --gold: #e4b423;
  --paper: #f4f0ec;
  --card: #fffdfb;
  --line: #e4dce8;
  --ok: #176b45;
  --ok-bg: #e7f6ee;
  --danger: #8d2430;
  --danger-bg: #fdecef;
  --shadow: 0 18px 50px rgba(67, 24, 90, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

a { color: var(--plum); }

.wordmark {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: inherit;
}

.auth-body { min-height: 100vh; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
}

.auth-brand {
  padding: 48px 56px;
  color: #fffaf6;
  background:
    radial-gradient(circle at 15% 20%, rgba(228, 180, 35, 0.35), transparent 28%),
    linear-gradient(165deg, var(--plum) 0%, var(--plum-deep) 70%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-brand .wordmark { font-size: 28px; }

.auth-brand h1 {
  margin: 12px 0 0;
  max-width: 12ch;
  font-family: "Syne", sans-serif;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.eyebrow {
  margin: 28px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}

.brand-points {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.brand-points li {
  position: relative;
  padding-left: 18px;
  margin-top: 10px;
}

.brand-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth-card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 22px;
  background: #f3eef5;
  border-radius: 999px;
}

.mode-switch a {
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 999px;
}

.mode-switch a.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(27, 20, 34, 0.08);
}

label {
  display: block;
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 600;
}

label span {
  font-weight: 500;
  color: var(--muted);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
}

input:focus {
  outline: 2px solid rgba(109, 43, 134, 0.25);
  border-color: var(--plum);
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

.btn {
  width: 100%;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: var(--plum);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover { background: var(--plum-deep); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.form-note {
  margin: 16px 0 0;
  text-align: center;
  color: var(--muted);
}

.banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff6df;
  color: #6a4b08;
}

.banner-error { background: var(--danger-bg); color: var(--danger); }
.banner-ok { background: var(--ok-bg); color: var(--ok); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 7vw;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.topbar .wordmark { color: var(--plum); font-size: 22px; }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.text-link { font-weight: 600; text-decoration: none; }

.page { padding: 36px 7vw 72px; }

.page-intro h1 {
  margin: 6px 0 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.03em;
}

.lede { max-width: 46ch; color: var(--muted); margin-top: 8px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.product-kicker {
  margin: 0;
  color: var(--plum);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-card h2 {
  margin: 8px 0 0;
  font-size: 28px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.price {
  margin: 16px 0 0;
  font-family: "Syne", sans-serif;
  font-size: 34px;
}

.price span {
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  color: var(--muted);
}

.breakdown { margin: 18px 0 0; }
.breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.breakdown dt { color: var(--muted); }
.breakdown dd { margin: 0; font-weight: 600; }
.breakdown div:last-child dd { color: var(--plum); }

.history { margin-top: 42px; }
.history h2 { font-family: "Syne", sans-serif; margin-bottom: 12px; }
.empty { color: var(--muted); }

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #f3eef5;
}
.status-paid { background: var(--ok-bg); color: var(--ok); }
.status-failed { background: var(--danger-bg); color: var(--danger); }
.status-pending { background: #fff6df; color: #6a4b08; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { padding: 32px 24px 28px; }
  .auth-brand h1 { max-width: none; font-size: 40px; }
  .product-grid { grid-template-columns: 1fr; }
  .topbar, .page { padding-left: 20px; padding-right: 20px; }
  .topbar-user span { display: none; }
}
