/* ============================================================
   云sop · App 端样式
   设计口径与小程序保持一致（同一套色板与字号阶），
   差别只在适配：这里要处理全面屏安全区、WebView 的点击高亮、
   以及 320px 窄屏下的文字折行。
   ============================================================ */

:root {
  /* 主色：深海蓝。
     原来的 #1f6feb 偏"工具蓝"，看过就忘；这一版压深、加一点靛，
     白字压得住，也更像一家做财税的机构该有的样子。 */
  --c-primary: #1d4ed8;
  --c-primary-d: #12358f;
  --c-primary-l: #eef3ff;
  --c-ink: #0a1b36;

  --c-text: #14213a;
  --c-text-2: #46587a;
  --c-text-3: #7c8ca6;
  --c-text-4: #a3b0c4;

  --c-line: #e8edf5;
  --c-line-2: #f1f5fa;
  --c-bg: #f2f5fa;
  --c-card: #ffffff;

  --c-danger: #dc3b49;
  --c-danger-l: #fff1f2;
  --c-warn: #e08a00;
  --c-warn-l: #fff7ea;
  --c-ok: #0e9f6e;
  --c-ok-l: #e8f8f1;

  /* 金色只做点缀（分隔、徽记），大面积用会显俗 */
  --c-gold: #c9a86a;

  --r-card: 18px;
  --r-btn: 13px;
  --sh-card: 0 1px 2px rgba(13, 30, 60, .03), 0 14px 34px -26px rgba(13, 30, 60, .5);
  --sh-float: 0 26px 60px -28px rgba(9, 25, 55, .55);

  --nav-h: 52px;
  --tab-h: 60px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans CJK SC",
               "Source Han Sans SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { overflow: hidden; }

input, textarea, button { font-family: inherit; font-size: inherit; }
button { border: none; background: none; padding: 0; color: inherit; cursor: pointer; }
a { color: var(--c-primary); text-decoration: none; }

/* ------------------------------ 顶部栏 ------------------------------ */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + var(--safe-t));
  padding-top: var(--safe-t);
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  z-index: 200;
}

.navbar.dark {
  background: linear-gradient(180deg, var(--c-primary) 0%, var(--c-primary-d) 100%);
  border-bottom: none;
  color: #fff;
}

.nav-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.nav-left, .nav-right {
  min-width: 52px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 14px;
  color: var(--c-text-2);
}

.navbar.dark .nav-left, .navbar.dark .nav-right { color: rgba(255, 255, 255, .92); }
.nav-right { justify-content: flex-end; }

.nav-btn {
  font-size: 14px;
  color: inherit;
  padding: 6px 2px;
  white-space: nowrap;
}

.nav-back {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 15px;
}

.nav-back::before {
  content: '';
  width: 9px; height: 9px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-right: 6px;
  margin-top: -2px;
}

/* ------------------------------ 内容区 ------------------------------ */

.viewport {
  position: absolute;
  top: calc(var(--nav-h) + var(--safe-t));
  left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px calc(28px + var(--safe-b));
}

body.has-tab .viewport { bottom: calc(var(--tab-h) + var(--safe-b)); padding-bottom: 20px; }
body.no-nav .viewport { top: 0; padding-top: calc(24px + var(--safe-t)); }
/* 登录页自带大标题，再叠一条系统栏就变成两条标题 */
body.no-nav .navbar { display: none; }

/* ------------------------------ 底部导航 ------------------------------ */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: none;
  background: #fff;
  border-top: 1px solid var(--c-line);
  z-index: 190;
}

body.has-tab .tabbar { display: flex; }

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--c-text-3);
  padding-top: 6px;
}

.tab.on { color: var(--c-primary); font-weight: 600; }

.tab-ico {
  width: 23px; height: 23px;
  display: flex; align-items: center; justify-content: center;
}

.tab-ico svg { width: 23px; height: 23px; display: block; }

/* ------------------------------ 通用块 ------------------------------ */

.card {
  background: #fff;
  border-radius: 12px;
  padding: 4px 14px;
  margin-bottom: 12px;
}

.card.pad { padding: 14px; }
.card.flat { padding: 0; overflow: hidden; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.card-head .sub { font-size: 12px; color: var(--c-text-3); font-weight: 400; }
.card-head .link { font-size: 13px; color: var(--c-primary); font-weight: 400; }

.sec-title {
  font-size: 13px;
  color: var(--c-text-3);
  padding: 4px 4px 8px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--c-line);
}

.row:last-child { border-bottom: none; }
.row.tap:active { opacity: .6; }

.row-main { flex: 1; min-width: 0; }
/* 标题与说明必须各占一行：两者都是 inline 时会挤成「手机号 未绑定，换手机后…」 */
.row-title { display: block; font-size: 15px; color: var(--c-text); word-break: break-all; }
.row-desc { display: block; font-size: 12px; color: var(--c-text-3); margin-top: 3px; word-break: break-all; line-height: 1.55; }
.row-side { font-size: 13px; color: var(--c-text-3); flex-shrink: 0; }
.arrow::after {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-top: 1.5px solid #c8ccd4;
  border-right: 1.5px solid #c8ccd4;
  transform: rotate(45deg);
  margin-left: 8px;
  vertical-align: 1px;
}

.muted { color: var(--c-text-3); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.bold { font-weight: 600; }
.center { text-align: center; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }

.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--c-text-3);
}

.empty-title { font-size: 15px; color: var(--c-text-2); margin-bottom: 6px; }
.empty-desc { font-size: 12px; color: var(--c-text-4); line-height: 1.7; }

.sk { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.sk-line { height: 12px; border-radius: 6px; background: #f0f2f5; margin-bottom: 10px; }
.sk-line:last-child { margin-bottom: 0; }
.sk-line.w40 { width: 40%; }
.sk-line.w60 { width: 60%; }
.sk-line.w90 { width: 90%; }

/* ------------------------------ 按钮 ------------------------------ */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  background: #fff;
  color: var(--c-text-2);
  border: 1px solid #e2e4e9;
  transition: opacity .15s;
}

.btn:active { opacity: .75; }
.btn[disabled] { opacity: .45; }

.btn.primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

.btn.danger { background: var(--c-danger); color: #fff; border-color: var(--c-danger); }
.btn.ghost { background: #fff; color: var(--c-primary); border-color: #cddffb; }
.btn.sm { height: 34px; font-size: 13px; border-radius: 8px; width: auto; padding: 0 14px; }
.btn.block-sm { height: 38px; font-size: 14px; }
.btn + .btn { margin-top: 10px; }

.btn-row { display: flex; gap: 10px; }
.btn-row .btn { margin-top: 0; }

/* ------------------------------ 表单 ------------------------------ */

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--c-line);
}

.field:last-child { border-bottom: none; }
.field-col { display: block; padding: 13px 0; border-bottom: 1px solid var(--c-line); }
.field-label { width: 86px; flex-shrink: 0; font-size: 14px; color: var(--c-text-2); }

.input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--c-text);
  padding: 2px 0;
}

.input::placeholder { color: var(--c-text-4); }

textarea.input {
  width: 100%;
  min-height: 74px;
  resize: none;
  line-height: 1.6;
  border: 1px solid #e6e8ec;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 8px;
  font-size: 14px;
}

.code-btn {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--c-primary);
  border-left: 1px solid var(--c-line);
  padding-left: 12px;
  height: 22px;
  line-height: 22px;
}

.code-btn[disabled] { color: var(--c-text-4); }

.hint { font-size: 12px; color: var(--c-text-4); line-height: 1.65; margin-top: 8px; }

.switch {
  width: 44px; height: 26px;
  border-radius: 13px;
  background: #dcdfe6;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform .2s;
}

.switch.on { background: var(--c-primary); }
.switch.on::after { transform: translateX(18px); }

.checkbox {
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 1.5px solid #c8ccd4;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.checkbox.on { background: var(--c-primary); border-color: var(--c-primary); }
.checkbox.on::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

/* ------------------------------ 标签 ------------------------------ */

.tag {
  display: inline-block;
  font-size: 11px;
  line-height: 1.6;
  padding: 1px 7px;
  border-radius: 4px;
  background: #f2f3f5;
  color: var(--c-text-3);
  white-space: nowrap;
  vertical-align: 1px;
}

.tag.blue { background: var(--c-primary-l); color: var(--c-primary); }
.tag.red { background: var(--c-danger-l); color: var(--c-danger); }
.tag.green { background: var(--c-ok-l); color: var(--c-ok); }
.tag.orange { background: var(--c-warn-l); color: var(--c-warn); }
.tag.gray { background: #f2f3f5; color: var(--c-text-3); }

/* ------------------------------ 顶部渐变卡 ------------------------------ */

.hero {
  background: linear-gradient(150deg, #2b7cf0 0%, #1a5fd0 100%);
  border-radius: 14px;
  padding: 18px 18px 16px;
  color: #fff;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  right: -40px; top: -60px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}

.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-name { font-size: 19px; font-weight: 600; line-height: 1.35; }
.hero-sub { font-size: 12px; opacity: .82; margin-top: 5px; }
.hero-pct { font-size: 22px; font-weight: 600; line-height: 1.1; text-align: right; }
.hero-pct small { display: block; font-size: 11px; font-weight: 400; opacity: .8; margin-top: 2px; }

.bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .24);
  margin-top: 14px;
  overflow: hidden;
}

.bar-fill { height: 100%; background: #fff; border-radius: 3px; transition: width .4s ease; }

.hero-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: .85;
  margin-top: 8px;
}

/* ------------------------------ 当前环节 ------------------------------ */

.current {
  border: 1.5px solid #cfe0ff;
  background: linear-gradient(180deg, #f5f9ff 0%, #fff 60%);
}

.current.warn { border-color: #ffe0b2; background: linear-gradient(180deg, #fffaf0 0%, #fff 60%); }
.current.bad { border-color: #ffd6d6; background: linear-gradient(180deg, #fff6f6 0%, #fff 60%); }

.cur-kicker {
  font-size: 11px;
  color: var(--c-primary);
  font-weight: 600;
  letter-spacing: .5px;
}

.cur-kicker.warn { color: var(--c-warn); }
.cur-kicker.bad { color: var(--c-danger); }
.cur-name { font-size: 17px; font-weight: 600; margin-top: 5px; }
.cur-desc { font-size: 13px; color: var(--c-text-2); line-height: 1.65; margin-top: 6px; }

/* 上一环节留下的说明（如会计确认的方案与服务期）：客户要确认的内容必须先看见 */
.cur-note {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f7f8fa;
  border-left: 3px solid var(--c-primary);
  border-radius: 6px;
  font-size: 13px;
  color: var(--c-text-2);
  line-height: 1.65;
  word-break: break-word;
}

.cur-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* ------------------------------ 步骤时间线 ------------------------------ */

.steps { padding: 4px 0 2px; }

.step {
  display: flex;
  gap: 11px;
  position: relative;
  padding-bottom: 16px;
}

.step:last-child { padding-bottom: 2px; }

.step-dot {
  width: 15px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding-top: 3px;
  position: relative;
}

.step-dot i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #d8dce3;
  display: block;
  position: relative;
  z-index: 1;
}

.step-dot::before {
  content: '';
  position: absolute;
  top: 15px; bottom: -16px;
  left: 50%;
  width: 1px;
  background: #e8eaee;
  transform: translateX(-50%);
}

.step:last-child .step-dot::before { display: none; }

.step.done .step-dot i { background: var(--c-ok); }
.step.active .step-dot i { background: var(--c-primary); box-shadow: 0 0 0 3px rgba(31, 111, 235, .16); }
.step.reopened .step-dot i { background: var(--c-danger); }
.step.skip .step-dot i { background: #c8ccd4; }

.step-body { flex: 1; min-width: 0; padding-bottom: 2px; }
.step-name { font-size: 14px; color: var(--c-text); line-height: 1.45; }
.step.pending .step-name { color: var(--c-text-4); }
.step-meta { font-size: 12px; color: var(--c-text-3); margin-top: 3px; line-height: 1.5; }

/* ------------------------------ 清单 ------------------------------ */

.ck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 10px;
}

.ck-bar {
  height: 5px;
  border-radius: 3px;
  background: #eef0f3;
  overflow: hidden;
  margin-bottom: 4px;
}

.ck-bar span { display: block; height: 100%; background: var(--c-ok); border-radius: 3px; transition: width .3s; }

.ck-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--c-line);
}

.ck-item:last-child { border-bottom: none; }
.ck-name { flex: 1; font-size: 14px; min-width: 0; word-break: break-all; }
.ck-name.done { color: var(--c-text-3); }
.ck-state { font-size: 12px; color: var(--c-text-4); flex-shrink: 0; }
.ck-state.on { color: var(--c-ok); }
.ck-state.bad { color: var(--c-danger); }
.ck-item.checkable:active { opacity: .6; }

/* ------------------------------ 附件 ------------------------------ */

.file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--c-line);
}

.file:last-child { border-bottom: none; }

.file-badge {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--c-primary-l);
  color: var(--c-primary);
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-badge.img { background: #eaf7ef; color: var(--c-ok); }
.file-badge.zip { background: #fff8ec; color: var(--c-warn); }
.file-badge.pdf { background: #fff1f0; color: var(--c-danger); }

.file-main { flex: 1; min-width: 0; }
.file-name {
  display: -webkit-box;
  font-size: 14px;
  word-break: break-all;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.file-meta { display: block; font-size: 11px; color: var(--c-text-4); margin-top: 3px; line-height: 1.5; }
.file-del { font-size: 12px; color: var(--c-text-3); padding: 6px 0 6px 10px; flex-shrink: 0; }

/* ------------------------------ 提示条 ------------------------------ */

.notice {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.notice .ico { flex-shrink: 0; font-size: 14px; line-height: 1.5; }
.notice.info { background: var(--c-primary-l); color: #1a5fd0; }
.notice.warn { background: var(--c-warn-l); color: #9a5b00; }
.notice.bad { background: var(--c-danger-l); color: #b3353f; }
.notice.ok { background: var(--c-ok-l); color: #0d7a3d; }

/* ------------------------------ 上传进度 ------------------------------ */

.uploding {
  position: fixed;
  left: 14px; right: 14px;
  bottom: calc(20px + var(--safe-b) + var(--tab-h));
  background: rgba(31, 35, 41, .93);
  color: #fff;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  z-index: 400;
  display: none;
  align-items: center;
  gap: 10px;
}

.uploding.on { display: flex; }
.uploding .spin {
  width: 15px; height: 15px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ 启动页 ------------------------------ */

/* 只在等地址探测时出现，最多 1.2 秒；用同色背景铺满，避免白屏闪一下 */
.splash {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 90;
}

.splash-logo {
  width: 62px; height: 62px;
  border-radius: 16px;
  background: linear-gradient(150deg, #2b7cf0, #1a5fd0);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(31, 111, 235, .28);
}

.splash-text {
  margin-top: 16px;
  font-size: 13px;
  color: var(--c-text-3);
}

/* ------------------------------ 登录页 ------------------------------ */

.login-wrap { padding: 0 4px; }

.login-logo {
  width: 62px; height: 62px;
  border-radius: 16px;
  background: linear-gradient(150deg, #2b7cf0, #1a5fd0);
  color: #fff;
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 34px auto 16px;
  box-shadow: 0 8px 20px rgba(31, 111, 235, .28);
}

.login-title { text-align: center; font-size: 20px; font-weight: 600; }
.login-sub { text-align: center; font-size: 13px; color: var(--c-text-3); margin-top: 7px; line-height: 1.6; }

/* 员工入口说明：会计/主管和小程序是同一套账号，不另开一个 App。
   用户第一次找不到"会计端"就是因为这句没写。 */
.login-tip {
  margin: 14px auto 0;
  max-width: 300px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--c-primary-l);
  color: #2c5aa0;
  font-size: 11.5px;
  line-height: 1.65;
  text-align: center;
}

.seg {
  display: flex;
  background: #eef0f3;
  border-radius: 9px;
  padding: 3px;
  margin: 26px 0 4px;
}

.seg-item {
  flex: 1;
  height: 34px;
  border-radius: 7px;
  font-size: 14px;
  color: var(--c-text-2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.seg-item.on {
  background: #fff;
  color: var(--c-text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--c-text-3);
  line-height: 1.6;
}

.agree a { color: var(--c-primary); }

.login-foot {
  margin-top: 26px;
  text-align: center;
  font-size: 12px;
  color: var(--c-text-4);
  display: flex;
  gap: 16px;
  justify-content: center;
}

.login-foot button { font-size: 12px; color: var(--c-text-3); }

.dev-list { margin-top: 6px; }

.dev-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--c-line);
  font-size: 14px;
}

.dev-item:last-child { border-bottom: none; }
.dev-item .who { flex: 1; min-width: 0; }
.dev-item .go { font-size: 12px; color: var(--c-primary); flex-shrink: 0; }

/* ------------------------------ 服务器设置 ------------------------------ */

.srv-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.srv-input {
  flex: 1;
  height: 42px;
  border: 1px solid #e2e4e9;
  border-radius: 9px;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
  min-width: 0;
}

.srv-input:focus { border-color: var(--c-primary); }

.srv-state { font-size: 12px; margin-top: 8px; }
.srv-state.ok { color: var(--c-ok); }
.srv-state.bad { color: var(--c-danger); }

/* ------------------------------ 员工端 ------------------------------ */

.stat-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.stat {
  flex: 1;
  background: #fff;
  border-radius: 11px;
  padding: 12px 12px 11px;
}

.stat-num { font-size: 21px; font-weight: 600; line-height: 1.15; }
.stat-label { font-size: 11px; color: var(--c-text-3); margin-top: 3px; }
.stat.alert .stat-num { color: var(--c-danger); }

.client {
  display: flex;
  /* 首行对齐而不是整体居中：三行内容时居中的头像会浮在半空，
     和上面的名字对不上，扫读时眼睛要来回跳 */
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--c-line);
}

.client:last-child { border-bottom: none; }
.client:active { opacity: .6; }

.client-ring {
  width: 42px; height: 42px;
  margin-top: 1px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  position: relative;
  background: #f2f4f7;
  color: var(--c-text-2);
}

.client-ring.hot { background: var(--c-primary-l); color: var(--c-primary); }
.client-ring.bad { background: var(--c-danger-l); color: var(--c-danger); }
.client-ring.done { background: var(--c-ok-l); color: var(--c-ok); }

.client-main { flex: 1; min-width: 0; }
.client-name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-sub { font-size: 12px; color: var(--c-text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.client-tags { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }

/* ------------------------------ 头像 ------------------------------ */

.avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(150deg, #4f8ef7, #1f6feb);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.avatar.gray { background: #e8eaee; color: var(--c-text-3); }

/* ------------------------------ 邀请码 ------------------------------ */

.code-box {
  background: linear-gradient(150deg, #f5f9ff, #eef4ff);
  border: 1px dashed #b9d2fb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  margin-top: 12px;
}

.code-text {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--c-primary);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.code-hint { font-size: 12px; color: var(--c-text-3); margin-top: 8px; line-height: 1.6; }

/* ------------------------------ 遮罩与弹层 ------------------------------ */

.mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s;
  z-index: 900;
}

.mask.on { opacity: 1; visibility: visible; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  transform: translateY(100%);
  transition: transform .24s cubic-bezier(.32, .72, 0, 1);
  z-index: 1000;
  padding-bottom: var(--safe-b);
}

.sheet.on { transform: translateY(0); }

.dlg {
  background: #fff;
  border-radius: 14px;
  margin: 0 26px;
  margin-bottom: max(26px, 8vh);
  overflow: hidden;
}

.dlg-body { padding: 22px 20px 18px; }
.dlg-title { font-size: 16px; font-weight: 600; text-align: center; margin-bottom: 8px; }
.dlg-text { font-size: 14px; color: var(--c-text-2); line-height: 1.7; }

.dlg-input {
  width: 100%;
  border: 1px solid #e2e4e9;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  margin-top: 12px;
  resize: none;
  line-height: 1.6;
  min-height: 42px;
}

.dlg-input:focus { border-color: var(--c-primary); }

.dlg-actions {
  display: flex;
  border-top: 1px solid var(--c-line);
}

.dlg-actions .dlg-btn {
  flex: 1;
  height: 48px;
  font-size: 16px;
  color: var(--c-text-2);
  border-right: 1px solid var(--c-line);
}

.dlg-actions .dlg-btn:last-child { border-right: none; }
.dlg-actions .dlg-btn.primary { color: var(--c-primary); font-weight: 600; }
.dlg-actions .dlg-btn.danger { color: var(--c-danger); }
.dlg-actions.one .dlg-btn { border-right: none; }

.sheet-head {
  background: #fff;
  border-radius: 12px 12px 0 0;
  padding: 14px 16px;
  font-size: 12px;
  color: var(--c-text-3);
  text-align: center;
  border-bottom: 1px solid var(--c-line);
}

.sheet-list { background: #fff; max-height: 62vh; overflow-y: auto; }

.sheet-item {
  display: block;
  width: 100%;
  height: 50px;
  font-size: 16px;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-line);
  text-align: center;
}

.sheet-list .sheet-item:last-child { border-bottom: none; }
.sheet-item:active { background: #f5f6f8; }
.sheet-item.danger { color: var(--c-danger); }

.sheet-cancel {
  margin-top: 8px;
  background: #fff;
  color: var(--c-text-2);
  border-bottom: none;
}

/* ------------------------------ 轻提示 ------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(.94);
  background: rgba(0, 0, 0, .78);
  color: #fff;
  font-size: 14px;
  line-height: 1.5;
  padding: 11px 18px;
  border-radius: 9px;
  max-width: 76vw;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s, transform .18s;
  z-index: 1100;
  word-break: break-all;
}

.toast.on { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }

.loading {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, .76);
  color: #fff;
  border-radius: 10px;
  padding: 18px 22px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1050;
  min-width: 100px;
}

.loading.on { display: flex; }
.loading em { font-size: 13px; font-style: normal; }

.spinner {
  width: 24px; height: 24px;
  border: 2.5px solid rgba(255, 255, 255, .28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

/* ------------------------------ 图片预览 ------------------------------ */

.viewer {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
}

.viewer.on { display: flex; }
.viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }

.viewer-close {
  position: absolute;
  top: calc(14px + var(--safe-t));
  right: 16px;
  color: #fff;
  font-size: 26px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
}

/* ------------------------------ 窄屏适配 ------------------------------ */

@media (max-width: 340px) {
  body { font-size: 14px; }
  .hero-name { font-size: 17px; }
  .field-label { width: 74px; }
  .dlg { margin: 0 16px; }
  .stat-num { font-size: 19px; }
}

/* ================= 管理台（管理员在 App 内） ================= */

.admin-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.admin-stat .cell { background: #fff; border-radius: 12px; padding: 14px; }
.admin-stat .n { font-size: 23px; font-weight: 600; line-height: 1.1; }
.admin-stat .n.warn { color: var(--c-danger); }
.admin-stat .l { font-size: 12px; color: var(--c-text-3); margin-top: 4px; }

.pbar { height: 6px; background: #eef1f5; border-radius: 3px; overflow: hidden; margin: 9px 0 5px; }
.pbar i { display: block; height: 100%; background: var(--c-primary); border-radius: 3px; }
.pbar i.late { background: var(--c-danger); }

/* 客户卡片里的登录账号行：账号 + 状态 + 三个小操作，一行放得下 */
.cl-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.cl-line:last-child { margin-bottom: 0; }
.cl-user { font-size: 13.5px; font-weight: 600; letter-spacing: .3px; word-break: break-all; }
.cl-acts { display: flex; gap: 6px; margin-left: auto; }
.cl-acts button {
  font-size: 11.5px; color: var(--c-text-2); background: #f4f6fa;
  border: 0; border-radius: 6px; padding: 4px 8px; line-height: 1.2;
}
.cl-acts button:active { background: #e8ecf3; }

.lic-thumb { width: 100%; border-radius: 10px; margin-top: 10px; display: block; background: #f2f4f7; }

/* 底部弹层：管理台的分配 / 建号 / 凭证展示都用它 */
.admin-sheet { position: fixed; inset: 0; z-index: 90; display: none; }
.admin-sheet.on { display: block; }
.admin-sheet .mask2 { position: absolute; inset: 0; background: rgba(10, 15, 25, .45); }
.admin-sheet .panel {
  position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
  border-radius: 16px 16px 0 0; padding: 16px 16px calc(18px + var(--safe-b));
  max-height: 84vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.admin-sheet .panel h3 { margin: 0 0 6px; font-size: 16.5px; font-weight: 600; }
.admin-sheet .sub { font-size: 12.5px; color: var(--c-text-3); line-height: 1.65; margin-bottom: 12px; }
.admin-sheet .acts { display: flex; gap: 10px; margin-top: 16px; }
.admin-sheet .acts .btn { flex: 1; }

.cred-box { background: #f7f9fc; border: 1px dashed #d3dae5; border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.cred-box .line { display: flex; gap: 10px; align-items: baseline; margin-bottom: 9px; }
.cred-box .line:last-child { margin-bottom: 0; }
.cred-box .k { flex: 0 0 44px; font-size: 12px; color: var(--c-text-3); }
.cred-box .v { flex: 1; font-size: 17px; font-weight: 600; letter-spacing: .5px; word-break: break-all; }

.pick-row { display: flex; align-items: center; gap: 10px; padding: 13px 2px; border-bottom: 1px solid #f2f4f7; }
.pick-row:last-child { border-bottom: 0; }
.pick-row .box { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #d3d8e0; flex: 0 0 auto; }
.pick-row .box.on { background: var(--c-primary); border-color: var(--c-primary); position: relative; }
.pick-row .box.on::after {
  content: ''; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.pick-row .who { flex: 1; min-width: 0; }
.pick-row .who .t { font-size: 14px; }
.pick-row .who .d { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }

/* 管理台的键值行：标签与值同行，值可以换行 */
.kv { display: flex; gap: 10px; font-size: 13px; margin-bottom: 7px; line-height: 1.55; }
.kv b { flex: 0 0 68px; font-weight: 400; color: var(--c-text-3); }
.kv > div { flex: 1; min-width: 0; word-break: break-all; color: var(--c-text); }

.pick-row .who .t, .pick-row .who .d { display: block; }

/* ============================================================
   客户 ↔ 会计 · 问答面板
   全屏、气泡、底部输入，对齐微信的肌肉记忆。
   ============================================================ */

.chat-mask {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  background: rgba(15, 18, 22, .32);
}

.chat-mask.on { display: block; }

.chat-panel {
  position: absolute;
  inset: 0;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-t);
}

.chat-head {
  flex: 0 0 auto;
  height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-bottom: 1px solid var(--c-line);
}

.chat-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; }
.chat-sub { display: block; font-size: 12px; font-weight: 400; color: var(--c-text-3); margin-top: 1px; }
.chat-close {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1; color: var(--c-text-3);
}

.chat-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 14px 18px;
}

.chat-empty {
  text-align: center;
  color: var(--c-text-3);
  font-size: 13px;
  line-height: 1.9;
  padding: 40px 20px;
}

.msg { margin-bottom: 14px; display: flex; flex-direction: column; align-items: flex-start; }
.msg.mine { align-items: flex-end; }

.msg-who { font-size: 11px; color: var(--c-text-3); margin-bottom: 4px; padding: 0 2px; }
.msg-time { margin-left: 6px; }

.msg-bubble {
  max-width: 78%;
  padding: 9px 12px;
  border-radius: 12px;
  border-top-left-radius: 4px;
  background: #fff;
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text);
  word-break: break-word;
  white-space: normal;
}

.msg.mine .msg-bubble {
  background: var(--c-primary);
  color: #fff;
  border-top-left-radius: 12px;
  border-top-right-radius: 4px;
}

.chat-foot {
  flex: 0 0 auto;
  background: #fff;
  border-top: 1px solid var(--c-line);
  padding: 10px 12px calc(10px + var(--safe-b));
}

.chat-input {
  width: 100%;
  min-height: 40px;
  max-height: 120px;
  padding: 9px 10px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  background: #f7f8fa;
  font-size: 14px;
  line-height: 1.5;
  resize: none;
  outline: none;
}

.chat-input:focus { border-color: var(--c-primary); background: #fff; }

.chat-foot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  gap: 10px;
}

.chat-send { min-width: 84px; }
.chat-send:disabled { opacity: .45; }

/* 首页/详情页上的入口卡：一行标题 + 一行最后一条消息 */
/* 按钮在 .btn 里是 width:100%，放进这一行 flex 会把自己的 100% 当基准宽度，
   挤到标题只剩一个字宽（标题被压成竖排）。这里显式给按钮定宽 + 不许被压 */
.chat-entry { display: flex; align-items: center; gap: 10px; }
.chat-entry .btn { width: auto; flex: 0 0 auto; min-width: 84px; }
.chat-entry .ce-main { flex: 1; min-width: 0; }
.chat-entry .ce-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.chat-entry .ce-last {
  font-size: 12px; color: var(--c-text-3); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-entry .ce-badge {
  flex: 0 0 auto;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: var(--c-danger);
  color: #fff;
  font-size: 11px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ------------------------------ 服务日志 ------------------------------ */

/* 时间范围 chips。分段控件 seg 已经占满一行，第二行用胶囊更轻，
   也便于以后加「自定义」而不动布局 */
.chips { display: flex; gap: 8px; padding: 2px 0 2px; }

.chip {
  height: 30px;
  padding: 0 13px;
  border-radius: 15px;
  background: #f2f3f5;
  color: var(--c-text-2);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
}

.chip.on { background: var(--c-primary-l); color: var(--c-primary); font-weight: 600; }

.log-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  margin-top: 10px;
  border-radius: 9px;
  background: #f2f3f5;
}

.log-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--c-text);
}

.log-search input::placeholder { color: var(--c-text-4); }
/* 去掉 iOS/Chrome 给 type=search 自带的白底与圆角，否则和灰底对不上 */
.log-search input[type="search"] { -webkit-appearance: none; appearance: none; }

.log-day {
  font-size: 12px;
  color: var(--c-text-3);
  font-weight: 600;
  padding: 10px 4px 6px;
}

.log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--c-line);
}

.log-item:last-child { border-bottom: none; }

.log-time {
  width: 36px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--c-text-4);
  padding-top: 2px;
}

.log-main { flex: 1; min-width: 0; }
.log-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.log-target {
  font-size: 14px;
  color: var(--c-text);
  word-break: break-all;
  line-height: 1.45;
}

.log-detail {
  display: block;
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 3px;
  line-height: 1.55;
  word-break: break-all;
}

.log-side {
  flex-shrink: 0;
  max-width: 78px;
  text-align: right;
  font-size: 11px;
  color: var(--c-text-4);
  line-height: 1.5;
  word-break: break-all;
}

/* ------------------------------ 资料清单开关 ------------------------------ */

/* 开关右侧那一列，标题 + 副标题（来源文案 / 手动确认说明） */
.ck-main { flex: 1; min-width: 0; }

.ck-sub {
  display: block;
  font-size: 12px;
  color: var(--c-text-3);
  margin-top: 3px;
  line-height: 1.5;
  word-break: break-all;
}

/* 「开 = 缺失」的开关用红色：桌面端、小程序端都是 #e34d59，
   三端同一件事必须同一种观感，否则会计会以为是两种含义。
   只加在 .bad 上（缺失态），默认的 .switch.on 蓝色留给别的开关（如「客户可见」）。 */
.switch.bad.on { background: #e34d59; }

/* ============================================================
   视觉规范 v2（2026-11）

   这一层只做「观感」，不改任何结构类名：页面 JS 一行没动，
   老规则全部保留在上面，这里按需覆盖。
   三件事：
     1. 曲面：卡片 18px、按钮 13px，统一圆角语言
     2. 光影：一层贴边细线 + 一层很淡的落影，卡片"浮"在灰底上
     3. 主次：标题压深、说明提浅，数字用等宽字形对齐
   ============================================================ */

/* ------------------------------ 顶栏 ------------------------------ */

.navbar {
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(16, 32, 64, .06);
}

.nav-title {
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: .3px;
  color: var(--c-ink);
}

.navbar.dark .nav-title { color: #fff; }

/* 顶栏只有返回箭头时，给它一点点击余量，别贴着屏幕边 */
.nav-back { font-weight: 500; }

/* ------------------------------ 底栏 ------------------------------ */

.tabbar {
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid rgba(16, 32, 64, .06);
  box-shadow: 0 -10px 28px -24px rgba(13, 30, 60, .7);
}

.tab {
  gap: 3px;
  padding-top: 7px;
  font-size: 10.5px;
  letter-spacing: .3px;
}

/* 选中态不再只是"字变蓝"，图标下面垫一层淡蓝药丸 —— 
   拇指盖住半屏时，眼睛也能一眼扫到自己在哪一栏 */
.tab-ico {
  width: 46px;
  height: 26px;
  border-radius: 9px;
  transition: background .18s ease;
}

.tab-ico svg { width: 22px; height: 22px; }
.tab.on .tab-ico { background: var(--c-primary-l); }
.tab.on { font-weight: 600; }

/* ------------------------------ 卡片 ------------------------------ */

.card {
  border-radius: var(--r-card);
  padding: 6px 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(16, 32, 64, .045);
  box-shadow: var(--sh-card);
}

.card.pad { padding: 18px; }

.card-head {
  padding: 16px 0 12px;
  font-size: 15.5px;
  font-weight: 650;
  letter-spacing: .2px;
  color: var(--c-ink);
}

.card-head .sub { font-size: 12px; font-weight: 400; color: var(--c-text-3); letter-spacing: 0; }
.card-head .link { font-weight: 500; }

/* 小标题做成"标签"的语法：小、散、带一点字距，扫读时不会跟正文抢 */
.sec-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--c-text-3);
  padding: 8px 4px 10px;
}

.row { padding: 15px 0; }
.row-title { font-weight: 500; }
.row-desc { margin-top: 4px; }

.arrow::after { border-color: #b9c4d6; }

/* 骨架屏：灰块带一层微光，等数据时页面不像"坏了" */
.sk { border-radius: var(--r-card); box-shadow: var(--sh-card); }
.sk-line {
  background: linear-gradient(90deg, #eef2f8 25%, #f7f9fc 37%, #eef2f8 63%);
  background-size: 400% 100%;
  animation: sk-shine 1.4s ease infinite;
}

@keyframes sk-shine {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ------------------------------ 按钮 ------------------------------ */

.btn {
  height: 48px;
  border-radius: var(--r-btn);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: .5px;
  border: 1px solid rgba(16, 32, 64, .1);
  transition: transform .12s ease, opacity .15s ease, box-shadow .2s ease;
}

.btn.primary {
  background: linear-gradient(180deg, #2e66f0 0%, #1d4ed8 100%);
  border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(29, 78, 216, .85);
}

.btn.primary:active {
  transform: translateY(1px);
  box-shadow: 0 4px 12px -8px rgba(29, 78, 216, .8);
}

.btn.danger {
  background: linear-gradient(180deg, #ef5a66 0%, #dc3b49 100%);
  border-color: transparent;
  box-shadow: 0 10px 22px -12px rgba(220, 59, 73, .7);
}

.btn.ghost {
  background: var(--c-primary-l);
  border-color: transparent;
  color: var(--c-primary);
  font-weight: 600;
}

.btn.sm { height: 34px; border-radius: 10px; padding: 0 16px; font-size: 13px; }
.btn.block-sm { height: 40px; font-size: 14px; border-radius: 11px; }
.btn-row .btn { letter-spacing: .3px; }

/* ------------------------------ 表单 ------------------------------ */

.field { padding: 15px 0; }
.field-label { font-size: 13.5px; color: var(--c-text-3); letter-spacing: .2px; }
.input { font-size: 15.5px; font-weight: 500; }

textarea.input,
.dlg-input,
.srv-input {
  background: #f5f7fb;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background .16s ease, box-shadow .16s ease, border-color .16s ease;
}

textarea.input:focus,
.dlg-input:focus,
.srv-input:focus {
  background: #fff;
  border-color: rgba(29, 78, 216, .45);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .1);
}

.hint { line-height: 1.7; }

.switch {
  width: 46px;
  height: 27px;
  border-radius: 14px;
  background: #dfe5ee;
}

.switch::after {
  width: 21px;
  height: 21px;
  top: 3px;
  left: 3px;
  box-shadow: 0 1px 3px rgba(13, 30, 60, .22);
}

.switch.on::after { transform: translateX(19px); }
.switch.bad.on { background: var(--c-danger); }

/* ------------------------------ 标签 ------------------------------ */

.tag {
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2px;
}

/* ------------------------------ 首页主卡 ------------------------------ */

.hero {
  border-radius: 22px;
  padding: 22px 20px 18px;
  margin-bottom: 14px;
  background:
    radial-gradient(110% 85% at 100% 0%, rgba(96, 165, 250, .55) 0%, rgba(96, 165, 250, 0) 58%),
    linear-gradient(135deg, #0b2a66 0%, #1445b8 58%, #2563eb 100%);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 20px 44px -26px rgba(11, 42, 102, .9);
}

.hero::after {
  right: -70px;
  top: -90px;
  width: 230px;
  height: 230px;
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 68%);
}

.hero-name {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: .4px;
  line-height: 1.35;
}

.hero-sub { font-size: 12.5px; opacity: .78; margin-top: 6px; letter-spacing: .3px; }

.hero-pct {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.hero-pct small { font-size: 11.5px; letter-spacing: .2px; opacity: .78; }

.bar {
  height: 7px;
  border-radius: 4px;
  margin-top: 18px;
  background: rgba(255, 255, 255, .18);
}

.bar-fill {
  border-radius: 4px;
  background: linear-gradient(90deg, #93c5fd 0%, #ffffff 100%);
  box-shadow: 0 0 12px rgba(147, 197, 253, .75);
}

.hero-foot { font-size: 12px; opacity: .78; margin-top: 10px; letter-spacing: .2px; }

/* ------------------------------ 当前环节 ------------------------------ */

.current {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(29, 78, 216, .14);
  background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 48%);
}

.current::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #2e66f0, #1d4ed8);
}

.current.warn { border-color: rgba(224, 138, 0, .2); }
.current.warn::before { background: linear-gradient(180deg, #ffb020, #e08a00); }
.current.bad { border-color: rgba(220, 59, 73, .2); }
.current.bad::before { background: linear-gradient(180deg, #f26d78, #dc3b49); }

.cur-kicker {
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 700;
}

.cur-name {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: .3px;
  margin-top: 7px;
  color: var(--c-ink);
}

.cur-desc { font-size: 13.5px; line-height: 1.7; }

.cur-note {
  background: #f5f8fd;
  border-left: 2px solid var(--c-primary);
  border-radius: 0 10px 10px 0;
  padding: 11px 13px;
}

/* ------------------------------ 时间线 ------------------------------ */

.step { gap: 13px; padding-bottom: 18px; }

.step-dot i { width: 10px; height: 10px; }

.step-dot::before {
  width: 2px;
  top: 17px;
  bottom: -18px;
  background: #e9eef6;
}

.step.active .step-dot i { box-shadow: 0 0 0 4px rgba(29, 78, 216, .14); }
.step.done .step-dot i { box-shadow: 0 0 0 4px rgba(14, 159, 110, .1); }
.step-name { font-size: 14.5px; }
.step-meta { margin-top: 4px; }

/* ------------------------------ 清单 / 附件 ------------------------------ */

.ck-bar { height: 6px; border-radius: 4px; }
.ck-bar span { border-radius: 4px; background: linear-gradient(90deg, #34d399, #0e9f6e); }
.ck-item { padding: 13px 0; }
.file { padding: 13px 0; }
.file-badge { width: 38px; height: 38px; border-radius: 11px; font-size: 11.5px; }

/* ------------------------------ 统计卡 ------------------------------ */

.stat {
  border-radius: 16px;
  padding: 14px 14px 13px;
  border: 1px solid rgba(16, 32, 64, .045);
  box-shadow: var(--sh-card);
}

.stat-num {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  color: var(--c-ink);
}

.stat-label { font-size: 11.5px; margin-top: 4px; letter-spacing: .2px; }
.stat.alert .stat-num { color: var(--c-danger); }

/* ------------------------------ 客户行 ------------------------------ */

.client { padding: 15px 0; gap: 13px; }
.client:active { opacity: .55; }

.client-ring {
  width: 44px;
  height: 44px;
  font-size: 12.5px;
  font-weight: 700;
  background: linear-gradient(180deg, #f6f8fc, #eef2f8);
  border: 1px solid rgba(16, 32, 64, .04);
}

.client-ring.hot { background: var(--c-primary-l); border-color: rgba(29, 78, 216, .12); }
.client-ring.bad { background: var(--c-danger-l); border-color: rgba(220, 59, 73, .12); }
.client-ring.done { background: var(--c-ok-l); border-color: rgba(14, 159, 110, .12); }

.client-name { font-weight: 600; letter-spacing: .2px; }
.client-sub { margin-top: 4px; }

.avatar {
  background: linear-gradient(150deg, #4f7ef7, #1d4ed8);
  box-shadow: 0 8px 18px -12px rgba(29, 78, 216, .8);
}

.avatar.gray { background: #e9eef6; box-shadow: none; }

/* ------------------------------ 分段 / 胶囊 ------------------------------ */

.seg { background: #edf1f8; border-radius: 12px; padding: 4px; }
.seg-item { height: 36px; border-radius: 9px; font-size: 14px; }
.seg-item.on { box-shadow: 0 2px 8px -4px rgba(13, 30, 60, .35); font-weight: 650; }
.chip { height: 32px; border-radius: 16px; background: #edf1f8; font-size: 13px; }
.chip.on { background: var(--c-primary); color: #fff; font-weight: 600; box-shadow: 0 8px 16px -10px rgba(29, 78, 216, .9); }

/* ------------------------------ 提示条 ------------------------------ */

.notice {
  border-radius: 12px;
  padding: 12px 14px;
  border-left: 3px solid transparent;
}

.notice.info { background: var(--c-primary-l); color: #1a3f9e; border-left-color: var(--c-primary); }
.notice.warn { background: var(--c-warn-l); color: #8a5400; border-left-color: var(--c-warn); }
.notice.bad { background: var(--c-danger-l); color: #a52a36; border-left-color: var(--c-danger); }
.notice.ok { background: var(--c-ok-l); color: #0a7a53; border-left-color: var(--c-ok); }

/* ------------------------------ 空态 ------------------------------ */

.empty { padding: 60px 24px; }

.empty::before {
  content: '';
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 48%, rgba(29, 78, 216, .22) 0 5px, rgba(29, 78, 216, 0) 6px),
    linear-gradient(180deg, #ffffff, #eef3fb);
  border: 1px solid rgba(16, 32, 64, .06);
  box-shadow: 0 14px 26px -20px rgba(13, 30, 60, .55);
}

.empty-title { font-weight: 600; }

/* ------------------------------ 弹层 ------------------------------ */

.dlg {
  border-radius: 20px;
  box-shadow: var(--sh-float);
}

.dlg-title { font-size: 17px; font-weight: 650; }
.dlg-body { padding: 24px 22px 20px; }
.dlg-actions .dlg-btn { height: 52px; font-weight: 500; }
.dlg-actions .dlg-btn.primary { font-weight: 650; }

.sheet-head { border-radius: 20px 20px 0 0; }
.sheet-item { height: 54px; }

.toast {
  border-radius: 12px;
  padding: 12px 18px;
  background: rgba(10, 22, 44, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--sh-float);
  font-size: 13.5px;
}

.loading {
  border-radius: 14px;
  background: rgba(10, 22, 44, .86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 20px 24px;
}

/* ------------------------------ 登录页 ------------------------------ */

/* 一块品牌渐变 + 一张压在上面的白色表单卡。
   渐变往下"沉"、卡片往上"浮"，视线自然落在登录按钮上。 */
.login-wrap { padding: 0 2px; }

.login-hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 30px 24px 46px;
  color: #fff;
  background:
    radial-gradient(95% 80% at 100% 0%, rgba(96, 165, 250, .6) 0%, rgba(96, 165, 250, 0) 60%),
    linear-gradient(150deg, #071a3c 0%, #10357f 55%, #1d4ed8 100%);
  box-shadow: 0 26px 54px -32px rgba(11, 42, 102, .95);
}

.login-hero::after {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 70%);
}

.login-logo {
  width: 54px;
  height: 54px;
  margin: 0 0 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.login-brand {
  position: relative;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 1px;
}

.login-slogan {
  position: relative;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .74);
  margin-top: 9px;
  letter-spacing: .8px;
}

.login-panel {
  position: relative;
  z-index: 2;
  margin: -28px 10px 0;
  padding: 22px 18px 18px;
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(16, 32, 64, .04);
  box-shadow: 0 26px 54px -34px rgba(9, 25, 55, .6);
}

.login-title {
  text-align: left;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .3px;
  color: var(--c-ink);
}

.login-sub { text-align: left; font-size: 12.5px; margin-top: 5px; }

.login-fields { margin: 18px 0 4px; }

.lf {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 14px;
  margin-bottom: 12px;
  border-radius: 13px;
  background: #f4f7fc;
  border: 1px solid transparent;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.lf:focus-within {
  background: #fff;
  border-color: rgba(29, 78, 216, .45);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, .1);
}

.lf-ico { display: flex; color: var(--c-text-4); flex-shrink: 0; }
.lf:focus-within .lf-ico { color: var(--c-primary); }
.lf .input { flex: 1; min-width: 0; font-size: 15.5px; }

.login-panel .btn { margin-top: 8px; }
.login-panel .hint { margin-top: 14px; font-size: 11.5px; line-height: 1.7; color: var(--c-text-4); }

.login-wrap .agree { margin: 20px 6px 0; }

.login-foot { margin-top: 24px; }
.login-foot button { color: var(--c-text-3); }

.login-wrap > .hint.center { margin-top: 12px; color: var(--c-text-4); }

/* 服务器面板：不用登录卡那种浮起的层次，它是"高级设置"，安静一点 */
.login-wrap .card.pad { box-shadow: none; background: rgba(255, 255, 255, .7); }

/* ------------------------------ 管理台 ------------------------------ */

.admin-stat .cell {
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(16, 32, 64, .045);
  box-shadow: var(--sh-card);
}

.admin-stat .n {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  color: var(--c-ink);
}

.admin-stat .l { font-size: 11.5px; margin-top: 5px; }

.pbar { height: 7px; border-radius: 4px; background: #edf1f8; }
.pbar i { border-radius: 4px; background: linear-gradient(90deg, #2e66f0, #1d4ed8); }
.pbar i.late { background: linear-gradient(90deg, #ef5a66, #dc3b49); }

.cred-box { background: #f7f9fd; border-color: #d7dfec; border-radius: 12px; }

/* ------------------------------ 日志 ------------------------------ */

.log-search { height: 42px; border-radius: 12px; background: #edf1f8; }
.log-search:focus-within { background: #fff; box-shadow: 0 0 0 3px rgba(29, 78, 216, .1); }
.log-item { padding: 13px 0; }

/* ------------------------------ 聊天 ------------------------------ */

.chat-head { height: 56px; border-bottom: 1px solid rgba(16, 32, 64, .06); }
.chat-title { font-size: 16.5px; font-weight: 650; }
.msg-bubble { border-radius: 14px; padding: 10px 13px; box-shadow: 0 8px 20px -18px rgba(13, 30, 60, .55); }
.msg.mine .msg-bubble { background: linear-gradient(180deg, #2e66f0, #1d4ed8); }
.chat-input { background: #f4f7fc; border-radius: 12px; }
.chat-input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(29, 78, 216, .1); }

/* ------------------------------ 管理台身份卡 ------------------------------ */

/* 管理台是唯一没有底部导航的页面，顶部就必须自己"立住"。
   与其他页面的深蓝主卡同一套渐变，一眼看出是同一个产品。 */
.admin-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 20px;
  border-radius: 22px;
  color: #fff;
  background:
    radial-gradient(110% 85% at 100% 0%, rgba(96, 165, 250, .55) 0%, rgba(96, 165, 250, 0) 58%),
    linear-gradient(135deg, #0b2a66 0%, #1445b8 58%, #2563eb 100%);
  box-shadow: 0 20px 44px -26px rgba(11, 42, 102, .9);
}

.admin-hero::after {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 70%);
}

.ah-top { position: relative; display: flex; align-items: center; gap: 13px; }

.ah-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  flex-shrink: 0;
}

.ah-name { font-size: 18px; font-weight: 650; letter-spacing: .4px; }

.ah-role {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .3px;
  vertical-align: 2px;
}

.ah-sub { font-size: 12px; opacity: .78; margin-top: 6px; letter-spacing: .3px; }

.ah-foot {
  position: relative;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 11.5px;
  opacity: .72;
  letter-spacing: .2px;
}

/* 启动闪屏：只出现一瞬，但它是"打开 App 的第一帧"，
   旧版亮蓝方块和现在的品牌头对不上，会闪一下再变深。 */
.splash { background: #f2f5fa; }
.splash-logo {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background: linear-gradient(150deg, #12358f 0%, #2563eb 100%);
  box-shadow: 0 16px 30px -18px rgba(11, 42, 102, .9);
}
