:root {
  --black: #0a0a0a;
  --red: #e10600;
  --white: #ffffff;
  --gray: #6b6b6b;
  --line: #e5e5e5;
  --bg: #f7f7f7;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(225,6,0,.14), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--bg) 55%);
  color: var(--black);
  min-height: 100vh;
}
h1, .brand {
  font-family: Syne, Manrope, sans-serif;
  letter-spacing: .04em;
}
.brand {
  font-size: clamp(40px, 10vw, 52px);
  font-weight: 800;
  margin: 8px 0 4px;
  line-height: 1;
}
.brand span { color: var(--red); }

.app { max-width: 480px; margin: 0 auto; padding: 20px 16px 96px; }
#view-login {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 48px;
}
#view-login .muted,
#view-reset .muted { margin-bottom: 28px; font-size: 15px; }
#view-reset {
  min-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 48px;
}
.hidden { display: none !important; }
.ok {
  color: #1a7f37;
  font-size: 14px;
  min-height: 1.2em;
  margin: 0 0 8px;
}
button.linkish {
  background: transparent;
  color: var(--gray);
  border: none;
  min-height: auto;
  font-weight: 600;
  text-decoration: underline;
  margin: 4px 0 0;
  padding: 10px 4px;
  letter-spacing: 0;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  transition: transform .15s ease, border-color .15s ease;
}
.card:active { transform: scale(0.99); border-color: rgba(225,6,0,.35); }
.muted { color: var(--gray); font-size: 14px; }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
input, textarea, button, select {
  width: 100%;
  font: inherit;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 14px 14px;
  margin: 6px 0 12px;
}
input:focus, textarea:focus {
  outline: 2px solid rgba(225,6,0,.25);
  border-color: var(--red);
}
button {
  background: var(--red);
  color: #fff;
  border: none;
  font-weight: 700;
  min-height: 52px;
  cursor: pointer;
  letter-spacing: .02em;
}
button:active { transform: translateY(1px); }
button.secondary { background: var(--black); }
button.ghost { background: transparent; color: var(--black); border: 1px solid var(--line); }
.badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff1f0;
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.bottom {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.bottom button { margin: 0; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; }
.photos img {
  width: 88px; height: 88px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
}
.photos.large img { width: 100%; height: auto; max-height: 280px; }
#error,
#reset-error {
  color: var(--red);
  font-size: 14px;
  margin: 8px 0 12px;
  min-height: 1.2em;
  font-weight: 600;
}
#step-label {
  font-weight: 700;
  color: var(--black);
  margin: 16px 0 8px;
}
canvas {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  touch-action: none;
}

/* Comprovante / projetor */
body.comprovante-page .app { max-width: 720px; padding-top: 28px; }
.hero-proof {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(225,6,0,.06), transparent 40%),
    #fff;
  margin-bottom: 16px;
}
.hero-proof h2 {
  font-family: Syne, Manrope, sans-serif;
  font-size: 26px;
  margin: 8px 0;
}
.meta-grid {
  display: grid;
  gap: 8px;
  margin: 12px 0 4px;
}
.meta-grid div {
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
  font-size: 14px;
}
.section-title {
  font-family: Syne, Manrope, sans-serif;
  font-size: 18px;
  margin: 20px 0 8px;
  letter-spacing: .03em;
}
.foot-brand {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--gray);
  font-size: 13px;
}
