:root {
  color-scheme: light;
  --red: #e60012;
  --red-dark: #bd0010;
  --red-soft: #fff0f1;
  --ink: #19191b;
  --muted: #686b72;
  --line: #e7e7ea;
  --surface: #ffffff;
  --canvas: #f6f6f8;
  --green: #138a4b;
  --green-soft: #e9f8f0;
  --amber: #b55d00;
  --amber-soft: #fff4e5;
  --danger: #c71f31;
  --shadow: 0 8px 28px rgba(28, 29, 32, .08);
  --radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, "Noto Sans", "Noto Sans Arabic", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--canvas); color: var(--ink); }
html, body { overscroll-behavior-x: none; }
body { -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.skip-link { position: fixed; inset-inline-start: 12px; top: -60px; z-index: 999; background: #fff; color: #000; padding: 10px; }
.skip-link:focus { top: 12px; }
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 18px; background: var(--red); color: #fff; }
.splash p { margin: 0; font-size: 22px; font-weight: 750; letter-spacing: .02em; }
.brand-mark { width: 112px; aspect-ratio: 1; display: grid; place-items: center; border: 3px solid #fff; border-radius: 23%; color: #fff; }
.brand-mark span { font-size: 20px; font-weight: 900; letter-spacing: -.06em; }
.brand-mark--large { width: 132px; }
.spinner { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.login-page { min-height: 100dvh; display: flex; flex-direction: column; background: var(--surface); }
.login-hero { flex: 1; min-height: 54dvh; padding: calc(48px + var(--safe-top)) 28px 36px; display: flex; flex-direction: column; justify-content: flex-end; color: #fff; background: linear-gradient(145deg, #fa3042 0%, var(--red) 54%, #aa0010 100%); border-end-start-radius: 40px; }
.login-kicker { margin: 24px 0 7px; font-size: 12px; font-weight: 800; letter-spacing: .18em; opacity: .86; }
.login-hero h1 { margin: 0; max-width: 480px; font-size: clamp(30px, 8vw, 43px); line-height: 1.14; }
.login-hero > p:last-child { max-width: 460px; margin: 16px 0 0; font-size: 16px; line-height: 1.7; opacity: .91; }
.login-panel { padding: 30px 24px calc(28px + var(--safe-bottom)); }
.primary-button, .secondary-button, .danger-button { min-height: 50px; border: 0; border-radius: 14px; padding: 0 18px; font-weight: 760; cursor: pointer; }
.primary-button { width: 100%; color: #fff; background: var(--red); box-shadow: 0 8px 18px rgba(230,0,18,.23); }
.primary-button:disabled { opacity: .42; box-shadow: none; cursor: not-allowed; }
.secondary-button { color: var(--ink); background: #f0f0f2; }
.danger-button { color: var(--danger); background: var(--red-soft); }
.language-switcher { margin-top: 18px; display: flex; justify-content: center; gap: 7px; }
.language-switcher button { min-height: 44px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; color: var(--muted); background: #fff; }
.language-switcher button.is-active { color: var(--red); border-color: #ffb6bd; background: var(--red-soft); font-weight: 700; }
.privacy-note { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 12px; }

.app-shell { min-height: 100dvh; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: calc(64px + var(--safe-top)); padding: calc(10px + var(--safe-top)) 16px 10px; display: flex; align-items: center; gap: 10px; color: #fff; background: var(--red); box-shadow: 0 3px 14px rgba(125,0,10,.14); }
.topbar-brand { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; }
.topbar-brand div { min-width: 0; display: grid; }
.topbar-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.topbar-brand small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .78; font-size: 11px; }
.mini-mark { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 9px; font-weight: 900; }
.icon-button { position: relative; width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border: 0; color: inherit; background: transparent; border-radius: 50%; cursor: pointer; }
.icon-button:active { background: rgba(255,255,255,.15); }
.topbar-back span { font-size: 37px; line-height: 1; transform: translateY(-2px); }
.notification-button > span:first-child { font-size: 14px; color: #fff; }
.badge, .nav-badge { position: absolute; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; color: var(--red); background: #fff; border: 1px solid var(--red); font-size: 10px; font-weight: 850; }
.badge { top: 0; inset-inline-end: 0; }

#main { width: min(100%, 920px); min-height: calc(100dvh - 132px); margin: 0 auto; padding: 18px 16px calc(94px + var(--safe-bottom)); outline: none; }
.bottom-nav { position: fixed; z-index: 30; inset-inline: 0; bottom: 0; height: calc(70px + var(--safe-bottom)); padding: 7px 8px var(--safe-bottom); display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
.bottom-nav button { position: relative; min-width: 0; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #777980; background: transparent; font-size: 11px; cursor: pointer; }
.bottom-nav button.is-active { color: var(--red); font-weight: 760; }
.nav-icon { height: 24px; font-size: 22px; line-height: 1; }
.nav-badge { top: 0; inset-inline-start: calc(50% + 5px); color: #fff; background: var(--red); }

.hero-card { position: relative; overflow: hidden; padding: 22px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #ed2435, #c90011); box-shadow: var(--shadow); }
.hero-card::after { content: ""; position: absolute; width: 150px; height: 150px; inset-inline-end: -40px; top: -52px; border: 28px solid rgba(255,255,255,.08); border-radius: 50%; }
.eyebrow { margin: 0 0 5px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .78; }
.hero-card h2 { position: relative; z-index: 1; margin: 0; font-size: 27px; line-height: 1.25; }
.hero-card p { position: relative; z-index: 1; margin: 8px 0 0; line-height: 1.55; opacity: .88; }
.hero-action { position: relative; z-index: 1; margin-top: 20px; width: auto; color: var(--red); background: #fff; box-shadow: none; }

.section-heading { margin: 25px 2px 12px; display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-heading h2 { margin: 0; font-size: 19px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.text-button { border: 0; padding: 5px; color: var(--red); background: none; font-weight: 700; cursor: pointer; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.app-card { min-height: 134px; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); text-align: start; color: inherit; background: var(--surface); box-shadow: 0 3px 12px rgba(20,20,22,.04); cursor: pointer; }
.app-card:active { transform: scale(.985); }
.app-card-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--red); background: var(--red-soft); font-size: 20px; font-weight: 800; }
.app-card strong { margin-top: auto; padding-top: 13px; font-size: 15px; }
.app-card small { margin-top: 4px; color: var(--muted); line-height: 1.35; }

.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric { padding: 15px 10px; border-radius: 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); }
.metric strong { display: block; font-size: 24px; }
.metric span { color: var(--muted); font-size: 11px; }
.toolbar { margin-bottom: 14px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.filter-chip { flex: 0 0 auto; min-height: 36px; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; color: var(--muted); background: var(--surface); }
.filter-chip.is-active { border-color: var(--red); color: var(--red); background: var(--red-soft); font-weight: 700; }
.list { display: grid; gap: 11px; }
.list-card { width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); text-align: start; color: inherit; background: var(--surface); box-shadow: 0 2px 9px rgba(20,20,22,.035); }
button.list-card { cursor: pointer; }
.list-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.list-card h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.list-card p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.list-card-footer { margin-top: 13px; padding-top: 11px; display: flex; justify-content: space-between; gap: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.status { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.status--draft { color: #5f6268; background: #eeeef1; }
.status--open, .status--submitted, .status--rectification, .status--assigned, .status--rectifying { color: var(--amber); background: var(--amber-soft); }
.status--waiting, .status--awaiting_acceptance { color: #3953a4; background: #edf0ff; }
.status--closed, .status--accepted { color: var(--green); background: var(--green-soft); }
.status--rejected, .status--fail { color: var(--danger); background: var(--red-soft); }
.empty-state { padding: 46px 24px; text-align: center; border: 1px dashed #d1d2d6; border-radius: 20px; background: rgba(255,255,255,.55); }
.empty-state-icon { width: 58px; height: 58px; margin: 0 auto 15px; display: grid; place-items: center; border-radius: 20px; color: var(--red); background: var(--red-soft); font-size: 28px; }
.empty-state h2 { margin: 0; font-size: 18px; }
.empty-state p { margin: 8px auto 19px; max-width: 340px; color: var(--muted); line-height: 1.55; }

.form-card { margin-bottom: 12px; padding: 17px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label, .field-label { color: #44464c; font-size: 13px; font-weight: 700; }
.field select, .field textarea, .field input { width: 100%; min-height: 48px; border: 1px solid #d7d8dc; border-radius: 12px; padding: 11px 12px; color: var(--ink); background: #fff; outline: none; }
/* 上面那条是给"整行输入框"写的，但它连复选框/单选框一起撑成了整行 48 像素高
   ——派任务弹窗里的「要交现场照片」就被撑成一个巨大方块、文字挤成两行
   （2026-08-21 在生产页面上量出来的）。这里把它们排除掉。 */
.field input[type="checkbox"], .field input[type="radio"] {
  width: auto; min-height: 0; flex: 0 0 auto; padding: 0; margin: 0; border-radius: 4px;
}
.field textarea { min-height: 94px; resize: vertical; line-height: 1.55; }
.field select:focus, .field textarea:focus, .field input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(230,0,18,.08); }
.helper { color: var(--muted); font-size: 11px; line-height: 1.45; }
.sticky-actions { position: sticky; bottom: calc(77px + var(--safe-bottom)); z-index: 10; margin: 18px -5px 0; padding: 10px 5px; display: flex; gap: 10px; background: linear-gradient(transparent, var(--canvas) 20%); }
.sticky-actions > * { flex: 1; }

.progress-card { margin-bottom: 14px; padding: 16px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.score-ring { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; color: var(--red); background: conic-gradient(var(--red) var(--score-progress, 0%), #ececf0 0); }
.score-ring::before { content: ""; grid-area: 1/1; width: 46px; height: 46px; border-radius: 50%; background: #fff; }
.score-ring strong { position: relative; grid-area: 1/1; font-size: 15px; }
.progress-copy strong { display: block; font-size: 15px; }
.progress-copy small { color: var(--muted); }
.progress-track { height: 6px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #ececf0; }
.progress-track i { display: block; width: var(--completion, 0%); height: 100%; background: var(--red); border-radius: inherit; }
.autosave { font-size: 11px; color: var(--muted); }
.section-block { margin-top: 19px; }
.section-banner { position: sticky; top: calc(64px + var(--safe-top)); z-index: 9; margin-bottom: 8px; padding: 10px 12px; display: flex; justify-content: space-between; border-radius: 12px; color: #4a4c52; background: rgba(238,238,241,.95); backdrop-filter: blur(10px); font-size: 13px; font-weight: 800; }
.inspection-item { margin-bottom: 10px; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.inspection-item.is-fail { border-color: #f3a4ab; background: #fffafa; }
.inspection-item-number { width: 29px; height: 29px; flex: 0 0 29px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); background: #f0f0f2; font-size: 12px; font-weight: 800; }
.inspection-item-head { display: flex; gap: 10px; }
.inspection-item-title { flex: 1; }
.inspection-item-title strong { display: block; line-height: 1.45; }
.inspection-item-title small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.45; }
.score-pill { color: var(--red); font-size: 12px; font-weight: 800; white-space: nowrap; }
.verdict-control { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.verdict-control button { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); background: #fff; font-weight: 700; }
.verdict-control button.is-pass { color: var(--green); border-color: #80cba4; background: var(--green-soft); }
.verdict-control button.is-fail { color: var(--danger); border-color: #f09ca5; background: var(--red-soft); }
.issue-fields { margin-top: 13px; padding-top: 13px; border-top: 1px solid #f0d4d7; }
.photo-row { display: flex; gap: 8px; overflow-x: auto; }
.photo-thumb, .add-photo { width: 74px; height: 74px; flex: 0 0 74px; border-radius: 12px; }
.photo-thumb { object-fit: cover; background: #eee; }
.add-photo { border: 1px dashed #c9cacf; display: grid; place-items: center; color: var(--muted); background: #fafafa; font-size: 24px; }
.pending-photo { position: relative; width: 74px; height: 74px; flex: 0 0 74px; }
.pending-photo > button { position: absolute; inset-block-start: -5px; inset-inline-end: -5px; width: 24px; height: 24px; border: 2px solid #fff; border-radius: 50%; color: #fff; background: var(--danger); font-size: 16px; line-height: 18px; }
/* 小叉视觉上还是 24px，但用一个透明的 ::before 把【可点范围】撑到 44×44。
   苹果和谷歌都定 44 是有道理的：门店员工戴手套、屏幕有划痕，24px 的东西点不中。
   视觉不变、手指点得中——这是移动端的标准做法，别为了达标把叉画大。 */
.pending-photo > button::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; }
.load-more { width: 100%; margin-top: 14px; }

.finding-summary { padding: 17px; border-inline-start: 4px solid var(--red); border-radius: 0 var(--radius) var(--radius) 0; background: var(--surface); box-shadow: var(--shadow); }
[dir="rtl"] .finding-summary { border-inline-start: 4px solid var(--red); border-radius: var(--radius) 0 0 var(--radius); }
.timeline { margin: 18px 6px; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 27px 22px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 6px; top: 8px; bottom: -4px; width: 2px; background: var(--line); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 1px; top: 3px; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--red); }
.timeline li:last-child::before { display: none; }
.timeline strong { display: block; font-size: 14px; }
.timeline p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.review-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.profile-card { padding: 22px; border-radius: 24px; color: #fff; background: linear-gradient(135deg, #27282c, #101114); }
.avatar { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 20px; color: var(--red); background: #fff; font-size: 24px; font-weight: 900; }
.profile-card h2 { margin: 14px 0 3px; }
.profile-card p { margin: 0; opacity: .7; }
.settings-list { margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.settings-row { width: 100%; min-height: 55px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; color: inherit; background: transparent; text-align: start; }
.settings-row:last-child { border-bottom: 0; }
.settings-row small { color: var(--muted); }
.settings-row.sync-failure { color: var(--danger); background: var(--red-soft); }
.language-menu { display: grid; gap: 8px; }
.language-option { min-height: 48px; border: 1px solid var(--line); border-radius: 13px; color: inherit; background: #fff; }
.language-option.is-active { border-color: var(--red); color: var(--red); background: var(--red-soft); font-weight: 800; }

.modal-backdrop { position: fixed; inset: 0; z-index: 70; padding: 24px 16px calc(24px + var(--safe-bottom)); display: flex; align-items: flex-end; justify-content: center; background: rgba(7,7,9,.48); backdrop-filter: blur(3px); }
.modal { width: min(100%, 520px); max-height: 85dvh; overflow: auto; padding: 20px; border-radius: 24px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.modal h2 { margin: 0 0 6px; font-size: 20px; }
.modal > p { margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.modal-actions { margin-top: 18px; display: flex; gap: 9px; }
.modal-actions > * { flex: 1; }
.toast { position: fixed; z-index: 100; inset-inline: 18px; bottom: calc(88px + var(--safe-bottom)); width: fit-content; max-width: calc(100% - 36px); margin-inline: auto; padding: 12px 15px; border-radius: 13px; color: #fff; background: #25262a; box-shadow: var(--shadow); font-size: 13px; text-align: center; }
.toast.is-error { background: #8d1020; }
.offline-banner { position: sticky; top: calc(64px + var(--safe-top)); z-index: 18; margin: -18px -16px 14px; padding: 8px 16px; color: #714100; background: #ffdda8; text-align: center; font-size: 12px; }
.skeleton { min-height: 94px; border-radius: var(--radius); background: linear-gradient(90deg,#eee 25%,#f8f8f8 40%,#eee 60%); background-size: 400% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -100% 0; } }

@media (min-width: 720px) {
  #main { padding-inline: 24px; }
  .app-grid { grid-template-columns: repeat(4, 1fr); }
  .login-page { flex-direction: row; }
  .login-hero { min-height: 100dvh; flex: 1.25; border-radius: 0 42px 42px 0; }
  [dir="rtl"] .login-hero { border-radius: 42px 0 0 42px; }
  .login-panel { width: min(420px, 42vw); display: flex; flex-direction: column; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* 顶栏语言切换：位置与视觉照 ERP_BI_V3_PAGE_MASTER_STANDARD「右上角 中/阿语言切换」
   以及员工考核站的既有实现，不另造一套。Work 支持三语，所以是三个单字按钮。 */
.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 2px;
  margin-inline-end: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.language-switch button {
  min-height: 26px;
  min-width: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.language-switch button.is-active {
  background: #fff;
  color: var(--brand, #e21b23);
}

/* ── 学习地图 ── */
.learn-stage { margin: 16px 0 4px; }
.learn-stage-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.learn-stage-head h2 { font-size: 15px; margin: 0; }
.learn-stage-head span { font-size: 12px; color: var(--muted, #6b7280); }
.learn-stage-pass { width: 100%; margin-bottom: 10px; }

.learn-item { background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.learn-item.is-done { background: #f7fbf7; border-color: #cfe6cf; }
.learn-item-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.learn-code { font-size: 11px; color: var(--muted, #6b7280); font-weight: 700; }
.learn-item-head strong { font-size: 14px; }
/* 红线项：没学会前不准单独做这件事 */
.learn-gate-flag { color: var(--brand, #e21b23); font-size: 10px; }
.learn-round { font-size: 11px; color: var(--brand, #e21b23); font-weight: 700; }
.learn-detail { font-size: 12px; color: #4b5563; line-height: 1.6; margin: 0 0 6px; }
.learn-verify { font-size: 12px; color: #15803d; margin: 0 0 6px; }
.learn-reject { font-size: 12px; color: var(--brand, #e21b23); margin: 6px 0 0; }
.learn-status { font-size: 12px; color: var(--muted, #6b7280); margin-top: 6px; }

/* 三道验收的小灯：亮起来的就是已经点过的 */
.gate-dots { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.gate-dot { font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #f3f4f6; color: #9ca3af; border: 1px solid transparent; }
.gate-dot.is-done { background: #eaf7ea; color: #15803d; border-color: #b9e0b9; font-weight: 700; }

.learn-actions { display: flex; gap: 8px; margin-top: 10px; }
.learn-actions button { flex: 1; }
.learn-my-card .progress-track { margin-top: 8px; }

/* ── 任务（派活）── */
.task-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.task-due { font-size: 11px; color: var(--muted, #6b7280); }
.task-due.is-overdue { color: var(--brand, #e21b23); font-weight: 700; }
.task-detail { font-size: 13px; line-height: 1.6; color: #374151; margin: 0 0 10px; }
.task-meta { margin: 0; display: grid; gap: 8px; }
.task-meta > div { display: flex; gap: 10px; align-items: baseline; }
.task-meta dt { font-size: 12px; color: var(--muted, #6b7280); min-width: 76px; margin: 0; }
.task-meta dd { font-size: 13px; margin: 0; font-weight: 600; }
.task-round h3 { font-size: 13px; margin: 0 0 4px; }
.task-round p { font-size: 13px; margin: 0 0 4px; }
.task-round small { font-size: 11px; color: var(--muted, #6b7280); }
.task-review-note { font-size: 12px; color: var(--brand, #e21b23); margin-top: 6px; }
.task-requires { border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 10px 12px; }
.task-requires legend { font-size: 12px; color: var(--muted, #6b7280); padding: 0 4px; }
.task-requires label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; }
/* 勾选框固定大小、文字占满剩余宽度不换行挤成两截 */
.task-requires input[type="checkbox"] { inline-size: 18px; block-size: 18px; }
.task-requires label { font-weight: 400; color: var(--ink); }

/* ── 知识库 ── */
.kb-search input { width: 100%; }
.kb-chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 10px; -webkit-overflow-scrolling: touch; }
.kb-chip { flex: 0 0 auto; border: 1px solid var(--line, #e5e7eb); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 12px; color: #4b5563; }
.kb-chip.is-active { background: var(--brand, #e21b23); border-color: var(--brand, #e21b23); color: #fff; font-weight: 700; }
.kb-meta { font-size: 11px; color: var(--muted, #6b7280); }
.kb-file { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.kb-file-kind { flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: .5px; color: var(--brand, #e21b23); background: #fdeaea; border-radius: 8px; padding: 6px 8px; }
.kb-file-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kb-file-body strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-file-body small { font-size: 11px; color: var(--muted, #6b7280); }
.kb-file-go { flex: 0 0 auto; color: var(--muted, #6b7280); }

/* ── 组织架构 ── */
.org-group { margin: 14px 0; }
.org-card { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; }
.org-member { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line, #f0f1f3); }
.org-member:last-child { border-bottom: 0; }
.org-avatar { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #fdeaea; color: var(--brand, #e21b23); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.org-member-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.org-member-body strong { font-size: 13px; }
.org-member-body small { font-size: 11px; color: var(--muted, #6b7280); }

/* ── 考勤 ── */
.att-scan-card h3 { font-size: 14px; margin: 0 0 4px; }
.att-flag { background: #fdeaea !important; color: var(--brand, #e21b23) !important; }
.checkin-result { text-align: center; padding: 40px 16px; }
.checkin-result.is-flagged .checkin-mark { background: #fff4e5; color: #b45309; }
.checkin-mark { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; background: #eaf7ea; color: #15803d; display: grid; place-items: center; font-size: 34px; font-weight: 800; }
.checkin-kind { font-size: 18px; font-weight: 700; margin: 8px 0 4px; }
.checkin-geo { font-size: 13px; color: var(--muted, #6b7280); margin-bottom: 20px; }
.att-qr-card { background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: 16px; padding: 20px; text-align: center; }
.att-qr-card h2 { font-size: 16px; margin: 0 0 12px; }
.att-qr-svg svg { width: min(70vw, 300px); height: auto; }

/* ── 排班 ── */
.shift-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.shift-nav input { flex: 1 1 auto; }
.shift-times { display: flex; gap: 10px; }
.shift-times .field { flex: 1; }
.shift-del { flex: 0 0 auto; min-width: 34px; padding: 4px 8px; }

/* 交任务的附件区：上传按钮一行两个、已传清单一行一条带删除。
   RTL 下靠 flex 自己翻转，不写 left/right（阿语界面是整页镜像的）。 */
.task-require-hints { margin: 0 0 10px; padding-inline-start: 18px; font-size: 13px; color: var(--brand, #e21b23); }
.task-require-hints li { margin: 2px 0; }
.task-attach-actions { display: flex; gap: 8px; margin: 10px 0 6px; }
.task-attach-actions button { flex: 1; }
.task-attach-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.task-attach-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; }
.task-attach-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-attach-list a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-attach-list a:hover { text-decoration: underline; }
.link-button { border: 0; background: none; padding: 4px 2px; color: var(--brand, #e21b23);
  font: inherit; cursor: pointer; flex: 0 0 auto; }

/* 巡店主因标签：一排小胶囊，选中描红。RTL 自动翻转不写 left/right。 */
.reason-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.reason-chip { border: 1px solid var(--line); background: transparent; color: var(--muted, #6b7280);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; line-height: 1.5; cursor: pointer; }
.reason-chip.is-active { border-color: var(--red); color: var(--red); font-weight: 700; }
.verdict-control .na-button { font-size: 13px; }
/* 学习：锁定项目灰显 */
.learn-item.is-locked { opacity: .55; }
.learn-item .learn-lock { margin-inline-start: auto; }

/* ── 门店共享会话（0025）：谁打的分、改判历史、参与人 ── */
.scored-by {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 2px 0 6px; padding-inline-start: 42px;
  font-size: 12px; color: var(--muted, #6b7280);
}
.rescored-badge {
  padding: 1px 8px; border-radius: 999px; font-size: 11px;
  background: var(--warn-soft, #fef3c7); color: var(--warn-strong, #92400e);
}
.score-history { margin: 0 0 8px; padding-inline-start: 42px; font-size: 12px; }
.score-history > summary { cursor: pointer; color: var(--muted, #6b7280); }
.score-history ol { margin: 6px 0 0; padding-inline-start: 18px; display: grid; gap: 4px; }
.score-history li { color: var(--text, #111827); }
.score-history li small { margin-inline-start: 6px; color: var(--muted, #9ca3af); }
.participants-card {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 10px 14px; border-radius: 12px;
  background: var(--surface-soft, #f7f8fa);
}
.participants-label { font-size: 12px; color: var(--muted, #6b7280); }
.participants-list { display: flex; gap: 6px; flex-wrap: wrap; }
.participant-chip {
  padding: 2px 10px; border-radius: 999px; font-size: 12px;
  background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb);
}
.shared-hint { margin: 0 0 12px; font-size: 12px; color: var(--muted, #6b7280); }
.ongoing-card {
  margin: 0 0 12px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--warn-border, #fcd34d); background: var(--warn-soft, #fffbeb);
}
.ongoing-card h3 { margin: 0 0 4px; font-size: 14px; }
.ongoing-card p { margin: 0 0 8px; font-size: 12px; color: var(--muted, #6b7280); }
.ongoing-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 0; font-size: 13px;
}
.share-inline { margin-top: 10px; width: 100%; }

/* 共享会话：同事改动的提示条 */
.live-banner {
  display: block; width: 100%; margin: 0 0 10px; padding: 10px 14px;
  border: 1px solid var(--accent-border, #93c5fd); border-radius: 12px;
  background: var(--accent-soft, #eff6ff); color: var(--accent-strong, #1d4ed8);
  font-size: 13px; text-align: center; cursor: pointer;
}

/* 审批流程视图 */
.flow-list { display: grid; gap: 8px; margin-bottom: 12px; }
.flow-step {
  padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--border, #e5e7eb); background: var(--surface, #fff);
}
.flow-step.is-current { border-color: var(--accent-border, #93c5fd); background: var(--accent-soft, #eff6ff); }
.flow-step.is-approved { opacity: .75; }
.flow-step-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.flow-step-no {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-soft, #f3f4f6); font-size: 12px;
}
.flow-step-mode { font-weight: 600; }
.flow-step-status { margin-inline-start: auto; color: var(--muted, #6b7280); font-size: 12px; }
.flow-approvers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.flow-approver {
  display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
  padding: 3px 10px; border-radius: 999px; font-size: 12px;
  background: var(--surface-soft, #f7f8fa); border: 1px solid var(--border, #e5e7eb);
}
.flow-approver em { font-style: normal; color: var(--muted, #6b7280); }
.flow-approver b { color: var(--accent-strong, #1d4ed8); }
.flow-approver small { flex-basis: 100%; color: var(--muted, #6b7280); }
.flow-approver.is-approved { border-color: #86efac; }
.flow-approver.is-rejected, .flow-approver.is-returned { border-color: #fca5a5; }
.cc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; font-size: 12px; color: var(--muted, #6b7280); }
.apv-trail { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.apv-trail li { padding-inline-start: 10px; border-inline-start: 2px solid var(--border, #e5e7eb); font-size: 13px; }
.apv-trail li.is-decision { border-inline-start-color: var(--accent-border, #93c5fd); }
.apv-trail li p { margin: 4px 0 0; }
.apv-trail li small { color: var(--muted, #9ca3af); }
.apv-trail li.is-empty { color: var(--muted, #9ca3af); border: 0; }

/* ── 发起申请时的多级审批编辑器 ──
   跟上面只读的 .flow-step 用同一套视觉（同样的圆序号、同样的边框圆角），
   只是里面换成可操作的下拉。别另起一套观感。 */
.flow-edit-step {
  border: 1px solid var(--border, #e5e7eb); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px;
  background: var(--surface, #fff);
}
.flow-edit-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.flow-edit-mode { flex: 1; min-width: 0; }
/* 删除键靠右——跟站内其它「操作按钮统一靠右」一致 */
.flow-edit-head .flow-edit-remove { margin-inline-start: auto; font-size: 12px; padding: 4px 10px; }
.flow-edit-step .field { margin-bottom: 0; }
.flow-edit-approvers[multiple] { padding: 4px; }

/* ── 「消息」页里内嵌的聊天 ──
   高度用 dvh 而不是 vh：手机浏览器的地址栏会伸缩，vh 在滚动时会跳一下。
   减掉的是顶栏 + 底部导航 + 上面那两段标题的高度。 */
.chat-embed { position: relative; margin: 0 0 12px; border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px; overflow: hidden; background: var(--surface, #fff); }
.chat-embed iframe { display: block; width: 100%; height: calc(100dvh - 320px); min-height: 380px; border: 0; }
.chat-embed-status { position: absolute; inset-block-start: 0; inset-inline: 0; margin: 0;
  padding: 14px 16px; font-size: 14px; color: var(--muted, #6b7280);
  background: var(--surface, #fff); text-align: center; }
.chat-embed-status.is-error { color: var(--danger, #dc2626); }

/* 首页大按钮：有未完成草稿时是两条路——继续 / 另开一份。
   次要那条用 ghost 样式，不跟主按钮抢视线。阿语下自动跟着 RTL 翻。 */
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hero-actions .hero-action { margin: 0; }
.hero-action-secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.hero-action-secondary:hover { background: rgba(255, 255, 255, 0.14); }

/* ── 消息页：微信式 ──
   列表一行一个对话；对话页气泡 + 底部输入框。没有侧边栏、没有频道。 */
.chat-list { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; }
.chat-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border: 0; border-bottom: 1px solid #f0f0f0; background: #fff; text-align: start; cursor: pointer;
}
.chat-row:last-child { border-bottom: 0; }
.chat-row:active { background: #f5f5f5; }
.chat-avatar {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 700; font-size: 18px; color: #fff;
}
.chat-avatar.is-group { background: #e60012; }
.chat-avatar.is-direct { background: #3a7bd5; }
.chat-row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.chat-row-top, .chat-row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-row-name { font-size: 16px; font-weight: 600; color: #111; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row-time { font-size: 12px; color: #999; flex: none; }
.chat-row-preview { font-size: 14px; color: #777; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-unread {
  flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: #e60012; color: #fff; font-size: 12px; font-weight: 600; display: grid; place-items: center;
}

/* 对话页：消息区占满到底，输入条固定贴底（对话页没有底部导航，所以贴底就是贴屏幕底） */
.chat-room { display: flex; flex-direction: column; }
.chat-messages {
  overflow-y: auto; padding: 10px 6px 84px; display: flex; flex-direction: column; gap: 10px;
  background: #f2f2f2; border-radius: 14px; min-height: 60vh;
}
.chat-bubble-row { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; }
.chat-bubble-row.is-mine { align-self: flex-end; align-items: flex-end; }
.chat-sender { font-size: 12px; color: #888; margin: 0 6px 2px; }
.chat-bubble {
  padding: 9px 12px; border-radius: 14px; font-size: 16px; line-height: 1.45;
  background: #fff; color: #111; word-break: break-word;
}
/* 只有正文保留换行。pre-wrap 放在气泡容器上会把模板里的缩进换行全画成空行，气泡高得离谱（2026-08-23 踩过） */
.chat-text, .chat-translation { white-space: pre-wrap; }
.chat-bubble-row.is-mine .chat-bubble { background: #e60012; color: #fff; }
.chat-bubble-time { font-size: 11px; color: #aaa; margin: 2px 6px 0; }
.chat-compose {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; gap: 8px; padding: 8px 10px; background: #fff; border-top: 1px solid #e5e5e5;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
}
.chat-compose input { flex: 1; min-width: 0; font-size: 16px; padding: 10px 12px; border: 1px solid #ddd; border-radius: 20px; }
.chat-send { flex: none; padding: 0 16px; border: 0; border-radius: 20px; background: #e60012; color: #fff; font-size: 15px; font-weight: 600; }
.chat-send:active { opacity: .85; }

/* ── 消息页增强：长按菜单 / 引用 / 表情回应 / 置顶 / @ / 已读 / 翻译 / 多选 ── */
.chat-toolbar { display: flex; justify-content: flex-end; gap: 8px; padding: 0 0 8px; }
.chat-tool { border: 1px solid #ddd; background: #fff; color: #555; border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.chat-tool.is-on { background: #e60012; border-color: #e60012; color: #fff; }
.chat-pinned { display: flex; gap: 8px; align-items: center; background: #fff7e6; border: 1px solid #ffe2a8; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; color: #7a4b00; }
.chat-pin-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-pin-mark { font-size: 12px; margin-inline-end: 4px; }
.chat-system { align-self: center; font-size: 12px; color: #999; background: #e9e9e9; border-radius: 999px; padding: 3px 12px; }
.chat-quote { border-inline-start: 3px solid #e60012; background: rgba(0,0,0,.05); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.chat-bubble-row.is-mine .chat-quote { background: rgba(255,255,255,.18); border-inline-start-color: #fff; }
.chat-quote b { font-size: 12px; opacity: .8; }
.chat-quote span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-mention { color: #1a5fd6; font-weight: 600; }
.chat-bubble-row.is-mine .chat-mention { color: #ffe4a3; }
.chat-mention.is-me { background: #fff0b3; color: #7a4b00; border-radius: 4px; padding: 0 3px; }
.chat-translation { margin-top: 6px; padding-top: 6px; border-top: 1px dashed rgba(0,0,0,.15); font-size: 15px; color: #444; }
.chat-bubble-row.is-mine .chat-translation { border-top-color: rgba(255,255,255,.4); color: #fff; }
.chat-edited { font-size: 11px; opacity: .6; margin-inline-start: 6px; }
.chat-read { margin-inline-start: 6px; color: #aaa; }
.chat-read.is-read { color: #1a5fd6; }
.chat-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 6px 0; }
.chat-reaction { border: 1px solid #ddd; background: #fff; border-radius: 999px; padding: 2px 8px; font-size: 13px; }
.chat-reaction.is-mine { border-color: #e60012; background: #fdeeef; }
.chat-image { display: block; max-width: 240px; border-radius: 10px; overflow: hidden; }
.chat-image img { display: block; width: 100%; height: auto; }
.chat-image-full { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.chat-audio, .chat-video { display: block; max-width: 260px; margin-top: 4px; }
.chat-file { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; background: rgba(0,0,0,.05); border-radius: 8px; padding: 8px 10px; }
.chat-bubble-row.is-mine .chat-file { background: rgba(255,255,255,.18); }
.chat-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-size { font-size: 12px; opacity: .7; }
.chat-check { position: absolute; inset-inline-start: -28px; top: 50%; transform: translateY(-50%); font-size: 18px; }
.chat-bubble-row { position: relative; }
.chat-messages.is-select { padding-inline-start: 34px; }
.chat-bubble-row.is-selectable { cursor: pointer; }
.chat-bubble-row.is-selected .chat-bubble { outline: 2px solid #e60012; }
.chat-quote-bar { position: fixed; left: 0; right: 0; bottom: 58px; z-index: 21; display: flex; align-items: center; gap: 8px; background: #fff; border-top: 1px solid #e5e5e5; padding: 6px 12px; font-size: 13px; color: #555; }
.chat-quote-bar-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-inline-start: 3px solid #e60012; padding-inline-start: 8px; }
.chat-quote-bar-close { border: 0; background: transparent; font-size: 16px; color: #888; padding: 4px 8px; }
.chat-mention-panel { position: fixed; left: 8px; right: 8px; bottom: 62px; z-index: 22; background: #fff; border: 1px solid #e5e5e5; border-radius: 12px; box-shadow: 0 -4px 20px rgba(0,0,0,.08); max-height: 40vh; overflow-y: auto; }
.chat-mention-item { display: block; width: 100%; text-align: start; border: 0; background: transparent; padding: 12px 14px; border-bottom: 1px solid #f0f0f0; font-size: 15px; }
.chat-select-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 8px; background: #fff; border-top: 1px solid #e5e5e5; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.chat-select-bar span { flex: 1; color: #555; font-size: 14px; }
.chat-select-bar button { border: 1px solid #ddd; background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.modal-backdrop.is-sheet { align-items: flex-end; }
.modal--sheet { width: 100%; max-width: 100%; border-radius: 18px 18px 0 0; padding: 12px 12px calc(16px + env(safe-area-inset-bottom)); }
.chat-sheet-reactions { display: flex; justify-content: space-around; padding: 6px 0 12px; border-bottom: 1px solid #eee; margin-bottom: 8px; }
.chat-sheet-emoji { border: 0; background: #f5f5f5; border-radius: 50%; width: 44px; height: 44px; font-size: 22px; }
.chat-sheet-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sheet-item { border: 0; background: #f7f7f7; border-radius: 10px; padding: 12px 4px; font-size: 13px; color: #222; }
.sheet-item[data-danger] { color: #d40f1f; }
.chat-list--picker { max-height: 60vh; overflow-y: auto; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; }

/* ── 附件 / 语音 / 头像 ── */
.chat-plus, .chat-mic { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f2f2f2; font-size: 20px; line-height: 1; }
.chat-voice-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; display: flex; align-items: center; gap: 10px; background: #fff; border-top: 1px solid #e5e5e5; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
.chat-voice-dot { width: 10px; height: 10px; border-radius: 50%; background: #e60012; animation: chat-blink 1s infinite; }
@keyframes chat-blink { 50% { opacity: .2; } }
#chat-voice-time { flex: 1; font-variant-numeric: tabular-nums; color: #333; }
.chat-voice-bar button { border: 1px solid #ddd; background: #fff; border-radius: 999px; padding: 8px 16px; font-size: 14px; }
.chat-voice-bar .chat-voice-send { background: #e60012; border-color: #e60012; color: #fff; }
.chat-sheet-grid--3 { grid-template-columns: repeat(3, 1fr); }
.chat-sheet-grid--3 .sheet-item { font-size: 14px; line-height: 1.6; padding: 14px 4px; }
.chat-avatar { position: relative; overflow: hidden; }
.chat-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chat-bubble-avatar { position: absolute; inset-inline-start: -42px; top: 0; }
.chat-bubble-avatar .chat-avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 14px; border-radius: 8px; }
.chat-messages { padding-inline-start: 48px; }
.chat-messages.is-select { padding-inline-start: 74px; }
.chat-bubble-row.is-mine { margin-inline-end: 0; }
.avatar-thumb { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; vertical-align: middle; margin-inline-end: 6px; }

/* ── 列表顶部搜索/新建、筛选、通讯录、群资料、搜索页 ── */
.chat-list-top { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.chat-search-box { flex: 1; display: flex; align-items: center; gap: 8px; border: 0; background: #fff; border-radius: 12px; padding: 11px 14px; color: #999; font-size: 15px; text-align: start; }
.chat-search-input { flex: 1; width: 100%; border: 0; background: #fff; border-radius: 12px; padding: 11px 14px; font-size: 15px; }
.chat-plus-btn { flex: none; width: 42px; height: 42px; border: 0; border-radius: 12px; background: #e60012; color: #fff; font-size: 22px; line-height: 1; }
.chat-list-filters { display: flex; gap: 8px; margin-bottom: 10px; }
.chat-chip { border: 1px solid #ddd; background: #fff; color: #555; border-radius: 999px; padding: 5px 12px; font-size: 13px; }
.chat-chip.is-on { background: #e60012; border-color: #e60012; color: #fff; }
.chat-muted-mark { font-size: 12px; opacity: .6; }
.chat-unread.is-muted { background: #bbb; }
.chat-row.is-favorite { background: #fffaf0; }
.contacts-group h3 { font-size: 13px; color: #888; margin: 14px 4px 6px; font-weight: 600; }
.contacts-group h3 small { color: #bbb; margin-inline-start: 4px; }
.contact-check { font-size: 18px; color: #e60012; }
.contact-row.is-picked { background: #fdeeef; }
.contact-card { text-align: center; padding: 8px 0; }
.contact-card .chat-avatar { width: 72px; height: 72px; flex-basis: 72px; font-size: 28px; border-radius: 16px; margin: 0 auto 10px; }
.contact-card h2 { margin: 0 0 4px; font-size: 20px; }
.contact-card p { margin: 0 0 16px; color: #777; }
.contact-card .primary-button, .contact-card .danger-button { width: 100%; margin-top: 8px; }
.danger-button { min-height: 44px; border: 1px solid #e60012; background: #fff; color: #e60012; border-radius: 12px; padding: 10px 16px; font-size: 15px; font-weight: 600; width: 100%; }
.room-info-head { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.room-info-head .chat-avatar { width: 60px; height: 60px; flex-basis: 60px; font-size: 24px; border-radius: 14px; }
.room-info-head h2 { margin: 0 0 4px; font-size: 18px; }
.room-info-head p { margin: 0; color: #777; font-size: 13px; }
.settings-group { background: #fff; border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.settings-row.is-static { pointer-events: none; }
.member-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.member-cell { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; color: #333; }
.member-cell .chat-avatar { width: 46px; height: 46px; flex-basis: 46px; border-radius: 10px; }
.member-cell span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-cell em { font-style: normal; font-size: 10px; color: #e60012; }
.image-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.image-grid .chat-image { max-width: none; aspect-ratio: 1; }
.image-grid img { width: 100%; height: 100%; object-fit: cover; }
.form-card { background: #fff; border-radius: 14px; padding: 14px; }
.chat-sheet-grid--2 { grid-template-columns: repeat(2, 1fr); }
.chat-sheet-grid--2 .sheet-item { font-size: 14px; line-height: 1.6; padding: 16px 4px; }

/* ── 必读 / 加急 ── */
.chat-send-flags { display: flex; gap: 6px; padding: 6px 0 0; justify-content: flex-end; }
.chat-flag-mark { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 4px; padding: 1px 6px; margin-bottom: 4px; }
.chat-flag-mark.is-urgent { background: #fff0f0; color: #d40f1f; }
.chat-flag-mark.is-must { background: #fff7e6; color: #7a4b00; }
.chat-bubble-row.is-mine .chat-flag-mark { background: rgba(255,255,255,.25); color: #fff; }
.chat-ack-btn { margin: 4px 6px 0; border: 1px solid #e60012; background: #fff; color: #e60012; border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 600; }
.chat-ack-done { margin: 4px 6px 0; font-size: 12px; color: #1c7a4d; }
.chat-ack-status { margin: 4px 6px 0; border: 0; background: transparent; color: #1a5fd6; font-size: 12px; }
.ack-h { font-size: 13px; color: #888; margin: 14px 0 4px; }
