:root {
  --yolk: #8BC34A;
  --yolk-dark: #689F38;
  --sunset: #AED581;
  --leaf: #2ECC71;
  --leaf-dark: #1FA85C;
  --sky: #3D8BFF;
  --plum: #7C5CFF;
  --ink: #23262f;
  --ink-dim: #6b6f7a;
  --bg: #F7FBF1;
  --card: #ffffff;
  --border: #dfecd2;
  --red: #E74C3C;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px 60px; }

/* Top bar */
.topbar { background: linear-gradient(120deg, var(--yolk), var(--sunset)); box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; color: #fff; }
.brand-text b { font-weight: 800; }
.topnav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topnav a { color: #fff; padding: 8px 14px; border-radius: 20px; font-size: 0.9rem; font-weight: 600; opacity: 0.85; }
.topnav a:hover { opacity: 1; background: rgba(255,255,255,0.15); }
.topnav a.active { opacity: 1; background: rgba(255,255,255,0.25); }
.topbar-user { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 0.85rem; }
.role-pill { background: rgba(255,255,255,0.25); padding: 2px 8px; border-radius: 10px; font-size: 0.7rem; text-transform: uppercase; margin-left: 4px; }
.btn-ghost-sm { border: 1px solid rgba(255,255,255,0.6); padding: 5px 12px; border-radius: 16px; font-size: 0.8rem; color: #fff; }
.btn-ghost-sm:hover { background: rgba(255,255,255,0.15); }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card h2 { margin: 0 0 12px; font-size: 1.1rem; }
.card h2 .sub { font-weight: 400; color: var(--ink-dim); font-size: 0.85rem; }

/* Stat tiles */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-tile { border-radius: 14px; padding: 16px 18px; color: #fff; }
.stat-tile .num { font-size: 1.7rem; font-weight: 800; }
.stat-tile .label { font-size: 0.78rem; opacity: 0.9; }
.tile-yolk { background: linear-gradient(135deg, var(--yolk), var(--yolk-dark)); }
.tile-leaf { background: linear-gradient(135deg, var(--leaf), var(--leaf-dark)); }
.tile-sky { background: linear-gradient(135deg, var(--sky), var(--plum)); }
.tile-sunset { background: linear-gradient(135deg, var(--sunset), var(--red)); }

/* Forms */
label { font-size: 0.8rem; color: var(--ink-dim); display: block; margin-bottom: 4px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
  font: inherit; background: #fffef9;
}
textarea { resize: vertical; min-height: 70px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 14px; }

button, .btn {
  font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; padding: 9px 16px; color: var(--ink); display: inline-block;
}
button.primary, .btn.primary { background: linear-gradient(120deg, var(--yolk), var(--sunset)); color: #fff; border: none; font-weight: 700; }
button.leaf, .btn.leaf { background: var(--leaf); color: #fff; border: none; }
button:hover { filter: brightness(0.97); }
button.danger { color: var(--red); border-color: #f3c5c0; }

/* Tables / lists */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
th { color: var(--ink-dim); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }

.badge { display: inline-block; font-size: 0.72rem; padding: 3px 10px; border-radius: 20px; color: #fff; white-space: nowrap; }
.badge.pending { background: var(--yolk-dark); }
.badge.sent { background: var(--leaf); }
.badge.replied { background: var(--sky); }
.badge.no_response { background: #9a9a9a; }
.badge.followup { background: var(--red); margin-left: 6px; }
.badge.done { background: var(--leaf); }
.badge.owner { background: var(--plum); }
.badge.member { background: var(--sky); }

.flash { padding: 10px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.9rem; }
.flash-success { background: #e6f9ee; color: #1a7d47; border: 1px solid #b8ecce; }
.flash-error { background: #fdeeee; color: #b23b3b; border: 1px solid #f3c5c0; }

.msg-box { background: #fffdf5; border: 1px solid var(--border); border-radius: 10px; padding: 14px; white-space: pre-wrap; font-size: 0.9rem; margin-bottom: 10px; }
.history-item { border-left: 3px solid var(--yolk); padding: 8px 14px; margin-bottom: 8px; background: #fffdf5; border-radius: 0 8px 8px 0; }
.history-item .meta { font-size: 0.72rem; color: var(--ink-dim); }

.auth-wrap { max-width: 420px; margin: 60px auto; }
.auth-logo { text-align: center; margin-bottom: 20px; }
.empty { color: var(--ink-dim); font-size: 0.9rem; padding: 24px 0; text-align: center; }

/* Find prospects — search buttons with icons */
.search-btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.search-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: #fff; border-radius: 10px;
  padding: 9px 16px 9px 12px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}
.search-btn:hover { border-color: var(--yolk); background: #f4faee; }
.search-btn svg { flex-shrink: 0; }

@media (max-width: 640px) {
  .topbar-inner { flex-direction: column; align-items: flex-start; }
  .topnav { width: 100%; }
}
