/* Wabash Systems Admin — Minimal dark-trim UI */
:root {
  --navy:   #1a1f2e;
  --orange: #c4622d;
  --cream:  #f8f6f1;
  --white:  #ffffff;
  --gray1:  #f4f5f7;
  --gray2:  #e5e7eb;
  --gray3:  #9ca3af;
  --gray4:  #4b5563;
  --green:  #16a34a;
  --red:    #dc2626;
  --blue:   #2563eb;
  --purple: #7c3aed;
  --font:   'system-ui', -apple-system, sans-serif;
}

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

body { font-family: var(--font); background: var(--gray1); color: var(--navy); font-size: 14px; line-height: 1.5; }

a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.nav { background: var(--navy); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 52px; }
.nav-brand { color: var(--cream); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.nav-brand:hover { text-decoration: none; color: var(--orange); }
.nav-links { display: flex; gap: 20px; }
.nav-link { color: var(--gray3); font-size: 13px; }
.nav-link:hover { color: var(--cream); text-decoration: none; }

/* Main */
.main { max-width: 1100px; margin: 0 auto; padding: 28px 20px; }

/* Page header */
.page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-header h1 { font-size: 22px; font-weight: 700; }
.back-link { color: var(--gray3); font-size: 13px; }
.back-link:hover { color: var(--navy); text-decoration: none; }

/* Pipeline bar */
.pipeline-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.pipe-item { display: flex; flex-direction: column; align-items: center; padding: 12px 20px; background: var(--white); border: 2px solid var(--gray2); border-radius: 8px; text-decoration: none; color: var(--gray4); transition: border-color 0.15s; min-width: 80px; }
.pipe-item:hover { border-color: var(--orange); text-decoration: none; color: var(--navy); }
.pipe-item.active { border-color: var(--navy); color: var(--navy); }
.pipe-count { font-size: 22px; font-weight: 700; color: var(--navy); }
.pipe-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* Table */
.table-wrap { background: var(--white); border-radius: 8px; border: 1px solid var(--gray2); overflow: hidden; }
.leads-table { width: 100%; border-collapse: collapse; }
.leads-table th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray3); border-bottom: 1px solid var(--gray2); background: var(--gray1); }
.leads-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray2); vertical-align: middle; }
.leads-table tr:last-child td { border-bottom: none; }
.lead-row { cursor: pointer; transition: background 0.1s; }
.lead-row:hover { background: var(--gray1); }
.lead-name { font-weight: 600; }
.lead-email { font-size: 12px; color: var(--gray3); margin-top: 1px; }
.overdue { color: var(--red); font-weight: 600; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-green  { background: #dcfce7; color: #15803d; }
.badge-gray   { background: var(--gray2); color: var(--gray4); }
.badge-red    { background: #fee2e2; color: var(--red); }

/* Cards */
.card { background: var(--white); border: 1px solid var(--gray2); border-radius: 8px; padding: 20px; margin-bottom: 16px; }
.card-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray3); margin-bottom: 12px; }
.card-meta { font-size: 12px; color: var(--gray3); margin-bottom: 10px; }
.lead-message { white-space: pre-wrap; line-height: 1.6; }

/* Lead detail layout */
.lead-header { margin-bottom: 20px; }
.lead-header h1 { font-size: 26px; font-weight: 700; }
.lead-meta { color: var(--gray3); font-size: 13px; margin-top: 4px; }
.lead-meta a { color: var(--gray4); }

.lead-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
@media (max-width: 700px) { .lead-grid { grid-template-columns: 1fr; } }

/* Notes */
.note-form textarea { width: 100%; border: 1px solid var(--gray2); border-radius: 6px; padding: 10px; font-family: var(--font); font-size: 14px; resize: vertical; margin-bottom: 8px; }
.note-form textarea:focus { outline: none; border-color: var(--orange); }
.notes-list { list-style: none; margin-top: 16px; }
.note-item { padding: 12px 0; border-top: 1px solid var(--gray2); }
.note-text { line-height: 1.6; white-space: pre-wrap; }
.note-footer { font-size: 11px; color: var(--gray3); margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.inline-form { display: inline; }
.btn-link-danger { background: none; border: none; color: var(--red); cursor: pointer; font-size: 11px; padding: 0; }
.btn-link-danger:hover { text-decoration: underline; }
.empty-state-sm { color: var(--gray3); font-size: 13px; margin-top: 12px; }

/* Forms */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--gray4); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--gray2); border-radius: 6px; padding: 9px 12px; font-family: var(--font); font-size: 14px; color: var(--navy); background: var(--white); }
.field input:focus, .field select:focus { outline: none; border-color: var(--orange); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 18px; border-radius: 6px; font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: background 0.15s; }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--orange); }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* Alerts */
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.alert-error { background: #fee2e2; color: var(--red); border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: var(--green); border: 1px solid #bbf7d0; }

/* Login */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--navy); }
.login-box { background: var(--white); border-radius: 10px; padding: 36px; width: 100%; max-width: 380px; }
.login-logo { font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.login-sub { font-size: 13px; color: var(--gray3); margin-bottom: 24px; }

/* Empty state */
.empty-state { text-align: center; padding: 48px; color: var(--gray3); background: var(--white); border-radius: 8px; border: 1px solid var(--gray2); }
