/* ==================== 基础重置 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px;
}

/* ==================== 调试栏（测试专用）==================== */
.debug-user-btn {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 10px;
  border: 1px solid #d9d9d9;
  background: #fff;
  font-size: 12px;
  color: #333;
  cursor: pointer;
}
.debug-user-btn.active {
  background: #1890FF;
  border-color: #1890FF;
  color: #fff;
  font-weight: 500;
}

/* ==================== 详情页底部操作按钮区 ==================== */
.detail-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #f0f0f0;
  position: sticky;
  bottom: 56px;   /* 底部导航高度 */
  z-index: 10;
}

.detail-op-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  cursor: pointer;
}

.detail-op-btn.btn-primary { background: #1890FF; color: #fff; }
.detail-op-btn.btn-default { background: #f5f5f5; color: #666; border: 1px solid #d9d9d9; }
.detail-op-btn.btn-success { background: #52c41a; color: #fff; }
.detail-op-btn.btn-danger  { background: #ff4d4f; color: #fff; }

/* ==================== 底部导航 ==================== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: #fff;
  border-top: 1px solid #e8e8e8;
  display: flex;
  z-index: 100;
  max-width: 414px;
  margin: 0 auto;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  font-size: 10px;
}

.tab-item.active { color: #1890FF; }

.tab-icon { font-size: 20px; margin-bottom: 2px; }
.tab-text { font-size: 10px; }

/* ==================== 页面容器 ==================== */
.page { display: none; }
.page.active { display: block; }

.page-container { min-height: 100vh; }

/* ==================== 页面头部 ==================== */
.page-header {
  background: linear-gradient(135deg, #1890FF 0%, #36CFC9 100%);
  color: #fff;
  padding: 16px 16px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.page-header h1 { font-size: 18px; font-weight: 500; }

.page-header.with-back {
  display: flex;
  align-items: center;
  background: #fff;
  color: #333;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.page-header.with-back h1 { flex: 1; font-size: 16px; }

.back-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #333;
  cursor: pointer;
  padding: 4px 8px 4px 0;
}

.page-header.transparent { background: transparent; }

/* ==================== 统计卡片 ==================== */
.stats-container {
  padding: 16px;
  background: linear-gradient(135deg, #1890FF 0%, #36CFC9 100%);
}

.stats-card {
  display: flex;
  background: rgba(255,255,255,0.95);
  border-radius: 12px;
  padding: 20px 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.stats-item {
  flex: 1;
  text-align: center;
  cursor: pointer;
}

.stats-num {
  display: block;
  font-size: 22px;
  font-weight: 600;
  color: #333;
  line-height: 1.2;
}

.stats-num.stats-warning { color: #faad14; }
.stats-num.stats-success { color: #52c41a; }
.stats-num.stats-error { color: #ff4d4f; }
.stats-num.stats-processing { color: #722ed1; }

.stats-label {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

/* ==================== 筛选栏 ==================== */
.filter-bar {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.filter-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #1890FF;
  padding: 6px 14px;
  border: 1px solid #1890FF;
  border-radius: 16px;
  cursor: pointer;
}

.filter-icon { font-size: 12px; }

.refresh-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #666;
  padding: 6px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 16px;
  margin-left: 10px;
  cursor: pointer;
}

/* ==================== 标签栏 ==================== */
.tabs-scroll {
  background: #fff;
  overflow-x: auto;
  border-bottom: 1px solid #e8e8e8;
  -webkit-overflow-scrolling: touch;
}

.tabs-container {
  display: flex;
  padding: 0 12px;
  min-width: max-content;
}

.tab-filter {
  padding: 12px 14px;
  font-size: 14px;
  color: #666;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
}

.tab-filter.active {
  color: #1890FF;
  font-weight: 500;
}

.tab-filter.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: #1890FF;
  border-radius: 2px;
}

/* ==================== 快捷操作 ==================== */
.quick-actions {
  display: flex;
  padding: 14px 16px;
  gap: 14px;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 8px;
  font-size: 14px;
  gap: 6px;
  border: none;
  cursor: pointer;
}

.action-btn.primary {
  background: linear-gradient(135deg, #1890FF 0%, #40a9ff 100%);
  color: #fff;
}

.action-btn.secondary {
  background: #fff;
  color: #1890FF;
  border: 1px solid #1890FF;
}

.action-icon { font-size: 18px; font-weight: 500; }

/* ==================== 列表区域 ==================== */
.list-container { padding: 0 16px 16px; }

/* ==================== 样品卡片 ==================== */
.sample-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  cursor: pointer;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sample-id { font-size: 12px; color: #999; }

.status-tag {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.status-tag.status-draft { background: #fff7e6; color: #fa8c16; }
.status-tag.status-submitted { background: #e6f7ff; color: #1890FF; }
.status-tag.status-received { background: #f9f0ff; color: #722ed1; }
.status-tag.status-approved { background: #f6ffed; color: #52c41a; }
.status-tag.status-rejected { background: #fff2f0; color: #ff4d4f; }

.card-body {
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.sample-name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sample-info { font-size: 13px; color: #666; }
.info-item { color: #666; }
.info-divider { color: #d9d9d9; margin: 0 8px; }

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
}

.footer-left { display: flex; align-items: center; gap: 6px; }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.department { font-size: 12px; color: #666; }
.apply-date { font-size: 12px; color: #999; }

.card-remark {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f0f9ff;
  border-radius: 6px;
  border-left: 4px solid #1890FF;
  font-size: 12px;
  color: #1890FF;
  line-height: 1.5;
}

.approval-tip {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f0f9ff;
  border-radius: 6px;
  border-left: 4px solid #1890FF;
}

.tip-text { font-size: 12px; color: #1890FF; }

/* ==================== 空状态 ==================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 0;
}

.empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-text { font-size: 14px; color: #999; margin-bottom: 20px; }

.empty-btn {
  padding: 10px 32px;
  background: #1890FF;
  color: #fff;
  border-radius: 22px;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

.loading-container {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.loading-text { font-size: 14px; color: #999; }

/* ==================== 详情页 ==================== */
.detail-container { padding: 16px; }

.status-header {
  display: flex;
  align-items: center;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.status-header.status-draft { background: linear-gradient(135deg, #fa8c16 0%, #ffc53d 100%); color: #fff; }
.status-header.status-submitted { background: linear-gradient(135deg, #1890FF 0%, #40a9ff 100%); color: #fff; }
.status-header.status-received { background: linear-gradient(135deg, #722ed1 0%, #b37feb 100%); color: #fff; }
.status-header.status-approved { background: linear-gradient(135deg, #52c41a 0%, #95de64 100%); color: #fff; }
.status-header.status-rejected { background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%); color: #fff; }

.status-header.status-draft .status-text,
.status-header.status-submitted .status-text,
.status-header.status-received .status-text,
.status-header.status-approved .status-text,
.status-header.status-rejected .status-text { color: #fff; }

.status-header.status-draft .status-tip,
.status-header.status-submitted .status-tip,
.status-header.status-received .status-tip,
.status-header.status-approved .status-tip,
.status-header.status-rejected .status-tip { color: rgba(255,255,255,0.85); }

.status-icon { font-size: 28px; margin-right: 12px; }

.status-text { font-size: 16px; font-weight: 500; color: #333; }
.status-tip { font-size: 12px; color: #666; margin-top: 2px; }

.detail-section { margin-bottom: 16px; }

.detail-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin-bottom: 10px;
}

.detail-id {
  font-size: 12px;
  color: #1890FF;
  font-weight: normal;
  cursor: pointer;
}

.detail-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
}

.detail-row:last-child { border-bottom: none; }
.detail-label { color: #666; }
.detail-value { color: #333; text-align: right; max-width: 60%; }
.detail-text { font-size: 14px; color: #333; line-height: 1.6; }

.btn-group {
  display: flex;
  gap: 12px;
  padding: 16px;
}

.btn {
  flex: 1;
  height: 44px;
  border-radius: 8px;
  font-size: 15px;
  border: none;
  cursor: pointer;
}

.btn-primary { background: linear-gradient(135deg, #1890FF, #40a9ff); color: #fff; }
.btn-default { background: #f5f5f5; color: #666; }

/* 三按钮样式 */
.btn-group-three {
  display: flex;
  gap: 10px;
  padding: 16px;
}

.btn-group-three .btn { flex: 1; }

.btn-save {
  background: #fff;
  color: #1890FF;
  border: 1px solid #1890FF;
}

/* 零件工艺计数 */
.gy-count {
  font-size: 13px;
  color: #1890FF;
  font-weight: normal;
  margin-left: 6px;
}

/* 申请页零件工艺列表 */
.gy-list { margin-bottom: 8px; }

.gy-empty {
  text-align: center;
  padding: 20px 0;
  color: #ccc;
  font-size: 14px;
}

.gy-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border: 1px dashed #1890FF;
  border-radius: 8px;
  background: transparent;
  color: #1890FF;
  font-size: 14px;
  cursor: pointer;
  margin-top: 4px;
}

.gy-add-icon { font-size: 18px; font-weight: bold; }

.apply-gy-item {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.apply-gy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.apply-gy-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.apply-gy-actions {
  display: flex;
  gap: 8px;
}

.gy-action-btn {
  color: #1890FF;
  font-size: 12px;
  cursor: pointer;
}

.gy-action-btn.delete { color: #ff4d4f; }

.apply-gy-row {
  display: flex;
  font-size: 13px;
  color: #666;
  padding: 2px 0;
}

.gy-label { color: #999; margin-right: 4px; min-width: 70px; }
.gy-value { color: #333; }

/* ==================== 待审批页面 ==================== */
.approve-header {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title { font-size: 15px; font-weight: 500; }
.header-count {
  font-size: 13px;
  color: #1890FF;
  background: #e6f7ff;
  padding: 2px 10px;
  border-radius: 10px;
}

.approve-list { padding: 12px 16px; }

.approve-card {
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: hidden;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f5;
}

.card-bottom {
  display: flex;
}

.card-btn {
  flex: 1;
  height: 44px;
  border: none;
  font-size: 14px;
  cursor: pointer;
}

.card-btn.reject { background: #fff; color: #ff4d4f; }
.card-btn.approve { background: #1890FF; color: #fff; }

/* ==================== 我的页面 ==================== */
.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 16px;
  background: linear-gradient(135deg, #1890FF 0%, #36CFC9 100%);
  color: #fff;
}

.user-info { display: flex; align-items: center; gap: 12px; }

.user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
}

.user-name { font-size: 17px; font-weight: 500; }
.user-dept { font-size: 13px; opacity: 0.8; margin-top: 2px; }

.user-badge {
  background: rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
}

.mine-stats-card {
  background: #fff;
  margin: 12px 16px;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stats-title { font-size: 15px; font-weight: 500; margin-bottom: 12px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
}

.stats-grid .stats-num { font-size: 20px; }

/* ==================== 菜单 ==================== */
.menu-section { padding: 0 16px; }
.menu-list { background: #fff; border-radius: 12px; overflow: hidden; }

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
}

.menu-item:last-child { border-bottom: none; }

.menu-left { display: flex; align-items: center; gap: 10px; }
.menu-icon { font-size: 18px; }
.menu-title { font-size: 15px; color: #333; }
.menu-count { font-size: 13px; color: #999; margin-right: 6px; }
.menu-badge {
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  margin-right: 6px;
}
.menu-arrow { font-size: 16px; color: #ccc; }

/* ==================== 设置 ==================== */
.setting-section { padding: 16px; }
.setting-list { background: #fff; border-radius: 12px; overflow: hidden; }

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
}

.setting-item:last-child { border-bottom: none; }
.setting-left { display: flex; align-items: center; gap: 10px; }
.setting-icon { font-size: 18px; }
.setting-title { font-size: 15px; color: #333; }
.setting-arrow { font-size: 16px; color: #ccc; }

.version-info {
  text-align: center;
  font-size: 12px;
  color: #999;
  padding: 20px;
}

/* ==================== 开关 ==================== */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background: #ccc;
  border-radius: 24px;
  transition: 0.3s;
}

.slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider { background: #1890FF; }
input:checked + .slider::before { transform: translateX(20px); }

/* ==================== 表单 ==================== */
.form-container { padding: 16px; }

.form-section { margin-bottom: 16px; }

.section-title {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin-bottom: 10px;
}

.required-mark { color: #ff4d4f; }

.form-card {
  background: #fff;
  border-radius: 12px;
  padding: 4px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.form-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  position: relative; /* 为下拉框定位 */
}

.form-item:last-child { border-bottom: none; }
.form-item.required .form-label::before { content: '*'; color: #ff4d4f; margin-right: 2px; }

.form-label { font-size: 15px; color: #333; }
.form-value { font-size: 15px; color: #666; }

.form-input {
  border: none;
  outline: none;
  font-size: 15px;
  text-align: right;
  background: transparent;
  flex: 1;
  color: #333;
}

.form-input::placeholder { color: #ccc; }

.quantity-row { display: flex; align-items: center; flex: 1; }
.quantity-input { flex: 1; text-align: right; }

.form-picker { display: flex; align-items: center; gap: 4px; }
.picker-placeholder { font-size: 15px; color: #ccc; }
.picker-value { font-size: 15px; color: #333; }
.picker-arrow { font-size: 16px; color: #ccc; }

.unit-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f5f5f5;
  border-radius: 6px;
  margin-left: 10px;
  cursor: pointer;
}

.form-textarea {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  resize: none;
  height: 100px;
  background: transparent;
  color: #333;
  line-height: 1.6;
}

.form-textarea::placeholder { color: #ccc; }

.word-count { text-align: right; font-size: 12px; color: #999; }

/* ==================== 弹窗 ==================== */
.modal-mask {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}

.modal-mask.show { display: flex; }

.modal-container {
  background: #fff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 414px;
  max-height: 80vh;
  overflow: hidden;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-title { font-size: 16px; font-weight: 500; }

.modal-close {
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.modal-body { padding: 16px; }

.modal-sample-info {
  background: #f5f7fa;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.modal-sample-name { font-size: 15px; font-weight: 500; display: block; }
.modal-sample-id { font-size: 12px; color: #999; margin-top: 4px; display: block; }

.modal-form .form-label { margin-bottom: 8px; display: block; }

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 16px;
}

.modal-btn {
  flex: 1;
  height: 44px;
  border-radius: 8px;
  font-size: 15px;
  border: none;
  cursor: pointer;
}

.modal-btn.cancel { background: #f5f5f5; color: #666; }
.modal-btn.approve { background: #1890FF; color: #fff; }
.modal-btn.reject { background: #ff4d4f; color: #fff; }

/* ==================== 选择器 ==================== */
.picker-mask {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 900;
}

.picker-mask.show { display: block; }

.picker-container {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  z-index: 901;
  max-width: 414px;
  margin: 0 auto;
}

.picker-container.show { display: block; }

.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.picker-cancel { font-size: 15px; color: #666; cursor: pointer; }
.picker-title { font-size: 16px; font-weight: 500; }
.picker-confirm { font-size: 15px; color: #1890FF; cursor: pointer; }

.picker-options { max-height: 300px; overflow-y: auto; padding: 8px 0; }

.picker-option {
  padding: 14px 16px;
  font-size: 15px;
  text-align: center;
  cursor: pointer;
}

.picker-option.active { color: #1890FF; font-weight: 500; }

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  max-width: 80%;
}

.toast.show { opacity: 1; }

/* ==================== 客户下拉框（已废弃，保留兼容）==================== */
.customer-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
}

.customer-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  color: #333;
  text-align: right;
}

.customer-input::placeholder { color: #ccc; }

/* 内联布局（label左，input右，同一行）*/
.form-item.inline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
  cursor: default;
}

.form-item.inline-item .inline-input {
  text-align: right;
  width: auto;
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  background: transparent;
  color: #333;
  -webkit-appearance: none;
}

/* 需求数量行在 inline-item 下的特殊处理 */
.form-item.inline-item .quantity-row {
  flex: 1;
  justify-content: flex-end;
}

.form-item.inline-item .quantity-input {
  text-align: right;
  max-width: 80px;
}

.customer-dropdown-btn {
  padding: 4px 8px;
  color: #ccc;
  font-size: 10px;
  cursor: pointer;
  transition: transform 0.2s;
}

.customer-dropdown-btn.active { transform: rotate(180deg); }

.customer-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.customer-dropdown.show { display: block; }

.dropdown-item {
  padding: 12px 16px;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
}

.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: #f5f7fa; }
.dropdown-item.active { color: #1890FF; font-weight: 500; }

/* ==================== 表单行 ==================== */
.form-row {
  display: flex;
  gap: 12px;
}

.form-item.half {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-item.half .form-label {
  font-size: 13px;
  color: #666;
}

.form-item.half .form-input {
  text-align: left;
  padding: 8px 0;
  font-size: 15px;
}

.form-item.switch-item {
  cursor: default;
}

.form-item.switch-item .form-label {
  flex: 1;
}

/* ==================== 只读字段 ==================== */
.form-item.readonly {
  cursor: default;
}

.form-item.readonly .form-label::before { display: none; }

.code-text {
  font-family: 'Courier New', monospace;
  color: #1890FF !important;
  font-weight: 500;
}

/* ==================== 选择框 ==================== */
.form-select {
  border: none;
  outline: none;
  font-size: 15px;
  color: #333;
  background: transparent;
  text-align: right;
  width: 100%;
  direction: rtl;
  appearance: none;
  -webkit-appearance: none;
}

.form-select option {
  direction: ltr;
  text-align: left;
}

/* ==================== 详情页操作按钮 ==================== */
.detail-action-btn {
  padding: 4px 12px;
  background: #1890FF;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 13px;
  cursor: pointer;
  margin-left: 8px;
  white-space: nowrap;
}

/* ==================== 零件工艺弹窗 ==================== */
#gyModal {
  z-index: 1100;
  align-items: flex-end;
  justify-content: center;
}

.gy-modal-container {
  background: #fff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 414px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.gy-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.gy-modal-title {
  font-size: 16px;
  font-weight: 500;
  color: #333;
}

.gy-modal-close {
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.gy-modal-tip {
  font-size: 12px;
  color: #999;
  padding: 8px 16px;
  background: #f5f7fa;
  flex-shrink: 0;
}

.gy-modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px;
}

.gy-row {
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 12px;
  position: relative;
}

.gy-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.gy-row-title {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

.gy-row-delete {
  color: #ff4d4f;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 8px;
  border: 1px solid #ff4d4f;
  border-radius: 10px;
}

.gy-row-delete:active {
  background: #fff2f0;
}

.gy-field {
  margin-bottom: 6px;
}

.gy-field:last-child {
  margin-bottom: 0;
}

.gy-field-label {
  font-size: 11px;
  color: #999;
  margin-bottom: 2px;
}

.gy-field-input {
  width: 100%;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 14px;
  color: #333;
  background: #fff;
  outline: none;
  box-sizing: border-box;
}

.gy-field-input:focus {
  border-color: #1890FF;
}

.gy-modal-add {
  padding: 8px 16px 12px;
  flex-shrink: 0;
}

.gy-add-btn {
  width: 100%;
  height: 40px;
  border: 1px dashed #1890FF;
  border-radius: 8px;
  background: transparent;
  color: #1890FF;
  font-size: 14px;
  cursor: pointer;
}

.gy-modal-footer {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.gy-btn-cancel {
  flex: 1;
  height: 44px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #fff;
  color: #666;
  font-size: 15px;
  cursor: pointer;
}

.gy-btn-save {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: 8px;
  background: #1890FF;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
}

.gy-empty {
  text-align: center;
  padding: 32px 0;
  color: #999;
  font-size: 14px;
}

/* 零件工艺列表中"暂无"的提示 */
.gy-list-empty {
  text-align: center;
  padding: 20px 0;
  color: #ccc;
  font-size: 13px;
}
