:root {
  --gold: #F5B800;
  --gold-2: #ffd24a;
  --gold-dim: rgba(245, 184, 0, 0.16);
  --charcoal: #171717;
  --ink: #0e0e0e;
  --cream: #FFF9E8;
  --navy: #14213D;
  --navy-2: #1c3260;
  --gray-1: #F4F4F4;
  --gray-2: #8A8A8A;
  --gray-3: #282828;
  --success: #22C55E;
  --danger: #EF4444;
  --white: #ffffff;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --shadow-d: 0 8px 30px rgba(0, 0, 0, 0.25);
  --r: 22px;
  --r-sm: 14px;
  --r-lg: 28px;
  --font: "Manrope", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
#app { min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--ink);
  color: var(--cream);
  line-height: 1.45;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, .h1 { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; }
h2, .h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; }
h3, .h3 { font-size: 1.02rem; font-weight: 700; }
.muted { color: var(--gray-2); }
.gold { color: var(--gold); }
.small { font-size: 0.82rem; }
.tiny { font-size: 0.72rem; letter-spacing: 0.04em; }

.logo-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: radial-gradient(circle at 30% 30%, #ffe27a, var(--gold) 55%, #c49200);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 3px rgba(0,0,0,0.18), 0 6px 16px rgba(245,184,0,0.28);
  color: #171717; font-weight: 800; font-size: 1.05rem;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  object-fit: contain; background: transparent; flex: 0 0 auto;
}
.brand-simbolo {
  width: clamp(52px, 16vw, 88px);
  height: auto;
  object-fit: contain;
  background: transparent;
}
.brand-h {
  display: block;
  height: clamp(28px, 7vw, 40px);
  width: auto;
  max-width: min(260px, 68vw);
  object-fit: contain;
  object-position: left center;
}
.brand-h-sm {
  height: clamp(26px, 6.5vw, 36px);
  max-width: min(220px, 58vw);
}
.brand-h-side {
  height: auto;
  width: min(100%, 228px);
  max-height: 56px;
  max-width: 100%;
}
.brand-principal {
  display: block;
  width: min(560px, 92vw);
  height: auto;
  max-height: clamp(52px, 16vw, 96px);
  margin: 0 auto 8px;
  object-fit: contain;
}
.brand-side {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-width: 0;
}
.brand-banner,
.brand-banner-hero {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  border-radius: clamp(14px, 3vw, 24px);
  background: transparent;
}
.brand-banner-hero { margin: 12px 0 4px; }
.brand-story {
  width: min(100%, 280px);
  height: auto;
  max-height: min(70vh, 420px);
  margin: 0 auto;
  border-radius: clamp(16px, 3vw, 24px);
  object-fit: contain;
}
.celebrate-mark { display: grid; place-items: center; margin: 8px auto 12px; }
.celebrate-mark .brand-mark { width: 72px; height: 72px; border-radius: 20px; animation: pop .4s ease; }
.logo-row {
  display: flex; align-items: center; gap: 10px;
  min-width: 0; flex: 1;
  font-weight: 800; letter-spacing: -0.04em;
}
.logo-row span { font-size: 1.15rem; }
.logo-row .brand-h { flex: 0 1 auto; min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 16px;
  font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:active { transform: scale(0.98); }
.btn-gold {
  background: linear-gradient(180deg, #ffd24a, var(--gold));
  color: #171717;
  box-shadow: 0 10px 24px rgba(245,184,0,0.28);
}
.btn-gold:hover { box-shadow: 0 12px 28px rgba(245,184,0,0.38); }
.btn-dark {
  background: var(--gray-3); color: var(--cream);
}
.btn-ghost {
  background: transparent; color: var(--cream); border: 1px solid rgba(255,255,255,0.12);
}
.btn-navy { background: var(--navy); color: var(--cream); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 0.86rem; }

.card {
  background: #1d1d1d;
  border-radius: var(--r);
  box-shadow: var(--shadow-d);
  overflow: hidden;
}
.card-cream {
  background: var(--cream); color: var(--charcoal);
  box-shadow: var(--shadow);
}
.pad { padding: 18px; }
.pad-lg { padding: 22px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.badge-gold { background: var(--gold); color: #171717; }
.badge-green { background: rgba(34,197,94,0.18); color: #4ade80; }
.badge-red { background: rgba(239,68,68,0.16); color: #f87171; }
.badge-navy { background: var(--navy); color: var(--gold); }
.badge-ghost { background: rgba(255,255,255,0.08); color: var(--cream); }

.search {
  display: flex; align-items: center; gap: 10px;
  background: #222; border-radius: 16px; padding: 0 14px; min-height: 50px;
}
.search input {
  flex: 1; background: transparent; border: 0; outline: 0; min-width: 0;
}
.search-light {
  background: #fff; color: #171717; box-shadow: var(--shadow);
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.06);
}
.icon-btn.gold { background: var(--gold-dim); color: var(--gold); }

.progress {
  height: 10px; background: #2a2a2a; border-radius: 999px; overflow: hidden;
}
.progress > i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #c49200, var(--gold), #ffe27a);
  border-radius: inherit;
  transition: width 0.8s cubic-bezier(.2,.8,.2,1);
}
.progress.light { background: #eadfb8; }

.tampas {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.tampa {
  width: 15px; height: 15px; border-radius: 50%;
  background: #2b2b2b;
  box-shadow: inset 0 0 0 1px #3a3a3a;
  position: relative;
}
.tampa.fill {
  background: radial-gradient(circle at 32% 30%, #ffe9a0, var(--gold) 48%, #b88600);
  box-shadow: inset 0 0 0 2px rgba(80,50,0,0.25), 0 1px 2px rgba(0,0,0,0.35);
}
.tampa.fill::after {
  content: ""; position: absolute; inset: 4px;
  border-radius: 50%; border: 1px solid rgba(0,0,0,0.12);
}

.toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 80; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: #1a1a1a; color: var(--cream);
  border-radius: 16px; padding: 12px 16px; min-width: min(260px, calc(100vw - 32px));
  box-shadow: var(--shadow-d); border: 1px solid rgba(245,184,0,0.18);
  animation: slideDown .28s ease;
  font-weight: 600; font-size: 0.9rem;
}
.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,0.62);
  z-index: 70; display: grid; place-items: end center;
  padding: 16px; animation: fade .2s ease;
}
.modal-bg.center { place-items: center; }
.modal {
  width: min(460px, 100%);
  background: #1c1c1c; border-radius: 28px 28px 22px 22px;
  padding: 22px; box-shadow: var(--shadow-d);
  animation: sheet .32s cubic-bezier(.2,.8,.2,1);
}
.modal-bg.center .modal { border-radius: 28px; }

@keyframes slideDown { from { transform: translateY(-12px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } }
@keyframes pop {
  0% { transform: scale(0.72); opacity: 0; }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes pulseGold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,184,0,0.45); }
  50% { box-shadow: 0 0 0 12px rgba(245,184,0,0); }
}
@keyframes growBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes confetti {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(140px) rotate(220deg); opacity: 0; }
}

.skel {
  background: linear-gradient(90deg, #222 25%, #2c2c2c 37%, #222 63%);
  background-size: 400% 100%;
  animation: shimmer 1.1s infinite;
  border-radius: 12px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grow { flex: 1; min-width: 0; }
.pwa-box { max-width: 420px; margin: 16px 0 0; }
.hidden { display: none !important; }

@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr 1fr; }
  h1, .h1 { font-size: 1.55rem; }
}
@media (max-width: 520px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}

.photo {
  background: linear-gradient(160deg, #1c3260, #171717);
  position: relative; overflow: hidden;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,0.78));
}

.demo-fab {
  position: fixed; left: 14px; bottom: 14px; z-index: 60;
}
.demo-fab summary {
  list-style: none; cursor: pointer;
  background: #111; color: #8A8A8A; border: 1px solid #2a2a2a;
  border-radius: 999px; padding: 8px 12px; font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.08em;
}
.demo-fab summary::-webkit-details-marker { display: none; }
.demo-panel {
  position: absolute; bottom: 42px; left: 0; width: 250px;
  background: #1a1a1a; border-radius: 18px; padding: 14px;
  box-shadow: var(--shadow-d); border: 1px solid #2a2a2a;
}
.demo-panel p { color: #8A8A8A; font-size: 0.78rem; margin: 8px 0 12px; }

.pill-tabs {
  display: flex; gap: 8px; overflow: auto; padding-bottom: 4px;
}
.pill-tabs button {
  white-space: nowrap; padding: 8px 14px; border-radius: 999px;
  background: #222; color: #bdbdbd; font-weight: 700; font-size: 0.84rem;
}
.pill-tabs button.on { background: var(--gold); color: #171717; }

.scan-frame {
  width: 220px; height: 220px; position: relative;
  border-radius: 24px; background: rgba(255,255,255,0.03);
}
.scan-frame.live { overflow: hidden; background: #000; }
.scan-frame video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 24px;
}
.scan-frame i {
  position: absolute; z-index: 2; width: 28px; height: 28px; border: 3px solid var(--gold);
}
.scan-frame i:nth-of-type(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.scan-frame i:nth-of-type(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.scan-frame i:nth-of-type(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.scan-frame i:nth-of-type(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.qr-real { margin: 12px auto; border-radius: 12px; background: #FFF9E8; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 0;
  border-bottom: 1px solid #2a2a2a;
  font-weight: 600;
}
.toggle-row input[type="checkbox"] {
  width: 44px; height: 24px; accent-color: var(--gold); flex: 0 0 auto;
}

.kpi {
  background: #1d1d1d; border-radius: 20px; padding: 16px 18px;
}
.kpi b { display: block; font-size: 1.55rem; font-weight: 800; letter-spacing: -0.04em; }
.kpi span { color: var(--gray-2); font-size: 0.78rem; font-weight: 600; }

.table-wrap { overflow: auto; border-radius: 18px; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
}
table.data th {
  text-align: left; color: var(--gray-2); font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 12px 14px;
}
table.data td { padding: 12px 14px; border-top: 1px solid #2a2a2a; }
table.data tr:hover td { background: rgba(255,255,255,0.03); }

.chart-line { width: 100%; height: 160px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.bar-row .label { width: 92px; font-size: 0.82rem; font-weight: 600; }
.bar-row .track { flex: 1; height: 10px; background: #2a2a2a; border-radius: 99px; overflow: hidden; }
.bar-row .track i { display: block; height: 100%; background: var(--gold); border-radius: inherit; transform-origin: left; animation: growBar .7s ease both; }
.bar-row .pct { width: 40px; text-align: right; font-size: 0.78rem; color: var(--gray-2); }

.notice {
  background: var(--navy); color: var(--cream);
  border-radius: 14px; padding: 10px 12px; font-size: 0.75rem; font-weight: 600;
}

@media (min-width: 1024px) {
  .grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
}
