/* ================================================================
   LeadPilot CRM - Main Stylesheet
   Modern Light Theme - Bootstrap 5 Compatible
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary:         #3b82f6;
  --primary-dark:    #1e40af;
  --primary-light:   #eff6ff;
  --secondary:       #6366f1;
  --success:         #10b981;
  --warning:         #f59e0b;
  --danger:          #ef4444;
  --info:            #06b6d4;
  --dark:            #0f172a;
  --gray-50:         #f8fafc;
  --gray-100:        #f1f5f9;
  --gray-200:        #e2e8f0;
  --gray-300:        #cbd5e1;
  --gray-400:        #94a3b8;
  --gray-500:        #64748b;
  --gray-600:        #475569;
  --gray-700:        #334155;
  --gray-800:        #1e293b;
  --sidebar-width:   260px;
  --topbar-h:        64px;
  --radius-sm:       6px;
  --radius:          10px;
  --radius-lg:       16px;
  --shadow-sm:       0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:          0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-md:       0 10px 15px -3px rgba(0,0,0,.07), 0 4px 6px -2px rgba(0,0,0,.04);
  --shadow-lg:       0 20px 25px -5px rgba(0,0,0,.08), 0 10px 10px -5px rgba(0,0,0,.03);
  --transition:      .2s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition);
}

.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.sidebar-logo-text {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--primary);
}

.sidebar-logo-text i { font-size: 24px; }

.sidebar-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-100);
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-name { font-weight: 600; font-size: 13px; color: var(--gray-800); }
.user-role { font-size: 11px; color: var(--gray-400); text-transform: capitalize; }
.user-info { min-width: 0; overflow: hidden; }

.sidebar-nav { flex: 1; padding: 12px 8px; }

.nav-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-400);
  padding: 14px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  font-size: 13.5px;
  transition: all var(--transition);
  position: relative;
  margin-bottom: 1px;
}

.nav-item:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,.35);
}

.nav-item i { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.nav-item.active .nav-badge { background: rgba(255,255,255,.3); }

.sidebar-footer {
  padding: 12px 8px 16px;
  border-top: 1px solid var(--gray-100);
}

/* ================================================================
   MAIN WRAPPER & TOPBAR
   ================================================================ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin var(--transition);
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}

.sidebar-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--gray-600); font-size: 20px;
  padding: 6px; border-radius: var(--radius-sm);
  display: none;
}

@media (max-width: 768px) {
  .sidebar-toggle { display: flex; align-items: center; }
}

.topbar-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--gray-700);
  flex: 1;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.topbar-search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 0 14px;
  gap: 8px;
  width: 240px;
  transition: all .2s;
}

.topbar-search:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.topbar-search i { color: var(--gray-400); font-size: 14px; }
.topbar-search input { background: none; border: none; outline: none; font-size: 13px; width: 100%; padding: 8px 0; }

.search-results {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-top: 6px;
  max-height: 280px;
  overflow-y: auto;
  display: none;
  z-index: 999;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--gray-800);
  border-bottom: 1px solid var(--gray-100);
  transition: background .15s;
}

.search-result-item:hover { background: var(--gray-50); }
.search-result-item i { color: var(--gray-400); font-size: 18px; }

.topbar-btn {
  background: none; border: none; cursor: pointer;
  color: var(--gray-500); font-size: 18px;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: all .2s;
}

.topbar-btn:hover { background: var(--gray-100); color: var(--gray-700); }

.topbar-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

.topbar-user {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  color: var(--gray-700);
  font-weight: 500;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background .2s;
}

.topbar-user:hover { background: var(--gray-100); }

.user-avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
}

/* ================================================================
   PAGE CONTENT
   ================================================================ */
.page-content {
  padding: 24px;
  flex: 1;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-header-left h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.page-header-left p {
  color: var(--gray-500);
  margin: 4px 0 0;
  font-size: 13px;
}

/* ================================================================
   CARDS / STATS
   ================================================================ */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  background: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.stat-icon.green  { background: #d1fae5; color: #059669; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }
.stat-icon.pink   { background: #fce7f3; color: #be185d; }
.stat-icon.indigo { background: #e0e7ff; color: #4338ca; }
.stat-icon.teal   { background: #ccfbf1; color: #0d9488; }
.stat-icon.yellow { background: #fef9c3; color: #ca8a04; }

.stat-info { flex: 1; min-width: 0; }

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  color: var(--gray-500);
  font-weight: 500;
  margin-top: 2px;
}

.stat-change {
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ================================================================
   TABLES
   ================================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.table {
  margin: 0;
  font-size: 13.5px;
}

.table thead th {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
  color: var(--gray-600);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 16px;
  white-space: nowrap;
}

.table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-700);
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--gray-50); }

/* ================================================================
   BADGES
   ================================================================ */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-status::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-new       { background: #dbeafe; color: #1d4ed8; }
.badge-contacted { background: #d1fae5; color: #065f46; }
.badge-qualified { background: #ede9fe; color: #5b21b6; }
.badge-converted { background: #d1fae5; color: #059669; }
.badge-lost      { background: #fee2e2; color: #dc2626; }
.badge-active    { background: #d1fae5; color: #059669; }
.badge-inactive  { background: var(--gray-100); color: var(--gray-500); }
.badge-suspended { background: #fee2e2; color: #dc2626; }
.badge-open      { background: #dbeafe; color: #1d4ed8; }
.badge-closed    { background: var(--gray-100); color: var(--gray-500); }
.badge-pending   { background: #fef9c3; color: #ca8a04; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 13.5px;
  padding: 8px 16px;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(59,130,246,.35);
}

.btn-outline-primary {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}

.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-xs { padding: 3px 8px; font-size: 11.5px; }

.btn-icon {
  width: 34px; height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* ================================================================
   SCORE BAR
   ================================================================ */
.score-bar {
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  width: 80px;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  transition: width .5s;
}

/* ================================================================
   KANBAN BOARD
   ================================================================ */
.kanban-wrapper {
  overflow-x: auto;
  padding-bottom: 20px;
}

.kanban-board {
  display: flex;
  gap: 16px;
  min-height: calc(100vh - 200px);
  min-width: max-content;
}

.kanban-col {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 600;
  font-size: 13px;
}

.kanban-col-body {
  background: var(--gray-100);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 8px;
  flex: 1;
  min-height: 200px;
}

.kanban-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  cursor: grab;
  transition: all .2s;
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.kanban-card.sortable-ghost {
  opacity: .4;
  border: 2px dashed var(--primary);
}

.kanban-card.sortable-drag {
  box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
}

.kanban-card-title { font-weight: 600; font-size: 13px; color: var(--gray-800); margin-bottom: 6px; }
.kanban-card-meta { font-size: 12px; color: var(--gray-500); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.priority-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}

.priority-low    { background: var(--gray-400); }
.priority-medium { background: var(--info); }
.priority-high   { background: var(--warning); }
.priority-urgent { background: var(--danger); }

/* ================================================================
   INSTAGRAM / CHAT INBOX
   ================================================================ */
.inbox-wrapper {
  display: flex;
  height: calc(100vh - var(--topbar-h) - 48px);
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.inbox-list {
  width: 320px;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.inbox-search {
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
}

.inbox-search input {
  width: 100%;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  transition: .2s;
}

.inbox-search input:focus {
  background: #fff;
  border-color: var(--primary);
}

.conversation-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-100);
  transition: background .15s;
  text-decoration: none;
  color: inherit;
}

.conversation-item:hover { background: var(--gray-50); }
.conversation-item.active { background: var(--primary-light); }

.conv-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}

.conv-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 600; font-size: 13px; color: var(--gray-800); }
.conv-preview { font-size: 12px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conv-time { font-size: 11px; color: var(--gray-400); white-space: nowrap; }
.conv-unread { width: 18px; height: 18px; background: var(--primary); color: #fff; border-radius: 50%; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--gray-50);
}

.message {
  max-width: 70%;
  display: flex;
  flex-direction: column;
}

.message.in { align-self: flex-start; }
.message.out { align-self: flex-end; }

.message-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.message.in .message-bubble {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-bottom-left-radius: 4px;
  color: var(--gray-800);
}

.message.out .message-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.message-meta {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 4px;
  padding: 0 4px;
}

.message.out .message-meta { text-align: right; }

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--gray-200);
  background: #fff;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13.5px;
  resize: none;
  outline: none;
  max-height: 120px;
  font-family: inherit;
  transition: .2s;
}

.emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
  z-index: 1000;
  margin-bottom: 5px;
  max-height: 200px;
  overflow-y: auto;
}

.emoji-item {
  cursor: pointer;
  font-size: 20px;
  padding: 5px;
  border-radius: 4px;
  transition: background .2s;
  text-align: center;
}

.emoji-item:hover { background: var(--gray-100); }

.chat-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
 
 .chat-info {
   width: 300px;
   border-left: 1px solid var(--gray-200);
   background: #fff;
   display: flex;
   flex-direction: column;
   flex-shrink: 0;
   overflow-y: auto;
 }
 
 .chat-info-header {
   padding: 24px 20px;
   border-bottom: 1px solid var(--gray-100);
   text-align: center;
 }
 
 .avatar-large {
   width: 80px; height: 80px;
   border-radius: 50%;
   margin: 0 auto 12px;
   display: flex; align-items: center; justify-content: center;
   font-size: 28px; font-weight: 700;
   color: #fff;
   background: var(--primary);
   box-shadow: 0 4px 12px rgba(0,0,0,0.1);
 }
 
 .avatar-large img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
 
 .chat-info-body { padding: 20px; }
 
 .info-group { margin-bottom: 20px; }
 .info-label { font-size: 11px; text-transform: uppercase; color: var(--gray-400); font-weight: 700; margin-bottom: 4px; }
 .info-value { font-size: 14px; color: var(--gray-700); font-weight: 500; }
 
 .lead-form-inline {
   background: var(--gray-50);
   border: 1px solid var(--gray-200);
   border-radius: var(--radius);
   padding: 15px;
   margin-top: 10px;
 }

/* ================================================================
   AUTH PAGES
   ================================================================ */
.auth-body { background: var(--gray-50); min-height: 100vh; }

.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 50%, #f0f9ff 100%);
  position: relative;
  overflow: hidden;
}

.auth-shapes .shape {
  position: absolute;
  border-radius: 50%;
  opacity: .06;
  background: var(--primary);
}

.shape-1 { width: 500px; height: 500px; top: -200px; right: -100px; }
.shape-2 { width: 300px; height: 300px; bottom: -100px; left: -80px; }
.shape-3 { width: 200px; height: 200px; top: 50%; left: 30%; }

.auth-container { width: 100%; max-width: 440px; position: relative; z-index: 10; }

.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.auth-logo { text-align: center; margin-bottom: 32px; }

.auth-logo-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(59,130,246,.35);
}

.auth-brand { font-size: 22px; font-weight: 800; color: var(--gray-900); margin: 0; }
.auth-subtitle { color: var(--gray-500); font-size: 13px; margin-top: 4px; }

.auth-input {
  border-color: var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.auth-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

.btn-auth {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all .2s;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(59,130,246,.35);
}

.btn-auth:hover {
  box-shadow: 0 6px 20px rgba(59,130,246,.45);
  transform: translateY(-1px);
}

.btn-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--gray-400); cursor: pointer;
  z-index: 10;
}

.auth-link { color: var(--primary); text-decoration: none; font-size: 13px; font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

.auth-footer { text-align: center; margin-top: 24px; }

/* ================================================================
   FORMS
   ================================================================ */
.form-label { font-weight: 500; font-size: 13px; color: var(--gray-700); margin-bottom: 5px; }
.form-control, .form-select {
  border-color: var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  padding: 8px 12px;
  color: var(--gray-800);
  transition: .2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ================================================================
   LEAD SCORE
   ================================================================ */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 12px;
}

.score-hot   { background: #fee2e2; color: #dc2626; }
.score-warm  { background: #ffedd5; color: #ea580c; }
.score-good  { background: #fef9c3; color: #ca8a04; }
.score-cool  { background: #dbeafe; color: #1d4ed8; }
.score-cold  { background: var(--gray-100); color: var(--gray-500); }

/* ================================================================
   NOTIFICATIONS DROPDOWN
   ================================================================ */
.notif-dropdown {
  width: 300px;
  padding: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.dropdown-header {
  padding: 12px 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.notif-item {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--gray-700);
  transition: background .15s;
  border-bottom: 1px solid var(--gray-100);
}

.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { background: #eff6ff; }
.notif-title { font-size: 12.5px; font-weight: 500; }
.notif-time  { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.notif-empty { padding: 20px; text-align: center; color: var(--gray-400); font-size: 13px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1050;
  }
  .sidebar.show { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-wrapper { margin-left: 0; }
  .page-content { padding: 16px; }
  .inbox-list { width: 100%; border-right: none; display: none; }
  .inbox-list.show { display: flex; }
  .chat-area { display: none; }
  .chat-area.show { display: flex; }
}

@media (max-width: 576px) {
  .kanban-col { width: 240px; }
  .auth-card { padding: 24px; }
  .stat-value { font-size: 20px; }
}

/* ================================================================
   MISC
   ================================================================ */
.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
  background: var(--gray-300);
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-600);
}

.avatar-group .avatar:first-child { margin-left: 0; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.empty-state i { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; color: var(--gray-600); margin-bottom: 8px; }
.empty-state p  { font-size: 13px; }

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px; top: 0; bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.timeline-item {
  position: relative;
  margin-bottom: 20px;
}

.timeline-dot {
  position: absolute;
  left: -22px;
  top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.timeline-content {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 12px;
}

.timeline-time { font-size: 11px; color: var(--gray-400); }

.loader-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}

.scrollbar-thin::-webkit-scrollbar { width: 5px; }
.scrollbar-thin::-webkit-scrollbar-track { background: var(--gray-100); }
.scrollbar-thin::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gray-100);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 500;
}
