body.factory-order-request-open {
  overflow: hidden !important;
}

.factory-order-request-backdrop {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(6px);
}

.factory-order-request-backdrop[hidden] {
  display: none !important;
}

.factory-order-request-field[hidden],
.factory-order-request-service-fields[hidden],
.factory-order-request-intercept-types[hidden],
.factory-order-request-intercept-tools[hidden] {
  display: none !important;
}

.factory-order-request-dialog {
  position: relative;
  width: min(760px, 100%);
  max-height: min(900px, calc(100dvh - 44px));
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d8e1eb;
  border-radius: 17px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
}

.factory-order-request-close {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d8e1eb;
  border-radius: 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  box-shadow: none;
}

.factory-order-request-head {
  position: relative;
  top: auto;
  z-index: auto;
  width: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) max-content minmax(250px, 1.5fr);
  align-items: center;
  justify-content: stretch;
  gap: 28px;
  margin: 0;
  margin-left: 0;
  padding: 25px 58px 18px 24px;
  border-bottom: 1px solid #e5ebf2;
  background: linear-gradient(135deg, rgba(47, 125, 246, 0.08), rgba(16, 185, 129, 0.035));
  box-shadow: none;
  backdrop-filter: none;
  transition: none;
}

.factory-order-request-kicker {
  display: block;
  margin: 0;
  color: #0f9f78;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.factory-order-request-head h2 {
  display: block;
  margin: 0;
  color: #172033;
  font-size: 23px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.factory-order-request-head p {
  margin: 0;
  color: #718096;
  font-size: 12px;
  line-height: 1.65;
}

.factory-order-request-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 24px 0;
  padding: 14px 16px;
  border: 1px solid #dce4ed;
  border-radius: 11px;
  background: #f8fafc;
}

.factory-order-request-summary > div,
.factory-order-request-summary > label {
  min-width: 0;
}

.factory-order-request-summary > label {
  display: grid;
  align-content: start;
  gap: 4px;
}

.factory-order-request-summary span {
  display: block;
  margin-bottom: 4px;
  color: #718096;
  font-size: 10px;
}

.factory-order-request-summary strong {
  display: block;
  overflow: hidden;
  color: #253044;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.factory-order-request-summary input,
.factory-order-request-summary textarea {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #d5dee8;
  border-radius: 7px;
  background: #ffffff;
  color: #253044;
  font: 650 11px/1.45 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  outline: none;
}

.factory-order-request-summary textarea {
  min-height: 46px;
  resize: vertical;
}

.factory-order-request-summary input:focus,
.factory-order-request-summary textarea:focus {
  border-color: #2f7df6;
  box-shadow: 0 0 0 3px rgba(47, 125, 246, 0.12);
}

.factory-order-request-summary-product {
  grid-column: 1 / -1;
  padding-top: 9px;
  border-top: 1px solid #e3e9f0;
}

.factory-order-request-form {
  padding: 18px 24px 24px;
}

.factory-order-request-grid,
.factory-order-request-service-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.factory-order-request-service-fields {
  grid-column: 1 / -1;
}

.factory-order-request-intercept-types {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.factory-order-request-intercept-types legend {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0 0 1px;
  padding: 0;
  color: #526175;
  font-size: 11px;
  font-weight: 750;
}

.factory-order-request-intercept-types legend em {
  margin-right: 4px;
  color: #ef4444;
  font-style: normal;
}

.factory-order-request-intercept-option {
  min-width: 0;
  min-height: 61px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid #d5dee8;
  border-radius: 10px;
  background: #ffffff;
  color: #253044;
  cursor: pointer;
}

.factory-order-request-intercept-option:has(input:checked) {
  border-color: #2f7df6;
  background: rgba(47, 125, 246, 0.07);
  box-shadow: 0 0 0 3px rgba(47, 125, 246, 0.1);
}

.factory-order-request-intercept-option input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #2f7df6;
}

.factory-order-request-intercept-option > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.factory-order-request-intercept-option b {
  font-size: 12px;
}

.factory-order-request-intercept-option small {
  color: #8390a1;
  font-size: 10px;
}

.factory-order-request-field {
  min-width: 0;
  display: grid;
  gap: 7px;
  color: #526175;
  font-size: 11px;
  font-weight: 750;
}

.factory-order-request-field.full {
  grid-column: 1 / -1;
}

.factory-order-request-field > span em {
  margin-right: 4px;
  color: #ef4444;
  font-style: normal;
}

.factory-order-request-field input,
.factory-order-request-field select,
.factory-order-request-field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #d5dee8;
  border-radius: 9px;
  background: #ffffff;
  color: #172033;
  font: 600 12px/1.5 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  outline: none;
}

.factory-order-request-field textarea {
  min-height: 82px;
  resize: vertical;
}

.factory-order-request-field input:focus,
.factory-order-request-field select:focus,
.factory-order-request-field textarea:focus {
  border-color: #2f7df6;
  box-shadow: 0 0 0 3px rgba(47, 125, 246, 0.12);
}

.factory-order-request-field > small {
  justify-self: end;
  margin-top: -3px;
  color: #8a98aa;
  font-size: 10px;
}

.factory-order-request-file-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 12px;
  border: 1px dashed #c6d2df;
  border-radius: 9px;
  background: #f8fafc;
}

.factory-order-request-file-row button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #cfd9e4;
  border-radius: 7px;
  background: #ffffff;
  color: #3f4f63;
  font-size: 11px;
  font-weight: 750;
  box-shadow: none;
}

.factory-order-request-file-row span {
  color: #7b899b;
  font-size: 10px;
}

.factory-order-request-message {
  min-height: 20px;
  margin-top: 12px;
  color: #718096;
  font-size: 11px;
  line-height: 1.55;
}

.factory-order-request-message.error {
  color: #dc3545;
}

.factory-order-request-message.pending {
  color: #2f7df6;
}

.factory-order-request-actions,
.factory-order-request-success-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.factory-order-request-intercept-tools {
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-right: auto;
}

.factory-order-request-intercept-upload {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border: 1px dashed #c6d2df;
  border-radius: 8px;
  background: #f8fafc;
}

.factory-order-request-intercept-upload button {
  min-width: 76px !important;
  min-height: 30px !important;
  padding: 5px 8px !important;
  border: 1px solid #cfd9e4;
  background: #ffffff;
  color: #3f4f63;
  font-size: 10px !important;
}

.factory-order-request-intercept-upload span,
.factory-order-request-intercept-responsibility > span {
  color: #7b899b;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.factory-order-request-intercept-responsibility {
  min-width: 130px;
  display: grid;
  gap: 4px;
}

.factory-order-request-intercept-responsibility select {
  width: 100%;
  min-height: 40px;
  padding: 8px 28px 8px 10px;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #ffffff;
  color: #253044;
  font: 700 11px/1.4 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  outline: none;
}

.factory-order-request-actions button,
.factory-order-request-success-actions button {
  min-width: 112px;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.factory-order-request-secondary {
  border: 1px solid #d2dce7;
  background: #ffffff;
  color: #4d5d71;
}

.factory-order-request-primary {
  border: 1px solid #2f7df6;
  background: linear-gradient(135deg, #2f7df6, #1769e8);
  color: #ffffff;
}

.factory-order-request-primary:disabled {
  cursor: wait;
  opacity: 0.65;
}

.factory-order-request-success {
  display: grid;
  justify-items: center;
  padding: 44px 28px 38px;
  text-align: center;
}

.factory-order-request-success[hidden] {
  display: none !important;
}

.factory-order-request-success-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(16, 185, 129, 0.36);
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.11);
  color: #059669;
  font-size: 25px;
  font-weight: 900;
}

.factory-order-request-success h3 {
  margin: 16px 0 0;
  color: #172033;
  font-size: 20px;
}

.factory-order-request-success p {
  max-width: 500px;
  margin: 9px 0 0;
  color: #718096;
  font-size: 12px;
  line-height: 1.7;
}

html[data-theme="dark"] .factory-order-request-backdrop {
  background: rgba(2, 8, 18, 0.76);
}

html[data-theme="dark"] .factory-order-request-dialog {
  border-color: #29415e;
  background: #0c192b;
  color: #edf5fc;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .factory-order-request-close,
html[data-theme="dark"] .factory-order-request-file-row button,
html[data-theme="dark"] .factory-order-request-intercept-upload button,
html[data-theme="dark"] .factory-order-request-secondary {
  border-color: #2b4059;
  background: #112238;
  color: #9eb0c3;
}

html[data-theme="dark"] .factory-order-request-head {
  border-color: rgba(47, 72, 103, 0.58);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(32, 201, 151, 0.035));
}

html[data-theme="dark"] .factory-order-request-head h2,
html[data-theme="dark"] .factory-order-request-success h3 {
  color: #edf5fc;
}

html[data-theme="dark"] .factory-order-request-head p,
html[data-theme="dark"] .factory-order-request-success p {
  color: #8194aa;
}

html[data-theme="dark"] .factory-order-request-kicker {
  color: #54d6af;
}

html[data-theme="dark"] .factory-order-request-summary,
html[data-theme="dark"] .factory-order-request-file-row,
html[data-theme="dark"] .factory-order-request-intercept-upload {
  border-color: #29415e;
  background: #0a1627;
}

html[data-theme="dark"] .factory-order-request-summary span,
html[data-theme="dark"] .factory-order-request-field,
html[data-theme="dark"] .factory-order-request-message {
  color: #8194aa;
}

html[data-theme="dark"] .factory-order-request-summary strong,
html[data-theme="dark"] .factory-order-request-summary-product {
  color: #d9e5ef;
}

html[data-theme="dark"] .factory-order-request-summary-product {
  border-color: #243b55;
}

html[data-theme="dark"] .factory-order-request-summary input,
html[data-theme="dark"] .factory-order-request-summary textarea {
  border-color: #2a405b;
  background: #081423;
  color: #edf4fb;
}

html[data-theme="dark"] .factory-order-request-field input,
html[data-theme="dark"] .factory-order-request-field select,
html[data-theme="dark"] .factory-order-request-field textarea,
html[data-theme="dark"] .factory-order-request-intercept-responsibility select {
  border-color: #2a405b;
  background: #081423;
  color: #edf4fb;
}

html[data-theme="dark"] .factory-order-request-intercept-types legend,
html[data-theme="dark"] .factory-order-request-intercept-option small {
  color: #8194aa;
}

html[data-theme="dark"] .factory-order-request-intercept-option {
  border-color: #2a405b;
  background: #081423;
  color: #edf4fb;
}

html[data-theme="dark"] .factory-order-request-intercept-option:has(input:checked) {
  border-color: #21c7cb;
  background: rgba(33, 199, 203, 0.08);
  box-shadow: 0 0 0 3px rgba(33, 199, 203, 0.08);
}

html[data-theme="dark"] .factory-order-request-success-icon {
  color: #72e0bc;
}

@media (max-width: 620px) {
  .factory-order-request-backdrop {
    place-items: end center;
    padding: 0;
  }

  .factory-order-request-dialog {
    width: 100%;
    max-height: 94dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 17px 17px 0 0;
  }

  .factory-order-request-head {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 21px 52px 15px 16px;
  }

  .factory-order-request-summary {
    grid-template-columns: 1fr;
    margin: 14px 16px 0;
  }

  .factory-order-request-form {
    padding: 15px 16px 22px;
  }

  .factory-order-request-grid,
  .factory-order-request-service-fields,
  .factory-order-request-intercept-types {
    grid-template-columns: 1fr;
  }

  .factory-order-request-field.full,
  .factory-order-request-service-fields,
  .factory-order-request-summary-product {
    grid-column: auto;
  }

  .factory-order-request-actions,
  .factory-order-request-success-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .factory-order-request-actions button,
  .factory-order-request-success-actions button {
    width: 100%;
    min-width: 0;
  }

  .factory-order-request-intercept-tools {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.75fr);
    align-items: end;
    margin-right: 0;
  }

  .factory-order-request-intercept-upload {
    min-width: 0;
  }
}
