:root {
  color-scheme: light;
  font: 16px/1.55 system-ui, sans-serif;
  color: #281841;
  background: #f9f5ff;
  --purple: #5725b4;
  --ink: #281841;
  --muted: #62536f;
  --border: #dfd3ee;
  --lime: #e7fa83;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(1110px, calc(100% - 36px)); margin: auto; }
header { background: #fff; border-bottom: 1px solid var(--border); }
nav { display: flex; align-items: center; min-height: 66px; }
.brand { font-size: .92rem; letter-spacing: .09em; font-weight: 900; }
.brand span { color: var(--purple); }
.hero {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
  padding: clamp(1.6rem, 5vw, 4rem);
  overflow: hidden;
  border-radius: 30px;
  color: white;
  background: radial-gradient(ellipse at 92% 18%, #824ef1, transparent 64%), #43178a;
}
h1 { font-size: clamp(3rem, 7.9vw, 6.25rem); line-height: .91; letter-spacing: -.078em; margin: 0; }
h1 span { color: var(--lime); }
.hero p { color: #f0e5ff; max-width: 32rem; margin: 1.35rem 0; }
.hero .eyebrow { color: var(--lime); font-size: .88rem; font-weight: 800; letter-spacing: .12em; }
.hero .action { background: var(--lime); color: var(--ink); }
.ticket-scene { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 245px; }
.ticket-scene::before {
  content: ""; position: absolute; z-index: -1; width: min(94%, 330px); aspect-ratio: 1;
  border-radius: 50%; background: repeating-radial-gradient(circle, #ffffff25 0 1px, transparent 2px 25px);
}
.ticket {
  width: min(240px, 85%); padding: 1.25rem; border-radius: 15px; color: #352158;
  text-align: center; background: #f7edff; transform: rotate(10deg); box-shadow: 13px 15px 0 #2b095b85;
}
.ticket span, .ticket strong { font-size: .87rem; letter-spacing: .08em; font-weight: 850; }
.ticket b { display: block; font-size: 5rem; line-height: 1.2; color: var(--purple); }
.ticket strong { display: block; padding-top: .65rem; border-top: 1px dashed #917bad; }
.prizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; margin: 1rem 0 2.25rem; }
.prizes article { display: flex; align-items: center; gap: .9rem; padding: 1rem; background: #fff; border: 1px solid var(--border); border-radius: 18px; }
.prize-icon { display: grid; place-items: center; flex: 0 0 3rem; height: 3rem; background: #efe4ff; border-radius: 12px; font-size: 1.55rem; }
small { color: var(--purple); font-weight: 850; font-size: .8rem; letter-spacing: .08em; }
h2 { margin: 0; line-height: 1.17; letter-spacing: -.035em; }
.prizes h2 { font-size: clamp(1.15rem, 2.4vw, 1.46rem); }
p { color: var(--muted); }
.panel { margin: 1rem 0 3rem; padding: clamp(1rem, 3vw, 2rem); background: #fff; border: 1px solid var(--border); border-radius: 23px; box-shadow: 0 9px 24px #3b136709; }
#registro { scroll-margin-top: 1rem; }
.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
label { display: block; font-size: .93rem; font-weight: 700; }
#registro label:has([name="code"]), #purchase-controls label { max-width: 32rem; }
input, select { display: block; width: 100%; margin: .35rem 0 .9rem; padding: .66rem .8rem; border: 1px solid #b8a7ce; border-radius: 9px; background: #fcfaff; color: var(--ink); font: inherit; }
.action { display: inline-block; background: var(--purple); color: #fff; border: 0; border-radius: 10px; padding: .75rem 1rem; font: inherit; font-weight: 800; cursor: pointer; }
.action:hover:not(:disabled) { filter: brightness(.91); }
.action:disabled { opacity: .52; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: .38rem; }
.grid button { min-height: 43px; border: 1px solid #cabbdb; border-radius: 8px; padding: 0; background: #faf6ff; color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.grid button[aria-pressed=true] { background: var(--purple); border-color: var(--purple); color: #fff; }
.grid button:disabled { opacity: .57; cursor: default; }
.grid button[data-unavailable=true] { background: #e8e2ee; text-decoration: line-through; }
:focus-visible { outline: 3px solid #9944d4; outline-offset: 3px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
td, th { padding: .7rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: #f3ebff; }
#new-code, #receipt-data { overflow-wrap: anywhere; }
@media (max-width: 730px) {
  .hero { grid-template-columns: 1fr; gap: 1rem; }
  .ticket-scene { min-height: 190px; }
  .ticket-scene::before { width: 220px; }
  .prizes { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 450px) {
  .filters { grid-template-columns: 1fr; gap: 0; }
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
#email-settings { margin: 1rem 0 1.5rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 12px; }
#email-settings summary { cursor: pointer; font-weight: 800; }
#email-config { max-width: 32rem; }
#round-controls { margin: 1rem 0; }
#round-history, #round-form { max-width: 34rem; }
#next-round { padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 12px; }
#next-round summary { cursor: pointer; font-weight: 800; }
.transfer-details { margin: 1rem 0; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: 12px; background: #f9f4ff; }
.transfer-details h3, .transfer-details p { margin: .4rem 0; }
.transfer-details a { text-decoration: underline; }
.payment-status { min-width: 7.5rem; font-weight: 750; border-radius: 8px; }
span.payment-status { display: inline-block; padding: .45rem .65rem; }
.payment-status[data-state="paid"] { background: #dbfce7; color: #14532d; border-color: #86bf97; }
.payment-status[data-state="pending"] { background: #ffedd5; color: #8a3412; border-color: #ecaa76; }
nav { justify-content: space-between; gap: .75rem; }
.transfer-button { padding: .5rem .75rem; border: 1px solid var(--border); border-radius: 9px; background: #f9f4ff; color: var(--purple); font: inherit; font-weight: 750; cursor: pointer; }
#transfer-dialog { width: min(28rem, calc(100% - 2rem)); padding: 1rem; border: 1px solid var(--border); border-radius: 16px; color: var(--ink); }
#transfer-dialog::backdrop { background: #28184188; }
#transfer-dialog .transfer-details { margin-top: 0; }
.payment-status[data-state="cancelled"] { background: #eeeaf3; color: #4d405a; }
.cancel-reservation { padding: .45rem .65rem; border: 1px solid #c9969c; border-radius: 8px; color: #912e3e; background: #fff5f6; font: inherit; cursor: pointer; }
#closing-report { margin: 1.5rem 0; padding: 1.1rem; border-radius: 12px; background: #f9f4ff; }
#report-totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem 1rem; max-width: 38rem; }
#report-totals dd { margin: 0; text-align: right; font-weight: 750; }
#report-expenses { max-width: 24rem; }
@media print {
  :root, .panel, #closing-report { background: white; color: black; }
  header, #admin > h2, #admin-status, #email-settings, #purchase-controls, #round-controls, #new-code,
  #print-report, #report-expenses, #report-status { display: none !important; }
  .wrap { width: 100%; }
  .panel, #closing-report { margin: 0; padding: 0; border: 0; box-shadow: none; }
  .table-wrap { overflow: visible; }
  table { font-size: 9pt; overflow-wrap: anywhere; }
  td, th { padding: 4pt; }
  tr { break-inside: avoid; }
}
.transfer-details .transfer-total { padding: .55rem .75rem; margin: 0 0 .65rem; border-radius: 8px; background: #e7fa83; color: var(--ink); }
.transfer-total strong { display: block; font-size: 1.35rem; }
