/* =========================================================
   AluminiumGlass - Business Leads
   ========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f8fb;
  color: #172033;
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Header */

.business-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e5e9f0;
}

.header-inner {
  max-width: 1400px;
  margin: auto;
  min-height: 70px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #fff;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 3px;
  color: #7a8495;
  font-size: 11px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.header-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: #596579;
  font-size: 14px;
}

.header-nav a:hover,
.header-nav a.active {
  background: #eef2f7;
  color: #111827;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-btn,
.logout-btn,
.account-btn {
  border: 1px solid #e1e6ed;
  background: #fff;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 12px;
  cursor: pointer;
}

.notification-btn {
  position: relative;
}

.notification-btn span {
  color: #d7263d;
  font-weight: 700;
}

.account-btn {
  display: flex;
  align-items: center;
  font-size: 13px;
}

.logout-btn {
  color: #b42318;
}

/* Container */

.page-container {
  max-width: 1400px;
  margin: auto;
  padding: 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #7a8495;
  font-size: 13px;
}

.breadcrumb a:hover {
  color: #111827;
}

/* Heading */

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
}

.page-heading h1 {
  margin: 5px 0;
  font-size: 30px;
}

.page-heading p {
  margin: 0;
  color: #667085;
}

.refresh-btn {
  border: 1px solid #d9dfe8;
  background: #fff;
  border-radius: 9px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 600;
}

/* Stats */

.lead-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #eef2f7;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
}

.stat-icon.new {
  background: #fff4d6;
}

.stat-icon.contacted {
  background: #e9f3ff;
}

.stat-icon.converted {
  background: #eaf8ef;
}

.stat-card span {
  display: block;
  color: #667085;
  font-size: 13px;
  margin-bottom: 5px;
}

.stat-card strong {
  font-size: 24px;
}

/* Toolbar */

.lead-toolbar {
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  padding: 0 12px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  min-height: 42px;
  font-size: 14px;
}

.lead-toolbar select {
  min-width: 160px;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #344054;
}

/* Section */

.leads-section {
  background: #fff;
  border: 1px solid #e4e8ef;
  border-radius: 12px;
  overflow: hidden;
}

.section-header {
  padding: 18px 20px;
  border-bottom: 1px solid #e9edf2;
}

.section-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.section-header p {
  margin: 0;
  color: #7a8495;
  font-size: 13px;
}

/* Lead cards */

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

.lead-card {
  padding: 18px 20px;
  border-bottom: 1px solid #edf0f4;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 18px;
  align-items: center;
}

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

.lead-card:hover {
  background: #fafbfd;
}

.lead-main h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.lead-main p {
  margin: 0;
  color: #667085;
  font-size: 13px;
}

.lead-service {
  color: #344054;
  font-size: 14px;
}

.lead-date {
  color: #667085;
  font-size: 13px;
}

.lead-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.view-btn {
  border: 1px solid #d7dde6;
  background: #fff;
  border-radius: 7px;
  padding: 8px 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.view-btn:hover {
  background: #f1f4f8;
}

/* Status */

.status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.status-new {
  background: #fff4d6;
  color: #8a5a00;
}

.status-contacted {
  background: #e8f2ff;
  color: #175cd3;
}

.status-follow_up {
  background: #f1eaff;
  color: #6941c6;
}

.status-converted {
  background: #e7f7ec;
  color: #087443;
}

.status-closed,
.status-cancelled {
  background: #eef0f3;
  color: #667085;
}

/* Loading */

.loading-state {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: #667085;
}

.loader {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e6ec;
  border-top-color: #111827;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Empty */

.empty-state {
  padding: 70px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  color: #667085;
  max-width: 480px;
  margin: auto auto 18px;
}

.empty-state a {
  display: inline-block;
  background: #111827;
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 13px;
}

/* Message */

.page-message {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff4d6;
  color: #7a5200;
  border: 1px solid #f3df9b;
  font-size: 14px;
}

/* Modal */

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

.lead-modal {
  width: min(680px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .18);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f3f6;
  font-size: 23px;
  cursor: pointer;
}

.modal-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid #e8ebef;
}

.modal-label {
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.modal-header h2 {
  margin: 7px 0 10px;
  font-size: 23px;
}

.modal-content {
  padding: 24px 28px 28px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.detail-item span {
  display: block;
  color: #667085;
  font-size: 12px;
  margin-bottom: 5px;
}

.detail-item strong {
  font-size: 14px;
}

.detail-item.full {
  grid-column: 1 / -1;
}

.detail-item p {
  margin: 0;
  color: #344054;
  line-height: 1.6;
  font-size: 14px;
}

.modal-actions {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #e8ebef;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.action-btn.call {
  background: #eaf8ef;
  color: #087443;
}

.action-btn.email {
  background: #edf4ff;
  color: #175cd3;
}

.action-btn.primary {
  background: #111827;
  color: #fff;
}

.action-btn.success {
  background: #087443;
  color: #fff;
}

/* Responsive */

@media (max-width: 1100px) {

  .header-nav {
    display: none;
  }

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

  .lead-card {
    grid-template-columns: 1fr 1fr;
  }

  .lead-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {

  .header-inner {
    padding: 0 14px;
  }

  .account-btn {
    display: none;
  }

  .page-container {
    padding: 16px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading h1 {
    font-size: 25px;
  }

  .lead-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 13px;
  }

  .stat-card strong {
    font-size: 20px;
  }

  .lead-toolbar {
    flex-direction: column;
  }

  .lead-toolbar select {
    min-height: 42px;
    width: 100%;
  }

  .lead-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .detail-item.full {
    grid-column: auto;
  }

  .modal-content,
  .modal-header {
    padding-left: 18px;
    padding-right: 18px;
  }
}