:root {
  --orange: #f15a24;
  --red: #d71920;
  --blue: #1684e3;
  --cyan: #22c6c8;
  --green: #16c58f;
  --yellow: #ffbd2e;
  --cms-red: #cf142b;
  --cms-blue: #155aa8;
  --cms-navy: #111827;
  --ink: #293946;
  --muted: #8b98a1;
  --line: #edf0f2;
  --bg: #f3f5f8;
  --card: #fff;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: #e9edf3;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}
button, input { font: inherit; }
button { border: 0; cursor: pointer; background: transparent; color: inherit; }

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

.cms-home {
  padding: 16px 14px 18px;
  color: #fff;
  background:
    linear-gradient(148deg, rgba(207,20,43,.93) 0 26%, rgba(21,90,168,.94) 27% 61%, #13233e 62% 100%);
  position: relative;
  overflow: hidden;
}
.cms-home::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 0 22%, rgba(255,255,255,.12) 23% 24%, transparent 25% 100%),
    linear-gradient(28deg, transparent 0 54%, rgba(255,255,255,.08) 55% 64%, transparent 65%);
  pointer-events: none;
}
.cms-appbar,
.market-strip,
.desk-card,
.command-row {
  position: relative;
  z-index: 1;
}
.cms-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cms-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.cms-brand img {
  width: 132px;
  height: 42px;
  padding: 4px 6px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
}
.cms-brand div { min-width: 0; }
.cms-brand strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}
.cms-brand span {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,.72);
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}
.cms-home .scan-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}
.market-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 8px;
  margin-top: 18px;
}
.market-strip div {
  min-height: 58px;
  padding: 8px 9px;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.market-strip span,
.market-strip em {
  display: block;
  font-size: 10px;
  font-style: normal;
  color: rgba(255,255,255,.7);
}
.market-strip strong {
  display: block;
  margin: 4px 0 3px;
  font-size: 16px;
  line-height: 1.05;
  white-space: nowrap;
}
.market-strip em { color: #3ee7a2; font-weight: 850; }
.market-strip em.down { color: #ff9ca9; }
.desk-card {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 14px;
  padding: 17px 15px;
  border-radius: 18px;
  color: var(--cms-navy);
  background: linear-gradient(135deg, #fff, #f7fbff);
  box-shadow: 0 16px 34px rgba(9,18,35,.2);
}
.desk-copy { flex: 1; min-width: 0; }
.desk-copy span {
  color: var(--cms-red);
  font-size: 12px;
  font-weight: 900;
}
.desk-copy h1 {
  margin: 7px 0 7px;
  font-size: 25px;
  line-height: 1.16;
  font-weight: 920;
}
.desk-copy p {
  margin: 0;
  color: #657383;
  font-size: 12px;
  line-height: 1.45;
}
.desk-card button {
  height: 38px;
  padding: 0 14px;
  flex: 0 0 auto;
  border-radius: 20px;
  color: #fff;
  background: var(--cms-red);
  font-size: 13px;
  font-weight: 900;
}
.command-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.command-row button {
  min-height: 68px;
  padding: 9px 6px;
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.13);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.command-row i {
  display: block;
  margin-bottom: 7px;
  font-size: 18px;
}
.command-row span {
  display: block;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}
.section-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}
.section-headline span {
  display: block;
  color: var(--cms-blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
}
.section-headline h2 {
  margin: 3px 0 0;
  color: var(--cms-navy);
  font-size: 19px;
  font-weight: 900;
}
.section-headline button {
  height: 28px;
  padding: 0 12px;
  border-radius: 14px;
  color: var(--cms-blue);
  background: #eef5ff;
  font-size: 12px;
  font-weight: 850;
}
.deal-board,
.cms-workbench,
.risk-panel {
  margin: 12px 14px 0;
}
.deal-board {
  padding: 15px 13px 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17,24,39,.06);
}
.deal-list {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}
.deal-list article {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px;
  border-radius: 12px;
  background: #f7f9fc;
}
.deal-list i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  color: #fff;
  background: var(--cms-blue);
  font-size: 15px;
}
.deal-list article:nth-child(2) i { background: #cf142b; }
.deal-list article:nth-child(3) i { background: #16a085; }
.deal-list div { flex: 1; min-width: 0; }
.deal-list strong {
  display: block;
  font-size: 14px;
  color: var(--cms-navy);
}
.deal-list span {
  display: block;
  margin-top: 4px;
  color: #7b8794;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.deal-list em {
  padding: 5px 9px;
  border-radius: 99px;
  color: var(--cms-red);
  background: #fff1f3;
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.cms-workbench {
  padding: 15px 12px 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17,24,39,.05);
}
.cms-workbench .compact-grid {
  grid-template-columns: repeat(5, 1fr);
  padding: 12px 0 0;
  background: transparent;
}
.cms-workbench .icon-grid button {
  min-height: 63px;
  padding: 3px 1px;
}
.cms-workbench .icon-grid i {
  width: 29px;
  height: 29px;
  border-radius: 10px;
  font-size: 14px;
}
.cms-workbench .icon-grid span {
  margin-top: 6px;
  color: #3d4b58;
  font-size: 12px;
}
.risk-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #fff6f7);
  box-shadow: 0 8px 22px rgba(17,24,39,.05);
}
.risk-panel div { flex: 1; min-width: 0; }
.risk-panel span {
  color: var(--cms-red);
  font-size: 12px;
  font-weight: 900;
}
.risk-panel strong {
  display: block;
  margin-top: 5px;
  color: var(--cms-navy);
  font-size: 15px;
}
.risk-panel p {
  margin: 5px 0 0;
  color: #7b8794;
  font-size: 12px;
  line-height: 1.45;
}
.risk-panel button {
  width: 54px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 17px;
  color: #fff;
  background: var(--cms-red);
  font-size: 13px;
  font-weight: 900;
}

.home-hero {
  min-height: 168px;
  padding: 18px 16px 20px;
  background:
    radial-gradient(circle at 58% 65%, rgba(255, 196, 86, .55), transparent 15%),
    linear-gradient(180deg, #fff5e4 0%, #fff8eb 72%, #f7fbf8 100%);
  position: relative;
  overflow: hidden;
}
.home-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background:
    linear-gradient(135deg, transparent 28%, rgba(22,197,143,.18) 29% 36%, transparent 37%),
    linear-gradient(25deg, rgba(22,197,143,.16) 0 22%, transparent 23%),
    linear-gradient(160deg, transparent 54%, rgba(21,132,227,.12) 55% 68%, transparent 69%);
}
.hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero-top img {
  width: 118px;
  height: 36px;
  object-fit: contain;
  object-position: left center;
}
.scan-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #7b8a94;
  font-size: 18px;
}
.home-hero h1 {
  position: relative;
  z-index: 2;
  margin: 36px 0 8px;
  text-align: center;
  color: var(--orange);
  font-size: 27px;
  line-height: 1.2;
  font-weight: 900;
}
.home-hero p {
  position: relative;
  z-index: 2;
  margin: 0;
  text-align: center;
  color: rgba(241,90,36,.76);
  font-size: 12px;
  font-weight: 700;
}

.tile-matrix {
  display: grid;
  grid-template-columns: 56px repeat(4, 1fr);
  margin: 0 15px;
  transform: translateY(-1px);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid white;
  box-shadow: 0 4px 12px rgba(41,57,70,.05);
}
.tile-matrix button, .tile-matrix .rail {
  min-height: 58px;
  border-right: 1px solid white;
  border-bottom: 1px solid white;
}
.tile-matrix button {
  position: relative;
  text-align: left;
  padding: 8px 8px;
  background: #eef7ff;
}
.tile-matrix button:nth-child(n+7):nth-child(-n+10) { background: #fff3e7; }
.tile-matrix button:nth-child(n+12) { background: #ebfbf7; }
.tile-matrix span {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 780;
}
.tile-matrix i {
  position: absolute;
  right: 10px;
  bottom: 9px;
  color: rgba(22,132,227,.66);
  font-size: 20px;
}
.tile-matrix button:nth-child(n+7):nth-child(-n+10) i { color: rgba(241,90,36,.72); }
.tile-matrix button:nth-child(n+12) i { color: rgba(34,198,200,.72); }
.rail {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.28;
}
.rail-blue { background: linear-gradient(180deg, #329df5, #1684e3); }
.rail-red { background: linear-gradient(180deg, #ff6b5d, #f15a24); }
.rail-green { background: linear-gradient(180deg, #23d1b8, #14b990); }

.icon-grid {
  display: grid;
  gap: 0;
}
.compact-grid {
  grid-template-columns: repeat(5, 1fr);
  padding: 16px 8px 6px;
  background: #fff;
}
.icon-grid button {
  min-height: 70px;
  padding: 4px 2px;
  text-align: center;
}
.icon-grid i {
  width: 31px;
  height: 31px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  color: white;
  font-size: 16px;
}
.icon-grid span {
  display: block;
  margin-top: 7px;
  color: #53626c;
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}
.icon-grid button:nth-child(6n+1) i { background: var(--blue); }
.icon-grid button:nth-child(6n+2) i { background: var(--yellow); }
.icon-grid button:nth-child(6n+3) i { background: var(--green); }
.icon-grid button:nth-child(6n+4) i { background: var(--cyan); }
.icon-grid button:nth-child(6n+5) i { background: #ff8a00; }
.icon-grid button:nth-child(6n) i { background: #3b82f6; }

.remind-block { padding: 18px 15px 0; }
h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 850;
}
.remind-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 126px;
  padding: 15px 12px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(41,57,70,.04);
}
.remind-card > i {
  margin-top: 3px;
  color: var(--cyan);
  font-size: 22px;
}
.remind-card div { flex: 1; min-width: 0; }
.remind-card strong {
  display: block;
  color: #344650;
  font-size: 15px;
  line-height: 1.45;
}
.remind-card em { color: var(--orange); font-style: normal; }
.remind-card p, .remind-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.remind-card button {
  min-width: 72px;
  height: 34px;
  border: 1px solid var(--orange);
  border-radius: 18px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 800;
}
.notice-banner {
  margin: 14px 15px 18px;
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border-radius: 8px;
  background: linear-gradient(100deg, #fff4e5, #fff 72%);
}
.notice-banner div { flex: 1; min-width: 0; }
.notice-banner span {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  color: #fff;
  background: var(--orange);
  font-size: 12px;
  font-weight: 800;
}
.notice-banner strong {
  display: block;
  margin-top: 7px;
  color: var(--orange);
  font-size: 22px;
  line-height: 1.2;
}
.notice-banner p {
  margin: 8px 0 0;
  color: #6f5a48;
  font-size: 13px;
  line-height: 1.4;
}
.notice-banner button {
  width: 56px;
  height: 28px;
  border-radius: 14px;
  color: #fff;
  background: var(--orange);
  font-size: 13px;
  font-weight: 800;
}

.top-tabs {
  height: 92px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  padding: 0 44px 18px;
  background: #fff;
}
.top-tabs button {
  position: relative;
  color: #a8b0b6;
  font-size: 20px;
  font-weight: 800;
  padding-bottom: 8px;
}
.top-tabs button.active { color: var(--ink); }
.top-tabs button.active::after,
.seg-tabs button.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 28px;
  height: 3px;
  border-radius: 99px;
  background: var(--orange);
  transform: translateX(-50%);
}
.todo-empty {
  margin: 14px 15px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #fff;
  border-radius: 4px;
}
.todo-empty i {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
}
.todo-empty strong { font-size: 17px; }
.todo-empty p { margin: 7px 0 0; color: #a8b0b6; font-size: 14px; }
.todo-list { padding: 0 15px 20px; }
.todo-card, .approval-item, .record-card {
  margin-bottom: 12px;
  padding: 14px;
  background: #fff;
  border-radius: 8px;
}
.todo-card strong, .approval-item strong { display: block; font-size: 15px; }
.todo-card p, .approval-item p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.page-title {
  height: 92px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  padding: 0 16px 18px;
  background: #fff;
}
.page-title.centered { display: flex; align-items: end; justify-content: center; }
.page-title h1 {
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 850;
}
.plain-btn {
  justify-self: start;
  color: var(--orange);
  font-size: 14px;
}
.seg-tabs {
  height: 70px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: end;
  padding-bottom: 13px;
  background: #fff;
}
.seg-tabs button {
  position: relative;
  padding-bottom: 9px;
  color: #b3bac0;
  font-size: 22px;
  font-weight: 850;
}
.seg-tabs button.active { color: #111; }
.filter-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 15px;
  background: #fff;
  border-top: 1px solid var(--line);
}
.filter-row button {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  border: 1px solid #dde3e8;
  border-radius: 17px;
  color: #354650;
  background: #fff;
  font-size: 14px;
}
.record-list { padding: 18px 15px 24px; }
.date-pill {
  width: max-content;
  margin: 0 auto 12px;
  padding: 5px 26px;
  border-radius: 14px;
  background: #e8edf1;
  color: #a8b0b6;
  font-size: 13px;
}
.record-card {
  padding: 16px;
  border-radius: 6px;
}
.record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.record-head div { display: flex; align-items: center; gap: 8px; }
.record-head i { color: var(--cyan); font-size: 22px; }
.record-head strong { font-size: 16px; }
.record-head span { color: #222; font-size: 14px; }
.record-title {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 18px;
  font-weight: 850;
}
.record-title em { font-style: normal; color: #2e4a54; }
.record-meta {
  margin: 16px 0 0 24px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
.record-meta li::marker { color: #dbe1e5; }

.quick-approve {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 16px 15px;
}
.quick-approve button {
  height: 82px;
  border-radius: 6px;
  color: #fff;
  font-size: 17px;
  font-weight: 850;
  text-align: right;
  padding: 0 16px;
}
.quick-approve button:first-child { background: linear-gradient(135deg, #4aa1f5, #72b7ff); }
.quick-approve button:last-child { background: linear-gradient(135deg, #ffad2b, #ffc15f); }
.white-section, .stats-card {
  margin: 0 15px 12px;
  padding: 16px 0 8px;
  background: #fff;
  border-radius: 4px;
}
.white-section h2, .stats-card h2 {
  padding: 0 16px;
  margin: 0 0 14px;
  font-size: 19px;
}
.icon-grid.four { grid-template-columns: repeat(4, 1fr); padding: 0 12px 6px; }
.stats-card { padding-bottom: 20px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-head button {
  padding-right: 16px;
  color: #a8b0b6;
  font-size: 14px;
}
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  padding-top: 18px;
}
.stats-row strong {
  display: block;
  color: var(--blue);
  font-size: 27px;
}
.stats-row div:nth-child(2) strong { color: var(--red); }
.stats-row div:nth-child(3) strong { color: #b4bec6; }
.stats-row span { display: block; margin-top: 8px; color: #53626c; font-size: 14px; font-weight: 740; }
.approval-list { padding: 0 15px 24px; }

.me-hero {
  min-height: 190px;
  padding: 24px 22px;
  background: linear-gradient(180deg, #45b9ff, #c6eeff);
  position: relative;
}
.setting-btn {
  position: absolute;
  right: 20px;
  top: 24px;
  color: #fff;
  font-size: 26px;
}
.me-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 38px;
}
.me-profile img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.8);
  background: #fff;
}
.me-profile h1 { margin: 0; font-size: 24px; }
.me-profile p { margin: 7px 0 0; color: rgba(41,57,70,.72); font-size: 14px; }
.invite-card {
  min-height: 78px;
  margin: 0 15px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 18px;
  background: linear-gradient(90deg, #fff, #fff4e6);
  border-radius: 4px;
}
.invite-card strong { color: var(--orange); font-size: 18px; }
.invite-card span { flex: 1; color: #9aa4ac; font-size: 14px; }
.invite-card i { color: var(--orange); font-size: 34px; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(430px, 100vw);
  height: 66px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.97);
  border-top: 1px solid #e2e7eb;
  z-index: 20;
}
.bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: #a1adb4;
  font-size: 12px;
}
.bottom-nav i { font-size: 22px; }
.bottom-nav span { font-size: 12px; font-weight: 760; }
.bottom-nav button.active { color: var(--orange); }

.detail-page {
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 28px;
}
.detail-header {
  height: 86px;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: end;
  gap: 6px;
  padding: 0 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.detail-header h1 {
  margin: 0;
  text-align: center;
  font-size: 19px;
  font-weight: 850;
}
.detail-header button {
  height: 36px;
  color: #596873;
  font-size: 18px;
}
.detail-hero {
  margin: 14px 15px 12px;
  padding: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff8ee, #fff);
  box-shadow: 0 4px 14px rgba(41,57,70,.04);
}
.detail-hero span {
  color: var(--orange);
  font-size: 13px;
  font-weight: 850;
}
.detail-hero h2 {
  margin: 7px 0 0;
  font-size: 22px;
  line-height: 1.25;
}
.detail-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 15px 12px;
}
.detail-stats div {
  padding: 12px 8px;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}
.detail-stats strong {
  display: block;
  color: var(--blue);
  font-size: 20px;
}
.detail-stats span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
.detail-section {
  margin: 0 15px 12px;
  padding: 15px;
  border-radius: 8px;
  background: #fff;
}
.detail-section.tight { padding: 0; overflow: hidden; }
.detail-section.tight h3 { padding: 15px 15px 0; }
.detail-section h3 {
  margin: 0 0 12px;
  font-size: 17px;
}
.detail-list { display: grid; gap: 10px; }
.detail-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px;
  border-radius: 8px;
  background: var(--bg);
}
.detail-row i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--orange);
  font-size: 13px;
}
.detail-row div { flex: 1; min-width: 0; }
.detail-row strong {
  display: block;
  font-size: 14px;
}
.detail-row span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.detail-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px 15px 16px;
  background: rgba(245,247,249,.94);
  backdrop-filter: blur(12px);
}
.detail-actions button {
  height: 40px;
  border-radius: 20px;
  color: #fff;
  background: var(--orange);
  font-size: 14px;
  font-weight: 850;
}
.detail-actions button.secondary {
  color: var(--orange);
  background: #fff;
  border: 1px solid rgba(241,90,36,.45);
}
.full-ecard {
  margin: 14px 15px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(41,57,70,.06);
}
.full-ecard .ecard-top {
  padding: 20px;
}
.full-ecard .ecard-info {
  padding: 14px 18px 4px;
}
.full-ecard .ecard-qr {
  padding: 16px 18px 18px;
}
.contact-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 15px 12px;
}
.contact-actions button {
  height: 42px;
  border-radius: 21px;
  color: #fff;
  background: var(--orange);
  font-weight: 850;
}

.mini-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.mini-actions button {
  min-height: 54px;
  padding: 6px;
  border-radius: 8px;
  color: var(--orange);
  background: #fff7ed;
  font-size: 12px;
  font-weight: 800;
}
.timeline { display: grid; gap: 12px; }
.timeline article {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.timeline em {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}
.timeline strong { display: block; font-size: 14px; }
.timeline span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.asset-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.asset-card div {
  display: flex;
  justify-content: space-between;
  padding: 12px;
  border-radius: 8px;
  background: var(--bg);
}
.asset-card span { color: var(--muted); font-size: 13px; }
.asset-card strong { color: var(--orange); font-size: 16px; }
.mail-panel { display: grid; }
.mail-row {
  display: flex;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}
.mail-row.unread { background: #fffaf4; }
.mail-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: var(--orange);
  background: #fff0e2;
  font-weight: 900;
}
.mail-row > div:last-child { flex: 1; min-width: 0; }
.mail-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.mail-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}
.mail-title span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.mail-row p {
  margin: 5px 0 0;
  color: #5d6a73;
  font-size: 12px;
  line-height: 1.45;
}
.mail-row small {
  display: block;
  margin-top: 6px;
  color: var(--orange);
  font-size: 12px;
}
.ecard {
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.ecard-top {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ff8a3d);
}
.ecard-top img {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.72);
  background: #fff;
}
.ecard-top strong { display: block; font-size: 22px; }
.ecard-top span, .ecard-top small { display: block; margin-top: 4px; color: rgba(255,255,255,.82); font-size: 13px; }
.ecard-info { padding: 14px 16px 4px; }
.ecard-info p {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: #41505a;
  font-size: 14px;
}
.ecard-info i { width: 18px; color: var(--orange); text-align: center; }
.ecard-qr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 16px;
}
.qr-box {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--orange);
  background: repeating-linear-gradient(45deg, #fff, #fff 6px, #f2f4f6 6px, #f2f4f6 12px);
  border: 1px solid var(--line);
  font-size: 34px;
}
.ecard-qr span { color: var(--muted); font-size: 13px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 78px;
  transform: translateX(-50%);
  z-index: 90;
  padding: 9px 14px;
  border-radius: 18px;
  background: rgba(41,57,70,.92);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
}
.toast.show { opacity: 1; }

/* Digital business card */
.cms-digital-card-page {
  min-height: calc(100vh - 86px);
  padding: 16px 14px 28px;
  background: #eef1f5;
}
.cms-identity-pass {
  position: relative;
  min-height: 280px;
  padding: 18px;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  background: #101b33;
  box-shadow: 0 18px 36px rgba(16,27,51,.18);
}
.cms-identity-pass::before,
.cms-identity-pass::after {
  content: "";
  position: absolute;
  pointer-events: none;
}
.cms-identity-pass::before {
  width: 180px;
  height: 180px;
  top: -96px;
  right: -52px;
  border: 30px solid rgba(21,90,168,.56);
  transform: rotate(18deg);
}
.cms-identity-pass::after {
  width: 9px;
  height: 150px;
  right: 28px;
  bottom: -54px;
  background: var(--cms-red);
  transform: rotate(38deg);
}
.cms-pass-brand,
.cms-pass-profile,
.cms-pass-footer { position: relative; z-index: 1; }
.cms-pass-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cms-pass-brand img {
  width: 120px;
  height: 38px;
  padding: 4px 7px;
  object-fit: contain;
  border-radius: 6px;
  background: #fff;
}
.cms-pass-brand span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255,255,255,.76);
  font-size: 11px;
  font-weight: 750;
}
.cms-pass-brand span i { color: #71d1ad; }
.cms-pass-profile {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-top: 29px;
}
.cms-pass-profile > img {
  width: 78px;
  height: 78px;
  border: 2px solid rgba(255,255,255,.82);
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255,255,255,.08);
}
.cms-pass-profile small {
  display: block;
  color: #83abd6;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .4px;
}
.cms-pass-profile h2 {
  margin: 6px 0 0;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}
.cms-pass-profile p {
  margin: 5px 0 0;
  color: #fff;
  font-size: 14px;
  font-weight: 780;
}
.cms-pass-profile span {
  display: block;
  margin-top: 4px;
  color: rgba(255,255,255,.62);
  font-size: 12px;
}
.cms-pass-footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr 30px;
  gap: 12px;
  align-items: end;
  margin-top: 27px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.cms-pass-footer div { min-width: 0; }
.cms-pass-footer span,
.cms-pass-footer strong { display: block; }
.cms-pass-footer span {
  color: rgba(255,255,255,.44);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
}
.cms-pass-footer strong {
  margin-top: 4px;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cms-pass-footer > i {
  color: rgba(255,255,255,.28);
  font-size: 24px;
  text-align: right;
}
.cms-contact-dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 12px 0 14px;
  padding: 10px;
  border: 1px solid #e4e8ed;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(26,42,65,.06);
}
.cms-contact-dock button {
  min-width: 0;
  height: 56px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border-radius: 6px;
  color: #35445c;
}
.cms-contact-dock button:active { background: #f1f4f8; }
.cms-contact-dock i { color: var(--cms-red); font-size: 17px; }
.cms-contact-dock span { font-size: 11px; font-weight: 800; }
.cms-exchange-panel {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
  border-left: 4px solid var(--cms-blue);
}
.cms-qr-frame {
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid #dfe4ea;
  border-radius: 6px;
  color: var(--cms-navy);
  background: #fff;
  font-size: 52px;
}
.cms-qr-frame canvas,
.cms-qr-frame img { width: 112px !important; height: 112px !important; }
.cms-exchange-copy { min-width: 0; }
.cms-exchange-copy > span,
.cms-section-title > span {
  color: var(--cms-blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .4px;
}
.cms-exchange-copy h2 {
  margin: 5px 0 0;
  color: var(--cms-navy);
  font-size: 17px;
  line-height: 1.3;
}
.cms-exchange-copy p {
  margin: 7px 0 0;
  color: #788493;
  font-size: 11px;
  line-height: 1.5;
}
.cms-exchange-copy button {
  height: 31px;
  margin-top: 10px;
  padding: 0 11px;
  border-radius: 5px;
  color: #fff;
  background: var(--cms-red);
  font-size: 11px;
  font-weight: 850;
}
.cms-contact-sheet,
.cms-about-sheet {
  margin-top: 14px;
  padding: 16px;
  border-radius: 8px;
  background: #fff;
}
.cms-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 9px;
}
.cms-section-title h3 {
  order: -1;
  margin: 0;
  color: #1b2738;
  font-size: 16px;
}
.cms-contact-sheet > a,
.cms-contact-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid #eef0f3;
}
.cms-contact-row { grid-template-columns: 34px minmax(0, 1fr); }
.cms-contact-sheet > a > i:first-child,
.cms-contact-row > i {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--cms-blue);
  background: #edf4fb;
  font-size: 13px;
}
.cms-contact-sheet > a > i:last-child { color: #b9c1c9; font-size: 10px; }
.cms-contact-sheet span,
.cms-contact-row span {
  display: block;
  color: #8a95a2;
  font-size: 10px;
}
.cms-contact-sheet strong,
.cms-contact-row strong {
  display: block;
  margin-top: 3px;
  color: #243147;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.cms-about-sheet > p {
  margin: 0;
  color: #5f6c7c;
  font-size: 13px;
  line-height: 1.75;
}
.cms-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}
.cms-skill-list span {
  padding: 6px 8px;
  border: 1px solid #dfe7f0;
  border-radius: 5px;
  color: #405169;
  background: #f6f8fb;
  font-size: 10px;
  font-weight: 760;
}
.cms-credential {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border-radius: 6px;
  background: #101b33;
  color: #fff;
}
.cms-credential > i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--cms-red);
}
.cms-credential span,
.cms-credential strong { display: block; }
.cms-credential span { color: rgba(255,255,255,.54); font-size: 9px; }
.cms-credential strong { margin-top: 3px; font-size: 12px; }
.cms-credential em { color: #83d6b8; font-size: 10px; font-style: normal; font-weight: 850; }
.digital-card-note {
  margin: 15px 0 0;
  color: #929ca8;
  font-size: 10px;
  text-align: center;
}
.digital-card-note i { margin-right: 4px; }
@media (max-width: 360px) {
  .cms-exchange-panel { grid-template-columns: 108px minmax(0, 1fr); gap: 12px; padding: 13px; }
  .cms-qr-frame { width: 104px; height: 104px; }
  .cms-qr-frame canvas,
  .cms-qr-frame img { width: 92px !important; height: 92px !important; }
  .cms-exchange-copy h2 { font-size: 15px; }
  .cms-pass-profile { grid-template-columns: 68px minmax(0, 1fr); }
  .cms-pass-profile > img { width: 68px; height: 68px; }
}

/* Personal information */
.detail-page.personal-info-mode {
  padding-bottom: 0;
  background: #f2f4f7;
}
.personal-info-mode .detail-header {
  height: 88px;
  padding-bottom: 15px;
  background: #f2f4f7;
  border-bottom-color: #e8ebef;
}
.personal-info-mode .detail-header h1 {
  color: #111820;
  font-size: 18px;
  font-weight: 800;
}
.personal-info-mode .detail-header button {
  color: #111820;
  font-size: 20px;
}
.personal-info-page {
  min-height: calc(100vh - 88px);
  padding: 12px 0 26px;
  background: #f2f4f7;
}
.personal-info-group {
  margin: 0 0 12px;
  padding-left: 18px;
  background: #fff;
  border-top: 1px solid #eceff2;
  border-bottom: 1px solid #eceff2;
}
.personal-info-row {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid #edf0f2;
}
.personal-info-row:last-child { border-bottom: 0; }
.personal-info-row.is-tall { min-height: 90px; }
.personal-info-label {
  flex: 0 0 auto;
  color: #171d25;
  font-size: 16px;
  font-weight: 600;
}
.personal-info-end {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
}
.personal-info-end > i,
.enterprise-row > i {
  flex: 0 0 auto;
  color: #c3c8ce;
  font-size: 12px;
}
.personal-info-value {
  min-width: 0;
  max-width: 238px;
  color: #5f6770;
  font-size: 15px;
  line-height: 1.42;
  text-align: right;
  overflow-wrap: anywhere;
}
.personal-info-value.is-muted { color: #a5abb2; }
.personal-info-row.is-multiline .personal-info-value { max-width: 224px; }
.personal-info-avatar {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  border: 1px solid #e5e8eb;
  border-radius: 8px;
  object-fit: cover;
  background: #f6f7f8;
}
.enterprise-row { min-height: 76px; }
.personal-info-enterprise {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.personal-info-enterprise small {
  color: #949ba3;
  font-size: 13px;
}

@media (max-width: 360px) {
  .personal-info-row { gap: 12px; padding-right: 13px; }
  .personal-info-label { font-size: 15px; }
  .personal-info-value { max-width: 194px; font-size: 14px; }
  .personal-info-row.is-multiline .personal-info-value { max-width: 182px; }
}

@media (min-width: 840px) {
  body { padding: 20px 0; }
  .app-shell {
    min-height: calc(100vh - 40px);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 22px 70px rgba(15,23,42,.18);
  }
}
