* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background: #f4f6f9; }

/* ---------- Auth (Login) ---------- */
.auth-body { display: flex; align-items: center; justify-content: center; height: 100vh; }
.auth-card { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.08); width: 350px; }
.auth-card h2 { color: #2d3748; }
.auth-card .subtitle { color: #718096; margin-bottom: 20px; font-size: 14px; }
.auth-card label { display: block; margin-top: 12px; font-size: 13px; color: #4a5568; }
.auth-card input { width: 100%; padding: 10px; margin-top: 4px; border: 1px solid #e2e8f0; border-radius: 6px; }
.auth-card button { width: 100%; margin-top: 20px; padding: 10px; background: #4c51bf; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.auth-card button:hover { background: #434190; }
.alert { background: #fed7d7; color: #c53030; padding: 8px; border-radius: 6px; font-size: 13px; margin-bottom: 10px; }

.auth-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 18px;
  padding: 4px;
  background: #f7fafc;
  border: 1px solid #edf2f7;
  border-radius: 8px;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #718096;
}

.auth-tab:hover {
  color: #4c51bf;
}

.auth-tab.active {
  background: #fff;
  color: #4c51bf;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ---------- Layout / Sidebar ---------- */
/* =========================================================
   LEADPROJECT SIDEBAR + LAYOUT
   FINAL VERSION
   ========================================================= */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;

  width: 100%;
  min-height: 100%;

  overflow-x: hidden;
}

body {
  background: #f4f6f9;
}


/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.layout {
  width: 100%;
  min-height: 100vh;

  margin: 0;
  padding: 0;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
  position: fixed;

  top: 0;
  left: 0;
  bottom: 0;

  width: 238px;
  height: 100vh;

  display: flex;
  flex-direction: column;

  margin: 0;
  padding: 0;

  background: #ffffff;

  border-right: 1px solid #e8ebf1;

  box-shadow: 4px 0 18px rgba(20, 30, 50, 0.025);

  z-index: 10000;

  overflow: hidden;

  font-family: 'Segoe UI', sans-serif;
}


/* =========================================================
   BRAND
   ========================================================= */

.sidebar-brand {
  width: 100%;
  height: 64px;
  min-height: 64px;

  display: flex;
  align-items: center;

  padding: 0 20px;

  gap: 11px;

  background: #ffffff;

  border-bottom: 1px solid #e8ebf2;
}


.brand-logo {
  width: 38px;
  height: 38px;

  min-width: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;

  background: #5148c8;

  color: #ffffff;

  font-size: 12px;
  font-weight: 800;

  line-height: 1;

  box-shadow: 0 5px 12px rgba(81, 72, 200, 0.18);
}


.brand-text {
  min-width: 0;

  display: flex;
  flex-direction: column;
}
.mobile-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-number {
  color: #2563eb;
  font-weight: 500;
}

.call-btn {
  width: 32px;
  height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: none;
  border-radius: 50%;
  background: #ecfdf3;
  color: #16a34a;

  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}
.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  box-sizing: border-box;
  padding-right: 52px;
}

.password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 10px !important;
  transform: translateY(-50%) !important;

  width: 36px !important;
  height: 36px !important;

  padding: 0 !important;
  margin: 0 !important;

  border: none !important;
  outline: none !important;

  background: transparent !important;
  box-shadow: none !important;

  color: #7f8ba3 !important;

  cursor: pointer;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  z-index: 10;
}

.password-toggle:hover,
.password-toggle:focus,
.password-toggle:active {
  background: transparent !important;
  box-shadow: none !important;
  color: #5f6b84 !important;
}

.password-toggle svg {
  display: block !important;

  width: 24px !important;
  height: 24px !important;

  fill: none !important;
  stroke: #7f8ba3 !important;
  stroke-width: 1.8 !important;

  stroke-linecap: round !important;
  stroke-linejoin: round !important;

  opacity: 1 !important;
}

.password-toggle:hover svg {
  stroke: #5f6b84 !important;
}
.call-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.call-btn:hover {
  background: #16a34a;
  color: #ffffff;
  transform: scale(1.05);
}

.brand-text h3 {
  margin: 0;

  color: #20283a;

  font-size: 19px;
  font-weight: 800;

  line-height: 18px;

  white-space: nowrap;
}


.brand-text span {
  display: block;

  margin-top: 3px;

  color: #9aa3b2;

  font-size: 9px;
  font-weight: 600;

  line-height: 12px;

  white-space: nowrap;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.sidebar-nav {
  width: 100%;

  flex: 1;

  min-height: 0;

  padding: 21px 12px;

  overflow-y: auto;
  overflow-x: hidden;
}


.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: #e2e5eb;
  border-radius: 10px;
}


/* =========================================================
   MAIN MENU TITLE
   ========================================================= */

.nav-section-title {
    width: 100%;
    padding: 0 12px 10px;
    color: #27426d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    line-height: 14px;
}

/* =========================================================
   NAVIGATION LINK
   ========================================================= */

.sidebar-link {
  position: relative;

  width: 100%;
  height: 44px;

  display: flex;
  align-items: center;

  margin: 0 0 4px 0;
  padding: 0 12px;

  gap: 12px;

  border-radius: 9px;

  background: transparent;

  color: #697386;

  text-decoration: none;

  font-size: 12px;
  font-weight: 600;

  line-height: 1;

  transition:
    background-color 0.18s ease,
    color 0.18s ease;
}


.sidebar-link:hover {
  background: #f7f7fc;

  color: #5148c8;
}


.sidebar-link.active {
  background: #f0efff;

  color: #5148c8;

  font-weight: 700;
}


/* =========================================================
   ACTIVE INDICATOR
   ========================================================= */

.sidebar-link.active::before {
  content: "";

  position: absolute;

  left: -12px;

  top: 9px;
  bottom: 9px;

  width: 3px;

  border-radius: 0 4px 4px 0;

  background: #5148c8;
}


/* =========================================================
   NAV ICON
   ========================================================= */

.sidebar-icon {
  width: 20px;
  height: 20px;

  min-width: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: currentColor;

  flex-shrink: 0;
}


.sidebar-icon svg {
  width: 18px;
  height: 18px;

  display: block;

  stroke: currentColor;

  stroke-width: 1.7;

  stroke-linecap: round;
  stroke-linejoin: round;
}


/* =========================================================
   NAV TEXT
   ========================================================= */

.sidebar-link-text {
  min-width: 0;

  color: currentColor;

  font-size: 14px;
  font-weight: inherit;

  line-height: 1;

  white-space: nowrap;

  overflow: hidden;

  text-overflow: ellipsis;
}

/* =========================================================
   SIDEBAR LOGOUT
   ========================================================= */

.sidebar-footer {
  width: 100%;
  flex-shrink: 0;
  padding: 12px 12px 16px;
}

.sidebar-footer-line {
  width: calc(100% - 12px);
  height: 1px;
  margin: 0 6px 12px;
  background: #e8ebf1;
}

.logout-form {
  width: 100%;
  margin: 0;
  padding: 0;
}

.logout-btn {
  width: 100%;
  height: 46px;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  gap: 12px;

  padding: 0 14px;

  border: 1px solid #ffd8d8;
  border-radius: 9px;

  background: #fff1f1;

  color: #df3838;

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: #ffe5e5;
  border-color: #ffcaca;
  color: #d52f2f;
}

.logout-icon {
  width: 20px;
  height: 20px;

  min-width: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.logout-icon svg {
  width: 19px;
  height: 19px;

  display: block;

  stroke: currentColor;
  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}

.logout-text {
  display: block;

  flex: 1;

  color: currentColor;

  font-size: 13px;
  font-weight: 600;

  line-height: 1;

  white-space: nowrap;
}


/* REMOVE ARROW COMPLETELY */
.logout-arrow {
  display: none !important;
}


/* =========================================================
   LOGOUT FORM
   ========================================================= */

/* =========================================================
   LOGOUT - FINAL ALIGNMENT
   ========================================================= */

.sidebar-footer {
  width: 100%;
  flex-shrink: 0;
  padding: 12px 18px 16px;
}

.sidebar-footer-line {
  width: 100%;
  height: 1px;
  margin: 0 0 18px 0;
  background: #e8ebf1;
}

.logout-form {
  width: 100%;
  margin: 0;
  padding: 0;
}

.logout-btn {
  width: 100%;
  height: 46px;

  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;

  padding: 0 24px !important;
  margin: 0 !important;

  gap: 12px !important;

  border: 1px solid #ffd2d2 !important;
  border-radius: 9px !important;

  background: #ffd8d8 !important;

  color: #d93636 !important;

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  line-height: 1 !important;

  text-align: left;

  cursor: pointer;

  box-sizing: border-box;

  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: #ffcaca !important;
  border-color: #ffc0c0 !important;
}


/* ICON */
.logout-icon {
  width: 20px !important;
  height: 20px !important;

  min-width: 20px !important;
  max-width: 20px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  margin: 0 !important;
  padding: 0 !important;

  flex: 0 0 20px !important;
}

.logout-icon svg {
  width: 19px !important;
  height: 19px !important;

  display: block !important;

  margin: 0 !important;
  padding: 0 !important;

  stroke: currentColor;

  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}


/* TEXT */
.logout-text {
  display: block !important;

  width: auto !important;
  height: auto !important;

  margin: 0 !important;
  padding: 0 !important;

  flex: 0 0 auto !important;

  color: currentColor !important;

  font-size: 13px !important;
  font-weight: 600 !important;

  line-height: 20px !important;

  white-space: nowrap !important;
}


/* HIDE ARROW */
.logout-arrow {
  display: none !important;
}

/* =========================================================
   LOGOUT BUTTON
   ========================================================= */

.logout-btn {
  position: relative;

  width: 100%;
  height: 43px;

  display: flex;
  align-items: center;

  margin: 0;
  padding: 0 12px;

  gap: 12px;

  border: 1px solid transparent;

  border-radius: 9px;

  background: transparent;

  color: #7a8494;

  font-family: inherit;

  font-size: 12px;
  font-weight: 650;

  text-align: left;

  cursor: pointer;

  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}


.logout-btn:hover {
  background: #fff5f5;

  border-color: #fee0e0;

  color: #dc3b3b;
}


/* =========================================================
   LOGOUT ICON
   ========================================================= */

.logout-icon {
  width: 20px;
  height: 20px;

  min-width: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}


.logout-icon svg {
  width: 18px;
  height: 18px;

  display: block;

  stroke: currentColor;

  stroke-width: 1.8;

  stroke-linecap: round;
  stroke-linejoin: round;
}


/* =========================================================
   LOGOUT TEXT
   ========================================================= */

.logout-text {
  flex: 1;

  color: currentColor;

  white-space: nowrap;
}


/* =========================================================
   LOGOUT ARROW
   ========================================================= */

.logout-arrow {
  opacity: 0;

  font-size: 16px;

  transform: translateX(-4px);

  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}


.logout-btn:hover .logout-arrow {
  opacity: 1;

  transform: translateX(0);
}


/* =========================================================
   MAIN CONTENT
   IMPORTANT:
   DO NOT USE FLEX: 1 HERE
   DO NOT USE WIDTH: CALC(...)
   ========================================================= */

.content {
    width: auto;
    min-width: 0;
    margin: 0;
    margin-left: 220px;
    padding: 29px;
    box-sizing: border-box;
    overflow-x: hidden;
}



/* =========================================================
   TOPBAR
   ========================================================= */
/* ================================
   PAGE RESET
================================ */

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}


/* ================================
   APP LAYOUT
================================ */

.app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}


/* ================================
   SIDEBAR
================================ */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;

  width: 220px;
  height: 100vh;

  margin: 0;
  padding: 0;

  background: #fff;

  border-right: 1px solid #e8ebf2;

  overflow-x: hidden;
  overflow-y: auto;

  z-index: 1000;
}


/* ================================
   MAIN AREA
================================ */

.main-content {
  position: relative;

  width: calc(100% - 220px);
  min-width: 0;

  margin-left: 220px;
  margin-top: 0;

  padding: 0;

  min-height: 100vh;

  background: #f5f6f9;

  overflow-x: hidden;
}


/* ================================
   DASHBOARD TOPBAR
================================ */

.dashboard-topbar {
  position: relative;

  width: 100%;
  height: 88px;
  min-height: 88px;

  margin: 0;
  padding: 0 28px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background: #fff;

  border-bottom: 1px solid #e8ebf2;

  z-index: 20;
}

.dashboard-topbar1{
    position: relative;
    width: auto;
    height: 64px;
    min-height: 64px;
    margin: -29px -29px 8px;
    padding: 0 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #e8ebf2;
    z-index: 20;
    top: 0;
}

/* ================================
   TITLE
================================ */

.dashboard-topbar-title {
  margin: 0;
  padding: 0;
}

.dashboard-topbar-title h2 {
  margin: 0;
  padding: 0;

  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;

  color: #263247;
}


/* ================================
   USER
================================ */

.dashboard-topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.dashboard-user-link {
  display: flex;
  align-items: center;

  height: 52px;

  padding: 0 12px 0 8px;

  text-decoration: none;

  border-radius: 12px;

  background: #f8f9fc;
}

.dashboard-user-avatar {
  width: 38px;
  height: 38px;

  flex: 0 0 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #5146c9;
  color: #fff;

  font-size: 16px;
  font-weight: 700;
}

.dashboard-user-details {
  display: flex;
  flex-direction: column;

  margin-left: 10px;
}

.dashboard-user-name {
  font-size: 14px;
  line-height: 18px;
  font-weight: 700;

  color: #263247;
}

.dashboard-user-role {
  font-size: 11px;
  line-height: 15px;
  font-weight: 500;

  color: #91a0b8;
}

.dashboard-user-chevron {
  margin-left: 12px;

  font-size: 17px;
  line-height: 1;

  color: #263247;
}


/* ================================
   DASHBOARD CONTENT
================================ */

.dashboard-content {
  width: 100%;

  margin: 0;
  padding: 28px 28px 40px;

  min-width: 0;
}


/* ================================
   REMOVE OUTER SPACING
================================ */

/* If you have these wrappers, don't give them padding */

.main-content > .container,
.main-content > .content,
.main-content > .page-content,
.main-content > .dashboard-wrapper {
  margin: 0;
  padding: 0;
  width: 100%;
}


/* ================================
   MOBILE
================================ */

@media (max-width: 900px) {

  .sidebar {
    width: 220px;
  }

  .main-content {
    width: calc(100% - 220px);
    margin-left: 220px;
  }

 

  .dashboard-content {
    padding: 24px 20px 30px;
  }
}


@media (max-width: 650px) {

  .sidebar {
    width: 70px;
  }

  .main-content {
    width: calc(100% - 70px);
    margin-left: 70px;
  }

 
  .dashboard-topbar-title h2 {
    font-size: 20px;
  }

  .dashboard-user-details,
  .dashboard-user-chevron {
    display: none;
  }

  .dashboard-user-link {
    background: transparent;
    padding: 3px;
  }

  .dashboard-content {
    padding: 18px 14px 25px;
  }
}




/* =========================================================
   DASHBOARD
   ========================================================= */

.content .dashboard {
  width: 100%;

  min-width: 0;

  max-width: none;

  box-sizing: border-box;

  overflow-x: hidden;
}


/* =========================================================
   DASHBOARD GRID
   ========================================================= */

.stats-grid {
  width: 100%;

  min-width: 0;

  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 16px;
}


.dashboard-grid {
  width: 100%;

  min-width: 0;

  display: grid;

  grid-template-columns:
    minmax(0, 2fr)
    minmax(280px, 1fr);

  gap: 16px;
}


.stat-card,
.dashboard-card {
  min-width: 0;

  max-width: 100%;
}


/* =========================================================
   TABLE WRAPPER
   ========================================================= */

.table-wrapper {
  width: 100%;

  max-width: 100%;

  min-width: 0;

  overflow-x: auto;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

}


@media (max-width: 900px) {

  .sidebar {
    width: 220px;
  }

  .content {
    margin-left: 220px;
  }

}


@media (max-width: 700px) {

  .sidebar {
    width: 68px;
  }

  .content {
    margin-left: 68px;

    padding: 20px;
  }


.sidebar-brand {
  height: 64px;
  min-height: 64px;
  padding: 0 8px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;

  border-bottom: 1px solid #e8ebf2;
}

.brand-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;

  background: #5146c9;
  color: #fff;

  font-size: 20px;
  font-weight: 800;
}

.brand-text {
  min-width: 0;
}

.brand-text h3 {
  margin: 0;

  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;

  color: #1f2937;
}

.brand-text span {
  display: block;

  margin-top: 5px;

  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;

  color: #91a0b8;

  white-space: nowrap;
}


  .sidebar-nav {
    padding: 16px 8px;
  }


  .nav-section-title {
    display: none;
  }


  .sidebar-link {
    justify-content: center;

    padding: 0;

    gap: 0;
  }


  .sidebar-link-text {
    display: none;
  }


  .sidebar-link.active::before {
    left: -8px;
  }


  .sidebar-footer {
    padding: 10px 8px 13px;
  }


  .sidebar-footer-line {
    width: calc(100% - 8px);

    margin-left: 4px;
    margin-right: 4px;
  }


  .logout-btn {
    justify-content: center;

    padding: 0;
  }


  .logout-text,
  .logout-arrow {
    display: none;
  }

}


@media (max-width: 480px) {

  .content {
    padding: 14px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

}

/* ---------- Topbar (Header) ---------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; padding: 18px 30px; margin: -30px -30px 24px -30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-bottom: 1px solid #edf2f7;
}
.topbar h2 { color: #2d3748; font-size: 20px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-user { color: #718096; font-size: 14px; }
.logout-form { margin: 0; }
.logout-btn {
  background: #fed7d7; color: #c53030; padding: 7px 16px; border-radius: 6px;
  text-decoration: none; font-size: 13px; font-weight: 500;
  border: none; cursor: pointer; display: inline-block;
}
.logout-btn:hover { background: #feb2b2; }

/* ---------- Buttons ---------- */
.btn-primary {
  background: #4c51bf; color: #fff; padding: 10px 18px; border: none; border-radius: 6px;
  text-decoration: none; font-size: 14px; cursor: pointer; display: inline-block;
}
.btn-primary:hover { background: #434190; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* ---------- Leads Page Header ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: 0 0 8px;
  min-height: 0;
}
.page-header .page-title,
.influencer-page-header .page-title {
  display: none;
}
.page-header .view-actions {
  margin-bottom: 0;
}
.page-title { font-size: 22px; color: #1a202c; }

/* ---------- Filter Bar ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; padding: 16px 20px; border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin-bottom: 20px;
}
.search-input {
  flex: 1 1 260px; min-width: 220px; padding: 10px 14px; font-size: 14px;
  border: 1px solid #e2e8f0; border-radius: 6px; color: #2d3748;
}
.search-input:focus { outline: none; border-color: #4c51bf; box-shadow: 0 0 0 3px rgba(76,81,191,0.12); }

.filter-select {
  padding: 10px 30px 10px 12px; font-size: 14px; color: #2d3748;
  background-color: #fff; border: 1px solid #e2e8f0; border-radius: 6px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6z' fill='%23718096'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
  cursor: pointer; min-width: 150px; transition: border-color .15s ease, box-shadow .15s ease;
}
.filter-select:hover { border-color: #cbd5e0; }
.filter-select:focus { outline: none; border-color: #4c51bf; box-shadow: 0 0 0 3px rgba(76,81,191,0.12); }

.btn-filter {
  background: #4c51bf; color: #fff; border: none; padding: 10px 22px;
  border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-filter:hover { background: #434190; }

.btn-reset {
  background: #edf2f7; color: #4a5568; padding: 10px 18px; border-radius: 6px;
  text-decoration: none; font-size: 14px; font-weight: 500;
}
.btn-reset:hover { background: #e2e8f0; }

.results-count { font-size: 13px; color: #a0aec0; margin-left: auto; white-space: nowrap; }

/* ---------- Leads Table ---------- */
.table-wrapper { background: #fff; border-radius: 10px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); overflow-x: auto; }
.leads-table { width: 100%; border-collapse: collapse; min-width: 950px; }
.leads-table th {
  text-align: left; background: #f8f9fb; color: #4a5568; font-size: 13px;
  padding: 14px 16px; border-bottom: 1px solid #edf2f7; white-space: nowrap;
}
.leads-table td {
  padding: 14px 16px; font-size: 14px; color: #2d3748; border-bottom: 1px solid #f1f3f5; white-space: nowrap;
}
.leads-table tr:hover td { background: #f9fafc; }
.empty-row { text-align: center; color: #a0aec0; padding: 30px !important; }

.lead-id { font-weight: 600; color: #4c51bf; }

.status-badge {
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; text-transform: capitalize;
  background: #edf2f7; color: #4a5568;
}
.status-new { background: #ebf8ff; color: #2b6cb0; }
.status-contacted { background: #fefcbf; color: #975a16; }
.status-interested { background: #e6fffa; color: #285e61; }
.status-not-interested { background: #fed7d7; color: #c53030; }
.status-converted { background: #c6f6d5; color: #276749; }

.priority-badge {
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
}
.priority-high { background: #fed7d7; color: #c53030; }
.priority-medium { background: #feebc8; color: #9c4221; }
.priority-low { background: #e2e8f0; color: #4a5568; }

/* ---------- Icon Action Buttons ---------- */
.actions-cell { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; border: none;
  cursor: pointer; text-decoration: none; transition: background .15s ease, transform .1s ease;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:active { transform: translateY(1px); }

.icon-view   { background: #ebf8ff; color: #2b6cb0; }
.icon-view:hover   { background: #d3ecff; }
.icon-call { background: #e8f8ee; color: #16a34a; }
.icon-call:hover { background: #d3f3de; }
.icon-call.is-calling,
.call-btn.is-calling,
.btn-call.is-calling {
  opacity: 0.55;
  pointer-events: none;
}
.icon-whatsapp { background: #e8f8ee; color: #25d366; }
.icon-whatsapp:hover { background: #d3f5df; }
.icon-edit   { background: #fefcbf; color: #975a16; }
.icon-edit:hover   { background: #fdf3a0; }
.icon-delete { background: #fed7d7; color: #c53030; }
.icon-delete:hover { background: #feb2b2; }

.inline-form { display: inline; }

/* ---------- Forms (Add/Edit Lead) ---------- */
.lead-form { background: #fff; border-radius: 10px; padding: 24px 30px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.form-section { margin-bottom: 28px; }
.form-section h3 {
  font-size: 15px; color: #4c51bf; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid #edf2f7;
}
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 13px; color: #4a5568; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  padding: 9px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 14px; font-family: inherit;
}
.form-group textarea { min-height: 60px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: #4c51bf;
}
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 10px; }

/* ---------- View Lead Detail ---------- */
.view-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-bottom: 20px; }

.detail-card { background: #fff; border-radius: 10px; padding: 24px 30px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); margin-bottom: 20px; }
.detail-card h3 { font-size: 15px; color: #4c51bf; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid #edf2f7; }

.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 35px; }
.detail-grid .full-width { grid-column: 1 / -1; }
.detail-grid span { display: block; font-size: 12px; color: #a0aec0; margin-bottom: 5px; }
.detail-grid p { margin: 0; font-size: 14px; color: #2d3748; font-weight: 500; line-height: 1.5; }

.profile-link { color: #4c51bf; text-decoration: none; word-break: break-all; }
.profile-link:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .detail-grid { grid-template-columns: 1fr; }
  .view-actions { flex-direction: column; align-items: stretch; }
}

/* ---------- Delete Confirmation Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(26, 32, 44, 0.55);
  align-items: center; justify-content: center;
  z-index: 1000;
}
.modal-overlay.active { display: flex; }

.modal-box {
  background: #fff; border-radius: 14px; padding: 28px 32px;
  width: 420px; max-width: 90vw;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modal-icon {
  width: 44px; height: 44px; border-radius: 50%;
  background: #fed7d7; color: #c53030;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.modal-icon svg { width: 22px; height: 22px; }

/* Info-style icon (used for non-destructive modals, e.g. Assign Leads) */
.modal-icon-info {
  width: 44px; height: 44px; border-radius: 50%;
  background: #e9e5ff; color: #4c51bf;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
  overflow: hidden;
}
.modal-icon-info svg { width: 22px; height: 22px; }

.modal-title { font-size: 18px; font-weight: 700; color: #1a202c; margin-bottom: 8px; }
.modal-message { font-size: 14px; color: #718096; line-height: 1.5; margin-bottom: 22px; }

.modal-actions { display: flex; justify-content: flex-end; gap: 12px; }
.btn-modal-cancel {
  background: #fff; color: #2d3748; border: 1px solid #e2e8f0;
  padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-modal-cancel:hover { background: #f7fafc; }

.btn-modal-confirm {
  background: #e53e3e; color: #fff; border: none;
  padding: 9px 18px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-modal-confirm:hover { background: #c53030; }


/* =========================================================
   INFLUENCER - ADD / EDIT FORM
   ========================================================= */

.influencer-page {
  width: 100%;
}

/* Page Header */
.influencer-page-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.influencer-page-header .page-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #1a202c;
}

/* Main Form */
.influencer-form {
  width: 100%;
  background: #fff;
  border-radius: 10px;
  padding: 26px 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Section */
.influencer-form-section {
  margin-bottom: 30px;
}

.influencer-section-title {
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f7;

  color: #2d3748;
  font-size: 16px;
  font-weight: 600;
}

/* 3 Column Grid */
.influencer-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 18px;
}

/* Form Group */
.influencer-form-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Labels */
.influencer-form-group label {
  display: block;
  margin-bottom: 6px;

  color: #4a5568;
  font-size: 13px;
  font-weight: 500;
}

.influencer-form-group label span {
  color: #e53e3e;
}

/* Inputs / Select */
.influencer-form-group input,
.influencer-form-group select,
.influencer-form-group textarea {
  width: 100%;
  height: 40px;

  padding: 9px 11px;

  border: 1px solid #e2e8f0;
  border-radius: 6px;

  background: #fff;
  color: #2d3748;

  font-family: inherit;
  font-size: 14px;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

/* Focus */
.influencer-form-group input:focus,
.influencer-form-group select:focus,
.influencer-form-group textarea:focus {
  outline: none;

  border-color: #4c51bf;

  box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.10);
}

/* Placeholder */
.influencer-form-group input::placeholder,
.influencer-form-group textarea::placeholder {
  color: #a0aec0;
}

/* Auto Generated ID */
.influencer-form-group input:disabled {
  background: #f7fafc;
  color: #718096;
  cursor: not-allowed;
}

/* Small Help Text */
.influencer-form-group small {
  margin-top: 5px;

  color: #a0aec0;
  font-size: 11px;
  line-height: 1.4;
}

/* Select */
.influencer-form-group select {
  cursor: pointer;
}

/* Checkbox */
.influencer-checkbox-group {
  justify-content: flex-start;
}

.influencer-checkbox-label {
  display: flex !important;
  align-items: center;

  gap: 8px;

  height: 40px;

  margin: 0 !important;

  color: #4a5568 !important;

  font-size: 13px !important;
  font-weight: 400 !important;

  cursor: pointer;
}

.influencer-checkbox-label input {
  width: 16px !important;
  height: 16px !important;

  padding: 0 !important;
  margin: 0;

  accent-color: #4c51bf;

  cursor: pointer;
}

/* Bottom Actions */
.influencer-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;

  gap: 12px;

  margin-top: 8px;
  padding-top: 20px;

  border-top: 1px solid #edf2f7;
}

/* Cancel / Back Button */
.influencer-btn-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 40px;

  padding: 0 18px;

  background: #edf2f7;
  color: #4a5568;

  border: none;
  border-radius: 6px;

  text-decoration: none;

  font-size: 14px;
  font-weight: 500;

  cursor: pointer;

  transition: background 0.15s ease;
}

.influencer-btn-cancel:hover {
  background: #e2e8f0;
}

/* Save Button */
.influencer-btn-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 40px;

  padding: 0 20px;

  background: #4c51bf;
  color: #fff;

  border: none;
  border-radius: 6px;

  font-size: 14px;
  font-weight: 600;

  cursor: pointer;

  transition: background 0.15s ease;
}

.influencer-btn-save:hover {
  background: #434190;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

  .influencer-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}


@media (max-width: 700px) {

  .influencer-form {
    padding: 20px;
  }

  .influencer-form-grid {
    grid-template-columns: 1fr;
  }

  .influencer-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .influencer-form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .influencer-btn-cancel,
  .influencer-btn-save {
    width: 100%;
  }

}

/* ---------- Pagination (Previous / Page X of Y / Next) ---------- */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.page-nav-btn {
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #2d3748;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background .15s ease, border-color .15s ease;
}

.page-nav-btn:hover:not(:disabled) {
  background: #f7fafc;
  border-color: #cbd5e0;
}

.page-nav-btn:disabled {
  color: #cbd5e0;
  background: #f7fafc;
  cursor: not-allowed;
}

.page-info {
  font-size: 14px;
  color: #2d3748;
  font-weight: 500;
}

/* ---------- Unified Card Wrapper (like Returns Management) ---------- */
.influencer-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  padding: 24px 24px 8px;
}

.influencer-card .filter-bar {
  background: transparent;
  box-shadow: none;
  padding: 0 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid #edf2f7;
}

.influencer-card .table-wrapper {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.influencer-card .pagination-bar {
  background: transparent;
  box-shadow: none;
  border-top: 1px solid #edf2f7;
  border-radius: 0;
  margin-top: 0;
  padding: 16px 0;
}

/* ---------- Staff Permissions ---------- */

.permission-table {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #edf2f7;
}

.permission-table .leads-table {
  min-width: 600px;
}

.permission-table th,
.permission-table td {
  text-align: center;
}

.permission-table th:first-child,
.permission-table td:first-child {
  text-align: left;
}

.permission-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}


/* ---------- Lead Access ---------- */

.lead-access-options {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  min-width: 230px;
}

.radio-option:hover {
  border-color: #4c51bf;
  background: #f8f9ff;
}

.radio-option input {
  margin-top: 3px;
}

.radio-option span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.radio-option strong {
  color: #2d3748;
  font-size: 14px;
}

.radio-option small {
  color: #718096;
  font-size: 12px;
}


/* ---------- Selected Leads ---------- */

.selected-leads-box {
  border: 1px solid #edf2f7;
  padding: 18px;
  border-radius: 8px;
  background: #fafbfc;
}

.lead-selection-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 14px;
}

.lead-selection-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-bottom: 1px solid #edf2f7;
  cursor: pointer;
}

.lead-selection-item:hover {
  background: #f8f9fb;
}

.lead-selection-item input {
  width: 16px;
  height: 16px;
}

.lead-selection-item span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lead-selection-item strong {
  color: #4c51bf;
  font-size: 13px;
}

.lead-selection-item small {
  color: #718096;
  font-size: 12px;
}

/* =========================================
   Password Field
========================================= */

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);

  min-width: 40px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;
  background: transparent;

  color: #4c51bf;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;

  padding: 0 4px;
}

.password-toggle:hover {
  color: #4f46e5;
}

.password-toggle:focus {
  outline: none;
}


/* =========================================
   Staff Module Permissions
========================================= */

.permissions-table {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.permission-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, 100px);

  align-items: center;

  min-height: 64px;

  border-bottom: 1px solid #edf2f7;
}

.permission-row:last-child {
  border-bottom: none;
}

.permission-header {
  background: #f8fafc;

  font-size: 13px;
  font-weight: 700;

  color: #64748b;

  text-align: center;
}

.permission-header .permission-module {
  text-align: left;
}

.permission-module {
  padding-left: 20px;

  font-size: 15px;
  font-weight: 600;

  color: #334155;
}

.permission-row > label {
  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}

.permission-row input[type="checkbox"] {
  width: 18px;
  height: 18px;

  cursor: pointer;

  accent-color: #4f46c5;
}

.permission-disabled {
  text-align: center;

  color: #cbd5e1;

  font-size: 18px;
}

/* =========================================
   Staff — add / edit / view extras
========================================= */

.staff-section-subtitle {
  margin: -8px 0 18px;
  color: #718096;
  font-size: 13px;
}

.staff-permission-block {
  border: 1px solid #edf2f7;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.staff-permission-block:last-child {
  margin-bottom: 0;
}

.staff-permission-title {
  background: #f8fafc;
  padding: 12px 16px;
  border-bottom: 1px solid #edf2f7;
  font-size: 14px;
  font-weight: 700;
  color: #2d3748;
}

.staff-permission-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
}

.staff-permission-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
}

.staff-permission-item:hover {
  border-color: #4c51bf;
  background: #f8f9ff;
}

.staff-permission-item input {
  width: 16px;
  height: 16px;
  accent-color: #4c51bf;
  cursor: pointer;
}

.staff-permission-badge {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 7px;
  border: 1px solid #e9d8fd;
  background: #f5f3ff;
  color: #4c51bf;
  font-size: 13px;
  font-weight: 600;
}

.staff-radio-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.staff-lead-search {
  margin-bottom: 12px;
}

.staff-lead-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  color: #2d3748;
}

.staff-lead-search input:focus {
  outline: none;
  border-color: #4c51bf;
  box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.10);
}

.staff-lead-table-wrapper {
  border: 1px solid #edf2f7;
  border-radius: 10px;
  overflow: auto;
  max-height: 360px;
}

.staff-lead-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.staff-lead-table th {
  background: #f8fafc;
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #4a5568;
  border-bottom: 1px solid #edf2f7;
  position: sticky;
  top: 0;
  z-index: 1;
}

.staff-lead-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f1f3;
  font-size: 14px;
  color: #2d3748;
}

.staff-lead-table tr:last-child td {
  border-bottom: none;
}

.staff-lead-table tr:hover td {
  background: #fafafa;
}

.staff-lead-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #4c51bf;
  cursor: pointer;
}

.staff-lead-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staff-lead-item {
  border: 1px solid #edf2f7;
  border-radius: 9px;
  padding: 14px 16px;
}

.staff-lead-item strong {
  display: block;
  color: #2d3748;
  font-size: 14px;
}

.staff-lead-item small {
  display: block;
  margin-top: 4px;
  color: #718096;
  font-size: 12px;
}

.staff-empty {
  text-align: center;
  padding: 24px;
  color: #718096;
  background: #f7fafc;
  border-radius: 8px;
  font-size: 14px;
}

.leads-container {
  margin-top: 4px;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  overflow: hidden;
}

.leads-header {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
}

.lead-count {
  color: #718096;
  font-size: 12px;
  font-weight: 500;
}

.leads-list {
  max-height: 350px;
  overflow-y: auto;
}

.lead-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
}

.lead-row:last-child {
  border-bottom: 0;
}

.lead-row:hover {
  background: #f8f9fb;
}

.lead-row input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #4c51bf;
}

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

.lead-name {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
}

.lead-details {
  margin-top: 3px;
  font-size: 12px;
  color: #718096;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.no-leads {
  padding: 24px;
  text-align: center;
  color: #718096;
  font-size: 14px;
}

@media (max-width: 700px) {
  .staff-radio-row {
    flex-direction: column;
  }
}

.lead-selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  margin-bottom: 16px;
  background: #f5f3ff;
  border: 1px solid #e9d8fd;
  border-radius: 8px;
  font-size: 14px;
  color: #4a5568;
}

.lead-selection-bar strong {
  color: #4c51bf;
}

/* ---------- Toast Notifications ---------- */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  font-size: 14px;
  font-weight: 500;
  color: #2d3748;
  border-left: 4px solid #4c51bf;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}
.toast-icon svg { width: 13px; height: 13px; }

.toast.toast-success { border-left-color: #276749; }
.toast.toast-success .toast-icon { background: #c6f6d5; color: #276749; }

.toast.toast-error { border-left-color: #c53030; }
.toast.toast-error .toast-icon { background: #fed7d7; color: #c53030; }

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #a0aec0;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}
.toast-close:hover { color: #718096; }

.bulk-upload-modal {
  width: 560px;
  max-width: 95%;
}

.bulk-drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 32px 20px;
  text-align: center;
  margin: 20px 0;
  transition: 0.2s ease;
}

.bulk-drop-zone.dragging {
  border-color: #4c51bf;
  background: #f8f8ff;
}

.bulk-upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
}

.bulk-upload-icon svg {
  width: 100%;
  height: 100%;
}

.bulk-drop-zone h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.bulk-drop-zone p {
  margin: 5px 0 12px;
  color: #6b7280;
}

.bulk-drop-zone small {
  display: block;
  margin-top: 14px;
  color: #6b7280;
}

.bulk-selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 15px;
}

.bulk-selected-file button {
  border: 0;
  background: transparent;
  color: #dc2626;
  cursor: pointer;
  font-weight: 600;
}

.preview-table {
  min-width: 1100px;
  width: 100%;
}

/* =========================================================
   BULK LEAD UPLOAD — Step Indicator, Mapping & Review
   ========================================================= */

.bulk-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.bulk-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #a0aec0;
}

.bulk-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #edf2f7;
  color: #718096;
  font-size: 11px;
}

.bulk-step.active { color: #4c51bf; }
.bulk-step.active .bulk-step-number { background: #4c51bf; color: #fff; }

.bulk-step.done .bulk-step-number { background: #c6f6d5; color: #276749; }

.bulk-step-line {
  width: 36px;
  height: 1px;
  background: #e2e8f0;
}

.bulk-main-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e9e5ff;
  color: #4c51bf;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.bulk-main-icon svg { width: 22px; height: 22px; }

.bulk-choose-btn {
  display: inline-block;
  cursor: pointer;
}

/* ---------- Step 2: Column Mapping ---------- */
.mapping-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #718096;
  margin-bottom: 12px;
}
.mapping-file-info strong { color: #2d3748; }
.mapping-row-count { margin-left: auto; color: #a0aec0; }

.mapping-table-wrapper {
  border: 1px solid #edf2f7;
  border-radius: 10px;
  overflow: auto;
  max-height: 320px;
  margin-bottom: 14px;
}

.mapping-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 480px;
}

.mapping-table th {
  background: #f8fafc;
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #4a5568;
  border-bottom: 1px solid #edf2f7;
  position: sticky;
  top: 0;
  z-index: 1;
}

.mapping-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f1f3;
  font-size: 13px;
  color: #2d3748;
}

.mapping-table tr:last-child td { border-bottom: none; }

.mapping-column-name { font-weight: 600; }
.mapping-sample { color: #a0aec0; }

.mapping-select {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  color: #2d3748;
  background: #fff;
}
.mapping-select:focus { outline: none; border-color: #4c51bf; box-shadow: 0 0 0 3px rgba(76,81,191,0.10); }

/* ---------- Step 3: Review & Import ---------- */
.review-summary {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.review-pill {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.review-pill-total { background: #edf2f7; color: #4a5568; }
.review-pill-valid { background: #c6f6d5; color: #276749; }
.review-pill-duplicate { background: #feebc8; color: #9c4221; }
.review-pill-invalid { background: #fed7d7; color: #c53030; }

.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: #718096;
}

.review-link-btn {
  background: none;
  border: none;
  color: #4c51bf;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 10px;
}
.review-link-btn:hover { text-decoration: underline; }

.review-table-wrapper {
  border: 1px solid #edf2f7;
  border-radius: 10px;
  overflow: auto;
  max-height: 420px;
  margin-bottom: 12px;
}
.review-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  table-layout: fixed;
}

.review-table th:nth-child(1),
.review-table td:nth-child(1) { width: 36px; }   /* checkbox */
.review-table th:nth-child(2),
.review-table td:nth-child(2) { width: 44px; }   /* # */
.review-table th:nth-child(3),
.review-table td:nth-child(3) { width: 100px; }  /* status */
.review-table th:nth-child(4),
.review-table td:nth-child(4) { width: 140px; }  /* name */
.review-table th:nth-child(5),
.review-table td:nth-child(5) { width: 140px; }  /* mobile */
.review-table th:nth-child(6),
.review-table td:nth-child(6) { width: auto; }   /* details — gets the rest */

.review-table th {
  background: #f8fafc;
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #4a5568;
  border-bottom: 1px solid #edf2f7;
  position: sticky;
  top: 0;
  z-index: 1;
}

.review-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f1f3;
  font-size: 13px;
  color: #2d3748;
  vertical-align: middle;
}

.review-table tr:last-child td { border-bottom: none; }

.review-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #4c51bf;
  cursor: pointer;
}

.review-badge {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}
.review-badge-valid { background: #c6f6d5; color: #276749; }
.review-badge-duplicate { background: #feebc8; color: #9c4221; }
.review-badge-invalid { background: #fed7d7; color: #c53030; }

.review-detail-cell {
  color: #718096;
  font-size: 12px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
}

.review-row-invalid td { background: #fff5f5; }
.review-row-duplicate td { background: #fffaf0; }

.remove-file-btn {
  border: 0;
  background: transparent;
  color: #dc2626;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.page-header-back {
  display: flex;
  justify-content: flex-end;
  padding: 12px 24px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #4c51bf;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-back:hover {
  background: #f5f6ff;
  border-color: #4c51bf;
}

.btn-back svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-call,
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-call {
  background: #16a34a;
  color: #fff;
  border: none;
}

.btn-call:hover {
  opacity: 0.9;
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
}

.btn-whatsapp:hover {
  opacity: 0.9;
}


/* =====================================================
   NOTES SECTION
===================================================== */

.notes-card {
  margin-top: 20px;
}

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid #edf0f5;
}

.notes-header h3 {
  margin: 0;
  color: #4f46c5;
  font-size: 18px;
  font-weight: 700;
}

.notes-subtitle {
  margin: 5px 0 0;
  color: #94a3b8;
  font-size: 13px;
}
/* =========================================================
   WELFOG — PREMIUM NOTES SECTION
   ========================================================= */

.notes-card {
  margin-top: 22px;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e7eaf2;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(31, 41, 55, 0.04);
}

/* =========================
   NOTES HEADER
   ========================= */

.notes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 17px;
  border-bottom: 1px solid #eef1f5;
}

.notes-header h3 {
  margin: 0;
  color: #242c3d;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: -0.25px;
}

.notes-header h3::before {
  content: "✎";
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;
  margin-right: 10px;

  vertical-align: -8px;

  border-radius: 9px;
  background: #f0efff;
  color: #5148c8;

  font-size: 15px;
}

.notes-subtitle {
  margin: 7px 0 0;
  padding-left: 40px;

  color: #919aaa;
  font-size: 12px;
  line-height: 1.4;
}


/* =========================
   ADD NOTE FORM
   ========================= */

.add-note-form {
  margin: 18px 20px 0;
  padding: 15px;

  background: #f8f9fc;
  border: 1px solid #e5e9f1;
  border-radius: 12px;
}

.note-textarea {
  display: block;

  width: 100%;
  min-height: 105px;

  box-sizing: border-box;
  padding: 14px 15px;

  resize: vertical;

  border: 1px solid #dce1eb;
  border-radius: 9px;

  outline: none;

  background: #ffffff;
  color: #273144;

  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;

  transition:
    border-color .18s ease,
    box-shadow .18s ease;
}

.note-textarea::placeholder {
  color: #a0a9b8;
}

.note-textarea:hover {
  border-color: #cfd5e2;
}

.note-textarea:focus {
  border-color: #5a52cf;

  box-shadow:
    0 0 0 3px rgba(90, 82, 207, .09);
}

.note-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;
  margin-top: 12px;
}

.note-hint {
  color: #8d97a7;
  font-size: 11px;
  line-height: 1.4;
}

.btn-add-note {
  min-width: 105px;
  height: 38px;

  padding: 0 15px;

  border: 0;
  border-radius: 8px;

  background: #5148c8;
  color: #ffffff;

  font-size: 12px;
  font-weight: 700;

  cursor: pointer;

  box-shadow:
    0 4px 10px rgba(81, 72, 200, .16);

  transition:
    transform .16s ease,
    background .16s ease,
    box-shadow .16s ease;
}

.btn-add-note:hover {
  background: #453cb8;

  box-shadow:
    0 6px 14px rgba(81, 72, 200, .22);

  transform: translateY(-1px);
}

.btn-add-note:active {
  transform: translateY(0);
}


/* =========================
   NOTES LIST
   ========================= */

.notes-list {
  display: flex;
  flex-direction: column;

  gap: 10px;

  margin: 18px 20px 20px;
}


/* =========================
   INDIVIDUAL NOTE CARD
   ========================= */

.note-item {
  position: relative;

  padding: 17px 18px;

  background: #ffffff;

  border: 1px solid #e7eaf1;
  border-radius: 11px;

  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    transform .18s ease;
}

/* Purple left accent */

.note-item::before {
  content: "";

  position: absolute;

  left: 0;
  top: 13px;
  bottom: 13px;

  width: 3px;

  border-radius: 0 4px 4px 0;

  background: #5a52cf;

  opacity: .85;
}

.note-item:hover {
  border-color: #d7d9ed;

  box-shadow:
    0 7px 20px rgba(31, 41, 55, .055);

  transform: translateY(-1px);
}


/* =========================
   NOTE TOP ROW
   ========================= */

.note-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;

  gap: 16px;
}


/* =========================
   USER / AUTHOR
   ========================= */

.note-user {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 10px;
}

.note-avatar {
  width: 36px;
  height: 36px;

  min-width: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #dedcff;
  border-radius: 50%;

  background: #f1f0ff;

  color: #5148c8;

  font-size: 13px;
  font-weight: 800;
}

.note-user-info {
  min-width: 0;
}

.note-user strong {
  display: block;

  overflow: hidden;

  color: #263043;

  font-size: 12px;
  font-weight: 750;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-date {
  display: block;

  margin-top: 3px;

  color: #9aa4b4;

  font-size: 10px;
}


/* =========================
   EDIT / DELETE BUTTONS
   ========================= */

.note-actions {
  display: flex;
  align-items: center;

  gap: 7px;

  flex-shrink: 0;
}

.note-edit-btn,
.note-delete-btn {
  height: 34px;

  padding: 0 11px;

  border-radius: 8px;

  font-family: inherit;
  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background .16s ease,
    border-color .16s ease,
    color .16s ease,
    transform .16s ease;
}

.note-edit-btn {
  border: 1px solid #dfe2f1;

  background: #ffffff;

  color: #5148c8;
}

.note-edit-btn:hover {
  border-color: #bdb9ec;

  background: #f5f4ff;

  transform: translateY(-1px);
}

.note-delete-btn {
  border: 1px solid #f0d5d5;

  background: #fffafa;

  color: #dc3b3b;
}

.note-delete-btn:hover {
  border-color: #efbcbc;

  background: #fff2f2;

  transform: translateY(-1px);
}


/* =========================
   NOTE CONTENT
   ========================= */

.note-content {
  margin-top: 14px;

  padding: 13px 14px 13px 47px;

  color: #4d586b;

  background: #fafbfc;

  border: 1px solid #f0f2f5;

  border-radius: 9px;

  font-size: 13px;

  line-height: 1.65;

  white-space: pre-wrap;

  word-break: break-word;
}


/* =========================
   EMPTY NOTES
   ========================= */

.no-notes,
.notes-empty {
  margin: 18px 20px 20px;

  padding: 30px 20px;

  border: 1px dashed #dfe3ec;

  border-radius: 11px;

  background: #fafbfc;

  color: #98a2b1;

  text-align: center;

  font-size: 12px;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 768px) {

  .notes-header {
    padding: 17px 15px 15px;
  }

  .notes-header h3 {
    font-size: 16px;
  }

  .notes-subtitle {
    padding-left: 0;
    margin-top: 6px;
  }

  .notes-header h3::before {
    width: 27px;
    height: 27px;

    margin-right: 8px;
  }


  .add-note-form {
    margin: 14px 14px 0;
    padding: 12px;
  }

  .note-textarea {
    min-height: 100px;

    font-size: 13px;
  }

  .note-form-footer {
    flex-direction: column;

    align-items: stretch;
  }

  .note-hint {
    display: none;
  }

  .btn-add-note {
    width: 100%;
  }


  .notes-list {
    margin: 14px;

    gap: 9px;
  }

  .note-item {
    padding: 14px;
  }


  .note-item-header {
    align-items: flex-start;
  }


  .note-actions {
    gap: 5px;
  }


  .note-edit-btn,
  .note-delete-btn {
    width: 34px;

    padding: 0;

    font-size: 0;
  }

  .note-edit-btn::before {
    content: "✎";

    font-size: 14px;
  }

  .note-delete-btn::before {
    content: "×";

    font-size: 18px;
  }


  .note-content {
    padding: 11px 12px;

    margin-top: 12px;

    font-size: 12px;
  }
}
/* =====================================================
   EDIT NOTE MODAL
===================================================== */

.note-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
}

.note-modal-overlay.show {
  display: flex;
}

.note-modal {
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.20);
  overflow: hidden;
}

.note-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid #edf0f5;
}

.note-modal-header h3 {
  margin: 0;
  color: #1f2937;
  font-size: 19px;
}

.note-modal-header p {
  margin: 5px 0 0;
  color: #94a3b8;
  font-size: 12px;
}

.note-modal-close {
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.note-modal form {
  padding: 20px 22px;
}

.note-form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.note-form-group label {
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.note-form-group textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 130px;
  padding: 12px;
  border: 1px solid #d9dee8;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
}

.note-form-group textarea:focus {
  border-color: #4f46c5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.10);
}

.note-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf0f5;
}

/* =====================================================
   CALL OUTCOME MODAL
===================================================== */

.call-outcome-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.55);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.call-outcome-modal.show {
  display: flex;
}

.call-outcome-modal-box {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.20);
}

.call-outcome-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.call-outcome-modal-header h3 {
  margin: 0;
  font-size: 20px;
  color: #1f2937;
}

.call-outcome-close {
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  color: #64748b;
  line-height: 1;
}

.call-outcome-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.call-outcome-select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d9dee8;
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
  color: #1f2937;
  outline: none;
}

.call-outcome-select:focus {
  border-color: #4f46c5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.10);
}

.call-outcome-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.call-outcome-cancel {
  border: 1px solid #d9dee8;
  background: #fff;
  color: #374151;
  padding: 10px 16px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
}

.call-outcome-save {
  border: none;
  background: #4f46c5;
  color: #fff;
  padding: 10px 16px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
}

.call-outcome-save:hover {
  background: #4338ca;
}

/* =====================================================
   DELETE NOTE MODAL
===================================================== */

.delete-note-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
}

.delete-note-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.delete-note-modal {
  width: min(460px, calc(100% - 32px));
  background: #ffffff;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  transform: translateY(15px) scale(0.97);
  transition: transform 0.2s ease;
}

.delete-note-modal-overlay.show .delete-note-modal {
  transform: translateY(0) scale(1);
}

.delete-note-icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  font-size: 25px;
}

.delete-note-modal h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
}

.delete-note-modal p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #64748b;
}

.delete-note-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.delete-note-cancel {
  min-width: 105px;
  padding: 11px 20px;
  border: 1px solid #d7deea;
  border-radius: 9px;
  background: #ffffff;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.delete-note-cancel:hover {
  background: #f8fafc;
}

.delete-note-confirm {
  min-width: 105px;
  padding: 11px 20px;
  border: none;
  border-radius: 9px;
  background: #ef4444;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.delete-note-confirm:hover {
  background: #dc2626;
}

@media (max-width: 600px) {
  .delete-note-modal {
    padding: 24px;
    border-radius: 16px;
  }

  .delete-note-actions {
    flex-direction: column-reverse;
    width: 100%;
  }

  .delete-note-cancel,
  .delete-note-confirm,
  #deleteNoteForm {
    width: 100%;
  }
}

/* ==========================================
   LEAD HISTORY / ACTIVITY
========================================== */

.activity-card {
  margin-top: 24px;
  padding: 32px 40px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(30, 40, 70, 0.06);
}

.activity-header {
  padding-bottom: 20px;
  border-bottom: 1px solid #edf0f7;
}

.activity-header h3 {
  margin: 0;
  color: #4f46c5;
  font-size: 24px;
  font-weight: 700;
}

.activity-subtitle {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 15px;
}

.activity-list {
  margin-top: 24px;
}

.activity-item {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid #eef1f6;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: #eef0ff;
  color: #5146c9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
}

.activity-body {
  flex: 1;
  min-width: 0;   /* prevents flex children from overflowing their parent */
}

.activity-item {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid #eef1f6;
  min-width: 0;
}
.activity-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.activity-title strong {
  color: #273142;
  font-size: 16px;
}

.activity-date {
  color: #9aa9bd;
  font-size: 13px;
  white-space: nowrap;
}

.activity-description {
  margin-top: 10px;
  color: #526174;
  font-size: 15px;
  line-height: 1.6;
}

.no-activity {
  text-align: center;
  padding: 45px 20px;
}

.no-activity-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.no-activity strong {
  display: block;
  color: #344054;
  font-size: 16px;
}

.no-activity p {
  margin-top: 6px;
  color: #98a6b9;
  font-size: 14px;
}

.activity-list {
  margin-top: 24px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.activity-list::-webkit-scrollbar {
  width: 6px;
}
.activity-list::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 6px;
}
.activity-list::-webkit-scrollbar-track {
  background: transparent;
}

/* Only shown when there are more activities than the initial limit */
.activity-list.collapsed .activity-item.hidden-activity {
  display: none;
}

.activity-toggle-wrap {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eef1f6;
}

.activity-toggle-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4f46c5;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.activity-toggle-btn:hover {
  background: #f5f6ff;
  border-color: #4f46c5;
}

/* =====================================================
   ADD THESE TO YOUR MAIN CSS FILE
   (append near your existing .activity-* rules)
===================================================== */

/* ---------- Note delete button (fixes overflow bug) ---------- */
.note-delete-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  border: 1px solid #fecaca;
  background: #fff1f1;
  color: #e53935;

  padding: 8px 14px;
  border-radius: 8px;

  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
  white-space: nowrap;

  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.note-delete-btn:hover {
  background: #ffe0e0;
  border-color: #e53935;
}

.note-delete-btn:active {
  transform: translateY(1px);
}

.note-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

/* ---------- Activity list scroll + show more/less ---------- */
.activity-list {
  margin-top: 24px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.activity-list::-webkit-scrollbar {
  width: 6px;
}
.activity-list::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 6px;
}
.activity-list::-webkit-scrollbar-track {
  background: transparent;
}

.activity-list.collapsed .activity-item.hidden-activity {
  display: none;
}

.activity-toggle-wrap {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eef1f6;
}

.activity-toggle-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #4f46c5;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.activity-toggle-btn:hover {
  background: #f5f6ff;
  border-color: #4f46c5;
}

/* ---------- Activity change rows (splits "changed from X to Y") ---------- */
.activity-changes {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.activity-changes {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.activity-change-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 14px;
  background: #f8f9fc;
  border: 1px solid #eef1f6;
  border-radius: 8px;
  font-size: 13.5px;
  color: #3d485c;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.activity-change-row::before {
  content: "•";
  color: #7c6fe0;
  font-weight: 700;
  flex-shrink: 0;
}

.activity-change-field {
  font-weight: 600;
  color: #2d3748;
}

.activity-change-old {
  color: #c53030;
  text-decoration: line-through;
  text-decoration-color: #f8b4b4;
}

.activity-change-new {
  color: #276749;
  font-weight: 600;
}

.activity-change-arrow {
  color: #a0aec0;
  padding: 0 2px;
}

@media (max-width: 700px) {
  .activity-change-row {
    flex-wrap: wrap;
  }
}

/* ---------- Bulk Upload: selected file row ---------- */
.bulk-file-details {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bulk-file-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4c51bf;
  background: #eef0ff;
  border-radius: 8px;
  flex-shrink: 0;
}

.bulk-file-icon svg {
  width: 20px;
  height: 20px;
}

.bulk-file-name {
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  word-break: break-all;
}

.bulk-file-size {
  font-size: 12px;
  color: #a0aec0;
  margin-top: 2px;
}

/* ---------- Bulk Upload Modal: header + close button ---------- */
.bulk-upload-modal {
  position: relative;
}

.bulk-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border: none;
  background: #f7fafc;
  color: #718096;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.bulk-modal-close:hover {
  background: #edf2f7;
  color: #2d3748;
}

/* ---------- Activity: Note content box (for Note Added/Edited/Deleted) ---------- */
.activity-note-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f8f9fc;
  border: 1px solid #eef1f6;
  border-left: 3px solid #7c6fe0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #3d485c;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.activity-note-box.deleted {
  border-left-color: #e53935;
  color: #a0aec0;
  text-decoration: line-through;
}

.activity-note-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a0aec0;
  margin-bottom: 4px;
}

/* ---------- Activity: Assignment box ---------- */
.activity-assign-box {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f5f3ff;
  border: 1px solid #e9d8fd;
  border-left: 3px solid #4c51bf;
  border-radius: 8px;
  font-size: 13.5px;
  color: #3d485c;
  line-height: 1.6;
}

.activity-assign-box strong {
  color: #4c51bf;
}

/* =====================================================
   LEAD CREATED / ACTIVITY - SHOW ALL FIELD ROWS
===================================================== */

.activity-list,
.activity-list.collapsed,
.activity-list.expanded {
  max-height: none !important;
  overflow: visible !important;
}

.activity-changes {
  max-height: none !important;
  overflow: visible !important;
}

.activity-item {
  overflow: visible !important;
}

.activity-body {
  overflow: visible !important;
}

.activity-change-row {
  min-height: 44px;
  height: auto;
}

/* =========================================================
   DASHBOARD — redesigned
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

.dashboard {
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}

.dashboard .stat-value,
.dashboard .dashboard-title h2,
.dashboard .card-header h3,
.dashboard .followup-box .number {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 26px;
}

.dashboard-title h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #1a202c;
}

.dashboard-title p {
  margin: 6px 0 0;
  color: #718096;
  font-size: 14px;
}

.dashboard-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dashboard-select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  min-width: 160px;
  padding: 11px 36px 11px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #2d3748;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.dashboard-select-wrap select:hover {
  border-color: #c3c9f5;
}

.dashboard-select-wrap select:focus {
  border-color: #4c51bf;
  box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.12);
}

.dashboard-select-caret {
  position: absolute;
  right: 14px;
  width: 10px;
  height: 6px;
  color: #a0aec0;
  pointer-events: none;
}

/* ---------- KPI cards ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  position: relative;
  background: linear-gradient(165deg, var(--stat-wash, #fff) 0%, #ffffff 55%);
  border: 1px solid #edf0f5;
  border-radius: 14px;
  padding: 20px 20px 18px;
  min-height: 122px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color .2s ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stat-accent, #4c51bf);
}

.stat-card:hover {
  box-shadow: 0 10px 24px rgba(20, 24, 40, 0.08);
  transform: translateY(-2px);
  border-color: #e5e9f5;
}

.stat-card-primary  { --stat-accent: #4c51bf; --stat-wash: #edeaff; }
.stat-card-info     { --stat-accent: #2b6cb0; --stat-wash: #eaf6ff; }
.stat-card-teal      { --stat-accent: #2c9c93; --stat-wash: #e6fbf8; }
.stat-card-warning   { --stat-accent: #dd8a1f; --stat-wash: #fdf3e2; }
.stat-card-purple    { --stat-accent: #7c6fe0; --stat-wash: #f1eefe; }
.stat-card-success   { --stat-accent: #2f9e5b; --stat-wash: #e9f9ef; }
.stat-card-danger    { --stat-accent: #dc4545; --stat-wash: #fdeeee; }
.stat-card-indigo    { --stat-accent: #4c51bf; --stat-wash: #edeaff; }

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stat-label {
  color: #718096;
  font-size: 13px;
  font-weight: 600;
}

.stat-value {
  margin-top: 8px;
  color: #1a202c;
  font-size: 28px;
  line-height: 1;
  font-weight: 700;
}

.stat-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #f3f4f6;
  color: #4c51bf;
}

.stat-icon svg {
  width: 21px;
  height: 21px;
}

.stat-icon-primary { background: #e9e5ff; color: #4c51bf; }
.stat-icon-info     { background: #ebf8ff; color: #2b6cb0; }
.stat-icon-teal      { background: #e6fffa; color: #2c9c93; }
.stat-icon-danger    { background: #fdeaea; color: #dc4545; }
.stat-icon-warning   { background: #fdf1e0; color: #dd8a1f; }
.stat-icon-success   { background: #e5f8ec; color: #2f9e5b; }
.stat-icon-purple    { background: #ede9fe; color: #7c6fe0; }
.stat-icon-indigo    { background: #e9e5ff; color: #4c51bf; }

.stat-footer {
  margin-top: 14px;
  color: #a0aec0;
  font-size: 12px;
}

.stat-ring {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.stat-ring svg {
  width: 100%;
  height: 100%;
}

.stat-ring circle:nth-child(2) {
  transition: stroke-dasharray 0.6s cubic-bezier(.4,0,.2,1);
}

/* ---------- Card header link ---------- */

.card-header-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #4c51bf;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.card-header-link:hover {
  text-decoration: underline;
}

.card-header-link svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ---------- Lead status donut ---------- */

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}

.donut-chart {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}

.donut-chart svg {
  width: 100%;
  height: 100%;
}

.donut-track {
  stroke: #edf2f7;
}

.donut-chart circle {
  transition: stroke-dasharray 0.6s cubic-bezier(.4,0,.2,1);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donut-total {
  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #1a202c;
  line-height: 1;
}

.donut-total-label {
  margin-top: 4px;
  color: #a0aec0;
  font-size: 11px;
  font-weight: 600;
}

.donut-legend {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.donut-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.donut-legend-label {
  color: #4a5568;
  font-size: 13px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend-count {
  color: #2d3748;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 480px) {
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut-chart { margin: 0 auto; }
}

/* ---------- Follow-up icons ---------- */

.followup-box {
  position: relative;
}

.followup-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.followup-icon svg {
  width: 16px;
  height: 16px;
}

.followup-overdue .followup-icon { background: #fdeeee; color: #dc4545; }
.followup-today .followup-icon { background: #fdf3e2; color: #dd8a1f; }
.followup-upcoming .followup-icon { background: #edeaff; color: #4c51bf; }

/* ---------- Card headers / icons ---------- */

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard > .stats-grid,
.dashboard > .dashboard-grid,
.dashboard > .dashboard-card {
  margin-bottom: 24px;
}

.dashboard-card {
  background: #fff;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #edf2f7;
}

.card-header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1a202c;
  font-size: 15.5px;
  font-weight: 700;
}

.card-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #f4f5fb;
  color: #4c51bf;
  flex-shrink: 0;
}

.card-header-icon svg {
  width: 14px;
  height: 14px;
}

.card-header span:not(.card-header-icon) {
  color: #a0aec0;
  font-size: 12px;
  font-weight: 600;
}

.card-body {
  padding: 20px;
}

/* ---------- Funnel + status bars ---------- */

.status-list {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.status-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
}

.status-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #4a5568;
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #4c51bf;
}

.status-dot-new { background: #2b6cb0; }
.status-dot-contacted { background: #b7791f; }
.status-dot-interested { background: #2c9c93; }
.status-dot-follow-up { background: #4c51bf; }
.status-dot-not-interested { background: #dc4545; }
.status-dot-converted { background: #2f9e5b; }
.status-dot-lost { background: #a0aec0; }

.status-bar {
  height: 8px;
  overflow: hidden;
  background: #edf2f7;
  border-radius: 20px;
}

.status-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 20px;
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

.funnel-bar {
  background: linear-gradient(90deg, #4c51bf, #8b85ea);
}

.status-progress-new { background: linear-gradient(90deg, #2b6cb0, #63b3ed); }
.status-progress-contacted { background: linear-gradient(90deg, #b7791f, #ecc94b); }
.status-progress-interested { background: linear-gradient(90deg, #2c9c93, #4fd1c5); }
.status-progress-follow-up { background: linear-gradient(90deg, #4c51bf, #8b85ea); }
.status-progress-not-interested { background: linear-gradient(90deg, #dc4545, #fc8181); }
.status-progress-converted { background: linear-gradient(90deg, #2f9e5b, #68d391); }
.status-progress-lost { background: #cbd5e0; }

.status-count {
  text-align: right;
  color: #2d3748;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Source / Team tables ---------- */

.source-table,
.team-table {
  width: 100%;
  border-collapse: collapse;
}

.source-table th,
.source-table td,
.team-table th,
.team-table td {
  padding: 13px 10px;
  border-bottom: 1px solid #f1f3f5;
  text-align: left;
  font-size: 13px;
}

.source-table th,
.team-table th {
  color: #94a3b8;
  background: #f8f9fb;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.source-table td,
.team-table td {
  color: #374151;
}

.source-table th:nth-child(n+2),
.source-table td:nth-child(n+2),
.team-table th:nth-child(n+2),
.team-table td:nth-child(n+2) {
  text-align: right;
}

.source-table tbody tr:hover td,
.team-table tbody tr:hover td {
  background: #fafafa;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.source-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7c6fe0;
  flex-shrink: 0;
}

.person-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.person-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef0ff;
  color: #4c51bf;
  font-size: 12px;
  font-weight: 700;
}

.person-avatar-sm {
  width: 26px;
  height: 26px;
  min-width: 26px;
  font-size: 11px;
}

.conversion-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.conversion-high { background: #e5f8ec; color: #2f9e5b; }
.conversion-mid  { background: #fdf1e0; color: #b7791f; }
.conversion-low  { background: #f1f2f6; color: #718096; }

/* ---------- Follow-up boxes ---------- */

.followup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.followup-box {
  padding: 18px 14px;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: #fafbfd;
  text-align: center;
}

.followup-box .number {
  color: #1a202c;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.followup-box .label {
  margin-top: 7px;
  color: #718096;
  font-size: 12px;
  font-weight: 600;
}

.followup-overdue .number { color: #dc4545; }
.followup-today .number { color: #dd8a1f; }
.followup-upcoming .number { color: #4c51bf; }

/* ---------- Recent activity ---------- */

.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f3f5;
}

.activity-item:first-child { padding-top: 0; }
.activity-item:last-child { padding-bottom: 0; border-bottom: none; }

.activity-item::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 22px;
  bottom: -2px;
  width: 1px;
  background: #edf2f7;
}

.activity-item:last-child::after { display: none; }

.activity-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  margin-top: 6px;
  border-radius: 50%;
  background: #4c51bf;
}

.activity-dot-new { background: #2b6cb0; }
.activity-dot-contacted { background: #b7791f; }
.activity-dot-interested { background: #2c9c93; }
.activity-dot-follow-up { background: #4c51bf; }
.activity-dot-not-interested { background: #dc4545; }
.activity-dot-converted { background: #2f9e5b; }
.activity-dot-lost { background: #a0aec0; }

.activity-text {
  color: #374151;
  font-size: 13px;
  line-height: 1.5;
}

.activity-time {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 20px;
  background: #f3f4f6;
  color: #718096;
  font-size: 11px;
  font-weight: 600;
}

/* ---------- Recent leads table ---------- */

.recent-leads {
  margin-bottom: 24px;
}

.leads-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
}

.leads-table th,
.leads-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f3f5;
  text-align: left;
  font-size: 13px;
}

.leads-table th {
  color: #94a3b8;
  background: #f8f9fb;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.leads-table td {
  color: #374151;
}

.leads-table tbody tr:hover td {
  background: #fafafa;
}

.lead-name {
  color: #1a202c;
  font-weight: 600;
}

/* ---------- Empty state ---------- */

.dashboard-empty {
  padding: 30px 20px;
  text-align: center;
  color: #a0aec0;
  font-size: 13px;
}

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .dashboard-header { flex-direction: column; align-items: stretch; }
  .dashboard-filter { width: 100%; }
  .dashboard-select-wrap { width: 100%; }
  .dashboard-select-wrap select { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .followup-grid { grid-template-columns: 1fr; }
  .status-row { grid-template-columns: 90px minmax(0, 1fr) 35px; }
  .card-header { padding: 15px; }
  .card-body { padding: 15px; }
  .source-table, .team-table { min-width: 600px; }
}

@media (max-width: 480px) {
  .dashboard-title h2 { font-size: 21px; }
  .stat-card { padding: 16px; }
  .stat-value { font-size: 25px; }
  .status-row { grid-template-columns: 80px minmax(0, 1fr) 30px; gap: 7px; }
}

/* =========================================================
   ORDER DATE RANGE FILTER (dropdown button + panel)
   ========================================================= */

.date-filter-wrapper {
  position: relative;
}

.btn-date-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  height: 40px;
  padding: 0 14px;

  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;

  color: #2d3748;
  font-size: 14px;
  font-weight: 500;

  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}

.btn-date-filter:hover {
  border-color: #cbd5e0;
}

.btn-date-filter.open {
  border-color: #4c51bf;
  box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.12);
}

.btn-date-filter.has-value {
  border-color: #4c51bf;
  background: #f5f3ff;
  color: #4c51bf;
  font-weight: 600;
}

.date-filter-caret {
  width: 10px;
  height: 6px;
  flex-shrink: 0;
  transition: transform .15s ease;
}

.btn-date-filter.open .date-filter-caret {
  transform: rotate(180deg);
}

.date-range-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 500;

  width: 300px;
  max-width: calc(100vw - 40px);
  padding: 18px;

  background: #fff;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.date-range-dropdown.show {
  display: block;
}

.date-range-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;

  padding: 10px 12px;
  margin-bottom: 16px;

  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;

  color: #92400e;
  font-size: 12.5px;
  line-height: 1.5;
}

.date-range-warning svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.date-range-field {
  margin-bottom: 14px;
}

.date-range-field:last-of-type {
  margin-bottom: 6px;
}

.date-range-field label {
  display: block;
  margin-bottom: 6px;

  color: #1a202c;
  font-size: 14px;
  font-weight: 700;
}

.date-range-field input[type="date"] {
  width: 100%;
  height: 42px;

  padding: 0 12px;

  border: 1px solid #e2e8f0;
  border-radius: 8px;

  color: #2d3748;
  font-size: 14px;
  font-family: inherit;
}

.date-range-field input[type="date"]:focus {
  outline: none;
  border-color: #4c51bf;
  box-shadow: 0 0 0 3px rgba(76, 81, 191, 0.10);
}

.date-range-error {
  margin-bottom: 10px;
  padding: 8px 10px;

  background: #fed7d7;
  border-radius: 6px;

  color: #c53030;
  font-size: 12.5px;
}

.date-range-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid #edf2f7;
}

.date-range-clear {
  background: none;
  border: none;

  color: #4c51bf;
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
}

.date-range-clear:hover {
  text-decoration: underline;
}

.date-range-apply {
  padding: 10px 22px;

  background: #edf2f7;
  border: none;
  border-radius: 8px;

  color: #2d3748;
  font-size: 14px;
  font-weight: 600;

  cursor: pointer;
  transition: background .15s ease;
}

.date-range-apply:hover {
  background: #e2e8f0;
}

@media (max-width: 600px) {
  .date-range-dropdown {
    left: auto;
    right: 0;
    width: 280px;
  }
}

/* ---------- Download Leads button ---------- */
#downloadLeadsBtn svg {
  vertical-align: -3px;
}


/* =========================================================
   TOPBAR TOUCHES THE TOP
   ========================================================= */



/* =========================================================
   PAGE TITLE
   ========================================================= */

.dashboard-topbar-title {
  display: flex;
  align-items: center;
  min-width: 0;
}

.dashboard-topbar-title h2 {
  margin: 0;

  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;

  color: #1f2937;

  white-space: nowrap;
}


/* =========================================================
   USER AREA
   ========================================================= */

.dashboard-topbar-user {
  display: flex;
  align-items: center;

  flex-shrink: 0;
}

.dashboard-user-link {
  min-width: 136px;
  height: 48px;

  display: flex;
  align-items: center;

  gap: 10px;

  padding: 5px 10px 5px 6px;

  background: #f8f9fd;

  border-radius: 14px;

  text-decoration: none;

  box-sizing: border-box;

  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.dashboard-user-link:hover {
  background: #f3f4fb;
}


/* =========================================================
   AVATAR
   ========================================================= */

.dashboard-user-avatar {
  width: 38px;
  height: 38px;

  min-width: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: #5146c9;

  color: #ffffff;

  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 800;

  line-height: 1;
}


/* =========================================================
   USER DETAILS
   ========================================================= */

.dashboard-user-details {
  min-width: 0;

  display: flex;
  flex-direction: column;

  justify-content: center;

  flex: 1;
}

.dashboard-user-name {
  display: block;

  margin: 0;

  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  font-size: 13px;
  line-height: 17px;
  font-weight: 700;

  color: #273247;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-user-role {
  display: block;

  margin-top: 1px;

  font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
  font-size: 10px;
  line-height: 14px;
  font-weight: 500;

  color: #91a0b8;

  white-space: nowrap;
}


/* =========================================================
   CHEVRON
   ========================================================= */

.dashboard-user-chevron {
  width: 16px;
  height: 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #4b5563;

  font-size: 16px;
  line-height: 1;

  flex-shrink: 0;

  transform: translateY(-1px);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */




/* Dashboard content keeps its spacing */

/* =========================================================
   PROFESSIONAL DESIGN REFRESH
   Append this block to the END of style.css
   Pure visual polish — no class names changed, no JS/EJS touched
   ========================================================= */

:root {
  --color-primary: #4f46e5;
  --color-primary-dark: #4338ca;
  --color-primary-light: #eef2ff;
  --color-text-dark: #1e2433;
  --color-text-medium: #5b6478;
  --color-text-light: #99a1b3;
  --color-border: #e7eaf1;
  --color-bg-page: #f6f7fb;
  --color-bg-card: #ffffff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 3px rgba(20, 25, 45, 0.04), 0 8px 24px rgba(20, 25, 45, 0.05);
  --shadow-card-hover: 0 4px 10px rgba(20, 25, 45, 0.06), 0 16px 32px rgba(20, 25, 45, 0.08);
  --font-heading: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
}

body {
  background: var(--color-bg-page);
  color: var(--color-text-dark);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Sidebar ---------- */

.sidebar {
  border-right: 1px solid var(--color-border);
  box-shadow: 2px 0 12px rgba(20, 25, 45, 0.02);
}

.sidebar-brand {
  border-bottom: 1px solid #e8ebf2;
}

.brand-logo {
  background: linear-gradient(135deg, var(--color-primary), #6366f1);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.22);
}

.brand-text h3 {
  font-family: var(--font-heading);
  letter-spacing: -0.2px;
}

.nav-section-title {
  color: #a5adc0;
  font-size: 10.5px;
  letter-spacing: 1px;
}

.sidebar-link {
  border-radius: 10px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-link:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  transform: translateX(2px);
}

.sidebar-link.active {
  background: var(--color-primary-light);
  color: var(--color-primary);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.08);
}

.logout-btn {
  border-radius: 10px;
  font-weight: 650;
}

/* ---------- Topbar ---------- */

.dashboard-topbar {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border-bottom: none;
}

.dashboard-topbar1 {
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid #e8ebf2;
}

.dashboard-topbar-title h2 {
  font-family: var(--font-heading);
  letter-spacing: -0.3px;
  color: var(--color-text-dark);
}

.dashboard-user-link {
  background: #f7f8fc;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.dashboard-user-link:hover {
  background: #eef0fa;
}

.dashboard-user-avatar {
  background: linear-gradient(135deg, var(--color-primary), #6366f1);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.20);
}

.dashboard-user-name {
  color: var(--color-text-dark);
}

.dashboard-user-role {
  color: var(--color-text-light);
}

/* ---------- Page header ---------- */

.page-title {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--color-text-dark);
}

/* ---------- Cards ---------- */

.influencer-card,
.table-wrapper,
.filter-bar,
.lead-form,
.detail-card,
.pagination-bar,
.notes-card,
.activity-card,
.dashboard-card,
.stat-card {
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
}

.influencer-card {
  border: 1px solid var(--color-border);
}

/* ---------- Buttons ---------- */

.btn-primary {
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  font-weight: 650;
  letter-spacing: 0.1px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.20);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.26);
}

.btn-secondary {
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.btn-reset {
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* ---------- Inputs / filters ---------- */

.search-input,
.filter-select,
.form-group input,
.form-group select,
.form-group textarea,
.influencer-form-group input,
.influencer-form-group select,
.influencer-form-group textarea,
.staff-lead-search input,
.date-range-field input[type="date"] {
  border-radius: 9px;
  border: 1px solid var(--color-border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus,
.filter-select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.10);
}

/* ---------- Tables ---------- */

.leads-table th,
.source-table th,
.team-table th,
.staff-lead-table th,
.mapping-table th,
.review-table th {
  color: #8b93a7;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #fafbfd;
}

.leads-table tr:hover td {
  background: #f8f9fd;
}

.lead-id {
  color: var(--color-primary);
  font-weight: 650;
}

/* ---------- Badges ---------- */

.status-badge,
.priority-badge {
  font-weight: 650;
  letter-spacing: 0.02em;
}

.status-converted { background: #e6f9ee; color: #1c8a4b; }
.status-new { background: #eaf3ff; color: #2563eb; }
.status-contacted { background: #fff8e1; color: #b7791f; }
.status-interested { background: #e6fbf8; color: #0f9488; }
.status-not-interested { background: #fdeeee; color: #dc4545; }

.priority-high { background: #fdeeee; color: #dc4545; }
.priority-medium { background: #fff3e0; color: #c2760f; }
.priority-low { background: #f1f2f6; color: #6b7280; }

/* ---------- Icon buttons ---------- */

.icon-btn {
  transition: background 0.15s ease, transform 0.12s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
}

/* ---------- Modals ---------- */

.modal-box {
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(20, 25, 45, 0.18);
}

.modal-title {
  font-family: var(--font-heading);
  font-weight: 750;
}

/* ---------- Pagination ---------- */

.page-nav-btn {
  border-radius: 9px;
  font-weight: 600;
}

/* ---------- Stat cards on Dashboard ---------- */

.stat-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.stat-value {
  font-family: var(--font-heading);
  letter-spacing: -0.5px;
}

/* ---------- Scrollbars (subtle, all browsers) ---------- */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-thumb {
  background: #dfe3ee;
  border-radius: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}


/* =========================================================
   STAFF DETAILS PAGE — additional polish
   Append to the END of style.css (after the refresh block)
   ========================================================= */

.staff-permission-block {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 1px 2px rgba(20, 25, 45, 0.02);
}

.staff-permission-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-dark);
  letter-spacing: -0.1px;
}

.staff-permission-badge {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: rgba(79, 70, 229, 0.15);
  font-weight: 650;
  border-radius: 20px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.staff-permission-badge:hover {
  background: #e2e0fb;
}

.staff-lead-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.staff-lead-item:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.staff-lead-item strong {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
}

.staff-empty {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: #fafbfd;
  color: var(--color-text-light);
  font-weight: 500;
}

/* view-actions row on detail pages (Staff, Influencer, Lead) */
.view-actions {
  gap: 12px;
}

.view-actions .btn-secondary,
.view-actions .btn-primary {
  font-weight: 650;
}

/* detail-card headings consistency across all detail pages */
.detail-card h3 {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
  font-weight: 750;
}

.detail-grid span {
  color: var(--color-text-light);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.detail-grid p {
  color: var(--color-text-dark);
}

/* =====================================================
   EXOTEL CALL POPUP
===================================================== */

.exotel-call-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.62);
}

.exotel-call-modal.show {
  display: flex;
}

.exotel-call-card {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 32px 28px 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.exotel-call-card[data-mode="choose"] .exotel-call-row-agent,
.exotel-call-card[data-mode="webrtc"] .exotel-call-row-agent {
  display: none;
}

.exotel-call-card[data-mode="choose"] .exotel-call-avatar {
  animation: none;
}

.exotel-call-pick {
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
}

.exotel-call-option {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.exotel-call-option:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(74, 222, 128, 0.45);
}

.exotel-call-option strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.exotel-call-option span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
}

.exotel-call-option.is-ready strong::after {
  content: ' Ready';
  margin-left: 6px;
  font-size: 11px;
  color: #4ade80;
  font-weight: 700;
}

.exotel-call-back {
  margin-top: 14px;
  border: none;
  background: transparent;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.exotel-call-card .is-hidden {
  display: none !important;
}

.exotel-call-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.exotel-call-avatar {
  width: 78px;
  height: 78px;
  margin: 8px auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16a34a;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45);
}

.exotel-call-card:has(.exotel-call-status.calling) .exotel-call-avatar {
  animation: exotelPulse 1.6s ease-out infinite;
}

.exotel-call-card h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.exotel-call-lead {
  margin: 4px 0 18px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.exotel-call-rows {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  text-align: left;
}

.exotel-call-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.exotel-call-row span {
  color: #94a3b8;
}

.exotel-call-row strong {
  color: #fff;
  font-weight: 650;
}

.exotel-call-status {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.exotel-call-status.calling {
  color: #fbbf24;
}

.exotel-call-status.connected {
  color: #4ade80;
}

.exotel-call-status.ended {
  color: #93c5fd;
}

.exotel-call-status.failed {
  color: #f87171;
}

.exotel-call-timer {
  font-variant-numeric: tabular-nums;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  margin: 4px 0 8px;
}

.exotel-call-timer.is-hidden {
  display: none;
}

.exotel-call-note {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
}

@keyframes exotelPulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); }
  70% { box-shadow: 0 0 0 16px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}