/* =========================================================
   WIRTZ HUB · PEDIDOS MAYORISTAS · GESTIÓN DE PEDIDOS
   CSS completo · Limpio · Neutro · Sin azul oscuro
   ========================================================= */

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

.pm-page.pm-gestion-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-gestion-page {
  color: #f5f5f5;
  background: #0b0b0b;
}

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

.pm-page.pm-gestion-page .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-page.pm-gestion-page .pm-head {
  background: #101010;
  border-color: #2a2a2a;
}

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

.pm-page.pm-gestion-page .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-page.pm-gestion-page .pm-brand__icon {
  color: #f5f5f5;
  background: #181818;
  border-color: #333333;
}

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

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

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

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

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

.pm-page.pm-gestion-page .icon,
.pm-modal .icon {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke-width: 2.2;
}

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

.pm-page.pm-gestion-page .pm-btn,
.pm-page.pm-gestion-page .pm-icon-btn,
.pm-modal .pm-btn,
.pm-modal .pm-icon-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.pm-page.pm-gestion-page .pm-btn,
.pm-modal .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-page.pm-gestion-page .pm-btn:hover,
.pm-modal .pm-btn:hover {
  background: #f4f4f5;
  border-color: #a1a1aa;
  transform: translateY(-1px);
}

.pm-page.pm-gestion-page .pm-btn--dark,
.pm-modal .pm-btn--dark {
  color: #ffffff;
  background: #111111;
  border-color: #111111;
}

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

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

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

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

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

.pm-page.pm-gestion-page .pm-icon-btn,
.pm-modal .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-page.pm-gestion-page .pm-icon-btn:hover,
.pm-modal .pm-icon-btn:hover {
  background: #f4f4f5;
  border-color: #a1a1aa;
  transform: translateY(-1px);
}

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

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

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

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

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

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

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

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

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

.pm-page.pm-gestion-page .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-page.pm-gestion-page .pm-card-metric strong {
  display: block;

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

.pm-page.pm-gestion-page .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-page.pm-gestion-page .pm-card-metric span,
html[data-theme="dark"] .pm-page.pm-gestion-page .pm-card-metric small {
  color: #a3a3a3;
}

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

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

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

html[data-theme="dark"] .pm-page.pm-gestion-page .pm-panel,
html[data-theme="dark"] .pm-modal .pm-panel {
  background: #101010;
  border-color: #2a2a2a;
}

.pm-page.pm-gestion-page .pm-panel__head,
.pm-modal .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-page.pm-gestion-page .pm-panel__head--toolbar {
  align-items: flex-start;
}

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

.pm-page.pm-gestion-page .pm-panel__head span,
.pm-modal .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-page.pm-gestion-page .pm-panel__head strong,
.pm-modal .pm-panel__head strong {
  display: block;

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

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

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

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

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

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

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

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

.pm-page.pm-gestion-page .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-page.pm-gestion-page .pm-search input::placeholder {
  color: #a1a1aa;
}

.pm-page.pm-gestion-page .pm-toolbar select,
.pm-page.pm-gestion-page .pm-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-page.pm-gestion-page .pm-select--mini {
  width: 150px;
  min-width: 150px;
  height: 34px;
  font-size: 11px;
}

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

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

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

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

.pm-page.pm-gestion-page .pm-table-wrap,
.pm-modal .pm-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pm-page.pm-gestion-page .pm-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.pm-page.pm-gestion-page .pm-table th,
.pm-page.pm-gestion-page .pm-table td {
  padding: 11px 10px;
  color: #111111;
  border-bottom: 1px solid #e5e5e5;
  vertical-align: middle;
  text-align: left;
}

.pm-page.pm-gestion-page .pm-table th {
  color: #737373;
  background: #f4f4f5;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pm-page.pm-gestion-page .pm-table td {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.pm-page.pm-gestion-page .pm-table td strong {
  display: block;
  color: #111111;
  font-size: 12.5px;
  font-weight: 850;
  line-height: 1.2;
}

.pm-page.pm-gestion-page .pm-table td small {
  display: block;
  margin-top: 4px;
  color: #737373;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.pm-page.pm-gestion-page .pm-table tbody tr:hover {
  background: #fafafa;
}

.pm-page.pm-gestion-page .pm-table tbody tr:last-child td {
  border-bottom: 0;
}

html[data-theme="dark"] .pm-page.pm-gestion-page .pm-table th {
  color: #a3a3a3;
  background: #181818;
  border-color: #2a2a2a;
}

html[data-theme="dark"] .pm-page.pm-gestion-page .pm-table td {
  color: #f5f5f5;
  background: #101010;
  border-color: #2a2a2a;
}

html[data-theme="dark"] .pm-page.pm-gestion-page .pm-table td strong {
  color: #f5f5f5;
}

html[data-theme="dark"] .pm-page.pm-gestion-page .pm-table td small {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-page.pm-gestion-page .pm-table tbody tr:hover td {
  background: #181818;
}

.pm-page.pm-gestion-page .pm-table th:nth-child(1),
.pm-page.pm-gestion-page .pm-table td:nth-child(1) {
  width: 150px;
}

.pm-page.pm-gestion-page .pm-table th:nth-child(2),
.pm-page.pm-gestion-page .pm-table td:nth-child(2) {
  width: 230px;
}

.pm-page.pm-gestion-page .pm-table th:nth-child(3),
.pm-page.pm-gestion-page .pm-table td:nth-child(3),
.pm-page.pm-gestion-page .pm-table th:nth-child(4),
.pm-page.pm-gestion-page .pm-table td:nth-child(4) {
  width: 120px;
}

.pm-page.pm-gestion-page .pm-table th:nth-child(5),
.pm-page.pm-gestion-page .pm-table td:nth-child(5),
.pm-page.pm-gestion-page .pm-table th:nth-child(6),
.pm-page.pm-gestion-page .pm-table td:nth-child(6) {
  width: 82px;
  text-align: center;
}

.pm-page.pm-gestion-page .pm-table th:nth-child(7),
.pm-page.pm-gestion-page .pm-table td:nth-child(7) {
  width: 170px;
}

.pm-page.pm-gestion-page .pm-table th:nth-child(8),
.pm-page.pm-gestion-page .pm-table td:nth-child(8) {
  width: 190px;
  text-align: center;
}

.pm-page.pm-gestion-page .pm-table-main {
  display: block;
  overflow: hidden;
  color: #111111;
  font-size: 12.5px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.pm-page.pm-gestion-page .pm-table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

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

.pm-page.pm-gestion-page .pm-badge,
.pm-modal .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-page.pm-gestion-page .pm-badge.is-ok,
.pm-modal .pm-badge.is-ok {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

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

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

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

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

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

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

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

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

.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(1040px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);

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

.pm-create-modal {
  width: min(1180px, calc(100vw - 28px));
}

.pm-excel-modal {
  width: min(1120px, calc(100vw - 28px));
}

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

.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;
}

/* =========================================================
   CREATE FORM
   ========================================================= */

.pm-fast-create {
  display: grid;
  gap: 12px;
}

.pm-fast-form {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 0.7fr 0.8fr 1fr;
  gap: 10px;
  align-items: end;
}

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

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

.pm-field--client {
  grid-column: span 3;
}

.pm-field--observation {
  grid-column: span 2;
}

.pm-field--sku {
  grid-column: span 2;
}

.pm-field--qty {
  grid-column: span 1;
}

.pm-field--button {
  align-self: end;
}

.pm-field--clean {
  gap: 0;
}

.pm-field--relative {
  position: relative;
}

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

.pm-field input,
.pm-field select,
.pm-excel-table input,
.pm-excel-paste textarea {
  width: 100%;
  min-width: 0;

  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,
.pm-field select,
.pm-excel-table input {
  height: 38px;
  padding: 0 11px;
}

.pm-field input:focus,
.pm-field select:focus,
.pm-excel-table input:focus,
.pm-excel-paste textarea:focus {
  border-color: #111111;
}

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

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

html[data-theme="dark"] .pm-field input:focus,
html[data-theme="dark"] .pm-field select:focus,
html[data-theme="dark"] .pm-excel-table input:focus,
html[data-theme="dark"] .pm-excel-paste textarea:focus {
  border-color: #ffffff;
}

/* =========================================================
   SELECTED / DETECTED / EMPTY
   ========================================================= */

.pm-selected-box,
.pm-detected-line,
.pm-empty-inline {
  display: flex;
  align-items: center;
  gap: 10px;

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

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

.pm-selected-box {
  justify-content: space-between;
}

.pm-selected-box > div {
  min-width: 0;
  flex: 1;
}

.pm-selected-box strong,
.pm-detected-line strong,
.pm-empty-inline strong {
  display: block;
  color: #111111;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.pm-selected-box span,
.pm-detected-line span,
.pm-detected-line small,
.pm-empty-inline span {
  display: block;
  color: #737373;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
}

.pm-detected-line {
  flex-wrap: wrap;
}

.pm-selected-box.is-empty,
.pm-detected-line.is-empty,
.pm-empty-inline {
  justify-content: center;
  text-align: center;
}

html[data-theme="dark"] .pm-selected-box,
html[data-theme="dark"] .pm-detected-line,
html[data-theme="dark"] .pm-empty-inline {
  background: #181818;
  border-color: #333333;
}

html[data-theme="dark"] .pm-selected-box strong,
html[data-theme="dark"] .pm-detected-line strong,
html[data-theme="dark"] .pm-empty-inline strong {
  color: #f5f5f5;
}

html[data-theme="dark"] .pm-selected-box span,
html[data-theme="dark"] .pm-detected-line span,
html[data-theme="dark"] .pm-detected-line small,
html[data-theme="dark"] .pm-empty-inline span {
  color: #a3a3a3;
}

/* =========================================================
   SUGGESTIONS
   ========================================================= */

.pm-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 20;

  display: grid;
  gap: 4px;

  max-height: 260px;
  padding: 6px;

  background: #ffffff;
  border: 1px solid #d4d4d8;
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  overflow-y: auto;
}

.pm-suggestions button {
  appearance: none;
  cursor: pointer;

  display: grid;
  gap: 3px;

  width: 100%;
  padding: 9px 10px;

  color: #111111;
  background: transparent;
  border: 0;
  border-radius: 10px;
  text-align: left;

  font-family: inherit;
}

.pm-suggestions button:hover {
  background: #f4f4f5;
}

.pm-suggestions button:disabled {
  cursor: default;
}

.pm-suggestions strong {
  color: #111111;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.pm-suggestions span {
  color: #737373;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

html[data-theme="dark"] .pm-suggestions {
  background: #101010;
  border-color: #333333;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}

html[data-theme="dark"] .pm-suggestions button:hover {
  background: #181818;
}

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

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

/* =========================================================
   ITEMS TABLE IN CREATE
   ========================================================= */

.pm-fast-items {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 18px;
  overflow: hidden;
}

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

.pm-fast-items__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

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

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

.pm-fast-items__head span {
  display: block;
  color: #737373;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pm-fast-items__head strong {
  display: block;
  margin-top: 4px;
  color: #111111;
  font-size: 14px;
  font-weight: 900;
}

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

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

.pm-fast-items-wrap {
  max-height: 320px;
  overflow: auto;
  scrollbar-width: thin;
}

.pm-fast-items-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: fixed;
}

.pm-fast-items-table th,
.pm-fast-items-table td {
  padding: 10px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
  vertical-align: middle;
}

.pm-fast-items-table th {
  color: #737373;
  background: #f4f4f5;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pm-fast-items-table td {
  color: #111111;
  font-size: 12px;
  font-weight: 700;
}

.pm-fast-items-table td strong {
  display: block;
  color: #111111;
  font-size: 12px;
  font-weight: 900;
}

.pm-fast-items-table td small {
  display: block;
  margin-top: 4px;
  color: #737373;
  font-size: 11px;
  font-weight: 650;
}

html[data-theme="dark"] .pm-fast-items-table th {
  color: #a3a3a3;
  background: #181818;
  border-color: #2a2a2a;
}

html[data-theme="dark"] .pm-fast-items-table td {
  color: #f5f5f5;
  background: #101010;
  border-color: #2a2a2a;
}

html[data-theme="dark"] .pm-fast-items-table td strong {
  color: #f5f5f5;
}

html[data-theme="dark"] .pm-fast-items-table td small {
  color: #a3a3a3;
}

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

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

.pm-detail-grid article {
  min-width: 0;
  padding: 11px;

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

.pm-detail-grid span,
.pm-item-row small,
.pm-history-list span,
.pm-history-list small {
  display: block;
  color: #737373;
  font-size: 11px;
  font-weight: 700;
}

.pm-detail-grid strong,
.pm-item-row strong,
.pm-history-list strong {
  display: block;
  margin-top: 4px;
  color: #111111;
  font-size: 13px;
  font-weight: 900;
}

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

html[data-theme="dark"] .pm-detail-grid span,
html[data-theme="dark"] .pm-item-row small,
html[data-theme="dark"] .pm-history-list span,
html[data-theme="dark"] .pm-history-list small {
  color: #a3a3a3;
}

html[data-theme="dark"] .pm-detail-grid strong,
html[data-theme="dark"] .pm-item-row strong,
html[data-theme="dark"] .pm-history-list strong {
  color: #f5f5f5;
}

.pm-items-list,
.pm-history-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  max-height: 320px;
  overflow-y: auto;
}

.pm-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 90px 90px;
  gap: 10px;
  align-items: center;

  padding: 10px;

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

.pm-item-row div:first-child {
  min-width: 0;
}

.pm-item-row div:first-child strong,
.pm-item-row div:first-child span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-item-row div:not(:first-child) {
  text-align: center;
}

.pm-item-row span {
  color: #737373;
  font-size: 11px;
  font-weight: 650;
}

.pm-history-list article {
  padding: 10px;
  background: #f4f4f5;
  border: 1px solid #e5e5e5;
  border-radius: 13px;
}

html[data-theme="dark"] .pm-item-row,
html[data-theme="dark"] .pm-history-list article {
  background: #181818;
  border-color: #333333;
}

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

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

.pm-excel-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pm-excel-file {
  position: relative;

  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: 850;
  overflow: hidden;
  cursor: pointer;
}

.pm-excel-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

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

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

.pm-excel-paste span {
  color: #525252;
  font-size: 12px;
  font-weight: 850;
}

.pm-excel-paste textarea {
  min-height: 110px;
  padding: 11px;
  resize: vertical;
  line-height: 1.35;
}

html[data-theme="dark"] .pm-excel-paste span {
  color: #d4d4d4;
}

.pm-excel-paste-actions {
  display: flex;
  justify-content: flex-end;
}

.pm-excel-errors {
  display: grid;
  gap: 5px;

  padding: 10px;

  color: #991b1b;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 14px;
}

.pm-excel-errors span {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

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

.pm-excel-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  scrollbar-width: thin;
}

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

.pm-excel-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: fixed;
}

.pm-excel-table th,
.pm-excel-table td {
  padding: 9px;
  border-bottom: 1px solid #e5e5e5;
  text-align: left;
  vertical-align: middle;
}

.pm-excel-table th {
  color: #737373;
  background: #f4f4f5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pm-excel-table td {
  color: #111111;
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.pm-excel-table tr.is-ok td {
  background: #f0fdf4;
}

.pm-excel-table tr.is-error td {
  background: #fff7ed;
}

html[data-theme="dark"] .pm-excel-table th {
  color: #a3a3a3;
  background: #181818;
  border-color: #2a2a2a;
}

html[data-theme="dark"] .pm-excel-table td {
  color: #f5f5f5;
  background: #101010;
  border-color: #2a2a2a;
}

html[data-theme="dark"] .pm-excel-table tr.is-ok td {
  background: #101810;
}

html[data-theme="dark"] .pm-excel-table tr.is-error td {
  background: #1c1410;
}

/* =========================================================
   FORZAR SIN AZUL EN GESTIÓN
   ========================================================= */

html[data-theme="dark"] .pm-page.pm-gestion-page,
html[data-theme="dark"] .pm-page.pm-gestion-page *,
html[data-theme="dark"] .pm-modal,
html[data-theme="dark"] .pm-modal * {
  scrollbar-color: #525252 #0a0a0a;
}

html[data-theme="dark"] .pm-page.pm-gestion-page .pm-head,
html[data-theme="dark"] .pm-page.pm-gestion-page .pm-panel,
html[data-theme="dark"] .pm-page.pm-gestion-page .pm-card-metric,
html[data-theme="dark"] .pm-page.pm-gestion-page .pm-table td,
html[data-theme="dark"] .pm-modal__card,
html[data-theme="dark"] .pm-fast-items {
  background-color: #101010 !important;
  border-color: #2a2a2a !important;
}

html[data-theme="dark"] .pm-page.pm-gestion-page .pm-panel__head,
html[data-theme="dark"] .pm-page.pm-gestion-page .pm-table th,
html[data-theme="dark"] .pm-modal__head,
html[data-theme="dark"] .pm-modal__footer {
  background-color: #0f0f0f !important;
  border-color: #2a2a2a !important;
}

html[data-theme="dark"] .pm-page.pm-gestion-page .pm-search,
html[data-theme="dark"] .pm-page.pm-gestion-page .pm-toolbar select,
html[data-theme="dark"] .pm-page.pm-gestion-page .pm-select,
html[data-theme="dark"] .pm-field input,
html[data-theme="dark"] .pm-field select,
html[data-theme="dark"] .pm-excel-table input,
html[data-theme="dark"] .pm-excel-paste textarea,
html[data-theme="dark"] .pm-selected-box,
html[data-theme="dark"] .pm-detected-line,
html[data-theme="dark"] .pm-empty-inline,
html[data-theme="dark"] .pm-detail-grid article,
html[data-theme="dark"] .pm-item-row,
html[data-theme="dark"] .pm-history-list article {
  background-color: #181818 !important;
  border-color: #333333 !important;
}

html[data-theme="dark"] .pm-page.pm-gestion-page h2,
html[data-theme="dark"] .pm-page.pm-gestion-page strong,
html[data-theme="dark"] .pm-page.pm-gestion-page .pm-table-main,
html[data-theme="dark"] .pm-modal strong {
  color: #f5f5f5 !important;
}

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

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

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

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

  .pm-field--client,
  .pm-field--observation,
  .pm-field--sku {
    grid-column: span 2;
  }
}

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

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

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

  .pm-page.pm-gestion-page .pm-toolbar select {
    flex: 1 1 160px;
    min-width: 0;
  }

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

  .pm-field--client,
  .pm-field--observation,
  .pm-field--sku {
    grid-column: span 2;
  }

  .pm-item-row {
    grid-template-columns: minmax(0, 1fr) repeat(3, 76px);
  }
}

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

  .pm-page.pm-gestion-page .pm-head,
  .pm-page.pm-gestion-page .pm-panel,
  .pm-page.pm-gestion-page .pm-card-metric,
  .pm-fast-items {
    border-radius: 16px;
  }

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

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

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

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

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

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

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

  .pm-field--client,
  .pm-field--observation,
  .pm-field--sku,
  .pm-field--full {
    grid-column: auto;
  }

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

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

  .pm-modal {
    padding: 10px;
  }

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

  .pm-modal__body {
    padding: 10px;
  }

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

  .pm-item-row div:not(:first-child) {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .pm-page.pm-gestion-page .pm-metrics {
    grid-template-columns: 1fr;
  }

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

  .pm-page.pm-gestion-page .pm-btn,
  .pm-page.pm-gestion-page .pm-toolbar select {
    width: 100%;
  }

  .pm-page.pm-gestion-page .pm-table {
    min-width: 900px;
  }

  .pm-fast-items-table,
  .pm-excel-table {
    min-width: 720px;
  }
}/* =========================================================
   PEDIDOS MAYORISTAS · GESTIÓN
   CORRECCIÓN DE TAMAÑO · MISMO VISUAL QUE LAS DEMÁS PÁGINAS
   ========================================================= */

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

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

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

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

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

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

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

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

/* Botones */
.pm-page.pm-gestion-page .pm-btn,
.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-gestion-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-gestion-page .pm-metrics {
  gap: 9px !important;
}

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

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

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

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

/* Panel */
.pm-page.pm-gestion-page .pm-panel,
.pm-modal .pm-panel,
.pm-fast-items {
  border-radius: 16px !important;
}

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

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

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

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

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

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

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

.pm-page.pm-gestion-page .pm-select--mini {
  width: 124px !important;
  min-width: 124px !important;
  height: 30px !important;
  font-size: 9px !important;
}

/* Tabla */
.pm-page.pm-gestion-page .pm-table {
  min-width: 920px !important;
}

.pm-page.pm-gestion-page .pm-table th {
  padding: 8px !important;
  font-size: 7.8px !important;
  line-height: 1.1 !important;
}

.pm-page.pm-gestion-page .pm-table td {
  padding: 8px !important;
  font-size: 9.6px !important;
  line-height: 1.2 !important;
}

.pm-page.pm-gestion-page .pm-table td strong,
.pm-page.pm-gestion-page .pm-table-main {
  font-size: 10px !important;
  line-height: 1.15 !important;
}

.pm-page.pm-gestion-page .pm-table td small {
  margin-top: 3px !important;
  font-size: 8px !important;
}

.pm-page.pm-gestion-page .pm-table-actions {
  gap: 5px !important;
}

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

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

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

.pm-create-modal {
  width: min(980px, calc(100vw - 32px)) !important;
}

.pm-excel-modal {
  width: min(940px, calc(100vw - 32px)) !important;
}

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

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

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

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

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

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

/* Formulario modal */
.pm-fast-create {
  gap: 10px !important;
}

.pm-fast-form {
  gap: 9px !important;
}

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

.pm-field span {
  font-size: 8.8px !important;
}

.pm-field input,
.pm-field select,
.pm-excel-table input,
.pm-excel-paste textarea {
  border-radius: 10px !important;
  font-size: 9.8px !important;
}

.pm-field input,
.pm-field select,
.pm-excel-table input {
  height: 30px !important;
  padding: 0 9px !important;
}

/* Cliente / producto detectado */
.pm-selected-box,
.pm-detected-line,
.pm-empty-inline {
  min-height: 38px !important;
  padding: 9px 10px !important;
  gap: 8px !important;
  border-radius: 13px !important;
}

.pm-selected-box strong,
.pm-detected-line strong,
.pm-empty-inline strong {
  font-size: 10.4px !important;
}

.pm-selected-box span,
.pm-detected-line span,
.pm-detected-line small,
.pm-empty-inline span {
  font-size: 8.8px !important;
}

/* Sugerencias */
.pm-suggestions {
  max-height: 220px !important;
  padding: 5px !important;
  border-radius: 13px !important;
}

.pm-suggestions button {
  padding: 8px 9px !important;
  border-radius: 9px !important;
}

.pm-suggestions strong {
  font-size: 10px !important;
}

.pm-suggestions span {
  font-size: 8.8px !important;
}

/* Items del pedido */
.pm-fast-items__head {
  padding: 10px 11px !important;
  gap: 10px !important;
}

.pm-fast-items__head span {
  font-size: 7.8px !important;
}

.pm-fast-items__head strong {
  margin-top: 3px !important;
  font-size: 11px !important;
}

.pm-fast-items-wrap {
  max-height: 300px !important;
}

.pm-fast-items-table th,
.pm-fast-items-table td {
  padding: 8px !important;
}

.pm-fast-items-table th {
  font-size: 7.8px !important;
}

.pm-fast-items-table td,
.pm-fast-items-table td strong {
  font-size: 9.6px !important;
}

.pm-fast-items-table td small {
  margin-top: 3px !important;
  font-size: 8px !important;
}

/* Detalle */
.pm-detail-grid {
  gap: 9px !important;
}

.pm-detail-grid article {
  padding: 10px !important;
  border-radius: 13px !important;
}

.pm-detail-grid span,
.pm-item-row small,
.pm-history-list span,
.pm-history-list small {
  font-size: 8.8px !important;
}

.pm-detail-grid strong,
.pm-item-row strong,
.pm-history-list strong {
  margin-top: 3px !important;
  font-size: 10.5px !important;
}

.pm-items-list,
.pm-history-list {
  gap: 8px !important;
  padding: 10px !important;
  max-height: 300px !important;
}

.pm-item-row {
  padding: 9px !important;
  gap: 8px !important;
  border-radius: 13px !important;
}

.pm-item-row span {
  font-size: 8.8px !important;
}

.pm-history-list article {
  padding: 9px !important;
  border-radius: 13px !important;
}

/* Excel */
.pm-excel-tools {
  gap: 7px !important;
}

.pm-excel-file {
  min-height: 30px !important;
  padding: 0 10px !important;
  gap: 5px !important;
  border-radius: 10px !important;
  font-size: 9.4px !important;
}

.pm-excel-paste {
  gap: 6px !important;
}

.pm-excel-paste span {
  font-size: 8.8px !important;
}

.pm-excel-paste textarea {
  min-height: 92px !important;
  padding: 9px !important;
  line-height: 1.35 !important;
}

.pm-excel-errors {
  gap: 5px !important;
  padding: 9px !important;
  border-radius: 13px !important;
}

.pm-excel-errors span {
  font-size: 9px !important;
}

.pm-excel-table-wrap {
  max-height: 360px !important;
  border-radius: 14px !important;
}

.pm-excel-table th,
.pm-excel-table td {
  padding: 8px !important;
}

.pm-excel-table th {
  font-size: 7.8px !important;
}

.pm-excel-table td {
  font-size: 9.6px !important;
}

/* Responsive */
@media (max-width: 700px) {
  .pm-page.pm-gestion-page {
    gap: 9px !important;
  }

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

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

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

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

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

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

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

  .pm-modal__body {
    padding: 9px !important;
  }
}/* =========================================================
   GESTIÓN PEDIDOS · AJUSTES FINALES
   - Ocultar CSV/PDF en tabla principal
   - Nuevo pedido blanco/negro según tema
   ========================================================= */

/* Oculta CSV y PDF solo en la tabla/listado de la página.
   En la ventana de detalle siguen visibles. */
.pm-page.pm-gestion-page [data-export-pedido-csv],
.pm-page.pm-gestion-page [data-export-pedido-pdf] {
  display: none !important;
}

/* Botón Nuevo pedido · modo claro: blanco con letras negras */
.pm-page.pm-gestion-page [data-open-create-pedido],
html[data-theme="light"] .pm-page.pm-gestion-page [data-open-create-pedido] {
  background: #ffffff !important;
  border-color: #d4d4d8 !important;
  color: #111111 !important;
}

.pm-page.pm-gestion-page [data-open-create-pedido] span,
.pm-page.pm-gestion-page [data-open-create-pedido] .icon,
.pm-page.pm-gestion-page [data-open-create-pedido] svg,
html[data-theme="light"] .pm-page.pm-gestion-page [data-open-create-pedido] span,
html[data-theme="light"] .pm-page.pm-gestion-page [data-open-create-pedido] .icon,
html[data-theme="light"] .pm-page.pm-gestion-page [data-open-create-pedido] svg {
  color: #111111 !important;
  stroke: #111111 !important;
}

.pm-page.pm-gestion-page [data-open-create-pedido]:hover,
html[data-theme="light"] .pm-page.pm-gestion-page [data-open-create-pedido]:hover {
  background: #f4f4f5 !important;
  border-color: #a1a1aa !important;
  color: #111111 !important;
}

/* Botón Nuevo pedido · modo oscuro: negro con letras blancas */
html[data-theme="dark"] .pm-page.pm-gestion-page [data-open-create-pedido] {
  background: #050505 !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .pm-page.pm-gestion-page [data-open-create-pedido] span,
html[data-theme="dark"] .pm-page.pm-gestion-page [data-open-create-pedido] .icon,
html[data-theme="dark"] .pm-page.pm-gestion-page [data-open-create-pedido] svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

html[data-theme="dark"] .pm-page.pm-gestion-page [data-open-create-pedido]:hover {
  background: #000000 !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
  color: #ffffff !important;
}/* =========================================================
   GESTIÓN · BOTÓN AGREGAR PRODUCTO
   Claro: botón negro + letra blanca
   Oscuro: botón blanco + letra negra
   ========================================================= */

/* Modo claro */
.pm-page.pm-gestion-page [data-add-producto-pedido],
html[data-theme="light"] .pm-page.pm-gestion-page [data-add-producto-pedido],
.pm-modal [data-add-producto-pedido],
html[data-theme="light"] .pm-modal [data-add-producto-pedido] {
  background: #111111 !important;
  border-color: #111111 !important;
  color: #ffffff !important;
}

.pm-page.pm-gestion-page [data-add-producto-pedido] span,
.pm-page.pm-gestion-page [data-add-producto-pedido] .icon,
.pm-page.pm-gestion-page [data-add-producto-pedido] svg,
.pm-modal [data-add-producto-pedido] span,
.pm-modal [data-add-producto-pedido] .icon,
.pm-modal [data-add-producto-pedido] svg,
html[data-theme="light"] .pm-modal [data-add-producto-pedido] span,
html[data-theme="light"] .pm-modal [data-add-producto-pedido] .icon,
html[data-theme="light"] .pm-modal [data-add-producto-pedido] svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

.pm-page.pm-gestion-page [data-add-producto-pedido]:hover,
html[data-theme="light"] .pm-page.pm-gestion-page [data-add-producto-pedido]:hover,
.pm-modal [data-add-producto-pedido]:hover,
html[data-theme="light"] .pm-modal [data-add-producto-pedido]:hover {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
}

/* Modo oscuro */
html[data-theme="dark"] .pm-page.pm-gestion-page [data-add-producto-pedido],
html[data-theme="dark"] .pm-modal [data-add-producto-pedido] {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #111111 !important;
}

html[data-theme="dark"] .pm-page.pm-gestion-page [data-add-producto-pedido] span,
html[data-theme="dark"] .pm-page.pm-gestion-page [data-add-producto-pedido] .icon,
html[data-theme="dark"] .pm-page.pm-gestion-page [data-add-producto-pedido] svg,
html[data-theme="dark"] .pm-modal [data-add-producto-pedido] span,
html[data-theme="dark"] .pm-modal [data-add-producto-pedido] .icon,
html[data-theme="dark"] .pm-modal [data-add-producto-pedido] svg {
  color: #111111 !important;
  stroke: #111111 !important;
}

html[data-theme="dark"] .pm-page.pm-gestion-page [data-add-producto-pedido]:hover,
html[data-theme="dark"] .pm-modal [data-add-producto-pedido]:hover {
  background: #e5e5e5 !important;
  border-color: #e5e5e5 !important;
  color: #111111 !important;
}