.production-summary .stat {
  border-top: 4px solid var(--frost-blue);
}

.production-summary .stat.warn {
  border-top-color: var(--frost-warning);
}

.production-summary .stat.good {
  border-top-color: var(--frost-success);
}

.production-summary .stat.bad {
  border-top-color: var(--frost-danger);
}

.production-panel {
  display: grid;
  gap: 10px;
  border-radius: 8px;
  background: #f3f7fb;
  padding: 12px;
}

.production-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.production-list {
  display: grid;
  gap: 10px;
}

.production-log {
  display: grid;
  gap: 10px;
  border: 1px solid #cfdae6;
  border-left: 5px solid #214ee5;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.production-log.approved {
  border-left-color: #167a5b;
  background: #eaf7f1;
}

.production-log.rejected {
  border-left-color: #b42318;
  background: #fff1f2;
}

.production-log-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.production-log-head span,
.production-log-head small {
  display: block;
  color: #607083;
  font-size: 12px;
}

.production-log-head strong {
  display: block;
  margin-top: 3px;
}

.production-log-head b {
  width: max-content;
  border-radius: 999px;
  background: #e7efff;
  color: #1f3f8f;
  padding: 6px 9px;
  font-size: 12px;
}

.production-log-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.production-log-grid div,
.production-notes p,
.review-note {
  margin: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 10px;
}

.production-log-grid span,
.production-notes strong,
.review-note strong {
  display: block;
  color: #607083;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.production-log-grid strong {
  display: block;
  margin-top: 4px;
}

.production-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.production-documents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.material-usage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.production-documents a,
.material-usage-list span {
  border-radius: 999px;
  background: #e7efff;
  color: #1f3f8f;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 9px;
  text-decoration: none;
}

.material-usage-list span {
  background: #eaf8ef;
  color: #167a5b;
}

.material-usage-list b {
  margin-right: 5px;
}

.production-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.production-review input {
  min-height: 38px;
  border: 1px solid #cfdae6;
  border-radius: 8px;
  padding: 0 10px;
}

.production-review button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: #214ee5;
  color: #ffffff;
  font-weight: 900;
  padding: 0 12px;
}

.production-review .danger {
  background: #b42318;
}

@media (max-width: 1040px) {
  .production-summary,
.production-log-grid,
.production-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .production-log-head,
.production-review {
    grid-template-columns: 1fr;
  }

.production-summary,
.production-log-grid,
.production-notes {
    grid-template-columns: 1fr;
  }
}

.production-summary .stat,
.production-summary .stat.warn,
.production-summary .stat.good,
.production-summary .stat.bad {
  border-top: 1px solid #284256 !important;
}

.production-summary .stat.active {
  border-top-color: var(--frost-blue) !important;
}

.production-summary .stat {
  background: var(--brand-command-gradient) !important;
  border-color: var(--brand-command-border) !important;
  border-top-color: var(--brand-command-border) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 34px rgba(var(--brand-command-rgb), 0.15) !important;
}

.production-summary .stat.active {
  background: var(--brand-command-active-gradient) !important;
  border-color: var(--brand-primary) !important;
  border-top-color: var(--brand-primary) !important;
  color: #ffffff !important;
  box-shadow: 0 16px 34px rgba(var(--brand-primary-rgb), 0.24) !important;
}

#root .workspace .my-day .production-form .material-usage-fieldset {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 14px !important;
  padding: 12px !important;
  margin-block: 4px 18px !important;
  background: color-mix(in srgb, var(--brand-primary) 3%, #ffffff) !important;
}

#root .workspace .my-day .production-form .material-usage-topline {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
  min-width: 0 !important;
}

#root .workspace .my-day .production-form .material-usage-help {
  grid-column: 1 / -1 !important;
  line-height: 1.4 !important;
}

#root .workspace .my-day .production-form .material-usage-fieldset > div[data-material-usage-rows] {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  display: grid !important;
  gap: 12px !important;
}

#root .workspace .my-day .production-form .material-usage-actions {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) 120px minmax(180px, 1fr) minmax(180px, max-content) !important;
  gap: 10px !important;
  justify-content: stretch !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  padding: 2px 10px 0 !important;
}

#root .workspace .my-day .production-form .material-usage-row {
  display: grid !important;
  grid-template-columns: minmax(220px, 1fr) 120px minmax(180px, 1fr) minmax(180px, max-content) !important;
  gap: 10px !important;
  align-items: end !important;
  padding: 10px !important;
  border: 1px solid var(--brand-border) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

#root .workspace .my-day .production-form .material-usage-row label {
  min-width: 0 !important;
  display: grid !important;
  gap: 6px !important;
  align-items: stretch !important;
}

#root .workspace .my-day .production-form .material-usage-row label > span {
  color: var(--brand-muted) !important;
  line-height: 1.15 !important;
}

#root .workspace .my-day .production-form .material-usage-row select,
#root .workspace .my-day .production-form .material-usage-row input {
  width: 100% !important;
  min-width: 0 !important;
}

#root .workspace .my-day .production-form .material-usage-row [data-remove-material-usage] {
  width: 100% !important;
  min-width: 180px !important;
  min-height: 40px !important;
}

#root .workspace .my-day .production-form .material-usage-fieldset [data-add-material-usage] {
  grid-column: 4 !important;
  width: 100% !important;
  min-width: 180px !important;
  min-height: 40px !important;
  justify-self: stretch !important;
  white-space: nowrap !important;
}

@media (max-width: 700px) {
  #root .workspace .my-day .production-form .material-usage-topline {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

#root .workspace .my-day .production-form .material-usage-row {
    grid-template-columns: 1fr !important;
  }

#root .workspace .my-day .production-form .material-usage-actions {
    grid-template-columns: 1fr !important;
    justify-content: stretch !important;
  }

#root .workspace .my-day .production-form .material-usage-fieldset [data-add-material-usage] {
    grid-column: 1 !important;
    width: 100% !important;
    justify-self: stretch !important;
  }
}

#root .workspace .project-detail-page .production-panel {
  border: 1px solid var(--brand-border) !important;
  border-radius: 8px !important;
  background: var(--brand-panel) !important;
  color: var(--brand-text) !important;
  box-shadow: 0 14px 30px rgba(var(--brand-command-rgb), 0.06) !important;
}

#root .workspace .project-detail-page .production-panel > .section-title,
#root .workspace .project-detail-page .production-panel > summary.section-title {
  min-height: 52px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--brand-primary) !important;
  border-radius: 8px !important;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-strong)) !important;
  color: var(--brand-on-primary) !important;
  font-size: 14px !important;
  font-weight: 950 !important;
  box-shadow: 0 12px 28px rgba(var(--brand-primary-rgb), 0.18) !important;
}

#root .workspace .project-detail-page .production-panel > .section-title strong,
#root .workspace .project-detail-page .production-panel > .section-title span,
#root .workspace .project-detail-page .production-panel > summary.section-title strong,
#root .workspace .project-detail-page .production-panel > summary.section-title span,
#root .workspace .project-detail-page .production-panel > summary.section-title b {
  color: var(--brand-on-primary) !important;
}

#root .workspace .project-detail-page .production-panel > .section-title > span,
#root .workspace .project-detail-page .production-panel > summary.section-title > b[data-details-toggle-state] {
  min-height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  justify-self: end !important;
  padding: 0 10px !important;
  border: 1px solid var(--brand-command-border) !important;
  border-radius: 999px !important;
  background: var(--brand-command-gradient) !important;
  color: var(--brand-on-command) !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

#root .workspace .project-detail-page .production-summary .stat,
#root .workspace .project-detail-page .production-log,
#root .workspace .project-detail-page .production-log.approved,
#root .workspace .project-detail-page .production-log.rejected,
#root .workspace .project-detail-page .production-log-grid div,
#root .workspace .project-detail-page .production-notes p,
#root .workspace .project-detail-page .review-note,
#root .workspace .project-detail-page .production-review,
#root .workspace .project-detail-page .production-documents a,
#root .workspace .project-detail-page .material-usage-list span {
  border: 1px solid var(--brand-border) !important;
  border-radius: 8px !important;
  background: var(--brand-surface) !important;
  color: var(--brand-text) !important;
  box-shadow: none !important;
}

#root .workspace .project-detail-page .production-log.approved {
  border-left: 5px solid var(--brand-success) !important;
}

#root .workspace .my-day .my-day-field-report-form {
  display: grid !important;
  gap: 10px !important;
}

#root .workspace .my-day .my-day-field-report-form .field-report-helper {
  grid-column: 1 / -1 !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid var(--brand-border) !important;
  border-left: 5px solid var(--brand-primary) !important;
  border-radius: 8px !important;
  background: var(--brand-panel) !important;
  color: var(--brand-muted) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  line-height: 1.4 !important;
}

#root .workspace .my-day .my-day-field-report-form fieldset.project-form-section {
  grid-column: 1 / -1 !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  min-width: 0 !important;
  border: 1px solid var(--brand-border) !important;
  border-radius: 8px !important;
  background: var(--brand-surface) !important;
  color: var(--brand-text) !important;
  box-shadow: 0 10px 24px rgba(var(--brand-command-rgb), 0.05) !important;
}

#root .workspace .my-day .my-day-field-report-form fieldset.project-form-section.collapsed {
  gap: 0 !important;
  background: var(--brand-panel) !important;
}

#root .workspace .my-day .my-day-field-report-form fieldset.project-form-section.collapsed > :not(legend) {
  display: none !important;
}

#root .workspace .my-day .my-day-field-report-form fieldset.project-form-section > legend {
  grid-column: 1 / -1 !important;
}

#root .workspace .my-day .my-day-field-report-form fieldset.project-form-section label {
  min-width: 0 !important;
}

#root .workspace .my-day .my-day-field-report-form fieldset.project-form-section label.wide,
#root .workspace .my-day .my-day-field-report-form fieldset.project-form-section .field-quick-control-collapsible,
#root .workspace .my-day .my-day-field-report-form fieldset.project-form-section .material-usage-fieldset {
  grid-column: 1 / -1 !important;
}

#root .workspace .my-day .my-day-field-report-form .field-report-work-type {
  grid-column: span 2 !important;
}

#root .workspace .my-day .my-day-field-report-form .field-report-notes-section:not(.collapsed) {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#root .workspace .my-day .my-day-field-report-form .field-report-attachments-section:not(.collapsed) {
  grid-template-columns: 1fr !important;
}

#root .workspace .my-day .my-day-field-report-form .field-report-attachments-section .material-usage-fieldset {
  margin: 0 !important;
}

#root .workspace .my-day .my-day-field-report-form > button[type="submit"] {
  width: min(100%, 320px) !important;
  min-height: 44px !important;
  justify-self: start !important;
}

@media (max-width: 760px) {
  #root .workspace .my-day .my-day-field-report-form fieldset.project-form-section,
#root .workspace .my-day .my-day-field-report-form .field-report-notes-section:not(.collapsed) {
    grid-template-columns: 1fr !important;
  }

#root .workspace .my-day .my-day-field-report-form .field-report-work-type {
    grid-column: 1 / -1 !important;
  }

#root .workspace .my-day .my-day-field-report-form > button[type="submit"] {
    width: 100% !important;
  }
}

#root .workspace .project-detail-page .production-form .material-usage-fieldset {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  min-width: 0 !important;
  padding: 14px !important;
  border: 1px solid var(--brand-border) !important;
  border-radius: 8px !important;
  background: var(--brand-panel) !important;
  color: var(--brand-text) !important;
}

#root .workspace .project-detail-page .production-form .material-usage-fieldset legend {
  width: auto !important;
  margin-left: 0 !important;
  padding: 0 6px !important;
  color: var(--brand-primary-strong) !important;
  font-size: 12px !important;
  font-weight: 950 !important;
  text-transform: uppercase !important;
}

#root .workspace .project-detail-page .production-form .material-usage-help,
#root .workspace .project-detail-page .production-form .material-usage-fieldset > div[data-material-usage-rows],
#root .workspace .project-detail-page .production-form .material-usage-actions {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
}

#root .workspace .project-detail-page .production-form .material-usage-help {
  padding: 9px 10px !important;
  border: 1px solid var(--brand-border) !important;
  border-radius: 8px !important;
  background: var(--brand-surface) !important;
}

#root .workspace .project-detail-page .production-form .material-usage-help span {
  display: block !important;
  color: var(--brand-muted) !important;
  line-height: 1.35 !important;
}

#root .workspace .project-detail-page .production-form .material-usage-fieldset > div[data-material-usage-rows] {
  display: grid !important;
  gap: 8px !important;
}

#root .workspace .project-detail-page .production-form .material-usage-row {
  display: grid !important;
  grid-template-columns: minmax(280px, 2fr) minmax(120px, 0.55fr) minmax(220px, 1.2fr) auto !important;
  gap: 10px !important;
  align-items: end !important;
  min-width: 0 !important;
  padding: 10px !important;
  border: 1px solid var(--brand-border) !important;
  border-radius: 8px !important;
  background: var(--brand-surface) !important;
}

#root .workspace .project-detail-page .production-form .material-usage-row label {
  display: grid !important;
  gap: 6px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#root .workspace .project-detail-page .production-form .material-usage-row label > span {
  color: var(--brand-primary-strong) !important;
  font-size: 11px !important;
  font-weight: 950 !important;
}

#root .workspace .project-detail-page .production-form .material-usage-row select,
#root .workspace .project-detail-page .production-form .material-usage-row input {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 40px !important;
}

#root .workspace .project-detail-page .production-form .material-usage-row [data-remove-material-usage] {
  min-width: 86px !important;
  min-height: 40px !important;
  align-self: end !important;
}

#root .workspace .project-detail-page .production-form .material-usage-actions {
  display: flex !important;
  justify-content: flex-end !important;
}

#root .workspace .project-detail-page .production-form .material-usage-actions [data-add-material-usage] {
  min-width: 168px !important;
  min-height: 40px !important;
}

@media (max-width: 980px) {
  #root .workspace .project-detail-page .production-form .material-usage-row {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.5fr) !important;
  }

#root .workspace .project-detail-page .production-form .material-usage-row label:last-of-type,
#root .workspace .project-detail-page .production-form .material-usage-row [data-remove-material-usage] {
    grid-column: 1 / -1 !important;
  }
}

#root .workspace .project-detail-page .production-log-head b,
#root .workspace .project-detail-page .production-documents a,
#root .workspace .project-detail-page .material-usage-list span {
  min-height: 26px !important;
  display: inline-grid !important;
  place-items: center !important;
  width: max-content !important;
  border: 1px solid color-mix(in srgb, var(--brand-primary) 22%, var(--brand-border)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--brand-primary) 10%, #ffffff) !important;
  color: var(--brand-primary-strong) !important;
  font-size: 11px !important;
  font-weight: 950 !important;
  padding: 0 9px !important;
  text-decoration: none !important;
}

#root .workspace .project-detail-page .production-log.approved .production-log-head b {
  border-color: var(--brand-success) !important;
  background: var(--brand-success) !important;
  color: #ffffff !important;
}

#root .workspace .project-detail-page .production-log.rejected {
  border-left: 5px solid var(--brand-danger) !important;
}

#root .workspace .project-detail-page .production-log.rejected .production-log-head b {
  border-color: var(--brand-danger) !important;
  background: var(--brand-danger) !important;
  color: #ffffff !important;
}

#root .workspace .project-detail-page .production-log-head span,
#root .workspace .project-detail-page .production-log-head small,
#root .workspace .project-detail-page .production-log-grid span,
#root .workspace .project-detail-page .production-notes strong,
#root .workspace .project-detail-page .review-note strong {
  color: var(--brand-muted) !important;
}

#root .workspace .project-detail-page .production-log-head strong,
#root .workspace .project-detail-page .production-log-grid strong,
#root .workspace .project-detail-page .production-notes p,
#root .workspace .project-detail-page .review-note {
  color: var(--brand-text) !important;
}

#root .workspace .project-detail-page .production-review button:not(.danger) {
  border-color: var(--brand-primary) !important;
  background: var(--brand-primary) !important;
  color: var(--brand-on-primary) !important;
  box-shadow: var(--theme-primary-shadow) !important;
}

#root .workspace .project-detail-page .production-review button.danger {
  border: 1px solid color-mix(in srgb, var(--brand-danger) 34%, var(--brand-border)) !important;
  background: var(--brand-command-gradient) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
