/* ================= 走访与商机管理 =================
   移动端优先（手机浏览器为主），宽屏自动居中并限宽
   ===================================================================== */

:root {
  --cm-blue: #0a5cab;
  --cm-blue-light: #1a7ad4;
  --cm-blue-glow: #4a9ae8;
  --cm-blue-pale: #eef5fd;
  --blue: #0a5cab;
  --orange: #f29900;
  --green: #1a9e5f;
  --red: #e04a4a;

  --bg: #f2f4f7;
  --card: #ffffff;
  --line: #e6e9ef;
  --text-1: #1b2430;
  --text-2: #56616f;
  --text-3: #98a2b0;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 32, 56, .04), 0 4px 14px rgba(16, 32, 56, .05);
  --shadow-up: 0 -1px 0 var(--line);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* 内联 SVG 统一线性风格（防止个别位置缺样式渲染成黑块） */
svg { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text-1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", "Hiragino Sans GB", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
body { overscroll-behavior-y: none; }

.hidden { display: none !important; }

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

/* ================= 顶栏 ================= */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: linear-gradient(135deg, var(--cm-blue) 0%, var(--cm-blue-light) 100%);
  color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 13px) 16px 12px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(10, 92, 171, .22);
}
.topbar-left { min-width: 0; flex: 1; }
.topbar-title { font-size: 17.5px; font-weight: 600; letter-spacing: .5px; line-height: 1.3; }
.topbar-sub {
  font-size: 11.5px; opacity: .85; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.icon-btn {
  width: 34px; height: 34px; border: none; border-radius: 50%;
  background: rgba(255, 255, 255, .18); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .15s;
}
.icon-btn:active { background: rgba(255, 255, 255, .32); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .24);
  border: 1.5px solid rgba(255, 255, 255, .4);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; flex-shrink: 0;
}

/* ================= 内容区 ================= */
.content {
  flex: 1;
  padding: 12px 12px calc(76px + var(--safe-b));
  overflow-x: hidden;
}

/* ================= 底部导航 ================= */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  max-width: 560px; margin: 0 auto;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-up);
  display: flex;
  padding-bottom: var(--safe-b);
}
.tab {
  flex: 1; border: none; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 7px 0 6px;
  color: var(--text-3);
  cursor: pointer;
  transition: color .15s;
}
.tab-icon {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .18s;
}
.tab-icon svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.tab-label { font-size: 10.5px; margin-top: 2px; letter-spacing: -.2px; }
.tab.active { color: var(--cm-blue); font-weight: 600; }
.tab.active .tab-icon { transform: translateY(-1px) scale(1.08); }
.tab-icon-primary {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg, var(--cm-blue), var(--cm-blue-glow));
  color: #fff;
  box-shadow: 0 4px 12px rgba(10, 92, 171, .3);
  margin-top: -7px;
}
.tab-icon-primary svg { width: 21px; height: 21px; stroke-width: 2; }
.tab.active .tab-icon-primary { box-shadow: 0 6px 18px rgba(10, 92, 171, .42); }

/* ================= 卡片 ================= */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 12px;
  border-left: 3px solid var(--cm-blue);
}
.card-title {
  font-size: 15px; font-weight: 600; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.card-title .sub { font-size: 11.5px; font-weight: 400; color: var(--text-3); }

/* ================= 统计 ================= */
.stat-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 9px; margin-bottom: 12px;
}
.stat-box {
  background: var(--card); border-radius: var(--radius-sm);
  padding: 11px 10px; text-align: center;
  box-shadow: var(--shadow);
  border-top: 2px solid var(--cm-blue);
}
.stat-box.accent-green { border-top-color: var(--green); }
.stat-box.accent-orange { border-top-color: var(--orange); }
.stat-num {
  font-size: 20px; font-weight: 700; line-height: 1.2;
  color: var(--cm-blue);
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.stat-box.accent-green .stat-num { color: var(--green); }
.stat-box.accent-orange .stat-num { color: var(--orange); }
.stat-label { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.stat-extra { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

/* ================= 筛选条 ================= */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: var(--card); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.fb-label { font-size: 12px; color: var(--text-3); }
.fb-spacer { flex: 1; }
.filter-bar select, .filter-bar input {
  flex: 1; min-width: 96px; height: 32px;
  border: 1px solid var(--line); border-radius: 7px;
  padding: 0 8px; font-size: 12.5px; color: var(--text-1);
  background: #fafbfc; font-family: inherit;
}

/* ================= 列表项 ================= */
.list-item {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 13px 14px;
  margin-bottom: 10px;
  border-left: 3px solid var(--cm-blue);
  transition: transform .12s;
}
.list-item:active { transform: scale(.985); }
.visit-card { border-left-color: var(--green); }
.opp-card { border-left-color: var(--orange); }

.li-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.li-title { font-size: 15.5px; font-weight: 600; flex: 1; word-break: break-all; line-height: 1.45; }
.li-tags { display: flex; gap: 5px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

.li-meta {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  margin-top: 7px; font-size: 12px; color: var(--text-2);
}
.mi { display: inline-flex; align-items: center; gap: 4px; }
.mi svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.li-body {
  font-size: 13px; color: var(--text-2); margin-top: 8px;
  line-height: 1.65; word-break: break-word;
}
.li-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line);
}
.li-actions { display: flex; gap: 7px; }

/* ================= 标签 ================= */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 11px; line-height: 1.7; white-space: nowrap;
}
.tag-blue   { background: var(--cm-blue-pale); color: var(--cm-blue); }
.tag-green  { background: #e8f7ef; color: var(--green); }
.tag-orange { background: #fff4e0; color: #c77700; }
.tag-red    { background: #fdecec; color: var(--red); }
.tag-gray   { background: #f0f2f5; color: var(--text-2); }

/* ================= 商机提示条 ================= */
.opp-flag {
  margin-top: 9px; padding: 7px 10px;
  background: #fff8ea; border-left: 3px solid var(--orange);
  border-radius: 6px; font-size: 12.5px; color: #9a5b00; line-height: 1.6;
  display: flex; gap: 6px; align-items: flex-start;
}
.opp-flag svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; margin-top: 2px; }

/* ================= 快捷更新条 ================= */
.quick-bar {
  display: flex; align-items: flex-end; gap: 8px;
  margin-top: 11px; padding: 10px;
  background: var(--cm-blue-pale); border-radius: var(--radius-sm);
}
.quick-field { flex: 1; min-width: 0; }
.quick-label { display: block; font-size: 11px; color: var(--text-2); margin-bottom: 4px; }
.quick-select, .quick-input {
  width: 100%; height: 34px;
  border: 1px solid #d5e2f0; border-radius: 7px;
  padding: 0 8px; font-size: 13px; color: var(--text-1);
  background: #fff; font-family: inherit;
}
.quick-select { appearance: none; -webkit-appearance: none; padding-right: 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 5px center; background-size: 13px;
}

/* ================= 概率输入 ================= */
.prob-input { position: relative; display: inline-flex; align-items: center; }
.prob-input input {
  width: 100%; height: 44px;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 0 30px 0 12px; font-size: 15px; color: var(--text-1);
  background: #fafbfc; font-family: inherit;
}
.prob-input .prob-unit {
  position: absolute; right: 12px; font-size: 13px; color: var(--text-3); pointer-events: none;
}
.prob-input-sm input { height: 34px; font-size: 13px; padding: 0 26px 0 8px; }
.prob-input-sm .prob-unit { right: 9px; font-size: 12px; }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px; border-radius: 10px;
  font-size: 15px; font-weight: 500; letter-spacing: .5px;
  border: 1px solid transparent; cursor: pointer;
  transition: .15s; white-space: nowrap;
  font-family: inherit;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--cm-blue), var(--cm-blue-light)); color: #fff; box-shadow: 0 3px 10px rgba(10, 92, 171, .25); }
.btn-secondary { background: var(--cm-blue-pale); color: var(--cm-blue); }
.btn-ghost { background: #f2f4f7; color: var(--text-2); }
.btn-danger { background: #fdecec; color: var(--red); }
.btn-block { display: flex; width: 100%; margin-top: 4px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 7px; letter-spacing: 0; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }
.btn-row .btn { flex: 1; min-width: 88px; }

/* ================= 表单 ================= */
.form-group { margin-bottom: 15px; }
.form-group > label {
  display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500;
}
.req { color: var(--red); margin-left: 2px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; height: 44px;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 0 12px; font-size: 15px; color: var(--text-1);
  background: #fafbfc; font-family: inherit;
}
.form-group textarea { height: auto; min-height: 88px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--cm-blue-light); background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 92, 171, .08);
}
.form-group input:disabled { background: #f2f4f7; color: var(--text-3); }
.form-group select {
  appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398a2b0' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 15px;
}
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; min-width: 0; }
.hint { font-size: 11.5px; color: var(--text-3); margin-top: 6px; line-height: 1.6; }
/* 提示行内的线性图标：统一风格，避免浏览器默认填充成黑块 */
.hint svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* 单选组 */
.radio-group { display: flex; gap: 9px; flex-wrap: wrap; }
.radio-item {
  flex: 1; min-width: 76px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fafbfc; font-size: 14px; color: var(--text-2);
  cursor: pointer; transition: .15s;
}
.radio-item input { display: none; }
.radio-item:has(input:checked) {
  border-color: var(--cm-blue); background: var(--cm-blue-pale);
  color: var(--cm-blue); font-weight: 600;
}

/* ================= 打卡区 ================= */
.shot-zone {
  border: 2px dashed #c3d5e8; border-radius: var(--radius);
  background: linear-gradient(160deg, #f7fbff, #eef5fd);
  padding: 26px 16px; text-align: center; cursor: pointer;
  transition: .15s;
}
.shot-zone:active { background: #e5f0fb; border-color: var(--cm-blue-light); }
.shot-zone.has { padding: 16px; background: var(--cm-blue-pale); border-style: solid; border-color: var(--cm-blue-light); }
.sz-icon { font-size: 34px; line-height: 1.2; }
.sz-text { font-size: 15px; font-weight: 600; color: var(--cm-blue); margin-top: 8px; }
.sz-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* 定位状态条 */
.gps-bar {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 12.5px; margin-bottom: 12px;
  background: #f0f2f5; color: var(--text-2);
  border-left: 3px solid var(--text-3);
}
.gps-bar.loading { background: var(--cm-blue-pale); color: var(--cm-blue); border-left-color: var(--cm-blue-light); }
.gps-bar.ok { background: #e8f7ef; color: #147a48; border-left-color: var(--green); }
.gps-bar.fail { background: #fff4e0; color: #9a5b00; border-left-color: var(--orange); }
.gps-bar .gps-ico { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.gps-bar .gps-txt { flex: 1; min-width: 0; line-height: 1.5; }
.gps-bar .gps-refresh {
  border: none; background: rgba(10, 92, 171, .1); color: var(--cm-blue);
  font-size: 12px; padding: 4px 10px; border-radius: 6px; cursor: pointer;
  font-family: inherit; flex-shrink: 0;
}

/* 预览 */
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 11px; }
.preview-item { position: relative; aspect-ratio: 3/4; border-radius: 8px; overflow: hidden; background: #eef0f3; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-wm {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, .55); color: #fff;
  font-size: 9.5px; text-align: center; padding: 3px 0;
}
.preview-del {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff; border: none;
  font-size: 13px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* 提示框 */
.tip-box {
  background: var(--cm-blue-pale); border-radius: var(--radius-sm);
  padding: 11px 13px; margin-bottom: 12px;
  border-left: 3px solid var(--cm-blue-light);
}
.tip-title { font-size: 13px; font-weight: 600; color: var(--cm-blue); margin-bottom: 6px; }
.tip-list { margin: 0; padding-left: 20px; font-size: 12.5px; color: var(--text-2); line-height: 1.85; }
.tip-note { font-size: 11.5px; color: var(--text-3); margin-top: 7px; line-height: 1.6; }

/* ================= EXIF 信息 ================= */
.exif-box {
  background: #f7f9fb; border-radius: var(--radius-sm);
  padding: 9px 12px; margin-top: 9px;
}
.exif-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 12.5px; }
.exif-k { color: var(--text-3); flex-shrink: 0; }
.exif-v { color: var(--text-1); text-align: right; word-break: break-all; }

/* ================= 个人中心 ================= */
.profile-card {
  background: linear-gradient(135deg, var(--cm-blue) 0%, var(--cm-blue-light) 100%);
  border-radius: var(--radius); padding: 16px;
  display: flex; align-items: center; gap: 13px;
  color: #fff; margin-bottom: 12px;
  box-shadow: 0 4px 14px rgba(10, 92, 171, .22);
}
.profile-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .24);
  border: 2px solid rgba(255, 255, 255, .42);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 600; flex-shrink: 0;
}
.profile-info { min-width: 0; flex: 1; }
.profile-name { font-size: 17px; font-weight: 600; }
.profile-meta { font-size: 12px; opacity: .88; margin-top: 3px; }

.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.menu-item {
  background: var(--card); border-radius: var(--radius-sm);
  padding: 13px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 13.5px; color: var(--text-1);
  box-shadow: var(--shadow); cursor: pointer;
  border-left: 3px solid var(--cm-blue);
}
.menu-item:active { transform: scale(.98); }
.menu-item > span:first-child { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mi-icon { width: 17px; height: 17px; flex-shrink: 0; display: flex; }
.mi-icon svg { width: 17px; height: 17px; fill: none; stroke: var(--cm-blue); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.menu-arrow { color: var(--text-3); font-size: 17px; flex-shrink: 0; }

/* ================= 报表条形图 ================= */
.bar-row { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 12.5px; }
.bar-name { width: 60px; flex-shrink: 0; color: var(--text-2); }
.bar-track { flex: 1; height: 7px; background: #eef1f5; border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--cm-blue), var(--cm-blue-glow)); transition: width .4s; }
.bar-fill.fill-orange { background: linear-gradient(90deg, #f29900, #fbbc04); }
.bar-val { width: 48px; text-align: right; flex-shrink: 0; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ================= 空状态 ================= */
.empty { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 40px; opacity: .5; }
.empty-text { font-size: 15px; color: var(--text-2); margin-top: 10px; font-weight: 500; }
.empty-sub { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }

/* ================= 表格（管理后台） ================= */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
.tb th {
  text-align: left; padding: 9px 10px; background: #f7f9fb;
  color: var(--text-2); font-weight: 500; font-size: 12px;
  white-space: nowrap; border-bottom: 1px solid var(--line);
}
.tb td { padding: 10px; border-bottom: 1px solid #f0f2f5; vertical-align: middle; }
.tb tr:last-child td { border-bottom: none; }
.t-title { font-weight: 600; }
.t-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.t-num { font-variant-numeric: tabular-nums; }
.t-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ================= 弹层 ================= */
.modal-mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(12, 22, 38, .48);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .18s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 560px;
  background: #fff;
  border-radius: 18px 18px 0 0;
  max-height: 88vh;
  display: flex; flex-direction: column;
  animation: slideUp .24s cubic-bezier(.22, .9, .3, 1);
}
@keyframes slideUp { from { transform: translateY(24px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.modal-head {
  padding: 15px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 16px; font-weight: 600;
  padding-top: calc(15px + env(safe-area-inset-top, 0px));
}
.modal-close {
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: #f2f4f7; color: var(--text-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.modal-body { padding: 16px; overflow-y: auto; padding-bottom: calc(16px + var(--safe-b)); }

/* ================= 提示 / 加载 ================= */
.toast {
  position: fixed; left: 50%; bottom: calc(88px + var(--safe-b));
  transform: translateX(-50%);
  background: rgba(24, 34, 48, .93); color: #fff;
  padding: 11px 18px; border-radius: 10px;
  font-size: 13.5px; z-index: 200; max-width: 84vw; text-align: center;
  animation: toastIn .2s; line-height: 1.5;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.loading {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(255, 255, 255, .72);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  font-size: 13.5px; color: var(--text-2);
}
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid #dfe6ee; border-top-color: var(--cm-blue);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= 登录页 ================= */
.login-page {
  min-height: 100vh;
  background: linear-gradient(150deg, #0a5cab 0%, #1470c4 55%, #1a7ad4 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px 20px;
  position: relative; overflow: hidden;
}
.login-page::before {
  content: ''; position: absolute; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(255, 255, 255, .14) 0%, transparent 70%);
  top: -110px; right: -90px;
}
.login-page::after {
  content: ''; position: absolute; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, .1) 0%, transparent 70%);
  bottom: -90px; left: -70px;
}
.login-wrap { position: relative; z-index: 1; width: 100%; max-width: 380px; }
.login-brand { text-align: center; color: #fff; margin-bottom: 22px; }
.login-mark {
  width: 62px; height: 62px; margin: 0 auto 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  display: flex; align-items: center; justify-content: center;
}
.login-mark svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-brand-title { font-size: 21px; font-weight: 600; letter-spacing: 1.5px; }
.login-brand-sub { font-size: 12.5px; opacity: .82; margin-top: 6px; letter-spacing: 2px; }
.login-card {
  background: rgba(255, 255, 255, .97);
  border-radius: 18px; padding: 22px 20px 20px;
  box-shadow: 0 12px 40px rgba(6, 30, 62, .28);
}
.login-card .form-group input { background: #f7f9fb; }
.login-error { color: var(--red); font-size: 13px; min-height: 20px; margin-bottom: 8px; text-align: center; line-height: 1.5; }
.login-addr {
  background: var(--cm-blue-pale); border-radius: var(--radius-sm);
  padding: 9px 11px; margin-bottom: 10px;
  font-size: 12px; color: var(--cm-blue); line-height: 1.6; text-align: center;
  word-break: break-all;
}
.login-addr a { color: var(--cm-blue); font-weight: 600; }
.login-tip { font-size: 11.5px; color: var(--text-3); text-align: center; margin-top: 16px; line-height: 1.7; }

/* ================= 宽屏优化 ================= */
@media (min-width: 768px) {
  .app { box-shadow: 0 0 30px rgba(16, 32, 56, .07); }
  .content { padding-left: 16px; padding-right: 16px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .modal { border-radius: 16px; margin-bottom: 40px; max-height: 84vh; }
  .modal-mask { align-items: center; }
}
