/* =========================================================
   WIRTZ HUB · MANUFACTURA · COMPOSICIÓN / BOM
   CSS

   UBICACIÓN:
   frontend/src/pages/manufactura/composicion/composicion.css

   PARTE 1 DE 2

   CONTIENE:
   - Página.
   - Header.
   - Botones.
   - Métricas.
   - Toolbar.
   - Buscador.
   - Filtros.
   - Columnas.
   - Selección.
   - Tabla principal.
   - Badges.
   - Paginación.
   - Modal base.
   ========================================================= */


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

.composicion-page {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  padding: 24px;
  box-sizing: border-box;

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

  color: var(--text-primary, #171717);
  background: var(--page-bg, #f7f7f8);
}


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


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

.composicion-page-header {
  width: 100%;
  margin-bottom: 20px;
}


.composicion-page-heading {
  width: 100%;
}


.composicion-page-eyebrow {
  margin-bottom: 6px;

  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;

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


.composicion-page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}


.composicion-page-title-row > div:first-child {
  min-width: 0;
  flex: 1;
}


.composicion-page-title-row h1 {
  margin: 0;

  font-size: clamp(28px, 3vw, 38px);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.035em;
}


.composicion-page-title-row p {
  max-width: 850px;
  margin: 10px 0 0;

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

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


html[data-theme="dark"] .composicion-page-title-row p,
body.dark .composicion-page-title-row p,
body[data-theme="dark"] .composicion-page-title-row p {
  color: #a3a3a3;
}


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

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

  flex-shrink: 0;
}


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

.composicion-button {
  min-height: 40px;
  padding: 0 14px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 1px solid transparent;
  border-radius: 10px;

  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;

  cursor: pointer;

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

  white-space: nowrap;
}


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


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


.composicion-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}


.composicion-button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}


.composicion-button--compact {
  min-height: 34px;
  padding: 0 10px;

  font-size: 11px;
}


.composicion-button--primary {
  color: #fff;
  background: #111;
  border-color: #111;
}


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


html[data-theme="dark"] .composicion-button--primary,
body.dark .composicion-button--primary,
body[data-theme="dark"] .composicion-button--primary {
  color: #000;
  background: #fff;
  border-color: #fff;
}


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


.composicion-button--secondary {
  color: var(--text-primary, #171717);
  background: var(--surface-raised, #fff);
  border-color: var(--border-color, #ddd);
}


.composicion-button--secondary:hover:not(:disabled) {
  background: var(--surface-hover, #f4f4f5);
}


.composicion-button--ghost,
.composicion-button--filter {
  color: var(--text-secondary, #555);
  background: transparent;
  border-color: var(--border-color, #ddd);
}


.composicion-button--ghost:hover:not(:disabled),
.composicion-button--filter:hover:not(:disabled) {
  color: var(--text-primary, #171717);
  background: var(--surface-hover, #f4f4f5);
}


html[data-theme="dark"] .composicion-button--secondary,
body.dark .composicion-button--secondary,
body[data-theme="dark"] .composicion-button--secondary {
  color: #f5f5f5;
  background: #111;
  border-color: #2a2a2a;
}


html[data-theme="dark"] .composicion-button--ghost,
html[data-theme="dark"] .composicion-button--filter,
body.dark .composicion-button--ghost,
body.dark .composicion-button--filter,
body[data-theme="dark"] .composicion-button--ghost,
body[data-theme="dark"] .composicion-button--filter {
  color: #b5b5b5;
  border-color: #282828;
}


html[data-theme="dark"] .composicion-button--secondary:hover:not(:disabled),
html[data-theme="dark"] .composicion-button--ghost:hover:not(:disabled),
html[data-theme="dark"] .composicion-button--filter:hover:not(:disabled),
body.dark .composicion-button--secondary:hover:not(:disabled),
body.dark .composicion-button--ghost:hover:not(:disabled),
body.dark .composicion-button--filter:hover:not(:disabled),
body[data-theme="dark"] .composicion-button--secondary:hover:not(:disabled),
body[data-theme="dark"] .composicion-button--ghost:hover:not(:disabled),
body[data-theme="dark"] .composicion-button--filter:hover:not(:disabled) {
  color: #fff;
  background: #161616;
}


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

.composicion-icon-button {
  width: 34px;
  height: 34px;
  padding: 0;

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

  border: 1px solid var(--border-color, #ddd);
  border-radius: 9px;

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

  cursor: pointer;

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


.composicion-icon-button:hover {
  color: var(--text-primary, #171717);
  background: var(--surface-hover, #f4f4f5);
}


.composicion-icon-button svg {
  width: 16px;
  height: 16px;
}


.composicion-icon-button--danger {
  color: #b42318;
}


.composicion-icon-button--danger:hover {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}


.composicion-icon-button--success {
  color: #15803d;
}


.composicion-icon-button--success:hover {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}


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


html[data-theme="dark"] .composicion-icon-button:hover,
body.dark .composicion-icon-button:hover,
body[data-theme="dark"] .composicion-icon-button:hover {
  color: #fff;
  background: #141414;
}


html[data-theme="dark"] .composicion-icon-button--danger,
body.dark .composicion-icon-button--danger,
body[data-theme="dark"] .composicion-icon-button--danger {
  color: #f87171;
}


html[data-theme="dark"] .composicion-icon-button--danger:hover,
body.dark .composicion-icon-button--danger:hover,
body[data-theme="dark"] .composicion-icon-button--danger:hover {
  background: #1f0b0b;
  border-color: #4b1414;
}


html[data-theme="dark"] .composicion-icon-button--success,
body.dark .composicion-icon-button--success,
body[data-theme="dark"] .composicion-icon-button--success {
  color: #4ade80;
}


/* =========================================================
   TEXT BUTTON
   ========================================================= */

.composicion-text-button {
  padding: 4px 0;

  border: 0;

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

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

  cursor: pointer;
}


.composicion-text-button:hover {
  color: var(--text-primary, #111);
}


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

.composicion-metrics {
  width: 100%;
  margin-bottom: 18px;

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


.composicion-metric {
  min-width: 0;
  min-height: 126px;
  padding: 15px;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;

  border: 1px solid var(--border-color, #e1e1e1);
  border-radius: 14px;

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


.composicion-metric-top {
  display: flex;
  align-items: center;
  gap: 9px;

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

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


.composicion-metric-icon {
  width: 30px;
  height: 30px;

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

  border-radius: 9px;

  color: #525252;
  background: #f5f5f5;
}


.composicion-metric-icon svg {
  width: 16px;
  height: 16px;
}


.composicion-metric > strong {
  overflow: hidden;

  font-size: 25px;
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.03em;

  text-overflow: ellipsis;
  white-space: nowrap;
}


.composicion-metric > small {
  font-size: 11px;
  line-height: 1.3;

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


.composicion-metric--success .composicion-metric-icon {
  color: #15803d;
  background: #f0fdf4;
}


.composicion-metric--warning .composicion-metric-icon {
  color: #b45309;
  background: #fffbeb;
}


.composicion-metric--danger .composicion-metric-icon {
  color: #b42318;
  background: #fef2f2;
}


html[data-theme="dark"] .composicion-metric,
body.dark .composicion-metric,
body[data-theme="dark"] .composicion-metric {
  background: #080808;
  border-color: #202020;
}


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


html[data-theme="dark"] .composicion-metric-icon,
body.dark .composicion-metric-icon,
body[data-theme="dark"] .composicion-metric-icon {
  color: #bdbdbd;
  background: #151515;
}


html[data-theme="dark"] .composicion-metric--success .composicion-metric-icon,
body.dark .composicion-metric--success .composicion-metric-icon,
body[data-theme="dark"] .composicion-metric--success .composicion-metric-icon {
  color: #4ade80;
  background: #07160d;
}


html[data-theme="dark"] .composicion-metric--warning .composicion-metric-icon,
body.dark .composicion-metric--warning .composicion-metric-icon,
body[data-theme="dark"] .composicion-metric--warning .composicion-metric-icon {
  color: #fbbf24;
  background: #1a1302;
}


html[data-theme="dark"] .composicion-metric--danger .composicion-metric-icon,
body.dark .composicion-metric--danger .composicion-metric-icon,
body[data-theme="dark"] .composicion-metric--danger .composicion-metric-icon {
  color: #f87171;
  background: #1c0808;
}


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

.composicion-workspace {
  width: 100%;
  min-width: 0;
}


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

.composicion-toolbar {
  width: 100%;
  margin-bottom: 10px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


.composicion-toolbar-left,
.composicion-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}


.composicion-toolbar-left {
  min-width: 0;
  flex: 1;
}


.composicion-toolbar-right {
  flex-shrink: 0;
}


.composicion-toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}


.composicion-result-count {
  font-size: 12px;
  font-weight: 650;

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


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

.composicion-search {
  width: min(420px, 100%);
  min-width: 220px;
  height: 42px;
  padding: 0 10px;

  display: flex;
  align-items: center;
  gap: 8px;

  border: 1px solid var(--border-color, #ddd);
  border-radius: 11px;

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


.composicion-search:focus-within {
  border-color: #a3a3a3;
}


.composicion-search > svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;

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


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

  border: 0;
  outline: 0;

  font: inherit;
  font-size: 13px;

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


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


.composicion-search-clear {
  width: 26px;
  height: 26px;
  padding: 0;

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

  border: 0;
  border-radius: 7px;

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

  cursor: pointer;
}


.composicion-search-clear:hover {
  color: var(--text-primary, #111);
  background: var(--surface-hover, #f2f2f2);
}


.composicion-search-clear svg {
  width: 14px;
  height: 14px;
}


html[data-theme="dark"] .composicion-search,
body.dark .composicion-search,
body[data-theme="dark"] .composicion-search {
  background: #080808;
  border-color: #282828;
}


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


/* =========================================================
   FILTER COUNT
   ========================================================= */

.composicion-filter-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;

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

  border-radius: 999px;

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

  color: #fff;
  background: #111;
}


html[data-theme="dark"] .composicion-filter-count,
body.dark .composicion-filter-count,
body[data-theme="dark"] .composicion-filter-count {
  color: #000;
  background: #fff;
}


/* =========================================================
   FILTER / COLUMNS PANELS
   ========================================================= */

.composicion-filter-panel,
.composicion-columns-panel {
  width: 100%;
  margin-bottom: 10px;
  padding: 16px;

  border: 1px solid var(--border-color, #ddd);
  border-radius: 14px;

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


.composicion-filter-panel[hidden],
.composicion-columns-panel[hidden] {
  display: none;
}


.composicion-filter-panel-head,
.composicion-columns-panel-head {
  margin-bottom: 16px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}


.composicion-filter-panel-head > div:first-child,
.composicion-columns-panel-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}


.composicion-filter-panel-head strong,
.composicion-columns-panel-head strong {
  font-size: 14px;
  font-weight: 750;
}


.composicion-filter-panel-head span,
.composicion-columns-panel-head span {
  font-size: 12px;

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


.composicion-filter-grid {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );
  gap: 12px;
}


.composicion-filter-grid label {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 6px;
}


.composicion-filter-grid label > span {
  font-size: 11px;
  font-weight: 700;

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


.composicion-filter-grid input,
.composicion-filter-grid select {
  width: 100%;
  height: 39px;
  padding: 0 10px;

  border: 1px solid var(--border-color, #ddd);
  border-radius: 9px;
  outline: 0;

  font: inherit;
  font-size: 12px;

  color: var(--text-primary, #171717);
  background: var(--surface-base, #fff);
}


.composicion-filter-grid input:focus,
.composicion-filter-grid select:focus {
  border-color: #999;
}


.composicion-filter-actions {
  margin-top: 16px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}


.composicion-columns-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}


.composicion-columns-grid {
  display: grid;
  grid-template-columns:
    repeat(
      5,
      minmax(0, 1fr)
    );
  gap: 8px;
}


.composicion-column-option {
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;

  display: flex;
  align-items: center;
  gap: 8px;

  border: 1px solid var(--border-color, #e2e2e2);
  border-radius: 9px;

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

  cursor: pointer;
}


.composicion-column-option:hover {
  background: var(--surface-hover, #f7f7f7);
}


.composicion-column-option > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}


.composicion-column-option-check {
  width: 18px;
  height: 18px;

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

  border: 1px solid #bbb;
  border-radius: 5px;

  color: transparent;
  background: transparent;
}


.composicion-column-option-check svg {
  width: 12px;
  height: 12px;
}


.composicion-column-option > input:checked + .composicion-column-option-check {
  color: #fff;
  background: #111;
  border-color: #111;
}


html[data-theme="dark"] .composicion-filter-panel,
html[data-theme="dark"] .composicion-columns-panel,
body.dark .composicion-filter-panel,
body.dark .composicion-columns-panel,
body[data-theme="dark"] .composicion-filter-panel,
body[data-theme="dark"] .composicion-columns-panel {
  background: #080808;
  border-color: #202020;
}


html[data-theme="dark"] .composicion-filter-grid input,
html[data-theme="dark"] .composicion-filter-grid select,
body.dark .composicion-filter-grid input,
body.dark .composicion-filter-grid select,
body[data-theme="dark"] .composicion-filter-grid input,
body[data-theme="dark"] .composicion-filter-grid select {
  color: #f5f5f5;
  background: #0d0d0d;
  border-color: #282828;
}


html[data-theme="dark"] .composicion-column-option,
body.dark .composicion-column-option,
body[data-theme="dark"] .composicion-column-option {
  border-color: #282828;
}


html[data-theme="dark"] .composicion-column-option:hover,
body.dark .composicion-column-option:hover,
body[data-theme="dark"] .composicion-column-option:hover {
  background: #111;
}


html[data-theme="dark"] .composicion-column-option > input:checked + .composicion-column-option-check,
body.dark .composicion-column-option > input:checked + .composicion-column-option-check,
body[data-theme="dark"] .composicion-column-option > input:checked + .composicion-column-option-check {
  color: #000;
  background: #fff;
  border-color: #fff;
}


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

.composicion-selection-toolbar {
  width: 100%;
  min-height: 46px;
  margin-bottom: 10px;
  padding: 7px 10px 7px 14px;

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

  border: 1px solid #d4d4d4;
  border-radius: 11px;

  background: #fafafa;
}


.composicion-selection-toolbar[hidden] {
  display: none;
}


.composicion-selection-toolbar strong {
  font-size: 12px;
}


html[data-theme="dark"] .composicion-selection-toolbar,
body.dark .composicion-selection-toolbar,
body[data-theme="dark"] .composicion-selection-toolbar {
  background: #0c0c0c;
  border-color: #282828;
}


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

.composicion-table-card {
  width: 100%;
  min-width: 0;

  overflow: hidden;

  border: 1px solid var(--border-color, #ddd);
  border-radius: 14px;

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


html[data-theme="dark"] .composicion-table-card,
body.dark .composicion-table-card,
body[data-theme="dark"] .composicion-table-card {
  background: #050505;
  border-color: #202020;
}


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

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

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

  scrollbar-width: thin;
}


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

.composicion-table {
  width: 100%;
  min-width: 100%;

  border-collapse: collapse;
  border-spacing: 0;
  table-layout: auto;
}


.composicion-table thead {
  background: #fafafa;
}


.composicion-table th {
  height: 44px;
  padding: 0 12px;

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

  font-size: 11px;
  font-weight: 750;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;

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


.composicion-table td {
  min-height: 52px;
  padding: 11px 12px;

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

  font-size: 12px;
  line-height: 1.35;
  vertical-align: middle;

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


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


.composicion-table tbody tr {
  transition:
    background-color 0.12s ease;
}


.composicion-table tbody tr:hover {
  background: #fafafa;
}


.composicion-table tbody tr.is-selected {
  background: #f4f4f5;
}


html[data-theme="dark"] .composicion-table thead,
body.dark .composicion-table thead,
body[data-theme="dark"] .composicion-table thead {
  background: #0c0c0c;
}


html[data-theme="dark"] .composicion-table th,
body.dark .composicion-table th,
body[data-theme="dark"] .composicion-table th {
  color: #a3a3a3;
  border-color: #202020;
}


html[data-theme="dark"] .composicion-table td,
body.dark .composicion-table td,
body[data-theme="dark"] .composicion-table td {
  color: #ededed;
  border-color: #171717;
}


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


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


/* =========================================================
   CHECK
   ========================================================= */

.composicion-table-check {
  width: 42px;
  min-width: 42px;
  max-width: 42px;

  padding-left: 12px !important;
  padding-right: 4px !important;
}


.composicion-checkbox {
  width: 18px;
  height: 18px;

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

  cursor: pointer;
}


.composicion-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}


.composicion-checkbox span {
  width: 16px;
  height: 16px;

  display: block;

  border: 1px solid #bcbcbc;
  border-radius: 5px;

  background: transparent;
}


.composicion-checkbox input:checked + span {
  background:
    #111
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E")
    center /
    12px
    no-repeat;

  border-color: #111;
}


.composicion-checkbox input:indeterminate + span {
  background:
    #111
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M5 12h14'/%3E%3C/svg%3E")
    center /
    12px
    no-repeat;

  border-color: #111;
}


/* =========================================================
   SORT
   ========================================================= */

.composicion-sort-button {
  width: 100%;
  height: 100%;
  padding: 0;

  display: inline-flex;
  align-items: center;
  gap: 5px;

  border: 0;

  font: inherit;
  font-weight: inherit;

  color: inherit;
  background: transparent;

  cursor: pointer;
}


.composicion-sort-button svg {
  width: 13px;
  height: 13px;

  opacity: 0.5;
}


.composicion-sort-button.is-active {
  color: var(--text-primary, #171717);
}


.composicion-sort-button.is-active svg {
  opacity: 1;
}


/* =========================================================
   CELLS
   ========================================================= */

.composicion-code-button {
  padding: 0;

  border: 0;

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

  color: #2563eb;
  background: transparent;

  cursor: pointer;
}


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


.composicion-name-cell {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 3px;
}


.composicion-name-cell strong {
  overflow: hidden;

  text-overflow: ellipsis;
  white-space: nowrap;
}


.composicion-name-cell span {
  max-width: 340px;

  overflow: hidden;

  font-size: 10px;

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

  text-overflow: ellipsis;
  white-space: nowrap;
}


.composicion-version-code,
.composicion-cost-cell,
.composicion-insumo-code {
  font-weight: 750;
  white-space: nowrap;
}


.composicion-empty-value {
  font-size: 11px;

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


.composicion-warning-value {
  font-weight: 700;

  color: #b45309;
}


.composicion-ok-value {
  font-weight: 700;

  color: #15803d;
}


html[data-theme="dark"] .composicion-warning-value,
body.dark .composicion-warning-value,
body[data-theme="dark"] .composicion-warning-value {
  color: #fbbf24;
}


html[data-theme="dark"] .composicion-ok-value,
body.dark .composicion-ok-value,
body[data-theme="dark"] .composicion-ok-value {
  color: #4ade80;
}


.composicion-count-pill,
.composicion-order-pill {
  min-width: 28px;
  height: 24px;
  padding: 0 7px;

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

  border: 1px solid var(--border-color, #ddd);
  border-radius: 999px;

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

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


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

.composicion-badge {
  min-height: 24px;
  padding: 3px 8px;

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

  border: 1px solid transparent;
  border-radius: 999px;

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

  white-space: nowrap;
}


.composicion-badge--success {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}


.composicion-badge--warning {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}


.composicion-badge--danger {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}


.composicion-badge--info {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}


.composicion-badge--muted {
  color: #525252;
  background: #f5f5f5;
  border-color: #e5e5e5;
}


html[data-theme="dark"] .composicion-badge--success,
body.dark .composicion-badge--success,
body[data-theme="dark"] .composicion-badge--success {
  color: #86efac;
  background: #07150c;
  border-color: #154224;
}


html[data-theme="dark"] .composicion-badge--warning,
body.dark .composicion-badge--warning,
body[data-theme="dark"] .composicion-badge--warning {
  color: #fcd34d;
  background: #191302;
  border-color: #4e3b05;
}


html[data-theme="dark"] .composicion-badge--danger,
body.dark .composicion-badge--danger,
body[data-theme="dark"] .composicion-badge--danger {
  color: #fca5a5;
  background: #1b0808;
  border-color: #511616;
}


html[data-theme="dark"] .composicion-badge--info,
body.dark .composicion-badge--info,
body[data-theme="dark"] .composicion-badge--info {
  color: #93c5fd;
  background: #07101e;
  border-color: #16345f;
}


html[data-theme="dark"] .composicion-badge--muted,
body.dark .composicion-badge--muted,
body[data-theme="dark"] .composicion-badge--muted {
  color: #a3a3a3;
  background: #111;
  border-color: #282828;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.composicion-table-actions-head {
  min-width: 190px;
  text-align: right !important;
}


.composicion-table-actions {
  min-width: 190px;
}


.composicion-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}


/* =========================================================
   EMPTY / LOADING
   ========================================================= */

.composicion-empty-cell,
.composicion-loading-cell {
  padding: 48px 20px !important;
}


.composicion-empty,
.composicion-loading {
  min-height: 180px;

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

  text-align: center;
}


.composicion-empty {
  gap: 8px;
}


.composicion-empty--compact {
  min-height: 250px;
}


.composicion-empty-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 4px;

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

  border-radius: 13px;

  color: var(--text-muted, #777);
  background: #f4f4f5;
}


.composicion-empty-icon svg {
  width: 21px;
  height: 21px;
}


.composicion-empty strong {
  font-size: 14px;
}


.composicion-empty p {
  max-width: 430px;
  margin: 0 0 8px;

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

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


.composicion-loading {
  flex-direction: row;
  gap: 9px;

  min-height: 110px;

  font-size: 12px;

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


.composicion-loading svg {
  width: 18px;
  height: 18px;
}


html[data-theme="dark"] .composicion-empty-icon,
body.dark .composicion-empty-icon,
body[data-theme="dark"] .composicion-empty-icon {
  background: #141414;
}


/* =========================================================
   SPINNER
   ========================================================= */

.is-spinning {
  animation:
    composicion-spin
    0.8s
    linear
    infinite;
}


@keyframes composicion-spin {
  to {
    transform: rotate(360deg);
  }
}


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

.composicion-pagination {
  min-height: 58px;
  padding: 10px 12px;

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

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


.composicion-pagination-summary {
  font-size: 11px;

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


.composicion-pagination-summary strong {
  color: var(--text-primary, #171717);
}


.composicion-pagination-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}


.composicion-page-size {
  height: 34px;
  margin-right: 6px;

  display: flex;
  align-items: center;
  gap: 6px;

  font-size: 11px;

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


.composicion-page-size select {
  height: 32px;
  padding: 0 25px 0 8px;

  border: 1px solid var(--border-color, #ddd);
  border-radius: 8px;

  font: inherit;
  font-size: 11px;

  color: var(--text-primary, #171717);
  background: var(--surface-raised, #fff);
}


.composicion-pagination-button {
  width: 32px;
  height: 32px;
  padding: 0;

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

  border: 1px solid var(--border-color, #ddd);
  border-radius: 8px;

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

  cursor: pointer;
}


.composicion-pagination-button:hover:not(:disabled) {
  color: var(--text-primary, #111);
  background: var(--surface-hover, #f4f4f5);
}


.composicion-pagination-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}


.composicion-pagination-button svg {
  width: 14px;
  height: 14px;
}


.composicion-pagination-current {
  min-width: 74px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;

  font-size: 11px;

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


.composicion-pagination-current strong {
  color: var(--text-primary, #111);
}


html[data-theme="dark"] .composicion-pagination,
body.dark .composicion-pagination,
body[data-theme="dark"] .composicion-pagination {
  border-color: #202020;
}


html[data-theme="dark"] .composicion-page-size select,
body.dark .composicion-page-size select,
body[data-theme="dark"] .composicion-page-size select {
  color: #f5f5f5;
  background: #0c0c0c;
  border-color: #282828;
}


html[data-theme="dark"] .composicion-pagination-button,
body.dark .composicion-pagination-button,
body[data-theme="dark"] .composicion-pagination-button {
  color: #a3a3a3;
  border-color: #282828;
}


html[data-theme="dark"] .composicion-pagination-button:hover:not(:disabled),
body.dark .composicion-pagination-button:hover:not(:disabled),
body[data-theme="dark"] .composicion-pagination-button:hover:not(:disabled) {
  color: #fff;
  background: #111;
}


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

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


.composicion-modal-root {
  position: fixed;
  inset: 0;
  z-index: 9999;

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

  pointer-events: none;
}


.composicion-modal-root:empty {
  display: none;
}


.composicion-modal-backdrop {
  position: absolute;
  inset: 0;

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

  pointer-events: auto;
}


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

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

  width: min(94vw, 900px);
  max-height: min(92vh, 960px);

  display: flex;
  flex-direction: column;

  overflow: hidden;

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

  color: var(--text-primary, #171717);
  background: var(--surface-raised, #fff);

  pointer-events: auto;
}


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


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


.composicion-modal--lg {
  width: min(94vw, 900px);
}


.composicion-modal--xl {
  width: min(96vw, 1220px);
}


html[data-theme="dark"] .composicion-modal,
body.dark .composicion-modal,
body[data-theme="dark"] .composicion-modal {
  color: #f5f5f5;
  background: #070707;
  border-color: #242424;
}


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

.composicion-modal-header {
  min-height: 72px;
  padding: 16px 18px;

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

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

  background: inherit;
}


.composicion-modal-heading {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 4px;
}


.composicion-modal-eyebrow {
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;

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


.composicion-modal-heading h2 {
  margin: 0;

  overflow: hidden;

  font-size: 19px;
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: -0.025em;

  text-overflow: ellipsis;
  white-space: nowrap;
}


.composicion-modal-body {
  min-height: 0;
  padding: 18px;

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

  overscroll-behavior: contain;
  scrollbar-width: thin;
}


.composicion-modal-footer {
  min-height: 64px;
  padding: 11px 18px;

  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;

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

  background: inherit;
}


.composicion-modal-footer-spacer {
  flex: 1;
}


.composicion-modal-loading {
  min-height: 280px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  font-size: 13px;

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


.composicion-modal-loading svg {
  width: 20px;
  height: 20px;
}


html[data-theme="dark"] .composicion-modal-header,
html[data-theme="dark"] .composicion-modal-footer,
body.dark .composicion-modal-header,
body.dark .composicion-modal-footer,
body[data-theme="dark"] .composicion-modal-header,
body[data-theme="dark"] .composicion-modal-footer {
  border-color: #1d1d1d;
}
/* =========================================================
   WIRTZ HUB · MANUFACTURA · COMPOSICIÓN / BOM
   CSS

   PARTE 2 DE 2

   CONTIENE:
   - Formularios.
   - Switches.
   - Detalle BOM.
   - Versiones.
   - Componentes.
   - Preview de costos.
   - Historial.
   - Scrollbars.
   - Responsive.
   ========================================================= */


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

.composicion-form {
  width: 100%;

  display: flex;
  flex-direction: column;
  gap: 14px;
}


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

.composicion-form-banner {
  width: 100%;
  min-height: 64px;
  padding: 11px 13px;

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

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

  background: #fafafa;
}


.composicion-form-banner > div:first-child {
  min-width: 0;

  display: flex;
  align-items: center;
  gap: 10px;
}


.composicion-form-banner > div:first-child > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;

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


.composicion-form-banner > div:first-child > div {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 2px;
}


.composicion-form-banner span {
  font-size: 10px;

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


.composicion-form-banner strong {
  overflow: hidden;

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

  text-overflow: ellipsis;
  white-space: nowrap;
}


html[data-theme="dark"] .composicion-form-banner,
body.dark .composicion-form-banner,
body[data-theme="dark"] .composicion-form-banner {
  background: #0d0d0d;
  border-color: #282828;
}


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

.composicion-form-info {
  width: 100%;
  padding: 10px 12px;

  display: flex;
  align-items: flex-start;
  gap: 9px;

  border: 1px solid #dbeafe;
  border-radius: 10px;

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

  color: #1e40af;
  background: #eff6ff;
}


.composicion-form-info > svg {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex-shrink: 0;
}


html[data-theme="dark"] .composicion-form-info,
body.dark .composicion-form-info,
body[data-theme="dark"] .composicion-form-info {
  color: #93c5fd;
  background: #07101e;
  border-color: #15345f;
}


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

.composicion-form-section {
  width: 100%;
  padding: 16px;

  display: flex;
  flex-direction: column;
  gap: 14px;

  border: 1px solid var(--border-color, #e1e1e1);
  border-radius: 13px;

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


.composicion-form-section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}


.composicion-form-section-title > svg {
  width: 18px;
  height: 18px;
  margin-top: 1px;

  flex-shrink: 0;

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


.composicion-form-section-title > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}


.composicion-form-section-title strong {
  font-size: 13px;
  font-weight: 760;
}


.composicion-form-section-title span {
  font-size: 11px;
  line-height: 1.4;

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


html[data-theme="dark"] .composicion-form-section,
body.dark .composicion-form-section,
body[data-theme="dark"] .composicion-form-section {
  background: #080808;
  border-color: #202020;
}


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

.composicion-form-grid {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );
  gap: 12px;
}


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

.composicion-form-field {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 6px;
}


.composicion-form-field--wide {
  grid-column: 1 / -1;
}


.composicion-form-label {
  display: flex;
  align-items: center;
  gap: 4px;

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

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


.composicion-form-label b {
  color: #b42318;
}


.composicion-form-field input,
.composicion-form-field select,
.composicion-form-field textarea {
  width: 100%;
  box-sizing: border-box;

  border: 1px solid var(--border-color, #dcdcdc);
  border-radius: 9px;
  outline: 0;

  font: inherit;
  font-size: 12px;

  color: var(--text-primary, #171717);
  background: var(--surface-raised, #fff);

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


.composicion-form-field input,
.composicion-form-field select {
  height: 40px;
  padding: 0 10px;
}


.composicion-form-field textarea {
  min-height: 90px;
  padding: 10px;

  resize: vertical;

  line-height: 1.45;
}


.composicion-form-field input:focus,
.composicion-form-field select:focus,
.composicion-form-field textarea:focus {
  border-color: #8f8f8f;
}


.composicion-form-field input::placeholder,
.composicion-form-field textarea::placeholder {
  color: var(--text-muted, #aaa);
}


.composicion-form-field input[readonly] {
  color: var(--text-muted, #777);
  background: #f7f7f7;

  cursor: default;
}


.composicion-form-field > small {
  font-size: 10px;
  line-height: 1.35;

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


html[data-theme="dark"] .composicion-form-field input,
html[data-theme="dark"] .composicion-form-field select,
html[data-theme="dark"] .composicion-form-field textarea,
body.dark .composicion-form-field input,
body.dark .composicion-form-field select,
body.dark .composicion-form-field textarea,
body[data-theme="dark"] .composicion-form-field input,
body[data-theme="dark"] .composicion-form-field select,
body[data-theme="dark"] .composicion-form-field textarea {
  color: #f5f5f5;
  background: #0d0d0d;
  border-color: #2a2a2a;
}


html[data-theme="dark"] .composicion-form-field input[readonly],
body.dark .composicion-form-field input[readonly],
body[data-theme="dark"] .composicion-form-field input[readonly] {
  color: #8c8c8c;
  background: #111;
}


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

.composicion-switch-grid {
  display: grid;
  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );
  gap: 9px;
}


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

.composicion-switch-field {
  min-height: 58px;
  padding: 10px 11px;

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

  border: 1px solid var(--border-color, #e1e1e1);
  border-radius: 10px;

  cursor: pointer;
}


.composicion-switch-copy {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 2px;
}


.composicion-switch-copy strong {
  font-size: 11px;
  font-weight: 720;
}


.composicion-switch-copy small {
  font-size: 10px;
  line-height: 1.35;

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


.composicion-switch {
  position: relative;

  width: 38px;
  height: 22px;
  flex: 0 0 38px;
}


.composicion-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}


.composicion-switch > span {
  position: absolute;
  inset: 0;

  border-radius: 999px;

  background: #d4d4d4;

  transition:
    background-color 0.16s ease;
}


.composicion-switch > span::before {
  content: "";

  position: absolute;
  top: 3px;
  left: 3px;

  width: 16px;
  height: 16px;

  border-radius: 50%;

  background: #fff;

  transition:
    transform 0.16s ease;
}


.composicion-switch input:checked + span {
  background: #111;
}


.composicion-switch input:checked + span::before {
  transform: translateX(16px);
}


html[data-theme="dark"] .composicion-switch-field,
body.dark .composicion-switch-field,
body[data-theme="dark"] .composicion-switch-field {
  border-color: #282828;
}


html[data-theme="dark"] .composicion-switch > span,
body.dark .composicion-switch > span,
body[data-theme="dark"] .composicion-switch > span {
  background: #353535;
}


html[data-theme="dark"] .composicion-switch input:checked + span,
body.dark .composicion-switch input:checked + span,
body[data-theme="dark"] .composicion-switch input:checked + span {
  background: #fff;
}


html[data-theme="dark"] .composicion-switch input:checked + span::before,
body.dark .composicion-switch input:checked + span::before,
body[data-theme="dark"] .composicion-switch input:checked + span::before {
  background: #000;
}


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

.composicion-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}


/* =========================================================
   DETAIL HERO
   ========================================================= */

.composicion-detail-hero {
  padding: 16px;

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

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

  background: #fafafa;
}


.composicion-detail-hero-main {
  min-width: 0;

  display: flex;
  align-items: flex-start;
  gap: 13px;
}


.composicion-detail-icon {
  width: 44px;
  height: 44px;

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

  border: 1px solid var(--border-color, #ddd);
  border-radius: 12px;

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


.composicion-detail-icon svg {
  width: 20px;
  height: 20px;
}


.composicion-detail-hero-main > div:last-child {
  min-width: 0;
}


.composicion-detail-code {
  display: block;
  margin-bottom: 3px;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;

  color: #2563eb;
}


.composicion-detail-hero h3 {
  margin: 0;

  font-size: 20px;
  font-weight: 760;
  letter-spacing: -0.02em;
}


.composicion-detail-hero p {
  max-width: 700px;
  margin: 6px 0 0;

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

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


.composicion-detail-statuses {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}


html[data-theme="dark"] .composicion-detail-hero,
body.dark .composicion-detail-hero,
body[data-theme="dark"] .composicion-detail-hero {
  background: #0c0c0c;
  border-color: #252525;
}


html[data-theme="dark"] .composicion-detail-icon,
body.dark .composicion-detail-icon,
body[data-theme="dark"] .composicion-detail-icon {
  background: #111;
  border-color: #2a2a2a;
}


/* =========================================================
   DETAIL HIGHLIGHT
   ========================================================= */

.composicion-detail-highlight-grid,
.composicion-version-summary,
.composicion-component-preview-grid {
  display: grid;
  grid-template-columns:
    repeat(
      4,
      minmax(0, 1fr)
    );
  gap: 9px;
}


.composicion-detail-highlight-grid article,
.composicion-version-summary article,
.composicion-component-preview-grid article {
  min-width: 0;
  min-height: 96px;
  padding: 13px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;

  border: 1px solid var(--border-color, #e1e1e1);
  border-radius: 11px;

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


.composicion-detail-highlight-grid article > span,
.composicion-version-summary article > span,
.composicion-component-preview-grid article > span {
  font-size: 10px;
  font-weight: 700;

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


.composicion-detail-highlight-grid article > strong,
.composicion-version-summary article > strong,
.composicion-component-preview-grid article > strong {
  overflow: hidden;

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

  text-overflow: ellipsis;
  white-space: nowrap;
}


.composicion-detail-highlight-grid article > small,
.composicion-version-summary article > small,
.composicion-component-preview-grid article > small {
  overflow: hidden;

  font-size: 10px;
  line-height: 1.35;

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

  text-overflow: ellipsis;
  white-space: nowrap;
}


.composicion-component-preview-grid article.is-warning {
  border-color: #fde68a;
  background: #fffbeb;
}


html[data-theme="dark"] .composicion-detail-highlight-grid article,
html[data-theme="dark"] .composicion-version-summary article,
html[data-theme="dark"] .composicion-component-preview-grid article,
body.dark .composicion-detail-highlight-grid article,
body.dark .composicion-version-summary article,
body.dark .composicion-component-preview-grid article,
body[data-theme="dark"] .composicion-detail-highlight-grid article,
body[data-theme="dark"] .composicion-version-summary article,
body[data-theme="dark"] .composicion-component-preview-grid article {
  background: #080808;
  border-color: #202020;
}


html[data-theme="dark"] .composicion-component-preview-grid article.is-warning,
body.dark .composicion-component-preview-grid article.is-warning,
body[data-theme="dark"] .composicion-component-preview-grid article.is-warning {
  background: #191302;
  border-color: #4e3b05;
}


/* =========================================================
   DETAIL SECTION
   ========================================================= */

.composicion-detail-section {
  padding: 15px;

  border: 1px solid var(--border-color, #e1e1e1);
  border-radius: 12px;

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


.composicion-detail-section-head {
  margin-bottom: 13px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}


.composicion-detail-section-head > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}


.composicion-detail-section-head strong {
  font-size: 12px;
  font-weight: 760;
}


.composicion-detail-section-head span {
  font-size: 10px;
  line-height: 1.4;

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


html[data-theme="dark"] .composicion-detail-section,
body.dark .composicion-detail-section,
body[data-theme="dark"] .composicion-detail-section {
  background: #080808;
  border-color: #202020;
}


/* =========================================================
   DETAIL GRID
   ========================================================= */

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


.composicion-detail-item {
  min-width: 0;
  padding: 9px 10px;

  display: flex;
  flex-direction: column;
  gap: 3px;

  border-radius: 8px;

  background: #f8f8f8;
}


.composicion-detail-item > span {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;

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


.composicion-detail-item > strong {
  overflow-wrap: anywhere;

  font-size: 11px;
  font-weight: 680;
  line-height: 1.4;
}


html[data-theme="dark"] .composicion-detail-item,
body.dark .composicion-detail-item,
body[data-theme="dark"] .composicion-detail-item {
  background: #111;
}


/* =========================================================
   NOTE
   ========================================================= */

.composicion-note {
  margin-top: 10px;
  padding: 12px;

  border-radius: 9px;

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

  color: var(--text-secondary, #555);
  background: #f7f7f7;
}


html[data-theme="dark"] .composicion-note,
body.dark .composicion-note,
body[data-theme="dark"] .composicion-note {
  color: #b5b5b5;
  background: #111;
}


/* =========================================================
   INLINE EMPTY
   ========================================================= */

.composicion-inline-empty {
  min-height: 70px;
  padding: 12px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 1px dashed var(--border-color, #ddd);
  border-radius: 10px;

  font-size: 11px;

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


.composicion-inline-empty svg {
  width: 17px;
  height: 17px;
}


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

.composicion-modal-toolbar {
  padding-bottom: 12px;

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

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


.composicion-modal-toolbar > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}


.composicion-modal-toolbar strong {
  font-size: 12px;
}


.composicion-modal-toolbar span {
  font-size: 10px;
  line-height: 1.4;

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


html[data-theme="dark"] .composicion-modal-toolbar,
body.dark .composicion-modal-toolbar,
body[data-theme="dark"] .composicion-modal-toolbar {
  border-color: #202020;
}


/* =========================================================
   VERSION LIST
   ========================================================= */

.composicion-version-list,
.composicion-components {
  display: flex;
  flex-direction: column;
  gap: 14px;
}


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

.composicion-version-table-wrap,
.composicion-components-table-wrap,
.composicion-history-table-wrap {
  width: 100%;
  overflow-x: auto;

  border: 1px solid var(--border-color, #e1e1e1);
  border-radius: 11px;

  scrollbar-width: thin;
}


.composicion-version-table,
.composicion-components-table,
.composicion-history-table {
  width: 100%;
  min-width: 980px;

  border-collapse: collapse;
}


.composicion-components-table {
  min-width: 1180px;
}


.composicion-history-table {
  min-width: 1100px;
}


.composicion-version-table thead,
.composicion-components-table thead,
.composicion-history-table thead {
  background: #fafafa;
}


.composicion-version-table th,
.composicion-components-table th,
.composicion-history-table th {
  height: 40px;
  padding: 0 10px;

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

  font-size: 10px;
  font-weight: 760;
  text-align: left;
  white-space: nowrap;

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


.composicion-version-table td,
.composicion-components-table td,
.composicion-history-table td {
  padding: 10px;

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

  font-size: 11px;
  vertical-align: middle;
}


.composicion-version-table tbody tr:last-child td,
.composicion-components-table tbody tr:last-child td,
.composicion-history-table tbody tr:last-child td {
  border-bottom: 0;
}


.composicion-version-table tbody tr:hover,
.composicion-components-table tbody tr:hover,
.composicion-history-table tbody tr:hover {
  background: #fafafa;
}


html[data-theme="dark"] .composicion-version-table-wrap,
html[data-theme="dark"] .composicion-components-table-wrap,
html[data-theme="dark"] .composicion-history-table-wrap,
body.dark .composicion-version-table-wrap,
body.dark .composicion-components-table-wrap,
body.dark .composicion-history-table-wrap,
body[data-theme="dark"] .composicion-version-table-wrap,
body[data-theme="dark"] .composicion-components-table-wrap,
body[data-theme="dark"] .composicion-history-table-wrap {
  border-color: #222;
}


html[data-theme="dark"] .composicion-version-table thead,
html[data-theme="dark"] .composicion-components-table thead,
html[data-theme="dark"] .composicion-history-table thead,
body.dark .composicion-version-table thead,
body.dark .composicion-components-table thead,
body.dark .composicion-history-table thead,
body[data-theme="dark"] .composicion-version-table thead,
body[data-theme="dark"] .composicion-components-table thead,
body[data-theme="dark"] .composicion-history-table thead {
  background: #0c0c0c;
}


html[data-theme="dark"] .composicion-version-table th,
html[data-theme="dark"] .composicion-components-table th,
html[data-theme="dark"] .composicion-history-table th,
body.dark .composicion-version-table th,
body.dark .composicion-components-table th,
body.dark .composicion-history-table th,
body[data-theme="dark"] .composicion-version-table th,
body[data-theme="dark"] .composicion-components-table th,
body[data-theme="dark"] .composicion-history-table th {
  color: #a3a3a3;
  border-color: #202020;
}


html[data-theme="dark"] .composicion-version-table td,
html[data-theme="dark"] .composicion-components-table td,
html[data-theme="dark"] .composicion-history-table td,
body.dark .composicion-version-table td,
body.dark .composicion-components-table td,
body.dark .composicion-history-table td,
body[data-theme="dark"] .composicion-version-table td,
body[data-theme="dark"] .composicion-components-table td,
body[data-theme="dark"] .composicion-history-table td {
  border-color: #171717;
}


html[data-theme="dark"] .composicion-version-table tbody tr:hover,
html[data-theme="dark"] .composicion-components-table tbody tr:hover,
html[data-theme="dark"] .composicion-history-table tbody tr:hover,
body.dark .composicion-version-table tbody tr:hover,
body.dark .composicion-components-table tbody tr:hover,
body.dark .composicion-history-table tbody tr:hover,
body[data-theme="dark"] .composicion-version-table tbody tr:hover,
body[data-theme="dark"] .composicion-components-table tbody tr:hover,
body[data-theme="dark"] .composicion-history-table tbody tr:hover {
  background: #0d0d0d;
}


/* =========================================================
   VERSION IDENTITY
   ========================================================= */

.composicion-version-identity,
.composicion-version-dates,
.composicion-item-name,
.composicion-history-product {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 3px;
}


.composicion-version-identity strong,
.composicion-item-name strong,
.composicion-history-product strong {
  overflow: hidden;

  font-weight: 730;

  text-overflow: ellipsis;
  white-space: nowrap;
}


.composicion-version-identity small,
.composicion-version-dates small,
.composicion-item-name small,
.composicion-history-product small {
  font-size: 9px;

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


/* =========================================================
   COMPONENT COST PREVIEW
   ========================================================= */

.composicion-component-cost-preview {
  width: 100%;
}


.composicion-component-cost-preview:empty {
  display: none;
}


/* =========================================================
   FOCUS
   ========================================================= */

.composicion-button:focus-visible,
.composicion-icon-button:focus-visible,
.composicion-text-button:focus-visible,
.composicion-sort-button:focus-visible,
.composicion-pagination-button:focus-visible,
.composicion-code-button:focus-visible,
.composicion-search input:focus-visible,
.composicion-filter-grid input:focus-visible,
.composicion-filter-grid select:focus-visible,
.composicion-form-field input:focus-visible,
.composicion-form-field select:focus-visible,
.composicion-form-field textarea:focus-visible,
.composicion-column-option:focus-within,
.composicion-switch-field:focus-within {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}


/* =========================================================
   SCROLLBARS
   ========================================================= */

.composicion-table-scroll::-webkit-scrollbar,
.composicion-modal-body::-webkit-scrollbar,
.composicion-version-table-wrap::-webkit-scrollbar,
.composicion-components-table-wrap::-webkit-scrollbar,
.composicion-history-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}


.composicion-table-scroll::-webkit-scrollbar-thumb,
.composicion-modal-body::-webkit-scrollbar-thumb,
.composicion-version-table-wrap::-webkit-scrollbar-thumb,
.composicion-components-table-wrap::-webkit-scrollbar-thumb,
.composicion-history-table-wrap::-webkit-scrollbar-thumb {
  border-radius: 999px;

  background: #c7c7c7;
}


html[data-theme="dark"] .composicion-table-scroll::-webkit-scrollbar-thumb,
html[data-theme="dark"] .composicion-modal-body::-webkit-scrollbar-thumb,
html[data-theme="dark"] .composicion-version-table-wrap::-webkit-scrollbar-thumb,
html[data-theme="dark"] .composicion-components-table-wrap::-webkit-scrollbar-thumb,
html[data-theme="dark"] .composicion-history-table-wrap::-webkit-scrollbar-thumb,
body.dark .composicion-table-scroll::-webkit-scrollbar-thumb,
body.dark .composicion-modal-body::-webkit-scrollbar-thumb,
body.dark .composicion-version-table-wrap::-webkit-scrollbar-thumb,
body.dark .composicion-components-table-wrap::-webkit-scrollbar-thumb,
body.dark .composicion-history-table-wrap::-webkit-scrollbar-thumb,
body[data-theme="dark"] .composicion-table-scroll::-webkit-scrollbar-thumb,
body[data-theme="dark"] .composicion-modal-body::-webkit-scrollbar-thumb,
body[data-theme="dark"] .composicion-version-table-wrap::-webkit-scrollbar-thumb,
body[data-theme="dark"] .composicion-components-table-wrap::-webkit-scrollbar-thumb,
body[data-theme="dark"] .composicion-history-table-wrap::-webkit-scrollbar-thumb {
  background: #333;
}


/* =========================================================
   DARK SELECT
   ========================================================= */

html[data-theme="dark"] .composicion-page select,
html[data-theme="dark"] .composicion-modal select,
body.dark .composicion-page select,
body.dark .composicion-modal select,
body[data-theme="dark"] .composicion-page select,
body[data-theme="dark"] .composicion-modal select {
  color-scheme: dark;
}


/* =========================================================
   NUMBER INPUT
   ========================================================= */

.composicion-form input[type="number"] {
  font-variant-numeric: tabular-nums;
}


/* =========================================================
   RESPONSIVE · 1500
   ========================================================= */

@media (max-width: 1500px) {

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


  .composicion-columns-grid {
    grid-template-columns:
      repeat(
        4,
        minmax(0, 1fr)
      );
  }

}


/* =========================================================
   RESPONSIVE · 1250
   ========================================================= */

@media (max-width: 1250px) {

  .composicion-page {
    padding: 20px;
  }


  .composicion-page-title-row {
    flex-direction: column;
  }


  .composicion-header-actions {
    width: 100%;
    justify-content: flex-start;
  }


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


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


  .composicion-detail-highlight-grid,
  .composicion-version-summary,
  .composicion-component-preview-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }


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

}


/* =========================================================
   RESPONSIVE · 980
   ========================================================= */

@media (max-width: 980px) {

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


  .composicion-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }


  .composicion-toolbar-left {
    width: 100%;
    flex-wrap: wrap;
  }


  .composicion-toolbar-right {
    width: 100%;
  }


  .composicion-search {
    width: 100%;
    flex: 1 1 100%;
  }


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


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


  .composicion-form-grid,
  .composicion-switch-grid {
    grid-template-columns:
      1fr;
  }

}


/* =========================================================
   RESPONSIVE · 760
   ========================================================= */

@media (max-width: 760px) {

  .composicion-page {
    padding: 14px;
  }


  .composicion-page-title-row {
    gap: 16px;
  }


  .composicion-page-title-row h1 {
    font-size: 29px;
  }


  .composicion-header-actions {
    width: 100%;

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


  .composicion-header-actions .composicion-button {
    width: 100%;
  }


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


  .composicion-metric {
    min-height: 112px;
  }


  .composicion-metric > strong {
    font-size: 20px;
  }


  .composicion-filter-grid,
  .composicion-columns-grid {
    grid-template-columns:
      1fr;
  }


  .composicion-filter-panel-head,
  .composicion-columns-panel-head,
  .composicion-modal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }


  .composicion-toolbar-actions {
    width: 100%;
  }


  .composicion-toolbar-actions .composicion-button {
    flex: 1 1 auto;
  }


  .composicion-filter-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }


  .composicion-filter-actions .composicion-button {
    width: 100%;
  }


  .composicion-selection-toolbar {
    flex-direction: column;
    align-items: stretch;
  }


  .composicion-pagination {
    flex-direction: column;
    align-items: stretch;
  }


  .composicion-pagination-controls {
    justify-content: space-between;
  }


  .composicion-page-size {
    margin-right: auto;
  }


  .composicion-modal-root {
    align-items: flex-end;
  }


  .composicion-modal,
  .composicion-modal--sm,
  .composicion-modal--md,
  .composicion-modal--lg,
  .composicion-modal--xl {
    width: 100%;
    max-height: 94vh;

    border-radius: 16px 16px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }


  .composicion-modal-header {
    min-height: 66px;
    padding: 14px;
  }


  .composicion-modal-body {
    padding: 14px;
  }


  .composicion-modal-footer {
    padding: 10px 14px;
    flex-wrap: wrap;
  }


  .composicion-modal-footer .composicion-button {
    flex: 1 1 auto;
  }


  .composicion-detail-hero {
    flex-direction: column;
  }


  .composicion-detail-statuses {
    justify-content: flex-start;
  }


  .composicion-detail-highlight-grid,
  .composicion-version-summary,
  .composicion-component-preview-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }


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

}


/* =========================================================
   RESPONSIVE · 520
   ========================================================= */

@media (max-width: 520px) {

  .composicion-page {
    padding: 10px;
  }


  .composicion-page-eyebrow {
    font-size: 10px;
  }


  .composicion-page-title-row h1 {
    font-size: 26px;
  }


  .composicion-page-title-row p {
    font-size: 12px;
  }


  .composicion-header-actions {
    grid-template-columns:
      1fr;
  }


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


  .composicion-toolbar-left {
    display: grid;
    grid-template-columns:
      repeat(
        2,
        minmax(0, 1fr)
      );
  }


  .composicion-search {
    grid-column: 1 / -1;
    min-width: 0;
  }


  .composicion-toolbar-left > .composicion-button {
    width: 100%;
  }


  .composicion-detail-highlight-grid,
  .composicion-version-summary,
  .composicion-component-preview-grid {
    grid-template-columns:
      1fr;
  }


  .composicion-form-section {
    padding: 12px;
  }


  .composicion-switch-field {
    align-items: flex-start;
  }


  .composicion-modal-footer {
    display: grid;
    grid-template-columns:
      1fr;
  }


  .composicion-modal-footer-spacer {
    display: none;
  }


  .composicion-modal-footer .composicion-button {
    width: 100%;
  }


  .composicion-pagination-controls {
    display: grid;
    grid-template-columns:
      auto
      32px
      32px
      minmax(60px, 1fr)
      32px
      32px;
  }


  .composicion-pagination-current {
    min-width: 0;
  }

}


/* =========================================================
   VERY SMALL
   ========================================================= */

@media (max-width: 390px) {

  .composicion-toolbar-left {
    grid-template-columns:
      1fr;
  }


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


  .composicion-pagination-controls {
    grid-template-columns:
      repeat(
        4,
        1fr
      );
  }


  .composicion-page-size {
    grid-column: 1 / -1;

    width: 100%;

    justify-content: space-between;
  }


  .composicion-pagination-current {
    grid-column:
      span 2;
  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .composicion-page *,
  .composicion-page *::before,
  .composicion-page *::after,
  .composicion-modal *,
  .composicion-modal *::before,
  .composicion-modal *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

}


/* =========================================================
   PRINT
   ========================================================= */

@media print {

  .composicion-page {
    padding: 0;

    background: #fff;
  }


  .composicion-header-actions,
  .composicion-toolbar,
  .composicion-filter-panel,
  .composicion-columns-panel,
  .composicion-selection-toolbar,
  .composicion-pagination,
  .composicion-table-actions,
  .composicion-table-actions-head,
  .composicion-table-check {
    display: none !important;
  }


  .composicion-table-card {
    border: 0;
    border-radius: 0;
  }


  .composicion-table-scroll {
    overflow: visible;
  }


  .composicion-table {
    min-width: 0;
  }

}


/* =========================================================
   FIN · MANUFACTURA · COMPOSICIÓN / BOM
   ========================================================= *//* =========================================================
   COMPOSICIÓN / BOM · AJUSTE FINAL
   MISMO TAMAÑO ACTUAL
   SIN SCROLL HORIZONTAL
   DIVISIONES MÁS VISIBLES
   TIPOGRAFÍA MÁS MARCADA
   ========================================================= */


/* =========================================================
   01. VARIABLES / CONTRASTE
   ========================================================= */

.composicion-page {
  --com-border:
    #c9cdd2;

  --com-border-soft:
    #dde0e3;

  --com-border-strong:
    #a5abb2;

  --com-text:
    #111111;

  --com-text-secondary:
    #3f4449;

  --com-text-muted:
    #666c73;
}


html[data-theme="dark"] .composicion-page,
body.dark .composicion-page,
body[data-theme="dark"] .composicion-page {
  --com-border:
    #3c4146;

  --com-border-soft:
    #2c3034;

  --com-border-strong:
    #585f66;

  --com-text:
    #f5f5f5;

  --com-text-secondary:
    #d0d3d6;

  --com-text-muted:
    #a0a5ab;
}


/* =========================================================
   02. SIN SCROLL HORIZONTAL GENERAL
   ========================================================= */

html,
body {
  max-width:
    100vw;

  overflow-x:
    hidden !important;
}


body:has(.composicion-page),
body:has(.composicion-page) .app-shell,
body:has(.composicion-page) .app-main,
body:has(.composicion-page) .app-content,
.app-content:has(.composicion-page) {
  width:
    100% !important;

  min-width:
    0 !important;

  max-width:
    100% !important;

  overflow-x:
    hidden !important;
}


.composicion-page,
.composicion-page *,
.composicion-modal,
.composicion-modal * {
  box-sizing:
    border-box;

  min-width:
    0;
}


.composicion-page {
  width:
    100%;

  max-width:
    100%;

  overflow-x:
    hidden !important;
}


/* =========================================================
   03. LETRAS MÁS MARCADAS
   ========================================================= */

.composicion-page-title-row h1 {
  font-weight:
    900 !important;

  color:
    var(
      --com-text
    ) !important;
}


.composicion-page-eyebrow {
  font-weight:
    850 !important;

  color:
    var(
      --com-text-secondary
    ) !important;
}


.composicion-page-title-row p {
  font-weight:
    600 !important;

  color:
    var(
      --com-text-secondary
    ) !important;
}


.composicion-button,
.composicion-text-button,
.composicion-metric-top,
.composicion-filter-panel-head strong,
.composicion-columns-panel-head strong,
.composicion-filter-grid label > span,
.composicion-column-option,
.composicion-selection-toolbar strong,
.composicion-table th,
.composicion-code-button,
.composicion-version-code,
.composicion-cost-cell,
.composicion-insumo-code,
.composicion-badge,
.composicion-form-label,
.composicion-form-section-title strong,
.composicion-switch-copy strong,
.composicion-detail-code,
.composicion-detail-section-head strong,
.composicion-detail-item > span,
.composicion-version-identity strong,
.composicion-item-name strong,
.composicion-history-product strong {
  font-weight:
    800 !important;
}


.composicion-table td,
.composicion-result-count,
.composicion-pagination-summary,
.composicion-page-size,
.composicion-pagination-current,
.composicion-form-field input,
.composicion-form-field select,
.composicion-form-field textarea,
.composicion-detail-item > strong,
.composicion-note,
.composicion-inline-empty {
  font-weight:
    650 !important;
}


.composicion-metric > strong,
.composicion-detail-highlight-grid article > strong,
.composicion-version-summary article > strong,
.composicion-component-preview-grid article > strong {
  font-weight:
    850 !important;
}


/* =========================================================
   04. HEADER
   ========================================================= */

.composicion-page-header {
  padding-bottom:
    14px;

  border-bottom:
    1px
    solid
    var(
      --com-border-strong
    );
}


/* =========================================================
   05. BOTONES
   ========================================================= */

.composicion-button--secondary,
.composicion-button--ghost,
.composicion-button--filter,
.composicion-icon-button,
.composicion-pagination-button {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


/* =========================================================
   06. MÉTRICAS · DIVISIONES MARCADAS
   ========================================================= */

.composicion-metrics {
  gap:
    0 !important;

  border:
    1px
    solid
    var(
      --com-border-strong
    );

  border-radius:
    14px;

  overflow:
    hidden;
}


.composicion-metric {
  border:
    0 !important;

  border-right:
    1px
    solid
    var(
      --com-border-strong
    ) !important;

  border-radius:
    0 !important;
}


.composicion-metric:last-child {
  border-right:
    0 !important;
}


.composicion-metric-icon {
  border:
    1px
    solid
    var(
      --com-border
    );
}


/* =========================================================
   07. TOOLBAR
   ========================================================= */

.composicion-toolbar {
  padding-bottom:
    10px;

  border-bottom:
    1px
    solid
    var(
      --com-border
    );
}


.composicion-search {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


.composicion-search input {
  font-weight:
    650 !important;
}


/* =========================================================
   08. FILTROS / COLUMNAS
   ========================================================= */

.composicion-filter-panel,
.composicion-columns-panel {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


.composicion-filter-panel-head,
.composicion-columns-panel-head {
  padding-bottom:
    12px;

  border-bottom:
    1px
    solid
    var(
      --com-border
    );
}


.composicion-filter-grid input,
.composicion-filter-grid select {
  border-color:
    var(
      --com-border-strong
    ) !important;

  font-weight:
    650 !important;
}


.composicion-column-option {
  border-color:
    var(
      --com-border
    ) !important;
}


.composicion-column-option-check {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


/* =========================================================
   09. SELECCIÓN
   ========================================================= */

.composicion-selection-toolbar {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


/* =========================================================
   10. TABLA PRINCIPAL · SIN SCROLL HORIZONTAL
   ========================================================= */

.composicion-table-card {
  max-width:
    100%;

  border-color:
    var(
      --com-border-strong
    ) !important;

  overflow-x:
    hidden !important;
}


.composicion-table-scroll {
  width:
    100% !important;

  min-width:
    0 !important;

  max-width:
    100% !important;

  overflow-x:
    hidden !important;

  overflow-y:
    visible !important;
}


.composicion-table {
  width:
    100% !important;

  min-width:
    0 !important;

  max-width:
    100% !important;

  table-layout:
    fixed !important;
}


/* =========================================================
   11. TABLA PRINCIPAL · DIVISIONES
   ========================================================= */

.composicion-table th {
  border-bottom:
    1px
    solid
    var(
      --com-border-strong
    ) !important;

  color:
    var(
      --com-text
    ) !important;
}


.composicion-table td {
  border-bottom:
    1px
    solid
    var(
      --com-border
    ) !important;
}


.composicion-table th:not(:last-child),
.composicion-table td:not(:last-child) {
  border-right:
    1px
    solid
    var(
      --com-border
    ) !important;
}


.composicion-table tbody tr:last-child td {
  border-bottom:
    0 !important;
}


/* =========================================================
   12. TABLA PRINCIPAL · EVITAR DESBORDE
   ========================================================= */

.composicion-table th,
.composicion-table td {
  min-width:
    0 !important;

  max-width:
    100% !important;

  overflow:
    hidden;
}


.composicion-table th[style] {
  min-width:
    0 !important;
}


.composicion-name-cell {
  min-width:
    0 !important;

  max-width:
    100% !important;
}


.composicion-name-cell strong,
.composicion-name-cell span,
.composicion-version-code,
.composicion-cost-cell,
.composicion-insumo-code,
.composicion-code-button {
  max-width:
    100%;

  overflow:
    hidden;

  text-overflow:
    ellipsis;

  white-space:
    nowrap;
}


.composicion-table-actions-head,
.composicion-table-actions {
  width:
    190px !important;

  min-width:
    0 !important;

  max-width:
    190px !important;
}


.composicion-table-check {
  width:
    38px !important;

  min-width:
    38px !important;

  max-width:
    38px !important;
}


.composicion-row-actions {
  width:
    100%;

  min-width:
    0;

  flex-wrap:
    wrap;

  gap:
    4px;
}


/* =========================================================
   13. BADGES / PILLS
   ========================================================= */

.composicion-count-pill,
.composicion-order-pill {
  border-color:
    var(
      --com-border-strong
    ) !important;

  font-weight:
    800 !important;
}


/* =========================================================
   14. PAGINACIÓN
   ========================================================= */

.composicion-pagination {
  border-top:
    1px
    solid
    var(
      --com-border-strong
    ) !important;
}


.composicion-page-size select {
  border-color:
    var(
      --com-border-strong
    ) !important;

  font-weight:
    650 !important;
}


/* =========================================================
   15. MODAL
   ========================================================= */

.composicion-modal-root {
  max-width:
    100vw;

  overflow-x:
    hidden !important;
}


.composicion-modal {
  max-width:
    calc(
      100vw -
      20px
    ) !important;

  border-color:
    var(
      --com-border-strong
    ) !important;

  overflow-x:
    hidden !important;
}


.composicion-modal-header {
  border-bottom:
    1px
    solid
    var(
      --com-border-strong
    ) !important;
}


.composicion-modal-footer {
  border-top:
    1px
    solid
    var(
      --com-border-strong
    ) !important;
}


.composicion-modal-heading h2 {
  font-weight:
    850 !important;
}


.composicion-modal-eyebrow {
  font-weight:
    850 !important;
}


/* =========================================================
   16. MODAL BODY
   ========================================================= */

.composicion-modal-body {
  max-width:
    100%;

  overflow-x:
    hidden !important;
}


/* =========================================================
   17. FORMULARIOS
   ========================================================= */

.composicion-form,
.composicion-form-grid,
.composicion-switch-grid {
  max-width:
    100%;
}


.composicion-form-banner,
.composicion-form-section {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


.composicion-form-section-title {
  padding-bottom:
    10px;

  border-bottom:
    1px
    solid
    var(
      --com-border
    );
}


.composicion-form-field input,
.composicion-form-field select,
.composicion-form-field textarea {
  border-color:
    var(
      --com-border-strong
    ) !important;

  font-weight:
    650 !important;
}


.composicion-switch-field {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


/* =========================================================
   18. DETALLE
   ========================================================= */

.composicion-detail {
  width:
    100%;

  max-width:
    100%;

  overflow-x:
    hidden !important;
}


.composicion-detail-hero,
.composicion-detail-section {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


.composicion-detail-icon {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


.composicion-detail-section-head {
  padding-bottom:
    10px;

  border-bottom:
    1px
    solid
    var(
      --com-border
    );
}


.composicion-detail-item {
  border:
    1px
    solid
    var(
      --com-border
    );
}


.composicion-note {
  border:
    1px
    solid
    var(
      --com-border
    );
}


.composicion-inline-empty {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


/* =========================================================
   19. TARJETAS DE RESUMEN
   ========================================================= */

.composicion-detail-highlight-grid article,
.composicion-version-summary article,
.composicion-component-preview-grid article {
  border-color:
    var(
      --com-border-strong
    ) !important;
}


/* =========================================================
   20. TOOLBAR DE MODALES
   ========================================================= */

.composicion-modal-toolbar {
  border-bottom:
    1px
    solid
    var(
      --com-border-strong
    ) !important;
}


/* =========================================================
   21. TABLAS INTERNAS · BASE
   ========================================================= */

.composicion-version-table-wrap,
.composicion-components-table-wrap,
.composicion-history-table-wrap {
  width:
    100%;

  min-width:
    0;

  max-width:
    100%;

  border-color:
    var(
      --com-border-strong
    ) !important;

  overflow-x:
    hidden !important;
}


.composicion-version-table,
.composicion-components-table,
.composicion-history-table {
  width:
    100% !important;

  min-width:
    0 !important;

  max-width:
    100% !important;

  table-layout:
    fixed !important;
}


.composicion-version-table th,
.composicion-components-table th,
.composicion-history-table th {
  border-bottom:
    1px
    solid
    var(
      --com-border-strong
    ) !important;

  font-weight:
    850 !important;
}


.composicion-version-table td,
.composicion-components-table td,
.composicion-history-table td {
  border-bottom:
    1px
    solid
    var(
      --com-border
    ) !important;

  font-weight:
    650 !important;
}


.composicion-version-table th:not(:last-child),
.composicion-version-table td:not(:last-child),
.composicion-components-table th:not(:last-child),
.composicion-components-table td:not(:last-child),
.composicion-history-table th:not(:last-child),
.composicion-history-table td:not(:last-child) {
  border-right:
    1px
    solid
    var(
      --com-border
    ) !important;
}


/* =========================================================
   22. RESPONSIVE MÉTRICAS
   ========================================================= */

@media (max-width: 1500px) {
  .composicion-metric {
    border-right:
      1px
      solid
      var(
        --com-border-strong
      ) !important;

    border-bottom:
      1px
      solid
      var(
        --com-border-strong
      ) !important;
  }


  .composicion-metric:nth-child(3n) {
    border-right:
      0 !important;
  }


  .composicion-metric:nth-last-child(-n + 3) {
    border-bottom:
      0 !important;
  }
}


/* =========================================================
   23. TABLET · TABLA PRINCIPAL EN TARJETAS
   ========================================================= */

@media (max-width: 900px) {
  .composicion-table-scroll {
    overflow-x:
      hidden !important;
  }


  .composicion-table {
    display:
      block !important;

    width:
      100% !important;

    min-width:
      0 !important;
  }


  .composicion-table thead {
    display:
      none !important;
  }


  .composicion-table tbody {
    width:
      100%;

    display:
      grid;

    grid-template-columns:
      1fr;

    gap:
      8px;

    padding:
      8px;
  }


  .composicion-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(
        --com-border-strong
      );

    border-radius:
      10px;

    overflow:
      hidden;
  }


  .composicion-table tbody td,
  .composicion-table tbody td.composicion-table-check,
  .composicion-table tbody td.composicion-table-actions {
    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(
        --com-border
      ) !important;

    border-bottom:
      1px
      solid
      var(
        --com-border
      ) !important;
  }


  .composicion-table tbody td:nth-child(2n) {
    border-right:
      0 !important;
  }


  .composicion-table tbody td.composicion-table-check {
    align-items:
      center;

    justify-content:
      center;
  }


  .composicion-table tbody td.composicion-table-actions {
    grid-column:
      1
      /
      -1;

    max-width:
      100% !important;

    border-right:
      0 !important;

    border-bottom:
      0 !important;
  }


  .composicion-row-actions {
    width:
      100%;

    display:
      grid;

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

    gap:
      5px;
  }


  .composicion-row-actions
  .composicion-icon-button {
    width:
      100%;

    min-width:
      0;
  }


  .composicion-row-actions
  .composicion-button {
    width:
      100%;

    min-width:
      0;
  }


  .composicion-name-cell,
  .composicion-code-button,
  .composicion-version-code,
  .composicion-cost-cell {
    width:
      100%;

    max-width:
      100%;
  }


  .composicion-name-cell strong,
  .composicion-name-cell span,
  .composicion-version-code,
  .composicion-cost-cell,
  .composicion-insumo-code,
  .composicion-code-button {
    white-space:
      normal !important;

    overflow-wrap:
      anywhere;
  }
}


/* =========================================================
   24. TABLET · TABLAS INTERNAS EN TARJETAS
   ========================================================= */

@media (max-width: 900px) {
  .composicion-version-table,
  .composicion-components-table,
  .composicion-history-table {
    display:
      block !important;
  }


  .composicion-version-table thead,
  .composicion-components-table thead,
  .composicion-history-table thead {
    display:
      none !important;
  }


  .composicion-version-table tbody,
  .composicion-components-table tbody,
  .composicion-history-table tbody {
    width:
      100%;

    display:
      grid;

    grid-template-columns:
      1fr;

    gap:
      8px;

    padding:
      8px;
  }


  .composicion-version-table tbody tr,
  .composicion-components-table tbody tr,
  .composicion-history-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(
        --com-border-strong
      );

    border-radius:
      10px;

    overflow:
      hidden;
  }


  .composicion-version-table tbody td,
  .composicion-components-table tbody td,
  .composicion-history-table tbody td {
    width:
      auto !important;

    min-width:
      0 !important;

    max-width:
      100% !important;

    min-height:
      52px;

    padding:
      8px !important;

    display:
      flex;

    flex-direction:
      column;

    align-items:
      flex-start;

    justify-content:
      center;

    gap:
      4px;

    border-right:
      1px
      solid
      var(
        --com-border
      ) !important;

    border-bottom:
      1px
      solid
      var(
        --com-border
      ) !important;

    overflow-wrap:
      anywhere;
  }


  .composicion-version-table tbody td:nth-child(2n),
  .composicion-components-table tbody td:nth-child(2n),
  .composicion-history-table tbody td:nth-child(2n) {
    border-right:
      0 !important;
  }


  .composicion-version-table tbody td:last-child,
  .composicion-components-table tbody td:last-child,
  .composicion-history-table tbody td:last-child {
    grid-column:
      1
      /
      -1;

    border-right:
      0 !important;

    border-bottom:
      0 !important;
  }
}


/* =========================================================
   25. MOBILE
   ========================================================= */

@media (max-width: 760px) {
  .composicion-page,
  .composicion-workspace,
  .composicion-toolbar,
  .composicion-toolbar-left,
  .composicion-toolbar-right,
  .composicion-filter-panel,
  .composicion-columns-panel,
  .composicion-table-card,
  .composicion-table-scroll {
    width:
      100% !important;

    min-width:
      0 !important;

    max-width:
      100% !important;

    overflow-x:
      hidden !important;
  }


  .composicion-header-actions {
    width:
      100%;

    min-width:
      0;
  }


  .composicion-search {
    width:
      100% !important;

    min-width:
      0 !important;

    max-width:
      100% !important;
  }


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


  .composicion-metric,
  .composicion-metric:nth-child(3n),
  .composicion-metric:nth-last-child(-n + 3) {
    border-right:
      1px
      solid
      var(
        --com-border-strong
      ) !important;

    border-bottom:
      1px
      solid
      var(
        --com-border-strong
      ) !important;
  }


  .composicion-metric:nth-child(2n) {
    border-right:
      0 !important;
  }


  .composicion-metric:nth-last-child(-n + 2) {
    border-bottom:
      0 !important;
  }


  .composicion-filter-grid,
  .composicion-columns-grid {
    grid-template-columns:
      1fr !important;
  }


  .composicion-column-option {
    width:
      100%;

    max-width:
      100%;
  }


  .composicion-selection-toolbar,
  .composicion-pagination {
    width:
      100%;

    max-width:
      100%;

    overflow-x:
      hidden;
  }


  .composicion-pagination-controls {
    width:
      100%;

    min-width:
      0;

    flex-wrap:
      wrap;
  }


  .composicion-modal-root {
    width:
      100vw;

    max-width:
      100vw;

    overflow-x:
      hidden !important;
  }


  .composicion-modal,
  .composicion-modal--sm,
  .composicion-modal--md,
  .composicion-modal--lg,
  .composicion-modal--xl {
    width:
      100% !important;

    max-width:
      100% !important;

    overflow-x:
      hidden !important;
  }


  .composicion-form,
  .composicion-form-section,
  .composicion-form-grid,
  .composicion-switch-grid,
  .composicion-detail,
  .composicion-detail-hero,
  .composicion-detail-section,
  .composicion-detail-grid,
  .composicion-version-list,
  .composicion-components,
  .composicion-component-cost-preview {
    width:
      100%;

    min-width:
      0;

    max-width:
      100%;

    overflow-x:
      hidden;
  }


  .composicion-form-grid,
  .composicion-switch-grid,
  .composicion-detail-grid {
    grid-template-columns:
      1fr !important;
  }


  .composicion-detail-highlight-grid,
  .composicion-version-summary,
  .composicion-component-preview-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      ) !important;
  }
}


/* =========================================================
   26. MOBILE · TABLAS EN UNA SOLA COLUMNA
   ========================================================= */

@media (max-width: 620px) {
  .composicion-table tbody tr,
  .composicion-version-table tbody tr,
  .composicion-components-table tbody tr,
  .composicion-history-table tbody tr {
    grid-template-columns:
      1fr !important;
  }


  .composicion-table tbody td,
  .composicion-table tbody td:nth-child(2n),
  .composicion-table tbody td.composicion-table-check,
  .composicion-table tbody td.composicion-table-actions,
  .composicion-version-table tbody td,
  .composicion-version-table tbody td:nth-child(2n),
  .composicion-components-table tbody td,
  .composicion-components-table tbody td:nth-child(2n),
  .composicion-history-table tbody td,
  .composicion-history-table tbody td:nth-child(2n) {
    grid-column:
      auto;

    border-right:
      0 !important;

    border-bottom:
      1px
      solid
      var(
        --com-border
      ) !important;
  }


  .composicion-table tbody td:last-child,
  .composicion-version-table tbody td:last-child,
  .composicion-components-table tbody td:last-child,
  .composicion-history-table tbody td:last-child {
    border-bottom:
      0 !important;
  }


  .composicion-row-actions {
    grid-template-columns:
      repeat(
        3,
        minmax(
          0,
          1fr
        )
      );
  }


  .composicion-detail-highlight-grid,
  .composicion-version-summary,
  .composicion-component-preview-grid {
    grid-template-columns:
      1fr !important;
  }
}


/* =========================================================
   27. MOBILE MUY CHICO
   ========================================================= */

@media (max-width: 480px) {
  .composicion-header-actions {
    grid-template-columns:
      1fr !important;
  }


  .composicion-metrics {
    grid-template-columns:
      1fr !important;
  }


  .composicion-metric,
  .composicion-metric:nth-child(2n),
  .composicion-metric:nth-child(3n),
  .composicion-metric:nth-last-child(-n + 2),
  .composicion-metric:nth-last-child(-n + 3) {
    border-right:
      0 !important;

    border-bottom:
      1px
      solid
      var(
        --com-border-strong
      ) !important;
  }


  .composicion-metric:last-child {
    border-bottom:
      0 !important;
  }


  .composicion-toolbar-left {
    grid-template-columns:
      1fr !important;
  }


  .composicion-search {
    grid-column:
      auto !important;
  }


  .composicion-row-actions {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      );
  }


  .composicion-pagination-controls {
    grid-template-columns:
      repeat(
        2,
        minmax(
          0,
          1fr
        )
      ) !important;

    gap:
      6px;
  }


  .composicion-page-size,
  .composicion-pagination-current {
    grid-column:
      1
      /
      -1;

    width:
      100%;

    justify-content:
      center;
  }


  .composicion-pagination-button {
    width:
      100%;
  }
}


/* =========================================================
   28. DARK · DIVISIONES MÁS VISIBLES
   ========================================================= */

html[data-theme="dark"] .composicion-metrics,
html[data-theme="dark"] .composicion-table-card,
html[data-theme="dark"] .composicion-filter-panel,
html[data-theme="dark"] .composicion-columns-panel,
html[data-theme="dark"] .composicion-modal,
html[data-theme="dark"] .composicion-form-banner,
html[data-theme="dark"] .composicion-form-section,
html[data-theme="dark"] .composicion-detail-hero,
html[data-theme="dark"] .composicion-detail-section,
html[data-theme="dark"] .composicion-version-table-wrap,
html[data-theme="dark"] .composicion-components-table-wrap,
html[data-theme="dark"] .composicion-history-table-wrap,
body.dark .composicion-metrics,
body.dark .composicion-table-card,
body.dark .composicion-filter-panel,
body.dark .composicion-columns-panel,
body.dark .composicion-modal,
body.dark .composicion-form-banner,
body.dark .composicion-form-section,
body.dark .composicion-detail-hero,
body.dark .composicion-detail-section,
body.dark .composicion-version-table-wrap,
body.dark .composicion-components-table-wrap,
body.dark .composicion-history-table-wrap {
  border-color:
    #585f66 !important;
}


/* =========================================================
   29. PROTECCIÓN FINAL
   ========================================================= */

.composicion-page img,
.composicion-page svg,
.composicion-modal img,
.composicion-modal svg {
  max-width:
    100%;
}


.composicion-page input,
.composicion-page select,
.composicion-page textarea,
.composicion-page button,
.composicion-modal input,
.composicion-modal select,
.composicion-modal textarea,
.composicion-modal button {
  min-width:
    0;

  max-width:
    100%;
}


.composicion-page,
.composicion-workspace,
.composicion-toolbar,
.composicion-filter-panel,
.composicion-columns-panel,
.composicion-selection-toolbar,
.composicion-table-card,
.composicion-table-scroll,
.composicion-modal,
.composicion-modal-body,
.composicion-form,
.composicion-form-section,
.composicion-detail,
.composicion-detail-section,
.composicion-version-list,
.composicion-components,
.composicion-version-table-wrap,
.composicion-components-table-wrap,
.composicion-history-table-wrap {
  overflow-x:
    hidden !important;
}/* =========================================================
   COMPOSICIÓN / BOM · REDUCIR UN POCO TODO
   PEGAR AL FINAL DEL CSS
   ========================================================= */


/* =========================================================
   PÁGINA
   ========================================================= */

.composicion-page {
  padding: 18px !important;
}


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

.composicion-page-header {
  margin-bottom: 16px !important;
}


.composicion-page-eyebrow {
  margin-bottom: 4px !important;

  font-size: 10px !important;
}


.composicion-page-title-row {
  gap: 18px !important;
}


.composicion-page-title-row h1 {
  font-size:
    clamp(
      24px,
      2.4vw,
      32px
    ) !important;
}


.composicion-page-title-row p {
  margin-top: 7px !important;

  font-size: 12px !important;

  line-height: 1.5 !important;
}


.composicion-header-actions {
  gap: 6px !important;
}


/* =========================================================
   BOTONES
   ========================================================= */

.composicion-button {
  min-height: 36px !important;

  padding:
    0
    11px !important;

  gap: 6px !important;

  border-radius: 8px !important;

  font-size: 11px !important;
}


.composicion-button svg {
  width: 14px !important;
  height: 14px !important;
}


.composicion-button--compact {
  min-height: 30px !important;

  padding:
    0
    8px !important;

  font-size: 10px !important;
}


.composicion-icon-button {
  width: 31px !important;
  height: 31px !important;

  border-radius: 8px !important;
}


.composicion-icon-button svg {
  width: 14px !important;
  height: 14px !important;
}


.composicion-text-button {
  font-size: 10.5px !important;
}


/* =========================================================
   MÉTRICAS
   ========================================================= */

.composicion-metrics {
  margin-bottom: 14px !important;
}


.composicion-metric {
  min-height: 104px !important;

  padding: 12px !important;

  gap: 9px !important;
}


.composicion-metric-top {
  gap: 7px !important;

  font-size: 10px !important;
}


.composicion-metric-icon {
  width: 27px !important;
  height: 27px !important;

  border-radius: 7px !important;
}


.composicion-metric-icon svg {
  width: 14px !important;
  height: 14px !important;
}


.composicion-metric > strong {
  font-size: 21px !important;
}


.composicion-metric > small {
  font-size: 9.5px !important;
}


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

.composicion-toolbar {
  margin-bottom: 8px !important;

  gap: 9px !important;

  padding-bottom: 8px !important;
}


.composicion-toolbar-left,
.composicion-toolbar-right,
.composicion-toolbar-actions {
  gap: 6px !important;
}


.composicion-result-count {
  font-size: 10px !important;
}


/* =========================================================
   BUSCADOR
   ========================================================= */

.composicion-search {
  width:
    min(
      380px,
      100%
    ) !important;

  min-width: 190px !important;

  height: 36px !important;

  padding:
    0
    8px !important;

  gap: 6px !important;

  border-radius: 9px !important;
}


.composicion-search > svg {
  width: 14px !important;
  height: 14px !important;
}


.composicion-search input {
  font-size: 11px !important;
}


.composicion-search-clear {
  width: 23px !important;
  height: 23px !important;
}


.composicion-search-clear svg {
  width: 12px !important;
  height: 12px !important;
}


/* =========================================================
   FILTROS / COLUMNAS
   ========================================================= */

.composicion-filter-panel,
.composicion-columns-panel {
  margin-bottom: 8px !important;

  padding: 12px !important;

  border-radius: 11px !important;
}


.composicion-filter-panel-head,
.composicion-columns-panel-head {
  margin-bottom: 12px !important;

  gap: 12px !important;

  padding-bottom: 9px !important;
}


.composicion-filter-panel-head strong,
.composicion-columns-panel-head strong {
  font-size: 12px !important;
}


.composicion-filter-panel-head span,
.composicion-columns-panel-head span {
  font-size: 10px !important;
}


.composicion-filter-grid {
  gap: 9px !important;
}


.composicion-filter-grid label {
  gap: 4px !important;
}


.composicion-filter-grid label > span {
  font-size: 9.5px !important;
}


.composicion-filter-grid input,
.composicion-filter-grid select {
  height: 35px !important;

  padding:
    0
    8px !important;

  border-radius: 8px !important;

  font-size: 10.5px !important;
}


.composicion-filter-actions {
  margin-top: 12px !important;

  gap: 6px !important;
}


.composicion-columns-actions {
  gap: 9px !important;
}


.composicion-columns-grid {
  gap: 6px !important;
}


.composicion-column-option {
  min-height: 34px !important;

  padding:
    6px
    8px !important;

  gap: 6px !important;

  border-radius: 8px !important;

  font-size: 10.5px !important;
}


.composicion-column-option-check {
  width: 16px !important;
  height: 16px !important;
}


/* =========================================================
   SELECCIÓN
   ========================================================= */

.composicion-selection-toolbar {
  min-height: 40px !important;

  margin-bottom: 8px !important;

  padding:
    6px
    8px
    6px
    11px !important;

  gap: 9px !important;

  border-radius: 9px !important;
}


.composicion-selection-toolbar strong {
  font-size: 10px !important;
}


/* =========================================================
   TABLA PRINCIPAL
   ========================================================= */

.composicion-table-card {
  border-radius: 11px !important;
}


.composicion-table th {
  height: 38px !important;

  padding:
    0
    9px !important;

  font-size: 9.5px !important;
}


.composicion-table td {
  min-height: 46px !important;

  padding:
    8px
    9px !important;

  font-size: 10.5px !important;
}


.composicion-table-check {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;

  padding-left: 9px !important;
}


.composicion-checkbox {
  width: 16px !important;
  height: 16px !important;
}


.composicion-checkbox span {
  width: 14px !important;
  height: 14px !important;
}


.composicion-sort-button {
  gap: 4px !important;
}


.composicion-sort-button svg {
  width: 11px !important;
  height: 11px !important;
}


/* =========================================================
   CELDAS
   ========================================================= */

.composicion-code-button {
  font-size: 10.5px !important;
}


.composicion-name-cell {
  gap: 2px !important;
}


.composicion-name-cell span {
  font-size: 9px !important;
}


.composicion-empty-value {
  font-size: 9.5px !important;
}


.composicion-count-pill,
.composicion-order-pill {
  min-width: 25px !important;

  height: 21px !important;

  padding:
    0
    6px !important;

  font-size: 9.5px !important;
}


.composicion-badge {
  min-height: 21px !important;

  padding:
    2px
    7px !important;

  font-size: 8.5px !important;
}


/* =========================================================
   ACCIONES TABLA
   ========================================================= */

.composicion-table-actions-head,
.composicion-table-actions {
  width: 170px !important;
  max-width: 170px !important;
}


.composicion-row-actions {
  gap: 4px !important;
}


/* =========================================================
   EMPTY / LOADING
   ========================================================= */

.composicion-empty-cell,
.composicion-loading-cell {
  padding:
    38px
    16px !important;
}


.composicion-empty {
  min-height: 150px !important;

  gap: 6px !important;
}


.composicion-empty--compact {
  min-height: 210px !important;
}


.composicion-empty-icon {
  width: 38px !important;
  height: 38px !important;

  border-radius: 10px !important;
}


.composicion-empty-icon svg {
  width: 18px !important;
  height: 18px !important;
}


.composicion-empty strong {
  font-size: 12px !important;
}


.composicion-empty p {
  font-size: 10.5px !important;
}


.composicion-loading {
  min-height: 90px !important;

  font-size: 10.5px !important;
}


/* =========================================================
   PAGINACIÓN
   ========================================================= */

.composicion-pagination {
  min-height: 48px !important;

  padding:
    8px
    10px !important;

  gap: 12px !important;
}


.composicion-pagination-summary,
.composicion-page-size,
.composicion-pagination-current {
  font-size: 9.5px !important;
}


.composicion-page-size {
  height: 30px !important;
}


.composicion-page-size select {
  height: 29px !important;

  font-size: 9.5px !important;
}


.composicion-pagination-button {
  width: 29px !important;
  height: 29px !important;
}


.composicion-pagination-button svg {
  width: 12px !important;
  height: 12px !important;
}


.composicion-pagination-current {
  min-width: 64px !important;

  height: 29px !important;
}


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

.composicion-modal {
  border-radius: 13px !important;
}


.composicion-modal-header {
  min-height: 62px !important;

  padding:
    12px
    14px !important;

  gap: 12px !important;
}


.composicion-modal-heading {
  gap: 3px !important;
}


.composicion-modal-eyebrow {
  font-size: 8.5px !important;
}


.composicion-modal-heading h2 {
  font-size: 16px !important;
}


.composicion-modal-body {
  padding: 14px !important;
}


.composicion-modal-footer {
  min-height: 54px !important;

  padding:
    9px
    14px !important;

  gap: 6px !important;
}


.composicion-modal-loading {
  min-height: 230px !important;

  font-size: 11px !important;
}


/* =========================================================
   FORMULARIO
   ========================================================= */

.composicion-form {
  gap: 10px !important;
}


.composicion-form-banner {
  min-height: 54px !important;

  padding:
    9px
    10px !important;

  gap: 12px !important;

  border-radius: 10px !important;
}


.composicion-form-banner
> div:first-child {
  gap: 8px !important;
}


.composicion-form-banner
> div:first-child
> svg {
  width: 15px !important;
  height: 15px !important;
}


.composicion-form-banner span {
  font-size: 8.5px !important;
}


.composicion-form-banner strong {
  font-size: 11px !important;
}


.composicion-form-info {
  padding:
    8px
    10px !important;

  gap: 7px !important;

  border-radius: 8px !important;

  font-size: 9.5px !important;
}


.composicion-form-section {
  padding: 12px !important;

  gap: 10px !important;

  border-radius: 10px !important;
}


.composicion-form-section-title {
  gap: 8px !important;

  padding-bottom: 8px !important;
}


.composicion-form-section-title
> svg {
  width: 15px !important;
  height: 15px !important;
}


.composicion-form-section-title strong {
  font-size: 11px !important;
}


.composicion-form-section-title span {
  font-size: 9.5px !important;
}


.composicion-form-grid {
  gap: 9px !important;
}


.composicion-form-field {
  gap: 4px !important;
}


.composicion-form-label {
  font-size: 9.5px !important;
}


.composicion-form-field input,
.composicion-form-field select {
  height: 35px !important;

  padding:
    0
    8px !important;

  font-size: 10.5px !important;
}


.composicion-form-field textarea {
  min-height: 76px !important;

  padding: 8px !important;

  font-size: 10.5px !important;
}


.composicion-form-field > small {
  font-size: 8.5px !important;
}


/* =========================================================
   SWITCHES
   ========================================================= */

.composicion-switch-grid {
  gap: 7px !important;
}


.composicion-switch-field {
  min-height: 50px !important;

  padding:
    8px
    9px !important;

  gap: 10px !important;

  border-radius: 8px !important;
}


.composicion-switch-copy strong {
  font-size: 9.5px !important;
}


.composicion-switch-copy small {
  font-size: 8.5px !important;
}


.composicion-switch {
  width: 34px !important;
  height: 20px !important;

  flex:
    0
    0
    34px !important;
}


.composicion-switch > span::before {
  width: 14px !important;
  height: 14px !important;
}


.composicion-switch
input:checked + span::before {
  transform:
    translateX(
      14px
    ) !important;
}


/* =========================================================
   DETALLE
   ========================================================= */

.composicion-detail {
  gap: 10px !important;
}


.composicion-detail-hero {
  padding: 12px !important;

  gap: 15px !important;

  border-radius: 10px !important;
}


.composicion-detail-hero-main {
  gap: 10px !important;
}


.composicion-detail-icon {
  width: 38px !important;
  height: 38px !important;

  border-radius: 9px !important;
}


.composicion-detail-icon svg {
  width: 17px !important;
  height: 17px !important;
}


.composicion-detail-code {
  font-size: 8.5px !important;
}


.composicion-detail-hero h3 {
  font-size: 17px !important;
}


.composicion-detail-hero p {
  margin-top: 4px !important;

  font-size: 9.5px !important;
}


.composicion-detail-statuses {
  gap: 5px !important;
}


/* =========================================================
   RESÚMENES
   ========================================================= */

.composicion-detail-highlight-grid,
.composicion-version-summary,
.composicion-component-preview-grid {
  gap: 7px !important;
}


.composicion-detail-highlight-grid article,
.composicion-version-summary article,
.composicion-component-preview-grid article {
  min-height: 80px !important;

  padding: 10px !important;

  gap: 4px !important;

  border-radius: 9px !important;
}


.composicion-detail-highlight-grid article > span,
.composicion-version-summary article > span,
.composicion-component-preview-grid article > span {
  font-size: 8.5px !important;
}


.composicion-detail-highlight-grid article > strong,
.composicion-version-summary article > strong,
.composicion-component-preview-grid article > strong {
  font-size: 14px !important;
}


.composicion-detail-highlight-grid article > small,
.composicion-version-summary article > small,
.composicion-component-preview-grid article > small {
  font-size: 8.5px !important;
}


/* =========================================================
   SECCIONES DETALLE
   ========================================================= */

.composicion-detail-section {
  padding: 12px !important;

  border-radius: 10px !important;
}


.composicion-detail-section-head {
  margin-bottom: 10px !important;

  gap: 10px !important;

  padding-bottom: 8px !important;
}


.composicion-detail-section-head strong {
  font-size: 10.5px !important;
}


.composicion-detail-section-head span {
  font-size: 8.5px !important;
}


.composicion-detail-grid {
  gap: 6px !important;
}


.composicion-detail-item {
  padding:
    7px
    8px !important;
}


.composicion-detail-item > span {
  font-size: 8px !important;
}


.composicion-detail-item > strong {
  font-size: 9.5px !important;
}


.composicion-note {
  margin-top: 8px !important;

  padding: 9px !important;

  font-size: 9.5px !important;
}


.composicion-inline-empty {
  min-height: 58px !important;

  padding: 10px !important;

  font-size: 9.5px !important;
}


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

.composicion-modal-toolbar {
  padding-bottom: 9px !important;

  gap: 12px !important;
}


.composicion-modal-toolbar strong {
  font-size: 10.5px !important;
}


.composicion-modal-toolbar span {
  font-size: 8.5px !important;
}


/* =========================================================
   TABLAS INTERNAS
   ========================================================= */

.composicion-version-list,
.composicion-components {
  gap: 10px !important;
}


.composicion-version-table-wrap,
.composicion-components-table-wrap,
.composicion-history-table-wrap {
  border-radius: 9px !important;
}


.composicion-version-table th,
.composicion-components-table th,
.composicion-history-table th {
  height: 35px !important;

  padding:
    0
    8px !important;

  font-size: 8.5px !important;
}


.composicion-version-table td,
.composicion-components-table td,
.composicion-history-table td {
  padding: 8px !important;

  font-size: 9.5px !important;
}


.composicion-version-identity small,
.composicion-version-dates small,
.composicion-item-name small,
.composicion-history-product small {
  font-size: 8px !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 760px) {
  .composicion-page {
    padding: 10px !important;
  }


  .composicion-page-title-row {
    gap: 12px !important;
  }


  .composicion-page-title-row h1 {
    font-size: 24px !important;
  }


  .composicion-page-title-row p {
    font-size: 11px !important;
  }


  .composicion-metric {
    min-height: 92px !important;

    padding: 10px !important;
  }


  .composicion-metric > strong {
    font-size: 18px !important;
  }


  .composicion-modal-header {
    min-height: 58px !important;

    padding: 11px !important;
  }


  .composicion-modal-body {
    padding: 11px !important;
  }


  .composicion-modal-footer {
    padding:
      8px
      11px !important;
  }


  .composicion-table tbody,
  .composicion-version-table tbody,
  .composicion-components-table tbody,
  .composicion-history-table tbody {
    gap: 6px !important;

    padding: 6px !important;
  }


  .composicion-table tbody td,
  .composicion-version-table tbody td,
  .composicion-components-table tbody td,
  .composicion-history-table tbody td {
    min-height: 48px !important;

    padding: 7px !important;
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 520px) {
  .composicion-page {
    padding: 7px !important;
  }


  .composicion-page-eyebrow {
    font-size: 9px !important;
  }


  .composicion-page-title-row h1 {
    font-size: 22px !important;
  }


  .composicion-page-title-row p {
    font-size: 10.5px !important;
  }


  .composicion-metric {
    min-height: 82px !important;
  }


  .composicion-form-section {
    padding: 10px !important;
  }


  .composicion-detail-section {
    padding: 10px !important;
  }


  .composicion-detail-hero {
    padding: 10px !important;
  }
}