@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Condensed:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;700;800;900&family=Noto+Serif+SC:wght@600;800&display=swap");

:root {
  --ink: #17211d;
  --ink-soft: rgba(23, 33, 29, 0.68);
  --cream: #f4ead9;
  --cream-strong: #fff8ed;
  --linen: #dfc7a5;
  --green: #25493e;
  --green-dark: #0f241f;
  --gold: #c87928;
  --brick: #9d3526;
  --blue: #1f5a71;
  --line: rgba(23, 33, 29, 0.16);
  --panel: rgba(255, 249, 239, 0.78);
  --shadow: 0 28px 80px rgba(34, 28, 18, 0.22);
  --sans: "IBM Plex Sans Condensed", "Microsoft YaHei", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", serif;
  --admin-sans: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 8% 10%, rgba(200, 121, 40, 0.34), transparent 26rem),
    radial-gradient(circle at 92% 4%, rgba(31, 90, 113, 0.2), transparent 28rem),
    linear-gradient(135deg, #f8efe1 0%, #e2c69f 54%, #b57a46 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.18;
  background-image:
    linear-gradient(90deg, rgba(23, 33, 29, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(23, 33, 29, 0.07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

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

button,
.ghost,
.download-link,
.nav-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

button {
  color: #fff8e9;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 12px 26px rgba(16, 35, 31, 0.28);
}

button:hover,
.download-link:hover,
.nav-admin:hover {
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.66;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--ink);
  outline: none;
  background: rgba(255, 251, 242, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(37, 73, 62, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 73, 62, 0.13);
}

a {
  color: var(--green-dark);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0;
}

.nav-cluster {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-badge {
  padding: 10px 14px;
  border: 1px solid rgba(23, 33, 29, 0.14);
  border-radius: 999px;
  color: rgba(23, 33, 29, 0.68);
  background: rgba(255, 255, 255, 0.34);
  font-weight: 800;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 15px;
  color: #fff7e7;
  background: var(--green-dark);
  transform: rotate(-5deg);
}

.nav-admin,
.ghost {
  padding: 12px 18px;
  border: 1px solid rgba(23, 33, 29, 0.18);
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.46);
  box-shadow: none;
  font-weight: 700;
}

.public-shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.72fr);
  gap: clamp(28px, 5vw, 74px);
  align-items: center;
  min-height: calc(100vh - 148px);
}

.hero-copy {
  animation: rise 700ms ease both;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

h1 {
  max-width: 800px;
  font-size: clamp(3.6rem, 8.6vw, 8.1rem);
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.lede {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.9;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.trust-stack {
  display: grid;
  max-width: 680px;
  margin-top: 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trust-stack div {
  padding: 16px;
  border: 1px solid rgba(23, 33, 29, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.34);
}

.trust-stack strong,
.trust-stack span {
  display: block;
}

.trust-stack span {
  margin-top: 4px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.hero-metrics span,
.seal,
.status-dot,
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 800;
}

.hero-metrics span {
  padding: 9px 13px;
  border: 1px solid rgba(23, 33, 29, 0.16);
  background: rgba(255, 255, 255, 0.4);
}

.redeem-card,
.panel,
.stat-card {
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 38px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.92), rgba(238, 216, 183, 0.76)),
    var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.redeem-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 42px);
  animation: rise 700ms 130ms ease both;
}

.redeem-card::before {
  position: absolute;
  top: -90px;
  right: -90px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(37, 73, 62, 0.16);
  border-radius: 50%;
  content: "";
}

.claim-preview {
  display: grid;
  gap: 9px;
  margin: 26px 0 10px;
  padding: 15px;
  border: 1px solid rgba(37, 73, 62, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.34);
}

.claim-preview span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 73, 62, 0.22), rgba(200, 121, 40, 0.34), rgba(37, 73, 62, 0.08));
}

.claim-preview span:nth-child(2) {
  width: 76%;
}

.claim-preview span:nth-child(3) {
  width: 52%;
}

.redeem-card-top,
.panel-title,
.table-head,
.admin-header,
.header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.seal {
  padding: 8px 11px;
  color: #fff8e9;
  background: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.status-dot {
  padding: 8px 11px;
  color: var(--green-dark);
  background: rgba(37, 73, 62, 0.12);
}

label {
  display: block;
  margin: 24px 0 10px;
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.input-row input {
  min-width: 0;
  padding: 18px 20px;
  font-size: 1.06rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.input-row button,
form > button {
  padding: 16px 24px;
  font-weight: 800;
}

.hint,
.muted,
.message {
  color: var(--ink-soft);
  line-height: 1.65;
}

.hint {
  margin: 14px 0 0;
}

.result {
  display: none;
  margin-top: 24px;
  padding: 18px;
  border-radius: 26px;
  line-height: 1.5;
}

.result.pending,
.result.success,
.result.error {
  display: grid;
  gap: 9px;
}

.result.pending {
  background: rgba(255, 255, 255, 0.58);
}

.result.success {
  border: 1px solid rgba(37, 73, 62, 0.18);
  background: rgba(37, 73, 62, 0.12);
}

.result.error {
  border: 1px solid rgba(157, 53, 38, 0.2);
  color: var(--brick);
  background: rgba(157, 53, 38, 0.08);
}

.claim-ticket {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(37, 73, 62, 0.15);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(200, 121, 40, 0.22), transparent 10rem),
    rgba(255, 255, 255, 0.38);
}

.ticket-label {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff8e9;
  background: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.claim-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.claim-meta span {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(37, 73, 62, 0.1);
  font-weight: 800;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.redeem-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.redeem-meta span {
  padding: 8px 11px;
  border-radius: 999px;
  color: rgba(23, 33, 29, 0.7);
  background: rgba(255, 255, 255, 0.42);
  font-weight: 800;
}

.download-link {
  width: fit-content;
  margin-top: 6px;
  padding: 12px 18px;
  color: #fff8e9;
  font-weight: 800;
  background: var(--gold);
  box-shadow: 0 12px 28px rgba(200, 121, 40, 0.26);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: -28px;
}

.guide-grid article {
  padding: 24px;
  border: 1px solid rgba(23, 33, 29, 0.12);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.42);
}

.guide-grid span {
  color: var(--gold);
  font-weight: 800;
}

.guide-grid h2 {
  margin-top: 10px;
  font-size: 1.45rem;
}

.guide-grid p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.admin-body {
  color: #14211d;
  font-family: var(--admin-sans);
  background:
    radial-gradient(circle at 0% 0%, rgba(200, 121, 40, 0.18), transparent 24rem),
    radial-gradient(circle at 100% 0%, rgba(37, 73, 62, 0.12), transparent 28rem),
    linear-gradient(135deg, #f7f1e7 0%, #ede0cb 48%, #dbc29d 100%);
}

.admin-shell {
  width: min(1360px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.admin-header {
  align-items: flex-end;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 28px;
  background: rgba(255, 250, 241, 0.64);
  box-shadow: 0 18px 50px rgba(34, 28, 18, 0.12);
  backdrop-filter: blur(18px);
}

.admin-header h1 {
  max-width: none;
  font-family: var(--admin-sans);
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.08em;
}

.admin-header .muted {
  margin: 8px 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.admin-body .eyebrow {
  margin-bottom: 7px;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
}

.admin-body h2 {
  font-family: var(--admin-sans);
  font-size: clamp(1.18rem, 1.8vw, 1.55rem);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.admin-body .ghost,
.admin-body .primary-action {
  min-height: 42px;
  padding: 10px 15px;
  font-size: 0.92rem;
  font-weight: 800;
}

.primary-action {
  color: #fff8e9;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 12px 28px rgba(15, 36, 31, 0.22);
}

.login-panel {
  display: grid;
  grid-template-columns: 0.85fr minmax(320px, 440px);
  gap: 18px;
  align-items: stretch;
}

.login-art {
  display: grid;
  min-height: 360px;
  place-items: center;
  border-radius: 38px;
  color: #fff8e9;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent),
    var(--green-dark);
  box-shadow: var(--shadow);
}

.login-art span {
  font-size: clamp(5rem, 12vw, 9rem);
  font-weight: 800;
  letter-spacing: -0.12em;
}

.login-art strong {
  align-self: start;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.panel {
  padding: 26px;
}

.admin-body .panel,
.admin-body .stat-card {
  border-color: rgba(255, 255, 255, 0.56);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 252, 245, 0.88), rgba(238, 222, 197, 0.62)),
    rgba(255, 249, 239, 0.7);
  box-shadow: 0 16px 42px rgba(34, 28, 18, 0.12);
}

.admin-body .panel {
  padding: 18px;
}

.panel.narrow {
  max-width: 440px;
}

.panel form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.admin-body .panel form {
  gap: 10px;
  margin-top: 14px;
}

.panel input,
.panel textarea,
.panel select {
  padding: 14px 16px;
  border-radius: 18px;
}

.admin-body .panel input,
.admin-body .panel textarea,
.admin-body .panel select {
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.92rem;
}

.panel textarea {
  min-height: 220px;
  resize: vertical;
  font-family: "Consolas", "Courier New", monospace;
}

.admin-body .panel textarea {
  min-height: 150px;
}

.compact {
  padding: 10px 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.ops-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.compact-flow {
  gap: 8px;
  margin-bottom: 12px;
}

.ops-guide article {
  padding: 18px;
  border: 1px solid rgba(23, 33, 29, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.36);
}

.compact-flow article {
  padding: 12px;
  border-radius: 18px;
}

.ops-guide span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-bottom: 12px;
  place-items: center;
  border-radius: 15px;
  color: #fff8e9;
  background: var(--green-dark);
  font-weight: 800;
}

.compact-flow span {
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border-radius: 10px;
  font-size: 0.76rem;
}

.ops-guide strong,
.ops-guide p {
  display: block;
}

.ops-guide p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.compact-flow p {
  margin-top: 4px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.batch-panel {
  margin-bottom: 0;
}

.batch-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.batch-card {
  display: grid;
  justify-items: start;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(23, 33, 29, 0.13);
  border-radius: 26px;
  color: var(--ink);
  text-align: left;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.48), rgba(238, 216, 183, 0.48)),
    rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.batch-card span {
  font-weight: 800;
}

.batch-card strong {
  margin-top: 8px;
  font-family: var(--admin-sans);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
}

.batch-card small {
  margin-top: 8px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.maintenance-panel {
  margin-top: 16px;
}

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

.maintenance-grid article {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(23, 33, 29, 0.13);
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(200, 121, 40, 0.18), transparent 12rem),
    rgba(255, 255, 255, 0.36);
}

.maintenance-grid strong {
  font-size: 1rem;
}

.maintenance-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.inline-control {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.stat-card {
  padding: 22px;
}

.admin-body .stat-card {
  min-height: 118px;
  padding: 16px;
}

.stat-card.accent {
  color: #fff8e9;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
}

.stat-card span,
.stat-card small {
  display: block;
  color: currentColor;
  opacity: 0.68;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 2.6rem;
  line-height: 1;
}

.admin-body .stat-card strong {
  margin-top: 8px;
  font-family: var(--admin-sans);
  font-size: 2.08rem;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.health-panel {
  margin-bottom: 10px;
}

.health-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.health-card {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 6px;
  min-height: 112px;
  padding: 13px;
  border: 1px solid rgba(23, 33, 29, 0.13);
  border-radius: 24px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.36);
  box-shadow: none;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.health-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: rgba(37, 73, 62, 0.22);
}

.health-card::after {
  content: "CHECK";
  position: absolute;
  right: -8px;
  bottom: 8px;
  color: rgba(23, 33, 29, 0.05);
  font-family: var(--display);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.04em;
  transform: rotate(-8deg);
}

.health-card:hover,
.health-card.active {
  transform: translateY(-3px);
  border-color: rgba(23, 33, 29, 0.32);
  background: rgba(255, 255, 255, 0.56);
  box-shadow: 0 18px 42px rgba(23, 33, 29, 0.11);
}

.health-card.active {
  outline: 2px solid rgba(37, 73, 62, 0.22);
  outline-offset: 3px;
}

.health-card.bad {
  border-color: rgba(157, 53, 38, 0.28);
  background: linear-gradient(145deg, rgba(157, 53, 38, 0.14), rgba(255, 255, 255, 0.34));
}

.health-card.bad::before {
  background: linear-gradient(90deg, #9d3526, rgba(157, 53, 38, 0.18));
}

.health-card.warn {
  border-color: rgba(200, 121, 40, 0.3);
  background: linear-gradient(145deg, rgba(200, 121, 40, 0.16), rgba(255, 255, 255, 0.34));
}

.health-card.warn::before {
  background: linear-gradient(90deg, #c87928, rgba(200, 121, 40, 0.18));
}

.health-card.quiet {
  background: linear-gradient(145deg, rgba(37, 73, 62, 0.1), rgba(255, 255, 255, 0.34));
}

.health-card span,
.health-card small {
  position: relative;
  z-index: 1;
  color: var(--ink-soft);
  line-height: 1.45;
}

.health-card strong {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  font-family: var(--admin-sans);
  font-size: 1.72rem;
  font-weight: 900;
  line-height: 1;
}

.health-card span {
  font-weight: 800;
}

.health-card small {
  font-size: 0.82rem;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.ops-grid {
  grid-template-columns: 0.95fr 1.1fr 1.1fr;
  align-items: start;
}

.upload-box {
  padding: 12px;
  border: 1px dashed rgba(23, 33, 29, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.32);
}

.generate-form label {
  margin-top: 4px;
}

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

.generated-output {
  margin-top: 14px;
  min-height: 150px;
  font-family: "Consolas", "Courier New", monospace;
}

.generated-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.generated-summary span,
.count-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 800;
}

.generated-summary span {
  padding: 8px 11px;
  color: var(--green-dark);
  background: rgba(37, 73, 62, 0.1);
}

.count-chip {
  padding: 4px 9px;
  color: var(--green-dark);
  background: rgba(37, 73, 62, 0.12);
  font-size: 0.95rem;
  vertical-align: middle;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.45);
}

.file-item span,
td small {
  display: block;
  margin-top: 4px;
  color: rgba(23, 33, 29, 0.56);
  font-size: 0.9rem;
}

.table-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 180px auto auto;
  gap: 8px;
  align-items: center;
  width: min(940px, 100%);
}

.table-tools.slim {
  grid-template-columns: 1fr auto;
  width: min(520px, 100%);
}

.audit-panel .table-head {
  align-items: flex-start;
}

.audit-panel .table-tools.slim {
  display: flex;
  justify-content: flex-end;
  width: auto;
  min-width: 360px;
}

.audit-panel .table-tools.slim .muted {
  max-width: 360px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  text-align: right;
}

.table-wrap {
  overflow: auto;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 9px 12px;
  border: 1px solid rgba(23, 33, 29, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.32);
}

.pagination-bar span {
  color: var(--ink-soft);
  font-weight: 800;
}

.pagination-controls {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pagination-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ink-soft);
  font-weight: 800;
}

.pagination-controls select {
  width: auto;
  min-width: 88px;
  padding: 9px 12px;
  border-radius: 999px;
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 6px;
  padding: 10px 12px;
  border: 1px solid rgba(37, 73, 62, 0.12);
  border-radius: 18px;
  background: rgba(37, 73, 62, 0.08);
}

.bulk-toolbar small {
  display: inline-flex;
  margin-left: 8px;
  color: var(--ink-soft);
  font-weight: 800;
}

.actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

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

th:first-child,
td:first-child {
  width: 42px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green-dark);
  box-shadow: none;
}

.downloads-table {
  min-width: 860px;
  table-layout: fixed;
}

.downloads-table th:nth-child(1) {
  width: 112px;
}

.downloads-table th:nth-child(2) {
  width: 36%;
}

.downloads-table th:nth-child(3) {
  width: 150px;
}

.downloads-table th:nth-child(4),
.downloads-table th:nth-child(5) {
  width: 170px;
}

.downloads-table td {
  vertical-align: middle;
}

.download-date,
.download-code,
.download-fingerprint {
  white-space: nowrap;
}

.download-date {
  color: var(--ink);
  font-weight: 800;
}

.download-file {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-code strong {
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
}

.download-fingerprint code {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: rgba(23, 33, 29, 0.62);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill {
  padding: 4px 8px;
  font-size: 0.8rem;
}

.batch-pill {
  display: inline-flex;
  max-width: 180px;
  padding: 5px 8px;
  overflow: hidden;
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(200, 121, 40, 0.14);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill.good {
  color: var(--green-dark);
  background: rgba(37, 73, 62, 0.14);
}

.pill.bad {
  color: var(--brick);
  background: rgba(157, 53, 38, 0.1);
}

.code-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
}

.code-cell strong {
  display: inline-block;
  max-width: 190px;
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid rgba(37, 73, 62, 0.14);
  border-radius: 12px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.56);
  font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.code-cell.legacy strong {
  color: var(--brick);
  background: rgba(157, 53, 38, 0.08);
}

.copy-chip {
  padding: 6px 9px;
  border: 1px solid rgba(23, 33, 29, 0.16);
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(37, 73, 62, 0.08);
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 900;
}

.copy-chip:disabled {
  color: var(--brick);
  background: rgba(157, 53, 38, 0.08);
}

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

.actions button,
.actions a {
  padding: 7px 9px;
  border: 1px solid rgba(23, 33, 29, 0.18);
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: none;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.82rem;
}

.edit-drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  justify-items: end;
  padding: 18px;
  background: rgba(15, 36, 31, 0.34);
  backdrop-filter: blur(10px);
}

.drawer-card {
  width: min(520px, 100%);
  min-height: calc(100vh - 36px);
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.96), rgba(238, 216, 183, 0.9)),
    var(--panel);
  box-shadow: var(--shadow);
  animation: drawerIn 220ms ease both;
}

.ops-drawer-card {
  width: min(760px, 100%);
  overflow: auto;
}

.drawer-title {
  position: sticky;
  top: -22px;
  z-index: 2;
  margin: -22px -22px 14px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(23, 33, 29, 0.1);
  background: rgba(255, 248, 236, 0.88);
  backdrop-filter: blur(14px);
}

.drawer-section {
  padding: 16px 0;
  border-top: 1px solid rgba(23, 33, 29, 0.1);
}

.drawer-section:first-of-type {
  border-top: 0;
}

.empty-state,
.empty-row {
  color: var(--ink-soft);
  text-align: center;
}

.empty-state {
  display: grid;
  gap: 4px;
  padding: 24px;
  border: 1px dashed rgba(23, 33, 29, 0.2);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.32);
}

.empty-state strong {
  color: var(--ink);
}

.hidden {
  display: none !important;
}

code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes drawerIn {
  from {
    opacity: 0;
    transform: translateX(22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 940px) {
  .public-hero,
  .admin-grid,
  .ops-grid,
  .stat-grid,
  .ops-guide,
  .health-list,
  .guide-grid,
  .trust-stack,
  .batch-list,
  .maintenance-grid,
  .login-panel {
    grid-template-columns: 1fr;
  }

  .public-hero {
    min-height: auto;
  }

  .guide-grid {
    margin-top: 12px;
  }

  .input-row,
  .table-tools,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .panel-title,
  .table-head,
  .bulk-toolbar,
  .file-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .edit-drawer {
    padding: 10px;
  }

  .drawer-card {
    min-height: calc(100vh - 20px);
  }

  .nav-cluster {
    align-items: flex-end;
    flex-direction: column;
  }

  .inline-control {
    grid-template-columns: 1fr;
  }
}

/* Approved minimalist public landing page. Scoped to avoid changing admin UI. */
body.public-body {
  min-height: 100svh;
  overflow-x: hidden;
  color: #292721;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 52% -12%, rgba(70, 113, 87, 0.22), transparent 34rem),
    radial-gradient(circle at 92% 10%, rgba(204, 158, 93, 0.2), transparent 30rem),
    linear-gradient(135deg, #faf4e9 0%, #eee3d1 58%, #dfcfba 100%);
}

body.public-body::before {
  opacity: 0.42;
  background-image:
    linear-gradient(90deg, rgba(42, 39, 33, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(42, 39, 33, 0.04) 1px, transparent 1px);
  background-size: 74px 74px;
  mask-image: radial-gradient(circle at 50% 28%, #000 0%, transparent 72%);
}

body.public-body::after {
  position: fixed;
  inset: auto 8% 6% auto;
  z-index: -1;
  width: min(46vw, 620px);
  height: min(46vw, 620px);
  border-radius: 50%;
  pointer-events: none;
  content: "";
  background: radial-gradient(circle, rgba(255, 255, 255, 0.54), transparent 66%);
  filter: blur(8px);
}

.public-body .site-nav {
  position: relative;
  z-index: 1;
  justify-content: flex-start;
  width: min(1080px, calc(100% - 48px));
  padding: 34px 0 0;
}

.public-body .brand {
  gap: 0;
  color: #20352b;
  font-family: "IBM Plex Sans Condensed", "Noto Sans SC", sans-serif;
  text-decoration: none;
}

.public-body .brand-wordmark {
  display: inline-grid;
  min-width: 78px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(32, 53, 43, 0.16);
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 18px 44px rgba(57, 49, 38, 0.08);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.public-body .nav-cluster,
.public-body .hero-metrics,
.public-body .trust-stack,
.public-body .claim-preview,
.public-body .redeem-meta,
.public-body .guide-grid {
  display: none;
}

.public-body .public-shell {
  display: grid;
  width: min(1080px, calc(100% - 48px));
  min-height: calc(100svh - 78px);
  margin: 0 auto;
  padding: 0 0 64px;
  align-items: center;
}

.public-body .public-hero {
  display: grid;
  width: 100%;
  min-height: auto;
  grid-template-columns: minmax(0, 0.94fr) minmax(360px, 460px);
  gap: clamp(34px, 7vw, 92px);
  align-items: center;
}

.public-body .hero-copy {
  max-width: 590px;
  animation: publicRise 640ms ease both;
}

.public-body .hero-copy h1 {
  max-width: 660px;
  color: #25231e;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(3.2rem, 7.2vw, 6.4rem);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 1.04;
}

.public-body .lede {
  max-width: 500px;
  margin: 24px 0 0;
  color: rgba(41, 39, 33, 0.64);
  font-size: clamp(1.02rem, 1.9vw, 1.24rem);
  font-weight: 500;
  line-height: 1.85;
}

.public-body .redeem-card {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid rgba(56, 52, 44, 0.12);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 252, 246, 0.96), rgba(238, 230, 216, 0.88)),
    rgba(255, 252, 246, 0.9);
  box-shadow:
    0 34px 90px rgba(71, 57, 39, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  animation: publicRise 640ms 120ms ease both;
}

.public-body .redeem-card::before {
  position: absolute;
  top: -110px;
  right: -130px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(circle, rgba(211, 163, 94, 0.2), transparent 62%);
}

.public-body .redeem-card-top {
  position: relative;
  z-index: 1;
  justify-content: flex-start;
  margin-bottom: 26px;
}

.public-body .status-dot {
  position: relative;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid rgba(45, 91, 68, 0.14);
  color: #2d5b44;
  background: rgba(232, 242, 230, 0.78);
  font-size: 0.92rem;
  font-weight: 800;
}

.public-body .status-dot::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  content: "";
  background: #56b87b;
  box-shadow: 0 0 0 5px rgba(86, 184, 123, 0.14);
}

.public-body .redeem-card form {
  position: relative;
  z-index: 1;
}

.public-body label {
  margin: 0 0 10px;
  color: rgba(41, 39, 33, 0.64);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.public-body .input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
}

.public-body .input-row input {
  min-width: 0;
  height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(48, 44, 36, 0.15);
  border-radius: 18px;
  color: #292721;
  background: rgba(255, 250, 242, 0.86);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.74),
    0 1px 0 rgba(42, 39, 33, 0.04);
  font-family: "IBM Plex Sans Condensed", "Noto Sans SC", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.public-body .input-row input::placeholder {
  color: rgba(41, 39, 33, 0.34);
}

.public-body .input-row input:focus {
  border-color: rgba(200, 144, 70, 0.72);
  box-shadow:
    0 0 0 4px rgba(210, 158, 89, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.public-body .input-row button {
  min-height: 58px;
  padding: 0 20px;
  border-radius: 18px;
  color: #fffaf1;
  background: linear-gradient(135deg, #315f49, #19372c);
  box-shadow: 0 16px 34px rgba(34, 68, 52, 0.22);
  font-weight: 900;
  white-space: nowrap;
}

.public-body .input-row button:hover,
.public-body .download-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(34, 68, 52, 0.25);
}

.public-body .result {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding: 18px;
  border-radius: 22px;
  font-size: 0.96rem;
  line-height: 1.65;
}

.public-body .result.pending,
.public-body .result.success,
.public-body .result.error {
  display: grid;
  gap: 10px;
}

.public-body .result.pending {
  border: 1px solid rgba(56, 52, 44, 0.1);
  background: rgba(255, 250, 242, 0.64);
}

.public-body .result.success {
  border: 1px solid rgba(45, 91, 68, 0.14);
  background: rgba(232, 242, 230, 0.72);
}

.public-body .result.error {
  border: 1px solid rgba(151, 59, 43, 0.16);
  color: #873829;
  background: rgba(151, 59, 43, 0.08);
}

.public-body .claim-ticket {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(45, 91, 68, 0.12);
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(210, 158, 89, 0.16), transparent 12rem),
    rgba(255, 252, 246, 0.62);
}

.public-body .ticket-label {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #2c2416;
  background: rgba(218, 172, 109, 0.5);
  font-family: "IBM Plex Sans Condensed", "Noto Sans SC", sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.public-body .claim-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.public-body .claim-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #2d5b44;
  background: rgba(45, 91, 68, 0.1);
  font-size: 0.9rem;
  font-weight: 800;
}

.public-body .result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.public-body .download-link {
  width: fit-content;
  margin: 0;
  padding: 12px 16px;
  border-radius: 14px;
  color: #fffaf1;
  background: linear-gradient(135deg, #315f49, #19372c);
  box-shadow: 0 14px 28px rgba(34, 68, 52, 0.2);
  font-weight: 900;
}

.public-body .ghost {
  padding: 11px 15px;
  border: 1px solid rgba(45, 91, 68, 0.16);
  color: #2d5b44;
  background: rgba(255, 250, 242, 0.72);
  box-shadow: none;
}

@keyframes publicRise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 860px) {
  .public-body .site-nav,
  .public-body .public-shell {
    width: min(100% - 34px, 640px);
  }

  .public-body .public-shell {
    min-height: auto;
    padding: 72px 0 44px;
    align-items: start;
  }

  .public-body .public-hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .public-body .hero-copy h1 {
    font-size: clamp(2.55rem, 12vw, 4.4rem);
  }

  .public-body .lede {
    margin-top: 18px;
  }
}

@media (max-width: 520px) {
  .public-body .site-nav {
    padding-top: 22px;
  }

  .public-body .public-shell {
    padding-top: 58px;
  }

  .public-body .input-row {
    grid-template-columns: 1fr;
  }

  .public-body .input-row button {
    width: 100%;
  }
}
