:root {
  --ink: #12131a;
  --paper: #f7f7fb;
  --card: #ffffff;
  --accent: #5b4bff;
  --accent-soft: #ece9ff;
  --mint: #00c896;
  --coral: #ff5c7a;
  --muted: #6b6b7b;
  --line: #e6e5f0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(18, 19, 26, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.wrap { width: min(1080px, 92vw); margin: 0 auto; }
.narrow { width: min(520px, 92vw); margin: 0 auto; }

header.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.brand span:last-child { color: var(--muted); font-weight: 600; font-size: 14px; }
nav.links { display: flex; gap: 14px; align-items: center; font-size: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 10px 18px;
  font-size: 14px; font-weight: 700; cursor: pointer; background: var(--ink); color: white;
  transition: transform .06s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); opacity: .94; text-decoration: none; }
.btn.primary { background: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.mint { background: var(--mint); color: #04382c; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

h1 { font-size: clamp(30px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 16px; }
h2 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 12px; }
h3 { font-size: 17px; margin: 0 0 8px; }
p.lead { font-size: 18px; color: var(--muted); margin: 0 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.pill.mint { background: #d8fff4; color: #057a5c; }
.pill.coral { background: #ffe3e9; color: #b11334; }

label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 6px; }
input, select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; background: white; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.error { background: #ffe3e9; color: #b11334; padding: 10px 12px; border-radius: 12px; font-size: 14px; margin-top: 12px; }
.ok { background: #d8fff4; color: #057a5c; padding: 10px 12px; border-radius: 12px; font-size: 14px; margin-top: 12px; }

/* tarjeta de sellos */
.stamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.stamp {
  aspect-ratio: 1; border-radius: 50%; border: 2px dashed var(--line);
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--muted);
  background: #fbfbfe;
}
.stamp.on { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); }
.stamp.goal { border-color: var(--mint); }
.stamp.goal.on { background: #d8fff4; color: #057a5c; border-color: var(--mint); }

.voucher {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px dashed var(--accent); background: var(--accent-soft); border-radius: 12px;
  padding: 12px 14px; margin-top: 10px;
}
.voucher .code { font-weight: 800; letter-spacing: .08em; }

/* panel */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 18px 0; }
.tab {
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); background: white;
  font-size: 14px; font-weight: 600; cursor: pointer; color: var(--muted);
}
.tab.active { background: var(--ink); color: white; border-color: var(--ink); }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .n { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.kpi .l { font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }

footer { color: var(--muted); font-size: 13px; padding: 40px 0; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.mt2 { margin-top: 28px; }
.hidden { display: none !important; }
@media (max-width: 640px) {
  .stamps { grid-template-columns: repeat(4, 1fr); }
  header.top { flex-wrap: wrap; }
}
