#olvera-production-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1700;
  max-width: min(460px, calc(100vw - 44px));
  padding: 13px 17px;
  border-radius: 14px;
  background: #20201f;
  color: #fff;
  box-shadow: 0 18px 55px rgba(27, 27, 29, .22);
  font: 500 11px/1.5 Inter, sans-serif;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: .2s ease;
}
#olvera-production-toast.show { opacity: 1; transform: none; }
#olvera-production-toast[data-tone="error"] { background: #845149; }

.olvera-open-production {
  border: 1px solid rgba(105, 112, 80, .26);
  border-radius: 10px;
  padding: 10px 13px;
  background: linear-gradient(135deg, rgba(215, 226, 213, .78), rgba(231, 218, 198, .66));
  color: var(--ink, #242321);
  font: 650 10px Inter, sans-serif;
  cursor: pointer;
}
.olvera-open-production:disabled { opacity: .44; cursor: wait; }

.olvera-production-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 34px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 22px;
  background: #fbfaf7;
  color: #242321;
  box-shadow: 0 28px 90px rgba(27, 27, 29, .24);
}
.olvera-production-dialog::backdrop {
  background: rgba(24, 24, 22, .48);
  backdrop-filter: blur(4px);
}
.olvera-production-dialog form { padding: 22px; }
.olvera-production-dialog header,
.olvera-production-head,
.olvera-production-title,
.olvera-production-dialog menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.olvera-production-dialog header {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(27, 27, 29, .08);
}
.olvera-production-dialog header span,
.olvera-production-head span {
  display: block;
  margin-bottom: 5px;
  color: #9a7950;
  font: 650 8px Inter, sans-serif;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.olvera-production-dialog header h2,
.olvera-production-head h3 { margin: 0; font-size: 18px; }
.olvera-production-dialog header > button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(27, 27, 29, .06);
  color: #74706a;
  font-size: 19px;
  cursor: pointer;
}

.olvera-production-controls {
  display: grid;
  grid-template-columns: 1.15fr 1fr .85fr .9fr 1.15fr .85fr .7fr;
  gap: 9px;
  margin-bottom: 14px;
}
.olvera-production-controls label {
  display: grid;
  gap: 5px;
  color: #74706a;
  font: 600 8px Inter, sans-serif;
}
.olvera-production-controls input,
.olvera-production-controls select {
  min-width: 0;
  border: 1px solid rgba(27, 27, 29, .1);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  color: #242321;
  font: 500 10px Inter, sans-serif;
}
.olvera-production-controls input:disabled {
  background: rgba(215, 226, 213, .35);
  color: #59603f;
}
.olvera-volume-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
.olvera-volume-presets button {
  border: 0;
  border-radius: 6px;
  padding: 4px 2px;
  background: rgba(105, 112, 80, .1);
  color: #59603f;
  font: 650 7px Inter, sans-serif;
  cursor: pointer;
}
.olvera-volume-presets button:hover { background: rgba(105, 112, 80, .2); }

#olvera-production-preview {
  padding: 17px;
  border: 1px solid rgba(105, 112, 80, .19);
  border-radius: 17px;
  background:
    radial-gradient(circle at 95% 0, rgba(215, 226, 213, .52), transparent 30%),
    rgba(255, 255, 255, .72);
}
.olvera-production-head > strong {
  padding: 6px 9px;
  border-radius: 999px;
  font: 650 8px Inter, sans-serif;
}
.olvera-production-head > strong[data-tone="exact"] {
  background: rgba(215, 226, 213, .78);
  color: #59603f;
}
.olvera-production-head > strong[data-tone="estimated"] {
  background: rgba(231, 218, 198, .78);
  color: #795d38;
}

.olvera-production-stats {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
  margin-top: 14px;
}
.olvera-production-stats > div {
  padding: 11px;
  border-radius: 11px;
  background: rgba(243, 240, 233, .72);
}
.olvera-production-stats small,
.olvera-production-stats b { display: block; }
.olvera-production-stats small {
  color: #74706a;
  font: 500 8px Inter, sans-serif;
}
.olvera-production-stats b {
  margin-top: 5px;
  color: #242321;
  font: 700 13px Inter, sans-serif;
}

.olvera-production-warning,
.olvera-production-active-summary {
  margin: 9px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  font: 500 8px/1.5 Inter, sans-serif;
}
.olvera-production-warning {
  background: rgba(198, 145, 111, .14);
  color: #845149;
}
.olvera-production-active-summary {
  background: rgba(215, 226, 213, .5);
  color: #59603f;
}

.olvera-production-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 11px;
  margin-top: 11px;
}
.olvera-production-grid > section {
  min-width: 0;
  padding: 13px;
  border-radius: 13px;
  background: rgba(243, 240, 233, .62);
}
.olvera-production-title span {
  color: #242321;
  font: 650 10px Inter, sans-serif;
}
.olvera-production-title strong {
  color: #74706a;
  font: 600 8px Inter, sans-serif;
}
.olvera-production-items {
  max-height: 315px;
  margin-top: 8px;
  overflow: auto;
}
.olvera-production-item {
  display: grid;
  grid-template-columns: 24px minmax(130px, 1fr) auto minmax(110px, .7fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(27, 27, 29, .06);
}
.olvera-production-item > em {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(215, 226, 213, .7);
  color: #59603f;
  font: 700 7px Inter, sans-serif;
  font-style: normal;
}
.olvera-production-material {
  min-width: 0;
}
.olvera-production-material span,
.olvera-production-material small {
  display: block;
}
.olvera-production-material span {
  overflow: hidden;
  color: #242321;
  font: 600 9px Inter, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.olvera-production-material small {
  margin-top: 3px;
  color: #8c8881;
  font: 500 7px Inter, sans-serif;
}
.olvera-production-item > strong {
  color: #59603f;
  font: 650 8px Inter, sans-serif;
  white-space: nowrap;
}
.olvera-production-units span,
.olvera-production-units small { display: block; }
.olvera-production-units small {
  margin-top: 2px;
  color: #8c8881;
  font: 500 7px Inter, sans-serif;
}
.olvera-production-item > b {
  color: #795d38;
  font: 650 7px Inter, sans-serif;
  white-space: nowrap;
}
.olvera-production-lot {
  min-width: 0;
}
.olvera-lot-select {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(27, 27, 29, .1);
  border-radius: 8px;
  padding: 6px 7px;
  background: #fff;
  color: #5d5953;
  font: 500 7px Inter, sans-serif;
}
.olvera-concentration-badge,
.olvera-concentration-missing {
  display: inline-flex;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 999px;
  font: 650 7px Inter, sans-serif;
  white-space: nowrap;
}
.olvera-concentration-badge {
  background: rgba(215, 226, 213, .72);
  color: #59603f;
}
.olvera-concentration-missing {
  background: rgba(198, 145, 111, .15);
  color: #845149;
}
.olvera-production-steps ol {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #74706a;
  font: 500 9px/1.55 Inter, sans-serif;
}
.olvera-production-steps li + li { margin-top: 6px; }
.olvera-production-steps b { color: #242321; }
.olvera-production-steps p {
  margin: 12px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: rgba(231, 218, 198, .45);
  color: #795d38;
  font: 500 8px/1.5 Inter, sans-serif;
}

.olvera-production-status {
  min-height: 18px;
  padding-top: 9px;
  color: #74706a;
  font: 500 9px Inter, sans-serif;
}
.olvera-production-status[data-tone="error"] { color: #845149; }
.olvera-production-dialog menu {
  justify-content: flex-end;
  margin: 0;
  padding: 8px 0 0;
}
.olvera-production-dialog menu button {
  border: 0;
  border-radius: 10px;
  padding: 10px 13px;
  font: 650 9px Inter, sans-serif;
  cursor: pointer;
}
.olvera-production-dialog menu .soft {
  background: rgba(27, 27, 29, .06);
  color: #74706a;
}
.olvera-production-dialog menu .primary {
  background: #697050;
  color: #fff;
}
.olvera-production-dialog menu button:disabled { opacity: .5; cursor: wait; }

@media (max-width: 900px) {
  .olvera-production-controls { grid-template-columns: repeat(3, 1fr); }
  .olvera-production-stats { grid-template-columns: repeat(3, 1fr); }
  .olvera-production-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .olvera-production-dialog { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
  .olvera-production-dialog form { padding: 15px; }
  .olvera-production-controls { grid-template-columns: 1fr 1fr; }
  .olvera-production-controls label:first-child,
  .olvera-production-controls label:nth-child(5) { grid-column: 1 / -1; }
  .olvera-production-stats { grid-template-columns: 1fr 1fr; }
  .olvera-production-item {
    grid-template-columns: 24px minmax(0, 1fr) auto;
  }
  .olvera-production-lot {
    grid-column: 2 / 3;
  }
  .olvera-production-item > b {
    grid-column: 3;
  }
  .olvera-production-dialog menu { flex-wrap: wrap; }
  #olvera-copy-production { margin-right: auto; }
}
