/* ============================================
   EcoCare Leads - Custom Styles
   ============================================ */

/* Login page */
.login-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  border: none;
  border-radius: 12px;
}

.login-icon {
  font-size: 2.5rem;
  color: #0d6efd;
}

/* Navbar */
.navbar-brand {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Table */
#leads-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.6rem 0.75rem;
}

#leads-table td {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  vertical-align: middle;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status dropdown in table */
.lead-status-select {
  min-width: 120px;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.25rem 2rem 0.25rem 0.5rem;
  border-radius: 6px;
}

/* Status colors */
.lead-status-select.status-new {
  background-color: #cfe2ff;
  border-color: #9ec5fe;
  color: #052c65;
}
.lead-status-select.status-contacted {
  background-color: #cff4fc;
  border-color: #9eeaf9;
  color: #055160;
}
.lead-status-select.status-qualified {
  background-color: #fff3cd;
  border-color: #ffe69c;
  color: #664d03;
}
.lead-status-select.status-lost {
  background-color: #f8d7da;
  border-color: #f1aeb5;
  color: #58151c;
}
.lead-status-select.status-won {
  background-color: #d1e7dd;
  border-color: #a3cfbb;
  color: #0a3622;
}

/* Updating state */
.lead-status-select.updating {
  opacity: 0.6;
  pointer-events: none;
}

/* Search highlight */
.search-highlight {
  background-color: #fff3cd;
  padding: 0 2px;
  border-radius: 2px;
}

/* Toast styling */
.toast {
  min-width: 280px;
}

/* Pagination active */
.page-item.active .page-link {
  background-color: #0d6efd;
  border-color: #0d6efd;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #leads-table th,
  #leads-table td {
    font-size: 0.75rem;
    padding: 0.4rem 0.5rem;
  }

  .lead-status-select {
    min-width: 100px;
    font-size: 0.75rem;
  }

  /* Make table scroll horizontally on mobile */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  /* Sticky first column on mobile */
  #leads-table th:first-child,
  #leads-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: inherit;
  }

  #leads-table thead th:first-child {
    background-color: #212529;
  }
}

@media (max-width: 576px) {
  .login-card .card-body {
    padding: 1.5rem !important;
  }
}

/* Hidden row for search/filter */
.lead-row.d-none {
  display: none !important;
}
