:root {
    --aaati-dark: #0b0d12;
    --aaati-panel: #151922;
    --aaati-orange: #ff3b18;
    --aaati-orange-dark: #c8250c;
    --aaati-ink: #202733;
    --aaati-muted: #6b7280;
    --aaati-light: #f4f6f9;
}

body { color: var(--aaati-ink); background: var(--aaati-light); }
.admin-body { min-height: 100vh; }
.aaati-navbar { background: linear-gradient(90deg, #090b10, #161b25); border-bottom: 2px solid var(--aaati-orange); box-shadow: 0 6px 22px rgba(0, 0, 0, .16); }
.brand-logo { object-fit: cover; border-radius: 9px; border: 1px solid rgba(255,255,255,.2); }
.navbar-brand { font-weight: 700; letter-spacing: -.02em; }
.nav-link { border-radius: .55rem; padding-left: .8rem !important; padding-right: .8rem !important; }
.nav-link.active, .nav-link:hover { background: rgba(255, 59, 24, .16); }
.eyebrow { color: var(--aaati-orange-dark); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.card { border: 0; border-radius: 1rem; box-shadow: 0 6px 25px rgba(24, 31, 44, .07); }
.stat-card { overflow: hidden; position: relative; min-height: 132px; }
.stat-card::after { content: ''; position: absolute; right: -28px; bottom: -28px; width: 90px; height: 90px; border: 14px solid rgba(255, 59, 24, .09); border-radius: 50%; }
.stat-value { font-size: 2.1rem; font-weight: 800; line-height: 1; }
.stat-label { color: var(--aaati-muted); font-size: .9rem; }
.btn-primary { --bs-btn-bg: var(--aaati-orange); --bs-btn-border-color: var(--aaati-orange); --bs-btn-hover-bg: var(--aaati-orange-dark); --bs-btn-hover-border-color: var(--aaati-orange-dark); --bs-btn-active-bg: var(--aaati-orange-dark); --bs-btn-active-border-color: var(--aaati-orange-dark); }
.btn-outline-primary { --bs-btn-color: var(--aaati-orange-dark); --bs-btn-border-color: var(--aaati-orange); --bs-btn-hover-bg: var(--aaati-orange); --bs-btn-hover-border-color: var(--aaati-orange); }
.table > :not(caption) > * > * { padding: .85rem .75rem; vertical-align: middle; }
.table thead th { color: #626a78; font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; border-bottom-width: 1px; }
.form-label { font-weight: 600; }
.required::after { content: ' *'; color: #dc3545; }
.help-text { color: var(--aaati-muted); font-size: .83rem; }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--aaati-muted); }
.badge-soft-success { color: #137341; background: #dff7e9; }
.badge-soft-danger { color: #a61e2b; background: #fde4e7; }
.badge-soft-secondary { color: #49505c; background: #e9edf2; }
.event-summary { background: linear-gradient(135deg, #11151d, #242c39); color: #fff; }
.event-summary .text-secondary { color: #b8c0cc !important; }
.login-page { min-height: 100vh; background: #080a0e; position: relative; display: grid; place-items: center; overflow: hidden; }
.login-page::before { content: ''; position: fixed; inset: 0; background: linear-gradient(rgba(5,7,10,.72), rgba(5,7,10,.92)), url('../img/fundo-aaati.png') center/cover no-repeat; opacity: .72; }
.login-card { width: min(430px, calc(100% - 2rem)); position: relative; background: rgba(255,255,255,.97); border-radius: 1.25rem; box-shadow: 0 30px 70px rgba(0,0,0,.5); padding: 2rem; }
.login-logo { width: 82px; height: 82px; object-fit: cover; border-radius: 18px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.public-page { min-height: 100vh; background: #090b10; color: #f8fafc; }
.public-nav { background: rgba(9, 11, 16, .92); border-bottom: 1px solid rgba(255,255,255,.1); }
.public-hero { position: relative; min-height: 620px; display: grid; align-items: center; background: linear-gradient(90deg, rgba(5,7,10,.95) 0%, rgba(5,7,10,.72) 54%, rgba(5,7,10,.45) 100%), url('../img/fundo-aaati.png') center/cover no-repeat; }
.public-hero::after { content: ''; position: absolute; inset: auto 0 0; height: 130px; background: linear-gradient(transparent, #090b10); }
.public-content { position: relative; z-index: 1; }
.public-title { max-width: 760px; font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 850; letter-spacing: -.055em; line-height: .98; }
.public-title em { color: var(--aaati-orange); font-style: normal; }
.public-subtitle { max-width: 610px; color: #c6ccd6; font-size: 1.08rem; }
.validate-card { color: var(--aaati-ink); border-top: 4px solid var(--aaati-orange); }
.validation-result { border-radius: 1rem; padding: 1.5rem; }
.validation-valid { border: 1px solid #9ad8b8; background: #effbf4; color: #145c36; }
.validation-cancelled { border: 1px solid #ef9ca5; background: #fff2f3; color: #8f1d2c; }
.validation-missing { border: 1px solid #d2d6dc; background: #f6f7f9; color: #454b55; }
.detail-grid dt { color: #6b7280; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.detail-grid dd { font-weight: 600; margin-bottom: 1rem; }
.certificate-preview-shell { min-height: 100vh; padding: 1.5rem; background: #222834; overflow-x: auto; }
.certificate-actions { max-width: 1120px; margin: 0 auto 1rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.certificate-preview { width: 297mm; max-width: none; margin: auto; box-shadow: 0 18px 55px rgba(0,0,0,.4); }
.certificate-preview .certificate-page { width: 297mm; height: 210mm; }

@media (max-width: 767.98px) {
    .public-hero { min-height: 560px; }
    .login-card { padding: 1.4rem; }
    .certificate-preview-shell { padding: .5rem; }
}

@media print {
    @page { size: A4 landscape; margin: 0; }
    html, body { width: 297mm; height: 210mm; margin: 0 !important; padding: 0 !important; background: #050608 !important; }
    *, *::before, *::after { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
    .certificate-actions { display: none !important; }
    .certificate-preview-shell { width: 297mm; height: 210mm; min-height: 0; padding: 0; margin: 0; background: #050608 !important; overflow: hidden; }
    .certificate-preview { width: 297mm; height: 210mm; max-width: none; margin: 0; box-shadow: none; }
    .certificate-page { width: 297mm !important; height: 210mm !important; margin: 0 !important; }
}
