:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --panel-soft: #fbfbfc;
  --text: #111827;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #e6fffb;
  --blue: #2563eb;
  --red: #b42318;
  --amber: #b54708;
  --green: #067647;
  --shadow: 0 20px 50px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(246,247,249,.92) 320px),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: 282px;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  padding: 4px 8px;
}
.brand-lockup span {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #101828;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.brand-lockup strong { font-size: 15px; }

.nav-list {
  display: grid;
  gap: 3px;
  overflow: auto;
  padding-right: 4px;
}
.nav-list a,
.signout {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 620;
}
.nav-list i {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #f2f4f7;
  color: #475467;
  font-size: 11px;
  font-style: normal;
}
.nav-list a:hover,
.nav-list a.active {
  color: var(--text);
  background: #f0fdfa;
}
.nav-list a.active i {
  color: #fff;
  background: var(--accent);
}
.signout {
  margin-top: auto;
  color: var(--red);
}

.main {
  margin-left: 282px;
  padding: 28px;
}
.topbar {
  min-height: 58px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
h1, h2, p { letter-spacing: 0; }
h1 { margin: 0; font-size: 28px; line-height: 1.15; }
h2 { margin: 0; font-size: 16px; line-height: 1.35; }
p { color: var(--muted); line-height: 1.55; }

.hero-strip,
.panel,
.stat,
.operation-card,
.login-panel {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.hero-strip {
  margin-bottom: 16px;
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.hero-strip h2 { font-size: 22px; }
.hero-strip p { max-width: 680px; margin: 8px 0 0; }
.health-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.health-pills span,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fafb;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  padding: 16px;
  min-width: 0;
}
.stat span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
  line-height: 1;
}

.content-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.content-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.content-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel,
.operation-card {
  padding: 18px;
  min-width: 0;
}
.panel + .panel { margin-top: 16px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.panel-head a {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
}
.operation-card {
  display: grid;
  gap: 12px;
}
.operation-card p {
  min-height: 48px;
  margin: 0;
}

.table-frame {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}
th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #475467;
  background: #f9fafb;
  font-size: 12px;
  font-weight: 750;
  text-transform: capitalize;
}
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfcfd; }
.empty-row { color: var(--muted); }

.badge.sent,
.badge.verification-sent,
.badge.partnership-sent,
.badge.ready,
.badge.completed,
.badge.qualified,
.badge.email-found,
.badge.source-confirmed,
.badge.interested {
  border-color: #abefc6;
  background: #ecfdf3;
  color: var(--green);
}
.badge.queued,
.badge.running,
.badge.pending,
.badge.needs-human,
.badge.review {
  border-color: #fedf89;
  background: #fffaeb;
  color: var(--amber);
}
.badge.failed,
.badge.bounced,
.badge.dismissed,
.badge.not-interested {
  border-color: #fecdca;
  background: #fef3f2;
  color: var(--red);
}
.badge.classified,
.badge.replied,
.badge.personal,
.badge.generic {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

.button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.button:hover { filter: brightness(.98); }
.quick-run { margin: 0; }

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: #f0fdfa;
  color: #134e4a;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.stack,
.form-grid {
  display: grid;
  gap: 12px;
}
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label {
  display: grid;
  gap: 6px;
  color: #475467;
  font-size: 13px;
  font-weight: 680;
}
input, select, textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
textarea { resize: vertical; }
.check {
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
}
.check input {
  width: 16px;
  min-height: 16px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 24% 20%, rgba(15, 118, 110, .16), transparent 32%),
    linear-gradient(135deg, #f8fafc, #eef2f7);
}
.login-panel {
  width: min(920px, 100%);
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
  overflow: hidden;
}
.login-copy {
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #101828;
  color: #fff;
}
.login-copy .brand-lockup { padding: 0; }
.login-copy .brand-lockup span { background: #fff; color: #101828; }
.login-copy .brand-lockup strong,
.login-copy h1 { color: #fff; }
.login-copy h1 {
  max-width: 440px;
  font-size: 46px;
  line-height: 1.02;
}
.login-copy p {
  max-width: 430px;
  color: #d0d5dd;
}
.login-form {
  padding: 42px;
  display: grid;
  align-content: center;
  gap: 16px;
  background: #fff;
}
.login-form h2 { font-size: 20px; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .content-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .sidebar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { margin-left: 0; padding: 18px; }
  .topbar,
  .hero-strip { align-items: flex-start; flex-direction: column; }
  .stat-grid,
  .content-grid.three { grid-template-columns: 1fr 1fr; }
  .form-grid,
  .login-panel { grid-template-columns: 1fr; }
  .login-copy { min-height: 340px; }
  .login-copy h1 { font-size: 34px; }
}
@media (max-width: 560px) {
  .stat-grid,
  .content-grid.three,
  .nav-list { grid-template-columns: 1fr; }
  th, td { max-width: 240px; }
}
