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

:root {
  --yellow: #FFD600;
  --yellow-dark: #E6C000;
  --yellow-light: #FFF9C4;
  --black: #000000;
  --black-soft: #0A0A0A;
  --black-card: #111111;
  --white: #FFFFFF;
  --grey-100: #F5F5F5;
  --grey-200: #E0E0E0;
  --grey-300: #BDBDBD;
  --grey-400: #9E9E9E;
  --grey-500: #757575;
  --sidebar-width: 260px;
  --header-height: 65px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: all 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--grey-100);
  color: var(--black);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--grey-100); }
::-webkit-scrollbar-thumb { background: var(--grey-300); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--grey-400); }

/* ========== AUTH PAGES ========== */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
}

.auth-left {
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 214, 0, 0.04);
  top: -100px;
  right: -100px;
}

.auth-left::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 214, 0, 0.03);
  bottom: -80px;
  left: -80px;
}

.auth-brand {
  text-align: center;
  position: relative;
  z-index: 1;
}

.auth-brand .logo-box {
  width: 72px;
  height: 72px;
  background: var(--yellow);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(255, 214, 0, 0.3);
}

.auth-brand .logo-box span {
  font-size: 28px;
  font-weight: 900;
  color: var(--black);
  letter-spacing: -1px;
}

.auth-brand h1 {
  color: var(--white);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.auth-brand h1 span { color: var(--yellow); }

.auth-brand p {
  color: var(--grey-400);
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
}

.auth-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  width: 100%;
  max-width: 360px;
}

.auth-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.auth-stat .value {
  font-size: 24px;
  font-weight: 800;
  color: var(--yellow);
  display: block;
}

.auth-stat .label {
  font-size: 11px;
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  background: var(--white);
}

.auth-form-box {
  width: 100%;
  max-width: 400px;
}

.auth-form-box .greeting {
  margin-bottom: 32px;
}

.auth-form-box .greeting h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.5px;
}

.auth-form-box .greeting p {
  color: var(--grey-500);
  margin-top: 4px;
  font-size: 14px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  color: var(--black);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.12);
}

.form-control::placeholder { color: var(--grey-300); }

.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .form-control {
  padding-left: 44px;
}

.input-icon-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-400);
  font-size: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 4px 14px rgba(255, 214, 0, 0.35);
}

.btn-primary:hover {
  background: var(--yellow-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 214, 0, 0.4);
}

.btn-black {
  background: var(--black);
  color: var(--white);
}

.btn-black:hover {
  background: #222;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--black);
  border: 1.5px solid var(--grey-200);
}

.btn-outline:hover {
  border-color: var(--black);
  background: var(--grey-100);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-lg {
  padding: 15px 32px;
  font-size: 15px;
}

.btn-full { width: 100%; }

.btn-danger {
  background: #FFF0F0;
  color: #D32F2F;
  border: 1.5px solid #FFCDD2;
}

.btn-danger:hover { background: #FFCDD2; }

.btn-success {
  background: #F0FFF4;
  color: #2E7D32;
  border: 1.5px solid #C8E6C9;
}

.btn-success:hover { background: #C8E6C9; }

.btn-warning {
  background: var(--yellow-light);
  color: #856404;
  border: 1.5px solid var(--yellow);
}

/* ========== APP LAYOUT ========== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--black);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition);
}

.sidebar-header {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  background: var(--yellow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  color: var(--black);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.sidebar-brand h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.sidebar-brand span {
  font-size: 10px;
  color: var(--grey-400);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 8px 12px 6px;
  margin-top: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--grey-400);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--white);
}

.nav-item.active {
  background: var(--yellow);
  color: var(--black);
}

.nav-item.active .nav-icon { color: var(--black); }

.nav-icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--yellow);
  color: var(--black);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  line-height: 1.4;
}

.nav-item.active .nav-badge {
  background: var(--black);
  color: var(--yellow);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-user:hover { background: rgba(255,255,255,0.06); }

.user-avatar {
  width: 36px;
  height: 36px;
  background: var(--yellow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  flex-shrink: 0;
}

.user-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

.user-info span {
  font-size: 11px;
  color: var(--grey-400);
}

.user-actions { margin-left: auto; }

/* ========== MAIN CONTENT ========== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ========== TOPBAR ========== */
.topbar {
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.topbar-title h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.3px;
}

.topbar-title p {
  font-size: 12px;
  color: var(--grey-400);
  line-height: 1.2;
}

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

.topbar-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--grey-200);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--grey-500);
  font-size: 16px;
  position: relative;
}

.topbar-btn:hover {
  background: var(--grey-100);
  border-color: var(--grey-300);
  color: var(--black);
}

.notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  border: 2px solid var(--white);
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--grey-100);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  transition: var(--transition);
}

.topbar-search:focus-within {
  border-color: var(--yellow);
  background: var(--white);
}

.topbar-search i { color: var(--grey-400); font-size: 14px; }

.topbar-search input {
  border: none;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  width: 200px;
  outline: none;
  color: var(--black);
}

.topbar-search input::placeholder { color: var(--grey-300); }

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

/* ========== STAT CARDS ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-200);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.stat-card.yellow::before { background: var(--yellow); }
.stat-card.black::before { background: var(--black); }
.stat-card.green::before { background: #4CAF50; }
.stat-card.blue::before { background: #2196F3; }
.stat-card.orange::before { background: #FF9800; }
.stat-card.purple::before { background: #9C27B0; }

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

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-icon.yellow { background: var(--yellow-light); color: #856404; }
.stat-icon.black { background: #f0f0f0; color: var(--black); }
.stat-icon.green { background: #E8F5E9; color: #2E7D32; }
.stat-icon.blue { background: #E3F2FD; color: #1565C0; }
.stat-icon.orange { background: #FFF3E0; color: #E65100; }
.stat-icon.purple { background: #F3E5F5; color: #6A1B9A; }

.stat-trend {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.trend-up { background: #E8F5E9; color: #2E7D32; }
.trend-down { background: #FFEBEE; color: #C62828; }

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--grey-400);
  font-weight: 500;
}

/* ========== CARDS ========== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--grey-200);
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--grey-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
}

.card-header p {
  font-size: 12px;
  color: var(--grey-400);
  margin-top: 2px;
}

.card-body { padding: 24px; }

/* ========== TABLE ========== */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--grey-400);
  background: var(--grey-100);
  border-bottom: 1px solid var(--grey-200);
  white-space: nowrap;
}

thead th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
thead th:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--grey-100);
  font-size: 13.5px;
  color: var(--black);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: var(--transition);
}

tbody tr:hover { background: rgba(255, 214, 0, 0.03); }

.checkbox-col {
  width: 40px;
}

input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--yellow);
  cursor: pointer;
}

/* ========== 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::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-new { background: #E3F2FD; color: #1565C0; }
.badge-new::before { background: #1565C0; }

.badge-contacted { background: #FFF3E0; color: #E65100; }
.badge-contacted::before { background: #E65100; }

.badge-interested { background: #E8F5E9; color: #2E7D32; }
.badge-interested::before { background: #2E7D32; }

.badge-replied { background: var(--yellow-light); color: #856404; }
.badge-replied::before { background: var(--yellow); }

.badge-closed { background: #F3E5F5; color: #6A1B9A; }
.badge-closed::before { background: #9C27B0; }

.badge-lost { background: #FFEBEE; color: #C62828; }
.badge-lost::before { background: #EF5350; }

.badge-active { background: #E8F5E9; color: #2E7D32; }
.badge-active::before { background: #4CAF50; }

.badge-paused { background: #FFF3E0; color: #E65100; }
.badge-paused::before { background: #FF9800; }

/* ========== SEARCH & FILTER BAR ========== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-bottom: 1px solid var(--grey-200);
  background: var(--white);
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--grey-400);
  font-size: 14px;
}

.search-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

.search-input-wrap input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.1);
}

.filter-select {
  padding: 9px 12px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-sm);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: var(--black);
  background: var(--white);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus { border-color: var(--yellow); }

/* ========== GRID LAYOUT ========== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ========== ACTIVITY FEED ========== */
.activity-list { padding: 8px 0; }

.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--grey-100);
  transition: var(--transition);
}

.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--grey-100); }

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ai-yellow { background: var(--yellow-light); color: #856404; }
.ai-green { background: #E8F5E9; color: #2E7D32; }
.ai-blue { background: #E3F2FD; color: #1565C0; }
.ai-red { background: #FFEBEE; color: #C62828; }
.ai-purple { background: #F3E5F5; color: #6A1B9A; }
.ai-black { background: #f0f0f0; color: var(--black); }

.activity-content { flex: 1; }

.activity-content p {
  font-size: 13px;
  color: var(--black);
  line-height: 1.5;
}

.activity-content .lead-name {
  font-weight: 600;
  color: var(--black);
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.activity-meta span {
  font-size: 11px;
  color: var(--grey-400);
}

.activity-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--grey-300);
}

/* ========== TASK ITEMS ========== */
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--grey-100);
  transition: var(--transition);
}

.task-item:last-child { border-bottom: none; }
.task-item:hover { background: var(--grey-100); }

.task-check {
  width: 20px;
  height: 20px;
  border: 2px solid var(--grey-200);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.task-check.done {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}

.task-content { flex: 1; }

.task-content h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
}

.task-content span {
  font-size: 11px;
  color: var(--grey-400);
}

/* ========== QUICK ACTIONS ========== */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--white);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--black);
  flex: 1;
  min-width: 150px;
}

.quick-action-btn:hover {
  border-color: var(--yellow);
  box-shadow: 0 4px 12px rgba(255,214,0,0.15);
  transform: translateY(-1px);
}

.quick-action-btn .qa-icon {
  width: 40px;
  height: 40px;
  background: var(--grey-100);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}

.quick-action-btn:hover .qa-icon {
  background: var(--yellow-light);
}

.quick-action-btn .qa-text h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.quick-action-btn .qa-text span {
  font-size: 11px;
  color: var(--grey-400);
}

/* ========== LEAD DETAIL ========== */
.lead-header {
  background: var(--black);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--white);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.lead-avatar-big {
  width: 72px;
  height: 72px;
  background: var(--yellow);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--black);
  flex-shrink: 0;
}

.lead-header-info h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.lead-header-info .lead-sub {
  color: var(--grey-400);
  font-size: 13px;
  margin-top: 4px;
}

.lead-header-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.info-item label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--grey-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.info-item p {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
}

/* ========== TIMELINE ========== */
.timeline {
  position: relative;
  padding: 8px 0;
}

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

.timeline-item {
  display: flex;
  gap: 16px;
  padding: 12px 24px;
  position: relative;
}

.timeline-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-top: 2px;
  border: 2px solid var(--white);
}

.td-yellow { background: var(--yellow); color: var(--black); }
.td-green { background: #4CAF50; color: var(--white); }
.td-blue { background: #2196F3; color: var(--white); }
.td-red { background: #F44336; color: var(--white); }
.td-grey { background: var(--grey-300); color: var(--white); }

.timeline-content { flex: 1; }

.timeline-content h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}

.timeline-content p {
  font-size: 12px;
  color: var(--grey-400);
  margin-top: 3px;
}

/* ========== UPLOAD PAGE ========== */
.upload-zone {
  border: 2px dashed var(--grey-200);
  border-radius: var(--radius-lg);
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--grey-100);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--yellow);
  background: var(--yellow-light);
}

.upload-zone .upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.upload-zone h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.upload-zone p {
  font-size: 13px;
  color: var(--grey-400);
}

.upload-zone p strong { color: var(--black); }

.step-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
}

.step::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% - 40px);
  height: 2px;
  background: var(--grey-200);
}

.step:last-child::after { display: none; }

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--grey-200);
  background: var(--white);
  color: var(--grey-400);
}

.step.active .step-num {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}

.step.done .step-num {
  background: var(--black);
  border-color: var(--black);
  color: var(--yellow);
}

.step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--grey-400);
}

.step.active .step-label { color: var(--black); font-weight: 600; }
.step.done .step-label { color: var(--black); }

/* ========== FUNNEL BUILDER ========== */
.funnel-step-card {
  background: var(--white);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 12px;
  position: relative;
  transition: var(--transition);
}

.funnel-step-card:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow-sm);
}

.funnel-step-card .step-connector {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: 2px;
  height: 12px;
  background: var(--yellow);
  z-index: 1;
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.step-number {
  width: 28px;
  height: 28px;
  background: var(--yellow);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--black);
  flex-shrink: 0;
}

.step-header h4 {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

.step-actions-btns {
  display: flex;
  gap: 6px;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--grey-200);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
  color: var(--grey-400);
  background: var(--white);
}

.icon-btn:hover {
  border-color: var(--black);
  color: var(--black);
  background: var(--grey-100);
}

.icon-btn.delete:hover {
  border-color: #EF5350;
  color: #EF5350;
  background: #FFEBEE;
}

.action-type-select {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.action-type-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1.5px solid var(--grey-200);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
  color: var(--grey-500);
}

.action-type-btn:hover, .action-type-btn.selected {
  border-color: var(--yellow);
  background: var(--yellow-light);
  color: var(--black);
}

.add-step-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--grey-200);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--grey-400);
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
  margin-top: 4px;
}

.add-step-btn:hover {
  border-color: var(--yellow);
  color: var(--black);
  background: var(--yellow-light);
}

/* ========== SETTINGS PAGE ========== */
.settings-section {
  margin-bottom: 28px;
}

.settings-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--grey-200);
}

.api-key-field {
  position: relative;
}

.api-key-field input {
  padding-right: 50px;
}

.api-key-field .toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--grey-400);
  font-size: 15px;
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--grey-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--grey-200);
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--grey-400);
  transition: var(--transition);
}

.modal-close:hover { background: var(--grey-100); color: var(--black); }

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--grey-200);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ========== TOAST ========== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  pointer-events: all;
}

.toast.success { border-left: 4px solid #4CAF50; }
.toast.error { border-left: 4px solid #F44336; }
.toast.warning { border-left: 4px solid var(--yellow); }
.toast.info { border-left: 4px solid #2196F3; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(10px); }
}

.toast.fade-out { animation: fadeOut 0.3s ease forwards; }

/* ========== EMPTY STATE ========== */
.empty-state {
  padding: 60px 24px;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  color: var(--grey-400);
  margin-bottom: 20px;
}

/* ========== PROGRESS BAR ========== */
.progress-bar {
  height: 6px;
  background: var(--grey-200);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* ========== COLUMN MAP GRID ========== */
.column-map {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px 16px;
  align-items: center;
}

.column-map .arrow { color: var(--grey-400); font-size: 18px; text-align: center; }

/* ========== CATEGORY CARDS ========== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.category-card {
  background: var(--white);
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
}

.category-card:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--grey-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.category-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.category-card .meta {
  font-size: 12px;
  color: var(--grey-400);
  margin-bottom: 14px;
}

.category-card .meta span { font-weight: 600; color: var(--black); }

/* ========== TAGS ========== */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  background: var(--grey-100);
  color: var(--grey-500);
  border: 1px solid var(--grey-200);
}

/* ========== TOOLTIP ========== */
[data-tooltip] { position: relative; cursor: help; }

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--black);
  color: var(--white);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 999;
}

[data-tooltip]:hover::after { opacity: 1; }

/* ========== MOBILE HAMBURGER ========== */
.hamburger {
  display: none;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--grey-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--black);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open { display: block; }

  .main-content { margin-left: 0; }

  .hamburger { display: flex; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .auth-wrapper { grid-template-columns: 1fr; }

  .auth-left { display: none; }

  .page-content { padding: 20px 16px; }

  .topbar { padding: 0 16px; }

  .topbar-search { display: none; }

  .lead-header { flex-direction: column; text-align: center; }

  .lead-header-actions { margin: 0; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-right { padding: 40px 24px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .quick-actions { flex-direction: column; }
}

/* ========== UTILITIES ========== */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--grey-400); }
.text-bold { font-weight: 700; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.hidden { display: none; }

/* ========== TEMPLATES PAGE ========== */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.template-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--grey-200);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.template-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--yellow);
  transform: translateY(-2px);
}

.template-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.template-type-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.template-type-badge.text { background: #E3F2FD; color: #1565C0; }
.template-type-badge.video { background: #F3E5F5; color: #7B1FA2; }
.template-type-badge.link { background: #E8F5E9; color: #2E7D32; }

.template-cat {
  font-size: 12px;
  color: var(--grey-500);
  font-weight: 500;
}

.template-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--black);
}

.template-preview {
  background: var(--grey-100);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  color: #333;
  line-height: 1.7;
  margin-bottom: 12px;
  max-height: 130px;
  overflow: hidden;
  position: relative;
}
.template-preview::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 30px;
  background: linear-gradient(transparent, var(--grey-100));
}

.template-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.meta-item { font-size: 12px; color: var(--grey-500); }
.meta-item strong { color: var(--black); }

.template-variables { display: flex; gap: 6px; flex-wrap: wrap; }
.var-tag {
  font-size: 11px;
  background: #FFF9C4;
  color: #F57F17;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 600;
}

.template-actions-menu { display: flex; gap: 4px; }

.video-preview-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--grey-200);
}
.video-thumb {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background: #F3E5F5;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* WhatsApp Preview */
.whatsapp-preview {
  background: #E5DDD5;
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 80px;
}
.wa-bubble {
  background: var(--white);
  border-radius: 0 12px 12px 12px;
  padding: 10px 14px;
  max-width: 85%;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  position: relative;
}
.wa-time {
  font-size: 11px;
  color: var(--grey-400);
  float: right;
  margin-top: 4px;
}

.var-insert-btn {
  font-size: 11px;
  background: #FFF9C4;
  color: #F57F17;
  border: 1px solid #FFE082;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: monospace;
  font-weight: 600;
}
.var-insert-btn:hover { background: #FFE082; }

.upload-zone-small {
  border: 2px dashed var(--grey-300);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.upload-zone-small:hover { border-color: var(--yellow); background: #FFFDE7; }

/* ========== CALLS PAGE ========== */
.transcript-line {
  padding: 6px 0;
  border-bottom: 1px solid var(--grey-200);
  font-size: 13px;
  line-height: 1.6;
}
.transcript-line.ai strong { color: #1565C0; }
.transcript-line.lead strong { color: #2E7D32; }

/* ========== APPOINTMENTS PAGE ========== */
.appt-today-card {
  background: var(--grey-100);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border-left: 4px solid var(--grey-300);
  transition: var(--transition);
}
.appt-today-card:hover { background: var(--white); box-shadow: var(--shadow-sm); }
.appt-today-card.confirmed { border-left-color: #4CAF50; }
.appt-today-card.pending { border-left-color: var(--yellow); }
.appt-today-card.completed { border-left-color: var(--grey-300); opacity: 0.7; }

.appt-time { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.appt-lead-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.appt-meta { font-size: 12px; color: var(--grey-500); margin-bottom: 8px; }

/* ========== ACTIVITY LOGS PAGE ========== */
.log-timeline { position: relative; }

.log-date-group {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--grey-400);
  padding: 16px 0 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--grey-200);
}

.log-entry {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--grey-100);
  transition: var(--transition);
}
.log-entry:hover { background: var(--grey-100); border-radius: var(--radius-md); padding-left: 8px; padding-right: 8px; }

.log-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.log-dot.message { background: #1976D2; }
.log-dot.reply { background: #4CAF50; }
.log-dot.call { background: #9C27B0; }
.log-dot.funnel { background: var(--yellow); border: 2px solid #F57F17; }
.log-dot.appointment { background: #FF9800; }
.log-dot.error { background: #F44336; }

.log-content { flex: 1; }

.log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.log-event {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.log-event.message { background: #E3F2FD; color: #1565C0; }
.log-event.reply { background: #E8F5E9; color: #2E7D32; }
.log-event.call { background: #F3E5F5; color: #7B1FA2; }
.log-event.funnel { background: #FFF9C4; color: #F57F17; }
.log-event.appointment { background: #FFF3E0; color: #E65100; }
.log-event.error { background: #FFEBEE; color: #C62828; }

.log-time { font-size: 12px; color: var(--grey-400); font-weight: 500; }

.log-body {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 6px;
}
.log-detail { color: var(--grey-500); font-size: 12px; }

.log-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.log-tag {
  font-size: 11px;
  background: var(--grey-100);
  color: var(--grey-500);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}
.log-tag.error-tag { background: #FFEBEE; color: #C62828; }

/* ========== EXTRA SHARED COMPONENTS ========== */
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--grey-400); }
.info-value { font-size: 14px; font-weight: 600; color: var(--black); }

.btn-yellow { background: var(--yellow); color: var(--black); border: none; cursor: pointer; }

