.orders-admin-page {
  width: 100%;
  min-width: 0;
  padding: 28px;
  color: #162219;
}

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

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

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

.orders-admin-header p {
  margin: 6px 0 0;
  color: #65746a;
  font-size: 13px;
  font-weight: 650;
}

.orders-admin-button,
.orders-admin-bulk button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(22, 50, 28, .12);
  border-radius: 9px;
  background: #fff;
  color: #314a37;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.orders-admin-button svg,
.orders-admin-bulk button svg {
  width: 15px;
  height: 15px;
}

.orders-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px 170px 180px 150px 150px;
  gap: 9px;
  margin-bottom: 11px;
}

.orders-admin-search {
  position: relative;
}

.orders-admin-search svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 16px;
  height: 16px;
  color: #78847c;
  transform: translateY(-50%);
}

.orders-admin-search input,
.orders-admin-toolbar select,
.orders-admin-toolbar > input {
  width: 100%;
  height: 41px;
  border: 1px solid rgba(22, 50, 28, .12);
  border-radius: 9px;
  background: #fff;
  color: #1c2b20;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  outline: none;
}

.orders-admin-search input {
  padding: 0 11px 0 39px;
}

.orders-admin-toolbar select,
.orders-admin-toolbar > input {
  padding: 0 10px;
}

.orders-admin-summary {
  min-height: 42px;
  margin-bottom: 11px;
  padding: 0 13px;
  border: 1px solid rgba(22, 50, 28, .09);
  border-radius: 9px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.orders-admin-summary span {
  color: #708078;
  font-size: 10px;
  font-weight: 800;
}

.orders-admin-summary strong {
  color: #18371f;
  font-size: 17px;
  font-weight: 900;
}

.orders-admin-bulk {
  min-height: 52px;
  margin-bottom: 11px;
  padding: 8px 11px;
  border: 1px solid rgba(46, 113, 56, .18);
  border-radius: 10px;
  background: #f4f8f4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.orders-admin-bulk[hidden],
.orders-admin-loading[hidden],
.orders-admin-empty[hidden],
.orders-admin-table-card[hidden],
.order-detail-modal[hidden] {
  display: none !important;
}

.orders-admin-bulk > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.orders-admin-bulk strong {
  color: #246a31;
  font-size: 15px;
}

.orders-admin-bulk span {
  color: #637168;
  font-size: 10px;
  font-weight: 750;
}

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

.orders-admin-loading svg {
  width: 17px;
  height: 17px;
  animation: ordersSpin .8s linear infinite;
}

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

.orders-admin-table-card {
  border: 1px solid rgba(22, 50, 28, .09);
  border-radius: 13px;
  overflow: hidden;
  background: #fff;
}

.orders-admin-table-scroll {
  overflow-x: auto;
}

.orders-admin-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.orders-admin-table th {
  padding: 12px 13px;
  border-bottom: 1px solid rgba(22, 50, 28, .08);
  background: #f7f9f7;
  color: #68766d;
  text-align: left;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.orders-admin-table td {
  padding: 13px;
  border-bottom: 1px solid rgba(22, 50, 28, .06);
  color: #344238;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

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

.orders-admin-number {
  padding: 0;
  border: 0;
  background: transparent;
  color: #255f31;
  display: block;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.orders-admin-date {
  display: block;
  margin-top: 3px;
  color: #849087;
  font-size: 8px;
}

.orders-admin-client,
.orders-admin-products-count,
.orders-admin-payment {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.orders-admin-client strong,
.orders-admin-payment strong {
  color: #1c2c20;
  font-size: 11px;
  font-weight: 900;
}

.orders-admin-client span,
.orders-admin-products-count span {
  color: #748078;
  font-size: 9px;
}

.orders-admin-client small,
.orders-admin-products-count small {
  color: #909991;
  font-size: 8px;
}

.orders-admin-products-count > strong {
  color: #1e3524;
  font-size: 15px;
  font-weight: 900;
}

.orders-admin-badge {
  width: fit-content;
  min-height: 23px;
  margin-top: 4px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.orders-admin-badge.is-order {
  background: #edf3ee;
  color: #45634b;
}

.orders-admin-badge.is-entregado,
.orders-admin-badge.is-pagado {
  background: rgba(28, 137, 54, .1);
  color: #23743a;
}

.orders-admin-badge.is-cancelado,
.orders-admin-badge.is-rechazado,
.orders-admin-badge.is-anulado {
  background: rgba(181, 45, 45, .1);
  color: #aa3030;
}

.orders-admin-badge.is-facturado,
.orders-admin-badge.is-preparado {
  background: rgba(54, 95, 176, .1);
  color: #315fa4;
}

.orders-admin-badge.is-pendiente,
.orders-admin-badge.is-en_preparacion,
.orders-admin-badge.is-parcial {
  background: rgba(171, 112, 20, .1);
  color: #916116;
}

.orders-admin-total-value {
  color: #172f1d;
  font-size: 12px;
  font-weight: 900;
}

.orders-admin-actions {
  display: flex;
  gap: 5px;
}

.orders-admin-actions button {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(22, 50, 28, .1);
  border-radius: 7px;
  background: #fff;
  color: #56665b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.orders-admin-actions button svg {
  width: 13px;
  height: 13px;
}

.orders-admin-empty {
  min-height: 350px;
  border: 1px dashed rgba(22, 50, 28, .14);
  border-radius: 13px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.orders-admin-empty svg {
  width: 40px;
  height: 40px;
  color: #839087;
}

.orders-admin-empty h2 {
  margin: 14px 0 4px;
  font-size: 19px;
}

.orders-admin-empty p {
  margin: 0;
  color: #77847b;
  font-size: 11px;
}

.order-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

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

.order-detail-header {
  min-height: 78px;
  padding: 15px 19px;
  border-bottom: 1px solid rgba(22, 50, 28, .08);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.order-detail-header span {
  color: #47784f;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-detail-header h2 {
  margin: 2px 0 0;
  color: #17231a;
  font-size: 22px;
  font-weight: 900;
}

.order-detail-header p {
  margin: 2px 0 0;
  color: #829087;
  font-size: 9px;
}

.order-detail-header__actions {
  display: flex;
  gap: 6px;
}

.order-detail-header__actions button {
  min-height: 35px;
  padding: 0 10px;
  border: 1px solid rgba(22, 50, 28, .11);
  border-radius: 8px;
  background: #fff;
  color: #455849;
  display: flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.order-detail-header__actions button.is-close {
  width: 35px;
  padding: 0;
  justify-content: center;
}

.order-detail-header__actions svg {
  width: 14px;
  height: 14px;
}

.order-detail-body {
  max-height: calc(100vh - 118px);
  padding: 15px;
  overflow-y: auto;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 11px;
}

.order-detail-card {
  padding: 15px;
  border: 1px solid rgba(22, 50, 28, .085);
  border-radius: 11px;
  background: #fff;
}

.order-detail-label {
  display: block;
  margin-bottom: 7px;
  color: #7a877e;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.order-detail-card h3 {
  margin: 0 0 5px;
  color: #1d2e21;
  font-size: 13px;
  font-weight: 900;
}

.order-detail-card p {
  margin: 2px 0;
  color: #69776d;
  font-size: 10px;
}

.order-detail-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 9px;
}

.order-detail-field > span {
  color: #65746a;
  font-size: 8px;
  font-weight: 850;
}

.order-detail-field input,
.order-detail-field select,
.order-detail-field textarea {
  width: 100%;
  border: 1px solid rgba(22, 50, 28, .12);
  border-radius: 7px;
  background: #fff;
  color: #1b2a1f;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  outline: none;
}

.order-detail-field input,
.order-detail-field select {
  height: 35px;
  padding: 0 9px;
}

.order-detail-field textarea {
  min-height: 60px;
  padding: 8px;
  resize: vertical;
}

.order-detail-primary {
  width: 100%;
  min-height: 35px;
  margin-top: 10px;
  border: 0;
  border-radius: 8px;
  background: #2d7039;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.order-detail-primary svg {
  width: 13px;
  height: 13px;
}

.order-detail-products {
  margin-bottom: 11px;
}

.order-detail-section-header {
  margin-bottom: 9px;
}

.order-detail-items {
  overflow-x: auto;
}

.order-detail-item {
  min-width: 650px;
  padding: 9px 4px;
  border-bottom: 1px solid rgba(22, 50, 28, .06);
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 90px 130px 130px;
  gap: 10px;
  align-items: center;
}

.order-detail-item.is-header {
  color: #7a867d;
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
}

.order-detail-item > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-detail-item small {
  color: #879188;
  font-size: 8px;
}

.order-detail-item strong {
  color: #25372a;
  font-size: 10px;
  font-weight: 850;
}

.order-detail-total {
  padding-top: 13px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.order-detail-total span {
  font-size: 11px;
  font-weight: 850;
}

.order-detail-total strong {
  color: #18361f;
  font-size: 19px;
  font-weight: 900;
}

.order-detail-fast-actions {
  display: grid;
  gap: 6px;
}

.order-detail-fast-actions button {
  min-height: 34px;
  border: 1px solid rgba(22, 50, 28, .1);
  border-radius: 7px;
  background: #f7f9f7;
  color: #425547;
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.order-detail-history {
  display: grid;
}

.order-detail-history > div {
  position: relative;
  padding: 0 0 13px 18px;
}

.order-detail-history > div > span {
  position: absolute;
  top: 5px;
  left: 1px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a8154;
}

.order-detail-history section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-detail-history strong {
  font-size: 9px;
  font-weight: 900;
}

.order-detail-history p {
  margin: 0;
  font-size: 9px;
}

.order-detail-history small {
  color: #89938b;
  font-size: 8px;
}

.order-detail-empty-history {
  color: #869189;
  font-size: 9px;
}

.orders-admin-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 4000;
  max-width: 360px;
  padding: 12px 15px;
  border-radius: 9px;
  background: #18321e;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .15s ease;
}

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

.orders-admin-toast.is-error {
  background: #a72b2b;
}

@media (max-width: 1200px) {
  .orders-admin-toolbar {
    grid-template-columns: 1fr 1fr 1fr;
  }

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

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

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

  .orders-admin-toolbar,
  .order-detail-grid {
    grid-template-columns: 1fr;
  }

  .orders-admin-bulk {
    align-items: stretch;
    flex-direction: column;
  }

  .orders-admin-bulk > div:last-child {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .order-detail-modal {
    padding: 8px;
  }

  .order-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
