/* AttorneyLinx — Dark professional theme */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #0f1117;
  --surface: #161921;
  --surface-2: #1e2330;
  --border: #2a2f3d;
  --accent: #d4a84b;
  --accent-dim: rgba(212, 168, 75, 0.12);
  --text: #e8e6e1;
  --text-muted: #7a7f8a;
  --green: #3ecf8e;
  --red: #e05252;
  --amber: #e09a3c;
}

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

html { font-size: 16px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--accent);
  color: #0f1117;
}
.btn-primary:hover { background: #e6bb60; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-ghost { background: none; color: var(--text-muted); padding: 6px 10px; }
.btn-ghost:hover { color: var(--text); }

/* Auth pages */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
}
.auth-card h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.auth-card p { color: var(--text-muted); margin-bottom: 28px; }
.auth-card .logo { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--accent); margin-bottom: 24px; display: block; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-error { background: rgba(224, 82, 82, 0.1); border: 1px solid var(--red); color: var(--red); padding: 10px 14px; border-radius: 6px; font-size: 0.85rem; margin-bottom: 16px; }
.auth-footer { margin-top: 20px; text-align: center; font-size: 0.85rem; color: var(--text-muted); }
.pricing-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(212, 168, 75, 0.2);
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}
.pricing-note a { color: var(--accent); font-weight: 500; }
.pricing-note a:hover { text-decoration: underline; }

/* Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--accent);
  padding: 0 24px 24px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo span { display: block; font-family: 'DM Sans', sans-serif; font-size: 0.7rem; font-weight: 400; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; margin-top: 2px; }
.sidebar nav { flex: 1; padding: 16px 0; }
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}
.sidebar nav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.sidebar nav a.active { color: var(--accent); background: var(--accent-dim); }
.sidebar-user { padding: 16px 24px; border-top: 1px solid var(--border); font-size: 0.82rem; }
.sidebar-user strong { display: block; color: var(--text); margin-bottom: 2px; }
.sidebar-user span { color: var(--text-muted); }

/* Main content */
.main { flex: 1; overflow: auto; }
.main-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.main-header h1 { font-size: 1.4rem; }
.main-header .subtitle { color: var(--text-muted); font-size: 0.85rem; margin-top: 2px; font-family: 'DM Sans', sans-serif; font-weight: 400; }

.main-content { padding: 32px; }

/* Lead cards */
.leads-grid { display: grid; gap: 16px; }
.lead-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  transition: border-color 0.2s;
}
.lead-card:hover { border-color: var(--accent); }
.lead-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.lead-card-name { font-size: 1rem; font-weight: 600; font-family: 'Playfair Display', serif; }
.lead-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}
.badge-new { background: var(--accent-dim); color: var(--accent); }
.badge-viewed { background: rgba(122, 127, 138, 0.1); color: var(--text-muted); }
.badge-purchased { background: rgba(62, 207, 142, 0.1); color: var(--green); }
.lead-card-need { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 10px; line-height: 1.4; }
.lead-card-meta { display: flex; gap: 16px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }
.lead-card-meta span { display: flex; align-items: center; gap: 4px; }
.lead-card-actions { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.price-tag { font-size: 1.1rem; font-weight: 700; color: var(--accent); font-family: 'Playfair Display', serif; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 1rem; margin-bottom: 8px; font-family: 'DM Sans', sans-serif; font-weight: 500; }

/* Alert banners */
.alert { padding: 12px 20px; border-radius: 8px; font-size: 0.88rem; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: rgba(62, 207, 142, 0.1); border: 1px solid rgba(62, 207, 142, 0.3); color: var(--green); }
.alert-warning { background: rgba(224, 154, 60, 0.1); border: 1px solid rgba(224, 154, 60, 0.3); color: var(--amber); }
.alert-error { background: rgba(224, 82, 82, 0.1); border: 1px solid rgba(224, 82, 82, 0.3); color: var(--red); }

/* Tabs */
.tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 4px; margin-bottom: 28px; width: fit-content; }
.tab { padding: 8px 20px; border-radius: 6px; font-size: 0.88rem; font-weight: 500; color: var(--text-muted); cursor: pointer; border: none; background: none; transition: all 0.15s; }
.tab.active { background: var(--accent); color: #0f1117; }
.tab:hover:not(.active) { color: var(--text); }

/* Section title */
.section-title { font-size: 1.1rem; margin-bottom: 16px; color: var(--text); }

/* Loader */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Purchase details */
.purchased-detail { background: var(--surface-2); border-radius: 8px; padding: 16px; margin-bottom: 12px; }
.purchased-detail strong { display: block; color: var(--accent); margin-bottom: 4px; }
.purchased-detail .contact-line { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* Status indicator */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot-amber { background: var(--amber); box-shadow: 0 0 6px var(--amber); }
.dot-muted { background: var(--text-muted); }

/* Pricing page */
.pricing-intro {
  max-width: 640px;
  margin-bottom: 32px;
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  max-width: 640px;
  margin-bottom: 48px;
}
.pricing-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.pricing-card-header h2 { font-size: 1.4rem; margin-bottom: 4px; }
.pricing-card-header p { color: var(--text-muted); font-size: 0.88rem; }
.price-badge {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Playfair Display', serif;
  text-align: right;
  line-height: 1;
}
.price-badge span { display: block; font-size: 0.85rem; font-weight: 400; color: var(--text-muted); font-family: 'DM Sans', sans-serif; }
.pricing-features { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.pricing-feature { display: flex; gap: 14px; align-items: flex-start; }
.pricing-feature svg { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.pricing-feature strong { display: block; font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; }
.pricing-feature span { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; }
.pricing-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pricing-cta .btn { padding: 14px 32px; font-size: 1rem; }
.pricing-cta-note { font-size: 0.8rem; color: var(--text-muted); }
.pricing-faq h3 { font-size: 1.2rem; margin-bottom: 20px; }
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 640px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.faq-item h4 { font-size: 0.9rem; font-family: 'DM Sans', sans-serif; font-weight: 600; margin-bottom: 8px; }
.faq-item p { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.pricing-redirect-login { margin-top: 40px; font-size: 0.88rem; color: var(--text-muted); max-width: 640px; }
.pricing-redirect-login a { color: var(--accent); }