:root {
  --primary: #2f6bff;
  --primary-dark: #1f4fd6;
  --primary-soft: #eaf1ff;
  --purple: #7c3aed;
  --purple-dark: #5b21b6;
  --purple-soft: #f1eaff;
  --yellow: #f5c451;
  --yellow-dark: #aa6b08;
  --yellow-soft: #fff5d7;
  --gold: #aa6b08;
  --gold-soft: #fff5d7;
  --blue: #2f6bff;
  --green: #21844a;
  --orange: #cf6a16;
  --ink: #172033;
  --muted: #70798b;
  --line: #e7e9ef;
  --panel: rgba(255, 255, 255, .92);
  --panel-solid: #fff;
  --canvas: #f4f7fb;
  --shadow: 0 14px 38px rgba(52, 61, 83, .08);
  --shadow-sm: 0 5px 18px rgba(52, 61, 83, .07);
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 10%, rgba(219, 207, 255, .62), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(210, 229, 255, .82), transparent 28rem),
    radial-gradient(circle at 72% 88%, rgba(255, 239, 180, .48), transparent 24rem),
    linear-gradient(135deg, #f6f5ff 0%, #eef5ff 55%, #fffaf0 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 14px;
  min-height: 100vh;
}
button, input { font: inherit; }
button { color: inherit; }

.mobile-appbar, .mobile-bottom-nav, .mobile-project-card { display: none; }

.app-shell { display: flex; gap: 18px; min-height: 100vh; padding: 18px; }
.sidebar {
  position: sticky;
  top: 18px;
  display: flex;
  flex: 0 0 238px;
  flex-direction: column;
  height: calc(100vh - 36px);
  padding: 26px 16px 18px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 24px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 14px; padding: 4px 10px 28px; }
.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--purple));
  box-shadow: 0 8px 18px rgba(74, 64, 205, .24);
  font-family: SimHei, sans-serif;
  font-size: 28px;
  font-weight: 700;
}
.brand strong { display: block; font-size: 19px; letter-spacing: .02em; }
.brand span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  gap: 12px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #535d70;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: .2s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .82); color: var(--ink); }
.nav-item.active {
  color: var(--primary);
  border-color: #cfdcff;
  background: linear-gradient(90deg, var(--primary-soft), var(--purple-soft));
  font-weight: 700;
  box-shadow: inset 3px 0 var(--primary);
}
.nav-icon { display: inline-grid; width: 25px; place-items: center; font-size: 19px; font-weight: 400; }
.nav-count {
  min-width: 22px;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--purple));
  font-size: 11px;
  text-align: center;
}
.workspace { min-width: 0; flex: 1; }
.topbar {
  position: sticky;
  top: 18px;
  z-index: 15;
  display: flex;
  min-height: 100px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 28px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}
.page-heading .eyebrow { margin: 0 0 5px; color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.page-heading h1 { margin: 0; font-size: 24px; line-height: 1.25; }
.page-heading > p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.command-button, .icon-button, .primary-button, .ghost-button {
  border: 1px solid #dfe3e9;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 3px 10px rgba(43, 52, 73, .04);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.command-button:hover, .icon-button:hover, .primary-button:hover, .ghost-button:hover { transform: translateY(-1px); border-color: #c8cdd6; }
.command-button { height: 44px; padding: 0 17px; border-radius: 14px; font-weight: 700; }
.command-button span { display: inline-grid; width: 23px; height: 23px; margin-right: 7px; place-items: center; border-radius: 7px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--purple)); }
.monitor-runtime-badge {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #c23b4b;
  box-shadow: none;
  pointer-events: none;
  user-select: none;
  font: inherit;
  line-height: 1;
}
.monitor-runtime-badge[hidden] {
  display: none !important;
}
.monitor-runtime-badge span {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  background: none;
  border-radius: 0;
  width: auto;
  height: auto;
}
.monitor-runtime-badge.is-ok {
  background: #1f9d62;
}
.monitor-runtime-badge.is-bad {
  background: #c23b4b;
}
.icon-button { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; font-size: 19px; }
.primary-button { height: 42px; padding: 0 18px; border-color: #dda932; border-radius: 13px; color: #3f3211; background: linear-gradient(135deg, #ffd86c, var(--yellow)); font-weight: 800; box-shadow: 0 6px 14px rgba(196, 140, 24, .16); }
.ghost-button { min-height: 36px; padding: 0 14px; border-radius: 11px; color: #4d5769; font-size: 12px; font-weight: 600; }
.ghost-button:disabled, .primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.add-track-button { color: var(--purple-dark); border-color: #d9c9ff; background: var(--purple-soft); }
.danger-button { color: #a42b3e; border-color: #d8dcea; background: #fff; }
.danger-button:hover { color: #8b2037; border-color: #b9a8e6; background: var(--purple-soft); }
.archive-button { color: #315acb; border-color: #cbd7f5; background: #f8faff; }
.archive-button:hover { color: #5940bd; border-color: #b9a8e6; background: var(--purple-soft); }
.stop-button { color: #6b6475; border-color: #d8dcea; background: #fbfbfd; }
.stop-button:hover { color: #5940bd; border-color: #b9a8e6; background: var(--purple-soft); }
.start-button { color: #225fd1; border-color: #c4d5f8; background: var(--primary-soft); }
.start-button:hover { color: #fff; border-color: var(--primary); background: var(--primary); }

.content { padding: 18px 2px 40px; }
.tab { display: none; }
.tab.active { display: block; animation: tabIn .22s ease; }
@keyframes tabIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.monitor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 4px 18px;
}
.segment { display: inline-flex; align-items: center; padding: 4px; border: 1px solid #dde2e9; border-radius: 16px; background: rgba(255, 255, 255, .72); box-shadow: var(--shadow-sm); }
.segment button { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 0 17px; border: 0; border-radius: 12px; color: #626b7c; background: transparent; cursor: pointer; font-weight: 600; }
.segment button b { min-width: 22px; padding: 2px 7px; border-radius: 999px; color: #666f7f; background: #e9edf2; font-size: 11px; }
.segment button.active { color: #fff; background: linear-gradient(135deg, var(--primary), var(--purple)); box-shadow: 0 6px 14px rgba(68, 76, 210, .22); }
.segment button.active b { color: var(--primary); background: #fff; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.search-box { display: flex; height: 42px; width: min(310px, 26vw); align-items: center; gap: 8px; padding: 0 13px; border: 1px solid #dfe3e9; border-radius: 13px; color: #8790a0; background: rgba(255, 255, 255, .8); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; }
.search-box input::placeholder { color: #9da5b2; }
.ledger-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
.ledger-toolbar .search-box { width: min(360px, 100%); flex: 1 1 auto; max-width: 420px; }
.ledger-search-meta { flex: none; color: var(--muted); font-size: 12px; white-space: nowrap; }

.modal[hidden] { display: none; }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 25, 35, .48); backdrop-filter: blur(5px); }
.modal-panel { position: relative; width: min(620px, 100%); padding: 25px; border: 1px solid rgba(255,255,255,.92); border-radius: 22px; background: var(--panel-solid); box-shadow: 0 26px 70px rgba(29, 37, 53, .25); animation: modalIn .18s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.modal-head span { color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.modal-head h2 { margin: 4px 0 0; font-size: 21px; }
.modal-close { width: 36px; height: 36px; border: 0; border-radius: 10px; color: #737c8c; background: #f0f2f5; cursor: pointer; font-size: 24px; line-height: 1; }
.modal-close:hover { color: var(--primary); background: var(--primary-soft); }
.form-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.form-field > span { color: #515b6d; font-size: 12px; font-weight: 700; }
.form-field > span b { color: var(--primary); }
.form-field input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #dce1e8; border-radius: 11px; outline: 0; color: var(--ink); background: #fff; font: inherit; }
.form-field input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124, 58, 237, .11); }
.form-grid { display: grid; grid-template-columns: .75fr 1.25fr; gap: 12px; }
.form-help { margin: -2px 0 19px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 17px; border-top: 1px solid var(--line); }
body.modal-open { overflow: hidden; }

.section-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 6px 3px 14px; }
.section-caption > div { display: flex; align-items: center; gap: 11px; }
.caption-bar { width: 5px; height: 26px; border-radius: 999px; background: linear-gradient(var(--primary), var(--purple) 55%, var(--yellow)); }
.section-caption h2 { margin: 0; font-size: 17px; }
.section-caption p { margin: 0; color: var(--muted); font-size: 12px; }
.page-section-caption { margin-top: 10px; }

.monitor-list { display: flex; flex-direction: column; gap: 16px; }
.loading-card, .empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  color: var(--muted);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.empty-state > div { text-align: center; }
.empty-state strong { display: block; margin-bottom: 7px; color: var(--ink); font-size: 17px; }
.project-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .92);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.project-card:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(57, 68, 93, .11); }
.project-card.urgent { border-color: rgba(255, 255, 255, .92); }
.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 28px 13px; }
.project-title-row { display: flex; align-items: center; gap: 10px; }
.project-title-row h3 { margin: 0; font-size: 18px; line-height: 1.45; }
.project-meta { display: flex; flex-wrap: wrap; gap: 0; margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.project-meta span:not(:last-child)::after { content: "·"; margin: 0 8px; color: #b2b7c0; }
.status-pill, .stage-pill, .update-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.status-pill { color: #1e64a9; background: #e8f2ff; }
.status-pill.议标中 { color: #91600a; background: #fff5d8; }
.status-pill.已出标 { color: #fff; background: #e0a82a; }
.status-pill.中标 { color: #18743d; background: #e7f6ed; }
.status-pill.未中标, .status-pill.放弃 { color: #7a8392; background: #eef0f3; }

/* 已出标：蓝紫渐变（略降透明度），和投标中浅色卡片形成阶段区分 */
.project-card.issued {
  border-color: rgba(120, 130, 220, .28);
  color: #e8eaf8;
  background:
    radial-gradient(circle at 88% 0%, rgba(255, 255, 255, .1), transparent 42%),
    linear-gradient(155deg, rgba(47, 107, 255, .86) 0%, rgba(47, 107, 255, .8) 58%, rgba(90, 78, 220, .76) 82%, rgba(124, 58, 237, .72) 100%);
  box-shadow: 0 14px 30px rgba(70, 70, 180, .18);
  backdrop-filter: blur(10px);
}
.project-card.issued:hover {
  box-shadow: 0 18px 36px rgba(70, 70, 180, .24);
}
.project-card.issued .project-title-row h3 { color: #fff; }
.project-card.issued .project-meta { color: rgba(234, 241, 255, .82); }
.project-card.issued .project-meta span:not(:last-child)::after { color: rgba(234, 241, 255, .45); }
.project-card.issued .status-pill.已出标 {
  color: #fff;
  background: #e0a82a;
  box-shadow: 0 2px 8px rgba(120, 80, 10, .18);
}
.project-card.issued .update-pill {
  color: #fff4d4;
  background: rgba(255, 213, 120, .18);
}
.project-card.issued .stage-pill {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}
.project-card.issued .stage-summary p { color: rgba(232, 234, 248, .78); }
.project-card.issued .stage-summary p strong { color: #ffe08a; }
.project-card.issued .stage:not(:last-child)::after { background: rgba(255, 255, 255, .18); }
.project-card.issued .stage.done:not(:last-child)::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, .85), rgba(255, 224, 138, .7));
}
.project-card.issued .stage-node {
  border-color: rgba(255, 255, 255, .28);
  color: rgba(232, 234, 248, .78);
  background: rgba(30, 28, 90, .28);
  box-shadow: none;
}
.project-card.issued .stage.done .stage-node {
  border-color: rgba(255, 255, 255, .92);
  color: #3d3a8f;
  background: rgba(255, 255, 255, .94);
}
.project-card.issued .stage.current .stage-node {
  border-color: #ffe08a;
  color: #3f3211;
  background: linear-gradient(145deg, #ffe08a, #f5c451);
  box-shadow: 0 0 0 5px rgba(245, 196, 81, .18);
}
.project-card.issued .stage.watching .stage-node,
.project-card.issued .stage.unavailable .stage-node,
.project-card.issued .stage.stopped .stage-node {
  border-color: rgba(255, 255, 255, .22);
  color: rgba(232, 234, 248, .68);
  background: rgba(30, 28, 90, .22);
}
.project-card.issued .stage-label { color: rgba(255, 255, 255, .96); }
.project-card.issued .stage-value { color: rgba(232, 234, 248, .76); }
.project-card.issued .stage.watching .stage-value {
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .12);
}
.project-card.issued .stage-official.available {
  color: #fff;
  background: rgba(255, 255, 255, .14);
}
.project-card.issued .stage-official.unavailable {
  color: rgba(232, 234, 248, .55);
  background: rgba(255, 255, 255, .07);
}
.project-card.issued .project-card-foot {
  border-top-color: rgba(255, 255, 255, .14);
}
.project-card.issued .checked-at { color: rgba(232, 234, 248, .68); }
.project-card.issued .ghost-button {
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .08);
}
.project-card.issued .ghost-button:hover {
  border-color: rgba(255, 255, 255, .45);
  background: rgba(255, 255, 255, .14);
}
.project-card.issued .danger-button { color: #ffd0d6; border-color: rgba(255, 180, 190, .4); }
.project-card.issued .archive-button { color: #fff; border-color: rgba(255, 255, 255, .32); }
.project-card.issued .stop-button { color: #e8eaf8; border-color: rgba(255, 255, 255, .28); }
.project-card.issued .timeline-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .42) rgba(40, 35, 120, .28);
}
.project-card.issued .timeline-scroll::-webkit-scrollbar {
  height: 8px;
}
.project-card.issued .timeline-scroll::-webkit-scrollbar-track {
  margin: 0 24px;
  border-radius: 999px;
  background: rgba(40, 35, 120, .28);
}
.project-card.issued .timeline-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, .42);
}
.project-card.issued .timeline-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .6);
}
.stage-summary { flex: none; min-width: 142px; text-align: right; }
.stage-pill { color: var(--primary); background: var(--primary-soft); }
.stage-summary p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.stage-summary p strong { color: var(--primary); font-size: 15px; }
.update-pill { margin-left: 7px; color: #a76705; background: var(--gold-soft); }

.timeline-scroll { overflow-x: auto; padding: 10px 28px 8px; scrollbar-width: thin; }
.timeline { display: grid; min-width: 1060px; grid-template-columns: repeat(10, 1fr); padding: 8px 0 15px; }
.stage { position: relative; min-width: 0; color: inherit; text-align: center; text-decoration: none; }
.stage-main, .stage-main-link { display: block; color: inherit; text-decoration: none; }
.stage:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 3px; border-radius: 3px; background: #d9dee4; }
.stage.done:not(:last-child)::after { background: linear-gradient(90deg, var(--primary), var(--purple)); }
.stage-node { position: relative; z-index: 2; display: grid; width: 44px; height: 44px; margin: 0 auto 9px; place-items: center; border: 2px solid #d5dbe3; border-radius: 50%; color: #8790a0; background: #fff; box-shadow: 0 3px 9px rgba(55, 65, 85, .08); font-size: 13px; font-weight: 800; }
.stage.done .stage-node { border-color: var(--primary); color: #fff; background: linear-gradient(145deg, var(--primary), var(--purple)); }
.stage.current .stage-node { border-color: #d69b20; color: #4d3503; background: linear-gradient(145deg, #ffe082, var(--yellow)); box-shadow: 0 0 0 6px var(--yellow-soft); }
.stage.watching .stage-node { border-color: #c8cdd5; color: #676f7e; background: #fff; }
.stage.unavailable .stage-node { border-style: dashed; border-color: #d4d8df; color: #959daa; background: #f6f7f9; }
.stage.stopped .stage-node { border-color: #d4d8de; color: #9299a5; background: #eef0f3; }
.stage-label { display: block; min-height: 20px; color: #3a4353; font-size: 12px; font-weight: 700; }
.stage-value { display: block; min-height: 18px; margin-top: 3px; color: #858d9c; font-size: 11px; white-space: nowrap; }
.stage.watching .stage-value { display: inline-block; min-height: auto; margin-top: 4px; padding: 2px 7px; border: 1px dashed #bca7ee; border-radius: 7px; color: var(--purple-dark); background: var(--purple-soft); }
.stage-official { display: inline-flex; align-items: center; justify-content: center; width: max-content; max-width: calc(100% - 8px); box-sizing: border-box; margin: 6px auto 0; padding: 2px 8px; border-radius: 999px; font-size: 10px; line-height: 1.5; white-space: nowrap; }
.stage-official.available { color: #1768a7; background: #eaf4ff; }
.stage-official.unavailable { color: #a0a6b0; background: #f1f3f6; }
.stage a.stage-official { text-decoration: none; }
.stage-link-menu { display: flex; justify-content: center; position: relative; z-index: 4; width: 100%; margin: 0; }
.stage-link-menu > summary { cursor: pointer; list-style: none; }
.stage-link-menu > summary.stage-official { display: inline-flex; }
.stage-link-menu > summary::-webkit-details-marker { display: none; }
.stage-link-menu[open] { z-index: 8; }
.stage-link-list {
  position: relative;
  top: auto;
  left: 50%;
  z-index: 10;
  display: grid;
  width: 200px;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 5px;
  padding: 5px;
  border: 1px solid #dce3ed;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(39, 51, 75, .18);
  transform: translateX(-50%);
}
.stage-link-list a { display: grid; gap: 2px; padding: 7px 8px; border-radius: 7px; color: #1768a7; text-align: left; text-decoration: none; }
.stage-link-list a:hover { background: #eef5ff; }
.stage-link-list span { overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.stage-link-list small { color: #8992a1; font-size: 9px; }
.stage-linked { cursor: pointer; }
.stage-linked .stage-node { transition: transform .16s ease, box-shadow .16s ease; }
.stage-linked:hover .stage-node { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(29, 74, 116, .2); }
.stage-linked:hover .stage-label, .stage-linked:focus-visible .stage-label { color: #1768a7; text-decoration: underline; text-underline-offset: 3px; }
.stage-linked:focus-visible { z-index: 3; border-radius: 10px; outline: 2px solid #2b79b7; outline-offset: 4px; }
.project-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 28px 17px; border-top: 1px solid var(--line); }
.card-actions { display: flex; gap: 8px; }
.checked-at { color: var(--muted); font-size: 11px; }

.hero-strip { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 2px 0 16px; padding: 23px 26px; border: 1px solid rgba(255,255,255,.86); border-radius: 20px; color: #fff; background: linear-gradient(125deg, #245ee9, #7041d9 58%, #d9a72f); box-shadow: var(--shadow-sm); }
.hero-kicker { font-size: 11px; letter-spacing: .12em; opacity: .8; }
.hero-strip h2 { margin: 6px 0 3px; font-size: 25px; }
.hero-strip p { margin: 0; font-size: 12px; opacity: .8; }
.data-time { font-size: 11px; opacity: .78; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.card { min-height: 108px; padding: 18px; border: 1px solid rgba(255,255,255,.9); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-sm); }
.card .num { color: var(--primary); font-size: 25px; font-weight: 800; line-height: 1.2; }
.card .num.red { color: #dc3a24; }
.card .lbl { margin-top: 10px; color: var(--muted); font-size: 12px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.overview-cols { grid-template-columns: .9fr 1.1fr; }
.overview-progress-panel { margin-bottom: 16px; }
#progress-updates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.progress-update-item {
  display: block;
  min-width: 0;
  padding: 14px 14px 12px;
  border: 1px solid #e3e8f0;
  border-radius: 14px;
  color: inherit;
  background: linear-gradient(180deg, #f7f9ff, #ffffff);
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.progress-update-item:hover {
  border-color: #c7d6f5;
  box-shadow: 0 10px 24px rgba(47, 84, 170, .12);
  transform: translateY(-1px);
}
.progress-update-item.static { cursor: default; }
.progress-update-item.static:hover { transform: none; box-shadow: none; }
.progress-update-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}
.progress-update-meta .progress-stage-badge {
  flex: none;
  max-width: 58%;
  overflow: hidden;
  padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  background: #5fad7a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-update-item strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress-update-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: #4d5668;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.panel { margin-bottom: 16px; padding: 20px; border: 1px solid rgba(255,255,255,.9); border-radius: 20px; background: var(--panel); box-shadow: var(--shadow-sm); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.panel-title h2 { margin: 0; padding-left: 10px; border-left: 4px solid var(--primary); font-size: 16px; }
.panel-title span { color: var(--muted); font-size: 11px; }
.table-panel { padding: 0; overflow: hidden; }
.table-panel .panel-title { padding: 20px 20px 0; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: #5b6577; background: rgba(244, 246, 250, .92); font-size: 11px; font-weight: 700; white-space: nowrap; }
td { color: #343d4d; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(250, 247, 248, .85); }
.badge { display: inline-block; min-width: 48px; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-align: center; white-space: nowrap; }
.badge.red { color: #bd2525; background: #fde8e8; }
.badge.yellow { color: #a86608; background: #fff3d6; }
.badge.green { color: #1c7943; background: #e7f6ed; }
.tag { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 5px; font-size: 10px; white-space: nowrap; }
.tag.hot { color: #b62631; background: #fde9ed; }
.tag.watch { color: #ad6509; background: #fff1db; }
.tag.cscec { color: #6d43a1; background: #f1eafb; }
.deadline-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.deadline-title-text { min-width: 0; flex: 1; }
.deadline-title-row .badge { flex: none; margin-top: 1px; }
.result-win { color: var(--green); font-weight: 800; }
.result-lose { color: #949ba7; }
.result-pill {
  display: inline-block;
  min-width: 44px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}
.result-pill.win { color: #fff; background: #5fad7a; }
.result-pill.lose { color: #6f7785; background: #eef0f4; }
.result-pill.issued { color: #fff; background: #e0a82a; }
.result-pill.stopped { color: #fff; background: #4a5160; }
.result-pill.other { color: #2f5db7; background: #eaf1ff; }

#tab-mine .table-panel { overflow: visible; }
#tab-mine .table-wrap {
  max-height: min(72vh, 780px);
  overflow: auto;
}
#tab-mine .ledger-table {
  table-layout: fixed;
  width: 100%;
}
#tab-mine .ledger-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 10px;
  background: rgba(244, 246, 250, .98);
  box-shadow: inset 0 -1px 0 var(--line);
}
#tab-mine .ledger-table td {
  padding: 10px 10px;
  vertical-align: middle;
}
/* 默认列宽（手机端卡片沿用）；桌面端业主完整显示见下方 min-width 761 */
#tab-mine .ledger-table .col-date { width: 92px; color: var(--muted); white-space: nowrap; }
#tab-mine .ledger-table .col-customer { width: 148px; }
#tab-mine .ledger-table .col-result { width: 68px; text-align: center; }
#tab-mine .ledger-table .col-num {
  width: 86px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#tab-mine .ledger-table .col-pct {
  width: 70px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#tab-mine .ledger-table td.col-title,
#tab-mine .ledger-table td.col-customer {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#tab-mine .ledger-table td.col-result { text-align: center; }
#tab-mine .panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
#tab-mine .ledger-filter {
  flex: none;
  padding: 3px;
  border-radius: 12px;
}
#tab-mine .ledger-filter button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
}

@media (min-width: 761px) {
  /* 仅桌面表格：业主完整显示，项目列适当收窄 */
  #tab-mine .ledger-table .col-date { width: 84px; }
  #tab-mine .ledger-table .col-title { width: 22%; }
  #tab-mine .ledger-table .col-customer { width: 28%; min-width: 200px; }
  #tab-mine .ledger-table .col-result { width: 64px; }
  #tab-mine .ledger-table .col-num { width: 78px; }
  #tab-mine .ledger-table .col-pct { width: 64px; }
  #tab-mine .ledger-table td.col-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #tab-mine .ledger-table td.col-customer {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    line-height: 1.35;
  }
}
.feed-item { padding: 10px 7px; border-bottom: 1px dashed #e6e8ed; font-size: 12px; line-height: 1.55; transition: background .16s ease, box-shadow .16s ease, transform .16s ease; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .d { margin-right: 8px; color: #9aa1ae; font-size: 11px; }
.feed-item.me_win {
  margin: 4px 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: rgba(34, 158, 90, .78);
  box-shadow: 0 4px 14px rgba(34, 158, 90, .18);
}
.feed-item.me_win .d { color: rgba(255, 255, 255, .82); }
.feed-item.me_win:hover {
  background: rgba(34, 158, 90, .92);
  box-shadow: 0 8px 20px rgba(34, 158, 90, .28);
  transform: translateY(-1px);
}
.feed-item.me_lose { border-left: 3px solid #c9ced6; padding-left: 10px; }
.feed-item.competitor { border-left: 3px solid #d49425; padding-left: 10px; }
.deadline-mini { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px; padding: 11px 4px; border-bottom: 1px dashed var(--line); }
.deadline-mini:last-child { border-bottom: 0; }
.deadline-mini strong { display: block; margin-bottom: 4px; font-size: 12px; line-height: 1.45; }
.chart { width: 100%; height: 330px; }
.muted { color: var(--muted); font-size: 11px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; padding: 12px 16px; border-radius: 12px; color: #fff; background: rgba(26, 33, 47, .9); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

body.dark {
  --ink: #edf0f6;
  --muted: #a6adbb;
  --line: #343946;
  --panel: rgba(31, 35, 45, .94);
  --panel-solid: #1f232d;
  --canvas: #171a22;
  --shadow: 0 14px 38px rgba(0,0,0,.25);
  --shadow-sm: 0 5px 18px rgba(0,0,0,.2);
  background: radial-gradient(circle at 12% 10%, #312263, transparent 28rem), radial-gradient(circle at 90% 10%, #173f78, transparent 30rem), radial-gradient(circle at 75% 90%, #4a3b1d, transparent 26rem), #171a22;
}
body.dark .sidebar, body.dark .topbar { border-color: #343946; background: rgba(28, 31, 40, .9); }
body.dark .nav-item { color: #bbc1cd; }
body.dark .nav-item.active { color: #b9cbff; border-color: #4b4f8a; background: linear-gradient(90deg, #25355e, #3a285f); }
body.dark .segment, body.dark .search-box, body.dark .command-button, body.dark .icon-button, body.dark .ghost-button { border-color: #3a404d; background: #232832; }
body.dark .stage-node { border-color: #555c68; color: #b7bdc7; background: #272c36; }
body.dark .stage.watching .stage-value { color: #d7c8ff; background: #33284c; }
body.dark .stage.unavailable .stage-node { border-color: #4b515d; color: #89919f; background: #252a33; }
body.dark .stage-link-list { border-color: #454b57; background: #272c36; }
body.dark .stage-link-list a:hover { background: #303744; }
body.dark .modal-panel { border-color: #3c424e; }
body.dark .modal-close { color: #c1c6cf; background: #292e38; }
body.dark .form-field > span { color: #c5cad3; }
body.dark .form-field input { border-color: #414753; background: #242933; }
body.dark th { color: #c1c7d2; background: #272c36; }
body.dark td { color: #d9dde5; }
body.dark tbody tr:hover td { background: #292d37; }
body.dark .status-pill { color: #8dc3ff; background: #223951; }

body.read-only .add-track-button,
body.read-only [data-card-action="remove"] { display: none !important; }

@media (max-width: 1180px) {
  .app-shell { gap: 12px; padding: 12px; }
  .sidebar { top: 12px; flex-basis: 210px; height: calc(100vh - 24px); padding-inline: 12px; }
  .topbar { top: 12px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .toolbar-actions { flex: 1; justify-content: flex-end; }
  .search-box { width: min(280px, 28vw); }
}

@media (max-width: 900px) {
  .app-shell { display: block; padding: 0; }
  .sidebar { position: relative; top: 0; width: 100%; height: auto; padding: 12px; border-radius: 0 0 20px 20px; }
  .brand { padding: 4px 6px 12px; }
  .brand-mark { width: 42px; height: 42px; border-radius: 12px; font-size: 22px; }
  .brand strong { font-size: 16px; }
  .side-nav { flex-direction: row; overflow-x: auto; padding-bottom: 2px; }
  .nav-item { flex: 0 0 auto; width: auto; min-height: 42px; padding: 8px 12px; }
  .nav-icon { width: auto; }
  .workspace { padding: 12px; }
  .topbar { top: 8px; min-height: 84px; padding: 16px 18px; border-radius: 18px; }
  .page-heading .eyebrow { display: none; }
  .page-heading h1 { font-size: 20px; }
  .command-button { display: none; }
  .monitor-toolbar { align-items: stretch; flex-direction: column; }
  .segment { display: grid; grid-template-columns: repeat(3, 1fr); }
  .segment button { justify-content: center; padding: 0 8px; }
  .toolbar-actions { width: 100%; }
  .search-box { width: auto; flex: 1; }
  .section-caption { align-items: flex-start; flex-direction: column; }
  .project-card-head, .project-card-foot { padding-inline: 18px; }
  .project-card-head { flex-direction: column; }
  .stage-summary { min-width: 0; text-align: left; }
  .timeline-scroll { padding-inline: 18px; }
  .cols, .overview-cols { grid-template-columns: 1fr; }
  #progress-updates { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 620px) {
  .workspace { padding: 8px; }
  .topbar { position: relative; top: 0; }
  .page-heading > p:last-child { display: none; }
  .content { padding-top: 10px; }
  .segment { grid-template-columns: repeat(3, 1fr); }
  .toolbar-actions { align-items: stretch; flex-direction: column; }
  .search-box, .toolbar-actions > button { width: 100%; }
  .modal { padding: 10px; }
  .modal-panel { padding: 20px 17px; border-radius: 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card { min-height: 96px; }
  .hero-strip { align-items: flex-start; flex-direction: column; }
  .data-time { align-self: flex-start; }
  .project-title-row { align-items: flex-start; }
  .project-title-row h3 { font-size: 16px; }
  .project-card-foot { align-items: flex-start; flex-direction: column; }
  .card-actions { width: 100%; }
  .card-actions .ghost-button { flex: 1; }
  .checked-at { align-self: flex-end; }
}

/* 手机端采用独立的信息架构：紧凑顶栏、底部导航、纵向投标流程。 */
@media (max-width: 760px) {
  html, body { width: 100%; overflow-x: hidden; }
  body {
    background:
      radial-gradient(circle at 10% 4%, rgba(205, 218, 255, .85), transparent 20rem),
      radial-gradient(circle at 94% 22%, rgba(230, 215, 255, .78), transparent 19rem),
      linear-gradient(180deg, #f6f8ff 0%, #f4f6fb 55%, #fffaf0 100%);
    font-size: 13px;
  }

  .mobile-appbar {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    min-height: 64px;
    align-items: center;
    gap: 10px;
    padding: calc(9px + env(safe-area-inset-top)) 13px 9px;
    border-bottom: 1px solid rgba(220, 225, 236, .88);
    background: rgba(250, 251, 255, .94);
    box-shadow: 0 5px 18px rgba(45, 55, 79, .07);
    backdrop-filter: blur(18px);
  }
  .mobile-brand-mark {
    display: grid;
    width: 39px;
    height: 39px;
    flex: none;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, var(--primary), var(--purple));
    box-shadow: 0 6px 14px rgba(74, 64, 205, .22);
    font-size: 21px;
    font-weight: 800;
  }
  .mobile-appbar-copy { min-width: 0; flex: 1; }
  .mobile-appbar-copy span { display: block; color: var(--muted); font-size: 10px; }
  .mobile-appbar-copy strong {
    display: block;
    overflow: hidden;
    margin-top: 2px;
    font-size: 15px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-icon-button {
    display: grid;
    width: 37px;
    height: 37px;
    flex: none;
    place-items: center;
    border: 1px solid #dfe4ee;
    border-radius: 12px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 3px 10px rgba(40, 49, 68, .05);
    font-size: 17px;
  }
  .mobile-icon-button:disabled { opacity: .55; }
  .mobile-appbar .monitor-runtime-badge {
    width: 37px;
    height: 37px;
    flex: none;
  }
  .mobile-appbar .monitor-runtime-badge span {
    font-size: 14px;
  }

  .app-shell { display: block; min-height: 0; padding: 0; }
  .sidebar, .topbar { display: none; }
  .workspace { width: 100%; padding: 0 11px calc(84px + env(safe-area-inset-bottom)); }
  .content { padding: 13px 0 18px; }

  .mobile-bottom-nav {
    position: fixed;
    right: 8px;
    bottom: calc(7px + env(safe-area-inset-bottom));
    left: 8px;
    z-index: 65;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 61px;
    padding: 5px 7px;
    border: 1px solid rgba(220, 225, 236, .9);
    border-radius: 19px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 12px 35px rgba(41, 51, 75, .16);
    backdrop-filter: blur(20px);
  }
  .mobile-nav-item {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    border: 0;
    border-radius: 14px;
    color: #7b8494;
    background: transparent;
  }
  .mobile-nav-item span { font-size: 18px; line-height: 1; }
  .mobile-nav-item b { font-size: 10px; font-weight: 700; }
  .mobile-nav-item.active { color: var(--primary); background: linear-gradient(145deg, var(--primary-soft), var(--purple-soft)); }
  .mobile-nav-item em {
    position: absolute;
    top: 3px;
    left: calc(50% + 9px);
    min-width: 16px;
    padding: 1px 4px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    font-size: 8px;
    font-style: normal;
    line-height: 1.4;
  }

  .monitor-toolbar { gap: 10px; padding: 0 0 13px; }
  .segment {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 4px;
    border-radius: 15px;
  }
  .segment button {
    min-width: 0;
    min-height: 42px;
    justify-content: center;
    gap: 4px;
    padding: 0 4px;
    border-radius: 11px;
    font-size: 11px;
    white-space: nowrap;
  }
  .segment button b { min-width: 19px; padding: 1px 5px; font-size: 9px; }
  .toolbar-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .search-box { width: 100%; height: 43px; border-radius: 13px; }
  #add-monitor-project { width: 100%; }

  .section-caption { margin: 2px 2px 10px; }
  .section-caption > div { gap: 8px; }
  .section-caption h2 { font-size: 16px; }
  .section-caption p { display: none; }
  .caption-bar { width: 4px; height: 21px; }
  .monitor-list { gap: 12px; }
  .desktop-project-card { display: none; }
  .mobile-project-card {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .96);
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 9px 25px rgba(47, 57, 82, .09);
  }
  .mobile-project-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--purple), var(--yellow));
  }
  .mobile-project-card.urgent::before { background: linear-gradient(90deg, var(--primary), var(--purple), var(--yellow)); }
  .mobile-project-card.issued {
    border-color: rgba(120, 130, 220, .3);
    color: #e8eaf8;
    background:
      radial-gradient(circle at 90% 0%, rgba(255, 255, 255, .1), transparent 46%),
      linear-gradient(165deg, rgba(47, 107, 255, .86) 0%, rgba(47, 107, 255, .8) 58%, rgba(90, 78, 220, .76) 82%, rgba(124, 58, 237, .72) 100%);
    box-shadow: 0 12px 28px rgba(70, 70, 180, .2);
  }
  .mobile-project-card.issued::before {
    background: linear-gradient(90deg, rgba(255, 255, 255, .75), rgba(245, 196, 81, .85));
  }
  .mobile-project-card.issued .mobile-card-title h3 { color: #fff; }
  .mobile-project-card.issued .mobile-card-head > p { color: rgba(232, 234, 248, .8); }
  .mobile-project-card.issued .mobile-tags span {
    color: #fff;
    background: rgba(255, 255, 255, .12);
  }
  .mobile-project-card.issued .mobile-tags span.changed {
    color: #fff4d4;
    background: rgba(255, 213, 120, .2);
  }
  /* 当前节点：浅色块（参考投标中），与蓝紫大卡形成层次但色相仍协调 */
  .mobile-project-card.issued .mobile-current-stage {
    border-color: rgba(255, 255, 255, .55);
    background: linear-gradient(135deg, rgba(237, 244, 255, .96), rgba(244, 239, 255, .94) 70%, rgba(255, 247, 220, .92));
    box-shadow: 0 6px 16px rgba(30, 40, 120, .12);
  }
  .mobile-project-card.issued .mobile-current-stage > span { color: #70798b; }
  .mobile-project-card.issued .mobile-current-stage > strong { color: #2f6bff; }
  .mobile-project-card.issued .mobile-current-stage p { color: #596376; }
  .mobile-project-card.issued .mobile-current-stage p strong { color: #e8a008; }
  .mobile-project-card.issued .mobile-metrics,
  .mobile-project-card.issued .mobile-flow {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(30, 28, 90, .22);
  }
  .mobile-project-card.issued .mobile-flow summary b { color: #ffe08a; }
  .mobile-project-card.issued .mobile-metrics > div { background: transparent; }
  .mobile-project-card.issued .mobile-metrics strong { color: #fff; }
  .mobile-project-card.issued .mobile-metrics span { color: rgba(232, 234, 248, .7); }
  .mobile-project-card.issued .mobile-card-actions .ghost-button {
    color: #fff;
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .08);
  }
  .mobile-project-card.issued footer {
    border-top-color: rgba(255, 255, 255, .14);
    color: rgba(232, 234, 248, .68);
    background: rgba(30, 28, 90, .28);
  }
  .mobile-card-head { padding: 17px 16px 10px; }
  .mobile-card-title { display: flex; align-items: flex-start; gap: 8px; }
  .mobile-card-title h3 { min-width: 0; flex: 1; margin: 0; font-size: 16px; line-height: 1.5; }
  .mobile-card-title .status-pill { margin-top: 1px; }
  .mobile-card-head > p {
    overflow: hidden;
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
  .mobile-tags span { padding: 3px 7px; border-radius: 7px; color: #687386; background: #f1f4f8; font-size: 9px; }
  .mobile-tags span.changed { color: #945d04; background: var(--yellow-soft); }

  .mobile-current-stage {
    margin: 0 12px;
    padding: 12px 13px;
    border: 1px solid #d9e3ff;
    border-radius: 14px;
    background: linear-gradient(135deg, #edf4ff, #f4efff 72%, #fff7dc);
  }
  .mobile-current-stage > span { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .08em; }
  .mobile-current-stage > strong { display: block; margin-top: 3px; color: var(--primary); font-size: 17px; }
  .mobile-current-stage p { margin: 5px 0 0; color: #596376; font-size: 11px; }
  .mobile-current-stage p strong { color: var(--purple-dark); font-size: 13px; }

  .mobile-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--line); }
  .mobile-metrics > div { min-width: 0; padding: 10px 11px; background: rgba(255,255,255,.97); }
  .mobile-metrics span { display: block; color: var(--muted); font-size: 9px; }
  .mobile-metrics strong { display: block; overflow: hidden; margin-top: 4px; color: #303a4c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

  .mobile-flow { margin: 0 12px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcff; }
  .mobile-flow summary { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; cursor: pointer; list-style: none; }
  .mobile-flow summary::-webkit-details-marker { display: none; }
  .mobile-flow summary span { font-size: 12px; font-weight: 800; }
  .mobile-flow summary span::before { content: "⌄"; display: inline-block; margin-right: 7px; color: var(--primary); transition: transform .18s ease; }
  .mobile-flow[open] summary span::before { transform: rotate(180deg); }
  .mobile-flow summary b { color: var(--muted); font-size: 9px; font-weight: 600; }
  .mobile-timeline { padding: 4px 11px 12px; border-top: 1px solid var(--line); }
  .mobile-stage {
    position: relative;
    display: grid;
    min-height: 54px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    color: inherit;
    text-decoration: none;
  }
  .mobile-stage-main {
    display: grid;
    min-width: 0;
    grid-column: 1 / 3;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    color: inherit;
    text-decoration: none;
  }
  .mobile-stage:not(:last-child)::after { content: ""; position: absolute; top: 35px; bottom: -8px; left: 16px; width: 2px; background: #dce1e8; }
  .mobile-stage.done:not(:last-child)::after { background: linear-gradient(var(--primary), var(--purple)); }
  .mobile-stage-node { position: relative; z-index: 2; display: grid; width: 32px; height: 32px; place-items: center; border: 2px solid #d4dae3; border-radius: 50%; color: #818a99; background: #fff; font-size: 10px; font-weight: 800; }
  .mobile-stage.done .mobile-stage-node { border-color: var(--primary); color: #fff; background: linear-gradient(145deg, var(--primary), var(--purple)); }
  .mobile-stage.current .mobile-stage-node { border-color: #e0ad31; color: #553b04; background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
  .mobile-stage.unavailable .mobile-stage-node { border-style: dashed; color: #969eaa; background: #f3f5f8; }
  .mobile-stage-copy { min-width: 0; }
  .mobile-stage-copy strong { display: block; font-size: 11px; }
  .mobile-stage-copy small { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-stage-source { display: inline-flex; align-items: center; max-width: 94px; box-sizing: border-box; overflow: hidden; padding: 3px 6px; border-radius: 7px; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-stage-source.available { color: #1768a7; background: #eaf4ff; }
  .mobile-stage-source.unavailable { color: #9da5b2; background: #eef1f5; }
  a.mobile-stage-source { text-decoration: none; }
  .mobile-stage-link-menu { width: auto; max-width: 100px; margin: 0; }
  .mobile-stage-link-menu > summary.mobile-stage-source { display: inline-flex; }
  .mobile-stage-link-menu[open] { width: 100%; max-width: none; grid-column: 2 / -1; margin: -2px 0 8px; }
  .mobile-stage-link-menu[open] .stage-link-list { position: static; width: 100%; max-height: 190px; transform: none; }

  .mobile-card-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; padding: 0 12px 11px; }
  .mobile-card-actions .ghost-button { min-height: 39px; border-radius: 11px; font-size: 11px; }
  .mobile-card-actions .danger-button:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .mobile-project-card footer { overflow: hidden; padding: 10px 13px; border-top: 1px solid var(--line); color: var(--muted); background: #fafbfc; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

  .hero-strip { margin: 0 0 11px; padding: 17px; border-radius: 18px; }
  .hero-strip h2 { font-size: 21px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 11px; }
  .card { min-height: 86px; padding: 14px; border-radius: 16px; }
  .card .num { font-size: 20px; }
  .card .lbl { margin-top: 7px; font-size: 10px; }
  .panel { margin-bottom: 11px; padding: 15px; border-radius: 17px; }
  .panel-title h2 { font-size: 14px; }
  .panel-title span { font-size: 9px; }
  .deadline-mini { padding: 10px 1px; }

  .ledger-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0 0 12px;
  }
  .ledger-toolbar .search-box { width: 100%; max-width: none; height: 43px; }
  .ledger-search-meta { font-size: 11px; }

  .table-panel { overflow: visible; padding: 0; background: transparent; box-shadow: none; border: 0; }
  .table-panel .panel-title { padding: 10px 3px 0; }
  .table-wrap { overflow: visible; }
  .responsive-table, .responsive-table tbody { display: block; width: 100%; }
  .responsive-table thead { display: none; }
  .responsive-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-bottom: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,.94); border-radius: 17px; background: var(--panel); box-shadow: var(--shadow-sm); }
  .responsive-table td { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 10px; text-align: right; }
  .responsive-table td::before { content: attr(data-label); flex: none; color: var(--muted); font-size: 9px; font-weight: 600; text-align: left; }
  .responsive-table td[data-label="发标/截标"],
  .responsive-table td[data-label="截标"],
  .responsive-table td[data-label="项目"],
  .responsive-table td[data-label="业主"],
  .responsive-table td[data-label="建设单位"] { grid-column: 1 / -1; }
  #tab-mine .table-wrap { max-height: none; overflow: visible; }
  #tab-mine .ledger-table { table-layout: auto; }
  #tab-mine .ledger-table .col-date,
  #tab-mine .ledger-table .col-title,
  #tab-mine .ledger-table .col-customer,
  #tab-mine .ledger-table .col-result,
  #tab-mine .ledger-table .col-num,
  #tab-mine .ledger-table .col-pct { width: auto; min-width: 0; }
  #tab-mine .ledger-table td.col-title,
  #tab-mine .ledger-table td.col-customer {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: normal;
    line-height: inherit;
  }
  #tab-mine .ledger-filter { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  #tab-mine .ledger-filter button { justify-content: center; }
  .responsive-table td[data-label="项目"] { display: block; padding: 13px 12px; color: var(--ink); font-size: 13px; font-weight: 800; line-height: 1.45; text-align: left; }
  .responsive-table td[data-label="项目"]::before { display: block; margin-bottom: 4px; }
  .responsive-table td[data-label="项目"] .deadline-title-row { align-items: center; }
  .responsive-table td[data-label="项目"] .badge { min-width: 40px; padding: 2px 7px; font-size: 10px; }
  .responsive-table td[data-label="业主"], .responsive-table td[data-label="建设单位"] { text-align: right; }

  .modal { align-items: end; padding: 0; }
  .modal-panel { width: 100%; max-height: 90vh; overflow-y: auto; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 23px 23px 0 0; }
  .toast { right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); left: 14px; text-align: center; }

  body.dark .mobile-appbar, body.dark .mobile-bottom-nav { border-color: #353b48; background: rgba(29, 33, 43, .96); }
  body.dark .mobile-icon-button { border-color: #3d4452; background: #252b35; }
  body.dark .mobile-project-card { border-color: #373d49; background: rgba(31, 35, 45, .97); }
  body.dark .mobile-current-stage { border-color: #3c4d72; background: linear-gradient(135deg, #22324f, #33294b 72%, #463b21); }
  body.dark .mobile-current-stage p { color: #b6bdca; }
  body.dark .mobile-metrics, body.dark .mobile-flow { border-color: #393f4b; background: #252a34; }
  body.dark .mobile-metrics > div { background: #252a34; }
  body.dark .mobile-metrics strong { color: #e2e6ed; }
  body.dark .mobile-tags span, body.dark .mobile-project-card footer { background: #272c36; }
  body.dark .responsive-table tr { border-color: #373d49; background: var(--panel); }
}

.tracking-candidates { margin: 12px 0; padding: 12px; border-radius: 12px; background: #f4f6fb; }
.tracking-candidates-hint { margin: 0 0 8px; font-size: 13px; color: #5b6472; }
#tracking-candidates-list { display: flex; flex-direction: column; gap: 8px; }
.candidate-item { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border: 1px solid #dfe3ec; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s; }
.candidate-item:hover { border-color: #4f7cff; }
.candidate-item b { font-size: 14px; color: #1f2430; }
.candidate-item span { font-size: 12px; color: #6b7280; }
body.dark .tracking-candidates { background: rgba(255, 255, 255, .04); }
body.dark .candidate-item { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .12); }
body.dark .candidate-item b { color: #e6e8ee; }
body.dark .candidate-item span { color: #a7adba; }
