/* ==========================================================================
   养老服务管理系统 - 企业级中后台视觉规范
   设计参照 Ant Design / 主流云控制台：8px 栅格、圆角 8px、微阴影、克制配色
   ========================================================================== */

/* 图标精灵（sprite）默认尺寸与配色兜底：
   凡父容器未显式约束 svg 的位置（如宣传横幅标签），图标会退化为
   SVG 默认的 300×150 黑色块。此规则置于最前，后续更具体的规则可覆盖。 */
svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}

:root {
  --brand: #1677ff;
  --brand-hover: #4096ff;
  --brand-active: #0958d9;
  --brand-bg: #e6f4ff;
  --brand-border: #91caff;

  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-alt: #fafafa;

  --border: #f0f0f0;
  --border-strong: #e5e7eb;

  --text: #1f2937;
  --text-secondary: #6b7280;
  --text-tertiary: #9ca3af;
  --text-inverse: #ffffff;

  --success: #52c41a;
  --success-bg: #f6ffed;
  --warning: #faad14;
  --warning-bg: #fffbe6;
  --danger: #ff4d4f;
  --danger-bg: #fff2f0;
  --info: #1677ff;
  --info-bg: #e6f4ff;

  --sidebar-bg: #0f172a;
  --sidebar-hover: #1e293b;
  --sidebar-active: #1677ff;
  --sidebar-text: #cbd5e1;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 6px 24px rgba(0, 0, 0, 0.1);

  --sidebar-w: 220px;
  --header-h: 60px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5715;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }

/* ---------------------------------------------------------------- */
/* 布局骨架                                                          */
/* ---------------------------------------------------------------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.brand {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  color: var(--text-inverse);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1677ff, #69b1ff);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30px;
}

.brand-mark svg { width: 18px; height: 18px; fill: #fff; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title { font-size: 15px; font-weight: 600; letter-spacing: 0.3px; }
.brand-sub { font-size: 11px; color: #94a3b8; letter-spacing: 0.5px; }

.nav { padding: 12px 10px; flex: 1; }

.nav-section {
  font-size: 11px;
  color: #64748b;
  padding: 14px 12px 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}

.nav-item svg { width: 16px; height: 16px; fill: currentColor; flex: 0 0 16px; opacity: 0.85; }
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }

.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(22, 119, 255, 0.35);
}

.nav-item.active svg { opacity: 1; }

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.header {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-left { display: flex; align-items: baseline; gap: 12px; }
.header-title { font-size: 16px; font-weight: 600; margin: 0; }
.breadcrumb { font-size: 12px; color: var(--text-tertiary); margin: 0; }
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb span { margin: 0 4px; }

.header-right { display: flex; align-items: center; gap: 16px; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 20px;
  transition: background 0.2s;
}
.user-chip:hover { background: var(--surface-alt); }

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1677ff, #69b1ff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex: 0 0 32px;
}

.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--text-tertiary); }

.content { padding: 24px; flex: 1; }

.footer {
  padding: 16px 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 12px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ---------------------------------------------------------------- */
/* 卡片                                                              */
/* ---------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg { width: 16px; height: 16px; fill: var(--brand); }

.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); }

/* 统计卡片 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }

.stat-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }

.stat-value {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--text);
}
.stat-value small { font-size: 14px; font-weight: 400; color: var(--text-tertiary); margin-left: 4px; }
.stat-extra { font-size: 12px; color: var(--text-tertiary); margin-top: 6px; }

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
}
.stat-icon svg { width: 20px; height: 20px; fill: currentColor; }
.si-blue { background: #e6f4ff; color: #1677ff; }
.si-green { background: #f6ffed; color: #52c41a; }
.si-orange { background: #fff7e6; color: #fa8c16; }
.si-red { background: #fff1f0; color: #ff4d4f; }
.si-purple { background: #f9f0ff; color: #722ed1; }
.si-cyan { background: #e6fffb; color: #13c2c2; }

/* ---------------------------------------------------------------- */
/* 按钮                                                              */
/* ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn:hover { color: var(--brand); border-color: var(--brand); }
.btn:active { color: var(--brand-active); border-color: var(--brand-active); }
.btn svg { width: 14px; height: 14px; fill: currentColor; }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 0 rgba(5, 145, 255, 0.1);
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.btn-primary:active { background: var(--brand-active); border-color: var(--brand-active); }

.btn-danger { color: var(--danger); border-color: #ffccc7; background: var(--surface); }
.btn-danger:hover { color: #fff; background: #ff7875; border-color: #ff7875; }

.btn-warning { color: #d46b08; border-color: #ffd591; }
.btn-warning:hover { color: #fff; background: var(--warning); border-color: var(--warning); }

.btn-sm { height: 26px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 40px; padding: 0 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row { display: inline-flex; gap: 4px; }

/* 链接按钮 */
.link { color: var(--brand); cursor: pointer; background: none; border: none; padding: 0; font-size: 14px; }
.link:hover { text-decoration: underline; }
.link-danger { color: var(--danger); }

/* ---------------------------------------------------------------- */
/* 徽标 / 标签                                                       */
/* ---------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.badge-default { background: #fafafa; color: var(--text-secondary); border-color: var(--border-strong); }
.badge-primary { background: var(--brand-bg); color: var(--brand); border-color: var(--brand-border); }
.badge-success { background: var(--success-bg); color: #389e0d; border-color: #b7eb8f; }
.badge-warning { background: var(--warning-bg); color: #d46b08; border-color: #ffe58f; }
.badge-danger { background: var(--danger-bg); color: #cf1322; border-color: #ffccc7; }
.badge-info { background: var(--info-bg); color: var(--info); border-color: var(--brand-border); }
.badge-purple { background: #f9f0ff; color: #722ed1; border-color: #d3adf7; }
.badge-secondary { background: #fafafa; color: var(--text-secondary); border-color: var(--border-strong); }

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* ---------------------------------------------------------------- */
/* 表单                                                              */
/* ---------------------------------------------------------------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0 20px;
}

.form-item { margin-bottom: 18px; }
.form-item.full { grid-column: 1 / -1; }

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.form-label .req { color: var(--danger); margin-right: 2px; }

.form-control {
  width: 100%;
  height: 34px;
  padding: 5px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}
.form-control::placeholder { color: var(--text-tertiary); }
textarea.form-control { height: auto; min-height: 76px; resize: vertical; line-height: 1.6; padding: 8px 11px; }
select.form-control { cursor: pointer; }

.form-hint { font-size: 12px; color: var(--text-tertiary); margin-top: 4px; }

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}
.checkbox-label input { width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; }

.form-actions {
  display: flex;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  padding-top: 18px;
  grid-column: 1 / -1;
}

/* 筛选工具条 */
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: var(--radius) var(--radius) 0 0;
}
.toolbar .field { display: flex; flex-direction: column; gap: 4px; }
.toolbar .field label { font-size: 12px; color: var(--text-secondary); }
.toolbar .form-control { height: 32px; min-width: 150px; }
.toolbar .grow { flex: 1; min-width: 200px; }

/* ---------------------------------------------------------------- */
/* 表格                                                              */
/* ---------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  background: var(--surface-alt);
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: #fafcff; }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .ops { white-space: nowrap; text-align: right; }
.table .muted { color: var(--text-tertiary); }
.table .strong { font-weight: 600; }

.cell-name { display: flex; align-items: center; gap: 10px; }
.cell-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e6f4ff;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex: 0 0 30px;
}
.cell-sub { font-size: 12px; color: var(--text-tertiary); }

/* 空状态 */
.empty {
  padding: 56px 20px;
  text-align: center;
  color: var(--text-tertiary);
}
.empty svg { width: 56px; height: 56px; fill: #d9d9d9; margin-bottom: 12px; }
.empty p { margin: 0 0 4px; font-size: 14px; }
.empty .sub { font-size: 12px; color: #bfbfbf; }

/* 分页 */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 14px 20px;
}
.page-info { margin-right: auto; font-size: 13px; color: var(--text-secondary); }
.page-link {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 13px;
}
.page-link:hover { color: var(--brand); border-color: var(--brand); }
.page-link.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-link.disabled { opacity: 0.4; pointer-events: none; }

/* ---------------------------------------------------------------- */
/* 消息提示                                                          */
/* ---------------------------------------------------------------- */
.alerts { margin-bottom: 16px; }
.alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 8px;
  border: 1px solid transparent;
}
.alert svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
.alert-success { background: var(--success-bg); border-color: #b7eb8f; color: #389e0d; }
.alert-danger { background: var(--danger-bg); border-color: #ffccc7; color: #cf1322; }
.alert-warning { background: var(--warning-bg); border-color: #ffe58f; color: #d46b08; }
.alert-info { background: var(--info-bg); border-color: var(--brand-border); color: var(--brand); }

/* ---------------------------------------------------------------- */
/* 登录页                                                            */
/* ---------------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e6f4ff 0%, #f5f7fa 45%, #f9f0ff 100%);
  padding: 24px;
}
.login-box {
  display: grid;
  grid-template-columns: 420px 1fr;
  max-width: 940px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 500px;
}
.login-form { padding: 48px 44px; display: flex; flex-direction: column; }
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.login-logo .brand-mark { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; }
.login-logo .brand-mark svg { width: 22px; height: 22px; }
.login-logo .t1 { font-size: 19px; font-weight: 600; }
.login-logo .t2 { font-size: 12px; color: var(--text-tertiary); letter-spacing: 1px; }
.login-title { font-size: 22px; font-weight: 600; margin: 0 0 6px; }
.login-sub { color: var(--text-secondary); font-size: 13px; margin: 0 0 28px; }
.login-box .form-item { margin-bottom: 18px; }
.login-box .form-control { height: 40px; }
.login-tip {
  margin-top: 20px;
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.9;
}
.login-note { display: block; margin-top: 6px; color: var(--text-tertiary); }
.login-tip code {
  background: #fff;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
  font-size: 12px;
}
.login-hero {
  background-image: url("../img/login-hero.svg");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  padding: 44px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* 图片上的深色遮罩，保证文字可读性 */
.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg,
    rgba(8, 41, 68, 0.90) 0%,
    rgba(18, 91, 150, 0.72) 45%,
    rgba(8, 41, 68, 0.88) 100%);
}
.login-hero > * { position: relative; z-index: 1; }
.login-hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  right: -80px;
  bottom: -80px;
  z-index: 0;
}
.login-hero h2 { text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }
.login-hero p, .hero-list li { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3); }
.login-hero h2 { font-size: 24px; margin: 0 0 14px; font-weight: 600; }
.login-hero p { font-size: 13px; line-height: 2; opacity: 0.92; margin: 0 0 22px; }
.hero-list { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.hero-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; opacity: 0.95; }
.hero-list li svg { width: 16px; height: 16px; fill: #fff; opacity: 0.85; }

/* 登录页场景配图 */
.hero-scenes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}
.hero-scene {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 10px;
  padding: 6px 6px 8px;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.hero-scene:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.24);
}
.hero-scene img {
  display: block;
  width: 100%;
  height: 58px;
  object-fit: cover;
  border-radius: 7px;
}
.hero-scene span {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

/* ---------------------------------------------------------------- */
/* 描述列表                                                          */
/* ---------------------------------------------------------------- */
.desc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
}
.desc-item {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.desc-item .k { width: 96px; flex: 0 0 96px; color: var(--text-secondary); font-size: 13px; }
.desc-item .v { flex: 1; color: var(--text); word-break: break-word; }

/* 时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--brand-border);
}
.tl-time { font-size: 12px; color: var(--text-tertiary); margin-bottom: 2px; }
.tl-title { font-size: 14px; margin-bottom: 2px; }
.tl-desc { font-size: 12px; color: var(--text-secondary); }

/* 图表容器 */
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }

/* 进度条 */
.progress {
  height: 6px;
  background: var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.progress-bar { height: 100%; background: var(--brand); border-radius: 6px; transition: width 0.4s; }
.progress-bar.ok { background: var(--success); }
.progress-bar.warn { background: var(--warning); }
.progress-bar.bad { background: var(--danger); }

/* 列表小组件 */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item .li-main { min-width: 0; }
.list-item .li-title { font-size: 14px; margin-bottom: 2px; }
.list-item .li-sub { font-size: 12px; color: var(--text-tertiary); }

/* 两栏 */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.grid-2-even { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* 星期食谱 */
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.week-day {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.week-day.today { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1); }
.wd-head {
  padding: 8px 10px;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wd-head .d { font-weight: 600; }
.wd-head .w { color: var(--text-tertiary); }
.wd-body { padding: 8px 10px; min-height: 90px; }
.wd-meal { margin-bottom: 8px; }
.wd-meal .mt { font-size: 11px; color: var(--brand); margin-bottom: 2px; font-weight: 600; }
.wd-meal .mn { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* 响应式 */
@media (max-width: 1200px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .week-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  .main { margin-left: 0; }
  .login-box { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 16px; }
}

/* 工具类 */
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--text-tertiary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: #d46b08; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------------------------------------------------------------- */
/* 下拉菜单                                                          */
/* ---------------------------------------------------------------- */
.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 168px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  display: none;
  z-index: 200;
}
.dropdown-menu.open { display: block; }

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
}
.dropdown-menu a svg { width: 15px; height: 15px; fill: var(--text-secondary); }
.dropdown-menu a:hover { background: var(--surface-alt); color: var(--brand); }
.dropdown-menu a:hover svg { fill: var(--brand); }
.dropdown-menu a.dd-danger { color: var(--danger); }
.dropdown-menu a.dd-danger svg { fill: var(--danger); }
.dropdown-menu a.dd-danger:hover { background: var(--danger-bg); }
.dd-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* 卡片右上角快捷入口 */
.quick-links { display: flex; gap: 4px; }

/* ---------------------------------------------------------------- */
/* 模态弹层                                                          */
/* ---------------------------------------------------------------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 1000;
}
.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  max-width: 92vw;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  overflow: hidden;
}
.modal-head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}
.modal-head svg { width: 14px; height: 14px; fill: var(--text-tertiary); }
.modal-head a:hover svg { fill: var(--danger); }
.modal-body { padding: 20px; max-height: 60vh; overflow-y: auto; }
.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--surface-alt);
}

/* ---------------------------------------------------------------- */
/* 宣传横幅与展示卡                                                   */
/* ---------------------------------------------------------------- */
.promo-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  background: linear-gradient(90deg, #eaf2ff 0%, #f4f9ff 55%, #e6f2ef 100%);
  min-height: 188px;
}
.promo-banner .promo-art {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 660px;
  max-width: 62%;
  background: url("../img/dashboard-banner.svg") right center / cover no-repeat;
}
.promo-banner .promo-fade {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 62%;
  background: linear-gradient(90deg,
    #eaf2ff 0%,
    rgba(244, 249, 255, 0.94) 40%,
    rgba(244, 249, 255, 0) 100%);
}
.promo-banner .promo-inner {
  position: relative;
  padding: 26px 30px;
  max-width: 640px;
}
.promo-banner .promo-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(22, 119, 255, 0.10);
  border: 1px solid rgba(22, 119, 255, 0.22);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.promo-banner h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #123a63;
}
.promo-banner p {
  margin: 0;
  font-size: 13px;
  line-height: 2;
  color: #4b6076;
}
.promo-banner .promo-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.promo-card {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.promo-card .promo-art-sm {
  height: 158px;
  background: url("../img/promo-care.svg") center center / cover no-repeat;
  background-color: #f2f7ff;
}
.promo-card .promo-body { padding: 16px 18px 18px; }
.promo-card h4 { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.promo-card p { margin: 0; font-size: 13px; line-height: 1.9; color: var(--text-secondary); }
.promo-card .promo-meta {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
}
.promo-card .promo-meta div { font-size: 12px; color: var(--text-tertiary); }
.promo-card .promo-meta b { display: block; font-size: 17px; color: var(--brand); font-weight: 600; }

@media (max-width: 1200px) {
  .promo-banner .promo-art { max-width: 54%; }
  .promo-banner .promo-fade { width: 54%; }
}
@media (max-width: 860px) {
  .promo-banner .promo-art,
  .promo-banner .promo-fade { display: none; }
  .promo-banner .promo-inner { max-width: 100%; }
}

/* ---------------------------------------------------------------- */
/* 工资 / 排班模块补充                                                 */
/* ---------------------------------------------------------------- */
.ta-r { text-align: right; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 12px; }
.col-full { grid-column: 1 / -1; }

.salary-summary {
  display: flex;
  gap: 28px;
  align-items: center;
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--surface-alt);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
}
.salary-summary b { font-size: 16px; color: var(--text); }
.salary-summary .actual b { color: var(--brand); font-size: 19px; }

.shift-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.shift-cell {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface-alt);
  border: 1px solid var(--border);
}
.shift-cell .sc-label { font-size: 12px; color: var(--text-tertiary); }
.shift-cell .sc-value { font-size: 20px; font-weight: 600; margin-top: 4px; }
@media (max-width: 860px) {
  .shift-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------------- */
/* 看板宣传图轮播                                                     */
/* ---------------------------------------------------------------- */
.card-extra { font-size: 12px; color: var(--text-tertiary); font-weight: 400; }

.promo-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
}
.promo-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.promo-slide.active { opacity: 1; }
.promo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.promo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 26px 18px 14px;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
}
.promo-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.promo-slider:hover .promo-arrow { opacity: 1; }
.promo-arrow:hover { background: rgba(0, 0, 0, 0.55); }
.promo-arrow.prev { left: 12px; }
.promo-arrow.next { right: 12px; }

.promo-dots {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 6px;
}
.promo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}
.promo-dot.active { background: #fff; width: 18px; border-radius: 4px; }
