:root {
  --bg: #f4f1eb;
  --panel: rgba(255, 255, 255, 0.68);
  --panel-strong: rgba(255, 255, 255, 0.88);
  --text: #17203a;
  --muted: #70809d;
  --line: rgba(94, 118, 158, 0.18);
  --accent: #0ea5a0;
  --accent-strong: #127d79;
  --warm: #f59e0b;
  --danger: #dc2626;
  --success: #16a34a;
  --shadow: 0 20px 60px rgba(27, 39, 68, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Outfit", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 160, 0.16), transparent 30%),
    radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.12), transparent 28%),
    linear-gradient(145deg, #f7f3ee, #f0efe9 48%, #eef1f7);
}

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

button {
  cursor: pointer;
  border: 0;
}

.app-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(50px);
  pointer-events: none;
  opacity: 0.45;
}

.ambient-a {
  width: 240px;
  height: 240px;
  top: 10%;
  left: 6%;
  background: rgba(14, 165, 160, 0.18);
}

.ambient-b {
  width: 280px;
  height: 280px;
  bottom: 10%;
  right: 8%;
  background: rgba(245, 158, 11, 0.14);
}

.ambient-c {
  width: 180px;
  height: 180px;
  top: 38%;
  right: 20%;
  background: rgba(31, 76, 143, 0.1);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  background: transparent;
  color: var(--text);
}

.brand strong,
.brand small {
  display: block;
  text-align: left;
}

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

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #7dd3fc);
  box-shadow: 0 0 0 10px rgba(14, 165, 160, 0.08);
}

.nav {
  display: flex;
  gap: 10px;
}

.nav-link,
.ghost-action,
.solid-action,
.icon-button {
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.nav-link,
.ghost-action {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
  border: 1px solid var(--line);
}

.solid-action,
.icon-button {
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--text), #31456b);
  color: white;
  box-shadow: var(--shadow);
}

.nav-link:hover,
.ghost-action:hover,
.solid-action:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.glass-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 22px;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.redeem-head,
.redeem-input-panel,
.redeem-stats-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent-strong);
}

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

h1 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.02;
  max-width: 10ch;
  margin-bottom: 18px;
}

.hero-text {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.7;
}

.slot-cluster {
  margin-top: 28px;
}

.slot-track {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.slot-track span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(112, 128, 157, 0.16);
}

.slot-track span.active {
  background: var(--accent);
}

.slot-track span.warn {
  background: var(--warm);
}

.slot-track span.danger {
  background: #ef4444;
}

#slot-label {
  color: var(--muted);
  font-size: 14px;
}

.field-label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.search-input,
.keys-area,
select.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  padding: 18px 20px;
  outline: none;
}

.keys-area {
  border-radius: var(--radius-lg);
  min-height: 260px;
  resize: vertical;
}

.minor-actions {
  margin-top: 18px;
}

#single-result-region,
#batch-toolbar-region,
#batch-list-region {
  margin-top: 22px;
}

.status-card,
.timeline-card,
.toolbar-panel,
.job-card,
.empty-panel,
.admin-card {
  border-radius: var(--radius-xl);
  background: var(--panel-strong);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
}

.timeline-card,
.status-card,
.toolbar-panel,
.empty-panel,
.admin-card {
  padding: 26px;
}

.timeline-steps {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.timeline-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(243, 247, 251, 0.7);
}

.timeline-step.active {
  background: rgba(14, 165, 160, 0.12);
}

.timeline-step.done {
  background: rgba(22, 163, 74, 0.1);
}

.step-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid var(--line);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.info-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(244, 247, 252, 0.8);
}

.info-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
}

.info-item strong,
.info-item code {
  font-size: 17px;
  word-break: break-all;
}

.pill-row,
.download-row,
.footer-actions,
.panel-footer,
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.pill.success {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.pill.running {
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.pill.failed {
  background: rgba(220, 38, 38, 0.12);
  color: var(--danger);
}

.redeem-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.7fr;
  gap: 22px;
  margin-top: 22px;
}

.redeem-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.admin-hero-dashboard {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

.admin-hero-dashboard::before {
  content: none;
}

.admin-hero-copy,
.admin-dashboard-metrics,
.admin-hero-dashboard .toolbar-actions {
  position: relative;
  z-index: 1;
}

.admin-dashboard-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.admin-hero-copy h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #1672d8;
  font-size: clamp(30px, 3.2vw, 44px);
  letter-spacing: -0.04em;
}

.admin-hero-copy p {
  margin: 12px 0 0;
  color: #5f6f8f;
}

.dashboard-help {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #64748b;
  color: #475569;
  font-size: 14px;
  line-height: 1;
}

.dashboard-stat-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 10px;
  min-height: 82px;
  padding: 12px 14px;
  border-radius: 18px;
  color: #17203a;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(213, 224, 242, 0.9);
  box-shadow: 0 18px 42px rgba(31, 76, 143, 0.1);
}

.dashboard-stat-card::after {
  content: "";
  position: absolute;
  width: 68px;
  height: 68px;
  right: -30px;
  top: -30px;
  border-radius: 50%;
  background: rgba(41, 132, 255, 0.08);
}

.dashboard-stat-icon {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e6efff, #f0f6ff);
}

.dashboard-stat-icon svg {
  width: 25px;
  height: 25px;
  fill: #1672d8;
}

.dashboard-stat-ring {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 54%, transparent 56%),
    conic-gradient(#1672d8 var(--ring), #e6edf8 0);
  color: #1672d8;
  font-weight: 900;
}

.dashboard-stat-ring b {
  font-size: 12px;
  line-height: 1;
}

.dashboard-stat-ring em {
  margin-left: 1px;
  font-size: 8px;
  font-style: normal;
}

.dashboard-stat-card span,
.dashboard-stat-card small {
  display: block;
  position: relative;
  z-index: 1;
}

.dashboard-stat-card span {
  font-size: 16px;
  font-weight: 800;
  color: #4b5874;
  letter-spacing: 0;
  text-transform: none;
  opacity: 1;
}

.dashboard-stat-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 4px 0 1px;
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #10182f;
}

.dashboard-stat-card small {
  color: #8a98b5;
  font-size: 12px;
}

.dashboard-stat-body {
  min-width: 0;
}

.outflow-mini-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 7px 0 2px;
}

.outflow-mini-grid span {
  display: grid;
  gap: 1px;
  padding: 5px 6px;
  border-radius: 12px;
  background: rgba(230, 239, 255, 0.7);
  text-align: center;
}

.outflow-mini-grid b {
  color: #10182f;
  font-size: 20px;
  line-height: 1;
}

.outflow-mini-grid em {
  color: #7b8cae;
  font-size: 11px;
  font-style: normal;
}

.dashboard-stat-card.loading {
  grid-column: 1 / -1;
}

.stat-2 .dashboard-stat-icon,
.stat-5 .dashboard-stat-icon {
  background: linear-gradient(135deg, #e7f7ff, #eefbff);
}

.stat-2 .dashboard-stat-icon svg,
.stat-5 .dashboard-stat-icon svg {
  fill: #0891b2;
}

.stat-3 .dashboard-stat-icon,
.stat-6 .dashboard-stat-icon {
  background: linear-gradient(135deg, #eef2ff, #f6f3ff);
}

.stat-3 .dashboard-stat-icon svg,
.stat-6 .dashboard-stat-icon svg {
  fill: #4f46e5;
}

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

.stats-grid article {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(244, 247, 252, 0.85);
}

.stats-grid span,
.progress-block small {
  color: var(--muted);
}

.stats-grid strong {
  display: block;
  font-size: 30px;
  margin-top: 6px;
}

.progress-block {
  margin-top: 18px;
}

.progress-bar {
  height: 14px;
  border-radius: 999px;
  background: rgba(112, 128, 157, 0.16);
  overflow: hidden;
  margin-bottom: 10px;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  transition: width 240ms ease;
}

.toolbar-panel {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.job-list {
  display: grid;
  gap: 14px;
}

.job-card {
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
}

.job-card h3,
.job-card p {
  margin-bottom: 6px;
}

.job-card small {
  color: var(--muted);
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-top: 10px;
}

.job-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.mini-action {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(23, 32, 58, 0.08);
  color: var(--text);
}

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

#admin-region {
  margin-top: 14px;
  display: grid;
  gap: 16px;
}

.admin-shell-split {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-side-nav {
  position: sticky;
  top: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  padding: 14px;
}

.admin-side-nav-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.admin-side-nav-list {
  display: grid;
  gap: 8px;
}

.admin-side-link {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(23, 32, 58, 0.05);
  color: var(--text);
  border: 1px solid transparent;
}

.admin-side-link.active {
  background: linear-gradient(135deg, #1e2a4a, #40567f);
  color: white;
  box-shadow: 0 14px 28px rgba(27, 39, 68, 0.16);
}

.admin-content-stack {
  min-width: 0;
}

.admin-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.admin-page-head h3 {
  margin: 4px 0 0;
}

.admin-page-head-with-stats {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 1.2fr) auto;
  align-items: center;
}

.admin-title-block .hero-text {
  margin: 6px 0 0;
}

.inline-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 8px;
}

.inline-stat-row-two {
  grid-template-columns: repeat(2, minmax(110px, 1fr));
}

.inline-stat-row-one {
  grid-template-columns: minmax(140px, 220px);
}

.inline-stat-row .info-item {
  padding: 8px 10px;
  background: rgba(244, 247, 252, 0.72);
}

.inline-stat-row .info-item strong {
  font-size: 18px;
}

.admin-page-panel {
  display: grid;
  gap: 14px;
}

.admin-subsection {
  display: grid;
  gap: 8px;
}

.admin-subsection h3 {
  margin: 8px 0 2px;
  font-size: 18px;
}

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

.admin-card h3 {
  margin-bottom: 10px;
}

.import-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}

.import-picker-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(244, 247, 252, 0.78);
  border: 1px solid var(--line);
}

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

.import-picker-card span {
  color: var(--muted);
  line-height: 1.7;
}

.import-picker-card input {
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(112, 128, 157, 0.14);
  vertical-align: top;
}

.admin-table th {
  background: rgba(244, 247, 252, 0.95);
  font-size: 13px;
  color: var(--muted);
}

.admin-table td code {
  word-break: break-all;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

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

.inline-actions .mini-button,
.inline-actions .mini-action {
  flex: 0 0 auto;
}

.mini-button {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(23, 32, 58, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.mini-button.danger {
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
}

.danger-action {
  background: linear-gradient(90deg, #111111 0%, #8b1118 52%, #d5a64a 100%);
}

.admin-email-cell strong {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  color: transparent;
}

.file-badge.present {
  background: rgba(22, 163, 74, 0.12);
}

.file-badge.missing {
  background: rgba(148, 163, 184, 0.14);
}

.file-badge::before {
  color: #64748b;
}

.file-badge.present::before {
  content: "有";
  color: var(--success);
}

.file-badge.missing::before {
  content: "缺";
}

.toast {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.toast-floating {
  margin: 0 0 18px;
}

.hero-grid-minimal {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 440px);
  gap: 36px;
  align-items: center;
  min-height: 58vh;
}

.hero-copy-minimal,
.hero-card-minimal {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 12px 0;
}

.hero-brand-block {
  max-width: 560px;
}

.hero-text-compact {
  max-width: 40ch;
  font-size: 16px;
  line-height: 1.9;
}

.search-row-minimal {
  grid-template-columns: 1fr;
  gap: 14px;
}

.search-input-minimal {
  border-radius: 999px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.92);
}

.icon-button-minimal {
  width: 100%;
  min-height: 54px;
}

.home-stage-card {
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 64px rgba(27, 39, 68, 0.1);
  backdrop-filter: blur(16px);
  padding: 28px;
}

.home-stage-card-idle {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
  gap: 36px;
  align-items: start;
}

.result-side-copy {
  padding: 18px 4px 0 0;
}

.result-side-copy h3 {
  font-size: 34px;
  line-height: 1.12;
  margin-bottom: 14px;
  max-width: 10ch;
}

.result-card-minimal {
  display: grid;
  gap: 18px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(23, 32, 58, 0.08);
  color: var(--text);
  font-size: 13px;
  margin-bottom: 18px;
}

.status-chip-success {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.status-chip-wait {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.status-chip-failed {
  background: rgba(220, 38, 38, 0.12);
  color: var(--danger);
}

.result-subtext {
  color: var(--muted);
  line-height: 1.85;
  max-width: 42ch;
}

.progress-block-tight {
  margin-top: 0;
}

.minimal-step-list {
  display: grid;
  gap: 10px;
}

.minimal-step {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(244, 247, 252, 0.72);
}

.minimal-step.active {
  background: rgba(14, 165, 160, 0.1);
}

.minimal-step strong,
.result-data-row strong,
.result-data-row code {
  word-break: break-all;
}

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

.result-data-list {
  display: grid;
  gap: 10px;
}

.result-data-row {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(244, 247, 252, 0.72);
}

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

.result-action-stack {
  display: grid;
  gap: 12px;
}

.result-action-stack .ghost-action {
  width: 100%;
  justify-content: center;
}

.result-action-stack .solid-action {
  width: 100%;
  justify-content: center;
  min-height: 56px;
  font-size: 15px;
  background: linear-gradient(90deg, #111111 0%, #7a0f16 52%, #d5a64a 100%);
  color: #fff8ef;
  box-shadow: 0 18px 36px rgba(122, 15, 22, 0.22);
}

.disabled-action,
.disabled-action:hover {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ghost-action-wide {
  min-height: 48px;
}

@media (max-width: 920px) {
  .hero-grid,
  .redeem-layout,
  .admin-grid,
  .admin-shell-split,
  .import-picker-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid-minimal,
  .result-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .topbar,
  .redeem-head,
  .toolbar-panel,
  .job-card {
    grid-template-columns: 1fr;
    display: grid;
  }

  .nav {
    flex-wrap: wrap;
  }

  .admin-side-nav {
    position: static;
  }

  .admin-hero-dashboard {
    grid-template-columns: 1fr;
  }

  .admin-page-head-with-stats {
    grid-template-columns: 1fr;
  }

  .admin-dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-card,
  .redeem-head,
  .redeem-input-panel,
  .redeem-stats-panel,
  .status-card,
  .timeline-card,
  .toolbar-panel,
  .empty-panel {
    padding: 20px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: none;
  }
}

.app-shell-compact {
  width: min(1360px, calc(100% - 48px));
  padding-top: 10px;
}

.topbar-minimal {
  margin-bottom: 24px;
}

body.home-route .topbar-minimal {
  display: none;
}

.compact-home {
  min-height: calc(100vh - 110px);
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 18px;
  padding: 72px 0 28px;
}

.compact-home-hero {
  justify-items: center;
}

.compact-home-copy-hero {
  width: min(520px, 100%);
  text-align: center;
}

.compact-query-wrap-hero {
  width: min(600px, 100%);
}

.compact-search-row-hero {
  grid-template-columns: 1fr 64px;
  padding: 10px;
}

.compact-search-button-icon {
  min-height: 54px;
  border-radius: 20px;
  font-size: 34px;
  line-height: 1;
  font-weight: 500;
}

.slot-cluster-home #slot-label {
  color: #c7cfde;
  font-size: 13px;
  font-weight: 700;
}

.compact-home-hero .compact-result-region {
  justify-self: center;
}

.compact-home-copy {
  text-align: center;
}

.compact-home-copy h1 {
  max-width: none;
  margin-bottom: 4px;
  font-size: clamp(40px, 5.4vw, 60px);
  letter-spacing: -0.04em;
}

.compact-subtitle {
  margin: 0;
  color: #93a3c1;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 700;
}

.slot-cluster-compact {
  margin-top: 10px;
  display: grid;
  justify-items: center;
}

.compact-query-wrap {
  width: min(387px, 100%);
  display: grid;
  gap: 12px;
}

.mode-switch {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mode-pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #8190b2;
  border: 1px solid rgba(151, 168, 202, 0.24);
}

.mode-pill.active {
  background: rgba(133, 146, 173, 0.92);
  color: white;
}

.compact-query-card {
  display: grid;
  gap: 10px;
}

.compact-search-row {
  display: grid;
  grid-template-columns: 1fr 80px;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(151, 168, 202, 0.2);
  box-shadow: 0 14px 50px rgba(27, 39, 68, 0.05);
}

.compact-search-input {
  border: 0;
  background: transparent;
  padding: 12px 18px;
  font-size: 15px;
}

.compact-search-button {
  min-height: 46px;
  border-radius: 20px;
  background: #8b93a5;
  color: white;
  font-weight: 700;
}

.compact-batch-area {
  min-height: 154px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
}

.compact-batch-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.compact-secondary-actions {
  display: flex;
  justify-content: center;
}

.compact-result-region {
  width: min(387px, 100%);
  margin-top: 6px;
}

.compact-home-hero .compact-query-wrap {
  width: min(600px, 100%);
}

.compact-home-hero .compact-search-row {
  grid-template-columns: 1fr 64px;
  padding: 10px;
}

.compact-home-hero .compact-search-button {
  min-height: 54px;
  border-radius: 20px;
  font-size: 34px;
  line-height: 1;
  font-weight: 500;
}

.compact-feedback-card {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 64px rgba(27, 39, 68, 0.08);
  backdrop-filter: blur(16px);
  padding: 18px;
}

.compact-batch-result {
  display: grid;
  gap: 16px;
}

.compact-stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-batch-result .toolbar-panel,
.compact-batch-result .admin-card {
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0;
}

.compact-batch-result .admin-table-wrap {
  background: rgba(255, 255, 255, 0.62);
}

@media (max-width: 920px) {
  .compact-home {
    min-height: auto;
    padding-top: 8px;
  }

  .compact-query-wrap,
  .compact-result-region {
    width: 100%;
  }

  .compact-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell-compact {
    width: min(100% - 20px, 1360px);
  }

  .compact-search-row {
    grid-template-columns: 1fr;
    border-radius: 28px;
  }

  .compact-search-button,
  .compact-batch-actions .footer-actions,
  .compact-batch-actions {
    width: 100%;
  }

  .compact-batch-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .admin-dashboard-metrics {
    grid-template-columns: 1fr;
  }
}
