:root {
  color-scheme: light;
  --bg: #edf4ff;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-alt: #f8fbff;
  --line: #d7e3f4;
  --text: #172033;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-active: #1d4ed8;
  --success: #10b981;
  --success-active: #059669;
  --warning: #f59e0b;
  --warning-active: #d97706;
  --shadow: 0 20px 45px rgba(37, 99, 235, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 30%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 28%),
    linear-gradient(180deg, #eef5ff 0%, #f7fbff 100%);
  color: var(--text);
}

.page {
  width: min(1780px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 58%, #38bdf8 100%);
  color: #fff;
  border-radius: 26px;
  padding: 28px 30px;
  box-shadow: var(--shadow);
}

.storefront-hero {
  align-items: stretch;
}

.hero.compact {
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  opacity: 0.85;
}

.hero h1,
.section-head h2 {
  margin: 0;
}

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

.subtext {
  margin: 10px 0 0;
  max-width: 700px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.hero-badges {
  min-width: 320px;
  display: grid;
  gap: 14px;
  align-content: center;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 16px 18px;
  backdrop-filter: blur(10px);
}

.badge-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.badge-text {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.88);
}

.layout {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 20px;
  margin-top: 20px;
}

.storefront-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.checkout-layout {
  grid-template-columns: 1fr 1fr;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.order-form,
.admin-form {
  margin-top: 18px;
}

.storefront-main,
.storefront-side {
  padding: 26px;
}

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

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--panel-alt);
  border-radius: 22px;
  padding: 18px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.08);
}

.plan-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.plan-card:has(input:checked) {
  border-color: #2563eb;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.12);
}

.plan-title {
  font-size: 18px;
  font-weight: 700;
}

.plan-hours,
.plan-discount {
  color: var(--muted);
  font-size: 14px;
}

.plan-price {
  font-size: 28px;
  font-weight: 800;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.single-field-grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 560px;
}

label span {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 15px;
  color: var(--text);
}

input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.primary-button,
.secondary-button,
.success-button,
.warning-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  margin-top: 20px;
  color: #fff;
  background: var(--primary);
}

.inline-button {
  width: auto;
}

.primary-button:hover {
  background: var(--primary-active);
}

.secondary-button {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.08);
}

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

.success-button:hover {
  background: var(--success-active);
}

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

.warning-button:hover {
  background: var(--warning-active);
}

.payment-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.info-stack {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.info-item {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%);
  border: 1px solid #dce8f8;
  border-radius: 20px;
  padding: 16px 18px;
}

.info-kicker {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
}

.info-title {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 700;
}

.info-item p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.price-note {
  margin-top: 18px;
  padding: 18px;
  background: #172554;
  color: #fff;
  border-radius: 22px;
}

.price-note-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.price-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.price-line:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.qr-image {
  width: min(100%, 320px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--line);
  margin-top: 18px;
}

.tips,
.pay-amount {
  width: 100%;
  margin-top: 18px;
  color: var(--muted);
}

.tips ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.summary-list {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

.summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
}

.button-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.claim-panel {
  display: flex;
  flex-direction: column;
}

.claim-form {
  margin-top: 8px;
}

.status-box {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  line-height: 1.7;
}

.success-box {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.wait-box {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.error-box {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.admin-login,
.admin-panel {
  margin-top: 20px;
}

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

.admin-search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.admin-search-bar input {
  flex: 1;
}

.no-top-gap {
  margin-top: 0;
}

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

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

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid #e6eef9;
  text-align: left;
  font-size: 14px;
  vertical-align: middle;
  white-space: normal;
}

thead {
  background: #f8fbff;
}

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

.action-stack {
  display: grid;
  gap: 10px;
  min-width: 148px;
}

.sticky-action-col {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -8px 0 18px rgba(15, 23, 42, 0.05);
}

thead .sticky-action-col {
  z-index: 3;
  background: #f8fbff;
}

.action-stack form,
.action-stack button {
  width: 100%;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.order-pending,
.card-issued {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.order-paid,
.card-active {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

.card-expired {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.card--,
.card-none {
  background: rgba(100, 116, 139, 0.12);
  color: #475569;
}

.flash-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash-item {
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 14px;
}

.flash-item.success {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

.flash-item.error {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

@media (max-width: 900px) {
  .hero,
  .layout,
  .storefront-grid,
  .field-grid,
  .plan-grid,
  .admin-topbar,
  .admin-search-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .layout,
  .checkout-layout,
  .storefront-grid {
    grid-template-columns: 1fr;
  }

  .hero-badges {
    width: 100%;
    min-width: 0;
  }

  .page {
    width: min(100% - 20px, 1180px);
  }
}
