/* ============================================================
   Sistema de Eventos · Estilos públicos
   ============================================================ */

:root {
    --brand: #7a1f3d;
    --brand-2: #9c2b4e;
    --brand-dark: #561229;
    --brand-soft: #f7edf1;
    --gold: #b08d57;
    --gold-2: #c5a46e;
    --gold-dark: #8f6f3f;
    --ink: #2c272b;
    --muted: #706a70;
    --line: #e9e2e5;
    --bg: #f5f1f3;
    --white: #ffffff;
    --green: #0e7a5f;
    --green-soft: #e7f5ef;
    --red: #b3261e;
    --red-soft: #fbeceb;
    --amber: #9a6a15;
    --amber-soft: #fbf3e2;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(67, 22, 41, .17);
    --shadow-sm: 0 8px 24px rgba(67, 22, 41, .08);
    --font: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
button { font-family: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
svg { flex-shrink: 0; }
.icon { width: 18px; height: 18px; }
.small { font-size: .82rem; }
.muted { color: var(--muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold-dark); }
.container { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(860px, calc(100% - 40px)); }

.skip-link {
    position: absolute; left: -999px; top: 10px; z-index: 999;
    background: var(--white); color: var(--brand); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 10px; }

/* Fondo */
.page-backdrop {
    position: fixed; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
}
.page-backdrop::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.45) 0%, rgba(247,244,245,.88) 55%, rgba(245,241,243,.98) 100%);
}

/* Header */
.topbar { position: relative; z-index: 5; min-height: 210px; color: var(--white); overflow: hidden; }
.topbar__image {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    transform: scale(1.02);
}
.topbar__shade {
    position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(86,18,41,.97) 0%, rgba(122,31,61,.9) 48%, rgba(122,31,61,.55) 100%);
}
.topbar__inner {
    position: relative; z-index: 2; min-height: 210px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 13px; color: var(--white); text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 46px; height: 46px; }
.brand-mark { width: 46px; height: 46px; color: var(--gold-2); }
.brand__logo { max-height: 58px; max-width: 260px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.12; }
.brand__text strong { font-size: 1.45rem; letter-spacing: .04em; text-transform: uppercase; }
.brand__text small { font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.75); margin-top: 3px; }
.public-nav { display: flex; align-items: center; gap: 26px; }
.public-nav a { color: rgba(255,255,255,.78); text-decoration: none; font-size: .92rem; font-weight: 600; transition: color .18s; }
.public-nav a:hover, .public-nav a.is-active { color: var(--white); }
.public-nav__access {
    border: 1px solid rgba(255,255,255,.5); padding: 9px 18px; border-radius: 999px;
}
.public-nav__access:hover { background: rgba(255,255,255,.12); }

.page-main { position: relative; z-index: 3; padding-bottom: 70px; }
.page-main > .flash { width: min(1200px, calc(100% - 40px)); margin: 22px auto 0; }

/* Botones */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent; border-radius: 11px; padding: 12px 22px;
    font-size: .93rem; font-weight: 700; line-height: 1.1; text-decoration: none;
    cursor: pointer; transition: transform .16s, background .18s, box-shadow .18s, color .18s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: var(--white); box-shadow: 0 10px 24px rgba(122,31,61,.24); }
.btn-primary:hover { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); box-shadow: 0 14px 30px rgba(122,31,61,.3); }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: var(--white); box-shadow: 0 10px 22px rgba(176,141,87,.26); }
.btn-gold:hover { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }
.btn-outline { background: rgba(255,255,255,.68); border-color: rgba(122,31,61,.25); color: var(--brand); backdrop-filter: blur(6px); }
.btn-outline:hover { background: var(--white); border-color: var(--brand); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-disabled { background: #d9d3d6; color: #7c757a; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 15px; font-size: .82rem; border-radius: 9px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.link-button { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; text-decoration: underline; cursor: pointer; font-size: inherit; }
.link-arrow { color: var(--brand); text-decoration: none; font-weight: 700; font-size: .86rem; display: inline-flex; align-items: center; gap: 5px; }

/* Mensajes */
.flash {
    display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px;
    border-radius: 12px; border: 1px solid; background: var(--white); margin-bottom: 14px;
    box-shadow: var(--shadow-sm); position: relative; z-index: 4;
}
.flash__icon { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; }
.flash__icon .icon { width: 19px; height: 19px; }
.flash__text { flex: 1; font-size: .9rem; font-weight: 600; }
.flash__close { background: none; border: 0; font-size: 1.2rem; line-height: 1; color: inherit; opacity: .6; cursor: pointer; }
.flash--success { border-color: #bfe3d5; color: #0a604a; background: #f1fbf7; }
.flash--error { border-color: #f0c3c0; color: #8f1c16; background: #fdf3f2; }
.flash--warning { border-color: #ecd7ad; color: #805510; background: #fdf9ef; }
.flash--info { border-color: #cdd9e6; color: #2f5a80; background: #f4f8fc; }

/* Hero */
.hero { display: grid; grid-template-columns: 1.45fr .55fr; gap: 50px; align-items: end; padding: 62px 0 26px; }
.eyebrow { display: inline-block; font-size: .74rem; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 13px; }
.hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.3rem); color: var(--brand-dark); letter-spacing: -.045em; }
.hero h1 span { color: var(--brand-2); }
.hero p { color: var(--muted); font-size: 1.06rem; max-width: 620px; margin-top: 18px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero__stats { display: flex; gap: 12px; justify-content: flex-end; }
.hero-stat {
    background: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.9);
    padding: 18px 20px; border-radius: 16px; box-shadow: var(--shadow-sm); backdrop-filter: blur(8px);
    min-width: 138px;
}
.hero-stat strong { display: block; font-size: 1.75rem; color: var(--brand); line-height: 1; }
.hero-stat span { font-size: .76rem; color: var(--muted); display: block; margin-top: 6px; }

/* Sección de eventos */
.events-section { padding-top: 40px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--brand-dark); }
.section-heading p { color: var(--muted); max-width: 460px; font-size: .95rem; }
.events-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 26px; }
.events-grid:has(.event-card:only-child) { grid-template-columns: minmax(0, 760px); justify-content: center; }
.event-card {
    background: var(--white); border-radius: 20px; overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid #eee8ea;
    transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column;
}
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-card__media { position: relative; height: 190px; background-size: cover; background-position: center; }
.event-card__media-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(40,8,20,.06), rgba(40,8,20,.45)); }
.event-card__code {
    position: absolute; left: 16px; top: 16px; z-index: 2;
    background: rgba(255,255,255,.92); color: var(--brand); font-weight: 800;
    font-size: .7rem; letter-spacing: .12em; padding: 6px 10px; border-radius: 7px;
}
.event-card__media .status { position: absolute; right: 14px; top: 14px; z-index: 2; }
.event-card__body { padding: 23px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.event-card__date { font-size: .8rem; font-weight: 700; color: var(--gold-dark); display: flex; align-items: center; gap: 6px; }
.event-card__date .icon { width: 16px; height: 16px; }
.event-card h3 { margin-top: 10px; font-size: 1.34rem; color: var(--brand-dark); }
.event-card__desc { color: var(--muted); font-size: .9rem; margin-top: 9px; flex: 1; }
.event-card__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; padding: 0; }
.event-card__meta li { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.event-card__meta .icon { width: 15px; height: 15px; color: var(--gold-dark); }
.event-card__actions { display: flex; gap: 9px; margin-top: 20px; flex-wrap: wrap; }
.event-card__actions .btn { flex: 1; min-width: 130px; }

.status {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
    border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .02em;
    background: #eee9eb; color: #6c656a; white-space: nowrap;
}
.status--open { background: var(--green-soft); color: var(--green); }
.status--soon { background: var(--amber-soft); color: var(--amber); }
.status--closed { background: #eee9eb; color: #6c656a; }

.certificate-strip {
    margin-top: 50px; background: rgba(255,255,255,.86); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.9); border-radius: 20px; padding: 26px 30px;
    display: flex; align-items: center; gap: 20px; box-shadow: var(--shadow-sm);
}
.certificate-strip__icon {
    width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft);
    color: var(--brand); display: grid; place-items: center; flex: 0 0 auto;
}
.certificate-strip__icon .icon { width: 26px; height: 26px; }
.certificate-strip h2 { font-size: 1.2rem; color: var(--brand-dark); }
.certificate-strip p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.certificate-strip .btn { margin-left: auto; }

.empty-state {
    background: rgba(255,255,255,.86); border: 1px solid #eee8ea; border-radius: 20px;
    padding: 50px 28px; text-align: center; box-shadow: var(--shadow-sm);
}
.empty-state__icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); margin-bottom: 16px; }
.empty-state__icon .icon { width: 32px; height: 32px; }
.empty-state h3 { font-size: 1.3rem; color: var(--brand-dark); }
.empty-state p { color: var(--muted); max-width: 480px; margin: 8px auto 20px; }

/* Tarjeta de registro */
.registro-layout { display: grid; grid-template-columns: minmax(0, 760px) 320px; gap: 28px; justify-content: center; align-items: start; padding: 46px 0 20px; }
.registro-card, .checkin-card {
    background: var(--white); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.7);
}
.registro-card__banner {
    position: relative; background:
        radial-gradient(120% 160% at 0% 0%, rgba(255,255,255,.16), transparent 45%),
        linear-gradient(135deg, var(--brand-2), var(--brand) 55%, var(--brand-dark));
    color: var(--white); text-align: center; padding: 30px 34px 28px;
}
.registro-card__code {
    position: absolute; left: 18px; top: 18px; font-size: .66rem; font-weight: 800;
    letter-spacing: .14em; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.24);
    padding: 5px 9px; border-radius: 6px;
}
.registro-card__banner h1 { font-size: clamp(1.35rem, 3vw, 1.85rem); text-transform: uppercase; letter-spacing: .015em; max-width: 600px; margin: 0 auto; }
.registro-card__banner p { margin-top: 8px; color: rgba(255,255,255,.84); font-size: .92rem; }
.registro-card__cupo { display: inline-block; margin-top: 11px; font-size: .72rem; font-weight: 700; color: #f4e3c9; background: rgba(0,0,0,.16); padding: 4px 10px; border-radius: 999px; }
.registro-card__body { padding: 30px 38px 34px; }
.registro-intro { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 6px; }
.registro-intro p { color: var(--muted); font-size: .9rem; }
.registro-intro__note { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: .8rem; color: var(--gold-dark); }
.registro-intro__note .icon { width: 15px; height: 15px; }
.registro-form { display: flex; flex-direction: column; }
.icon-field {
    display: flex; align-items: flex-start; gap: 13px; padding: 13px 0 11px;
    border-bottom: 1px solid var(--line); transition: border-color .18s;
}
.icon-field:focus-within { border-bottom-color: var(--brand-2); }
.icon-field__icon {
    width: 28px; height: 28px; border-radius: 50%; background: #f1ecee; color: #92878d;
    display: grid; place-items: center; flex: 0 0 auto; margin-top: 3px; transition: background .18s, color .18s;
}
.icon-field:focus-within .icon-field__icon { background: var(--brand-soft); color: var(--brand); }
.icon-field__icon .icon { width: 15px; height: 15px; }
.icon-field__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.icon-field__label { font-size: .76rem; font-weight: 700; color: #857d82; letter-spacing: .02em; }
.icon-field__label em { color: var(--brand-2); font-style: normal; }
.icon-field input, .icon-field select, .icon-field textarea {
    border: 0; background: transparent; padding: 7px 0 4px; font-size: .98rem;
    color: var(--ink); width: 100%; outline: none; font-family: inherit;
}
.icon-field input::placeholder { color: #b3abb0; }
.icon-field select { cursor: pointer; }
.icon-field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--white) inset; }
.privacy-row { margin-top: 20px; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: .84rem; color: #554f53; }
.checkbox input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--brand); flex: 0 0 auto; }
.checkbox em { color: var(--brand-2); font-style: normal; }
.registro-submit { margin-top: 20px; padding: 14px 20px; font-size: 1rem; letter-spacing: .02em; text-transform: uppercase; }
.registro-card__actions { background: #faf8f9; border-top: 1px solid var(--line); padding: 20px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.registro-card__actions .btn { min-width: 170px; }
.form-errors {
    background: var(--red-soft); border: 1px solid #f0c3c0; color: #8f1c16;
    border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; font-size: .86rem;
}
.form-errors strong { display: flex; align-items: center; gap: 7px; }
.form-errors ul { margin: 8px 0 0 20px; }
.form-errors p { margin-top: 6px; }
.closed-panel { text-align: center; padding: 24px 10px 30px; }
.closed-panel__icon { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--red-soft); color: var(--red); margin-bottom: 15px; }
.closed-panel__icon .icon { width: 30px; height: 30px; }
.closed-panel h2 { color: var(--brand-dark); font-size: 1.3rem; }
.closed-panel p { color: var(--muted); margin: 7px auto 18px; max-width: 460px; }
.closed-panel .btn { margin: 4px; }
.closed-panel--soft .closed-panel__icon { background: #f1ecee; color: var(--muted); }

.event-aside { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 20px; }
.event-aside__card { background: rgba(255,255,255,.9); border: 1px solid #eee8ea; border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); backdrop-filter: blur(6px); }
.event-aside__card h2 { font-size: 1.02rem; color: var(--brand-dark); margin-bottom: 9px; }
.event-aside__card p { color: var(--muted); font-size: .86rem; }
.event-aside__card--soft { background: rgba(255,255,255,.72); }
.event-aside__card .btn { margin-top: 14px; }
.detail-list { list-style: none; display: flex; flex-direction: column; gap: 13px; margin-top: 15px; }
.detail-list li { display: flex; gap: 10px; color: var(--muted); font-size: .85rem; }
.detail-list .icon { width: 17px; height: 17px; color: var(--gold-dark); margin-top: 2px; }
.detail-list span { display: flex; flex-direction: column; }
.detail-list strong { color: var(--ink); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.steps { list-style: decimal; margin: 12px 0 0 20px; color: var(--muted); font-size: .86rem; display: flex; flex-direction: column; gap: 8px; }

/* Modales */
.modal {
    border: 0; border-radius: 18px; padding: 0; width: min(680px, calc(100vw - 32px));
    max-height: 88vh; box-shadow: 0 30px 80px rgba(30,8,18,.35); background: var(--white); color: var(--ink);
}
.modal::backdrop { background: rgba(34,12,22,.55); backdrop-filter: blur(3px); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--white); z-index: 2; border-radius: 18px 18px 0 0; }
.modal__head h2 { font-size: 1.15rem; color: var(--brand-dark); }
.modal__head p { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.modal__close { border: 0; background: #f1ecee; color: var(--muted); width: 32px; height: 32px; border-radius: 50%; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.modal__body { padding: 22px 24px 26px; overflow-y: auto; max-height: calc(88vh - 80px); }
.prose { white-space: normal; color: #514b50; font-size: .92rem; line-height: 1.7; }
.prose a { color: var(--brand); }
.modal__body .btn { margin-top: 18px; }

/* Confirmación */
.confirmation-page .page-main { padding-top: 30px; }
.confirmation-card { background: var(--white); border-radius: 24px; padding: 40px; box-shadow: var(--shadow); text-align: center; border: 1px solid rgba(255,255,255,.8); }
.confirmation-icon { width: 70px; height: 70px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin: 0 auto 16px; }
.confirmation-icon .icon { width: 36px; height: 36px; stroke-width: 2.4; }
.confirmation-card h1 { color: var(--brand-dark); font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.confirmation-lead { color: var(--muted); max-width: 620px; margin: 12px auto 0; }
.folio-display { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; margin-top: 22px; background: var(--brand-soft); border: 1px dashed rgba(122,31,61,.35); border-radius: 12px; padding: 13px 18px; }
.folio-display span { font-size: .78rem; color: var(--muted); }
.folio-display strong { font-size: 1.3rem; letter-spacing: .05em; color: var(--brand); }
.qr-panel { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: center; text-align: left; margin: 30px 0; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fbf9fa; }
.qr-box { width: 220px; height: 220px; margin: 0 auto; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; place-items: center; }
.qr-box img, .qr-box canvas { max-width: 100%; height: auto !important; }
.qr-panel__text h2 { font-size: 1.1rem; color: var(--brand-dark); }
.qr-panel__text p { color: var(--muted); font-size: .88rem; margin: 7px 0 16px; }
.qr-panel__text .btn { margin: 0 8px 8px 0; }
.confirmation-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; text-align: left; margin: 18px 0 24px; }
.confirmation-meta > div { background: #faf8f9; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.confirmation-meta span { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.confirmation-meta strong { display: block; font-size: .9rem; color: var(--ink); margin-top: 3px; }
.confirmation-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* Check-in */
.checkin-layout { display: grid; grid-template-columns: minmax(0, 720px) 320px; gap: 28px; justify-content: center; align-items: start; padding: 46px 0 20px; }
.checkin-card__banner { position: relative; display: flex; align-items: center; gap: 16px; padding: 26px 30px; color: var(--white); background: linear-gradient(135deg, var(--brand-2), var(--brand-dark)); }
.checkin-card__icon { width: 56px; height: 56px; border-radius: 15px; background: rgba(255,255,255,.15); display: grid; place-items: center; flex: 0 0 auto; }
.checkin-card__icon .icon { width: 28px; height: 28px; }
.checkin-card__banner h1 { font-size: 1.65rem; }
.checkin-card__banner p { color: rgba(255,255,255,.8); font-size: .88rem; margin-top: 2px; }
.checkin-card__banner .status { margin-left: auto; background: rgba(255,255,255,.16); color: var(--white); }
.checkin-card__body { padding: 30px 36px 34px; }
.timer-panel { background: #faf7f8; border: 1px solid var(--line); border-radius: 16px; padding: 22px; text-align: center; }
.timer-panel__label { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.timer { display: block; font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; letter-spacing: .06em; color: var(--brand); margin: 7px 0 4px; font-variant-numeric: tabular-nums; }
.timer--waiting { color: var(--amber); }
.timer--active { color: var(--green); }
.timer-panel p { color: var(--muted); font-size: .86rem; }
.timer-panel__range { margin-top: 8px; font-size: .75rem !important; }
.checkin-form-wrap { margin-top: 22px; }
.checkin-form { display: flex; flex-direction: column; }
.checkin-form .btn { margin-top: 18px; }
.checkin-form__hint { display: flex; gap: 6px; align-items: flex-start; color: var(--muted); font-size: .78rem; margin-top: 11px; }
.checkin-form__hint .icon { width: 15px; height: 15px; margin-top: 1px; }
.checkin-card__footer { border-top: 1px solid var(--line); background: #faf8f9; padding: 18px 24px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.checkin-success { text-align: center; padding: 6px 0 10px; }
.checkin-success h2 { color: var(--brand-dark); font-size: 1.5rem; margin-top: 6px; }
.checkin-success > p { color: var(--muted); margin-top: 6px; }
.ticket { border: 1.5px dashed var(--gold); background: #fdfaf4; border-radius: 14px; padding: 18px; margin: 20px auto; max-width: 420px; }
.ticket__label { display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); font-weight: 800; }
.ticket strong { display: block; font-size: 1.55rem; color: var(--brand); letter-spacing: .04em; margin: 3px 0 6px; }
.ticket__time { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .8rem; }
.checkin-success__note { font-size: .86rem; color: var(--muted); }
.checkin-success .confirmation-actions { margin-top: 20px; }

/* Constancia pública */
.certificate-page .page-main { padding-top: 40px; }
.certificate-card { background: var(--white); border-radius: 24px; padding: 38px 40px; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.8); }
.certificate-card__icon { width: 62px; height: 62px; border-radius: 18px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 16px; }
.certificate-card__icon .icon { width: 32px; height: 32px; }
.certificate-card h1 { color: var(--brand-dark); font-size: clamp(1.7rem, 3.4vw, 2.2rem); }
.certificate-card__lead { color: var(--muted); margin-top: 8px; max-width: 580px; }
.certificate-search { display: flex; gap: 12px; align-items: flex-end; margin: 26px 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fbf9fa; flex-wrap: wrap; }
.certificate-search .icon-field { flex: 1; min-width: 240px; border-bottom-color: #d9d0d4; }
.certificate-search .btn { height: 48px; }
.certificate-result { border-top: 1px solid var(--line); padding-top: 24px; }
.certificate-result__status { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; font-size: .8rem; font-weight: 800; }
.certificate-result__status .icon { width: 18px; height: 18px; }
.certificate-result__status.is-ok { background: var(--green-soft); color: var(--green); }
.certificate-result__status.is-pending { background: var(--amber-soft); color: var(--amber); }
.certificate-result__person { margin: 18px 0 16px; }
.certificate-result__person span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.certificate-result__person strong { display: block; font-size: 1.35rem; color: var(--brand-dark); margin-top: 2px; }
.certificate-result__person small { color: var(--gold-dark); font-weight: 700; }
.certificate-result__note { color: var(--muted); font-size: .88rem; margin-bottom: 16px; }
.certificate-result__reason { background: #faf8f9; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--muted); font-size: .88rem; }
.certificate-card__help { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.certificate-card__help p { color: var(--muted); font-size: .8rem; display: flex; align-items: center; gap: 6px; }

/* Login */
.login-page .page-main { padding: 54px 0 80px; }
.login-layout { display: grid; grid-template-columns: 1fr .85fr; gap: 60px; align-items: center; }
.login-intro h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); color: var(--brand-dark); letter-spacing: -.04em; }
.login-intro p { color: var(--muted); max-width: 520px; margin-top: 14px; }
.login-intro__list { list-style: none; margin-top: 26px; display: flex; flex-direction: column; gap: 12px; }
.login-intro__list li { display: flex; align-items: center; gap: 9px; color: #4f484d; font-size: .92rem; }
.login-intro__list .icon { width: 19px; height: 19px; color: var(--green); }
.login-card { background: var(--white); border-radius: 24px; padding: 34px; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.8); max-width: 470px; width: 100%; justify-self: end; }
.login-card__head { text-align: center; margin-bottom: 22px; }
.login-card__mark { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); margin-bottom: 12px; }
.login-card__mark .brand-mark { width: 32px; height: 32px; color: var(--brand); }
.login-card__head h2 { font-size: 1.45rem; color: var(--brand-dark); }
.login-card__head p { font-size: .86rem; color: var(--muted); margin-top: 4px; }
.login-form { display: flex; flex-direction: column; gap: 4px; }
.login-form .btn { margin-top: 18px; padding: 14px; }
.login-form .icon-field { border-bottom-color: #ddd4d8; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 40px; }
.password-toggle { position: absolute; right: 0; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 6px; }
.password-toggle .icon { width: 18px; height: 18px; }
.login-card__footer { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; font-size: .78rem; color: var(--muted); }
.login-card__footer a { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; text-decoration: none; }

/* Página simple de errores */
.simple-page { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(135deg, var(--brand-soft), var(--bg)); padding: 24px; }
.simple-card { background: var(--white); border-radius: 22px; padding: 40px; max-width: 460px; text-align: center; box-shadow: var(--shadow); }
.simple-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; margin: 0 auto 16px; }
.simple-icon .icon { width: 30px; height: 30px; }
.simple-card h1 { color: var(--brand-dark); font-size: 1.5rem; }
.simple-card p { color: var(--muted); margin: 9px 0 20px; }

/* Footer */
.site-footer { position: relative; z-index: 3; background: rgba(255,255,255,.78); border-top: 1px solid rgba(122,31,61,.08); backdrop-filter: blur(8px); }
.site-footer__inner { padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: .78rem; }
.site-footer__meta { opacity: .8; }

/* Impresión */
@media print {
    .page-backdrop, .topbar, .site-footer, .no-print, .confirmation-actions, .qr-panel__text .btn { display: none !important; }
    body { background: #fff; }
    .page-main { padding: 0; }
    .confirmation-card, .checkin-card, .registro-card { box-shadow: none; border: 0; }
    .confirmation-card { padding: 0; }
    .qr-panel { border: 0; background: #fff; }
}

/* Responsive */
@media (max-width: 1080px) {
    .registro-layout, .checkin-layout { grid-template-columns: minmax(0, 760px); }
    .event-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; gap: 26px; padding-top: 44px; }
    .hero__stats { justify-content: flex-start; }
    .events-grid { grid-template-columns: 1fr; }
    .login-layout { grid-template-columns: 1fr; gap: 32px; }
    .login-card { justify-self: start; max-width: 100%; }
    .certificate-strip { flex-direction: column; text-align: center; }
    .certificate-strip .btn { margin-left: 0; }
    .qr-panel { grid-template-columns: 1fr; text-align: center; }
    .qr-panel__text { text-align: center; }
}
@media (max-width: 640px) {
    .container, .narrow { width: calc(100% - 28px); }
    .topbar { min-height: 168px; }
    .topbar__inner { min-height: 168px; }
    .brand__text strong { font-size: 1.15rem; }
    .brand__text small { font-size: .64rem; letter-spacing: .1em; }
    .brand__mark, .brand-mark { width: 38px; height: 38px; }
    .brand__logo { max-height: 42px; max-width: 180px; }
    .public-nav { gap: 12px; }
    .public-nav a:not(.public-nav__access) { display: none; }
    .page-main > .flash { width: calc(100% - 28px); }
    .hero { padding-top: 34px; }
    .hero h1 { font-size: 2.25rem; }
    .hero__stats { width: 100%; }
    .hero-stat { flex: 1; min-width: 0; padding: 14px; }
    .section-heading { flex-direction: column; align-items: flex-start; }
    .event-card__actions .btn { flex: 1; }
    .registro-card__body { padding: 24px 20px 28px; }
    .icon-field input, .icon-field select { font-size: 16px; }
    .registro-card__banner { padding: 26px 18px 24px; }
    .registro-card__code { position: static; display: inline-block; margin-bottom: 10px; }
    .event-aside { grid-template-columns: 1fr; }
    .registro-card__actions .btn { min-width: 0; flex: 1; }
    .confirmation-card { padding: 26px 20px; }
    .folio-display { flex-direction: column; }
    .qr-panel { padding: 18px; }
    .qr-box { width: 200px; height: 200px; }
    .checkin-card__banner { flex-wrap: wrap; padding: 22px; }
    .checkin-card__banner .status { margin-left: 0; }
    .checkin-card__body { padding: 24px 20px 28px; }
    .checkin-card__footer { flex-direction: column; }
    .checkin-card__footer .btn { width: 100%; }
    .certificate-card { padding: 26px 20px; }
    .certificate-search { flex-direction: column; align-items: stretch; }
    .certificate-search .btn { width: 100%; }
    .login-card { padding: 26px 22px; }
    .confirmation-actions .btn { width: 100%; }
}
