/* ============================================================
   邻邦汇后台 · 适老化样式层（独立注入版）
   ------------------------------------------------------------
   版本：2026-10-27
   作用范围：/admin（管理员后台 + 商户后台同源，一次生效两端）
   加载方式：在 index.html 的 app.*.css 之后追加 <link>，
             保证覆盖 Element-UI 默认值，无需重新构建前端产物。

   设计目标（按老年人实际使用场景定，不是单纯放字号）：
     1. 看得清  —— 正文 16px 起，表格 15px，行高 1.7，表头加粗
     2. 点得准  —— 按钮/菜单/输入框点击区统一抬到 36~52px
     3. 找得到  —— 菜单行高加大、分组留白加大，减少误点相邻项
     4. 不挤丢  —— 表格宁可横向滚动也不把列压到折行（老人最怕字被截断）
     5. 可再放大 —— html.lbh-xxl 再升一档（正文 18px / 表格 17px），
                    由页面右下角悬浮按钮切换，存 localStorage

   回滚方式：删除 index.html 里这一行 <link>，刷新即恢复原样。
            本文件对业务逻辑零改动，纯视觉层。

   注意：Element-UI 2.13.2 主题没有 el-button--large 尺寸，
        因此不用全局 size 配置，全部用显式 CSS 覆盖。
   ============================================================ */

/* ---------- 1. 基础字号与行高 ---------- */
#app {
  font-size: 16px;
  line-height: 1.65;
  color: #1f2329;
  -webkit-font-smoothing: antialiased;
}

/* 正文里常见的裸 span / div 小字一并抬起（很多页面写死 12px） */
#app .app-main .el-card__body,
#app .app-main .el-form-item__label,
#app .app-main .el-form-item__content {
  font-size: 15px;
}

/* ---------- 2. 表格：加大行高字号，表头不折行，允许横向滚动 ---------- */
.el-table {
  font-size: 15px;
  color: #1f2329;
}

.el-table th.el-table__cell > .cell,
.el-table td.el-table__cell > .cell {
  font-size: 15px !important;
  line-height: 1.7 !important;
}

/* 表头：加粗 + 不折行（宁可列宽，也不要「数量(服务/时长)」断成两行） */
.el-table th.el-table__cell {
  padding: 14px 0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #1f2329 !important;
  background-color: #f2f5f9 !important;
}

.el-table th.el-table__cell > .cell {
  white-space: nowrap;
}

/* 表体：降低密度，行高拉开，老人点行不容易点错 */
.el-table td.el-table__cell {
  padding: 14px 0 !important;
}

/* 增加横向可读性：隔行浅底，长表格追行不串行 */
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
  background: #fafbfd;
}

/* hover 行对比度 */
.el-table__body tr:hover > td.el-table__cell {
  background-color: #e8f3ff !important;
}

/* 表格内文字按钮：加大点击区（原来是 0 padding，很难点中） */
.el-table .el-button--text {
  padding: 6px 8px !important;
  font-size: 15px !important;
}

/* 横向滚动条加粗，方便鼠标拖拽 */
.el-table__body-wrapper::-webkit-scrollbar,
.el-scrollbar__wrap::-webkit-scrollbar {
  height: 14px;
  width: 14px;
}

.el-table__body-wrapper::-webkit-scrollbar-thumb,
.el-scrollbar__wrap::-webkit-scrollbar-thumb {
  background: #b8bfc9;
  border-radius: 7px;
}

.el-table__body-wrapper::-webkit-scrollbar-track,
.el-scrollbar__wrap::-webkit-scrollbar-track {
  background: #eef1f5;
}

/* ---------- 3. 按钮：统一加大点击区 ---------- */
.el-button {
  font-size: 15px !important;
  padding: 11px 20px !important;
  border-radius: 6px;
}

.el-button--medium {
  padding: 11px 20px !important;
}

.el-button--small {
  padding: 9px 15px !important;
  font-size: 15px !important;
}

.el-button--mini {
  padding: 8px 13px !important;
  font-size: 14px !important;
}

.el-button--text {
  font-size: 15px !important;
  padding: 6px 8px !important;
}

/* 图标按钮也撑开，避免点不到 */
.el-button [class*='el-icon-'] + span {
  margin-left: 6px;
}

/* ---------- 4. 表单与输入 ---------- */
.el-input__inner {
  height: 44px !important;
  line-height: 44px !important;
  font-size: 15px !important;
}

.el-input--small .el-input__inner {
  height: 38px !important;
  line-height: 38px !important;
}

.el-input--mini .el-input__inner {
  height: 34px !important;
  line-height: 34px !important;
}

.el-textarea__inner {
  font-size: 15px !important;
  line-height: 1.7 !important;
}

.el-form-item__label {
  font-size: 15px !important;
  line-height: 1.8 !important;
  font-weight: 500;
  color: #1f2329 !important;
}

.el-form-item__content {
  font-size: 15px !important;
  line-height: 1.8 !important;
}

.el-form-item__error {
  font-size: 13px !important;
}

/* 单选/复选框：加大，老人点小圆点很难 */
.el-radio__label,
.el-checkbox__label {
  font-size: 15px !important;
}

/* ---------- 5. 弹窗 ---------- */
.el-dialog__title {
  font-size: 19px !important;
  line-height: 1.5 !important;
  font-weight: 600 !important;
}

.el-dialog__body {
  font-size: 15px !important;
  padding: 20px 24px !important;
}

.el-dialog__headerbtn {
  font-size: 22px !important;
  top: 18px !important;
  right: 18px !important;
}

.el-dialog__footer .el-button {
  min-width: 96px;
}

/* ---------- 6. 侧边菜单：行高与字号加大，减少误点 ---------- */
.el-menu-item,
.el-submenu__title {
  font-size: 16px !important;
  height: 52px !important;
  line-height: 52px !important;
}

.el-submenu .el-menu-item {
  height: 48px !important;
  line-height: 48px !important;
  font-size: 15px !important;
}

/* 侧边栏图标略放大，便于识别 */
.el-menu-item i,
.el-submenu__title i {
  font-size: 18px !important;
  margin-right: 10px !important;
}

/* ---------- 7. 分页 ---------- */
.el-pagination {
  font-size: 15px !important;
}

.el-pager li {
  min-width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 15px !important;
}

.el-pagination__jump,
.el-pagination__total {
  font-size: 15px !important;
}

.el-pagination .el-select .el-input__inner {
  height: 34px !important;
  line-height: 34px !important;
}

/* ---------- 8. 标签 / 标签页 / 面包屑 ---------- */
.el-tag {
  font-size: 14px !important;
  height: 30px !important;
  line-height: 28px !important;
  padding: 0 12px !important;
}

.el-tabs__item {
  font-size: 16px !important;
  height: 46px !important;
  line-height: 46px !important;
}

.el-breadcrumb {
  font-size: 15px !important;
}

/* ---------- 9. 下拉 / 日期选择器 ---------- */
.el-select-dropdown__item {
  font-size: 15px !important;
  height: 40px !important;
  line-height: 40px !important;
}

.el-date-table td {
  font-size: 15px !important;
}

.el-date-editor .el-input__inner {
  font-size: 15px !important;
}

/* ---------- 10. 全局提示 ---------- */
.el-message {
  min-width: 340px;
  padding: 16px 20px !important;
}

.el-message__content {
  font-size: 16px !important;
  line-height: 1.6 !important;
}

.el-message-box {
  padding-bottom: 20px;
}

.el-message-box__title {
  font-size: 18px !important;
}

.el-message-box__message {
  font-size: 16px !important;
  line-height: 1.7 !important;
}

.el-message-box__btns .el-button {
  min-width: 92px;
}

/* ---------- 11. 开关 / 描述列表 ---------- */
.el-switch__label {
  font-size: 15px !important;
}

.el-descriptions__body,
.el-descriptions__label,
.el-descriptions__content {
  font-size: 15px !important;
}

/* ---------- 12. 提升整体对比度（老人对浅灰字识别差） ---------- */
.el-table th.el-table__cell.is-leaf,
.el-table td.el-table__cell {
  border-bottom: 1px solid #d6dbe3;
}

.el-form-item__label,
.el-table,
.el-button--text {
  color: #1f2329 !important;
}

/* 常见的浅灰说明文字压深一点，别用 #999 */
#app .app-main .el-form-item__content .el-radio__label,
#app .app-main .el-form-item__content small {
  color: #4a5160;
}

/* ============================================================
   13. 超大档位（html.lbh-xxl）
   ------------------------------------------------------------
   由右下角悬浮按钮切换，给确实看不清的老人用。
   只放大字体与行高，不动任何布局宽度，避免把页面撑坏。
   ============================================================ */
html.lbh-xxl #app {
  font-size: 18px;
}

html.lbh-xxl .el-table {
  font-size: 17px;
}

html.lbh-xxl .el-table th.el-table__cell > .cell,
html.lbh-xxl .el-table td.el-table__cell > .cell {
  font-size: 17px !important;
}

html.lbh-xxl .el-table th.el-table__cell {
  font-size: 17px !important;
}

html.lbh-xxl .el-form-item__label,
html.lbh-xxl .el-form-item__content,
html.lbh-xxl .el-input__inner,
html.lbh-xxl .el-textarea__inner {
  font-size: 17px !important;
}

html.lbh-xxl .el-button {
  font-size: 17px !important;
  padding: 13px 24px !important;
}

html.lbh-xxl .el-menu-item,
html.lbh-xxl .el-submenu__title {
  font-size: 18px !important;
  height: 58px !important;
  line-height: 58px !important;
}

html.lbh-xxl .el-submenu .el-menu-item {
  height: 52px !important;
  line-height: 52px !important;
  font-size: 17px !important;
}

html.lbh-xxl .el-dialog__title {
  font-size: 21px !important;
}

html.lbh-xxl .el-dialog__body {
  font-size: 17px !important;
}

html.lbh-xxl .el-message__content {
  font-size: 18px !important;
}

html.lbh-xxl .el-input__inner {
  height: 48px !important;
  line-height: 48px !important;
}

html.lbh-xxl .el-tag {
  font-size: 16px !important;
  height: 34px !important;
  line-height: 32px !important;
}

html.lbh-xxl .el-pager li {
  min-width: 40px !important;
  height: 40px !important;
  line-height: 40px !important;
  font-size: 17px !important;
}

/* ============================================================
   14. 右下角适老工具按钮（由 lbh-voice.js 创建，样式必须放全局）
   ------------------------------------------------------------
   为什么在全局：scoped 样式与全局优先级相同、加载顺序不定，
   这类动态创建的固定按钮如果一半 scoped 一半全局会出现半截样式。
   ============================================================ */
#lbh-a11y-tools {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2100;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  font-family: inherit;
}

#lbh-a11y-tools .lbh-a11y-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  border: 1px solid #f0441e;
  background: #fff;
  color: #f0441e;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(240, 68, 30, 0.18);
  transition: all 0.18s;
  user-select: none;
  white-space: nowrap;
}

#lbh-a11y-tools .lbh-a11y-btn:hover {
  background: #fff1ec;
  transform: translateY(-1px);
}

#lbh-a11y-tools .lbh-a11y-btn:focus {
  outline: none;
}

#lbh-a11y-tools .lbh-a11y-btn:active {
  transform: translateY(0);
}

/* 已开启：绿底，一眼看出当前状态 */
#lbh-a11y-tools .lbh-a11y-btn.is-on {
  border-color: #4e9c2b;
  background: #f0f9eb;
  color: #3f7f22;
  box-shadow: 0 3px 12px rgba(78, 156, 43, 0.16);
}

#lbh-a11y-tools .lbh-a11y-btn.is-on:hover {
  background: #e6f6dd;
}

/* 不可用：灰，不诱导点击 */
#lbh-a11y-tools .lbh-a11y-btn.is-na {
  border-color: #c8ccd4;
  background: #f5f6f8;
  color: #8a8f99;
  box-shadow: none;
  cursor: not-allowed;
}

#lbh-a11y-tools .lbh-a11y-btn.is-na:hover {
  background: #f5f6f8;
  transform: none;
}

#lbh-a11y-tools .lbh-a11y-btn i {
  font-size: 19px;
}

#lbh-a11y-tools .lbh-a11y-txt {
  font-weight: 500;
}

/* 提示气泡（不用 Element 的 $message，避免依赖组件实例） */
.lbh-a11y-toast {
  position: fixed;
  left: 50%;
  top: 76px;
  transform: translateX(-50%);
  z-index: 3000;
  max-width: 560px;
  padding: 14px 22px;
  border-radius: 8px;
  background: rgba(31, 35, 41, 0.92);
  color: #fff;
  font-size: 16px;
  line-height: 1.6;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.22s;
  pointer-events: none;
}

.lbh-a11y-toast.is-show {
  opacity: 1;
}

/* 窄屏（窄窗口后台）时按钮不要挡住表格右下角操作区 */
@media screen and (max-width: 1280px) {
  #lbh-a11y-tools {
    right: 12px;
    bottom: 12px;
  }

  #lbh-a11y-tools .lbh-a11y-btn {
    min-height: 40px;
    padding: 0 13px;
    font-size: 14px;
  }
}
