/* ============ 基础 ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2b6cb0;
  --primary-dark: #1f4e7f;
  --primary-light: #ebf4ff;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1a2332;
  --text-2: #5a6b80;
  --text-3: #93a1b3;
  --border: #e2e8f0;
  --green: #27ae60;
  --orange: #e67e22;
  --red: #c0392b;
  --purple: #8e44ad;
  --teal: #16a085;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20,40,80,.06), 0 6px 20px rgba(20,40,80,.05);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; font-size: 14px; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--primary); text-decoration: none; }

/* ============ 布局 ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: linear-gradient(180deg, #1f3a5f 0%, #16283f 100%);
  color: #fff; flex-shrink: 0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar .brand h1 { font-size: 16px; font-weight: 600; letter-spacing: .3px; }
.sidebar .brand p { font-size: 11px; color: #8fa6c0; margin-top: 3px; }
.nav { padding: 12px 10px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  color: #c3d3e5; font-size: 14px; margin-bottom: 3px; transition: .15s; cursor: pointer;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: var(--primary); color: #fff; font-weight: 500; }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; }
.sidebar .foot { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.1); font-size: 11px; color: #7d92ab; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: #fff; border-bottom: 1px solid var(--border); padding: 0 24px;
  height: 58px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.topbar h2 { font-size: 17px; font-weight: 600; }
.topbar .user { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; }
.content { padding: 22px 24px 60px; flex: 1; }

/* ============ 卡片 / 通用 ============ */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 18px; }
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-title .sub { font-size: 12px; color: var(--text-3); font-weight: 400; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); border-left: 3px solid var(--primary); }
.stat .n { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.2; }
.stat .l { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.stat.o { border-left-color: var(--orange); }
.stat.g { border-left-color: var(--green); }
.stat.p { border-left-color: var(--purple); }

.btn { border: none; border-radius: 7px; padding: 8px 15px; background: var(--primary); color: #fff; font-weight: 500; transition: .15s; }
.btn:hover { background: var(--primary-dark); }
.btn.ghost { background: #fff; color: var(--text-2); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--bg); color: var(--text); }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.btn.danger { background: var(--red); }
.btn.green { background: var(--green); }
.btn.gray { background: #ecf0f3; color: var(--text-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar input, .toolbar select { padding: 7px 11px; border: 1px solid var(--border); border-radius: 7px; background: #fff; outline: none; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--primary); }
.toolbar .grow { flex: 1; min-width: 180px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; background: #f8fafc; color: var(--text-2); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid #f0f4f8; }
tbody tr:hover { background: #fafcff; }
.table-wrap { overflow-x: auto; border-radius: 8px; border: 1px solid var(--border); }

.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; color: #fff; }

.empty { text-align: center; padding: 48px 20px; color: var(--text-3); font-size: 13px; }
.empty .big { font-size: 34px; margin-bottom: 10px; opacity: .5; }

/* ============ 弹窗 ============ */
.mask { position: fixed; inset: 0; background: rgba(15,25,40,.5); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 760px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-head h3 { font-size: 16px; }
.modal-close { background: none; border: none; font-size: 22px; color: var(--text-3); line-height: 1; }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 5px; font-weight: 500; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 7px; outline: none; background: #fff;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px); background: #1a2332; color: #fff; padding: 11px 22px; border-radius: 8px; font-size: 14px; opacity: 0; transition: .3s; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ 二维码 ============ */
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.qr-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; background: #fff; transition: .15s; }
.qr-card:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.qr-card canvas, .qr-card img { width: 150px; height: 150px; }
.qr-card .qn { font-weight: 600; font-size: 14px; margin-top: 10px; }
.qr-card .qs { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* ============ 手机报修页 ============ */
.phone-page { max-width: 440px; margin: 0 auto; min-height: 100vh; background: var(--bg); }
.phone-head { background: linear-gradient(135deg, #2b6cb0, #1f4e7f); color: #fff; padding: 20px; border-radius: 0 0 18px 18px; }
.phone-head .loc { font-size: 12px; opacity: .85; }
.phone-head h2 { font-size: 19px; margin-top: 4px; }
.pick-group { background: #fff; border-radius: 12px; margin: 14px; padding: 16px; box-shadow: var(--shadow); }
.pick-group h4 { font-size: 13px; color: var(--text-2); margin-bottom: 12px; display: flex; justify-content: space-between; }
.pick-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-chip { padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 20px; font-size: 13px; background: #fff; color: var(--text-2); transition: .15s; }
.pick-chip:hover { border-color: var(--primary); color: var(--primary); }
.pick-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500; }
.pick-chip small { display: block; font-size: 11px; opacity: .75; }
.pick-chip small.owner { opacity: .9; font-size: 10.5px; }
.pick-chip.on small.owner { opacity: .95; }

/* ============ 工单看板 ============ */
.kanban { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; align-items: start; }
.kcol { background: #eef2f7; border-radius: 10px; padding: 12px; }
.kcol h4 { font-size: 13px; margin-bottom: 10px; display: flex; justify-content: space-between; color: var(--text-2); }
.kcol h4 .cnt { background: #fff; border-radius: 20px; padding: 1px 9px; font-size: 12px; }
.kcard { background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 9px; box-shadow: 0 1px 2px rgba(20,40,80,.08); cursor: pointer; transition: .15s; border-left: 3px solid var(--primary); }
.kcard:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20,40,80,.12); }
.kcard .kt { font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.kcard .km { font-size: 12px; color: var(--text-3); }

/* ============ 时间线 ============ */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before { content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary-light); }
.tl-item .tt { font-size: 13px; font-weight: 500; }
.tl-item .td { font-size: 12px; color: var(--text-3); }

/* ============ 图表 ============ */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 60px; align-items: center; gap: 10px; font-size: 13px; }
.bar-track { background: #eef2f7; border-radius: 6px; height: 22px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #4299e1, #2b6cb0); border-radius: 6px; transition: .4s; }
.bar-val { text-align: right; color: var(--text-2); font-weight: 500; }

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: -230px; transition: .25s; z-index: 50; }
  .sidebar.open { left: 0; }
  .main { width: 100%; }
  .content { padding: 14px; }
  .topbar { padding: 0 14px; }
  .menu-btn { display: block !important; }
  .form-grid { grid-template-columns: 1fr; }
}
.menu-btn { display: none; background: none; border: none; font-size: 20px; color: var(--text-2); }

/* ============ 新增：连接后端相关 ============ */
.kv-l { font-size: 12px; color: var(--text-3); }
.kv-v { font-weight: 600; font-size: 15px; }

.sb-btn { width: 100%; margin-bottom: 6px; background: transparent; color: #8fa6c0; border-color: #3a4f68; }
.sb-btn:hover { background: rgba(255,255,255,.08); color: #fff; border-color: #4a6280; }

.pager { display: flex; gap: 6px; justify-content: center; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.pager-tip { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dept-title { margin: 18px 0 10px; font-weight: 600; font-size: 14px; color: var(--primary-dark); }

.info-box { background: var(--bg); border-radius: 9px; padding: 14px; margin-bottom: 14px; font-size: 13px; line-height: 2; }

/* 加载状态 */
.loading-box { text-align: center; padding: 50px 20px; color: var(--text-3); font-size: 13px; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 12px;
  border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* toast 类型 */
.toast.err { background: var(--red); }

/* ============ 登录页 ============ */
.login-page {
  flex: 1; width: 100%;   /* ★ 外层 #loginRoot 是 flex，不设 flex:1 背景会收缩成窄条（右侧露白的真因） */
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  gap: 84px; flex-wrap: wrap;
  background: linear-gradient(135deg, #1f3a5f 0%, #16283f 100%); padding: 20px;
}
/* 左侧品牌区：公司名 + 系统简介（窄屏隐藏，只留登录卡） */
.login-brand { color: #fff; max-width: 430px; }
.login-brand .lb-mark {
  width: 64px; height: 64px; border-radius: 16px; margin-bottom: 22px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.login-brand .lb-company { font-size: 26px; font-weight: 700; letter-spacing: 2px; }
.login-brand h2 { font-size: 17px; font-weight: 500; color: #c9d8ec; margin: 10px 0 16px; }
.login-brand .lb-feats { font-size: 13px; color: #8fa6c2; line-height: 2.1; }
.login-brand .lb-foot { margin-top: 26px; font-size: 12px; color: #6d84a3; }
@media (max-width: 900px) { .login-brand { display: none; } .login-page { gap: 0; } }
.login-card {
  background: #fff; border-radius: 14px; padding: 36px 34px 28px; width: 100%; max-width: 390px;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.login-card .lg-logo {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 16px;
  background: linear-gradient(135deg, #4299e1, #2b6cb0); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.login-card h1 { font-size: 18px; text-align: center; font-weight: 600; }
.login-card .lg-sub { text-align: center; color: var(--text-3); font-size: 13px; margin: 6px 0 22px; }
.login-card .lg-err {
  background: #fdecea; color: var(--red); padding: 9px 12px; border-radius: 7px;
  font-size: 13px; margin-bottom: 14px; text-align: center;
}
.login-card .lg-tip {
  text-align: center; font-size: 12px; color: var(--text-3); margin-top: 16px;
  background: var(--bg); padding: 8px; border-radius: 6px;
}
.login-card .lg-links {
  text-align: center; font-size: 12px; margin-top: 14px; color: var(--text-3);
}
.login-card .lg-links a { cursor: pointer; color: var(--primary); }
.login-card .lg-links a:hover { text-decoration: underline; }
.login-card .lg-links .dot { margin: 0 8px; }

/* ============ 工单流转步骤条 ============ */
.steps { display: flex; margin-bottom: 18px; }
.step { flex: 1; text-align: center; position: relative; }
.step .sd {
  width: 12px; height: 12px; border-radius: 50%; margin: 0 auto 6px;
  background: var(--border); position: relative; z-index: 2;
}
.step.on .sd { background: var(--green); box-shadow: 0 0 0 3px #e8f8ef; }
.step::before {
  content: ''; position: absolute; top: 5px; left: 0; right: 50%; height: 2px; background: var(--border);
}
.step::after {
  content: ''; position: absolute; top: 5px; left: 50%; right: 0; height: 2px; background: var(--border);
}
.step:first-child::before, .step:last-child::after { display: none; }
.step.on::before, .step.on::after { background: #b7e4c7; }
.step .sl { font-size: 12px; color: var(--text-2); font-weight: 500; }
.step.on .sl { color: var(--green); }
.step .st { font-size: 11px; color: var(--text-3); }

/* ============ 报修页（独立入口） ============ */
body.report-body { background: var(--bg); }
.report-body .phone-page { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); }
.phone-head .ph-sub { font-size: 13px; opacity: .92; margin-top: 4px; }
.phone-head.ok { background: linear-gradient(135deg, #27ae60, #16a085); }

.pick-group h4 .hint { color: var(--text-3); font-weight: 400; font-size: 12px; }
.pick-chip.wide { width: 100%; text-align: center; }
.pick-chip.urgent { background: var(--red); border-color: var(--red); color: #fff; }

.phone-foot { padding: 0 14px 34px; }
.btn.submit { width: 100%; padding: 15px; font-size: 16px; border-radius: 10px; letter-spacing: 1px; }
.pf-tip { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 12px; }

.phone-loading { text-align: center; padding: 100px 20px; color: var(--text-3); font-size: 14px; }
.phone-error { text-align: center; padding: 90px 24px; }
.phone-error .pe-ico { font-size: 44px; margin-bottom: 14px; }
.phone-error h3 { font-size: 17px; margin-bottom: 8px; }
.phone-error p { color: var(--text-3); font-size: 13px; }

.ok-ico { font-size: 48px; margin-bottom: 12px; }
.ok-no { font-weight: 600; font-size: 17px; margin-bottom: 18px; }
.ok-info { text-align: left; font-size: 13px; line-height: 2.1; color: var(--text-2);
  background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: var(--shadow); }
.ok-info span { display: inline-block; width: 64px; color: var(--text-3); }
.ok-tip { margin-top: 18px; color: var(--text-3); font-size: 12px; }

/* 微信内置浏览器适配 */
@supports (-webkit-touch-callout: none) {
  .phone-page { padding-bottom: env(safe-area-inset-bottom); }
  .btn.submit { -webkit-appearance: none; }
}


/* ============================================================
 * 手机端（<860px）
 * 设计目标：手机上像小程序，电脑上保持原样。
 * 只在小屏生效，桌面布局完全不受影响。
 * ============================================================ */

/* 底部 Tab 栏：默认隐藏，仅小屏显示 */
.tabbar { display: none; }

@media (max-width: 860px) {
  /* 手机端整体：顶部到状态栏、底部留出 Tab 栏 */
  body { background: #eef1f6; }
  .tabbar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(20,40,80,.06);
  }
  .tab-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 11px; color: var(--text-3); cursor: pointer;
    padding: 3px 0; transition: .15s;
  }
  .tab-item .ti-ico { width: 23px; height: 23px; display: block; }
  .tab-item svg { width: 100%; height: 100%; display: block; }
  .tab-item.active { color: var(--primary); font-weight: 600; }
  .tab-item.active .ti-ico { transform: translateY(-1px); }

  /* 内容区：底部给 Tab 栏让位 */
  .content { padding: 0 0 calc(72px + env(safe-area-inset-bottom)); }
  .topbar { display: none; }              /* 手机端用工作台的用户条代替 */
  .sidebar { box-shadow: 4px 0 24px rgba(0,0,0,.25); }

  /* ---------- 手机版工作台 ---------- */
  .m-dash { padding-bottom: 8px; }

  .m-hero {
    background: linear-gradient(160deg, #2fa98c 0%, #1f8f74 55%, #17836a 100%);
    padding: 18px 16px 0;
    color: #fff;
    border-radius: 0 0 18px 18px;
  }
  .m-hero-user { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }
  .m-hero-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.22);
    border: 1.5px solid rgba(255,255,255,.45);
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; font-weight: 600;
  }
  .m-hero-name { font-size: 16.5px; font-weight: 600; }
  .m-hero-role { font-size: 12.5px; opacity: .88; margin-top: 1px; }

  .m-board {
    background: #fff; border-radius: 14px;
    padding: 16px 8px 10px;
    display: grid; grid-template-columns: repeat(4, 1fr);
    box-shadow: 0 4px 16px rgba(10,60,50,.14);
    transform: translateY(22px);
    margin-bottom: 22px;
    color: var(--text);
  }
  .m-cell { text-align: center; cursor: pointer; }
  .m-num { font-size: 25px; font-weight: 700; line-height: 1.15; }
  .m-num.c-blue { color: #2b6cb0; }
  .m-num.c-orange { color: #e67e22; }
  .m-num.c-green { color: #27ae60; }
  .m-cap { font-size: 11.5px; color: var(--text-2); margin-top: 3px; }
  .m-board-tip {
    grid-column: 1 / -1;
    text-align: center; font-size: 11.5px; color: var(--text-3);
    padding: 9px 0 4px; margin-top: 8px;
    border-top: 1px solid #f0f3f7; cursor: pointer;
  }

  .m-section-title {
    font-size: 15px; font-weight: 600; color: var(--text);
    padding: 0 16px; margin: 6px 0 11px;
    display: flex; align-items: center; justify-content: space-between;
  }
  .m-section-title::before {
    content: ''; position: absolute; margin-left: -8px;
    width: 3px; height: 14px; border-radius: 2px; background: #2fa98c;
  }
  .m-more-link {
    background: none; border: none; color: var(--text-3);
    font-size: 12.5px; padding: 0;
  }

  .m-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 10px; padding: 0 12px; margin-bottom: 22px;
  }
  .m-entry {
    background: #fff; border: none; border-radius: 13px;
    padding: 15px 6px 13px;
    display: flex; flex-direction: column; align-items: center; gap: 9px;
    box-shadow: 0 1px 3px rgba(20,40,80,.06);
    transition: .15s;
  }
  .m-entry:active { transform: scale(.96); background: #f7fafc; }
  .m-entry-ico {
    width: 40px; height: 40px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
  }
  .m-entry-ico svg { width: 22px; height: 22px; }
  .m-entry-label { font-size: 12.5px; color: var(--text); font-weight: 500; }

  .tone-blue   { background: #e8f2fc; color: #2b6cb0; }
  .tone-green  { background: #e6f7ec; color: #27ae60; }
  .tone-teal   { background: #e3f6f4; color: #16a085; }
  .tone-cyan   { background: #e4f5fb; color: #2596be; }
  .tone-indigo { background: #eaecfb; color: #4c5bd4; }
  .tone-amber  { background: #fdf3e2; color: #d68910; }
  .tone-orange { background: #fdeee4; color: #d35400; }

  /* 手机版：最近工单卡片 */
  .m-ticket-list { padding: 0 12px; display: flex; flex-direction: column; gap: 9px; }
  .m-ticket {
    background: #fff; border-radius: 12px; padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(20,40,80,.06);
  }
  .m-ticket-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
  .m-ticket-no { font-family: monospace; font-size: 13px; font-weight: 600; color: var(--text); }
  .m-ticket-mid { font-size: 13px; color: var(--text-2); margin-bottom: 5px; }
  .m-ticket-bot {
    display: flex; justify-content: space-between;
    font-size: 11.5px; color: var(--text-3);
  }

  .m-empty {
    text-align: center; padding: 30px 20px; color: var(--text-3);
    font-size: 13.5px; line-height: 2;
  }

  .m-foot-stats {
    display: flex; margin: 20px 12px 8px;
    background: #fff; border-radius: 12px; padding: 14px 0;
    box-shadow: 0 1px 3px rgba(20,40,80,.06);
  }
  .m-foot-stats > div { flex: 1; text-align: center; }
  .m-foot-stats > div + div { border-left: 1px solid #f0f3f7; }
  .m-foot-stats b { display: block; font-size: 17px; color: var(--text); font-weight: 700; }
  .m-foot-stats span { font-size: 11.5px; color: var(--text-3); }

  /* 卡片：手机上边距收紧，去掉圆角外阴影过重 */
  .card { margin: 0 12px 12px; padding: 15px 15px; border-radius: 12px; }
  .stats { margin: 0 12px 12px; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat .n { font-size: 22px; }

  /* ---------- 表格 → 卡片（手机端自动转换） ---------- */
  .table-wrap table { border: none; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr {
    display: block; background: #fff;
    border-radius: 11px; padding: 12px 14px;
    margin-bottom: 9px;
    box-shadow: 0 1px 3px rgba(20,40,80,.06);
  }
  .table-wrap tbody td {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; padding: 5px 0; border: none; font-size: 13px;
    text-align: right;
  }
  .table-wrap tbody td::before {
    content: attr(data-label);
    color: var(--text-3); font-size: 12px; font-weight: 400;
    text-align: left; flex: 0 0 auto;
  }
  .table-wrap tbody td:not([data-label])::before { content: none; }
  .table-wrap tbody td[colspan] { display: block; text-align: center; }

  /* 底部弹层里的功能列表 */
  .more-list { display: flex; flex-direction: column; }
  .more-item {
    display: flex; align-items: center; justify-content: space-between;
    background: none; border: none; border-bottom: 1px solid #f2f5f9;
    padding: 13px 2px; text-align: left;
  }
  .more-item:last-of-type { border-bottom: none; }
  .more-item-t { font-size: 14.5px; font-weight: 500; color: var(--text); }
  .more-item-d { font-size: 12px; color: var(--text-3); margin-top: 1px; }
  .more-item-a { color: var(--text-3); font-size: 19px; }

  /* 弹窗在手机上占满宽度、底部贴合 */
  .mask { align-items: flex-end; }
  .modal {
    width: 100% !important; max-width: 100% !important;
    border-radius: 16px 16px 0 0;
    max-height: 88vh;
    margin: 0;
  }
  .modal.wide { width: 100% !important; max-width: 100% !important; }

  /* 筛选工具栏：手机上换行排布 */
  .toolbar { flex-wrap: wrap; }
  .toolbar .grow { flex: 1 1 100%; }
  .toolbar select { flex: 1 1 46%; min-width: 0; }
}

/* ============================================================
 * 第 4 批：站内待办（顶栏铃铛 + 面板）
 * ========================================================== */
.todo-bell {
  position: relative; background: none; border: none; font-size: 17px;
  padding: 5px 8px; border-radius: 8px; line-height: 1;
}
.todo-bell:hover { background: var(--bg); }
.todo-badge {
  position: absolute; top: -1px; right: 0; min-width: 16px; height: 16px;
  padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff;
  font-size: 10px; font-style: normal; line-height: 16px; text-align: center;
}
.todo-panel {
  display: none; position: fixed; top: 60px; right: 20px; width: 390px;
  max-height: 72vh; overflow: auto; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(20, 40, 80, .16); z-index: 60;
}
.todo-panel.show { display: block; }
.todo-panel .tp-head {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; background: var(--card);
}
.todo-panel .tp-head h4 { font-size: 14px; }
.todo-panel .tp-list { padding: 6px; }
.todo-item { display: flex; gap: 10px; padding: 10px 12px; border-radius: 8px; cursor: pointer; }
.todo-item:hover { background: var(--bg); }
.todo-item .ti-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary);
  margin-top: 7px; flex-shrink: 0;
}
.todo-item.read .ti-dot { background: var(--border); }
.todo-item .ti-main { flex: 1; min-width: 0; }
.todo-item .ti-title { font-size: 13px; font-weight: 500; }
.todo-item.read .ti-title { font-weight: 400; color: var(--text-2); }
.todo-item .ti-desc {
  font-size: 12px; color: var(--text-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.todo-item .ti-type { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.todo-empty { padding: 34px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ============================================================
 * 第 4 批：权限勾选（账号与权限页 / 编辑账号弹窗）
 * ========================================================== */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.perm-group { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.perm-group > h5 {
  font-size: 12.5px; margin-bottom: 7px; color: var(--text-2);
  display: flex; justify-content: space-between; align-items: center;
}
.perm-group > h5 button { font-size: 11px; padding: 1px 6px; }
.perm-item { display: flex; align-items: flex-start; gap: 7px; padding: 3px 0; font-size: 13px; cursor: pointer; }
.perm-item input { margin-top: 3px; flex-shrink: 0; }
.perm-item.disabled { opacity: .45; cursor: not-allowed; }
.role-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.role-card {
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px;
  cursor: pointer; font-size: 13px; min-width: 158px; flex: 1 1 158px;
}
.role-card.on { border-color: var(--primary); background: var(--primary-light); }
.role-card b { display: block; font-size: 13px; }
.role-card small { color: var(--text-3); font-size: 11px; line-height: 1.45; display: block; margin-top: 3px; }
.scope-box {
  max-height: 170px; overflow: auto; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; margin-top: 6px; background: #fbfcfe;
}
.scope-box label { display: block; font-size: 13px; padding: 3px 0; cursor: pointer; }
.scope-box .sb-sub { padding-left: 20px; }

/* 资产二维码：列表里的小码 */
.qr-chip {
  width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 5px;
  display: inline-block; vertical-align: middle; cursor: pointer; background: #fff;
}
.qr-noprint { font-size: 11px; color: var(--orange); }
@media (max-width: 720px) {
  .todo-panel { width: calc(100vw - 24px); right: 12px; top: 56px; }
}

/* ============ 第 5 批：图片附件 ============ */
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 12px;
}
.photo-cell {
  position: relative; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: #f8fafc;
}
.photo-cell img {
  display: block; width: 100%; height: 110px; object-fit: cover; cursor: zoom-in;
  background: #eef2f7;
}
.photo-del {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; line-height: 1;
  border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 16px; padding: 0; cursor: pointer;
}
.photo-del:hover { background: var(--red); }
.photo-meta {
  font-size: 11px; color: var(--text-3); padding: 4px 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.photo-tip {
  font-size: 12px; color: var(--text-3); background: #f8fafc;
  border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px;
}

/* 大图预览（覆盖整屏） */
.pv-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(12,20,32,.92);
  display: flex; flex-direction: column;
}
.pv-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; color: #e6edf5; font-size: 13px;
}
.pv-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  position: relative; padding: 0 56px 24px;
}
.pv-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.pv-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 62px; border: none; border-radius: 8px;
  background: rgba(255,255,255,.16); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer;
}
.pv-nav:hover { background: rgba(255,255,255,.3); }
.pv-nav.left { left: 8px; }
.pv-nav.right { right: 8px; }

/* 报修页的现场照片格（/report.html 用） */
.photo-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-pick {
  position: relative; width: 78px; height: 78px; border-radius: 8px;
  border: 1px dashed var(--border); background: #f8fafc; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 22px; cursor: pointer;
}
.photo-pick img { width: 100%; height: 100%; object-fit: cover; }
.photo-pick .photo-del { top: 3px; right: 3px; width: 20px; height: 20px; font-size: 14px; }
@media (max-width: 720px) {
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .photo-cell img { height: 88px; }
  .pv-stage { padding: 0 12px 16px; }
  .pv-nav { display: none; }
}

/* ============================================================
 * 报表导出按钮组（第 5 批）：Excel / 图片 合成一个「分段按钮」
 * ============================================================ */
.exp-btns {
  display: inline-flex; align-items: stretch; vertical-align: middle;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  background: var(--card); flex-shrink: 0;
}
.exp-btns .btn {
  border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  margin: 0 !important; background: transparent; color: var(--primary);
  font-size: 12px; padding: 5px 10px; height: auto; line-height: 1.5;
}
.exp-btns .btn + .btn { border-left: 1px solid var(--border) !important; }
.exp-btns .btn:hover { background: var(--primary-light); }
.exp-btns .btn:active { background: #dceaf9; }
.exp-group {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}
@media (max-width: 720px) {
  .exp-group { justify-content: flex-start; }
  .exp-btns .btn { padding: 5px 9px; }
}

/* ============================================================
 * 第 8 批：多客户（当前客户条 / 客户列表 / 切换弹窗）
 * ========================================================== */
/* 顶部「当前客户」小胶囊：全站都按它取数，所以要一直看得见 */
.cur-client-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--primary-light); color: var(--primary-dark);
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.cur-client-chip:hover { border-color: var(--primary); }
.cur-client-chip .ccc-lb { font-weight: 400; color: var(--text-3); }
.cur-client-chip .ccc-arrow { color: var(--primary); font-size: 11px; }

/* 客户页的当前客户条 */
.cur-client-bar { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cur-client-bar .ccb-name { font-size: 18px; font-weight: 700; color: var(--text); }
.cur-client-bar .ccb-tag {
  font-size: 12px; color: var(--text-2); background: var(--bg);
  padding: 2px 8px; border-radius: 999px;
}
.chip-cur {
  margin-left: 6px; font-size: 11px; font-weight: 500; color: #fff;
  background: var(--primary); padding: 1px 6px; border-radius: 4px;
}
.card-note {
  margin-top: 12px; padding: 9px 12px; border-radius: 8px;
  background: var(--primary-light); color: var(--text-2); font-size: 12.5px; line-height: 1.75;
}
/* 切换客户弹窗里的可点条目 */
.cli-pick {
  display: block; width: 100%; text-align: left; cursor: pointer;
  padding: 11px 13px; margin-bottom: 8px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--card);
}
.cli-pick:hover { border-color: var(--primary); background: var(--primary-light); }
.cli-pick.on { border-color: var(--primary); background: var(--primary-light); }
.cli-pick .cp-name { display: block; font-weight: 600; font-size: 14px; color: var(--text); }
.cli-pick .cp-meta { display: block; font-size: 12px; color: var(--text-2); margin-top: 3px; }

/* 手机端：当前客户胶囊不抢标题的位置 */
@media (max-width: 720px) {
  .cur-client-chip { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
}

/* 新增报修表单：必填星号 */
.req { color: var(--red); font-weight: 700; margin-left: 2px; }

/* 备案号页脚（登录页 / 扫码报修页底部，工信部要求） */
.icp-foot {
  padding: 16px 0 26px; text-align: center;
  font-size: 12px; color: var(--text-3, #9aa9ba);
}
.icp-foot a { color: inherit; text-decoration: none; }
.icp-foot a:hover { color: var(--primary, #2f6fed); }
