@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #05314A;
    --navy-deep: #04293f;
    --blue: #1C8FE8;
    --coral: #FF5A36;
    --cream: #f7f3ec;
    --white: #ffffff;
    --green: #8aaa3a;
    --text: #0d2f43;
    --muted: #6a7780;
    --line: #dbe5ea;
    --shadow: 0 22px 60px rgba(4, 41, 63, .10);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: var(--cream);
    font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.login-page {
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        radial-gradient(circle at 14% 18%, rgba(28,143,232,.11), transparent 28%),
        radial-gradient(circle at 84% 86%, rgba(255,90,54,.08), transparent 26%),
        var(--cream);
}

.login-shell {
    width: min(1080px, 100%);
    min-height: 660px;
    display: grid;
    grid-template-columns: 1.04fr .96fr;
    overflow: hidden;
    border-radius: 34px;
    box-shadow: var(--shadow);
    background: var(--white);
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 68px;
    color: var(--white);
    background: linear-gradient(155deg, rgba(5,49,74,.98), rgba(4,41,63,.97));
}

.brand-panel::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    right: -120px;
    bottom: -120px;
    border-radius: 50%;
    border: 34px solid rgba(255,255,255,.05);
}

.brand-panel h1,
.login-card h2,
.hero-card h1,
.section-head h2,
.page-heading h1,
.report-hero h1 { margin: 0; letter-spacing: -.035em; }

.brand-panel h1 { font-size: clamp(3rem, 7vw, 5rem); line-height: .96; max-width: 8ch; }
.brand-copy { max-width: 440px; margin: 28px 0 0; color: rgba(255,255,255,.78); font-size: 1.02rem; }
.logo--login { width: min(320px, 70%); border-radius: 18px; margin-bottom: 34px; box-shadow: 0 16px 36px rgba(0,0,0,.16); }
.logo--header { width: 118px; height: auto; flex: 0 0 auto; }
.logo--module { width: 140px; }

.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.brand-panel .eyebrow,
.hero-card .eyebrow,
.report-hero .eyebrow { color: rgba(255,255,255,.78); }

.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 72px;
}
.login-card__head h2 { font-size: 2.35rem; }
.login-card__head > p:last-child { margin: 8px 0 30px; color: var(--muted); }
label { display: block; margin: 18px 0 8px; font-size: .92rem; font-weight: 700; }
input, select, textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #ccd8df;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(28,143,232,.12);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .15s ease, opacity .15s ease, background-color .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button--primary, .button--secondary { color: #fff; background: var(--navy); }
.button--primary { width: 100%; margin-top: 26px; }
.button--primary:hover, .button--secondary:hover { background: var(--navy-deep); }
.button--ghost { border: 1px solid var(--line); background: #fff; }
.button--light { border: 1px solid rgba(255,255,255,.28); color: var(--navy); background: #fff; }
.button--xs { min-height: 34px; padding: 8px 10px; font-size: .8rem; }

.alert { padding: 13px 14px; margin: 0 0 20px; border-radius: 12px; font-size: .92rem; }
.alert--error { border: 1px solid #ffc7be; background: #fff0ed; color: #9a2d20; }
.alert--success { border: 1px solid #cfe3ae; background: #f1f8e4; color: #446315; }
.login-note { margin: 22px 0 0; color: #90999a; font-size: .78rem; text-align: center; }

.app-page { background: linear-gradient(180deg, rgba(5,49,74,.045), transparent 240px), var(--cream); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 82px;
    padding: 14px max(24px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid rgba(5,49,74,.08);
    background: rgba(247,243,236,.93);
    backdrop-filter: blur(16px);
}
.topbar__brand { display: flex; align-items: center; gap: 14px; }
.topbar__brand strong, .topbar__brand small { display: block; }
.topbar__brand small { margin-top: 2px; color: var(--muted); }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.user-chip, .status-badge, .tag, .comparison-chip {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}
.user-chip { padding: 9px 12px; background: rgba(5,49,74,.07); }
.status-badge { padding: 9px 12px; color: var(--navy); background: #e8f2fb; }
.comparison-chip { padding: 9px 12px; color: #7c4719; background: #ffecdf; }
.comparison-chip--muted { color: var(--muted); background: #edf1f4; }

.container { width: min(1180px, calc(100% - 40px)); margin: 38px auto 70px; }
.container--narrow { width: min(760px, calc(100% - 40px)); }
.hero-card, .report-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
    padding: 42px;
    border-radius: var(--radius-lg);
    color: #fff;
    background: var(--navy);
    box-shadow: var(--shadow);
}
.hero-card--dashboard { align-items: center; }
.hero-card h1, .report-hero h1 { font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1.02; }
.hero-card p:last-child { max-width: 760px; margin: 18px 0 0; color: rgba(255,255,255,.78); }
.hero-actions { display: flex; flex: 0 0 auto; flex-direction: column; align-items: stretch; gap: 10px; }

.setup-card, .module-card, .note-card, .stat-card, .form-card, .context-card, .report-card, .empty-state, .comparison-card, .kpi-card, .total-card {
    border: 1px solid rgba(5,49,74,.09);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.82);
    box-shadow: 0 8px 26px rgba(4,41,63,.04);
}

.setup-card { display: grid; grid-template-columns: auto 1fr; gap: 22px; margin-top: 22px; padding: 26px; }
.setup-card__icon {
    width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px;
    color: #8c4b1d; background: #ffe6d7; font-size: .82rem; font-weight: 800;
}
.setup-card h2, .setup-card p { margin-top: 0; }
.setup-card p:last-child { margin-bottom: 0; }

.stats-grid, .context-grid, .kpi-grid, .totals-grid { display: grid; gap: 14px; }
.stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 22px; }
.kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.totals-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.stat-card, .kpi-card, .total-card { padding: 22px; }
.stat-card span, .stat-card small, .kpi-card small, .kpi-card__label, .total-card span { display: block; color: var(--muted); }
.stat-card strong, .kpi-card strong, .total-card strong { display: block; margin: 7px 0 2px; font-size: 2rem; line-height: 1; }
.kpi-card strong { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.kpi-card__label { font-weight: 700; }
.delta { margin-top: 12px; font-weight: 700; font-size: .85rem; }
.delta--up { color: #0e8348; }
.delta--down { color: var(--coral); }
.delta--neutral { color: var(--muted); }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 46px 0 18px; }
.section-head h2 { font-size: 2rem; }
.section-head--actions { align-items: center; }
.muted { color: var(--muted); }

.report-list { display: grid; gap: 12px; }
.report-card {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: 20px 22px;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.report-card:hover { transform: translateY(-2px); border-color: rgba(28,143,232,.28); box-shadow: 0 14px 34px rgba(4,41,63,.07); }
.report-card__date { padding-right: 18px; border-right: 1px solid var(--line); }
.report-card__date strong, .report-card__date span { display: block; }
.report-card__date span { color: var(--muted); }
.report-card__title-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.report-card__title-row h3 { margin: 0; font-size: 1.16rem; }
.report-card__meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; color: var(--muted); font-size: .8rem; }
.report-card__arrow { color: var(--blue); font-size: 1.5rem; }

.status-pill, .section-status {
    display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; font-size: .74rem; font-weight: 800; white-space: nowrap;
}
.status-pill { padding: 7px 10px; }
.section-status { padding: 6px 9px; }
.status-pill--draft, .section-status--pending { color: #626e76; background: #edf1f4; }
.status-pill--progress, .section-status--in_progress { color: #8c4b1d; background: #ffe6d7; }
.status-pill--completed, .section-status--completed { color: #486d13; background: #e8f3d2; }

.progress-track { height: 7px; margin-top: 13px; overflow: hidden; border-radius: 999px; background: #e6ecef; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

.empty-state { padding: 44px 28px; border-style: dashed; text-align: center; background: rgba(255,255,255,.52); }
.empty-state__month {
    display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 15px;
    color: #fff; background: var(--navy); font-weight: 900;
}
.empty-state h3 { margin: 0 0 7px; }
.empty-state p { max-width: 620px; margin: 0 auto 20px; color: var(--muted); }

.note-card { margin-top: 20px; padding: 22px 24px; }
.note-card p { margin: 6px 0 0; color: var(--muted); }
.note-card--stage { margin-top: 28px; }

.page-heading { margin: 20px 0 24px; }
.page-heading h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
.page-heading > p:last-child { max-width: 650px; color: var(--muted); }
.form-card { padding: 28px; }
.form-grid { display: grid; gap: 18px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-hint { display: block; margin-top: 10px; color: var(--muted); font-size: .8rem; }
.info-strip, .info-banner {
    display: grid; gap: 4px; padding: 16px 18px; border-radius: var(--radius-sm);
}
.info-strip { margin-top: 24px; background: rgba(28,143,232,.08); }
.info-banner { margin: 18px 0; }
.info-banner--accent { background: rgba(255,90,54,.08); border: 1px solid rgba(255,90,54,.18); }
.info-strip span, .info-banner p { color: var(--muted); font-size: .92rem; margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }

.report-hero__meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; color: rgba(255,255,255,.78); font-size: .85rem;
}
.progress-ring-card {
    min-width: 145px; padding: 20px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(255,255,255,.07); text-align: center;
}
.progress-ring-card strong, .progress-ring-card span { display: block; }
.progress-ring-card strong { font-size: 2.35rem; line-height: 1; }
.progress-ring-card span { margin-top: 7px; color: rgba(255,255,255,.72); font-size: .78rem; }

.context-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.context-card {
    min-height: 150px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 20px;
}
.context-card__label { margin-bottom: 8px; color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.context-card strong { font-size: 1.06rem; }
.context-card small, .context-card a { margin-top: 7px; color: var(--muted); }
.context-card a { color: var(--blue); font-weight: 700; }
.context-card--status label { margin-top: 0; }
.inline-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: 100%; }

.module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.module-card { min-height: 220px; padding: 24px; }
.module-card--active { border-color: rgba(28,143,232,.26); background: linear-gradient(180deg, rgba(28,143,232,.08), rgba(255,255,255,.90)); }
.module-card--locked { background: rgba(255,255,255,.68); }
.module-card__topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.module-card__number { color: var(--blue); font-size: .8rem; font-weight: 900; letter-spacing: .12em; }
.module-card h3 { margin: 32px 0 8px; font-size: 1.25rem; }
.module-card p { margin: 0; color: var(--muted); }
.tag { margin-top: 20px; padding: 7px 10px; }
.tag--locked { color: #676f70; background: #edf0ef; }
.tag--media { color: #175e7d; background: #e6f2fb; }
.tag--action { color: #8c4b1d; background: #ffecdf; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 980px; }
.data-table th, .data-table td { padding: 12px 10px; border-bottom: 1px solid #e7edf1; vertical-align: top; text-align: left; }
.data-table th { color: var(--muted); font-size: .82rem; font-weight: 700; }
.data-table td input { min-width: 110px; }
.data-table--compact { min-width: 860px; }
.table-actions { display: flex; justify-content: flex-start; margin-top: 14px; }
.line-cpl { display: inline-flex; min-width: 82px; font-weight: 700; color: var(--navy); padding-top: 12px; }
.comparison-card { padding: 16px; }

.total-card strong { color: var(--navy); }
.report-hero--module { align-items: center; }

@media (max-width: 980px) {
    .kpi-grid, .totals-grid, .stats-grid, .context-grid, .module-grid { grid-template-columns: 1fr; }
    .hero-card, .report-hero, .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 880px) {
    .login-shell { grid-template-columns: 1fr; }
    .brand-panel, .login-card { padding: 46px; }
    .brand-panel { min-height: 380px; }
    .report-card { grid-template-columns: 100px minmax(0, 1fr) auto; }
}

@media (max-width: 620px) {
    .login-page { padding: 0; }
    .login-shell { min-height: 100vh; border-radius: 0; }
    .brand-panel, .login-card { padding: 34px 24px; }
    .topbar { position: static; padding: 14px 18px; }
    .topbar__brand span small { display: none; }
    .user-chip { display: none; }
    .container { width: min(100% - 28px, 1180px); margin-top: 22px; }
    .hero-card, .report-hero { padding: 28px; }
    .report-card { grid-template-columns: 1fr; gap: 14px; }
    .report-card__date { padding-right: 0; padding-bottom: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
    .report-card__meta, .report-card__title-row, .report-hero__meta { flex-direction: column; align-items: flex-start; }
    .report-card__arrow { display: none; }
    .form-grid--2, .inline-form { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button, .hero-actions { width: 100%; }
    .progress-ring-card { width: 100%; }
}

/* Etapa 4 — Eventos */
.alert--warning {
    border: 1px solid #ffd0b8;
    background: #fff3eb;
    color: #8b451d;
}
.button--danger {
    color: #a83425;
    border: 1px solid #ffc8bf;
    background: #fff1ee;
}
.button--danger:hover { background: #ffe7e1; }
.kpi-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi-card--accent {
    border-color: rgba(255,90,54,.22);
    background: linear-gradient(180deg, rgba(255,90,54,.075), rgba(255,255,255,.92));
}
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.upload-box {
    display: grid;
    gap: 12px;
    margin-top: 22px;
    padding: 18px;
    border: 1px dashed rgba(28,143,232,.38);
    border-radius: var(--radius-sm);
    background: rgba(28,143,232,.045);
}
.upload-box p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.upload-box small { color: var(--muted); }
.upload-box input[type="file"] { padding: 11px; background: #fff; }
.event-list { display: grid; gap: 16px; }
.event-card {
    padding: 24px;
    border: 1px solid rgba(5,49,74,.09);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.84);
    box-shadow: 0 8px 26px rgba(4,41,63,.04);
}
.event-card__head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.event-card__head h3 { margin: 7px 0 2px; font-size: 1.35rem; }
.event-card__actions { display: flex; gap: 8px; align-items: center; }
.event-date {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--navy);
    background: #e8f2fb;
    font-size: .78rem;
    font-weight: 700;
}
.event-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}
.event-metrics span {
    padding: 9px 11px;
    border-radius: 10px;
    background: #f2f6f8;
    color: var(--muted);
    font-size: .84rem;
}
.event-metrics b { color: var(--navy); }
.event-description { margin: 18px 0 0; color: var(--muted); }
.media-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}
.media-grid--editing { margin: 20px 0 0; }
.media-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7fafb;
}
.media-card img,
.media-card video {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: var(--navy-deep);
}
.media-card > span,
.media-card__footer span {
    display: block;
    padding: 8px 9px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: .72rem;
}
.media-card__footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}
.media-card__footer span { padding-right: 3px; }
.media-delete {
    width: 30px;
    height: 30px;
    margin-right: 5px;
    border: 0;
    border-radius: 50%;
    color: #a83425;
    background: #fff0ed;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}
.empty-state--small { padding: 24px; }
.empty-state--small p { margin: 0 auto; }
.planned-table-wrap,
.module-finish-card {
    border: 1px solid rgba(5,49,74,.09);
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.84);
    box-shadow: 0 8px 26px rgba(4,41,63,.04);
}
.planned-table-wrap { overflow-x: auto; padding: 10px 16px; }
.module-finish-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
    gap: 26px;
    align-items: center;
    margin-top: 36px;
    padding: 26px;
}
.module-finish-card h2 { margin: 0 0 7px; }
.module-finish-card p { margin: 0; color: var(--muted); }
.finish-form { display: grid; gap: 10px; }
.checkbox-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    font-weight: 500;
}
.checkbox-row input { width: auto; margin-top: 4px; }

@media (max-width: 1020px) {
    .kpi-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .form-grid--3, .module-finish-card { grid-template-columns: 1fr; }
    .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .event-card__head { flex-direction: column; }
}
@media (max-width: 520px) {
    .kpi-grid--4, .media-grid { grid-template-columns: 1fr; }
}

/* Etapa 4.1 — preenchimento mais compacto + mídias */
.traffic-select { min-width: 180px; }
.data-table td select { min-width: 180px; }

.event-form-heading { margin-bottom: 12px; }
.event-form-card { padding: 22px; }
.upload-box--compact { padding: 14px 16px; }

.event-list--compact { gap: 12px; }
.event-card--compact { padding: 18px 20px; }
.event-card--compact .event-card__head h3 { margin: 6px 0 8px; font-size: 1.15rem; }
.event-type-chip {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--navy);
    background: #e8f2fb;
    font-size: .73rem;
    font-weight: 700;
}
.event-metrics--compact { margin-top: 12px; gap: 8px; }
.event-metrics--compact span { padding: 7px 9px; font-size: .78rem; }
.event-description--compact {
    margin-top: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .86rem;
}

.media-strip {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
    padding: 2px 0 6px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
}
.media-strip--editing {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f7fafb;
}
.media-thumb-wrap {
    flex: 0 0 138px;
    min-width: 0;
}
.media-thumb {
    position: relative;
    width: 138px;
    height: 96px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border: 1px solid #d7e2e8;
    border-radius: 11px;
    background: var(--navy-deep);
    cursor: pointer;
}
.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.media-thumb--video {
    color: #fff;
    background:
        radial-gradient(circle at 30% 30%, rgba(28,143,232,.35), transparent 40%),
        linear-gradient(145deg, var(--navy), var(--navy-deep));
}
.media-thumb__play {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: var(--navy);
    font-size: .9rem;
    padding-left: 2px;
}
.media-thumb--video small {
    position: absolute;
    right: 7px;
    bottom: 6px;
    color: rgba(255,255,255,.82);
    font-size: .66rem;
    font-weight: 700;
}
.media-thumb__name {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: .68rem;
}
.media-thumb__meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}
.media-thumb__meta > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: .68rem;
}
.media-thumb__meta .media-delete {
    width: 25px;
    height: 25px;
    margin: 0;
    font-size: 1rem;
}

.media-modal {
    width: min(980px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    padding: 44px 18px 18px;
    border: 0;
    border-radius: 18px;
    background: #071f2c;
    box-shadow: 0 30px 90px rgba(0,0,0,.35);
}
.media-modal::backdrop { background: rgba(0,0,0,.72); }
.media-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: #fff;
    cursor: pointer;
    font-size: 1.4rem;
}
#media-modal-content img,
#media-modal-content video {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 110px);
    margin: auto;
    border-radius: 10px;
}
#media-modal-content video { width: 100%; background: #000; }

@media (max-width: 620px) {
    .media-thumb-wrap { flex-basis: 112px; }
    .media-thumb { width: 112px; height: 78px; }
    .event-card--compact { padding: 16px; }
}

/* Etapa 4.2 — cards de execução realmente compactos */
.event-list--compact .event-card--compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    min-height: 0;
    padding: 16px 18px;
}

.event-list--compact .event-card__main {
    min-width: 0;
}

.event-list--compact .event-card__head {
    gap: 12px;
}

.event-list--compact .event-card__head h3 {
    margin: 5px 0 6px;
    font-size: 1.06rem;
}

.event-list--compact .event-metrics--compact {
    margin-top: 9px;
    gap: 6px;
}

.event-list--compact .event-metrics--compact span {
    padding: 5px 8px;
    font-size: .72rem;
}

.event-list--compact .event-description--compact {
    margin-top: 8px;
    -webkit-line-clamp: 2;
    font-size: .78rem;
}

/* Galeria é apenas registro visual: miniaturas pequenas, em linha e sem dominar o card. */
.event-list--compact .media-strip {
    display: grid;
    grid-template-columns: repeat(4, 76px);
    gap: 7px;
    width: auto;
    max-width: 325px;
    margin: 0;
    padding: 0;
    overflow: visible;
    align-content: center;
    justify-content: end;
}

.event-list--compact .media-thumb-wrap {
    flex: none;
    width: 76px;
    min-width: 76px;
    margin: 0;
}

.event-list--compact .media-thumb {
    width: 76px !important;
    height: 58px !important;
    min-width: 76px;
    min-height: 58px;
    border-radius: 8px;
}

.event-list--compact .media-thumb img {
    width: 76px !important;
    height: 58px !important;
    max-width: 76px !important;
    max-height: 58px !important;
    object-fit: cover !important;
}

.event-list--compact .media-thumb__play {
    width: 28px;
    height: 28px;
    font-size: .72rem;
}

.event-list--compact .media-thumb--video small {
    right: 4px;
    bottom: 3px;
    font-size: .52rem;
}

/* O nome do arquivo não agrega ao resumo operacional e ocupava espaço demais. */
.event-list--compact .media-thumb__name {
    display: none;
}

/* Se houver muitas mídias, elas quebram em novas linhas mantendo o mesmo tamanho. */
@media (max-width: 900px) {
    .event-list--compact .event-card--compact {
        grid-template-columns: minmax(0, 1fr) 242px;
    }
    .event-list--compact .media-strip {
        grid-template-columns: repeat(3, 76px);
        max-width: 242px;
    }
}

@media (max-width: 700px) {
    .event-list--compact .event-card--compact {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .event-list--compact .media-strip {
        grid-template-columns: repeat(auto-fill, 70px);
        width: 100%;
        max-width: none;
        justify-content: start;
        margin-top: 8px;
    }
    .event-list--compact .media-thumb-wrap {
        width: 70px;
        min-width: 70px;
    }
    .event-list--compact .media-thumb,
    .event-list--compact .media-thumb img {
        width: 70px !important;
        height: 54px !important;
        min-width: 70px;
        max-width: 70px !important;
        min-height: 54px;
        max-height: 54px !important;
    }
}

/* Etapa 4.3 — execução dos eventos em formato de resumo gerencial */
.event-summary-list {
    display: grid;
    gap: 12px;
}

.event-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
    gap: 18px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid rgba(5,49,74,.10);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(4,41,63,.035);
}

.event-summary-card--no-media {
    grid-template-columns: 1fr;
}

.event-summary-card__content {
    min-width: 0;
}

.event-summary-card__head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.event-summary-card__head h3 {
    margin: 4px 0 6px;
    font-size: 1.05rem;
    line-height: 1.25;
}

.event-summary-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.event-summary-metrics span {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    background: #f0f4f7;
    color: var(--muted);
    font-size: .71rem;
}

.event-summary-metrics b {
    color: var(--navy);
}

.event-summary-description {
    display: -webkit-box;
    max-width: 680px;
    margin: 8px 0 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--muted);
    font-size: .78rem;
}

.event-media-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 74px) !important;
    gap: 7px !important;
    justify-content: end;
    align-content: center;
    width: auto !important;
    max-width: 320px;
    margin: 0 !important;
    padding: 0 !important;
}

.event-media-thumb {
    position: relative;
    display: grid !important;
    place-items: center;
    width: 74px !important;
    height: 56px !important;
    min-width: 74px !important;
    min-height: 56px !important;
    max-width: 74px !important;
    max-height: 56px !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid #d9e2e8;
    border-radius: 8px;
    background: #eaf0f4;
    cursor: pointer;
}

.event-media-thumb img {
    display: block !important;
    width: 74px !important;
    height: 56px !important;
    min-width: 74px !important;
    min-height: 56px !important;
    max-width: 74px !important;
    max-height: 56px !important;
    object-fit: cover !important;
}

.event-media-thumb--video {
    color: #fff;
    background: var(--navy);
}

.event-media-thumb--video span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: var(--navy);
    font-size: .72rem;
    padding-left: 2px;
}

.event-media-thumb--video small {
    position: absolute;
    right: 4px;
    bottom: 3px;
    color: rgba(255,255,255,.8);
    font-size: .5rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .event-summary-card {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .event-media-grid {
        grid-template-columns: repeat(auto-fill, 74px) !important;
        justify-content: start;
        width: 100% !important;
        max-width: none;
    }
}

@media (max-width: 620px) {
    .event-summary-card__head {
        flex-direction: column;
    }
    .event-card__actions {
        width: 100%;
    }
}
