.production-stoppages-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--ui-border);
  border-radius: 12px;
  background: var(--ui-panel);
}

.stoppage-initial-label { display: block; margin-top: 5px; color: var(--ui-warning); font-size: 11px; white-space: normal; }
.production-start-information { margin-top: 18px; color: var(--ui-secondary); font-size: 12px; line-height: 1.7; }

.production-stoppages-entry h2,
.stoppage-editor h3 {
  margin: 0 0 5px;
  color: var(--ui-text);
  font-size: 15px;
  font-weight: 600;
}

.production-stoppages-entry p,
.stoppage-editor p {
  margin: 0;
  color: var(--ui-muted);
  font-size: 12px;
  line-height: 1.7;
}

:root .ops-app[data-theme] .stoppage-modal {
  --billing-billed: var(--ui-success);
  --billing-pending: var(--ui-warning);
  --billing-unknown: var(--ui-muted);
  width: min(1200px, 100%);
}

.stoppage-modal-body {
  min-height: 280px;
}

.stoppage-toolbar,
.stoppage-toolbar-actions,
.stoppage-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.stoppage-toolbar {
  justify-content: space-between;
  margin-bottom: 20px;
}

.stoppage-summary,
.stoppage-toolbar-actions > label {
  color: var(--ui-muted);
  font-size: 12px;
}

.stoppage-summary strong {
  color: var(--ui-text);
  font-variant-numeric: tabular-nums;
}

.stoppage-toolbar select,
.stoppage-editor input,
.stoppage-editor textarea {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--ui-border-strong);
  border-radius: 7px;
  color: var(--ui-text);
  background: var(--ui-input);
  font: inherit;
  font-size: 13px;
}

.stoppage-workspace {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
  align-items: start;
  gap: 20px;
}

.stoppage-list-wrap {
  max-height: 56vh;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--ui-border-strong) var(--ui-panel);
}

.stoppage-table {
  width: 100%;
  min-width: 590px;
  border-collapse: collapse;
  color: var(--ui-secondary);
  font-size: 12px;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.stoppage-table th {
  position: sticky;
  z-index: 1;
  top: 0;
  color: var(--ui-muted);
  background: var(--ui-raised);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.stoppage-table th,
.stoppage-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--ui-border);
}

.stoppage-table tbody tr:last-child td {
  border-bottom: 0;
}

.stoppage-table tr:hover td {
  background: var(--ui-raised);
}

.stoppage-table tr.is-selected td {
  background: var(--ui-accent-soft);
}

.stoppage-table tr.is-selected td:first-child {
  box-shadow: inset 2px 0 var(--ui-accent);
}

.stoppage-duration {
  white-space: nowrap;
}

:root .ops-app[data-theme] .stoppage-table .ops-button {
  min-height: 32px;
  font-size: 11px;
}

.stoppage-no-results {
  text-align: center;
}

.stoppage-editor {
  display: grid;
  min-width: 0;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  background: var(--ui-raised);
}

.stoppage-editor > div > .ops-overline {
  display: block;
  margin-bottom: 8px;
}

.stoppage-editor label {
  display: grid;
  gap: 8px;
  color: var(--ui-secondary);
  font-size: 12px;
  font-weight: 500;
}

.stoppage-description-field {
  display: grid;
  gap: 8px;
}

.stoppage-editor input,
.stoppage-editor textarea {
  width: 100%;
  min-width: 0;
}

.stoppage-editor textarea {
  resize: vertical;
  line-height: 1.6;
}

.stoppage-editor :disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.stoppage-counter {
  color: var(--ui-subtle);
  font-size: 10px;
  font-weight: 400;
  text-align: right;
}

.stoppage-editor .stoppage-audit {
  color: var(--ui-muted);
  font-size: 11px;
}

.stoppage-alert {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--ui-warning);
  border-radius: 7px;
  color: var(--ui-warning);
  background: var(--ui-warning-soft);
  font-size: 12px;
  line-height: 1.7;
}

.stoppage-report-note {
  margin: -8px 0 20px;
  color: var(--ui-muted);
  font-size: 11px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .stoppage-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .stoppage-list-wrap {
    max-height: 36vh;
  }
}

@media (max-width: 680px) {
  .production-stoppages-entry {
    padding: 16px;
  }

  .production-stoppages-entry > .ops-button {
    width: 100%;
  }

  .stoppage-toolbar-actions {
    width: 100%;
  }

  .stoppage-toolbar-actions > select {
    flex: 1;
    min-width: 0;
    font-size: 16px;
  }

  .stoppage-toolbar-actions > label {
    flex: 0 0 auto;
  }

  .stoppage-toolbar-actions > .ops-button {
    flex: 1 1 auto;
  }

  .stoppage-toolbar-actions > .ops-button:first-of-type {
    flex-basis: 100%;
  }

  .stoppage-editor {
    padding: 16px;
  }

  .stoppage-editor input,
  .stoppage-editor textarea {
    font-size: 16px;
  }
}
