/* =========================================================
   WIRTZ HUB · PEDIDOS MAYORISTAS · MIS PEDIDOS ASIGNADOS
   CSS completo · Limpio · Neutro · Sin azul oscuro
   ========================================================= */

/* =========================================================
   PAGE
   ========================================================= */

.pm-page.pm-mis-page {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;

  width: 100%;
  max-width: 100%;
  min-height: calc(100vh - var(--topbar-height, 72px) - 44px);

  color: #111111;
  overflow-x: hidden;
}

html[data-theme="dark"] .pm-page.pm-mis-page {
  color: #f5f5f5;
}

/* =========================================================
   HEADER
   ========================================================= */

.pm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  width: 100%;
  padding: 14px 16px;

  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
}

html[data-theme="dark"] .pm-head {
  background: #0f0f0f;
  border-color: #2a2a2a;
}

.pm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.pm-brand__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 42px;
  height: 42px;
  flex: 0 0 42px;

  color: #111111;
  background: #f4f4f5;
  border: 1px solid #d4d4d8;
  border-radius: 14px;
}

html[data-theme="dark"] .pm-brand__icon {
  color: #f5f5f5;
  background: #181818;
  border-color: #333333;
}

.pm-brand h2 {
  margin: 0;
  color: inherit;
  font-size: 21px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.pm-brand p {
  margin: 4px 0 0;
  color: #737373;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

html[data-theme="dark"] .pm-brand p {
  color: #a3a3a3;
}

.pm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

/* =========================================================
   ICONS
   ========================================================= */

.icon {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke-width: 2.2;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.pm-btn,
.pm-icon-btn,
.pm-mis-mini-btn,
.pm-mis-toggle-done {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 36px;
  padding: 0 13px;

  color: #111111;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 12px;

  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.pm-btn:hover {
  background: #f4f4f5;
  border-color: #a1a1aa;
  transform: translateY(-1px);
}

.pm-btn--dark {
  color: #ffffff;
  background: #111111;
  border-color: #111111;
}

.pm-btn--dark:hover {
  color: #ffffff;
  background: #000000;
  border-color: #000000;
}

html[data-theme="dark"] .pm-btn {
  color: #f5f5f5;
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-btn:hover {
  background: #222222;
  border-color: #4a4a4a;
}

html[data-theme="dark"] .pm-btn--dark {
  color: #111111;
  background: #ffffff;
  border-color: #ffffff;
}

html[data-theme="dark"] .pm-btn--dark:hover {
  color: #111111;
  background: #e5e5e5;
  border-color: #e5e5e5;
}

.pm-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 34px;
  height: 34px;
  min-width: 34px;

  color: #111111;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 11px;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.pm-icon-btn:hover {
  background: #f4f4f5;
  border-color: #a1a1aa;
  transform: translateY(-1px);
}

.pm-icon-btn.is-danger {
  color: #991b1b;
  background: #fff5f5;
  border-color: #fecaca;
}

html[data-theme="dark"] .pm-icon-btn {
  color: #f5f5f5;
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-icon-btn:hover {
  background: #222222;
  border-color: #4a4a4a;
}

html[data-theme="dark"] .pm-icon-btn.is-danger {
  color: #fca5a5;
  background: #2a1111;
  border-color: #7f1d1d;
}

/* =========================================================
   METRICS
   ========================================================= */

.pm-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.pm-card-metric {
  min-width: 0;
  padding: 14px 14px 13px;

  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
}

html[data-theme="dark"] .pm-card-metric {
  background: #0f0f0f;
  border-color: #2a2a2a;
}

.pm-card-metric span {
  display: block;
  margin-bottom: 7px;

  color: #737373;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pm-card-metric strong {
  display: block;

  color: #111111;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
}

.pm-card-metric small {
  display: block;
  margin-top: 7px;

  color: #737373;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}

html[data-theme="dark"] .pm-card-metric span,
html[data-theme="dark"] .pm-card-metric small {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-card-metric strong {
  color: #f5f5f5;
}

/* =========================================================
   PANELS
   ========================================================= */

.pm-panel {
  min-width: 0;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  overflow: hidden;
}

html[data-theme="dark"] .pm-panel {
  background: #0f0f0f;
  border-color: #2a2a2a;
}

.pm-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  min-height: 58px;
  padding: 13px 15px;

  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.pm-panel__head--toolbar {
  align-items: flex-start;
}

html[data-theme="dark"] .pm-panel__head {
  background: #0f0f0f;
  border-color: #2a2a2a;
}

.pm-panel__head span {
  display: block;
  margin-bottom: 4px;

  color: #737373;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pm-panel__head strong {
  display: block;

  color: #111111;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.15;
}

.pm-panel__head small {
  display: block;
  margin-top: 4px;

  color: #737373;
  font-size: 12px;
  font-weight: 600;
}

html[data-theme="dark"] .pm-panel__head span,
html[data-theme="dark"] .pm-panel__head small {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-panel__head strong {
  color: #f5f5f5;
}

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

.pm-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: min(100%, 760px);
}

.pm-search {
  display: flex;
  align-items: center;
  gap: 8px;

  min-width: 280px;
  height: 38px;
  padding: 0 11px;

  color: #737373;
  background: #f4f4f5;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
}

.pm-search input {
  width: 100%;
  min-width: 0;
  height: 100%;

  color: #111111;
  background: transparent;
  border: 0;
  outline: 0;

  font-size: 13px;
  font-weight: 650;
}

.pm-search input::placeholder {
  color: #a1a1aa;
}

.pm-toolbar select {
  height: 38px;
  min-width: 150px;
  padding: 0 10px;

  color: #111111;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  outline: 0;

  font-family: inherit;
  font-size: 12px;
  font-weight: 750;
}

.pm-mis-toggle-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  height: 38px;
  padding: 0 13px;

  color: #111111;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 12px;

  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.pm-mis-toggle-done:hover {
  background: #f4f4f5;
}

.pm-mis-toggle-done.is-active {
  color: #ffffff;
  background: #111111;
  border-color: #111111;
}

html[data-theme="dark"] .pm-search,
html[data-theme="dark"] .pm-toolbar select,
html[data-theme="dark"] .pm-mis-toggle-done {
  color: #f5f5f5;
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-search input {
  color: #f5f5f5;
}

html[data-theme="dark"] .pm-search input::placeholder {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-mis-toggle-done:hover {
  background: #222222;
}

html[data-theme="dark"] .pm-mis-toggle-done.is-active {
  color: #111111;
  background: #ffffff;
  border-color: #ffffff;
}

/* =========================================================
   LAYOUT
   ========================================================= */

.pm-mis-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.pm-mis-sidebar {
  position: sticky;
  top: calc(var(--topbar-height, 72px) + 12px);
  max-height: calc(100vh - var(--topbar-height, 72px) - 68px);
}

.pm-mis-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - var(--topbar-height, 72px) - 142px);
  padding: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.pm-mis-main {
  min-height: 540px;
}

/* =========================================================
   PEDIDO CARDS
   ========================================================= */

.pm-mis-card {
  display: grid;
  gap: 11px;

  padding: 13px;

  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;

  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.pm-mis-card:hover {
  background: #fafafa;
  border-color: #cfcfcf;
  transform: translateY(-1px);
}

.pm-mis-card.is-active {
  border-color: #111111;
}

html[data-theme="dark"] .pm-mis-card {
  background: #101010;
  border-color: #2a2a2a;
}

html[data-theme="dark"] .pm-mis-card:hover {
  background: #181818;
  border-color: #3a3a3a;
}

html[data-theme="dark"] .pm-mis-card.is-active {
  border-color: #ffffff;
}

.pm-mis-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pm-mis-card header div {
  min-width: 0;
}

.pm-mis-card header span {
  display: block;
  color: #737373;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
}

.pm-mis-card header strong {
  display: block;
  margin-top: 4px;

  overflow: hidden;
  color: #111111;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .pm-mis-card header span {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-mis-card header strong {
  color: #f5f5f5;
}

.pm-mis-progress {
  position: relative;
  height: 7px;
  overflow: hidden;

  background: #e5e5e5;
  border-radius: 999px;
}

.pm-mis-progress span {
  display: block;
  height: 100%;

  background: #111111;
  border-radius: inherit;
}

html[data-theme="dark"] .pm-mis-progress {
  background: #2a2a2a;
}

html[data-theme="dark"] .pm-mis-progress span {
  background: #f5f5f5;
}

.pm-mis-card__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.pm-mis-card__grid div {
  min-width: 0;
  padding: 8px;

  background: #f4f4f5;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
}

.pm-mis-card__grid span {
  display: block;
  margin-bottom: 4px;

  color: #737373;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.pm-mis-card__grid strong {
  display: block;
  color: #111111;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

html[data-theme="dark"] .pm-mis-card__grid div {
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-mis-card__grid span {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-mis-card__grid strong {
  color: #f5f5f5;
}

.pm-mis-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pm-mis-card footer small {
  color: #737373;
  font-size: 11px;
  font-weight: 700;
}

.pm-mis-card footer .pm-btn {
  min-height: 32px;
  padding: 0 11px;
  font-size: 11px;
}

html[data-theme="dark"] .pm-mis-card footer small {
  color: #a3a3a3;
}

/* =========================================================
   PLACEHOLDER / EMPTY
   ========================================================= */

.pm-mis-placeholder,
.pm-mis-empty {
  display: grid;
  place-items: center;
  gap: 8px;

  min-height: 240px;
  padding: 24px;

  color: #737373;
  text-align: center;
}

.pm-mis-placeholder .icon,
.pm-mis-empty .icon {
  width: 34px;
  height: 34px;
}

.pm-mis-placeholder strong,
.pm-mis-empty strong {
  color: #111111;
  font-size: 15px;
  font-weight: 900;
}

.pm-mis-placeholder span,
.pm-mis-empty span {
  color: #737373;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
}

.pm-mis-empty.is-error strong {
  color: #991b1b;
}

html[data-theme="dark"] .pm-mis-placeholder,
html[data-theme="dark"] .pm-mis-empty,
html[data-theme="dark"] .pm-mis-placeholder span,
html[data-theme="dark"] .pm-mis-empty span {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-mis-placeholder strong,
html[data-theme="dark"] .pm-mis-empty strong {
  color: #f5f5f5;
}

html[data-theme="dark"] .pm-mis-empty.is-error strong {
  color: #fca5a5;
}

/* =========================================================
   SUMMARY
   ========================================================= */

.pm-mis-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border-bottom: 1px solid #e5e5e5;
}

html[data-theme="dark"] .pm-mis-summary {
  border-color: #2a2a2a;
}

.pm-mis-summary article {
  min-width: 0;
  padding: 11px;

  background: #f4f4f5;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
}

.pm-mis-summary span {
  display: block;
  margin-bottom: 5px;

  color: #737373;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pm-mis-summary strong {
  display: block;
  color: #111111;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

html[data-theme="dark"] .pm-mis-summary article {
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-mis-summary span {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-mis-summary strong {
  color: #f5f5f5;
}

/* =========================================================
   SCANNER
   ========================================================= */

.pm-mis-scan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;

  padding: 12px;
  border-bottom: 1px solid #e5e5e5;
}

html[data-theme="dark"] .pm-mis-scan {
  border-color: #2a2a2a;
}

.pm-mis-scan label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.pm-mis-scan label span {
  color: #111111;
  font-size: 12px;
  font-weight: 900;
}

.pm-mis-scan input {
  width: 100%;
  height: 46px;
  padding: 0 14px;

  color: #111111;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 14px;
  outline: 0;

  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.pm-mis-scan input:focus {
  border-color: #111111;
}

.pm-mis-scan label small {
  color: #737373;
  font-size: 11px;
  font-weight: 650;
}

.pm-mis-scan__status {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 10px 12px;

  background: #f4f4f5;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
}

.pm-mis-scan__status strong {
  color: #525252;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
}

.pm-mis-scan__status strong.is-ok {
  color: #166534;
}

.pm-mis-scan__status strong.is-error {
  color: #991b1b;
}

html[data-theme="dark"] .pm-mis-scan label span {
  color: #f5f5f5;
}

html[data-theme="dark"] .pm-mis-scan input {
  color: #f5f5f5;
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-mis-scan input:focus {
  border-color: #f5f5f5;
}

html[data-theme="dark"] .pm-mis-scan label small {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-mis-scan__status {
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-mis-scan__status strong {
  color: #d4d4d4;
}

html[data-theme="dark"] .pm-mis-scan__status strong.is-ok {
  color: #86efac;
}

html[data-theme="dark"] .pm-mis-scan__status strong.is-error {
  color: #fca5a5;
}

/* =========================================================
   PRODUCT LIST
   ========================================================= */

.pm-mis-products-head {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 82px 82px 82px 250px;
  gap: 0;

  padding: 11px 12px;

  background: #f4f4f5;
  border-bottom: 1px solid #e5e5e5;
}

.pm-mis-products-head span {
  color: #737373;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

html[data-theme="dark"] .pm-mis-products-head {
  background: #181818;
  border-color: #2a2a2a;
}

html[data-theme="dark"] .pm-mis-products-head span {
  color: #a3a3a3;
}

.pm-mis-items {
  display: grid;
  max-height: 560px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.pm-mis-product-row {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 82px 82px 82px 250px;
  gap: 0;
  align-items: center;

  min-height: 66px;
  padding: 10px 12px;

  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

.pm-mis-product-row:last-child {
  border-bottom: 0;
}

.pm-mis-product-row:hover {
  background: #fafafa;
}

.pm-mis-product-row.has-diff {
  background: #fff7ed;
}

.pm-mis-product-row.is-complete {
  background: #f0fdf4;
}

html[data-theme="dark"] .pm-mis-product-row {
  background: #101010;
  border-color: #2a2a2a;
}

html[data-theme="dark"] .pm-mis-product-row:hover {
  background: #181818;
}

html[data-theme="dark"] .pm-mis-product-row.has-diff {
  background: #1c1410;
}

html[data-theme="dark"] .pm-mis-product-row.is-complete {
  background: #101810;
}

.pm-mis-product-row__sku,
.pm-mis-product-row__product {
  min-width: 0;
  padding-right: 10px;
}

.pm-mis-product-row__sku strong,
.pm-mis-product-row__product strong {
  display: block;
  overflow: hidden;

  color: #111111;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-mis-product-row__sku span,
.pm-mis-product-row__product span {
  display: block;
  margin-top: 4px;
  overflow: hidden;

  color: #737373;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .pm-mis-product-row__sku strong,
html[data-theme="dark"] .pm-mis-product-row__product strong {
  color: #f5f5f5;
}

html[data-theme="dark"] .pm-mis-product-row__sku span,
html[data-theme="dark"] .pm-mis-product-row__product span {
  color: #a3a3a3;
}

.pm-mis-product-row__qty {
  display: grid;
  gap: 3px;
  justify-items: center;
  text-align: center;
}

.pm-mis-product-row__qty span {
  color: #737373;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.pm-mis-product-row__qty strong {
  color: #111111;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.pm-mis-product-row__qty.is-faltante strong {
  color: #b91c1c;
}

html[data-theme="dark"] .pm-mis-product-row__qty span {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-mis-product-row__qty strong {
  color: #f5f5f5;
}

html[data-theme="dark"] .pm-mis-product-row__qty.is-faltante strong {
  color: #f87171;
}

.pm-mis-product-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.pm-mis-mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;

  min-height: 30px;
  padding: 0 9px;

  color: #111111;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 10px;

  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.pm-mis-mini-btn:hover {
  background: #f4f4f5;
}

.pm-mis-mini-btn .icon {
  width: 14px;
  height: 14px;
}

.pm-mis-mini-btn.is-dark {
  color: #ffffff;
  background: #111111;
  border-color: #111111;
}

.pm-mis-mini-btn.is-danger {
  color: #991b1b;
  background: #fff5f5;
  border-color: #fecaca;
}

html[data-theme="dark"] .pm-mis-mini-btn {
  color: #f5f5f5;
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-mis-mini-btn:hover {
  background: #222222;
}

html[data-theme="dark"] .pm-mis-mini-btn.is-dark {
  color: #111111;
  background: #ffffff;
  border-color: #ffffff;
}

html[data-theme="dark"] .pm-mis-mini-btn.is-danger {
  color: #fca5a5;
  background: #2a1111;
  border-color: #7f1d1d;
}

/* =========================================================
   BADGES
   ========================================================= */

.pm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 24px;
  max-width: 100%;
  padding: 0 9px;

  color: #525252;
  background: #f4f4f5;
  border: 1px solid #e5e5e5;
  border-radius: 999px;

  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pm-badge.is-ok {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.pm-badge.is-warning {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.pm-badge.is-danger {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.pm-badge.is-info,
.pm-badge.is-muted {
  color: #525252;
  background: #f4f4f5;
  border-color: #e5e5e5;
}

html[data-theme="dark"] .pm-badge,
html[data-theme="dark"] .pm-badge.is-info,
html[data-theme="dark"] .pm-badge.is-muted {
  color: #d4d4d4;
  background: #222222;
  border-color: #3a3a3a;
}

html[data-theme="dark"] .pm-badge.is-ok {
  color: #86efac;
  background: #102015;
  border-color: #245c36;
}

html[data-theme="dark"] .pm-badge.is-warning {
  color: #facc15;
  background: #241a0b;
  border-color: #7c4a03;
}

html[data-theme="dark"] .pm-badge.is-danger {
  color: #fca5a5;
  background: #2a1111;
  border-color: #7f1d1d;
}

/* =========================================================
   MODAL
   ========================================================= */

.pm-modal {
  position: fixed;
  inset: 0;
  z-index: 90;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 18px;
  background: rgba(0, 0, 0, 0.62);
}

.pm-modal.is-open {
  display: flex;
}

.pm-modal__card {
  display: flex;
  flex-direction: column;

  width: min(860px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);

  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 22px;
  overflow: hidden;
}

html[data-theme="dark"] .pm-modal__card {
  background: #0f0f0f;
  border-color: #333333;
}

.pm-mis-close-modal {
  width: min(900px, calc(100vw - 28px));
}

.pm-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 15px 16px;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
}

html[data-theme="dark"] .pm-modal__head {
  background: #0f0f0f;
  border-color: #2a2a2a;
}

.pm-modal__head span {
  display: block;
  margin-bottom: 4px;

  color: #737373;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pm-modal__head strong {
  display: block;
  color: #111111;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
}

.pm-modal__head small {
  display: block;
  margin-top: 4px;
  color: #737373;
  font-size: 12px;
  font-weight: 650;
}

html[data-theme="dark"] .pm-modal__head span,
html[data-theme="dark"] .pm-modal__head small {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-modal__head strong {
  color: #f5f5f5;
}

.pm-modal__body {
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.pm-modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;

  padding: 13px 14px;
  border-top: 1px solid #e5e5e5;
}

html[data-theme="dark"] .pm-modal__footer {
  border-color: #2a2a2a;
}

/* =========================================================
   CLOSE FORM
   ========================================================= */

.pm-fast-form {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
}

.pm-field {
  display: grid;
  gap: 7px;
}

.pm-field--full,
.pm-check-line.pm-field--full {
  grid-column: 1 / -1;
}

.pm-field span,
.pm-check-line span {
  color: #525252;
  font-size: 12px;
  font-weight: 850;
}

.pm-field input {
  width: 100%;
  height: 38px;
  padding: 0 11px;

  color: #111111;
  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 12px;
  outline: 0;

  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

.pm-field input:focus {
  border-color: #111111;
}

.pm-check-line {
  display: flex;
  align-items: center;
  gap: 10px;

  min-height: 42px;
  padding: 10px 12px;

  background: #f4f4f5;
  border: 1px solid #e5e5e5;
  border-radius: 13px;
}

.pm-check-line input {
  width: 17px;
  height: 17px;
  accent-color: #111111;
}

html[data-theme="dark"] .pm-field span,
html[data-theme="dark"] .pm-check-line span {
  color: #d4d4d4;
}

html[data-theme="dark"] .pm-field input {
  color: #f5f5f5;
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-field input:focus {
  border-color: #ffffff;
}

html[data-theme="dark"] .pm-check-line {
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-check-line input {
  accent-color: #ffffff;
}

/* =========================================================
   WARNINGS
   ========================================================= */

.pm-mis-warning {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;

  padding: 12px;

  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 14px;
}

.pm-mis-warning.is-ok {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.pm-mis-warning > .icon {
  width: 24px;
  height: 24px;
  justify-self: center;
}

.pm-mis-warning strong {
  display: block;
  color: inherit;
  font-size: 13px;
  font-weight: 900;
}

.pm-mis-warning span {
  display: block;
  margin-top: 3px;
  color: inherit;
  font-size: 12px;
  font-weight: 650;
}

html[data-theme="dark"] .pm-mis-warning {
  color: #facc15;
  background: #241a0b;
  border-color: #7c4a03;
}

html[data-theme="dark"] .pm-mis-warning.is-ok {
  color: #86efac;
  background: #102015;
  border-color: #245c36;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1280px) {
  .pm-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pm-mis-layout {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .pm-mis-products-head,
  .pm-mis-product-row {
    grid-template-columns: 130px minmax(190px, 1fr) 72px 72px 72px 230px;
  }
}

@media (max-width: 1100px) {
  .pm-mis-layout {
    grid-template-columns: 1fr;
  }

  .pm-mis-sidebar {
    position: static;
    max-height: none;
  }

  .pm-mis-list {
    max-height: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pm-mis-scan {
    grid-template-columns: 1fr;
  }

  .pm-mis-products-head {
    display: none;
  }

  .pm-mis-items {
    gap: 10px;
    padding: 12px;
    max-height: none;
  }

  .pm-mis-product-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
  }

  html[data-theme="dark"] .pm-mis-product-row {
    border-color: #2a2a2a;
  }

  .pm-mis-product-row__sku,
  .pm-mis-product-row__product {
    grid-column: span 3;
    padding-right: 0;
  }

  .pm-mis-product-actions {
    grid-column: span 3;
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .pm-head,
  .pm-panel__head,
  .pm-panel__head--toolbar,
  .pm-modal__head {
    align-items: stretch;
    flex-direction: column;
  }

  .pm-actions,
  .pm-toolbar {
    justify-content: flex-start;
    width: 100%;
  }

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

  .pm-toolbar select,
  .pm-mis-toggle-done {
    flex: 1 1 160px;
    min-width: 0;
  }

  .pm-mis-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pm-fast-form {
    grid-template-columns: 1fr;
  }

  .pm-modal__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .pm-modal__footer .pm-btn {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .pm-page.pm-mis-page {
    gap: 10px;
  }

  .pm-head,
  .pm-panel,
  .pm-card-metric,
  .pm-mis-card {
    border-radius: 16px;
  }

  .pm-brand {
    align-items: flex-start;
  }

  .pm-brand__icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .pm-brand h2 {
    font-size: 19px;
  }

  .pm-brand p {
    font-size: 12px;
  }

  .pm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pm-card-metric strong {
    font-size: 22px;
  }

  .pm-mis-list {
    grid-template-columns: 1fr;
  }

  .pm-mis-card__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pm-mis-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pm-mis-product-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pm-mis-product-row__sku,
  .pm-mis-product-row__product,
  .pm-mis-product-actions {
    grid-column: span 2;
  }

  .pm-modal {
    padding: 10px;
  }

  .pm-modal__card,
  .pm-mis-close-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 18px;
  }

  .pm-modal__body {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .pm-metrics,
  .pm-mis-summary {
    grid-template-columns: 1fr;
  }

  .pm-actions,
  .pm-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .pm-btn,
  .pm-mis-toggle-done {
    width: 100%;
  }

  .pm-toolbar select {
    width: 100%;
  }

  .pm-mis-product-row {
    grid-template-columns: 1fr;
  }

  .pm-mis-product-row__sku,
  .pm-mis-product-row__product,
  .pm-mis-product-actions {
    grid-column: auto;
  }

  .pm-mis-product-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pm-mis-mini-btn {
    width: 100%;
  }

  .pm-mis-warning {
    grid-template-columns: 1fr;
    text-align: center;
  }
}/* =========================================================
   MIS PEDIDOS ASIGNADOS · ELIMINAR AZUL TOTAL
   Pegar al final del CSS
   ========================================================= */

html[data-theme="dark"] .pm-page.pm-mis-page,
html[data-theme="dark"] .pm-page.pm-mis-page * {
  --neutral-bg: #0b0b0b;
  --neutral-card: #101010;
  --neutral-card-2: #161616;
  --neutral-line: #2a2a2a;
  --neutral-line-2: #3a3a3a;
  --neutral-text: #f5f5f5;
  --neutral-muted: #a3a3a3;
}

/* Fondo general de toda la página */
html[data-theme="dark"] .pm-page.pm-mis-page {
  background: #0b0b0b !important;
  color: #f5f5f5 !important;
}

/* Header, métricas, paneles, sidebar, pedido activo */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-head,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-panel,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-card-metric,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-sidebar,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-main,
html[data-theme="dark"] .pm-page.pm-mis-page [data-pm-mis-activo] > .pm-panel {
  background: #101010 !important;
  border-color: #2a2a2a !important;
  color: #f5f5f5 !important;
}

/* Cabeceras internas */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-panel__head,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-modal__head,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-modal__footer {
  background: #0f0f0f !important;
  border-color: #2a2a2a !important;
}

/* Área vacía grande que se ve azul */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-placeholder,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-empty,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-list,
html[data-theme="dark"] .pm-page.pm-mis-page [data-pm-mis-activo] {
  background: #101010 !important;
  border-color: #2a2a2a !important;
}

/* Cards de pedidos */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-card {
  background: #161616 !important;
  border-color: #2a2a2a !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-card:hover {
  background: #1d1d1d !important;
  border-color: #3a3a3a !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-card.is-active {
  background: #161616 !important;
  border-color: #ffffff !important;
}

/* Métricas internas, resumen y grillas */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-summary,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-scan,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-products-head {
  background: #101010 !important;
  border-color: #2a2a2a !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-summary article,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-card__grid div,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-scan__status {
  background: #181818 !important;
  border-color: #333333 !important;
}

/* Filas de productos */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-product-row {
  background: #101010 !important;
  border-color: #2a2a2a !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-product-row:hover {
  background: #181818 !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-product-row.has-diff {
  background: #1c1410 !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-product-row.is-complete {
  background: #101810 !important;
}

/* Inputs, buscador, select, scanner */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-search,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-toolbar select,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-scan input,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-field input,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-check-line {
  background: #181818 !important;
  border-color: #333333 !important;
  color: #f5f5f5 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-search input {
  color: #f5f5f5 !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-search input::placeholder,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-scan input::placeholder,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-field input::placeholder {
  color: #a3a3a3 !important;
}

/* Botones */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-btn,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-icon-btn,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-mini-btn,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-toggle-done {
  background: #181818 !important;
  border-color: #333333 !important;
  color: #f5f5f5 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-btn:hover,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-icon-btn:hover,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-mini-btn:hover,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-toggle-done:hover {
  background: #222222 !important;
  border-color: #4a4a4a !important;
}

/* Botones activos blancos */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-btn--dark,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-mini-btn.is-dark,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-toggle-done.is-active {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #111111 !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-btn--dark *,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-mini-btn.is-dark *,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-toggle-done.is-active * {
  color: #111111 !important;
}

/* Iconos de bloque */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-brand__icon {
  background: #181818 !important;
  border-color: #333333 !important;
  color: #f5f5f5 !important;
}

/* Progreso sin azul */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-progress {
  background: #2a2a2a !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-progress span {
  background: #ffffff !important;
}

/* Badges sin azul */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-badge,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-badge.is-info,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-badge.is-muted {
  background: #222222 !important;
  border-color: #3a3a3a !important;
  color: #d4d4d4 !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-badge.is-ok {
  background: #102015 !important;
  border-color: #245c36 !important;
  color: #86efac !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-badge.is-warning {
  background: #241a0b !important;
  border-color: #7c4a03 !important;
  color: #facc15 !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-badge.is-danger {
  background: #2a1111 !important;
  border-color: #7f1d1d !important;
  color: #fca5a5 !important;
}

/* Modal */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-modal {
  background: rgba(0, 0, 0, 0.72) !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-modal__card {
  background: #101010 !important;
  border-color: #333333 !important;
}

/* Textos */
html[data-theme="dark"] .pm-page.pm-mis-page h2,
html[data-theme="dark"] .pm-page.pm-mis-page strong,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-panel__head strong,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-brand h2,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-card-metric strong,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-product-row__sku strong,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-product-row__product strong,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-product-row__qty strong {
  color: #f5f5f5 !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page p,
html[data-theme="dark"] .pm-page.pm-mis-page span,
html[data-theme="dark"] .pm-page.pm-mis-page small,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-panel__head span,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-card-metric span,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-card-metric small {
  color: #a3a3a3 !important;
}

/* Mantener estados importantes */
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-product-row__qty.is-faltante strong,
html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-scan__status strong.is-error {
  color: #f87171 !important;
}

html[data-theme="dark"] .pm-page.pm-mis-page .pm-mis-scan__status strong.is-ok {
  color: #86efac !important;
}/* =========================================================
   MIS PEDIDOS ASIGNADOS · TAMAÑO IGUAL A LAS DEMÁS PÁGINAS
   Ajuste fino para bajar zoom visual general
   ========================================================= */

.pm-page.pm-mis-page {
  gap: 9px !important;
}

/* Header */
.pm-page.pm-mis-page .pm-head {
  min-height: 60px !important;
  padding: 10px !important;
  gap: 10px !important;
  border-radius: 16px !important;
}

.pm-page.pm-mis-page .pm-brand {
  gap: 9px !important;
}

.pm-page.pm-mis-page .pm-brand__icon {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px !important;
  border-radius: 11px !important;
}

.pm-page.pm-mis-page .pm-brand__icon .icon,
.pm-page.pm-mis-page .pm-brand__icon svg {
  width: 15.5px !important;
  height: 15.5px !important;
}

.pm-page.pm-mis-page .pm-brand h2 {
  font-size: 15px !important;
  line-height: 1 !important;
}

.pm-page.pm-mis-page .pm-brand p {
  margin-top: 3px !important;
  font-size: 9.8px !important;
  line-height: 1.36 !important;
}

/* Iconos generales */
.pm-page.pm-mis-page .icon,
.pm-page.pm-mis-page svg,
.pm-modal .icon,
.pm-modal svg {
  width: 12px !important;
  height: 12px !important;
  min-width: 12px !important;
}

/* Botones */
.pm-page.pm-mis-page .pm-btn,
.pm-page.pm-mis-page .pm-mis-toggle-done,
.pm-modal .pm-btn {
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 10px !important;
  gap: 5px !important;
  border-radius: 10px !important;
  font-size: 9.4px !important;
}

.pm-page.pm-mis-page .pm-icon-btn,
.pm-modal .pm-icon-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  border-radius: 10px !important;
}

/* Métricas */
.pm-page.pm-mis-page .pm-metrics {
  gap: 9px !important;
}

.pm-page.pm-mis-page .pm-card-metric {
  min-height: 48px !important;
  padding: 9px 10px !important;
  border-radius: 16px !important;
}

.pm-page.pm-mis-page .pm-card-metric span {
  margin-bottom: 4px !important;
  font-size: 7.8px !important;
  line-height: 1 !important;
}

.pm-page.pm-mis-page .pm-card-metric strong {
  font-size: 16px !important;
  line-height: 1 !important;
}

.pm-page.pm-mis-page .pm-card-metric small {
  margin-top: 4px !important;
  font-size: 7.8px !important;
  line-height: 1.1 !important;
}

/* Paneles */
.pm-page.pm-mis-page .pm-panel {
  border-radius: 16px !important;
}

.pm-page.pm-mis-page .pm-panel__head,
.pm-modal .pm-panel__head {
  min-height: 46px !important;
  padding: 10px 11px !important;
  gap: 10px !important;
}

.pm-page.pm-mis-page .pm-panel__head span,
.pm-modal .pm-panel__head span {
  margin-bottom: 3px !important;
  font-size: 7.8px !important;
}

.pm-page.pm-mis-page .pm-panel__head strong,
.pm-modal .pm-panel__head strong {
  font-size: 12px !important;
}

.pm-page.pm-mis-page .pm-panel__head small {
  margin-top: 3px !important;
  font-size: 8.8px !important;
}

/* Toolbar / filtros */
.pm-page.pm-mis-page .pm-toolbar {
  gap: 7px !important;
  min-width: min(100%, 650px) !important;
}

.pm-page.pm-mis-page .pm-search {
  min-width: 240px !important;
  height: 30px !important;
  padding: 0 9px !important;
  gap: 6px !important;
  border-radius: 10px !important;
}

.pm-page.pm-mis-page .pm-search input {
  font-size: 9.6px !important;
}

.pm-page.pm-mis-page .pm-toolbar select {
  height: 30px !important;
  min-width: 118px !important;
  padding: 0 9px !important;
  border-radius: 10px !important;
  font-size: 9.4px !important;
}

/* Layout */
.pm-page.pm-mis-page .pm-mis-layout {
  grid-template-columns: 320px minmax(0, 1fr) !important;
  gap: 10px !important;
}

.pm-page.pm-mis-page .pm-mis-sidebar {
  top: calc(var(--topbar-height, 72px) + 10px) !important;
  max-height: calc(100vh - var(--topbar-height, 72px) - 64px) !important;
}

.pm-page.pm-mis-page .pm-mis-list {
  gap: 8px !important;
  max-height: calc(100vh - var(--topbar-height, 72px) - 132px) !important;
  padding: 10px !important;
}

.pm-page.pm-mis-page .pm-mis-main {
  min-height: 520px !important;
}

/* Cards de pedido izquierda */
.pm-page.pm-mis-page .pm-mis-card {
  gap: 9px !important;
  padding: 10px !important;
  border-radius: 14px !important;
}

.pm-page.pm-mis-page .pm-mis-card header {
  gap: 8px !important;
}

.pm-page.pm-mis-page .pm-mis-card header span {
  font-size: 8.4px !important;
}

.pm-page.pm-mis-page .pm-mis-card header strong {
  margin-top: 3px !important;
  font-size: 10.8px !important;
}

.pm-page.pm-mis-page .pm-mis-progress {
  height: 5px !important;
}

.pm-page.pm-mis-page .pm-mis-card__grid {
  gap: 6px !important;
}

.pm-page.pm-mis-page .pm-mis-card__grid div {
  padding: 7px !important;
  border-radius: 10px !important;
}

.pm-page.pm-mis-page .pm-mis-card__grid span {
  margin-bottom: 3px !important;
  font-size: 7.4px !important;
}

.pm-page.pm-mis-page .pm-mis-card__grid strong {
  font-size: 11px !important;
}

.pm-page.pm-mis-page .pm-mis-card footer {
  gap: 8px !important;
}

.pm-page.pm-mis-page .pm-mis-card footer small {
  font-size: 8.4px !important;
}

.pm-page.pm-mis-page .pm-mis-card footer .pm-btn {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 9px !important;
  font-size: 8.8px !important;
}

/* Badges */
.pm-page.pm-mis-page .pm-badge,
.pm-modal .pm-badge {
  min-height: 20px !important;
  padding: 0 8px !important;
  font-size: 8px !important;
}

/* Placeholder / Empty */
.pm-page.pm-mis-page .pm-mis-placeholder,
.pm-page.pm-mis-page .pm-mis-empty {
  min-height: 210px !important;
  padding: 20px !important;
  gap: 7px !important;
}

.pm-page.pm-mis-page .pm-mis-placeholder .icon,
.pm-page.pm-mis-page .pm-mis-empty .icon {
  width: 30px !important;
  height: 30px !important;
}

.pm-page.pm-mis-page .pm-mis-placeholder strong,
.pm-page.pm-mis-page .pm-mis-empty strong {
  font-size: 13px !important;
}

.pm-page.pm-mis-page .pm-mis-placeholder span,
.pm-page.pm-mis-page .pm-mis-empty span {
  font-size: 9.4px !important;
}

/* Resumen pedido activo */
.pm-page.pm-mis-page .pm-mis-summary {
  gap: 8px !important;
  padding: 10px !important;
}

.pm-page.pm-mis-page .pm-mis-summary article {
  min-height: 48px !important;
  padding: 9px 10px !important;
  border-radius: 13px !important;
}

.pm-page.pm-mis-page .pm-mis-summary span {
  margin-bottom: 4px !important;
  font-size: 7.8px !important;
}

.pm-page.pm-mis-page .pm-mis-summary strong {
  font-size: 16px !important;
}

/* Scanner */
.pm-page.pm-mis-page .pm-mis-scan {
  grid-template-columns: minmax(0, 1fr) 220px !important;
  gap: 10px !important;
  padding: 10px !important;
}

.pm-page.pm-mis-page .pm-mis-scan label {
  gap: 5px !important;
}

.pm-page.pm-mis-page .pm-mis-scan label span {
  font-size: 9px !important;
}

.pm-page.pm-mis-page .pm-mis-scan input {
  height: 38px !important;
  padding: 0 10px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
}

.pm-page.pm-mis-page .pm-mis-scan label small {
  font-size: 8.6px !important;
}

.pm-page.pm-mis-page .pm-mis-scan__status {
  min-height: 38px !important;
  padding: 8px 10px !important;
  border-radius: 12px !important;
}

.pm-page.pm-mis-page .pm-mis-scan__status strong {
  font-size: 9.4px !important;
}

/* Header productos */
.pm-page.pm-mis-page .pm-mis-products-head {
  grid-template-columns: 130px minmax(200px, 1fr) 72px 72px 72px 210px !important;
  padding: 9px 10px !important;
}

.pm-page.pm-mis-page .pm-mis-products-head span {
  font-size: 7.8px !important;
}

/* Lista productos */
.pm-page.pm-mis-page .pm-mis-items {
  max-height: 520px !important;
}

.pm-page.pm-mis-page .pm-mis-product-row {
  grid-template-columns: 130px minmax(200px, 1fr) 72px 72px 72px 210px !important;
  min-height: 56px !important;
  padding: 8px 10px !important;
}

.pm-page.pm-mis-page .pm-mis-product-row__sku,
.pm-page.pm-mis-page .pm-mis-product-row__product {
  padding-right: 8px !important;
}

.pm-page.pm-mis-page .pm-mis-product-row__sku strong,
.pm-page.pm-mis-page .pm-mis-product-row__product strong {
  font-size: 10px !important;
  line-height: 1.15 !important;
}

.pm-page.pm-mis-page .pm-mis-product-row__sku span,
.pm-page.pm-mis-page .pm-mis-product-row__product span {
  margin-top: 3px !important;
  font-size: 8px !important;
}

.pm-page.pm-mis-page .pm-mis-product-row__qty {
  gap: 3px !important;
}

.pm-page.pm-mis-page .pm-mis-product-row__qty span {
  font-size: 7.6px !important;
}

.pm-page.pm-mis-page .pm-mis-product-row__qty strong {
  font-size: 13px !important;
}

.pm-page.pm-mis-page .pm-mis-product-actions {
  gap: 5px !important;
}

.pm-page.pm-mis-page .pm-mis-mini-btn {
  min-height: 28px !important;
  height: 28px !important;
  padding: 0 8px !important;
  gap: 4px !important;
  border-radius: 9px !important;
  font-size: 8.8px !important;
}

.pm-page.pm-mis-page .pm-mis-mini-btn .icon,
.pm-page.pm-mis-page .pm-mis-mini-btn svg {
  width: 11px !important;
  height: 11px !important;
}

/* Modal */
.pm-page.pm-mis-page .pm-modal,
.pm-modal {
  padding: 14px !important;
}

.pm-page.pm-mis-page .pm-modal__card,
.pm-modal__card {
  width: min(840px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 32px) !important;
  border-radius: 16px !important;
}

.pm-page.pm-mis-page .pm-mis-close-modal,
.pm-mis-close-modal {
  width: min(860px, calc(100vw - 32px)) !important;
}

.pm-page.pm-mis-page .pm-modal__head,
.pm-modal__head {
  min-height: 54px !important;
  padding: 10px 12px !important;
  gap: 10px !important;
}

.pm-page.pm-mis-page .pm-modal__head span,
.pm-modal__head span {
  margin-bottom: 3px !important;
  font-size: 8px !important;
}

.pm-page.pm-mis-page .pm-modal__head strong,
.pm-modal__head strong {
  font-size: 14px !important;
}

.pm-page.pm-mis-page .pm-modal__head small,
.pm-modal__head small {
  margin-top: 3px !important;
  font-size: 8.8px !important;
}

.pm-page.pm-mis-page .pm-modal__body,
.pm-modal__body {
  gap: 10px !important;
  padding: 10px !important;
}

.pm-page.pm-mis-page .pm-modal__footer,
.pm-modal__footer {
  min-height: 48px !important;
  padding: 10px 12px !important;
  gap: 7px !important;
}

/* Form cierre */
.pm-page.pm-mis-page .pm-fast-form,
.pm-fast-form {
  gap: 9px !important;
}

.pm-page.pm-mis-page .pm-field,
.pm-field {
  gap: 5px !important;
}

.pm-page.pm-mis-page .pm-field span,
.pm-page.pm-mis-page .pm-check-line span,
.pm-field span,
.pm-check-line span {
  font-size: 8.8px !important;
}

.pm-page.pm-mis-page .pm-field input,
.pm-field input {
  height: 30px !important;
  padding: 0 9px !important;
  border-radius: 10px !important;
  font-size: 9.8px !important;
}

.pm-page.pm-mis-page .pm-check-line,
.pm-check-line {
  min-height: 36px !important;
  padding: 8px 10px !important;
  gap: 8px !important;
  border-radius: 12px !important;
}

.pm-page.pm-mis-page .pm-check-line input,
.pm-check-line input {
  width: 14px !important;
  height: 14px !important;
}

/* Warning cierre */
.pm-page.pm-mis-page .pm-mis-warning,
.pm-mis-warning {
  grid-template-columns: 32px minmax(0, 1fr) !important;
  gap: 9px !important;
  padding: 10px !important;
  border-radius: 13px !important;
}

.pm-page.pm-mis-page .pm-mis-warning > .icon,
.pm-mis-warning > .icon {
  width: 20px !important;
  height: 20px !important;
}

.pm-page.pm-mis-page .pm-mis-warning strong,
.pm-mis-warning strong {
  font-size: 10.8px !important;
}

.pm-page.pm-mis-page .pm-mis-warning span,
.pm-mis-warning span {
  margin-top: 3px !important;
  font-size: 9px !important;
}

/* Responsive */
@media (max-width: 1280px) {
  .pm-page.pm-mis-page .pm-mis-layout {
    grid-template-columns: 300px minmax(0, 1fr) !important;
  }

  .pm-page.pm-mis-page .pm-mis-products-head,
  .pm-page.pm-mis-page .pm-mis-product-row {
    grid-template-columns: 120px minmax(180px, 1fr) 68px 68px 68px 195px !important;
  }
}

@media (max-width: 1100px) {
  .pm-page.pm-mis-page .pm-mis-layout {
    grid-template-columns: 1fr !important;
  }

  .pm-page.pm-mis-page .pm-mis-sidebar {
    position: static !important;
    max-height: none !important;
  }

  .pm-page.pm-mis-page .pm-mis-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-height: none !important;
  }

  .pm-page.pm-mis-page .pm-mis-scan {
    grid-template-columns: 1fr !important;
  }

  .pm-page.pm-mis-page .pm-mis-items {
    gap: 9px !important;
    padding: 10px !important;
    max-height: none !important;
  }

  .pm-page.pm-mis-page .pm-mis-product-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 9px !important;
    border-radius: 14px !important;
  }

  .pm-page.pm-mis-page .pm-mis-product-row__sku,
  .pm-page.pm-mis-page .pm-mis-product-row__product,
  .pm-page.pm-mis-page .pm-mis-product-actions {
    grid-column: span 3 !important;
  }
}

@media (max-width: 680px) {
  .pm-page.pm-mis-page {
    gap: 9px !important;
  }

  .pm-page.pm-mis-page .pm-head,
  .pm-page.pm-mis-page .pm-panel,
  .pm-page.pm-mis-page .pm-card-metric,
  .pm-page.pm-mis-page .pm-mis-card {
    border-radius: 14px !important;
  }

  .pm-page.pm-mis-page .pm-brand__icon {
    width: 32px !important;
    height: 32px !important;
    flex-basis: 32px !important;
  }

  .pm-page.pm-mis-page .pm-brand h2 {
    font-size: 15px !important;
  }

  .pm-page.pm-mis-page .pm-brand p {
    font-size: 9.4px !important;
  }

  .pm-page.pm-mis-page .pm-card-metric strong {
    font-size: 16px !important;
  }

  .pm-page.pm-mis-page .pm-mis-list {
    grid-template-columns: 1fr !important;
  }

  .pm-page.pm-mis-page .pm-modal {
    padding: 8px !important;
  }

  .pm-page.pm-mis-page .pm-modal__card,
  .pm-page.pm-mis-page .pm-mis-close-modal,
  .pm-modal__card,
  .pm-mis-close-modal {
    width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
    border-radius: 16px !important;
  }
}

@media (max-width: 480px) {
  .pm-page.pm-mis-page .pm-actions,
  .pm-page.pm-mis-page .pm-toolbar {
    align-items: stretch !important;
  }

  .pm-page.pm-mis-page .pm-btn,
  .pm-page.pm-mis-page .pm-mis-toggle-done {
    width: 100% !important;
  }

  .pm-page.pm-mis-page .pm-mis-product-row {
    grid-template-columns: 1fr !important;
  }

  .pm-page.pm-mis-page .pm-mis-product-row__sku,
  .pm-page.pm-mis-page .pm-mis-product-row__product,
  .pm-page.pm-mis-page .pm-mis-product-actions {
    grid-column: auto !important;
  }

  .pm-page.pm-mis-page .pm-mis-product-actions {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .pm-page.pm-mis-page .pm-mis-mini-btn {
    width: 100% !important;
  }
}