:root {
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #d9dee7;
  --surface: #ffffff;
  --soft: #f5f7fa;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #c97a2b;
  --warm: #fff4e3;
  --warm-strong: #f6d7a8;
  --warm-line: #ead5b8;
  --warm-text: #8a5a22;
  --good: #16803c;
  --warn: #b45309;
  --danger: #b42318;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(246, 215, 168, 0.34)),
    #f3f1ec;
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.phone {
  width: min(430px, 100%);
  height: min(880px, calc(100vh - 48px));
  min-height: 680px;
  background: var(--surface);
  border: 1px solid rgba(138, 90, 34, 0.22);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(31, 41, 51, 0.18);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--warm-line);
  background:
    linear-gradient(180deg, rgba(255, 248, 236, 0.98), rgba(255, 244, 227, 0.96));
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

h2,
h3,
p {
  margin-top: 0;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--warm-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 24px;
}

.xn-logo {
  width: 34px;
  height: 30px;
  display: block;
}

.logo-stroke {
  fill: none;
  stroke: #2c5aa8;
  stroke-width: 9;
  stroke-linejoin: miter;
  stroke-linecap: square;
}

.logo-fill {
  fill: #2c5aa8;
}

.screen {
  overflow-y: auto;
  background: #f6f3ee;
  padding: 16px;
  position: relative;
}

.bottom-nav {
  display: grid;
  border-top: 1px solid var(--warm-line);
  background:
    linear-gradient(180deg, rgba(255, 247, 235, 0.98), rgba(255, 241, 218, 0.98));
}

.bottom-nav.is-hidden {
  display: none;
}

.icp-footer {
  margin: 14px 0 2px;
  text-align: center;
  font-size: 10px;
  line-height: 1.4;
}

.icp-footer a {
  color: #8a8f98;
  text-decoration: none;
}

.icp-footer a:hover,
.icp-footer a:focus-visible {
  color: var(--brand-dark);
  text-decoration: underline;
}

.nav-btn {
  border: 0;
  background: transparent;
  padding: 10px 4px 12px;
  color: #6f7683;
  display: grid;
  gap: 3px;
  justify-items: center;
  min-width: 0;
}

.nav-btn span:first-child {
  font-size: 20px;
  width: 30px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.nav-btn span:last-child {
  font-size: 12px;
  white-space: nowrap;
}

.nav-btn.active {
  color: var(--brand);
  font-weight: 700;
}

.nav-btn.active span:first-child {
  background: rgba(15, 118, 110, 0.1);
  color: var(--brand-dark);
}

.hero {
  min-height: 210px;
  border-radius: 8px;
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(6, 18, 24, 0.08), rgba(6, 18, 24, 0.68)),
    url("https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=900&q=80") center/cover;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  margin-bottom: 14px;
  box-shadow: 0 18px 38px rgba(31, 41, 51, 0.16);
}

.hero h2 {
  margin: 0 0 6px;
  font-size: 30px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.hero p {
  margin: 0;
  line-height: 1.55;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.84);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.director-keypad {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.director-key {
  min-height: 102px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: 0 10px 26px rgba(31, 41, 51, 0.06);
}

.director-key-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.director-key b {
  font-size: 18px;
}

.director-key em {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: #9f3a18;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.director-key small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.director-key.hot-action {
  border-color: #efb3a8;
  background: #fffafa;
}

.director-key.hot-action b {
  color: #9f3a18;
}

.director-key.pulse-action {
  border-color: #e2a44f;
  background: #fff8ed;
  animation: directorPulse 1.8s ease-in-out infinite;
}

@keyframes directorPulse {
  0%, 100% {
    box-shadow: 0 10px 26px rgba(31, 41, 51, 0.06);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(226, 164, 79, 0.2), 0 14px 30px rgba(159, 58, 24, 0.14);
  }
}

.owner-action-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.owner-action-copy {
  min-width: 0;
}

.owner-action-card .owner-badge {
  flex: 0 0 auto;
  min-width: 26px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.owner-action-card.hot-action {
  border-color: #efb3a8;
  background: #fffafa;
}

.owner-action-card.hot-action h3 {
  color: #9f3a18;
}

.owner-action-card.pulse-action {
  border-color: #e2a44f;
  background: #fff8ed;
  animation: directorPulse 1.8s ease-in-out infinite;
}

.owner-action-card.pulse-action h3 {
  color: #9f3a18;
}

.owner-action-card.pulse-action .owner-badge {
  background: #9f3a18;
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(118px, 0.65fr);
  gap: 12px;
}

.project-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(255px, 86%);
  gap: 10px;
  overflow-x: auto;
  padding: 0 2px 8px;
  scroll-snap-type: x mandatory;
}

.project-scroller .project-card {
  scroll-snap-align: start;
}

.news-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border: 1px solid rgba(201, 122, 43, 0.16);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(31, 41, 51, 0.06);
}

.news-stat {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 14px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #edf7f5, #f7fbfa);
}

.news-stat strong {
  font-size: 34px;
  line-height: 1;
  color: var(--brand-dark);
}

.news-stat span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.rating-box {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffaf4, #fff);
  border: 1px solid #f1d8bd;
}

.stars {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}

.star-half {
  width: 28px;
  display: inline-block;
  overflow: hidden;
  position: relative;
  color: #d7dce3;
}

.star-half::before {
  content: "★";
  position: absolute;
  left: 0;
  width: 50%;
  overflow: hidden;
  color: var(--accent);
}

.rating-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.rating-line strong {
  font-size: 20px;
  color: var(--ink);
}

.card,
.project-card,
.list-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(31, 41, 51, 0.04);
}

.card {
  padding: 14px;
}

.choice-card {
  min-height: 150px;
  border: 1px solid rgba(201, 122, 43, 0.18);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  box-shadow: 0 16px 34px rgba(31, 41, 51, 0.07);
}

.choice-card strong {
  color: #24313d;
  font-size: 20px;
  letter-spacing: 0;
}

.choice-card small,
.muted {
  color: var(--muted);
  line-height: 1.55;
}

.choice-card small {
  font-size: 13px;
}

.choice-kicker {
  color: var(--warm-text);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.owner-choice {
  min-height: 178px;
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.98), rgba(255, 235, 192, 0.82));
  border-color: rgba(201, 122, 43, 0.32);
  box-shadow: 0 18px 38px rgba(180, 83, 9, 0.13);
  animation: ownerPulse 2.8s ease-in-out infinite;
}

.owner-choice strong {
  color: #23323c;
  font-size: 30px;
  line-height: 1.08;
}

.owner-choice .tag {
  min-height: 38px;
  justify-content: center;
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #fff;
  font-size: 15px;
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
}

@keyframes ownerPulse {
  0%,
  100% {
    border-color: rgba(201, 122, 43, 0.28);
    box-shadow: 0 18px 38px rgba(180, 83, 9, 0.12);
  }
  50% {
    border-color: rgba(201, 122, 43, 0.62);
    box-shadow: 0 20px 42px rgba(180, 83, 9, 0.2);
  }
}

.manager-choice {
  min-height: 178px;
  padding: 16px;
  background: linear-gradient(180deg, #fff, #f9fafb);
}

.manager-choice strong {
  color: #35424d;
  font-size: 21px;
}

.manager-choice small {
  font-size: 12px;
}

.manager-choice .tag {
  min-height: 34px;
  justify-content: center;
  background: #eef3f6;
  color: #52606d;
}

.primary {
  border: 0;
  border-radius: 8px;
  padding: 12px 14px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
}

.primary:disabled,
.disabled-action {
  background: #aeb8c7;
  color: #f8fafc;
  cursor: not-allowed;
}

.secondary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 700;
}

.stack {
  display: grid;
  gap: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
}

.section-title h2 {
  margin: 0;
  font-size: 17px;
  color: var(--ink);
}

.case-style-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 10px;
  margin-bottom: 8px;
}

.case-masonry {
  column-count: 2;
  column-gap: 10px;
}

.case-card {
  break-inside: avoid;
  margin: 0 0 10px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  text-align: left;
  display: inline-grid;
  width: 100%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 41, 51, 0.06);
}

.case-card img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
}

.case-card:nth-child(2n) img {
  height: 218px;
}

.case-card:nth-child(3n) img {
  height: 136px;
}

.case-card strong {
  padding: 10px 10px 2px;
  font-size: 14px;
  line-height: 1.35;
}

.case-card span {
  padding: 0 10px 10px;
  color: var(--muted);
  font-size: 12px;
}

.case-content-title {
  margin: 12px 0 0;
  font-size: 18px;
}

.case-gallery {
  display: grid;
  gap: 10px;
}

.case-gallery img {
  width: 100%;
  display: block;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf7f5;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.list-item {
  padding: 14px;
  display: grid;
  gap: 8px;
  text-align: left;
  width: 100%;
}

.list-item h3 {
  margin: 0;
  font-size: 16px;
}

.list-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.project-card {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.project-card-button {
  width: 100%;
  text-align: left;
}

.project-search {
  display: grid;
  grid-template-columns: 1fr 44px 44px;
  gap: 8px;
  align-items: center;
  margin: 6px 0 12px;
}

.project-search-field {
  height: 44px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  border: 1px solid var(--warm-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(33, 37, 41, 0.04);
}

.project-search-field span {
  color: var(--brand-dark);
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.project-search-field input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.project-search-field input::placeholder {
  color: #99a1ad;
}

.search-filter-btn,
.search-clear-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
}

.search-filter-btn {
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
}

.search-clear-btn {
  background: #fffaf2;
  color: var(--warm-text);
  border: 1px solid var(--warm-line);
  font-size: 22px;
  line-height: 1;
}

.search-result-title {
  margin-top: 8px;
}

.search-results {
  margin-bottom: 14px;
}

.completed-projects {
  margin-bottom: 12px;
}

.completed-project-card {
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.completed-project-card .status {
  background: #edf7f5;
  color: var(--brand-dark);
}

.completed-empty {
  border-style: dashed;
  background: rgba(248, 250, 252, 0.72);
}

.add-project-card {
  min-height: 126px;
  width: 100%;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed var(--warm-line);
  border-radius: 8px;
  background: rgba(255, 248, 238, 0.72);
  color: var(--warm-text);
  text-align: center;
}

.add-project-card span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--warm-line);
  color: var(--brand-dark);
  font-size: 30px;
  line-height: 1;
}

.add-project-card small {
  color: var(--muted);
  font-size: 12px;
}

.project-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.project-head h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.status {
  height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff3e2;
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.progress {
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: var(--value);
  background: var(--brand);
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.meta {
  background: var(--soft);
  border-radius: 8px;
  padding: 10px;
}

.meta b {
  display: block;
  font-size: 13px;
}

.money-unit {
  font-size: 0.72em;
  margin-left: 1px;
  font-weight: 700;
  color: inherit;
}

.meta b .money-unit,
.value-grid b .money-unit,
.chart-title .money-unit,
.y-axis .money-unit {
  font-size: 0.66em;
}

.meta span {
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.director-card-metrics .meta {
  padding: 8px;
}

.compact-contact-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
}

.compact-contact-row div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: #fffaf4;
  border: 1px solid rgba(201, 122, 43, 0.14);
}

.compact-contact-row b,
.compact-contact-row span {
  display: block;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.compact-contact-row b {
  color: var(--ink);
  font-size: 12px;
}

.compact-contact-row span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.owner-contact-row {
  margin-top: 8px;
  grid-template-columns: 1fr 1fr;
}

.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.director-overview {
  position: relative;
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(201, 122, 43, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 248, 238, 0.86), rgba(255, 255, 255, 0.98));
  box-shadow: 0 16px 34px rgba(31, 41, 51, 0.06);
}

.overview-archive {
  margin: -4px 0 16px;
  border: 1px solid rgba(201, 122, 43, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(31, 41, 51, 0.04);
  overflow: hidden;
}

.archive-summary {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.archive-summary::-webkit-details-marker {
  display: none;
}

.archive-summary::after {
  content: "展开";
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf7f5;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.overview-archive[open] .archive-summary::after {
  content: "收起";
  background: #fff3e2;
  color: var(--warm-text);
}

.archive-year {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(201, 122, 43, 0.14);
  color: var(--warm-text);
  font-size: 15px;
  font-weight: 900;
}

.archive-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.archive-summary small {
  color: var(--muted);
  font-size: 11px;
}

.overview-history-panel {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
  box-shadow: none;
}

.overview-history-panel .overview-head h2 {
  font-size: 18px;
}

.overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.overview-head .year-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin: 0 8px 2px 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(201, 122, 43, 0.12);
  color: var(--warm-text);
  font-size: 13px;
  font-weight: 900;
  vertical-align: middle;
}

.overview-head span {
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.overview-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 20px;
}

.overview-head small,
.chart-title span {
  color: var(--muted);
  font-size: 12px;
}

.overview-periods {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(236px, 82%);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-snap-type: x mandatory;
}

.overview-period {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  scroll-snap-align: start;
}

.period-title,
.chart-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.period-title b,
.chart-title b,
.mini-chart b,
.ai-summary b {
  color: var(--ink);
  font-size: 15px;
}

.period-title span {
  color: var(--warm-text);
  font-size: 12px;
  font-weight: 700;
}

.overview-metrics,
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.overview-metrics div,
.value-grid div {
  min-width: 0;
  padding: 9px 8px;
  border-radius: 8px;
  background: var(--soft);
}

.overview-metrics strong {
  display: block;
  color: var(--brand-dark);
  font-size: 22px;
  line-height: 1;
}

.overview-metrics span,
.value-grid span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.value-grid b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
}

.overview-chart,
.combo-chart,
.mini-chart,
.ai-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.chart-row {
  display: grid;
  grid-template-columns: 38px 1fr 52px;
  align-items: center;
  gap: 8px;
}

.chart-row span,
.chart-row b,
.mini-chart span,
.mini-chart em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.chart-row b,
.mini-chart em {
  color: var(--ink);
  text-align: right;
  font-weight: 800;
}

.chart-track,
.mini-chart p i {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ecef;
}

.chart-track i,
.mini-chart p i::before {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  content: "";
}

.overview-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.bar-key,
.done-key {
  width: 16px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
}

.done-key {
  background: #d99a28;
}

.combo-plot {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  min-height: 190px;
}

.y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 22px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.plot-area {
  position: relative;
  min-width: 0;
  height: 190px;
  padding-bottom: 22px;
}

.grid-lines,
.month-bars {
  position: absolute;
  inset: 0 0 22px;
}

.grid-lines {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.grid-lines i {
  height: 1px;
  background: #e8ecef;
}

.month-bars {
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
}

.month-bar {
  position: relative;
  height: 100%;
}

.month-bar i {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: var(--height);
  min-height: 4px;
  border-radius: 5px 5px 0 0;
  transform: translateX(-50%);
}

.signed-bar {
  z-index: 1;
  width: 64%;
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  box-shadow: 0 -4px 10px rgba(15, 118, 110, 0.1);
}

.finished-bar {
  z-index: 2;
  width: 38%;
  background: linear-gradient(180deg, #f3c46d, #d99a28);
  box-shadow: 0 -4px 10px rgba(217, 154, 40, 0.14);
}

.month-bar em {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.mini-chart p {
  display: grid;
  grid-template-columns: 38px 1fr 42px;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.ai-summary {
  background: linear-gradient(135deg, #edf7f5, #fffaf4);
  border-color: rgba(15, 118, 110, 0.16);
}

.ai-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ai-summary ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ai-summary li + li {
  margin-top: 8px;
}

.province-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.province-line span {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
}

.province-line small {
  color: var(--muted);
  font-size: 12px;
}

.pill-btn {
  border: 1px solid var(--warm-line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  white-space: nowrap;
}

.pill-btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.qr {
  width: 146px;
  height: 146px;
  margin: 8px auto 12px;
  background:
    linear-gradient(90deg, #111 10px, transparent 10px) 0 0/20px 20px,
    linear-gradient(#111 10px, transparent 10px) 0 0/20px 20px,
    #fff;
  border: 12px solid #fff;
  outline: 1px solid var(--line);
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  margin: 4px auto 0;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(15, 118, 110, 0.1);
}

.detail-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.form-row {
  display: grid;
  gap: 6px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.search-row .primary {
  height: 46px;
  min-width: 76px;
}

.owner-login-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.owner-login-grid .primary {
  min-height: 48px;
}

.owner-auth-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}

.owner-auth-card b {
  display: block;
  margin-bottom: 4px;
}

.owner-result {
  margin-top: 12px;
}

.prototype-result {
  margin: 10px 0 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #edf7f5;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.demo-phone-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.demo-phone {
  border: 1px solid #c7d7d5;
  border-radius: 999px;
  background: #eef7f6;
  color: var(--brand-dark);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.segmented button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.segmented button.active {
  background: var(--brand);
  color: #fff;
}

.attendance-location {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.attendance-location p {
  margin: 4px 0 0;
}

.attendance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attendance-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.attendance-card span {
  color: var(--muted);
  font-size: 12px;
}

.acceptance-node-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.acceptance-node {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  text-align: left;
  color: var(--ink);
}

.acceptance-node b {
  font-size: 13px;
}

.acceptance-node span {
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 800;
}

.acceptance-node small {
  color: var(--muted);
  font-size: 11px;
}

.acceptance-node.active {
  border-color: var(--brand);
  background: #edf7f5;
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.18);
}

.progress-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #fff8ee;
  border: 1px solid var(--warm-line);
}

.progress-summary span {
  color: var(--muted);
  font-size: 13px;
}

.camera-panel {
  display: grid;
  gap: 12px;
}

.camera-view {
  min-height: 230px;
  border-radius: 8px;
  color: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.64)),
    url("https://images.unsplash.com/photo-1600566753190-17f0baa2a6c3?auto=format&fit=crop&w=900&q=80") center/cover;
}

.camera-view span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
}

.camera-view b {
  font-size: 22px;
}

.camera-view small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.4;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.photo-thumb {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  display: grid;
  place-items: end start;
  padding: 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.58)),
    url("https://images.unsplash.com/photo-1600566752355-35792bedcfea?auto=format&fit=crop&w=500&q=80") center/cover;
}

.photo-thumb:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.58)),
    url("https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=500&q=80") center/cover;
}

.photo-thumb:nth-child(3) {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.58)),
    url("https://images.unsplash.com/photo-1600585154526-990dced4db0d?auto=format&fit=crop&w=500&q=80") center/cover;
}

.photo-thumb:nth-child(4) {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.58)),
    url("https://images.unsplash.com/photo-1590725121839-892b458a74fe?auto=format&fit=crop&w=500&q=80") center/cover;
}

.photo-thumb span {
  font-weight: 800;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.36);
}

.issue-title h2 {
  color: #9f3a18;
}

.issue-highlight {
  padding: 8px;
  border-radius: 8px;
  background: #fff4e8;
  border: 1px solid #f1c99f;
}

.director-issue {
  background: #fff1f1;
  border-color: #efb3a8;
}

.issue-card.needs-action {
  border-color: #efb3a8;
  background: #fffafa;
}

.issue-card.needs-action h3 {
  color: #9f3a18;
}

.contact-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.contact-line span {
  color: var(--muted);
}

.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-link {
  display: grid;
  place-items: center;
  text-align: center;
  text-decoration: none;
}

.ptz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ptz-grid button:first-child,
.ptz-grid button:last-child {
  grid-column: 2;
}

.form-row label {
  font-weight: 700;
  font-size: 13px;
}

.field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
}

.money-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.money-field .field {
  border: 0;
  border-radius: 0;
}

.money-field span {
  min-width: 58px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  border-left: 1px solid var(--line);
  align-self: stretch;
  display: grid;
  place-items: center;
  background: #faf7f0;
}

.login-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.login-panel h2 {
  margin: 0;
  font-size: 20px;
}

.login-panel p {
  margin: 0;
}

.demo-account {
  display: grid;
  gap: 8px;
}

.account-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
}

.account-btn span {
  color: var(--muted);
  font-size: 12px;
}

.error-text {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
}

.publish-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.flow-step {
  min-height: 72px;
  padding: 10px;
  border-radius: 8px;
  background: #eef7f6;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  align-content: center;
  text-align: center;
}

.upload-box {
  min-height: 118px;
  border: 1px dashed #aeb8c7;
  border-radius: 8px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 14px;
}

.mobile-upload {
  display: grid;
  gap: 8px;
}

.mobile-upload > label {
  font-weight: 700;
  font-size: 13px;
}

.upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.upload-btn {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px dashed var(--warm-line);
  background: #fff8ee;
  color: var(--warm-text);
  font-weight: 800;
  cursor: pointer;
}

.upload-btn input {
  display: none;
}

.manual-intro {
  padding: 16px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #2c5aa8 62%, #c97a2b);
}

.manual-intro h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.manual-intro p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
}

.manual-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(76px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.manual-flow span {
  min-height: 54px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.manual-list {
  display: grid;
  gap: 10px;
}

.manual-pages {
  display: grid;
  gap: 6px;
}

.manual-page {
  margin: 0;
  padding: 6px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  position: relative;
}

.manual-page img {
  width: 100%;
  display: block;
  border-radius: 6px;
  cursor: zoom-in;
}

.manual-page figcaption {
  position: absolute;
  right: 10px;
  bottom: 9px;
  min-width: 28px;
  padding: 2px 5px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(31, 41, 51, 0.42);
  font-size: 10px;
  text-align: center;
}

.guide-rail {
  position: sticky;
  top: 8px;
  z-index: 8;
  float: right;
  display: grid;
  gap: 4px;
  width: 30px;
  margin: 0 -12px 8px 6px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.guide-rail button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 5px 2px;
  line-height: 1;
}

.guide-rail button.active {
  background: var(--brand);
  color: #fff;
}

.manual-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.manual-no {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef7f6;
  color: var(--brand-dark);
  font-weight: 800;
}

.manual-item h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.manual-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  padding: 18px;
  background: rgba(8, 13, 22, 0.86);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.image-viewer.active {
  display: block;
}

.image-viewer img {
  display: block;
  width: min(1120px, 180vw);
  max-width: none;
  height: auto;
  margin: 58px auto 24px;
  border-radius: 8px;
  background: #fff;
}

.image-viewer button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 26px;
}

@media (max-width: 520px) {
  .image-viewer {
    padding: 12px;
  }

  .image-viewer img {
    width: 170vw;
    margin-top: 58px;
  }
}

.notice {
  border-left: 4px solid var(--accent);
  background: #fff8ee;
}

.issue-lock {
  border-left-color: var(--danger);
  background: #fff5f3;
}

.compact-stack {
  gap: 8px;
  margin-top: 10px;
}

.compact-stack .list-item {
  padding: 10px;
}

.history-archive {
  margin-top: 12px;
  border: 1px solid rgba(201, 122, 43, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(31, 41, 51, 0.04);
}

.history-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 0.9fr) minmax(0, 1.1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.history-summary::-webkit-details-marker {
  display: none;
}

.history-summary::after {
  content: "展开";
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf7f5;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.history-archive[open] .history-summary::after {
  content: "收起";
  background: #fff3e2;
  color: var(--warm-text);
}

.history-count {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(201, 122, 43, 0.14);
  color: var(--warm-text);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.history-summary strong {
  min-width: 0;
  color: var(--ink);
  font-size: 16px;
}

.history-summary small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-stack {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.history-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.history-item h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
}

.history-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.empty-history {
  background: #fffaf2;
}

.danger-text {
  color: var(--danger);
}

@media (max-width: 520px) {
  .app-shell {
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }
}
