/* ============================================================
   南顺 Lam Soon 投诉渠道 H5 — 设计令牌（移动端 px 适配）
   来源：lam-soon-design-system 规范，品牌红蓝组合
   ============================================================ */
:root {
  /* 品牌色 */
  --brand: #CA2647;
  --brand-light: #FDF2F4;
  --brand-dark: #A61F3B;
  --brand-blue: #334DA1;
  --brand-blue-dark: #002046;
  --brand-yellow: #ECAF00;
  /* 中性色 */
  --text-1: #002046;
  --text-2: #4A5568;
  --text-3: #7C7A7B;
  --bg: #F7F7F7;
  --card: #FFFFFF;
  --line: #E8E8E8;
  --gray-light: #F0F1F4;
  --gray: #B0AFB0;
  /* 功能色 */
  --success: #18A058;
  --warning: #ECAF00;
  --danger: #CA2647;
  --info: #2388FF;
  /* 圆角 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  /* 间距 */
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-blue); text-decoration: none; }

/* ---------- 顶栏 ---------- */
.app-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 16px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-blue) 100%);
  color: #fff;
}
.app-bar__logo {
  font-weight: 800; letter-spacing: .5px; font-size: 17px;
  display: flex; align-items: baseline; gap: 6px;
}
.app-bar__logo .en { font-size: 12px; font-weight: 600; opacity: .9; }
.app-bar__title { font-size: 15px; font-weight: 600; opacity: .95; }
.app-bar__spacer { flex: 1; }
.app-bar__action {
  font-size: 13px; color: #fff; opacity: .95;
  background: rgba(255,255,255,.18); border: none; border-radius: 20px;
  padding: 5px 12px; cursor: pointer;
}
.app-bar__action:active { background: rgba(255,255,255,.3); }

/* ---------- 内容区 ---------- */
.page { padding: var(--space-md); padding-bottom: 88px; }
.page--flush { padding: 0; padding-bottom: 88px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.card__title { font-size: 16px; font-weight: 600; color: var(--text-1); margin: 0 0 10px; }

/* ---------- 承诺横幅 ---------- */
.hero {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-blue) 100%);
  color: #fff; padding: 22px 20px; margin-bottom: var(--space-md);
}
.hero__title { font-size: 19px; font-weight: 700; margin: 0 0 4px; }
.hero__sub { font-size: 13px; opacity: .92; margin: 0 0 14px; }
.hero__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.hero__pill {
  font-size: 12px; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  padding: 5px 10px; border-radius: 20px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 46px; border-radius: var(--radius); border: none;
  font-size: 16px; font-weight: 600; cursor: pointer; width: 100%;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:active { background: var(--brand-dark); }
.btn--ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn--ghost:active { background: var(--brand-light); }
.btn--block { margin-top: var(--space-md); }
.btn--sm { height: 34px; font-size: 13px; width: auto; padding: 0 14px; border-radius: var(--radius-sm); }
.btn--muted { background: var(--gray-light); color: var(--text-2); }
.btn[disabled] { background: #D8DCE3; color: #fff; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { margin-bottom: var(--space-md); }
.field__label { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.field__label .req { color: var(--brand); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 12px; font-size: 15px; color: var(--text-1); background: #fff;
  font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); }
.textarea { min-height: 110px; resize: vertical; }
.field__hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }
.field__err { font-size: 12px; color: var(--danger); margin-top: 5px; }

/* ---------- 标签 / 状态 ---------- */
.tag {
  display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 20px;
  font-weight: 500;
}
.tag--brand { background: var(--brand-light); color: var(--brand-dark); }
.tag--blue { background: #EEF1FA; color: var(--brand-blue); }
.tag--warning { background: #FDF1E3; color: var(--brand-yellow); }
.tag--success { background: #E8F6EE; color: var(--success); }
.tag--muted { background: var(--gray-light); color: var(--text-2); }
.tag--info { background: #EAF3FF; color: var(--info); }
.status { font-weight: 600; }

/* ---------- 列表 ---------- */
.list { background: var(--card); border-radius: var(--radius-lg); overflow: hidden; }
.list__item {
  display: block; padding: 14px 16px; border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.list__item:last-child { border-bottom: none; }
.list__item:active { background: var(--brand-light); }
.list__row { display: flex; align-items: center; gap: 10px; }
.list__title { font-size: 15px; font-weight: 600; color: var(--text-1); flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list__meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px;
  width: 2px; background: var(--line);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
  content: ''; position: absolute; left: -16px; top: 4px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand);
}
.tl-item.is-internal::before { background: var(--brand-yellow); }
.tl-summary { font-size: 14px; color: var(--text-1); }
.tl-note {
  font-size: 12px; color: var(--brand-yellow); background: #FDF1E3;
  border-radius: var(--radius-sm); padding: 6px 8px; margin-top: 4px;
}
.tl-time { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- 看板 ---------- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: var(--space-md); }
.board__cell { background: var(--card); border-radius: var(--radius); padding: 12px; text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.board__num { font-size: 22px; font-weight: 700; color: var(--brand); }
.board__label { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  height: 56px; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 11px; cursor: pointer; gap: 2px;
}
.tabbar__item.is-active { color: var(--brand); font-weight: 600; }
.tabbar__item .ico { font-size: 20px; line-height: 1; }

/* ---------- 杂项 ---------- */
.empty { text-align: center; color: var(--text-3); padding: 48px 16px; font-size: 14px; }
.toast {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%);
  background: rgba(0,32,70,.92); color: #fff; padding: 12px 18px; border-radius: var(--radius);
  font-size: 14px; z-index: 50; max-width: 80%; text-align: center;
}
.toast--err { background: rgba(202,38,71,.95); }
.spinner {
  text-align: center; color: var(--text-3); padding: 40px; font-size: 14px;
}
.kv { display: flex; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: none; }
.kv__k { color: var(--text-3); width: 84px; flex: none; }
.kv__v { color: var(--text-1); flex: 1; word-break: break-all; }
.section-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 18px 4px 8px; }
