/* ==========================================================================
   Fase 85 — Lista única de eventos (events.cards, mock s1). Prefixo evl-.
   Reaproveita o shell canônico (classes-* de academy-classes-list.css, kpi-card.css, filter-bar.css,
   search-bar.css) e acrescenta só o que é da lista de eventos. Toda cor vem de token com par escuro.
   ========================================================================== */

.evl-shell {
    --evl-ink: #0f172a;
    --evl-muted: #64748b;
    --evl-soft: #94a3b8;
    --evl-line: rgba(15, 23, 42, .08);
    --evl-line-strong: rgba(15, 23, 42, .14);
    --evl-surface: #ffffff;
    --evl-surface-2: #f8fafc;
    --evl-surface-3: #f1f5f9;
    --evl-accent: #4f46e5;
    --evl-accent-soft: rgba(79, 70, 229, .08);
    --evl-green: #059669;
    --evl-green-soft: rgba(5, 150, 105, .1);
    --evl-amber: #b45309;
    --evl-amber-soft: rgba(217, 119, 6, .12);
    --evl-red: #dc2626;
    --evl-red-soft: rgba(220, 38, 38, .08);
    --evl-shimmer: rgba(255, 255, 255, .55);
    --evl-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);

    --evl-st-draft-ink: #475569; --evl-st-draft-bg: rgba(100, 116, 139, .12); --evl-st-draft-ring: rgba(100, 116, 139, .28);
    --evl-st-published-ink: #4338ca; --evl-st-published-bg: rgba(79, 70, 229, .09); --evl-st-published-ring: rgba(79, 70, 229, .28);
    --evl-st-registration_open-ink: #047857; --evl-st-registration_open-bg: rgba(5, 150, 105, .1); --evl-st-registration_open-ring: rgba(5, 150, 105, .28);
    --evl-st-registration_closed-ink: #b45309; --evl-st-registration_closed-bg: rgba(217, 119, 6, .12); --evl-st-registration_closed-ring: rgba(217, 119, 6, .3);
    --evl-st-finished-ink: #0e7490; --evl-st-finished-bg: rgba(8, 145, 178, .1); --evl-st-finished-ring: rgba(8, 145, 178, .28);
    --evl-st-cancelled-ink: #b91c1c; --evl-st-cancelled-bg: rgba(220, 38, 38, .08); --evl-st-cancelled-ring: rgba(220, 38, 38, .26);
}

body.dark-mode .evl-shell {
    --evl-ink: #e2e8f0;
    --evl-muted: #a3b1c6;
    --evl-soft: #7c8aa3;
    --evl-line: rgba(148, 163, 184, .16);
    --evl-line-strong: rgba(148, 163, 184, .28);
    --evl-surface: #111a2b;
    --evl-surface-2: #16213a;
    --evl-surface-3: #1b2745;
    --evl-accent: #8b93ff;
    --evl-accent-soft: rgba(139, 147, 255, .14);
    --evl-green: #34d399;
    --evl-green-soft: rgba(52, 211, 153, .14);
    --evl-amber: #fbbf24;
    --evl-amber-soft: rgba(251, 191, 36, .14);
    --evl-red: #f87171;
    --evl-red-soft: rgba(248, 113, 113, .14);
    --evl-shimmer: rgba(255, 255, 255, .06);
    --evl-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);

    --evl-st-draft-ink: #cbd5e1; --evl-st-draft-bg: rgba(148, 163, 184, .16); --evl-st-draft-ring: rgba(148, 163, 184, .34);
    --evl-st-published-ink: #a5b4fc; --evl-st-published-bg: rgba(129, 140, 248, .16); --evl-st-published-ring: rgba(129, 140, 248, .4);
    --evl-st-registration_open-ink: #6ee7b7; --evl-st-registration_open-bg: rgba(52, 211, 153, .14); --evl-st-registration_open-ring: rgba(52, 211, 153, .36);
    --evl-st-registration_closed-ink: #fcd34d; --evl-st-registration_closed-bg: rgba(251, 191, 36, .14); --evl-st-registration_closed-ring: rgba(251, 191, 36, .36);
    --evl-st-finished-ink: #67e8f9; --evl-st-finished-bg: rgba(34, 211, 238, .13); --evl-st-finished-ring: rgba(34, 211, 238, .34);
    --evl-st-cancelled-ink: #fca5a5; --evl-st-cancelled-bg: rgba(248, 113, 113, .14); --evl-st-cancelled-ring: rgba(248, 113, 113, .36);
}

/* ---------- Tema escuro do shell canônico nesta tela ---------- */
body.dark-mode .evl-shell .classes-hero,
body.dark-mode .evl-shell .classes-panel,
body.dark-mode .evl-shell .entity-card-wrap { background: var(--evl-surface); border-color: var(--evl-line); box-shadow: var(--evl-shadow); }
body.dark-mode .evl-shell .classes-hero { background: linear-gradient(135deg, #1e293b, #1b2540); }
body.dark-mode .evl-shell .classes-title,
body.dark-mode .evl-shell .classes-panel-title,
body.dark-mode .evl-shell .user-info .fw-bold { color: var(--evl-ink); }
body.dark-mode .evl-shell .classes-copy,
body.dark-mode .evl-shell .classes-panel-sub,
body.dark-mode .evl-shell .sub-text { color: var(--evl-muted); }
body.dark-mode .evl-shell .classes-panel-toolbar,
body.dark-mode .evl-shell .classes-table-wrap,
body.dark-mode .evl-shell .nk-tb-list .nk-tb-item,
body.dark-mode .evl-shell .nk-tb-list .nk-tb-head { background: var(--evl-surface); border-color: var(--evl-line); }
body.dark-mode .evl-shell .nk-tb-list .nk-tb-item:hover { background: var(--evl-surface-2); }
body.dark-mode .evl-shell .nk-tb-col { color: var(--evl-ink); border-color: var(--evl-line); }
body.dark-mode .evl-shell .btn-outline-light { color: var(--evl-muted); border-color: var(--evl-line-strong); background: transparent; }
body.dark-mode .evl-shell .card-inner { border-color: var(--evl-line); }
body.dark-mode .evl-shell .dropdown-menu { background: var(--evl-surface); border-color: var(--evl-line-strong); }
body.dark-mode .evl-shell .dropdown-menu a,
body.dark-mode .evl-shell .dropdown-menu span { color: var(--evl-ink); }
body.dark-mode .evl-shell .dropdown-menu a em { color: var(--evl-muted); }
body.dark-mode .evl-shell .pagination .page-link,
body.dark-mode .evl-shell .stylish-select { background: var(--evl-surface-2); color: var(--evl-ink); border-color: var(--evl-line-strong); }
body.dark-mode .evl-shell .pagination .active .page-link { background: var(--evl-accent); color: #0b1220; }
body.dark-mode .evl-shell .pagination-info,
body.dark-mode .evl-shell .pagination-goto { color: var(--evl-muted); }

/* ---------- Hero, aviso de leitura e KPIs ---------- */
.evl-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.evl-hero-actions .classes-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.evl-blocked { margin-top: 10px; max-width: 360px; margin-left: auto; text-align: left; font-size: 12.5px; line-height: 1.45; color: var(--evl-muted); }
.evl-blocked a { font-weight: 700; color: var(--evl-accent); }
.evl-note { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: var(--evl-accent-soft); color: var(--evl-ink); font-size: 13.5px; }
.evl-note em { color: var(--evl-accent); font-size: 18px; }

.kpi-grid.evl-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 20px; }
.kpi-grid.evl-kpis .kpi-card { padding: 16px 16px 14px; }
.kpi-grid.evl-kpis .kpi-label { font-size: 12px; line-height: 1.25; }
.kpi-grid.evl-kpis .kpi-sub { font-size: 12px; line-height: 1.3; }
.evl-kpi-skel { display: grid; align-content: start; border: 1px solid var(--evl-line); border-radius: 24px; padding: 18px; background: var(--evl-surface); min-height: 132px; }
.evl-kpi-skel .evl-skel:nth-child(1) { height: 12px; width: 60%; }
.evl-kpi-skel .evl-skel:nth-child(2) { height: 28px; width: 40%; margin-top: 12px; }
.evl-kpi-skel .evl-skel:nth-child(3) { height: 10px; width: 80%; margin-top: 12px; }

/* ---------- Barra de ferramentas ---------- */
.evl-filter-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; font-size: 11px; font-weight: 800; color: #fff; background: var(--evl-accent); }
.evl-viewtoggle { display: inline-flex; border: 1px solid var(--evl-line-strong); border-radius: 12px; overflow: hidden; }
.evl-viewtoggle button { border: 0; background: transparent; color: var(--evl-muted); width: 40px; height: 36px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.evl-viewtoggle button[aria-selected="true"] { background: var(--evl-accent-soft); color: var(--evl-accent); }
.evl-viewtoggle button:focus-visible,
.evl-link:focus-visible { outline: 2px solid var(--evl-accent); outline-offset: 2px; }
.evl-fbar-check { display: flex; gap: 8px; align-items: center; min-height: 37px; font-size: 13px; font-weight: 600; color: var(--evl-ink); cursor: pointer; }
.evl-fbar-check input { width: 18px; height: 18px; accent-color: var(--evl-accent); }

/* ---------- Selos ---------- */
.evl-badge { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.3; white-space: nowrap; border: 1px solid transparent; }
.evl-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.evl-badge--draft { color: var(--evl-st-draft-ink); background: var(--evl-st-draft-bg); border-color: var(--evl-st-draft-ring); }
.evl-badge--published { color: var(--evl-st-published-ink); background: var(--evl-st-published-bg); border-color: var(--evl-st-published-ring); }
.evl-badge--registration_open { color: var(--evl-st-registration_open-ink); background: var(--evl-st-registration_open-bg); border-color: var(--evl-st-registration_open-ring); }
.evl-badge--registration_closed { color: var(--evl-st-registration_closed-ink); background: var(--evl-st-registration_closed-bg); border-color: var(--evl-st-registration_closed-ring); }
.evl-badge--finished { color: var(--evl-st-finished-ink); background: var(--evl-st-finished-bg); border-color: var(--evl-st-finished-ring); }
.evl-badge--cancelled { color: var(--evl-st-cancelled-ink); background: var(--evl-st-cancelled-bg); border-color: var(--evl-st-cancelled-ring); }
.evl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.evl-elig { display: inline-flex; gap: 5px; align-items: center; padding: 2px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--evl-accent); background: var(--evl-accent-soft); }
.evl-elig em { font-size: 13px; }
.evl-me { display: inline-flex; gap: 4px; align-items: center; padding: 2px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--evl-green); background: var(--evl-green-soft); }

/* ---------- Célula do evento ---------- */
.evl-ev { display: flex; gap: 12px; align-items: center; min-width: 0; }
.evl-ev-text { min-width: 0; }
.evl-name { display: block; font-weight: 800; color: var(--evl-ink); line-height: 1.3; overflow-wrap: anywhere; }
.evl-sub { display: block; color: var(--evl-muted); font-size: 12.5px; margin-top: 2px; }
.evl-thumb { position: relative; flex: 0 0 auto; width: 76px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; border: 1px solid var(--evl-line); background: var(--evl-surface-3); }
.evl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.evl-thumb .evl-logo-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.evl-mono { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px; color: #fff; background: var(--evl-accent); }
.evl-thumb--lg .evl-logo-img,
.evl-thumb--lg .evl-mono { width: 54px; height: 54px; font-size: 18px; }

.evl-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.evl-chip { display: inline-flex; padding: 2px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--evl-ink); background: var(--evl-surface-3); border: 1px solid var(--evl-line); white-space: nowrap; }
.evl-date { font-weight: 700; color: var(--evl-ink); white-space: nowrap; }
.evl-date small { display: block; font-weight: 500; color: var(--evl-muted); font-size: 12px; }
.evl-place { color: var(--evl-muted); }
.evl-seats b { color: var(--evl-ink); font-weight: 800; white-space: nowrap; }
.evl-seats small { display: block; color: var(--evl-muted); font-size: 11px; }
.evl-seats-alert { display: inline-flex; gap: 4px; align-items: center; margin-top: 3px; padding: 2px 8px; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--evl-amber); background: var(--evl-amber-soft); }
.evl-seats-alert--full { color: var(--evl-red); background: var(--evl-red-soft); }
.evl-dash { color: var(--evl-muted); }

/* ---------- Visões: tabela e cards ---------- */
.evl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 16px; }
.evl-card { border: 1px solid var(--evl-line); border-radius: 18px; background: var(--evl-surface); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.evl-card .evl-thumb { width: 100%; aspect-ratio: auto; height: 112px; border: 0; border-radius: 0; border-bottom: 1px solid var(--evl-line); }
.evl-card-body { padding: 14px 16px 16px; display: grid; gap: 10px; min-width: 0; }
.evl-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.evl-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--evl-muted); font-size: 13px; }
.evl-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.evl-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--evl-line); }
.evl-badge-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.evl-link { color: var(--evl-accent); font-weight: 700; text-decoration: none; }

/* ---------- Menu de ações (dropdown; folha inferior no celular) ---------- */
.evl-menu .dropdown-menu { min-width: 250px; max-height: min(70vh, 540px); overflow-y: auto; padding: 6px 0; }
.evl-menu-group { padding: 10px 18px 4px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--evl-soft); }
.evl-menu .link-list-opt a { display: flex; gap: 10px; align-items: center; min-height: 40px; }
.evl-menu .link-list-opt a.evl-danger,
.evl-menu .link-list-opt a.evl-danger span,
.evl-menu .link-list-opt a.evl-danger em { color: var(--evl-red); }
.evl-menu-sheet-title { display: none; }

/* ---------- Estados ---------- */
.evl-state { text-align: center; padding: 56px 24px; }
.evl-state-icon { width: 64px; height: 64px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; color: var(--evl-accent); background: var(--evl-accent-soft); margin-bottom: 16px; }
.evl-state--error .evl-state-icon { color: var(--evl-red); background: var(--evl-red-soft); }
.evl-state h4 { color: var(--evl-ink); font-weight: 800; font-size: 18px; margin: 0 0 6px; }
.evl-state p { color: var(--evl-muted); max-width: 520px; margin: 0 auto 18px; }
.evl-skel { position: relative; overflow: hidden; background: var(--evl-surface-3); border-radius: 10px; }
.evl-skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--evl-shimmer), transparent); animation: evl-shimmer 1.3s infinite; }
@keyframes evl-shimmer { to { transform: translateX(100%); } }
.evl-skel-row { display: grid; grid-template-columns: 3fr 1fr 1.4fr 1.4fr 1.3fr 1.5fr 36px; gap: 18px; padding: 18px 24px; border-top: 1px solid var(--evl-line); align-items: center; }
.evl-skel-row .evl-skel { height: 14px; }
.evl-skel-row .evl-skel.is-banner { height: 44px; }
.evl-skel-cards { display: none; padding: 16px; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.evl-skel-card { border: 1px solid var(--evl-line); border-radius: 18px; overflow: hidden; background: var(--evl-surface); }
.evl-skel-card > .evl-skel { border-radius: 0; height: 120px; }
.evl-skel-card-body { padding: 14px; display: grid; gap: 10px; }
.evl-skel-card-body .evl-skel { height: 14px; }

@media (prefers-reduced-motion: reduce) {
    .evl-skel::after { animation: none; }
}

@media (max-width: 1399px) {
    .kpi-grid.evl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
    .evl-skel-row { display: none; }
    .evl-skel-cards { display: grid; }
    .evl-viewtoggle-li { display: none; }
    .evl-hero-actions { justify-content: flex-start; margin-top: 8px; }
    .evl-blocked { margin-left: 0; }
}

@media (max-width: 767px) {
    .kpi-grid.evl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .kpi-grid.evl-kpis .kpi-card { padding: 14px; }
    .evl-cards,
    .evl-skel-cards { grid-template-columns: 1fr; padding: 12px; }
    .evl-shell .search-input,
    .evl-shell .fbar-select,
    .evl-shell .stylish-select { font-size: 16px; }
    .evl-shell .fbar-select,
    .evl-shell .stylish-select { min-height: 44px; }
    .evl-shell .btn-icon,
    .evl-shell .fbar-clear,
    .evl-shell .search-clear { min-width: 44px; min-height: 44px; }
    .evl-shell .classes-btn { min-height: 44px; }
    .evl-shell .pagination .page-link { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
    .evl-hero-actions { justify-content: stretch; }
    .evl-hero-actions .classes-btn { width: 100%; justify-content: center; }
    .evl-card-foot .evl-link { min-height: 44px; display: inline-flex; align-items: center; }
    .evl-menu .dropdown-toggle { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
    .evl-menu .dropdown-menu.show {
        position: fixed !important; left: 0 !important; right: 0 !important; top: auto !important; bottom: 0 !important;
        width: 100% !important; max-height: 78vh; border-radius: 22px 22px 0 0 !important; padding: 8px 0 18px;
        transform: none !important; margin: 0 !important; z-index: 1800 !important;
        box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .5), 0 -10px 40px rgba(0, 0, 0, .25);
    }
    .evl-menu .dropdown-menu.show::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--evl-line-strong); margin: 4px auto 6px; }
    .evl-menu .link-list-opt a { min-height: 48px; padding-left: 20px; padding-right: 20px; }
    .evl-menu-sheet-title { display: block; padding: 4px 20px 2px; font-weight: 800; color: var(--evl-ink); font-size: 15px; }
}

/* ---------- Ajustes da tela real (shell com duas barras laterais) ---------- */
.evl-shell .entity-card-wrap { margin-bottom: 4px; }
.kpi-grid.evl-kpis { gap: 12px; }
.kpi-grid.evl-kpis .kpi-top { gap: 8px; }
.kpi-grid.evl-kpis .kpi-label { font-size: 11px; letter-spacing: .05em; }
.kpi-grid.evl-kpis .kpi-chip { width: 40px; height: 40px; border-radius: 13px; }
.kpi-grid.evl-kpis .kpi-chip em { font-size: 18px; }
.evl-tbl .nk-tb-col:nth-child(1) { width: 32%; }
.evl-tbl .nk-tb-col:nth-child(2) { width: 10%; }
.evl-tbl .nk-tb-col:nth-child(3) { width: 12%; }
.evl-tbl .nk-tb-col:nth-child(4) { width: 14%; }
.evl-tbl .nk-tb-col:nth-child(5) { width: 15%; }
.evl-tbl .nk-tb-col:nth-child(6) { width: 13%; }
.evl-seats small,
.evl-seats-alert { white-space: nowrap; }
.evl-shell .search-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
