/* ================================================================
   MARLO DASHBOARD CSS
   Dark warm theme — matches landing page design tokens exactly.
   ================================================================ */

/* App shell */
.app-body {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

/* ---- Sidebar ---- */
.sidebar {
  width: 220px;
  min-height: 100vh;
  background: var(--bg-warm);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  padding: 0 0.5rem;
}

.brand-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #0c0a09;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.brand-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--fg);
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
  position: relative;
}

.nav-link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-link:hover {
  color: var(--fg);
  background: rgba(255,255,255,0.05);
}

.nav-link.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav-link.active svg {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #0c0a09;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.sidebar-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.nav-link-small {
  display: block;
  font-size: 0.8rem;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  transition: color 0.15s;
}

.nav-link-small:hover { color: var(--fg); }

/* ---- Main content ---- */
.app-main {
  margin-left: 220px;
  flex: 1;
  padding: 2.5rem 2.5rem 4rem;
  max-width: 1100px;
}

/* ---- Page header ---- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.page-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.page-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.page-title .highlight { color: var(--accent); }

.header-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

.header-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.75rem;
}

.meta-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid var(--accent-soft);
}

.meta-pill.muted {
  background: rgba(255,255,255,0.04);
  color: var(--fg-muted);
  border-color: var(--border);
}

/* ---- Stat strip ---- */
.stat-strip {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.stat-strip.compact {
  padding: 1rem 1.5rem;
  gap: 1.5rem;
}

.strip-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.strip-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--fg);
  line-height: 1;
}

.strip-num.accent { color: var(--accent); }
.strip-num.warn { color: #f97316; }

.strip-label {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.strip-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ---- Overview grid ---- */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.overview-card {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.overview-card:hover { border-color: rgba(245,158,11,0.3); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.card-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.25rem;
}

.card-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.card-action {
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
  white-space: nowrap;
  margin-top: 0.25rem;
}

.card-action:hover { opacity: 0.7; }

.card-stats-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.card-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.card-stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--fg);
}

.card-stat-num.accent { color: var(--accent); }

.card-stat-label {
  font-size: 0.75rem;
  color: var(--fg-muted);
}

.card-nudge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--fg-muted);
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.15);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
}

.card-nudge.warn {
  background: rgba(249,115,22,0.07);
  border-color: rgba(249,115,22,0.2);
}

.nudge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.nudge-dot.warn { background: #f97316; }

.nudge-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-left: auto;
}

/* ---- Marlo status card ---- */
.marlo-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--bg-warm), rgba(245,158,11,0.07));
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.marlo-status-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.marlo-avatar {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #0c0a09;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
}

.marlo-status-title {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.marlo-status-sub {
  font-size: 0.82rem;
  color: var(--fg-muted);
}

/* ---- Buttons ---- */
.btn-primary {
  background: var(--accent);
  color: #0c0a09;
  border: none;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary.btn-done { background: #22c55e; }

.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-ghost:hover { color: var(--fg); border-color: var(--fg-muted); }
.btn-ghost.small { padding: 0.4rem 0.8rem; font-size: 0.8rem; }

.btn-small {
  background: rgba(255,255,255,0.06);
  color: var(--fg-muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.btn-small:hover { color: var(--fg); background: rgba(255,255,255,0.1); }
.btn-small.btn-done { color: #22c55e; border-color: rgba(34,197,94,0.3); }

/* ---- Message list ---- */
.message-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.message-row:last-child { border-bottom: none; }

.message-row:hover { background: rgba(255,255,255,0.03); }

.message-row.unread { background: rgba(245,158,11,0.04); }

.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--fg-muted);
  flex-shrink: 0;
}

.msg-body { flex: 1; min-width: 0; }

.msg-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.msg-sender {
  font-weight: 600;
  font-size: 0.9rem;
}

.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.replied-chip {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(34,197,94,0.15);
  color: #22c55e;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.lead-chip {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--accent-glow);
  color: var(--accent);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.msg-subject {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-row.read .msg-subject { font-weight: 400; color: var(--fg-muted); }

.msg-preview {
  font-size: 0.82rem;
  color: var(--fg-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.msg-time {
  font-size: 0.78rem;
  color: var(--fg-muted);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* ---- Message detail ---- */
.back-link {
  font-size: 0.85rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.back-link:hover { color: var(--fg); }

.message-detail {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.detail-from {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.detail-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent);
}

.detail-sender {
  font-weight: 600;
  font-size: 0.95rem;
}

.detail-email {
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.detail-date {
  font-size: 0.82rem;
  color: var(--fg-muted);
}

.replied-chip.large {
  font-size: 0.78rem;
  padding: 0.25rem 0.7rem;
}

.detail-subject {
  font-family: 'Syne', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.detail-body {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--fg-muted);
  white-space: pre-wrap;
  margin-bottom: 1.5rem;
}

.detail-lead-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-glow);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
}

.lead-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.lead-name-link {
  font-size: 0.85rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
}

/* ---- Reply panel ---- */
.reply-panel {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.reply-panel-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ai-badge {
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid var(--accent-soft);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
}

.ai-generating {
  font-size: 0.82rem;
  color: var(--fg-muted);
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.ai-suggestion {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--fg-muted);
  margin-bottom: 1rem;
  white-space: pre-wrap;
}

.ai-empty {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}

.reply-compose { display: flex; flex-direction: column; gap: 0.75rem; }

.reply-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.15s;
}

.reply-textarea:focus {
  outline: none;
  border-color: var(--accent-soft);
}

.reply-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---- Leads table ---- */
.leads-table {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.leads-table-header {
  display: grid;
  grid-template-columns: 2fr 1.5fr 0.7fr 1fr 0.8fr 0.8fr;
  gap: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.8rem 1.25rem;
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

.leads-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 0.7fr 1fr 0.8fr 0.8fr;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

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

.lead-name-cell {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.lead-initials {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent-glow);
  border: 1px solid var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  flex-shrink: 0;
}

.lead-name {
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.lead-notes {
  font-size: 0.78rem;
  color: var(--fg-muted);
  line-height: 1.4;
}

.lead-contact { display: flex; flex-direction: column; gap: 0.2rem; }

.contact-line {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.source-tag {
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--fg-muted);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  text-transform: capitalize;
}

.status-select {
  appearance: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  transition: border-color 0.15s;
  width: 100%;
  max-width: 130px;
}

.status-select:focus { outline: none; border-color: var(--accent-soft); }
.status-select.status-hot { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-glow); }
.status-select.status-closed { color: #22c55e; border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.07); }
.status-select.status-new { color: var(--fg); }
.status-select.status-following_up { color: #60a5fa; border-color: rgba(96,165,250,0.3); }
.status-select.status-lost { color: #6b7280; }

.date-text { font-size: 0.8rem; color: var(--fg-muted); }
.date-text.muted { opacity: 0.5; }

.lead-actions { display: flex; gap: 0.5rem; }

/* ---- Settings ---- */
.settings-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.settings-section {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.settings-section-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child { margin-bottom: 0; }

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}

.required { color: var(--accent); }

.form-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-soft);
}

.form-textarea { resize: vertical; }

.form-hint {
  font-size: 0.78rem;
  color: var(--fg-muted);
  margin-top: 0.4rem;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  display: block;
  width: 46px;
  height: 26px;
  background: var(--border);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-track::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fg-muted);
  top: 3px;
  left: 3px;
  transition: transform 0.2s, background 0.2s;
}

.toggle-switch input:checked + .toggle-track { background: var(--accent-soft); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); background: var(--accent); }

.settings-actions {
  display: flex;
  justify-content: flex-end;
}

/* ---- Toast ---- */
.toast {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.toast.success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  color: #22c55e;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 5rem 2rem;
  color: var(--fg-muted);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 0.4rem;
}

.empty-sub { font-size: 0.9rem; }

/* ---- Modal ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.15s;
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ---- Landing page CTA additions ---- */
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--accent);
  color: #0c0a09;
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem 1.75rem;
  border-radius: 10px;
  margin-top: 2.5rem;
  transition: opacity 0.15s, transform 0.1s;
}

.hero-cta:hover { opacity: 0.88; transform: translateY(-1px); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .sidebar {
    width: 60px;
    padding: 1rem 0.5rem;
  }

  .brand-name, .nav-link span:not(svg):not(.nav-badge), .sidebar-footer { display: none; }

  .app-main { margin-left: 60px; padding: 1.5rem; }

  .overview-grid { grid-template-columns: 1fr; }

  .leads-table-header, .leads-row {
    grid-template-columns: 1.5fr 1fr 1fr 0.8fr;
  }

  .lead-contact, .lead-date { display: none; }
}

@media (max-width: 640px) {
  .stat-strip { gap: 1rem; padding: 1rem; }
  .strip-num { font-size: 1.3rem; }
  .message-row { flex-wrap: wrap; }
  .leads-table-header, .leads-row { grid-template-columns: 1.5fr 1fr 0.8fr; }
  .lead-source { display: none; }
}

/* ---- Auto-reply banner ---- */
.auto-reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.auto-reply-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
}

.auto-reply-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.auto-reply-banner strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.auto-reply-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-cancel-auto {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.btn-cancel-auto:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Sent reply thread ---- */
.sent-thread {
  margin-bottom: 1.5rem;
}

.sent-thread-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding: 0 1.5rem;
}

.sent-reply-item {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 0.75rem;
}

.sent-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.sent-reply-to {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sent-reply-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sent-reply-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.auto-chip {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 5px;
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sent-reply-body {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* ---- Send status feedback ---- */
.send-status {
  margin-top: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.send-status.success {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.send-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ---- Replied state in reply panel ---- */
.reply-panel.replied-state {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.5rem;
}

.replied-notice {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.replied-notice a {
  color: var(--accent);
  text-decoration: none;
}

.replied-notice a:hover {
  text-decoration: underline;
}
