/* ========================================
   BIMsmarter LinkedIn Prospection Tool
   Design: Tech Engineering (Bleu Marine / Blanc)
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Rubik:wght@400;500;700&display=swap');

:root {
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-input: rgba(30, 41, 59, 0.6);
  --border: rgba(6, 182, 212, 0.15);
  --border-hover: rgba(6, 182, 212, 0.4);
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --cyan-glow: rgba(6, 182, 212, 0.3);
  --purple: #a855f7;
  --green: #22c55e;
  --orange: #f59e0b;
  --red: #ef4444;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background pattern */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%2306b6d4' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none; z-index: 0;
}

/* ── Layout ── */
.app-container { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

.header {
  background: rgba(10, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}

.header-left { display: flex; align-items: center; gap: 16px; }
.header-logo { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 20px var(--cyan-glow); }
.header-title { font-family: 'Rubik', sans-serif; font-size: 20px; font-weight: 700; color: white; }
.header-title span { color: var(--cyan); }
.header-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.header-user { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: 13px; }

/* ── Navigation ── */
.nav-tabs {
  display: flex; gap: 4px; padding: 12px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.nav-tab {
  padding: 10px 20px; border-radius: var(--radius-sm);
  background: transparent; border: none; color: var(--text-muted);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.2s; display: flex; align-items: center; gap: 8px;
}
.nav-tab:hover { color: var(--text-primary); background: rgba(255,255,255,0.05); }
.nav-tab.active { color: var(--cyan); background: rgba(6, 182, 212, 0.1); border: 1px solid rgba(6, 182, 212, 0.2); }
.nav-badge { background: var(--cyan); color: white; font-size: 11px; padding: 1px 7px; border-radius: 10px; font-weight: 600; }

/* ── Main content ── */
.main-content { flex: 1; padding: 24px; max-width: 1400px; margin: 0 auto; width: 100%; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-title { font-size: 16px; font-weight: 600; color: white; display: flex; align-items: center; gap: 10px; }
.card-title .icon { color: var(--cyan); }

/* ── Stats Grid ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: linear-gradient(135deg, rgba(6,182,212,0.08), rgba(168,85,247,0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px; text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.stat-value { font-size: 32px; font-weight: 700; color: var(--cyan); font-family: 'Rubik', sans-serif; }
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.form-input, .form-select, .form-textarea {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid rgba(100,116,139,0.3);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-select { cursor: pointer; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; display: inline-flex; align-items: center; gap: 8px;
  transition: all 0.2s; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--cyan), #0284c7); color: white; }
.btn-primary:hover { background: linear-gradient(135deg, var(--cyan-dark), #0369a1); transform: translateY(-1px); box-shadow: 0 4px 16px var(--cyan-glow); }
.btn-secondary { background: rgba(100,116,139,0.2); color: var(--text-secondary); border: 1px solid rgba(100,116,139,0.3); }
.btn-secondary:hover { background: rgba(100,116,139,0.3); color: white; }
.btn-success { background: linear-gradient(135deg, var(--green), #16a34a); color: white; }
.btn-success:hover { transform: translateY(-1px); }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 8px; }
.btn-ghost:hover { color: var(--cyan); background: rgba(6,182,212,0.1); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 8px; }

/* ── Prospect Table ── */
.table-container { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: rgba(6,182,212,0.08); }
th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; user-select: none;
  white-space: nowrap;
}
th:hover { color: var(--cyan); }
td { padding: 12px 16px; border-bottom: 1px solid rgba(100,116,139,0.1); font-size: 13px; }
tr:hover td { background: rgba(6,182,212,0.03); }
.prospect-name { font-weight: 600; color: white; }
.prospect-company { color: var(--text-secondary); font-size: 12px; }

/* ── Status Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.badge-new { background: rgba(100,116,139,0.2); color: var(--text-secondary); }
.badge-contacted { background: rgba(6,182,212,0.15); color: var(--cyan); }
.badge-replied { background: rgba(168,85,247,0.15); color: var(--purple); }
.badge-audit { background: rgba(34,197,94,0.15); color: var(--green); }
.badge-rejected { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-country-lu { background: rgba(245,158,11,0.15); color: var(--orange); }
.badge-country-be { background: rgba(168,85,247,0.15); color: var(--purple); }

/* ── Pain Point Tags ── */
.pain-tag {
  display: inline-block; padding: 2px 8px;
  background: rgba(6,182,212,0.1); color: var(--cyan);
  border-radius: 4px; font-size: 11px; margin: 2px;
  border: 1px solid rgba(6,182,212,0.2);
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 700px; width: 100%;
  max-height: 85vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-title { font-size: 18px; font-weight: 700; color: white; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ── Message Preview ── */
.message-preview {
  background: rgba(6,182,212,0.05);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: var(--radius-sm);
  padding: 20px; margin-top: 16px;
  white-space: pre-wrap; line-height: 1.7;
  font-size: 14px; color: var(--text-primary);
}
.message-preview .highlight { color: var(--cyan); font-weight: 600; }

/* ── Loading ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(6,182,212,0.3);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-dots::after {
  content: ''; animation: dots 1.5s infinite;
}
@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}

/* ── Checkbox filters ── */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-label {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 6px;
  background: var(--bg-input);
  border: 1px solid rgba(100,116,139,0.2);
  cursor: pointer; font-size: 12px; color: var(--text-secondary);
  transition: all 0.2s;
}
.checkbox-label:hover { border-color: var(--cyan); color: var(--text-primary); }
.checkbox-label input { accent-color: var(--cyan); }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-fadein { animation: fadeIn 0.3s ease-out; }
.animate-slideup { animation: slideUp 0.4s ease-out; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--bg-secondary); border: 1px solid var(--green);
  color: var(--green); padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; z-index: 200;
  animation: slideUp 0.3s ease-out;
  display: flex; align-items: center; gap: 8px;
}

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 18px; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; max-width: 400px; margin: 0 auto; }

/* ── Utility ── */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-cyan { color: var(--cyan); }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(6,182,212,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(6,182,212,0.4); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .header { padding: 10px 16px; }
  .nav-tabs { overflow-x: auto; padding: 8px 16px; }
  .main-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 20px; margin: 10px; }
}
