/* ============================================
   天恩天盾 管理后台 - 视觉规范
   品牌色：中国红 #C8102E
   ============================================ */

:root {
  /* 品牌色 */
  --brand-50:  #FFF1F2;
  --brand-100: #FFE0E3;
  --brand-200: #FFC4C9;
  --brand-300: #FF9AA3;
  --brand-400: #F25968;
  --brand-500: #D6263E;
  --brand-600: #C8102E;   /* 主品牌色 */
  --brand-700: #9B0B23;
  --brand-800: #7A0A1D;
  --brand-900: #5B0817;

  /* 中性色 */
  --bg:         #F4F5F8;
  --bg-soft:    #FAFBFC;
  --surface:    #FFFFFF;
  --line:       #E5E7EB;
  --line-soft:  #F0F2F5;
  --text-1:     #1F2937;
  --text-2:     #4B5563;
  --text-3:     #6B7280;
  --text-4:     #9CA3AF;

  /* 状态色 */
  --success: #10B981;
  --success-bg: #ECFDF5;
  --warning: #F59E0B;
  --warning-bg: #FFFBEB;
  --danger:  #EF4444;
  --danger-bg: #FEF2F2;
  --info:    #3B82F6;
  --info-bg: #EFF6FF;
  --gray:    #9CA3AF;
  --gray-bg: #F3F4F6;
  --purple:  #8B5CF6;
  --purple-bg:#F5F3FF;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow:    0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  /* 圆角 */
  --r-sm: 4px;
  --r:    6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* 布局尺寸 */
  --side-w: 232px;
  --side-w-collapsed: 64px;
  --top-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; color: var(--text-1); background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }

/* ============================================
   登录页
   ============================================ */
.login-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, #7A0A1D 0%, #C8102E 55%, #D6263E 100%);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.login-wrap::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255,255,255,.10), transparent 50%),
              radial-gradient(circle at 80% 70%, rgba(255,255,255,.08), transparent 50%);
  pointer-events: none;
}
.login-wrap::after {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.10), transparent 70%);
}
.login-card {
  width: 920px; max-width: 92vw; min-height: 540px;
  background: #fff; border-radius: 16px; overflow: hidden;
  display: grid; grid-template-columns: 1.05fr 1fr;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  position: relative; z-index: 2;
}
.login-side {
  background: linear-gradient(160deg, #5B0817 0%, #9B0B23 60%, #C8102E 100%);
  color: #fff; padding: 56px 44px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-side::before {
  content: ""; position: absolute; right: -60px; bottom: -80px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
}
.login-side::after {
  content: ""; position: absolute; left: -40px; top: -60px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%);
}
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-brand .logo-mark {
  width: 44px; height: 44px; border-radius: 10px; background: #fff; color: var(--brand-600);
  display: grid; place-items: center; font-weight: 800; font-size: 20px;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.login-brand h1 { font-size: 22px; margin: 0; letter-spacing: 1px; }
.login-brand p { margin: 2px 0 0; font-size: 12px; opacity: .8; letter-spacing: 2px; }
.login-quote { position: relative; z-index: 1; }
.login-quote h2 { font-size: 28px; font-weight: 700; margin: 0 0 12px; line-height: 1.4; }
.login-quote p { font-size: 14px; opacity: .85; line-height: 1.8; max-width: 320px; }
.login-side .login-foot { font-size: 12px; opacity: .7; position: relative; z-index: 1; }
.login-form-side { padding: 56px 64px; display: flex; flex-direction: column; justify-content: center; }
.login-form-side h3 { font-size: 26px; margin: 0 0 8px; color: var(--text-1); }
.login-form-side .sub { color: var(--text-3); margin: 0 0 32px; }
.login-form-side .role-tabs { display: flex; gap: 8px; background: var(--bg); padding: 4px; border-radius: 8px; margin-bottom: 24px; }
.login-form-side .role-tabs button {
  flex: 1; border: none; background: transparent; padding: 8px 0; border-radius: 6px; color: var(--text-3); font-weight: 500;
}
.login-form-side .role-tabs button.active { background: #fff; color: var(--brand-600); box-shadow: var(--shadow-sm); font-weight: 600; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.field .input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; height: 44px; background: #fff; transition: all .15s; }
.field .input:focus-within { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-50); }
.field .input input { border: none; outline: none; flex: 1; background: transparent; }
.field .input .ico { color: var(--text-4); width: 18px; display: inline-grid; place-items: center; }
.captcha-row { display: flex; gap: 8px; align-items: center; }
.captcha-row .input { flex: 1; }
.captcha-box { width: 110px; height: 44px; border-radius: 8px; background: linear-gradient(135deg, #9B0B23, #C8102E); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; letter-spacing: 4px; cursor: pointer; user-select: none; font-style: italic; text-shadow: 1px 1px 0 rgba(0,0,0,.2); }
.checkbox-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-2); margin: 6px 0 20px; }
.checkbox-row .l { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.checkbox-row a { color: var(--brand-600); }
.btn-primary {
  width: 100%; height: 44px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, #C8102E, #9B0B23); color: #fff; font-weight: 600; font-size: 15px;
  box-shadow: 0 6px 18px rgba(200, 16, 46, .35);
  transition: transform .1s;
}
.btn-primary:hover { transform: translateY(-1px); }
.login-foot-tip { margin-top: 18px; font-size: 12px; color: var(--text-4); text-align: center; }

/* ============================================
   主框架：侧边栏 + 顶部
   ============================================ */
.layout { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }
.layout.collapsed { grid-template-columns: var(--side-w-collapsed) 1fr; }

.side {
  background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0;
}
.side-head {
  height: var(--top-h); padding: 0 20px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}
.side-head .logo-mark {
  width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #C8102E, #9B0B23);
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: 0 0 auto;
}
.side-head .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.side-head .brand-text strong { font-size: 15px; color: var(--text-1); }
.side-head .brand-text span { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.layout.collapsed .side-head .brand-text, .layout.collapsed .side-nav .nav-label, .layout.collapsed .side-nav .nav-arrow, .layout.collapsed .side-foot .user-info { display: none; }
.layout.collapsed .side-nav .nav-item { justify-content: center; padding: 10px; }
.layout.collapsed .side-nav .sub-menu { display: none; }

.side-nav { flex: 1; overflow-y: auto; padding: 12px 12px 24px; }
.side-nav::-webkit-scrollbar { width: 4px; }
.side-nav::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }

.side-nav .nav-group { margin-top: 14px; }
.side-nav .nav-group:first-child { margin-top: 4px; }
.side-nav .nav-group .group-title { font-size: 11px; color: var(--text-4); padding: 6px 10px; letter-spacing: 1px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; color: var(--text-2);
  cursor: pointer; transition: all .12s; margin-bottom: 2px; font-size: 14px; user-select: none;
}
.nav-item .ico { width: 18px; display: inline-grid; place-items: center; color: var(--text-3); flex: 0 0 18px; }
.nav-item .nav-label { flex: 1; }
.nav-item .nav-arrow { font-size: 12px; color: var(--text-4); transition: transform .2s; }
.nav-item:hover { background: var(--bg); color: var(--text-1); }
.nav-item.active { background: linear-gradient(90deg, var(--brand-50), transparent); color: var(--brand-600); font-weight: 600; }
.nav-item.active .ico { color: var(--brand-600); }
.nav-item.expanded .nav-arrow { transform: rotate(90deg); }
.sub-menu { padding-left: 26px; margin: 2px 0 4px; }
.sub-menu .nav-item { padding: 7px 10px; font-size: 13px; }

.side-foot { padding: 12px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 8px; }
.side-foot .avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #C8102E, #9B0B23); color: #fff; display: grid; place-items: center; font-weight: 600; flex: 0 0 auto; }
.side-foot .user-info { flex: 1; min-width: 0; }
.side-foot .user-info .name { font-size: 13px; color: var(--text-1); font-weight: 500; }
.side-foot .user-info .role { font-size: 11px; color: var(--text-3); }

/* 顶部 */
.topbar {
  height: var(--top-h); background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 10;
}
.topbar .toggle-btn {
  width: 36px; height: 36px; border-radius: 6px; border: none; background: transparent; color: var(--text-2);
  display: grid; place-items: center;
}
.topbar .toggle-btn:hover { background: var(--bg); }
.breadcrumb { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 14px; }
.breadcrumb .sep { color: var(--text-4); }
.breadcrumb .current { color: var(--text-1); font-weight: 500; }

/* 二级菜单 Tab 条（位于顶栏下、内容区上） */
.subtabs {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  white-space: nowrap;
}
.subtabs::-webkit-scrollbar { height: 0; }
.subtab {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  border-radius: 6px;
  transition: all .2s;
  flex-shrink: 0;
}
.subtab:hover { color: var(--brand-600); background: var(--brand-50); }
.subtab.active {
  color: var(--brand-600);
  font-weight: 600;
  background: var(--brand-50);
  position: relative;
}
.subtab.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -11px;
  transform: translateX(-50%);
  width: 24px; height: 3px;
  background: var(--brand-600);
  border-radius: 2px;
}
.topbar .spacer { flex: 1; }
.topbar .top-actions { display: flex; align-items: center; gap: 8px; }
.topbar .icon-btn {
  width: 36px; height: 36px; border-radius: 8px; border: none; background: transparent; color: var(--text-2);
  display: grid; place-items: center; position: relative;
}
.topbar .icon-btn:hover { background: var(--bg); color: var(--text-1); }
.topbar .icon-btn .dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-600); border: 2px solid #fff; }
.topbar .env-switch {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; background: var(--brand-50); color: var(--brand-700); font-size: 13px; font-weight: 500;
  border: 1px solid var(--brand-100);
}

/* 内容区 */
.content { padding: 24px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0 0 4px; color: var(--text-1); font-weight: 600; }
.page-head .sub { color: var(--text-3); font-size: 13px; }
.page-head .actions { display: flex; gap: 8px; align-items: center; }

/* 按钮 */
.btn {
  height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--text-2); font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px; transition: all .12s;
}
.btn:hover { border-color: var(--brand-300); color: var(--brand-600); }
.btn.primary { background: linear-gradient(135deg, #C8102E, #9B0B23); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(200,16,46,.25); }
.btn.primary:hover { color: #fff; }
.btn.danger { color: var(--danger); border-color: #FECACA; background: #fff; }
.btn.danger:hover { background: var(--danger-bg); }
.btn.ghost { background: transparent; border: 1px dashed var(--line); color: var(--text-3); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn .ico { width: 14px; height: 14px; display: inline-grid; place-items: center; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: 6px 0 0 6px; margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 6px 6px 0; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-grid.cols-7 { grid-template-columns: repeat(7, 1fr); }
.stat-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }
.stat-card {
  background: #fff; border-radius: 10px; padding: 18px 18px 16px; border: 1px solid var(--line-soft);
  position: relative; overflow: hidden; cursor: pointer; transition: all .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: transparent; }
.stat-card .top { display: flex; align-items: center; justify-content: space-between; }
.stat-card .label { font-size: 13px; color: var(--text-3); }
.stat-card .ico-wrap {
  width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center;
}
.stat-card .value { font-size: 26px; font-weight: 700; color: var(--text-1); margin-top: 6px; line-height: 1.1; }
.stat-card .unit { font-size: 13px; color: var(--text-3); font-weight: 500; margin-left: 2px; }
.stat-card .delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; margin-top: 8px; }
.stat-card .delta.up { color: var(--brand-600); }
.stat-card .delta.down { color: var(--success); }
.stat-card .spark { margin-top: 8px; height: 28px; }
.stat-card.brand .ico-wrap { background: var(--brand-50); color: var(--brand-600); }
.stat-card.brand-gradient { background: linear-gradient(135deg, #C8102E 0%, #9B0B23 100%); color: #fff; border-color: transparent; }
.stat-card.brand-gradient .label, .stat-card.brand-gradient .value, .stat-card.brand-gradient .delta { color: #fff; }
.stat-card.brand-gradient .ico-wrap { background: rgba(255,255,255,.18); color: #fff; }
.stat-card.brand-gradient .value { font-size: 30px; }
.stat-card.brand-gradient .delta { color: rgba(255,255,255,.9); }
.stat-card .ico-wrap.green { background: var(--success-bg); color: var(--success); }
.stat-card .ico-wrap.orange { background: var(--warning-bg); color: var(--warning); }
.stat-card .ico-wrap.blue { background: var(--info-bg); color: var(--info); }
.stat-card .ico-wrap.purple { background: var(--purple-bg); color: var(--purple); }

/* 卡片 */
.card { background: #fff; border-radius: 10px; border: 1px solid var(--line-soft); margin-bottom: 16px; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 8px; }
.card-head h3::before { content: ""; display: block; width: 3px; height: 14px; background: var(--brand-600); border-radius: 2px; }
.card-head .right { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px 20px; }
.card-body.no-pad { padding: 0; }

/* 筛选区 */
.filter {
  background: #fff; border-radius: 10px; border: 1px solid var(--line-soft); padding: 16px 20px; margin-bottom: 16px;
}
.filter .filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter .filter-row + .filter-row { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-soft); }
.filter .label { font-size: 13px; color: var(--text-3); min-width: 60px; }
.filter .search-input { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; height: 34px; min-width: 240px; background: #fff; }
.filter .search-input input { border: none; outline: none; flex: 1; background: transparent; }
.filter .search-input .ico { color: var(--text-4); }
.filter select, .filter input[type=text], .filter input[type=date] {
  border: 1px solid var(--line); border-radius: 6px; height: 34px; padding: 0 10px; background: #fff; color: var(--text-1); min-width: 140px; outline: none;
}
.filter select:focus, .filter input:focus { border-color: var(--brand-600); }
.filter .actions { margin-left: auto; display: flex; gap: 8px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); background: var(--bg-soft);
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap;
}
.table tbody td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); font-size: 13px; color: var(--text-2); vertical-align: middle; }
.table tbody tr:hover { background: var(--bg-soft); }
.table tbody tr:last-child td { border-bottom: none; }
.table .op-cell { display: flex; gap: 8px; }
.table .op-cell .op { color: var(--brand-600); cursor: pointer; font-size: 13px; }
.table .op-cell .op.gray { color: var(--text-3); }
.table .op-cell .op.danger { color: var(--danger); }
.table .ellipsis { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table input[type=checkbox] { accent-color: var(--brand-600); width: 16px; height: 16px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; line-height: 18px;
}
.tag.green { background: var(--success-bg); color: var(--success); }
.tag.orange { background: var(--warning-bg); color: var(--warning); }
.tag.red { background: var(--danger-bg); color: var(--danger); }
.tag.blue { background: var(--info-bg); color: var(--info); }
.tag.gray { background: var(--gray-bg); color: var(--text-2); }
.tag.brand { background: var(--brand-50); color: var(--brand-600); }
.tag.purple { background: var(--purple-bg); color: var(--purple); }
.tag.default { background: #f0f0f0; color: #666; }

/* 技师头像圆 */
.avatar-circle { display: grid; place-items: center; }

/* 服务项目多选标签 */
.check-tag { display: inline-flex; align-items: center; cursor: pointer; }
.check-tag input { display: none; }
.check-tag span { display: inline-block; padding: 4px 12px; border-radius: 6px; font-size: 12px; background: #f0f0f0; color: #666; border: 1px solid #e0e0e0; transition: all .2s; }
.check-tag input:checked + span { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-300); }

/* 规格 SKU 标签 */
.spec-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: var(--brand-50); color: var(--brand-600); border-radius: 4px; font-size: 12px; border: 1px solid var(--brand-200); }
.spec-tag-remove { cursor: pointer; opacity: .6; font-style: normal; }
.spec-tag-remove:hover { opacity: 1; color: var(--danger); }
.spec-input { padding: 3px 8px; border: 1px dashed var(--border-light); border-radius: 4px; font-size: 12px; outline: none; }
.spec-input:focus { border-color: var(--brand-400); border-style: solid; }
.spec-block .table input[type="number"], .spec-block .table input[type="text"] { border: 1px solid var(--border-light); border-radius: 4px; transition: all .2s; padding: 4px 8px; font-size: 13px; }
.spec-block .table input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 2px var(--brand-50); outline: none; }

.dot-led { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* 分页 */
.pager { padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-soft); }
.pager .info { font-size: 13px; color: var(--text-3); }
.pager .pages { display: flex; gap: 4px; align-items: center; }
.pager .pages button { min-width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 6px; color: var(--text-2); font-size: 13px; }
.pager .pages button.active { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.pager .pages button:hover:not(.active) { border-color: var(--brand-300); color: var(--brand-600); }
.pager select { height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; }

/* 工具类 */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.muted { color: var(--text-3); }
.bold { font-weight: 600; color: var(--text-1); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.thumb { width: 36px; height: 36px; border-radius: 6px; background: linear-gradient(135deg, #FFE0E3, #FFC4C9); color: var(--brand-700); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: 0 0 36px; }
.thumb.lg { width: 56px; height: 56px; border-radius: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, #C8102E, #9B0B23); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: 0 0 32px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }

.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.switch input { display: none; }
.switch .track { width: 32px; height: 18px; border-radius: 999px; background: var(--gray); position: relative; transition: .2s; }
.switch .track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--brand-600); }
.switch input:checked + .track::after { left: 16px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* 表单 */
.form-section { background: #fff; border-radius: 10px; border: 1px solid var(--line-soft); padding: 24px; margin-bottom: 16px; }
.form-section h3 { margin: 0 0 20px; font-size: 15px; font-weight: 600; color: var(--text-1); display: flex; align-items: center; gap: 8px; }
.form-section h3::before { content: ""; width: 3px; height: 14px; background: var(--brand-600); border-radius: 2px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
.form-row.cols-1 { grid-template-columns: 1fr; }
.form-row.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 13px; color: var(--text-2); }
.form-field label .req { color: var(--danger); }
.form-field .hint { font-size: 12px; color: var(--text-4); }
.form-field input, .form-field select, .form-field textarea {
  border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; height: 38px; background: #fff; color: var(--text-1); outline: none; transition: .12s;
}
.form-field textarea { padding: 10px 12px; height: auto; min-height: 80px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-50); }
.form-field .radio-group, .form-field .check-group { display: flex; gap: 16px; align-items: center; }
.form-field .radio-group label, .form-field .check-group label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.form-field input[type=radio], .form-field input[type=checkbox] { accent-color: var(--brand-600); width: 16px; height: 16px; }

.upload-box {
  border: 1px dashed var(--line); border-radius: 8px; padding: 22px; text-align: center; color: var(--text-3); background: var(--bg-soft);
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; transition: .12s;
}
.upload-box:hover { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-600); }
.upload-box .ico { font-size: 24px; }

.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; background: #fff; border-radius: 10px; border: 1px solid var(--line-soft); position: sticky; bottom: 0; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs .tab { padding: 10px 16px; cursor: pointer; color: var(--text-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs .tab.active { color: var(--brand-600); border-bottom-color: var(--brand-600); font-weight: 600; }
.tabs .tab .count { background: var(--brand-50); color: var(--brand-600); border-radius: 999px; padding: 0 8px; font-size: 11px; margin-left: 4px; }

/* 图标 - 简化版 */
.ico { display: inline-block; width: 16px; height: 16px; vertical-align: middle; }
.ico svg { display: block; width: 100%; height: 100%; }

/* 仪表盘图表区 */
.chart-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.chart-box { height: 280px; padding: 8px 4px 0; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-3); }
.legend .dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 6px; vertical-align: middle; }

.activity-list .item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-soft); }
.activity-list .item:last-child { border-bottom: none; }
.activity-list .item .time { color: var(--text-4); font-size: 12px; min-width: 80px; }
.activity-list .item .dot-ico { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-500); margin-top: 6px; flex: 0 0 8px; }
.activity-list .item.green .dot-ico { background: var(--success); }
.activity-list .item.blue .dot-ico { background: var(--info); }
.activity-list .item.orange .dot-ico { background: var(--warning); }

.progress { width: 100%; height: 6px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); border-radius: 999px; }
.progress.green .bar { background: linear-gradient(90deg, #34D399, #10B981); }

/* 抽屉 */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-mask.open { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 520px; max-width: 100%; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal.lg { width: 720px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 8px; }

/* 通用图标按钮（弹窗关闭等） */
.icon-btn {
  width: 32px; height: 32px; border-radius: 6px; border: none; background: transparent; color: var(--text-3);
  display: grid; place-items: center; cursor: pointer; transition: all .12s;
}
.icon-btn:hover { background: var(--bg); color: var(--text-1); }

/* 弹窗中的表格样式微调 */
.modal-body .table { font-size: 13px; }
.modal-body .filter { padding: 12px 16px; margin-bottom: 12px; border-radius: 8px; }
.modal-body .filter .filter-row { gap: 8px; }
.modal-body .filter select, .modal-body .filter input { height: 32px; min-width: 120px; }

/* 库存趋势图 SVG */
.card-body svg text { font-family: inherit; }

/* 预警卡片边框 */
.card[style*="warning-bg"] { border: 1px solid #FDE68A; }

/* 股东等级对比卡片 */
.sh-level-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sh-level-card { border-radius: 10px; padding: 24px 20px; text-align: center; border: 1px solid var(--line-soft); background: #fff; transition: transform .2s, box-shadow .2s; }
.sh-level-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.sh-level-card .sh-level-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; }
.sh-level-card .sh-level-icon .ico svg { width: 28px; height: 28px; }
.sh-level-card .sh-level-name { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.sh-level-card .sh-level-rate { font-size: 28px; font-weight: 700; }
.sh-level-card .sh-level-invest { font-size: 13px; color: var(--text-2); margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line-soft); }
.sh-level-card .sh-level-benefits { font-size: 12px; color: var(--text-3); line-height: 1.6; margin-bottom: 12px; }
.sh-level-card .sh-level-count { font-size: 12px; color: var(--text-3); }
.sh-level-card.blue .sh-level-icon { background: #DBEAFE; color: #3B82F6; }
.sh-level-card.blue .sh-level-rate { color: #3B82F6; }
.sh-level-card.brand .sh-level-icon { background: #FFE4E6; color: #C8102E; }
.sh-level-card.brand .sh-level-rate { color: #C8102E; }
.sh-level-card.purple .sh-level-icon { background: #F3E8FF; color: #9333EA; }
.sh-level-card.purple .sh-level-rate { color: #9333EA; }

/* 门店详情 header */
.detail-head {
  background: linear-gradient(135deg, #9B0B23 0%, #C8102E 100%);
  color: #fff; padding: 24px 28px; border-radius: 10px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 20px; position: relative; overflow: hidden;
}
.detail-head::before { content: ""; position: absolute; right: -60px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.detail-head .pic { width: 80px; height: 80px; border-radius: 10px; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 28px; font-weight: 700; flex: 0 0 80px; }
.detail-head .info h2 { margin: 0 0 6px; font-size: 20px; }
.detail-head .meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; opacity: .92; }
.detail-head .meta span::before { content: "·"; margin-right: 8px; opacity: .6; }
.detail-head .meta span:first-child::before { content: ""; margin: 0; }
.detail-head .stats { margin-left: auto; display: flex; gap: 24px; position: relative; z-index: 1; }
.detail-head .stats .item { text-align: center; }
.detail-head .stats .item .v { font-size: 22px; font-weight: 700; }
.detail-head .stats .item .l { font-size: 12px; opacity: .8; }

/* 评价 */
.review-list .item { padding: 16px 0; border-bottom: 1px solid var(--line-soft); display: flex; gap: 14px; }
.review-list .item:last-child { border-bottom: none; }
.review-list .item .meta-row { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--text-3); margin-bottom: 6px; }
.review-list .item .name { color: var(--text-1); font-weight: 500; }
.review-list .stars { color: #F59E0B; letter-spacing: 1px; }

/* 通用图标库 (简化 inline) */
.ico-svg { width: 16px; height: 16px; display: inline-block; vertical-align: middle; fill: currentColor; }

/* 响应式 */
@media (max-width: 1280px) {
  .stat-grid.cols-7, .stat-grid.cols-6 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .form-row, .form-row.cols-3 { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr; }
  .sh-level-cards { grid-template-columns: 1fr; }
}
