
:root {
  color-scheme: light;
  --bg: #f4f8fb;
  --bg-accent: radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 30%), radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 28%), linear-gradient(180deg, #fcfdff 0%, #eef6fb 100%);
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --text: #0f172a;
  --muted: #526077;
  --border: rgba(148, 163, 184, 0.24);
  --primary: #0f9d8a;
  --primary-strong: #0a7e70;
  --primary-soft: rgba(15, 157, 138, 0.12);
  --danger: #dc2626;
  --warning: #b45309;
  --success: #15803d;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font: "Avenir Next", "Segoe UI", "SF Pro Display", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  background: var(--bg-accent);
  color: var(--text);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1100px, calc(100vw - 28px));
  margin: 0 auto;
}

.page {
  min-height: 100vh;
  padding: 24px 0 48px;
}

.topbar,
.footer,
.hero,
.grid,
.card,
.stack,
.stats,
.status-layout {
  animation: rise 360ms ease both;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 20px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand strong {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.brand span,
.footer p,
.muted,
.helper {
  color: var(--muted);
}

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

.nav-link,
.chip {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.64);
  border-radius: 999px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--muted);
  transition: 180ms ease;
}

.nav-link.active,
.nav-link:hover,
.chip.active {
  color: var(--text);
  border-color: rgba(15, 157, 138, 0.26);
  background: rgba(255, 255, 255, 0.88);
}

.hero {
  display: grid;
  gap: 28px;
  grid-template-columns: 1.3fr 0.9fr;
  align-items: stretch;
  padding: 18px 0 26px;
}

.hero-panel,
.card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}

.eyebrow::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #14b8a6, #0f9d8a);
  box-shadow: 0 0 0 6px rgba(20, 184, 166, 0.14);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  line-height: 0.98;
  margin-top: 18px;
}

h2 {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
}

p {
  line-height: 1.6;
}

.hero-copy p {
  max-width: 42rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions,
.button-row,
.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 28px;
}

.button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  border-radius: 16px;
  padding: 0 18px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: 180ms ease;
  font-weight: 700;
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), #14b8a6);
  color: white;
  box-shadow: 0 14px 28px rgba(15, 157, 138, 0.22);
}

.button.secondary,
.button-link,
.button.ghost {
  background: white;
  color: var(--text);
  border-color: var(--border);
}

.button.danger {
  background: #fff5f5;
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.16);
}

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

.button[disabled] {
  cursor: progress;
  opacity: 0.7;
  transform: none;
}

.hero-side {
  padding: 26px;
  display: grid;
  gap: 18px;
}

.mini-stat {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.mini-stat strong {
  display: block;
  font-size: 1.9rem;
  margin-bottom: 8px;
  letter-spacing: -0.04em;
}

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

.card {
  padding: 26px;
}

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

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

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

.field label {
  font-weight: 700;
}

.field input {
  width: 100%;
  min-height: 58px;
  border-radius: 18px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: white;
  color: var(--text);
  transition: 140ms ease;
}

.field input:focus {
  outline: none;
  border-color: rgba(15, 157, 138, 0.48);
  box-shadow: 0 0 0 5px rgba(15, 157, 138, 0.12);
}

.field textarea,
.field select {
  width: 100%;
  border-radius: 18px;
  padding: 14px 18px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: white;
  color: var(--text);
  transition: 140ms ease;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(15, 157, 138, 0.48);
  box-shadow: 0 0 0 5px rgba(15, 157, 138, 0.12);
}

.helper,
.inline-note {
  font-size: 0.95rem;
}

.flash {
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid transparent;
}

.flash.error {
  background: #fff1f2;
  border-color: rgba(220, 38, 38, 0.18);
  color: #991b1b;
}

.flash.success {
  background: #f0fdf4;
  border-color: rgba(21, 128, 61, 0.18);
  color: #166534;
}

.flash.warning {
  background: #fff7ed;
  border-color: rgba(180, 83, 9, 0.18);
  color: #9a3412;
}

.result {
  display: grid;
  gap: 22px;
}

.qr-panel {
  display: grid;
  gap: 18px;
  place-items: center;
  background: linear-gradient(180deg, #ffffff, #f5fbff);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
}

.qr-panel img,
.qr-panel svg {
  width: min(270px, 100%);
  height: auto;
  display: block;
}

.detail-row {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 20px;
  background: #f8fbfd;
  border: 1px solid var(--border);
}

.detail-row strong {
  font-size: 0.94rem;
  color: var(--muted);
}

.detail-row code {
  font-size: 1rem;
  word-break: break-all;
}

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

.stat-card {
  padding: 18px;
  border-radius: 20px;
  background: #f8fbfd;
  border: 1px solid var(--border);
}

.stat-card strong {
  display: block;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 700;
}

.badge.inactive {
  background: rgba(234, 88, 12, 0.12);
  color: var(--warning);
}

.split {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.1fr 0.9fr;
}

.footer {
  padding: 30px 0 12px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--muted);
}

.status-body {
  min-height: 100vh;
}

.status-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.status-shell {
  text-align: center;
  padding: 34px;
  max-width: 620px;
}

.danger-zone {
  border: 1px solid rgba(220, 38, 38, 0.18);
  background: linear-gradient(180deg, rgba(255, 245, 245, 0.96), rgba(255, 255, 255, 0.96));
}

.loading {
  opacity: 0.68;
  pointer-events: none;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #f8fbfd;
}

.timeline-item strong,
.timeline-item code {
  display: block;
}

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

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

.account-list,
.account-summary,
.pin-reveal {
  display: grid;
  gap: 14px;
}

.account-list-item {
  padding: 18px;
  border-radius: 20px;
  background: #f8fbfd;
  border: 1px solid var(--border);
  display: grid;
  gap: 12px;
}

.account-list-item header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.account-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.94rem;
}

.pin-reveal code,
.account-list-item code {
  word-break: break-all;
}

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

@media (max-width: 960px) {
  .hero,
  .split,
  .grid,
  .stats {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-side,
  .card {
    padding: 24px;
  }
}

@media (max-width: 640px) {
  .page {
    padding-top: 18px;
  }

  .shell {
    width: min(100vw - 18px, 1100px);
  }

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

  .nav {
    width: 100%;
  }

  .nav-link,
  .button,
  .button-link {
    width: 100%;
  }
}
