:root {
  --pink: #e6177a;
  --orange: #f7941d;
  --green: #3aa935;
  --blue: #1f9ed9;
  --purple: #8e3fb0;
  --yellow: #ffd23f;
  --cream: #fff7e8;
  --ink: #2a2118;
  --card-radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(247,148,29,.18), transparent 40%),
    radial-gradient(circle at 88% 12%, rgba(31,158,217,.18), transparent 42%),
    linear-gradient(160deg, #fff3df 0%, #ffe9ef 55%, #eafbf0 100%);
  min-height: 100vh;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 16px 48px;
}

/* Banner */
.banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--card-radius);
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
}

/* Card */
.card {
  background: var(--cream);
  margin-top: -14px;
  position: relative;
  border-radius: var(--card-radius);
  padding: 26px 24px 30px;
  box-shadow: 0 12px 34px rgba(0,0,0,.14);
  border: 3px solid #fff;
}

/* Papel picado top stripe */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 8px;
  border-radius: var(--card-radius) var(--card-radius) 0 0;
  background: repeating-linear-gradient(
    90deg,
    var(--pink) 0 14%, var(--orange) 14% 28%, var(--yellow) 28% 42%,
    var(--green) 42% 56%, var(--blue) 56% 70%, var(--purple) 70% 84%, var(--pink) 84% 100%);
}

.headline {
  font-family: 'Baloo 2', cursive;
  font-size: 1.9rem;
  margin: 6px 0 4px;
  color: var(--pink);
  text-align: center;
  line-height: 1.1;
}

.intro {
  text-align: center;
  margin: 4px 0 20px;
  color: #5a4f43;
  font-size: 1.02rem;
}

/* Event bar */
.event-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  background: #fff;
  border: 2px dashed var(--orange);
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: .96rem;
}
.event-item { white-space: nowrap; }
.event-item .ico { margin-right: 4px; }
.event-item strong { color: var(--blue); }

/* Form */
.signup-form { display: flex; flex-direction: column; gap: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

input[type="email"], input[type="text"], input[type="password"] {
  padding: 12px 14px;
  border: 2px solid #e7d6bd;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color .15s;
}
input:focus { outline: none; border-color: var(--pink); }

.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-pill {
  flex: 1 1 160px;
  position: relative;
  cursor: pointer;
}
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span {
  display: block;
  text-align: center;
  padding: 12px;
  border: 2px solid #e7d6bd;
  border-radius: 12px;
  background: #fff;
  font-weight: 700;
  transition: all .15s;
}
.radio-pill input:checked + span {
  border-color: var(--green);
  background: #eafbf0;
  box-shadow: 0 0 0 3px rgba(58,169,53,.18);
}

/* Counters */
.who-section {
  background: #fff;
  border: 2px solid #f0e2c9;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.counter-label { display: flex; flex-direction: column; }
.cat-name { font-weight: 700; }
.cat-price { font-size: .85rem; color: #8a7c68; }
.count-select {
  padding: 10px 14px;
  border: 2px solid #e7d6bd;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 700;
  background: #fff;
  min-width: 76px;
  cursor: pointer;
}
.count-select:focus { outline: none; border-color: var(--blue); }

.total-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--yellow), #ffe88a);
  font-weight: 700;
}
.total-box strong { font-size: 1.3rem; color: var(--pink); }
.total-box.big { margin: 18px 0; font-size: 1.1rem; }

/* Submit */
.submit-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg, var(--pink), var(--orange));
  color: #fff;
  font-family: 'Baloo 2', cursive;
  font-size: 1.2rem;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(230,23,122,.35);
  transition: transform .1s, box-shadow .1s;
}
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 9px 20px rgba(230,23,122,.4); }
.submit-btn:active { transform: translateY(0); }
.link-btn { display: inline-block; text-decoration: none; text-align: center; margin-top: 10px; }

.error { color: #c0173a; font-size: .88rem; font-weight: 700; }
.error.big { text-align: center; }
.updated-note {
  text-align: center;
  background: #eafbf0;
  border: 1px solid var(--green);
  border-radius: 10px;
  padding: 8px 12px;
  color: #2a7a27;
  font-weight: 600;
}

/* Thanks */
.thanks { text-align: center; }
.thanks-emoji { font-size: 3rem; }

/* Footer */
.footer {
  text-align: center;
  margin-top: 18px;
  color: #9a8c75;
  font-weight: 700;
  font-size: .9rem;
}

/* Admin */
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-head .headline { text-align: left; margin: 0; }
.admin-actions { display: flex; gap: 8px; }
.mini-btn {
  text-decoration: none;
  background: var(--blue);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .9rem;
}
.mini-btn.ghost { background: #efe3cc; color: var(--ink); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.stat {
  background: #fff;
  border: 2px solid #f0e2c9;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
}
.stat strong { font-size: 1.4rem; color: var(--blue); }
.stat span { font-size: .82rem; color: #8a7c68; }
.stat.highlight { background: linear-gradient(90deg, var(--yellow), #ffe88a); grid-column: span 3; }
.stat.highlight strong { color: var(--pink); }

.table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}
.admin-table th, .admin-table td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid #f0e2c9;
}
.admin-table th { background: var(--purple); color: #fff; font-family: 'Baloo 2', cursive; }
.admin-table tr.not-coming { color: #b0a48f; background: #faf4e8; }
.admin-table td.muted { color: #a89a83; font-size: .82rem; }
.badge { padding: 2px 9px; border-radius: 20px; font-weight: 700; font-size: .8rem; color: #fff; }
.badge.yes { background: var(--green); }
.badge.no { background: #c9c0b0; }

@media (max-width: 480px) {
  .headline { font-size: 1.55rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat.highlight { grid-column: span 2; }
}
