:root {
  --bg: #050016;
  --bg-alt: #0a041f;
  --border: #221b3b;
  --primary: #ff2fd0;
  --primary-soft: rgba(255, 47, 208, 0.25);
  --text: #fff;
  --muted: #b6b4c9;
  --accent: #41ff7b;
  --radius: 14px;
  --shadow-soft: 0 20px 50px rgba(0, 0, 0, 0.6);
  --max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #12003a 0, var(--bg) 40%, #02000b 100%);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--accent); }

/* HERO */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at top left, var(--primary-soft), transparent 55%),
    radial-gradient(circle at bottom right, rgba(65, 255, 123, 0.2), transparent 60%);
  pointer-events: none;
}
.hero.con-imagen { background-size: cover; background-position: center; }
.hero.con-imagen::before { background: linear-gradient(rgba(5, 0, 22, 0.55), rgba(5, 0, 22, 0.9)); }
.hero-content { position: relative; max-width: 900px; }
.campo-row.fijo { opacity: 0.55; }
.img-preview { max-height: 140px; border-radius: 10px; display: block; margin-top: 0.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.chips label { margin: 0; display: flex; gap: 0.3rem; align-items: center; }
.chips input { width: auto; }
.hero-title {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 30px rgba(255, 47, 208, 0.8);
  background: rgba(5, 0, 22, 0.7);
}
.hero-subtitle { margin: 1.5rem 0; font-size: 1.4rem; color: var(--muted); }
.hero-tag { font-weight: 600; font-size: 1.2rem; max-width: 700px; margin: 0 auto 1rem; white-space: pre-line; }
/* Descripción con formato (Quill) */
.hero-desc { max-width: 760px; margin: 0 auto 1rem; font-size: 1.1rem; line-height: 1.6; text-align: left; }
.hero-desc p { margin: 0 0 0.6em; }
.hero-desc h2, .hero-desc h3 { margin: 0.8em 0 0.4em; line-height: 1.2; }
.hero-desc h2 { font-size: 1.6rem; color: var(--accent); }
.hero-desc h3 { font-size: 1.25rem; }
.hero-desc ol, .hero-desc ul { padding-left: 1.5em; margin: 0 0 0.6em; }
.hero-desc li[data-list="bullet"] { list-style: disc; }
.hero-desc li[data-list="ordered"] { list-style: decimal; }
.hero-desc .ql-align-center { text-align: center; }
.hero-desc .ql-align-right { text-align: right; }
.hero-desc .ql-align-justify { text-align: justify; }
/* Quill en el panel (tema oscuro) */
.ql-toolbar.ql-snow { border: 1px solid rgba(255,255,255,0.2); border-radius: 10px 10px 0 0; background: #17102e; }
.ql-container.ql-snow { border: 1px solid rgba(255,255,255,0.2); border-top: 0; border-radius: 0 0 10px 10px; background: var(--bg-alt); font-family: inherit; font-size: 0.95rem; }
.ql-editor { min-height: 160px; color: var(--text); }
.ql-editor.ql-blank::before { color: var(--muted); font-style: normal; }
.ql-snow .ql-stroke { stroke: #ddd; } .ql-snow .ql-fill { fill: #ddd; } .ql-snow .ql-picker { color: #ddd; }
.ql-snow .ql-picker-options { background: #17102e; border-color: var(--border); }
.ql-snow .ql-tooltip { background: #17102e; color: #fff; border-color: var(--border); box-shadow: none; }
.ql-snow .ql-tooltip input { width: auto; }

/* COUNTDOWN */
.countdown { display: flex; justify-content: center; gap: 1rem; margin: 2rem 0 2.5rem; flex-wrap: wrap; }
.count-item {
  background: rgba(5, 0, 22, 0.8);
  border-radius: var(--radius);
  padding: 0.8rem 1.1rem;
  min-width: 80px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.count-item span { display: block; font-size: 1.6rem; font-weight: 700; }
.count-item small { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

/* BOTONES */
.btn-primary {
  display: inline-block;
  padding: 0.9rem 2.4rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  background: linear-gradient(90deg, var(--primary), #ff7ce9);
  color: #fff;
  box-shadow: 0 12px 30px rgba(255, 47, 208, 0.5);
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: 0.6; cursor: wait; }
.btn-full { width: 100%; }
.btn-sm {
  padding: 0.3rem 0.6rem; font-size: 0.75rem; border-radius: 8px; border: none; cursor: pointer;
  background: #2a2440; color: #fff;
}
.btn-danger { background: #451010; color: #ffb4b4; }
.btn-ok { background: #123f25; color: #8affb4; }

/* SECCIONES */
.section { max-width: var(--max-width); margin: 0 auto; padding: 2.5rem 1.5rem; }
.section-title { text-align: center; font-size: 1.8rem; margin-bottom: 0.75rem; }
.section-intro { text-align: center; max-width: 650px; margin: 0 auto 2rem; color: var(--muted); }

/* CARDS */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card {
  background: rgba(5, 0, 22, 0.9);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-soft);
}
.card h3 { margin: 0 0 0.5rem; }
.card-text { margin: 0 0 1rem; color: var(--muted); }

/* FORMULARIOS */
.form {
  max-width: 650px;
  margin: 0 auto;
  background: rgba(5, 0, 22, 0.9);
  padding: 2rem 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow-soft);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.form-group { display: flex; flex-direction: column; margin-bottom: 1rem; }
.form-group.check { flex-direction: row; align-items: center; gap: 0.5rem; }
.form-group.check input { width: auto; }
label { font-size: 0.85rem; margin-bottom: 0.35rem; color: var(--muted); }
input, select, textarea {
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
.form-message { margin-top: 1rem; font-size: 0.9rem; text-align: center; min-height: 1.2em; }
.ok { color: var(--accent); }
.error { color: #ff7f7f; }

.footer { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 2rem 1rem 2.5rem; }

/* ADMIN */
.admin { padding: 1.5rem; }
.admin h1 { margin: 0 0 0.25rem; font-size: 1.5rem; }
.subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 1rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tabs button { background: var(--bg-alt); border: 1px solid var(--border); color: var(--muted); padding: 0.5rem 1rem; border-radius: 999px; cursor: pointer; }
.tabs button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.toolbar { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 1rem; align-items: end; }
.small { font-size: 0.75rem; color: var(--muted); }
.summary { margin-bottom: 0.75rem; font-size: 0.85rem; }
.wrap { overflow-x: auto; max-height: 70vh; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { padding: 0.45rem 0.55rem; border-bottom: 1px solid #222; vertical-align: top; text-align: left; }
th { background: #10072b; position: sticky; top: 0; z-index: 1; }
tr:nth-child(even) { background: var(--bg-alt); }
.pill { padding: 0.15rem 0.45rem; border-radius: 999px; font-size: 0.7rem; display: inline-block; }
.pill-ok { background: #123f25; color: #8affb4; }
.pill-pending { background: #403016; color: #ffd37c; }
.pill-off { background: #333; color: #bbb; }
.panel { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: 1rem; }
.campo-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.campo-row input[type="text"], .campo-row input:not([type]) { flex: 2 1 160px; width: auto; }
.campo-row select { flex: 1 1 140px; width: auto; }
.campo-row label { margin: 0; white-space: nowrap; display: flex; align-items: center; gap: 0.3rem; }
.campo-row label input { width: auto; }
.campo-row .btn-sm { flex: 0 0 auto; }
.hidden { display: none !important; }

/* CHECK-IN */
#reader { width: 100%; max-width: 420px; margin: 0 auto; }
.result { margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 8px; font-size: 1rem; white-space: pre-line; }
.result.ok { background: #123f25; color: #8affb4; }
.result.error { background: #451010; color: #ffb4b4; }
