:root {
  --bg: #f7f7f8;
  --card-bg: #ffffff;
  --text: #222;
  --muted: #666;
  --primary: #2b7fff;
  --accent: #0ea5e9;
  --border: #e6e6e8;
  --shadow: 0 6px 20px rgba(38, 38, 38, 0.06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  position: sticky;
  top: 0; z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.brand h1 { margin: 0; font-size: 20px; }
.brand .version { margin-left: 8px; color: var(--muted); font-size: 12px; }

.actions { display: flex; gap: 10px; align-items: center; }
.actions button, .file-input {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.actions button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.actions button.ghost { background: transparent; }
.file-input input { display: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 20px; }
.intro { color: var(--muted); margin-bottom: 16px; }

.materials { display: grid; grid-template-columns: 1fr; gap: 12px; }

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.card-header { display: none; }
.card-title { font-weight: 600; }
.unit { display: none; }

.row { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 0.9fr 0.35fr 2.15fr; gap: 8px; align-items: center; }
.row label { font-size: 12px; color: var(--muted); }
.row select, .row input[type="number"], .row input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.row .price { text-align: right; font-variant-numeric: tabular-nums; }

.item-name { font-weight: 700; color: var(--text); font-size: 16px; }
.line-total { text-align: right; font-weight: 700; color: var(--accent); font-size: 16px; }
.unit-inline { color: var(--muted); font-size: 12px; text-align: left; white-space: nowrap; }
.note-inline { width: 100%; padding: 8px; border: 1px dashed var(--border); border-radius: 8px; }
.note { display: none; }



.error { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1); }
.hint { color: #ef4444; font-size: 12px; }

/* 配置编辑器 */
.config-editor { margin-top: 16px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.editor-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.editor-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.editor-item { padding: 10px; border: 1px dashed var(--border); border-radius: 10px; }
.editor-row { display: grid; grid-template-columns: 1.4fr 0.6fr 2fr auto; gap: 8px; align-items: center; }
.editor-row label { font-size: 12px; color: var(--muted); }
.options-list { margin-top: 8px; display: grid; grid-template-columns: 1fr; gap: 6px; }
.option-row { display: grid; grid-template-columns: 0.8fr 1fr 0.4fr 1.2fr auto; gap: 6px; align-items: center; }
.editor-btn { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.editor-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.editor-btn.ghost { background: transparent; }
.editor-note { width: 100%; padding: 8px; border: 1px dashed var(--border); border-radius: 8px; }

/* 新版配置编辑器美化样式 */
.editor-titlebar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.editor-title { margin: 0; font-size: 18px; font-weight: 600; }

.material-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.material-header { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 10px 12px; background: #fafafa; border-bottom: 1px solid var(--border); }
.material-name-input { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; font-weight: 600; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #eef3ff; color: #2b7fff; font-size: 12px; border: 1px solid #cfe0ff; }
.icon-btn { padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.icon-btn.danger { color: #ef4444; border-color: #fecaca; background: #fff5f5; }
.material-body { padding: 12px; }

.editor-block { margin-bottom: 12px; }
.block-title { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.option-table { width: 100%; border-collapse: collapse; }
.option-table thead th { text-align: left; font-size: 12px; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--border); background: #fafafa; }
.option-table tbody td { padding: 8px; border-bottom: 1px solid var(--border); }
.option-table input[type="text"], .option-table input[type="number"] { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.inline-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.checkbox { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

/* 报价单名称输入区域样式 */
.quote-name-section {
  margin-bottom: 20px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.quote-name-input {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quote-name-input label {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.quote-name-input input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
}

.quote-name-input input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.1);
}

.quote-total-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
  border: 1px solid var(--primary);
  border-radius: 8px;
  white-space: nowrap;
}

.total-label {
  font-weight: 600;
  color: var(--primary);
  font-size: 14px;
}

.total-amount {
  font-weight: 700;
  color: var(--primary);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

/* 使用说明页面样式 */
.help-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.help-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.help-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px 0;
}

.help-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

.help-content {
  display: grid;
  gap: 24px;
}

.help-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.help-section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.help-section-icon {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.help-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--accent);
}

.help-step:last-child {
  margin-bottom: 0;
}

.help-step-number {
  background: var(--accent);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}

.help-step-content {
  flex: 1;
}

.help-step-title {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px 0;
  font-size: 14px;
}

.help-step-desc {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.help-tips {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 16px;
  margin-top: 20px;
}

.help-tips-title {
  font-weight: 600;
  color: #856404;
  margin: 0 0 8px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.help-tips-content {
  color: #856404;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.help-back-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-top: 30px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
}

.help-back-btn:hover {
  background: #1e5bb8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(43, 127, 255, 0.3);
}

.help-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.help-feature-item {
  background: #f8f9fa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.help-feature-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.help-feature-name {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px 0;
  font-size: 14px;
}

.help-feature-desc {
  color: var(--muted);
  margin: 0;
  font-size: 12px;
}
}

/* 报价单列表样式 */
.quotes-list-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.quotes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.quotes-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.quotes-title h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.quotes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.quote-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
  transition: all 0.2s ease;
}

.quote-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(38, 38, 38, 0.1);
}

.quote-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.quote-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.quote-actions {
  display: flex;
  gap: 8px;
}

.quote-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.quote-btn:hover {
  background: var(--bg);
}

.quote-btn.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.quote-btn.danger {
  color: #ef4444;
  border-color: #fecaca;
  background: #fff5f5;
}

.quote-btn.danger:hover {
  background: #fef2f2;
}

.quote-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.quote-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quote-meta-label {
  font-size: 12px;
  color: var(--muted);
}

.quote-meta-value {
  font-weight: 500;
  color: var(--text);
}

.quote-total {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

/* 报价单详情样式 */
.quote-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.quote-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.quote-detail-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.quote-detail-title h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.quote-detail-info {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.quote-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.quote-detail-materials {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.materials-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.readonly-materials {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.readonly-card {
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
}

.readonly-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.3fr 0.9fr 0.35fr 2.15fr;
  gap: 8px;
  align-items: center;
}

.readonly-value {
  padding: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty-state h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 500;
}

.empty-state p {
  margin: 0;
  font-size: 14px;
}

/* 版本管理样式 */
.version-management, .version-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.version-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.version-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.version-title h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.back-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: var(--bg);
  border-color: var(--primary);
}

.btn-primary {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: #1e6bff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(43, 127, 255, 0.3);
}

.btn-secondary {
  padding: 8px 16px;
  border: 1px solid #6c757d;
  border-radius: 6px;
  background: white;
  color: #6c757d;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #6c757d;
  color: white;
  border-color: #6c757d;
}

.btn-danger {
  padding: 8px 16px;
  border: 1px solid #dc3545;
  border-radius: 6px;
  background: white;
  color: #dc3545;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.btn-danger:hover {
  background: #dc3545;
  color: white;
}

/* 版本列表样式 - 使用与报价单列表相同的样式 */
.version-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.version-card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
}

.version-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: #007bff;
}

.version-card.active-version {
  border-color: #28a745;
  background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.active-badge {
  background: #28a745;
  color: white;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 12px;
  margin-left: 10px;
  font-weight: normal;
}

.version-info {
  margin-bottom: 15px;
}

.version-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
}

.version-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.version-time {
  font-size: 14px;
  color: #666;
}

.version-remark {
  font-size: 14px;
  color: #888;
  font-style: italic;
}

.version-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 输入对话框样式 */
.input-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.input-dialog {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  min-width: 400px;
  max-width: 90vw;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.input-dialog h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: var(--text);
}

.input-dialog input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.input-dialog input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.1);
}

.input-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.input-dialog-actions button {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.input-dialog-actions .btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.input-dialog-actions .btn-secondary {
  background: white;
  color: var(--text);
}

/* Dialog overlay and dialog styles for delete/clone confirmations */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.dialog {
  background: var(--card-bg);
  border-radius: 12px;
  min-width: 400px;
  max-width: 90vw;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.dialog-header {
  padding: 20px 24px 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dialog-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
}

.dialog-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.dialog-close:hover {
  background: var(--hover-bg);
  color: var(--text);
}

.dialog-body {
  padding: 20px 24px;
}

.dialog-body p {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.dialog-body input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  margin-top: 12px;
}

.dialog-body input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.1);
}

.dialog-footer {
  padding: 16px 24px 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.dialog-footer button {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dialog-footer .btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.dialog-footer .btn-primary:hover {
  background: #1c5aa8;
  border-color: #1c5aa8;
}

.dialog-footer .btn-secondary {
  background: white;
  color: var(--text);
}

.dialog-footer .btn-secondary:hover {
  background: var(--hover-bg);
}

.dialog-footer .btn-danger {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

.dialog-footer .btn-danger:hover {
  background: #c82333;
  border-color: #c82333;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 16px;
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: 12px;
}

/* 版本详情页样式 */
.version-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.version-detail-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}

.version-form {
  display: grid;
  gap: 24px;
}

.form-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.form-section h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(43, 127, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px;
  background: var(--bg);
  border-radius: 12px;
}

/* 配置编辑器样式 */
.config-editor-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.editor-actions {
  margin-bottom: 20px;
}

.editor-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.editor-btn:hover {
  background: var(--bg);
  border-color: var(--primary);
}

.materials-list {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.material-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.material-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}

.material-name {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-right: 12px;
}

.material-body {
  padding: 20px;
}

.options-section {
  margin-top: 20px;
}

.options-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.options-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.options-table {
  overflow-x: auto;
}

.options-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  table-layout: fixed;
}

.options-table th:nth-child(1) { width: 20%; } /* 品牌 */
.options-table th:nth-child(2) { width: 20%; } /* 型号 */
.options-table th:nth-child(3) { width: 15%; } /* 单价 - 更窄 */
.options-table th:nth-child(4) { width: 30%; } /* 备注 - 更宽 */
.options-table th:nth-child(5) { width: 15%; } /* 操作 */

.options-table th {
  background: #fafafa;
  padding: 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.options-table th:nth-child(5) {
  text-align: center;
}

.options-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.options-table td:last-child {
  text-align: center;
}

.options-table input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
}

.notes-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.notes-section h4 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.notes-section textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
}