:root {
  --ink: #20242a;
  --muted: #66707a;
  --line: #dce2e5;
  --paper: #f7f6f1;
  --surface: #ffffff;
  --green: #2d7663;
  --red: #a4473f;
  --gold: #b5822b;
  --teal: #1e6570;
  --blue: #38668e;
  --shadow: 0 18px 45px rgba(28, 36, 43, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #1f2c2f;
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 8px;
  display: block;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #f7d48a;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  margin-top: 3px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item,
.ghost-button,
.primary-button,
.small-button,
.icon-button {
  border: 0;
  border-radius: 8px;
}

.nav-item {
  min-height: 42px;
  padding: 0 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.operator {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.operator span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.operator select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0 10px;
}

.workspace {
  padding: 28px;
  overflow: hidden;
}

.topbar,
.section-head,
.panel-title,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 5px;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 30px;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button,
.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.primary-button {
  background: var(--green);
  color: #fff;
}

.ghost-button {
  background: #e9e7de;
  color: var(--ink);
}

.small-button {
  background: #edf4f1;
  color: var(--green);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel,
.member-card,
.benefit-card,
.credit-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

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

.metric strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
}

.lower-grid {
  margin-top: 18px;
}

.panel {
  padding: 18px;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

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

th {
  color: var(--muted);
  font-weight: 700;
}

.status,
.tier,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
}

.status.pending {
  background: #fff1d3;
  color: #8b5c00;
}

.status.confirmed {
  background: #e4f2ec;
  color: var(--green);
}

.status.used {
  background: #eceff2;
  color: #56606a;
}

.tier {
  background: #f3ead9;
  color: #8a5b18;
}

.visual-panel {
  display: grid;
  gap: 18px;
}

.vault-visual {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(32, 36, 42, 0.78), rgba(32, 36, 42, 0.1)),
    repeating-linear-gradient(90deg, #8f9ba2 0 22px, #78868d 22px 44px);
}

.vault-door {
  position: absolute;
  inset: 24px auto 24px 24px;
  width: 132px;
  border: 10px solid #d0b16b;
  border-radius: 50%;
  background: radial-gradient(circle, #38474c 0 32%, #1f2c2f 33% 100%);
}

.relic-line {
  position: absolute;
  right: 28px;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.72);
}

.line-a {
  top: 48px;
  width: 120px;
}

.line-b {
  top: 86px;
  width: 170px;
}

.line-c {
  top: 124px;
  width: 92px;
}

.benefit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  background: #eef3f5;
  color: var(--teal);
}

.section-head {
  margin-bottom: 16px;
}

.filters {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.filters input,
.filters select,
label input,
label select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
}

.filters input {
  min-width: 280px;
}

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

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

.member-card,
.benefit-card,
.credit-card {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.card-top strong {
  font-size: 18px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

.section-note {
  color: var(--muted);
  margin: 8px 0 0;
  max-width: 780px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.benefit-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.benefit-slots span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: #f2f5f6;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.qr-box {
  min-height: 54px;
  border: 1px dashed #9fb5bc;
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 10px, rgba(31, 101, 112, 0.12) 10px 14px, transparent 14px),
    linear-gradient(0deg, transparent 10px, rgba(31, 101, 112, 0.12) 10px 14px, transparent 14px),
    #f7fbfb;
  background-size: 18px 18px;
  display: grid;
  place-items: center;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

.chart-list,
.notice-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.chart-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.chart-row div,
.capacity-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: #edf1f2;
}

.chart-row i,
.capacity-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.notice {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.notice strong {
  font-size: 14px;
}

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

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

.museum-pin {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.museum-pin strong,
.museum-pin span {
  display: block;
}

.museum-pin span {
  color: var(--muted);
  margin-top: 6px;
  font-size: 13px;
}

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

.kanban-column {
  min-height: 420px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.kanban-column h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

.booking-card {
  display: grid;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.booking-card button {
  justify-self: start;
}

.verify-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 18px;
}

.verify-form,
.modal-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkline input {
  min-height: auto;
}

.verify-result {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 230px;
}

.verify-result strong {
  font-size: 28px;
}

.verify-result.pass {
  border-color: rgba(45, 118, 99, 0.4);
  background: #f2faf6;
}

.verify-result.fail {
  border-color: rgba(164, 71, 63, 0.4);
  background: #fff5f3;
}

dialog {
  width: min(480px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(20, 24, 28, 0.38);
}

.modal-form {
  padding: 6px;
}

.icon-button {
  width: 34px;
  height: 34px;
  background: #eef1f2;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px;
  }

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

  .operator {
    margin-top: 0;
  }

  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .dashboard-grid,
  .card-list,
  .card-list.three,
  .alliance-map,
  .kanban,
  .verify-grid {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 18px;
  }
}

@media (max-width: 1180px) and (min-width: 961px) {
  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters {
    flex-direction: column;
  }

  .filters input {
    min-width: 0;
  }
}

.public-page {
  background: #f4f3ed;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 32px;
  background: rgba(247, 246, 241, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.public-brand,
.public-nav nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.public-brand .brand-mark {
  background: #1f2c2f;
}

.public-brand .brand-logo {
  box-shadow: 0 8px 24px rgba(31, 44, 47, 0.14);
}

.public-nav nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.admin-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: var(--green);
}

.public-hero {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  align-items: center;
  gap: 48px;
  padding: 54px 6vw 72px;
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 680px;
  color: #4f5961;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-media {
  position: relative;
  min-height: 520px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    linear-gradient(180deg, rgba(31, 44, 47, 0.08), rgba(31, 44, 47, 0.78)),
    radial-gradient(circle at 38% 42%, #d5b46e 0 7%, transparent 8%),
    linear-gradient(90deg, #6e8086 0 14%, #a6b2b5 14% 16%, #3e535a 16% 31%, #c8b078 31% 33%, #87989d 33% 49%, #b7c0c3 49% 51%, #4d666e 51% 66%, #d3bd82 66% 68%, #8a9ca2 68% 100%);
}

.gallery-wall {
  position: absolute;
  inset: 32px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.artifact {
  position: absolute;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 36px rgba(20, 24, 28, 0.2);
}

.artifact-a {
  width: 34%;
  height: 44%;
  left: 8%;
  top: 16%;
}

.artifact-b {
  width: 28%;
  height: 30%;
  right: 10%;
  top: 12%;
}

.artifact-c {
  width: 38%;
  height: 24%;
  right: 16%;
  bottom: 14%;
}

.visitor-card {
  position: absolute;
  left: 34px;
  bottom: 34px;
  display: grid;
  gap: 8px;
  width: 220px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 16px;
}

.visitor-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.visitor-card strong {
  color: var(--teal);
}

.public-band,
.public-section {
  padding: 42px 6vw;
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.7fr);
  gap: 28px;
  background: #fff;
  border-block: 1px solid var(--line);
}

.intro-band p {
  max-width: 780px;
  color: var(--muted);
  line-height: 1.8;
}

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

.public-stats article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
  padding: 18px;
}

.public-stats strong,
.public-stats span {
  display: block;
}

.public-stats strong {
  font-size: 34px;
}

.public-stats span {
  color: var(--muted);
  margin-top: 6px;
}

.apply-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(380px, 0.6fr);
  gap: 28px;
  align-items: start;
}

.apply-steps {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.apply-steps article {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}

.apply-steps strong {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
}

.public-form {
  box-shadow: var(--shadow);
}

.form-result {
  color: var(--green);
  font-weight: 800;
  margin-bottom: 0;
}

@media (max-width: 960px) {
  .public-nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  .public-hero,
  .intro-band,
  .apply-layout {
    grid-template-columns: 1fr;
  }

  .public-hero {
    min-height: auto;
    padding: 34px 18px 42px;
  }

  .hero-media {
    min-height: 360px;
  }

  .public-band,
  .public-section {
    padding: 32px 18px;
  }

  .public-stats {
    grid-template-columns: 1fr;
  }
}
