/* InsightForge — Dark navy + gold design system */

:root {
  --bg-primary: #0A0F1C;
  --bg-secondary: #111827;
  --bg-card: #1A2035;
  --bg-input: #0D1322;
  --gold: #D4AF37;
  --gold-dim: #B8962E;
  --gold-glow: rgba(212, 175, 55, 0.15);
  --text-primary: #E5E7EB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --border: #2A3350;
  --border-focus: #D4AF37;
  --error: #EF4444;
  --success: #10B981;
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ────────────────────────────────────── */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.container-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Header ────────────────────────────────────── */
.header {
  text-align: center;
  padding: 3rem 0 2rem;
}

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.tagline {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 300;
}

/* ── Cards ─────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.card-header {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ── Form ──────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239CA3AF' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* ── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg-primary);
  width: 100%;
}

.btn-primary:hover {
  background: var(--gold-dim);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}

.btn-secondary:hover {
  background: var(--gold-glow);
}

/* ── Status ────────────────────────────────────── */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-pending { background: #1E3A5F; color: #60A5FA; }
.status-paid { background: #1E3A5F; color: #60A5FA; }
.status-processing { background: #3B2F12; color: #FBBF24; }
.status-complete { background: #064E3B; color: #34D399; }
.status-failed { background: #450A0A; color: #F87171; }

/* ── Progress ──────────────────────────────────── */
.progress-container {
  text-align: center;
  padding: 3rem 2rem;
}

.progress-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.5rem;
}

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

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(16, 185, 129, 0.3); }
  50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-fade-up {
  animation: fade-up 0.6s ease-out both;
}

.animate-slide-left {
  animation: slide-in-left 0.5s ease-out both;
}

.animate-slide-right {
  animation: slide-in-right 0.5s ease-out both;
}

.progress-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.progress-detail {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ── How It Works ──────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.step {
  text-align: center;
  padding: 1.5rem 1rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-glow);
  color: var(--gold);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--gold);
}

.step-title {
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.step-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ── Pricing Badge ─────────────────────────────── */
.pricing {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.pricing-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
}

.pricing-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.free-badge {
  display: inline-block;
  background: var(--success);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* ── Admin Table ───────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 2px solid var(--border);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.admin-table tr:hover td {
  background: var(--bg-secondary);
}

/* ── Stats Grid ────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ── Alert ─────────────────────────────────────── */
.alert {
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.alert-error {
  background: #450A0A;
  border: 1px solid #7F1D1D;
  color: #FCA5A5;
}

.alert-success {
  background: #064E3B;
  border: 1px solid #065F46;
  color: #6EE7B7;
}

/* ── Footer ────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .container { padding: 1rem; }
  .logo { font-size: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
