/* ===== 装修预算管理后台 — 东方自然风 ===== */
/* 品牌: 广东表里如一工程有限公司 */
/* 色系: 暖铜金 #AE8555 · 岩板深 #2F3943 · 米底 #F5F0E8 · 灰蓝 #7C8A94 */

:root {
  --gold: #AE8555;
  --gold-light: #C9A67A;
  --gold-dark: #8B6F45;
  --slate: #2F3943;
  --slate-light: #3A4855;
  --slate-dark: #1A232D;
  --beige: #F5F0E8;
  --beige-light: #FAF8F5;
  --beige-dark: #E8E3DC;
  --gray: #7C8A94;
  --gray-light: #B0B8C0;
  --gray-lighter: #D0CCC5;
  --green: #5DB075;
  --red: #E57373;
  --orange: #F5A623;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(47,57,67,0.06);
  --shadow-md: 0 4px 12px rgba(47,57,67,0.08);
  --shadow-lg: 0 8px 30px rgba(47,57,67,0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --font-ui: 'DM Sans', 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', monospace;
}

/* === Reset === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--beige);
  color: var(--slate);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(ellipse at 20% 50%, rgba(174,133,85,0.04) 0%, transparent 50%),
                    radial-gradient(ellipse at 80% 20%, rgba(124,138,148,0.03) 0%, transparent 50%);
}

/* === Header — 深色金边 === */
.header {
  background: linear-gradient(135deg, var(--slate-dark) 0%, var(--slate) 100%);
  color: white; padding: 0 32px; height: 64px;
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.2);
  border-bottom: 2px solid var(--gold);
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-logo {
  width: 38px; height: 38px; background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(174,133,85,0.3);
}
.header h1 { font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }
.header .subtitle { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 2px; letter-spacing: 0.3px; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-badge {
  background: rgba(174,133,85,0.2); color: var(--gold-light); padding: 4px 14px;
  border-radius: 20px; font-size: 11px; font-weight: 500; letter-spacing: 0.3px;
  border: 1px solid rgba(174,133,85,0.15);
}

/* === Layout === */
.layout { display: flex; min-height: calc(100vh - 64px); }

/* === Sidebar — 深色岩板纹理 === */
.sidebar {
  width: 240px; background: var(--slate); padding: 20px 0; flex-shrink: 0;
  overflow-y: auto; position: relative;
}
.sidebar::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.03) 0%, transparent 60%);
  pointer-events: none;
}
.sidebar-group { margin-bottom: 4px; }
.sidebar-label {
  padding: 12px 20px 6px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--gray);
}
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px; color: rgba(255,255,255,0.55); text-decoration: none;
  font-size: 13px; font-weight: 500; cursor: pointer;
  border-left: 3px solid transparent; transition: all 0.2s ease;
  position: relative;
}
.sidebar-item:hover {
  background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.85);
}
.sidebar-item.active {
  background: rgba(174,133,85,0.12); color: var(--gold-light);
  border-left-color: var(--gold);
}
.sidebar-item .icon { width: 20px; text-align: center; font-size: 15px; opacity: 0.6; }
.sidebar-item.active .icon { opacity: 1; color: var(--gold); }
.sidebar-item .badge {
  margin-left: auto; background: rgba(255,255,255,0.08); color: var(--gray-light);
  padding: 1px 8px; border-radius: 10px; font-size: 10px; font-weight: 600;
}

/* === Main Content === */
.main {
  flex: 1; padding: 28px 36px; overflow-x: auto;
  max-width: calc(100vw - 240px);
}

/* === Toolbar === */
.toolbar {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px; gap: 16px;
}
.toolbar h2 {
  font-size: 22px; font-weight: 700; color: var(--slate);
  letter-spacing: -0.3px; line-height: 1.3;
}
.toolbar h2 .hint {
  display: block; font-weight: 400; font-size: 13px; color: var(--gray);
  margin-top: 2px; letter-spacing: 0;
}
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dirty-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  background: rgba(245,166,35,0.12); color: var(--orange);
  border: 1px solid rgba(245,166,35,0.25);
  animation: pulse-badge 2s ease-in-out infinite;
}
.dirty-badge.saved {
  background: rgba(93,176,117,0.12); color: var(--green);
  border-color: rgba(93,176,117,0.25);
  animation: none;
}
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.toolbar-actions .search-box {
  display: flex; align-items: center; background: white; border: 1px solid var(--beige-dark);
  border-radius: var(--radius-sm); padding: 0 12px;
  transition: all 0.2s; box-shadow: var(--shadow-sm);
}
.toolbar-actions .search-box:focus-within {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(174,133,85,0.1);
}
.toolbar-actions .search-box input {
  border: none; background: none; padding: 8px 8px; font-size: 13px;
  outline: none; width: 180px; font-family: inherit;
}
.toolbar-actions .search-box i { color: var(--gray-light); font-size: 13px; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 20px; border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  transition: all 0.2s; white-space: nowrap;
  letter-spacing: 0.2px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white; box-shadow: 0 2px 8px rgba(174,133,85,0.25);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(174,133,85,0.35); transform: translateY(-1px); }
.btn-success {
  background: linear-gradient(135deg, #5DB075, #4A9A62);
  color: white; box-shadow: 0 2px 8px rgba(93,176,117,0.25);
}
.btn-success:hover { box-shadow: 0 4px 16px rgba(93,176,117,0.35); transform: translateY(-1px); }
.btn-danger {
  background: linear-gradient(135deg, #E57373, #D35F5F);
  color: white;
}
.btn-danger:hover { transform: translateY(-1px); }
.btn-warning { background: var(--orange); color: white; }
.btn-warning:hover { transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--gray); border: 1px solid var(--beige-dark);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: white; color: var(--slate); border-color: var(--gray-light); }
.btn-outline {
  background: transparent; color: var(--gold); border: 1px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: white; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 4px; }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: var(--radius-sm); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* === Cards — 暖白质感 === */
.card {
  background: white; border-radius: var(--radius); border: 1px solid var(--beige-dark);
  overflow: hidden; margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header { position: relative; }
.card-header .card-count {
  font-weight: 500; font-size: 11px; color: var(--gray);
  background: rgba(124,138,148,0.1); padding: 3px 10px; border-radius: 20px;
}
/* Card info toggle */
.card-info-toggle {
  cursor: pointer; color: var(--gray-light); font-size: 13px;
  padding: 4px 8px; border-radius: 4px; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 4px;
  user-select: none; border: none; background: none; font-family: inherit;
}
.card-info-toggle:hover { color: var(--gold); background: rgba(174,133,85,0.06); }
.card-info-toggle.active { color: var(--gold); }
.card-info-panel {
  display: none; padding: 0 20px 16px;
  border-bottom: 1px solid var(--beige-dark);
  background: var(--beige-light);
  font-size: 12px; color: var(--gray);
  line-height: 1.8;
}
.card-info-panel.show { display: block; }
.card-info-panel .info-row {
  display: flex; align-items: baseline; gap: 12px;
  padding: 4px 0;
}
.card-info-panel .info-key {
  font-weight: 600; color: var(--slate); min-width: 80px; white-space: nowrap;
}
.card-info-panel .info-val { flex: 1; }
.card-info-panel .info-tip {
  margin-top: 8px; padding: 8px 12px;
  background: rgba(174,133,85,0.08); border-radius: 6px;
  border-left: 3px solid var(--gold);
  color: var(--gold-dark); font-weight: 500;
}
.card-body { padding: 0; overflow-x: auto; position: relative; }
.card-body-padded { padding: 24px; }

/* === Section Edit Bar — 金色氛围 === */
.section-edit-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; border-bottom: 1px solid var(--beige-dark);
  background: linear-gradient(90deg, rgba(174,133,85,0.04), transparent);
}
.section-edit-bar .edit-hint { font-size: 12px; color: var(--gray); flex: 1; }
.section-edit-bar .edit-hint i { margin-right: 6px; color: var(--gold); }

/* === Tags === */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2px;
}
.tag-gold { background: rgba(174,133,85,0.12); color: var(--gold-dark); }
.tag-blue { background: rgba(60,130,246,0.1); color: #2563EB; }
.tag-green { background: rgba(93,176,117,0.12); color: #2E7D32; }
.tag-orange { background: rgba(245,166,35,0.12); color: #C75000; }
.tag-red { background: rgba(229,115,115,0.12); color: #C62828; }

/* === Tables — 清晰数据网格 === */
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: var(--beige-light); padding: 11px 16px; text-align: left;
  font-weight: 600; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--gray);
  border-bottom: 2px solid var(--beige-dark);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
tbody td { padding: 10px 16px; border-bottom: 1px solid var(--beige-dark); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: rgba(245,240,232,0.3); }
tbody tr:hover td { background: rgba(174,133,85,0.04); }
tbody tr.section-row td {
  background: var(--slate) !important; color: white; padding: 9px 16px;
  font-weight: 600; font-size: 12px; letter-spacing: 0.5px;
}
tbody tr.section-row:hover td { background: var(--slate-light) !important; }
tbody tr.changed td { background: rgba(245,166,35,0.06) !important; }
tbody tr.changed:hover td { background: rgba(245,166,35,0.1) !important; }

/* === Editable Cells === */
.cell-view {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; min-height: 30px;
  font-family: var(--font-mono); font-weight: 500; font-size: 13px;
  border-radius: 4px; transition: all 0.15s;
}
.cell-view .cell-val { color: var(--slate); }
.cell-view .cell-suffix { color: var(--gray-light); font-size: 11px; }
.cell-view .cell-edit-icon {
  color: var(--gray-lighter); font-size: 11px; opacity: 0;
  transition: opacity 0.2s;
}
.cell-view:hover { background: rgba(174,133,85,0.06); }
.cell-view:hover .cell-edit-icon { opacity: 1; color: var(--gold); }

.cell-input-wrap { display: none; }
.section-editing .cell-input-wrap { display: flex; align-items: center; gap: 6px; }
.section-editing .cell-view { display: none; }

.cell-input-wrap input {
  padding: 6px 10px;
  border: 2px solid var(--beige-dark); border-radius: var(--radius-sm);
  font-size: 13px; font-family: var(--font-mono);
  background: white; transition: all 0.2s; outline: none;
}
.cell-input-wrap input:hover { border-color: var(--gray-light); }
.cell-input-wrap input:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(174,133,85,0.15);
}
.cell-input-wrap .input-suffix { color: var(--gray-light); font-size: 11px; white-space: nowrap; }
.cell-input-wrap .input-check {
  color: var(--green); font-size: 15px; cursor: pointer; opacity: 0;
  transition: opacity 0.15s;
}
.cell-input-wrap:hover .input-check { opacity: 1; }

/* Changed field */
.cell-changed .cell-view .cell-val { color: var(--gold-dark); }
.cell-changed .cell-input-wrap input { border-color: var(--orange); background: #FFFDF0; }

/* === Section Edit Mode — 金色边框发光 === */
.section-editing {
  position: relative;
}
.section-editing::before {
  content: ''; position: absolute; inset: -1px;
  border: 2px solid var(--gold);
  border-radius: calc(var(--radius) + 1px);
  pointer-events: none;
  z-index: 5;
  animation: editPulse 2s ease-in-out 1;
}
@keyframes editPulse {
  0% { box-shadow: 0 0 0 0 rgba(174,133,85,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(174,133,85,0.05); }
  100% { box-shadow: 0 0 0 0 rgba(174,133,85,0); }
}
.section-editing thead th {
  background: #F5EDE0;
  border-bottom-color: var(--gold);
  color: var(--gold-dark);
}
.section-editing tbody td { background: rgba(255,253,248,0.5); }
.section-editing tbody tr:hover td { background: rgba(174,133,85,0.04); }
.section-editing tbody tr.section-row td { background: var(--slate) !important; }

/* === Guidance Bar === */
.guidance-bar {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, rgba(174,133,85,0.08), rgba(174,133,85,0.02));
  border: 1px solid rgba(174,133,85,0.2);
  border-radius: var(--radius-sm); padding: 12px 18px; margin-bottom: 20px;
  font-size: 13px; color: var(--gray);
}
.guidance-bar i { color: var(--gold); font-size: 16px; }
.guidance-bar strong { color: var(--slate); font-weight: 600; }

/* === Tab Content === */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Modals — 精致弹出 === */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(47,57,67,0.5);
  z-index: 1000; justify-content: center; align-items: center;
  backdrop-filter: blur(3px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: white; border-radius: var(--radius-lg);
  width: 520px; max-width: 92%; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(47,57,67,0.3);
  animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--beige-dark);
  font-weight: 600; font-size: 16px; color: var(--slate);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header .close {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--gray-light);
  transition: all 0.15s; font-size: 20px; border: none; background: none;
}
.modal-header .close:hover { background: var(--beige); color: var(--slate); }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--beige-dark);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* === Form === */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 12px; color: var(--gray); margin-bottom: 6px;
  font-weight: 600; letter-spacing: 0.3px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; border: 1px solid var(--beige-dark); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 13px; font-family: inherit;
  transition: all 0.2s; background: white;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(174,133,85,0.1);
}
.form-group textarea { resize: vertical; min-height: 80px; font-size: 13px; line-height: 1.6; }
.form-group .help-text { margin-top: 5px; font-size: 11px; color: var(--gray-light); }

/* === Toast === */
.toast-container {
  position: fixed; top: 24px; right: 24px; z-index: 2000;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: var(--radius-sm); color: white;
  font-size: 13px; font-weight: 500; letter-spacing: 0.2px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 420px;
}
.toast.show { transform: translateX(0); }
.toast.toast-success { background: linear-gradient(135deg, #5DB075, #4A9A62); }
.toast.toast-error { background: linear-gradient(135deg, #E57373, #D35F5F); }
.toast.toast-info { background: linear-gradient(135deg, var(--gray), #5A6A7A); }
.toast.toast-warning { background: linear-gradient(135deg, var(--orange), #E0961A); }
.toast i { font-size: 16px; }

/* === Diff Preview === */
.diff-list { margin: 12px 0; }
.diff-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px; border-radius: 4px; font-size: 12px; margin-bottom: 4px;
  background: rgba(245,240,232,0.3);
}
.diff-item .diff-label { color: var(--gray); min-width: 120px; }
.diff-item .diff-old { color: var(--red); text-decoration: line-through; margin-right: 8px; }
.diff-item .diff-new { color: var(--green); font-weight: 600; }
.diff-empty { padding: 24px; text-align: center; color: var(--gray-light); font-size: 13px; }

/* === Stats Cards — 仪表盘 === */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
  background: white; border: 1px solid var(--beige-dark); border-radius: var(--radius);
  padding: 20px 22px; text-align: center;
  box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-value {
  font-size: 28px; font-weight: 700; color: var(--slate);
  font-family: var(--font-mono);
}
.stat-card .stat-label { font-size: 12px; color: var(--gray); margin-top: 5px; font-weight: 500; }
.stat-card.gold { border-left: 3px solid var(--gold); }
.stat-card.green { border-left: 3px solid var(--green); }
.stat-card.blue { border-left: 3px solid var(--gray); }

/* === Preview Panel === */
.preview-panel {
  background: var(--beige-light); border-radius: var(--radius);
  border: 1px solid var(--beige-dark); padding: 24px; margin-top: 12px;
}
.preview-panel table { width: auto; }
.preview-panel td { padding: 6px 16px; border: none; font-size: 13px; }
.preview-panel .hr td { padding: 0; }
.preview-panel .hr div { border-top: 1px solid var(--beige-dark); margin: 6px 0; }
.preview-panel .hr-thick td { padding: 0; }
.preview-panel .hr-thick div { border-top: 2px solid var(--gold); margin: 6px 0; }

/* === Version Timeline === */
.version-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--beige-dark);
}
.version-item:last-child { border-bottom: none; }
.version-badge {
  width: 42px; height: 42px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: white; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(174,133,85,0.2);
}
.version-badge.old { background: var(--beige-dark); color: var(--gray); box-shadow: none; }
.version-info { flex: 1; }
.version-info .time { font-size: 12px; color: var(--gray); }
.version-info .note { font-size: 13px; color: var(--slate); margin-top: 4px; line-height: 1.5; }

/* === Empty State === */
.empty-state {
  padding: 48px 20px; text-align: center; color: var(--gray-light);
}
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; opacity: 0.5; }
.empty-state p { font-size: 14px; }

/* === Loading === */
.loading-spinner {
  display: inline-block; width: 22px; height: 22px;
  border: 2px solid var(--beige-dark); border-top-color: var(--gold);
  border-radius: 50%; animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-lighter); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-light); }

/* === Responsive === */
@media (max-width: 1024px) {
  .sidebar { width: 200px; }
  .main { padding: 24px; max-width: calc(100vw - 200px); }
}
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; display: flex; overflow-x: auto; padding: 10px 0;
    border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .sidebar::before { display: none; }
  .sidebar-group { display: flex; gap: 2px; margin: 0; }
  .sidebar-label { display: none; }
  .sidebar-item { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; padding: 10px 18px; font-size: 12px; }
  .sidebar-item.active { border-bottom-color: var(--gold); }
  .sidebar-item .badge { display: none; }
  .main { max-width: 100%; padding: 18px; }
  .toolbar { flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions .search-box { flex: 1; }
  .toolbar-actions .search-box input { width: 100%; }
  .header { padding: 0 18px; height: 56px; }
  .header .subtitle { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ====== 版本对比差异表 ====== */
.diff-up { color: var(--green); font-weight: 600; }
.diff-down { color: var(--red); font-weight: 600; }
.diff-gray { color: #A8B2BC; }

#diffContainer table td { padding: 8px 10px; font-size: 12px; vertical-align: middle; }
#diffContainer table th { font-size: 11px; background: #F5F0E8; padding: 8px 10px; position: sticky; top: 0; z-index: 2; }
#diffContainer .card-body { padding: 12px 0 0; }

.version-item { padding: 6px 0; border-bottom: 1px solid #F0EBE4; }
.version-item:last-child { border-bottom: none; }
.version-item:hover { background: #FAF8F5; }

/* ====== 预览影响对比 ====== */
.preview-section-label {
  font-size: 13px;
  font-weight: 600;
  color: #2F3943;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #AE8555;
}
