/* =========================================================
   WIRTZ HUB · MANUFACTURA
   COMPRAS DE PRODUCCIÓN

   UBICACIÓN:
   frontend/src/pages/manufactura/compras-produccion/
   compras-produccion.css

   PARTE 1 DE 3

   CONTIENE:
   - Página
   - Header
   - Botones
   - Métricas
   - Workspace
   - Toolbar
   - Buscador
   - Selects
   - Selección masiva
   - Tabla principal
   - Celdas
   - Estados
   - Prioridades
   - Stock
   - Fechas
   - Skeleton
   - Empty state
   - Paginación
   ========================================================= */


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

.compras-produccion-page {
  width: 100%;
  min-width: 0;
  min-height: 100%;

  padding: 24px;

  font-family:
    "DM Sans",
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color:
    var(
      --text-primary,
      #171717
    );

  background:
    var(
      --page-bg,
      #f7f7f8
    );
}


html[data-theme="dark"] .compras-produccion-page,
body.dark .compras-produccion-page,
body[data-theme="dark"] .compras-produccion-page {
  color: #f5f5f5;
  background: #000;
}


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

.compras-page-header {
  width: 100%;
  min-width: 0;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 24px;

  margin-bottom: 24px;
}


.compras-page-header__copy {
  min-width: 0;

  flex: 1 1 auto;
}


.compras-page-header__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  margin-bottom: 8px;

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

  letter-spacing: 0.08em;
  text-transform: uppercase;

  color:
    var(
      --text-muted,
      #737373
    );
}


.compras-page-header__eyebrow svg {
  flex: 0 0 auto;
}


.compras-page-header__title {
  margin: 0;

  font-size:
    clamp(
      28px,
      3vw,
      40px
    );

  font-weight: 800;
  line-height: 1.08;

  letter-spacing: -0.035em;

  color:
    var(
      --text-primary,
      #111
    );
}


.compras-page-header__description {
  max-width: 760px;

  margin:
    10px
    0
    0;

  font-size: 14px;
  line-height: 1.6;

  color:
    var(
      --text-secondary,
      #666
    );
}


.compras-page-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;

  gap: 10px;

  flex: 0 0 auto;
}


html[data-theme="dark"] .compras-page-header__title,
body.dark .compras-page-header__title,
body[data-theme="dark"] .compras-page-header__title {
  color: #f7f7f7;
}


html[data-theme="dark"] .compras-page-header__description,
body.dark .compras-page-header__description,
body[data-theme="dark"] .compras-page-header__description {
  color: #a3a3a3;
}


html[data-theme="dark"] .compras-page-header__eyebrow,
body.dark .compras-page-header__eyebrow,
body[data-theme="dark"] .compras-page-header__eyebrow {
  color: #858585;
}


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

.compras-button {
  appearance: none;

  border:
    1px
    solid
    transparent;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  min-height: 40px;

  padding:
    0
    14px;

  border-radius: 10px;

  font: inherit;

  font-size: 13px;
  font-weight: 750;
  line-height: 1;

  white-space: nowrap;

  cursor: pointer;

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


.compras-button:hover:not(:disabled) {
  transform:
    translateY(
      -1px
    );
}


.compras-button:active:not(:disabled) {
  transform:
    translateY(
      0
    );
}


.compras-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}


.compras-button svg {
  flex: 0 0 auto;
}


.compras-button--primary {
  color: #fff;

  background: #171717;

  border-color: #171717;
}


.compras-button--primary:hover:not(:disabled) {
  background: #292929;
  border-color: #292929;
}


.compras-button--secondary {
  color:
    var(
      --text-primary,
      #171717
    );

  background:
    var(
      --surface-raised,
      #fff
    );

  border-color:
    var(
      --border-color,
      #dedede
    );
}


.compras-button--secondary:hover:not(:disabled) {
  background:
    var(
      --surface-hover,
      #f3f3f3
    );

  border-color: #c7c7c7;
}


.compras-button--ghost {
  color:
    var(
      --text-secondary,
      #626262
    );

  background: transparent;

  border-color: transparent;
}


.compras-button--ghost:hover:not(:disabled) {
  color:
    var(
      --text-primary,
      #171717
    );

  background:
    var(
      --surface-hover,
      #f1f1f1
    );
}


.compras-button--danger {
  color: #fff;

  background: #b91c1c;

  border-color: #b91c1c;
}


.compras-button--danger:hover:not(:disabled) {
  background: #991b1b;
  border-color: #991b1b;
}


.compras-button--sm {
  min-height: 34px;

  padding:
    0
    11px;

  font-size: 12px;
}


.compras-button__counter {
  min-width: 19px;
  height: 19px;

  padding:
    0
    5px;

  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 10px;
  font-weight: 800;

  color: #fff;
  background: #2563eb;
}


.compras-button__spinner {
  display: none;

  align-items: center;
  justify-content: center;
}


.compras-button__spinner.is-visible {
  display: inline-flex;
}


.compras-button__spinner svg {
  animation:
    comprasSpin
    0.85s
    linear
    infinite;
}


html[data-theme="dark"] .compras-button--primary,
body.dark .compras-button--primary,
body[data-theme="dark"] .compras-button--primary {
  color: #050505;

  background: #f5f5f5;

  border-color: #f5f5f5;
}


html[data-theme="dark"] .compras-button--primary:hover:not(:disabled),
body.dark .compras-button--primary:hover:not(:disabled),
body[data-theme="dark"] .compras-button--primary:hover:not(:disabled) {
  background: #dedede;
  border-color: #dedede;
}


html[data-theme="dark"] .compras-button--secondary,
body.dark .compras-button--secondary,
body[data-theme="dark"] .compras-button--secondary {
  color: #eeeeee;

  background: #090909;

  border-color: #262626;
}


html[data-theme="dark"] .compras-button--secondary:hover:not(:disabled),
body.dark .compras-button--secondary:hover:not(:disabled),
body[data-theme="dark"] .compras-button--secondary:hover:not(:disabled) {
  color: #fff;

  background: #141414;

  border-color: #373737;
}


html[data-theme="dark"] .compras-button--ghost,
body.dark .compras-button--ghost,
body[data-theme="dark"] .compras-button--ghost {
  color: #b8b8b8;
}


html[data-theme="dark"] .compras-button--ghost:hover:not(:disabled),
body.dark .compras-button--ghost:hover:not(:disabled),
body[data-theme="dark"] .compras-button--ghost:hover:not(:disabled) {
  color: #fff;

  background: #141414;
}


/* =========================================================
   ICON BUTTON
   ========================================================= */

.compras-icon-button {
  appearance: none;

  width: 36px;
  height: 36px;

  padding: 0;

  border:
    1px
    solid
    var(
      --border-color,
      #dedede
    );

  border-radius: 9px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  color:
    var(
      --text-secondary,
      #656565
    );

  background:
    var(
      --surface-raised,
      #fff
    );

  cursor: pointer;

  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    opacity 0.15s ease;
}


.compras-icon-button:hover:not(:disabled) {
  color:
    var(
      --text-primary,
      #171717
    );

  background:
    var(
      --surface-hover,
      #f2f2f2
    );

  border-color: #c8c8c8;
}


.compras-icon-button:disabled {
  cursor: not-allowed;

  opacity: 0.42;
}


.compras-icon-button.is-loading svg {
  animation:
    comprasSpin
    0.85s
    linear
    infinite;
}


html[data-theme="dark"] .compras-icon-button,
body.dark .compras-icon-button,
body[data-theme="dark"] .compras-icon-button {
  color: #a3a3a3;

  background: #090909;

  border-color: #262626;
}


html[data-theme="dark"] .compras-icon-button:hover:not(:disabled),
body.dark .compras-icon-button:hover:not(:disabled),
body[data-theme="dark"] .compras-icon-button:hover:not(:disabled) {
  color: #f5f5f5;

  background: #151515;

  border-color: #363636;
}


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

.compras-metrics {
  width: 100%;

  min-width: 0;

  display: grid;

  grid-template-columns:
    repeat(
      6,
      minmax(
        0,
        1fr
      )
    );

  gap: 12px;

  margin-bottom: 18px;
}


.compras-metric-card {
  min-width: 0;

  padding: 17px;

  border:
    1px
    solid
    var(
      --border-color,
      #e0e0e0
    );

  border-radius: 14px;

  background:
    var(
      --surface-raised,
      #fff
    );

  cursor: pointer;

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


.compras-metric-card:hover {
  transform:
    translateY(
      -1px
    );

  background:
    var(
      --surface-hover,
      #fafafa
    );

  border-color: #bdbdbd;
}


.compras-metric-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  margin-bottom: 18px;
}


.compras-metric-card__label {
  min-width: 0;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 12px;
  font-weight: 700;

  color:
    var(
      --text-secondary,
      #6c6c6c
    );
}


.compras-metric-card__icon {
  width: 34px;
  height: 34px;

  flex: 0 0 auto;

  border-radius: 9px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #525252;

  background: #f1f1f1;
}


.compras-metric-card__value {
  display: block;

  margin-bottom: 6px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 27px;
  font-weight: 800;
  line-height: 1;

  letter-spacing: -0.035em;

  font-variant-numeric: tabular-nums;

  color:
    var(
      --text-primary,
      #171717
    );
}


.compras-metric-card__hint {
  display: block;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 11px;
  line-height: 1.4;

  color:
    var(
      --text-muted,
      #888
    );
}


/* =========================================================
   METRIC TONES
   ========================================================= */

.compras-metric-card--danger
.compras-metric-card__icon {
  color: #b91c1c;

  background: #fef2f2;
}


.compras-metric-card--warning
.compras-metric-card__icon {
  color: #a16207;

  background: #fefce8;
}


.compras-metric-card--success
.compras-metric-card__icon {
  color: #15803d;

  background: #f0fdf4;
}


.compras-metric-card--info
.compras-metric-card__icon {
  color: #1d4ed8;

  background: #eff6ff;
}


.compras-metric-card--violet
.compras-metric-card__icon {
  color: #7c3aed;

  background: #f5f3ff;
}


.compras-metric-card--neutral
.compras-metric-card__icon {
  color: #525252;

  background: #f1f1f1;
}


html[data-theme="dark"] .compras-metric-card,
body.dark .compras-metric-card,
body[data-theme="dark"] .compras-metric-card {
  background: #070707;

  border-color: #202020;
}


html[data-theme="dark"] .compras-metric-card:hover,
body.dark .compras-metric-card:hover,
body[data-theme="dark"] .compras-metric-card:hover {
  background: #0d0d0d;

  border-color: #353535;
}


html[data-theme="dark"] .compras-metric-card__value,
body.dark .compras-metric-card__value,
body[data-theme="dark"] .compras-metric-card__value {
  color: #f5f5f5;
}


html[data-theme="dark"] .compras-metric-card__label,
body.dark .compras-metric-card__label,
body[data-theme="dark"] .compras-metric-card__label {
  color: #a3a3a3;
}


html[data-theme="dark"] .compras-metric-card__hint,
body.dark .compras-metric-card__hint,
body[data-theme="dark"] .compras-metric-card__hint {
  color: #767676;
}


html[data-theme="dark"]
.compras-metric-card--danger
.compras-metric-card__icon,
body.dark
.compras-metric-card--danger
.compras-metric-card__icon,
body[data-theme="dark"]
.compras-metric-card--danger
.compras-metric-card__icon {
  color: #f87171;

  background: #220909;
}


html[data-theme="dark"]
.compras-metric-card--warning
.compras-metric-card__icon,
body.dark
.compras-metric-card--warning
.compras-metric-card__icon,
body[data-theme="dark"]
.compras-metric-card--warning
.compras-metric-card__icon {
  color: #facc15;

  background: #211b05;
}


html[data-theme="dark"]
.compras-metric-card--success
.compras-metric-card__icon,
body.dark
.compras-metric-card--success
.compras-metric-card__icon,
body[data-theme="dark"]
.compras-metric-card--success
.compras-metric-card__icon {
  color: #4ade80;

  background: #062110;
}


html[data-theme="dark"]
.compras-metric-card--info
.compras-metric-card__icon,
body.dark
.compras-metric-card--info
.compras-metric-card__icon,
body[data-theme="dark"]
.compras-metric-card--info
.compras-metric-card__icon {
  color: #60a5fa;

  background: #08182e;
}


html[data-theme="dark"]
.compras-metric-card--violet
.compras-metric-card__icon,
body.dark
.compras-metric-card--violet
.compras-metric-card__icon,
body[data-theme="dark"]
.compras-metric-card--violet
.compras-metric-card__icon {
  color: #c4b5fd;

  background: #17102a;
}


/* =========================================================
   WORKSPACE
   ========================================================= */

.compras-workspace {
  width: 100%;

  min-width: 0;

  border:
    1px
    solid
    var(
      --border-color,
      #dfdfdf
    );

  border-radius: 16px;

  overflow: hidden;

  background:
    var(
      --surface-raised,
      #fff
    );
}


html[data-theme="dark"] .compras-workspace,
body.dark .compras-workspace,
body[data-theme="dark"] .compras-workspace {
  background: #050505;

  border-color: #202020;
}


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

.compras-toolbar {
  width: 100%;

  min-width: 0;

  padding: 14px;

  border-bottom:
    1px
    solid
    var(
      --border-soft,
      #ececec
    );

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;
}


.compras-toolbar__primary,
.compras-toolbar__secondary {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 9px;
}


.compras-toolbar__primary {
  flex: 1 1 auto;
}


.compras-toolbar__secondary {
  flex: 0 0 auto;
}


html[data-theme="dark"] .compras-toolbar,
body.dark .compras-toolbar,
body[data-theme="dark"] .compras-toolbar {
  border-bottom-color: #1e1e1e;
}


/* =========================================================
   SEARCH
   ========================================================= */

.compras-search {
  position: relative;

  width:
    min(
      100%,
      480px
    );

  min-width: 240px;
  min-height: 40px;

  padding:
    0
    12px;

  display: flex;
  align-items: center;

  gap: 9px;

  border:
    1px
    solid
    var(
      --border-color,
      #dedede
    );

  border-radius: 10px;

  color:
    var(
      --text-muted,
      #737373
    );

  background:
    var(
      --surface-base,
      #fafafa
    );

  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}


.compras-search:focus-within {
  border-color: #2563eb;
}


.compras-search > svg {
  flex: 0 0 auto;
}


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

  padding: 0;

  border: 0;
  outline: 0;

  font: inherit;

  font-size: 13px;
  font-weight: 550;

  color:
    var(
      --text-primary,
      #171717
    );

  background: transparent;
}


.compras-search input::placeholder {
  color:
    var(
      --text-muted,
      #989898
    );
}


.compras-search__clear {
  appearance: none;

  width: 28px;
  height: 28px;

  padding: 0;

  border: 0;

  border-radius: 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  color:
    var(
      --text-muted,
      #7c7c7c
    );

  background: transparent;

  cursor: pointer;
}


.compras-search__clear:hover {
  color:
    var(
      --text-primary,
      #171717
    );

  background:
    var(
      --surface-hover,
      #ececec
    );
}


html[data-theme="dark"] .compras-search,
body.dark .compras-search,
body[data-theme="dark"] .compras-search {
  color: #888;

  background: #0b0b0b;

  border-color: #282828;
}


html[data-theme="dark"] .compras-search input,
body.dark .compras-search input,
body[data-theme="dark"] .compras-search input {
  color: #ededed;
}


html[data-theme="dark"] .compras-search__clear:hover,
body.dark .compras-search__clear:hover,
body[data-theme="dark"] .compras-search__clear:hover {
  color: #fff;

  background: #191919;
}


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

.compras-toolbar-select {
  display: flex;
  align-items: center;

  gap: 7px;

  white-space: nowrap;
}


.compras-toolbar-select > span {
  font-size: 11px;
  font-weight: 700;

  color:
    var(
      --text-muted,
      #7b7b7b
    );
}


.compras-toolbar-select select {
  min-height: 38px;

  padding:
    0
    31px
    0
    11px;

  border:
    1px
    solid
    var(
      --border-color,
      #dedede
    );

  border-radius: 9px;

  font: inherit;

  font-size: 12px;
  font-weight: 650;

  color:
    var(
      --text-primary,
      #171717
    );

  background:
    var(
      --surface-raised,
      #fff
    );

  cursor: pointer;
}


html[data-theme="dark"] .compras-toolbar-select > span,
body.dark .compras-toolbar-select > span,
body[data-theme="dark"] .compras-toolbar-select > span {
  color: #858585;
}


html[data-theme="dark"] .compras-toolbar-select select,
body.dark .compras-toolbar-select select,
body[data-theme="dark"] .compras-toolbar-select select {
  color: #e8e8e8;

  background: #090909;

  border-color: #272727;

  color-scheme: dark;
}


/* =========================================================
   SELECTION BAR
   ========================================================= */

.compras-selection-bar {
  min-height: 50px;

  padding:
    8px
    14px;

  border-bottom: 1px solid #bfdbfe;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 14px;

  background: #eff6ff;
}


.compras-selection-bar[hidden] {
  display: none;
}


.compras-selection-bar__info {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 7px;

  font-size: 13px;

  color: #1d4ed8;
}


.compras-selection-bar__info strong {
  font-weight: 800;
}


.compras-selection-bar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  flex-wrap: wrap;

  gap: 8px;
}


html[data-theme="dark"] .compras-selection-bar,
body.dark .compras-selection-bar,
body[data-theme="dark"] .compras-selection-bar {
  background: #07162a;

  border-bottom-color: #17385f;
}


html[data-theme="dark"] .compras-selection-bar__info,
body.dark .compras-selection-bar__info,
body[data-theme="dark"] .compras-selection-bar__info {
  color: #60a5fa;
}


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

.compras-table-container {
  width: 100%;

  min-width: 0;
}


.compras-table-scroll {
  width: 100%;
  min-width: 0;

  overflow-x: auto;
  overflow-y: visible;

  scrollbar-width: thin;
}


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

.compras-table {
  width: 100%;

  min-width: 1420px;

  border-collapse: separate;
  border-spacing: 0;

  font-size: 12px;
}


.compras-table thead th {
  position: sticky;

  top: 0;

  z-index: 2;

  height: 46px;

  padding:
    0
    12px;

  border-bottom:
    1px
    solid
    var(
      --border-color,
      #dfdfdf
    );

  text-align: left;
  vertical-align: middle;

  white-space: nowrap;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 0.035em;
  text-transform: uppercase;

  color:
    var(
      --text-muted,
      #717171
    );

  background:
    var(
      --surface-base,
      #fafafa
    );
}


.compras-table tbody td {
  padding: 12px;

  border-bottom:
    1px
    solid
    var(
      --border-soft,
      #eeeeee
    );

  vertical-align: middle;

  color:
    var(
      --text-primary,
      #202020
    );

  background:
    var(
      --surface-raised,
      #fff
    );
}


.compras-table tbody tr {
  transition:
    background-color 0.15s ease;
}


.compras-table tbody tr:last-child td {
  border-bottom: 0;
}


.compras-table tbody tr:hover td {
  background:
    var(
      --surface-hover,
      #fafafa
    );
}


.compras-table tbody tr.is-selected td {
  background: #f5f9ff;
}


html[data-theme="dark"] .compras-table thead th,
body.dark .compras-table thead th,
body[data-theme="dark"] .compras-table thead th {
  color: #8f8f8f;

  background: #0a0a0a;

  border-bottom-color: #242424;
}


html[data-theme="dark"] .compras-table tbody td,
body.dark .compras-table tbody td,
body[data-theme="dark"] .compras-table tbody td {
  color: #e5e5e5;

  background: #050505;

  border-bottom-color: #1d1d1d;
}


html[data-theme="dark"] .compras-table tbody tr:hover td,
body.dark .compras-table tbody tr:hover td,
body[data-theme="dark"] .compras-table tbody tr:hover td {
  background: #0c0c0c;
}


html[data-theme="dark"] .compras-table tbody tr.is-selected td,
body.dark .compras-table tbody tr.is-selected td,
body[data-theme="dark"] .compras-table tbody tr.is-selected td {
  background: #081526;
}


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

.compras-table__checkbox-cell {
  width: 48px;

  min-width: 48px;

  text-align: center !important;
}


.compras-checkbox {
  position: relative;

  width: 18px;
  height: 18px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
}


.compras-checkbox input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;

  pointer-events: none;
}


.compras-checkbox span {
  width: 17px;
  height: 17px;

  border: 1.5px solid #b9b9b9;

  border-radius: 5px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background:
    var(
      --surface-raised,
      #fff
    );

  transition:
    background-color 0.14s ease,
    border-color 0.14s ease;
}


.compras-checkbox input:checked + span {
  border-color: #2563eb;

  background: #2563eb;
}


.compras-checkbox input:checked + span::after {
  content: "";

  width: 7px;
  height: 4px;

  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;

  transform:
    translateY(
      -1px
    )
    rotate(
      -45deg
    );
}


.compras-checkbox input:indeterminate + span {
  border-color: #2563eb;

  background: #2563eb;
}


.compras-checkbox input:indeterminate + span::after {
  content: "";

  width: 8px;
  height: 2px;

  border-radius: 999px;

  background: #fff;
}


html[data-theme="dark"] .compras-checkbox span,
body.dark .compras-checkbox span,
body[data-theme="dark"] .compras-checkbox span {
  background: #090909;

  border-color: #4b4b4b;
}


/* =========================================================
   ACTION CELL
   ========================================================= */

.compras-table__actions-cell {
  width: 78px;

  min-width: 78px;

  text-align: right !important;
}


/* =========================================================
   LOTE CELL
   ========================================================= */

.compras-lote-cell {
  min-width: 215px;

  max-width: 320px;

  display: flex;
  flex-direction: column;

  gap: 4px;
}


.compras-lote-cell__top {
  min-width: 0;

  display: flex;
  align-items: center;

  gap: 7px;
}


.compras-code-button {
  appearance: none;

  min-width: 0;

  padding: 0;

  border: 0;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font: inherit;

  font-size: 12px;
  font-weight: 800;

  color: #2563eb;

  background: transparent;

  cursor: pointer;
}


.compras-code-button:hover {
  text-decoration: underline;
}


.compras-lote-cell__product {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 12px;
  font-weight: 750;

  color:
    var(
      --text-primary,
      #171717
    );
}


.compras-lote-cell__code {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 10px;

  color:
    var(
      --text-muted,
      #818181
    );
}


html[data-theme="dark"] .compras-lote-cell__product,
body.dark .compras-lote-cell__product,
body[data-theme="dark"] .compras-lote-cell__product {
  color: #efefef;
}


/* =========================================================
   INSUMO CELL
   ========================================================= */

.compras-insumo-cell {
  min-width: 215px;

  max-width: 330px;

  display: flex;
  flex-direction: column;

  gap: 4px;
}


.compras-insumo-cell strong {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 12px;
  font-weight: 750;

  color:
    var(
      --text-primary,
      #171717
    );
}


.compras-insumo-cell > span {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 10px;

  color:
    var(
      --text-muted,
      #818181
    );
}


.compras-insumo-cell small {
  display: inline-flex;
  align-items: center;

  gap: 4px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 9px;

  color:
    var(
      --text-muted,
      #929292
    );
}


html[data-theme="dark"] .compras-insumo-cell strong,
body.dark .compras-insumo-cell strong,
body[data-theme="dark"] .compras-insumo-cell strong {
  color: #efefef;
}


/* =========================================================
   QUANTITY CELL
   ========================================================= */

.compras-quantity {
  min-width: 92px;

  display: flex;
  flex-direction: column;

  gap: 3px;
}


.compras-quantity strong {
  font-size: 12px;
  font-weight: 800;

  font-variant-numeric: tabular-nums;

  color:
    var(
      --text-primary,
      #171717
    );
}


.compras-quantity span {
  font-size: 9px;

  color:
    var(
      --text-muted,
      #868686
    );
}


.compras-quantity--danger strong {
  color: #b91c1c;
}


.compras-quantity--warning strong {
  color: #a16207;
}


.compras-quantity--info strong {
  color: #1d4ed8;
}


.compras-quantity--success strong {
  color: #15803d;
}


html[data-theme="dark"] .compras-quantity strong,
body.dark .compras-quantity strong,
body[data-theme="dark"] .compras-quantity strong {
  color: #ededed;
}


html[data-theme="dark"] .compras-quantity--danger strong,
body.dark .compras-quantity--danger strong,
body[data-theme="dark"] .compras-quantity--danger strong {
  color: #f87171;
}


html[data-theme="dark"] .compras-quantity--warning strong,
body.dark .compras-quantity--warning strong,
body[data-theme="dark"] .compras-quantity--warning strong {
  color: #facc15;
}


html[data-theme="dark"] .compras-quantity--info strong,
body.dark .compras-quantity--info strong,
body[data-theme="dark"] .compras-quantity--info strong {
  color: #60a5fa;
}


/* =========================================================
   STOCK CELL
   ========================================================= */

.compras-stock-cell {
  min-width: 150px;

  display: flex;
  flex-direction: column;

  align-items: flex-start;

  gap: 6px;
}


.compras-stock-cell__numbers {
  display: flex;
  flex-direction: column;

  gap: 3px;
}


.compras-stock-cell__numbers strong {
  font-size: 12px;
  font-weight: 800;

  font-variant-numeric: tabular-nums;

  color:
    var(
      --text-primary,
      #171717
    );
}


.compras-stock-cell__numbers span {
  font-size: 9px;

  color:
    var(
      --text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-stock-cell__numbers strong,
body.dark .compras-stock-cell__numbers strong,
body[data-theme="dark"] .compras-stock-cell__numbers strong {
  color: #ededed;
}


/* =========================================================
   STOCK TAG
   ========================================================= */

.compras-stock-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 5px;

  min-height: 24px;

  padding:
    0
    8px;

  border:
    1px
    solid
    transparent;

  border-radius: 999px;

  white-space: nowrap;

  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}


.compras-stock-tag--disponible {
  color: #15803d;

  background: #f0fdf4;

  border-color: #bbf7d0;
}


.compras-stock-tag--stock_parcial {
  color: #a16207;

  background: #fefce8;

  border-color: #fde68a;
}


.compras-stock-tag--sin_stock {
  color: #b91c1c;

  background: #fef2f2;

  border-color: #fecaca;
}


.compras-stock-tag--no_controla_stock {
  color: #525252;

  background: #f5f5f5;

  border-color: #dedede;
}


html[data-theme="dark"] .compras-stock-tag--disponible,
body.dark .compras-stock-tag--disponible,
body[data-theme="dark"] .compras-stock-tag--disponible {
  color: #4ade80;

  background: #071e10;

  border-color: #18562d;
}


html[data-theme="dark"] .compras-stock-tag--stock_parcial,
body.dark .compras-stock-tag--stock_parcial,
body[data-theme="dark"] .compras-stock-tag--stock_parcial {
  color: #facc15;

  background: #211b05;

  border-color: #594a0a;
}


html[data-theme="dark"] .compras-stock-tag--sin_stock,
body.dark .compras-stock-tag--sin_stock,
body[data-theme="dark"] .compras-stock-tag--sin_stock {
  color: #f87171;

  background: #250909;

  border-color: #641b1b;
}


html[data-theme="dark"] .compras-stock-tag--no_controla_stock,
body.dark .compras-stock-tag--no_controla_stock,
body[data-theme="dark"] .compras-stock-tag--no_controla_stock {
  color: #cfcfcf;

  background: #131313;

  border-color: #303030;
}


/* =========================================================
   BUY CELL
   ========================================================= */

.compras-buy-cell {
  min-width: 125px;

  display: flex;
  flex-direction: column;

  align-items: flex-start;

  gap: 4px;
}


.compras-buy-cell > strong {
  display: inline-flex;
  align-items: baseline;

  gap: 4px;

  font-size: 13px;
  font-weight: 800;

  font-variant-numeric: tabular-nums;
}


.compras-buy-cell > strong small {
  font-size: 9px;
  font-weight: 700;

  color:
    var(
      --text-muted,
      #878787
    );
}


.compras-buy-cell > strong.is-pending {
  color: #b45309;
}


.compras-buy-cell > strong.is-covered {
  color: #15803d;
}


.compras-buy-cell > span {
  font-size: 9px;

  color:
    var(
      --text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-buy-cell > strong.is-pending,
body.dark .compras-buy-cell > strong.is-pending,
body[data-theme="dark"] .compras-buy-cell > strong.is-pending {
  color: #fbbf24;
}


html[data-theme="dark"] .compras-buy-cell > strong.is-covered,
body.dark .compras-buy-cell > strong.is-covered,
body[data-theme="dark"] .compras-buy-cell > strong.is-covered {
  color: #4ade80;
}


/* =========================================================
   PURCHASE STATUS
   ========================================================= */

.compras-status-tag {
  appearance: none;

  min-height: 26px;

  padding:
    0
    8px;

  border:
    1px
    solid
    transparent;

  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 5px;

  white-space: nowrap;

  font: inherit;

  font-size: 9px;
  font-weight: 800;
  line-height: 1;

  cursor: pointer;

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


.compras-status-tag:hover:not(:disabled) {
  transform:
    translateY(
      -1px
    );
}


.compras-status-tag--pendiente {
  color: #525252;

  background: #f5f5f5;

  border-color: #dedede;
}


.compras-status-tag--buscando_proveedor {
  color: #1d4ed8;

  background: #eff6ff;

  border-color: #bfdbfe;
}


.compras-status-tag--cotizando {
  color: #7c3aed;

  background: #f5f3ff;

  border-color: #ddd6fe;
}


.compras-status-tag--compra_en_proceso {
  color: #a16207;

  background: #fefce8;

  border-color: #fde68a;
}


.compras-status-tag--comprado {
  color: #0369a1;

  background: #f0f9ff;

  border-color: #bae6fd;
}


.compras-status-tag--recibido {
  color: #15803d;

  background: #f0fdf4;

  border-color: #bbf7d0;
}


.compras-status-tag--cubierto_por_stock {
  color: #15803d;

  background: #f0fdf4;

  border-color: #bbf7d0;
}


.compras-status-tag--cancelado {
  color: #b91c1c;

  background: #fef2f2;

  border-color: #fecaca;
}


html[data-theme="dark"] .compras-status-tag--pendiente,
body.dark .compras-status-tag--pendiente,
body[data-theme="dark"] .compras-status-tag--pendiente {
  color: #cfcfcf;

  background: #131313;

  border-color: #303030;
}


html[data-theme="dark"] .compras-status-tag--buscando_proveedor,
body.dark .compras-status-tag--buscando_proveedor,
body[data-theme="dark"] .compras-status-tag--buscando_proveedor {
  color: #60a5fa;

  background: #091a31;

  border-color: #183d69;
}


html[data-theme="dark"] .compras-status-tag--cotizando,
body.dark .compras-status-tag--cotizando,
body[data-theme="dark"] .compras-status-tag--cotizando {
  color: #c4b5fd;

  background: #17102a;

  border-color: #443078;
}


html[data-theme="dark"] .compras-status-tag--compra_en_proceso,
body.dark .compras-status-tag--compra_en_proceso,
body[data-theme="dark"] .compras-status-tag--compra_en_proceso {
  color: #facc15;

  background: #211b05;

  border-color: #594a0a;
}


html[data-theme="dark"] .compras-status-tag--comprado,
body.dark .compras-status-tag--comprado,
body[data-theme="dark"] .compras-status-tag--comprado {
  color: #7dd3fc;

  background: #082031;

  border-color: #15506d;
}


html[data-theme="dark"] .compras-status-tag--recibido,
html[data-theme="dark"] .compras-status-tag--cubierto_por_stock,
body.dark .compras-status-tag--recibido,
body.dark .compras-status-tag--cubierto_por_stock,
body[data-theme="dark"] .compras-status-tag--recibido,
body[data-theme="dark"] .compras-status-tag--cubierto_por_stock {
  color: #4ade80;

  background: #071e10;

  border-color: #18562d;
}


html[data-theme="dark"] .compras-status-tag--cancelado,
body.dark .compras-status-tag--cancelado,
body[data-theme="dark"] .compras-status-tag--cancelado {
  color: #f87171;

  background: #250909;

  border-color: #641b1b;
}


/* =========================================================
   PRIORITY TAG
   ========================================================= */

.compras-priority-tag {
  min-height: 22px;

  padding:
    0
    7px;

  border:
    1px
    solid
    transparent;

  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 4px;

  white-space: nowrap;

  font-size: 8.5px;
  font-weight: 800;
  line-height: 1;
}


.compras-priority-tag--baja {
  color: #525252;

  background: #f5f5f5;

  border-color: #dedede;
}


.compras-priority-tag--normal {
  color: #1d4ed8;

  background: #eff6ff;

  border-color: #bfdbfe;
}


.compras-priority-tag--alta {
  color: #a16207;

  background: #fefce8;

  border-color: #fde68a;
}


.compras-priority-tag--urgente {
  color: #b91c1c;

  background: #fef2f2;

  border-color: #fecaca;
}


html[data-theme="dark"] .compras-priority-tag--baja,
body.dark .compras-priority-tag--baja,
body[data-theme="dark"] .compras-priority-tag--baja {
  color: #cfcfcf;

  background: #131313;

  border-color: #303030;
}


html[data-theme="dark"] .compras-priority-tag--normal,
body.dark .compras-priority-tag--normal,
body[data-theme="dark"] .compras-priority-tag--normal {
  color: #60a5fa;

  background: #091a31;

  border-color: #183d69;
}


html[data-theme="dark"] .compras-priority-tag--alta,
body.dark .compras-priority-tag--alta,
body[data-theme="dark"] .compras-priority-tag--alta {
  color: #facc15;

  background: #211b05;

  border-color: #594a0a;
}


html[data-theme="dark"] .compras-priority-tag--urgente,
body.dark .compras-priority-tag--urgente,
body[data-theme="dark"] .compras-priority-tag--urgente {
  color: #f87171;

  background: #250909;

  border-color: #641b1b;
}


/* =========================================================
   PROVIDER CELL
   ========================================================= */

.compras-provider-cell {
  min-width: 155px;

  max-width: 240px;

  display: flex;
  flex-direction: column;

  gap: 3px;
}


.compras-provider-cell strong {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 11px;
  font-weight: 750;

  color:
    var(
      --text-primary,
      #171717
    );
}


.compras-provider-cell span,
.compras-provider-cell small {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 9px;

  color:
    var(
      --text-muted,
      #858585
    );
}


.compras-provider-empty {
  display: inline-flex;
  align-items: center;

  gap: 5px;

  font-size: 10px;
  font-weight: 650;

  color:
    var(
      --text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-provider-cell strong,
body.dark .compras-provider-cell strong,
body[data-theme="dark"] .compras-provider-cell strong {
  color: #ededed;
}


/* =========================================================
   DATE CELL
   ========================================================= */

.compras-date-cell {
  min-width: 125px;

  display: flex;
  flex-direction: column;

  gap: 3px;
}


.compras-date-cell strong {
  font-size: 11px;
  font-weight: 750;

  color:
    var(
      --text-primary,
      #171717
    );
}


.compras-date-cell span {
  font-size: 9px;

  color:
    var(
      --text-muted,
      #858585
    );
}


.compras-date-cell--warning strong {
  color: #a16207;
}


.compras-date-cell--urgent strong {
  color: #c2410c;
}


.compras-date-cell--overdue strong {
  color: #b91c1c;
}


.compras-date-empty {
  font-size: 10px;

  color:
    var(
      --text-muted,
      #8c8c8c
    );
}


html[data-theme="dark"] .compras-date-cell strong,
body.dark .compras-date-cell strong,
body[data-theme="dark"] .compras-date-cell strong {
  color: #ededed;
}


html[data-theme="dark"] .compras-date-cell--warning strong,
body.dark .compras-date-cell--warning strong,
body[data-theme="dark"] .compras-date-cell--warning strong {
  color: #facc15;
}


html[data-theme="dark"] .compras-date-cell--urgent strong,
body.dark .compras-date-cell--urgent strong,
body[data-theme="dark"] .compras-date-cell--urgent strong {
  color: #fb923c;
}


html[data-theme="dark"] .compras-date-cell--overdue strong,
body.dark .compras-date-cell--overdue strong,
body[data-theme="dark"] .compras-date-cell--overdue strong {
  color: #f87171;
}


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

.compras-table-skeleton {
  width: 100%;

  min-height: 26px;

  display: flex;
  align-items: center;
}


.compras-table-skeleton > span {
  position: relative;

  width: 100%;
  height: 11px;

  overflow: hidden;

  border-radius: 7px;

  background: #ececec;
}


.compras-table-skeleton > span::after {
  content: "";

  position: absolute;

  inset: 0;

  transform:
    translateX(
      -100%
    );

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(
        255,
        255,
        255,
        0.65
      ),
      transparent
    );

  animation:
    comprasSkeletonMove
    1.35s
    infinite;
}


html[data-theme="dark"] .compras-table-skeleton > span,
body.dark .compras-table-skeleton > span,
body[data-theme="dark"] .compras-table-skeleton > span {
  background: #171717;
}


html[data-theme="dark"] .compras-table-skeleton > span::after,
body.dark .compras-table-skeleton > span::after,
body[data-theme="dark"] .compras-table-skeleton > span::after {
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(
        255,
        255,
        255,
        0.055
      ),
      transparent
    );
}


/* =========================================================
   METRIC SKELETON
   ========================================================= */

.compras-skeleton {
  position: relative;

  overflow: hidden;

  border-radius: 7px;

  background: #ececec;
}


.compras-skeleton::after {
  content: "";

  position: absolute;

  inset: 0;

  transform:
    translateX(
      -100%
    );

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(
        255,
        255,
        255,
        0.65
      ),
      transparent
    );

  animation:
    comprasSkeletonMove
    1.35s
    infinite;
}


.compras-skeleton--label {
  width: 44%;
  height: 10px;
}


.compras-skeleton--value {
  width: 34%;
  height: 28px;

  margin:
    18px
    0
    8px;
}


.compras-skeleton--hint {
  width: 70%;
  height: 9px;
}


html[data-theme="dark"] .compras-skeleton,
body.dark .compras-skeleton,
body[data-theme="dark"] .compras-skeleton {
  background: #171717;
}


html[data-theme="dark"] .compras-skeleton::after,
body.dark .compras-skeleton::after,
body[data-theme="dark"] .compras-skeleton::after {
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(
        255,
        255,
        255,
        0.055
      ),
      transparent
    );
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.compras-empty-state {
  min-height: 300px;

  padding: 32px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}


.compras-empty-state__icon {
  width: 54px;
  height: 54px;

  margin-bottom: 14px;

  border-radius: 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color:
    var(
      --text-secondary,
      #606060
    );

  background:
    var(
      --surface-hover,
      #f2f2f2
    );
}


.compras-empty-state h3 {
  margin:
    0
    0
    7px;

  font-size: 16px;
  font-weight: 800;

  color:
    var(
      --text-primary,
      #171717
    );
}


.compras-empty-state p {
  max-width: 460px;

  margin:
    0
    0
    18px;

  font-size: 13px;
  line-height: 1.55;

  color:
    var(
      --text-secondary,
      #747474
    );
}


html[data-theme="dark"] .compras-empty-state__icon,
body.dark .compras-empty-state__icon,
body[data-theme="dark"] .compras-empty-state__icon {
  color: #bdbdbd;

  background: #131313;
}


html[data-theme="dark"] .compras-empty-state h3,
body.dark .compras-empty-state h3,
body[data-theme="dark"] .compras-empty-state h3 {
  color: #f4f4f4;
}


html[data-theme="dark"] .compras-empty-state p,
body.dark .compras-empty-state p,
body[data-theme="dark"] .compras-empty-state p {
  color: #8d8d8d;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.compras-pagination {
  min-height: 58px;

  padding:
    10px
    14px;

  border-top:
    1px
    solid
    var(
      --border-soft,
      #ececec
    );

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;
}


.compras-pagination:empty {
  display: none;
}


.compras-pagination__info {
  font-size: 12px;

  color:
    var(
      --text-secondary,
      #717171
    );
}


.compras-pagination__info strong {
  color:
    var(
      --text-primary,
      #222
    );
}


.compras-pagination__actions {
  display: flex;
  align-items: center;

  gap: 6px;
}


.compras-pagination__page {
  min-width: 122px;

  text-align: center;

  font-size: 11px;

  color:
    var(
      --text-secondary,
      #6c6c6c
    );
}


html[data-theme="dark"] .compras-pagination,
body.dark .compras-pagination,
body[data-theme="dark"] .compras-pagination {
  border-top-color: #1f1f1f;
}


html[data-theme="dark"] .compras-pagination__info,
html[data-theme="dark"] .compras-pagination__page,
body.dark .compras-pagination__info,
body.dark .compras-pagination__page,
body[data-theme="dark"] .compras-pagination__info,
body[data-theme="dark"] .compras-pagination__page {
  color: #8d8d8d;
}


html[data-theme="dark"] .compras-pagination__info strong,
body.dark .compras-pagination__info strong,
body[data-theme="dark"] .compras-pagination__info strong {
  color: #e6e6e6;
}


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

.compras-table-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}


.compras-table-scroll::-webkit-scrollbar-track {
  background: transparent;
}


.compras-table-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;

  background: #cfcfcf;
}


html[data-theme="dark"] .compras-table-scroll::-webkit-scrollbar-thumb,
body.dark .compras-table-scroll::-webkit-scrollbar-thumb,
body[data-theme="dark"] .compras-table-scroll::-webkit-scrollbar-thumb {
  background: #333;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

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


@keyframes comprasSkeletonMove {
  100% {
    transform:
      translateX(
        100%
      );
  }
}


/* =========================================================
   RESPONSIVE · PARTE 1
   ========================================================= */

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


@media (
  max-width: 1180px
) {
  .compras-page-header {
    flex-direction: column;
  }


  .compras-page-header__actions {
    width: 100%;

    justify-content: flex-start;
  }


  .compras-toolbar {
    align-items: stretch;

    flex-direction: column;
  }


  .compras-toolbar__primary,
  .compras-toolbar__secondary {
    width: 100%;
  }


  .compras-toolbar__secondary {
    justify-content: flex-start;
  }


  .compras-search {
    width: 100%;
    max-width: none;
  }
}


@media (
  max-width: 760px
) {
  .compras-produccion-page {
    padding: 16px;
  }


  .compras-page-header {
    gap: 18px;

    margin-bottom: 18px;
  }


  .compras-page-header__actions {
    display: grid;

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


  .compras-page-header__actions
  .compras-button {
    width: 100%;
  }


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


  .compras-toolbar__primary,
  .compras-toolbar__secondary {
    flex-wrap: wrap;
  }


  .compras-search {
    flex-basis: 100%;

    min-width: 0;
  }


  .compras-selection-bar,
  .compras-pagination {
    align-items: flex-start;

    flex-direction: column;
  }


  .compras-selection-bar__actions {
    width: 100%;

    justify-content: flex-start;
  }


  .compras-pagination__actions {
    width: 100%;

    justify-content: space-between;
  }
}


@media (
  max-width: 480px
) {
  .compras-page-header__actions {
    grid-template-columns: 1fr;
  }


  .compras-metrics {
    grid-template-columns: 1fr;
  }


  .compras-toolbar-select {
    width: 100%;

    justify-content: space-between;
  }


  .compras-toolbar-select select {
    flex: 1;
  }


  .compras-selection-bar__actions {
    align-items: stretch;

    flex-direction: column;
  }


  .compras-selection-bar__actions
  .compras-button {
    width: 100%;
  }
}


/* =========================================================
   FIN PARTE 1 DE 3

   PARTE 2:
   - Overlay
   - Modal
   - Formularios
   - Inputs
   - Switches
   - Detalle compra
   - Buscador proveedores
   - Confirmación
   ========================================================= *//* =========================================================
   WIRTZ HUB · MANUFACTURA
   COMPRAS DE PRODUCCIÓN

   UBICACIÓN:
   frontend/src/pages/manufactura/compras-produccion/
   compras-produccion.css

   PARTE 2 DE 3

   CONTIENE:
   - Overlay
   - Modal
   - Header modal
   - Body modal
   - Footer modal
   - Formularios
   - Secciones
   - Campos
   - Inputs
   - Selects
   - Textarea
   - Switches
   - Detalle de compra
   - KPIs
   - Proveedor
   - Buscador de proveedor
   - Resultados
   - Proveedor seleccionado
   - Confirmación
   - Loading
   - Errores
   ========================================================= */


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

body.compras-modal-open {
  overflow: hidden;
}


/* =========================================================
   OVERLAY ROOT
   ========================================================= */

.compras-overlay-root {
  position: fixed;
  inset: 0;

  z-index: 9999;

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

  pointer-events: none;

  font-family:
    "DM Sans",
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color:
    var(
      --text-primary,
      #171717
    );

  --compras-modal-bg: #ffffff;
  --compras-modal-border: #dedede;
  --compras-modal-surface: #fafafa;
  --compras-modal-surface-hover: #f3f3f3;
  --compras-modal-text: #171717;
  --compras-modal-text-secondary: #666666;
  --compras-modal-text-muted: #858585;
}


.compras-overlay-root:empty {
  display: none;
}


html[data-theme="dark"] .compras-overlay-root,
body.dark .compras-overlay-root,
body[data-theme="dark"] .compras-overlay-root {
  color: #f5f5f5;

  --compras-modal-bg: #070707;
  --compras-modal-border: #252525;
  --compras-modal-surface: #0c0c0c;
  --compras-modal-surface-hover: #151515;
  --compras-modal-text: #f5f5f5;
  --compras-modal-text-secondary: #aaaaaa;
  --compras-modal-text-muted: #7f7f7f;
}


/* =========================================================
   OVERLAY
   ========================================================= */

.compras-overlay {
  position: absolute;
  inset: 0;

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

  padding: 22px;

  overflow-y: auto;
  overflow-x: hidden;

  pointer-events: auto;

  background:
    rgba(
      0,
      0,
      0,
      0.56
    );

  backdrop-filter:
    blur(
      3px
    );
}


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

.compras-modal {
  position: relative;
  z-index: 1;

  width:
    min(
      94vw,
      720px
    );

  max-height:
    min(
      92vh,
      960px
    );

  min-width: 0;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 16px;

  color:
    var(
      --compras-modal-text,
      #171717
    );

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );

  pointer-events: auto;

  box-shadow:
    0
    28px
    80px
    rgba(
      0,
      0,
      0,
      0.18
    );
}


.compras-modal--sm {
  width:
    min(
      94vw,
      520px
    );
}


.compras-modal--md {
  width:
    min(
      94vw,
      720px
    );
}


.compras-modal--lg {
  width:
    min(
      96vw,
      980px
    );
}


.compras-modal--xl {
  width:
    min(
      97vw,
      1320px
    );
}


.compras-modal--full {
  width:
    min(
      98vw,
      1560px
    );

  max-height: 94vh;
}


.compras-modal.is-loading {
  cursor: progress;
}


html[data-theme="dark"] .compras-modal,
body.dark .compras-modal,
body[data-theme="dark"] .compras-modal {
  color: #f5f5f5;

  background: #070707;

  border-color: #252525;

  box-shadow:
    0
    32px
    90px
    rgba(
      0,
      0,
      0,
      0.72
    );
}


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

.compras-modal__header {
  min-height: 72px;

  padding:
    16px
    18px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 18px;

  flex: 0 0 auto;

  border-bottom:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );
}


.compras-modal__heading {
  min-width: 0;

  flex: 1 1 auto;
}


.compras-modal__heading h2 {
  margin: 0;

  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;

  letter-spacing: -0.02em;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


.compras-modal__heading p {
  max-width: 900px;

  margin:
    5px
    0
    0;

  font-size: 12px;
  line-height: 1.5;

  color:
    var(
      --compras-modal-text-secondary,
      #666666
    );
}


html[data-theme="dark"] .compras-modal__heading h2,
body.dark .compras-modal__heading h2,
body[data-theme="dark"] .compras-modal__heading h2 {
  color: #f5f5f5;
}


html[data-theme="dark"] .compras-modal__heading p,
body.dark .compras-modal__heading p,
body[data-theme="dark"] .compras-modal__heading p {
  color: #999999;
}


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

.compras-modal__body {
  min-width: 0;
  min-height: 0;

  flex: 1 1 auto;

  padding: 18px;

  overflow-y: auto;
  overflow-x: hidden;

  overscroll-behavior: contain;

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );

  scrollbar-width: thin;
}


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

.compras-modal__footer {
  min-height: 66px;

  padding:
    12px
    18px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;

  gap: 9px;

  flex: 0 0 auto;

  border-top:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );
}


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

.compras-form {
  width: 100%;
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 18px;
}


.compras-form-grid {
  width: 100%;
  min-width: 0;

  display: grid;

  gap: 14px;
}


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


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


/* =========================================================
   FORM SECTION
   ========================================================= */

.compras-form-section {
  min-width: 0;

  padding-top: 18px;

  border-top:
    1px
    solid
    var(
      --compras-modal-border,
      #e4e4e4
    );
}


.compras-form-section:first-child {
  padding-top: 0;

  border-top: 0;
}


.compras-form-section__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 13px;
}


.compras-form-section__header > div {
  min-width: 0;
}


.compras-form-section__header span {
  display: block;

  margin-bottom: 3px;

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 0.07em;
  text-transform: uppercase;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


.compras-form-section__header h3 {
  margin: 0;

  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;

  letter-spacing: -0.015em;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


html[data-theme="dark"] .compras-form-section__header h3,
body.dark .compras-form-section__header h3,
body[data-theme="dark"] .compras-form-section__header h3 {
  color: #f1f1f1;
}


/* =========================================================
   FIELD
   ========================================================= */

.compras-field {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 7px;
}


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


.compras-field > span {
  display: flex;
  align-items: center;

  gap: 5px;

  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;

  color:
    var(
      --compras-modal-text-secondary,
      #5f5f5f
    );
}


.compras-field > small {
  font-size: 10px;
  line-height: 1.45;

  color:
    var(
      --compras-modal-text-muted,
      #8a8a8a
    );
}


/* =========================================================
   INPUTS
   ========================================================= */

.compras-field input,
.compras-field select,
.compras-field textarea {
  width: 100%;
  min-width: 0;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dcdcdc
    );

  border-radius: 9px;

  outline: 0;

  font: inherit;

  font-size: 12px;
  font-weight: 550;

  color:
    var(
      --compras-modal-text,
      #171717
    );

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );

  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}


.compras-field input,
.compras-field select {
  min-height: 40px;

  padding:
    0
    11px;
}


.compras-field select {
  cursor: pointer;
}


.compras-field textarea {
  min-height: 96px;

  padding:
    10px
    11px;

  line-height: 1.55;

  resize: vertical;
}


.compras-field input:hover:not(:disabled),
.compras-field select:hover:not(:disabled),
.compras-field textarea:hover:not(:disabled) {
  border-color: #bfbfbf;
}


.compras-field input:focus,
.compras-field select:focus,
.compras-field textarea:focus {
  border-color: #2563eb;

  box-shadow:
    0
    0
    0
    3px
    rgba(
      37,
      99,
      235,
      0.08
    );
}


.compras-field input:disabled,
.compras-field select:disabled,
.compras-field textarea:disabled {
  cursor: not-allowed;

  opacity: 0.55;

  background:
    var(
      --compras-modal-surface,
      #f6f6f6
    );
}


.compras-field input::placeholder,
.compras-field textarea::placeholder {
  color:
    var(
      --compras-modal-text-muted,
      #999999
    );
}


html[data-theme="dark"] .compras-field input,
html[data-theme="dark"] .compras-field select,
html[data-theme="dark"] .compras-field textarea,
body.dark .compras-field input,
body.dark .compras-field select,
body.dark .compras-field textarea,
body[data-theme="dark"] .compras-field input,
body[data-theme="dark"] .compras-field select,
body[data-theme="dark"] .compras-field textarea {
  color: #eeeeee;

  background: #090909;

  border-color: #292929;

  color-scheme: dark;
}


html[data-theme="dark"] .compras-field input:hover:not(:disabled),
html[data-theme="dark"] .compras-field select:hover:not(:disabled),
html[data-theme="dark"] .compras-field textarea:hover:not(:disabled),
body.dark .compras-field input:hover:not(:disabled),
body.dark .compras-field select:hover:not(:disabled),
body.dark .compras-field textarea:hover:not(:disabled),
body[data-theme="dark"] .compras-field input:hover:not(:disabled),
body[data-theme="dark"] .compras-field select:hover:not(:disabled),
body[data-theme="dark"] .compras-field textarea:hover:not(:disabled) {
  border-color: #3b3b3b;
}


html[data-theme="dark"] .compras-field input:focus,
html[data-theme="dark"] .compras-field select:focus,
html[data-theme="dark"] .compras-field textarea:focus,
body.dark .compras-field input:focus,
body.dark .compras-field select:focus,
body.dark .compras-field textarea:focus,
body[data-theme="dark"] .compras-field input:focus,
body[data-theme="dark"] .compras-field select:focus,
body[data-theme="dark"] .compras-field textarea:focus {
  border-color: #3b82f6;

  box-shadow:
    0
    0
    0
    3px
    rgba(
      59,
      130,
      246,
      0.1
    );
}


/* =========================================================
   INPUT ICON
   ========================================================= */

.compras-input-icon {
  position: relative;

  width: 100%;

  display: flex;
  align-items: center;
}


.compras-input-icon > svg {
  position: absolute;

  left: 11px;

  z-index: 1;

  pointer-events: none;

  color:
    var(
      --compras-modal-text-muted,
      #898989
    );
}


.compras-input-icon input {
  padding-left: 36px;
}


/* =========================================================
   SWITCH LIST
   ========================================================= */

.compras-switch-list {
  display: flex;
  flex-direction: column;

  overflow: hidden;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 11px;
}


.compras-switch-row {
  position: relative;

  min-height: 64px;

  padding:
    10px
    12px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 18px;

  border-bottom:
    1px
    solid
    var(
      --compras-modal-border,
      #e8e8e8
    );

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );

  cursor: pointer;
}


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


.compras-switch-row:hover {
  background:
    var(
      --compras-modal-surface,
      #fafafa
    );
}


.compras-switch-row > span:first-child {
  min-width: 0;

  flex: 1 1 auto;

  display: flex;
  flex-direction: column;

  gap: 3px;
}


.compras-switch-row > span:first-child strong {
  font-size: 11px;
  font-weight: 800;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


.compras-switch-row > span:first-child small {
  font-size: 9px;
  line-height: 1.45;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


.compras-switch-row input {
  position: absolute;

  width: 1px;
  height: 1px;

  opacity: 0;

  pointer-events: none;
}


/* =========================================================
   SWITCH
   ========================================================= */

.compras-switch {
  position: relative;

  width: 38px;
  height: 22px;

  flex: 0 0 auto;

  border-radius: 999px;

  background: #d4d4d4;

  transition:
    background-color 0.15s ease;
}


.compras-switch::after {
  content: "";

  position: absolute;

  top: 3px;
  left: 3px;

  width: 16px;
  height: 16px;

  border-radius: 50%;

  background: #ffffff;

  box-shadow:
    0
    1px
    3px
    rgba(
      0,
      0,
      0,
      0.2
    );

  transition:
    transform 0.15s ease;
}


.compras-switch-row
input:checked
+
.compras-switch {
  background: #2563eb;
}


.compras-switch-row
input:checked
+
.compras-switch::after {
  transform:
    translateX(
      16px
    );
}


html[data-theme="dark"] .compras-switch-list,
body.dark .compras-switch-list,
body[data-theme="dark"] .compras-switch-list {
  border-color: #292929;
}


html[data-theme="dark"] .compras-switch-row,
body.dark .compras-switch-row,
body[data-theme="dark"] .compras-switch-row {
  background: #080808;

  border-bottom-color: #202020;
}


html[data-theme="dark"] .compras-switch-row:hover,
body.dark .compras-switch-row:hover,
body[data-theme="dark"] .compras-switch-row:hover {
  background: #0e0e0e;
}


html[data-theme="dark"] .compras-switch,
body.dark .compras-switch,
body[data-theme="dark"] .compras-switch {
  background: #343434;
}


/* =========================================================
   DETAIL LOADING
   ========================================================= */

.compras-detail-loading {
  min-height: 180px;

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

  gap: 10px;

  font-size: 12px;
  font-weight: 650;

  color:
    var(
      --compras-modal-text-muted,
      #7f7f7f
    );
}


.compras-detail-loading svg {
  animation:
    comprasSpin
    0.9s
    linear
    infinite;
}


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

.compras-detail-summary {
  min-width: 0;

  padding: 15px;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 13px;

  display: flex;
  flex-direction: column;

  gap: 14px;

  background:
    var(
      --compras-modal-surface,
      #fafafa
    );
}


html[data-theme="dark"] .compras-detail-summary,
body.dark .compras-detail-summary,
body[data-theme="dark"] .compras-detail-summary {
  background: #0b0b0b;

  border-color: #272727;
}


/* =========================================================
   DETAIL SUMMARY HEADING
   ========================================================= */

.compras-detail-summary__heading {
  min-width: 0;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;
}


.compras-detail-summary__heading > div {
  min-width: 0;

  flex: 1 1 auto;
}


.compras-detail-summary__heading > div > span {
  display: block;

  margin-bottom: 4px;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 0.05em;
  text-transform: uppercase;

  color:
    var(
      --compras-modal-text-muted,
      #838383
    );
}


.compras-detail-summary__heading h3 {
  margin: 0;

  overflow: hidden;

  text-overflow: ellipsis;

  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;

  letter-spacing: -0.025em;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


.compras-detail-summary__heading small {
  display: block;

  margin-top: 4px;

  font-size: 10px;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-detail-summary__heading h3,
body.dark .compras-detail-summary__heading h3,
body[data-theme="dark"] .compras-detail-summary__heading h3 {
  color: #f4f4f4;
}


/* =========================================================
   DETAIL INSUMO
   ========================================================= */

.compras-detail-insumo {
  min-width: 0;

  padding: 11px;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 10px;

  display: flex;
  align-items: center;

  gap: 10px;

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );
}


.compras-detail-insumo__icon {
  width: 38px;
  height: 38px;

  flex: 0 0 auto;

  border-radius: 9px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #2563eb;

  background: #eff6ff;
}


.compras-detail-insumo > div {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 3px;
}


.compras-detail-insumo strong {
  overflow: hidden;
  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 12px;
  font-weight: 800;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


.compras-detail-insumo span:not(.compras-detail-insumo__icon) {
  overflow: hidden;
  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 10px;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-detail-insumo,
body.dark .compras-detail-insumo,
body[data-theme="dark"] .compras-detail-insumo {
  background: #080808;

  border-color: #272727;
}


html[data-theme="dark"] .compras-detail-insumo__icon,
body.dark .compras-detail-insumo__icon,
body[data-theme="dark"] .compras-detail-insumo__icon {
  color: #60a5fa;

  background: #0b1a2e;
}


/* =========================================================
   DETAIL KPIS
   ========================================================= */

.compras-detail-kpis {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(
        0,
        1fr
      )
    );

  gap: 10px;
}


.compras-detail-kpi {
  min-width: 0;

  min-height: 88px;

  padding: 12px;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 10px;

  display: flex;
  flex-direction: column;

  justify-content: space-between;

  gap: 7px;

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );
}


.compras-detail-kpi > span {
  font-size: 9px;
  font-weight: 700;

  color:
    var(
      --compras-modal-text-muted,
      #828282
    );
}


.compras-detail-kpi > strong {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;

  letter-spacing: -0.025em;

  font-variant-numeric: tabular-nums;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


.compras-detail-kpi > small {
  font-size: 9px;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


.compras-detail-kpi--danger {
  border-color: #fecaca;

  background: #fef2f2;
}


.compras-detail-kpi--danger > strong {
  color: #b91c1c;
}


.compras-detail-kpi--warning {
  border-color: #fde68a;

  background: #fefce8;
}


.compras-detail-kpi--warning > strong {
  color: #a16207;
}


html[data-theme="dark"] .compras-detail-kpi,
body.dark .compras-detail-kpi,
body[data-theme="dark"] .compras-detail-kpi {
  background: #080808;

  border-color: #272727;
}


html[data-theme="dark"] .compras-detail-kpi--danger,
body.dark .compras-detail-kpi--danger,
body[data-theme="dark"] .compras-detail-kpi--danger {
  background: #250909;

  border-color: #641b1b;
}


html[data-theme="dark"] .compras-detail-kpi--danger > strong,
body.dark .compras-detail-kpi--danger > strong,
body[data-theme="dark"] .compras-detail-kpi--danger > strong {
  color: #f87171;
}


html[data-theme="dark"] .compras-detail-kpi--warning,
body.dark .compras-detail-kpi--warning,
body[data-theme="dark"] .compras-detail-kpi--warning {
  background: #211b05;

  border-color: #594a0a;
}


html[data-theme="dark"] .compras-detail-kpi--warning > strong,
body.dark .compras-detail-kpi--warning > strong,
body[data-theme="dark"] .compras-detail-kpi--warning > strong {
  color: #facc15;
}


/* =========================================================
   PROVIDER SEARCH
   ========================================================= */

.compras-provider-search {
  position: relative;

  width: 100%;
  min-width: 0;
}


/* =========================================================
   PROVIDER RESULTS
   ========================================================= */

.compras-provider-results {
  position: absolute;

  top: calc(100% + 6px);
  right: 0;
  left: 0;

  z-index: 35;

  max-height: 290px;

  overflow-y: auto;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 10px;

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );

  box-shadow:
    0
    12px
    32px
    rgba(
      0,
      0,
      0,
      0.12
    );

  scrollbar-width: thin;
}


.compras-provider-results[hidden] {
  display: none;
}


html[data-theme="dark"] .compras-provider-results,
body.dark .compras-provider-results,
body[data-theme="dark"] .compras-provider-results {
  background: #080808;

  border-color: #292929;

  box-shadow:
    0
    16px
    40px
    rgba(
      0,
      0,
      0,
      0.62
    );
}


/* =========================================================
   PROVIDER RESULT
   ========================================================= */

.compras-provider-result {
  appearance: none;

  width: 100%;

  min-height: 58px;

  padding:
    10px
    12px;

  border: 0;

  border-bottom:
    1px
    solid
    var(
      --compras-modal-border,
      #ebebeb
    );

  display: flex;
  align-items: center;

  gap: 10px;

  text-align: left;

  font: inherit;

  color:
    var(
      --compras-modal-text,
      #171717
    );

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );

  cursor: pointer;

  transition:
    background-color 0.14s ease;
}


.compras-provider-result:last-child {
  border-bottom: 0;
}


.compras-provider-result:hover {
  background:
    var(
      --compras-modal-surface-hover,
      #f5f5f5
    );
}


.compras-provider-result__icon {
  width: 34px;
  height: 34px;

  flex: 0 0 auto;

  border-radius: 9px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color:
    var(
      --compras-modal-text-secondary,
      #656565
    );

  background:
    var(
      --compras-modal-surface,
      #f2f2f2
    );
}


.compras-provider-result__copy {
  min-width: 0;

  flex: 1 1 auto;

  display: flex;
  flex-direction: column;

  gap: 3px;
}


.compras-provider-result__copy strong {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 11px;
  font-weight: 800;
}


.compras-provider-result__copy small {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 9px;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-provider-result,
body.dark .compras-provider-result,
body[data-theme="dark"] .compras-provider-result {
  color: #eeeeee;

  background: #080808;

  border-bottom-color: #202020;
}


html[data-theme="dark"] .compras-provider-result:hover,
body.dark .compras-provider-result:hover,
body[data-theme="dark"] .compras-provider-result:hover {
  background: #121212;
}


html[data-theme="dark"] .compras-provider-result__icon,
body.dark .compras-provider-result__icon,
body[data-theme="dark"] .compras-provider-result__icon {
  color: #c2c2c2;

  background: #151515;
}


/* =========================================================
   PROVIDER SEARCH STATES
   ========================================================= */

.compras-search-loading,
.compras-search-empty,
.compras-search-error {
  min-height: 70px;

  padding: 16px;

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

  gap: 8px;

  text-align: center;

  font-size: 11px;
  line-height: 1.45;

  color:
    var(
      --compras-modal-text-muted,
      #818181
    );
}


.compras-search-loading svg {
  animation:
    comprasSpin
    0.9s
    linear
    infinite;
}


.compras-search-error {
  color: #b91c1c;
}


html[data-theme="dark"] .compras-search-error,
body.dark .compras-search-error,
body[data-theme="dark"] .compras-search-error {
  color: #f87171;
}


/* =========================================================
   SELECTED PROVIDER
   ========================================================= */

.compras-selected-provider {
  min-height: 58px;

  margin-top: 8px;

  padding:
    9px
    10px;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;

  background:
    var(
      --compras-modal-surface,
      #fafafa
    );
}


.compras-selected-provider[hidden] {
  display: none;
}


.compras-selected-provider__content {
  min-width: 0;

  flex: 1 1 auto;

  display: flex;
  align-items: center;

  gap: 10px;
}


.compras-selected-provider__content > span {
  width: 34px;
  height: 34px;

  flex: 0 0 auto;

  border-radius: 9px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #2563eb;

  background: #eff6ff;
}


.compras-selected-provider__content > div {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 3px;
}


.compras-selected-provider__content strong {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 11px;
  font-weight: 800;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


.compras-selected-provider__content small {
  font-size: 9px;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-selected-provider,
body.dark .compras-selected-provider,
body[data-theme="dark"] .compras-selected-provider {
  background: #0d0d0d;

  border-color: #292929;
}


html[data-theme="dark"] .compras-selected-provider__content > span,
body.dark .compras-selected-provider__content > span,
body[data-theme="dark"] .compras-selected-provider__content > span {
  color: #60a5fa;

  background: #0b1a2e;
}


/* =========================================================
   CONFIRMATION
   ========================================================= */

.compras-confirmation {
  padding:
    10px
    2px;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 13px;

  text-align: center;
}


.compras-confirmation__icon {
  width: 54px;
  height: 54px;

  border-radius: 14px;

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

  color:
    var(
      --compras-modal-text-secondary,
      #666666
    );

  background:
    var(
      --compras-modal-surface,
      #f3f3f3
    );
}


.compras-confirmation__icon--primary {
  color: #1d4ed8;

  background: #eff6ff;
}


.compras-confirmation__icon--danger {
  color: #b91c1c;

  background: #fef2f2;
}


.compras-confirmation__icon--warning {
  color: #a16207;

  background: #fefce8;
}


.compras-confirmation__copy {
  max-width: 440px;
}


.compras-confirmation__copy strong {
  display: block;

  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


.compras-confirmation__copy p {
  margin:
    6px
    0
    0;

  font-size: 11px;
  line-height: 1.55;

  color:
    var(
      --compras-modal-text-secondary,
      #686868
    );
}


html[data-theme="dark"] .compras-confirmation__icon--primary,
body.dark .compras-confirmation__icon--primary,
body[data-theme="dark"] .compras-confirmation__icon--primary {
  color: #60a5fa;

  background: #07162a;
}


html[data-theme="dark"] .compras-confirmation__icon--danger,
body.dark .compras-confirmation__icon--danger,
body[data-theme="dark"] .compras-confirmation__icon--danger {
  color: #f87171;

  background: #250909;
}


html[data-theme="dark"] .compras-confirmation__icon--warning,
body.dark .compras-confirmation__icon--warning,
body[data-theme="dark"] .compras-confirmation__icon--warning {
  color: #facc15;

  background: #211b05;
}


/* =========================================================
   INLINE ERROR
   ========================================================= */

.compras-inline-error {
  width: 100%;

  min-height: 110px;

  padding: 18px;

  border:
    1px
    solid
    #fecaca;

  border-radius: 11px;

  display: flex;
  align-items: flex-start;

  gap: 10px;

  color: #b91c1c;

  background: #fef2f2;
}


.compras-inline-error > svg {
  flex: 0 0 auto;

  margin-top: 1px;
}


.compras-inline-error > div {
  min-width: 0;
}


.compras-inline-error strong {
  display: block;

  margin-bottom: 4px;

  font-size: 12px;
  font-weight: 800;
}


.compras-inline-error p {
  margin: 0;

  font-size: 11px;
  line-height: 1.5;
}


html[data-theme="dark"] .compras-inline-error,
body.dark .compras-inline-error,
body[data-theme="dark"] .compras-inline-error {
  color: #f87171;

  background: #250909;

  border-color: #641b1b;
}


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

.compras-modal__body::-webkit-scrollbar,
.compras-provider-results::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}


.compras-modal__body::-webkit-scrollbar-track,
.compras-provider-results::-webkit-scrollbar-track {
  background: transparent;
}


.compras-modal__body::-webkit-scrollbar-thumb,
.compras-provider-results::-webkit-scrollbar-thumb {
  border-radius: 999px;

  background: #cfcfcf;
}


html[data-theme="dark"] .compras-modal__body::-webkit-scrollbar-thumb,
html[data-theme="dark"] .compras-provider-results::-webkit-scrollbar-thumb,
body.dark .compras-modal__body::-webkit-scrollbar-thumb,
body.dark .compras-provider-results::-webkit-scrollbar-thumb,
body[data-theme="dark"] .compras-modal__body::-webkit-scrollbar-thumb,
body[data-theme="dark"] .compras-provider-results::-webkit-scrollbar-thumb {
  background: #333333;
}


/* =========================================================
   RESPONSIVE · MODALS
   ========================================================= */

@media (
  max-width: 1100px
) {
  .compras-detail-kpis {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }
}


@media (
  max-width: 800px
) {
  .compras-overlay {
    padding: 12px;
  }


  .compras-modal {
    width: 100%;

    max-height: 94vh;

    border-radius: 13px;
  }


  .compras-modal__header {
    min-height: 66px;

    padding: 14px;
  }


  .compras-modal__body {
    padding: 14px;
  }


  .compras-modal__footer {
    padding:
      10px
      14px;
  }


  .compras-form-grid--2,
  .compras-form-grid--3 {
    grid-template-columns: 1fr;
  }


  .compras-field--full {
    grid-column: auto;
  }


  .compras-detail-summary__heading {
    flex-direction: column;
  }


  .compras-detail-kpis {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }
}


@media (
  max-width: 520px
) {
  .compras-overlay {
    align-items: flex-end;

    padding: 0;
  }


  .compras-modal {
    width: 100%;
    max-width: none;

    max-height: 96vh;

    border-right: 0;
    border-bottom: 0;
    border-left: 0;

    border-radius:
      15px
      15px
      0
      0;
  }


  .compras-modal__header {
    padding:
      13px
      14px;
  }


  .compras-modal__heading h2 {
    font-size: 16px;
  }


  .compras-modal__heading p {
    font-size: 11px;
  }


  .compras-modal__body {
    padding:
      13px
      12px;
  }


  .compras-modal__footer {
    display: grid;

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


  .compras-modal__footer
  .compras-button {
    width: 100%;
  }


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


  .compras-switch-row {
    align-items: flex-start;

    min-height: 70px;
  }
}


/* =========================================================
   FIN PARTE 2 DE 3

   PARTE 3:
   - Resumen de compras
   - KPIs resumen
   - Tabla resumen
   - Historial
   - Cambios
   - Popovers
   - Menú de acciones
   - Menú de exportación
   - Status options
   - Toasts
   - Animaciones
   - Responsive final
   ========================================================= */
   /* =========================================================
   WIRTZ HUB · MANUFACTURA
   COMPRAS DE PRODUCCIÓN

   UBICACIÓN:
   frontend/src/pages/manufactura/compras-produccion/
   compras-produccion.css

   PARTE 3 DE 3

   CONTIENE:
   - Resumen de compras
   - KPIs resumen
   - Tabla resumen
   - Historial
   - Cambios de estado
   - Cambios de cantidades
   - Popovers
   - Menú de acciones
   - Menú exportación
   - Selector de estados
   - Toasts
   - Animaciones
   - Responsive final
   ========================================================= */


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

.compras-summary-kpis {
  width: 100%;
  min-width: 0;

  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(
        0,
        1fr
      )
    );

  gap: 10px;

  margin-bottom: 16px;
}


.compras-summary-kpi {
  min-width: 0;

  min-height: 82px;

  padding: 12px;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 11px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  gap: 8px;

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );
}


.compras-summary-kpi > span {
  font-size: 9px;
  font-weight: 750;
  line-height: 1.35;

  color:
    var(
      --compras-modal-text-muted,
      #828282
    );
}


.compras-summary-kpi > strong {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;

  letter-spacing: -0.025em;

  font-variant-numeric: tabular-nums;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


.compras-summary-kpi--warning {
  border-color: #fde68a;

  background: #fefce8;
}


.compras-summary-kpi--warning > strong {
  color: #a16207;
}


html[data-theme="dark"] .compras-summary-kpi,
body.dark .compras-summary-kpi,
body[data-theme="dark"] .compras-summary-kpi {
  background: #080808;

  border-color: #272727;
}


html[data-theme="dark"] .compras-summary-kpi--warning,
body.dark .compras-summary-kpi--warning,
body[data-theme="dark"] .compras-summary-kpi--warning {
  background: #211b05;

  border-color: #594a0a;
}


html[data-theme="dark"] .compras-summary-kpi--warning > strong,
body.dark .compras-summary-kpi--warning > strong,
body[data-theme="dark"] .compras-summary-kpi--warning > strong {
  color: #facc15;
}


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

.compras-table--summary {
  min-width: 1250px;
}


.compras-table--summary thead th {
  height: 42px;

  font-size: 9px;
}


.compras-table--summary tbody td {
  padding:
    10px
    11px;

  font-size: 10.5px;
}


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

.compras-summary-lotes {
  min-width: 130px;
  max-width: 220px;

  display: flex;
  flex-direction: column;

  gap: 3px;
}


.compras-summary-lotes strong {
  font-size: 12px;
  font-weight: 800;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


.compras-summary-lotes span {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 9px;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-summary-lotes strong,
body.dark .compras-summary-lotes strong,
body[data-theme="dark"] .compras-summary-lotes strong {
  color: #eeeeee;
}


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

.compras-history-toolbar {
  width: 100%;
  min-width: 0;

  margin-bottom: 14px;

  display: flex;
  align-items: center;

  gap: 10px;
}


.compras-history-toolbar .compras-search {
  width: 100%;
  max-width: none;
}


/* =========================================================
   HISTORY LIST
   ========================================================= */

.compras-history-list {
  width: 100%;
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 9px;
}


/* =========================================================
   HISTORY ITEM
   ========================================================= */

.compras-history-item {
  min-width: 0;

  padding: 12px;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 11px;

  display: grid;

  grid-template-columns:
    38px
    minmax(
      0,
      1fr
    );

  gap: 11px;

  background:
    var(
      --compras-modal-bg,
      #ffffff
    );
}


html[data-theme="dark"] .compras-history-item,
body.dark .compras-history-item,
body[data-theme="dark"] .compras-history-item {
  background: #080808;

  border-color: #272727;
}


/* =========================================================
   HISTORY ICON
   ========================================================= */

.compras-history-item__icon {
  width: 36px;
  height: 36px;

  border-radius: 9px;

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

  flex: 0 0 auto;

  color: #525252;

  background: #f2f2f2;
}


.compras-history-item__icon--neutral {
  color: #525252;

  background: #f2f2f2;
}


.compras-history-item__icon--info {
  color: #1d4ed8;

  background: #eff6ff;
}


.compras-history-item__icon--violet {
  color: #7c3aed;

  background: #f5f3ff;
}


.compras-history-item__icon--warning {
  color: #a16207;

  background: #fefce8;
}


.compras-history-item__icon--success {
  color: #15803d;

  background: #f0fdf4;
}


html[data-theme="dark"] .compras-history-item__icon--neutral,
body.dark .compras-history-item__icon--neutral,
body[data-theme="dark"] .compras-history-item__icon--neutral {
  color: #cfcfcf;

  background: #151515;
}


html[data-theme="dark"] .compras-history-item__icon--info,
body.dark .compras-history-item__icon--info,
body[data-theme="dark"] .compras-history-item__icon--info {
  color: #60a5fa;

  background: #091a31;
}


html[data-theme="dark"] .compras-history-item__icon--violet,
body.dark .compras-history-item__icon--violet,
body[data-theme="dark"] .compras-history-item__icon--violet {
  color: #c4b5fd;

  background: #17102a;
}


html[data-theme="dark"] .compras-history-item__icon--warning,
body.dark .compras-history-item__icon--warning,
body[data-theme="dark"] .compras-history-item__icon--warning {
  color: #facc15;

  background: #211b05;
}


html[data-theme="dark"] .compras-history-item__icon--success,
body.dark .compras-history-item__icon--success,
body[data-theme="dark"] .compras-history-item__icon--success {
  color: #4ade80;

  background: #071e10;
}


/* =========================================================
   HISTORY CONTENT
   ========================================================= */

.compras-history-item__content {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 9px;
}


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

.compras-history-item__header {
  min-width: 0;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 12px;
}


.compras-history-item__header > div {
  min-width: 0;

  flex: 1 1 auto;
}


.compras-history-item__header strong {
  display: block;

  margin-bottom: 2px;

  font-size: 11px;
  font-weight: 800;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


.compras-history-item__header span {
  display: block;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 9px;
  line-height: 1.45;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


.compras-history-item__header time {
  flex: 0 0 auto;

  white-space: nowrap;

  font-size: 9px;
  font-weight: 650;

  color:
    var(
      --compras-modal-text-muted,
      #8a8a8a
    );
}


html[data-theme="dark"] .compras-history-item__header strong,
body.dark .compras-history-item__header strong,
body[data-theme="dark"] .compras-history-item__header strong {
  color: #eeeeee;
}


/* =========================================================
   HISTORY REFERENCE
   ========================================================= */

.compras-history-item__reference {
  min-width: 0;

  display: flex;
  align-items: center;
  justify-content: space-between;

  flex-wrap: wrap;

  gap: 8px;

  padding:
    7px
    9px;

  border-radius: 8px;

  background:
    var(
      --compras-modal-surface,
      #fafafa
    );
}


.compras-history-item__reference span {
  min-width: 0;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 9px;

  color:
    var(
      --compras-modal-text-secondary,
      #666666
    );
}


.compras-history-item__reference strong {
  font-weight: 800;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


html[data-theme="dark"] .compras-history-item__reference,
body.dark .compras-history-item__reference,
body[data-theme="dark"] .compras-history-item__reference {
  background: #0d0d0d;
}


/* =========================================================
   HISTORY CHANGE
   ========================================================= */

.compras-history-change {
  min-width: 0;

  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 7px;

  font-size: 9px;

  color:
    var(
      --compras-modal-text-secondary,
      #666666
    );
}


.compras-history-change > svg {
  flex: 0 0 auto;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


.compras-history-change > strong {
  font-weight: 800;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


/* =========================================================
   HISTORY EMPTY
   ========================================================= */

.compras-history-empty {
  display: inline-flex;
  align-items: center;

  min-height: 24px;

  padding:
    0
    7px;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 999px;

  font-size: 8.5px;
  font-weight: 700;

  color:
    var(
      --compras-modal-text-muted,
      #888888
    );

  background:
    var(
      --compras-modal-surface,
      #f7f7f7
    );
}


/* =========================================================
   HISTORY QUANTITIES
   ========================================================= */

.compras-history-quantities {
  min-width: 0;

  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 8px;
}


.compras-history-quantities > span {
  min-height: 28px;

  padding:
    5px
    8px;

  border:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  border-radius: 8px;

  display: inline-flex;
  align-items: center;

  gap: 5px;

  font-size: 8.5px;

  color:
    var(
      --compras-modal-text-secondary,
      #666666
    );

  background:
    var(
      --compras-modal-surface,
      #fafafa
    );
}


.compras-history-quantities del {
  color: #b91c1c;

  opacity: 0.72;
}


.compras-history-quantities strong {
  color: #15803d;

  font-weight: 800;
}


html[data-theme="dark"] .compras-history-quantities > span,
body.dark .compras-history-quantities > span,
body[data-theme="dark"] .compras-history-quantities > span {
  background: #0d0d0d;

  border-color: #292929;
}


html[data-theme="dark"] .compras-history-quantities del,
body.dark .compras-history-quantities del,
body[data-theme="dark"] .compras-history-quantities del {
  color: #f87171;
}


html[data-theme="dark"] .compras-history-quantities strong,
body.dark .compras-history-quantities strong,
body[data-theme="dark"] .compras-history-quantities strong {
  color: #4ade80;
}


/* =========================================================
   HISTORY FOOTER
   ========================================================= */

.compras-history-item__footer {
  display: flex;
  align-items: center;

  gap: 5px;

  font-size: 8.5px;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


/* =========================================================
   HISTORY PAGINATION
   ========================================================= */

.compras-history-pagination {
  min-height: 48px;

  margin-top: 14px;

  padding-top: 10px;

  border-top:
    1px
    solid
    var(
      --compras-modal-border,
      #dedede
    );

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;
}


.compras-history-pagination:empty {
  display: none;
}


.compras-history-pagination > span {
  font-size: 10px;

  color:
    var(
      --compras-modal-text-muted,
      #858585
    );
}


.compras-history-pagination > div {
  display: flex;
  align-items: center;

  gap: 7px;
}


.compras-history-pagination > div > strong {
  min-width: 60px;

  text-align: center;

  font-size: 10px;
  font-weight: 800;

  color:
    var(
      --compras-modal-text,
      #171717
    );
}


html[data-theme="dark"] .compras-history-pagination,
body.dark .compras-history-pagination,
body[data-theme="dark"] .compras-history-pagination {
  border-top-color: #292929;
}


html[data-theme="dark"] .compras-history-pagination > div > strong,
body.dark .compras-history-pagination > div > strong,
body[data-theme="dark"] .compras-history-pagination > div > strong {
  color: #eeeeee;
}


/* =========================================================
   POPOVER
   ========================================================= */

.compras-popover {
  z-index: 12000;

  width: 240px;

  padding: 5px;

  border:
    1px
    solid
    var(
      --border-color,
      #dedede
    );

  border-radius: 11px;

  overflow: hidden;

  font-family:
    "DM Sans",
    Inter,
    system-ui,
    sans-serif;

  color:
    var(
      --text-primary,
      #171717
    );

  background:
    var(
      --surface-raised,
      #ffffff
    );

  box-shadow:
    0
    12px
    34px
    rgba(
      0,
      0,
      0,
      0.14
    );
}


.compras-actions-popover {
  width: 220px;
}


.compras-status-popover {
  width: 280px;

  max-height: 380px;

  overflow-y: auto;
}


.compras-export-popover {
  width: 280px;
}


html[data-theme="dark"] .compras-popover,
body.dark .compras-popover,
body[data-theme="dark"] .compras-popover {
  color: #eeeeee;

  background: #090909;

  border-color: #292929;

  box-shadow:
    0
    16px
    40px
    rgba(
      0,
      0,
      0,
      0.62
    );
}


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

.compras-popover__header {
  min-width: 0;

  padding:
    8px
    9px
    9px;

  border-bottom:
    1px
    solid
    var(
      --border-soft,
      #ececec
    );

  display: flex;
  flex-direction: column;

  gap: 3px;
}


.compras-popover__header strong {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 11px;
  font-weight: 800;

  color:
    var(
      --text-primary,
      #171717
    );
}


.compras-popover__header span {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 9px;

  color:
    var(
      --text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-popover__header,
body.dark .compras-popover__header,
body[data-theme="dark"] .compras-popover__header {
  border-bottom-color: #242424;
}


html[data-theme="dark"] .compras-popover__header strong,
body.dark .compras-popover__header strong,
body[data-theme="dark"] .compras-popover__header strong {
  color: #eeeeee;
}


/* =========================================================
   POPOVER ITEM
   ========================================================= */

.compras-popover__item {
  appearance: none;

  width: 100%;

  min-height: 40px;

  padding:
    0
    10px;

  border: 0;

  border-radius: 8px;

  display: flex;
  align-items: center;

  gap: 9px;

  text-align: left;

  font: inherit;

  font-size: 11px;
  font-weight: 650;

  color:
    var(
      --text-primary,
      #252525
    );

  background: transparent;

  cursor: pointer;

  transition:
    background-color 0.14s ease,
    color 0.14s ease;
}


.compras-popover__item:hover:not(:disabled) {
  background:
    var(
      --surface-hover,
      #f3f3f3
    );
}


.compras-popover__item:disabled {
  cursor: not-allowed;

  opacity: 0.45;
}


.compras-popover__item > svg {
  flex: 0 0 auto;
}


.compras-popover__item > span {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 2px;
}


.compras-popover__item > span > strong {
  font-size: 10px;
  font-weight: 800;
}


.compras-popover__item > span > small {
  font-size: 8.5px;
  line-height: 1.35;

  color:
    var(
      --text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-popover__item,
body.dark .compras-popover__item,
body[data-theme="dark"] .compras-popover__item {
  color: #dddddd;
}


html[data-theme="dark"] .compras-popover__item:hover:not(:disabled),
body.dark .compras-popover__item:hover:not(:disabled),
body[data-theme="dark"] .compras-popover__item:hover:not(:disabled) {
  color: #ffffff;

  background: #151515;
}


/* =========================================================
   STATUS OPTIONS
   ========================================================= */

.compras-status-options {
  display: flex;
  flex-direction: column;

  gap: 2px;

  padding-top: 4px;
}


.compras-status-option {
  appearance: none;

  width: 100%;

  min-height: 48px;

  padding:
    6px
    8px;

  border: 0;

  border-radius: 8px;

  display: grid;

  grid-template-columns:
    30px
    minmax(
      0,
      1fr
    )
    20px;

  align-items: center;

  gap: 8px;

  text-align: left;

  font: inherit;

  color:
    var(
      --text-primary,
      #171717
    );

  background: transparent;

  cursor: pointer;

  transition:
    background-color 0.14s ease;
}


.compras-status-option:hover:not(:disabled) {
  background:
    var(
      --surface-hover,
      #f3f3f3
    );
}


.compras-status-option.is-active {
  background: #f5f5f5;
}


.compras-status-option:disabled {
  cursor: default;
}


/* =========================================================
   STATUS OPTION ICON
   ========================================================= */

.compras-status-option__icon {
  width: 30px;
  height: 30px;

  border-radius: 8px;

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

  color: #525252;

  background: #f2f2f2;
}


.compras-status-option__icon--pendiente {
  color: #525252;

  background: #f2f2f2;
}


.compras-status-option__icon--buscando_proveedor {
  color: #1d4ed8;

  background: #eff6ff;
}


.compras-status-option__icon--cotizando {
  color: #7c3aed;

  background: #f5f3ff;
}


.compras-status-option__icon--compra_en_proceso {
  color: #a16207;

  background: #fefce8;
}


.compras-status-option__icon--comprado {
  color: #0369a1;

  background: #f0f9ff;
}


.compras-status-option__icon--recibido,
.compras-status-option__icon--cubierto_por_stock {
  color: #15803d;

  background: #f0fdf4;
}


.compras-status-option__icon--cancelado {
  color: #b91c1c;

  background: #fef2f2;
}


/* =========================================================
   STATUS OPTION COPY
   ========================================================= */

.compras-status-option__copy {
  min-width: 0;

  display: flex;
  flex-direction: column;

  gap: 2px;
}


.compras-status-option__copy strong {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 10px;
  font-weight: 800;
}


.compras-status-option__copy small {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  font-size: 8.5px;

  color:
    var(
      --text-muted,
      #858585
    );
}


html[data-theme="dark"] .compras-status-option,
body.dark .compras-status-option,
body[data-theme="dark"] .compras-status-option {
  color: #eeeeee;
}


html[data-theme="dark"] .compras-status-option:hover:not(:disabled),
body.dark .compras-status-option:hover:not(:disabled),
body[data-theme="dark"] .compras-status-option:hover:not(:disabled) {
  background: #151515;
}


html[data-theme="dark"] .compras-status-option.is-active,
body.dark .compras-status-option.is-active,
body[data-theme="dark"] .compras-status-option.is-active {
  background: #121212;
}


html[data-theme="dark"] .compras-status-option__icon--pendiente,
body.dark .compras-status-option__icon--pendiente,
body[data-theme="dark"] .compras-status-option__icon--pendiente {
  color: #cfcfcf;

  background: #151515;
}


html[data-theme="dark"] .compras-status-option__icon--buscando_proveedor,
body.dark .compras-status-option__icon--buscando_proveedor,
body[data-theme="dark"] .compras-status-option__icon--buscando_proveedor {
  color: #60a5fa;

  background: #091a31;
}


html[data-theme="dark"] .compras-status-option__icon--cotizando,
body.dark .compras-status-option__icon--cotizando,
body[data-theme="dark"] .compras-status-option__icon--cotizando {
  color: #c4b5fd;

  background: #17102a;
}


html[data-theme="dark"] .compras-status-option__icon--compra_en_proceso,
body.dark .compras-status-option__icon--compra_en_proceso,
body[data-theme="dark"] .compras-status-option__icon--compra_en_proceso {
  color: #facc15;

  background: #211b05;
}


html[data-theme="dark"] .compras-status-option__icon--comprado,
body.dark .compras-status-option__icon--comprado,
body[data-theme="dark"] .compras-status-option__icon--comprado {
  color: #7dd3fc;

  background: #082031;
}


html[data-theme="dark"] .compras-status-option__icon--recibido,
html[data-theme="dark"] .compras-status-option__icon--cubierto_por_stock,
body.dark .compras-status-option__icon--recibido,
body.dark .compras-status-option__icon--cubierto_por_stock,
body[data-theme="dark"] .compras-status-option__icon--recibido,
body[data-theme="dark"] .compras-status-option__icon--cubierto_por_stock {
  color: #4ade80;

  background: #071e10;
}


html[data-theme="dark"] .compras-status-option__icon--cancelado,
body.dark .compras-status-option__icon--cancelado,
body[data-theme="dark"] .compras-status-option__icon--cancelado {
  color: #f87171;

  background: #250909;
}


/* =========================================================
   TOAST ROOT
   ========================================================= */

.compras-toast-root {
  position: fixed;

  right: 18px;
  bottom: 18px;

  z-index: 15000;

  width:
    min(
      92vw,
      390px
    );

  display: flex;
  flex-direction: column;

  gap: 9px;

  pointer-events: none;

  font-family:
    "DM Sans",
    Inter,
    system-ui,
    sans-serif;
}


/* =========================================================
   TOAST
   ========================================================= */

.compras-toast {
  min-height: 54px;

  padding:
    10px
    10px
    10px
    12px;

  border:
    1px
    solid
    #dedede;

  border-radius: 11px;

  display: grid;

  grid-template-columns:
    30px
    minmax(
      0,
      1fr
    )
    28px;

  align-items: center;

  gap: 8px;

  pointer-events: auto;

  color: #202020;

  background: #ffffff;

  animation:
    comprasToastIn
    0.18s
    ease;
}


.compras-toast.is-leaving {
  animation:
    comprasToastOut
    0.18s
    ease
    forwards;
}


/* =========================================================
   TOAST ICON
   ========================================================= */

.compras-toast__icon {
  width: 30px;
  height: 30px;

  border-radius: 8px;

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

  color: #525252;

  background: #f2f2f2;
}


/* =========================================================
   TOAST MESSAGE
   ========================================================= */

.compras-toast__message {
  min-width: 0;

  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}


/* =========================================================
   TOAST CLOSE
   ========================================================= */

.compras-toast__close {
  appearance: none;

  width: 28px;
  height: 28px;

  padding: 0;

  border: 0;

  border-radius: 7px;

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

  cursor: pointer;

  color: #777777;

  background: transparent;
}


.compras-toast__close:hover {
  color: #222222;

  background: #f1f1f1;
}


/* =========================================================
   TOAST TYPES
   ========================================================= */

.compras-toast--success {
  border-color: #bbf7d0;
}


.compras-toast--success
.compras-toast__icon {
  color: #15803d;

  background: #f0fdf4;
}


.compras-toast--warning {
  border-color: #fde68a;
}


.compras-toast--warning
.compras-toast__icon {
  color: #a16207;

  background: #fefce8;
}


.compras-toast--error {
  border-color: #fecaca;
}


.compras-toast--error
.compras-toast__icon {
  color: #b91c1c;

  background: #fef2f2;
}


.compras-toast--info {
  border-color: #bfdbfe;
}


.compras-toast--info
.compras-toast__icon {
  color: #1d4ed8;

  background: #eff6ff;
}


/* =========================================================
   TOAST DARK
   ========================================================= */

html[data-theme="dark"] .compras-toast,
body.dark .compras-toast,
body[data-theme="dark"] .compras-toast {
  color: #ededed;

  background: #090909;

  border-color: #2b2b2b;
}


html[data-theme="dark"] .compras-toast__close,
body.dark .compras-toast__close,
body[data-theme="dark"] .compras-toast__close {
  color: #999999;
}


html[data-theme="dark"] .compras-toast__close:hover,
body.dark .compras-toast__close:hover,
body[data-theme="dark"] .compras-toast__close:hover {
  color: #ffffff;

  background: #171717;
}


html[data-theme="dark"] .compras-toast--success,
body.dark .compras-toast--success,
body[data-theme="dark"] .compras-toast--success {
  border-color: #18562d;
}


html[data-theme="dark"]
.compras-toast--success
.compras-toast__icon,
body.dark
.compras-toast--success
.compras-toast__icon,
body[data-theme="dark"]
.compras-toast--success
.compras-toast__icon {
  color: #4ade80;

  background: #071e10;
}


html[data-theme="dark"] .compras-toast--warning,
body.dark .compras-toast--warning,
body[data-theme="dark"] .compras-toast--warning {
  border-color: #594a0a;
}


html[data-theme="dark"]
.compras-toast--warning
.compras-toast__icon,
body.dark
.compras-toast--warning
.compras-toast__icon,
body[data-theme="dark"]
.compras-toast--warning
.compras-toast__icon {
  color: #facc15;

  background: #211b05;
}


html[data-theme="dark"] .compras-toast--error,
body.dark .compras-toast--error,
body[data-theme="dark"] .compras-toast--error {
  border-color: #641b1b;
}


html[data-theme="dark"]
.compras-toast--error
.compras-toast__icon,
body.dark
.compras-toast--error
.compras-toast__icon,
body[data-theme="dark"]
.compras-toast--error
.compras-toast__icon {
  color: #f87171;

  background: #250909;
}


html[data-theme="dark"] .compras-toast--info,
body.dark .compras-toast--info,
body[data-theme="dark"] .compras-toast--info {
  border-color: #183b66;
}


html[data-theme="dark"]
.compras-toast--info
.compras-toast__icon,
body.dark
.compras-toast--info
.compras-toast__icon,
body[data-theme="dark"]
.compras-toast--info
.compras-toast__icon {
  color: #60a5fa;

  background: #07162a;
}


/* =========================================================
   SCROLLBARS
   ========================================================= */

.compras-status-popover::-webkit-scrollbar,
.compras-history-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}


.compras-status-popover::-webkit-scrollbar-track,
.compras-history-list::-webkit-scrollbar-track {
  background: transparent;
}


.compras-status-popover::-webkit-scrollbar-thumb,
.compras-history-list::-webkit-scrollbar-thumb {
  border-radius: 999px;

  background: #cfcfcf;
}


html[data-theme="dark"] .compras-status-popover::-webkit-scrollbar-thumb,
html[data-theme="dark"] .compras-history-list::-webkit-scrollbar-thumb,
body.dark .compras-status-popover::-webkit-scrollbar-thumb,
body.dark .compras-history-list::-webkit-scrollbar-thumb,
body[data-theme="dark"] .compras-status-popover::-webkit-scrollbar-thumb,
body[data-theme="dark"] .compras-history-list::-webkit-scrollbar-thumb {
  background: #333333;
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes comprasToastIn {
  from {
    opacity: 0;

    transform:
      translateY(
        8px
      );
  }

  to {
    opacity: 1;

    transform:
      translateY(
        0
      );
  }
}


@keyframes comprasToastOut {
  from {
    opacity: 1;

    transform:
      translateY(
        0
      );
  }

  to {
    opacity: 0;

    transform:
      translateY(
        8px
      );
  }
}


/* =========================================================
   RESPONSIVE · SUMMARY
   ========================================================= */

@media (
  max-width: 1200px
) {
  .compras-summary-kpis {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }
}


/* =========================================================
   RESPONSIVE · HISTORY
   ========================================================= */

@media (
  max-width: 800px
) {
  .compras-history-item__header {
    flex-direction: column;

    gap: 5px;
  }


  .compras-history-item__header time {
    align-self: flex-start;
  }


  .compras-history-item__reference {
    align-items: flex-start;

    flex-direction: column;
  }


  .compras-history-pagination {
    align-items: flex-start;

    flex-direction: column;
  }
}


/* =========================================================
   RESPONSIVE · SMALL
   ========================================================= */

@media (
  max-width: 560px
) {
  .compras-summary-kpis {
    grid-template-columns: 1fr;
  }


  .compras-history-item {
    grid-template-columns: 1fr;
  }


  .compras-history-item__icon {
    width: 32px;
    height: 32px;
  }


  .compras-history-change {
    align-items: flex-start;
  }


  .compras-history-quantities {
    align-items: stretch;

    flex-direction: column;
  }


  .compras-history-quantities > span {
    width: 100%;
  }


  .compras-toast-root {
    right: 10px;
    bottom: 10px;
    left: 10px;

    width: auto;
  }
}


/* =========================================================
   RESPONSIVE · VERY SMALL
   ========================================================= */

@media (
  max-width: 420px
) {
  .compras-popover {
    max-width:
      calc(
        100vw -
        24px
      );
  }


  .compras-status-popover,
  .compras-export-popover {
    width:
      calc(
        100vw -
        24px
      ) !important;

    right: 12px !important;
    left: 12px !important;
  }


  .compras-history-pagination > div {
    width: 100%;

    justify-content: space-between;
  }
}


/* =========================================================
   FIN PARTE 3 DE 3
   ========================================================= */
   /* =========================================================
   COMPRAS DE PRODUCCIÓN · AJUSTE FINAL
   PEGAR AL FINAL DEL CSS

   - MISMO TAMAÑO GENERAL
   - LETRAS MÁS MARCADAS
   - DIVISIONES MÁS VISIBLES
   - MÁS RÁPIDA
   - RESPONSIVE FULL
   - SIN SCROLL HORIZONTAL
   - TABLAS EN CARDS EN TABLET / MOBILE
   ========================================================= */


/* =========================================================
   01. VARIABLES GENERALES
   ========================================================= */

.compras-produccion-page,
.compras-overlay-root,
.compras-toast-root,
.compras-popover {
  --compras-ui-text: #0b0c0e;
  --compras-ui-text-soft: #34383d;
  --compras-ui-text-muted: #62686f;

  --compras-ui-border: #c9ced4;
  --compras-ui-border-soft: #d9dde1;
  --compras-ui-border-strong: #9fa6ae;
}


html[data-theme="dark"] .compras-produccion-page,
html[data-theme="dark"] .compras-overlay-root,
html[data-theme="dark"] .compras-toast-root,
html[data-theme="dark"] .compras-popover,
body.dark .compras-produccion-page,
body.dark .compras-overlay-root,
body.dark .compras-toast-root,
body.dark .compras-popover,
body[data-theme="dark"] .compras-produccion-page,
body[data-theme="dark"] .compras-overlay-root,
body[data-theme="dark"] .compras-toast-root,
body[data-theme="dark"] .compras-popover {
  --compras-ui-text: #f7f7f7;
  --compras-ui-text-soft: #d4d7db;
  --compras-ui-text-muted: #a8adb3;

  --compras-ui-border: #3c4248;
  --compras-ui-border-soft: #2c3034;
  --compras-ui-border-strong: #5b626a;
}


/* =========================================================
   02. SIN DESBORDE HORIZONTAL GENERAL
   ========================================================= */

body:has(.compras-produccion-page),
body:has(.compras-produccion-page) .app-shell,
body:has(.compras-produccion-page) .app-main,
body:has(.compras-produccion-page) .app-content,
.app-content:has(.compras-produccion-page),
.compras-produccion-page {
  width: 100% !important;

  min-width: 0 !important;
  max-width: 100% !important;

  overflow-x: hidden !important;
}


.compras-produccion-page *,
.compras-produccion-page *::before,
.compras-produccion-page *::after,
.compras-overlay-root *,
.compras-overlay-root *::before,
.compras-overlay-root *::after {
  box-sizing: border-box;

  min-width: 0;
}


/* =========================================================
   03. MÁS RÁPIDA
   ========================================================= */

.compras-produccion-page *,
.compras-produccion-page *::before,
.compras-produccion-page *::after,
.compras-overlay-root *,
.compras-overlay-root *::before,
.compras-overlay-root *::after,
.compras-popover *,
.compras-toast * {
  transition-duration: 70ms !important;
}


.compras-button:hover:not(:disabled),
.compras-button:active:not(:disabled),
.compras-metric-card:hover,
.compras-status-tag:hover:not(:disabled) {
  transform: none !important;
}


.compras-overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}


.compras-toast {
  animation-duration: 90ms !important;
}


.compras-toast.is-leaving {
  animation-duration: 90ms !important;
}


.compras-button__spinner svg,
.compras-icon-button.is-loading svg,
.compras-detail-loading svg,
.compras-search-loading svg {
  animation-duration: 650ms !important;
}


.compras-skeleton::after,
.compras-table-skeleton > span::after {
  animation-duration: 900ms !important;
}


/* =========================================================
   04. TIPOGRAFÍA MÁS MARCADA
   ========================================================= */

.compras-produccion-page,
.compras-modal,
.compras-popover,
.compras-toast {
  font-weight: 600;
}


.compras-page-header__title,
.compras-modal__heading h2,
.compras-detail-summary__heading h3 {
  font-weight: 900 !important;
}


.compras-page-header__eyebrow,
.compras-metric-card__label,
.compras-table thead th,
.compras-field > span,
.compras-form-section__header span,
.compras-form-section__header h3,
.compras-summary-kpi > span,
.compras-history-item__header strong,
.compras-popover__header strong {
  font-weight: 850 !important;
}


.compras-page-header__description,
.compras-metric-card__hint,
.compras-search input,
.compras-toolbar-select > span,
.compras-toolbar-select select,
.compras-table tbody td,
.compras-pagination,
.compras-modal__heading p,
.compras-field > small,
.compras-field input,
.compras-field select,
.compras-field textarea {
  font-weight: 650 !important;
}


.compras-button,
.compras-code-button,
.compras-lote-cell__product,
.compras-insumo-cell strong,
.compras-quantity strong,
.compras-stock-cell__numbers strong,
.compras-buy-cell > strong,
.compras-provider-cell strong,
.compras-date-cell strong,
.compras-status-tag,
.compras-priority-tag,
.compras-stock-tag {
  font-weight: 800 !important;
}


.compras-metric-card__value,
.compras-detail-kpi > strong,
.compras-summary-kpi > strong {
  font-weight: 850 !important;
}


/* =========================================================
   05. HEADER
   ========================================================= */

.compras-page-header {
  padding-bottom: 14px;

  border-bottom:
    1px
    solid
    var(--compras-ui-border-strong);
}


/* =========================================================
   06. BOTONES
   ========================================================= */

.compras-button--secondary,
.compras-icon-button,
.compras-search,
.compras-toolbar-select select {
  border-color:
    var(--compras-ui-border-strong) !important;
}


/* =========================================================
   07. MÉTRICAS · DIVISIONES MARCADAS
   ========================================================= */

.compras-metrics {
  gap: 0 !important;

  border:
    1px
    solid
    var(--compras-ui-border-strong);

  border-radius: 12px;

  overflow: hidden;
}


.compras-metric-card {
  border: 0 !important;

  border-right:
    1px
    solid
    var(--compras-ui-border-strong) !important;

  border-radius: 0 !important;

  box-shadow: none !important;
}


.compras-metric-card:last-child {
  border-right: 0 !important;
}


.compras-metric-card__icon {
  border:
    1px
    solid
    var(--compras-ui-border) !important;
}


/* =========================================================
   08. WORKSPACE
   ========================================================= */

.compras-workspace {
  border-color:
    var(--compras-ui-border-strong) !important;
}


/* =========================================================
   09. TOOLBAR
   ========================================================= */

.compras-toolbar {
  border-bottom:
    1px
    solid
    var(--compras-ui-border-strong) !important;
}


.compras-toolbar,
.compras-toolbar__primary,
.compras-toolbar__secondary {
  min-width: 0 !important;
  max-width: 100% !important;
}


.compras-search {
  min-width: 0 !important;
}


/* =========================================================
   10. BARRA DE SELECCIÓN
   ========================================================= */

.compras-selection-bar {
  border-bottom-width: 1px !important;
}


.compras-selection-bar__info,
.compras-selection-bar__actions {
  min-width: 0;
}


/* =========================================================
   11. TABLA PRINCIPAL · SIN BARRA HORIZONTAL
   ========================================================= */

.compras-table-container,
.compras-table-scroll {
  width: 100% !important;

  min-width: 0 !important;
  max-width: 100% !important;
}


.compras-table-scroll {
  overflow-x: hidden !important;
  overflow-y: visible !important;
}


.compras-table {
  width: 100% !important;

  min-width: 0 !important;
  max-width: 100% !important;

  table-layout: fixed !important;
}


/* =========================================================
   12. ANCHOS TABLA DESKTOP
   ========================================================= */

.compras-table th:nth-child(1),
.compras-table td:nth-child(1) {
  width: 3% !important;
}


.compras-table th:nth-child(2),
.compras-table td:nth-child(2) {
  width: 16% !important;
}


.compras-table th:nth-child(3),
.compras-table td:nth-child(3) {
  width: 16% !important;
}


.compras-table th:nth-child(4),
.compras-table td:nth-child(4) {
  width: 8% !important;
}


.compras-table th:nth-child(5),
.compras-table td:nth-child(5) {
  width: 10% !important;
}


.compras-table th:nth-child(6),
.compras-table td:nth-child(6) {
  width: 9% !important;
}


.compras-table th:nth-child(7),
.compras-table td:nth-child(7) {
  width: 11% !important;
}


.compras-table th:nth-child(8),
.compras-table td:nth-child(8) {
  width: 11% !important;
}


.compras-table th:nth-child(9),
.compras-table td:nth-child(9) {
  width: 10% !important;
}


.compras-table th:nth-child(10),
.compras-table td:nth-child(10) {
  width: 6% !important;
}


/* =========================================================
   13. ANULAR MIN-WIDTH ORIGINALES
   ========================================================= */

.compras-table__checkbox-cell,
.compras-table__actions-cell,
.compras-lote-cell,
.compras-insumo-cell,
.compras-quantity,
.compras-stock-cell,
.compras-buy-cell,
.compras-provider-cell,
.compras-date-cell {
  min-width: 0 !important;

  max-width: 100% !important;
}


/* =========================================================
   14. DIVISIONES TABLA
   ========================================================= */

.compras-table thead th {
  border-right:
    1px
    solid
    var(--compras-ui-border) !important;

  border-bottom:
    1px
    solid
    var(--compras-ui-border-strong) !important;
}


.compras-table thead th:last-child {
  border-right: 0 !important;
}


.compras-table tbody td {
  border-right:
    1px
    solid
    var(--compras-ui-border) !important;

  border-bottom:
    1px
    solid
    var(--compras-ui-border) !important;
}


.compras-table tbody td:last-child {
  border-right: 0 !important;
}


.compras-table tbody tr:last-child td {
  border-bottom: 0 !important;
}


/* =========================================================
   15. EVITAR DESBORDES EN CELDAS
   ========================================================= */

.compras-table th,
.compras-table td {
  min-width: 0 !important;

  overflow: hidden;
}


.compras-lote-cell,
.compras-insumo-cell,
.compras-provider-cell,
.compras-date-cell,
.compras-stock-cell,
.compras-buy-cell,
.compras-quantity {
  width: 100% !important;

  min-width: 0 !important;
  max-width: 100% !important;
}


.compras-code-button,
.compras-lote-cell__product,
.compras-lote-cell__code,
.compras-insumo-cell strong,
.compras-insumo-cell > span,
.compras-insumo-cell small,
.compras-provider-cell strong,
.compras-provider-cell span,
.compras-provider-cell small,
.compras-date-cell strong,
.compras-date-cell span {
  max-width: 100% !important;

  overflow: hidden !important;

  text-overflow: ellipsis !important;

  white-space: nowrap !important;
}


.compras-status-tag,
.compras-stock-tag,
.compras-priority-tag {
  max-width: 100%;

  overflow: hidden;
}


.compras-status-tag > span,
.compras-stock-tag,
.compras-priority-tag {
  overflow: hidden;

  text-overflow: ellipsis;
}


/* =========================================================
   16. ACCIONES TABLA
   ========================================================= */

.compras-table__actions-cell {
  text-align: center !important;
}


.compras-table__actions-cell
.compras-icon-button {
  width: 30px !important;
  height: 30px !important;

  margin:
    0
    auto;
}


/* =========================================================
   17. PAGINACIÓN
   ========================================================= */

.compras-pagination {
  border-top:
    1px
    solid
    var(--compras-ui-border-strong) !important;
}


.compras-pagination,
.compras-pagination__info,
.compras-pagination__actions {
  min-width: 0;
}


/* =========================================================
   18. MODALES
   ========================================================= */

.compras-overlay-root,
.compras-overlay {
  max-width: 100vw !important;

  overflow-x: hidden !important;
}


.compras-modal {
  max-width:
    calc(
      100vw -
      24px
    ) !important;

  border-color:
    var(--compras-ui-border-strong) !important;

  overflow-x: hidden !important;
}


.compras-modal__header {
  border-bottom:
    1px
    solid
    var(--compras-ui-border-strong) !important;
}


.compras-modal__body {
  max-width: 100%;

  overflow-x: hidden !important;
}


.compras-modal__footer {
  border-top:
    1px
    solid
    var(--compras-ui-border-strong) !important;
}


/* =========================================================
   19. FORMULARIOS
   ========================================================= */

.compras-form,
.compras-form-grid,
.compras-form-section,
.compras-field {
  min-width: 0;

  max-width: 100%;
}


.compras-form-section {
  border-top-color:
    var(--compras-ui-border-strong) !important;
}


.compras-form-section__header {
  padding-bottom: 9px;

  border-bottom:
    1px
    solid
    var(--compras-ui-border);
}


.compras-field input,
.compras-field select,
.compras-field textarea {
  border-color:
    var(--compras-ui-border-strong) !important;
}


/* =========================================================
   20. SWITCHES
   ========================================================= */

.compras-switch-list {
  border-color:
    var(--compras-ui-border-strong) !important;
}


.compras-switch-row {
  border-bottom-color:
    var(--compras-ui-border) !important;
}


/* =========================================================
   21. DETALLE
   ========================================================= */

.compras-detail-summary,
.compras-detail-insumo,
.compras-detail-kpi {
  border-color:
    var(--compras-ui-border-strong) !important;
}


.compras-detail-summary__heading {
  padding-bottom: 10px;

  border-bottom:
    1px
    solid
    var(--compras-ui-border);
}


/* =========================================================
   22. RESUMEN
   ========================================================= */

.compras-summary-kpis {
  gap: 0 !important;

  border:
    1px
    solid
    var(--compras-ui-border-strong);

  border-radius: 11px;

  overflow: hidden;
}


.compras-summary-kpi {
  border: 0 !important;

  border-right:
    1px
    solid
    var(--compras-ui-border-strong) !important;

  border-radius: 0 !important;
}


.compras-summary-kpi:last-child {
  border-right: 0 !important;
}


/* =========================================================
   23. TABLA RESUMEN · SIN SCROLL
   ========================================================= */

.compras-table--summary {
  width: 100% !important;

  min-width: 0 !important;

  table-layout: fixed !important;
}


.compras-table--summary
th:nth-child(1),
.compras-table--summary
td:nth-child(1) {
  width: 20% !important;
}


.compras-table--summary
th:nth-child(2),
.compras-table--summary
td:nth-child(2) {
  width: 12% !important;
}


.compras-table--summary
th:nth-child(3),
.compras-table--summary
td:nth-child(3),
.compras-table--summary
th:nth-child(4),
.compras-table--summary
td:nth-child(4),
.compras-table--summary
th:nth-child(5),
.compras-table--summary
td:nth-child(5),
.compras-table--summary
th:nth-child(6),
.compras-table--summary
td:nth-child(6),
.compras-table--summary
th:nth-child(7),
.compras-table--summary
td:nth-child(7) {
  width: 10% !important;
}


.compras-table--summary
th:nth-child(8),
.compras-table--summary
td:nth-child(8) {
  width: 18% !important;
}


.compras-summary-lotes {
  min-width: 0 !important;

  max-width: 100% !important;
}


/* =========================================================
   24. HISTORIAL
   ========================================================= */

.compras-history-toolbar,
.compras-history-list {
  min-width: 0;

  max-width: 100%;
}


.compras-history-item {
  border-color:
    var(--compras-ui-border-strong) !important;
}


.compras-history-item__reference,
.compras-history-change,
.compras-history-quantities {
  border-color:
    var(--compras-ui-border) !important;
}


/* =========================================================
   25. PROVEEDORES
   ========================================================= */

.compras-provider-results {
  max-width: 100%;

  overflow-x: hidden !important;

  border-color:
    var(--compras-ui-border-strong) !important;
}


.compras-provider-result {
  border-bottom-color:
    var(--compras-ui-border) !important;
}


.compras-selected-provider {
  border-color:
    var(--compras-ui-border-strong) !important;
}


/* =========================================================
   26. POPOVERS
   ========================================================= */

.compras-popover {
  max-width:
    calc(
      100vw -
      24px
    ) !important;

  border-color:
    var(--compras-ui-border-strong) !important;

  overflow-x: hidden !important;
}


.compras-popover__header {
  border-bottom-color:
    var(--compras-ui-border-strong) !important;
}


.compras-popover__item,
.compras-status-option {
  font-weight: 700 !important;
}


.compras-status-option {
  border-bottom-color:
    var(--compras-ui-border) !important;
}


/* =========================================================
   27. TOAST
   ========================================================= */

.compras-toast {
  border-width: 1px !important;

  font-weight: 700 !important;
}


/* =========================================================
   28. RESPONSIVE · 1500
   ========================================================= */

@media (max-width: 1500px) {
  .compras-metric-card {
    border-right:
      1px
      solid
      var(--compras-ui-border-strong) !important;

    border-bottom:
      1px
      solid
      var(--compras-ui-border-strong) !important;
  }


  .compras-metric-card:nth-child(3n) {
    border-right: 0 !important;
  }


  .compras-metric-card:nth-last-child(-n + 3) {
    border-bottom: 0 !important;
  }
}


/* =========================================================
   29. RESPONSIVE · 1100
   ========================================================= */

@media (max-width: 1100px) {
  .compras-produccion-page {
    padding: 16px !important;
  }


  .compras-page-header {
    gap: 16px;
  }


  .compras-toolbar__primary,
  .compras-toolbar__secondary {
    min-width: 0;
  }


  .compras-toolbar__primary {
    display: grid;

    grid-template-columns:
      minmax(
        0,
        1fr
      )
      auto
      auto;
  }


  .compras-search {
    width: 100% !important;

    min-width: 0 !important;
  }


  .compras-toolbar__secondary {
    display: flex;

    flex-wrap: wrap;
  }
}


/* =========================================================
   30. TABLET · TABLA PRINCIPAL EN CARDS
   ========================================================= */

@media (max-width: 900px) {
  .compras-table-scroll {
    overflow-x: hidden !important;
  }


  .compras-table {
    display: block !important;

    width: 100% !important;

    min-width: 0 !important;
  }


  .compras-table thead {
    display: none !important;
  }


  .compras-table tbody {
    width: 100%;

    display: grid;

    grid-template-columns: 1fr;

    gap: 7px;

    padding: 7px;
  }


  .compras-table tbody tr {
    width: 100%;

    min-width: 0;
    max-width: 100%;

    display: grid;

    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );

    border:
      1px
      solid
      var(--compras-ui-border-strong);

    border-radius: 9px;

    overflow: hidden;
  }


  .compras-table tbody td,
  .compras-table tbody td:nth-child(1),
  .compras-table tbody td:nth-child(2),
  .compras-table tbody td:nth-child(3),
  .compras-table tbody td:nth-child(4),
  .compras-table tbody td:nth-child(5),
  .compras-table tbody td:nth-child(6),
  .compras-table tbody td:nth-child(7),
  .compras-table tbody td:nth-child(8),
  .compras-table tbody td:nth-child(9),
  .compras-table tbody td:nth-child(10) {
    width: auto !important;

    min-width: 0 !important;
    max-width: 100% !important;

    min-height: 54px;

    padding: 8px !important;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    justify-content: center;

    gap: 4px;

    border-right:
      1px
      solid
      var(--compras-ui-border) !important;

    border-bottom:
      1px
      solid
      var(--compras-ui-border) !important;

    overflow: hidden;
  }


  .compras-table tbody
  td:nth-child(2n) {
    border-right: 0 !important;
  }


  .compras-table tbody
  td:nth-child(1)::before {
    content: "Seleccionar";
  }


  .compras-table tbody
  td:nth-child(2)::before {
    content: "Lote / Producto";
  }


  .compras-table tbody
  td:nth-child(3)::before {
    content: "Insumo";
  }


  .compras-table tbody
  td:nth-child(4)::before {
    content: "Necesario";
  }


  .compras-table tbody
  td:nth-child(5)::before {
    content: "Stock";
  }


  .compras-table tbody
  td:nth-child(6)::before {
    content: "A comprar";
  }


  .compras-table tbody
  td:nth-child(7)::before {
    content: "Estado";
  }


  .compras-table tbody
  td:nth-child(8)::before {
    content: "Proveedor";
  }


  .compras-table tbody
  td:nth-child(9)::before {
    content: "Fecha requerida";
  }


  .compras-table tbody
  td:nth-child(10)::before {
    content: "Acciones";
  }


  .compras-table tbody td::before {
    display: block;

    margin-bottom: 2px;

    color:
      var(--compras-ui-text-muted);

    font-size: 7px;

    font-weight: 850;

    letter-spacing: 0.06em;

    text-transform: uppercase;
  }


  .compras-table tbody
  td:nth-child(1) {
    align-items: center;
  }


  .compras-table tbody
  td:nth-child(9),
  .compras-table tbody
  td:nth-child(10) {
    grid-column:
      1
      /
      -1;

    border-right: 0 !important;
  }


  .compras-table tbody
  td:nth-child(10) {
    border-bottom: 0 !important;
  }


  .compras-table__actions-cell
  .compras-icon-button {
    width: 100% !important;

    min-height: 34px;

    margin: 0;
  }


  .compras-lote-cell,
  .compras-insumo-cell,
  .compras-provider-cell,
  .compras-date-cell,
  .compras-stock-cell,
  .compras-buy-cell,
  .compras-quantity {
    width: 100%;
  }


  .compras-code-button,
  .compras-lote-cell__product,
  .compras-lote-cell__code,
  .compras-insumo-cell strong,
  .compras-insumo-cell > span,
  .compras-insumo-cell small,
  .compras-provider-cell strong,
  .compras-provider-cell span,
  .compras-provider-cell small,
  .compras-date-cell strong,
  .compras-date-cell span {
    white-space: normal !important;

    overflow-wrap: anywhere;
  }


  /* =======================================================
     TABLA RESUMEN → CARDS
     ======================================================= */

  .compras-table--summary tbody tr {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }


  .compras-table--summary
  tbody
  td:nth-child(1)::before {
    content: "Insumo";
  }


  .compras-table--summary
  tbody
  td:nth-child(2)::before {
    content: "Lotes";
  }


  .compras-table--summary
  tbody
  td:nth-child(3)::before {
    content: "Requerido";
  }


  .compras-table--summary
  tbody
  td:nth-child(4)::before {
    content: "Stock";
  }


  .compras-table--summary
  tbody
  td:nth-child(5)::before {
    content: "Faltante";
  }


  .compras-table--summary
  tbody
  td:nth-child(6)::before {
    content: "Comprado";
  }


  .compras-table--summary
  tbody
  td:nth-child(7)::before {
    content: "A comprar";
  }


  .compras-table--summary
  tbody
  td:nth-child(8)::before {
    content: "Fecha próxima";
  }


  .compras-table--summary
  tbody
  td:nth-child(7),
  .compras-table--summary
  tbody
  td:nth-child(8) {
    grid-column: auto;

    border-right:
      1px
      solid
      var(--compras-ui-border) !important;
  }


  .compras-table--summary
  tbody
  td:nth-child(2n) {
    border-right: 0 !important;
  }


  .compras-table--summary
  tbody
  td:nth-child(8) {
    border-bottom: 0 !important;
  }
}


/* =========================================================
   31. MOBILE
   ========================================================= */

@media (max-width: 760px) {
  .compras-produccion-page {
    padding: 9px !important;
  }


  .compras-page-header {
    gap: 12px;

    margin-bottom: 14px;
  }


  .compras-page-header__title {
    font-size: 22px !important;
  }


  .compras-page-header__description {
    font-size: 11px !important;
  }


  .compras-page-header__actions {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      ) !important;
  }


  .compras-page-header__actions
  .compras-button:last-child {
    grid-column:
      1
      /
      -1;
  }


  /* =======================================================
     MÉTRICAS
     ======================================================= */

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


  .compras-metric-card,
  .compras-metric-card:nth-child(3n),
  .compras-metric-card:nth-last-child(-n + 3) {
    border-right:
      1px
      solid
      var(--compras-ui-border-strong) !important;

    border-bottom:
      1px
      solid
      var(--compras-ui-border-strong) !important;
  }


  .compras-metric-card:nth-child(2n) {
    border-right: 0 !important;
  }


  .compras-metric-card:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
  }


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

  .compras-toolbar {
    padding: 8px;
  }


  .compras-toolbar__primary {
    display: grid !important;

    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      ) !important;

    gap: 6px;
  }


  .compras-search {
    grid-column:
      1
      /
      -1;

    width: 100% !important;

    min-width: 0 !important;
  }


  .compras-toolbar-select {
    width: 100%;

    min-width: 0;
  }


  .compras-toolbar-select select {
    min-width: 0;

    flex: 1;
  }


  .compras-toolbar__secondary {
    width: 100%;

    display: grid;

    grid-template-columns:
      minmax(
        0,
        1fr
      )
      38px;

    gap: 6px;
  }


  /* =======================================================
     SELECCIÓN
     ======================================================= */

  .compras-selection-bar {
    width: 100%;

    align-items: stretch;

    flex-direction: column;

    overflow-x: hidden;
  }


  .compras-selection-bar__actions {
    width: 100%;

    display: grid;

    grid-template-columns:
      1fr;

    gap: 6px;
  }


  .compras-selection-bar__actions
  .compras-toolbar-select,
  .compras-selection-bar__actions
  .compras-button {
    width: 100%;
  }


  /* =======================================================
     PAGINACIÓN
     ======================================================= */

  .compras-pagination {
    width: 100%;

    align-items: stretch !important;

    flex-direction: column !important;

    gap: 7px;

    overflow-x: hidden;
  }


  .compras-pagination__info {
    width: 100%;

    text-align: center;
  }


  .compras-pagination__actions {
    width: 100%;

    display: grid;

    grid-template-columns:
      34px
      34px
      minmax(
        0,
        1fr
      )
      34px
      34px;

    gap: 5px;
  }


  .compras-pagination__page {
    width: auto;

    min-width: 0;

    display: flex;

    align-items: center;

    justify-content: center;
  }


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

  .compras-overlay {
    width: 100vw;

    max-width: 100vw;

    padding: 8px !important;
  }


  .compras-modal,
  .compras-modal--sm,
  .compras-modal--md,
  .compras-modal--lg,
  .compras-modal--xl,
  .compras-modal--full {
    width:
      calc(
        100vw -
        16px
      ) !important;

    max-width:
      calc(
        100vw -
        16px
      ) !important;

    overflow-x: hidden !important;
  }


  .compras-modal__body {
    width: 100%;

    max-width: 100%;

    overflow-x: hidden !important;
  }


  .compras-form-grid--2,
  .compras-form-grid--3 {
    grid-template-columns:
      1fr !important;
  }


  .compras-field--full {
    grid-column: auto !important;
  }


  .compras-detail-kpis {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      ) !important;
  }


  .compras-summary-kpis {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      ) !important;
  }


  .compras-summary-kpi {
    border-right:
      1px
      solid
      var(--compras-ui-border-strong) !important;

    border-bottom:
      1px
      solid
      var(--compras-ui-border-strong) !important;
  }


  .compras-summary-kpi:nth-child(2n) {
    border-right: 0 !important;
  }


  .compras-summary-kpi:nth-last-child(-n + 2) {
    border-bottom: 0 !important;
  }


  .compras-history-toolbar,
  .compras-history-list,
  .compras-history-item,
  .compras-history-item__content,
  .compras-history-item__reference,
  .compras-history-change,
  .compras-history-quantities {
    width: 100%;

    min-width: 0;

    max-width: 100%;

    overflow-x: hidden;
  }


  .compras-history-item__header,
  .compras-history-item__reference {
    align-items: flex-start;

    flex-direction: column;
  }


  .compras-history-change,
  .compras-history-quantities {
    flex-wrap: wrap;
  }
}


/* =========================================================
   32. MOBILE CHICO
   ========================================================= */

@media (max-width: 520px) {
  .compras-produccion-page {
    padding: 6px !important;
  }


  .compras-page-header__actions {
    grid-template-columns:
      1fr !important;
  }


  .compras-page-header__actions
  .compras-button:last-child {
    grid-column: auto;
  }


  .compras-metrics {
    grid-template-columns:
      1fr !important;
  }


  .compras-metric-card,
  .compras-metric-card:nth-child(2n),
  .compras-metric-card:nth-child(3n),
  .compras-metric-card:nth-last-child(-n + 2),
  .compras-metric-card:nth-last-child(-n + 3) {
    border-right: 0 !important;

    border-bottom:
      1px
      solid
      var(--compras-ui-border-strong) !important;
  }


  .compras-metric-card:last-child {
    border-bottom: 0 !important;
  }


  .compras-toolbar__primary {
    grid-template-columns:
      1fr !important;
  }


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


  .compras-toolbar__secondary {
    grid-template-columns:
      1fr
      38px;
  }


  /* =======================================================
     TABLA MOBILE 1 COLUMNA
     ======================================================= */

  .compras-table tbody tr,
  .compras-table--summary tbody tr {
    grid-template-columns:
      1fr !important;
  }


  .compras-table tbody td,
  .compras-table tbody td:nth-child(2n),
  .compras-table tbody td:nth-child(9),
  .compras-table tbody td:nth-child(10),
  .compras-table--summary tbody td,
  .compras-table--summary tbody td:nth-child(2n),
  .compras-table--summary tbody td:nth-child(7),
  .compras-table--summary tbody td:nth-child(8) {
    grid-column: auto !important;

    border-right: 0 !important;

    border-bottom:
      1px
      solid
      var(--compras-ui-border) !important;
  }


  .compras-table tbody td:last-child,
  .compras-table--summary
  tbody
  td:last-child {
    border-bottom: 0 !important;
  }


  .compras-pagination__actions {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      ) !important;
  }


  .compras-pagination__page {
    grid-column:
      1
      /
      -1;

    grid-row: 1;
  }


  .compras-pagination__actions
  .compras-icon-button {
    width: 100%;
  }


  .compras-modal__footer {
    grid-template-columns:
      1fr !important;
  }


  .compras-detail-kpis,
  .compras-summary-kpis {
    grid-template-columns:
      1fr !important;
  }


  .compras-summary-kpi,
  .compras-summary-kpi:nth-child(2n),
  .compras-summary-kpi:nth-last-child(-n + 2) {
    border-right: 0 !important;

    border-bottom:
      1px
      solid
      var(--compras-ui-border-strong) !important;
  }


  .compras-summary-kpi:last-child {
    border-bottom: 0 !important;
  }


  .compras-history-item {
    grid-template-columns:
      1fr !important;
  }


  .compras-history-quantities {
    flex-direction: column;

    align-items: stretch;
  }


  .compras-history-quantities > span {
    width: 100%;
  }


  .compras-toast-root {
    right: 8px !important;
    bottom: 8px !important;
    left: 8px !important;

    width: auto !important;
  }


  .compras-popover,
  .compras-status-popover,
  .compras-export-popover {
    width:
      calc(
        100vw -
        16px
      ) !important;

    max-width:
      calc(
        100vw -
        16px
      ) !important;

    right: 8px !important;
    left: 8px !important;
  }
}


/* =========================================================
   33. PROTECCIÓN FINAL
   ========================================================= */

.compras-produccion-page img,
.compras-produccion-page svg,
.compras-overlay-root img,
.compras-overlay-root svg {
  max-width: 100%;
}


.compras-produccion-page input,
.compras-produccion-page select,
.compras-produccion-page textarea,
.compras-produccion-page button,
.compras-overlay-root input,
.compras-overlay-root select,
.compras-overlay-root textarea,
.compras-overlay-root button {
  min-width: 0;

  max-width: 100%;
}


.compras-produccion-page,
.compras-page-header,
.compras-metrics,
.compras-workspace,
.compras-toolbar,
.compras-toolbar__primary,
.compras-toolbar__secondary,
.compras-selection-bar,
.compras-table-container,
.compras-table-scroll,
.compras-pagination,
.compras-overlay-root,
.compras-overlay,
.compras-modal,
.compras-modal__header,
.compras-modal__body,
.compras-modal__footer,
.compras-form,
.compras-form-grid,
.compras-detail-summary,
.compras-detail-kpis,
.compras-summary-kpis,
.compras-history-list,
.compras-history-item {
  overflow-x: hidden !important;
}/* =========================================================
   COMPRAS DE PRODUCCIÓN
   AJUSTE PROFESIONAL FINAL
   - TEXTO MÁS FIRME
   - NEGROS REALES
   - ACCIONES PROFESIONALES
   - SIN GLOW
   - RESPONSIVE
   - ANIMACIONES CORTAS
   ========================================================= */


/* =========================================================
   01. TEXTO GENERAL MÁS NEGRO
   ========================================================= */

.compras-produccion-page {
  --compras-final-text: #090a0b;
  --compras-final-text-2: #222428;
  --compras-final-text-3: #45494f;
  --compras-final-muted: #5f646a;

  color:
    var(--compras-final-text) !important;

  font-weight: 650;
}


.compras-produccion-page
.compras-page-header__title {
  color: #050505 !important;

  font-weight: 900 !important;

  letter-spacing: -0.035em;
}


.compras-produccion-page
.compras-page-header__description {
  color: #34373b !important;

  font-weight: 650 !important;
}


.compras-produccion-page
.compras-page-header__eyebrow {
  color: #35383c !important;

  font-weight: 850 !important;
}


/* =========================================================
   02. MÉTRICAS
   ========================================================= */

.compras-metric-card__label {
  color: #292c30 !important;

  font-weight: 800 !important;
}


.compras-metric-card__value {
  color: #070707 !important;

  font-weight: 900 !important;
}


.compras-metric-card__hint {
  color: #4b4f54 !important;

  font-weight: 650 !important;
}


/* =========================================================
   03. TOOLBAR
   ========================================================= */

.compras-search {
  background: #ffffff !important;

  border-color: #bfc4ca !important;
}


.compras-search input {
  color: #0b0b0c !important;

  font-weight: 700 !important;
}


.compras-search input::placeholder {
  color: #646970 !important;

  opacity: 1;
}


.compras-toolbar-select > span {
  color: #34383d !important;

  font-weight: 800 !important;
}


.compras-toolbar-select select {
  color: #111214 !important;

  font-weight: 750 !important;

  border-color: #bfc4ca !important;

  background: #ffffff !important;
}


/* =========================================================
   04. BOTONES
   ========================================================= */

.compras-button {
  font-weight: 800 !important;

  letter-spacing: -0.005em;
}


.compras-button--secondary {
  color: #111214 !important;

  background: #ffffff !important;

  border-color: #b8bec5 !important;
}


.compras-button--secondary:hover:not(:disabled) {
  color: #000 !important;

  background: #f3f4f5 !important;

  border-color: #858c94 !important;
}


.compras-icon-button {
  color: #22252a !important;

  background: #ffffff !important;

  border-color: #b8bec5 !important;
}


.compras-icon-button:hover:not(:disabled) {
  color: #000 !important;

  background: #f1f2f3 !important;

  border-color: #868d95 !important;
}


/* =========================================================
   05. TABLA · CABECERA
   ========================================================= */

.compras-table thead th {
  color: #25282c !important;

  font-weight: 850 !important;

  background: #f4f5f6 !important;

  letter-spacing: 0.035em;
}


/* =========================================================
   06. TABLA · CONTENIDO
   ========================================================= */

.compras-table tbody td {
  color: #161719 !important;

  font-weight: 650 !important;
}


.compras-lote-cell__product,
.compras-insumo-cell strong,
.compras-provider-cell strong {
  color: #090a0b !important;

  font-weight: 850 !important;
}


.compras-code-button {
  font-weight: 850 !important;
}


.compras-lote-cell__code,
.compras-insumo-cell > span,
.compras-insumo-cell small,
.compras-provider-cell span,
.compras-provider-cell small,
.compras-stock-cell__numbers span,
.compras-buy-cell > span,
.compras-date-cell span,
.compras-quantity span {
  color: #50555b !important;

  font-weight: 650 !important;
}


.compras-quantity strong,
.compras-stock-cell__numbers strong,
.compras-buy-cell > strong,
.compras-date-cell strong {
  font-weight: 850 !important;
}


/* =========================================================
   07. ACCIONES · BOTÓN DE LOS TRES PUNTOS
   ========================================================= */

.compras-table__actions-cell {
  overflow: visible !important;

  position: relative;
}


.compras-table__actions-cell
.compras-icon-button {
  position: relative;

  width: 34px !important;
  height: 34px !important;

  border-radius: 8px !important;

  color: #17191c !important;

  background: #ffffff !important;

  border:
    1px
    solid
    #b9bec5 !important;

  cursor: pointer;

  transition:
    background-color 90ms ease,
    border-color 90ms ease,
    color 90ms ease !important;
}


.compras-table__actions-cell
.compras-icon-button:hover {
  color: #000 !important;

  background: #ededee !important;

  border-color: #858b92 !important;
}


.compras-table__actions-cell
.compras-icon-button:active {
  background: #e2e4e6 !important;
}


/* =========================================================
   08. POPOVER ACCIONES
   ========================================================= */

.compras-actions-popover {
  width: 286px !important;

  max-width:
    calc(
      100vw -
      24px
    ) !important;

  padding: 0 !important;

  overflow: hidden !important;

  border:
    1px
    solid
    #aeb4bb !important;

  border-radius: 12px !important;

  color: #0b0c0e !important;

  background: #ffffff !important;

  box-shadow:
    0
    18px
    45px
    rgba(
      0,
      0,
      0,
      0.16
    ) !important;

  opacity: 0;

  transform:
    translateY(
      -4px
    );

  transform-origin: top right;

  transition:
    opacity 100ms ease,
    transform 100ms ease !important;
}


.compras-actions-popover.is-open {
  opacity: 1;

  transform:
    translateY(
      0
    );
}


/* =========================================================
   09. HEADER MENÚ ACCIONES
   ========================================================= */

.compras-actions-popover__header {
  min-height: 61px;

  padding:
    11px
    12px;

  display: flex;

  align-items: center;

  gap: 10px;

  border-bottom:
    1px
    solid
    #d0d4d8;

  background: #f7f7f8;
}


.compras-actions-popover__header-icon {
  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  display: flex;

  align-items: center;

  justify-content: center;

  border:
    1px
    solid
    #c2c7cc;

  border-radius: 8px;

  color: #17191c;

  background: #ffffff;
}


.compras-actions-popover__header-copy {
  flex: 1 1 auto;

  min-width: 0;

  display: flex;

  flex-direction: column;

  gap: 2px;
}


.compras-actions-popover__header-copy strong {
  color: #08090a !important;

  font-size: 12px;

  font-weight: 900 !important;

  line-height: 1.2;
}


.compras-actions-popover__header-copy span {
  max-width: 100%;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  color: #4f545a !important;

  font-size: 10px;

  font-weight: 650;
}


/* =========================================================
   10. BODY MENÚ
   ========================================================= */

.compras-actions-popover__body {
  padding: 5px;

  background: #ffffff;
}


.compras-actions-popover
.compras-popover__item {
  width: 100%;

  min-height: 51px;

  padding:
    7px
    8px !important;

  display: grid !important;

  grid-template-columns:
    34px
    minmax(
      0,
      1fr
    )
    auto;

  align-items: center;

  gap: 9px;

  border: 0 !important;

  border-radius: 8px !important;

  color: #101113 !important;

  background: transparent !important;

  text-align: left;

  cursor: pointer;

  transition:
    background-color 80ms ease,
    color 80ms ease !important;
}


.compras-actions-popover
.compras-popover__item:hover {
  color: #000 !important;

  background: #eeeeef !important;
}


.compras-actions-popover
.compras-popover__item:active {
  background: #e4e5e7 !important;
}


/* =========================================================
   11. ICONO ITEM
   ========================================================= */

.compras-popover__item-icon {
  width: 34px;
  height: 34px;

  display: flex;

  align-items: center;

  justify-content: center;

  border:
    1px
    solid
    #d0d3d7;

  border-radius: 8px;

  color: #292c30;

  background: #f8f8f9;
}


.compras-actions-popover
.compras-popover__item:hover
.compras-popover__item-icon {
  color: #050505;

  border-color: #b8bdc3;

  background: #ffffff;
}


/* =========================================================
   12. TEXTO ITEM
   ========================================================= */

.compras-popover__item-copy {
  min-width: 0;

  display: flex !important;

  flex-direction: column;

  gap: 2px;
}


.compras-popover__item-copy strong {
  color: #0a0b0c !important;

  font-size: 11px !important;

  font-weight: 850 !important;

  line-height: 1.2;
}


.compras-popover__item-copy small {
  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;

  color: #50555b !important;

  font-size: 9px !important;

  font-weight: 650 !important;

  line-height: 1.3;
}


.compras-popover__item-arrow {
  display: flex;

  align-items: center;

  justify-content: center;

  color: #676c72;
}


.compras-actions-popover__separator {
  height: 1px;

  margin:
    4px
    7px;

  background: #d4d7da;
}


/* =========================================================
   13. FORMULARIOS
   ========================================================= */

.compras-field > span {
  color: #292c30 !important;

  font-weight: 800 !important;
}


.compras-field > small {
  color: #50555b !important;

  font-weight: 650 !important;
}


.compras-field input,
.compras-field select,
.compras-field textarea {
  color: #0d0e10 !important;

  font-weight: 700 !important;

  background: #ffffff !important;

  border-color: #b6bcc3 !important;
}


.compras-field input::placeholder,
.compras-field textarea::placeholder {
  color: #666b71 !important;

  opacity: 1;
}


.compras-field input:focus,
.compras-field select:focus,
.compras-field textarea:focus {
  border-color: #60666d !important;

  box-shadow: none !important;
}


/* =========================================================
   14. MODALES
   ========================================================= */

.compras-modal__heading h2 {
  color: #08090a !important;

  font-weight: 900 !important;
}


.compras-modal__heading p {
  color: #44494f !important;

  font-weight: 650 !important;
}


.compras-form-section__header h3 {
  color: #0b0c0e !important;

  font-weight: 900 !important;
}


.compras-form-section__header span {
  color: #454a50 !important;

  font-weight: 850 !important;
}


/* =========================================================
   15. DARK MODE
   NEGRO REAL Y TEXTO FIRME
   ========================================================= */

html[data-theme="dark"]
.compras-produccion-page,
body.dark
.compras-produccion-page,
body[data-theme="dark"]
.compras-produccion-page {
  --compras-final-text: #ffffff;
  --compras-final-text-2: #e5e5e5;
  --compras-final-text-3: #c7c7c7;
  --compras-final-muted: #a8a8a8;
}


html[data-theme="dark"]
.compras-page-header__title,
body.dark
.compras-page-header__title,
body[data-theme="dark"]
.compras-page-header__title,

html[data-theme="dark"]
.compras-metric-card__value,
body.dark
.compras-metric-card__value,
body[data-theme="dark"]
.compras-metric-card__value,

html[data-theme="dark"]
.compras-lote-cell__product,
body.dark
.compras-lote-cell__product,
body[data-theme="dark"]
.compras-lote-cell__product,

html[data-theme="dark"]
.compras-insumo-cell strong,
body.dark
.compras-insumo-cell strong,
body[data-theme="dark"]
.compras-insumo-cell strong,

html[data-theme="dark"]
.compras-provider-cell strong,
body.dark
.compras-provider-cell strong,
body[data-theme="dark"]
.compras-provider-cell strong {
  color: #f7f7f7 !important;
}


html[data-theme="dark"]
.compras-page-header__description,
body.dark
.compras-page-header__description,
body[data-theme="dark"]
.compras-page-header__description,

html[data-theme="dark"]
.compras-page-header__eyebrow,
body.dark
.compras-page-header__eyebrow,
body[data-theme="dark"]
.compras-page-header__eyebrow,

html[data-theme="dark"]
.compras-metric-card__label,
body.dark
.compras-metric-card__label,
body[data-theme="dark"]
.compras-metric-card__label,

html[data-theme="dark"]
.compras-metric-card__hint,
body.dark
.compras-metric-card__hint,
body[data-theme="dark"]
.compras-metric-card__hint {
  color: #bdbdbd !important;
}


/* =========================================================
   16. DARK · ACCIONES
   ========================================================= */

html[data-theme="dark"]
.compras-actions-popover,
body.dark
.compras-actions-popover,
body[data-theme="dark"]
.compras-actions-popover {
  color: #f5f5f5 !important;

  background: #080808 !important;

  border-color: #353535 !important;

  box-shadow:
    0
    22px
    55px
    rgba(
      0,
      0,
      0,
      0.72
    ) !important;
}


html[data-theme="dark"]
.compras-actions-popover__header,
body.dark
.compras-actions-popover__header,
body[data-theme="dark"]
.compras-actions-popover__header {
  background: #0d0d0d;

  border-bottom-color: #2d2d2d;
}


html[data-theme="dark"]
.compras-actions-popover__header-icon,
body.dark
.compras-actions-popover__header-icon,
body[data-theme="dark"]
.compras-actions-popover__header-icon {
  color: #f2f2f2;

  background: #131313;

  border-color: #353535;
}


html[data-theme="dark"]
.compras-actions-popover__header-copy strong,
body.dark
.compras-actions-popover__header-copy strong,
body[data-theme="dark"]
.compras-actions-popover__header-copy strong {
  color: #ffffff !important;
}


html[data-theme="dark"]
.compras-actions-popover__header-copy span,
body.dark
.compras-actions-popover__header-copy span,
body[data-theme="dark"]
.compras-actions-popover__header-copy span {
  color: #b8b8b8 !important;
}


html[data-theme="dark"]
.compras-actions-popover__body,
body.dark
.compras-actions-popover__body,
body[data-theme="dark"]
.compras-actions-popover__body {
  background: #080808;
}


html[data-theme="dark"]
.compras-actions-popover
.compras-popover__item,
body.dark
.compras-actions-popover
.compras-popover__item,
body[data-theme="dark"]
.compras-actions-popover
.compras-popover__item {
  color: #f2f2f2 !important;

  background: transparent !important;
}


html[data-theme="dark"]
.compras-actions-popover
.compras-popover__item:hover,
body.dark
.compras-actions-popover
.compras-popover__item:hover,
body[data-theme="dark"]
.compras-actions-popover
.compras-popover__item:hover {
  color: #fff !important;

  background: #171717 !important;
}


html[data-theme="dark"]
.compras-popover__item-icon,
body.dark
.compras-popover__item-icon,
body[data-theme="dark"]
.compras-popover__item-icon {
  color: #e9e9e9;

  background: #101010;

  border-color: #303030;
}


html[data-theme="dark"]
.compras-popover__item-copy strong,
body.dark
.compras-popover__item-copy strong,
body[data-theme="dark"]
.compras-popover__item-copy strong {
  color: #ffffff !important;
}


html[data-theme="dark"]
.compras-popover__item-copy small,
body.dark
.compras-popover__item-copy small,
body[data-theme="dark"]
.compras-popover__item-copy small {
  color: #a9a9a9 !important;
}


html[data-theme="dark"]
.compras-popover__item-arrow,
body.dark
.compras-popover__item-arrow,
body[data-theme="dark"]
.compras-popover__item-arrow {
  color: #a2a2a2;
}


html[data-theme="dark"]
.compras-actions-popover__separator,
body.dark
.compras-actions-popover__separator,
body[data-theme="dark"]
.compras-actions-popover__separator {
  background: #292929;
}


/* =========================================================
   17. DARK · INPUTS / TOOLBAR
   ========================================================= */

html[data-theme="dark"]
.compras-search,
body.dark
.compras-search,
body[data-theme="dark"]
.compras-search,

html[data-theme="dark"]
.compras-toolbar-select select,
body.dark
.compras-toolbar-select select,
body[data-theme="dark"]
.compras-toolbar-select select,

html[data-theme="dark"]
.compras-field input,
html[data-theme="dark"]
.compras-field select,
html[data-theme="dark"]
.compras-field textarea,
body.dark
.compras-field input,
body.dark
.compras-field select,
body.dark
.compras-field textarea,
body[data-theme="dark"]
.compras-field input,
body[data-theme="dark"]
.compras-field select,
body[data-theme="dark"]
.compras-field textarea {
  color: #f3f3f3 !important;

  background: #090909 !important;

  border-color: #373737 !important;
}


html[data-theme="dark"]
.compras-search input,
body.dark
.compras-search input,
body[data-theme="dark"]
.compras-search input {
  color: #f7f7f7 !important;
}


html[data-theme="dark"]
.compras-toolbar-select > span,
body.dark
.compras-toolbar-select > span,
body[data-theme="dark"]
.compras-toolbar-select > span,

html[data-theme="dark"]
.compras-field > span,
body.dark
.compras-field > span,
body[data-theme="dark"]
.compras-field > span {
  color: #d1d1d1 !important;
}


/* =========================================================
   18. RESPONSIVE ACCIONES
   ========================================================= */

@media (max-width: 760px) {

  .compras-actions-popover {
    width:
      calc(
        100vw -
        20px
      ) !important;

    max-width:
      calc(
        100vw -
        20px
      ) !important;

    border-radius: 11px !important;
  }


  .compras-actions-popover
  .compras-popover__item {
    min-height: 54px;
  }


  .compras-popover__item-copy strong {
    font-size: 12px !important;
  }


  .compras-popover__item-copy small {
    font-size: 10px !important;
  }

}


/* =========================================================
   19. REDUCED MOTION
   ========================================================= */

@media (
  prefers-reduced-motion:
  reduce
) {

  .compras-actions-popover,
  .compras-actions-popover *,
  .compras-button,
  .compras-icon-button {
    transition: none !important;
  }

}