/* public/shared/app.css - 全站统一样式 + 页脚作者声明 */
:root {
  --primary: #2f6fed;
  --primary-dark: #1d4fc0;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2733;
  --muted: #6b7685;
  --border: #e2e8f0;
  --danger: #e0533d;
  --ok: #2e9e6b;
  --warn: #e0a93d;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, "Microsoft YaHei", "PingFang SC", "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
}
.container { max-width: 920px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 12px; padding-left: 10px; border-left: 4px solid var(--primary); }
h3 { font-size: 15px; margin: 14px 0 8px; color: var(--primary-dark); }
.muted { color: var(--muted); font-size: 13px; }
.btn { display: inline-block; background: var(--primary); color: #fff; border: none; padding: 10px 18px; border-radius: 8px; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: #eef2fb; color: var(--primary-dark); }
.btn.ghost { background: transparent; color: var(--primary); border: 1px solid var(--border); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
input[type=text], input[type=number], input[type=password], input[type=email], input[type=tel], select {
  width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; margin-top: 4px;
}
label.field { display: block; margin-bottom: 12px; font-size: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
/* 评分选项 */
.opt-group { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.opt { flex: 1; min-width: 90px; }
.opt input { display: none; }
.opt label { display: block; text-align: center; padding: 8px 6px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 13px; background: #fff; }
.opt input:checked + label { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }
.section-note { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.required-tag { color: var(--danger); font-size: 12px; font-weight: 600; }
.totals { background: #eef4ff; border: 1px solid #cfe0ff; border-radius: 10px; padding: 14px; }
.totals .t { display: flex; justify-content: space-between; padding: 3px 0; font-size: 14px; border-bottom: 1px dashed #d4e2ff; }
.totals .t:last-child { border-bottom: none; }
.totals b { color: var(--primary-dark); }
.code-box { background: #fff7e6; border: 1px solid #ffd591; border-radius: 10px; padding: 14px; text-align: center; margin: 12px 0; }
.code-box .code { font-size: 26px; font-weight: 800; letter-spacing: 2px; color: #c46a00; }
.alert { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin: 10px 0; }
.alert.ok { background: #e8f7ef; color: #1d7a4d; border: 1px solid #b6e3c9; }
.alert.warn { background: #fff5e6; color: #a8650a; border: 1px solid #ffd591; }
.alert.danger { background: #fdecea; color: #b23b27; border: 1px solid #f5b8ad; }
/* 页脚作者声明 */
.app-footer { text-align: center; font-size: 12px; color: var(--muted); padding: 18px 10px 30px; border-top: 1px solid var(--border); margin-top: 20px; }
.app-footer .author { color: #43506a; font-weight: 600; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: #eef2fb; color: var(--primary-dark); margin-left: 6px; }
.pill.red { background: #fdecea; color: #b23b27; }
.pill.green { background: #e8f7ef; color: #1d7a4d; }
/* 待办 / 状态徽标 */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.warn { background: #fff5e6; color: #a8650a; border: 1px solid #ffd591; }
.badge.ok { background: #e8f7ef; color: #1d7a4d; border: 1px solid #b6e3c9; }
/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(20,30,48,.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 14px; max-width: 560px; width: 100%; padding: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.25); max-height: 92vh; overflow: auto; }
.modal h2 { margin-top: 0; }
.modal .opt-group { max-height: 52vh; overflow: auto; }
.hidden { display: none !important; }
/* 移动端表格横向滚动容器（避免多列表格在手机上撑破布局） */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
