* { margin: 0; padding: 0; box-sizing: border-box; }
html, body, #app { height: 100%; font-family: "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }

/* 登录页 */
.login-wrap { height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); }
.login-card { width: 380px; max-width: 92vw; background: #fff; border-radius: 12px; padding: 36px 32px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.login-card h2 { text-align: center; margin-bottom: 6px; color: #1e3c72; }
.login-card .sub { text-align: center; color: #999; font-size: 13px; margin-bottom: 24px; }

/* 布局 */
.layout { display: flex; height: 100%; }
.sidebar { width: 200px; background: #1e293b; color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar .logo { padding: 18px 16px; font-size: 16px; font-weight: bold; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 8px; }
.menu-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 13px 20px; color: #94a3b8;
  cursor: pointer; font-size: 14px; transition: all .2s; }
.menu-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.menu-item.active { color: #409eff; background: rgba(64,158,255,.12); border-right: 3px solid #409eff; }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.header { height: 54px; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex;
  align-items: center; justify-content: space-between; padding: 0 18px; flex-shrink: 0; }
.header .title { font-size: 17px; font-weight: 600; color: #1f2937; }
.header-right { display: flex; align-items: center; gap: 12px; }
.content { flex: 1; overflow-y: auto; padding: 16px; background: #f1f5f9; }

/* 移动端 */
.hamburger { display: none; }
@media (max-width: 768px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 100; transform: translateX(-100%);
    transition: transform .25s; width: 62vw; max-width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar .menu-item { padding: 15px 22px; font-size: 15px; }
  .sidebar-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99; }
  .hamburger { display: inline-flex; font-size: 22px !important; }
  .header { height: 50px; padding: 0 12px; }
  .header .title { font-size: 16px; }
  .header-right span { display: none; }
  .content { padding: 10px; }
  .page-card { padding: 12px; border-radius: 12px; margin-bottom: 10px; }
  .page-card h3 { font-size: 16px; }
  /* 弹窗接近全屏，内容区可滚动 */
  .el-dialog { width: 96% !important; max-width: 96% !important; margin-top: 4vh !important;
    border-radius: 14px !important; }
  .el-dialog__header { padding-top: 14px; }
  .el-dialog__title { font-size: 16px; font-weight: 600; }
  .el-dialog__body { max-height: 68vh; overflow-y: auto; padding: 14px 16px; }
  .el-drawer { width: 100% !important; }
  /* 控件加大，防 iOS 聚焦缩放 */
  .el-input__inner { font-size: 16px !important; }
  .el-textarea__inner { font-size: 16px !important; }
  .el-input__inner { height: 42px; }
  .el-button { min-height: 42px; font-size: 15px; }
  .el-button--large { min-height: 48px; font-size: 16px; }
  .el-button.is-link { min-height: 34px; }
  .el-form-item__label { font-size: 14px; font-weight: 500; }
  .el-form-item { margin-bottom: 16px; }
  .el-table { font-size: 13px; }
  .el-tag { font-size: 12px; }
  .el-select .el-select__wrapper { font-size: 16px; min-height: 42px; }
  /* 统计卡两列 */
  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat-card { padding: 12px; border-radius: 12px; }
  .stat-card .num { font-size: 20px; }
  .stat-card .label { font-size: 12px; }
  .toolbar { gap: 8px; margin-bottom: 10px; }
  .toolbar .el-input { width: 100% !important; }
  .toolbar .el-select { width: 46% !important; }
  .toolbar .el-button { flex: 1; }
  /* 图片九宫格加大 */
  .img-list .el-image { width: 84px !important; height: 84px !important; }
  .el-upload--picture-card, .el-upload-list--picture-card .el-upload-list__item { width: 84px !important; height: 84px !important; }
}

/* 手机端工单卡片列表（替代表格） */
.order-cards { display: flex; flex-direction: column; gap: 10px; }
.order-card { background: #fff; border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); border: 1px solid #f0f2f5; }
.order-card:active { background: #f5f7fa; }
.order-card .oc-top { display: flex; align-items: center; gap: 8px; }
.order-card .oc-no { font-family: Consolas, monospace; font-size: 13px; color: #64748b; flex: 1; }
.order-card .oc-device { font-size: 15px; font-weight: 600; color: #1f2937; margin-top: 6px; }
.order-card .oc-desc { font-size: 13px; color: #64748b; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order-card .oc-bottom { display: flex; align-items: center; gap: 10px; margin-top: 8px;
  font-size: 12px; color: #94a3b8; }
.order-card .oc-bottom .oc-reporter { color: #409eff; }

/* 手机端报修页 */
.repair-wrap { max-width: 560px; margin: 0 auto; }
.repair-submit-fixed { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff;
  box-shadow: 0 -2px 10px rgba(0,0,0,.08); }
.repair-submit-fixed .el-button { width: 100%; height: 48px; font-size: 17px; border-radius: 24px; }
@media (max-width: 768px) {
  .repair-wrap { padding-bottom: 70px; }
  .repair-wrap .el-form-item__label { font-size: 15px; }
}
@media (min-width: 769px) {
  .repair-submit-fixed { position: static; padding: 4px 0 0; background: transparent; box-shadow: none; }
  .repair-submit-fixed .el-button { width: 100%; height: 44px; border-radius: 8px; }
}

/* 手机端工单详情底部操作栏 */
.mobile-action-bar { display: none; }
@media (max-width: 768px) {
  .mobile-action-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,.08); }
  .mobile-action-bar .el-button { flex: 1; margin: 0; }
  /* 详情页留出底部操作栏空间 */
  .order-detail-wrap { padding-bottom: 80px; }
  /* PC端操作区在手机上隐藏 */
  .pc-actions { display: none; }
  /* 详情描述块加大字号 */
  .order-detail-wrap .el-descriptions { --el-descriptions-item-bordered-label-font-size: 13px; }
  .order-detail-wrap b { font-size: 15px; }
  .order-detail-wrap .log-line { font-size: 13px; line-height: 1.6; }
}

@media (max-width: 768px) {
  .chart-grid { grid-template-columns: 1fr; }
  .chart-box { height: 250px !important; }
  .login-card { padding: 28px 22px; border-radius: 14px; }
  .el-message-box { width: 88% !important; }
  .el-message { min-width: auto; max-width: 92vw; }
}

/* 通用 */
.page-card { background: #fff; border-radius: 8px; padding: 16px; margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.toolbar .grow { flex: 1; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-card .num { font-size: 26px; font-weight: bold; color: #1e3c72; }
.stat-card .label { font-size: 13px; color: #64748b; margin-top: 4px; }
.stat-card.warn .num { color: #e6a23c; }
.stat-card.danger .num { color: #f56c6c; }
.stat-card.success .num { color: #67c23a; }
.chart-box { width: 100%; height: 320px; }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
.img-list { display: flex; flex-wrap: wrap; gap: 8px; }
.img-list .el-image { border-radius: 6px; border: 1px solid #e5e7eb; }
.status-tag { font-weight: 500; }
.order-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mono { font-family: Consolas, monospace; }
.muted { color: #94a3b8; font-size: 12px; }
.log-line { padding: 10px 0; border-bottom: 1px dashed #e5e7eb; font-size: 13px; }
.log-line:last-child { border-bottom: none; }
