/* 视光云店 全局样式 */
* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f5f7fa; color: #303133; }
.page { padding: 16px; }
.page-title { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.card { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: #fff; border-radius: 8px; padding: 14px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat .num { font-size: 24px; font-weight: 700; color: #1f6feb; margin-top: 4px; }
.stat .lbl { color: #909399; font-size: 13px; }
.stat.green .num { color: #67c23a; } .stat.orange .num { color: #e6a23c; } .stat.red .num { color: #f56c6c; }
.mono { font-family: Consolas, monospace; }
.text-right { text-align: right; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.flex-1 { flex: 1; }
.tiny { font-size: 12px; color: #6b7a90; }
.divider { height: 1px; background: #ebeef5; margin: 12px 0; }
.kpi-rate-bar { height: 6px; background: #ebeef5; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.kpi-rate-bar > div { height: 100%; background: #1f6feb; border-radius: 3px; transition: width .3s; }
/* 今日待办卡片（工作台）：数字大、可点击直达 */
.todo-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 92px; padding: 10px 14px;
  background: #f7f9fc; border: 1px solid #e4e7ed; border-radius: 10px; cursor: pointer; transition: all .18s; }
.todo-chip:hover { background: #ecf5ff; border-color: #b3d8ff; transform: translateY(-1px); }
.todo-num { font-size: 22px; font-weight: 700; line-height: 1.2; }
/* 侧边栏菜单（浅色主题）：激活项蓝底白字，普通项深灰文字，悬停浅蓝 */
.el-menu { border-right: none; }
.el-menu-item { color: #303133; }
.el-menu-item:hover { background: #ecf5ff; color: #1f6feb; }
.el-menu-item.is-active { background: #1f6feb !important; color: #fff !important; }
.chat-box { height: 420px; overflow-y: auto; background: #fafafa; border-radius: 8px; padding: 12px; }
.chat-msg { margin-bottom: 10px; display: flex; }
.chat-msg .bubble { max-width: 80%; padding: 8px 12px; border-radius: 8px; line-height: 1.6; white-space: pre-wrap; font-size: 14px; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.user .bubble { background: #1f6feb; color: #fff; }
.chat-msg.ai .bubble { background: #fff; border: 1px solid #ebeef5; }
.suggest-tag { cursor: pointer; }
.suggest-tag:hover { background: #1f6feb; color: #fff; }
.vf-group { font-weight: 600; color: #1f6feb; font-size: 14px; margin: 14px 0 8px; padding-left: 8px; border-left: 3px solid #1f6feb; }
.vf-group:first-child { margin-top: 0; }

/* ============ 移动端适配（手机/小平板访问网页版） ============ */
@media (max-width: 768px) {
  .page { padding: 10px; }
  /* 侧边栏改为顶部横向滚动菜单 */
  .el-aside {
    width: 100% !important;
    height: auto !important;
    border-right: none !important;
    border-bottom: 1px solid #ebeef5;
  }
  .el-aside .el-menu {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .el-aside .el-menu-item {
    flex: 0 0 auto;
    padding: 0 14px !important;
  }
  .el-aside > div:first-child,
  .el-aside > div:nth-child(2) {
    display: none; /* 隐藏"视光云店"标题与员工信息，节省空间 */
  }
  .el-container { display: flex !important; flex-direction: column !important; }
  .el-header { padding: 0 10px !important; }
  .el-header .el-button { font-size: 12px; padding: 6px 8px; }
  .el-main { padding: 0 !important; }
  /* 表格在手机上横向滚动而非挤压 */
  .el-table { font-size: 12px; }
  .el-table .el-table__header-wrapper, .el-table .el-table__body-wrapper { overflow-x: auto; }
  .el-table { overflow-x: auto; display: block; }
  .el-table__inner-wrapper { overflow-x: auto; }
  /* 固定列在手机上会遮挡，隐藏 fixed 列的阴影与宽度约束 */
  .el-table__fixed, .el-table__fixed-right { display: none !important; }
  .el-table__fixed-column { position: static !important; }
  /* 弹窗全宽 */
  .el-dialog { width: 94% !important; max-width: 94% !important; }
  /* 抽屉（会员详情等）手机上占满屏宽 */
  .el-drawer { width: 100% !important; max-width: 100% !important; }
  .el-drawer__body { overflow-x: hidden; }
  /* 统计卡片两列 */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat .num { font-size: 20px; }
  /* 录入表单输入框占满 */
  .el-form-item { display: block !important; margin-bottom: 10px !important; }
  .el-form-item__label { display: block !important; text-align: left !important; width: auto !important; padding: 0 0 4px !important; line-height: 1.4 !important; }
  .el-form-item__content { margin-left: 0 !important; }
  .el-form-item__content .el-input, .el-form-item__content .el-select,
  .el-form-item__content .el-input-number, .el-form-item__content .el-date-editor,
  .el-form-item__content .el-textarea { width: 100% !important; }
  /* 工作台两栏合并 */
  .el-col { width: 100% !important; }
  /* 打印按钮组不换行溢出处理 */
  .flex { gap: 6px; }
  .el-button { margin-left: 0 !important; }
  /* 触屏友好：普通按钮最小高度 44px（易点按；文字链接按钮除外） */
  .page .el-button:not(.el-button--small):not(.el-button--link),
  .el-dialog .el-button:not(.el-button--small):not(.el-button--link),
  .el-drawer .el-button:not(.el-button--small):not(.el-button--link),
  .login-card .el-button { min-height: 44px; }
  .el-button--small { min-height: 32px; }
  /* 详情描述表格纵向堆叠 */
  .el-descriptions__body .el-descriptions__table { table-layout: fixed; }

  /* ===== 按钮/文字被挤掉的修复 ===== */
  /* 工具栏：输入框/按钮自动换行，各自完整显示 */
  .toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
  .toolbar .el-input, .toolbar .el-select, .toolbar .el-date-editor,
  .toolbar .el-date-editor--daterange,
  .toolbar .el-date-editor--month {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 4px;
  }
  .toolbar .el-button { flex: 0 0 auto; white-space: nowrap; }
  .toolbar .el-radio-group { width: 100%; }
  /* 页面头部返回+标题 */
  .el-page-header { flex-wrap: wrap; }
  /* 表格：每列可压缩 + 内容不截断（自动换行） */
  .el-table .cell { white-space: normal !important; word-break: break-all; }
  .el-table th .cell, .el-table td .cell { padding: 0 4px; }
  /* 详情描述：手机上每项占满一行 */
  .el-descriptions__body .el-descriptions__table {
    display: block;
    overflow-x: auto;
  }
  /* 按钮行：保证按钮完整可见、可换行 */
  .el-form-item .el-button,
  .page .el-button { white-space: nowrap; }
  .page .flex .el-button { margin-bottom: 4px; }
  /* 数字输入框在窄屏不溢出 */
  .el-input-number { max-width: 100% !important; }
  /* 卡片内并排文本自动换行 */
  .card { overflow-wrap: break-word; }
  /* 图表容器自适应 */
  .card [style*="height"], .page [style*="height"] { max-width: 100%; }
  /* 卡片内横向排布（会员/开单/验光头部选择区）：每个控件独占一行 */
  .card .flex > .el-select,
  .card .flex > .el-input,
  .card .flex > .el-date-editor,
  .card .flex > .el-input-number,
  .card .flex > .el-button,
  .card .flex > span,
  .card .flex > div {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2px 0 !important;
  }
  .card .flex { flex-direction: column; align-items: stretch !important; }
  .card .flex .flex { flex-direction: row; flex-wrap: wrap; }
  /* 开单分项行：项目/备注/数量/单价各自完整显示并换行 */
  .card .flex[style*="margin-bottom"] { flex-direction: column; align-items: stretch !important; }
  /* 开单分项行（order-item-row）：手机上每个字段占一行、完整可见 */
  .order-item-row {
    flex-direction: column !important;
    align-items: stretch !important;
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 8px;
    background: #fafbfc;
  }
  .order-item-row .el-select,
  .order-item-row .el-input,
  .order-item-row .el-input-number,
  .order-item-row .el-button,
  .order-item-row > span {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2px 0 !important;
    min-width: 0 !important;
  }
  /* 开单分项表头行（项目/备注/数量/单价/小计）手机上隐藏，分项行自带标签 */
  .card .flex.tiny[style*="margin-bottom"] { display: none !important; }
  /* 验光录入顶栏（会员/电话/日期/方式/主诉）：手机上标签与控件各占一行、完整可见 */
  .rx-topbar {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .rx-topbar .el-select,
  .rx-topbar .el-input,
  .rx-topbar .el-date-editor,
  .rx-topbar .el-date-editor .el-input {
    width: 100% !important;
    max-width: 100% !important;
    margin: 2px 0 !important;
    min-width: 0 !important;
    flex: none !important;
  }
  .rx-topbar > span { width: 100% !important; margin-top: 4px; }
  /* 表格容器宽度约束，避免撑破页面 */
  .el-table { width: 100% !important; }
  .el-table .el-table__inner-wrapper { min-width: 0; }
  /* 表格内的输入控件（如验光处方表的右眼/左眼输入）自动占满单元格 */
  .el-table .el-input-number,
  .el-table .el-input,
  .el-table .el-select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .el-table .el-input-number .el-input { width: 100% !important; }
  /* 页面主体禁止横向溢出 */
  .page, .card, .el-main, .el-container, body {
    max-width: 100vw;
    overflow-x: hidden;
  }
}

/* ============================================================
   科技感主题（Tech Theme）
   设计要点：深空侧边栏 + 玻璃拟态顶栏 + 发光卡片 + 渐变数据 + 轻动效
   仅覆盖颜色/圆角/阴影/动效，不改布局尺寸，保证现有功能不受影响
   ============================================================ */
:root {
  --tech-1: #1f6feb;      /* 主蓝 */
  --tech-2: #06b6d4;      /* 科技青 */
  --tech-3: #7c3aed;      /* 紫（强调） */
  --tech-dark-1: #0b1220; /* 侧边栏深 */
  --tech-dark-2: #111c33; /* 侧边栏浅 */
  --tech-line: rgba(31,111,235,.14);
  --tech-glow: 0 6px 24px rgba(31,111,235,.16);
}
body {
  background:
    radial-gradient(1200px 600px at 8% -10%, rgba(31,111,235,.10), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(6,182,212,.10), transparent 55%),
    #f4f7fc;
  color: #1f2937;
}

/* ---------- 侧边栏：深空渐变 + 发光激活项 ---------- */
.tech-aside {
  background: linear-gradient(180deg, var(--tech-dark-1) 0%, var(--tech-dark-2) 100%) !important;
  border-right: 1px solid rgba(120,180,255,.12) !important;
  box-shadow: 4px 0 26px rgba(6,20,45,.28);
}
.tech-logo { display: flex; align-items: center; gap: 8px; padding: 18px 16px 6px; }
.tech-logo .mark {
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--tech-1), var(--tech-2));
  box-shadow: 0 4px 14px rgba(31,111,235,.5); font-size: 16px;
}
.tech-logo .name {
  color: #eaf2ff; font-size: 16px; font-weight: 700; letter-spacing: .5px;
}
.tech-user { color: #a8bcd9 !important; padding: 0 16px 12px !important; font-size: 12px !important; }
.tech-aside .el-menu { background: transparent !important; border-right: none !important; }
.tech-aside .el-menu-item {
  color: #d3e0f2 !important; margin: 2px 8px; border-radius: 10px; height: 42px; line-height: 42px;
  transition: all .18s; font-weight: 500;
}
.tech-aside .el-menu-item span { color: inherit !important; }
.tech-aside .el-menu-item:hover {
  background: rgba(64,150,255,.14) !important; color: #fff !important;
}
.tech-aside .el-menu-item.is-active {
  background: linear-gradient(90deg, rgba(31,111,235,.95), rgba(6,182,212,.85)) !important;
  color: #fff !important;
  box-shadow: 0 6px 18px rgba(31,111,235,.42), inset 0 0 0 1px rgba(255,255,255,.14);
}
.tech-aside .el-menu-item.is-active::before {
  content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px;
  background: #7fd8ff; box-shadow: 0 0 10px #7fd8ff;
}
.tech-aside .el-menu-item { position: relative; }

/* ---------- 顶栏：玻璃拟态 + 底部光边 ---------- */
.tech-header {
  background: rgba(255,255,255,.94) !important;
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--tech-line) !important;
  box-shadow: 0 4px 20px rgba(15,40,90,.06);
  height: 58px !important;
}
.tech-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #0f1c33; }
.tech-title .bar {
  width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, var(--tech-2), var(--tech-1));
  box-shadow: 0 0 8px rgba(31,111,235,.6);
}
.tech-ver { font-size: 11px; color: #8fa1bb; font-weight: 400; }

/* ---------- 卡片：渐变顶边 + 悬浮发光 ---------- */
.card {
  border-radius: 14px;
  border: 1px solid rgba(31,111,235,.10);
  box-shadow: 0 2px 10px rgba(15,40,90,.05);
  position: relative;
  overflow: hidden;
  transition: box-shadow .22s, transform .22s;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--tech-1), var(--tech-2), transparent 65%);
  opacity: .75;
}
.card:hover { box-shadow: var(--tech-glow); }
.page-title { color: #16233d; display: flex; align-items: center; gap: 8px; }

/* ---------- 数据块：渐变数字（带纯色回退，防止"字看不见"） ---------- */
.stat {
  border-radius: 14px; border: 1px solid rgba(31,111,235,.10);
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  transition: box-shadow .22s, transform .22s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--tech-glow); }
.stat .num {
  color: #1f6feb;                 /* 回退：不支持渐变文字时的纯色 */
  background: linear-gradient(92deg, var(--tech-1), var(--tech-2));
  -webkit-background-clip: text; background-clip: text;
  font-variant-numeric: tabular-nums; letter-spacing: .3px;
  font-size: 26px; font-weight: 700;
}
.stat .lbl { color: #5f6f88; font-size: 13px; font-weight: 500; }
.stat.green .num { color: #16a34a; background: linear-gradient(92deg, #16a34a, #4ade80); -webkit-background-clip: text; background-clip: text; }
.stat.orange .num { color: #d97706; background: linear-gradient(92deg, #d97706, #fbbf24); -webkit-background-clip: text; background-clip: text; }
.stat.red .num { color: #dc2626; background: linear-gradient(92deg, #dc2626, #f87171); -webkit-background-clip: text; background-clip: text; }
/* 仅在浏览器确实支持渐变文字时才让文字透明（否则会出现"看不清/看不见"） */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .stat .num { -webkit-text-fill-color: transparent; }
}

/* ---------- 按钮/标签：渐变 + 光晕 ---------- */
.el-button--primary {
  background: linear-gradient(135deg, var(--tech-1), #2b8bff) !important;
  border: none !important;
  box-shadow: 0 4px 14px rgba(31,111,235,.30);
}
.el-button--primary:hover { box-shadow: 0 6px 20px rgba(31,111,235,.45); transform: translateY(-1px); }
.el-button--success { background: linear-gradient(135deg, #16a34a, #22c55e) !important; border: none !important; }
.el-button { transition: all .18s; }
.el-tag { border-radius: 8px; }
.el-tag--info { background: rgba(31,111,235,.08); border-color: rgba(31,111,235,.18); color: #1f6feb; }

/* ---------- 表格：轻科技感 ---------- */
.el-table th.el-table__cell {
  background: linear-gradient(180deg, #f2f7ff, #eaf2ff) !important;
  color: #24365c !important; font-weight: 600;
}
.el-table__row:hover > td.el-table__cell { background: #f5faff !important; }

/* ---------- 待办块：科技风 ---------- */
.todo-chip {
  background: linear-gradient(180deg, #ffffff, #f4f9ff);
  border: 1px solid rgba(31,111,235,.16);
}
.todo-chip:hover { border-color: rgba(31,111,235,.45); box-shadow: 0 6px 18px rgba(31,111,235,.18); }

/* ---------- KPI 进度条：渐变光条 ---------- */
.kpi-rate-bar { background: rgba(31,111,235,.10); }
.kpi-rate-bar > div { background: linear-gradient(90deg, var(--tech-1), var(--tech-2)); box-shadow: 0 0 8px rgba(6,182,212,.5); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(31,111,235,.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(31,111,235,.45); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 模块化功能中心（应用宫格） ---------- */
.app-search { max-width: 520px; margin: 0 auto 6px; }
.app-group { margin-bottom: 6px; }
.app-group-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: #16233d; margin: 4px 0 12px; }
.app-group-title .dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--tech-1), var(--tech-2)); box-shadow: 0 0 8px rgba(31,111,235,.6); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.app-tile {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  border: 1px solid rgba(31,111,235,.14); border-radius: 14px; cursor: pointer;
  transition: all .2s; position: relative; overflow: hidden;
}
.app-tile::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(31,111,235,.16), transparent 70%);
}
.app-tile:hover { transform: translateY(-3px); border-color: rgba(31,111,235,.45); box-shadow: 0 10px 26px rgba(31,111,235,.20); }
.app-ico {
  width: 38px; height: 38px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center;
  font-size: 18px; background: linear-gradient(135deg, rgba(31,111,235,.14), rgba(6,182,212,.14));
  box-shadow: inset 0 0 0 1px rgba(31,111,235,.16);
}
.app-name { font-weight: 600; color: #0f1c33; font-size: 14px; }
.app-desc { font-size: 12px; color: #5f6f88; margin-top: 2px; line-height: 1.5; }
.app-role { font-size: 11px; color: #8fa1bb; margin-top: 4px; }

/* 小屏适配：宫格两列 */
@media (max-width: 768px) {
  .app-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .app-tile { padding: 12px; }
}


