:root {
  color-scheme: light;
  --rose: #c84f7d;
  --rose-dark: #92345e;
  --coral: #ef7b6d;
  --mint: #4f9f8f;
  --ink: #332936;
  --muted: #756978;
  --paper: #fffafb;
  --line: #ead7df;
  --soft: #f8edf1;
  --gold: #d5a84e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 10%, rgba(239, 123, 109, 0.18), transparent 26rem),
    linear-gradient(135deg, #fffafb 0%, #f7edf1 52%, #fff8ef 100%);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 34px;
  padding: 54px clamp(22px, 5vw, 70px);
  border: 1px solid rgba(200, 79, 125, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(255, 250, 251, 0.93), rgba(255, 246, 238, 0.75)),
    url("assets/floral-bg.svg") center right / cover no-repeat;
  box-shadow: 0 24px 70px rgba(146, 52, 94, 0.14);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  color: var(--rose-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 10vw, 7.4rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.hero-text {
  max-width: 650px;
  margin: 24px 0 0;
  color: #584959;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 20px;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.primary {
  background: var(--rose);
  color: #fff;
  box-shadow: 0 12px 28px rgba(200, 79, 125, 0.25);
}

.ghost {
  border-color: var(--rose);
  background: rgba(255, 255, 255, 0.7);
  color: var(--rose-dark);
}

.full {
  width: 100%;
}

.prize-panel {
  min-height: 280px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 36px;
  border: 1px solid rgba(213, 168, 78, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

.prize-panel span,
.prize-panel small {
  color: var(--muted);
  font-weight: 700;
}

.prize-panel strong {
  color: var(--gold);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
}

.prize-panel em {
  color: var(--rose-dark);
  font-style: normal;
  font-weight: 900;
}

.status-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.status-bar div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
}

.status-bar span {
  display: block;
  color: var(--rose-dark);
  font-size: 1.55rem;
  font-weight: 900;
}

.status-bar small {
  color: var(--muted);
  font-weight: 700;
}

.raffle-layout {
  display: block;
}

.number-area,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.number-area {
  padding: clamp(24px, 4vw, 42px);
}

.form-panel {
  padding: 22px;
}

.section-heading {
  margin-bottom: 18px;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 12px;
}

.number-button {
  aspect-ratio: 1;
  border: 1px solid #efd3dc;
  border-radius: 8px;
  background: #fff;
  color: var(--rose-dark);
  cursor: pointer;
  font-size: 1.14rem;
  font-weight: 900;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.number-button:hover {
  border-color: var(--rose);
  transform: translateY(-1px);
}

.number-button.selected {
  border-color: var(--mint);
  background: #eaf8f5;
  color: #1d6d62;
  outline: 3px solid rgba(79, 159, 143, 0.18);
}

.number-button.taken {
  position: relative;
  border-color: #e4ccd5;
  background: #f2e6eb;
  color: #a99aa2;
  cursor: not-allowed;
  transform: none;
}

.number-button.taken::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  top: 50%;
  height: 2px;
  background: var(--coral);
  transform: rotate(-16deg);
}

.number-button.pagado {
  border-color: rgba(79, 159, 143, 0.4);
  background: #eaf8f5;
  color: #659088;
}

.payment-reminder {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  border: 1px solid rgba(213, 168, 78, 0.45);
  border-radius: 8px;
  background: #fff8ea;
  padding: 16px;
  color: var(--rose-dark);
  font-weight: 800;
  line-height: 1.45;
}

.payment-reminder p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: var(--rose);
  outline: 3px solid rgba(200, 79, 125, 0.15);
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.payment-info {
  display: grid;
  gap: 8px;
  border: 1px solid #efd3dc;
  border-radius: 8px;
  background: var(--soft);
  padding: 12px;
  color: var(--rose-dark);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.form-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(51, 41, 54, 0.48);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(96vw, 860px);
  max-height: min(92vh, 760px);
  overflow-y: auto;
  box-shadow: 0 28px 80px rgba(51, 41, 54, 0.24);
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-close {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--rose-dark);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.modal-close:hover,
.modal-close:focus {
  border-color: var(--rose);
  outline: 3px solid rgba(200, 79, 125, 0.15);
}

.hidden {
  display: none !important;
}

.success-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 20px 8px 8px;
  text-align: center;
}

.success-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background: #eaf8f5;
  color: #1d6d62;
  font-size: 1.15rem;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(79, 159, 143, 0.22);
}

.success-panel h3 {
  margin: 0;
  color: var(--rose-dark);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.success-panel p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.message.success {
  color: #287a48;
}

.message.error {
  color: #b3263e;
}

.message.loading {
  color: var(--rose-dark);
}

.admin-shell {
  max-width: 1320px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 22px;
}

.admin-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.admin-login {
  max-width: 430px;
  margin: 24px auto 0;
  position: static;
}

.admin-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px 16px;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.admin-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--rose-dark);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  min-width: 92px;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff4df;
  color: #8b5d10;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.pagado {
  background: #eaf8f5;
  color: #1d6d62;
}

.status-pill.cancelado {
  background: #f2e6eb;
  color: #8d4358;
}

.status-form {
  grid-template-columns: minmax(130px, 1fr) auto;
  gap: 8px;
}

.status-form .button {
  min-height: 44px;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 22px, 680px);
    padding-top: 12px;
  }

  .hero,
  .status-bar {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 34px 22px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .prize-panel {
    min-height: 190px;
  }

  .number-area,
  .form-panel {
    padding: 18px;
  }

  .number-grid {
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 8px;
  }

  .number-button {
    font-size: 0.92rem;
  }

  .admin-hero {
    display: grid;
  }
}

@media (min-width: 760px) {
  #reservationForm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  #reservationForm label:first-child,
  #reservationForm .payment-info,
  #reservationForm .button.full,
  #reservationForm .form-note,
  #reservationForm .message {
    grid-column: 1 / -1;
  }

  #reservationForm .payment-info {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
