/* ============================================================
   明好通管理后台 · Art Design Pro 设计语言（对齐 artd.pro 最新版）
   - 主色 oklch(0.7 0.23 260) = #3C96FF；--custom-radius 0.75rem = 12px
   - 亮/暗双主题，卡片细边框 + 大圆角，组件高度 36px
   - 所有类名保持与原有一致，仅重做视觉层
   ============================================================ */

/* ---------------- 1. 设计令牌 ---------------- */
:root {
  /* 主色（artd.pro OKLCH → sRGB）与 Element 色阶 */
  --primary: #5D87FF;
  --primary-hover: #4a6be6;
  --primary-light-3: #85a3ff;
  --primary-light-5: #aebeff;
  --primary-light-7: #d6dfff;
  --primary-light-8: #e6ebff;
  --primary-light-9: #eef3ff;

  /* 语义色（artd.pro 同款） */
  --art-secondary: #13deb9;
  --art-success: #13deb9;
  --art-warning: #ffae1f;
  --art-danger: #ff4d4f;
  --art-error: #ff4d4f;
  --art-info: #909399;

  /* 灰阶 */
  --art-gray-100: #f9fafb;
  --art-gray-200: #f2f4f5;
  --art-gray-300: #e6eaeb;
  --art-gray-400: #dbdfe1;
  --art-gray-500: #949eb7;
  --art-gray-600: #7987a1;
  --art-gray-700: #4d5875;
  --art-gray-800: #383853;
  --art-gray-900: #323251;

  /* 背景 / 边框 / 交互 */
  --default-bg-color: #fafbfc;
  --default-box-color: #ffffff;
  --default-border: #e2e8ee;
  --default-border-dashed: #dbdfe9;
  --art-card-border: rgba(0, 0, 0, .07);
  --art-hover-color: #f2f4f5;
  --art-active-color: #f2f4f5;
  --art-el-active-color: #f2f4f5;

  /* 圆角体系（对应 artd.pro --custom-radius: 0.75rem） */
  --custom-radius: 0.75rem;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, .08);
  --shadow-lg: 0 16px 44px rgba(15, 23, 42, .14);

  /* 布局尺寸 */
  --aside-w: 230px;
  --aside-w-collapsed: 64px;
  --header-h: 60px;
  --el-component-custom-height: 36px;

  /* Element Plus 变量覆盖 */
  /* 主色 9 级变体（按 Element Plus 官方算法由 #5D87FF 派生，与 artd.pro 一致） */
  --el-color-primary: var(--primary);
  --el-color-primary-light-1: #6D93FF;
  --el-color-primary-light-2: #7D9FFF;
  --el-color-primary-light-3: var(--primary-light-3);
  --el-color-primary-light-4: #9EB7FF;
  --el-color-primary-light-5: var(--primary-light-5);
  --el-color-primary-light-6: #BECFFF;
  --el-color-primary-light-7: var(--primary-light-7);
  --el-color-primary-light-8: var(--primary-light-8);
  --el-color-primary-light-9: var(--primary-light-9);
  --el-color-primary-dark-1: #547AE6;
  --el-color-primary-dark-2: var(--primary-hover);
  --el-color-primary-dark-3: #415FB3;
  --el-color-primary-dark-4: #385199;
  --el-color-primary-dark-5: #2F4480;
  --el-color-primary-dark-6: #253666;
  --el-color-primary-dark-7: #1C294D;
  --el-color-primary-dark-8: #131B33;
  --el-color-primary-dark-9: #090E1A;
  --el-color-secondary: var(--art-secondary);
  /* 语义色同样补全变体，保证朴素按钮/标签/消息的浅色调一致 */
  --el-color-success-light-9: #E3FBF6;
  --el-color-success-light-8: #C2F6EC;
  --el-color-success-light-5: #89F0DA;
  --el-color-success-light-3: #4EE5C5;
  --el-color-warning-light-9: #FFF6E8;
  --el-color-warning-light-8: #FFEDD1;
  --el-color-warning-light-5: #FFD699;
  --el-color-warning-light-3: #FFC466;
  --el-color-danger-light-9: #FFECEC;
  --el-color-danger-light-8: #FFD9D9;
  --el-color-danger-light-5: #FFA6A6;
  --el-color-danger-light-3: #FF8080;
  --el-color-error-light-9: #FFECEC;
  --el-color-error-light-8: #FFD9D9;
  --el-color-info-light-9: #F4F4F5;
  --el-color-info-light-8: #E9E9EB;
  --el-color-info-light-5: #C8C9CC;
  --el-color-info-light-3: #B1B3B8;
  --el-color-success: var(--art-success);
  --el-color-warning: var(--art-warning);
  --el-color-danger: #ff4d4f;
  --el-color-error: var(--art-error);
  --el-color-info: var(--art-info);

  --el-text-color-primary: #383853;
  --el-text-color-regular: #4d5875;
  --el-text-color-secondary: #7987a1;
  --el-text-color-placeholder: #949eb7;
  --el-text-color-disabled: #b6bdcd;

  --el-border-color: #e2e8ee;
  --el-border-color-light: #e6eaeb;
  --el-border-color-lighter: #edeff0;
  --el-border-color-extra-light: #f2f4f5;
  --el-border-color-dark: #dbdfe9;
  --el-border-color-darker: #d5dae3;

  --el-fill-color: #f0f2f5;
  --el-fill-color-light: #f5f7fa;
  --el-fill-color-lighter: #f9fafb;
  --el-fill-color-extra-light: #fbfbfc;
  --el-fill-color-blank: #ffffff;
  --el-bg-color: #ffffff;
  --el-bg-color-page: #fafbfc;
  --el-bg-color-overlay: #ffffff;

  /* 圆角按 artd.pro 公式：base = custom-radius/3 + 2px，small = /3 + 4px */
  --el-border-radius-base: calc(var(--custom-radius) / 3 + 2px);
  --el-border-radius-small: calc(var(--custom-radius) / 3 + 4px);
  --el-messagebox-border-radius: calc(var(--custom-radius) / 3 + 4px);
  --el-popover-border-radius: calc(var(--custom-radius) / 3 + 4px);
  --el-font-weight-primary: 400;
  --el-component-size: var(--el-component-custom-height);

  --el-box-shadow-light: 0 6px 20px rgba(15, 23, 42, .08);
  --el-box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
  --el-box-shadow-lighter: 0 2px 10px rgba(15, 23, 42, .06);
}

/* 暗色主题 */
html.dark {
  --primary: #5D87FF;
  --primary-hover: #85a3ff;
  --primary-light-3: #7c9bff;
  --primary-light-5: #3f4d75;
  --primary-light-7: #333e5f;
  --primary-light-8: #2d3752;
  --primary-light-9: #262f45;

  --art-gray-100: #110f0f;
  --art-gray-200: #17171c;
  --art-gray-300: #393946;
  --art-gray-400: #505062;
  --art-gray-500: #73738c;
  --art-gray-600: #8f8fa3;
  --art-gray-700: #ababba;
  --art-gray-800: #c7c7d1;
  --art-gray-900: #e3e3e8;

  --default-bg-color: #070707;
  --default-box-color: #161618;
  --default-border: rgba(255, 255, 255, .1);
  --default-border-dashed: #363843;
  --art-card-border: rgba(255, 255, 255, .07);
  --art-hover-color: #252530;
  --art-active-color: #202226;
  --art-el-active-color: #2e2e38;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, .45);
  --shadow-lg: 0 16px 44px rgba(0, 0, 0, .55);

  --el-text-color-primary: #e3e3e8;
  --el-text-color-regular: #c7c7d1;
  --el-text-color-secondary: #8f8fa3;
  --el-text-color-placeholder: #73738c;
  --el-text-color-disabled: #505062;

  --el-border-color: rgba(255, 255, 255, .16);
  --el-border-color-light: rgba(255, 255, 255, .12);
  --el-border-color-lighter: rgba(255, 255, 255, .09);
  --el-border-color-extra-light: rgba(255, 255, 255, .06);
  --el-border-color-dark: rgba(255, 255, 255, .2);
  --el-border-color-darker: rgba(255, 255, 255, .26);

  --el-fill-color: #2a2a32;
  --el-fill-color-light: #252530;
  --el-fill-color-lighter: #202226;
  --el-fill-color-extra-light: #1b1b1f;
  --el-fill-color-blank: #161618;
  --el-bg-color: #161618;
  --el-bg-color-page: #070707;
  --el-bg-color-overlay: #1d1d21;

  --el-mask-color: rgba(0, 0, 0, .6);
  --el-mask-color-extra-light: rgba(0, 0, 0, .3);

  /* 表格 */
  --el-table-bg-color: #161618;
  --el-table-tr-bg-color: #161618;
  --el-table-header-bg-color: #1b1b1f;
  --el-table-border-color: rgba(255, 255, 255, .08);
  --el-table-row-hover-bg-color: #202226;

  color-scheme: dark;
}

/* ---------------- 2. 基础 ---------------- */
* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; padding: 0; }
html { background: #fafbfc; }
html.dark { background: #070707; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--default-bg-color);
  color: var(--art-gray-800);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: hidden;
  transition: background-color .2s ease, color .2s ease;
}

/* 细滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--art-gray-400); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--art-gray-500); }
::-webkit-scrollbar-track { background: transparent; }

/* Element Plus 圆角 / 阴影微调 */
.el-card, .el-dialog, .el-drawer { border-radius: var(--radius-lg); }
.el-dialog { box-shadow: var(--shadow-lg); }
.el-dialog__header { padding-bottom: 14px; margin-right: 0; border-bottom: 1px solid var(--default-border); margin-bottom: 16px; }
.el-dialog__title { font-size: 16px; font-weight: 600; color: var(--art-gray-900); }
.el-message-box { border-radius: var(--radius-xl); padding: 18px 20px; }
.el-message { border-radius: var(--radius-md); }
.el-popper.is-light { border-radius: var(--radius-md); border-color: var(--default-border); box-shadow: var(--shadow-md); }
.el-dropdown-menu__item { border-radius: var(--radius-sm); margin: 2px 6px; padding: 7px 12px; }
.el-dropdown-menu { padding: 6px 0; }
.el-tooltip__popper, .el-popper.is-dark { border-radius: var(--radius-sm); }
.el-button { font-weight: 400; }
.el-button--primary { --el-button-hover-bg-color: var(--primary-hover); --el-button-hover-border-color: var(--primary-hover); }
.el-tag { border-radius: var(--radius-sm); }
.el-input__wrapper, .el-select__wrapper, .el-textarea__inner { border-radius: var(--radius-sm); }
.el-form-item__label { font-weight: 500; color: var(--art-gray-700); }

/* 表格：Art 风格浅灰表头 + 无重边框 */
.el-table { --el-table-border-color: var(--default-border); width: 100%; }
.el-table th.el-table__cell {
  background: var(--art-gray-100) !important;
  color: var(--art-gray-700) !important;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 0;
}
.el-table td.el-table__cell { border-bottom: 1px solid var(--default-border); }
.el-table__body tr:hover > td.el-table__cell { background: var(--art-gray-100) !important; }
.el-table__empty-block { background: transparent; }
.el-pagination { --el-pagination-button-width: 32px; }

/* ---------------- 2.4 图标：Solar 图标集（artd.pro 同款） ---------------- */
/* Solar 通过内联 SVG 渲染，尺寸由外层 el-icon 的 font-size 决定（1em），
   颜色统一走 currentColor，与参考站一致。
   flex: none 很关键：图标盒在 flex 行内不会被压缩，否则宽高被挤压导致图标与文字错位。 */
.el-icon .solar-ico,
.solar-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1em; height: 1em; flex: none; line-height: 1; vertical-align: middle;
}
.el-icon .solar-ico > svg,
.solar-ico > svg { width: 100%; height: 100%; display: block; }
/* el-icon 作为图标容器：统一 flex 居中对齐 + 默认 20px（artd.pro 规范），
   避免各组件内行内对齐差异导致图标与文字错位 */
.el-icon {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; vertical-align: middle; flex: none;
}
.el-icon.is-loading { animation: rotating 2s linear infinite; }

/* ---------------- 2.5 Element Plus 组件全面精修（art-design-pro 规范） ---------------- */
:root {
  --el-component-size: 36px;
  --el-component-custom-height: 36px;
}


/* 按钮：默认 36px 高，主色钮带柔和投影，hover 轻微上浮 */
.el-button { font-weight: 400; transition: all .2s cubic-bezier(.4, 0, .2, 1); }
.el-button--default { height: var(--el-component-custom-height); }
.el-button--default.is-circle { width: var(--el-component-custom-height); }
.el-button--primary {
  --el-button-hover-bg-color: var(--primary-hover);
  --el-button-hover-border-color: var(--primary-hover);
  box-shadow: 0 3px 8px 0 rgba(93, 135, 255, .18);
}
.el-button--primary:hover { transform: translateY(-1px); box-shadow: 0 4px 10px 0 rgba(93, 135, 255, .24); }
.el-button--primary:active { transform: translateY(0); box-shadow: 0 2px 5px 0 rgba(93, 135, 255, .16); }
.el-button.is-plain, .el-button.is-text { box-shadow: none; }
.el-button.is-link, .el-button.is-text { box-shadow: none; transform: none; }
.el-button > span { position: relative; z-index: 10; }

/* 表单项：label 与控件同高对齐 */
.el-form-item__label { height: var(--el-component-custom-height); line-height: var(--el-component-custom-height); font-weight: 500; color: var(--art-gray-700); }
.el-checkbox__inner { border-radius: 4px; }
.el-radio__input .el-radio__inner { width: 16px; height: 16px; }
.el-radio__input .el-radio__inner::after { width: 6px; height: 6px; }

/* 弹窗：大圆角 + 上下留白 + 关闭钮圆角热区 + 弹性缩放入场 */
.el-dialog { border-radius: calc(var(--custom-radius) / 1.2 + 2px); overflow: hidden; }
.el-dialog__body { padding-top: 22px; padding-bottom: 8px; }
.el-dialog__title { font-size: 16px; font-weight: 500; }
.el-dialog__headerbtn .el-dialog__close,
.el-message-box__headerbtn .el-message-box__close {
  top: 7px; right: 7px; width: 30px; height: 30px; border-radius: 6px;
  transition: all .25s;
}
.el-dialog__headerbtn .el-dialog__close:hover,
.el-message-box__headerbtn .el-message-box__close:hover {
  background-color: var(--art-hover-color); color: var(--art-gray-900);
}
.el-message-box { padding: 25px 20px; }
.el-message-box__title { font-weight: 500; }
.el-message-box__btns .el-button { min-width: 74px; }
.dialog-fade-enter-active .el-dialog { animation: art-dialog-open .3s cubic-bezier(.32, .14, .15, .86); }
@keyframes art-dialog-open {
  0% { opacity: 0; transform: scale(.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* 全局消息：白底无边框 + 大柔和投影 */
.el-message {
  background-color: var(--el-bg-color-overlay) !important;
  border: 0 !important;
  box-shadow: 0 6px 16px 0 rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05) !important;
}
.el-message p { font-size: 13px; }
.el-notification .el-notification__icon { font-size: 22px; }

/* 下拉菜单：紧凑圆角项 + 主色浅底 hover + 隐藏小三角 */
.el-dropdown-menu { padding: 6px !important; border-radius: var(--el-border-radius-small) !important; border: none !important; }
.el-dropdown-menu__item { padding: 6px 16px !important; border-radius: 6px !important; margin: 0; }
.el-dropdown-menu__item:hover:not(.is-disabled) {
  color: var(--art-gray-900) !important;
  background-color: var(--art-el-active-color) !important;
}
.el-select__popper .el-popper__arrow, .el-dropdown__popper .el-popper__arrow { display: none; }
.el-dropdown-selfdefine:focus, .el-tooltip__trigger:focus-visible { outline: none !important; }

/* 下拉选择：选项 34px 圆角，选中态主色浅底 */
.el-select--default .el-select__wrapper { min-height: var(--el-component-custom-height); }
.el-select__popper .el-select-dropdown__list { padding: 5px !important; }
.el-select__popper .el-select-dropdown__item { height: 34px !important; line-height: 34px !important; border-radius: 6px !important; }
.el-select__popper .el-select-dropdown__item.is-selected {
  color: var(--art-gray-900) !important; font-weight: 400 !important;
  background-color: var(--art-el-active-color) !important; margin-bottom: 4px;
}
.el-select__popper .el-select-dropdown__item:hover { background-color: var(--art-hover-color) !important; }

/* 分页：32px 方块 + 圆角 */
.el-pagination { --el-pagination-button-width: 32px; --el-pagination-button-height: 32px; }
.el-pagination .btn-next, .el-pagination .btn-prev, .el-pagination .el-pager li { border-radius: 6px; }
.el-pagination .el-pager li { padding: 0 10px; }
.el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li { border-radius: 6px; }

/* 标签：中等字重 */
.el-tag { font-weight: 500; transition: none; }
.el-tag.el-tag--default { height: 26px; }

/* 树 / 日期选择器细节 */
.el-tree-node__content { border-radius: 6px; margin-bottom: 4px; }
.el-tree-node__content:hover { background-color: var(--art-hover-color) !important; }
.el-date-range-picker { --el-datepicker-inrange-bg-color: var(--art-gray-200); }
.el-picker-panel .el-picker-panel__footer { border-radius: 0 0 var(--el-border-radius-base) var(--el-border-radius-base); }
.el-color-picker__color { border-radius: 2px; }
.el-table__column-filter-trigger i { color: var(--primary); }

/* 暗色下卡片背景与页面底色对齐 */
html.dark .el-card { --el-card-bg-color: var(--default-box-color); }
html.dark .el-message { background-color: var(--el-bg-color-overlay) !important; }

/* artd.pro 复选框精修：16px + 4px 圆角 + 勾选比例 */
.el-checkbox--default .el-checkbox__inner {
  width: 16px; height: 16px; border-radius: 4px;
}
.el-checkbox--default.is-checked .el-checkbox__inner::after {
  width: 3px; height: 8px;
  border: 2px solid var(--el-checkbox-checked-icon-color);
  border-left: 0; border-top: 0;
  transform: translate(-45%, -60%) rotate(45deg) scale(.86);
  transform-origin: center;
}
.el-checkbox-group.el-table-filter__checkbox-group label.el-checkbox { height: 17px; }
.el-checkbox-group.el-table-filter__checkbox-group .el-checkbox__label { font-weight: 400; }

/* artd.pro 输入框：聚焦时主色描边 + 柔和外发光 */
.el-input__wrapper.is-focus,
.el-select__wrapper.is-focused,
.el-textarea__inner:focus {
  box-shadow: 0 0 0 1px var(--primary) inset, 0 0 0 3px rgba(93, 135, 255, .12) !important;
}

/* 移动端弹窗自适应 */
@media screen and (max-width: 640px) {
  .el-message-box, .el-dialog { width: calc(100% - 24px) !important; }
}

/* ---------------- 2.6 加载动画：artd.pro 四点旋转（替换默认圆环） ---------------- */
/* 把 Element Plus 默认的 svg 环形 spinner 隐藏，改用四点旋转 + 呼吸动画 */
.el-loading-spinner .circular { display: none; }
.el-loading-spinner::before {
  content: '';
  display: block;
  width: 40px; height: 40px;
  margin: 0 auto 12px;
  /* 四点呈渐变透明度，整体由 CSS 旋转（SVG 内不做动画，避免关键帧丢失） */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='8' r='4' fill='%235D87FF'/%3E%3Ccircle cx='32' cy='20' r='4' fill='%235D87FF' opacity='.8'/%3E%3Ccircle cx='20' cy='32' r='4' fill='%235D87FF' opacity='.6'/%3E%3Ccircle cx='8' cy='20' r='4' fill='%235D87FF' opacity='.4'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: art-dots-rotate 1.6s linear infinite;
}
@keyframes art-dots-rotate { 100% { transform: rotate(360deg); } }
@keyframes art-dots-fade { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* 加载文字：跟随 artd 灰阶 */
.el-loading-spinner .el-loading-text { color: var(--art-gray-600); font-size: 13px; }
.el-loading-mask { background-color: rgba(255, 255, 255, .9); }
html.dark .el-loading-mask { background-color: rgba(22, 22, 24, .9); }

/* 按钮 loading 图标：保持主色旋转 */
.el-button .is-loading { color: inherit; }

/* ---------------- 3. 登录 / 注册 ---------------- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--default-bg-color);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: "";
  position: absolute;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(93, 135, 255, .16), transparent 62%);
  right: -140px; top: -180px;
}
.login-page::after {
  content: "";
  position: absolute;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 192, 252, .13), transparent 62%);
  left: -160px; bottom: -180px;
}
.login-card {
  position: relative; z-index: 2;
  width: 900px; min-height: 480px;
  display: flex;
  background: var(--default-box-color);
  border: 1px solid var(--art-card-border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.login-left {
  width: 44%;
  background: linear-gradient(150deg, #5D87FF 0%, #4a6be6 55%, #38C0FC 100%);
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-left::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  right: -120px; bottom: -120px;
}
.login-left .logo {
  width: 76px; height: 76px; border-radius: 20px;
  background: #fff;
  padding: 14px; box-sizing: border-box;
  object-fit: contain;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  display: block; margin-bottom: 18px;
  position: relative; z-index: 1;
}
.login-left h2 { margin: 0 0 8px; font-size: 23px; font-weight: 600; letter-spacing: .5px; position: relative; z-index: 1; }
.login-left p { margin: 0 0 26px; font-size: 13.5px; opacity: .88; position: relative; z-index: 1; }
.login-left .illus { font-size: 112px; opacity: .9; position: relative; z-index: 1; }
.login-right { flex: 1; padding: 46px 48px; display: flex; flex-direction: column; justify-content: center; }
.login-right h3 { margin: 0 0 6px; font-size: 24px; font-weight: 600; color: var(--art-gray-900); }
.login-right .sub { color: var(--art-gray-500); margin: 0 0 26px; font-size: 13px; }
.login-form .el-input__wrapper { padding: 4px 12px; }
.login-form .el-form-item { margin-bottom: 20px; }
.login-btn { margin-top: 6px; }
.captcha-row { display: flex; gap: 12px; }
.captcha-row .el-input { flex: 1; }
.captcha-img {
  width: 120px; height: 40px; cursor: pointer; border-radius: var(--radius-sm);
  border: 1px solid var(--default-border); background: var(--art-gray-100); flex: none;
}
.login-extra {
  margin-top: 16px; font-size: 13px; color: var(--art-gray-500); text-align: center;
}
.login-extra a { color: var(--primary); text-decoration: none; margin-left: 4px; font-weight: 500; }
.login-extra a:hover { color: var(--primary-hover); text-decoration: underline; }
.register-card { min-height: 560px; }
.register-card .login-right { padding-top: 32px; padding-bottom: 32px; }
.register-card .login-left .illus { font-size: 96px; }
.register-card .login-form .el-form-item { margin-bottom: 14px; }

/* ---------------- 4. 布局：侧边栏 ---------------- */
.admin-layout { height: 100%; display: flex; background: var(--default-bg-color); }
.admin-aside {
  width: var(--aside-w); flex: none;
  display: flex; flex-direction: column;
  background: var(--default-box-color);
  border-right: 1px solid var(--art-card-border);
  transition: width .22s ease;
  user-select: none;
}
.admin-aside .brand {
  height: var(--header-h); flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--art-card-border);
  white-space: nowrap; overflow: hidden;
}
.admin-aside .brand .brand-logo {
  width: 30px; height: 30px; flex: none;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
html.dark .admin-aside .brand .brand-logo { filter: brightness(0) invert(1); }
.admin-aside .brand .brand-name {
  font-size: 16px; font-weight: 600; color: var(--art-gray-900);
  overflow: hidden; text-overflow: ellipsis;
}
.aside-menu { flex: 1; overflow-y: auto; padding: 8px 0; }
.aside-menu::-webkit-scrollbar { width: 0; }
.aside-menu .el-menu {
  border-right: none; background: transparent;
}
.aside-menu .el-sub-menu__title,
.aside-menu .el-menu-item {
  height: 42px; line-height: 42px;
  width: calc(100% - 16px); margin-left: 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  padding-left: 20px;
  color: #29343D;
  font-size: 14px;
  transition: background-color .15s ease, color .15s ease;
}
/* 主图标 20px；排除折叠箭头（箭头单独控制，否则被放大且被 i 的 margin 推偏） */
.aside-menu .el-menu-item > .el-icon:not(.el-sub-menu__icon-arrow),
.aside-menu .el-sub-menu__title > .el-icon:not(.el-sub-menu__icon-arrow) {
  font-size: 20px; color: #6B6B6B; transition: color .15s ease;
}
.aside-menu .el-menu-item:hover,
.aside-menu .el-sub-menu__title:hover { background: var(--art-hover-color); color: var(--art-gray-900); }
.aside-menu .el-menu-item:hover > .el-icon:not(.el-sub-menu__icon-arrow),
.aside-menu .el-sub-menu__title:hover > .el-icon:not(.el-sub-menu__icon-arrow) { color: var(--art-gray-700); }
.aside-menu .el-menu-item.is-active {
  background: #eef3ff;
  color: #3F8CFF;
  font-weight: 400;
}
.aside-menu .el-menu-item.is-active > .el-icon:not(.el-sub-menu__icon-arrow) { color: #3F8CFF; }
.aside-menu .el-sub-menu.is-active > .el-sub-menu__title { color: var(--art-gray-900); }
.aside-menu .el-sub-menu.is-active > .el-sub-menu__title > .el-icon:not(.el-sub-menu__icon-arrow) { color: var(--primary); }
.aside-menu .el-sub-menu .el-menu-item { height: 38px; line-height: 38px; font-size: 13.5px; padding-left: 46px !important; }
.aside-menu .el-sub-menu .el-menu-item .el-icon { font-size: 16px; }
/* 图标与文字间距只作用于主图标；箭头由 Element Plus 绝对定位在右侧，不能加 margin */
.aside-menu .el-menu-item > i.el-icon:not(.el-sub-menu__icon-arrow),
.aside-menu .el-sub-menu__title > i.el-icon:not(.el-sub-menu__icon-arrow) { margin-right: 10px; }
/* 折叠箭头：固定 12px、垂直居中、贴右侧，不受全局 .el-icon 20px 影响 */
.aside-menu .el-sub-menu__icon-arrow {
  font-size: 12px !important;
  width: 12px; height: 12px;
  /* 关键：只清右边距，保留 Element Plus 的 margin-top:-6px（它靠这个负边距实现垂直居中，
     若用 margin:0 全清会正好下移 6px） */
  margin-top: -6px !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  right: 14px;
  transform-origin: center;
  color: var(--art-gray-500);
  transition: transform .25s ease, color .15s ease;
}
/* Arrow 旋转时保持居中原点（Element Plus 用 rotateZ 切换展开/收起） */
.aside-menu .el-sub-menu.is-opened > .el-sub-menu__title > .el-sub-menu__icon-arrow { color: var(--art-gray-600); }
.aside-version {
  flex: none; padding: 12px 16px;
  border-top: 1px solid var(--art-card-border);
  text-align: center; font-size: 12px; letter-spacing: .3px;
  color: var(--art-gray-500);
  white-space: nowrap; overflow: hidden;
}
.aside-footer {
  padding: 14px 18px; border-top: 1px solid var(--art-card-border);
  display: flex; align-items: center; gap: 10px; color: var(--art-gray-700);
}
.aside-footer .avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #5D87FF, #38C0FC);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.aside-footer .info { flex: 1; overflow: hidden; }
.aside-footer .info .name { font-weight: 600; font-size: 14px; }
.aside-footer .info .role { font-size: 12px; color: var(--art-gray-500); }

/* 折叠态 */
.admin-aside.collapsed { width: var(--aside-w-collapsed); }
.admin-aside.collapsed .brand { padding: 0; justify-content: center; }
.admin-aside.collapsed .brand .brand-name { display: none; }
/* 折叠态：菜单区不留横向内边距，菜单项也不留宽度差与外边距，
   否则展开态的 width:calc(100%-16px) + margin-left:8px 会把图标推偏 */
.admin-aside.collapsed .aside-menu { padding: 10px 0; }
.admin-aside.collapsed .aside-menu .el-menu--collapse { width: 100%; }
.admin-aside.collapsed .aside-menu .el-menu--collapse .el-menu-item,
.admin-aside.collapsed .aside-menu .el-menu--collapse .el-sub-menu__title {
  justify-content: center;
  padding: 0 !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
/* 折叠态图标必须彻底清掉展开态的 margin-right:10px，否则图标整体偏左 */
.admin-aside.collapsed .aside-menu .el-menu--collapse .el-icon,
.admin-aside.collapsed .aside-menu .el-menu--collapse .el-icon:not(.el-sub-menu__icon-arrow) {
  margin: 0 !important;
}
/* 折叠态不显示折叠箭头（Element Plus 默认 display:none，这里显式保证） */
.admin-aside.collapsed .aside-menu .el-sub-menu__icon-arrow { display: none !important; }
.admin-aside.collapsed .aside-version { display: none; }

/* ---------------- 5. 布局：头部 / 标签页 / 内容 ---------------- */
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-header {
  height: var(--header-h); flex: none; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: var(--default-box-color);
  border-bottom: 1px solid var(--art-card-border);
}
.admin-header .crumb-wrap { display: flex; align-items: center; min-width: 0; gap: 4px; }
.admin-header .crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--art-gray-500);
  min-width: 0;
}
.admin-header .crumb .crumb-home { font-size: 15px; color: var(--art-gray-500); }
.admin-header .crumb .crumb-sep { font-size: 12px; color: var(--art-gray-400); }
.admin-header .crumb .crumb-cur {
  font-size: 15px; font-weight: 600; color: var(--art-gray-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-header .opt { display: flex; align-items: center; gap: 10px; color: var(--art-gray-600); }
.admin-header .opt > .el-button { margin-left: 0; }
.admin-header .opt-user {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s ease;
}
.admin-header .opt-user:hover { background: var(--art-hover-color); }
.admin-header .opt-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #5D87FF, #38C0FC);
  color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(93, 135, 255, .3);
}
.admin-header .opt-name { font-size: 14px; font-weight: 500; color: var(--art-gray-800); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-header .opt-id { font-size: 12px; font-weight: 500; color: var(--art-gray-500); }
.admin-header .opt-title { font-weight: 500; background: var(--primary-light-9); border-color: var(--primary-light-8); color: var(--primary); }
.admin-header .opt-arrow { font-size: 12px; color: var(--art-gray-500); }
.admin-header .opt-logout {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); cursor: pointer; color: var(--art-gray-600);
  transition: background .15s, color .15s;
}
.admin-header .opt-logout:hover { background: #fef2f2; color: #ff4d4f; }
.opt-icon-btn {
  width: 34px; height: 34px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--art-gray-600);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.opt-icon-btn:hover { background: var(--art-hover-color); color: var(--art-gray-900); }

/* 标签页（worktab） */
.worktabs {
  flex: none;
  height: 42px;
  display: flex; align-items: center;
  padding: 0 16px;
  gap: 8px;
  overflow-x: auto;
  background: var(--default-box-color);
  border-bottom: 1px solid var(--art-card-border);
  user-select: none;
}
.worktabs::-webkit-scrollbar { height: 0; }
.wt-item {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 13px; color: var(--art-gray-600);
  background: transparent;
  cursor: pointer; white-space: nowrap;
  transition: all .16s ease;
}
.wt-item:hover { color: var(--art-gray-800); }
.wt-item.active {
  background: #eef3ff;
  border-color: transparent;
  color: var(--primary);
  font-weight: 400;
  box-shadow: none;
}
.wt-item:hover:not(.active) { background: var(--art-gray-100); }
.wt-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--art-gray-400); flex: none; }
.wt-item.active .wt-dot { background: var(--primary); }
.wt-close { font-size: 12px; color: var(--art-gray-400); border-radius: 50%; padding: 2px; }
.wt-close:hover { background: var(--art-hover-color); color: #ff4d4f; }

.admin-content { flex: 1; padding: 20px; overflow-y: auto; background: var(--default-bg-color); }

/* ---------------- 6. 统计卡片 / 面板 ---------------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card {
  background: var(--default-box-color);
  border: 1px solid var(--art-card-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex; align-items: center; gap: 16px;
  transition: box-shadow .2s ease, transform .2s ease;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-card .icon {
  width: 52px; height: 52px; border-radius: var(--radius-md); flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff;
}
.stat-card .cnt { font-size: 28px; font-weight: 600; line-height: 1.15; color: var(--art-gray-900); }
.stat-card .lbl { color: var(--art-gray-500); font-size: 13px; margin-top: 2px; }

.panel {
  background: var(--default-box-color);
  border: 1px solid var(--art-card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: none;
}
.panel-title {
  font-size: 15px; font-weight: 600; color: var(--art-gray-900);
  margin: 0 0 16px; display: flex; align-items: center;
}
.panel-title .dot { width: 4px; height: 14px; background: var(--primary); border-radius: 2px; margin-right: 8px; }

.chart-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.chart-grid .chart-box { height: 320px; }
.small-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.small-grid .chart-box { height: 260px; }

.page-toolbar { margin-bottom: 16px; }
.page-toolbar .el-form-item { margin-bottom: 0; margin-right: 12px; }
.page-toolbar .el-form-item__content { flex-wrap: nowrap; }
.page-toolbar .el-form-item__content > * { margin-right: 10px; }
.page-toolbar .el-form-item__content > *:last-child { margin-right: 0; }

/* ---------------- 7. 通用 ---------------- */
.text-right { text-align: right; }
.pagination-wrap { display: flex; justify-content: flex-end; margin-top: 16px; }
.section-tip { color: var(--art-gray-500); font-size: 13px; margin: 0 0 14px; }
.section-tip code { background: var(--primary-light-9); color: var(--primary); padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }

.push-guide {
  background: var(--primary-light-9);
  border: 1px solid var(--primary-light-8);
  border-radius: var(--radius-lg);
  padding: 18px 20px; margin-bottom: 16px;
}
.push-guide-title {
  font-size: 15px; font-weight: 600; color: var(--primary);
  display: flex; align-items: center;
}
.push-guide-title::before { content: ""; width: 4px; height: 15px; background: var(--primary); border-radius: 2px; margin-right: 8px; }
.push-guide-sub { color: var(--art-gray-600); font-size: 13px; margin: 8px 0 14px; }
.push-steps { display: flex; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.push-step {
  flex: 1; min-width: 180px;
  background: var(--default-box-color);
  border: 1px solid var(--art-card-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-start;
}
.push-step-num {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.push-step-name { font-size: 13px; font-weight: 600; color: var(--art-gray-900); margin-bottom: 2px; }
.push-step-desc { font-size: 12px; color: var(--art-gray-500); line-height: 1.55; }
.push-link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff;
  border-radius: var(--radius-md); padding: 9px 16px;
  font-size: 13px; font-weight: 500; text-decoration: none;
  transition: background .2s;
}
.push-link-btn:hover { background: var(--primary-hover); color: #fff; }
.push-guide-hint { margin-top: 10px; font-size: 12px; color: var(--art-gray-500); }

.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.tip { color: var(--art-gray-500); font-size: 12px; margin: -4px 0 14px; line-height: 1.6; }
.dark-btn { width: 100%; }

.phone-area { font-size: 12px; color: var(--art-gray-500); line-height: 1.4; margin-top: 2px; }
.phone-area-form { margin-top: 4px; }

/* 同号提醒（仅提示，不阻断保存） */
.dup-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: #d48806;
  background: rgba(250, 173, 20, .12);
  border: 1px solid rgba(250, 173, 20, .35);
}
.dup-hint .el-icon { font-size: 13px; flex: 0 0 auto; }

/* 列设置面板 */
.col-setting { max-height: 360px; overflow-y: auto; }
.col-setting-tip { font-size: 12px; color: var(--art-gray-500); margin-bottom: 8px; }
.col-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 6px; border-radius: var(--radius-xs); cursor: grab; user-select: none;
}
.col-item:hover { background: var(--art-hover-color); }
.col-item.dragging { opacity: .5; }
.col-item .drag-handle { color: var(--art-gray-400); font-size: 14px; line-height: 1; }
.muted { color: var(--art-gray-400); }

/* ---------------- 8. 查询条件弹窗 ---------------- */
.filter-flag { color: #ff4d4f; margin-right: 4px; font-size: 12px; }
.qc-scroll { max-height: 430px; overflow-y: auto; padding-right: 6px; }
.qc-panel {
  background: var(--art-gray-100);
  border: 1px solid var(--default-border);
  border-radius: var(--radius-md);
  padding: 14px 16px; margin-bottom: 12px;
}
.qc-panel-title { font-size: 14px; font-weight: 600; color: var(--art-gray-900); margin-bottom: 12px; }
.qc-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.qc-grid-item {
  background: var(--default-box-color);
  border: 1px solid var(--default-border);
  border-radius: var(--radius-sm);
  text-align: center; padding: 7px 0;
  font-size: 13px; color: var(--art-gray-700);
  cursor: pointer; user-select: none; transition: all .15s;
}
.qc-grid-item:hover { border-color: var(--primary-light-3); color: var(--primary); }
.qc-grid-item.active {
  border-color: var(--primary); color: var(--primary); background: var(--primary-light-9); font-weight: 600;
}
.qc-range { margin-top: 10px; }
.qc-row { display: flex; align-items: center; gap: 8px; }
.qc-row-label { font-size: 13px; color: var(--art-gray-600); flex-shrink: 0; }
.adv-form { max-width: 560px; }
.adv-form .el-form-item { margin-bottom: 14px; }
.adv-form .el-form-item__label { font-weight: 600; color: var(--art-gray-700); }
.qc-footer { display: flex; justify-content: space-between; align-items: center; }

/* ---------------- 9. 数据工作台 ---------------- */
.db-wrap { display: flex; flex-direction: column; gap: 12px; }
/* db-wrap 内部用 gap 统一控制间距，取消 panel 自带的下边距，避免叠加成过大空隙 */
.db-wrap > .panel { margin-bottom: 0; }
.db-wrap > .status-grid { margin-bottom: 0; }

/* ---- 未跟进提醒横幅（art-design-pro basic-banner 规范）----
   圆角 calc(custom-radius + 2px)、水平内边距 2rem、标题 1.5rem/600、副标题 .9rem/opacity .9 */
.art-basic-banner.db-follow-banner {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;
  padding: 18px 20px;
  overflow: hidden;
  border-radius: calc(var(--custom-radius) + 2px);
  color: #fff;
  /* 主色 → 危险红的渐变，呼应「待处理」语义 */
  background: linear-gradient(120deg, #ff6b6b 0%, #ff4d4f 48%, #e53935 100%);
  box-shadow: 0 6px 18px -6px rgba(255, 77, 79, .5);
}
/* 右上角柔光装饰，增加层次但不用图片 */
.art-basic-banner.db-follow-banner::after {
  content: ""; position: absolute; top: -60px; right: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 68%);
  pointer-events: none;
}
.db-follow-banner .abb-content {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
}
.db-follow-banner .abb-icon {
  flex: none;
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .2);
  color: #fff;
}
.db-follow-banner .abb-icon .el-icon { font-size: 20px; }
.db-follow-banner .abb-text { flex: 1; min-width: 0; }
.db-follow-banner .abb-title {
  margin: 0 0 4px;
  font-size: 1rem; font-weight: 600; line-height: 1.4;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.db-follow-banner .abb-title strong {
  font-size: 1.35rem; font-weight: 700;
  padding: 0 2px;
  font-variant-numeric: tabular-nums;
}
.db-follow-banner .abb-badge {
  font-size: 12px; font-weight: 500;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, .18);
  color: #fff;
}
.db-follow-banner .abb-sub {
  margin: 0;
  font-size: .875rem; opacity: .92; line-height: 1.5;
}
.db-follow-banner .abb-actions {
  flex: none; display: flex; align-items: center; gap: 8px;
}
/* 横幅内按钮：反白样式，在红色底上保持对比 */
.db-follow-banner .abb-actions .el-button {
  background: #fff !important;
  border-color: #fff !important;
  color: #e53935 !important;
  font-weight: 500;
}
.db-follow-banner .abb-actions .el-button:hover {
  background: #fff5f5 !important;
  border-color: #fff5f5 !important;
  color: #c62828 !important;
}
.db-follow-banner .abb-actions .el-button.is-text {
  background: transparent !important;
  border-color: transparent !important;
  color: rgba(255, 255, 255, .9) !important;
}
.db-follow-banner .abb-actions .el-button.is-text:hover {
  background: rgba(255, 255, 255, .16) !important;
  color: #fff !important;
}
/* 窄屏：图标与操作按钮换行排布 */
@media (max-width: 768px) {
  .db-follow-banner .abb-content { flex-wrap: wrap; align-items: flex-start; }
  .db-follow-banner .abb-actions { width: 100%; justify-content: flex-end; }
  .db-follow-banner .abb-title { font-size: .95rem; }
}
/* 患者中心：横幅在 page-toolbar 上方，需要与下方工具栏留出间距 */
.patient-follow-banner { margin-bottom: 12px; }

.db-toolbar {
  background: var(--default-box-color);
  border: 1px solid var(--art-card-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px 16px; flex-wrap: wrap;
}
.db-quick { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
/* 顶部行：当前范围 + 收起/更多日期 */
.db-quick .qg-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.db-quick .qg-cur {
  font-size: 12.5px; color: var(--art-gray-600);
  padding: 2px 8px; border-radius: 999px;
  background: var(--art-gray-200);
}
.db-quick .qg-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12.5px; color: var(--primary);
  cursor: pointer; user-select: none;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  transition: background .15s ease;
}
.db-quick .qg-toggle:hover { background: var(--primary-light-9); }
/* 展开区：分组按钮 */
.db-quick .db-quick-body {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--default-border-dashed);
}
/* 快捷日期分组：组名 + 按钮行 */
.db-quick .qg { display: flex; align-items: center; gap: 8px; }
.db-quick .qg-lbl {
  flex: none; width: 30px;
  font-size: 12px; color: var(--art-gray-500);
  text-align: right; line-height: 1;
}
.db-quick .qg-btns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.db-quick .el-button + .el-button { margin-left: 0; }
.db-quick .el-button.is-primary { font-weight: 500; }
.db-range { display: flex; align-items: center; gap: 10px; flex: none; }
.db-range .el-date-editor { width: 260px; }

.status-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 20px; margin-bottom: 20px; }
.status-card {
  background: var(--default-box-color);
  border: 1px solid var(--art-card-border);
  border-radius: var(--radius-lg);
  color: var(--art-gray-800); padding: 0 16px; padding-right: 62px; min-height: 140px;
  box-shadow: none; position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.status-card.clickable { cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.status-card.clickable:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.sc-lbl { font-size: 14px; color: var(--art-gray-700); white-space: nowrap; }
.sc-val { font-size: 26px; font-weight: 500; color: var(--art-gray-900); line-height: 1.3; margin-top: 4px; font-variant-numeric: tabular-nums; }
/* 数字滚动动画：等宽数字避免跳动时数字宽度变化导致抖动 */
.count-up { display: inline-block; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.sc-unit { font-size: 11px; font-weight: 400; opacity: .9; }
/* 图标块：底色与图标色由行内样式按类型标签色注入（淡色底 + 同色图标） */
.sc-ico {
  position: absolute; top: 0; bottom: 0; right: 20px; margin: auto 0;
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* 病种统计：外层用与趋势统计相同的 .panel 容器，内部仍是淡色小卡 */
.disease-panel .panel-title { margin-bottom: 14px; }
.disease-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 10px; }
.disease-card {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  cursor: pointer; min-width: 0;
  /* 默认淡色（无 data-tone 时兜底），具体色由下方 data-tone 决定 */
  background: var(--primary-light-9);
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.disease-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); filter: brightness(.985); }
.disease-card .dc-lbl {
  flex: 1; min-width: 0;
  font-size: 12.5px; font-weight: 500; color: var(--art-gray-800);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.disease-card .dc-val { flex: none; font-size: 15px; font-weight: 600; color: var(--art-gray-900); }

/* 淡色系板（8 色循环）：背景为 8~10% 透明底，配合深灰文字保证可读性 */
.disease-card[data-tone="0"] { background: rgba(93, 135, 255, .10); }
.disease-card[data-tone="1"] { background: rgba(19, 222, 185, .12); }
.disease-card[data-tone="2"] { background: rgba(255, 174, 31, .14); }
.disease-card[data-tone="3"] { background: rgba(255, 77, 79, .09); }
.disease-card[data-tone="4"] { background: rgba(180, 141, 243, .13); }
.disease-card[data-tone="5"] { background: rgba(56, 192, 252, .12); }
.disease-card[data-tone="6"] { background: rgba(236, 111, 157, .11); }
.disease-card[data-tone="7"] { background: rgba(144, 147, 153, .13); }
.disease-empty {
  padding: 16px; text-align: center; font-size: 12.5px; color: var(--art-gray-500);
  background: var(--default-box-color);
  border: 1px dashed var(--default-border-dashed);
  border-radius: var(--radius-md);
}

.db-wrap .chart-panel { display: flex; flex-direction: column; }
.chart-panel .db-chart { flex: 1; width: 100%; min-height: 360px; }

.db-bottom { display: flex; gap: 12px; align-items: stretch; }
.db-bottom .db-table-panel { flex: 1 1 50%; min-width: 0; display: flex; flex-direction: column; }
.db-table-panel .el-table { width: 100%; }
.db-table-panel .el-table th.el-table__cell { background: var(--art-gray-100); color: var(--art-gray-700); }
.db-table-panel .panel-title { margin-bottom: 6px; }

/* ---------------- 10. 患者信息卡片弹窗 ---------------- */
.pc-wrap { padding: 2px; }
.pc-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  padding: 18px 22px; margin-bottom: 18px;
  border-radius: var(--radius-lg);
  background: var(--primary-light-9);
  border: 1px solid var(--primary-light-8);
}
.pc-head-left { min-width: 0; }
.pc-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pc-name { font-size: 24px; font-weight: 600; color: var(--art-gray-900); line-height: 1.3; }
.pc-id-badge { font-size: 15px; font-weight: 600; color: var(--art-gray-500); align-self: center; line-height: 1.5; }
.pc-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--art-gray-600); font-size: 13px; flex-wrap: wrap; }
.pc-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--art-gray-400); }
.pc-idcard {
  flex-shrink: 0; text-align: right; padding-left: 18px;
  border-left: 1px dashed var(--default-border-dashed); min-width: 150px;
}
.pc-idcard-label { font-size: 12px; color: var(--art-gray-500); }
.pc-idcard-val { font-size: 24px; font-weight: 600; color: var(--art-gray-900); letter-spacing: .5px; margin-top: 2px; }
.pc-idcard-sub { font-size: 12px; color: var(--art-gray-500); margin-top: 2px; }
.pc-desc .el-descriptions__label { color: var(--art-gray-600); font-weight: 600; background: var(--art-gray-100); width: 110px; }
.pc-desc .el-descriptions__content { color: var(--art-gray-800); }
.pc-remark .el-descriptions__content { white-space: pre-wrap; line-height: 1.6; }
.pc-f-label { display: inline-flex; align-items: center; gap: 5px; }
.pc-eye-btn { margin-left: 8px; }
.pc-eye-panel { display: flex; flex-direction: column; gap: 8px; padding: 2px; max-height: 320px; overflow: auto; }
.pc-eye-tip { font-size: 12px; color: var(--art-gray-500); margin: 0 0 4px; line-height: 1.6; }

/* 同号线索弹窗 */
.mg-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.mg-head-left { display: flex; align-items: baseline; gap: 10px; }
.mg-phone { font-size: 20px; font-weight: 600; color: var(--art-gray-900); letter-spacing: .5px; }
.mg-count { font-size: 13px; color: var(--art-gray-500); }
.mg-head-tip { font-size: 12px; color: var(--art-gray-500); line-height: 1.6; max-width: 460px; }
.mg-head-tip b { color: var(--art-primary, #409eff); font-weight: 600; }
/* 同号线索表格：双击行查看单条线索详情 */
.mg-table .el-table__body tr { cursor: pointer; }
.mg-table .el-table__body tr:hover > td { background: var(--art-gray-100, #f5f7fa); }
/* 线索详情弹窗头部副信息分隔符 */
.pc-meta-sep { margin: 0 6px; color: var(--art-gray-400, #c0c4cc); }
/* 同号线索条数徽标：患者中心列表 / 卡片 / 详情弹窗共用 */
.ng-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  margin-left: 6px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  vertical-align: middle;
  background: linear-gradient(135deg, #b06bff 0%, #7b3ff2 100%);
  box-shadow: 0 2px 8px rgba(123, 63, 242, .42), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .16s ease, box-shadow .16s ease;
}
.ng-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(123, 63, 242, .58), inset 0 1px 0 rgba(255, 255, 255, .32);
}
.ng-badge:active { transform: translateY(0); }
.ng-badge b { font-size: 13px; font-weight: 800; letter-spacing: .3px; }
.ng-badge .ng-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; flex: 0 0 auto;
  animation: ng-pulse 1.8s ease-out infinite;
}
@keyframes ng-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .8); }
  70%  { box-shadow: 0 0 0 5px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
/* 卡片视图内更紧凑 */
.ng-badge--sm { height: 19px; padding: 0 7px; margin-left: 0; border-radius: 10px; font-size: 11px; }
.ng-badge--sm b { font-size: 12px; }
.ng-badge--sm .ng-dot { width: 5px; height: 5px; }
/* 患者详情弹窗底部按钮位 */
.ng-badge--lg { height: 32px; padding: 0 14px; margin: 0 6px; border-radius: 16px; font-size: 13px; gap: 6px; }
.ng-badge--lg b { font-size: 15px; }
.pcard-group-tag { color: var(--el-color-warning); cursor: pointer; }
.pcard-group-tag:hover { text-decoration: underline; }

/* API 设置代码块 */
.api-code {
  background: #1b1b1f; color: #e5e7eb;
  padding: 14px 16px; border-radius: var(--radius-md);
  overflow-x: auto; font-size: 13px; line-height: 1.7;
  font-family: Consolas, Monaco, 'Courier New', monospace; white-space: pre;
  border: 1px solid rgba(255, 255, 255, .06);
}

/* ---------------- 11. AI 智能助手 ---------------- */
.ai-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 2000;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px;
  background: linear-gradient(135deg, #5D87FF, #4a6be6);
  color: #fff; font-size: 14px; font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(93, 135, 255, .38);
  border: none;
  transition: transform .15s ease, box-shadow .15s ease;
  user-select: none;
}
.ai-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(93, 135, 255, .48); }
.ai-fab .el-icon { margin-right: 2px; }

.ai-dlg { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); }
.ai-dlg .el-dialog__header { padding: 0; margin: 0; border: none; }
.ai-dlg .el-dialog__body { padding: 0; }
.ai-dlg-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 14px;
  background: var(--primary-light-9);
  border-bottom: 1px solid var(--default-border);
}
.ai-dlg-title { display: flex; align-items: center; gap: 11px; }
.ai-dlg-ico {
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #5D87FF, #4a6be6);
  color: #fff; box-shadow: 0 6px 14px rgba(93, 135, 255, .32);
}
.ai-dlg-meta { display: flex; flex-direction: column; gap: 2px; }
.ai-dlg-name { font-size: 15px; font-weight: 600; color: var(--art-gray-900); }
.ai-dlg-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--art-gray-600); }
.ai-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--el-color-success); box-shadow: 0 0 0 3px rgba(0, 217, 158, .18);
  display: inline-block;
}
.ai-close { color: var(--art-gray-500); }
.ai-close:hover { color: #ff4d4f; background: rgba(255, 76, 76, .1); border-radius: 50%; }
.ai-dialog-body { height: 372px; display: flex; flex-direction: column; }
.ai-msgs {
  flex: 1; overflow-y: auto; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--default-bg-color);
}
.ai-msgs::-webkit-scrollbar { width: 5px; }
.ai-msgs::-webkit-scrollbar-thumb { background: var(--art-gray-300); border-radius: 4px; }
.ai-msg { display: flex; gap: 9px; align-items: flex-start; }
.ai-msg.ai-user { justify-content: flex-end; }
.ai-avatar {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #5D87FF, #4a6be6);
  color: #fff; box-shadow: 0 4px 10px rgba(93, 135, 255, .28);
}
.ai-col { display: flex; flex-direction: column; gap: 8px; max-width: 82%; }
.ai-bubble {
  padding: 10px 14px; border-radius: var(--radius-lg);
  line-height: 1.75; font-size: 13px;
  white-space: pre-wrap; word-break: break-word;
}
.ai-msg.ai-bot .ai-bubble {
  background: var(--default-box-color); color: var(--art-gray-800);
  border: 1px solid var(--art-card-border);
  border-top-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}
.ai-msg.ai-user .ai-bubble {
  background: linear-gradient(135deg, #5D87FF, #4a6be6);
  color: #fff; border-top-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(93, 135, 255, .25);
}
.ai-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-chip {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; color: var(--primary);
  background: var(--primary-light-9);
  border: 1px solid var(--primary-light-8);
  cursor: pointer; user-select: none;
  transition: all .15s ease;
}
.ai-chip:hover { background: var(--primary-light-8); border-color: var(--primary-light-5); }
.ai-thinking { color: var(--art-gray-600); font-style: italic; display: flex; align-items: center; min-width: 46px; }
.ai-typing { display: inline-flex; gap: 5px; align-items: center; }
.ai-typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--art-gray-500);
  animation: aiBlink 1.2s infinite ease-in-out;
}
.ai-typing i:nth-child(2) { animation-delay: .2s; }
.ai-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes aiBlink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.ai-foot {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 16px 14px;
  background: var(--default-box-color);
  border-top: 1px solid var(--default-border);
}
.ai-foot-input { display: flex; gap: 10px; align-items: center; }
.ai-foot-input .el-input__wrapper { border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--default-border) inset; }
.ai-foot-input .el-input__wrapper.is-focus { box-shadow: 0 0 0 1px var(--primary) inset, 0 0 0 3px rgba(93, 135, 255, .14); }
.ai-send { flex: 0 0 auto; }
.ai-foot-tip { font-size: 11.5px; color: var(--art-gray-500); line-height: 1.5; }
.ai-dlg .ai-dlg-name .ai-model {
  margin-left: 8px; font-size: 12px; font-weight: 600; letter-spacing: .5px;
  text-transform: uppercase; color: #7c3aed;
  background: var(--primary-light-9); border: 1px solid var(--primary-light-8);
  border-radius: 999px; padding: 2px 12px; vertical-align: 2px; white-space: nowrap;
}
.ai-dlg .ai-foot-input .el-input__wrapper { width: 600px; min-height: 100px; padding: 4px 20px; border-radius: var(--radius-xl); transition: box-shadow .2s; }
.ai-dlg .ai-foot-input .el-input__wrapper.is-focus { box-shadow: 0 2px 12px rgba(93, 135, 255, .2); }
.ai-dlg .ai-foot-input .el-input__inner { font-size: 17px; height: 92px; line-height: 92px; }
.ai-dlg .ai-foot-input .ai-send { width: 56px; height: 56px; border-radius: var(--radius-xl); margin-left: 10px; }

/* ---------------- 12. 移动端侧边栏开关 ---------------- */
.aside-toggle {
  display: inline-flex;
  width: 34px; height: 34px; flex: none;
  align-items: center; justify-content: center;
  border-radius: var(--radius-md); cursor: pointer;
  color: var(--art-gray-600);
  margin-right: 6px;
  transition: background .15s, color .15s;
}
.aside-toggle:hover { background: var(--art-hover-color); color: var(--art-gray-900); }

.el-dialog { max-width: 94vw; }

@media (max-width: 1200px) {
  .status-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }

  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .chart-grid, .small-grid { grid-template-columns: 1fr; }
  .login-card { width: 760px; }
}

/* ---------------- 13. 新线索通知（头部铃铛 + 下拉列表） ---------------- */
.admin-header .notice-btn { width: 36px; height: 36px; border-radius: 50%; }
.admin-header .notice-btn.active { background: var(--art-hover-color); color: var(--art-gray-900); }
.notice-badge { display: inline-flex; align-items: center; justify-content: center; }
.notice-badge .el-badge__content.is-fixed {
  top: 2px; right: 8px;
  height: 16px; line-height: 16px; padding: 0 5px;
  font-size: 11px; font-weight: 500;
  border: none;
  box-shadow: 0 0 0 2px var(--default-box-color);
}
.notice-badge .el-badge__content--primary { background-color: #ff4d4f; }

.notice-pop.el-popover.el-popper {
  padding: 0;
  max-width: calc(100vw - 24px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--art-card-border);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.notice-pop .np-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px;
}
.notice-pop .np-title { font-size: 15px; font-weight: 600; color: var(--art-gray-900); }
.notice-pop .np-count { font-size: 12px; color: var(--art-gray-500); }
.notice-pop .np-list { max-height: 340px; overflow-y: auto; padding: 0 8px 6px; }
.notice-pop .np-item {
  display: flex; gap: 10px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  transition: background .15s ease;
}
.notice-pop .np-item:hover { background: var(--art-hover-color); padding-right: 30px; }
.notice-pop .np-item.unread::after {
  content: ''; position: absolute; top: 16px; left: 2px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--primary);
}
.notice-pop .np-main { flex: 1; min-width: 0; }
.notice-pop .np-row1 { display: flex; align-items: center; gap: 6px; }
.notice-pop .np-name {
  font-size: 13.5px; font-weight: 600; color: var(--art-gray-900);
  max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.notice-pop .np-row1 .el-tag { height: 20px; line-height: 18px; padding: 0 6px; font-size: 11px; }
/* 时间靠右，与姓名/类型同一行 */
.notice-pop .np-time { margin-left: auto; flex: none; font-size: 11.5px; color: var(--art-gray-500); }
.notice-pop .np-meta {
  font-size: 12px; color: var(--art-gray-600); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 单条删除按钮：默认隐藏，hover 时出现 */
.notice-pop .np-del {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  color: var(--art-gray-500); font-size: 12px;
  transition: background .15s ease, color .15s ease;
}
.notice-pop .np-item:hover .np-del { display: flex; }
.notice-pop .np-del:hover { background: #fef2f2; color: #ff4d4f; }
.notice-pop .np-empty {
  padding: 30px 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 13px; color: var(--art-gray-500);
}
.notice-pop .np-empty .el-icon { font-size: 28px; color: var(--art-gray-400); }
.notice-pop .np-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--art-card-border);
  background: var(--art-gray-100);
}
.notice-pop .np-link { font-size: 12.5px; color: var(--art-gray-600); cursor: pointer; transition: color .15s; }
.notice-pop .np-link:hover { color: var(--primary); }
.notice-pop .np-link.primary { color: var(--primary); font-weight: 500; }


/* ---------------- 14. 患者中心：按钮 / 标签 / 行色 ---------------- */
.type-active { box-shadow: 0 2px 6px rgba(0, 0, 0, .2) !important; }
.type-btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.type-btn-group .el-button {
  width: 64px; min-width: 64px; margin: 0;
  height: 34px; line-height: 32px; padding: 0 8px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 500;
}
.gender-radio-group { display: flex; align-items: center; height: 34px; }
.gender-radio-group .el-radio { margin-right: 8px; }

/* 业务类型标签（白字实心，保持业务色板不变） */
.el-tag.tag-success, .el-tag.tag-success.el-tag--light { background-color: #388e3c; border-color: #4caf50; color: #fff; }
.el-tag.tag-success:hover { background-color: #2e7d32; }
.el-tag.tag-info, .el-tag.tag-info.el-tag--light { background-color: #757575; border-color: #bdbdbd; color: #fff; }
.el-tag.tag-info:hover { background-color: #616161; }
.el-tag.tag-warning, .el-tag.tag-warning.el-tag--light { background-color: #ec407a; border-color: #f48fb1; color: #fff; }
.el-tag.tag-warning:hover { background-color: #d81b60; }
.el-tag.tag-arrived, .el-tag.tag-arrived.el-tag--light { background-color: #e53935; border-color: #ef5350; color: #fff; }
.el-tag.tag-arrived:hover { background-color: #c62828; }
.el-tag.tag-followup, .el-tag.tag-followup.el-tag--light { background-color: #ef5350; border-color: #ff8a80; color: #fff; }
.el-tag.tag-followup:hover { background-color: #d32f2f; }
.el-tag.tag-noshow, .el-tag.tag-noshow.el-tag--light { background-color: #7e57c2; border-color: #9575cd; color: #fff; }
.el-tag.tag-noshow:hover { background-color: #5e35b1; }
.el-tag.tag-appoint, .el-tag.tag-appoint.el-tag--light { background-color: #1976d2; border-color: #42a5f5; color: #fff; }
.el-tag.tag-appoint:hover { background-color: #1565c0; }

.el-table__body tr.type-row-1 > td.el-table__cell { background-color: rgba(236, 64, 122, .07) !important; }
.el-table__body tr.type-row-1:hover > td.el-table__cell { background-color: rgba(236, 64, 122, .13) !important; }
.el-table__body tr.type-row-2 > td.el-table__cell { background-color: rgba(56, 142, 60, .07) !important; }
.el-table__body tr.type-row-2:hover > td.el-table__cell { background-color: rgba(56, 142, 60, .13) !important; }
.el-table__body tr.type-row-3 > td.el-table__cell { background-color: rgba(229, 57, 53, .07) !important; }
.el-table__body tr.type-row-3:hover > td.el-table__cell { background-color: rgba(229, 57, 53, .13) !important; }
.el-table__body tr.type-row-4 > td.el-table__cell { background-color: rgba(117, 117, 117, .07) !important; }
.el-table__body tr.type-row-4:hover > td.el-table__cell { background-color: rgba(117, 117, 117, .13) !important; }
.el-table__body tr.type-row-5 > td.el-table__cell { background-color: rgba(239, 83, 80, .07) !important; }
.el-table__body tr.type-row-5:hover > td.el-table__cell { background-color: rgba(239, 83, 80, .13) !important; }
.el-table__body tr.type-row-6 > td.el-table__cell { background-color: rgba(126, 87, 194, .07) !important; }
.el-table__body tr.type-row-6:hover > td.el-table__cell { background-color: rgba(126, 87, 194, .13) !important; }
.el-table__body tr.type-row-7 > td.el-table__cell { background-color: rgba(25, 118, 210, .07) !important; }
.el-table__body tr.type-row-7:hover > td.el-table__cell { background-color: rgba(25, 118, 210, .13) !important; }

.el-table__body tr > td.oper-col.el-table__cell { background-color: var(--default-box-color) !important; }
.el-table__body tr:hover > td.oper-col.el-table__cell { background-color: var(--default-box-color) !important; }

/* 操作列文字按钮 + 右上角角标（同号 / 跟进通用） */
/* .el-table .cell 默认 overflow:hidden 会把上浮的角标裁掉，操作列放开裁剪 */
.el-table .oper-col .cell { overflow: visible; }
.ops-text-btn { position: relative; }
.ops-text-btn .ops-badge {
  display: inline-block;
  position: relative;
  top: -6px;
  margin-left: 1px;
  min-width: 13px;
  height: 13px;
  line-height: 13px;
  padding: 0 3px;
  border-radius: 7px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}
.ops-badge--group { background: #7b3ff2; }
.ops-badge--follow { background: #ff4d4f; }

/* 跟进角标 / 按钮（卡片视图等旧位置沿用） */
.follow-badge {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  padding: 0 4px; margin-left: 4px; border-radius: 8px;
  background: #ff4d4f; color: #fff; font-size: 11px;
  text-align: center; vertical-align: 1px;
}
.follow-btn-badge { display: inline-flex; align-items: center; margin-left: 12px; margin-right: 12px; }
.follow-btn-badge .el-badge__content.is-fixed {
  top: 0; right: 0; transform: translate(50%, -50%);
  height: 18px; line-height: 18px; padding: 0 5px;
  border-radius: 9px; font-size: 11px; font-weight: 600;
  border: none; box-shadow: 0 0 0 2px #fff;
}
.follow-btn-badge .el-badge__content--primary { background-color: #ff4d4f; }
/* 同号条数角标：与「跟进」按钮的 follow-badge 同款，紫色区分 */
.ng-count-badge {
  display: inline-block; min-width: 16px; height: 16px; line-height: 16px;
  padding: 0 4px; margin-left: 4px; border-radius: 8px;
  background: #7b3ff2; color: #fff; font-size: 11px; font-weight: 600;
  text-align: center; vertical-align: 1px;
}
.fr-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.fr-tip { color: var(--art-gray-500); font-size: 12px; }

/* 跟进记录抽屉 */
.el-drawer__body { padding: 20px 24px 28px; overflow-y: auto; background: var(--default-bg-color); }
.el-drawer__body > .fr-toolbar { background: var(--default-box-color); padding: 14px 0 16px; border-bottom: 1px solid var(--default-border); }
.el-drawer__body > .fr-tip { margin-left: 0; }
.el-drawer__header { margin-bottom: 0; padding-bottom: 16px; border-bottom: 1px solid var(--default-border); }
.el-drawer__header .el-drawer__title { font-size: 16px; font-weight: 600; color: var(--art-gray-900); }
.el-drawer .el-table { background: var(--default-box-color); border-radius: var(--radius-md); overflow: hidden; }
.el-drawer .el-table th.el-table__cell { background: var(--art-gray-100) !important; color: var(--art-gray-700) !important; font-weight: 600; font-size: 13px; padding: 12px 0; }
.el-drawer .el-table td.el-table__cell { padding: 12px 0; }
.el-drawer .el-table__body tr { transition: background-color .2s; }
.el-drawer .el-table__body tr:hover > td.el-table__cell { background: var(--art-hover-color) !important; }

/* 弹窗内表单 */
.el-dialog__body { padding: 20px 24px 24px; }
.el-dialog .el-form-item__label { font-weight: 500; }
.el-dialog .el-textarea__inner { border-radius: var(--radius-sm); }

/* 跟进记录详情卡片 */
.follow-card { background: var(--default-box-color); border: 1px solid var(--art-card-border); border-radius: var(--radius-md); overflow: hidden; }
.follow-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  background: var(--art-gray-100);
  border-bottom: 1px solid var(--default-border);
}
.follow-card-time { font-size: 13px; font-weight: 500; color: var(--art-gray-700); }
.follow-card-service { font-size: 13px; font-weight: 500; color: var(--primary); }
.follow-card-service i { margin-right: 6px; font-size: 15px; vertical-align: middle; }
.follow-card-body { padding: 20px; }
.follow-card-section { margin-bottom: 18px; }
.follow-card-section:last-child { margin-bottom: 0; }
.follow-card-label { color: var(--art-gray-600); font-weight: 500; font-size: 13px; margin-bottom: 8px; }
.follow-card-value {
  color: var(--art-gray-800); font-size: 14px; line-height: 1.6;
  padding: 10px 14px; background: var(--art-gray-100);
  border-radius: var(--radius-sm); min-height: 40px; word-break: break-word;
}

/* 患者图片上传 / 预览 */
.pimg-wrap { width: 100%; }
.pimg-uploader { display: block; width: 100%; }
.pimg-list + .pimg-uploader { margin-top: 12px; }
.pimg-uploader .el-upload-dragger { padding: 18px 12px; width: 100%; border-radius: var(--radius-md); }
.pimg-upload-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pimg-upload-inner .el-icon--upload { font-size: 40px; color: var(--art-gray-400); }
.pimg-upload-text { font-size: 14px; color: var(--art-gray-700); }
.pimg-upload-text em { color: var(--primary); font-style: normal; }
.pimg-upload-tip { font-size: 12px; color: var(--art-gray-500); line-height: 1.5; }
.pimg-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pimg-item { position: relative; width: 84px; height: 84px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--default-border); background: var(--art-gray-100); }
.pimg-thumb { width: 100%; height: 100%; display: block; cursor: zoom-in; }
.pimg-del {
  position: absolute; top: 2px; right: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2;
}
.pimg-del:hover { background: #ff4d4f; }
.pc-imgs { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-img { width: 72px; height: 72px; border-radius: var(--radius-sm); border: 1px solid var(--default-border); background: var(--art-gray-100); cursor: zoom-in; }

/* ---------------- 15. 患者列表 · 卡片视图 ---------------- */
.patient-card-area { min-height: 120px; }
.card-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-selected-count { font-size: 13px; color: var(--art-gray-700); }
.card-selected-tip { color: var(--art-gray-400); }
.patient-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.patient-card {
  position: relative; overflow: hidden;
  background: var(--default-box-color);
  border: 1px solid var(--art-card-border);
  border-radius: var(--radius-lg);
  padding: 14px 16px 12px;
  display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.patient-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.patient-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--art-gray-300); }
.patient-card.pcard-t1 { background: rgba(236, 64, 122, .06); border-color: rgba(236, 64, 122, .3); }
.patient-card.pcard-t1::before { background: #ec407a; }
.patient-card.pcard-t1:hover { background: rgba(236, 64, 122, .12); border-color: rgba(236, 64, 122, .48); }
.patient-card.pcard-t2 { background: rgba(56, 142, 60, .06); border-color: rgba(56, 142, 60, .3); }
.patient-card.pcard-t2::before { background: #388e3c; }
.patient-card.pcard-t2:hover { background: rgba(56, 142, 60, .12); border-color: rgba(56, 142, 60, .48); }
.patient-card.pcard-t3 { background: rgba(229, 57, 53, .06); border-color: rgba(229, 57, 53, .3); }
.patient-card.pcard-t3::before { background: #e53935; }
.patient-card.pcard-t3:hover { background: rgba(229, 57, 53, .12); border-color: rgba(229, 57, 53, .48); }
.patient-card.pcard-t4 { background: rgba(117, 117, 117, .06); border-color: rgba(117, 117, 117, .3); }
.patient-card.pcard-t4::before { background: #757575; }
.patient-card.pcard-t4:hover { background: rgba(117, 117, 117, .12); border-color: rgba(117, 117, 117, .48); }
.patient-card.pcard-t5 { background: rgba(239, 83, 80, .06); border-color: rgba(239, 83, 80, .3); }
.patient-card.pcard-t5::before { background: #ef5350; }
.patient-card.pcard-t5:hover { background: rgba(239, 83, 80, .12); border-color: rgba(239, 83, 80, .48); }
.patient-card.pcard-t6 { background: rgba(126, 87, 194, .06); border-color: rgba(126, 87, 194, .3); }
.patient-card.pcard-t6::before { background: #7e57c2; }
.patient-card.pcard-t6:hover { background: rgba(126, 87, 194, .12); border-color: rgba(126, 87, 194, .48); }
.patient-card.pcard-t7 { background: rgba(25, 118, 210, .06); border-color: rgba(25, 118, 210, .3); }
.patient-card.pcard-t7::before { background: #1976d2; }
.patient-card.pcard-t7:hover { background: rgba(25, 118, 210, .12); border-color: rgba(25, 118, 210, .48); }
.pcard-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pcard-id { font-size: 13px; font-weight: 600; color: var(--art-gray-500); white-space: nowrap; }
.pcard-name { font-size: 16px; font-weight: 600; color: var(--art-gray-900); cursor: pointer; }
.pcard-name:hover { color: var(--primary); }
/* 卡片右上角「同号」徽标：margin-left:auto 顶到姓名行最右侧 */
.pcard-head-badge { margin-left: auto; flex: 0 0 auto; }
.pcard-sub { display: flex; align-items: center; gap: 8px; color: var(--art-gray-600); font-size: 12.5px; }
.pcard-sub .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--art-gray-400); flex-shrink: 0; }
.pcard-body { display: flex; flex-direction: column; gap: 6px; border-top: 1px dashed var(--default-border); padding-top: 10px; }
.pcard-row { display: flex; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.pcard-label { flex: 0 0 52px; color: var(--art-gray-500); }
.pcard-val { flex: 1; min-width: 0; color: var(--art-gray-800); word-break: break-all; }
.pcard-val .phone-area { margin-top: 0; margin-left: 10px; }
.pcard-remark-row .pcard-val { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--default-border); padding-top: 10px; }
.pcard-meta { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--art-gray-500); min-width: 0; overflow: hidden; }
.pcard-ops { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.card-empty { padding: 48px 0; text-align: center; color: var(--art-gray-500); font-size: 14px; }

/* ---------------- 16. 响应式 ---------------- */
/* 同号去重规则说明标签（规则恒开，仅作提示，不可点击） */
.dedup-tip {
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
  padding: 0 10px;
  height: 26px;
  border-radius: 13px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
  color: var(--primary);
  background: var(--primary-light-9);
  border: 1px solid var(--primary-light-7);
  cursor: help;
}
html.dark .dedup-tip {
  background: rgba(64, 158, 255, .14);
  border-color: rgba(64, 158, 255, .3);
  color: var(--primary-light-3);
}
/* 工作台工具栏用 gap 控制间距，标签不再自带左边距 */
.db-range .dedup-tip { margin-left: 0; }

@media (max-width: 768px) {
  /* 窄屏独占一行，避免挤压查询/重置按钮 */
  .dedup-tip { width: 100%; justify-content: center; margin: 8px 0 0; }
  .db-range .dedup-tip { margin-top: 0; }
}

@media (max-width: 768px) {
  .admin-layout { position: relative; }
  .admin-aside {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 1100;
    width: var(--aside-w);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s;
    box-shadow: 12px 0 40px rgba(0, 0, 0, .2);
  }
  .admin-aside.open { transform: translateX(0); visibility: visible; }
  .aside-mask { position: fixed; inset: 0; z-index: 1050; background: rgba(15, 23, 42, .45); }
  .admin-main { width: 100%; }
  .admin-header { height: 54px; padding: 0 10px; }
  .admin-header .crumb .crumb-cur { font-size: 14px; max-width: 42vw; }
  .admin-header .crumb .crumb-home, .admin-header .crumb > span:first-of-type { display: none; }
  .admin-header .crumb .crumb-sep { display: none; }
  .admin-header .opt { gap: 6px; }
  .admin-header .opt-user { padding: 2px; }
  .admin-header .opt-name { display: none; }
  .admin-header .opt-id { display: none; }
  .worktabs { height: 38px; padding: 0 10px; }
  .wt-item { height: 26px; padding: 0 10px; font-size: 12.5px; }
  .admin-content { padding: 12px; }

  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
  .stat-card { padding: 14px; gap: 10px; }
  .stat-card .icon { width: 40px; height: 40px; font-size: 20px; border-radius: var(--radius-md); }
  .stat-card .cnt { font-size: 22px; }

  .panel { padding: 14px; border-radius: var(--radius-lg); }
  .panel-title { font-size: 15px; }
  .chart-grid, .small-grid { grid-template-columns: 1fr; gap: 12px; }
  .chart-grid .chart-box, .small-grid .chart-box { height: 240px; }
  .db-wrap { gap: 10px; }
  .db-chart { min-height: 260px; }

  .db-toolbar { flex-direction: column; align-items: stretch; padding: 12px; }
  .db-quick { flex: none; }
  .db-quick .qg { align-items: flex-start; }
  .db-quick .qg-lbl { width: 26px; padding-top: 6px; text-align: left; }
  .db-quick .qg-btns { gap: 6px; }
  .db-range { flex-wrap: wrap; width: 100%; }
  .db-range .el-date-editor { width: 100%; }
  .db-range .el-button { flex: 1; margin-left: 0 !important; }
  .status-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .status-card { padding: 12px 14px; }
  .sc-val { font-size: 20px; }

  .el-dialog { width: calc(100vw - 20px) !important; max-width: none; }
  .el-dialog__body { padding: 12px 14px; }
  .qc-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .qc-scroll { max-height: 62vh; }
  .adv-form { max-width: 100%; }

  .toolbar { gap: 8px; }
  .page-toolbar .el-form-item { margin-right: 0; margin-bottom: 10px; }
  .page-toolbar .el-form-item__content { flex-wrap: wrap; }

  .push-step { min-width: 100%; }

  .login-page { padding: 16px; }
  .login-card { width: calc(100vw - 32px); min-height: auto; flex-direction: column; border-radius: 16px; max-height: none; }
  .login-left { width: 100%; padding: 26px 20px; }
  .login-left h2 { font-size: 20px; margin-bottom: 6px; }
  .login-left .illus, .login-left p, .login-left > span { display: none; }
  .login-right { padding: 26px 20px; }
  .login-right h3 { font-size: 20px; }
  .captcha-row { gap: 8px; }
  .captcha-img { width: 96px; }

  .ai-dlg .ai-foot-input .el-input__wrapper { width: 100%; min-height: 48px; padding: 4px 14px; }
  .ai-dlg .ai-foot-input .el-input__inner { height: 44px; line-height: 44px; font-size: 15px; }
  .ai-dlg .ai-foot-input .ai-send { width: 44px; height: 44px; border-radius: 10px; margin-left: 6px; }
  .ai-fab { right: 12px; bottom: 12px; padding: 9px 14px; }

  .panel { overflow-x: auto; }
  .panel::-webkit-scrollbar { height: 6px; }
  .panel::-webkit-scrollbar-thumb { background: var(--art-gray-300); border-radius: 4px; }

}

@media (max-width: 480px) {
  .stat-cards { grid-template-columns: 1fr; }
  .queue-status .status-grid { grid-template-columns: 1fr 1fr; }
  .qc-grid { grid-template-columns: repeat(2, 1fr); }
  .el-message-box { width: 90vw !important; }
  .admin-header .crumb .crumb-cur { max-width: 40vw; }
  .patient-card-grid { grid-template-columns: 1fr; }
}

/* ---------------- 17. 暗色模式细节补齐 ---------------- */
html.dark .login-page::before { background: radial-gradient(circle, rgba(93, 135, 255, .22), transparent 62%); }
html.dark .login-page::after { background: radial-gradient(circle, rgba(56, 192, 252, .16), transparent 62%); }
html.dark .captcha-img { background: #1b1b1f; }
html.dark .admin-header .opt-logout:hover { background: rgba(255, 76, 76, .14); }
html.dark .el-table th.el-table__cell { background: #1b1b1f !important; color: var(--art-gray-700) !important; }
html.dark .el-table__body tr > td.oper-col.el-table__cell,
html.dark .el-table__body tr:hover > td.oper-col.el-table__cell { background-color: var(--default-box-color) !important; }
html.dark .pc-desc .el-descriptions__label { background: #1b1b1f; }
html.dark .el-descriptions { --el-descriptions-item-bordered-label-background: #1b1b1f; }
html.dark .el-drawer { background: var(--default-box-color); }
html.dark .el-dialog { background: var(--default-box-color); }
html.dark .el-message-box { background: var(--el-bg-color-overlay); border-color: var(--default-border); }
html.dark .el-popper.is-light { background: var(--el-bg-color-overlay); }
html.dark .el-dropdown-menu { background: var(--el-bg-color-overlay); }
html.dark .el-input__wrapper,
html.dark .el-textarea__inner,
html.dark .el-select__wrapper { background-color: var(--el-fill-color-blank); }
html.dark .el-upload-dragger { background: var(--art-gray-100); border-color: var(--default-border); }
html.dark .el-upload-dragger:hover { border-color: var(--primary); }
html.dark .el-tag.el-tag--primary { background: var(--primary-light-9); border-color: var(--primary-light-7); color: var(--primary-light-3); }
html.dark .status-card { box-shadow: none; }
html.dark .push-guide-title { color: var(--primary-light-3); }
html.dark .ai-dlg .ai-dlg-name .ai-model { color: #b9a6ff; }
html.dark .api-code { border-color: rgba(255, 255, 255, .08); }
html.dark .data-empty, html.dark .card-empty { color: var(--art-gray-500); }
