/* ========== 满月礼管理后台样式 · Soft Luxury 主题 ========== */
:root {
  --bg: #FAF6F1;
  --bg-soft: #F5EFE6;
  --bg-warm: #F0E8DB;
  --gold: #C9A87C;
  --gold-d: #B8935A;
  --gold-l: #E8D5BE;
  --gold-xl: #F5EBDD;
  --sage: #7BA898;
  --sage-l: #A8C9BD;
  --sage-xl: #E0EDE8;
  --rose: #D4A5A5;
  --rose-l: #EBD0D0;
  --rose-xl: #F5E6E6;
  --ink: #2D2520;
  --ink-s: #5C4E3D;
  --muted: #9B8B7B;
  --line: #EAE0D5;
  --white: #FFF;
  --shadow: 0 2px 16px rgba(45, 37, 32, 0.06);
  --shadow-lg: 0 8px 32px rgba(45, 37, 32, 0.10);
  --r: 12px;
  --r-sm: 8px;
  --r-lg: 20px;
  --serif: 'Songti SC', 'STSong', 'Noto Serif SC', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--sans); background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; outline: none; border: none; }

/* ========== 登录页 ========== */
.login-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold-l) 0%, var(--bg) 50%, var(--sage-xl) 100%);
  padding: 20px;
}
.login-container { width: 100%; max-width: 420px; }
.login-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
}
.login-brand { text-align: center; margin-bottom: 32px; }
.brand-icon { font-size: 56px; margin-bottom: 12px; }
.brand-title { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--ink); letter-spacing: 6px; }
.brand-sub { font-size: 12px; color: var(--muted); margin-top: 8px; letter-spacing: 2px; }

.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.login-form input, .login-form select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.2s;
}
.login-form input:focus, .login-form select:focus { border-color: var(--gold); }
.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-d));
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 8px;
  transition: transform 0.2s;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201, 168, 124, 0.35); }
.login-tip { text-align: center; font-size: 12px; color: var(--muted); margin-top: 20px; }
.login-footer { text-align: center; font-size: 12px; color: var(--muted); margin-top: 24px; }

/* ========== 后台主框架 ========== */
.admin-layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
  width: 240px;
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 100;
}
.sidebar-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--line);
}
.sidebar-header .sh-title { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); letter-spacing: 3px; }
.sidebar-header .sh-sub { font-size: 11px; color: var(--muted); margin-top: 4px; letter-spacing: 1px; }

.sidebar-menu { flex: 1; padding: 16px 12px; overflow-y: auto; }
.menu-group { margin-bottom: 24px; }
.menu-group-title { font-size: 11px; color: var(--muted); padding: 8px 12px; letter-spacing: 1px; }
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--ink-s);
  font-size: 14px;
  transition: all 0.2s;
  margin-bottom: 2px;
}
.menu-item:hover { background: var(--bg-soft); color: var(--ink); }
.menu-item.active { background: var(--gold-xl); color: var(--gold-d); font-weight: 500; }
.menu-item .mi-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.menu-item .mi-icon svg { width: 18px; height: 18px; }

.sidebar-footer { padding: 16px 24px; border-top: 1px solid var(--line); }
.sidebar-footer .sf-user { display: flex; align-items: center; gap: 12px; }
.sf-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-d)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.sf-name { font-size: 13px; color: var(--ink); font-weight: 500; }
.sf-role { font-size: 11px; color: var(--muted); }
.sf-password { font-size: 12px; color: var(--gold-d); cursor: pointer; margin-top: 4px; }
.sf-logout { font-size: 12px; color: var(--rose); cursor: pointer; margin-top: 4px; }

/* 主内容 */
.main-area { flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); letter-spacing: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.topbar-actions .ta-time { font-size: 12px; color: var(--muted); }

.content { flex: 1; padding: 24px 32px; overflow-y: auto; }

/* ========== 通用组件 ========== */
.page-card {
  background: var(--white);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.page-card-title { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--r-sm); font-size: 13px; cursor: pointer; transition: all 0.2s; border: none; }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-d)); color: #fff; }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(201, 168, 124, 0.35); }
.btn-outline { background: transparent; border: 1px solid var(--gold); color: var(--gold-d); }
.btn-outline:hover { background: var(--gold-xl); }
.btn-sage { background: linear-gradient(135deg, var(--sage), var(--sage-l)); color: #fff; }
.btn-danger { background: var(--rose-xl); color: var(--rose); }
.btn-danger:hover { background: var(--rose-l); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.data-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.data-table tr:hover td { background: var(--bg-soft); }
.data-table tr:last-child td { border-bottom: none; }

/* 标签 */
.tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.tag-gold { background: var(--gold-xl); color: var(--gold-d); }
.tag-sage { background: var(--sage-xl); color: var(--sage); }
.tag-rose { background: var(--rose-xl); color: var(--rose); }
.tag-gray { background: #F0EBE3; color: var(--muted); }
.tag-orange { background: #FFF3E0; color: #E8853A; }
.tag-blue { background: #E3F2FD; color: #5A9FE0; }
.tag-green { background: #E8F5EE; color: #4CAF6E; }

/* 表单 */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 12px; color: var(--muted); }
.form-field input, .form-field select, .form-field textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
  transition: border-color 0.2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--gold); }
.form-field textarea { min-height: 80px; resize: vertical; }

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.permission-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 6px 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg);
  cursor: pointer;
}
.permission-item input { width: 14px; height: 14px; }
.permission-item span { color: var(--ink); font-size: 13px; }
.permission-item em {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-family: monospace;
}

/* 工具栏 */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.search-input {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 13px;
  width: 240px;
  background: var(--white);
}

/* 统计卡 */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-mini {
  background: var(--white);
  border-radius: var(--r);
  padding: 16px 20px;
  box-shadow: var(--shadow);
}
.stat-mini .sm-num { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--gold-d); }
.stat-mini .sm-num.green { color: var(--sage); }
.stat-mini .sm-num.orange { color: #E8853A; }
.stat-mini .sm-num.blue { color: #5A9FE0; }
.stat-mini .sm-num.purple { color: #9D82B8; }
.stat-mini .sm-label { font-size: 12px; color: var(--muted); margin-top: 4px; }

.dashboard-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  padding: 14px 16px;
  margin-bottom: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.dashboard-filter-bar label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; min-width: 150px; }
.dashboard-filter-bar select, .dashboard-filter-bar input { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); color: var(--ink); }
.dashboard-stat-row { grid-template-columns: repeat(5, 1fr); }
.dashboard-section-head { margin: 28px 0 10px; }
.dashboard-section-head .page-card-title { margin-bottom: 4px; }
.dashboard-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.dashboard-two-col .page-card-title { margin-bottom: 10px; }
.dashboard-table-card { overflow: hidden; }
.dashboard-table-card .table-scroll { overflow-x: auto; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: var(--bg-soft); }
.dashboard-health { margin-top: 20px; }
.dashboard-health .tag { margin-right: 8px; }
@media (max-width: 1080px) { .dashboard-stat-row { grid-template-columns: repeat(3, 1fr); } .dashboard-two-col { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .dashboard-stat-row { grid-template-columns: repeat(2, 1fr); } .dashboard-filter-bar label { min-width: 130px; flex: 1; } }

.dash-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  background: var(--white);
  border-radius: var(--r);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.dash-eyebrow {
  color: var(--gold-d);
  font-size: 11px;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.dash-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}
.dash-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.dash-date {
  color: var(--ink-s);
  font-size: 13px;
  white-space: nowrap;
}
.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 20px;
  margin-bottom: 20px;
}
.progress-item { margin-bottom: 18px; }
.progress-item:last-child { margin-bottom: 0; }
.progress-head {
  display: flex;
  justify-content: space-between;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 8px;
}
.progress-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gold);
}
.progress-fill.green { background: var(--sage); }
.progress-fill.blue { background: #5A9FE0; }
.progress-fill.orange { background: #E8853A; }
.progress-fill.gold { background: var(--gold-d); }
.progress-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
}
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.role-stat {
  padding: 14px;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
}
.role-stat-num {
  font-family: var(--serif);
  color: var(--gold-d);
  font-size: 28px;
  font-weight: 700;
}
.role-stat-label { color: var(--muted); font-size: 12px; }
.dash-note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 14px;
}
.compact-table td, .compact-table th { padding: 10px 12px; }
.table-scroll { overflow-x: auto; }
.table-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.record-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.record-summary > div { padding: 12px; background: var(--bg-soft); border-radius: var(--r-sm); }
.record-summary span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.record-summary strong { color: var(--ink); font-size: 14px; word-break: break-all; }
.record-section { margin-top: 20px; }
.record-section .page-card-title { margin-bottom: 10px; }
.record-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; color: var(--ink-s); font-size: 13px; }
.content-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.content-metric strong {
  color: var(--ink);
  font-size: 18px;
}
.content-metric + .btn { margin-top: 16px; }
.todo-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.todo-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--bg-soft);
  color: var(--ink-s);
  font-size: 13px;
}

/* 图片缩略 */
.thumb { width: 60px; height: 60px; border-radius: var(--r-sm); object-fit: cover; background: var(--bg-soft); }
.thumb-lg { width: 100px; height: 60px; }
.venue-logo-thumb,
.venue-logo-empty {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--gold-xl);
  color: var(--gold-d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
}
.logo-upload-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.venue-logo-preview {
  width: 88px;
  height: 88px;
  border-radius: 16px;
  background: var(--gold-xl);
  color: var(--gold-d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}
.venue-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.logo-upload-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.form-hint {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
}
.theme-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.theme-media-grid img,
.theme-media-file {
  width: 72px;
  height: 72px;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--bg-soft);
}
.theme-media-file {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  color: var(--ink-s);
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
  overflow: hidden;
  word-break: break-all;
}
.banner-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.banner-admin-item {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg);
}
.banner-admin-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  background: var(--bg-soft);
}
.banner-admin-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}
.fee-setting-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px 1.5fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.fee-setting-row .search-input { width: 100%; }
.date-override-tools { display: grid; grid-template-columns: 170px 170px 1fr auto; gap: 12px; align-items: end; margin-top: 18px; }
.date-override-tools label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.date-override-tools input[type="date"] { width: 100%; box-sizing: border-box; }
.date-override-card { padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.date-override-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: var(--ink); }
.date-slot-row { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.schedule-subsection { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.subsection-title { color: var(--ink); font-size: 15px; font-weight: 600; }
.schedule-rule-tools { grid-template-columns: 170px 170px 1fr auto; }
.new-rule-slots, .new-rule-actions { grid-column: 1 / -1; }
.new-rule-actions { display: flex; gap: 12px; align-items: center; }
.weekday-picker { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 12px; }
.weekday-picker > span { width: 100%; }
.weekday-picker label { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--ink); }
.weekday-picker input { accent-color: var(--gold); }
.schedule-rule-card { padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-soft); }
.schedule-rule-fields { display: grid; grid-template-columns: 170px 170px 1fr; gap: 12px; align-items: end; margin-bottom: 16px; }
.schedule-rule-fields label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.date-input-wrap { display: flex; align-items: center; gap: 6px; }
.date-input-wrap .search-input { min-width: 0; flex: 1; }
.date-picker-button { width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--gold-d); cursor: pointer; font-size: 16px; line-height: 1; }
.date-picker-button:hover { border-color: var(--gold); background: var(--gold-xl); }
.schedule-rule-slots { margin-bottom: 4px; }
.schedule-rule-editor { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-soft); }
.schedule-note-label { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; color: var(--muted); font-size: 12px; }
.schedule-note { min-height: 68px; resize: vertical; }
.schedule-history-list { margin-top: 16px; max-height: 620px; overflow: auto; }
.schedule-history-card { padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.schedule-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); }
.schedule-history-tag { padding: 3px 8px; border-radius: 12px; background: var(--gold-xl); color: var(--gold-d); font-size: 12px; white-space: nowrap; }
.schedule-history-line { margin-top: 8px; color: var(--muted); font-size: 13px; }
.schedule-history-meta { margin-top: 10px; color: var(--muted); font-size: 12px; }
.compact-empty { padding: 18px; }
.venue-qrcode-body { text-align: center; padding: 8px 0 4px; }
.venue-qrcode-preview { display: block; width: min(430px, 100%); margin: 0 auto 14px; background: #fff; }
.qr-scene { margin: 0 auto 16px; }
@media (max-width: 760px) {
  .date-override-tools { grid-template-columns: 1fr 1fr; }
  .date-override-tools button { grid-column: 1 / -1; }
  .schedule-rule-fields, .schedule-rule-tools { grid-template-columns: 1fr 1fr; }
  .schedule-rule-fields .weekday-picker, .schedule-rule-tools .weekday-picker { grid-column: 1 / -1; }
  .date-slot-row { flex-wrap: wrap; }
  .record-summary, .record-lines { grid-template-columns: 1fr; }
}

/* 上传区 */
.upload-area {
  border: 2px dashed var(--line);
  border-radius: var(--r);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg);
}
.upload-area:hover { border-color: var(--gold); background: var(--gold-xl); }
.upload-area .ua-icon { font-size: 36px; color: var(--gold-d); margin-bottom: 8px; }
.upload-area .ua-text { font-size: 13px; color: var(--muted); }

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(45, 37, 32, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-box {
  background: var(--white);
  border-radius: var(--r-lg);
  width: 560px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-family: var(--serif); font-size: 16px; font-weight: 600; color: var(--ink); }
.modal-close { font-size: 20px; color: var(--muted); cursor: pointer; line-height: 1; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* 仪表盘服务人员客户明细 */
.staff-detail-dialog {
  position: fixed;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(760px, 100vw);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 12px 0 0 12px;
  background: var(--white);
  color: var(--ink);
  box-shadow: -16px 0 40px rgba(45, 37, 32, 0.14);
  overflow: hidden;
}
.staff-detail-dialog:not([open]) { display: none; }
.staff-detail-dialog::backdrop { background: rgba(45, 37, 32, 0.42); }
.staff-detail-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
}
.staff-detail-header > div { min-width: 0; }
.staff-detail-header h2 { overflow-wrap: anywhere; font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.4; }
.staff-detail-header p { margin-top: 6px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.staff-detail-close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.staff-detail-close:hover { background: var(--bg-soft); color: var(--ink); }
.staff-detail-close:focus-visible { outline: 2px solid var(--gold-d); outline-offset: 2px; }
.staff-detail-summary {
  flex: 0 0 auto;
  display: flex;
  gap: 40px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.staff-detail-summary div { display: grid; gap: 3px; }
.staff-detail-summary span, .staff-customer-value span { color: var(--muted); font-size: 12px; }
.staff-detail-summary strong { font-size: 18px; font-weight: 600; }
.staff-detail-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 28px 24px; }
.staff-customer-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.9fr) minmax(180px, 1.3fr) auto;
  align-items: center;
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.staff-customer-primary { display: grid; gap: 5px; min-width: 0; }
.staff-customer-primary strong { overflow-wrap: anywhere; font-size: 14px; font-weight: 600; }
.staff-customer-primary span, .staff-customer-details span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.staff-customer-details { display: grid; gap: 4px; min-width: 0; }
.staff-customer-value { display: grid; justify-items: end; gap: 4px; white-space: nowrap; }
.staff-customer-value strong { color: var(--ink-s); font-size: 14px; font-weight: 600; }
.staff-detail-empty { padding: 48px 12px; color: var(--muted); text-align: center; }
@media (max-width: 760px) {
  .staff-detail-dialog { width: 100vw; border-radius: 0; }
  .staff-detail-header { padding: 18px 18px 16px; }
  .staff-detail-summary { padding: 14px 18px; gap: 28px; }
  .staff-detail-list { padding: 2px 18px 20px; }
  .staff-customer-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; }
  .staff-customer-details { grid-column: 1 / -1; grid-row: 2; }
  .staff-customer-value { grid-column: 2; grid-row: 1; }
}

/* Toast */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(45, 37, 32, 0.9);
  color: #fff;
  padding: 10px 24px;
  border-radius: 24px;
  font-size: 13px;
  z-index: 2000;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .es-icon { font-size: 48px; opacity: 0.5; margin-bottom: 12px; }

/* 操作按钮组 */
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
