@layer legado {
/* A+C · Vidrio · Inventario, compras y activos instalados.
   Las vistas comparten tinta de grafito, papel claro y la señal petróleo solo en datos operativos.
   La hoja se enlaza después de vidrio.css; no cambia estados, permisos ni interacciones. */

.inventory-section-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.inventory-section-tabs > button {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.inventory-table {
  --ty-inv-row-height: 40px;
}

.inventory-table tbody tr {
  height: var(--ty-inv-row-height);
}

.inventory-table td {
  vertical-align: middle;
}

.ty-row-menu {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.ty-row-menu > summary {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--ty-raya);
  border-radius: var(--ty-r-2);
  color: var(--ty-tinta-media);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  list-style: none;
}

.ty-row-menu > summary::-webkit-details-marker {
  display: none;
}

.ty-row-menu > summary:hover,
.ty-row-menu[open] > summary {
  background-color: var(--ty-panel-hondo);
  color: var(--ty-tinta);
}

.ty-row-menu-trigger:focus-visible {
  outline: 2px solid var(--ty-petroleo);
  outline-offset: 2px;
}

.ty-row-menu > summary:focus-visible {
  outline: 2px solid var(--ty-petroleo);
  outline-offset: 2px;
}

.ty-row-menu-items {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  min-width: 168px;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--ty-raya);
  border-radius: var(--ty-r-3);
  background-color: var(--ty-panel);
  box-shadow: var(--ty-e-2);
}

.ty-row-menu-items .btn {
  justify-content: flex-start;
  min-height: 36px;
  white-space: nowrap;
}

.ty-purchase-list .pc-row {
  min-height: 40px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-block: 7px;
}

.ty-purchase-list .pc-row-main {
  display: grid;
  grid-template-columns: minmax(116px, auto) minmax(120px, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.ty-purchase-list .pc-row-right {
  flex-direction: row;
  align-items: center;
}

.ty-purchase-notes .data-table tbody tr,
.equipment-workbench-table tbody tr {
  height: 40px;
}

.ty-purchase-notes .data-table td,
.equipment-workbench-table td {
  vertical-align: middle;
}

.equipment-workbench-table .row-actions {
  white-space: nowrap;
}

@media (max-width: 700px) {
  .inventory-section-tabs {
    margin-inline: -4px;
    padding: 2px 4px 8px;
  }

  .inventory-section-tabs > button {
    min-height: 40px;
  }

  .inventory-table,
  .equipment-workbench-table,
  .ty-purchase-notes .data-table {
    min-width: max-content;
  }

  .inventory-table tbody tr,
  .equipment-workbench-table tbody tr,
  .ty-purchase-notes .data-table tbody tr {
    height: 40px;
  }

  .inventory-table td,
  .equipment-workbench-table td,
  .ty-purchase-notes .data-table td {
    white-space: nowrap;
  }

  .inventory-table td br,
  .ty-purchase-notes .data-table td br,
  .equipment-workbench-table td br {
    display: none;
  }

  .equipment-workbench-table td small,
.ty-purchase-notes .data-table td small {
    display: inline;
    margin-left: 6px;
  }

  .ty-row-menu > summary {
    width: 36px;
    height: 36px;
  }

  .ty-purchase-list .pc-row {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 8px 12px;
  }

  .ty-purchase-list .pc-row-main {
    display: flex;
    min-width: 0;
    flex-flow: row nowrap;
    gap: 8px;
  }

  .ty-purchase-list .pc-sup,
  .ty-purchase-list .pc-recline {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ty-purchase-list .pc-row-right .pc-amt {
    display: none;
  }
}
}
