:root {
  --bg: #f8f1e9;
  --bg-dark: #221c15;
  --ink: #1b1b1b;
  --sand: #e9d4b4;
  --sand-dark: #b88a4b;
  --accent: #cc6f2c;
  --mint: #2e8b7d;
  --glass: rgba(255, 255, 255, 0.7);
}

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

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: radial-gradient(circle at top, #fdf8f1 0%, #f2e1c8 45%, #e2c39d 100%);
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 32px 6vw 60px;
  position: relative;
}

.page::before,
.page::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(0px);
  z-index: -1;
}

.page::before {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(204, 111, 44, 0.35), transparent 60%);
  top: -120px;
  right: -80px;
}

.page::after {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(46, 139, 125, 0.25), transparent 60%);
  bottom: -120px;
  left: -60px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Cinzel", serif;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--bg-dark);
  color: #fff7eb;
  font-weight: 700;
  border-radius: 12px;
}

.logo-text span {
  display: block;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

.logo-text small {
  font-family: "Sora", sans-serif;
  font-size: 0.75rem;
  color: #6d4e2a;
}

.site-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

a {
  text-decoration: none;
  color: inherit;
}

.button,
.site-nav a {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button {
  background: var(--bg-dark);
  color: #fff7eb;
}

.button:hover,
.site-nav a:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(34, 28, 21, 0.2);
}

.ghost {
  background: transparent;
  border: 1px solid rgba(34, 28, 21, 0.2);
  color: var(--bg-dark);
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
  animation: fadeIn 0.7s ease both;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  align-items: center;
}

.hero-text h1 {
  font-family: "Cinzel", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  margin: 12px 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: #7a4f25;
  font-weight: 600;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-card {
  background: var(--glass);
  border-radius: 24px;
  padding: 28px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 40px rgba(34, 28, 21, 0.15);
}

.pyramid-demo {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.pyramid-row {
  display: grid;
  grid-template-columns: repeat(var(--blocks), minmax(28px, 1fr));
  gap: 10px;
}

.block {
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(34, 28, 21, 0.2);
  background: rgba(255, 255, 255, 0.6);
  transition: transform 0.3s ease, background 0.3s ease;
}

.block.filled {
  background: linear-gradient(135deg, #d7a55b, #c8732d);
  border-color: rgba(34, 28, 21, 0.35);
  transform: translateY(-2px);
}

.hero-note {
  font-size: 0.95rem;
  color: #553919;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.feature {
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.feature h3 {
  margin-top: 0;
  font-family: "Cinzel", serif;
}

.auth {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.auth-card {
  width: min(420px, 92vw);
  background: var(--glass);
  padding: 30px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 40px rgba(34, 28, 21, 0.12);
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

input {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(34, 28, 21, 0.2);
  font-size: 0.95rem;
  font-family: inherit;
}

select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(34, 28, 21, 0.2);
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
}

input:disabled {
  background: rgba(34, 28, 21, 0.05);
  cursor: not-allowed;
}

.switch {
  margin-top: 16px;
  font-size: 0.9rem;
}

.muted {
  color: #6b4c2b;
}

.flash-stack {
  display: grid;
  gap: 8px;
}

.flash {
  background: rgba(255, 255, 255, 0.8);
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  border-radius: 12px;
}

.dashboard {
  display: grid;
  gap: 24px;
}

.pyramid-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.new-pyramid-form {
  display: grid;
  gap: 12px;
  min-width: 220px;
}

.pyramid-list {
  display: grid;
  gap: 16px;
}

.pyramid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.pyramid-card {
  padding: 20px;
  border-radius: 20px;
  border: 1px solid rgba(34, 28, 21, 0.12);
  background: rgba(255, 255, 255, 0.85);
  display: grid;
  gap: 16px;
}

.pyramid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.slot-form {
  display: grid;
  gap: 10px;
}

.slot-hint {
  margin: 0;
}

.inline-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(46, 139, 125, 0.12);
  color: #1d5f55;
  font-size: 0.9rem;
}

.panel {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 32px rgba(34, 28, 21, 0.1);
}

.pyramid {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

.pyramid-level {
  display: grid;
  gap: 8px;
}

.level-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #7a4f25;
}

.status {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(204, 111, 44, 0.15);
  font-weight: 600;
}

.status.success {
  background: rgba(46, 139, 125, 0.18);
}

.referral-card {
  display: grid;
  gap: 16px;
}

.referral-code {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--bg-dark);
}

.copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.copy-row input {
  flex: 1;
  min-width: 220px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.stat {
  font-size: 1.2rem;
  font-weight: 600;
}

.label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: #7a4f25;
}

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

.referrals li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed rgba(34, 28, 21, 0.15);
  padding-bottom: 8px;
}

.referrals small {
  color: #7a4f25;
}

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

.withdraw-form {
  display: grid;
  gap: 14px;
}

.withdraw-info {
  display: grid;
  gap: 6px;
}

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

.withdraw-list li {
  display: grid;
  gap: 6px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(34, 28, 21, 0.15);
}

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

.payment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.payment-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(34, 28, 21, 0.15);
}

.admin {
  display: grid;
  gap: 24px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px dashed rgba(34, 28, 21, 0.15);
  vertical-align: top;
  white-space: nowrap;
}

.admin-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b4c2b;
}

.admin-table code {
  font-family: "Sora", sans-serif;
  font-size: 0.85rem;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.admin-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(34, 28, 21, 0.15);
}

.admin-meta {
  display: grid;
  gap: 6px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-actions form {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(204, 111, 44, 0.15);
  color: #7a4f25;
}

.badge.pending {
  background: rgba(204, 111, 44, 0.2);
}

.badge.approved {
  background: rgba(46, 139, 125, 0.2);
  color: #1d5f55;
}

.badge.rejected {
  background: rgba(153, 37, 37, 0.18);
  color: #7a1f1f;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero-card {
    padding: 20px;
  }

  .pyramid-row {
    grid-template-columns: repeat(var(--blocks), minmax(22px, 1fr));
  }
}
