/* 心道阳光 · 客户端门户
   与内部系统区分：更柔和、更少术语、客户一眼看懂。
   移动端优先，因为客户多半从微信里点进来。 */

:root {
  --bg: #F7F7F5;
  --card: #FFFFFF;
  --ink: #1A1A18;
  --ink2: #5F5E5A;
  --ink3: #918F88;
  --line: #E6E5E0;
  --line2: #D3D1C7;
  --brand: #0F6E56;
  --brand-bg: #E1F5EE;
  --blue: #185FA5;
  --blue-bg: #E6F1FB;
  --amber: #854F0B;
  --amber-bg: #FAEEDA;
  --purple: #534AB7;
  --purple-bg: #EEEDFE;
  --red: #A32D2D;
  --red-bg: #FCEBEB;
  --green: #3B6D11;
  --green-bg: #EAF3DE;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.pl-shell { max-width: 880px; margin: 0 auto; padding: 0 16px 80px; }

/* 顶部 */
.pl-top {
  background: linear-gradient(160deg, #0F6E56, #14876B);
  color: #fff;
  padding: 26px 16px 62px;
}
.pl-top-in { max-width: 880px; margin: 0 auto; }
.pl-top h1 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.pl-top p { font-size: 13.5px; opacity: .82; margin-top: 4px; }
.pl-top .row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pl-top a { color: rgba(255,255,255,.85); font-size: 13px; text-decoration: none; }

/* 主体上浮 */
.pl-body { margin-top: -46px; position: relative; z-index: 1; }

/* 卡片 */
.pcard {
  background: var(--card);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.pcard > h2 {
  font-size: 16px; font-weight: 600; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.pcard > h2 .sub { font-size: 12.5px; font-weight: 400; color: var(--ink3); }

/* 问候卡 */
.greet {
  background: var(--card); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 14px;
  border: 0.5px solid var(--line);
}
.greet h2 { font-size: 18px; font-weight: 600; }
.greet p { font-size: 13.5px; color: var(--ink2); margin-top: 3px; }

/* 数据格 */
.pgrid { display: grid; gap: 10px; }
.pgrid.g2 { grid-template-columns: repeat(2, 1fr); }
.pgrid.g3 { grid-template-columns: repeat(3, 1fr); }
.pgrid.g4 { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }

.pstat { background: var(--bg); border-radius: 10px; padding: 13px 14px; }
.pstat .lb { font-size: 12.5px; color: var(--ink2); }
.pstat .vl { font-size: 21px; font-weight: 600; margin-top: 2px; letter-spacing: -0.01em; }
.pstat .ft { font-size: 11.5px; color: var(--ink3); margin-top: 1px; }

/* 标签 */
.ptag {
  display: inline-block; padding: 2px 9px; border-radius: 6px;
  font-size: 12px; line-height: 19px; background: var(--bg); color: var(--ink2);
  border: 0.5px solid var(--line2);
}
.ptag.brand { background: var(--brand-bg); color: var(--brand); border-color: transparent; }
.ptag.blue { background: var(--blue-bg); color: var(--blue); border-color: transparent; }
.ptag.amber { background: var(--amber-bg); color: var(--amber); border-color: transparent; }
.ptag.purple { background: var(--purple-bg); color: var(--purple); border-color: transparent; }
.ptag.red { background: var(--red-bg); color: var(--red); border-color: transparent; }
.ptag.green { background: var(--green-bg); color: var(--green); border-color: transparent; }

/* 导航 */
.pnav {
  display: flex; gap: 4px; overflow-x: auto; padding: 4px 0 12px;
  border-bottom: 0.5px solid var(--line); margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
}
.pnav a {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 8px;
  color: var(--ink2); text-decoration: none; font-size: 14px;
  transition: background .12s;
}
.pnav a:hover { background: var(--card); }
.pnav a.on { background: var(--brand-bg); color: var(--brand); font-weight: 500; }
.pnav a .badge {
  display: inline-block; min-width: 17px; height: 17px; line-height: 17px;
  background: var(--red); color: #fff; border-radius: 9px;
  font-size: 11px; padding: 0 5px; margin-left: 4px; vertical-align: 1px;
}

/* 列表行 */
.prow {
  padding: 13px 0; border-bottom: 0.5px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
}
.prow:last-child { border-bottom: none; }
.prow .t { font-size: 15px; font-weight: 500; }
.prow .d { font-size: 13px; color: var(--ink2); margin-top: 3px; line-height: 1.6; }
.prow .r { text-align: right; flex: 0 0 auto; }
.prow .r .amt { font-size: 16px; font-weight: 600; }

/* 表单 */
.pfield { margin-bottom: 14px; }
.pfield label { display: block; font-size: 13.5px; color: var(--ink2); margin-bottom: 5px; }
input, select, textarea {
  font-family: inherit; font-size: 15px; padding: 10px 12px; width: 100%;
  border: 0.5px solid var(--line2); border-radius: 9px;
  background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15,110,86,.1);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.7; }

button, .btn {
  font-family: inherit; font-size: 15px; padding: 10px 20px; cursor: pointer;
  border: 0.5px solid var(--line2); border-radius: 9px; background: #fff;
  color: var(--ink); display: inline-flex; align-items: center; gap: 6px;
  transition: background .12s;
}
button:hover, .btn:hover { background: var(--bg); }
button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
button.primary:hover { background: #0C5A46; }
button.ghost { background: transparent; border-color: transparent; color: var(--brand); }
button.sm { padding: 6px 12px; font-size: 13.5px; border-radius: 8px; }
button.block { width: 100%; justify-content: center; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* 提示条 */
.pnote {
  border-radius: 9px; padding: 11px 14px; font-size: 13.5px;
  line-height: 1.65; margin-bottom: 14px;
}
.pnote.info { background: var(--blue-bg); color: #0C447C; }
.pnote.warn { background: var(--amber-bg); color: var(--amber); }
.pnote.bad { background: var(--red-bg); color: var(--red); }
.pnote.good { background: var(--brand-bg); color: var(--brand); }

/* 弹层 */
.pmask {
  position: fixed; inset: 0; background: rgba(20,20,18,.45);
  display: none; align-items: flex-end; justify-content: center;
  z-index: 100; overflow-y: auto;
}
.pmask.on { display: flex; }
@media (min-width: 700px) {
  .pmask { align-items: center; padding: 20px; }
  .pmodal { border-radius: 14px; margin: auto; }
}
.pmodal {
  background: #fff; width: 100%; max-width: 520px;
  border-radius: 14px 14px 0 0; padding: 24px 22px 28px;
}
.pmodal h3 { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.pmodal-foot { display: flex; gap: 10px; margin-top: 18px; }
.pmodal-foot button { flex: 1; justify-content: center; }

/* 简报正文 */
.brief-body {
  font-size: 15px; line-height: 1.9; color: #2a2a28;
  background: #FCFCFB; border: 0.5px solid var(--line);
  border-radius: 10px; padding: 16px 18px; margin-top: 12px;
  white-space: pre-wrap; word-break: break-word;
}

/* 消息气泡 */
.chat { display: grid; gap: 12px; }
.bub { max-width: 78%; padding: 11px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.7; }
.bub.me { margin-left: auto; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.bub.you { background: var(--card); border: 0.5px solid var(--line); border-bottom-left-radius: 4px; }
.bub .t { font-size: 11.5px; opacity: .7; margin-top: 4px; }

/* 进度条 */
.pbar { height: 7px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.pbar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }

.empty { text-align: center; padding: 36px 20px; color: var(--ink3); font-size: 14px; }
.empty a { color: var(--brand); }

.kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--ink3); font-size: 13px; }
.kv dd { margin: 0; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

@media (max-width: 560px) {
  .pgrid.g3, .pgrid.g4 { grid-template-columns: repeat(2, 1fr); }
  .pl-top h1 { font-size: 19px; }
}
