#materialsSignedIn > .card:first-child > .grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  align-items: start;
}

#materialsSignedIn > .card:first-child > .grid > div:not(.full) { min-width: 0; }
#materialsSignedIn > .card:first-child > .grid label {
  margin-bottom: 7px;
  line-height: 1.28;
  white-space: normal;
}

#materialsSignedIn input,
#materialsSignedIn select {
  min-height: 50px;
  background-color: var(--surface-input) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}

#materialsSignedIn input::placeholder { color: var(--muted) !important; opacity: .82; }
#materialsSignedIn input:-webkit-autofill,
#materialsSignedIn input:-webkit-autofill:hover,
#materialsSignedIn input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--surface-input) inset !important;
  caret-color: var(--text) !important;
  transition: background-color 99999s ease-out 0s;
}

.inventoryEditor {
  grid-column: 1 / -1 !important;
  margin-top: 2px !important;
  padding: 20px !important;
  border-radius: 18px !important;
  background: linear-gradient(150deg, color-mix(in srgb, var(--panel2) 95%, var(--accent) 5%), var(--panel)) !important;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--accent2) 18%, transparent);
}

.inventoryEditorHeading {
  padding-bottom: 14px;
  margin-bottom: 17px !important;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
}
.inventoryEditorHeading > div > span { font-size: 1.03rem; }
.inventoryEditorHeading small { font-size: .82rem; line-height: 1.35; }
.inventoryEditorGrid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px 18px !important;
}
.inventoryEditorGrid > div { min-width: 0; }
.inventoryLocationField { grid-column: 1 / -1 !important; }
.profileColorPick { grid-column: 1 / -1 !important; margin-top: 0 !important; }
.inventoryCommandCenter, .profileCatalog { margin-top: 18px !important; }

.catalogControls {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}
.catalogSearch { grid-column: span 2 !important; }
.catalogControls input, .catalogControls select { width: 100% !important; min-width: 0 !important; }
.catalogControls label { min-height: 1.15em; }

.baseProductionCostLine {
  position: relative !important;
  margin-bottom: 20px !important;
  padding-bottom: 20px !important;
  border-bottom: 0 !important;
}
.baseProductionCostLine span, .baseProductionCostLine strong {
  font-weight: 950 !important;
  color: var(--text) !important;
}
.baseProductionCostLine::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 8px;
  background: radial-gradient(circle at center, var(--accent2) 0 2px, transparent 3px), linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--accent) 40%, transparent) 10%, var(--accent2) 48%, var(--accent) 52%, color-mix(in srgb, var(--accent2) 40%, transparent) 90%, transparent 100%);
  background-size: auto, 100% 2px;
  background-position: center;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--accent) 45%, transparent));
}
.baseProductionCostLine::before {
  content: "";
  position: absolute;
  left: 12%; right: 12%; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--edge-soft), transparent);
}

@media (max-width: 850px) {
  .catalogControls { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .catalogSearch { grid-column: 1 / -1 !important; }
}

@media (max-width: 620px) {
  #materialsSignedIn > .card:first-child > .grid,
  .inventoryEditorGrid,
  .catalogControls { grid-template-columns: 1fr !important; }
  .catalogSearch { grid-column: 1 !important; }
  .inventoryEditor { padding: 16px !important; }
  .inventoryEditorHeading { gap: 12px; }
  .inventoryTrackToggle { width: 100%; justify-content: center; }
  .catalogControls { gap: 12px !important; }
}
