:root {
  --choco: #2c1a0e;
  --choco-soft: #7a4a28;
  --cream: #f7efe0;
  --cream-deep: #ede0ca;
  --panel: #fffbf4;
  --panel-warm: #fff4df;
  --orange: #d4722a;
  --orange-dark: #b85d1a;
  --orange-glow: rgba(212, 114, 42, 0.22);
  --green: #3a7d54;
  --red: #a53a2c;
  --muted: #9a7a5a;
  --line: rgba(44, 26, 14, 0.13);
  --shadow: 0 24px 60px rgba(44, 26, 14, 0.13);
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "DM Sans", "Segoe UI", Verdana, sans-serif;
  color: var(--choco);
  background:
    radial-gradient(circle at 84% 8%, rgba(212, 114, 42, 0.18), transparent 34%),
    linear-gradient(135deg, #fff7e8 0%, var(--cream) 42%, #f1ddb8 100%);
  overflow-x: hidden;
}

a {
  color: var(--choco-soft);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

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

h1,
h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(3rem, 6vw, 5.7rem);
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h2 em {
  color: var(--orange);
  font-style: normal;
}

input,
select,
textarea,
button {
  font: inherit;
}

input:not([type="radio"]):not([type="checkbox"]),
select,
textarea {
  width: 100%;
  min-height: 58px;
  padding: 15px 18px;
  color: var(--choco);
  background: rgba(255, 251, 244, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:not([type="radio"]):not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  background: var(--panel);
  border-color: rgba(212, 114, 42, 0.72);
  box-shadow: 0 0 0 4px var(--orange-glow);
}

label span {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.page-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 18px 28px 16px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 94px;
  margin-bottom: 22px;
  padding: 8px 18px;
  background: rgba(247, 239, 224, 0.9);
  border: 1px solid rgba(44, 26, 14, 0.07);
  border-radius: 0 0 22px 22px;
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 118px;
  height: auto;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.topbar-actions a,
.topbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 14px;
  color: var(--choco-soft);
  background: rgba(255, 251, 244, 0.44);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 600;
  white-space: nowrap;
}

.topbar-form {
  margin: 0;
}

.topbar-button {
  cursor: pointer;
  font-family: inherit;
}

.topbar-actions a:hover,
.topbar-button:hover {
  color: var(--panel);
  background: var(--choco);
  border-color: transparent;
}

.footer {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 2px 14px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.footer strong {
  color: var(--choco);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--choco-soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.portal-wizard-page {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1fr);
  gap: 24px;
  align-items: stretch;
}

.portal-side {
  display: grid;
  min-height: calc(100dvh - 178px);
  align-content: start;
  gap: 18px;
}

.portal-intro {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(20px, 2.8vw, 40px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 84% 18%, rgba(212, 114, 42, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(255, 251, 244, 0.72), rgba(241, 216, 176, 0.9));
  box-shadow: var(--shadow);
}

.portal-intro h1 {
  margin-bottom: 12px;
  font-size: clamp(2.05rem, 4.05vw, 3.75rem);
  line-height: 0.96;
}

.portal-recover-card {
  display: grid;
  gap: 14px;
  padding: 26px;
  background: rgba(255, 251, 244, 0.88);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 18px 44px rgba(44, 26, 14, 0.1);
}

.portal-recover-card h2 {
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 3.4rem);
}

.portal-recover-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.portal-recover-card form {
  margin-top: 4px;
}

.portal-intro p:not(.eyebrow) {
  max-width: 390px;
  margin-bottom: 15px;
  color: #765237;
  font-size: clamp(0.9rem, 1.35vw, 1.08rem);
  line-height: 1.35;
}

.portal-intro .eyebrow {
  margin-bottom: 7px;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
}

.portal-intro .info-badges {
  gap: 7px;
}

.portal-intro .info-badges span {
  padding: 6px 10px;
  font-size: 0.74rem;
}

.lede {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.45;
}

.info-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.info-badges span,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  color: var(--choco-soft);
  background: rgba(212, 114, 42, 0.11);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
}

.wizard-card {
  min-height: calc(100dvh - 178px);
  overflow: hidden;
  background: rgba(255, 251, 244, 0.88);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.purchase-wizard {
  display: grid;
  min-height: inherit;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 28px 42px 14px;
}

.wizard-step {
  position: relative;
  display: grid;
  place-items: center;
  gap: 7px;
  color: var(--muted);
}

.wizard-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(50% + 16px);
  width: calc(100% - 32px);
  height: 2px;
  background: var(--line);
  transition: background 0.22s ease;
}

.wizard-step.is-done:not(:last-child)::after,
.wizard-step.is-active:not(:last-child)::after {
  background: var(--orange);
}

.wizard-step-dot {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: var(--cream-deep);
  border: 2px solid rgba(44, 26, 14, 0.14);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.wizard-step-label {
  color: currentColor;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.wizard-step.is-active {
  color: var(--orange);
}

.wizard-step.is-done {
  color: var(--green);
}

.wizard-step.is-active .wizard-step-dot {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 0 6px var(--orange-glow);
}

.wizard-step.is-done .wizard-step-dot {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.wizard-panels {
  min-height: 0;
  padding: 18px 48px 14px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.purchase-wizard.is-ready .wizard-panel {
  display: none;
}

.purchase-wizard.is-ready .wizard-panel.is-active {
  display: grid;
}

.wizard-panel {
  gap: 20px;
  animation: panelIn 0.22s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.wizard-heading {
  display: grid;
  gap: 4px;
}

.wizard-heading h2 {
  margin-bottom: 0;
}

.wizard-help {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

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

.wizard-plan-option {
  position: relative;
  display: grid;
  min-height: 104px;
  align-content: center;
  gap: 4px;
  padding: 18px;
  color: var(--choco);
  background: rgba(255, 251, 244, 0.76);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.wizard-plan-option:hover {
  transform: translateY(-1px);
  border-color: rgba(122, 74, 40, 0.44);
}

.wizard-plan-option:has(input:checked) {
  background: rgba(212, 114, 42, 0.05);
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-glow);
}

.wizard-plan-option input,
.wizard-method-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-name {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.plan-price {
  color: var(--choco);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.48rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.wizard-plan-option:has(input:checked) .plan-price {
  color: var(--orange);
}

.plan-meta {
  color: var(--muted);
  font-size: 0.78rem;
}

.plan-badge {
  position: absolute;
  right: 14px;
  top: 12px;
  bottom: auto;
  padding: 3px 10px;
  color: #fff;
  background: var(--orange);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.plan-badge.is-green {
  background: var(--green);
}

.wizard-fields {
  display: grid;
  gap: 18px;
}

.wizard-fields label {
  display: grid;
  gap: 8px;
}

.wizard-method-grid {
  display: grid;
  gap: 12px;
}

.wizard-method-option {
  position: relative;
  display: grid;
  min-height: 86px;
  grid-template-columns: 22px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(255, 251, 244, 0.76);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.wizard-method-option:has(input:checked) {
  background: rgba(58, 125, 84, 0.06);
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(58, 125, 84, 0.12);
}

.method-radio {
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 999px;
}

.wizard-method-option:has(input:checked) .method-radio {
  background: radial-gradient(circle, #fff 0 28%, var(--green) 31% 100%);
  border-color: var(--green);
}

.method-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  color: var(--choco);
  background: rgba(237, 224, 202, 0.78);
  border-radius: 13px;
  font-weight: 900;
}

.method-copy {
  display: grid;
  gap: 3px;
}

.method-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.method-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.method-tag {
  padding: 4px 11px;
  color: var(--green);
  background: rgba(58, 125, 84, 0.12);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wizard-bottom {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 10px;
  padding: 14px 48px 26px;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0), rgba(255, 251, 244, 0.96) 22%, rgba(255, 251, 244, 0.98));
}

.wizard-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2px 14px;
}

.wizard-summary span {
  color: var(--muted);
  font-size: 0.86rem;
}

.wizard-summary strong {
  grid-row: 2;
  color: var(--choco);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.wizard-summary span:nth-of-type(2),
.wizard-summary span:nth-of-type(3) {
  display: none;
}

.wizard-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.wizard-actions:has(.button-muted[hidden]) {
  grid-template-columns: 1fr;
}

.wizard-actions button[hidden] {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: scale(0.99);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  box-shadow: 0 12px 26px var(--orange-glow);
}

.button-accent {
  color: #fff8ec;
  background: var(--choco);
}

.button-muted {
  color: var(--choco-soft);
  background: rgba(245, 231, 207, 0.82);
  border-color: var(--line);
  box-shadow: none;
}

.button-danger {
  color: #fff7ec;
  background: #9f2f22;
  border-color: rgba(120, 24, 18, 0.2);
  box-shadow: none;
}

.button-danger:hover {
  background: #84251b;
}

.wizard-actions .button {
  width: 100%;
}

.wizard-actions .button-muted {
  min-width: 132px;
}

.single-panel {
  width: min(100%, 780px);
  margin: 0 auto;
}

.single-panel.admin-page {
  width: min(100%, 1340px);
}

.recover-page h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.two-col,
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 22px;
  align-items: start;
}

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

.admin-page h1,
.admin-page h2 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.03;
}

.admin-page h3 {
  margin: 0;
  font-size: 1.25rem;
}

.admin-page .section-head {
  align-items: start;
}

.stats-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.panel,
.hero-card,
.stat-card {
  padding: 24px;
  background: rgba(255, 251, 244, 0.84);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card,
.accent-panel {
  background:
    radial-gradient(circle at 86% 14%, rgba(212, 114, 42, 0.18), transparent 28%),
    linear-gradient(145deg, rgba(255, 251, 244, 0.86), rgba(241, 216, 176, 0.86));
}

.centered-panel {
  text-align: center;
}

.admin-login-page {
  width: min(100%, 620px);
}

.admin-login-card {
  width: min(100%, 560px);
  margin: 0 auto;
}

.admin-login-card h1 {
  max-width: 10ch;
  margin-inline: auto;
  font-size: clamp(2.75rem, 7vw, 4.4rem);
}

.admin-login-card form {
  text-align: left;
}

.admin-login-card label span {
  text-align: center;
}

.narrow {
  width: min(100%, 460px);
}

.narrow.admin-login-card {
  width: min(100%, 560px);
}

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

.small-gap {
  gap: 8px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.field-grid,
.plan-grid,
.method-grid,
.recover-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.filter-form {
  display: grid;
  gap: 14px;
  margin: 16px 0 22px;
  padding: 16px;
  background: rgba(245, 231, 207, 0.38);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.plan-option,
.method-option {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 18px 52px 18px 18px;
  background: rgba(255, 244, 223, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  cursor: pointer;
}

.plan-option input[type="radio"],
.method-option input[type="radio"] {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 20px;
  height: 20px;
  accent-color: var(--orange);
}

.plan-meta,
.hint,
.subtle,
.json-dump,
.notice {
  color: var(--muted);
}

.notice {
  padding: 14px 16px;
  background: rgba(212, 114, 42, 0.09);
  border: 1px solid rgba(212, 114, 42, 0.16);
  border-radius: 16px;
}

.access-details {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
}

.access-details div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: rgba(212, 114, 42, 0.08);
  border: 1px solid rgba(44, 26, 14, 0.09);
  border-radius: 14px;
}

.access-details span {
  color: var(--muted);
  font-weight: 700;
}

.access-details strong {
  text-align: right;
}

.notice-error {
  color: #8e2424;
  background: rgba(177, 52, 52, 0.08);
  border-color: rgba(177, 52, 52, 0.15);
}

.notice-warn {
  background: rgba(212, 114, 42, 0.13);
}

.status-approved,
.status-active,
.status-online,
.status-ok,
.status-paid,
.status-long {
  color: #1f6a31;
  background: rgba(67, 136, 67, 0.14);
}

.status-awaiting_review,
.status-created,
.status-pending_provider,
.status-queued,
.status-normal {
  color: var(--choco-soft);
  background: rgba(212, 114, 42, 0.15);
}

.status-rejected,
.status-error,
.status-closed,
.status-very-fast {
  color: #8e2424;
  background: rgba(177, 52, 52, 0.12);
}

.status-unknown {
  color: var(--muted);
  background: rgba(38, 20, 10, 0.08);
}

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

.stat-card strong {
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.05;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin-top: 12px;
  padding: 16px;
  background: rgba(255, 251, 244, 0.62);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.admin-row.compact {
  padding: 14px;
}

.admin-row > div:first-child {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.admin-row > div:first-child > strong {
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.admin-row > div:first-child > div {
  overflow-wrap: anywhere;
  color: var(--choco-soft);
  font-size: 0.92rem;
  line-height: 1.35;
}

.admin-row > .action-row {
  justify-content: flex-end;
  align-content: start;
}

.admin-row .button {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 13px;
  font-size: 0.84rem;
}

.admin-row .status-pill {
  min-height: 32px;
}

.admin-table-panel {
  grid-column: 1 / -1;
  padding: 18px;
}

.admin-table-head,
.admin-title-with-count {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-table-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.admin-table-head .action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-table-head .button {
  width: auto;
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 0.82rem;
}

.admin-title-with-count {
  min-width: 0;
}

.admin-title-with-count h1,
.admin-title-with-count h2 {
  margin: 0;
}

.admin-count-badge {
  display: inline-flex;
  min-width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--choco-soft);
  background: #efe2cc;
  font-size: 0.82rem;
  font-weight: 900;
}

.admin-table-scroll {
  overflow-x: auto;
  border: 1px solid #e2d6c3;
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.86);
}

.admin-table {
  width: 100%;
  min-width: 820px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--choco);
  font-size: 0.84rem;
}

.admin-payments-table {
  min-width: 940px;
}

.admin-sessions-table {
  min-width: 980px;
}

.admin-table th {
  padding: 11px 12px;
  color: var(--choco-soft);
  background: #f3e6d1;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 12px;
  border-top: 1px solid #eadfcd;
  vertical-align: top;
  line-height: 1.35;
}

.admin-table tbody tr:hover {
  background: #fffaf1;
}

.admin-table th:last-child,
.admin-table td:last-child {
  text-align: right;
}

.admin-payments-table th:nth-child(1),
.admin-payments-table td:nth-child(1) {
  width: 22%;
}

.admin-payments-table th:nth-child(2),
.admin-payments-table td:nth-child(2) {
  width: 15%;
}

.admin-payments-table th:nth-child(3),
.admin-payments-table td:nth-child(3) {
  width: 17%;
}

.admin-payments-table th:nth-child(4),
.admin-payments-table td:nth-child(4) {
  width: 24%;
}

.admin-payments-table th:nth-child(5),
.admin-payments-table td:nth-child(5) {
  width: 12%;
}

.admin-sessions-table th:nth-child(1),
.admin-sessions-table td:nth-child(1) {
  width: 13%;
}

.admin-sessions-table th:nth-child(2),
.admin-sessions-table td:nth-child(2) {
  width: 11%;
}

.admin-sessions-table th:nth-child(3),
.admin-sessions-table td:nth-child(3) {
  width: 18%;
}

.admin-sessions-table th:nth-child(4),
.admin-sessions-table td:nth-child(4) {
  width: 25%;
}

.admin-sessions-table th:nth-child(5),
.admin-sessions-table td:nth-child(5) {
  width: 9%;
}

.admin-sessions-table th:nth-child(6),
.admin-sessions-table td:nth-child(6) {
  width: 24%;
}

.admin-code {
  overflow-wrap: anywhere;
  color: var(--choco);
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  font-weight: 900;
}

.admin-ref {
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: var(--choco-soft);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-muted {
  color: var(--choco-soft);
  font-size: 0.75rem;
}

.admin-mono {
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
}

.admin-error {
  margin-top: 6px;
  color: #8e2424;
  font-size: 0.72rem;
}

.admin-empty {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-table-note {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.admin-table .status-pill {
  min-height: 0;
  margin: 0 4px 4px 0;
  padding: 5px 9px;
  font-size: 0.72rem;
}

.admin-table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.admin-table-actions form {
  margin: 0;
}

.admin-table .button {
  width: auto;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.top-gap {
  margin-top: 24px;
}

.steps {
  padding-left: 20px;
}

.voucher-code {
  margin: 22px 0;
  padding: 18px 22px;
  overflow-wrap: anywhere;
  color: #fff7ec;
  background: var(--choco);
  border-radius: 24px;
  font-size: clamp(2rem, 7vw, 3.5rem);
  font-weight: 900;
  letter-spacing: 0.24em;
  text-align: center;
}

.loader {
  width: 42px;
  height: 42px;
  margin: 24px auto 0;
  border: 4px solid rgba(140, 79, 34, 0.18);
  border-top-color: var(--orange);
  border-radius: 999px;
  animation: spin 0.9s linear infinite;
}

.json-dump {
  overflow: auto;
  padding: 18px;
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.ikeepay-product-card {
  display: grid;
  width: min(100%, 430px);
  gap: 14px;
  margin: 0 auto;
  padding: 22px;
  background: linear-gradient(180deg, rgba(212, 114, 42, 0.08), rgba(255, 248, 236, 0.96));
  border: 1px solid var(--line);
  border-radius: 24px;
}

.ikeepay-product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.ikeepay-product-price {
  color: var(--choco);
  font-size: clamp(2rem, 9vw, 3rem);
  font-weight: 900;
}

.ikeepay-status-box {
  width: min(100%, 430px);
  margin: 0 auto;
  text-align: left;
}

.ikeepay-overlay-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(4px);
}

.ikeepay-overlay-shell.flex {
  display: flex;
}

.ikeepay-modal-container {
  position: relative;
  width: min(100%, 450px);
  height: min(90vh, 760px);
}

.ikeepay-close-btn {
  position: absolute;
  top: -44px;
  right: 6px;
  width: 36px;
  height: 36px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.9rem;
  line-height: 1;
}

.ikeepay-iframe {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.ikeepay-iframe-help {
  position: absolute;
  inset: auto 16px 16px;
  display: none;
  gap: 10px;
  padding: 14px;
  color: var(--choco);
  text-align: left;
  background: rgba(255, 248, 236, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.ikeepay-iframe-help.visible {
  display: grid;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .portal-wizard-page,
  .two-col,
  .hero-grid,
  .dashboard-grid,
  .stats-grid,
  .field-grid,
  .plan-grid,
  .method-grid,
  .recover-inline {
    grid-template-columns: 1fr;
  }

  .portal-intro {
    min-height: auto;
  }

  .portal-side {
    min-height: auto;
  }

  .wizard-card {
    min-height: auto;
  }

  .section-head,
  .admin-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    background:
      radial-gradient(circle at 88% 0%, rgba(212, 114, 42, 0.16), transparent 38%),
      linear-gradient(180deg, #fff7e8 0%, var(--cream) 100%);
  }

  .page-shell {
    padding: 0 12px 8px;
  }

  .topbar {
    min-height: 66px;
    margin: 0 -12px 8px;
    padding: 6px 12px;
    border-width: 0 0 1px;
    border-radius: 0;
  }

  .brand-logo {
    width: 72px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .topbar-actions a,
  .topbar-button {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 0.82rem;
  }

  .portal-wizard-page {
    display: block;
  }

  .portal-side {
    display: grid;
    gap: 12px;
    min-height: auto;
    margin-bottom: 12px;
  }

  .portal-intro {
    display: grid;
    min-height: auto;
    padding: 16px 14px;
    border-radius: 18px;
  }

  .portal-intro h1 {
    margin-bottom: 10px;
    font-size: clamp(1.68rem, 10.6vw, 2.8rem);
    line-height: 0.96;
  }

  .portal-intro p:not(.eyebrow) {
    margin-bottom: 11px;
    font-size: 0.88rem;
  }

  .compact-badges {
    gap: 7px;
  }

  .compact-badges span {
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  .portal-recover-card {
    gap: 11px;
    padding: 18px;
    border-radius: 22px;
  }

  .portal-recover-card h2 {
    font-size: clamp(1.8rem, 11vw, 2.7rem);
    line-height: 1;
  }

  .portal-recover-card p {
    font-size: 0.9rem;
  }

  .portal-recover-card input:not([type="radio"]):not([type="checkbox"]) {
    min-height: 52px;
  }

  .wizard-card {
    min-height: auto;
    border-radius: 22px;
    box-shadow: 0 18px 38px rgba(44, 26, 14, 0.09);
  }

  .purchase-wizard {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .wizard-progress {
    padding: 18px 22px 8px;
  }

  .wizard-step-dot {
    width: 28px;
    height: 28px;
    font-size: 0.74rem;
  }

  .wizard-step:not(:last-child)::after {
    top: 13px;
    left: calc(50% + 14px);
    width: calc(100% - 28px);
  }

  .wizard-step-label {
    font-size: 0.62rem;
  }

  .wizard-panels {
    padding: 16px 18px 8px;
  }

  .wizard-panel {
    gap: 16px;
  }

  .wizard-heading .eyebrow {
    display: none;
  }

  .wizard-heading h2 {
    font-size: 2.05rem;
    line-height: 1.02;
  }

  .wizard-help {
    font-size: 0.92rem;
    line-height: 1.38;
  }

  .wizard-plan-grid {
    gap: 10px;
  }

  .wizard-plan-option {
    min-height: 88px;
    padding: 13px 14px;
    border-radius: 16px;
  }

  .plan-name {
    font-size: 0.78rem;
  }

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

  .plan-meta {
    font-size: 0.7rem;
  }

  .plan-badge {
    right: 10px;
    top: 10px;
    padding: 3px 8px;
    font-size: 0.55rem;
  }

  .plan-badge.is-green {
    font-size: 0;
  }

  .plan-badge.is-green::after {
    content: attr(data-short-badge);
    font-size: 0.55rem;
  }

  .wizard-fields {
    gap: 14px;
  }

  input:not([type="radio"]):not([type="checkbox"]),
  select,
  textarea {
    min-height: 58px;
    padding: 14px 16px;
    font-size: 1rem;
  }

  .wizard-method-grid {
    gap: 10px;
  }

  .wizard-method-option {
    min-height: 78px;
    grid-template-columns: 22px 42px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 13px;
    border-radius: 16px;
  }

  .method-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    font-size: 0.86rem;
  }

  .method-title {
    font-size: 0.94rem;
  }

  .method-desc {
    font-size: 0.78rem;
  }

  .method-tag {
    padding: 3px 8px;
    font-size: 0.58rem;
  }

  .wizard-bottom {
    padding: 10px 18px calc(14px + env(safe-area-inset-bottom));
  }

  .wizard-summary {
    gap: 1px 10px;
  }

  .wizard-summary span {
    font-size: 0.78rem;
  }

  .wizard-summary strong {
    font-size: 1.2rem;
  }

  .wizard-actions {
    gap: 8px;
    grid-template-columns: minmax(96px, 0.34fr) minmax(0, 1fr);
  }

  .wizard-actions .button-muted {
    min-width: 0;
  }

  .wizard-actions:has(.button-muted[hidden]) {
    grid-template-columns: 1fr;
  }

  .button {
    min-height: 50px;
    padding: 13px 14px;
    border-radius: 15px;
    font-size: 0.94rem;
  }

  .footer {
    flex-direction: column;
    gap: 2px;
    margin-top: 8px;
    padding-bottom: 8px;
    font-size: 0.78rem;
  }

  .panel,
  .hero-card,
  .stat-card {
    padding: 18px;
    border-radius: 20px;
  }

  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .access-details div {
    display: grid;
    gap: 3px;
  }

  .access-details strong {
    text-align: left;
  }

  .admin-page h1,
  .admin-page h2 {
    font-size: clamp(1.9rem, 8vw, 2.55rem);
  }

  .voucher-code {
    padding: 16px;
    font-size: clamp(1.5rem, 11vw, 2.1rem);
    letter-spacing: 0.14em;
  }

  .ikeepay-modal-container {
    height: min(90vh, 680px);
  }
}

@media (max-width: 390px) {
  .topbar-actions a,
  .topbar-button {
    padding-inline: 9px;
    font-size: 0.78rem;
  }

  .portal-intro {
    padding: 14px 12px;
  }

  .portal-intro h1 {
    font-size: clamp(1.48rem, 9.8vw, 2.2rem);
  }

  .portal-recover-card {
    padding: 16px 14px;
  }

  .wizard-card {
    min-height: calc(100dvh - 108px);
  }

  .wizard-progress {
    padding: 14px 18px 6px;
  }

  .wizard-heading h2 {
    font-size: 1.82rem;
  }

  .wizard-plan-grid {
    gap: 8px;
  }

  .wizard-plan-option {
    min-height: 82px;
  }

  .wizard-plan-option:has(.plan-badge) {
    min-height: 112px;
    padding-bottom: 32px;
  }

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

  .plan-badge {
    top: auto;
    right: auto;
    bottom: 10px;
    left: 14px;
  }

  .wizard-actions {
    grid-template-columns: 1fr;
  }

  .wizard-actions .button-muted {
    order: 2;
  }
}
