.clients-admin-page {
  width: 100%;
  min-width: 0;
  padding: 28px;
  color: #18231b;
}

.clients-admin-header {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.clients-admin-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #3f7849;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.clients-admin-header h1 {
  margin: 0;
  color: #111d15;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.clients-admin-header p {
  max-width: 760px;
  margin: 6px 0 0;
  color: #647168;
  font-size: 13px;
  font-weight: 650;
}

.clients-admin-header-actions {
  display: flex;
  gap: 8px;
}

.clients-primary-button,
.clients-secondary-button {
  min-height: 40px;
  padding: 0 13px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.clients-primary-button {
  border: 1px solid #2e7139;
  background: #2e7139;
  color: #fff;
}

.clients-secondary-button {
  border: 1px solid rgba(23, 52, 29, .12);
  background: #fff;
  color: #344b39;
}

.clients-primary-button svg,
.clients-secondary-button svg {
  width: 15px;
  height: 15px;
}

.clients-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 15px;
}

.clients-kpis article {
  min-width: 0;
  min-height: 86px;
  padding: 13px;
  border: 1px solid rgba(19, 48, 26, .09);
  border-radius: 11px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 11px;
}

.clients-kpi-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #edf4ee;
  color: #397443;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clients-kpi-icon svg {
  width: 17px;
  height: 17px;
}

.clients-kpis article > div:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.clients-kpis span {
  color: #718077;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.clients-kpis strong {
  overflow: hidden;
  color: #17301d;
  font-size: 17px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clients-filters {
  display: grid;
  grid-template-columns:
    minmax(280px, 1.8fr)
    145px
    160px
    170px
    130px
    115px
    135px
    135px
    135px
    165px
    42px;
  gap: 7px;
  margin-bottom: 11px;
}

.clients-search {
  position: relative;
}

.clients-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 15px;
  height: 15px;
  color: #718077;
  transform: translateY(-50%);
}

.clients-search input,
.clients-filters select,
.clients-filters > input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(19, 48, 26, .11);
  border-radius: 8px;
  background: #fff;
  color: #17231a;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  outline: none;
}

.clients-search input {
  padding: 0 10px 0 36px;
}

.clients-filters select,
.clients-filters > input {
  padding: 0 9px;
}

.clients-search input:focus,
.clients-filters select:focus,
.clients-filters > input:focus {
  border-color: #52825a;
  box-shadow: 0 0 0 3px rgba(61, 123, 72, .06);
}

.clients-clear-filters {
  width: 42px;
  height: 40px;
  border: 1px solid rgba(19, 48, 26, .11);
  border-radius: 8px;
  background: #fff;
  color: #607067;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.clients-clear-filters svg {
  width: 15px;
  height: 15px;
}

.clients-list-summary {
  margin-bottom: 10px;
}

.clients-list-summary > div {
  width: fit-content;
  min-height: 37px;
  padding: 0 11px;
  border: 1px solid rgba(19, 48, 26, .08);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clients-list-summary span {
  color: #728078;
  font-size: 9px;
  font-weight: 800;
}

.clients-list-summary strong {
  color: #1a4224;
  font-size: 14px;
  font-weight: 900;
}

.clients-bulk-bar {
  min-height: 50px;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(47, 112, 58, .16);
  border-radius: 9px;
  background: #f2f7f3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clients-bulk-bar[hidden],
.clients-loading[hidden],
.clients-empty[hidden],
.clients-table-card[hidden],
.client-detail-modal[hidden] {
  display: none !important;
}

.clients-bulk-bar > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.clients-bulk-bar strong {
  color: #276b33;
  font-size: 15px;
  font-weight: 900;
}

.clients-bulk-bar span {
  color: #68766d;
  font-size: 10px;
  font-weight: 750;
}

.clients-bulk-bar button {
  min-height: 35px;
  padding: 0 11px;
  border: 1px solid #347440;
  border-radius: 7px;
  background: #347440;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.clients-bulk-bar button svg {
  width: 13px;
  height: 13px;
}

.clients-loading {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #66756a;
  font-size: 11px;
  font-weight: 750;
}

.clients-loading svg {
  width: 17px;
  height: 17px;
  animation: clientsSpin .8s linear infinite;
}

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

.clients-table-card {
  border: 1px solid rgba(19, 48, 26, .09);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.clients-table-scroll {
  overflow-x: auto;
}

.clients-table {
  width: 100%;
  min-width: 1430px;
  border-collapse: collapse;
}

.clients-table th {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(19, 48, 26, .08);
  background: #f7f9f7;
  color: #65746a;
  text-align: left;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.clients-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(19, 48, 26, .055);
  color: #314036;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

.clients-table tbody tr:hover {
  background: #fbfcfb;
}

.clients-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #397745;
}

.clients-name-button {
  max-width: 230px;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: transparent;
  color: #1b3b22;
  display: block;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.clients-email,
.clients-phone,
.clients-cuit {
  display: block;
  max-width: 230px;
  margin-top: 2px;
  overflow: hidden;
  color: #758178;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clients-company {
  display: block;
  max-width: 190px;
  overflow: hidden;
  color: #26382a;
  font-size: 10px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clients-muted {
  color: #909991;
  font-size: 9px;
}

.clients-segment {
  min-height: 23px;
  padding: 0 7px;
  border-radius: 999px;
  background: #edf2ee;
  color: #53685a;
  display: inline-flex;
  align-items: center;
  font-size: 8px;
  font-weight: 900;
}

.clients-segment.is-vip {
  background: rgba(177, 121, 23, .11);
  color: #926515;
}

.clients-segment.is-frecuente {
  background: rgba(40, 102, 170, .1);
  color: #326697;
}

.clients-segment.is-recurrente {
  background: rgba(43, 126, 57, .1);
  color: #2c7138;
}

.clients-number-cell,
.clients-money-cell,
.clients-favorite,
.clients-location,
.clients-last-order {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.clients-number-cell strong {
  color: #1f3c26;
  font-size: 13px;
  font-weight: 900;
}

.clients-number-cell span,
.clients-money-cell span,
.clients-favorite span,
.clients-location span,
.clients-last-order span {
  color: #7b877f;
  font-size: 8px;
}

.clients-number-cell small {
  color: #939c95;
  font-size: 7px;
}

.clients-money-cell strong {
  color: #193b21;
  font-size: 11px;
  font-weight: 900;
}

.clients-favorite {
  max-width: 190px;
}

.clients-favorite strong {
  overflow: hidden;
  color: #2a392e;
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clients-location strong,
.clients-last-order strong {
  color: #334339;
  font-size: 9px;
  font-weight: 850;
}

.clients-open-button {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(19, 48, 26, .1);
  border-radius: 7px;
  background: #fff;
  color: #4f6155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.clients-open-button:hover {
  background: #f2f7f3;
  color: #32713d;
}

.clients-open-button svg {
  width: 13px;
  height: 13px;
}

.clients-empty {
  min-height: 340px;
  border: 1px dashed rgba(19, 48, 26, .14);
  border-radius: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.clients-empty svg {
  width: 39px;
  height: 39px;
  color: #879289;
}

.clients-empty h2 {
  margin: 14px 0 4px;
  color: #26362a;
  font-size: 19px;
  font-weight: 900;
}

.clients-empty p {
  margin: 0;
  color: #78847c;
  font-size: 10px;
}

.client-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-detail-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 17, 10, .58);
  backdrop-filter: blur(3px);
}

.client-detail-panel {
  position: relative;
  z-index: 1;
  width: min(1220px, 100%);
  max-height: calc(100vh - 36px);
  border-radius: 15px;
  overflow: hidden;
  background: #f5f7f5;
  opacity: 0;
  transform: translateY(7px);
  transition: .14s ease;
}

.client-detail-modal.is-visible .client-detail-panel {
  opacity: 1;
  transform: translateY(0);
}

.client-detail-header {
  min-height: 76px;
  padding: 13px 17px;
  border-bottom: 1px solid rgba(19, 48, 26, .08);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.client-detail-identity {
  display: flex;
  align-items: center;
  gap: 11px;
}

.client-detail-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #eaf2eb;
  color: #34743f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
}

.client-detail-identity span {
  color: #748178;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-detail-identity h2 {
  margin: 1px 0;
  color: #17251b;
  font-size: 20px;
  font-weight: 900;
}

.client-detail-identity p {
  margin: 0;
  color: #77837b;
  font-size: 9px;
}

.client-detail-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(19, 48, 26, .1);
  border-radius: 8px;
  background: #fff;
  color: #617067;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.client-detail-close svg {
  width: 15px;
  height: 15px;
}

.client-detail-body {
  max-height: calc(100vh - 112px);
  padding: 13px;
  overflow-y: auto;
}

.client-detail-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.client-detail-kpis article {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(19, 48, 26, .08);
  border-radius: 9px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.client-detail-kpis span {
  color: #7c8980;
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-detail-kpis strong {
  overflow: hidden;
  color: #18351f;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.client-detail-card {
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid rgba(19, 48, 26, .08);
  border-radius: 10px;
  background: #fff;
}

.client-detail-grid .client-detail-card {
  margin-bottom: 0;
}

.client-detail-card > header {
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(19, 48, 26, .065);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.client-detail-card > header span {
  color: #78857c;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.client-detail-card > header h3 {
  margin: 2px 0 0;
  color: #1c2d20;
  font-size: 13px;
  font-weight: 900;
}

.client-detail-card > header > svg {
  width: 16px;
  height: 16px;
  color: #55765b;
}

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

.client-detail-info > div,
.client-detail-stats > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-detail-info span,
.client-detail-stats span {
  color: #839087;
  font-size: 7px;
  font-weight: 850;
  text-transform: uppercase;
}

.client-detail-info strong {
  overflow: hidden;
  color: #293b2e;
  font-size: 9px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.client-detail-stats > div {
  padding: 9px;
  border-radius: 8px;
  background: #f7f9f7;
}

.client-detail-stats strong {
  color: #243e2a;
  font-size: 14px;
  font-weight: 900;
}

.client-detail-alert {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #eff6f0;
  color: #2d6d38;
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-detail-alert.is-warning {
  background: #faf5e9;
  color: #8d651c;
}

.client-detail-alert svg {
  width: 15px;
  height: 15px;
}

.client-detail-alert > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.client-detail-alert span {
  font-size: 7px;
  font-weight: 850;
  text-transform: uppercase;
}

.client-detail-alert strong {
  font-size: 10px;
  font-weight: 900;
}

.client-products-table,
.client-orders-table {
  overflow-x: auto;
}

.client-products-row {
  min-width: 720px;
  padding: 9px 3px;
  border-bottom: 1px solid rgba(19, 48, 26, .055);
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 90px 100px 130px 120px;
  gap: 10px;
  align-items: center;
}

.client-products-row.is-header,
.client-orders-row.is-header {
  color: #78857c;
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-products-row > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.client-products-row small {
  color: #859087;
  font-size: 7px;
}

.client-products-row strong {
  color: #293b2e;
  font-size: 9px;
  font-weight: 850;
}

.client-products-row > span {
  color: #67756b;
  font-size: 8px;
}

.client-payment-list,
.client-location-list {
  display: grid;
}

.client-payment-list > div,
.client-location-list > div {
  padding: 9px 0;
  border-bottom: 1px solid rgba(19, 48, 26, .055);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.client-payment-list section,
.client-location-list section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-payment-list section:last-child {
  text-align: right;
}

.client-payment-list strong,
.client-location-list strong {
  color: #293a2d;
  font-size: 9px;
  font-weight: 850;
}

.client-payment-list span,
.client-location-list span {
  color: #7c887f;
  font-size: 7px;
}

.client-orders-row {
  min-width: 800px;
  padding: 9px 3px;
  border-bottom: 1px solid rgba(19, 48, 26, .055);
  display: grid;
  grid-template-columns: 110px 145px 120px 110px minmax(150px, 1fr) 130px;
  gap: 10px;
  align-items: center;
}

.client-orders-row strong {
  color: #25382a;
  font-size: 9px;
  font-weight: 850;
}

.client-orders-row span {
  color: #69776d;
  font-size: 8px;
}

.client-order-status {
  width: fit-content;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #edf2ee;
  display: inline-flex;
  align-items: center;
  font-size: 7px !important;
  font-weight: 900;
}

.client-order-status.is-entregado {
  background: rgba(32, 130, 51, .1);
  color: #267239;
}

.client-order-status.is-cancelado {
  background: rgba(172, 46, 46, .1);
  color: #9d3333;
}

.client-order-status.is-facturado,
.client-order-status.is-preparado {
  background: rgba(45, 91, 161, .1);
  color: #355f9d;
}

.client-months-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.client-months-grid article {
  min-width: 0;
  padding: 9px;
  border-radius: 8px;
  background: #f6f8f6;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.client-months-grid span {
  color: #78847c;
  font-size: 7px;
  font-weight: 850;
  text-transform: uppercase;
}

.client-months-grid strong {
  overflow: hidden;
  color: #203b26;
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-months-grid small {
  color: #8b958d;
  font-size: 7px;
}

.client-detail-empty {
  margin: 15px 0;
  color: #87928a;
  font-size: 9px;
  text-align: center;
}

.clients-admin-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 4000;
  max-width: 370px;
  padding: 11px 14px;
  border-radius: 8px;
  background: #18351f;
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .15s ease;
}

.clients-admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.clients-admin-toast.is-error {
  background: #a63131;
}

@media (max-width: 1500px) {
  .clients-kpis {
    grid-template-columns: repeat(3, 1fr);
  }

  .clients-filters {
    grid-template-columns: repeat(5, 1fr);
  }

  .clients-search {
    grid-column: span 2;
  }
}

@media (max-width: 1050px) {
  .client-detail-kpis {
    grid-template-columns: repeat(3, 1fr);
  }

  .client-months-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .clients-admin-page {
    padding: 18px 12px;
  }

  .clients-admin-header {
    flex-direction: column;
  }

  .clients-admin-header-actions {
    width: 100%;
  }

  .clients-admin-header-actions button {
    flex: 1;
  }

  .clients-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .clients-filters {
    grid-template-columns: 1fr;
  }

  .clients-search {
    grid-column: auto;
  }

  .clients-clear-filters {
    width: 100%;
  }

  .clients-bulk-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .client-detail-modal {
    padding: 7px;
  }

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

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

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

  .client-months-grid {
    grid-template-columns: 1fr 1fr;
  }
}
