

.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w); flex: none; position: sticky; top: 0; height: 100vh;
    background: var(--brand); color: #B7C8C6;
    display: flex; flex-direction: column; z-index: 40;
    border-right: 1px solid #00282C;
}
.sidebar__brand { padding: 18px 18px 14px; display: flex; align-items: center; gap: .6rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar__brand img { height: 32px; width: auto; }
.sidebar__brand .name { color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: -.01em; line-height: 1.05; }
.sidebar__brand .name small { display: block; color: var(--accent-bright); font-size: .64rem; font-weight: 600; letter-spacing: .04em; margin-top: 3px; }

.sidebar__section { padding: 14px 18px 4px; }
.sidebar__section span { font-size: .64rem; text-transform: uppercase; letter-spacing: .12em; color: #5E7E7C; font-weight: 700; }
.nav { list-style: none; margin: 0; padding: 0 10px; }
.nav a {
    display: flex; align-items: center; gap: .7rem; padding: .56rem .7rem; border-radius: var(--radius-sm);
    color: #B7C8C6; font-weight: 600; font-size: .9rem; margin-bottom: 1px;
    border-left: 3px solid transparent; transition: background .12s, color .12s;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a svg { width: 18px; height: 18px; opacity: .8; }
.nav a.active { background: rgba(0,196,111,.14); color: #fff; border-left-color: var(--accent); }
.nav a.active svg { opacity: 1; color: var(--accent-bright); }
.sidebar__foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar__user { display: flex; align-items: center; gap: .6rem; padding: .35rem .3rem; }
.sidebar__user .avatar { background: var(--accent); color: #04231A; }
.sidebar__user .meta { min-width: 0; }
.sidebar__user .meta strong { color: #fff; font-size: .86rem; display: block; }
.sidebar__user .meta small { color: #6E8E8C; font-size: .74rem; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30; background: var(--surface);
    border-bottom: 1px solid var(--line); padding: 11px 24px;
    display: flex; align-items: center; gap: 1rem;
}
.topbar .menu-btn { display: none; }
.topbar__title { font-weight: 700; font-size: 1rem; }
.topbar .spacer { flex: 1; }
.event-switcher { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.event-switcher .select { min-width: 190px; padding-block: .4rem; }
.content { padding: 24px; flex: 1; }

.scrim { display: none; position: fixed; inset: 0; background: rgba(8,18,17,.5); z-index: 35; }
@media (max-width: 960px) {
    .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
    body.nav-open .sidebar { transform: translateX(0); }
    body.nav-open .scrim { display: block; }
    .topbar .menu-btn { display: inline-flex; }
    .event-switcher .select { min-width: 0; max-width: 200px; }
    .content .grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
    .content { padding: 16px 14px 40px; }
    .topbar { padding: 10px 14px; gap: .6rem; }
    .topbar__title { display: none; }
    .event-switcher .lbl-inline { display: none; }
    .event-switcher .select { flex: 1; max-width: none; }
    .hide-sm { display: none !important; }
    table.data th, table.data td { padding: 10px 12px; }
    .card-pad, .card-body { padding: 16px; }
}

.pub-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.pub-header .container { display: flex; align-items: center; justify-content: space-between; padding-block: 12px; }
.pub-header img { height: 78px; width: auto; }

.pub-hero { background: var(--brand); color: #fff; padding: 56px 0; border-bottom: 4px solid var(--accent); }
.pub-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); color: #fff; max-width: 18ch; }
.pub-hero p { color: #BCD7D2; font-size: 1.05rem; max-width: 54ch; }
.pub-hero .tag { display:inline-flex; align-items:center; gap:.5rem; border:1px solid rgba(0,237,133,.5); color: var(--accent-bright); padding:.32rem .8rem; border-radius:3px; font-weight:600; font-size:.8rem; letter-spacing:.04em; text-transform:uppercase; margin-bottom:1.1rem; }
.pub-main { padding: 36px 0 72px; }
.pub-footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: .85rem; background: var(--surface); }

.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 18px; }
.event-card { overflow: hidden; transition: border-color .12s ease; }
.event-card:hover { border-color: var(--brand-600); }
.event-card__media { height: 140px; background: var(--brand); position: relative; display: grid; place-items: center; border-bottom: 3px solid var(--accent); }
.event-card__media img { height: 100%; width: 100%; object-fit: cover; }
.event-card__media .ph { height: 52px; width: auto; opacity: .95; }
.event-card__body { padding: 16px 18px 18px; }
.event-card__meta { display: flex; flex-wrap: wrap; gap: .7rem; color: var(--muted); font-size: .83rem; margin: .5rem 0 1rem; }
.event-card__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.event-card__meta svg { width: 15px; height: 15px; }

.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside { background: var(--brand); color: #fff; padding: 52px 48px; display: flex; flex-direction: column; justify-content: space-between; border-right: 4px solid var(--accent); }
.auth-aside img { height: 46px; }
.auth-aside h2 { font-size: 1.85rem; color: #fff; max-width: 17ch; }
.auth-aside p { color: #B9D5D0; max-width: 42ch; }
.auth-aside .feat { display: flex; align-items: center; gap: .7rem; color: #DCEEE9; margin-bottom: .7rem; }
.auth-aside .feat svg { width: 19px; height: 19px; color: var(--accent-bright); flex: none; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .logo-sm { display: none; }
@media (max-width: 880px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-card .logo-sm { display: block; text-align: center; margin-bottom: 1.5rem; }
    .auth-card .logo-sm img { height: 42px; margin-inline: auto; }
}

.scan-shell { min-height: 100vh; display: flex; flex-direction: column; background: #0B1413; color: #fff; }
.scan-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.scan-top img { height: 28px; }
.scan-top a { color: #B7C8C6; }
.scan-top a:hover { color: #fff; }
.scan-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 16px 32px; gap: 16px; }
.scan-stage { width: 100%; max-width: 430px; }
.reader-frame { position: relative; aspect-ratio: 1; width: 100%; border-radius: var(--radius); overflow: hidden; background: #06100F; border: 1px solid rgba(255,255,255,.14); }
#reader { width: 100%; height: 100%; }
#reader video { object-fit: cover !important; }
.reader-overlay { position: absolute; inset: 0; pointer-events: none; }
.reader-overlay .frame-corner { position: absolute; width: 34px; height: 34px; border: 3px solid var(--accent); }
.reader-overlay .tl { top: 16px; left: 16px; border-right: 0; border-bottom: 0; }
.reader-overlay .tr { top: 16px; right: 16px; border-left: 0; border-bottom: 0; }
.reader-overlay .bl { bottom: 16px; left: 16px; border-right: 0; border-top: 0; }
.reader-overlay .br { bottom: 16px; right: 16px; border-left: 0; border-top: 0; }
.reader-overlay .laser { position: absolute; left: 16px; right: 16px; height: 2px; background: var(--accent); opacity: .8; top: 20%; animation: scanline 2.4s ease-in-out infinite; }
@keyframes scanline { 0%,100% { top: 20%; } 50% { top: 80%; } }
.reader-idle { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #7FA09D; padding: 1.5rem; }
.reader-idle svg { width: 56px; height: 56px; margin-bottom: .8rem; color: var(--accent); }

.scan-result { width: 100%; max-width: 430px; border-radius: var(--radius); padding: 18px; text-align: center; transform: translateY(6px); opacity: 0; transition: all .2s ease; border: 1px solid rgba(255,255,255,.12); border-left-width: 4px; background: rgba(255,255,255,.04); }
.scan-result.show { transform: translateY(0); opacity: 1; }
.scan-result .icon { width: 56px; height: 56px; border-radius: var(--radius-sm); margin: 0 auto 10px; display: grid; place-items: center; }
.scan-result .icon svg { width: 32px; height: 32px; }
.scan-result h2 { color: #fff; margin: 0 0 .2rem; font-size: 1.35rem; }
.scan-result .who { font-size: 1.1rem; font-weight: 700; color: #fff; }
.scan-result .when { color: #9FB8B5; font-size: .9rem; margin-top: .2rem; }
.scan-result.is-present { border-color: var(--accent); background: rgba(0,196,111,.12); }
.scan-result.is-present .icon { background: var(--accent); color: #04231A; }
.scan-result.is-already { border-color: var(--warning); background: rgba(180,83,9,.14); }
.scan-result.is-already .icon { background: var(--warning); color: #fff; }
.scan-result.is-invalid { border-color: var(--danger); background: rgba(192,57,43,.14); }
.scan-result.is-invalid .icon { background: var(--danger); color: #fff; }

.scan-recent { width: 100%; max-width: 430px; }
.scan-recent h3 { color: #7FA09D; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; font-weight: 700; }
.scan-recent ul { list-style: none; margin: 0; padding: 0; }
.scan-recent li { display: flex; align-items: center; gap: .6rem; padding: .5rem .1rem; border-bottom: 1px solid rgba(255,255,255,.06); font-size: .9rem; }
.scan-recent li .pill { margin-left: auto; font-size: .72rem; }

.ticket { max-width: 440px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ticket__head { background: var(--brand); color: #fff; padding: 24px 26px; text-align: center; border-bottom: 4px solid var(--accent); }
.ticket__head .ok { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--accent); color: #04231A; display: grid; place-items: center; margin: 0 auto 10px; }
.ticket__head .ok svg { width: 30px; height: 30px; }
.ticket__head h1 { color: #fff; font-size: 1.3rem; margin: 0; }
.ticket__qr { padding: 24px; text-align: center; }
.ticket__qr img { width: 230px; height: 230px; margin: 0 auto; border: 1px solid var(--line); }
.ticket__perforation { border-top: 1px dashed var(--line-2); }
.ticket__info { padding: 10px 26px 22px; }
.ticket__info dl { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; margin: 0; font-size: .92rem; }
.ticket__info dt { color: var(--muted); }
.ticket__info dd { margin: 0; font-weight: 600; text-align: right; }
.ticket__actions { padding: 0 26px 26px; display: grid; gap: .55rem; }

.print-badge { display: none; }
@media print {
    @page { margin: 8mm; }
    body * { visibility: hidden; }
    .print-badge { visibility: visible; display: block; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: auto; max-width: 92%; max-height: 96vh; object-fit: contain; }
    .pub-header, .pub-footer, .ticket__actions { display: none !important; }
}
