/* 样机域：状态徽章 + 卡片层次（列表 / 详情 / 申请页共用） */

.sample-wrap {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: calc(100vh - 56px);
}

.sample-wrap > h1 {
  margin: 0 0 16px;
  font-size: 22px;
  color: #0f172a;
  font-weight: 700;
}

.sample-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.sample-card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  padding-left: 12px;
  border-left: 4px solid #2563eb;
  line-height: 1.35;
}

.sample-card--basic h2 { border-left-color: #2563eb; }
.sample-card--items h2 { border-left-color: #64748b; }
.sample-card--agreement h2 { border-left-color: #10b981; }
.sample-card--payment h2 { border-left-color: #f59e0b; }
.sample-card--logistics h2 { border-left-color: #0ea5e9; }
.sample-card--units h2 { border-left-color: #8b5cf6; }

.sample-card-tip {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.sample-hint {
  display: block;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.sample-hint--info {
  color: #1e40af;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.sample-hint--warn {
  color: #92400e;
  background: #fffbeb;
  border-color: #fde68a;
}

.sample-hint--muted {
  color: #64748b;
  background: #f8fafc;
  border-color: #e2e8f0;
}

/* 状态徽章（列表「状态/协议」+ 详情各区块） */
.sample-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  vertical-align: middle;
}

.sample-state-success { color: #166534; background: #dcfce7; border: 1px solid #bbf7d0; }
.sample-state-warning { color: #92400e; background: #fef3c7; border: 1px solid #fde68a; }
.sample-state-danger { color: #b91c1c; background: #fee2e2; border: 1px solid #fecaca; }
.sample-state-info { color: #1e40af; background: #dbeafe; border: 1px solid #bfdbfe; }
.sample-state-pending { color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; }
.sample-state-draft { color: #64748b; background: #f8fafc; border: 1px solid #e2e8f0; }
.sample-state-ship { color: #1d4ed8; background: #dbeafe; border: 1px solid #93c5fd; }
.sample-state-inuse { color: #b45309; background: #fef3c7; border: 1px solid #fcd34d; }
.sample-state-verify { color: #6d28d9; background: #ede9fe; border: 1px solid #c4b5fd; }
.sample-state-done { color: #15803d; background: #dcfce7; border: 1px solid #86efac; }
.sample-state-neutral { color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; }
.sample-state-cancelled { color: #9f1239; background: #fff1f2; border: 1px solid #fecdd3; }

/* 台次进度徽章（列表） */
.sample-progress-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.sample-progress-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.sample-progress-pending { color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; }
.sample-progress-ship { color: #1d4ed8; background: #dbeafe; border: 1px solid #bfdbfe; }
.sample-progress-inuse { color: #b45309; background: #fef3c7; border: 1px solid #fde68a; }
.sample-progress-verify { color: #6d28d9; background: #ede9fe; border: 1px solid #ddd6fe; }
.sample-progress-done { color: #15803d; background: #dcfce7; border: 1px solid #bbf7d0; }
.sample-progress-neutral { color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; }

.sample-status-hint {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
  max-width: 100%;
}

/* 个人转借中标记（与销售持有看板「已转借」同口径，仅布尔不展示对方隐私） */
.sample-personal-lent-out {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fdba74;
  white-space: nowrap;
  vertical-align: middle;
}

/* 表格行悬停 */
table.sample-table tbody tr:hover td {
  background: #f8fafc;
}

table.sample-table thead th {
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
}

@media (max-width: 720px) {
  .sample-state-badge { font-size: 11px; padding: 0 8px; }
}

/* 统一操作弹窗 UI（归还/撤回/签署等） */
.sample-ui-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1300 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  background: rgba(15, 23, 42, 0.48) !important;
  backdrop-filter: blur(1.5px);
}
.sample-ui-modal[hidden] {
  display: none !important;
}
.sample-ui-modal-panel {
  width: min(520px, calc(100vw - 24px)) !important;
  max-height: calc(100vh - 36px) !important;
  overflow: auto !important;
  border-radius: 14px !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22) !important;
  padding: 16px 16px 14px !important;
}
.sample-ui-modal-panel > h3 {
  margin: 0 0 8px !important;
  font-size: 18px !important;
  line-height: 1.35 !important;
  color: #0f172a !important;
}
.sample-ui-modal-tip {
  margin: 0 0 10px !important;
  color: #64748b !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
  letter-spacing: 0 !important;
}
.sample-ui-form {
  display: grid !important;
  gap: 10px !important;
}
.sample-ui-form label {
  display: grid !important;
  gap: 6px !important;
  color: #334155 !important;
  font-size: 13px !important;
}
.sample-return-method-fieldset {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-width: 0 !important;
}
.sample-return-method-fieldset legend {
  padding: 0 !important;
  margin: 0 0 6px !important;
  color: #334155 !important;
  font-size: 13px !important;
}
.sample-return-method-options {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px 16px !important;
}
.sample-return-method-option {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 13px !important;
  cursor: pointer !important;
}
.sample-return-method-option input {
  width: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  accent-color: #1d4ed8 !important;
}
.sample-ui-form input,
.sample-ui-form select,
.sample-ui-form textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 38px !important;
  border-radius: 10px !important;
  border: 1px solid #dbe3f0 !important;
  padding: 8px 10px !important;
  background: #fff !important;
  color: #0f172a !important;
}
.sample-ui-form textarea {
  min-height: 72px !important;
  resize: vertical !important;
}
.sample-ui-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-top: 2px !important;
}
.sample-ui-btn {
  min-height: 34px !important;
  padding: 0 12px !important;
  border-radius: 9px !important;
  border: 1px solid #d4deed !important;
  background: #fff !important;
  color: #1f2937 !important;
  font-size: 13px !important;
  cursor: pointer !important;
}
.sample-ui-btn:hover {
  background: #f8fafc !important;
}
.sample-ui-btn.primary {
  color: #fff !important;
  border-color: #2563eb !important;
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}
.sample-ui-btn.primary:hover {
  filter: brightness(1.04);
}
