/* Shared form shell (fa-fx-form / fa-form-sheet) — Orange + FixedAsset dual-rail modules */
.fa-form-sheet {
  width: 100%;
  max-width: none;
  padding: 0;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.fa-form-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.fa-form-sheet .fa-label {
  display: block;
}

.fa-form-sheet .fa-field,
.fa-form-sheet input.fa-field,
.fa-form-sheet select.fa-field {
  width: 100%;
  max-width: none;
  height: 32px;
  padding: 4px 11px;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  box-sizing: border-box;
}

.fa-form-sheet .fa-field:focus {
  border-color: #40a9ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.fa-form-sheet select.fa-field {
  cursor: pointer;
}

.fa-page-header-split {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 16px;
}

/* —— 资产卡片新建/编辑：图二式顶栏 + 左侧锚点 + 主区三栏分组 —— */
body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

/* 只读详情（如随手记）：由 layout-body 整体纵向滚动，避免 fa-fx-form__main 内部分区滚动条 */
body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll {
  overflow: auto;
}

body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form,
body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__body,
body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__main {
  flex: none;
  min-height: auto;
}

body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__main {
  overflow: visible;
}

.fa-fx-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
}

.fa-fx-form__form {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
}

/* 与资产卡片等页一致：栅格内 label + fa-field（不依赖 fa-form-sheet） */
.fa-fx-form .fa-label {
  display: block;
  font-size: 1rem;
  line-height: 1.25rem;
  min-width: 0;
}

.fa-fx-form .fa-field {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.625rem;
  border-radius: 0.375rem;
  border: 1px solid rgb(226 232 240);
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.fa-fx-form .fa-field:focus {
  border-color: rgb(96 165 250);
  box-shadow: 0 0 0 1px rgb(96 165 250);
}

.fa-fx-form input[type="date"].fa-field {
  min-height: 2.625rem;
}

.fa-fx-form textarea.fa-field {
  min-height: 4.5rem;
  height: auto;
  line-height: 1.5;
  resize: vertical;
}

.fa-fx-form select.fa-field {
  height: auto;
  min-height: 2.625rem;
  background-color: #fff;
  cursor: pointer;
}

/* 只读提示（如「保存后自动生成」），与 fa-field 视觉对齐 */
.fa-fx-form__readonly-hint {
  display: flex;
  align-items: center;
  min-height: 2.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid rgb(226 232 240);
  background: #f8fafc;
  font-size: 1rem;
  color: rgb(100 116 139);
  box-sizing: border-box;
}

.fa-fx-form__readonly-hint--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: rgb(30 41 59);
}

.fa-fx-form__topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  flex-shrink: 0;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  box-sizing: border-box;
}

.fa-fx-form__topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.fa-fx-form__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  color: rgba(0, 0, 0, 0.65);
  border: 1px solid #d9d9d9;
  background: #fff;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.fa-fx-form__back:hover {
  color: #1890ff;
  border-color: #1890ff;
}

.fa-fx-form__back svg {
  width: 20px;
  height: 20px;
}

.fa-fx-form__title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  letter-spacing: 0.02em;
}

.fa-fx-form__subtitle {
  margin: 6px 0 0;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.45);
}

.fa-fx-form__topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.fa-fx-form__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  font-size: 26px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.35);
  text-decoration: none;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.fa-fx-form__close:hover {
  color: rgba(0, 0, 0, 0.75);
  background: rgba(0, 0, 0, 0.04);
}

.fa-fx-form__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 18px;
  font-size: 16px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid transparent;
  box-sizing: border-box;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}

.fa-fx-form__btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.fa-fx-form__btn--primary {
  color: #fff;
  background: #1890ff;
  border-color: #1890ff;
}

.fa-fx-form__btn--primary:hover:not(:disabled) {
  background: #40a9ff;
  border-color: #40a9ff;
}

.fa-fx-form__btn--outline {
  color: rgba(0, 0, 0, 0.85);
  background: #fff;
  border-color: #d9d9d9;
}

.fa-fx-form__btn--outline:hover:not(:disabled) {
  color: #1890ff;
  border-color: #1890ff;
}

.fa-fx-form__alert {
  flex-shrink: 0;
  margin: 0 20px 0;
  padding: 10px 14px;
  font-size: 16px;
  color: #a8071a;
  background: #fff2f0;
  border: 1px solid #ffccc7;
  border-radius: 4px;
}

.fa-fx-form__body {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  gap: 0;
}

.fa-fx-form__rail {
  flex-shrink: 0;
  width: 132px;
  padding: 16px 0 16px 12px;
  background: #fafafa;
  border-right: 1px solid #f0f0f0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fa-fx-form__rail-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.65);
  background: transparent;
  border: none;
  border-radius: 4px 0 0 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.fa-fx-form__rail-btn:hover {
  color: #1890ff;
  background: rgba(24, 144, 255, 0.06);
}

.fa-fx-form__rail-btn.is-active {
  color: #1890ff;
  font-weight: 500;
  background: #e6f7ff;
  border-right: 3px solid #1890ff;
  margin-right: -1px;
}

.fa-fx-form__rail-btn:focus-visible {
  outline: 2px solid #1890ff;
  outline-offset: 2px;
}

.fa-fx-form__main {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 24px;
  box-sizing: border-box;
  background: #f0f2f5;
}

.fa-fx-form__card {
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  padding: 20px 22px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  box-sizing: border-box;
}

.fa-fx-form__card-title {
  margin: 0 0 8px;
  padding-left: 10px;
  border-left: 4px solid #1890ff;
  font-size: 20px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
  line-height: 1.35;
}

.fa-fx-form__card-desc {
  margin: 0 0 18px;
  padding-left: 14px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(0, 0, 0, 0.45);
}

.fa-fx-form__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 20px;
}

@media (max-width: 1100px) {
  .fa-fx-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fa-fx-form__rail {
    width: 112px;
    padding-left: 8px;
  }

  .fa-fx-form__rail-btn {
    padding: 8px 8px;
    font-size: 15px;
  }

  .fa-fx-form__grid {
    grid-template-columns: 1fr;
  }
}

.fa-fx-form__field-span3 {
  grid-column: 1 / -1;
}

.fa-fx-form__grid--inset {
  margin-top: 4px;
  padding: 16px;
  border-radius: 6px;
  border: 1px solid #f0f0f0;
  background: #fafafa;
}

.fa-fx-form__subhead {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 12px;
  font-size: 17px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
}

.fa-fx-form__subhead:first-child {
  margin-top: 0;
}

.fa-fx-form__subhead-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
}

.fa-fx-form__label-text {
  display: block;
  margin-bottom: 8px;
  color: rgba(0, 0, 0, 0.75);
  font-size: 16px;
}

.fa-fx-form__req {
  color: #ff4d4f;
  margin-right: 2px;
}

.fa-fx-form__err {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: #ff4d4f;
}

.fa-fx-form__hint {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.45);
}

.fa-fx-form__input-money {
  position: relative;
  display: flex;
  align-items: stretch;
}

.fa-fx-form__input-money .fa-field {
  flex: 1;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.fa-fx-form__suffix {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.45);
  background: #fafafa;
  border: 1px solid rgb(226 232 240);
  border-left: none;
  border-radius: 0 0.375rem 0.375rem 0;
  box-sizing: border-box;
}

.fa-fx-form__readonly {
  background: #fafafa !important;
  color: rgba(0, 0, 0, 0.65);
  cursor: default;
}

.fa-fx-form__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 20px 16px 8px;
  margin-top: 4px;
}

.fa-fx-form__footer .fa-fx-form__btn--primary {
  min-width: 120px;
}
#orange-layout-body.fa-fx-form-layout,
#enterprise-layout-body.fa-fx-form-layout,
body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
}

#orange-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll,
#enterprise-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll,
body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll {
  overflow: auto;
}

#orange-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form,
#orange-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__body,
#orange-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__main,
#enterprise-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form,
#enterprise-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__body,
#enterprise-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__main,
body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form,
body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__body,
body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__main {
  flex: none;
  min-height: auto;
}

#orange-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__main,
#enterprise-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__main,
body.fa-fixedasset-shell #fa-layout-body.fa-fx-form-layout.fa-fx-form-layout--page-scroll .fa-fx-form__main {
  overflow: visible;
}

#orange-layout-body.crm-page-full,
#orange-layout-body.tms-page-full,
body.fa-fixedasset-shell #fa-layout-body.crm-page-full,
body.fa-fixedasset-shell #fa-layout-body.tms-page-full {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 56px);
  box-sizing: border-box;
  background-color: #fff;
}