.customers-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* =========================
   KPI GRID
========================= */

.customers-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* =========================
   TOOLBAR
========================= */

.customers-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

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

.customers-table-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e7edf5;
  overflow: hidden;
}

/* Desktop */
@media (min-width: 1600px) {
  .customers-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Laptop */
@media (max-width: 1400px) {
  .customers-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet */

@media (max-width: 992px) {
  .customers-kpi-grid {
    grid-template-columns: 1fr;
  }

  .customers-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Mobile */

@media (max-width: 768px) {
  .customers-page {
    gap: 16px;
  }
}
/* KPI Cards */

.customer-kpi-card {
  background: #fff;
  border: 1px solid #e8edf4;
  border-radius: 18px;
  padding: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.25s;
}

.customer-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.customer-kpi-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.customer-kpi-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 28px;
}

.customer-kpi-icon.green {
  background: #e8f8ee;
  color: #0f8b4c;
}

.customer-kpi-icon.blue {
  background: #edf4ff;
  color: #2563eb;
}

.customer-kpi-icon.purple {
  background: #f5ecff;
  color: #9333ea;
}

.customer-kpi-icon.orange {
  background: #fff2e4;
  color: #ea7a11;
}

.customer-kpi-left p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

.customer-kpi-left h2 {
  margin: 6px 0;
  font-size: 38px;
  color: #172234;
}

.customer-kpi-left small {
  color: #64748b;
}

.customer-kpi-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.trend {
  font-weight: 700;
  color: #16a34a;
}

.customer-kpi-right canvas {
  display: block;
  width: 92px !important;
  height: 38px !important;
}

/* @media(max-width:1200px){

.customer-kpi-card{
    flex-direction:column;
    align-items:flex-start;
    gap:20px;
}

.customer-kpi-right{
    align-items:flex-start;
}

} */
/* ===========================
   Customers Toolbar
=========================== */

.customers-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.customers-toolbar-left {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
}

.customers-toolbar-right {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.customers-search {
  width: 360px;
  max-width: 100%;
  height: 48px;

  display: flex;
  align-items: center;

  border: 1px solid #dce5ef;
  border-radius: 12px;

  padding: 0 16px;

  background: #fff;
}

.customers-search i {
  color: #64748b;
}

.customers-search input {
  flex: 1;
  border: none;
  outline: none;
  margin-left: 12px;
  font-size: 14px;
  background: transparent;
}

.customer-toggle {
  height: 48px;

  padding: 0 22px;

  border: 1px solid #dce5ef;

  border-radius: 12px;

  background: #fff;

  font-weight: 600;

  display: flex;
  gap: 10px;
  align-items: center;

  cursor: pointer;
}

.customer-toggle.active {
  background: #eef9f2;

  color: #0f8b4c;

  border-color: #9ad4b0;
}

.customer-toolbar-btn {
  height: 48px;

  padding: 0 22px;

  border-radius: 12px;

  border: 1px solid #dce5ef;

  background: #fff;

  font-weight: 600;

  display: flex;
  align-items: center;
  gap: 10px;

  cursor: pointer;
}

.customer-add-btn {
  height: 48px;

  padding: 0 24px;

  border: none;

  border-radius: 12px;

  background: #0f8b4c;

  color: #fff;

  font-weight: 700;

  display: flex;
  align-items: center;
  gap: 10px;

  cursor: pointer;
}

@media (max-width: 1100px) {
  .customers-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .customers-toolbar-left,
  .customers-toolbar-right {
    width: 100%;
  }

  .customers-search {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .customers-toolbar-left,
  .customers-toolbar-right {
    flex-direction: column;
  }

  .customer-toggle,
  .customer-toolbar-btn,
  .customer-add-btn {
    width: 100%;
    justify-content: center;
  }
}
/* ===========================
   Customers Table
=========================== */

.customers-table-card {
  background: #fff;
  border: 1px solid #e7edf5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.04);
  overflow: visible;
}

.customers-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid #eef3f7;
}

.customers-table-heading h2 {
  margin: 0;
  color: #172234;
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
}

.customers-table-heading p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.customers-table-controls {
  display: flex;
  gap: 10px;
}

.customers-table-controls select {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #dce5ef;
  border-radius: 10px;
  background: #fff;
  color: #172234;
  font-weight: 800;
}

.customers-row {
  min-width: 1520px;
  display: grid;
  grid-template-columns:
    34px
    minmax(210px, 1.45fr)
    minmax(230px, 1.5fr)
    minmax(145px, 0.95fr)
    minmax(155px, 1fr)
    82px
    90px
    minmax(125px, 0.85fr)
    minmax(145px, 0.95fr)
    100px
    58px;
  gap: 14px;
  align-items: center;
  padding: 16px 22px;
  border-bottom: 1px solid #eef3f7;
}

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

.customers-head {
  background: #f8fbfb;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 900;
}

.customers-row > span {
  min-width: 0;
  color: #334155;
  font-size: 0.86rem;
  font-weight: 700;
}

.customers-row b {
  color: #172234;
  font-weight: 900;
}

.customers-row small {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 700;
}

.customer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-profile img {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow:
    0 4px 14px rgba(15, 23, 42, 0.1),
    0 0 0 1px #e6edf3;
}

.customer-type {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.customer-type.mobile {
  color: #2563eb;
  background: #dbeafe;
}

.customer-type.walkin {
  color: #7c3aed;
  background: #ede9fe;
}

.customer-status {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
}

.customer-status.active {
  color: #0f9f5c;
  background: #dcfce7;
}

.customer-status.inactive {
  color: #64748b;
  background: #f1f5f9;
}

.customer-status.blocked {
  color: #ef4444;
  background: #fee2e2;
}

.customer-more-btn {
  width: 36px;
  height: 36px;
  border: 1px solid #dce5ef;
  border-radius: 10px;
  background: #fff;
  color: #172234;
  font-weight: 900;
  cursor: pointer;
}

.customers-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-top: 1px solid #eef3f7;
}

.customers-pagination p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.customers-pagination > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customers-pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #dce5ef;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}

.customers-pagination button.active {
  border-color: #0f8b4c;
  background: #0f8b4c;
  color: #fff;
}

.customers-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .customers-table-heading,
  .customers-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .customers-table-controls {
    width: 100%;
  }

  .customers-table-controls select {
    flex: 1;
  }

  .customers-pagination > div {
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

@media (max-width: 560px) {
  .customers-table-heading,
  .customers-pagination {
    padding: 16px;
  }

  .customers-table-controls {
    flex-direction: column;
  }

  .customers-pagination > div {
    width: 100%;
  }
}

.customer-checkbox {
  display: grid;
  place-items: center;
}

.customer-checkbox input {
  width: 17px;
  height: 17px;
  accent-color: #0f8b4c;
  cursor: pointer;
}

.customer-vehicles {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #172234;
}

.customer-vehicles b {
  font-size: 0.92rem;
  font-weight: 900;
}

.customer-vehicles i {
  color: #64748b;
  font-size: 0.9rem;
}
.customer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-contact-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.customer-contact-line i {
  width: 16px;
  flex: 0 0 16px;
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

.customer-contact-line > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-more-btn {
  display: grid;
  place-items: center;
}

.customer-actions-menu {
  position: fixed;
  z-index: 9999;
  width: 230px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}
.customer-actions-menu.hidden {
  display: none;
}

.customer-actions-menu button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.customer-actions-menu button:hover {
  background: #f1f5f9;
}

.customer-actions-menu button i {
  width: 20px;
  color: #475569;
  font-size: 0.95rem;
  text-align: center;
}

.customer-actions-divider {
  height: 1px;
  margin: 7px 4px;
  background: #e2e8f0;
}

.customer-actions-menu button.danger {
  color: #ef4444;
}

.customer-actions-menu button.danger i {
  color: #ef4444;
}

.customer-actions-menu button.danger:hover {
  background: #fef2f2;
}

.customers-table-card {
  overflow: hidden;
}

.customers-table-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.customer-actions-cell {
  position: relative;
  display: flex;
  justify-content: center;
}

/* ==========================================================
   CUSTOMERS PAGE. FINAL RESPONSIVE ALIGNMENT
========================================================== */

.customers-page {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

/* ----------------------------------------------------------
   KPI CARDS
---------------------------------------------------------- */

.customers-kpi-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.customer-kpi-card {
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

.customer-kpi-left,
.customer-kpi-left > div,
.customer-kpi-right {
  min-width: 0;
}

.customer-kpi-left h2,
.customer-kpi-left p,
.customer-kpi-left small {
  max-width: 100%;
}

.customer-kpi-right {
  flex: 0 0 auto;
}

.customer-kpi-right canvas {
  max-width: 82px;
}

/* ----------------------------------------------------------
   TOOLBAR
---------------------------------------------------------- */

.customers-toolbar {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.customers-toolbar-left {
  min-width: 0;
  display: grid;
  grid-template-columns:
    minmax(260px, 1fr)
    max-content
    max-content;
  gap: 12px;
  align-items: center;
}

.customers-toolbar-right {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 12px;
  align-items: center;
  justify-content: end;
}

.customers-search {
  width: 100%;
  min-width: 0;
}

.customer-toggle,
.customer-toolbar-btn,
.customer-add-btn {
  min-width: 0;
  white-space: nowrap;
  justify-content: center;
}

.customer-toolbar-btn {
  min-width: 112px;
}

.customer-add-btn {
  min-width: 170px;
}

/* ----------------------------------------------------------
   STANDARD LAPTOP AND MACBOOK
---------------------------------------------------------- */

@media (max-width: 1500px) {
  .customers-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-kpi-card {
    flex-direction: row;
    align-items: center;
    gap: 14px;
  }

  .customers-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .customers-toolbar-left {
    grid-template-columns:
      minmax(260px, 1fr)
      max-content
      max-content;
  }

  .customers-toolbar-right {
    justify-content: end;
  }
}

/* ----------------------------------------------------------
   IPAD LANDSCAPE AND SMALL LAPTOP
---------------------------------------------------------- */

@media (max-width: 1180px) {
  .customers-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customers-toolbar-left {
    grid-template-columns: minmax(0, 1fr) max-content;
  }

  .customers-search {
    grid-column: 1 / -1;
  }

  .customers-toolbar-right {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .customer-toolbar-btn,
  .customer-add-btn {
    width: 100%;
    min-width: 0;
  }
}

/* ----------------------------------------------------------
   TABLET PORTRAIT
---------------------------------------------------------- */

@media (max-width: 820px) {
  .customers-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .customers-toolbar-left,
  .customers-toolbar-right {
    grid-template-columns: minmax(0, 1fr);
  }

  .customers-search,
  .customer-toggle,
  .customer-toolbar-btn,
  .customer-add-btn {
    width: 100%;
  }

  .customer-kpi-card {
    flex-direction: row;
    align-items: center;
  }
}

/* ----------------------------------------------------------
   MOBILE
---------------------------------------------------------- */

@media (max-width: 560px) {
  .customer-kpi-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .customer-kpi-right {
    width: 100%;
    align-items: flex-start;
  }
}
