:root {
  --bg: #eef3f8;
  --bg-2: #e4edf6;
  --panel: #ffffff;
  --ink: #16324f;
  --muted: #5b738c;
  --line: #d5e2ef;
  --blue: #1b6fd4;
  --blue-2: #0ea5c8;
  --navy: #0d2a4a;
  --ok: #168a5a;
  --warn: #c47a12;
  --shadow: 0 10px 30px rgba(16, 48, 84, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 8% -10%, #cfe8ff 0%, transparent 55%),
    radial-gradient(700px 360px at 100% 0%, #d4f3f6 0%, transparent 50%),
    var(--bg);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
h1, h2, h3, p { margin: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  background: rgba(13, 42, 74, 0.96);
  color: #fff;
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, #1b6fd4, #0ea5c8);
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.brand small { display: block; color: #9fb6cc; font-size: 12px; margin-top: 2px; }
.logo.has-img { background: transparent; padding: 0; overflow: hidden; }
.logo.has-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nav { display: flex; gap: 8px; }
.nav a, .ghost, .btn {
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  cursor: pointer;
}
.nav a {
  color: #d7e6f5;
  background: transparent;
}
.nav a.active, .nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.wrap { width: min(1280px, calc(100% - 28px)); margin: 22px auto 40px; }

.hero, .panel, .card, .stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero {
  padding: 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(145deg, #1b6fd433, #0ea5c822);
}
.kicker { color: var(--blue); font-weight: 700; font-size: 13px; letter-spacing: 1px; }
.hero h1 { font-size: 34px; line-height: 1.25; margin: 8px 0 10px; }
.hero p { color: var(--muted); line-height: 1.7; }
.actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
  font-weight: 650;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ghost { background: #eef5fb; color: var(--ink); }
.portal-grid { display: grid; gap: 12px; }
.portal {
  padding: 16px;
  border-radius: 14px;
  background: #f5f9fd;
  border: 1px solid var(--line);
}
.portal strong { display: block; margin-bottom: 6px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.stat { padding: 16px 18px; }
.stat b { display: block; font-size: 26px; margin-top: 4px; }
.stat span { color: var(--muted); font-size: 13px; }

.layout { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }
.panel { padding: 16px; }
.panel h2 { font-size: 16px; margin-bottom: 12px; }
.form { display: grid; gap: 10px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
input, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  background: #fbfdff;
  color: var(--ink);
}
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--muted);
}
.tab.on { background: #e8f2ff; color: var(--blue); border-color: #bdd6f5; }
.hidden { display: none !important; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
  z-index: 40;
}
.toast.show { opacity: 1; transform: none; }

.kanban {
  display: grid;
  grid-template-columns: repeat(6, minmax(180px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.col {
  background: #f4f8fc;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 190px;
  padding: 10px;
}
.col h3 {
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}
.col h3 em {
  font-style: normal;
  background: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  color: var(--muted);
}
.pcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  box-shadow: 0 6px 14px rgba(16,48,84,0.05);
}
.pcard h4 { font-size: 14px; margin-bottom: 4px; }
.meta { color: var(--muted); font-size: 12px; line-height: 1.6; }
.bar {
  height: 7px;
  background: #e6eef6;
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0;
}
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--blue-2));
}
.task {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  padding: 6px 0;
  border-top: 1px dashed var(--line);
}
.task button {
  border: 0;
  background: #e8f8ef;
  color: var(--ok);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}
.task.done { color: var(--ok); }
.mini { width: 100%; margin-top: 8px; }
.members { display: grid; gap: 8px; }
.member {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #f7fbfe;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.tag {
  font-size: 11px;
  color: var(--blue);
  background: #e8f2ff;
  border-radius: 999px;
  padding: 2px 8px;
}

.client-head { display: grid; grid-template-columns: 1.4fr 280px; gap: 16px; align-items: center; }
.steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.step {
  flex: 1;
  min-width: 110px;
  padding: 12px 10px;
  border-radius: 12px;
  background: #f3f7fb;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  position: relative;
}
.step.done { background: #e8f8ef; color: var(--ok); border-color: #bfe8d0; }
.step.current {
  background: #e8f2ff;
  color: var(--blue);
  border-color: #b7d4f6;
  font-weight: 700;
}
.progress-lg { height: 14px; }
.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.list { display: grid; gap: 8px; }
.list .item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: flex;
  justify-content: space-between;
}

@media (max-width: 980px) {
  .hero, .layout, .client-head, .grid-2, .stats { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(6, 210px); }
  .wrap { width: calc(100% - 16px); }
  .hero h1 { font-size: 26px; }
}

.nav-user { color: #9fb6cc; font-size: 12px; display: flex; align-items: center; padding-left: 4px; }.nav .icon-btn { border: 0; background: rgba(255,255,255,0.14); color: #fff; border-radius: 9px; padding: 7px 12px; font-size: 12px; cursor: pointer; }
.nav .icon-btn:hover { background: rgba(255,255,255,0.24); }
.checks { display: grid; gap: 6px; max-height: 150px; overflow-y: auto; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdff; }
.check { display: flex; grid-template-columns: auto 1fr; gap: 7px; align-items: center; color: var(--ink); font-size: 13px; }
.check input { width: auto; }
.btn.del { background: #fdecea; color: #c0392b; padding: 6px 10px; margin-top: 0; width: auto; font-size: 12px; }

/* ---------- 登录页 ---------- */
.auth-body { display: grid; place-items: center; padding: 20px; }
.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 30px 26px;
}
.auth-brand { text-align: center; margin-bottom: 22px; }
.logo.lg { width: 54px; height: 54px; margin: 0 auto 12px; font-size: 20px; }
.auth-brand h1 { font-size: 19px; line-height: 1.4; }
.auth-tip { text-align: center; margin-top: 16px; }
.btn.block { width: 100%; padding: 11px; margin-top: 4px; }
.form-err {
  color: #c0392b;
  background: #fdecea;
  border: 1px solid #f5c6c2;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
}

/* ---------- 客户手机版 ---------- */
.m-body { padding-bottom: env(safe-area-inset-bottom); }
.m-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* 适配刘海屏安全区 */
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(13, 42, 74, 0.97);
  color: #fff;
  backdrop-filter: blur(12px);
}
.m-topbar .logo.sm { width: 32px; height: 32px; font-size: 13px; border-radius: 9px; }
.m-topbar small { color: #9fb6cc; font-size: 11px; }
.m-topbar strong { font-size: 15px; }
.icon-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 12px;
  cursor: pointer;
}
.icon-btn:active { background: rgba(255, 255, 255, 0.24); }

.m-wrap {
  width: min(560px, calc(100% - 24px));
  margin: 14px auto 30px;
  display: grid;
  gap: 12px;
}
.m-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.m-h2 { font-size: 15px; margin-bottom: 12px; }
.m-kicker { color: var(--blue); font-weight: 700; font-size: 12px; letter-spacing: 1px; }
.m-title { font-size: 21px; margin: 6px 0 4px; line-height: 1.3; }
.m-stage {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
}
.m-stage-badge {
  background: #e8f2ff;
  color: var(--blue);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 700;
}
.m-stage-pct { font-size: 26px; font-weight: 800; }

.m-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.m-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.m-stat span { color: var(--muted); font-size: 12px; display: block; }
.m-stat b { font-size: 18px; margin-top: 3px; display: block; }

/* 项目切换用横向滚动 chips，比原生 select 更适合触屏 */
.m-switch-label { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.m-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.m-chips::-webkit-scrollbar { display: none; }
.m-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.m-chip.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }

/* 节点条改为纵向时间轴，窄屏更易读 */
.m-steps { display: grid; gap: 2px; }
.m-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--muted);
}
.m-step-dot {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef3f8;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}
.m-step.done .m-step-dot { background: #e8f8ef; color: var(--ok); border-color: #bfe8d0; }
.m-step.done .m-step-label { color: var(--ok); }
.m-step.current .m-step-dot { background: var(--blue); color: #fff; border-color: var(--blue); }
.m-step.current .m-step-label { color: var(--blue); font-weight: 700; }

.m-list { display: grid; gap: 8px; }
.m-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}
.m-item-title { font-size: 14px; }
.m-pill { font-size: 11px; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.m-pill.ok { color: var(--ok); background: #e8f8ef; }
.m-pill.run { color: var(--blue); background: #e8f2ff; }

.m-refresh {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  cursor: pointer;
}
.m-refresh:disabled { opacity: 0.5; }
.m-note { text-align: center; font-size: 11px; }
.m-empty { text-align: center; padding: 26px 10px; display: grid; gap: 6px; }
.m-empty-icon { font-size: 30px; }

/* 触屏设备加大点击热区 */
@media (pointer: coarse) {
  .btn, .ghost, .m-refresh, .task button, .icon-btn, .m-chip { min-height: 44px; }
  .task button { padding: 8px 14px; }
}

@media (max-width: 400px) {
  .m-stats { grid-template-columns: 1fr; }
  .m-title { font-size: 19px; }
}

/* ---------- 管理后台：筛选工具栏 / 卡片操作 / 编辑弹窗 ---------- */
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; flex: 1; min-width: 130px; }
.toolbar .btn { width: auto; }

.task-actions { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.task .del {
  background: #fdecea;
  color: #c0392b;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}
.card-actions { display: flex; gap: 6px; margin-top: 8px; }
.card-actions .mini { margin-top: 0; }
.btn.mini.ghost { background: #eef5fb; color: var(--ink); }
.btn.mini.del { background: #fdecea; color: #c0392b; }
.member-right { display: flex; align-items: center; gap: 8px; }

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(13, 42, 74, 0.45);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px;
  z-index: 50;
  /* 屏幕低于弹窗高度时，整层可以滑动，底部内容不再被裁掉 */
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.modal {
  width: min(440px, 100%);
  margin: auto; /* 空间够时垂直居中；不够时从顶部开始并随遮罩滚动 */
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - 36px);
  overflow: hidden;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.modal h2 { margin-bottom: 14px; flex: 0 0 auto; }
/* 表单区独立滚动，标题与按钮始终可见 */
.modal > form,
.modal > .photo-modal {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
  padding-top: 10px;
  background: var(--panel);
  box-shadow: 0 -10px 12px -10px rgba(13, 42, 74, 0.22);
}
.modal-actions .btn { width: auto; }

/* ============ 侧边栏布局（管理后台） ============ */
body.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: linear-gradient(180deg, #0e2b4c 0%, #13395f 100%);
  color: #cfe0f0;
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; color: #fff; }
.side-brand .logo { width: 36px; height: 36px; flex: 0 0 36px; }
.side-brand strong { display: block; font-size: 14px; line-height: 1.25; }
.side-brand small { color: #8fb0cf; font-size: 11px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow-y: auto; }
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #b9cfe4;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: 0.15s;
}
.side-link span { width: 18px; text-align: center; opacity: 0.85; }
.side-link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.side-link.on { background: linear-gradient(90deg, #1b6fd4, #1596c4); color: #fff; box-shadow: 0 6px 16px rgba(27, 111, 212, 0.35); }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 12px; color: #9fb6cc; }

.content { flex: 1; min-width: 0; padding: 0 0 40px; }
.content-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 26px;
  position: sticky;
  top: 0;
  background: rgba(238, 243, 248, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10;
  border-bottom: 1px solid var(--line);
}
.content-head h1 { font-size: 20px; flex: 1; }
.top-link { color: var(--blue); font-size: 13px; }
.menu-toggle { display: none; border: 0; background: #fff; border-radius: 10px; padding: 8px 12px; cursor: pointer; box-shadow: var(--shadow); }

.view { padding: 20px 26px 0; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat { background: var(--panel); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: grid; gap: 6px; }
.stat span { color: var(--muted); font-size: 13px; }
.stat b { font-size: 26px; color: var(--blue); }

/* 阶段流程图 */
.stage-flow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.stage-node { flex: 1; min-width: 96px; text-align: center; padding: 14px 8px; border-radius: 12px; background: var(--bg-2); cursor: pointer; transition: 0.15s; }
.stage-node:hover { background: #d4e6fb; transform: translateY(-2px); }
.stage-ic { width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; background: linear-gradient(145deg, #1b6fd4, #0ea5c8); color: #fff; display: grid; place-items: center; font-weight: 700; }
.stage-name { font-weight: 600; font-size: 14px; }
.stage-cnt { color: var(--muted); font-size: 12px; margin-top: 2px; }
.stage-arrow { color: #9fc0e0; font-size: 18px; }

.recent-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.recent-row:hover { background: #f6fafd; }
.recent-prog { width: 40%; }

/* 卡片网格 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.pcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pcard h4 { font-size: 15px; }

.badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: #e8f1fb; color: var(--blue); white-space: nowrap; }
.badge-initiation { background: #eef1f5; color: #5b738c; }
.badge-procurement { background: #fff2e0; color: #c47a12; }
.badge-processing { background: #e8ecfe; color: #4c5fd5; }
.badge-materials { background: #e6f7f0; color: #168a5a; }
.badge-installation { background: #fdeef4; color: #c43d78; }
.badge-done { background: #e8f6ed; color: #168a5a; }

.status { font-size: 12px; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.status-ok { background: #e8f6ed; color: var(--ok); }
.status-warn { background: #fff2e0; color: var(--warn); }
.status-mid { background: #e8ecfe; color: #4c5fd5; }
.tag { background: #eef5fb; color: var(--blue); padding: 3px 10px; border-radius: 999px; font-size: 12px; }

/* 数据表格 */
.tablewrap { overflow-x: auto; margin-top: 12px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th, .dtable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.dtable th { color: var(--muted); font-weight: 600; font-size: 12px; background: #f6fafd; }
.dtable tr:hover td { background: #f9fcfe; }
.row-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.mini-sel { width: auto; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line); }
.bar.sm { height: 6px; }

/* 详情 */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.detail-head h2 { font-size: 19px; display: flex; align-items: center; gap: 10px; }
.back-btn { margin-bottom: 12px; }
.timeline { display: flex; gap: 0; overflow-x: auto; padding: 8px 0; }
.tl-step { flex: 1; min-width: 130px; position: relative; padding: 8px 10px; }
.tl-dot { width: 16px; height: 16px; border-radius: 50%; background: #cdd9e6; margin-bottom: 8px; }
.tl-step.tl-completed .tl-dot { background: var(--ok); }
.tl-step.tl-in_progress .tl-dot { background: var(--blue); box-shadow: 0 0 0 4px rgba(27,111,212,0.18); }
.tl-step.tl-pending .tl-dot { background: #cdd9e6; }
.tl-step:not(:last-child)::after { content: ""; position: absolute; left: 24px; right: -6px; top: 15px; height: 2px; background: #dbe6f1; }
.tl-body strong { font-size: 14px; }

/* 成员/账号 */
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }

/* 站内消息 */
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: #e5484d; display: inline-block; margin-left: 6px; vertical-align: middle; }
.notif-list-pc { display: grid; gap: 10px; margin-top: 12px; }
.notif-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: grid; gap: 5px; background: #fff; }
.notif-row.unread { background: #f7fbff; border-color: #cfe3f7; }
.notif-row h3 { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.notif-row .notif-meta { font-size: 11.5px; color: var(--muted); }
.notif-row p { font-size: 12.5px; color: #4a5a6b; line-height: 1.55; margin: 0; }
.notif-unread-mark { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex: 0 0 auto; }

/* 任务照片 */
.photo-modal { display: grid; gap: 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.photo-cell { margin: 0; display: grid; gap: 6px; }
.photo-cell img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: #eef3f7; display: block; }
.photo-cell figcaption { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.photo-upload-btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
#detail-photos { padding: 14px 2px 4px; }

/* 操作记录 */
.hint-warn { color: #b97918 !important; }
.activity-list { display: grid; gap: 8px; margin-top: 10px; }
.activity-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12.5px; }
.activity-row.forced { background: #fff8ec; border-color: #f0d8ae; }
.activity-tag { font-weight: 600; color: var(--blue); flex: 0 0 auto; }
.activity-row.forced .activity-tag { color: #b97918; }
.activity-text { flex: 1 1 240px; color: #33475b; }
.activity-meta { color: var(--muted); font-size: 11.5px; flex: 0 0 auto; }

/* 生产批次 */
.batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 12px; }
.batch-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #f9fcfe; display: grid; gap: 8px; }
.batch-card.batch-done { background: #f2f7f3; border-color: #d6e8dc; }
.batch-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.batch-top strong { font-size: 14px; }
.batch-remark { color: var(--muted); font-size: 12px; }
.batch-stat { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.batch-stat b { color: var(--ink); }
.batch-actions { display: flex; gap: 6px; }
.member { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(145deg, #1b6fd4, #0ea5c8); color: #fff; display: grid; place-items: center; font-weight: 700; flex: 0 0 40px; }
.chips { display: flex; gap: 8px; }

.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* 响应式 */
@media (max-width: 980px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: 0.2s; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(0,0,0,0.35); }
  .menu-toggle { display: inline-block; }
  .stats { grid-template-columns: 1fr 1fr; }
  .view { padding: 14px 14px 0; }
  .content-head { padding: 14px 14px; }
  .grid2 { grid-template-columns: 1fr; }
  .detail-head { flex-direction: column; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}
/* 小屏手机：弹窗贴近全屏，留出更多可滚动区域 */
@media (max-width: 560px) {
  .modal-mask { padding: 10px; }
  .modal {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 16px;
    border-radius: 14px;
  }
  .modal-actions { margin-top: 8px; }
}
