:root {
  --cr-logo-orange: #ea7818;
  --cr-yellow: #f5b51b;
  --cr-yellow-soft: #fff6d8;
  --cr-yellow-pale: #fffaf0;
  --cr-ink: #1c2924;
  --cr-green: #176d52;
  --cr-green-soft: #eaf5f0;
  --cr-red: #cf4b3e;
  --cr-blue: #3a6f92;
  --cr-orange: #dd7c32;
  --bg: #f2f4f2;
  --card: #ffffff;
  --line: #e7ebe7;
  --muted: #7a8580;
  --soft-text: #a0a8a4;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #e8ece9;
  color: var(--cr-ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button { border: 0; color: inherit; background: none; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { width: 1em; height: 1em; stroke-width: 2; }

.app-shell {
  position: relative;
  width: min(430px, 100vw);
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--bg);
  padding-bottom: calc(66px + env(safe-area-inset-bottom));
}
main { min-height: calc(100vh - 66px); }
.page { display: none; min-height: calc(100vh - 66px); }
.page.active { display: block; }
.app-shell.detail-open { padding-bottom: 0; }
.app-shell.detail-open .bottom-nav { display: none; }

.home-header {
  padding: calc(14px + env(safe-area-inset-top)) 16px 18px;
  color: var(--cr-ink);
  background: var(--cr-yellow);
}
.brand-row,
.greeting-row,
.page-header,
.section-heading,
.quality-brief-head,
.me-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-row > img {
  width: 126px;
  height: 46px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
}
.brand-actions { display: flex; gap: 4px; }
.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.icon-button:active { background: rgba(255,255,255,.38); }
.icon-button svg { width: 20px; height: 20px; }
.icon-button.has-dot::after {
  content: "";
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--cr-yellow);
  border-radius: 50%;
  background: var(--cr-red);
}
.greeting-row { gap: 14px; margin-top: 18px; }
.greeting-row > div { min-width: 0; }
.greeting-row span {
  color: rgba(28,41,36,.66);
  font-size: 11px;
  font-weight: 650;
}
.greeting-row h1 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 750;
}
.greeting-row h1 b { font-weight: 900; }
.greeting-row p {
  margin: 5px 0 0;
  color: rgba(28,41,36,.72);
  font-size: 12px;
}
.mini-avatar,
.profile-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--cr-logo-orange);
  font-size: 15px;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.mini-avatar span,
.profile-avatar span {
  color: #ffffff;
}
.today-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 17px;
  overflow: hidden;
  border: 1px solid rgba(28,41,36,.13);
  border-radius: 8px;
  background: rgba(255,255,255,.43);
}
.today-flow button {
  position: relative;
  min-width: 0;
  min-height: 62px;
  padding: 9px 4px;
  text-align: center;
}
.today-flow button + button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  bottom: 13px;
  width: 1px;
  background: rgba(28,41,36,.12);
}
.today-flow strong,
.today-flow span { display: block; }
.today-flow strong { font-size: 19px; line-height: 1; font-weight: 900; }
.today-flow span { margin-top: 6px; color: rgba(28,41,36,.66); font-size: 10px; font-weight: 650; }

.home-section {
  padding: 18px 16px;
  background: var(--card);
  border-bottom: 8px solid var(--bg);
}
.section-heading { gap: 12px; margin-bottom: 14px; }
.section-heading h2 {
  margin: 0;
  color: var(--cr-ink);
  font-size: 17px;
  font-weight: 850;
}
.section-heading button,
.section-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 11px;
}
.section-heading button svg { width: 13px; height: 13px; }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 8px;
}
.quick-grid button {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
}
.quick-icon,
.app-icon {
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--cr-ink);
  background: var(--cr-yellow-soft);
}
.quick-icon { width: 42px; height: 42px; }
.quick-icon svg { width: 21px; height: 21px; }
.quick-icon b,
.quick-grid button > b {
  position: absolute;
  top: -7px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 9px;
  color: #fff;
  background: var(--cr-red);
  font-size: 9px;
}
.quick-grid span { max-width: 100%; font-size: 11px; font-weight: 700; white-space: nowrap; }

.quality-brief {
  padding: 17px 16px 15px;
  color: #fff;
  background: var(--cr-ink);
  border-bottom: 8px solid var(--bg);
  cursor: pointer;
}
.quality-brief h2 { margin: 4px 0 0; font-size: 18px; }
.eyebrow { color: #b6c6be; font-size: 10px; font-weight: 750; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #d5e1db;
  font-size: 10px;
}
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: #47c58b; box-shadow: 0 0 0 4px rgba(71,197,139,.12); }
.quality-metrics { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; }
.quality-metrics div { padding: 0 12px; }
.quality-metrics div:first-child { padding-left: 0; }
.quality-metrics div + div { border-left: 1px solid rgba(255,255,255,.13); }
.quality-metrics strong,
.quality-metrics span { display: block; }
.quality-metrics strong { font-size: 21px; font-weight: 850; }
.quality-metrics span { margin-top: 4px; color: #9fb0a7; font-size: 10px; }
.quality-metrics .warning strong { color: #f5c84f; }
.quality-alert {
  min-height: 36px;
  display: grid;
  grid-template-columns: 20px minmax(0,1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 15px;
  padding: 8px 10px;
  border-left: 3px solid var(--cr-yellow);
  background: rgba(255,255,255,.07);
  font-size: 10px;
}
.quality-alert svg { color: var(--cr-yellow); width: 16px; height: 16px; }
.quality-alert b { color: #f5d679; font-weight: 700; }

.operation-list { border-top: 1px solid var(--line); }
.operation-item {
  min-height: 68px;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.operation-item:last-child { border-bottom: 0; }
.operation-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--cr-green);
  background: var(--cr-green-soft);
}
.operation-icon svg { width: 17px; height: 17px; }
.operation-item strong,
.operation-item span { display: block; }
.operation-item strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.operation-item span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.operation-item em { color: var(--cr-green); font-size: 11px; font-style: normal; font-weight: 750; }
.operation-item em.warn { color: var(--cr-red); }

.featured-news {
  display: block;
  position: relative;
  width: 100%;
  min-height: 150px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #536863;
  text-align: left;
}
.featured-news img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured-news::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,34,29,.04), rgba(20,34,29,.83)); }
.featured-news-copy { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 13px; }
.featured-news-copy span { color: #ffe690; font-size: 10px; font-weight: 750; }
.featured-news-copy h3 { margin: 5px 0 0; font-size: 15px; line-height: 1.45; }
.news-list { margin-top: 10px; }
.news-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.news-item:last-child { border-bottom: 0; }
.news-item strong { display: block; font-size: 13px; line-height: 1.45; }
.news-item span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.news-item time { color: var(--soft-text); font-size: 10px; }

.page-header {
  min-height: 84px;
  padding: calc(15px + env(safe-area-inset-top)) 16px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.page-header span { color: var(--muted); font-size: 10px; font-weight: 650; }
.page-header h1 { margin: 3px 0 0; font-size: 22px; font-weight: 900; }
.page-header .icon-button { background: #f4f6f4; }
.search-box {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 14px;
  padding: 0 12px;
  border: 1px solid #e1e6e2;
  border-radius: 7px;
  background: #fff;
}
.search-box svg { width: 16px; height: 16px; color: #909993; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--cr-ink); background: transparent; font-size: 12px; }
.search-box input::placeholder { color: #a6ada9; }

.message-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 8px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.message-shortcuts button {
  position: relative;
  min-height: 62px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  background: #fff;
  font-size: 10px;
  font-weight: 700;
}
.message-shortcuts svg { width: 20px; height: 20px; color: var(--cr-green); }
.message-shortcuts b { position: absolute; top: 8px; left: calc(50% + 9px); color: var(--cr-red); font-size: 9px; }
.message-list { background: #fff; }
.message-row {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 45px minmax(0,1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.message-avatar,
.contact-avatar {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--cr-green);
  font-size: 14px;
  font-weight: 850;
}
.message-avatar.yellow { color: var(--cr-ink); background: var(--cr-yellow); }
.message-avatar.blue { background: var(--cr-blue); }
.message-avatar.charcoal { background: #4b5852; }
.message-avatar.orange { background: var(--cr-orange); }
.message-avatar.red { background: var(--cr-red); }
.message-copy { min-width: 0; }
.message-copy strong { display: block; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.message-copy p { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.message-meta { align-self: stretch; display: grid; justify-items: end; align-content: space-between; padding: 2px 0; }
.message-meta time { color: var(--soft-text); font-size: 9px; }
.message-meta b { min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; border-radius: 9px; color: #fff; background: var(--cr-red); font-size: 9px; }
.message-meta i { color: var(--cr-yellow); }

.work-header { border-bottom: 0; }
.work-highlight {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--cr-ink);
  background: var(--cr-yellow);
}
.work-highlight span,
.work-highlight strong,
.work-highlight small { display: block; }
.work-highlight span { font-size: 10px; font-weight: 700; }
.work-highlight strong { margin-top: 2px; font-size: 22px; }
.work-highlight small { margin-top: 3px; color: rgba(28,41,36,.65); font-size: 10px; }
.work-highlight button { height: 34px; display: inline-flex; align-items: center; gap: 5px; padding: 0 12px; border-radius: 6px; color: #fff; background: var(--cr-ink); font-size: 11px; font-weight: 750; }
.work-highlight button svg { width: 14px; height: 14px; }
.work-category { margin-top: 8px; padding: 16px 14px 4px; background: #fff; }
.work-category h2 { margin: 0 0 5px 2px; font-size: 15px; }
.work-apps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.work-app {
  min-width: 0;
  min-height: 104px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  padding: 10px 4px;
  border-bottom: 1px solid #f1f3f1;
}
.work-app:active { background: #fafbf9; }
.app-icon { width: 38px; height: 38px; color: var(--cr-green); background: var(--cr-green-soft); }
.app-icon svg { width: 19px; height: 19px; }
.work-category:nth-child(2) .app-icon { color: var(--cr-red); background: #fff0ee; }
.work-category:nth-child(3) .app-icon { color: #80621a; background: var(--cr-yellow-soft); }
.work-category:nth-child(4) .app-icon { color: var(--cr-blue); background: #edf5f9; }
.work-app strong { width: 100%; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.work-app small { width: 100%; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.contact-actions { margin-bottom: 8px; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-actions button {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 30px minmax(0,1fr) 16px;
  gap: 8px;
  align-items: center;
  padding: 0 16px;
  text-align: left;
}
.contact-actions button + button { border-top: 1px solid var(--line); }
.contact-actions button > svg:first-child { color: var(--cr-green); }
.contact-actions button > svg:last-child { color: #b5bcb8; width: 13px; }
.contact-actions span { font-size: 13px; font-weight: 700; }
.contact-section { margin-bottom: 8px; padding: 14px 14px 0; background: #fff; }
.contact-list { border-top: 1px solid var(--line); }
.contact-row {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) 26px;
  gap: 10px;
  align-items: center;
  padding: 9px 2px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: 0; }
.contact-avatar { width: 38px; height: 38px; border-radius: 50%; background: #5d7168; font-size: 12px; }
.contact-copy { min-width: 0; }
.contact-copy strong { display: block; font-size: 13px; }
.contact-copy span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.contact-row > i { color: var(--cr-yellow); }

.me-header { padding: calc(15px + env(safe-area-inset-top)) 16px 16px; background: var(--cr-yellow); }
.me-topbar > span { font-size: 20px; font-weight: 900; }
.profile-summary {
  width: 100%;
  display: grid;
  grid-template-columns: 62px minmax(0,1fr) 18px;
  gap: 13px;
  align-items: center;
  margin-top: 18px;
  text-align: left;
}
.profile-summary .profile-avatar { width: 62px; height: 62px; font-size: 18px; }
.profile-copy { min-width: 0; }
.profile-copy strong,
.profile-copy small,
.profile-copy em { display: block; }
.profile-copy strong { font-size: 20px; }
.profile-copy small { margin-top: 5px; font-size: 12px; font-weight: 700; }
.profile-copy em { margin-top: 3px; overflow: hidden; color: rgba(28,41,36,.65); font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.profile-summary > svg { width: 16px; color: rgba(28,41,36,.56); }
.me-status { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 20px; border-top: 1px solid rgba(28,41,36,.13); }
.me-status button { padding: 13px 4px 0; }
.me-status strong,
.me-status span { display: block; }
.me-status strong { font-size: 14px; }
.me-status span { margin-top: 4px; color: rgba(28,41,36,.62); font-size: 9px; }
.me-group { margin-top: 8px; padding-left: 14px; background: #fff; }
.me-group button {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 31px minmax(0,1fr) auto 15px;
  gap: 8px;
  align-items: center;
  padding: 0 14px 0 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.me-group button:last-child { border-bottom: 0; }
.me-group button > svg:first-child { width: 19px; color: var(--cr-green); }
.me-group button > svg:last-child { width: 13px; color: #bcc2be; }
.me-group span { font-size: 13px; font-weight: 700; }
.me-group small { color: var(--muted); font-size: 10px; text-align: right; }
.company-signature { display: grid; justify-items: center; gap: 5px; padding: 24px 0 18px; }
.company-signature img { width: 92px; height: 38px; object-fit: contain; filter: grayscale(1); opacity: .55; }
.company-signature span { color: #a6ada9; font-size: 9px; }

.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(430px, 100vw);
  height: calc(64px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(5,1fr);
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid #dfe4e0;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
}
.bottom-nav button {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  color: #8a938e;
}
.bottom-nav svg { width: 20px; height: 20px; }
.bottom-nav span { font-size: 9px; font-weight: 700; }
.bottom-nav button.active { color: var(--cr-ink); }
.bottom-nav button.active::after { content: ""; position: absolute; bottom: 6px; width: 14px; height: 3px; border-radius: 2px; background: var(--cr-yellow); }
.bottom-nav b { position: absolute; top: 8px; left: calc(50% + 7px); min-width: 15px; height: 15px; display: grid; place-items: center; padding: 0 4px; border-radius: 8px; color: #fff; background: var(--cr-red); font-size: 8px; }

.detail-page { min-height: 100vh; padding-bottom: 24px; background: var(--bg); }
.detail-header {
  position: sticky;
  z-index: 10;
  top: 0;
  height: calc(58px + env(safe-area-inset-top));
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) 44px;
  align-items: end;
  padding: env(safe-area-inset-top) 8px 9px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(14px);
}
.detail-header button { height: 38px; display: grid; place-items: center; }
.detail-header button svg { width: 21px; height: 21px; }
.detail-header h1 { margin: 0; padding-bottom: 9px; overflow: hidden; font-size: 16px; font-weight: 850; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.detail-hero {
  padding: 17px 16px;
  background: #fff;
  border-bottom: 8px solid var(--bg);
}
.detail-hero.yellow { background: var(--cr-yellow); }
.detail-hero.dark { color: #fff; background: var(--cr-ink); }
.detail-hero span { color: var(--muted); font-size: 10px; font-weight: 700; }
.detail-hero.yellow span { color: rgba(28,41,36,.62); }
.detail-hero.dark span { color: #9fb0a7; }
.detail-hero h2 { margin: 5px 0 0; font-size: 21px; line-height: 1.3; }
.detail-hero p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.detail-hero.yellow p { color: rgba(28,41,36,.7); }
.detail-hero.dark p { color: #b7c4bd; }
.detail-tabs,
.filter-chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.detail-tabs::-webkit-scrollbar,
.filter-chips::-webkit-scrollbar { display: none; }
.detail-tabs button,
.filter-chips button { flex: 0 0 auto; min-height: 30px; padding: 0 12px; border: 1px solid #e0e5e1; border-radius: 6px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 700; }
.detail-tabs button.active,
.filter-chips button.active { color: var(--cr-ink); border-color: var(--cr-yellow); background: var(--cr-yellow-soft); }
.detail-section { margin-top: 8px; padding: 15px 14px; background: #fff; }
.detail-section > h3 { margin: 0 0 12px; font-size: 15px; }
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat-grid div { min-width: 0; padding: 13px 8px; background: #fff; }
.stat-grid strong,
.stat-grid span { display: block; }
.stat-grid strong { font-size: 18px; }
.stat-grid span { margin-top: 4px; color: var(--muted); font-size: 9px; }
.list-panel { background: #fff; }
.list-row {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: 0; }
.list-main { min-width: 0; }
.list-main > span { color: var(--cr-green); font-size: 9px; font-weight: 750; }
.list-main strong { display: block; margin-top: 3px; overflow: hidden; font-size: 13px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.list-main p { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.list-side { display: grid; justify-items: end; gap: 6px; }
.list-side time { color: var(--soft-text); font-size: 9px; }
.tag { min-height: 20px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 4px; color: var(--cr-green); background: var(--cr-green-soft); font-size: 8px; font-weight: 750; }
.tag.red { color: var(--cr-red); background: #fff0ee; }
.tag.yellow { color: #765a12; background: var(--cr-yellow-soft); }
.tag.gray { color: #69736e; background: #f0f2f0; }
.progress-track { height: 5px; overflow: hidden; border-radius: 3px; background: #edf0ed; }
.progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--cr-green); }
.approval-card { padding: 14px; background: #fff; border-bottom: 1px solid var(--line); }
.approval-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.approval-card-head span { color: var(--cr-green); font-size: 9px; font-weight: 750; }
.approval-card h3 { margin: 7px 0 0; font-size: 14px; line-height: 1.45; }
.approval-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 9px; }
.approval-card .progress-track { margin-top: 10px; }
.approval-actions { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 8px; margin-top: 13px; }
.approval-actions button { height: 32px; border: 1px solid #dde2de; border-radius: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.approval-actions button.primary { color: var(--cr-ink); border-color: var(--cr-yellow); background: var(--cr-yellow); }

.mail-toolbar { display: grid; grid-template-columns: 1fr 38px; gap: 8px; padding: 10px 12px; background: #fff; }
.mail-toolbar .search-box { margin: 0; }
.mail-toolbar > button { display: grid; place-items: center; border-radius: 7px; color: #fff; background: var(--cr-green); }
.mail-row { width: 100%; display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 10px; padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); background: #fff; }
.mail-row.unread { background: #fffdf6; }
.mail-sender-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #667a70; font-size: 10px; font-weight: 800; }
.mail-copy { min-width: 0; }
.mail-copy strong { display: block; font-size: 12px; }
.mail-copy h3 { margin: 4px 0 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mail-copy p { margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mail-tags { display: flex; gap: 5px; margin-top: 7px; }
.mail-tags span { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: 8px; }
.mail-tags svg { width: 10px; height: 10px; }
.mail-side { display: grid; justify-items: end; align-content: space-between; }
.mail-side time { color: var(--soft-text); font-size: 9px; }
.mail-side svg { width: 16px; color: #b3bbb6; }
.mail-side .starred { fill: var(--cr-yellow); color: var(--cr-yellow); }
.mail-detail { padding: 18px 16px; background: #fff; }
.mail-detail h2 { margin: 0; font-size: 20px; line-height: 1.45; }
.mail-from { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 10px; align-items: center; margin-top: 18px; }
.mail-from .mail-sender-icon { width: 42px; height: 42px; }
.mail-from strong,
.mail-from span { display: block; }
.mail-from strong { font-size: 13px; }
.mail-from span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.mail-body { margin-top: 20px; color: #3f4944; font-size: 13px; line-height: 1.8; }
.attachment-row { display: flex; align-items: center; gap: 9px; margin-top: 18px; padding: 11px; border: 1px solid var(--line); border-radius: 7px; background: #fafbf9; }
.attachment-row svg { flex: 0 0 auto; color: var(--cr-green); }
.attachment-row span { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mail-detail-actions { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 14px; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); }
.mail-detail-actions button { height: 38px; border: 1px solid #dce2de; border-radius: 6px; font-size: 11px; font-weight: 750; }
.mail-detail-actions button:first-child { border-color: var(--cr-yellow); background: var(--cr-yellow); }

.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: #dce2de; }
.timeline-item { position: relative; padding: 0 0 20px 8px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: -19px; top: 5px; width: 8px; height: 8px; border: 2px solid #fff; border-radius: 50%; background: var(--cr-green); box-shadow: 0 0 0 1px var(--cr-green); }
.timeline-item time { color: var(--cr-green); font-size: 10px; font-weight: 800; }
.timeline-item strong { display: block; margin-top: 4px; font-size: 13px; }
.timeline-item span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }

.temperature-hero { padding: 18px 16px; color: #fff; background: var(--cr-ink); }
.temperature-hero span { color: #9fb0a7; font-size: 10px; }
.temperature-reading { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.temperature-reading strong { font-size: 42px; line-height: 1; }
.temperature-reading em { color: #5ad39a; font-size: 11px; font-style: normal; font-weight: 800; }
.temperature-sub { display: flex; gap: 20px; margin-top: 14px; color: #b9c6c0; font-size: 10px; }
.sparkline { height: 86px; display: flex; align-items: flex-end; gap: 5px; margin-top: 14px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.sparkline i { flex: 1; min-height: 10px; background: var(--cr-yellow); opacity: .9; }
.site-switch { display: flex; gap: 7px; overflow-x: auto; padding: 10px 12px; background: #fff; }
.site-switch button { flex: 0 0 auto; height: 30px; padding: 0 11px; border: 1px solid #e0e5e1; border-radius: 6px; color: var(--muted); font-size: 9px; }
.site-switch button.active { color: var(--cr-ink); border-color: var(--cr-yellow); background: var(--cr-yellow-soft); }

.trace-search { padding: 16px; background: var(--cr-yellow); }
.trace-search label { display: block; font-size: 10px; font-weight: 750; }
.trace-input { height: 42px; display: grid; grid-template-columns: minmax(0,1fr) 42px; margin-top: 8px; border-radius: 7px; overflow: hidden; background: #fff; }
.trace-input input { min-width: 0; border: 0; outline: 0; padding: 0 12px; font-size: 12px; }
.trace-input button { display: grid; place-items: center; color: #fff; background: var(--cr-ink); }
.batch-card { margin: 10px 12px; padding: 14px; border: 1px solid var(--line); border-left: 4px solid var(--cr-green); border-radius: 7px; background: #fff; }
.batch-card-head { display: flex; justify-content: space-between; gap: 10px; }
.batch-card-head span { color: var(--muted); font-size: 9px; }
.batch-card h3 { margin: 5px 0 0; font-size: 14px; }
.batch-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.batch-info span,
.batch-info strong { display: block; }
.batch-info span { color: var(--muted); font-size: 8px; }
.batch-info strong { margin-top: 3px; font-size: 10px; }

.profile-page { padding-top: 8px; }
.profile-identity { display: grid; justify-items: center; gap: 7px; padding: 22px 16px; background: #fff; }
.profile-identity .profile-avatar { width: 70px; height: 70px; font-size: 20px; }
.profile-identity h2 { margin: 2px 0 0; font-size: 19px; }
.profile-identity p { margin: 0; color: var(--muted); font-size: 11px; }
.profile-list { margin-top: 8px; padding-left: 16px; background: #fff; }
.profile-row { min-height: 54px; display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 12px; align-items: center; padding-right: 16px; border-bottom: 1px solid var(--line); }
.profile-row:last-child { border-bottom: 0; }
.profile-row span { color: var(--muted); font-size: 11px; }
.profile-row strong { overflow-wrap: anywhere; font-size: 11px; font-weight: 650; text-align: right; }

.chat-screen { min-height: calc(100vh - 58px); display: flex; flex-direction: column; background: #eef1ee; }
.chat-messages { flex: 1; padding: 14px 12px 76px; }
.chat-bubble { display: grid; grid-template-columns: 34px minmax(0, 78%); gap: 8px; align-items: end; margin-bottom: 14px; }
.chat-bubble.mine { grid-template-columns: minmax(0, 78%); justify-content: end; }
.chat-bubble .contact-avatar { width: 32px; height: 32px; font-size: 10px; }
.bubble-copy small { display: block; margin: 0 0 4px 2px; color: var(--muted); font-size: 8px; }
.bubble-copy p { margin: 0; padding: 9px 11px; border-radius: 3px 8px 8px 8px; background: #fff; font-size: 12px; line-height: 1.55; }
.chat-bubble.mine .bubble-copy p { border-radius: 8px 3px 8px 8px; background: var(--cr-yellow); }
.chat-bubble.mine .bubble-copy small { text-align: right; }
.chat-composer { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(430px,100vw); min-height: 58px; display: grid; grid-template-columns: 32px minmax(0,1fr) 34px; gap: 8px; align-items: center; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #fff; }
.chat-composer input { height: 38px; min-width: 0; border: 1px solid #dce2de; border-radius: 6px; outline: 0; padding: 0 10px; font-size: 12px; }
.chat-composer button { height: 34px; display: grid; place-items: center; }
.chat-composer button:last-child { border-radius: 6px; color: var(--cr-ink); background: var(--cr-yellow); }

.sheet-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 10px;
  background: rgba(15,22,19,.45);
}
.sheet-backdrop[hidden] { display: none; }
.bottom-sheet { width: min(410px,100%); max-height: 88vh; overflow-y: auto; padding: 16px; border-radius: 8px 8px 0 0; background: #fff; }
.sheet-handle { width: 34px; height: 4px; margin: -7px auto 13px; border-radius: 2px; background: #d4dad6; }
.sheet-title { display: flex; align-items: center; justify-content: space-between; }
.sheet-title h2 { margin: 0; font-size: 17px; }
.sheet-title button { width: 32px; height: 32px; display: grid; place-items: center; }
.sheet-form { display: grid; gap: 10px; margin-top: 15px; }
.sheet-form input,
.sheet-form textarea { width: 100%; border: 1px solid #dce2de; border-radius: 6px; outline: 0; padding: 10px; font-size: 12px; }
.sheet-form textarea { min-height: 120px; resize: vertical; }
.sheet-submit { height: 40px; border-radius: 6px; color: var(--cr-ink); background: var(--cr-yellow); font-size: 12px; font-weight: 800; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom));
  transform: translate(-50%, 10px);
  max-width: 78vw;
  padding: 9px 13px;
  border-radius: 6px;
  color: #fff;
  background: rgba(28,41,36,.94);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
}
.toast.show { opacity: 1; transform: translate(-50%,0); }
.empty-state { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; color: var(--muted); text-align: center; }
.empty-state svg { width: 30px; height: 30px; color: #b3bbb6; }
.empty-state strong { color: var(--cr-ink); font-size: 13px; }
.empty-state span { font-size: 10px; }

@media (max-width: 350px) {
  .home-header { padding-left: 12px; padding-right: 12px; }
  .home-section { padding-left: 12px; padding-right: 12px; }
  .greeting-row h1 { font-size: 21px; }
  .today-flow span { font-size: 9px; }
  .quick-grid { column-gap: 5px; }
  .work-apps { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .work-app small { display: none; }
  .me-group small { max-width: 106px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (min-width: 760px) {
  body { padding: 22px 0; }
  .app-shell { min-height: calc(100vh - 44px); border-radius: 12px; box-shadow: 0 24px 60px rgba(27,42,35,.16); }
  .bottom-nav { bottom: 22px; border-radius: 0 0 12px 12px; }
  .chat-composer { bottom: 22px; }
}

/* 状态栏 / 刘海区域与页面顶部同色铺满（手机宽度生效，桌面预览保留灰色衬底） */
@media (max-width: 500px) {
  html[data-top="yellow"],
  html[data-top="yellow"] body { background: var(--cr-yellow); }
  html[data-top="white"],
  html[data-top="white"] body { background: #ffffff; }
}
