:root {
  --bg: #f5f7fb;
  --bg-glow: rgba(240, 109, 59, 0.1);
  --panel: rgba(255, 255, 255, 0.98);
  --panel-soft: rgba(247, 249, 252, 0.98);
  --line: rgba(15, 23, 42, 0.08);
  --text: #1f2937;
  --muted: #6b7280;
  --brand: #f37b47;
  --brand-deep: #f05a39;
  --ok: #27ae60;
  --warn: #d89b23;
  --danger: #e85d5d;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, var(--bg-glow), transparent 32%),
    linear-gradient(180deg, #fff8f4 0%, #f8fafc 34%, #f4f7fb 100%);
}

body {
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  width: min(100%, 560px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.wide-shell {
  width: min(100%, 1180px);
}

.login-shell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  max-width: 460px;
  margin: 0 auto;
  position: relative;
  isolation: isolate;
}

.login-shell::before,
.login-shell::after {
  content: "";
  position: fixed;
  z-index: -2;
  border-radius: 999px;
  filter: blur(10px);
  pointer-events: none;
}

.login-shell::before {
  width: 280px;
  height: 280px;
  left: -60px;
  top: 12vh;
  background: radial-gradient(circle, rgba(243, 123, 71, 0.26) 0%, rgba(243, 123, 71, 0) 70%);
  animation: loginFloatA 9s ease-in-out infinite;
}

.login-shell::after {
  width: 240px;
  height: 240px;
  right: -70px;
  bottom: 14vh;
  background: radial-gradient(circle, rgba(255, 214, 186, 0.34) 0%, rgba(255, 214, 186, 0) 72%);
  animation: loginFloatB 11s ease-in-out infinite;
}

.login-hero,
.panel,
.tabbar,
.summary-card,
.voucher-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-hero,
.panel,
.summary-card {
  padding: 18px;
}

.login-panel {
  padding: 20px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
  border-color: rgba(240, 109, 59, 0.1);
  box-shadow:
    0 20px 48px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.issue-panel {
  padding: 20px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 248, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.issue-result-page {
  display: grid;
  gap: 16px;
}

.issue-result-head {
  padding-top: 2px;
}

.issue-result-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #433227;
}

.issue-result-card {
  padding: 18px 12px 18px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top, rgba(243, 123, 71, 0.14), transparent 34%),
    linear-gradient(180deg, #fffaf3 0%, #fffdf9 56%, #ffffff 100%);
  border: 1px solid rgba(240, 181, 88, 0.14);
  box-shadow:
    0 18px 42px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.issue-result-summary {
  text-align: center;
}

.issue-result-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255, 221, 158, 0.42), rgba(255, 240, 208, 0.56));
  color: #f29900;
  font-size: 30px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.issue-result-status {
  margin-top: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #b36316;
}

.issue-result-sub {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #8b6b56;
}

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

.issue-result-meta-item {
  padding: 12px 12px 11px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(240, 109, 59, 0.08);
}

.issue-result-meta-label {
  font-size: 12px;
  color: var(--muted);
}

.issue-result-meta-value {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
  color: #3d2c21;
}

.issue-result-qr-card {
  margin-top: 16px;
  padding: 14px 8px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(253, 248, 241, 0.96));
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.issue-result-qr-head {
  display: flex;
  justify-content: center;
}

.issue-result-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(243, 123, 71, 0.12);
  color: #c5642f;
  font-size: 12px;
  font-weight: 700;
}

.issue-result-tag.status-issued,
.issue-result-tag.status-pending,
.issue-result-tag.status-used,
.issue-result-tag.status-void,
.issue-result-tag.status-refunded,
.issue-result-tag.status-cancelled {
  border: 1px solid currentColor;
}

.issue-result-viewport {
  margin-top: 14px;
}

.issue-result-voucher {
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0;
}

.issue-result-qr-shell {
  width: min(100%, 368px);
  margin: 0 auto;
  padding: 2px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 14px 28px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.issue-result-code-label {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #9a8d83;
}

.issue-result-code-value {
  margin-top: 6px;
  color: #5f4a3f;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  word-break: break-all;
}

.issue-result-pager {
  margin-top: 10px;
}

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

.issue-result-actions .btn:only-child {
  grid-column: 1 / -1;
}

.issue-result-actions .btn,
.issue-result-reset {
  min-height: 52px;
  border-radius: 16px;
  font-size: 17px;
  font-weight: 700;
}

.issue-result-reset {
  color: #8c5a3b;
  background: transparent;
}

.login-hero {
  padding: 26px 22px 22px;
  text-align: left;
  background:
    linear-gradient(135deg, rgba(243, 123, 71, 0.1), rgba(255, 255, 255, 0) 58%),
    linear-gradient(180deg, #ffffff, #fffaf6);
  position: relative;
  overflow: hidden;
  border-color: rgba(240, 109, 59, 0.12);
  box-shadow:
    0 22px 54px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.login-hero::after,
.hero-topbar::after {
  content: "";
  position: absolute;
  right: -44px;
  top: -44px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(243, 123, 71, 0.16) 0%, rgba(243, 123, 71, 0) 72%);
  pointer-events: none;
}

.login-hero::before {
  content: "";
  position: absolute;
  left: -36px;
  bottom: -52px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 214, 186, 0.42) 0%, rgba(255, 214, 186, 0) 72%);
  pointer-events: none;
  animation: heroGlow 8s ease-in-out infinite;
}

.login-hero-minimal {
  min-height: 200px;
  display: grid;
  place-items: center;
  text-align: center;
}

.login-brandlock {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 320px;
}

.login-brand-logo {
  display: block;
  width: 88px;
  height: 88px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow:
    0 20px 40px rgba(71, 123, 243, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 0 0 1px rgba(71, 123, 243, 0.16);
  animation: brandLogoPop 620ms cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

@keyframes brandLogoPop {
  0% { transform: translateY(8px) scale(0.9); opacity: 0; filter: blur(8px); }
  100% { transform: translateY(0) scale(1); opacity: 1; filter: blur(0); }
}

.login-brandword {
  position: relative;
  z-index: 1;
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 800;
  letter-spacing: 3px;
  color: #1f2937;
  text-shadow: 0 10px 28px rgba(240, 109, 59, 0.16);
}

.login-brandword::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -10px;
  width: 64px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(243, 123, 71, 0), rgba(243, 123, 71, 0.95), rgba(243, 123, 71, 0));
}

.login-brand-subhead {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #304a86;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 247, 255, 0.96));
  border: 1px solid rgba(71, 123, 243, 0.14);
  box-shadow:
    0 16px 34px rgba(71, 123, 243, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.login-brand-subhead::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(71, 123, 243, 0.12), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.login-brand-subhead-distribution {
  color: #37569a;
}

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

.brand-meta {
  min-width: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.brand-note {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(240, 109, 59, 0.22);
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.hero-kicker,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #a2572f;
  background: rgba(243, 123, 71, 0.1);
}

.hero-kicker {
  margin-bottom: 14px;
}

@keyframes loginFloatA {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(26px, -18px, 0) scale(1.08);
  }
}

@keyframes loginFloatB {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-24px, 22px, 0) scale(1.1);
  }
}

@keyframes heroGlow {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes brandPulse {
  0%,
  100% {
    opacity: 0.62;
    width: 72px;
  }
  50% {
    opacity: 1;
    width: 108px;
  }
}

.login-title,
.topbar-title {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
}

.login-title {
  margin: 18px 0 8px;
}

.login-copy,
.topbar-sub,
.field-label,
.muted,
.helper,
.empty,
.record-sub,
.record-time,
.summary-sub {
  color: var(--muted);
}

.login-copy,
.helper,
.empty,
.record-sub {
  font-size: 14px;
  line-height: 1.65;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-points.compact {
  margin-top: 12px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-trust.compact {
  margin-top: 10px;
}

.hero-point {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #475467;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
}

.trust-item {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #667085;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

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

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

.field-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #875036;
}

.field-hint {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.topbar-actions .btn-sm {
  min-width: 0;
  white-space: nowrap;
  border-radius: 14px;
}

.section-copy {
  margin-bottom: 14px;
}

.section-note {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.input,
.select {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  font-size: 13px;
  border: 1px solid rgba(240, 109, 59, 0.18);
  border-radius: 16px;
  outline: none;
  background: linear-gradient(180deg, #fffdfa 0%, #ffffff 100%);
  color: #5f4633;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.select {
  font-weight: 600;
  color: #5f4633;
  font-size: 12px;
}

.select option {
  color: #111827;
  font-size: 12px;
}

.picker-trigger {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(240, 109, 59, 0.18);
  background: linear-gradient(180deg, #fffdfa 0%, #ffffff 100%);
  color: #b38a74;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.picker-trigger.filled {
  color: #5f4633;
}

.picker-trigger[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.picker-trigger-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}

.picker-trigger-arrow {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
  color: #c59a82;
}

.input::placeholder {
  color: #9ca3af;
}

.input:focus,
.select:focus {
  border-color: rgba(240, 109, 59, 0.34);
  box-shadow: 0 0 0 3px rgba(240, 109, 59, 0.10);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: #fffaf4;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 12px 24px rgba(240, 109, 59, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 16px 30px rgba(240, 109, 59, 0.24);
}

.btn-ghost {
  color: #4b5563;
  background: #fffaf7;
  border: 1px solid rgba(240, 109, 59, 0.14);
}

.btn-ghost:hover,
.btn-quiet:hover,
.qty-btn:hover {
  border-color: rgba(240, 109, 59, 0.2);
  background: #fff6f1;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 38px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-quiet {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
}

.btn[disabled],
.tab-btn[disabled],
.input:disabled,
.select:disabled,
.qty-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn[disabled] {
  transform: none;
  box-shadow: none;
}

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

.hero-topbar {
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(243, 123, 71, 0.08), rgba(255, 255, 255, 0) 52%),
    #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

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

.topbar-sub {
  margin-top: 4px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin-bottom: 14px;
  background: var(--panel-soft);
  border: 1px solid rgba(15, 23, 42, 0.05);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.authed-shell {
  padding-bottom: 28px;
}

.authed-content {
  display: grid;
  gap: 14px;
}

.tabbar-docked {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 96;
  width: min(calc(100% - 24px), 560px);
  margin: 0;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255, 250, 246, 0.94);
  backdrop-filter: blur(14px);
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.tab-btn {
  min-height: 42px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.tab-btn.active {
  color: #8e4722;
  background: linear-gradient(135deg, rgba(243, 123, 71, 0.14), rgba(240, 90, 57, 0.12));
  box-shadow: 0 8px 18px rgba(240, 109, 59, 0.08);
}

.summary-row {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.summary-card {
  display: grid;
  gap: 6px;
}

.summary-accent {
  background:
    linear-gradient(135deg, rgba(243, 123, 71, 0.08), rgba(255, 255, 255, 0) 56%),
    var(--panel);
}

.summary-value,
.voucher-code,
.voucher-index,
.record-title {
  font-size: 18px;
  font-weight: 700;
}

.summary-sub,
.voucher-meta,
.voucher-phone,
.record-time {
  font-size: 13px;
}

.account-name {
  font-size: 20px;
  font-weight: 700;
}

.account-sub,
.scope-text {
  color: var(--muted);
}

.account-sub,
.scope-text {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.65;
}

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

.account-panel,
.history-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(252, 253, 255, 0.98) 100%);
}

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

.account-panel-compact {
  display: grid;
  gap: 14px;
}

.scope-box-subtle {
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(255, 250, 246, 0.72) 0%, rgba(252, 253, 255, 0.8) 100%);
  border-color: rgba(15, 23, 42, 0.05);
}

.scope-disclosure {
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.02);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.scope-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #7c685a;
}

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

.scope-disclosure[open] .scope-summary {
  padding-bottom: 0;
}

.scope-disclosure .scope-box-subtle {
  margin-top: 0;
  border: 0;
  background: transparent;
}

.scope-list-subtle {
  gap: 6px;
}

.scope-item-subtle {
  padding: 8px 10px;
  font-size: 12px;
  color: #7c685a;
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.05);
}

.metric-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf6 0%, #ffffff 100%);
  border: 1px solid rgba(240, 109, 59, 0.08);
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: #101828;
}

.metric-label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.section-head,
.inline-row,
.record-top,
.voucher-head,
.voucher-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.voucher-nav {
  justify-content: flex-end;
}

.section-head-tight {
  margin-bottom: 14px;
}

.section-subtitle {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #8b6b56;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 998;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
}

.modal-card {
  width: min(100%, 460px);
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fffdfb 0%, #ffffff 100%);
  border: 1px solid rgba(240, 109, 59, 0.08);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.picker-mask {
  align-items: flex-end;
}

.picker-card {
  padding: 18px 16px 16px;
  border-radius: 24px 24px 0 0;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  position: relative;
}

.picker-card::before {
  content: "";
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(176, 122, 89, 0.24);
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 14px;
}

.picker-subtitle {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.picker-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f8ede6;
  color: #a46a49;
  font-size: 22px;
  line-height: 1;
}

.picker-options {
  display: grid;
  gap: 10px;
  max-height: min(56vh, 420px);
  overflow-y: auto;
}

.picker-option {
  width: 100%;
  padding: 14px 14px 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fffaf7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.picker-option.active {
  border-color: rgba(240, 109, 59, 0.26);
  background: linear-gradient(180deg, #fff5ee 0%, #fffaf7 100%);
  box-shadow: 0 10px 24px rgba(240, 109, 59, 0.08);
}

.picker-option-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.picker-option-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: #3b2d25;
  word-break: break-word;
}

.picker-option-note {
  font-size: 12px;
  color: #b07a59;
}

.picker-option-check {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(240, 109, 59, 0.22);
  color: #fff;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex: 0 0 auto;
}

.picker-option.active .picker-option-check {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

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

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

.modal-subtitle {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  color: #8b6b56;
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #f8ede6;
  color: #a46a49;
  font-size: 22px;
  line-height: 1;
  flex: none;
}

.section-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.issue-intro {
  margin-bottom: 18px;
}

.issue-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  color: #a8461b;
}

.issue-subtitle {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #d38a62;
}

.qty-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 8px;
}

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

.qty-btn {
  min-height: 50px;
  border-radius: 16px;
  border: 1px solid rgba(240, 109, 59, 0.18);
  color: #8e4722;
  background: linear-gradient(180deg, #fffdfa 0%, #fff8f2 100%);
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.qty-note {
  font-size: 12px;
  color: #b1a19a;
  white-space: nowrap;
}

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

.action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: stretch;
}

.action-row .btn {
  min-width: 0;
}

.action-row .btn-primary {
  min-height: 52px;
  font-size: 16px;
  border-radius: 18px;
}

.action-row .btn-ghost {
  min-height: 52px;
  border-radius: 18px;
}

.voucher-frame {
  padding: 14px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fffdfa 0%, #ffffff 100%);
}

.voucher-shell-head {
  margin-bottom: 12px;
}

.voucher-shell-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.12);
  color: #18794e;
  font-size: 12px;
  font-weight: 700;
}

.voucher-shell-meta {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.6;
  color: #8b6b56;
}

.completion-ribbon {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  width: fit-content;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(15, 23, 42, 0.06);
  color: #475467;
  margin-bottom: 12px;
}

.feedback-card {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fcfdff;
}

.feedback-card.ok {
  background: rgba(39, 174, 96, 0.06);
  border-color: rgba(39, 174, 96, 0.12);
}

.feedback-card.soft {
  background: #fcfdff;
}

.feedback-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  flex: none;
  background: var(--brand);
}

.feedback-card.ok .feedback-dot {
  background: var(--ok);
}

.feedback-copy {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.voucher-viewport {
  overflow: hidden;
  border-radius: 18px;
}

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

.completion-item {
  padding: 14px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

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

.completion-value {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.voucher-track {
  display: flex;
  transition: transform 0.24s ease;
  will-change: transform;
}

.voucher-card {
  flex: 0 0 100%;
  padding: 18px 10px 18px;
  border-radius: 24px;
  border: 1px solid rgba(240, 109, 59, 0.08);
  background: linear-gradient(180deg, #fffefd 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.04);
}

.voucher-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(243, 123, 71, 0.92), rgba(240, 90, 57, 0.52));
}

.voucher-meta {
  margin-bottom: 14px;
  display: grid;
  gap: 4px;
  text-align: left;
}

.voucher-meta-line {
  font-size: 13px;
  line-height: 1.5;
  color: #7a5a46;
  word-break: break-word;
}

.voucher-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  display: block;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
  padding: 0;
  border: 0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.voucher-qr-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 18px;
  border-radius: 12px;
  box-shadow: none;
}

.voucher-qr-stage {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.voucher-qr-stage canvas,
.voucher-qr-stage img {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.voucher-qr-fallback {
  width: 232px;
  height: 232px;
  object-fit: contain;
}

.voucher-manual {
  width: 100%;
  min-height: 232px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 24px 18px;
  border-radius: 12px;
  box-sizing: border-box;
}

.voucher-manual-hidden {
  min-height: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  aspect-ratio: auto;
  height: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.issue-result-qr-shell .voucher-manual-hidden {
  height: auto;
  min-height: 180px;
  aspect-ratio: 1 / 1;
  opacity: 1;
  visibility: visible;
  background:
    radial-gradient(circle at 50% 40%, rgba(240, 109, 59, 0.06) 0%, transparent 60%),
    linear-gradient(180deg, #fffdf9 0%, #fff9f2 100%);
  border-radius: 22px;
  border: 1px dashed rgba(200, 152, 108, 0.5);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px 18px;
  box-sizing: border-box;
  pointer-events: none;
}

.issue-result-qr-shell .voucher-manual-hidden::before {
  content: "凭证信息";
  font-size: 18px;
  font-weight: 700;
  color: #a77148;
  letter-spacing: 2px;
}

.issue-result-qr-shell .voucher-manual-hidden::after {
  content: "请查看下方凭证信息出示核销";
  font-size: 13px;
  color: #b79372;
  line-height: 1.6;
}

.voucher-manual-img {
  max-width: 100%;
  max-height: 360px;
  display: block;
  border-radius: 8px;
  object-fit: contain;
}

.voucher-manual-link {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.7;
  color: #F06D3B;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 14px 16px;
  background: #FFF7F0;
  border-radius: 10px;
}

.voucher-manual-text {
  width: 100%;
  max-width: 100%;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.5px;
  color: #111111;
  text-align: center;
  word-break: break-all;
  word-wrap: break-word;
  padding: 18px 14px;
  background: #FFF7F0;
  border-radius: 10px;
  box-sizing: border-box;
}

.voucher-unavailable {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(180deg, #fff9f4 0%, #fffdfb 100%);
}

.voucher-unavailable-title {
  font-size: 18px;
  font-weight: 800;
}

.voucher-unavailable-copy {
  font-size: 13px;
  line-height: 1.6;
  max-width: 220px;
}

.voucher-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  text-align: left;
}

.voucher-card-main {
  min-width: 0;
}

.voucher-card-title {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  color: #1f2937;
  word-break: break-word;
}

.voucher-qr-shell {
  padding: 2px;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
  border: 1px solid rgba(240, 109, 59, 0.1);
}

.voucher-code-line {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #5b3c2a;
  word-break: break-all;
  font-variant-numeric: tabular-nums;
}

.voucher-card .record-actions {
  margin-top: 12px;
  justify-content: center;
}

.voucher-card .record-actions .btn {
  min-width: 132px;
  border-radius: 999px;
}

.scope-box {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffaf6 0%, #fcfdff 100%);
  border: 1px solid rgba(240, 109, 59, 0.08);
}

.scope-caption {
  font-size: 12px;
  font-weight: 700;
  color: #a2572f;
}

.scope-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.scope-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(243, 123, 71, 0.06);
  border: 1px solid rgba(240, 109, 59, 0.08);
  color: #5f4633;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.voucher-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}

.pager-arrow {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(240, 109, 59, 0.14);
  background: #fffaf7;
  color: #8e4722;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.pager-arrow:active {
  transform: scale(0.97);
}

.pager-arrow:hover {
  border-color: rgba(240, 109, 59, 0.2);
  background: #fff2ea;
}

.pager-arrow[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.status-pill,
.mini-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-issued,
.status-pending {
  color: #8f5f16;
  background: rgba(255, 201, 111, 0.14);
  border: 1px solid rgba(255, 201, 111, 0.22);
}

.status-used,
.status-success {
  color: #18794e;
  background: rgba(39, 174, 96, 0.12);
  border: 1px solid rgba(39, 174, 96, 0.16);
}

.status-void,
.status-refunded,
.status-cancelled,
.status-danger {
  color: #b54747;
  background: rgba(232, 93, 93, 0.1);
  border: 1px solid rgba(232, 93, 93, 0.16);
}

.status-pill::before,
.mini-status::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 999px;
  background: currentColor;
}

.record-list {
  display: grid;
  gap: 12px;
}

.record-card {
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fffefd 0%, #fcfdff 100%);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
  position: relative;
  overflow: hidden;
}

.record-card::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(243, 123, 71, 0.92), rgba(240, 90, 57, 0.5));
}

.empty-card {
  padding: 26px 20px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(243, 123, 71, 0.04), rgba(255, 255, 255, 0) 56%),
    #fcfdff;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.empty-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  pointer-events: none;
}

.empty-visual {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a2572f;
  font-size: 18px;
  font-weight: 800;
  background: rgba(243, 123, 71, 0.1);
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.empty-copy {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

#passwordForm {
  gap: 12px;
}

.record-sub {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.6;
  color: #8b6b56;
}

.record-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.record-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-start;
}

.record-actions .btn {
  min-width: 120px;
  border-radius: 16px;
}

.history-more {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.history-more .btn {
  min-width: 148px;
}

.record-count {
  color: #b07a59;
  font-size: 12px;
  white-space: nowrap;
}

.empty {
  padding: 36px 14px;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  max-width: calc(100vw - 32px);
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  color: #fffdf9;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.busy-card {
  min-width: 220px;
  max-width: 86vw;
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.98);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.busy-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border: 4px solid rgba(59, 130, 246, 0.18);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: busy-spin 0.85s linear infinite;
}

@keyframes busy-spin {
  to { transform: rotate(360deg); }
}

.busy-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  margin: 4px 0 4px;
}

.busy-sub {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
}

@media (min-width: 960px) {
  .summary-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shell-grid {
    grid-template-columns: minmax(0, 1.22fr) minmax(360px, 0.78fr);
    align-items: start;
  }

  .sticky-panel {
    position: sticky;
    top: 18px;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .topbar-title,
  .login-title {
    font-size: 20px;
  }

  .topbar {
    gap: 8px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .btn-sm {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .topbar-sub {
    font-size: 11px;
  }

  .issue-panel {
    padding: 18px 16px 16px;
  }

  .issue-subtitle {
    font-size: 12px;
  }

  .qty-inline {
    gap: 10px;
  }

  .qty-note {
    font-size: 11px;
  }

  .action-row {
    grid-template-columns: minmax(0, 1fr) 92px;
  }

  .action-row .btn-primary,
  .action-row .btn-ghost {
    min-height: 48px;
    font-size: 14px;
  }

  .voucher-image {
    width: 100%;
  }
}

.poster-preview-mask {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  -webkit-user-select: none;
  user-select: none;
}

.poster-preview-mask.show {
  display: flex;
}

.poster-preview-backdrop {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.poster-preview-wrap {
  position: relative;
  z-index: 2;
  width: min(92vw, 420px);
  max-height: 94vh;
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.24);
}

.poster-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #f3ede6;
}

.poster-preview-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.2px;
}

.poster-preview-sub {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: #a58a72;
}

.poster-preview-close {
  border: 0;
  background: transparent;
  padding: 4px 10px;
  color: #8a745f;
  font-size: 28px;
  line-height: 1;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.poster-preview-close:active {
  background: #fff2ea;
  color: #F06D3B;
}

.poster-preview-stage {
  padding: 12px 14px 20px;
  background: #fbf7f2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.poster-preview-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(240, 109, 59, 0.16);
  -webkit-touch-callout: default;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

@media (max-width: 420px) {
  .poster-preview-wrap {
    width: 92vw;
    border-radius: 18px;
  }

  .poster-preview-stage {
    padding: 10px 10px 16px;
  }

  .poster-preview-img {
    border-radius: 12px;
  }
}
