#app {
  min-height: 100vh;
}

html,
body {
  font-family: "DM Sans", system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--mud-palette-background);
  color: var(--mud-palette-text-primary);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header__copy {
  display: grid;
  gap: 0.25rem;
}

.metric-card {
  height: 100%;
}

.metric-card__value {
  line-height: 1;
  letter-spacing: -0.03em;
}

.data-table .mud-table-container {
  border: 1px solid var(--mud-palette-table-lines);
  border-radius: 12px;
}

.field-stack,
.action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.field-stack > :first-child {
  flex: 1 1 18rem;
}

.mono-text,
.code-pill {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.upload-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.qr-shell {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.qr-card {
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px solid var(--mud-palette-divider);
  border-radius: 12px;
  background: var(--mud-palette-surface);
}

.qr-card svg {
  width: 100%;
  max-width: 220px;
  height: auto;
}

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

.code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--mud-palette-divider);
  background: color-mix(in srgb, var(--mud-palette-surface) 88%, var(--mud-palette-primary) 12%);
}

.identity-boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background:
    radial-gradient(circle at top, rgba(194, 65, 12, 0.14), transparent 34%),
    #0f172a;
}

.identity-boot-panel {
  width: min(100%, 28rem);
  padding: 2rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
}

.identity-boot-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.identity-boot-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.875rem;
  background: #c2410c;
  color: #fff;
  font-weight: 700;
}

.identity-boot-name {
  font-size: 1.125rem;
  font-weight: 700;
}

.identity-boot-panel p {
  margin: 0.5rem 0 0;
  color: rgba(226, 232, 240, 0.76);
}

.identity-boot-bar {
  margin-top: 1rem;
  height: 0.375rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.22);
}

.identity-boot-bar-fill {
  width: 35%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  animation: boot-progress 1.2s ease-in-out infinite alternate;
}

#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: #b91c1c;
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.24);
  z-index: 2000;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
  color: inherit;
  margin-left: 1rem;
}

@keyframes boot-progress {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(150%);
  }
}

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

@media (max-width: 720px) {
  .page-header {
    align-items: stretch;
  }
}
