/* ═══════════════════════════════════════════
   TRAP PLUG — Premium Dark Theme
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;800;900&display=swap');

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1a1a1a;
  --bg-input: #1a1a1a;
  --border: #2a2a2a;
  --border-hover: #3a3a3a;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --gold: #d4a853;
  --gold-light: #e8c46a;
  --gold-dark: #b8902e;
  --gold-glow: rgba(212, 168, 83, 0.15);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold: 0 4px 24px rgba(212, 168, 83, 0.2);
  --transition: all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

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

a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }

/* ═══════════ NAVIGATION ═══════════ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.02em;
}

.nav-logo span { color: var(--text-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover { color: var(--text-primary); }

.nav-links .btn-gold {
  color: var(--bg-primary);
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ═══════════ BUTTONS ═══════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg-primary);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  transform: translateY(-1px);
  box-shadow: 0 6px 32px rgba(212, 168, 83, 0.3);
  color: var(--bg-primary);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}

.btn-ghost:hover { color: var(--text-primary); }

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ═══════════ HERO ═══════════ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(212, 168, 83, 0.06) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-5%, 5%); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--gold-glow);
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 32px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero h1 .gold { color: var(--gold); }

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══════════ CATEGORIES ═══════════ */

.categories {
  padding: 80px 24px;
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.categories-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: default;
}

.category-card:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-gold);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  display: block;
}

.category-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ═══════════ HOW IT WORKS ═══════════ */

.how-it-works {
  padding: 80px 24px;
}

.steps {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
}

.step {
  text-align: center;
  padding: 24px;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg-primary);
  font-weight: 800;
  font-size: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.step h3 { margin-bottom: 8px; font-weight: 700; }
.step p { color: var(--text-secondary); font-size: 0.9rem; }

/* ═══════════ PRICING SECTION ═══════════ */

.pricing-section {
  padding: 80px 24px;
  background: var(--bg-secondary);
}

.pricing-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  transform: scale(1.02);
}

.pricing-card.featured::before {
  content: 'MOST POPULAR';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg-primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 4px 16px;
  border-radius: 100px;
}

.pricing-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.pricing-price {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.pricing-price .currency { font-size: 1.5rem; vertical-align: top; }
.pricing-price .period { font-size: 1rem; color: var(--text-muted); font-family: 'Inter', sans-serif; font-weight: 400; }

.pricing-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
  text-align: left;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
}

/* ═══════════ CTA SECTION ═══════════ */

.cta-section {
  padding: 100px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(212, 168, 83, 0.08) 0%, transparent 60%);
}

.cta-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  margin-bottom: 16px;
  position: relative;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
  position: relative;
}

/* ═══════════ FOOTER ═══════════ */

.footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer a { color: var(--text-secondary); }

/* ═══════════ FORMS / AUTH ═══════════ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-card .subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

select.form-input {
  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='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.9rem;
  display: none;
}

.form-error.visible { display: block; }

.form-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.9rem;
  display: none;
}

.form-success.visible { display: block; }

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ═══════════ DASHBOARD ═══════════ */

.dashboard {
  padding: 100px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.dashboard-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 800;
}

.membership-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-free {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.badge-pro {
  background: var(--gold-glow);
  border: 1px solid rgba(212, 168, 83, 0.4);
  color: var(--gold);
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
}

/* Tables / Request List */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
}

.card-body {
  padding: 24px;
}

.request-list {
  list-style: none;
}

.request-item {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

.request-item:last-child { border-bottom: none; }
.request-item:hover { background: rgba(255,255,255,0.02); }

.request-info { flex: 1; min-width: 0; }

.request-title {
  font-weight: 600;
  margin-bottom: 4px;
  word-break: break-word;
}

.request-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.status-pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.status-sourcing { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.status-found { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }
.status-fulfilled { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.status-declined { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.urgency-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}

.urgency-low { background: rgba(100,100,100,0.2); color: var(--text-muted); }
.urgency-normal { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.urgency-high { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.urgency-urgent { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 16px; display: block; }
.empty-state h3 { color: var(--text-secondary); margin-bottom: 8px; }

/* ═══════════ ADMIN ═══════════ */

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px;
  overflow-x: auto;
}

.admin-tab {
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-family: inherit;
}

.admin-tab.active {
  background: var(--gold);
  color: var(--bg-primary);
}

.admin-tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

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

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.admin-table select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

/* ═══════════ MODAL ═══════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: var(--transition);
}

.modal-overlay.active .modal { transform: scale(1); }

.modal h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.modal-close {
  float: right;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover { color: var(--text-primary); }

/* ═══════════ BUDGET RANGE ═══════════ */

.budget-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ═══════════ LOADING ═══════════ */

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(212, 168, 83, 0.3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.loading-screen {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 12px;
  }
  .nav-mobile-toggle { display: block; }

  .hero { padding: 100px 20px 60px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 300px; }

  .pricing-card.featured { transform: none; }

  .dashboard-header { flex-direction: column; align-items: flex-start; }

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

  .admin-table { font-size: 0.8rem; }
  .admin-table th, .admin-table td { padding: 10px 8px; }

  .auth-card { padding: 32px 24px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .request-item { flex-direction: column; }
}

/* ═══════════ PAGE TRANSITIONS ═══════════ */

.page { display: none; }
.page.active { display: block; animation: fadeIn 0.3s ease; }

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

/* ═══════════ SETUP PAGE ═══════════ */

.setup-page .auth-card {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
}

/* ═══════════ TOASTS ═══════════ */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.success { border-color: rgba(34, 197, 94, 0.4); }
.toast.error { border-color: rgba(239, 68, 68, 0.4); }

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

/* ═══════════ SCROLLBAR ═══════════ */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
