/* Browser autofill should keep the transparent login field treatment. */
#authScreen #loginForm input {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff !important;
}
#authScreen input:autofill {
  background: transparent;
  background-clip: text;
  color: #fff;
  caret-color: #fff;
}
#authScreen input:-webkit-autofill,
#authScreen input:-webkit-autofill:hover,
#authScreen input:-webkit-autofill:focus,
#authScreen input:-webkit-autofill:active {
  -webkit-background-clip: text;
  background-clip: text;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px transparent inset;
  transition: background-color 999999s ease-out 0s;
}

#modalRoot .drawer-backdrop {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}
#modalRoot .modal.request-editor {
  display: flex;
  flex-direction: column;
  width: min(880px, 100%);
  max-height: 100dvh;
  height: 100dvh;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
  animation: order-panel-enter 0.2s ease-out;
}
#modalRoot .request-editor .modal-head {
  padding: 22px 28px;
  flex: 0 0 auto;
}
#modalRoot .request-editor .modal-head h3 {
  font-size: 19px;
}
#modalRoot .request-editor .modal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
}
#modalRoot .order-editor {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
}
#modalRoot .editor-fields {
  flex: 1;
  padding: 24px 28px 0;
}
#modalRoot .editor-intro {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}
#modalRoot .editor-section {
  padding: 0 0 25px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
#modalRoot .editor-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}
#modalRoot .editor-section-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
#modalRoot .editor-section-title h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 550;
}
#modalRoot .editor-section-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
#modalRoot .section-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
#modalRoot .editor-section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
#modalRoot .editor-section-heading > button {
  flex-shrink: 0;
}
#modalRoot .order-editor #orderNumber {
  max-width: 320px;
}
#modalRoot .order-editor label {
  margin: 0 0 8px;
}
#modalRoot .order-editor .form-grid label {
  margin-bottom: 16px;
}
#modalRoot .order-editor textarea {
  min-height: 80px;
}
#modalRoot .order-editor .optional {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin-left: 3px;
}
#modalRoot .item-count {
  display: inline-block;
  padding: 0 5px;
  margin-left: 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  color: var(--muted);
}
#modalRoot .order-grid-wrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
}
#modalRoot .order-grid {
  width: 100%;
  min-width: 590px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 14px;
}
#modalRoot .order-grid th {
  padding: 9px 10px;
  text-align: left;
  font-weight: 450;
  font-size: 12px;
  color: var(--muted);
  background: var(--panel2);
  border-bottom: 1px solid var(--line);
}
#modalRoot .order-grid th:nth-child(1) {
  width: 34px;
}
#modalRoot .order-grid th:nth-child(2) {
  width: 23%;
}
#modalRoot .order-grid th:nth-child(3) {
  width: 21%;
}
#modalRoot .order-grid th:last-child {
  width: 35px;
}
#modalRoot .order-grid td {
  padding: 7px 5px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
#modalRoot .order-grid tr:last-child td {
  border-bottom: 0;
}
#modalRoot .order-grid .item-number {
  padding-left: 11px;
  color: var(--muted);
  font-size: 12px;
}
#modalRoot .order-grid input {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid transparent;
  background: var(--bg);
  border-radius: 3px;
  font-size: 14px;
}
#modalRoot .order-grid input:hover {
  border-color: var(--line);
}
#modalRoot .order-grid input:focus {
  border-color: var(--focus, var(--accent));
}
#modalRoot .remove-item {
  display: grid;
  place-items: center;
  width: 27px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-size: 21px;
}
#modalRoot .remove-item:hover {
  background: var(--danger-bg);
  color: var(--danger);
}
#modalRoot .add-item {
  display: block;
  width: 100%;
  min-height: 38px;
  margin-top: 10px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 4px;
  font-size: 14px;
}
#modalRoot .add-item:hover {
  background: var(--hover);
}
#modalRoot .order-editor .field-helper {
  font-size: 12px;
  margin-top: 9px;
}
#modalRoot .paste-area {
  padding: 14px;
  margin-bottom: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
}
#modalRoot .paste-area textarea {
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
#modalRoot .paste-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}
#modalRoot .legacy-quantity {
  color: var(--warning);
  background: var(--warning-bg);
  border-color: transparent;
  font-size: 12px;
}
#modalRoot .attachment-label {
  margin-top: 18px !important;
}
#modalRoot .attachment-drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 5px;
  cursor: pointer;
}
#modalRoot .attachment-drop:hover {
  background: var(--hover);
}
#modalRoot .attachment-drop:focus-within {
  outline: 2px solid var(--focus, var(--accent));
  outline-offset: 3px;
}
#modalRoot .attachment-drop input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
#modalRoot .attachment-drop b {
  font-size: 14px;
  font-weight: 500;
}
#modalRoot .attachment-drop > span:last-of-type {
  font-size: 12px;
  color: var(--muted);
}
#modalRoot .attachment-plus {
  font-size: 22px;
  color: var(--muted);
}
#modalRoot .editor-file {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 5px 0;
  font-size: 12px;
}
#modalRoot .editor-file span {
  overflow-wrap: anywhere;
}
#modalRoot .editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
#modalRoot .editor-footer > div {
  display: flex;
  gap: 8px;
}
#modalRoot .editor-footer .form-error {
  grid-column: 1/-1;
  min-height: 0;
  color: var(--danger);
}
#modalRoot .editor-footer .form-error:empty {
  display: none;
}
#modalRoot .detail-items {
  margin: 20px 0;
}
#modalRoot .detail-items h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 550;
}
#modalRoot .detail-item-table {
  table-layout: auto;
  min-width: 380px;
}
#modalRoot .detail-item-table th:nth-child(n) {
  width: auto;
}
#modalRoot .detail-item-table td {
  padding: 12px 10px;
  overflow-wrap: anywhere;
}
@keyframes order-panel-enter {
  from {
    transform: translateX(28px);
    opacity: 0.65;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@media (max-width: 620px) {
  #modalRoot .request-editor .modal-head {
    padding: 18px 16px;
  }
  #modalRoot .editor-fields {
    padding: 20px 16px 0;
  }
  #modalRoot .editor-section-heading {
    flex-direction: column;
    gap: 0;
    margin-bottom: 14px;
  }
  #modalRoot .order-editor #orderNumber {
    max-width: none;
  }
  #modalRoot .editor-footer {
    padding: 14px 16px;
  }
  #modalRoot .editor-footer > span {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #modalRoot .modal.request-editor {
    animation: none;
  }
}

/* Readable type scale v2. */
