* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', system-ui, sans-serif; background: #0a0f1e; color: #e2e8f0; min-height: 100vh; }
.hidden { display: none !important; }

/* Login */
#login-screen {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: radial-gradient(circle at 50% 30%, #0d274d 0%, #0a0f1e 70%);
}
.login-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; padding: 48px 40px; width: 400px; text-align: center;
}
.login-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; color: #fff; }
.login-card p { font-size: 13px; color: rgba(255,255,255,0.45); margin-bottom: 32px; }
.login-card input {
  width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15); border-radius: 8px;
  color: #fff; font-size: 15px; outline: none; margin-bottom: 16px;
}
.login-card input:focus { border-color: #2EBCB3; }
.login-card button {
  width: 100%; padding: 14px; background: #2EBCB3; color: #0A233F;
  border: none; border-radius: 8px; font-weight: 700; font-size: 15px; cursor: pointer;
}
.login-card button:hover { background: #26a69a; }
.error { color: #f87171; font-size: 13px; margin-top: 12px; }

/* Header */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 32px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
header h1 { font-size: 22px; font-weight: 800; color: #fff; }
.header-right { display: flex; gap: 8px; }
.header-right button {
  padding: 8px 16px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04); color: #94a3b8; font-size: 13px;
  font-weight: 600; cursor: pointer;
}
.header-right button:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Stats */
.stats-bar {
  display: flex; gap: 12px; padding: 24px 32px;
}
.stat-box {
  flex: 1; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 20px; text-align: center;
}
.stat-value { font-size: 28px; font-weight: 800; color: #fff; }
.stat-label { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Filters */
.filters { display: flex; gap: 10px; padding: 0 32px 20px; }
.filters select {
  padding: 10px 14px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; color: #e2e8f0; font-size: 13px; font-weight: 500; outline: none; cursor: pointer;
}
.filters select:focus { border-color: #2EBCB3; }

/* Table */
.table-wrap { padding: 0 32px 32px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; padding: 12px 14px; font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04); cursor: pointer; transition: background 0.15s;
}
tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody td { padding: 14px; font-size: 14px; color: #cbd5e1; }

/* Badges */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
}
.badge-chat { background: rgba(46,125,209,0.15); color: #64b5f6; }
.badge-form { background: rgba(46,188,179,0.15); color: #4ade80; }
.badge-voice { background: rgba(249,169,75,0.15); color: #F9A94B; }
.badge-sma { background: rgba(46,188,179,0.12); color: #2EBCB3; }
.badge-firmlift { background: rgba(46,125,209,0.12); color: #2E7DD1; }
.badge-new { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-contacted { background: rgba(234,179,8,0.15); color: #facc15; }
.badge-qualified { background: rgba(139,92,246,0.15); color: #a78bfa; }
.badge-converted { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge-lost { background: rgba(239,68,68,0.15); color: #f87171; }

/* Status select in table */
.status-select {
  padding: 4px 8px; background: transparent; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; color: #cbd5e1; font-size: 12px; cursor: pointer; outline: none;
}

/* Modal */
#modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
#modal {
  background: #111827; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
  padding: 32px; width: 600px; max-width: 90vw; max-height: 80vh; overflow-y: auto; position: relative;
}
#modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  color: rgba(255,255,255,0.5); font-size: 24px; cursor: pointer;
}
#modal-close:hover { color: #fff; }
#modal-content h2 { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 20px; }
.detail-row { display: flex; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.detail-label { width: 140px; font-size: 13px; color: rgba(255,255,255,0.45); font-weight: 600; flex-shrink: 0; }
.detail-value { font-size: 14px; color: #e2e8f0; }
.detail-value a { color: #2EBCB3; text-decoration: none; }
.detail-value a:hover { text-decoration: underline; }
.transcript-box {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 16px; margin-top: 16px; font-size: 13px;
  white-space: pre-wrap; line-height: 1.6; color: #94a3b8; max-height: 300px; overflow-y: auto;
}

#loading, #no-leads { text-align: center; padding: 40px; color: rgba(255,255,255,0.4); font-size: 14px; }

@media (max-width: 768px) {
  .stats-bar { flex-wrap: wrap; padding: 16px; }
  .stat-box { min-width: calc(50% - 8px); }
  .filters { flex-wrap: wrap; padding: 0 16px 16px; }
  .table-wrap { padding: 0 16px 16px; }
  header { padding: 16px; }
  tbody td { padding: 10px 8px; font-size: 13px; }
}
