/* ============================================================
 * 餐饮人力资源管理系统 - 样式表 (Light / 餐饮暖色主题)
 * ============================================================ */
:root {
  --primary: #C25A28;
  --primary-deep: #9E4420;
  --primary-soft: #F6E7DD;
  --primary-tint: #FBF2EB;
  --gold: #C99A3B;
  --ink: #2B2620;
  --ink-2: #5B5248;
  --muted: #948980;
  --line: #ECE4DA;
  --line-2: #F3EEE7;
  --bg: #F6F3EE;
  --card: #FFFFFF;
  --green: #3E8E5A;
  --green-soft: #E7F3EB;
  --red: #C2433D;
  --red-soft: #F9E8E6;
  --orange: #D98324;
  --orange-soft: #FBF0DF;
  --blue: #3A6EA5;
  --blue-soft: #E8F0F8;
  --purple: #7B5EA7;
  --purple-soft: #F0EAF7;
  --shadow: 0 1px 3px rgba(64, 40, 20, .05), 0 8px 24px rgba(64, 40, 20, .04);
  --shadow-lg: 0 12px 40px rgba(64, 40, 20, .16);
  --radius: 14px;
  --radius-sm: 9px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #D8CFC3; border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- Layout ---------------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex: 0 0 248px; background: #FFFDFB;
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; z-index: 40;
}
.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------------- Brand ---------------- */
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; border-bottom: 1px solid var(--line-2); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 40px;
  background: linear-gradient(135deg, #D2693A, #A8401E);
  color: #FFF3E8; font-size: 22px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 14px rgba(194, 90, 40, .28);
}
.brand-title { font-size: 18px; font-weight: 700; letter-spacing: .5px; }
.brand-sub { font-size: 13px; color: var(--muted); margin-top: 1px; }

/* ---------------- Nav ---------------- */
.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-group { margin-bottom: 18px; }
.nav-group-title { font-size: 13px; color: var(--muted); padding: 0 12px 8px; letter-spacing: 1px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 3px;
  border-radius: 10px; color: var(--ink-2); font-weight: 500; transition: .16s;
  position: relative;
}
.nav-item:hover { background: var(--primary-tint); color: var(--primary-deep); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }
.nav-item.active::before {
  content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav-icon { width: 20px; text-align: center; font-size: 18px; opacity: .9; }
.nav-badge { margin-left: auto; background: #EFE6DB; color: var(--ink-2); font-size: 13px; padding: 1px 8px; border-radius: 20px; font-weight: 600; }
.nav-external { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 12px; }
.nav-ext-tag { margin-left: auto; font-size: 13px; font-weight: 700; color: #FFF; background: var(--primary); padding: 2px 6px; border-radius: 5px; letter-spacing: .5px; }

.sidebar-foot { padding: 14px 16px 18px; border-top: 1px solid var(--line-2); }
.data-source-tag { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--primary-tint); border: 1px solid var(--primary-soft); border-radius: 10px; }
.ds-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px var(--orange-soft); flex: 0 0 8px; }
.ds-title { font-size: 14px; font-weight: 600; color: var(--primary-deep); }
.ds-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------------- Topbar ---------------- */
.topbar {
  height: 76px; flex: 0 0 76px; background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center;
  padding: 0 28px; gap: 18px; position: sticky; top: 0; z-index: 30;
}
.menu-toggle { display: none; }
.topbar-title { min-width: 0; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.crumb span { color: var(--primary); }
.topbar-title h1 { font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.global-search { position: relative; }
.global-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 20px; }
.global-search input {
  width: 250px; height: 38px; padding: 0 14px 0 36px; border: 1px solid var(--line);
  background: #FCFAF7; border-radius: 10px; outline: none; transition: .16s;
}
.global-search input:focus { border-color: var(--primary); background: #FFF; box-shadow: 0 0 0 3px var(--primary-soft); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line);
  background: #FFF; display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); font-size: 19px; transition: .16s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }
.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 14px; border-left: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,#D9A05B,#B56A2E); color: #fff; font-size: 14px; font-weight: 700; display:flex; align-items:center; justify-content:center; }
.user-name { font-size: 15px; font-weight: 600; }
.user-role { font-size: 13px; color: var(--muted); }

/* ---------------- Content ---------------- */
.content { padding: 26px 28px 40px; flex: 1; }
.page { animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- Cards & grids ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px 22px; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-7-5 { grid-template-columns: 7fr 5fr; }
.grid-8-4 { grid-template-columns: 2fr 1fr; }
.mb18 { margin-bottom: 18px; }
.mt18 { margin-top: 18px; }

/* Section heading */
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h2 { font-size: 18px; font-weight: 700; }
.section-head .hint { font-size: 14px; color: var(--muted); }

/* ---------------- Stat cards ---------------- */
.stat-card { padding: 20px 22px; position: relative; overflow: hidden; }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 14px; color: var(--muted); font-weight: 500; }
.stat-icon { width: 38px; height: 38px; border-radius: 11px; display:flex; align-items:center; justify-content:center; font-size: 20px; }
.stat-value { font-size: 34px; font-weight: 700; letter-spacing: -.5px; margin: 8px 0 4px; line-height: 1.1; }
.stat-value small { font-size: 17px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat-trend { font-size: 13px; display: flex; align-items: center; gap: 5px; }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.stat-trend .muted { color: var(--muted); }
.stat-spark { position: absolute; right: 0; bottom: 0; opacity: .9; }
.bg-orange { background: var(--orange-soft); color: var(--orange); }
.bg-green { background: var(--green-soft); color: var(--green); }
.bg-blue { background: var(--blue-soft); color: var(--blue); }
.bg-purple { background: var(--purple-soft); color: var(--purple); }
.bg-red { background: var(--red-soft); color: var(--red); }

/* ---------------- Toolbar ---------------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.toolbar .spacer { flex: 1; }
.tabs { display: flex; gap: 4px; padding: 4px; background: #F3EEE7; border-radius: 10px; }
.tab { padding: 7px 14px; border-radius: 8px; font-size: 15px; color: var(--ink-2); font-weight: 500; transition: .16s; white-space: nowrap; }
.tab:hover { color: var(--primary); }
.tab.active { background: #FFF; color: var(--primary-deep); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.field { display: flex; align-items: center; gap: 7px; }
.field label { font-size: 14px; color: var(--muted); white-space: nowrap; }
.input, .select, .textarea {
  height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px;
  background: #FFF; outline: none; transition: .16s; min-width: 0;
}
.textarea { height: auto; padding: 9px 11px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.select { padding-right: 26px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23948080' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
.inline-search { position: relative; }
.inline-search input { padding-left: 32px; width: 220px; }
.inline-search .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------------- Buttons ---------------- */
.btn {
  height: 36px; padding: 0 15px; border-radius: 9px; border: 1px solid var(--line);
  background: #FFF; color: var(--ink-2); font-weight: 500; display: inline-flex;
  align-items: center; justify-content: center; gap: 6px; transition: .16s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-tint); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #FFF; box-shadow: 0 4px 10px rgba(194,90,40,.22); }
.btn-primary:hover { background: var(--primary-deep); border-color: var(--primary-deep); color: #FFF; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 14px; border-radius: 8px; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); color: var(--red); }

/* ---------------- Table ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl thead th {
  text-align: left; padding: 12px 16px; background: #FAF7F2; color: var(--ink-2);
  font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
}
.tbl tbody td { padding: 11px 16px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tbl tbody tr:hover { background: #FCF9F5; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .center { text-align: center; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--primary); }
.tbl .link { color: var(--primary); font-weight: 600; cursor: pointer; }
.tbl .link:hover { text-decoration: underline; }
.tbl .actions { display: flex; gap: 4px; }
.tbl .actions .icon-btn { width: 28px; height: 28px; font-size: 15px; border-radius: 7px; }
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 40px; margin-bottom: 8px; opacity: .5; }

/* ---------------- Badges ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.badge.gray { background: #F0ECE6; color: var(--muted); }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; display:inline-flex; align-items:center; justify-content:center; font-size: 13px; font-weight: 600; color: #fff; margin-right: 8px; flex: 0 0 28px; }
.person-cell { display: flex; align-items: center; }
.person-cell .sub { font-size: 13px; color: var(--muted); }

/* ---------------- Pagination ---------------- */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--line-2); font-size: 14px; color: var(--muted); }
.pages { display: flex; gap: 4px; }
.page-btn { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); background: #FFF; border-radius: 8px; font-size: 14px; display:flex;align-items:center;justify-content:center; }
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #FFF; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------------- Charts ---------------- */
.chart-card { padding: 20px 22px; }
.chart-title { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.chart-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.chart-box { width: 100%; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; flex: 0 0 9px; }
.legend-item .val { color: var(--muted); margin-left: 2px; }

/* ---------------- Progress ---------------- */
.progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.progress-row:last-child { margin-bottom: 0; }
.progress-label { width: 90px; font-size: 14px; color: var(--ink-2); flex: 0 0 90px; }
.progress-track { flex: 1; height: 8px; background: #F1EBE3; border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 10px; background: linear-gradient(90deg,#D9763F,#C25A28); }
.progress-val { width: 52px; text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------------- Info list ---------------- */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
.info-item .k { font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.info-item .v { font-size: 15px; font-weight: 600; color: var(--ink); }
.full { grid-column: 1 / -1; }

/* ---------------- Schedule grid ---------------- */
.sched-grid { display: grid; grid-template-columns: 120px repeat(7, 1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sched-cell { background: #FFF; min-height: 74px; padding: 8px; font-size: 14px; }
.sched-cell.head { background: #FAF7F2; font-weight: 600; text-align: center; padding: 10px 6px; color: var(--ink-2); position: static; }
.sched-cell.head .dow { font-size: 13px; color: var(--muted); font-weight: 400; }
.sched-cell.shift-cell { background: #FDFBF8; }
.shift-chip { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.shift-早班 { background: var(--blue-soft); color: var(--blue); }
.shift-中班 { background: var(--green-soft); color: var(--green); }
.shift-晚班 { background: var(--purple-soft); color: var(--purple); }
.shift-休息 { background: #F0ECE6; color: var(--muted); }
.sched-names { font-size: 13px; color: var(--muted); line-height: 1.6; }
.sched-count { font-size: 13px; color: var(--primary); font-weight: 600; }

/* ---------------- Data center ---------------- */
.entity-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.entity-card { padding: 18px 20px; transition: .16s; cursor: pointer; }
.entity-card:hover { border-color: var(--primary); box-shadow: 0 8px 24px rgba(194,90,40,.12); transform: translateY(-2px); }
.entity-icon { width: 40px; height: 40px; border-radius: 11px; display:flex;align-items:center;justify-content:center; font-size: 21px; margin-bottom: 12px; }
.entity-name { font-size: 16px; font-weight: 700; }
.entity-desc { font-size: 13px; color: var(--muted); margin: 5px 0 12px; min-height: 30px; }
.entity-meta { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line-2); }
.entity-count { font-size: 22px; font-weight: 700; }
.entity-count small { font-size: 13px; color: var(--muted); font-weight: 400; }
.schema-table { font-size: 14px; }
.schema-table td, .schema-table th { padding: 9px 12px; }
.type-tag { font-size: 13px; padding: 2px 7px; border-radius: 5px; background: #F2EDE6; color: var(--ink-2); }

/* ---------------- Modal ---------------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(43,38,32,.44); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay[hidden] { display: none; }
.modal { width: 100%; max-width: 620px; max-height: 88vh; background: #FFF; border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: pop .2s ease; }
.modal.wide { max-width: 860px; }
@keyframes pop { from { opacity:0; transform: scale(.96) translateY(10px);} to {opacity:1; transform:none;} }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; }
.modal-close { border: none; background: transparent; font-size: 17px; }
.modal-body { padding: 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item.span2 { grid-column: 1 / -1; }
.form-item label { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.form-item label .req { color: var(--red); }
.form-item .input, .form-item .select, .form-item .textarea { width: 100%; }
.form-item .hint { font-size: 13px; color: var(--muted); }
.form-section { font-size: 14px; font-weight: 700; color: var(--primary-deep); padding: 8px 0 2px; grid-column: 1/-1; border-bottom: 1px dashed var(--line); margin-bottom: 2px; }

/* ---------------- Toast ---------------- */
.toast-stack { position: fixed; top: 88px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 240px; padding: 12px 16px; background: #FFF; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 15px; display: flex; align-items: center; gap: 10px; animation: slideIn .25s ease; }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }
@keyframes slideIn { from { opacity:0; transform: translateX(20px);} to {opacity:1; transform:none;} }
.toast.out { animation: slideOut .25s ease forwards; }
@keyframes slideOut { to { opacity:0; transform: translateX(20px);} }

/* ---------------- Misc ---------------- */
.callout { padding: 13px 16px; border-radius: 10px; font-size: 14px; line-height: 1.7; }
.callout.tint { background: var(--primary-tint); border: 1px solid var(--primary-soft); color: var(--primary-deep); }
.callout.info { background: var(--blue-soft); border: 1px solid #D4E3F2; color: var(--blue); }
.callout b { font-weight: 700; }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }
.text-mut { color: var(--muted); }
.text-sm { font-size: 14px; }
.nowrap { white-space: nowrap; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .grid-7-5, .grid-8-4 { grid-template-columns: 1fr; }
  .entity-cards { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: -248px; transition: left .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .menu-toggle { display: flex; }
  .global-search { display: none; }
  .grid-3, .grid-2, .entity-cards { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 30px; }
  .topbar { padding: 0 16px; }
  .user-meta { display: none; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .sched-grid { grid-template-columns: 84px repeat(7, minmax(70px,1fr)); overflow-x: auto; }
}

/* ---------------- Print ---------------- */
@media print {
  .sidebar, .topbar, .toolbar, .pagination, .modal-overlay, .toast-stack { display: none !important; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}


/* ---------------- 一级页面返回通道 & 新页面标识 ---------------- */
.nav-back-home {
  display: flex; align-items: center; gap: 10px; margin: 0 12px 14px; padding: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff; border-radius: 11px; text-decoration: none;
  box-shadow: 0 4px 12px rgba(194,90,40,.24); transition: .16s;
}
.nav-back-home:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(194,90,40,.34); }
.nav-back-icon {
  width: 32px; height: 32px; flex: 0 0 32px; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.2); border-radius: 8px; font-size: 19px;
}
.nav-back-text { display: flex; flex-direction: column; line-height: 1.3; }
.nav-back-text b { font-size: 15px; font-weight: 700; color: #fff; }
.nav-back-text small { font-size: 13px; color: rgba(255,255,255,.82); margin-top: 1px; }
.nav-new-icon { margin-left: auto; font-size: 13px; color: var(--muted); opacity: .7; }
.nav-item.active .nav-new-icon { color: var(--primary); opacity: 1; }


/* ---------------- 人力主数据库（数据中台）横幅 ---------------- */
.master-db-banner {
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; padding: 16px 18px;
  background: linear-gradient(135deg, #FBF2EB 0%, #F6E7DD 100%);
  border: 1px solid var(--primary-soft); border-left: 4px solid var(--primary); border-radius: var(--radius);
}
.mdb-icon {
  width: 42px; height: 42px; flex: 0 0 42px; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; border-radius: 10px; font-size: 23px;
}
.mdb-body { flex: 1; min-width: 0; }
.mdb-title { font-size: 17px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mdb-status {
  font-size: 13px; font-weight: 700; color: var(--orange); background: var(--orange-soft);
  padding: 3px 10px; border-radius: 20px; animation: mdbPulse 2s ease-in-out infinite;
}
@keyframes mdbPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.mdb-desc { font-size: 15px; color: var(--ink-2); line-height: 1.7; margin-top: 6px; }
.mdb-desc b { color: var(--primary-deep); }
.mdb-note { font-size: 14px; color: #9E6B1E; margin-top: 8px; line-height: 1.6; }

/* ---------------- 数据同步（人工同步） ---------------- */
/* 侧边栏"数据同步"主按钮，位于"工作台"之上 */
.nav-sync {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; margin: 2px 0 18px;
  border-radius: 11px; color: #FFF; font-weight: 600; transition: .16s;
  background: linear-gradient(135deg, #D2693A, #A8401E);
  box-shadow: 0 6px 14px rgba(194,90,40,.24); position: relative;
}
.nav-sync:hover { filter: brightness(1.06); transform: translateY(-1px); }
.nav-sync.active { outline: 2px solid var(--primary-deep); outline-offset: 2px; }
.nav-sync-icon { width: 20px; text-align: center; font-size: 20px; }
.nav-sync-text { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.nav-sync-text b { font-size: 15px; }
.nav-sync-text small { font-size: 13px; opacity: .85; font-weight: 400; }
.nav-sync .nav-new-icon { font-size: 14px; opacity: .9; }

/* 门户 / BI 顶部同步小按钮 */
.portal-sync-btn {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 13px;
  border-radius: 8px; font-size: 14px; font-weight: 700; color: #FFF; white-space: nowrap;
  background: linear-gradient(135deg, #D2693A, #A8401E); box-shadow: 0 4px 10px rgba(194,90,40,.2);
  transition: .16s;
}
.portal-sync-btn:hover { filter: brightness(1.06); color: #FFF; }

/* 空库引导横幅 */
.sync-empty-guide {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 18px;
  background: var(--orange-soft); border: 1px solid #F0D9A8; border-left: 4px solid var(--orange);
  border-radius: var(--radius);
}
.sync-empty-guide .seg-icon {
  width: 40px; height: 40px; flex: 0 0 40px; display: flex; align-items: center; justify-content: center;
  background: var(--orange); color: #FFF; border-radius: 10px; font-size: 22px;
}
.sync-empty-guide .seg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sync-empty-guide .seg-body b { font-size: 15px; color: #9E6B1E; }
.sync-empty-guide .seg-body span { font-size: 14px; color: #A5742A; line-height: 1.5; }

/* 同步中心 */
.sync-hero {
  display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; padding: 20px 22px;
  background: linear-gradient(135deg, #FBF2EB 0%, #F6E7DD 100%);
  border: 1px solid var(--primary-soft); border-left: 4px solid var(--primary); border-radius: var(--radius);
}
.sync-hero-icon {
  width: 48px; height: 48px; flex: 0 0 48px; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #FFF; border-radius: 12px; font-size: 26px;
}
.sync-hero-body { flex: 1; min-width: 0; }
.sync-hero-title { font-size: 19px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sync-hero-desc { font-size: 15px; color: var(--ink-2); line-height: 1.75; margin-top: 6px; }
.sync-hero-desc b { color: var(--primary-deep); }
.sync-state-badge { font-size: 13px; font-weight: 700; padding: 3px 11px; border-radius: 20px; }
.sync-state-badge.on { color: var(--green); background: var(--green-soft); }
.sync-state-badge.off { color: var(--orange); background: var(--orange-soft); }

.sync-method { display: flex; flex-direction: column; }
.sync-method-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sync-method-no {
  width: 30px; height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary-deep); border-radius: 9px; font-weight: 800; font-size: 17px;
}
.sync-method-title { font-size: 17px; font-weight: 700; color: var(--ink); }
.sync-method-sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.sync-steps { display: flex; flex-direction: column; gap: 8px; }
.sync-step { font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.sync-step b { color: var(--primary); margin-right: 4px; }
.sync-method-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.sync-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sync-foot-title { font-size: 17px; font-weight: 700; }
.sync-foot-desc { font-size: 14px; color: var(--muted); margin-top: 3px; }
.sync-foot .sync-method-actions { margin-top: 0; padding-top: 0; }

/* ============================================================
   导航重构（清爽版）— 覆盖上方旧的堆叠样式
   ============================================================ */
.sidebar { width: 250px; flex: 0 0 250px; background: #FFFCF9; }

/* 品牌区 */
.brand { padding: 24px 20px 20px; }
.brand-title { display: flex; align-items: center; gap: 7px; font-size: 19px; }
.brand-tag {
  font-size: 13px; font-weight: 700; letter-spacing: .5px; color: var(--primary-deep);
  background: var(--primary-soft); padding: 2px 7px; border-radius: 5px;
}

/* 独立看板分区标签：说明下方按钮是「另一个页面」的入口 */
.side-section-label {
  margin: 2px 16px 8px; padding-top: 13px;
  border-top: 1px solid var(--line-2);
  font-size: 13px; font-weight: 700; letter-spacing: 1.2px; color: #8C8279;
}

/* 人力 BI 主入口：信息明确的独立看板卡片（新窗口打开） */
.side-back {
  display: flex; align-items: center; gap: 11px; margin: 0 14px 6px; padding: 12px;
  color: #FFF; text-decoration: none;
  border: 1px solid transparent; border-radius: 12px;
  background: linear-gradient(135deg, #D2693A, #A8401E);
  box-shadow: 0 4px 12px rgba(168, 64, 30, .22); transition: .16s;
}
.side-back:hover { color: #FFF; transform: translateY(-2px); box-shadow: 0 9px 22px rgba(168, 64, 30, .32); }
.side-back .sb-iconbox {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28);
  font-size: 21px; line-height: 1;
}
.side-back .sb-body { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.side-back .sb-body b { font-size: 15.5px; font-weight: 800; letter-spacing: .3px; }
.side-back .sb-body small { font-size: 13px; color: rgba(255, 255, 255, .96); margin-top: 4px; white-space: nowrap; }
.side-back .sb-open {
  flex: 0 0 auto; font-size: 13px; font-weight: 700; white-space: nowrap;
  padding: 5px 8px; border-radius: 7px; background: #FFF; color: #A8401E;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.side-back:hover .sb-open { background: #FFF6EF; }

/* 数据同步主操作：精致克制 */
.nav { padding: 8px 12px 14px; }
.nav-sync {
  display: flex; align-items: center; gap: 11px; margin: 4px 2px 20px; padding: 11px 12px;
  border: 1px solid var(--primary-soft); background: linear-gradient(135deg, #FBF2EB, #F7E7DB);
  border-radius: 11px; color: var(--primary-deep); font-weight: 600; position: relative; transition: .16s;
}
.nav-sync:hover { background: var(--primary-soft); transform: translateY(-1px); }
.nav-sync.active { box-shadow: inset 0 0 0 2px var(--primary); }
.nav-sync .ns-ico {
  width: 34px; height: 34px; flex: 0 0 34px; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #FFF; border-radius: 9px; font-size: 19px;
  box-shadow: 0 3px 8px rgba(194,90,40,.22);
}
.nav-sync .ns-body { display: flex; flex-direction: column; line-height: 1.3; flex: 1; min-width: 0; }
.nav-sync .ns-body b { font-size: 15px; font-weight: 700; }
.nav-sync .ns-body small { font-size: 13px; color: #A9744C; margin-top: 2px; }
.nav-sync .ns-arrow { font-size: 17px; color: var(--primary); opacity: .8; }

/* 分组标题：加细分隔线 */
.nav-group { margin-bottom: 15px; }
.nav-group-title {
  font-size: 13px; color: #A1978D; padding: 0 12px 8px; letter-spacing: 1.2px; font-weight: 700;
  border-bottom: 1px solid var(--line-2); margin-bottom: 6px;
}
.nav-item { padding: 9px 12px; margin-bottom: 2px; font-size: 15px; border-radius: 9px; gap: 11px; }
.nav-item .nav-icon { font-size: 17px; width: 20px; opacity: .75; }
.nav-item.active .nav-icon { opacity: 1; }
.nav-item .nav-new-icon { display: none; }
.nav-item.active { box-shadow: 0 2px 8px rgba(194,90,40,.08); }

/* 外链项：去掉虚线，改用小标签 */
.nav-external { border-top: none; margin-top: 0; padding-top: 9px; }
.nav-external::before { content: ''; position: absolute; left: 12px; right: 12px; top: 0; height: 1px; background: var(--line-2); }
.nav-ext-tag {
  margin-left: auto; font-size: 13px; font-weight: 700; color: var(--blue);
  background: var(--blue-soft); padding: 2px 7px; border-radius: 5px; letter-spacing: .5px;
}

/* 侧栏底部：数据源 + 打开方式提示 */
.sidebar-foot { padding: 12px 14px 16px; }
.data-source-tag { padding: 10px 11px; background: #FCFAF7; border-color: var(--line); }
.nav-hint { text-align: center; font-size: 13px; color: #B4AAA0; margin-top: 9px; letter-spacing: .3px; }

/* 顶栏：更简洁 */
.topbar { height: 68px; flex: 0 0 68px; padding: 0 26px; }
.topbar-title h1 { font-size: 21px; }
.crumb { font-size: 13px; }
.global-search input { height: 36px; width: 220px; }

/* ============================================================
   组织架构页
   ============================================================ */
.org-banner {
  display: flex; gap: 15px; align-items: flex-start; margin-bottom: 18px; padding: 18px 20px;
  background: linear-gradient(135deg, #FBF2EB 0%, #F6E7DD 100%);
  border: 1px solid var(--primary-soft); border-left: 4px solid var(--primary); border-radius: var(--radius);
}
.org-banner-ico {
  width: 44px; height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #FFF; border-radius: 11px; font-size: 24px;
}
.org-banner-body { flex: 1; min-width: 0; }
.org-banner-title { font-size: 18px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.org-src-tag { font-size: 13px; font-weight: 700; color: var(--primary-deep); background: #FFF; border: 1px solid var(--primary-soft); padding: 3px 9px; border-radius: 20px; }
.org-banner-desc { font-size: 14px; color: var(--ink-2); line-height: 1.7; margin-top: 6px; }
.org-banner-desc b { color: var(--primary-deep); }

.org-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 16px; }
.org-stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow); }
.org-stat-top { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
.org-stat-ico { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; background: var(--primary-tint); color: var(--primary-deep); border-radius: 8px; font-size: 16px; }
.org-stat-val { font-size: 28px; font-weight: 700; color: var(--ink); margin-top: 6px; line-height: 1; }
.org-stat-val small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; }

.org-typebar { padding: 16px 20px; margin-bottom: 16px; }
.otype-title { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.otype-list { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px 28px; }
.otype-item { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.otype-ico { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: var(--primary-tint); color: var(--primary-deep); border-radius: 6px; }
.otype-name { width: 42px; color: var(--ink-2); font-weight: 600; }
.otype-track { flex: 1; height: 7px; background: var(--line-2); border-radius: 10px; overflow: hidden; }
.otype-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--gold)); border-radius: 10px; }
.otype-num { width: 46px; text-align: right; color: var(--ink-2); font-weight: 600; }

.org-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 14px; flex-wrap: wrap; }
.org-search { position: relative; flex: 1; min-width: 220px; }
.org-search span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 19px; }
.org-search input { width: 100%; height: 36px; padding: 0 12px 0 34px; border: 1px solid var(--line); background: #FCFAF7; border-radius: 9px; outline: none; font-size: 15px; }
.org-search input:focus { border-color: var(--primary); background: #FFF; box-shadow: 0 0 0 3px var(--primary-soft); }
.org-seg { display: flex; background: var(--bg); border-radius: 9px; padding: 3px; }
.org-seg-btn { border: none; background: transparent; padding: 7px 14px; border-radius: 7px; font-size: 14px; color: var(--muted); font-weight: 600; transition: .16s; }
.org-seg-btn.active { background: #FFF; color: var(--primary-deep); box-shadow: var(--shadow); }
.org-tool-actions { display: flex; gap: 8px; }

.org-tree-card { padding: 16px 18px 20px; }
.org-tree-hint { font-size: 13px; color: var(--muted); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.org-tree { font-size: 15px; }
.org-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px; min-height: 40px; transition: background .14s; cursor: default; }
.org-row[data-act] { cursor: pointer; }
.org-row[data-act]:hover { background: var(--primary-tint); }
.org-caret { width: 14px; flex: 0 0 14px; text-align: center; color: var(--muted); font-size: 14px; }
.org-children { margin-left: 20px; padding-left: 14px; border-left: 1px dashed var(--line); }
.org-node-name { font-weight: 600; color: var(--ink); }
.org-node-sub, .org-node-desc, .org-node-meta { font-size: 13px; color: var(--muted); font-weight: 400; }
.org-node-desc { color: #A1978D; }
.org-node-meta { background: var(--bg); padding: 1px 7px; border-radius: 5px; }
.org-count { margin-left: auto; font-size: 13px; color: var(--primary-deep); background: var(--primary-soft); padding: 2px 9px; border-radius: 20px; font-weight: 600; white-space: nowrap; }
.org-emp-status { margin-left: auto; font-size: 13px; color: var(--green); background: var(--green-soft); padding: 2px 8px; border-radius: 20px; }

/* 各层级视觉 */
.org-node-root > .org-row { background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: #FFF; border-radius: 10px; padding: 11px 12px; }
.org-node-root > .org-row .org-node-name { color: #FFF; font-size: 16px; }
.org-node-root > .org-row .org-caret { color: rgba(255,255,255,.85); }
.org-node-root > .org-row .org-count { background: rgba(255,255,255,.2); color: #FFF; }
.org-node-type > .org-row { background: var(--primary-tint); margin-top: 8px; }
.org-node-type > .org-row .org-node-name { color: var(--primary-deep); font-size: 15px; }
.org-type-ico { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #FFF; border-radius: 7px; font-size: 15px; }
.org-node-ico { width: 20px; text-align: center; color: var(--primary); }
.org-avatar { width: 24px; height: 24px; flex: 0 0 24px; display: flex; align-items: center; justify-content: center; background: var(--blue-soft); color: var(--blue); border-radius: 50%; font-size: 13px; font-weight: 700; }
.org-node-emp > .org-row { padding: 5px 10px; min-height: 34px; }
.org-node-emp > .org-row .org-node-name { font-weight: 500; }
.org-node.focused > .org-row { box-shadow: inset 0 0 0 2px var(--primary-soft); }

/* 员工详情弹窗 */
.org-emp-detail { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.oed-row { display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; background: #FFF; }
.oed-row span { font-size: 13px; color: var(--muted); }
.oed-row b { font-size: 15px; color: var(--ink); font-weight: 600; }

@media (max-width: 900px) {
  .org-stats { grid-template-columns: repeat(2,1fr); }
  .otype-list { grid-template-columns: 1fr; }
  .org-emp-detail { grid-template-columns: 1fr; }
}

/* ============================================================
   门店管理页
   ============================================================ */
.st-banner {
  display: flex; gap: 15px; align-items: flex-start; margin-bottom: 18px; padding: 18px 20px;
  background: linear-gradient(135deg, #FBF2EB 0%, #F6E7DD 100%);
  border: 1px solid var(--primary-soft); border-left: 4px solid var(--primary); border-radius: var(--radius);
}
.st-banner-ico {
  width: 44px; height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: #FFF; border-radius: 11px; font-size: 24px;
}
.st-banner-body { flex: 1; min-width: 0; }
.st-banner-title { font-size: 18px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-src-tag { font-size: 13px; font-weight: 700; color: var(--primary-deep); background: #FFF; border: 1px solid var(--primary-soft); padding: 3px 9px; border-radius: 20px; }
.st-banner-desc { font-size: 14px; color: var(--ink-2); line-height: 1.7; margin-top: 6px; }
.st-banner-desc b { color: var(--primary-deep); }

.st-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 16px; }
.st-stat-foot { font-size: 13px; color: var(--muted); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.st-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 12px; flex-wrap: wrap; }
.st-select { height: 36px; min-width: 130px; border: 1px solid var(--line); background: #FCFAF7; border-radius: 9px; font-size: 14px; padding: 0 10px; outline: none; }
.st-select:focus { border-color: var(--primary); }
.st-result-hint { font-size: 13px; color: var(--muted); margin: 0 2px 12px; }
.st-result-hint b { color: var(--primary-deep); }

.st-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.st-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: .16s; }
.st-card:hover { border-color: var(--primary-soft); box-shadow: 0 6px 18px rgba(194,90,40,.1); }
.st-card.open { border-color: var(--primary); }
.st-card-head { display: flex; align-items: center; gap: 10px; }
.st-shop-ico { width: 34px; height: 34px; flex: 0 0 34px; display: flex; align-items: center; justify-content: center; background: var(--primary-tint); color: var(--primary-deep); border-radius: 9px; font-size: 19px; }
.st-card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-card-title b { font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-card-title small { font-size: 13px; color: var(--muted); }
.st-count { font-size: 22px; font-weight: 700; color: var(--primary-deep); white-space: nowrap; }
.st-count small { font-size: 13px; font-weight: 500; color: var(--muted); }
.st-card-addr { font-size: 13px; color: #A1978D; margin-top: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; margin-top: 13px; padding: 11px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.st-metrics > div { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.st-metrics span { font-size: 13px; color: var(--muted); }
.st-metrics b { font-size: 15px; color: var(--ink); font-weight: 700; }
.st-metrics .st-na { color: #B4AAA0; cursor: help; }
.st-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 10px; min-height: 22px; }
.st-tag { font-size: 13px; color: var(--primary-deep); background: var(--primary-tint); padding: 2px 7px; border-radius: 5px; }
.st-tag.muted { color: var(--muted); background: var(--bg); }
.st-toggle { margin-top: 11px; width: 100%; border: 1px solid var(--line); background: #FCFAF7; border-radius: 8px; padding: 7px; font-size: 13px; color: var(--primary-deep); font-weight: 600; transition: .16s; }
.st-toggle:hover { background: var(--primary-tint); border-color: var(--primary-soft); }
.st-members { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 6px; max-height: 300px; overflow-y: auto; }
.st-member { display: flex; align-items: center; gap: 8px; padding: 5px 4px; border-radius: 7px; cursor: pointer; }
.st-member:hover { background: var(--primary-tint); }
.st-mem-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-mem-main b { font-size: 14px; color: var(--ink); font-weight: 600; }
.st-mem-main small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-mem-dept { font-size: 13px; color: var(--muted); }
.st-mem-status { font-size: 13px; color: var(--green); background: var(--green-soft); padding: 1px 6px; border-radius: 10px; }
.st-no-emp { font-size: 13px; color: var(--muted); text-align: center; padding: 12px 4px; }

.st-table-card { padding: 6px 4px; overflow-x: auto; }
.st-table th, .st-table td { padding: 10px 12px; font-size: 14px; white-space: nowrap; }
.st-td-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.st-other { margin-top: 20px; }
.st-other-head { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 10px; padding-left: 2px; }
.st-other-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.st-sub-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-left: 3px solid #9AA7B5; border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow); }
.st-sub-ico { width: 30px; height: 30px; flex: 0 0 30px; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--muted); border-radius: 8px; font-size: 17px; }
.st-sub-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-sub-body b { font-size: 14px; color: var(--ink); }
.st-sub-body small { font-size: 13px; color: var(--muted); }
.st-sub-count { font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.st-sub-toggle { width: auto; margin-top: 0; padding: 5px 10px; }
.st-sub-card .st-members { width: 100%; flex: 0 0 100%; }
.st-footnote { margin-top: 16px; padding: 12px 15px; font-size: 13px; line-height: 1.7; color: var(--muted); background: var(--orange-soft); border: 1px solid #F0D9A8; border-radius: var(--radius); }
.st-footnote b { color: #9E6B1E; }

@media (max-width: 1200px) {
  .st-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .st-other-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* ============================================================
   组织架构 · 组织图（公司 → 4 大板块）
   字号按「阅读舒适模式」标准：正文 >=13px，标题 18px，数字 26px
   ============================================================ */
.org-map { padding: 20px 22px 18px; margin-bottom: 16px; }
.org-map-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.org-map-title { font-size: 18px; font-weight: 800; color: var(--ink); }
.org-map-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.org-map-tag {
  font-size: 13px; font-weight: 700; color: var(--primary-deep);
  background: var(--primary-tint); border: 1px solid var(--primary-soft);
  padding: 5px 12px; border-radius: 20px; white-space: nowrap;
}
.org-map-canvas { padding: 2px 0 0; }
.org-map-root {
  width: 360px; max-width: 100%; margin: 0 auto; position: relative;
  display: flex; align-items: center; gap: 12px; padding: 13px 16px;
  background: linear-gradient(135deg, #B9531F, #8E3C18); color: #FFF;
  border-radius: 12px; box-shadow: 0 6px 18px rgba(158, 68, 32, .22);
}
.org-map-root::after {
  content: ''; position: absolute; left: 50%; bottom: -20px;
  width: 2px; height: 20px; background: var(--line);
}
.omr-ico {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: 9px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .25);
  display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.omr-body { display: flex; flex-direction: column; min-width: 0; }
.omr-body b { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.omr-body small { font-size: 13px; color: rgba(255, 255, 255, .9); margin-top: 3px; }
.org-map-branch {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  margin-top: 20px; padding-top: 20px; position: relative;
}
.org-map-branch::before {
  content: ''; position: absolute; top: 0; left: 12.5%; right: 12.5%;
  height: 2px; background: var(--line);
}
.org-map-node {
  position: relative; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 14px 13px; background: var(--card); box-shadow: var(--shadow);
  min-width: 0;
}
.org-map-node::before {
  content: ''; position: absolute; top: -20px; left: 50%;
  width: 2px; height: 20px; background: var(--line);
}
.org-map-node::after {
  content: ''; position: absolute; top: -25px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
  border: 2px solid #FFF; box-shadow: 0 0 0 2px var(--primary-soft);
}
.omn-top { display: flex; align-items: center; gap: 9px; }
.omn-ico {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-tint); color: var(--primary-deep); font-size: 17px;
}
.omn-name { font-size: 16px; font-weight: 800; color: var(--ink); }
.omn-nums { font-size: 14px; color: var(--ink-2); margin-top: 12px; white-space: nowrap; }
.omn-nums b { font-size: 26px; font-weight: 800; color: var(--primary-deep); font-variant-numeric: tabular-nums; }
.omn-sep { color: var(--muted); margin: 0 3px; }
.omn-track { height: 8px; border-radius: 6px; background: var(--line-2); overflow: hidden; margin-top: 11px; }
.omn-fill { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #D98324, #C25A28); }
.omn-pct { font-size: 13px; color: var(--muted); margin-top: 6px; }
.omn-sub {
  font-size: 13px; color: var(--ink-2); margin-top: 10px; padding-top: 9px;
  border-top: 1px dashed var(--line);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.om-scm .omn-ico { background: var(--blue-soft); color: var(--blue); }
.om-store .omn-ico { background: var(--green-soft); color: var(--green); }
.om-instore .omn-ico { background: var(--purple-soft); color: var(--purple); }
.org-map-foot { margin-top: 16px; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 1100px) {
  .org-map-branch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .org-map-branch::before, .org-map-node::before, .org-map-node::after, .org-map-root::after { display: none; }
}
@media (max-width: 900px) {
  .st-stats { grid-template-columns: repeat(2,1fr); }
  .st-grid, .st-other-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * 人员管理口径 / 门店经营类型（2026-11-19 全面更新）
 * 依据：data/store-master.js 同源直读；直管 / 加盟人员仅作记录与分析
 * ============================================================ */
.scope-card { padding: 20px 22px 18px; }
.scope-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.scope-head h2 { font-size: 19px; font-weight: 800; color: var(--ink); margin: 0 0 4px; }
.scope-head > div > span { font-size: 13px; color: var(--muted); }
.scope-src { flex: 0 0 auto; font-size: 13px; font-family: Consolas, Monaco, monospace; color: var(--primary-deep); background: var(--primary-tint); border: 1px solid var(--primary-soft); padding: 5px 10px; border-radius: 7px; }
.scope-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.scope-panel { border-radius: 12px; padding: 15px 18px; border: 1px solid; }
.scope-panel.sm-managed { background: #F1F7F2; border-color: #D3E7D9; }
.scope-panel.sm-record { background: #FCF3EA; border-color: #EEDCC8; }
.scope-panel-label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.scope-panel-num { font-size: 36px; font-weight: 800; line-height: 1.2; margin-top: 6px; font-variant-numeric: tabular-nums; }
.scope-panel.sm-managed .scope-panel-num { color: #2F7A4B; }
.scope-panel.sm-record .scope-panel-num { color: #A45A22; }
.scope-panel-num small { font-size: 15px; font-weight: 600; }
.scope-panel-desc { font-size: 13px; color: var(--muted); margin-top: 4px; }
.scope-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.scope-type { padding: 13px 15px; border: 1px solid var(--line); border-left: 4px solid #B8ADA1; border-radius: 10px; background: #FCFAF7; }
.scope-type.sc-direct { border-left-color: #3E8E5A; }
.scope-type.sc-manage { border-left-color: #D98324; }
.scope-type.sc-franchise { border-left-color: #7B5EA7; }
.scope-type-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.scope-type-top b { font-size: 16px; font-weight: 800; color: var(--ink); }
.scope-type-top span { font-size: 13px; color: var(--muted); }
.scope-type-num { font-size: 26px; font-weight: 800; margin-top: 6px; font-variant-numeric: tabular-nums; }
.scope-type-num small { font-size: 14px; font-weight: 600; color: var(--muted); }
.scope-type-desc { font-size: 13px; color: var(--ink-2); margin-top: 5px; line-height: 1.6; }
.scope-note { margin-top: 14px; padding: 12px 14px; border-radius: 9px; background: #FBF7F1; border: 1px dashed var(--line); font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.scope-note code { font-size: 13px; background: #F1EBE3; padding: 1px 5px; border-radius: 4px; }

.scope-banner { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-radius: 10px; background: var(--primary-tint); border: 1px solid var(--primary-soft); font-size: 15px; color: var(--ink-2); line-height: 1.7; }
.scope-banner-ico { font-size: 18px; line-height: 1.4; color: var(--primary-deep); }
.scope-banner b { color: var(--primary-deep); }
.scope-banner-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }

.sc-badge, .sm-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 7px; font-size: 13px; font-weight: 700; white-space: nowrap; line-height: 1.5; }
.sc-badge small, .sm-badge small { font-size: 13px; font-weight: 500; opacity: .78; }
.sc-direct, .sm-managed { background: #E8F4EC; color: #2C7550; border: 1px solid #CDE6D6; }
.sc-manage { background: #FDF1E1; color: #9A6416; border: 1px solid #F1DDBB; }
.sc-franchise, .sm-record { background: #F2ECF8; color: #6B4A9B; border: 1px solid #E2D5F1; }
.sc-unknown, .sm-unknown { background: #F1EEEA; color: #7A7168; border: 1px solid #E2DBD2; }

.scope-source-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.scope-source-item { padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; background: #FCFAF7; display: flex; flex-direction: column; gap: 4px; }
.scope-source-item span { font-size: 13px; color: var(--muted); }
.scope-source-item b { font-size: 15px; color: var(--ink); font-weight: 700; }

.st-type-filter { min-width: 132px; }
.st-card-type { display: flex; justify-content: flex-end; margin: -2px 0 8px; }
.st-na-scope { color: #9A6416; font-size: 13px; font-weight: 600; }

@media (max-width: 1200px) {
  .scope-types { grid-template-columns: 1fr; }
  .scope-source-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .scope-split { grid-template-columns: 1fr; }
  .scope-head { flex-direction: column; }
}
