@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  color-scheme: light;
  --bg: #f3efe6;
  --bg-2: #f9f6ef;
  --ink: #1b1b1b;
  --muted: #6a655b;
  --accent: #b64b32;
  --accent-2: #1b5f5a;
  --card: #fffaf1;
  --shadow: 0 20px 60px rgba(24, 20, 16, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(80rem 60rem at 10% -10%, #f7d9c1 0%, transparent 60%),
    radial-gradient(60rem 50rem at 110% 20%, #cfe7df 0%, transparent 55%),
    var(--bg);
  min-height: 100vh;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.hero {
  display: grid;
  gap: 16px;
  margin-bottom: 40px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow);
  font-weight: 600;
  color: var(--accent);
  width: fit-content;
}

h1 {
  font-size: clamp(2.4rem, 3vw, 3.2rem);
  margin: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

p {
  margin: 0;
  color: var(--muted);
}

code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.95em;
}

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

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise 0.8s ease forwards;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% auto;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(182, 75, 50, 0.18), transparent 70%);
  pointer-events: none;
}

.card--details::after {
  background: radial-gradient(circle, rgba(27, 95, 90, 0.2), transparent 70%);
}

.card--totp::after {
  background: radial-gradient(circle, rgba(252, 201, 93, 0.3), transparent 70%);
}

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

.file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(182, 75, 50, 0.25);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  color: #fffdf8;
  background: var(--accent);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.file input {
  display: none;
}

.file:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(182, 75, 50, 0.25);
}

.file:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(182, 75, 50, 0.2);
}

.preview {
  margin-top: 16px;
  background: var(--bg-2);
  border-radius: 18px;
  padding: 16px;
  min-height: 180px;
  display: grid;
  place-items: center;
}

.preview img {
  max-width: 100%;
  max-height: 240px;
  border-radius: 12px;
  display: none;
}

.status {
  margin-top: 12px;
  font-weight: 600;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field.inline {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

label {
  font-weight: 600;
  color: var(--muted);
}

input,
textarea,
select {
  border: 1px solid rgba(27, 27, 27, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  background: #fffdf8;
}

textarea {
  resize: vertical;
}

.btn {
  border: none;
  background: var(--accent);
  color: #fffdf8;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(182, 75, 50, 0.25);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(182, 75, 50, 0.4);
}

.totp {
  background: #181613;
  color: #fef7ec;
  border-radius: 20px;
  padding: 24px;
  display: grid;
  gap: 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.totp__code {
  font-size: 2.4rem;
  letter-spacing: 0.2em;
}

.totp__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(254, 247, 236, 0.7);
}

.dot {
  font-size: 0.8rem;
}

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

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

.small {
  font-size: 0.9rem;
}

#qrCanvas {
  display: none;
}

@media (max-width: 720px) {
  .page {
    padding: 32px 16px 64px;
  }

  .totp__code {
    font-size: 2rem;
    letter-spacing: 0.12em;
  }
}
