/* ── Admin Styles ───────────────────────────────────────────────── */
/* Extends theme.css variables (--cream, --sage, --amber, etc.) */

.admin-body {
  background: var(--cream);
  min-height: 100vh;
}

/* ── Shared Admin Card ──────────────────────────────────────────── */
.admin-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.admin-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
}

.admin-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--charcoal);
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.admin-card h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.admin-subtitle {
  color: var(--mid);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

/* ── Form ───────────────────────────────────────────────────────── */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input {
  padding: 11px 14px;
  border: 1.5px solid var(--light-gray);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  transition: border-color 0.15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--sage);
}

.btn-primary {
  padding: 13px;
  background: var(--sage);
  color: var(--cream);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}

.btn-primary:hover { background: var(--sage-dark); }

.admin-footer-text {
  text-align: center;
  font-size: 0.85rem;
  color: var(--mid);
  margin-top: 20px;
}

.admin-footer-text a {
  color: var(--sage);
  font-weight: 600;
  text-decoration: none;
}

/* ── Alert ──────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.alert-error {
  background: var(--amber-light);
  color: #7A4A0E;
  border: 1px solid #E8C17A;
}

/* ── Steps Indicator ────────────────────────────────────────────── */
.steps-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.step-item:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--light-gray);
  margin-top: -18px;
  margin-left: 18px;
  margin-right: 18px;
}
.step-item.active:not(:last-child)::after { background: var(--sage); }
.step-item.done:not(:last-child)::after { background: var(--sage); }
.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--light-gray);
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mid);
  z-index: 1;
}
.step-item.active .step-dot {
  border-color: var(--sage);
  background: var(--sage);
  color: var(--cream);
}
.step-item.done .step-dot {
  border-color: var(--sage);
  background: var(--sage-light);
  color: var(--sage);
}
.step-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--mid);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.step-item.active .step-label { color: var(--sage); }
.step-item.done .step-label { color: var(--sage); }

/* ── Field Help Text ─────────────────────────────────────────────── */
.field-help {
  font-size: 0.78rem;
  color: var(--mid);
  margin-top: -10px;
  margin-bottom: 4px;
  line-height: 1.4;
}

/* ── Preview Button ───────────────────────────────────────────────── */
.preview-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

/* ── Dashboard Layout ───────────────────────────────────────────── */
.admin-dashboard-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--light-gray);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-header-inner {
  max-width: 900px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-header-label {
  flex: 1;
  font-size: 0.82rem;
  color: var(--mid);
  font-weight: 500;
}

.logout-form { margin-left: auto; }

.btn-logout {
  padding: 7px 16px;
  border: 1.5px solid var(--light-gray);
  border-radius: 100px;
  background: transparent;
  color: var(--mid);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-logout:hover {
  border-color: var(--charcoal);
  color: var(--charcoal);
}

/* ── Dashboard Main ──────────────────────────────────────────────── */
.admin-main {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 24px;
}

.admin-welcome {
  margin-bottom: 32px;
}

.admin-welcome h1 {
  font-family: 'Fraunces', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.admin-welcome p {
  color: var(--mid);
  font-size: 0.95rem;
}

/* ── Stats Grid ──────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 20px;
  text-align: center;
}

.stat-value {
  font-family: 'Fraunces', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--sage);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--mid);
}

/* ── Referral Section ───────────────────────────────────────────── */
.referral-section,
.credits-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 24px;
}

.referral-section h2,
.credits-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 10px;
}

.referral-desc {
  font-size: 0.88rem;
  color: var(--mid);
  margin-bottom: 16px;
}

.referral-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--cream);
  border: 1.5px solid var(--light-gray);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 12px;
}

.referral-link {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: 0.08em;
  font-family: 'DM Sans', monospace;
}

.btn-copy {
  padding: 7px 16px;
  background: var(--sage);
  color: var(--cream);
  border: none;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-copy:hover { background: var(--sage-dark); }

.referral-full-url {
  font-size: 0.78rem;
  color: var(--mid);
}

.referral-full-url span {
  font-family: 'DM Sans', monospace;
  color: var(--charcoal);
}

/* ── Credits Section ─────────────────────────────────────────────── */
.credits-section p {
  font-size: 0.88rem;
  color: var(--mid);
  margin-bottom: 16px;
}

.btn-secondary {
  padding: 10px 20px;
  background: transparent;
  color: var(--sage);
  border: 1.5px solid var(--sage);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-secondary:hover {
  background: var(--sage);
  color: var(--cream);
}

/* ── Subscription Section ─────────────────────────────────────────── */
.subscription-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 24px;
}

.subscription-section h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.subscription-section > p {
  font-size: 0.88rem;
  color: var(--mid);
  margin-bottom: 20px;
}

.plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.plan-card {
  background: var(--cream);
  border: 2px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plan-card-highlight {
  border-color: var(--sage);
  background: #F5F9F6;
}

.plan-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
}

.plan-price {
  font-family: 'Fraunces', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1.2;
}

.plan-price span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--mid);
}

.plan-desc {
  font-size: 0.82rem;
  color: var(--mid);
  margin-bottom: 8px;
}

.btn-plan {
  display: block;
  background: var(--sage);
  color: #FAF7F2;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  margin-top: auto;
}

.btn-plan:hover { background: var(--sage-dark); }

/* ── Demo Mode ──────────────────────────────────────────────────── */
.demo-try-banner {
  text-align: center;
  font-size: 0.85rem;
  color: var(--mid);
  padding: 12px 16px;
  background: var(--cream-dark);
  border: 1px dashed var(--light-gray);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.demo-try-banner a {
  color: var(--sage);
  font-weight: 600;
  text-decoration: none;
}
.demo-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: var(--mid);
  font-size: 0.8rem;
}
.demo-divider::before,
.demo-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--light-gray);
}
.btn-demo {
  display: block;
  text-align: center;
  padding: 12px;
  background: transparent;
  color: var(--sage);
  border: 2px dashed var(--sage);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn-demo:hover {
  background: var(--sage-light);
  color: var(--sage-dark);
}
.is-demo-banner {
  background: var(--amber-light);
  border: 1px solid #E8C17A;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  margin-bottom: 24px;
  font-size: 0.88rem;
  color: #7A4A0E;
  display: flex;
  align-items: center;
  gap: 10px;
}
.is-demo-banner strong { font-weight: 700; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .admin-card { padding: 32px 24px; }
  .admin-main { padding: 24px 16px; }
}