:root {
  --brick: #b33a1f;
  --brick-dark: #7f2718;
  --teal: #0f766e;
  --jade: #d6f4ec;
  --gold: #d89a2b;
  --gold-soft: #fff1cf;
  --green: #1c7c43;
  --blue: #2b5fab;
  --ink: #17202a;
  --muted: #667085;
  --line: #d7dee8;
  --paper: #fffaf2;
  --surface: #ffffff;
  --soft: #f4f7f6;
  --danger: #b42318;
  --shadow: 0 16px 40px rgba(21, 31, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  background: var(--paper);
}

.hero {
  min-height: 430px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(12, 18, 26, 0.88) 0%, rgba(12, 18, 26, 0.64) 42%, rgba(12, 18, 26, 0.18) 78%),
    url("./assets/shenyang-hero.png") center / cover no-repeat;
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.sync-pill {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.hero-copy {
  max-width: 670px;
}

.hero-copy h1 {
  font-size: 42px;
  line-height: 1.12;
  margin: 0 0 14px;
}

.hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.kpi {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px;
  backdrop-filter: blur(10px);
}

.kpi strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
}

.kpi span {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

.tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 250, 242, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.tabs {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0;
}

.tab {
  min-width: max-content;
  border: 0;
  border-radius: 8px;
  padding: 9px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.tab.active {
  background: var(--brick);
  color: #fff;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 54px;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.panel,
.list-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
}

.card {
  padding: 18px;
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  line-height: 1.25;
}

.section-title h2 {
  font-size: 22px;
}

.section-title h3 {
  font-size: 17px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--brick);
  color: #fff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.btn.secondary {
  background: var(--ink);
}

.btn.ghost {
  background: #fff;
  color: var(--brick);
  border: 1px solid rgba(179, 58, 31, 0.28);
}

.btn.subtle {
  background: var(--soft);
  color: var(--ink);
}

.btn.icon {
  width: 36px;
  height: 36px;
  justify-content: center;
  padding: 0;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  min-height: 40px;
}

.textarea {
  min-height: 92px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: 2px solid rgba(15, 118, 110, 0.18);
  border-color: var(--teal);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #fff;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 11px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  background: #24313f;
  color: #fff;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  background: var(--soft);
}

.pill.green {
  color: #115c31;
  background: #dff5e8;
}

.pill.gold {
  color: #7a4a00;
  background: var(--gold-soft);
}

.pill.blue {
  color: #1e4f9a;
  background: #e2ecff;
}

.pill.red {
  color: var(--danger);
  background: #ffe4df;
}

.poll-card,
.food-card,
.todo-row,
.expense-row,
.note-card,
.timeline-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.poll-card {
  padding: 15px;
}

.poll-title {
  font-weight: 900;
  margin-bottom: 10px;
}

.option-list {
  display: grid;
  gap: 8px;
}

.option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  padding: 10px;
}

.option.selected {
  border-color: var(--teal);
  background: var(--jade);
}

.option-main {
  min-width: 0;
}

.option-name {
  font-weight: 900;
}

.meter {
  height: 8px;
  border-radius: 99px;
  background: #e9eef4;
  overflow: hidden;
  margin-top: 8px;
}

.meter span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--teal);
}

.option-count {
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
}

.timeline-time {
  color: var(--brick);
  font-weight: 900;
}

.timeline-title {
  font-weight: 900;
  margin-bottom: 4px;
}

.timeline-cost {
  color: var(--teal);
  font-weight: 900;
  white-space: nowrap;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.food-card {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.food-card h3 {
  margin: 0;
  font-size: 15px;
}

.todo-row,
.expense-row {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 150px 130px 44px;
  gap: 10px;
  align-items: center;
}

.expense-row {
  grid-template-columns: 100px minmax(0, 1fr) 120px 110px 90px 44px;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.note-card {
  padding: 13px;
}

.note-card p {
  margin: 8px 0 0;
}

.empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100% - 36px));
  border-radius: 8px;
  background: #17202a;
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  z-index: 99;
}

.setup-code {
  overflow-x: auto;
  background: #101820;
  color: #f7efe2;
  padding: 14px;
  border-radius: 8px;
  font-size: 12px;
}

.footer-space {
  height: 24px;
}

@media (max-width: 900px) {
  .hero {
    min-height: 520px;
  }

  .topbar {
    margin-bottom: 42px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .kpi-row,
  .grid.two,
  .grid.three,
  .food-grid,
  .note-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item,
  .todo-row,
  .expense-row {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand {
    white-space: nowrap;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-actions .btn:first-child {
    grid-column: 1 / -1;
  }
}
