/* =====================================================================
   简美管理 · 视觉设计系统（v2 重设计）
   方向：墨绿侧边栏 + 极光绿强调 + 玫瑰金点缀 / 玻璃拟态 / 大圆角 / 极淡阴影
   原则：仅改视觉，所有 class 选择器保留，JS 依赖的 id / data-* / .active 不变
   ===================================================================== */
:root {
  --bg: #F4F6F3;
  --panel: #FFFFFF;
  --ink: #0E2A22;
  --ink-2: #14382E;
  --brand: #1F9D6B;
  --brand-2: #34D399;
  --brand-dark: #157A52;
  --brand-light: #E7F4EC;
  --brand-soft: #E7F4EC;
  --rose: #E2A6B4;
  --rose-soft: #F7E9EC;
  --gold: #C8A86B;
  --text: #1B2A24;
  --muted: #6E7E76;
  --line: rgba(16, 40, 30, .08);
  --line-strong: rgba(16, 40, 30, .14);
  --danger: #E06B6B;
  --warn: #D98E2B;
  --ok: #1F9D6B;
  --shadow: 0 8px 34px rgba(16, 40, 30, .08);
  --shadow-sm: 0 3px 14px rgba(16, 40, 30, .06);
  --shadow-lg: 0 24px 70px rgba(16, 40, 30, .18);
  --radius: 18px;
  --radius-sm: 12px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
a { text-decoration: none; color: inherit; }

/* ===================== 登录 ===================== */
.login-mask {
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 520px at 12% 6%, rgba(52, 211, 153, .22), transparent 60%),
    radial-gradient(820px 540px at 92% 96%, rgba(226, 166, 180, .20), transparent 60%),
    linear-gradient(135deg, #0E2A22 0%, #123227 55%, #0B2018 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; overflow: hidden;
}
.login-mask::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(52, 211, 153, .35), transparent 70%);
  top: -160px; left: -120px; filter: blur(20px);
}
.login-mask::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle at 70% 60%, rgba(226, 166, 180, .30), transparent 70%);
  bottom: -150px; right: -100px; filter: blur(20px);
}
.login-card {
  position: relative; z-index: 2;
  width: 392px; max-width: 92vw;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 24px; padding: 40px 36px;
  backdrop-filter: blur(22px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .40);
  color: #eafff4;
}
.login-brand-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand-logo {
  width: 48px; height: 48px; border-radius: 14px;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  display: grid; place-items: center; box-shadow: 0 8px 24px rgba(52, 211, 153, .45);
}
.login-brand-name { font-size: 22px; font-weight: 700; letter-spacing: 1px; }
.login-brand-sub { font-size: 12px; color: rgba(234, 255, 244, .66); letter-spacing: 3px; margin-top: 2px; }
.login-field { margin-bottom: 16px; position: relative; }
.login-field label { display: block; font-size: 12px; color: rgba(234, 255, 244, .7); margin-bottom: 7px; letter-spacing: .5px; }
.login-input {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 12px;
  padding: 12px 14px; transition: border-color .15s, box-shadow .15s;
}
.login-input:focus-within { border-color: rgba(52, 211, 153, .6); box-shadow: 0 0 0 3px rgba(52, 211, 153, .12); }

/* 最近登录账号：点击账号框浮出下拉，点一条即填入 */
.login-history-toggle {
  flex: none; background: transparent; border: none; cursor: pointer;
  color: rgba(234, 255, 244, .65); font-size: 16px; line-height: 1;
  padding: 2px 4px; transition: transform .18s, color .18s;
}
.login-history-toggle:hover { color: rgba(52, 211, 153, .95); }
.login-history-toggle.open { transform: rotate(180deg); color: rgba(52, 211, 153, .95); }
.login-history {
  position: absolute; top: calc(100% - 2px); left: 0; right: 0; z-index: 30;
  display: none;
  background: rgba(14, 42, 34, .97);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 12px; padding: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  backdrop-filter: blur(16px);
  max-height: 260px; overflow-y: auto;
}
.login-history.open { display: block; }
.login-history-title { font-size: 11px; color: rgba(234, 255, 244, .5); letter-spacing: .5px; padding: 4px 8px 8px; }
.login-history-item {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 8px;
  color: rgba(234, 255, 244, .92); font-size: 13px;
  padding: 9px 10px; cursor: pointer;
  transition: background .15s;
}
.login-history-item:hover { background: rgba(52, 211, 153, .18); }
.login-history-empty { font-size: 12px; color: rgba(234, 255, 244, .55); padding: 10px 8px 12px; line-height: 1.5; }
.login-history-clear {
  display: block; width: 100%; margin-top: 4px;
  background: none; border: none; border-top: 1px solid rgba(255, 255, 255, .1);
  cursor: pointer; color: rgba(52, 211, 153, .9); font-size: 12px; padding: 10px 8px 4px;
}
.login-history-clear:hover { text-decoration: underline; }
.login-input svg { flex: none; opacity: .7; }
.login-input input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-size: 14px;
}
.login-input input::placeholder { color: rgba(234, 255, 244, .45); }
.login-submit {
  width: 100%; margin-top: 8px; padding: 14px; border-radius: 14px;
  font-size: 15px; font-weight: 600; letter-spacing: 2px; border: none; cursor: pointer;
  background: linear-gradient(140deg, var(--brand-2), var(--brand)); color: #06231a;
  box-shadow: 0 12px 30px rgba(52, 211, 153, .40); transition: .2s;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 38px rgba(52, 211, 153, .5); }
.login-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.login-error { color: #ff9f9f; font-size: 13px; min-height: 18px; margin: -6px 0 10px; line-height: 1.5; white-space: pre-line; }
.login-note { margin-top: 18px; text-align: center; font-size: 12px; color: rgba(234, 255, 244, .55); line-height: 1.7; }
.login-note p { margin: 0; }
.login-note p + p { margin-top: 6px; }
.field { display: block; text-align: left; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .form-control, input[type=text], input[type=number], input[type=datetime-local], select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); font-size: 14px; background: #fff; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .form-control:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.form-control-static { min-height: 40px; line-height: 22px; color: var(--ink); font-size: 14px; }

/* ===================== 布局 ===================== */
.app { display: flex; height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0;
  background: linear-gradient(180deg, #0E2A22 0%, #123227 100%);
  display: flex; flex-direction: column; padding: 22px 16px; position: relative;
}
.sidebar::after {
  content: ""; position: absolute; top: 0; right: 0; width: 1px; height: 100%;
  background: linear-gradient(180deg, transparent, rgba(52, 211, 153, .35), transparent);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(140deg, var(--brand-2), var(--brand));
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(52, 211, 153, .4);
}
.brand .logo svg { width: 22px; height: 22px; }
.brand .name { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: .5px; line-height: 1.1; }
.brand .sub { font-size: 9px; color: rgba(223, 245, 234, .5); letter-spacing: 2px; margin-top: 3px; }
.nav { flex: 1; padding: 4px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: rgba(223, 245, 234, .78); margin-bottom: 4px; font-size: 14px; cursor: pointer;
  transition: .18s; position: relative;
}
.nav-item svg { flex: none; opacity: .8; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(52, 211, 153, .18), rgba(52, 211, 153, .03));
  color: #fff; font-weight: 600;
}
.nav-item.active::before {
  content: ""; position: absolute; left: -16px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 3px; background: var(--brand-2); box-shadow: 0 0 12px var(--brand-2);
}
.sidebar-foot { padding: 14px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .08); }
.shop-name { font-size: 12px; color: rgba(223, 245, 234, .65); margin-bottom: 10px; word-break: break-all; line-height: 1.5; }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
  background: rgba(255, 255, 255, .72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.page-title { font-size: 19px; font-weight: 600; color: var(--ink); font-family: var(--serif); letter-spacing: .5px; }
.user-box { font-size: 13px; color: var(--muted); }
.content { flex: 1; overflow-y: auto; padding: 28px; }

/* ===================== 按钮 ===================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; color: var(--text); transition: all .15s; }
.btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-primary { background: linear-gradient(140deg, var(--brand-2), var(--brand)); border-color: transparent; color: #06231a; font-weight: 600; box-shadow: 0 8px 20px rgba(31, 157, 107, .24); }
.btn-primary:hover { color: #06231a; filter: brightness(1.04); box-shadow: 0 12px 26px rgba(31, 157, 107, .32); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn-danger { color: var(--danger); border-color: #f0caca; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===================== 卡片 / 网格 ===================== */
.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-1 { grid-template-columns: 1fr; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .grid-4, .grid-3, .grid-2, .grid-1 { grid-template-columns: 1fr; } .sidebar { width: 64px; } .nav-item { font-size: 0; } .nav-item svg { font-size: 14px; } }

.stat-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.stat-card::after { content: ""; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%; background: var(--brand-light); opacity: .5; }
.stat-card .label { color: var(--muted); font-size: 13px; position: relative; }
.stat-card .value { font-size: 28px; font-weight: 700; margin-top: 10px; color: var(--ink); font-family: var(--serif); letter-spacing: .5px; position: relative; }
.stat-card .sub { font-size: 12px; color: var(--muted); margin-top: 8px; position: relative; }
.stat-card .stat-tip { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; position: relative; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.panel-title { font-size: 15px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); }

/* ===================== 表格 ===================== */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 600; background: #FAFBFA; font-size: 12px; letter-spacing: .3px; }
.table tbody tr:hover { background: #FBFDFB; }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; min-width: 780px; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th { color: var(--muted); font-weight: 600; background: #FAFBFA; font-size: 12px; letter-spacing: .3px; white-space: nowrap; }
.data-table td { white-space: normal; word-break: break-word; }
.data-table td:nth-child(1) { white-space: nowrap; }
.data-table td:nth-child(4) { white-space: nowrap; }
.data-table td:last-child { white-space: nowrap; width: 60px; }
.data-table tbody tr:hover { background: #FBFDFB; }
.ex-attach-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); cursor: pointer; margin-right: 6px; background: #FAFBFA; vertical-align: middle; }
.ex-attach-thumb:hover { opacity: .85; }
.tag { display: inline-flex; align-items: center; justify-content: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; background: var(--brand-soft); color: var(--brand-dark); font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.tag-gray { background: #EEF1EE; color: var(--muted); }
.tag-warn { background: #FBF1E2; color: var(--warn); }
.tag-ok { background: #E7F4EC; color: var(--brand-dark); }
.tag-danger { background: #FBE9E9; color: var(--danger); }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .form-control, .toolbar input, .toolbar select { width: auto; min-width: 160px; }
.ex-cat-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ex-cat-chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 13px; color: var(--text); background: #fff; cursor: pointer; transition: all .15s; }
.ex-cat-chip input { display: none; }
.ex-cat-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.ex-cat-chip.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); font-weight: 500; }
.om-toolbar label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.om-toolbar .form-control, .om-toolbar input, .om-toolbar select { min-width: 0; }

/* ===================== 表单 / 开单 ===================== */
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.modal-mask { position: fixed; inset: 0; background: rgba(14, 42, 34, .42); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: var(--radius); width: 560px; max-width: 96vw; max-height: 90vh; overflow-y: auto; padding: 24px; box-shadow: var(--shadow-lg); }
.modal h3 { margin: 0 0 18px; font-size: 17px; font-weight: 600; color: var(--ink); font-family: var(--serif); }
.modal-close-x { float: right; border: none; background: none; font-size: 22px; cursor: pointer; line-height: 1; color: var(--muted); }
.modal-close-x:hover { color: var(--text); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.em-attach-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.em-attach-thumb { position: relative; width: 80px; height: 80px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line-strong); background: #FAFBFA; }
.em-attach-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.em-attach-del { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; line-height: 20px; text-align: center; background: rgba(0,0,0,.5); color: #fff; border-radius: 50%; font-size: 14px; cursor: pointer; }
.card-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.card-check { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #FAFBFA; cursor: pointer; transition: all .15s; }
.card-check:hover { border-color: var(--brand); }
.card-check.checked { background: var(--brand-soft); border-color: var(--brand); }
.card-check .card-check-icon { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--brand); color: #fff; background: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.card-check:not(.checked) .card-check-icon { background: #fff; color: transparent; }
.card-check .card-name { flex: 1; font-size: 13px; }
.card-check input[type=number] { width: 130px; }
.card-scope-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.scope-tag { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-dark); }
.member-benefit-toggle { display: flex; gap: 8px; }
.mb-btn { flex: 1; padding: 8px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-size: 13px; color: var(--muted); }
.mb-btn:hover { border-color: var(--brand); }
.mb-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.order-search-bar { display: flex; gap: 8px; }
.order-search-bar input { flex: 1; }
.dropdown-list { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); margin-top: 6px; max-height: 240px; overflow-y: auto; background: #fff; box-shadow: var(--shadow); }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: var(--brand-soft); }
.dropdown-empty { padding: 14px; color: var(--muted); font-size: 13px; }
.dd-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-size: 12px; flex: none; }
.dd-text { font-size: 14px; }
.add-avatar { background: var(--brand-light); color: var(--brand-dark); border: 1px dashed var(--brand); font-weight: 700; }
.dropdown-item.add-customer-item { color: var(--brand-dark); font-weight: 600; background: var(--brand-light); }
.dropdown-item.add-customer-item:hover { background: var(--brand-soft); }
.selected-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 14px; background: var(--brand-soft); border-radius: var(--radius-sm); }
.selected-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(140deg, var(--brand-2), var(--brand)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; flex: none; }
/* 预约弹窗：每个服务单独选美容师 */
.ap-item-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #FAFBFA; margin-bottom: 8px; flex-wrap: wrap; }
.ap-item-name { flex: 1; min-width: 80px; font-size: 14px; color: var(--ink); }
.ap-item-del { padding: 4px 12px; }
.ap-staff-conflict { width: 100%; color: #E0533D; font-size: 12px; margin-top: 2px; }
.selected-text { flex: 1; font-size: 14px; color: var(--ink); font-weight: 500; }
.selected-clear { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); font-size: 18px; }
.selected-clear:hover { background: #fff; color: var(--danger); }
.svc-selector { position: relative; display: inline-block; }
.svc-popover { position: absolute; top: calc(100% + 8px); left: 0; z-index: 10; width: 340px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 14px; }
.svc-popover-title { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.svc-chip-wrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.svc-chip { border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; transition: all .15s; background: #fff; }
.svc-chip:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.svc-chip-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.svc-chip-price { font-size: 12px; color: var(--brand-dark); margin-top: 4px; }
.service-line { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; padding: 12px; background: #FAFBFA; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.service-line .svc-info { flex: 1; display: flex; align-items: center; gap: 10px; }
.service-line .svc-name { font-size: 14px; font-weight: 600; color: var(--ink); min-width: 100px; }
.service-line .svc-price { width: 110px; }
.service-line .svc-staff { width: auto; min-width: 110px; max-width: 160px; flex: none; }
.danger-x { color: var(--danger); cursor: pointer; font-size: 20px; text-align: center; width: 28px; flex: none; }
.danger-x:hover { color: #c0392b; }

/* 开单页商品行（零售 + 配套耗品） */
.product-line { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; padding: 10px 12px; background: #FAFBFA; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.product-line .prod-info { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.product-line .prod-name { font-size: 14px; font-weight: 600; color: var(--ink); min-width: 90px; }
.product-line .prod-amt { color: var(--brand-dark); }
.product-line input[type="number"] { width: 90px; }
.product-line .prod-staff { width: auto; min-width: 110px; max-width: 160px; flex: none; }

/* 商品选择弹窗 */
.pp-list { max-height: 320px; overflow-y: auto; margin-top: 8px; }
.pp-item { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.pp-item:last-child { border-bottom: none; }
.pp-item .pp-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
.pp-item .pp-meta { font-size: 12px; color: var(--muted); }
.pay-methods { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-item { padding: 11px 20px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; background: #fff; transition: all .15s; color: var(--muted); font-weight: 500; }
.pay-item:hover { border-color: var(--brand); color: var(--brand-dark); }
.pay-item.active { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); box-shadow: 0 0 0 3px var(--brand-soft); }

/* 开单页左右布局 */
.order-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.order-main { margin-bottom: 0; }
.order-side { position: sticky; top: 18px; }
.order-pay-panel { margin-bottom: 18px; }
.pay-methods--grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pay-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 76px; padding: 12px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; transition: all .15s; color: var(--muted); font-size: 13px; font-weight: 600;
}
.pay-opt:hover { border-color: var(--brand); color: var(--brand-dark); }
.pay-opt.sel { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); box-shadow: 0 0 0 3px var(--brand-soft); }
.pay-opt-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #F1F5F2; color: var(--brand-dark); }
.pay-opt.sel .pay-opt-icon { background: #fff; }
.pay-amt-rows { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pay-amt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #F7FAF8; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; }
.pay-amt-label { font-size: 13px; color: var(--ink); font-weight: 600; }
.pay-amt-input { width: 130px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 13px; text-align: right; background: #fff; }
.pay-amt-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pay-amt-cardval { font-size: 14px; font-weight: 700; color: var(--brand-dark); }
.pay-card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #F0F7F3; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; }
.pay-card-name { font-size: 13px; color: var(--ink); font-weight: 600; }
.pay-card-items { font-size: 12px; color: var(--muted); margin-left: 4px; }
.pay-card-amt { font-size: 14px; font-weight: 700; color: var(--brand-dark); flex: none; }
.summary-box { background: linear-gradient(140deg, #0E2A22, #16382C); color: #eafff4; border-radius: var(--radius); padding: 20px; margin-top: 0; }
@media (max-width: 1100px) { .order-layout { grid-template-columns: 1fr; } .order-side { position: static; } }
.summary-box .line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; color: rgba(234, 255, 244, .8); }
.summary-box .total { font-size: 20px; font-weight: 700; color: #fff; padding-top: 14px; margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .14); font-family: var(--serif); }

/* ===================== 提示 ===================== */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #0E2A22; color: #fff; padding: 11px 20px; border-radius: 999px; z-index: 200; font-size: 14px; box-shadow: var(--shadow-lg); }
.empty { text-align: center; color: var(--muted); padding: 44px 0; }
.empty-icon { font-size: 32px; opacity: .4; margin-bottom: 8px; }
.pagination { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.list-item { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; background: #fff; }
.card-line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 13px; }

/* ===================== 加载态 ===================== */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 0; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { padding: 4px 0; }
.skeleton-line { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #eef1f0 25%, #f6f8f7 37%, #eef1f0 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; margin: 10px 0; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ===================== 顶部操作条 ===================== */
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-strong); background: #fff; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: var(--text); transition: all .15s; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand-dark); }

/* ===================== 标签页 ===================== */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 18px; cursor: pointer; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; transition: .15s; }
.tab:hover { color: var(--brand-dark); }
.tab.active { color: var(--brand-dark); font-weight: 600; border-bottom-color: var(--brand); }

/* ===================== 章节 ===================== */
.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.section-title { font-size: 15px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
.sub-section { margin-bottom: 18px; }
.sub-section h4 { font-size: 14px; margin: 0 0 10px; color: var(--text); display: flex; align-items: center; gap: 8px; }

/* ===================== 图表（纯 CSS 条形） ===================== */
.chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 110px; align-items: center; gap: 12px; font-size: 13px; }
.bar-track { background: #EEF1EE; border-radius: 999px; height: 22px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; transition: width .4s; }
.bar-val { text-align: right; color: var(--muted); }
@media (max-width: 720px) { .bar-row { grid-template-columns: 90px 1fr 80px; } }

/* ===================== 开关 ===================== */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #cfd6d3; border-radius: 24px; transition: .2s; cursor: pointer; }
.switch .slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ===================== 表单网格 ===================== */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

/* ===================== 进度条 / 徽标 ===================== */
.progress { height: 8px; background: #eef1f0; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; }

/* ===================== 抽屉式详情 ===================== */
.drawer-mask { position: fixed; inset: 0; background: rgba(14, 42, 34, .42); z-index: 60; display: flex; justify-content: flex-end; }
.drawer { width: 600px; max-width: 96vw; height: 100%; background: #fff; overflow-y: auto; padding: 26px; box-shadow: -8px 0 40px rgba(0, 0, 0, .16); }
.drawer h3 { margin: 0 0 20px; font-size: 17px; font-weight: 600; color: var(--ink); font-family: var(--serif); }
.customer-header-card { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 18px; background: linear-gradient(140deg, var(--brand-soft), #fff); border: 1px solid var(--line); border-radius: var(--radius); }
.customer-avatar-lg { width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(140deg, var(--brand-2), var(--brand)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600; flex: none; }
.customer-header-info { flex: 1; }
.customer-name-lg { font-size: 20px; font-weight: 700; color: var(--ink); font-family: var(--serif); }
.customer-tags-row { margin: 6px 0; display: flex; gap: 6px; flex-wrap: wrap; }
.customer-tag { display: inline-flex; align-items: center; justify-content: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.customer-tag.tag-new { background: #E7F4EC; color: var(--brand-dark); }
.customer-tag.tag-old { background: #EEF1EE; color: var(--muted); }
.customer-tag.tag-level { background: #FBF3E2; color: var(--gold); }
.customer-contact { font-size: 13px; color: var(--muted); }
.detail-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.detail-cell { display: flex; flex-direction: column; gap: 4px; }
.detail-cell .detail-label { font-size: 12px; color: var(--muted); }
.detail-cell .detail-value { font-size: 14px; font-weight: 500; color: var(--ink); }
.allergy-box, .remark-box { margin-top: 12px; padding: 11px 14px; background: #FAFBFA; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.6; }
.allergy-box { color: var(--danger); background: #FBE9E9; }
.stats-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-cell { text-align: center; padding: 14px; background: var(--bg); border-radius: var(--radius-sm); }
.stat-cell .stat-value { font-size: 19px; font-weight: 700; color: var(--brand-dark); font-family: var(--serif); }
.stat-cell .stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.service-analysis-row { display: grid; grid-template-columns: 1fr 130px; align-items: center; gap: 12px; margin-bottom: 12px; }
.service-analysis-row .sa-info { display: flex; justify-content: space-between; font-size: 13px; }
.service-analysis-row .sa-bar { height: 8px; background: #EEF1EE; border-radius: 999px; overflow: hidden; grid-column: 1 / -1; }
.service-analysis-row .sa-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; }
.service-analysis-row .sa-amount { text-align: right; font-size: 13px; color: var(--muted); }
.cd-card-item { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; cursor: pointer; transition: all .15s; background: #fff; }
.cd-card-item:hover { background: var(--brand-soft); border-color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.cd-card-main { flex: 1; }
.cd-card-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.cd-card-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.cd-card-item .arrow { color: var(--muted); font-size: 18px; }
.cd-card-item--inactive { opacity: .72; background: #FAFBFA; }
.card-status-tag { display: inline-flex; align-items: center; justify-content: center; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; margin-left: 6px; vertical-align: middle; }
.card-status-tag.status-active { background: #E7F4EC; color: var(--brand-dark); }
.card-status-tag.status-inactive { background: #F0F0F0; color: var(--muted); }
.inactive-cards { margin-top: 12px; }
.inactive-cards-toggle { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: #F4F6F5; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; color: var(--muted); font-weight: 500; }
.inactive-cards-toggle:hover { background: #EEF1F0; }
.inactive-arrow { transition: transform .2s; }
.inactive-cards-list { display: none; padding-top: 10px; }
.inactive-cards.expanded .inactive-cards-list { display: block; }
.inactive-cards.expanded .inactive-arrow { transform: rotate(90deg); }
.cd-history-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cd-history-item:last-child { border-bottom: none; }
.cd-history-time { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.cd-history-body { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cd-history-items { display: flex; gap: 6px; flex-wrap: wrap; }
.history-tag { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 12px; background: #F0F3F2; color: var(--text); }
.history-tag--card { background: #E7F4EC; color: var(--brand-dark); }
.cd-history-amount { font-size: 16px; font-weight: 700; color: var(--brand-dark); white-space: nowrap; }
.kv { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 500; color: var(--ink); }

/* ===================== 预约日历（对齐概念版：左日历 + 右列表） ===================== */
.appt-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.appt-calendar-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.appt-cal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.appt-cal-header .btn-sm { width: 34px; padding: 8px 0; }
.appt-cal-title { font-size: 18px; font-weight: 700; flex: 1; text-align: center; font-family: var(--serif); color: var(--ink); }
.appt-today-count { font-size: 12px; color: var(--brand-dark); background: var(--brand-soft); padding: 4px 10px; border-radius: 10px; }
.appt-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.appt-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.appt-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12px; cursor: pointer; font-size: 14px; position: relative; transition: all .15s; color: var(--text); }
.appt-day:hover { background: var(--brand-soft); }
.appt-day--today { color: var(--brand-dark); font-weight: 700; }
.appt-day--selected { background: linear-gradient(140deg, var(--brand-2), var(--brand)); color: #06231a; font-weight: 700; box-shadow: 0 6px 16px rgba(31, 157, 107, .3); }
.appt-day--selected:hover { background: linear-gradient(140deg, var(--brand-2), var(--brand-dark)); }
.appt-day--empty { cursor: default; }
.appt-day-text { line-height: 1; }
.appt-day-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-2); position: absolute; bottom: 9px; }
.appt-day--selected .appt-day-dot { background: #06231a; }
.appt-list-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.appt-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.appt-list-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.appt-view-switch { display: flex; gap: 6px; background: var(--brand-soft); padding: 4px; border-radius: 10px; margin-bottom: 16px; }
.appt-view-btn { flex: 1; border: none; background: transparent; padding: 8px 0; border-radius: 8px; font-size: 13px; color: var(--muted); cursor: pointer; transition: all .15s; }
.appt-view-btn.active { background: #fff; color: var(--brand-dark); font-weight: 600; box-shadow: var(--shadow-sm); }
.appt-status-chips { display: flex; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.appt-chip { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.appt-chip-dot { width: 6px; height: 6px; border-radius: 50%; }
.appt-chip.pending .appt-chip-dot { background: var(--warn); }
.appt-chip.confirmed .appt-chip-dot { background: var(--brand); }
.appt-chip.completed .appt-chip-dot { background: #9AA49E; }
.appt-chip.cancelled .appt-chip-dot { background: var(--danger); }
.appt-list { display: flex; flex-direction: column; }
.appt-item { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.appt-item:last-child { border-bottom: none; }
.appt-avatar { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; flex: none; }
.appt-avatar.pending { background: var(--warn); }
.appt-avatar.confirmed { background: var(--brand); }
.appt-avatar.completed { background: #9AA49E; }
.appt-avatar.cancelled { background: var(--danger); }
.appt-info { flex: 1; min-width: 0; }
.appt-info-top { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.appt-time { font-size: 14px; font-weight: 700; color: var(--ink); }
.appt-name { font-size: 14px; color: var(--text); }
.appt-modified-badge { display: inline-flex; align-items: center; justify-content: center; font-size: 11px; line-height: 1; padding: 2px 7px; border-radius: 6px; font-weight: 600; background: #FBEAEA; color: var(--rose, #C25B5B); border: 1px solid var(--rose, #C25B5B); flex-shrink: 0; }
.appt-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-status { font-size: 12px; padding: 3px 10px; border-radius: 10px; white-space: nowrap; }
.appt-status.pending { background: #FFF4E6; color: var(--warn); }
.appt-status.confirmed { background: var(--brand-soft); color: var(--brand-dark); }
.appt-status.completed { background: #F0F3F2; color: #6E7E76; }
.appt-status.cancelled { background: #FDEEEE; color: var(--danger); }
.appt-actions { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 1100px) {
  .appt-layout { grid-template-columns: 1fr; }
}

/* ===================== 表格内操作 ===================== */
.btn-group { display: flex; gap: 6px; flex-wrap: nowrap; }
.member-row .level-cell { white-space: nowrap; font-weight: 600; color: var(--brand); }
.member-row .btn-group { white-space: nowrap; }
.toast-error { background: var(--danger); }
.help-text { font-size: 12px; color: var(--muted); background: var(--brand-soft); border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 14px; line-height: 1.6; }

/* 开卡提成分档 */
.tier-mode-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 6px 0 16px; }
.tier-mode-label { font-weight: 600; color: var(--ink); }
.radio-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--ink); cursor: pointer; }
.tier-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; background: #fff; }
.tier-block-title { font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.tier-list { display: flex; flex-direction: column; gap: 8px; }
.tier-row { display: flex; align-items: center; gap: 8px; }
.tier-row .tier-min, .tier-row .tier-rate { width: 110px; }
.tier-prefix, .tier-unit { font-size: 14px; color: var(--muted); }
.tier-add-wrap { text-align: right; margin-top: 8px; }
.tier-empty { font-size: 13px; color: var(--muted); padding: 6px 0; }
.btn-outline { background: #fff; border: 1px solid var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-danger-outline { background: #fff; border: 1px solid var(--danger); color: var(--danger); }
.btn-danger-outline:hover { background: rgba(220, 53, 69, 0.08); }
.tier-hint-web { font-size: 12px; color: #999; margin-bottom: 8px; line-height: 1.5; }
.tier-example-web { font-size: 12px; color: #555; background: var(--brand-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin: 4px 0 12px; line-height: 1.6; }

/* ===================== 设置页 ===================== */
.settings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.settings > .section { margin-bottom: 0; }
@media (max-width: 980px) { .settings { grid-template-columns: 1fr; } }
.settings .section { overflow-x: auto; }
.settings .table td,
.settings .table th { white-space: nowrap; vertical-align: middle; }
.settings .table .btn-group .btn { white-space: nowrap; flex-shrink: 0; }

/* ===================== 概念版外壳补充 ===================== */
/* 侧边栏品牌（concept .side-brand） */
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.side-brand .logo { width: 40px; height: 40px; border-radius: 12px; flex: none; background: linear-gradient(140deg, var(--brand-2), var(--brand)); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(52, 211, 153, .4); }
.side-brand .logo svg { width: 22px; height: 22px; }
.side-brand .name { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .5px; line-height: 1.1; }
.side-brand .sub { font-size: 10px; color: rgba(223, 245, 234, .5); letter-spacing: 2px; margin-top: 3px; }

/* 导航分组标签 */
.nav-label { font-size: 10px; letter-spacing: 2px; color: rgba(223, 245, 234, .4); padding: 8px 12px 6px; }

/* 侧边栏底部用户区 */
.side-foot { margin-top: auto; padding: 14px 12px 10px; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 8px; }
.side-foot-main { display: flex; align-items: center; gap: 10px; }
.side-foot .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(140deg, var(--gold), #a9823f); display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 600; flex: none; }
.side-foot .who { flex: 1; min-width: 0; font-size: 13px; color: #fff; line-height: 1.35; }
.side-foot .who #user-box { display: block; color: #fff; }
.side-foot .who small { display: block; color: rgba(223, 245, 234, .5); font-size: 11px; }
.side-foot .logout-link { display: block; width: 100%; text-align: left; padding: 6px 0 0; font-size: 11px; color: rgba(223, 245, 234, .45); background: transparent; border: none; border-top: 1px solid rgba(255, 255, 255, .06); cursor: pointer; }
.side-foot .logout-link:hover { color: var(--brand-2); }

/* 顶部栏（concept 版） */
.topbar { height: 64px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: rgba(255, 255, 255, .72); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar .shop { font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.topbar .crumb { font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar .search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; width: 240px; color: var(--muted); }
.topbar .search input { border: none; outline: none; background: transparent; flex: 1; font-size: 13px; color: var(--text); }
.topbar .search input::placeholder { color: var(--muted); }
.topbar .icon-btn { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); position: relative; padding: 0; }
.topbar .icon-btn .badge { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); }
.topbar .icon-btn:hover { border-color: var(--brand); color: var(--brand-dark); }
.topbar .me { display: flex; align-items: center; gap: 10px; }
.topbar .me .av { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(140deg, var(--gold), #a9823f); display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 13px; flex: none; }
.topbar .me .nm { font-size: 13px; line-height: 1.25; color: var(--text); font-weight: 500; }
.topbar .me .nm small { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 1px; }

/* 页面头部 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.page-head .eyebrow { font-size: 11px; letter-spacing: 3px; color: var(--brand); text-transform: uppercase; margin-bottom: 6px; font-weight: 600; }
.page-head h1 { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--ink); letter-spacing: .5px; margin: 0; line-height: 1.2; }
.page-head .desc { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* 卡片（concept 轻量版，与 .panel 等价但保留 .card 语义） */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.card h3 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card h3 .tag { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--muted); }

/* KPI 卡片 */
.kpi { display: flex; flex-direction: column; gap: 10px; }
.kpi .lab { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi .lab .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 600; }
.kpi .num { font-family: var(--serif); font-size: 30px; font-weight: 600; color: var(--ink); letter-spacing: .5px; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi .delta { font-size: 12px; font-weight: 600; }
.delta.up { color: var(--brand); }
.delta.down { color: var(--rose); }

/* 图表区 */
.chart-area { width: 100%; height: 180px; display: block; }
.legend { display: flex; gap: 18px; margin-top: 10px; font-size: 12px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* 环形图 */
.donut-wrap { display: flex; align-items: center; gap: 24px; }
.donut-legend { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.donut-legend .row { display: flex; align-items: center; gap: 9px; color: var(--text); }
.donut-legend .row b { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 600; }
.donut-legend .sw { width: 10px; height: 10px; border-radius: 3px; }

/* 列表行（订单/客户卡片） */
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-row .av { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; color: #fff; font-weight: 600; font-size: 13px; }
.list-row .meta { min-width: 0; flex: 1; }
.list-row .meta .t { font-size: 14px; font-weight: 600; color: var(--ink); }
.list-row .meta .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 状态胶囊 */
.pill { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; }
.pill.green { background: var(--brand-soft); color: var(--brand-dark); }
.pill.rose { background: var(--rose-soft); color: #c06b7e; }
.pill.gold { background: #FBF3E2; color: #a9823f; }
.pill.gray { background: #EEF1EE; color: var(--muted); }

/* 双列行 */
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .row2 { grid-template-columns: 1fr; } }

/* 保留旧外壳类兼容 */
.sidebar-foot { padding: 14px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .08); }
.shop-name { font-size: 12px; color: rgba(223, 245, 234, .65); margin-bottom: 10px; word-break: break-all; line-height: 1.5; }
.page-title { font-size: 19px; font-weight: 600; color: var(--ink); font-family: var(--serif); letter-spacing: .5px; }
.user-box { font-size: 13px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ============== 预约日期+时间 选择器（日历 → 时段） ============== */
.ap-picker { display: flex; flex-direction: column; gap: 12px; }
.ap-picker-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ap-picker-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.ap-picker-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 4px; }
.ap-picker-weekdays span { text-align: center; font-size: 12px; color: var(--muted); }
.ap-picker-weekdays span.we { color: var(--rose); }
.ap-picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ap-picker-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 14px; color: var(--text); cursor: pointer; transition: all .15s; border: 1px solid transparent; }
.ap-picker-day:hover { background: var(--brand-soft); }
.ap-picker-day--weekend { color: #c06b7e; }
.ap-picker-day--today { font-weight: 700; color: var(--brand-dark); }
.ap-picker-day--selected { background: linear-gradient(140deg, var(--brand-2), var(--brand)); color: #06231a; font-weight: 700; box-shadow: 0 6px 16px rgba(31, 157, 107, .3); border-color: transparent; }
.ap-picker-day--selected:hover { background: linear-gradient(140deg, var(--brand-2), var(--brand-dark)); }
.ap-picker-day--disabled { color: var(--line-strong); cursor: not-allowed; background: transparent; text-decoration: line-through; opacity: .5; }
.ap-picker-day--empty { cursor: default; }
.ap-picker-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 4px; max-height: 200px; overflow-y: auto; padding: 4px; }
.ap-time-slot { padding: 9px 0; border: 1px solid var(--line-strong); background: #fff; border-radius: 10px; font-size: 14px; color: var(--text); cursor: pointer; transition: all .15s; }
.ap-time-slot:hover { border-color: var(--brand); background: var(--brand-soft); }
.ap-time-slot.active { background: linear-gradient(140deg, var(--brand-2), var(--brand)); color: #06231a; font-weight: 700; border-color: transparent; box-shadow: 0 6px 16px rgba(31, 157, 107, .28); }
.ap-picker-foot { display: flex; align-items: center; gap: 10px; padding-top: 6px; border-top: 1px solid var(--line); margin-top: 2px; }
.ap-picker-label { font-size: 13px; }

/* ===== 考勤管理 ===== */
.tb-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); }
.att-summary { margin-top: 16px; }
.att-stat { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.att-stat-card { flex: 1; min-width: 140px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 6px 18px rgba(14, 42, 34, .05); }
.att-stat-num { font-size: 30px; font-weight: 700; color: var(--brand-dark); line-height: 1.1; }
.att-stat-label { font-size: 13px; color: var(--text-soft, #6b7d74); margin-top: 4px; }
.att-table { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.att-tr { display: grid; grid-template-columns: 1.4fr 1fr .8fr .8fr .8fr; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.att-tr:last-child { border-bottom: none; }
.att-th { background: var(--brand-soft, #E7F4EC); font-weight: 600; color: var(--brand-dark); }
.att-abn { color: #A32D2D; font-weight: 600; }
.att-rows { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.att-row { display: grid; grid-template-columns: 80px 1fr 1.4fr 1.4fr; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.att-row:last-child { border-bottom: none; }
.att-row-type { width: 64px; height: 30px; border-radius: 15px; font-size: 13px; display: flex; align-items: center; justify-content: center; color: #fff; }
.att-row-type.in { background: linear-gradient(140deg, var(--brand-2), var(--brand)); }
.att-row-type.out { background: linear-gradient(140deg, #85B7EB, #185FA5); }
.att-row-time { color: var(--text-soft, #6b7d74); }
.att-row-dist { color: var(--text-soft, #6b7d74); }

/* ===== 考勤月历 ===== */
.cal-title { font-size: 16px; font-weight: 700; color: var(--ink); min-width: 110px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 14px; }
.cal-dow { text-align: center; font-size: 13px; color: var(--text-soft, #6b7d74); padding-bottom: 4px; font-weight: 600; }
.cal-cell { min-height: 76px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px 4px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; transition: all .15s; }
.cal-cell:hover { box-shadow: 0 6px 16px rgba(14, 42, 34, .08); }
.cal-empty { background: transparent; border: none; }
.cal-num { font-size: 15px; font-weight: 600; color: var(--ink); }
.cal-lab { font-size: 11px; padding: 2px 6px; border-radius: 8px; color: #fff; }
.cal-normal { border-color: #bfe3cd; }
.cal-normal .cal-lab { background: #2E9E63; }
.cal-abnormal { border-color: #f3d6a8; }
.cal-abnormal .cal-lab { background: #E0922B; }
.cal-missing { border-color: #f0bcbc; }
.cal-missing .cal-lab { background: #C0392B; }
.cal-present { border-color: #bcd6f0; }
.cal-present .cal-lab { background: #2E7FC4; }
.cal-rest { background: #f6f8f7; border-color: var(--line); }
.cal-rest .cal-lab { background: #9aa8a1; }
.cal-future { opacity: .5; background: #fafbfa; border-style: dashed; }
.cal-future .cal-lab { background: #c4cdc8; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 13px; color: var(--text-soft, #6b7d74); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dot-normal { background: #2E9E63; }
.dot-abnormal { background: #E0922B; }
.dot-missing { background: #C0392B; }
.dot-present { background: #2E7FC4; }
.dot-rest { background: #9aa8a1; }

/* ===== 排班管理 ===== */
.section-sub { font-size: 14px; font-weight: 600; color: var(--brand-dark); margin: 16px 0 10px; }
.tpl-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.tpl-row .form-control { width: auto; min-width: 120px; }
.sched-staff { font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.sched-items { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sched-chip { font-size: 12px; padding: 4px 8px; border-radius: 8px; background: var(--brand-soft, #E7F4EC); color: var(--brand-dark); border: 1px solid #cfe7d8; }

/* ===== 排班日历（点选日期）===== */
.cal-grid--sched { max-width: 560px; }
.cal-grid--sched .cal-cell { cursor: pointer; user-select: none; }
.sc-cell:hover { border-color: var(--brand); background: var(--brand-soft, #E7F4EC); }
.sc-selected { background: linear-gradient(140deg, var(--brand-2, #34D399), var(--brand, #1F9D6B)) !important; border-color: transparent !important; }
.sc-selected .cal-num { color: #06231a; font-weight: 700; }
.sc-selected .cal-lab { background: rgba(6, 35, 26, .55); }
.sc-today-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #E0922B; margin-left: 3px; vertical-align: middle; }
.cal-tip { margin-top: 10px; font-size: 12px; color: var(--text-soft, #6b7d74); }
.att-row-dist.att-abn { color: #A32D2D; font-weight: 600; }

/* ===== 排班总览月历（每天显示已排员工与班次）===== */
.cal-grid--ov { gap: 6px; }
.cal-grid--ov .cal-cell { min-height: 74px; padding: 5px 4px; gap: 3px; cursor: default; }
.cal-grid--ov .cal-num { font-size: 13px; }
.ov-chips { display: flex; flex-direction: column; gap: 3px; width: 100%; min-width: 0; }
.ov-chip { display: flex; flex-direction: column; line-height: 1.25; font-size: 11px; padding: 2px 6px; border-radius: 6px; max-width: 100%; overflow: hidden; }
.ov-chip b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-chip i { font-style: normal; font-size: 10px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-today { border-color: #E0922B !important; border-width: 1.5px; }

/* ===== 版本徽标（诊断用：一眼看出跑的是哪版）===== */
.app-ver { position: fixed; right: 10px; bottom: 8px; z-index: 99; font-size: 11px; color: var(--text-soft, #6b7d74);
  background: rgba(255,255,255,.8); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; user-select: none; }

/* ===== 员工多选下拉（单行，不撑高）===== */
.msel { position: relative; display: inline-block; vertical-align: middle; }
.msel-toggle { width: auto; min-width: 130px; text-align: left; cursor: pointer; background: #fff; }
.msel-panel { position: absolute; z-index: 50; top: calc(100% + 6px); left: 0; width: 220px; max-height: 240px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(14, 42, 34, .14); padding: 6px; box-sizing: border-box; }
.msel-panel.hidden { display: none; }
.msel-item { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important;
  justify-content: flex-start !important; gap: 8px !important; width: 100%; box-sizing: border-box; padding: 7px 8px; border-radius: 8px; font-size: 14px; color: var(--ink); cursor: pointer; }
.msel-item:hover { background: var(--brand-soft, #E7F4EC); }
.msel-item input[type=checkbox] { flex: none !important; width: 16px !important; height: 16px !important; min-width: 16px !important; margin: 0 !important; accent-color: var(--brand, #1F9D6B); }
.msel-item span { flex: none !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; }
.msel-empty { padding: 10px 8px; font-size: 13px; color: var(--text-soft, #6b7d74); }

/* ===================== 消息中心铃铛 ===================== */
.bell { position: relative; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; cursor: pointer; color: var(--ink); background: var(--panel); border: 1px solid var(--line); transition: background .15s; }
.bell:hover { background: var(--brand-soft, #E7F4EC); }
.bell-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ff4d4f; color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 700; box-shadow: 0 0 0 2px var(--panel); }

/* ===================== 员工工作台 ===================== */
.staff-perf-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.staff-perf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.staff-perf-col { background: var(--bg-soft, #f7f8fa); border: 1px solid var(--line); border-radius: var(--radius-sm, 12px); padding: 14px 16px; }
.staff-perf-col-h { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.staff-perf-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink); padding: 5px 0; }
.staff-perf-row b { font-weight: 700; }
.staff-perf-row--total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; font-size: 15px; }
.staff-perf-row--total b { color: var(--brand, #1F9D6B); }
.staff-target { margin-top: 16px; }
.staff-target-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.staff-target-head b { color: var(--ink); font-size: 15px; }
.staff-target-rate { font-weight: 700; color: var(--brand, #1F9D6B); }
.staff-target-bar { height: 12px; background: #EEF1EE; border-radius: 999px; overflow: hidden; }
.staff-target-fill { height: 100%; background: linear-gradient(90deg, #34D399, #1F9D6B); border-radius: 999px; transition: width .4s; }
.staff-rec-title { font-size: 15px; font-weight: 700; color: var(--ink); margin: 18px 0 12px; }

/* ===================== 消息列表 ===================== */
.ntf-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; }
.ntf-item { background: var(--bg-soft, #f7f8fa); border: 1px solid var(--line); border-radius: var(--radius-sm, 12px); padding: 12px 14px; }
.ntf-item--read { opacity: .6; }
.ntf-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ntf-tag { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.ntf-tag--edit { background: #E7F4EC; color: #1F9D6B; }
.ntf-tag--del { background: #FDECEC; color: #D93636; }
.ntf-time { font-size: 12px; color: var(--muted); }
.ntf-op { font-size: 13px; color: var(--ink); margin-bottom: 4px; }
.ntf-summary { font-size: 13px; color: var(--text-soft, #6b7d74); line-height: 1.6; word-break: break-all; }

/* ===================== 客户档案：拼音分组 + A-Z 索引条 ===================== */
.py-head td {
  background: var(--bg-soft, #f7f8fa);
  font-weight: 700;
  color: var(--muted);
  font-size: 13px;
  padding: 8px 14px;
}
.py-head-letter { letter-spacing: 1px; }

/* 右侧纵向 A-Z 索引条（固定定位，始终在视口右侧居中） */
.py-index {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 6px 3px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line, #e6eae8);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(16, 40, 30, 0.08);
  z-index: 60;
  backdrop-filter: blur(4px);
}
.py-index-item {
  font-size: 11px;
  line-height: 1.5;
  font-weight: 700;
  color: var(--brand, #1F9D6B);
  padding: 1px 5px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background .12s, color .12s;
}
.py-index-item:hover {
  background: var(--brand, #1F9D6B);
  color: #fff;
}
.py-index-item:active {
  background: var(--brand, #1F9D6B);
  color: #fff;
}
/* 跳转锚点避开顶部固定栏 */
.py-head { scroll-margin-top: 72px; }
