/* 后台手机端自适应（首页及通用布局） */
@media screen and (max-width: 768px) {
  .dashboard-editor-container {
    padding: 12px !important;
  }

  .dashboard-editor-container .panel-group .card-panel-col {
    width: 50% !important;
    margin-bottom: 12px !important;
  }

  .dashboard-editor-container .panel-group .card-panel {
    height: auto !important;
    min-height: 88px;
  }

  .dashboard-editor-container .panel-group .card-panel-description {
    display: block !important;
    float: none !important;
    margin: 8px 12px 12px !important;
    text-align: center;
  }

  .dashboard-editor-container .panel-group .card-panel .card-panel-icon-wrapper {
    float: none !important;
    width: auto !important;
    height: auto !important;
    margin: 12px auto 0 !important;
    display: flex;
    justify-content: center;
  }

  .dashboard-editor-container .panel-group .card-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .dashboard-editor-container .panel-group .card-panel-description .card-panel-text {
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin-bottom: 4px !important;
  }

  .dashboard-editor-container .panel-group .card-panel-description .card-panel-num {
    display: block !important;
    visibility: visible !important;
    font-size: 22px !important;
    line-height: 1.3 !important;
    color: #333 !important;
  }

  .dashboard-editor-container .bottom_itemBox {
    min-height: auto !important;
    padding: 16px !important;
    margin-bottom: 12px;
  }

  .dashboard-editor-container .rank_title {
    font-size: 16px !important;
  }

  .dashboard-editor-container .rank_tableBox thead tr,
  .dashboard-editor-container .rank_tableBox tbody tr td {
    font-size: 13px !important;
  }

  .dashboard-editor-container .chart-wrapper {
    margin-bottom: 12px !important;
    padding: 8px !important;
  }

  .app-container {
    padding: 10px !important;
  }

  .app-toptool .el-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  .app-toptool .btn-group {
    float: none !important;
    margin-top: 8px !important;
  }

  .el-table {
    font-size: 12px;
  }

  .el-dialog {
    width: 92% !important;
    margin-top: 5vh !important;
  }
}

@media screen and (max-width: 480px) {
  .dashboard-editor-container .panel-group .card-panel-col {
    width: 100% !important;
  }
}

/* 提现列表/详情：收款帐号 + 二维码 */
.withdraw-bankcard-cell {
  line-height: 1.5;
}

.withdraw-bankcard-detail {
  line-height: 1.6;
}

.withdraw-bankcard-meta {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #ebeef5;
  font-size: 12px;
  color: #606266;
  line-height: 1.6;
}

.withdraw-bankcard-channel {
  padding: 6px 0;
}

.withdraw-bankcard-channel:first-of-type {
  padding-top: 0;
}

.withdraw-bankcard-text {
  word-break: break-all;
  white-space: normal;
  font-size: 13px;
  color: #303133;
  line-height: 1.6;
}

.withdraw-bankcard-default {
  display: inline-block;
  margin-left: 6px;
  padding: 0 6px;
  font-size: 12px;
  line-height: 18px;
  color: #fff;
  background: #f56c6c;
  border-radius: 3px;
  vertical-align: middle;
}

.withdraw-bankcard-qrcode {
  display: block;
  width: 64px;
  height: 64px;
  margin-top: 6px;
  border-radius: 4px;
  border: 1px solid #ebeef5;
  cursor: pointer;
  object-fit: cover;
}

.el-table.withdraw-table-layout .withdraw-bankcard-cell {
  max-height: none;
  overflow: visible;
  font-size: 11px;
  line-height: 1.4;
}

.el-table.withdraw-table-layout .withdraw-bankcard-text,
.el-table.withdraw-table-layout .withdraw-bankcard-text--bank {
  white-space: normal;
  word-break: break-all;
  overflow: visible;
  text-overflow: clip;
}

.el-table.withdraw-table-layout .withdraw-bankcard-text--compact {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.withdraw-bankcard-detail .withdraw-bankcard-text--bank,
.withdraw-bankcard-detail .withdraw-bankcard-text {
  white-space: normal;
  word-break: break-all;
  overflow: visible;
  font-size: 13px;
  line-height: 1.6;
}

.el-table.withdraw-table-layout .withdraw-bankcard-qrcode,
.el-table.withdraw-table-layout .withdraw-bankcard-cell img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  margin-top: 2px;
}

.withdraw-bankcard-detail .withdraw-bankcard-qrcode {
  width: 120px;
  height: 120px;
}

.withdraw-qrcode-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.withdraw-qrcode-preview-box {
  max-width: 90vw;
  max-height: 90vh;
}

.withdraw-qrcode-preview-box img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  background: #fff;
}

.withdraw-bankcard-qrcode-lg {
  width: 120px;
  height: 120px;
  margin-top: 8px;
  border-radius: 6px;
  border: 1px solid #ebeef5;
}

/* 提现列表：固定列宽，无横向滚动 */
.el-table.withdraw-table-layout {
  width: 100% !important;
}

.el-table.withdraw-table-layout .el-table__body-wrapper,
.el-table.withdraw-table-layout .el-table__header-wrapper {
  overflow-x: hidden !important;
}

.el-table.withdraw-table-layout .el-table__fixed-right {
  box-shadow: none !important;
}

.el-table.withdraw-table-layout .el-table__fixed-right-patch {
  background-color: #f5f7fa !important;
}

.el-table.withdraw-table-layout .el-table__body tr > td {
  background-color: #fff !important;
}

.el-table.withdraw-table-layout .el-table__fixed-right .el-table__body tr > td {
  background-color: #fff !important;
}

.el-table.withdraw-table-layout.el-table--striped .el-table__body tr.el-table__row--striped > td,
.el-table.withdraw-table-layout.el-table--striped .el-table__fixed-right .el-table__body tr.el-table__row--striped > td {
  background-color: #fafafa !important;
}

.el-table.withdraw-table-layout .el-table__body tr:hover > td,
.el-table.withdraw-table-layout .el-table__body tr.withdraw-row-hover > td,
.el-table.withdraw-table-layout .el-table__fixed-right .el-table__body tr:hover > td,
.el-table.withdraw-table-layout .el-table__fixed-right .el-table__body tr.withdraw-row-hover > td {
  background-color: #f5f7fa !important;
}

.el-table.withdraw-table-layout .el-table__header th,
.el-table.withdraw-table-layout .el-table__fixed-right .el-table__header th {
  background-color: #f5f7fa !important;
}

.el-table.withdraw-table-layout .withdraw-op-cell .el-button {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 待办通知弹窗 - 手机端 */
@media (max-width: 768px) {
  .admin-notify-stack {
    right: 8px;
    bottom: 8px;
    max-width: calc(100vw - 16px);
  }

  .admin-notify-toast {
    padding: 10px 12px;
  }

  .admin-notify-center {
    padding: 10px;
  }

  .admin-notify-table th,
  .admin-notify-table td {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* 路由级手机端适配（由 admin-enhancements-patch 注入 body.admin-route-*） */
@media screen and (max-width: 768px) {
  body[class*="admin-route-kefu"] .app-container,
  body[class*="admin-route-config-kefu"] .app-container,
  body[class*="admin-route-kefumessage"] .app-container,
  body[class*="admin-route-kefuuser"] .app-container {
    padding: 8px !important;
  }

  body[class*="admin-route-kefu"] .el-table,
  body[class*="admin-route-config-kefu"] .el-table,
  body[class*="admin-route-kefumessage"] .el-table {
    font-size: 12px;
  }

  body[class*="admin-route-kefu"] .el-table__body-wrapper,
  body[class*="admin-route-config-kefu"] .el-table__body-wrapper,
  body[class*="admin-route-kefumessage"] .el-table__body-wrapper {
    overflow-x: auto !important;
  }

  body[class*="admin-route-config-kefu"] .kefu-ai-mode-panel,
  body[class*="admin-route-config-kefu"] .hall-notify-panel {
    padding: 12px !important;
  }

  body[class*="admin-route-config-collect"] .app-container,
  body.admin-route-config-collect .app-container {
    padding: 8px !important;
    overflow-x: hidden;
  }

  body[class*="admin-route-config-collect"] .admin-collect-role-panel,
  body.admin-route-config-collect .admin-collect-role-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body[class*="admin-route-config-collect"] .admin-collect-role-table {
    min-width: 520px;
  }

  body[class*="admin-route-withdraw"] .app-container {
    padding: 8px !important;
  }

  body[class*="admin-route-withdraw"] .el-table.withdraw-table-layout .el-table__body-wrapper {
    overflow-x: hidden !important;
  }

  body[class*="admin-route-withdraw"] .app-toptool .btn-group .el-button {
    margin-bottom: 6px;
  }

  body[class*="admin-route-statistical"] .dashboard-editor-container,
  body[class*="admin-route-statistical"] .app-container {
    padding: 10px !important;
  }

  body[class*="admin-route-statistical"] .role-income-panel {
    padding: 12px !important;
    overflow-x: auto;
  }

  body[class*="admin-route-statistical"] .role-income-table {
    min-width: 480px;
  }

  body[class*="admin-route-diypage"] .app-container,
  body[class*="admin-route-bottommenu"] .app-container,
  body[class*="admin-route-diy"] .app-container {
    padding: 8px !important;
    overflow-x: hidden;
  }

  body[class*="admin-route-diypage"] .el-row,
  body[class*="admin-route-bottommenu"] .el-row,
  body[class*="admin-route-diy"] .el-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body[class*="admin-route-diypage"] .el-col,
  body[class*="admin-route-bottommenu"] .el-col,
  body[class*="admin-route-diy"] .el-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  body[class*="admin-route-diypage"] .el-card,
  body[class*="admin-route-bottommenu"] .el-card,
  body[class*="admin-route-diy"] .el-card {
    margin-bottom: 10px;
  }

  body[class*="admin-route-diypage"] iframe,
  body[class*="admin-route-bottommenu"] iframe,
  body[class*="admin-route-diy"] iframe {
    max-width: 100% !important;
  }

  body[class*="admin-route-diypage"] .el-form,
  body[class*="admin-route-diy"] .el-form {
    max-width: 100%;
  }

  body[class*="admin-route-diypage"] .sortable-ghost,
  body[class*="admin-route-diy"] .sortable-ghost {
    opacity: 0.6;
  }

  .dashboard-editor-container .databox_show-right .title-list .li {
    color: #303133 !important;
    font-weight: 600;
  }

  .dashboard-editor-container .card-panel-description {
    display: block !important;
  }

  /* 通用：表格与表单 */
  .el-table__body-wrapper {
    overflow-x: auto !important;
  }

  .el-form-item__label {
    width: 100% !important;
    text-align: left !important;
    float: none !important;
    line-height: 1.4 !important;
    padding-bottom: 4px !important;
  }

  .el-form-item__content {
    margin-left: 0 !important;
  }

  .el-pagination {
    white-space: normal !important;
    text-align: center;
  }

  .el-pagination .el-pagination__sizes,
  .el-pagination .el-pagination__jump {
    display: none;
  }

  .admin-lbs-picker .admin-lbs-actions {
    flex-direction: column;
  }

  body[class*="admin-route-operatingcity"] .el-table.role-diy-list-table,
  body[class*="admin-route-technical"] .el-table.role-diy-list-table,
  body[class*="admin-route-store"] .el-table.role-diy-list-table,
  body[class*="admin-route-tuanzhang"] .el-table.role-diy-list-table {
    width: 100% !important;
  }

  body[class*="admin-route-operatingcity"] .app-toptool .el-col,
  body[class*="admin-route-technical"] .app-toptool .el-col,
  body[class*="admin-route-store"] .app-toptool .el-col,
  body[class*="admin-route-tuanzhang"] .app-toptool .el-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  /* 客服管理 */
  body[class*="admin-route-kefu"] .app-container,
  body[class*="admin-route-config-kefu"] .app-container {
    padding: 10px !important;
  }

  body[class*="admin-route-kefu"] .el-table,
  body[class*="admin-route-config-kefu"] .el-form {
    font-size: 12px;
  }

  /* 财务管理 - 各角色提现页 */
  body[class*="admin-route-withdraw"] .app-container {
    padding: 8px !important;
  }

  body[class*="admin-route-withdraw"] .el-table {
    font-size: 11px;
  }

  body[class*="admin-route-withdraw"] .el-table .cell {
    white-space: normal !important;
    word-break: break-all;
    line-height: 1.35;
  }

  body[class*="admin-route-withdraw"] .app-toptool .el-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  /* 页面装修 / diyfields */
  body[class*="admin-route-diyfields"] .app-container,
  body[class*="admin-route-diy"] .app-container {
    padding: 8px !important;
  }

  body[class*="admin-route-diyfields"] .el-form-item,
  body[class*="admin-route-diy"] .el-form-item {
    margin-bottom: 10px !important;
  }

  body[class*="admin-route-diyfields"] .el-col,
  body[class*="admin-route-diy"] .el-col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }

  body[class*="admin-route-diyfields"] .el-table,
  body[class*="admin-route-diy"] .el-table {
    font-size: 12px;
  }

  /* 财务统计各角色明细 */
  .role-income-panel {
    overflow-x: auto;
  }

  .role-income-table {
    min-width: 520px;
  }
}
