/* ReelLocal CRM — dark theme, matches landing page design */

:root {
  --bg: #0b0b0f;
  --bg-2: #111117;
  --bg-3: #18181f;
  --fg: #f0ebe2;
  --fg-2: #9e9890;
  --fg-3: #6a6560;
  --accent: #f5a623;
  --accent-dim: rgba(245, 166, 35, 0.15);
  --accent-glow: rgba(245, 166, 35, 0.06);
  --warm: #e8703a;
  --green: #3dd68c;
  --red: #ff6b6b;
  --border: rgba(240, 235, 226, 0.08);
  --radius: 12px;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.15; }

/* Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 10;
}

.sidebar-logo {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 17px;
  padding: 0 20px 24px;
  letter-spacing: -0.3px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.nav-section { padding: 16px 12px 4px; }
.nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 0 8px;
  margin-bottom: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--fg-2);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--accent-dim); color: var(--fg); }
.nav-link.active { background: var(--accent-dim); color: var(--accent); }
.nav-link svg { flex-shrink: 0; opacity: 0.7; }
.nav-link.active svg { opacity: 1; }

.main-content {
  flex: 1;
  margin-left: 220px;
  padding: 32px 40px;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 32px;
}
.page-header h1 {
  font-size: 2rem;
  margin-bottom: 6px;
}
.page-header p { color: var(--fg-2); font-size: 14px; }

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.topbar h1 { font-size: 1.5rem; }

/* Cards */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; }

/* Stat grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.stat-label { font-size: 12px; color: var(--fg-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.stat-value { font-size: 1.75rem; font-weight: 600; font-family: 'Playfair Display', serif; }
.stat-sub { font-size: 12px; color: var(--fg-3); margin-top: 4px; }
.stat-value.green { color: var(--green); }
.stat-value.accent { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  font-family: inherit;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent); color: #0b0b0f; }
.btn-secondary { background: var(--bg-3); color: var(--fg); border: 1px solid var(--border); }
.btn-ghost { color: var(--fg-2); padding: 8px 12px; }
.btn-ghost:hover { background: var(--accent-dim); color: var(--fg); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: rgba(255,107,107,0.15); color: var(--red); }

/* Form elements */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--fg-2); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-select { cursor: pointer; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 12px; color: var(--fg-3); margin-top: 4px; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-3);
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--accent-glow); }
.data-table .client-name { font-weight: 500; }

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.status-Lead { background: rgba(158,152,144,0.15); color: var(--fg-2); }
.status-Contacted { background: rgba(245,166,35,0.15); color: var(--accent); }
.status-Proposal { background: rgba(124,58,237,0.15); color: #a78bfa; }
.status-Active { background: rgba(61,214,140,0.15); color: var(--green); }
.status-Paused { background: rgba(255,107,107,0.1); color: var(--red); }

/* Industry badges */
.industry-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  background: var(--accent-dim);
  color: var(--accent);
}

/* Script cards */
.script-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.script-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.script-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.script-name { font-weight: 600; font-size: 15px; }
.script-text {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.6;
  background: var(--bg-3);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}
.script-actions { display: flex; gap: 8px; }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-title { font-size: 1.2rem; font-family: 'Playfair Display', serif; }
.modal-close { background: none; border: none; color: var(--fg-3); cursor: pointer; font-size: 20px; padding: 4px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

/* Outreach log form */
.outreach-entry {
  display: grid;
  grid-template-columns: 100px 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.outreach-entry:last-child { border-bottom: none; }
.outreach-date { font-size: 13px; color: var(--fg-3); }
.outreach-num { font-size: 18px; font-weight: 600; font-family: 'Playfair Display', serif; }

/* Retainer table */
.revenue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.revenue-card { background: var(--bg-3); border-radius: 10px; padding: 18px; text-align: center; }
.revenue-amount { font-size: 1.5rem; font-weight: 600; font-family: 'Playfair Display', serif; color: var(--green); margin-bottom: 4px; }
.revenue-label { font-size: 12px; color: var(--fg-3); }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tab-btn {
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--fg-2);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn:hover { color: var(--fg); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Utility */
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.text-muted { color: var(--fg-2); font-size: 13px; }
.gap-8 { display: flex; gap: 8px; align-items: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.empty-state { text-align: center; padding: 48px 24px; color: var(--fg-3); }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--fg-2); }