:root {
  --bg: #0a0a0c;
  --bg-card: #121216;
  --bg-elevated: #18181f;
  --text: #e8e6e3;
  --text-muted: #9a968a;
  --gold: #c9a227;
  --gold-light: #e4c65a;
  --gold-dim: rgba(201, 162, 39, 0.15);
  --border: rgba(201, 162, 39, 0.22);
  --danger: #e05a5a;
  --success: #4caf7a;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 50% -10%, rgba(201, 162, 39, 0.12), transparent),
    radial-gradient(ellipse 40% 30% at 100% 50%, rgba(201, 162, 39, 0.06), transparent);
  z-index: -1;
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), #8a6d1a);
  color: #0a0a0c;
  font-weight: 800;
  font-size: 0.85rem;
}

.brand-text em {
  color: var(--gold-light);
  font-style: normal;
  font-weight: 600;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav-main a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-main a:hover,
.nav-main a.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

.nav-logout {
  color: var(--text-muted) !important;
}

.main-content {
  padding: 2rem 0 3rem;
}

.hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin: 0 0 0.75rem;
  background: linear-gradient(90deg, var(--text), var(--gold-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card + .card {
  margin-top: 1.25rem;
}

.card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--gold-light);
}

.card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
}

.grid-2 {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-top: 0.25rem;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 420px;
}

.form-wide {
  max-width: 560px;
}

label {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.field-hint {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.field-hint strong {
  color: var(--gold-light);
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1rem;
}

input:focus,
select:focus {
  outline: 2px solid var(--gold-dim);
  border-color: var(--gold);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #0a0a0c;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-light);
}

.btn-block {
  width: 100%;
}

.auth-wrap {
  max-width: 440px;
  margin: 0 auto;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}

.alert-error {
  background: rgba(224, 90, 90, 0.12);
  border: 1px solid rgba(224, 90, 90, 0.4);
  color: #ffb4b4;
}

.alert-success {
  background: rgba(76, 175, 122, 0.12);
  border: 1px solid rgba(76, 175, 122, 0.4);
  color: #a8e6c3;
}

.alert-info {
  background: var(--gold-dim);
  border: 1px solid var(--border);
  color: var(--text);
}

.notice-risk {
  background: var(--gold-dim);
  border-left: 3px solid var(--gold);
  padding: 0.85rem 1rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.affiliate-box {
  background: var(--bg-elevated);
  border: 1px dashed var(--gold);
  border-radius: 10px;
  padding: 1rem;
  word-break: break-all;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--gold-light);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--gold-dim);
  color: var(--gold-light);
  border: 1px solid var(--border);
}

.site-footer {
  padding: 1.5rem 0 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border);
}

.page-title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
}

.page-sub {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Dashboard-Tabs & Downline */
.dash-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.dash-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.55rem 1rem;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dash-tab:hover {
  color: var(--gold-light);
  background: var(--gold-dim);
}

.dash-tab.active {
  color: var(--gold-light);
  border-color: var(--border);
  border-bottom-color: var(--bg);
  background: var(--bg-card);
}

.tab-count {
  font-size: 0.72rem;
  background: var(--gold);
  color: #0a0a0c;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  font-weight: 700;
}

.dash-panel {
  display: none;
}

.dash-panel.active {
  display: block;
}

.downline-teaser {
  margin-top: 1.25rem;
}

.downline-stats {
  margin: 1.25rem 0 0.5rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(201, 162, 39, 0.12);
}

.data-table th {
  color: var(--gold-light);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-elevated);
}

.data-table tbody tr:hover {
  background: rgba(201, 162, 39, 0.06);
}

.code-inline {
  font-family: ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--gold-light);
}

.status-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
}

.status-pill.status-active {
  background: rgba(76, 175, 122, 0.15);
  color: #a8e6c3;
  border-color: rgba(76, 175, 122, 0.35);
}

.status-pill.status-pending {
  background: var(--gold-dim);
  color: var(--gold-light);
}

.status-pill.status-suspended {
  background: rgba(224, 90, 90, 0.12);
  color: #ffb4b4;
  border-color: rgba(224, 90, 90, 0.35);
}

.downline-cards {
  display: none;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1rem;
}

.partner-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.partner-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.partner-meta {
  margin: 0.2rem 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Zahlungsmethoden */
.payment-intro {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0;
}

.payment-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

@media (min-width: 900px) {
  .payment-grid {
    grid-template-columns: 1fr 1fr;
  }

  .payment-option-wide {
    grid-column: 1 / -1;
  }
}

.payment-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.payment-option {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem;
}

.payment-option-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.payment-option h3 {
  margin: 0;
  color: var(--gold-light);
  font-size: 1.05rem;
}

.payment-option p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.payment-muted {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.checkbox-line {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-line input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.sepa-form {
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .table-wrap {
    display: none;
  }

  .downline-cards {
    display: grid;
  }

  .dash-tab {
    flex: 1 1 auto;
    justify-content: center;
    border-radius: 8px;
  }
}
