/* 工作日志 App —— 移动端优先样式 */
:root {
  --brand: #1d5fd0;
  --brand-2: #3f8bf5;
  --brand-soft: #e8f1fe;
  --ink: #101c30;
  --muted: #6b7c95;
  --line: #e4ebf6;
  --bg: #f2f6fd;
  --card: #ffffff;
  --warn: #a8690a;
  --warn-soft: #fdf4e3;
  --danger: #b8382a;
  --danger-soft: #fff5f3;
  --r: 16px;
  --shadow: 0 2px 10px rgba(16, 40, 34, 0.06);
  --shadow-lg: 0 10px 30px rgba(16, 40, 34, 0.14);
}

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

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
img { max-width: 100%; display: block; }
small { font-size: 12px; }

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 96px;
  position: relative;
}

@media (min-width: 620px) {
  body { background: #e9f0fa; }
  .app { box-shadow: 0 0 40px rgba(18, 60, 50, 0.12); min-height: 100vh; }
}

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(244, 247, 245, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(228, 234, 231, 0.7);
}

.topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.logo-mini {
  width: 34px; height: 34px; flex: 0 0 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -0.5px;
}
.topbar h1 { font-size: 16px; font-weight: 600; letter-spacing: 0.2px; }
.topbar p { font-size: 11px; color: var(--muted); margin-top: 1px; }
.topbar-right { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }

/* 顶栏小喇叭：有新日报 / 待审报账时右上角冒数字 */
.bell {
  position: relative; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.bell svg { width: 18px; height: 18px; }
.bell em {
  position: absolute; top: -5px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: #e0503f; color: #fff; font-style: normal;
  font-size: 10.5px; line-height: 17px; text-align: center; font-weight: 600;
  box-shadow: 0 0 0 2px rgba(18, 105, 91, 0.6);
}


/* 我的页「下载与更新」卡片里的分块 */
.dl-block { padding: 10px 0; border-top: 1px solid #eef4fc; }
.dl-block:first-of-type { border-top: none; padding-top: 4px; }
.dl-block > b { display: block; font-size: 13.5px; color: #101c30; margin-bottom: 4px; }
.dl-block .hint { margin: 0; font-size: 12.5px; line-height: 1.75; color: #6b7c95; }
.dl-block .hint b { color: #1d5fd0; }

/* 「新消息」提示条（人事动态页顶部） */
.bell-tip {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 11px 14px; border-radius: 12px;
  background: #fff6e6; border: 1px solid #f0dcae; color: #7a5a17;
  font-size: 13px; text-decoration: none;
}
.bell-tip b { color: #8a5a11; }
.bell-tip span { margin-left: auto; color: var(--brand); font-size: 12.5px; }


.page { padding: 12px 14px 8px; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-title small { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head .card-title { margin-bottom: 0; }
.link { font-size: 12.5px; color: var(--brand); }

/* ---------------- 统计 ---------------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stat {
  background: var(--card); border-radius: 14px; padding: 12px 10px;
  text-align: center; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 22px; font-weight: 700; color: var(--brand); line-height: 1.2; }
.stat b small { font-size: 12px; font-weight: 500; color: var(--muted); }
.stat span { font-size: 11.5px; color: var(--muted); }

/* ---------------- 列表 ---------------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 14px; padding: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.item:active { transform: scale(0.99); }
.item-date {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.item-date b { font-size: 17px; line-height: 1; font-weight: 700; }
.item-date span { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.item-body { flex: 1; min-width: 0; }
.item-body h3 {
  font-size: 14.5px; font-weight: 600; margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item-meta { font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.item-arrow { color: #c2d1e8; font-size: 20px; flex: 0 0 auto; }
.list.compact .item { padding: 10px 12px; }

/* 案件卡片：右侧带「写日报 / 出报告」快捷按钮 */
.case-item { flex-direction: column; align-items: stretch; gap: 10px; }
.case-item .item-body { display: block; text-decoration: none; color: inherit; }
.case-actions { display: flex; gap: 8px; }
.case-actions .btn { flex: 1; text-align: center; }

.chip {
  display: inline-flex; align-items: center;
  padding: 1px 7px; border-radius: 6px;
  font-size: 11px; line-height: 1.6;
  background: #eef3fb; color: var(--muted);
}
.chip.ok { background: var(--brand-soft); color: var(--brand); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.muted { background: #f1f5fc; color: #8a97ad; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 14px; font-family: inherit; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.1s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(18, 105, 91, 0.24);
  font-weight: 600;
}
.btn-ghost { background: #f5f9ff; border-color: transparent; color: var(--brand); }
.btn-danger-ghost { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-block { width: 100%; }
.btn-lg { height: 48px; font-size: 15.5px; border-radius: 14px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }

/* ---------------- 表单 ---------------- */
.form .field, .field { display: block; margin-bottom: 10px; }
.field > span {
  display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px;
}
input, select, textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: #fbfdff; border: 1px solid var(--line); border-radius: 12px;
  padding: 0 12px; height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7c77' stroke-width='2.4'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}
textarea {
  height: auto; min-height: 150px; padding: 12px; line-height: 1.65;
  resize: vertical; font-size: 15px;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 105, 91, 0.12);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.textarea-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; flex-wrap: wrap; }

.hint { font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.warn-text { color: var(--warn); }
.foot-note { text-align: center; font-size: 11px; color: #99a6bb; margin: 18px 0 0; }

.draft-tip {
  margin-top: 10px; padding: 8px 10px; border-radius: 10px;
  background: var(--warn-soft); color: var(--warn);
  font-size: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* ---------------- 上传 ---------------- */
.upload-box {
  width: 100%; min-height: 76px; border: 1.5px dashed #cfddf4; border-radius: 14px;
  background: #fafdff; color: var(--brand);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-family: inherit; cursor: pointer; padding: 12px;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(18, 105, 91, 0.12);
  user-select: none; -webkit-user-select: none;
}
.upload-box:active { background: var(--brand-soft); }

/* 文件框不能用 hidden 属性 —— iOS Safari 与微信内置浏览器
   对 display:none / hidden 的 input[type=file] 不唤起选择器。
   用透明度隐藏，保持可点击与可聚焦。 */
.visually-hidden-input {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0; opacity: 0;
  font-size: 16px; /* 防止 iOS 聚焦时页面自动放大 */
}

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid:not(:empty) { margin-top: 10px; }
.photo-item { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #eef3fb; }
.photo-item img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.photo-item figcaption { font-size: 10.5px; color: var(--muted); padding: 3px 4px; background: #fff; }
.photo-del { position: absolute; top: 3px; right: 3px; margin: 0; }
.photo-del button {
  width: 24px; height: 24px; border-radius: 50%; border: none;
  background: rgba(18, 33, 30, 0.6); color: #fff; font-size: 15px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.caption-input {
  width: 100%; height: 28px; font-size: 11px; border-radius: 0 0 10px 10px;
  border: none; border-top: 1px solid var(--line); padding: 0 6px; background: #fff;
}

/* ---------------- 操作条 ---------------- */
.action-bar {
  position: sticky; bottom: 78px; z-index: 15;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px; margin: 4px 0 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-radius: 16px; box-shadow: var(--shadow-lg);
}
.action-row { display: flex; gap: 8px; }
.action-row > * { flex: 1; }
.action-row form { display: flex; }
.action-row form .btn { width: 100%; }
.dl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* 写日报页：操作条是 sticky 悬浮的，会盖住最后一块内容。
   给表单底部留出与操作条等高的空间，照片和说明就不会被压住。 */
#logForm { padding-bottom: 150px; }
#logForm .photo-grid { padding-bottom: 4px; }

/* ---------------- 底部导航 ---------------- */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  max-width: 560px; margin: 0 auto;
  display: flex; align-items: flex-end; justify-content: space-around;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10.5px; color: #8b98ae; padding: 2px 0;
}
.nav-item svg {
  width: 23px; height: 23px; fill: none;
  stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.nav-item.active { color: var(--brand); font-weight: 600; }
.nav-fab {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
  margin: 0 6px; transform: translateY(-14px);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(18, 105, 91, 0.32);
}
.nav-fab svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; }

/* ---------------- 报告详情 ---------------- */
.report { padding: 18px 16px; }
.report-head h2 { font-size: 18px; line-height: 1.45; margin-bottom: 8px; font-weight: 700; }
.meta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
  margin: 14px 0 4px; padding: 12px; background: #f8fbf9; border-radius: 12px;
}
.meta-grid dt { font-size: 11px; color: var(--muted); }
.meta-grid dd { margin: 1px 0 0; font-size: 13px; }
.sec { margin-top: 18px; }
.sec h4 {
  font-size: 14px; color: var(--brand); margin-bottom: 8px;
  padding-left: 9px; border-left: 3px solid var(--brand); line-height: 1.2;
}
.sec p, .sec li { font-size: 14px; line-height: 1.8; color: #223349; }
.sec-list { margin: 0; padding-left: 22px; }
.sec-list li { margin-bottom: 6px; }
.raw { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); }
.raw summary { font-size: 12.5px; color: var(--muted); cursor: pointer; }
.raw p {
  font-size: 13px; line-height: 1.75; color: #4a5c57;
  background: #f8faf9; border-radius: 10px; padding: 10px; margin-top: 8px;
  white-space: pre-wrap;
}
.report-foot {
  display: flex; justify-content: space-between;
  margin-top: 18px; padding-top: 12px; border-top: 1px dashed var(--line);
  font-size: 12px; color: var(--muted);
}

/* ---------------- 弹层 ---------------- */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-mask { position: absolute; inset: 0; background: rgba(10, 22, 18, 0.45); }
.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: 560px; margin: 0 auto; max-height: 84vh;
  background: #fff; border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  animation: slideUp 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.sheet-head h3 { font-size: 15px; font-weight: 600; }
.sheet-close {
  border: none; background: #f2f5f4; width: 28px; height: 28px; border-radius: 50%;
  font-size: 17px; color: var(--muted); cursor: pointer; line-height: 1;
}
.sheet-body { overflow-y: auto; padding: 10px 16px 16px; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
.pv-title { font-size: 16px; font-weight: 700; line-height: 1.45; margin: 10px 0 6px; }
.pv-sec { margin-top: 14px; }
.pv-sec h4 {
  font-size: 13px; color: var(--brand); margin-bottom: 6px;
  padding-left: 8px; border-left: 3px solid var(--brand); line-height: 1.2;
}
.pv-sec p, .pv-sec li { font-size: 13.5px; line-height: 1.75; color: #223349; }
.pv-sec ol { margin: 0; padding-left: 20px; }
.pv-note { font-size: 11.5px; color: var(--muted); background: #f6f9f8; border-radius: 10px; padding: 8px 10px; margin-top: 14px; }

/* ---------------- 人事 ---------------- */
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 116px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.bar-value { font-size: 10px; color: var(--muted); height: 12px; }
.bar-track {
  flex: 1; width: 100%; max-width: 26px; background: #eff4f2;
  border-radius: 7px; position: relative; overflow: hidden;
}
.bar-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  border-radius: 7px; min-height: 2px; transition: height 0.3s ease;
}
.bar-label { font-size: 10px; color: var(--muted); }

.people { display: flex; flex-direction: column; gap: 10px; }
.person {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border-radius: 14px; padding: 12px;
  box-shadow: var(--shadow);
}
.person-head { display: flex; align-items: center; gap: 10px; }
.avatar {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600;
}
.avatar-lg { width: 54px; height: 54px; flex-basis: 54px; border-radius: 16px; font-size: 21px; }
.person-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-main b { font-size: 14.5px; font-weight: 600; }
.person-main small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.person-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #d6e0dc; display: inline-block; }
.dot.ok { background: var(--brand-2); box-shadow: 0 0 0 3px rgba(30, 158, 130, 0.16); }
.person-card { padding: 14px; }
.person-edit { margin-top: 10px; }
.person-edit summary {
  font-size: 12.5px; color: var(--brand); cursor: pointer;
  padding: 6px 0; list-style: none;
}
.person-edit summary::-webkit-details-marker { display: none; }
.person-edit summary::before { content: "⚙ "; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 12px; }
.mini-stats {
  display: flex; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.mini-stats b { color: var(--ink); font-size: 13px; }
.profile-card { padding: 16px 14px; }

.menu { display: flex; flex-direction: column; }
.menu a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; font-size: 14.5px; border-bottom: 1px solid #f0f4f2;
}
.menu a:last-child { border-bottom: none; }
.menu a span { color: #c2d1e8; font-size: 18px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.tl-time { flex: 0 0 84px; font-size: 10.5px; color: var(--muted); padding-top: 2px; }
.tl-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-2); margin-top: 7px; }
.tl-text { font-size: 12.5px; line-height: 1.55; color: #37473f; }
.tl-text b { font-weight: 600; color: var(--ink); }

.table-card { padding: 6px 10px; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: left; font-weight: 600; color: var(--muted);
  padding: 8px 6px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 8px 6px; border-bottom: 1px solid #f2f6f4; vertical-align: top; }
.cell-wrap { max-width: 200px; word-break: break-word; }

.test-out {
  background: #0f1d1a; color: #c8f0e3; border-radius: 12px;
  padding: 12px; font-size: 12px; line-height: 1.7; white-space: pre-wrap;
  overflow-x: auto; margin: 10px 0 0;
}

/* ---------------- 提示 / 空态 ---------------- */
.flashes { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 10px 12px; border-radius: 12px; font-size: 13px;
  background: var(--brand-soft); color: var(--brand);
}
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.flash.error { background: var(--danger-soft); color: var(--danger); }
.flash.ok { background: var(--brand-soft); color: var(--brand); }

.empty { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 38px; margin-bottom: 10px; }
.empty p { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }

.pager { display: flex; align-items: center; justify-content: space-between; margin: 14px 0; }

.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 10px);
  background: rgba(18, 33, 30, 0.94); color: #fff;
  padding: 10px 16px; border-radius: 12px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 80; max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 登录页 ---------------- */
.login-body { background: linear-gradient(170deg, #17489b 0%, #3f8bf5 45%, #eef5f2 100%); }
.login-body .app { background: transparent; box-shadow: none; padding-bottom: 20px; }
/* LOGO 图片（白底圆角徽章），套进原来的方形盒子 */
.logo-mini img, .logo-big img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: inherit; }
.logo-mini { overflow: hidden; padding: 0; background: #fff; }

.login-wrap { padding: 44px 20px 24px; max-width: 460px; margin: 0 auto; }
.login-hero { text-align: center; margin-bottom: 24px; color: #fff; }
.logo-big {
  width: 66px; height: 66px; border-radius: 20px; margin: 0 auto 14px;
  background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff; font-size: 24px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
}
.login-hero h1 { font-size: 20px; font-weight: 600; letter-spacing: 0.5px; }
.login-hero p { font-size: 12.5px; opacity: 0.86; margin-top: 6px; }
.login-card {
  background: #fff; border-radius: 20px; padding: 20px 18px;
  box-shadow: 0 16px 40px rgba(9, 45, 38, 0.18);
}
.login-card .field > span { font-size: 12px; }
.login-card input { height: 48px; font-size: 16px; }
.login-demo {
  margin-top: 16px; background: rgba(255, 255, 255, 0.9); border-radius: 14px;
  padding: 12px 14px; font-size: 12px; color: #3d4f49;
}
.login-demo summary { cursor: pointer; color: var(--brand); font-weight: 500; }
.login-demo table { width: 100%; border-collapse: collapse; margin: 8px 0 4px; }
.login-demo td { padding: 5px 0; border-bottom: 1px solid #eef4fc; font-size: 12px; }
.login-demo td:first-child { color: var(--muted); width: 44px; }
.login-demo p { color: var(--muted); font-size: 11.5px; margin-top: 6px; }

/* 登录页次要按钮（注册入口 / 返回登录） */
.btn-outline-login {
  margin-top: 10px; height: 46px; line-height: 44px; padding: 0 16px;
  background: transparent; color: var(--brand);
  border: 1px solid rgba(18, 105, 91, 0.3); border-radius: 12px;
  text-align: center; font-size: 15px; text-decoration: none; display: block;
}
.btn-outline-login:hover { background: rgba(18, 105, 91, 0.07); }
.login-card .field-row { gap: 8px; }
.login-card .field-row .field { margin-bottom: 0; }
.login-foot { text-align: center; color: rgba(255, 255, 255, 0.75); font-size: 11.5px; margin-top: 18px; }
.login-foot a { color: rgba(255, 255, 255, 0.92); text-decoration: underline; }

/* ---------------- 登录页 · 电脑宽屏 ----------------
   手机和平板完全不受影响；只在 ≥1080px 的窗口里变成左右两栏
   （左品牌 / 右表单），管理端 EXE 窗口打开就是企业软件的观感，
   而不是一个拉长的手机页面。 */
@media (min-width: 1080px) {
  .login-body .app { max-width: none; }
  .login-wrap {
    max-width: 1040px; min-height: 100vh; margin: 0 auto; padding: 0 28px 24px;
    display: grid; grid-template-columns: 1fr 0.82fr; align-items: center;
    column-gap: 72px; row-gap: 12px;
  }
  .login-hero { text-align: left; margin: 0; }
  .logo-big { margin: 0 0 20px; width: 80px; height: 80px; border-radius: 24px; font-size: 27px; }
  .login-hero h1 { font-size: 28px; line-height: 1.45; letter-spacing: 0.5px; }
  .login-hero p { font-size: 14px; margin-top: 12px; opacity: 0.9; line-height: 1.7; }
  .login-card { padding: 30px 28px; border-radius: 24px; }
  .login-card input { height: 50px; font-size: 15.5px; }
  .login-foot { grid-column: 1 / -1; text-align: center; margin-top: 4px; font-size: 12px; }
}


.filter-form .field { margin-bottom: 8px; }
.filter-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.filter-actions .btn { flex: 1; min-width: 90px; }

@media (max-width: 360px) {
  .field-row { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .stat b { font-size: 19px; }
}

/* ---------------- 报告类型选择 / 案件信息 / 详情表 ---------------- */
.seg{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;background:#eef4fc;padding:4px;border-radius:12px;}
.seg-btn{border:none;background:transparent;padding:10px 4px;border-radius:9px;font-size:14px;color:#41564f;font-weight:600;cursor:pointer;transition:.15s;}
.seg-btn.active{background:#fff;color:var(--brand);box-shadow:0 1px 4px rgba(18,105,91,.18);}
.req{color:#d1483b;}
.field-inline{display:flex;align-items:center;gap:8px;font-size:13px;color:#4a5f58;margin:6px 0;}
.field-inline input{width:auto;}
.kv-table{width:100%;border-collapse:collapse;font-size:14px;margin-top:6px;}
.kv-table th{width:34%;text-align:center;font-weight:700;color:#22332e;border-bottom:1px solid #cddcf2;padding:8px 6px;background:#f6faf8;}
.kv-table td{border-bottom:1px solid #cddcf2;padding:8px 8px;color:#2b3d37;line-height:1.6;white-space:pre-wrap;}
.pv-table{width:100%;border-collapse:collapse;font-size:13px;margin:6px 0;}
.pv-table th{width:32%;text-align:left;background:#f2f7f5;padding:6px;border-bottom:1px solid #d6e3f6;font-weight:600;}
.pv-table td{padding:6px;border-bottom:1px solid #d6e3f6;}
.tpl-row{display:flex;flex-direction:column;gap:2px;padding:8px 0;border-bottom:1px dashed #dbe5e1;}
.tpl-row:last-child{border-bottom:none;}
.test-out{background:#0f2a24;color:#c9f0e3;font-size:12px;line-height:1.6;padding:12px;border-radius:10px;white-space:pre-wrap;word-break:break-all;overflow-x:auto;}

/* ==================== 报告编辑页 ==================== */
.sub-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  margin: 4px 0 8px; display: flex; align-items: center; gap: 6px;
}
.sub-title small { font-weight: 400; color: var(--muted); font-size: 11.5px; }

/* 勾选日报的列表 */
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow-y: auto; }
.pick {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 11px; border-radius: 11px; background: var(--brand-soft);
  border: 1.5px solid transparent; cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.pick:active { background: #dde8f7; }
.pick input[type="checkbox"] { margin-top: 3px; flex: 0 0 auto; width: 17px; height: 17px; accent-color: var(--brand); }
.pick:has(input:checked) { border-color: var(--brand); background: #fff; }
.pick-body { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.45; }
.pick-body b { color: var(--brand); font-weight: 600; margin-right: 5px; }
.pick-body em {
  display: block; font-style: normal; color: var(--muted);
  font-size: 11.5px; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 照片选择网格 */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.photo-pick {
  display: block; position: relative; border-radius: 10px; overflow: hidden;
  background: var(--brand-soft); border: 2px solid transparent; cursor: pointer;
}
.photo-pick:has(input:checked) { border-color: var(--brand); }
.photo-pick input[type="checkbox"] {
  position: absolute; top: 5px; left: 5px; z-index: 2;
  width: 18px; height: 18px; accent-color: var(--brand);
}
.photo-pick img { display: block; width: 100%; height: 82px; object-fit: cover; }
.photo-pick span {
  display: block; font-size: 9.5px; color: var(--muted); line-height: 1.3;
  padding: 3px 4px; background: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.photo-pick.uploaded { border-color: #dde8f7; }

/* 预览区 */
.preview-p {
  font-size: 13px; line-height: 1.75; text-indent: 2em;
  margin: 0 0 8px; color: var(--text); text-align: justify;
}
.preview-ol { margin: 0 0 10px 20px; padding: 0; font-size: 13px; line-height: 1.75; }
.preview-ol li { margin-bottom: 4px; }

/* ==================== 报告预览页（像看成品） ==================== */
.report-cover { text-align: center; padding: 26px 16px; }
.cover-company { font-size: 13px; color: var(--brand); font-weight: 600; letter-spacing: 1px; }
.cover-title {
  font-size: 27px; font-weight: 700; color: #004BCC;
  margin: 20px 0 10px; letter-spacing: 1px;
}
.cover-sub { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.5; padding: 0 6px; }
.cover-en {
  display: inline-block; font-size: 12px; color: #004BCC; font-weight: 600;
  margin: 18px 0 16px; padding-bottom: 4px; border-bottom: 2px solid #004BCC;
}
.cover-meta { font-size: 11.5px; color: var(--muted); line-height: 1.9; }

.report-h1 {
  font-size: 15px; font-weight: 700; color: var(--text);
  padding-bottom: 7px; margin-bottom: 12px;
  border-bottom: 2px solid var(--brand);
}
.report-p {
  font-size: 13.5px; line-height: 1.85; text-indent: 2em;
  margin: 0 0 10px; text-align: justify; color: var(--text);
}
.report-p:last-child { margin-bottom: 0; }
.report-ol { margin: 0 0 0 20px; padding: 0; font-size: 13.5px; line-height: 1.85; }
.report-ol li { margin-bottom: 6px; text-align: justify; }
.report-note { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 0 0 12px; }

.ov-label { width: 34%; text-align: center; font-weight: 600; background: var(--brand-soft); }

.report-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.report-photos figure { margin: 0; }
.report-photos img { width: 100%; height: 108px; object-fit: cover; border-radius: 8px; display: block; }
.report-photos figcaption {
  font-size: 10px; color: var(--muted); line-height: 1.35;
  margin-top: 5px; text-align: center;
}
.report-end {
  font-size: 14px; font-weight: 700; text-decoration: underline;
  text-underline-offset: 4px; margin: 4px 0;
}

/* ==================== 报账 ==================== */
.exp-cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px;
}
.exp-card {
  background: #fff; border-radius: 14px; padding: 12px 14px;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(18,33,30,.06));
  border: 1px solid var(--line);
}
.exp-card-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.exp-card-num { display: block; font-size: 20px; font-weight: 700; color: var(--text); line-height: 1.2; }
.exp-card em { display: block; font-style: normal; font-size: 11.5px; color: var(--brand); margin-top: 2px; }
.exp-card.total { background: var(--brand-soft); border-color: transparent; }
.exp-card.total .exp-card-num { color: var(--brand); }

.exp-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.exp-filter .field { flex: 1 1 140px; margin: 0; }
.exp-filter .btn { flex: 0 0 auto; }

.exp-list { display: flex; flex-direction: column; gap: 10px; }
.exp-item {
  border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px;
  background: #fff;
}
.exp-main { min-width: 0; }
.exp-line1 {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 6px;
}
.exp-line1 b { font-size: 14px; font-weight: 600; }
.exp-amt { font-size: 15px; font-weight: 700; color: var(--brand); white-space: nowrap; }
.exp-line2 { display: flex; flex-wrap: wrap; gap: 5px; }
.exp-line2 .chip { font-size: 10.5px; padding: 2px 7px; }
.exp-remark { font-size: 11.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.exp-acts { display: flex; gap: 7px; margin-top: 10px; flex-wrap: wrap; }
.exp-acts form { flex: 1 1 auto; }
.exp-acts .btn { width: 100%; }

/* 横向条形图（周报 / 月报） */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: flex; align-items: center; gap: 8px; }
.bar-label {
  flex: 0 0 108px; font-size: 11px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bar-track {
  flex: 1; height: 15px; background: var(--brand-soft); border-radius: 8px; overflow: hidden;
}
.bar-fill {
  height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, #1d5fd0, #4a92f5);
  min-width: 3px;
}
.bar-fill.alt { background: linear-gradient(90deg, #7d9cd8, #b6c9ea); }
.bar-val {
  flex: 0 0 88px; text-align: right; font-size: 11px; color: var(--text);
  white-space: nowrap;
}
.bar-val small { color: var(--muted); font-size: 10px; }

.details-card summary::-webkit-details-marker { display: none; }


/* ============================================================
   蓝白主题（2026-11）：白顶栏 + 浅蓝底 + 蓝色主按钮
   ============================================================ */
:root {
  --brand: #1d5fd0;
  --brand-2: #3f8bf5;
  --brand-soft: #e8f1fe;
  --ink: #101c30;
  --muted: #64748b;
  --line: #dbe6f6;
  --bg: #f2f6fd;
  --card: #ffffff;
  --shadow: 0 2px 10px rgba(16, 44, 90, 0.07);
  --shadow-lg: 0 14px 34px rgba(16, 44, 90, 0.16);
}

/* 顶栏：白底 + 蓝字 + 细分隔线 */
.topbar { background: #ffffff; border-bottom: 1px solid var(--line); }
.topbar h1 { color: var(--ink); }
.topbar p { color: var(--muted); }
.topbar .logo-mini { background: #fff; }
.bell { background: #eef4ff; color: #1d5fd0; }
.bell .bell-num { background: #e0503f; color: #fff; }

/* 底部导航：白底 + 蓝色选中 */
.bottom-nav { background: rgba(255, 255, 255, .94); border-top: 1px solid var(--line); }
.bottom-nav a { color: #74839b; }
.bottom-nav a.on, .bottom-nav a.active { color: #1d5fd0; }

/* 卡片 / 主按钮 / 输入框 */
.card { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.btn-primary {
  background: linear-gradient(135deg, #2f78e8, #1d5fd0);
  box-shadow: 0 6px 16px rgba(29, 95, 208, .26);
}
.btn-ghost { background: #eef4ff; color: #1d5fd0; }
input, select, textarea { border-color: var(--line); }
input:focus, select:focus, textarea:focus {
  border-color: #7fb0f5; box-shadow: 0 0 0 3px rgba(63, 139, 245, .16);
}
.chip.info, .tag.info { background: #e8f1fe; color: #1d5fd0; }
.chip.ok { background: #e9f8ee; color: #15803d; }
.chip.warn { background: #fdf4e3; color: #b4741a; }

/* 登录页：蓝 → 浅蓝 → 白 渐变 */
.login-body {
  background: linear-gradient(168deg, #17489b 0%, #2f78e8 42%, #eef4ff 100%);
}
.login-card { box-shadow: 0 18px 44px rgba(10, 34, 74, 0.20); }


/* ============================================================
   商务深蓝（2026-11，body.theme-navy）
   ============================================================ */
body.theme-navy {
  --brand: #1b4f8f;
  --brand-2: #2a5c9e;
  --brand-soft: #e9eff7;
  --ink: #16233a;
  --muted: #6b7a90;
  --line: #e1e7f0;
  --bg: #f4f6fa;
  --shadow: 0 2px 8px rgba(10, 30, 60, .07);
  --shadow-lg: 0 12px 30px rgba(10, 30, 60, .16);
  background: #f4f6fa;
  color: #16233a;
}

body.theme-navy .app { background: #f4f6fa; }
body.theme-navy .topbar { background: #fff; border-bottom: 1px solid #e4eaf3; }
body.theme-navy .topbar h1 { color: #16233a; }
body.theme-navy .bell { background: #eef2f8; color: #1b4f8f; }

body.theme-navy .card { border: 1px solid #e4eaf3; box-shadow: var(--shadow); }

body.theme-navy .btn-primary {
  background: linear-gradient(180deg, #21599c, #17427a);
  box-shadow: 0 4px 12px rgba(16, 42, 78, .22);
}
body.theme-navy .btn-ghost { background: #eef2f8; color: #1b4f8f; }

body.theme-navy .bottom-nav { background: rgba(255, 255, 255, .96); border-top: 1px solid #e4eaf3; }
body.theme-navy .bottom-nav a { color: #6b7a90; }
body.theme-navy .bottom-nav a.on, body.theme-navy .bottom-nav a.active { color: #1b4f8f; }
body.theme-navy .nav-fab {
  background: linear-gradient(180deg, #21599c, #17427a);
  box-shadow: 0 8px 18px rgba(16, 42, 78, .30);
}

/* 登录页：深海军蓝 → 冷白 渐变，比明亮蓝更克制 */
body.theme-navy.login-body,
body.login-body.theme-navy {
  background: linear-gradient(170deg, #0d2140 0%, #17427a 46%, #eef2f8 100%);
}

/* 标签低饱和 */
body.theme-navy .chip.info, body.theme-navy .tag.info { background: #e9eff7; color: #1b4f8f; }
body.theme-navy .chip.ok { background: #e8f2eb; color: #1f6b3a; }
body.theme-navy .chip.warn { background: #fbf1e2; color: #9a6516; }

/* 图表条 */
body.theme-navy .bar, body.theme-navy .bar-fill { background: linear-gradient(180deg, #2a5c9e, #1b4f8f); }

/* 统计数字用深蓝而不是亮蓝 */
body.theme-navy .stat b, body.theme-navy .kpi-num { color: #1b4f8f; }
