/* dashboard.css — manifestHERdaily Speaking Leads Dashboard */

:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --primary: #3D1A5C;
  --accent: #C9953E;
  --accent-light: rgba(201, 149, 62, 0.12);
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --text-inverse: #FAFAF8;
  --border: #E8E4EE;
}

body { background: var(--bg); }

/* WRAPPER */
.dash-wrapper { min-height: 100vh; display: flex; flex-direction: column; }

/* HEADER */
.dash-header {
  background: var(--primary);
  padding: 32px 40px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.dash-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.dash-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-inverse);
  margin: 0;
}
.dash-back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(250,250,248,0.6);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
.dash-back-link:hover { color: rgba(250,250,248,0.9); }

/* STATS BAR */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
}
.stat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  flex-shrink: 0;
}
.stat-chip-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.stat-chip-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: capitalize;
}
.stat-chip--new .stat-chip-num { color: #3D1A5C; }
.stat-chip--contacted .stat-chip-num { color: #4A7C59; }
.stat-chip--quote_sent .stat-chip-num { color: var(--accent); }
.stat-chip--booked .stat-chip-num { color: #2E86AB; }
.stat-chip--paid .stat-chip-num { color: #6B48BF; }

/* PIPELINE */
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 0;
  flex: 1;
  padding: 24px 40px;
  gap: 16px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  align-items: start;
}

.pipeline-col { display: flex; flex-direction: column; gap: 0; }

.pipeline-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
}
.pipeline-col-header--new { background: rgba(61,26,92,0.08); }
.pipeline-col-header--contacted { background: rgba(74,124,89,0.1); }
.pipeline-col-header--quote_sent { background: var(--accent-light); }
.pipeline-col-header--booked { background: rgba(46,134,171,0.1); }
.pipeline-col-header--paid { background: rgba(107,72,191,0.1); }

.pipeline-col-name {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pipeline-col-header--new .pipeline-col-name { color: var(--primary); }
.pipeline-col-header--contacted .pipeline-col-name { color: #4A7C59; }
.pipeline-col-header--quote_sent .pipeline-col-name { color: var(--accent); }
.pipeline-col-header--booked .pipeline-col-name { color: #2E86AB; }
.pipeline-col-header--paid .pipeline-col-name { color: #6B48BF; }

.pipeline-col-count {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pipeline-col-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  min-height: 200px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pipeline-empty {
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-align: center;
  padding: 32px 16px;
  opacity: 0.5;
}

/* LEAD CARD */
.lead-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.lead-card:hover {
  box-shadow: 0 4px 16px rgba(61,26,92,0.1);
  border-color: var(--accent);
}
.lead-card-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  margin-bottom: 2px;
}
.lead-card-org {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.lead-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.lead-card-email {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
}
.lead-card-type {
  font-size: 0.6875rem;
  background: var(--accent-light);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
}
.lead-card-date {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.5);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(61,26,92,0.2);
}

.modal-header {
  background: var(--primary);
  padding: 32px 32px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-radius: 20px 20px 0 0;
}
.modal-lead-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-inverse);
  margin: 0 0 4px;
}
.modal-lead-org {
  font-size: 0.9rem;
  color: rgba(250,250,248,0.6);
  margin: 0;
}
.modal-close {
  background: rgba(250,250,248,0.1);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-inverse);
  flex-shrink: 0;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(250,250,248,0.2); }

.modal-body { padding: 32px; }

.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.info-field { display: flex; flex-direction: column; gap: 2px; }
.info-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.info-value {
  font-size: 0.9rem;
  color: var(--text);
}
.info-value a { color: var(--primary); text-decoration: none; }
.info-value a:hover { text-decoration: underline; }

.modal-section { margin-bottom: 28px; }
.modal-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.modal-message {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.status-select-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.status-btn {
  padding: 8px 16px;
  border-radius: 100px;
  border: 2px solid transparent;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg);
  color: var(--text-muted);
  transition: all 0.2s;
  text-transform: capitalize;
}
.status-btn:hover { border-color: var(--border); color: var(--text); }
.status-btn.active { font-weight: 700; }
.status-btn--new.active { background: rgba(61,26,92,0.1); color: var(--primary); border-color: var(--primary); }
.status-btn--contacted.active { background: rgba(74,124,89,0.1); color: #4A7C59; border-color: #4A7C59; }
.status-btn--quote_sent.active { background: var(--accent-light); color: var(--accent); border-color: var(--accent); }
.status-btn--booked.active { background: rgba(46,134,171,0.1); color: #2E86AB; border-color: #2E86AB; }
.status-btn--paid.active { background: rgba(107,72,191,0.1); color: #6B48BF; border-color: #6B48BF; }

.notes-input {
  width: 100%;
  min-height: 100px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  margin-bottom: 12px;
}
.notes-input:focus { outline: none; border-color: var(--accent); }
.save-notes-btn {
  background: var(--primary);
  color: var(--text-inverse);
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.save-notes-btn:hover { opacity: 0.85; }

.modal-timestamps {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .dash-header { padding: 24px; }
  .stats-bar { padding: 16px 24px; }
  .pipeline {
    grid-template-columns: 1fr 1fr;
    padding: 16px 24px;
  }
  .pipeline-col:last-child { grid-column: 1 / -1; }
  .modal-info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipeline-col:last-child { grid-column: auto; }
}