:root {
    --feam-blue: #0aa9d6;
    --feam-blue-dark: #087d9d;
    --feam-green: #82c900;
    --feam-green-dark: #5d9300;
    --ink: #21313c;
    --muted: #687983;
    --line: #dbe5ea;
    --surface: #ffffff;
    --surface-soft: #f5f9fb;
    --danger: #b42318;
    --danger-bg: #fff1f0;
    --success: #267a1e;
    --success-bg: #eef9eb;
    --warning: #8a5b00;
    --warning-bg: #fff8e6;
    --info-bg: #edf8fc;
    --shadow: 0 12px 34px rgba(30, 63, 80, .10);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #eef5f8; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(10,169,214,.09), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(130,201,0,.08), transparent 30rem),
        #f7fafb;
}
a { color: var(--feam-blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
}
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); font-weight: 800; font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 78px; height: 58px; object-fit: contain; }
.admin-nav, .public-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.admin-nav a, .public-nav a { font-weight: 650; color: #38505c; }
.main-content { flex: 1; padding: 38px 0 48px; }
.site-footer { color: var(--muted); padding: 24px 0 34px; font-size: .9rem; text-align: center; }
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: stretch; margin-bottom: 26px; }
.hero-copy, .hero-card, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-copy { padding: 34px; position: relative; overflow: hidden; }
.hero-copy::after { content: ''; position: absolute; width: 170px; height: 170px; border-radius: 50%; right: -65px; bottom: -80px; background: linear-gradient(135deg, var(--feam-blue), var(--feam-green)); opacity: .12; }
.hero-copy h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.1; }
.hero-copy p { margin: 0; color: var(--muted); max-width: 720px; line-height: 1.65; }
.hero-card { padding: 28px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(145deg, #f8fdff, #fbfff7); }
.event-name { font-size: 1.35rem; font-weight: 800; margin-bottom: 10px; }
.event-meta { display: grid; gap: 8px; color: #536975; }
.card { padding: 28px; margin-bottom: 24px; }
.card h2, .card h3 { margin-top: 0; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-title h1, .section-title h2 { margin: 0; }
.section-title p { margin: 4px 0 0; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 700; font-size: .92rem; }
.required::after { content: ' *'; color: var(--danger); }
input, select, textarea {
    width: 100%;
    border: 1px solid #cdd9df;
    border-radius: 12px;
    padding: 12px 13px;
    font: inherit;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}
input:focus, select:focus, textarea:focus { border-color: var(--feam-blue); box-shadow: 0 0 0 4px rgba(10,169,214,.12); }
textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.help { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.lgpd-box { border: 1px solid #cfe3eb; background: #f6fbfd; border-radius: 14px; padding: 18px; line-height: 1.56; color: #425b67; font-size: .91rem; }
.check-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.check-row label { font-weight: 600; line-height: 1.45; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.btn { border: 0; border-radius: 11px; padding: 11px 18px; font: inherit; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(.98); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--feam-blue), var(--feam-blue-dark)); }
.btn-success { color: #fff; background: linear-gradient(135deg, var(--feam-green), var(--feam-green-dark)); }
.btn-secondary { color: #37505c; background: #edf3f6; border: 1px solid #d7e2e7; }
.btn-danger { color: #fff; background: #b42318; }
.btn-sm { padding: 7px 11px; border-radius: 9px; font-size: .86rem; }
.alert { border-radius: 12px; padding: 13px 15px; margin-bottom: 18px; border: 1px solid transparent; }
.alert-success { color: var(--success); background: var(--success-bg); border-color: #cce9c7; }
.alert-danger { color: var(--danger); background: var(--danger-bg); border-color: #ffd1cd; }
.alert-warning { color: var(--warning); background: var(--warning-bg); border-color: #f2dfad; }
.alert-info { color: #14647b; background: var(--info-bg); border-color: #c8e9f2; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 8px 24px rgba(30,63,80,.07); }
.kpi strong { display: block; font-size: 1.9rem; line-height: 1; margin-bottom: 8px; }
.kpi span { color: var(--muted); font-size: .9rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 13px; border-bottom: 1px solid #e9eff2; text-align: left; vertical-align: middle; white-space: nowrap; }
th { background: #f3f8fa; color: #415966; font-size: .84rem; text-transform: uppercase; letter-spacing: .025em; }
tbody tr:hover { background: #fbfdfe; }
tbody tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-weight: 800; font-size: .77rem; }
.badge-success { color: #3f6d00; background: #eaf7cf; }
.badge-muted { color: #60717a; background: #edf2f4; }
.badge-admin { color: #05617d; background: #def4fb; }
.filters { display: grid; grid-template-columns: minmax(240px, 1fr) 180px auto; gap: 10px; align-items: end; margin-bottom: 18px; }
.inline-form { display: inline; }
.login-wrap { width: min(470px, 100%); margin: 30px auto; }
.login-logo { display: block; width: 150px; max-height: 130px; object-fit: contain; margin: 0 auto 14px; }
.empty { text-align: center; padding: 32px 18px; color: var(--muted); }
.placeholder-list { display: flex; flex-wrap: wrap; gap: 8px; }
.placeholder-list code { background: #edf5f8; border: 1px solid #d8e7ed; border-radius: 8px; padding: 5px 8px; color: #32505f; }
.preview-frame { position: relative; width: 100%; aspect-ratio: 297 / 210; border: 1px solid #cfdde3; background: #fff center/cover no-repeat; border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(30,63,80,.08); }
.preview-content { position: absolute; inset: 12% 10%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3%; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.preview-content h3 { font-size: clamp(1.3rem, 3vw, 2.1rem); letter-spacing: .06em; margin-bottom: 7%; }
.preview-content p { margin: 0; max-width: 86%; font-size: clamp(.72rem, 1.4vw, 1.05rem); line-height: 1.6; }
.preview-code { position: absolute; left: 6%; right: 6%; bottom: 5%; text-align: center; font-size: clamp(.5rem, 1vw, .8rem); color: #52646d; }
.text-danger { color: var(--danger); }
.text-muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; }
    .kpis { grid-template-columns: repeat(2, 1fr); }
    .header-inner { align-items: flex-start; padding: 12px 0; flex-direction: column; }
    .site-header { position: static; }
}
@media (max-width: 680px) {
    .container { width: min(100% - 22px, 1180px); }
    .main-content { padding-top: 24px; }
    .form-grid, .filters { grid-template-columns: 1fr; }
    .form-group.full { grid-column: auto; }
    .kpis { grid-template-columns: 1fr; }
    .card, .hero-copy, .hero-card { padding: 20px; }
    .admin-nav, .public-nav { width: 100%; gap: 8px 12px; }
}

/* Multieventos */
.hero-single { grid-template-columns: 1fr; }
.eyebrow { color: var(--feam-blue-dark); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; margin-bottom: 8px; }
.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.event-card { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: linear-gradient(145deg, #fff, #fbfdfe); display: flex; flex-direction: column; justify-content: space-between; min-height: 220px; }
.event-card h3 { margin: 14px 0 10px; font-size: 1.2rem; }
.event-status-row, .row-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.toggle-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border: 1px solid #dce7eb; border-radius: 12px; padding: 15px; background: #f9fcfd; }
.toggle-row .check-row { margin-top: 0; }
.separator { border: 0; border-top: 1px solid #e1e9ed; margin: 28px 0; }
.public-links-box { background: linear-gradient(145deg, #f8fdff, #fbfff8); }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid #e3ecef; }
.link-row:first-of-type { border-top: 0; }
.link-row > div:first-child { min-width: 0; display: grid; gap: 6px; }
.link-row code { display: block; max-width: 780px; overflow-wrap: anywhere; white-space: normal; padding: 7px 9px; border-radius: 8px; background: #edf5f8; border: 1px solid #d8e7ed; color: #32505f; }
.event-admin-strip { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 18px; padding: 16px 18px; background: linear-gradient(145deg, #f7fcff, #fbfffd); border: 1px solid #dce7eb; border-radius: 14px; box-shadow: 0 10px 24px rgba(15, 52, 84, .05); }
.event-admin-strip > div:first-child { display: grid; gap: 4px; }
.event-admin-highlight { min-width: 0; }
.event-admin-label { display: inline-flex; align-items: center; width: fit-content; padding: 4px 10px; border-radius: 999px; background: rgba(0, 163, 224, .11); color: var(--feam-blue-dark); font-size: .78rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.event-admin-name { display: block; font-size: 1.28rem; line-height: 1.28; font-weight: 800; color: var(--text); }
.event-admin-meta { color: var(--muted); font-size: .9rem; }
.event-admin-strip span { color: var(--muted); font-size: .86rem; }
.filters-events { grid-template-columns: minmax(190px, .8fr) minmax(280px, 1.4fr) 170px auto; }
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

@media (max-width: 1050px) {
    .kpis-5 { grid-template-columns: repeat(3, 1fr); }
    .filters-events { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .event-grid, .toggle-row { grid-template-columns: 1fr; }
    .link-row, .event-admin-strip { align-items: stretch; flex-direction: column; }
    .filters-events, .kpis-5 { grid-template-columns: 1fr; }
}

/* Seleção e confirmação de presença em lote */
.bulk-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fbfc;
}
.bulk-actions form { margin: 0; }
.bulk-actions .btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    filter: none;
}
th.col-select,
td.col-select {
    width: 84px;
    min-width: 84px;
    text-align: center;
}
.participant-checkbox {
    width: 19px;
    height: 19px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: var(--feam-green-dark);
}

/* Validação pública de certificados */
.certificate-validator {
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}
.validator-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 20px;
}
.validator-heading h2 { margin-bottom: 7px; }
.validator-heading p { margin: 0; line-height: 1.55; }
.validator-code-example {
    flex: 0 0 auto;
    padding: 10px 13px;
    border: 1px dashed #b8cbd4;
    border-radius: 10px;
    background: #f6fafb;
    color: #667983;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .82rem;
    letter-spacing: .04em;
}
.validator-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
}
.validator-form input {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.validator-result {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid;
    border-radius: 14px;
}
.validator-result p { margin: 4px 0 0; line-height: 1.5; }
.validator-valid {
    color: #315f13;
    background: #f3fae9;
    border-color: #cfe7ad;
}
.validator-invalid {
    color: #8e291f;
    background: #fff4f2;
    border-color: #f0c5c0;
}
.validator-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}
.validator-valid .validator-icon {
    color: #fff;
    background: var(--feam-green-dark);
}
.validator-invalid .validator-icon {
    color: #fff;
    background: var(--danger);
}
.validator-result-main { min-width: 0; width: 100%; }
.validator-status-title {
    font-size: 1.16rem;
    font-weight: 900;
}
.validator-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 16px 0 0;
    overflow: hidden;
    border: 1px solid rgba(76, 112, 45, .18);
    border-radius: 11px;
    background: rgba(255,255,255,.72);
}
.validator-details > div {
    min-width: 0;
    padding: 11px 13px;
    border-bottom: 1px solid rgba(76, 112, 45, .13);
}
.validator-details > div:nth-child(odd) {
    border-right: 1px solid rgba(76, 112, 45, .13);
}
.validator-details > div:last-child,
.validator-details > div:nth-last-child(2):nth-child(odd) {
    border-bottom: 0;
}
.validator-details .validator-details-wide {
    grid-column: 1 / -1;
    border-right: 0;
}
.validator-details dt {
    margin: 0 0 4px;
    color: #687d58;
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}
.validator-details dd {
    margin: 0;
    color: #263c24;
    font-weight: 700;
    overflow-wrap: anywhere;
}
.validator-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: .045em;
}

@media (max-width: 680px) {
    .validator-heading { flex-direction: column; }
    .validator-code-example { align-self: stretch; text-align: center; }
    .validator-form { grid-template-columns: 1fr; }
    .validator-form .btn { width: 100%; }
    .validator-details { grid-template-columns: 1fr; }
    .validator-details > div,
    .validator-details > div:nth-child(odd),
    .validator-details .validator-details-wide {
        grid-column: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(76, 112, 45, .13);
    }
    .validator-details > div:last-child { border-bottom: 0; }
}

/* QR Codes dos endereços públicos do evento */
.public-link-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #e3ecef;
}
.public-link-card:first-of-type {
    border-top: 0;
    padding-top: 4px;
}
.public-link-info {
    min-width: 0;
    display: grid;
    gap: 9px;
}
.public-link-info > strong {
    font-size: 1rem;
}
.public-link-info code {
    display: block;
    width: 100%;
    max-width: 820px;
    overflow-wrap: anywhere;
    white-space: normal;
    padding: 9px 11px;
    border-radius: 9px;
    background: #edf5f8;
    border: 1px solid #d8e7ed;
    color: #32505f;
    line-height: 1.4;
}
.qr-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px;
    border: 1px solid #d8e7ed;
    border-radius: 14px;
    background: #fff;
    text-align: center;
}
.qr-title {
    font-size: .9rem;
    font-weight: 800;
    color: #314b58;
}
.qr-canvas {
    display: block;
    max-width: 100%;
    height: auto !important;
    background: #fff;
    border-radius: 4px;
}
.qr-canvas.qr-error {
    display: none;
}
.qr-help {
    color: var(--muted);
    font-size: .78rem;
    line-height: 1.35;
    max-width: 215px;
}

@media (max-width: 780px) {
    .public-link-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .qr-panel {
        width: min(100%, 280px);
        justify-self: center;
    }
}


/* Painel administrativo - tabela de eventos ajustada à largura da tela */
@media (min-width: 1200px) {
    .admin-body .container {
        width: min(1460px, calc(100% - 40px));
    }

    .dashboard-events-card .dashboard-events-wrap {
        overflow-x: visible;
    }

    .dashboard-events-table {
        width: 100%;
        table-layout: fixed;
    }

    .dashboard-events-table th,
    .dashboard-events-table td {
        padding: 11px 9px;
        font-size: .9rem;
    }

    .dashboard-events-table th:nth-child(1),
    .dashboard-events-table td:nth-child(1) {
        width: 32%;
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.35;
    }

    .dashboard-events-table th:nth-child(2),
    .dashboard-events-table td:nth-child(2) { width: 9%; }

    .dashboard-events-table th:nth-child(3),
    .dashboard-events-table td:nth-child(3) { width: 7%; }

    .dashboard-events-table th:nth-child(4),
    .dashboard-events-table td:nth-child(4) { width: 9%; }

    .dashboard-events-table th:nth-child(5),
    .dashboard-events-table td:nth-child(5) { width: 7%; }

    .dashboard-events-table th:nth-child(6),
    .dashboard-events-table td:nth-child(6) { width: 7%; }

    .dashboard-events-table th:nth-child(7),
    .dashboard-events-table td:nth-child(7) { width: 9%; }

    .dashboard-events-table th:nth-child(8),
    .dashboard-events-table td:nth-child(8) { width: 20%; }

    .dashboard-events-table th {
        white-space: normal;
        line-height: 1.15;
        overflow-wrap: normal;
        word-break: normal;
    }

    .dashboard-events-table td:not(:first-child) {
        white-space: nowrap;
    }

    .dashboard-events-table .row-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .dashboard-events-table .row-actions .btn-sm {
        min-width: 0;
        width: 100%;
        padding: 7px 6px;
        font-size: .78rem;
        white-space: nowrap;
    }
}


/* Confirmação pública de presença por QR Code */
.presence-confirm-card {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.presence-confirm-intro {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.6;
}
.presence-confirm-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}
.presence-confirm-form .presence-submit {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
}
.presence-result {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 18px;
    margin-bottom: 22px;
    border: 1px solid #cce5c5;
    border-radius: 14px;
    background: var(--success-bg);
    color: #264d21;
}
.presence-result-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--feam-green-dark);
    color: #fff;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1;
}
.presence-result h2 {
    margin: 0 0 5px;
    color: #24431f;
}
.presence-result p {
    margin: 4px 0 0;
    line-height: 1.5;
}
.presence-event-summary {
    display: grid;
    gap: 7px;
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(76, 112, 45, .18);
}
.presence-event-summary span {
    overflow-wrap: anywhere;
}
.qr-admin-warning {
    max-width: 760px;
    line-height: 1.45;
}

@media (max-width: 680px) {
    .presence-confirm-form {
        grid-template-columns: 1fr;
    }
    .presence-confirm-form .presence-submit {
        grid-column: auto;
    }
    .presence-confirm-form .presence-submit .btn {
        width: 100%;
    }
    .presence-result {
        flex-direction: column;
    }
}

/* Ações administrativas de participantes */
.row-actions form { margin: 0; }

/* Ações finais da lista de inscritos */
th.col-admin-actions,
td.col-admin-actions {
    min-width: 145px;
    width: 145px;
    text-align: right;
}
.row-actions-nowrap {
    flex-wrap: nowrap;
    justify-content: flex-end;
}
.row-actions-nowrap .btn {
    white-space: nowrap;
}

/* Relatórios administrativos */
.report-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.report-menu-card {
    min-width: 0;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff, #f9fcfd);
    box-shadow: 0 8px 24px rgba(30,63,80,.07);
    color: var(--ink);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.report-menu-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: #bad9e4;
    box-shadow: 0 12px 28px rgba(30,63,80,.10);
}
.report-menu-card h2 { margin: 0 0 7px; font-size: 1.08rem; }
.report-menu-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.report-menu-number {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--feam-blue), var(--feam-green));
    font-weight: 900;
}
.report-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.report-heading { align-items: center; }
.report-date-filters {
    grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) auto auto;
    justify-content: start;
}
.report-cpf-form,
.report-company-form {
    display: grid;
    grid-template-columns: minmax(260px, 520px) auto auto;
    gap: 12px;
    align-items: end;
}
.report-inline-alert { margin: 14px 0 0; }
.report-print-title {
    display: none;
    text-align: center;
    margin-bottom: 18px;
}
.report-print-title strong,
.report-print-title span,
.report-print-title small { display: block; }
.report-print-title strong { font-size: 1.1rem; }
.report-print-title span { margin-top: 3px; font-size: 1rem; font-weight: 800; }
.report-print-title small { margin-top: 4px; color: #555; }
.report-table-wrap { width: 100%; }
.report-table th,
.report-table td { white-space: normal; vertical-align: top; }
.report-table th { font-size: .78rem; }
.report-table tfoot th { background: #eef5f8; font-size: .88rem; }
.report-person-header {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.report-person-header > div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #f8fbfc;
}
.report-person-header span,
.hours-report-hero span {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .035em;
}
.report-person-header strong { overflow-wrap: anywhere; }
.report-summary-inline { margin: 0 0 18px; }
.hours-report-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 20px;
}
.hours-report-hero > div:first-child {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}
.hours-report-hero > div:first-child strong { font-size: 1.28rem; }
.hours-report-hero small { color: var(--muted); }
.hours-total-box {
    min-width: 220px;
    padding: 16px 20px;
    border: 1px solid #d3e8bc;
    border-radius: 14px;
    background: #f5fbe9;
    display: grid;
    gap: 4px;
    align-content: center;
}
.hours-total-box strong { color: #4f7b00; font-size: 1.8rem; line-height: 1.1; }

@media (max-width: 800px) {
    .report-menu-grid { grid-template-columns: 1fr; }
    .report-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-date-filters,
    .report-cpf-form,
    .report-company-form { grid-template-columns: 1fr; }
    .report-person-header { grid-template-columns: 1fr; }
    .hours-report-hero { flex-direction: column; }
    .hours-total-box { min-width: 0; }
}

@media print {
    @page { size: A4 portrait; margin: 10mm; }
    body.admin-body {
        display: block;
        min-height: 0;
        background: #fff !important;
        color: #000;
        font-family: Arial, Helvetica, sans-serif;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .admin-body .site-header,
    .admin-body .site-footer,
    .admin-body .no-print { display: none !important; }
    .admin-body .container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }
    .admin-body .main-content { padding: 0 !important; }
    .admin-body .report-heading { margin: 0 0 8mm; }
    .admin-body .report-heading > div:first-child { display: none; }
    .admin-body .report-print-card {
        padding: 0;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .admin-body .report-print-title { display: block; }
    .admin-body .report-summary-print,
    .admin-body .report-summary-inline { margin-bottom: 5mm; }
    .admin-body .kpi {
        padding: 8px 10px;
        box-shadow: none;
        break-inside: avoid;
    }
    .admin-body .kpi strong { font-size: 1.25rem; }
    .admin-body .table-wrap {
        overflow: visible;
        border-radius: 0;
    }
    .admin-body .report-table {
        width: 100%;
        table-layout: auto;
        font-size: 8.5pt;
    }
    .admin-body .report-table th,
    .admin-body .report-table td {
        padding: 5px 6px;
        border: 1px solid #cfd7db;
        color: #000;
    }
    .admin-body .report-table th { background: #eef2f4 !important; }
    .admin-body .report-table tr { break-inside: avoid; }
    .admin-body .help { color: #444; font-size: 7.5pt; }
    .admin-body .report-person-header > div,
    .admin-body .hours-total-box {
        box-shadow: none;
        background: #fff !important;
    }
}

/* Filtros unificados dos relatórios */
.report-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) minmax(160px, .65fr) minmax(160px, .65fr) auto auto;
    gap: 12px;
    align-items: end;
}
.report-filter-grid-company {
    grid-template-columns: minmax(280px, 1.5fr) minmax(160px, .65fr) minmax(160px, .65fr) auto auto;
}
.report-filter-grid-person {
    grid-template-columns: minmax(240px, 1.2fr) minmax(220px, 1fr) minmax(150px, .65fr) minmax(150px, .65fr) auto;
}
.report-filter-actions {
    flex-wrap: nowrap;
}
@media (max-width: 980px) {
    .report-filter-grid,
    .report-filter-grid-company,
    .report-filter-grid-person {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 640px) {
    .report-filter-grid,
    .report-filter-grid-company,
    .report-filter-grid-person {
        grid-template-columns: 1fr;
    }
    .report-filter-actions { flex-wrap: wrap; }
}

/* Exclusão definitiva de evento */
.delete-event-card { max-width: 820px; }
.delete-event-warning { border: 1px solid #f1b4ae; background: #fff3f2; border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; }
.delete-event-warning h2 { color: #9f1c13; margin-top: 0; }
.delete-event-warning p { margin: 8px 0; }
.delete-event-name { font-size: 1.2rem; font-weight: 800; color: #1f2937; }
.delete-code-box { display: inline-flex; align-items: center; gap: 16px; border: 1px dashed #94a3b8; background: #f8fafc; border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; }
.delete-code { font-size: 1.65rem; line-height: 1; font-weight: 800; letter-spacing: .25em; color: #b42318; font-variant-numeric: tabular-nums; }
.delete-code-input { max-width: 260px; }
.delete-code-input input { text-align: center; font-size: 1.25rem; font-weight: 800; letter-spacing: .25em; }

/* ==========================================================
   LOGS / AUDITORIA
   ========================================================== */
.logs-kpis { margin-bottom: 24px; }
.logs-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}
.logs-search-field { grid-column: span 2; }
.logs-filter-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.logs-table th, .logs-table td { vertical-align: top; }
.logs-table td:nth-child(3), .logs-table td:nth-child(4) { white-space: normal; min-width: 220px; }
.log-description { max-width: 360px; margin-top: 4px; }
.log-category {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-weight: 800;
    font-size: .76rem;
    white-space: nowrap;
}
.log-category-evento { color: #05617d; background: #def4fb; }
.log-category-inscricao { color: #6b5200; background: #fff3bf; }
.log-category-presenca { color: #3f6d00; background: #eaf7cf; }
.log-category-certificado { color: #6f42a7; background: #f0e8fb; }
.log-category-autenticacao { color: #8a4b08; background: #fff0d6; }
.log-category-acesso { color: #175e73; background: #e1f4f8; }
.log-category-relatorio { color: #245a32; background: #e4f4e8; }
.log-category-usuario { color: #71375f; background: #f7e5f1; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; color: var(--muted); }
.log-detail-hero { display: grid; gap: 18px; }
.log-detail-grid, .log-context-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.log-detail-grid > div, .log-context-box, .log-tech-grid > div {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    background: #f9fcfd;
    min-width: 0;
}
.log-detail-grid span, .log-context-box span, .log-tech-grid span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 5px;
}
.log-context-box strong, .log-context-box small { display: block; }
.log-context-box small { color: var(--muted); margin-top: 4px; }
.log-diff-table td { white-space: normal; min-width: 180px; }
.log-diff-table pre, .log-inline-pre {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: inherit;
    color: var(--ink);
}
.log-tech-grid { display: grid; gap: 12px; }
.log-tech-grid code { display: block; white-space: normal; overflow-wrap: anywhere; color: #315363; }

@media (max-width: 1050px) {
    .logs-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .logs-search-field { grid-column: span 2; }
}
@media (max-width: 680px) {
    .logs-filters, .log-detail-grid, .log-context-grid { grid-template-columns: 1fr; }
    .logs-search-field { grid-column: auto; }
}

/* Busca pública para emissão de certificados */
.certificate-search-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}
.certificate-search-filters-single {
    grid-template-columns: minmax(0, 1fr) auto;
}
.certificate-search-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-bottom: 1px;
}

.certificate-search-results {
    display: grid;
    gap: 14px;
}

.certificate-search-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 20px 22px;
    border: 1px solid #dce7eb;
    border-radius: 16px;
    box-shadow: 0 7px 20px rgba(18, 58, 80, .045);
    transition: transform .15s ease, box-shadow .15s ease;
}
.certificate-search-card:nth-child(odd) {
    background: linear-gradient(135deg, #f6fbfe 0%, #fbfdff 100%);
    border-left: 5px solid #62bddb;
}
.certificate-search-card:nth-child(even) {
    background: linear-gradient(135deg, #f7fcf4 0%, #fcfefb 100%);
    border-left: 5px solid #9bcf62;
}
.certificate-search-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(18, 58, 80, .07);
}

.certificate-search-info {
    min-width: 0;
}
.certificate-search-card h3 {
    margin: 0 0 15px;
    font-size: 1.08rem;
    line-height: 1.4;
    color: #173348;
    font-weight: 760;
    letter-spacing: -.01em;
}

.certificate-search-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 12px;
    align-items: stretch;
}
.certificate-search-meta-grid span {
    display: grid;
    gap: 2px;
    min-width: 105px;
    padding: 8px 11px;
    border-radius: 10px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(185, 205, 214, .65);
}
.certificate-search-meta-grid .certificate-search-meta-wide {
    min-width: 230px;
    flex: 1 1 260px;
}
.certificate-search-meta-grid strong {
    color: #6a7c87;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .045em;
    font-weight: 800;
}
.certificate-search-meta-grid b {
    color: #243b4a;
    font-size: .9rem;
    font-weight: 650;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.certificate-search-card-action-inline {
    min-width: 190px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    align-self: stretch;
}
.certificate-search-card-action-inline .btn {
    white-space: nowrap;
    align-self: center;
    min-width: 170px;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(89, 151, 0, .12);
}
.certificate-search-help {
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 840px) {
    .certificate-search-card {
        grid-template-columns: 1fr;
    }
    .certificate-search-card-action-inline {
        min-width: 0;
        justify-content: flex-start;
        align-self: auto;
    }
    .certificate-search-card-action-inline .btn {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .certificate-search-filters {
        grid-template-columns: 1fr;
    }
    .certificate-search-actions {
        align-items: stretch;
    }
}

@media (max-width: 520px) {
    .certificate-search-meta-grid {
        display: grid;
        grid-template-columns: 1fr;
    }
    .certificate-search-meta-grid .certificate-search-meta-wide {
        min-width: 0;
    }
    .certificate-search-actions {
        flex-direction: column;
    }
}



/* Página pública inicial - caixas alinhadas e conteúdo centralizado */
.public-home-stack {
    width: 100%;
    display: grid;
    gap: 26px;
}
.public-home-panel {
    width: 100%;
    max-width: none;
    margin: 0;
}
.presencial-brand-hero {
    display: grid;
    grid-template-columns: 1.4fr .72fr;
    min-height: 390px;
    overflow: hidden;
    border: 1px solid #d5e3ec;
    border-radius: 28px;
    background: linear-gradient(145deg, #08738f, #0aa9d6);
    box-shadow: var(--shadow);
}
.presencial-brand-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px 58px;
    color: #fff;
}
.presencial-brand-content .eyebrow {
    margin: 0;
    color: #d8f6ff;
    letter-spacing: .1em;
}
.presencial-brand-content h1 {
    margin: 18px 0 0;
    color: #fff;
    font-size: 4.25rem;
    line-height: .98;
    letter-spacing: .025em;
}
.presencial-brand-content p {
    max-width: none;
    margin: 18px 0 0;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1.25;
    font-weight: 650;
}
.presencial-brand-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 34px;
}
.presencial-brand-actions .btn { min-width: 180px; }
.presencial-brand-primary {
    color: #fff;
    border: 1px solid rgba(255,255,255,.3);
    background: linear-gradient(135deg, #82c900, #5d9300);
    box-shadow: 0 10px 24px rgba(0,45,55,.2);
}
.presencial-brand-primary:hover { color: #fff; filter: brightness(1.05); }
.presencial-brand-secondary {
    color: #fff;
    border: 1px solid rgba(255,255,255,.5);
    background: rgba(255,255,255,.12);
}
.presencial-brand-secondary:hover { color: #08738f; background: #fff; }
.presencial-brand-logo {
    display: grid;
    place-items: center;
    padding: 42px;
    background: linear-gradient(155deg, #fff, #edf7fb);
}
.presencial-brand-logo img {
    width: min(100%, 300px);
    height: auto;
    filter: drop-shadow(0 18px 24px rgba(6,55,91,.16));
}
.public-home-hero-copy {
    min-height: 176px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.public-home-hero-copy .eyebrow,
.public-home-hero-copy h1,
.public-home-hero-copy p {
    text-align: center;
}
.public-home-hero-copy p {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}
.public-home-access-card {
    min-height: 312px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.public-home-access-card .empty {
    width: 100%;
    max-width: 820px;
}
@media (max-width: 760px) {
    .presencial-brand-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .presencial-brand-logo {
        grid-row: 1;
        padding: 28px;
    }
    .presencial-brand-logo img { width: 190px; }
    .presencial-brand-content { padding: 38px 30px; }
    .presencial-brand-content h1 { font-size: 3rem; }
    .presencial-brand-content p { font-size: 1.5rem; }
    .public-home-hero-copy {
        min-height: 0;
    }
    .public-home-access-card {
        min-height: 0;
    }
}
@media (max-width: 520px) {
    .presencial-brand-content { padding: 32px 22px; }
    .presencial-brand-content h1 { font-size: 2.45rem; }
    .presencial-brand-content p { font-size: 1.3rem; }
    .presencial-brand-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        margin-top: 26px;
    }
    .presencial-brand-actions .btn { width: 100%; min-width: 0; }
}
