/* Utilería 02 · Inventario Físico: dos columnas en escritorio. */
#utilities-physical-inventory-section {
  width: 100%;
  max-width: none;
}

#utilities-physical-inventory-section .phy-workspace {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
}

.physical-inventory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.physical-inventory-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.physical-inventory-stage {
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(128, 138, 150, 0.28);
  border-radius: 12px;
}

.physical-inventory-stage > p {
  line-height: 1.5;
}

.physical-inventory-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.physical-inventory-fields label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  font-weight: 600;
}

.physical-inventory-fields select,
.physical-inventory-fields textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(128, 138, 150, 0.45);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
}

.physical-inventory-fields select option {
  color: #17212f;
  background: #fff;
}

.physical-inventory-fields textarea {
  resize: vertical;
}
.physical-inventory-fields select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.physical-inventory-full {
  grid-column: 1 / -1;
}

.phy-feedback {
  margin: 14px 0 0;
  color: #fda4af;
}

.physical-inventory-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.physical-inventory-upload label {
  flex-basis: 100%;
  font-weight: 600;
}
.physical-inventory-upload input {
  max-width: 100%;
}

#phy-validate {
  padding: 11px 20px;
  border: 1px solid currentColor;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#phy-validate:disabled,
.phy-process-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#phy-validation-status {
  margin: 14px 0 0;
  overflow-wrap: anywhere;
}
#phy-validation-status:empty,
#phy-process-status:empty {
  display: none;
}

.physical-inventory-issues {
  margin-top: 12px;
  padding-left: 20px;
}
.physical-inventory-issues li {
  margin-bottom: 6px;
}

.phy-required-mark {
  color: #fb7185;
  font-weight: 700;
  margin-left: 3px;
}
.phy-field-label {
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
}
.phy-field-label .phy-required-mark {
  margin: 0;
}

.phy-job-summary {
  padding: 14px;
  border: 1px solid rgba(128, 138, 150, 0.28);
  border-radius: 8px;
  overflow-wrap: anywhere;
  white-space: pre-line;
  line-height: 1.6;
}

.phy-preview {
  margin-top: 14px;
  border: 1px solid rgba(128, 138, 150, 0.2);
  padding: 12px 14px;
  border-radius: 8px;
}
.phy-preview summary {
  cursor: pointer;
  font-weight: 600;
}
.phy-preview ul {
  max-height: 260px;
  overflow-y: auto;
}

.phy-confirm {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0;
  font-weight: 600;
}
.phy-confirm input {
  flex-shrink: 0;
  margin-top: 4px;
  width: 18px;
  height: 18px;
}

.phy-note {
  opacity: 0.8;
  margin-top: 18px;
}
#phy-process-status {
  margin: 18px 0;
  overflow-wrap: anywhere;
}
.phy-process-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 1120px) {
  .physical-inventory-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .physical-inventory-fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .physical-inventory-stage {
    padding: 16px;
  }
  .phy-process-actions button {
    width: 100%;
  }
}

/* Cancelación: botón visible solo cuando el trabajo está listo y no enviado. */
.phy-job-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.phy-job-toolbar strong {
  font-weight: 650;
}
.phy-cancel-button {
  border: 1px solid #f87171;
  color: #fda4af;
  background: transparent;
}
.phy-cancel-button:not(:disabled):hover {
  background: rgba(248, 113, 113, 0.12);
}
.phy-cancel-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
