/* PP Prompt 3: presentation-only refinements for the existing Production Platform. */
:root {
  --production-focus: #087f78;
  --production-focus-ring: rgba(8, 127, 120, .24);
  --production-surface: #fff;
  --production-surface-muted: #f7fafb;
  --production-border: #d7e0e6;
  --production-shadow: 0 12px 30px rgba(25, 43, 58, .08);
  --production-radius: 14px;
}

html { scroll-behavior: smooth; }
body { text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }

.production-skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: #173547;
  border-radius: 9px;
  transform: translateY(-160%);
  transition: transform .16s ease;
}
.production-skip-link:focus { transform: translateY(0); }

:where(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--production-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--production-focus-ring);
}
#productionMain:focus { outline: none; }

.production-navigation button,
.button,
.quick-action,
.shell-icon-button,
.shell-user-button,
.shell-text-button,
.text-button,
.profile-close,
.field-clear-button {
  min-height: 40px;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
:where(.button, .quick-action, .production-navigation button, .shell-icon-button, .shell-user-button, .shell-text-button, .text-button):not(:disabled):active {
  transform: translateY(1px);
}
button:disabled, [aria-disabled="true"] { cursor: not-allowed; opacity: .58; }

.shell-card,
.generator-card,
.results,
.production-placeholder,
.profile-card {
  border-color: var(--production-border);
  box-shadow: var(--production-shadow);
}
.shell-card h3, .production-workspace-heading h2, .production-welcome h2 { letter-spacing: -.015em; }

.production-quick-actions > div { align-items: stretch; }
.quick-action { min-height: 92px; }
.quick-action:hover:not(:disabled) { border-color: #86bcb8; box-shadow: 0 8px 22px rgba(8, 127, 120, .1); }

.inventory-availability-toolbar {
  align-items: end;
  grid-template-columns: minmax(180px, 1.1fr) minmax(260px, 1.8fr) minmax(150px, .8fr) minmax(120px, .65fr) auto;
}
.inventory-availability-toolbar label { min-width: 0; }
.inventory-search-control { position: relative; display: flex; align-items: center; }
.inventory-search-control input { width: 100%; padding-right: 58px; }
.field-clear-button {
  position: absolute;
  right: 5px;
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  color: #536473;
  background: transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
}
.field-clear-button:hover { color: #173547; background: #edf3f5; }
.inventory-reset-button { white-space: nowrap; }
.inventory-refreshed { grid-column: 1 / -1; }

.inventory-summary-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 18px;
  padding: 13px 0;
}
.inventory-filter-summary { color: #5b6b78; font-size: 12px; }

.inventory-availability-results {
  min-height: 180px;
  border: 1px solid var(--production-border);
  border-radius: 12px;
  background: var(--production-surface);
  overflow: auto;
  overscroll-behavior: contain;
}
.inventory-availability-table { margin: 0; }
.inventory-availability-table thead th { top: 0; z-index: 2; box-shadow: inset 0 -1px var(--production-border); }
.inventory-availability-table tbody tr { transition: background-color .12s ease; }
.inventory-availability-table tbody tr:hover { background: #f3f8f8; }
.inventory-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 2px 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
}
.inventory-sort-button::after { content: "↕"; color: #748692; font-size: 12px; }
th[aria-sort="ascending"] .inventory-sort-button::after { content: "↑"; color: var(--production-focus); }
th[aria-sort="descending"] .inventory-sort-button::after { content: "↓"; color: var(--production-focus); }

.inventory-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 14px;
}
.inventory-pagination[hidden] { display: none; }
.inventory-pagination span { min-width: 96px; color: #4e6070; text-align: center; font-size: 13px; font-weight: 700; }

.empty-shell-message {
  margin: 0;
  padding: 28px;
  color: #60727f;
  text-align: center;
  line-height: 1.55;
}
.production-loading {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: #536473;
}
.production-loading::before {
  content: "";
  width: 28px;
  height: 28px;
  border: 3px solid #d8e7e6;
  border-top-color: var(--production-focus);
  border-radius: 50%;
  animation: production-spin .75s linear infinite;
}
.production-loading span { margin-top: -52px; padding-top: 72px; }
@keyframes production-spin { to { transform: rotate(360deg); } }

.production-feedback {
  position: fixed;
  z-index: 900;
  right: 20px;
  bottom: 20px;
  max-width: min(390px, calc(100vw - 32px));
  padding: 12px 16px;
  color: #fff;
  background: #173547;
  border-radius: 11px;
  box-shadow: 0 14px 36px rgba(18, 39, 53, .24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .18s ease, transform .18s ease;
}
.production-feedback.visible { opacity: 1; transform: translateY(0); }
.production-feedback.success { background: #176a50; }
.production-feedback.warning { background: #8a5b07; }
.production-feedback.error { background: #a03333; }

.message.error { border-left: 4px solid #b64040; }
.status-badge, .availability-badge { white-space: nowrap; }
.currency-presentation-toggle {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 15px;
  border: 1px solid var(--production-border);
  border-radius: 12px;
  background: var(--production-surface-muted);
  cursor: pointer;
}
.currency-presentation-toggle input { width: auto; margin-top: 3px; }
.currency-presentation-toggle strong, .currency-presentation-toggle small { display: block; }
.currency-presentation-toggle small { margin-top: 5px; color: #60727f; font-weight: 400; line-height: 1.45; }
.currency-presentation-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid #abd9d5;
  border-left: 4px solid var(--production-focus);
  border-radius: 12px;
  background: #f1fbfa;
}
.currency-presentation-fields p { grid-column: 1 / -1; margin: 0; color: #405561; font-size: 12px; line-height: 1.5; }
.exchange-rate-control { display: grid; grid-template-columns: auto minmax(120px, 1fr); align-items: center; gap: 8px; }
.exchange-rate-control b { color: #334b59; font-size: 12px; white-space: nowrap; }
dialog::backdrop { background: rgba(18, 37, 50, .48); backdrop-filter: blur(2px); }
.profile-card { max-height: min(82vh, 760px); overflow: auto; }
.profile-actions { position: sticky; bottom: 0; z-index: 1; background: var(--production-surface); }

@media (max-width: 1100px) {
  .inventory-availability-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inventory-reset-button { justify-self: start; }
}
@media (max-width: 760px) {
  .inventory-availability-toolbar { grid-template-columns: 1fr; }
  .inventory-refreshed { grid-column: auto; }
  .inventory-summary-row { align-items: flex-start; flex-direction: column; }
  .inventory-pagination { justify-content: center; }
  .inventory-pagination .button { flex: 1 1 82px; }
  .production-feedback { right: 16px; bottom: 16px; }
  .production-workspace-heading { align-items: flex-start; }
  .currency-presentation-fields { grid-template-columns: 1fr; }
  .currency-presentation-fields p { grid-column: auto; }
  .exchange-rate-control { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
