*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --csbc-navy: #080e32;
    --csbc-blue: #1a2f9e;
    --csbc-mid: #2c47c5;
    --csbc-bright: #4060e8;
    --csbc-accent: #5b7fff;
    --csbc-light: #d0d9ff;
    --csbc-cta: #4a6bff;
    --gold: #d4a843;
    --gold-bg: #fdf5e0;
    --silver: #9badb8;
    --silver-bg: #eef2f5;
    --bronze: #b07248;
    --bronze-bg: #fceee3;
    --bg: #f3f4f7;
    --surface: #ffffff;
    --surface-raised: #fafbff;
    --border: rgba(0, 0, 40, 0.07);
    --border-subtle: rgba(0, 0, 40, 0.04);
    --border-hover: rgba(74, 107, 255, 0.3);
    --text-primary: #0f1729;
    --text-secondary: #3d4966;
    --text-muted: #8b95b3;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow-xs: 0 1px 2px rgba(0, 0, 40, 0.04), 0 1px 4px rgba(0, 0, 40, 0.03);
    --shadow-sm: 0 2px 8px rgba(0, 0, 40, 0.06), 0 1px 2px rgba(0, 0, 40, 0.04);
    --shadow-md: 0 6px 20px rgba(0, 0, 40, 0.09), 0 2px 6px rgba(0, 0, 40, 0.05);
    --shadow-lg: 0 16px 48px rgba(0, 0, 40, 0.13), 0 4px 12px rgba(0, 0, 40, 0.06);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', 'Barlow', sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── NAVBAR CSBC 2026 ── */
.site-header {
    background: rgba(20, 25, 100, 0.88);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 2px 24px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 2% 0 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity var(--transition-fast);
}
.nav-logo:hover {
    opacity: 0.85;
}
.nav-logo img {
    max-width: 175px;
    max-height: 52px;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav-menu>li {
    position: relative;
}
.nav-menu>li>a {
    display: flex;
    align-items: center;
    height: 70px;
    padding: 0 10px;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color var(--transition-fast);
    gap: 4px;
}
.nav-menu>li>a:hover {
    color: #7b8fff;
}

.nav-cta-link {
    display: inline-flex !important;
    align-items: center;
    height: auto !important;
    padding: 0 !important;
    margin-right: 6px;
}
.nav-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #3c50dc 0%, #5468e8 100%);
    color: #fff !important;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 10px rgba(60, 80, 220, 0.35);
    letter-spacing: 0.02em;
}
.nav-cta-btn:hover {
    background: linear-gradient(135deg, #4a5ee8 0%, #6074f0 100%) !important;
    box-shadow: 0 4px 18px rgba(60, 80, 220, 0.5);
    transform: translateY(-1px);
}

.nav-arrow {
    font-size: 10px;
    margin-left: 3px;
    transition: transform var(--transition-fast);
    opacity: 0.7;
}
.nav-menu>li:hover .nav-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-sub {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    background: rgba(20, 25, 100, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 3px solid #3c50dc;
    border-radius: 0 0 10px 10px;
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: 999;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}
.nav-menu>li:hover .nav-sub {
    display: block;
    animation: fadeInDown 0.22s ease;
}
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.nav-sub li a {
    display: block;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}
.nav-sub li a:hover {
    background: rgba(60, 80, 220, 0.28);
    color: #a8b8ff;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
}

@media (max-width: 900px) {
    .nav-menu {
        display: none;
    }
    .nav-toggle {
        display: block;
    }
    .nav-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(20, 25, 100, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        align-items: flex-start;
        padding: 12px 0 20px;
        box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
        gap: 0;
    }
    .nav-menu.open>li>a {
        height: auto;
        padding: 10px 20px;
        font-size: 15px;
        font-weight: 600;
    }
    .nav-sub {
        position: static;
        border-top: none;
        border-left: 3px solid #3c50dc;
        margin-left: 20px;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 0;
        box-shadow: none;
    }
    .nav-menu.open>li:hover .nav-sub,
    .nav-menu.open>li .nav-sub {
        display: none;
    }
    .nav-menu.open>li.open-sub .nav-sub {
        display: block;
    }
}

/* ── HERO BANNER ── */
.hero-banner {
    background: linear-gradient(150deg, var(--csbc-navy) 0%, var(--csbc-blue) 55%, var(--csbc-bright) 100%);
    padding: 3rem 2rem 3.5rem;
    position: relative;
    overflow: hidden;
}
/* bolha grande — estilo idêntico ao ::after dos widget headers do chat */
.hero-banner::before {
    content: '';
    position: absolute;
    top: -45%; right: -8%;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}
/* bolha menor, canto inferior esquerdo */
.hero-banner::after {
    content: '';
    position: absolute;
    bottom: -35%; left: -5%;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(180, 200, 255, 0.85);
    background: rgba(91, 127, 255, 0.12);
    border: 1px solid rgba(91, 127, 255, 0.2);
    border-radius: 100px;
    padding: 5px 14px;
    margin-bottom: 1.1rem;
}
.hero-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 4.2vw, 3rem);
    color: #fff;
    line-height: 1.06;
    letter-spacing: 0.01em;
    margin-bottom: 0.6rem;
    text-wrap: balance;
}
.hero-sub {
    font-size: 0.875rem;
    color: rgba(208, 217, 255, 0.55);
    font-weight: 400;
    font-style: italic;
    margin-bottom: 2.4rem;
    padding-bottom: 1.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    max-width: 480px;
}
.hero-stats {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}
.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-right: 2.2rem;
    margin-right: 2.2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-stat:last-child {
    border-right: none;
    margin-right: 0;
}
.hero-stat-num {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
}
.hero-stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(180, 200, 255, 0.45);
    font-weight: 500;
}

/* ── MAIN LAYOUT ── */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem;
}

/* ── TABS ── */
.tabs-bar {
    display: flex;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px;
    margin-bottom: 1.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    box-shadow: var(--shadow-xs);
}
.tabs-bar::-webkit-scrollbar {
    display: none;
}
.tab-btn {
    flex: 1;
    min-width: 130px;
    padding: 9px 16px;
    border: none;
    border-radius: 14px;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Inter', 'Barlow', sans-serif;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    position: relative;
}
.tab-btn:hover {
    background: rgba(26, 47, 158, 0.05);
    color: var(--text-secondary);
}
.tab-btn.active {
    background: linear-gradient(135deg, #1530a0 0%, #3d5fe8 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(30, 47, 158, 0.28);
    font-weight: 600;
}
.tab-icon-svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity var(--transition-fast);
}
.tab-btn.active .tab-icon-svg {
    opacity: 1;
}

/* ── PANEL ── */
.tab-panel {
    display: none;
}
.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* ── SEARCH / FILTER ── */
.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.search-box {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
}
.search-box:focus-within {
    border-color: var(--csbc-accent);
    box-shadow: 0 0 0 3px rgba(91, 127, 255, 0.12), var(--shadow-xs);
}
.search-box svg {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}
.search-box:focus-within svg {
    color: var(--csbc-accent);
}
.search-box input {
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Inter', 'Barlow', sans-serif;
    font-size: 0.875rem;
    color: var(--text-primary);
    padding: 11px 0;
    width: 100%;
}
.search-box input::placeholder {
    color: var(--text-muted);
}
.filter-select {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-family: 'Inter', 'Barlow', sans-serif;
    font-size: 0.84rem;
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}
.filter-select:focus {
    border-color: var(--csbc-accent);
    box-shadow: 0 0 0 3px rgba(91, 127, 255, 0.12), var(--shadow-xs);
}
.results-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    font-weight: 500;
    font-family: 'Inter', 'Barlow', sans-serif;
}

/* ── RANKING TABLE ── */
.ranking-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.ranking-table {
    width: 100%;
    border-collapse: collapse;
}
.ranking-table thead tr {
    background: linear-gradient(90deg, #0f1f6e 0%, #2c47c5 100%);
    border-bottom: none;
}
.ranking-table th {
    padding: 12px 18px;
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    text-align: left;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color var(--transition-fast);
    font-family: 'Inter', 'Barlow', sans-serif;
}
.ranking-table th:hover {
    color: #fff;
}
.ranking-table th.sorted {
    color: #fff;
}
.sort-arrow {
    margin-left: 4px;
    opacity: 0.4;
    font-size: 0.68rem;
    transition: opacity var(--transition-fast);
}
.ranking-table th:hover .sort-arrow {
    opacity: 1;
}
.ranking-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background var(--transition-fast);
    position: relative;
}
.ranking-table tbody tr:last-child {
    border-bottom: none;
}
.ranking-table tbody tr:hover {
    background: rgba(74, 107, 255, 0.035);
}
.ranking-table tbody tr:hover td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--csbc-mid), var(--csbc-bright));
    border-radius: 0 2px 2px 0;
}
.ranking-table tbody tr.top-1 {
    background: rgba(212, 168, 67, 0.045);
}
.ranking-table tbody tr.top-1 td:first-child::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #e4bf5a, #d4a843);
    border-radius: 0 2px 2px 0;
}
.ranking-table tbody tr.top-2 {
    background: rgba(155, 173, 184, 0.04);
}
.ranking-table tbody tr.top-2 td:first-child::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #c4d4de, #9badb8);
    border-radius: 0 2px 2px 0;
}
.ranking-table tbody tr.top-3 {
    background: rgba(176, 114, 72, 0.038);
}
.ranking-table tbody tr.top-3 td:first-child::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #c88a60, #b07248);
    border-radius: 0 2px 2px 0;
}
.ranking-table td {
    padding: 12px 18px;
    font-size: 0.9rem;
    color: var(--text-primary);
    vertical-align: middle;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-xs);
    font-weight: 700;
    font-size: 0.8rem;
    font-family: 'Inter', 'Barlow Condensed', sans-serif;
    transition: transform var(--transition-fast);
    line-height: 1;
}
.rank-badge svg {
    display: block;
    flex-shrink: 0;
}
.rank-1 {
    background: linear-gradient(135deg, #e4bf5a 0%, #d4a843 100%);
    color: #7a5800;
    box-shadow: 0 2px 6px rgba(212, 168, 67, 0.22);
}
.rank-2 {
    background: linear-gradient(135deg, #c4d4de 0%, #9badb8 100%);
    color: #37474f;
    box-shadow: 0 2px 6px rgba(155, 173, 184, 0.18);
}
.rank-3 {
    background: linear-gradient(135deg, #c88a60 0%, #b07248 100%);
    color: #4e2600;
    box-shadow: 0 2px 6px rgba(176, 114, 72, 0.18);
}
.rank-n {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-muted);
    border-radius: 7px;
    font-size: 0.78rem;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    font-family: 'Inter', 'Barlow Condensed', sans-serif;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
}
.student-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}
.student-name {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
}
.student-course {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 1px;
}

.score-cell {
    font-family: 'Inter', 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--csbc-blue);
    display: inline-flex;
    align-items: center;
    background: rgba(74,107,255,0.07);
    border: 1px solid rgba(74,107,255,0.12);
    border-radius: var(--radius-xs);
    padding: 3px 10px;
    line-height: 1;
}
.score-bar-wrap {
    width: 72px;
    height: 4px;
    background: rgba(13, 27, 94, 0.07);
    border-radius: 2px;
    margin-top: 5px;
    overflow: hidden;
}
.score-bar {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--csbc-mid) 0%, var(--csbc-bright) 100%);
}

.uni-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.activities-cell {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 5px;
}
.act-chip {
    font-size: 0.67rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(74, 107, 255, 0.08);
    color: var(--csbc-blue);
    letter-spacing: 0.02em;
    border: 1px solid rgba(74,107,255,0.12);
}

/* ── UNIVERSITY RANKING ── */
.uni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.uni-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    will-change: transform;
    box-shadow: var(--shadow-xs);
}
.uni-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 16px 0 0 16px;
    transition: width var(--transition-smooth);
}
.uni-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.uni-card:hover::before {
    width: 5px;
}
.uni-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
}
.uni-rank-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}
.uni-card:hover .uni-rank-badge {
    transform: scale(1.08);
}
.uni-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    line-height: 1.2;
}
.uni-location {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.4;
}
.uni-score-section {
    margin-bottom: 0.8rem;
}
.uni-score-big {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 2.3rem;
    color: var(--csbc-blue);
    line-height: 1;
    transition: color var(--transition-fast);
}
.uni-card:hover .uni-score-big {
    color: var(--csbc-bright);
}
.uni-score-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-top: 3px;
    font-weight: 600;
}
.uni-meta {
    display: flex;
    gap: 1.5rem;
}
.uni-meta-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.uni-meta-val {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}
.uni-meta-lbl {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}
.uni-progress {
    margin-top: 0.9rem;
    height: 6px;
    background: rgba(13, 27, 94, 0.06);
    border-radius: 3px;
    overflow: hidden;
}
.uni-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.uni-cta {
    margin-top: 1rem;
    font-size: 0.78rem;
    color: var(--csbc-cta);
    font-weight: 600;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap var(--transition-fast);
}
.uni-card:hover .uni-cta {
    gap: 8px;
}

/* ── UNI DETAIL VIEW ── */
.detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 1.5rem;
}
.back-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    font-family: 'Inter', 'Barlow', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
}
.back-btn:hover {
    background: rgba(13, 27, 94, 0.04);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}
.detail-uni-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}
.detail-uni-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
}
/* ── DETAIL LAYOUT: pódio + stats 2x2 lado a lado ── */
.detail-top-layout {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 2rem;
}
.detail-top-layout .podium-section {
    order: 1;
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
}
.detail-top-layout .podium-section .podium-stage {
    width: 100%;
    max-width: 100%;
}
.detail-stats-wrap {
    order: 2;
    flex: 0 0 auto;
    width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition-smooth), transform var(--transition-smooth), border-color var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 5px;
    min-height: 88px;
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--border-hover);
}
.stat-card-val {
    font-family: 'Inter', 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.85rem;
    color: var(--csbc-blue);
    line-height: 1;
    letter-spacing: -0.02em;
}
.stat-card-lbl {
    font-family: 'Inter', sans-serif;
    font-size: 0.63rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    line-height: 1.3;
}
@media (max-width: 760px) {
    .detail-top-layout { flex-direction: column; }
    .detail-top-layout .podium-section { order: 2; }
    .detail-stats-wrap { order: 1; width: 100%; }
}

/* ── PODIUM ── */
.podium-section {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}
.podium-stage {
    background: linear-gradient(150deg, var(--csbc-navy) 0%, var(--csbc-blue) 55%, var(--csbc-bright) 100%);
    border-radius: 22px;
    padding: 1.4rem 2rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
}
.podium-stage::before {
    content: '';
    position: absolute;
    top: -45%; right: -18%;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    pointer-events: none;
}
.podium-stage::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}
.podium-stage-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 1.2rem;
}
.podium-eyebrow {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.3rem;
}
.podium-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 0.25rem;
    position: relative;
    z-index: 1;
}
.podium-subtitle {
    font-size: 0.75rem;
    color: rgba(208, 217, 255, 0.65);
    font-style: italic;
    font-weight: 300;
}
.podium {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0;
}
.podium-step {
    flex: 1;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.podium-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 0.5rem 0.7rem;
    width: 100%;
}
.podium-crown {
    font-size: 1.1rem;
    line-height: 1;
    margin-bottom: 2px;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}
.podium-avatar {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    font-size: 0.9rem;
}
.podium-step.podium-1 .podium-avatar {
    width: 52px;
    height: 52px;
    font-size: 1.1rem;
    border: 3px solid rgba(212,168,67,0.75);
    box-shadow: 0 0 0 4px rgba(212,168,67,0.18), 0 6px 18px rgba(0,0,0,0.45);
}
.podium-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.2;
}
.podium-score {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: rgba(208, 217, 255, 0.85);
}
.podium-step.podium-1 .podium-score {
    color: var(--gold);
    font-size: 0.95rem;
}
.podium-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-fast);
}
.podium-1 .podium-block {
    background: linear-gradient(180deg, #e4bf5a 0%, #d4a843 100%);
    height: 100px;
    color: rgba(122, 88, 0, 0.5);
    box-shadow: 0 -2px 12px rgba(212, 168, 67, 0.25);
}
.podium-2 .podium-block {
    background: linear-gradient(180deg, #c4d4de 0%, #9badb8 100%);
    height: 75px;
    color: rgba(55, 71, 79, 0.4);
    box-shadow: 0 -2px 10px rgba(155, 173, 184, 0.2);
}
.podium-3 .podium-block {
    background: linear-gradient(180deg, #c88a60 0%, #b07248 100%);
    height: 55px;
    color: rgba(78, 38, 0, 0.4);
    box-shadow: 0 -2px 8px rgba(176, 114, 72, 0.2);
}

/* ── PAGINATION ── */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--surface);
    color: var(--text-secondary);
    font-family: 'Inter', 'Barlow', sans-serif;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
}
.page-btn:hover:not(:disabled):not(.active) {
    background: rgba(26,47,158,0.05);
    border-color: var(--border-hover);
    color: var(--csbc-blue);
}
.page-btn.active {
    background: linear-gradient(135deg, #1530a0 0%, #3d5fe8 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(21, 48, 160, 0.28);
    font-weight: 600;
}
.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.page-info {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 400;
    padding: 0 6px;
}
.page-btn.page-ellipsis {
    border: none;
    background: transparent;
    box-shadow: none;
    cursor: default;
    color: var(--text-muted);
}

/* ── EMPTY / NO RESULTS ── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.35;
}
.empty-state p {
    font-size: 0.9rem;
}

/* ── FOOTER ── */
.site-footer {
    background: var(--csbc-navy);
    color: rgba(180, 200, 255, 0.45);
    text-align: center;
    padding: 1.5rem;
    font-family: 'Inter', 'Barlow', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.site-footer strong {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .site-header {
        padding: 0 1rem 0 4%;
    }
    .hero-banner {
        padding: 2rem 1rem 1.5rem;
    }
    .main {
        padding: 1.25rem 1rem 3rem;
    }
    .hero-stats {
        gap: 1.25rem;
    }
    .tabs-bar {
        gap: 2px;
    }
    .tab-btn {
        min-width: 105px;
        font-size: 0.78rem;
        padding: 9px 10px;
    }
    .ranking-table th:nth-child(3),
    .ranking-table td:nth-child(3) {
        display: none;
    }
    .uni-grid {
        grid-template-columns: 1fr;
    }
    .podium-1 .podium-block {
        height: 85px;
    }
    .podium-2 .podium-block {
        height: 65px;
    }
    .podium-3 .podium-block {
        height: 48px;
    }
}

/* ── MEDAL ICON ── */
.medal {
    font-size: 1.1rem;
}
#uni-detail-panel {
    display: none;
}

/* ── HIGHLIGHT ANIMATION ── */
@keyframes highlight-row {
    0% {
        background: rgba(74, 107, 255, 0.18);
    }
    100% {
        background: transparent;
    }
}
.highlighted {
    animation: highlight-row 1.5s ease;
}

/* ══════════════════════════════════════════════
     RANKING CHANGE ANIMATIONS
  ══════════════════════════════════════════════ */
@keyframes rowSlideIn {
    from {
        opacity: 0;
        transform: translateX(-14px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.row-enter {
    animation: rowSlideIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Rank up: linha sobe com destaque verde no indicador lateral */
.rank-up {
    position: relative;
    z-index: 2;
}
.rank-up td:first-child::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #22c55e;
    border-radius: 0 2px 2px 0;
    animation: sidebarFade 2s ease forwards;
}
@keyframes sidebarFade {
    0%   { opacity: 1; }
    60%  { opacity: 1; }
    100% { opacity: 0; }
}

/* Rank down: barra lateral vermelha */
.rank-down {
    position: relative;
}
.rank-down td:first-child::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #ef4444;
    border-radius: 0 2px 2px 0;
    animation: sidebarFade 2s ease forwards;
}

.ranking-table tbody tr {
    position: relative;
    will-change: transform;
}
.flip-moving {
    animation: none !important;
}

.score-bar {
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.rank-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-family: 'Inter', sans-serif;
    font-size: 0.62rem;
    font-weight: 600;
    border-radius: 4px;
    padding: 2px 5px;
    margin-left: 5px;
    vertical-align: middle;
    animation: deltaBadgeFade 3.5s ease forwards;
    white-space: nowrap;
}
@keyframes deltaBadgeFade {
    0%   { opacity: 1; }
    65%  { opacity: 1; }
    100% { opacity: 0; transform: scale(0.8); }
}
.rank-delta.up {
    background: rgba(34, 197, 94, 0.1);
    color: #15803d;
}
.rank-delta.down {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}
.rank-delta.new {
    background: rgba(91, 127, 255, 0.1);
    color: var(--csbc-blue);
}

/* ── NEW LEADER banner ── */
#new-leader-banner {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-180px);
    z-index: 9999;
    background: linear-gradient(135deg, #d4a843 0%, #f0c855 50%, #d4a843 100%);
    color: #4a2e00;
    border-radius: 50px;
    padding: 13px 30px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 10px 38px rgba(212, 168, 67, 0.55), 0 2px 8px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.52s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.52s ease;
}
#new-leader-banner.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
#new-leader-banner.hide {
    transform: translateX(-50%) translateY(-180px);
    opacity: 0;
}
.banner-crown {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}
.banner-confetti {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9998;
    overflow: hidden;
}
.confetti-piece {
    position: absolute;
    top: -14px;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiFall linear forwards;
}
@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg) scale(0.5);
    }
}

/* ── DB health indicator dot in navbar ── */
#db-health-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
    margin-left: 10px;
    flex-shrink: 0;
    transition: background 0.4s ease, box-shadow 0.4s ease;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}
#db-health-dot.checking {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
    animation: dotBlink 0.7s ease-in-out infinite;
}
#db-health-dot.error {
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
    animation: dotBlink 1.1s ease-in-out infinite;
}
@keyframes dotBlink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

/* ── Connection toast ── */
#conn-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9990;
    border-radius: var(--radius-sm);
    padding: 11px 18px;
    font-family: 'Inter', 'Barlow', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
#conn-toast.show {
    opacity: 1;
    transform: translateY(0);
}
#conn-toast.ok {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
#conn-toast.warn {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
#conn-toast.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ── Notificações do site (disparadas pelo admin, aba "Notificações") ──
   z-index 100000: precisa ficar acima de tudo, inclusive do #chat-panel
   (z-index 9999 na prática), para que quem estiver conversando com o
   assistente também veja o aviso sem precisar fechar o chat. */
#site-notif-stack {
    position: fixed;
    top: 16px;
    right: 16px;
    left: auto;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}
.site-notif-card {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 10px 30px rgba(8, 14, 50, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--csbc-blue);
    font-family: 'Inter', 'Barlow', sans-serif;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.site-notif-card.show {
    opacity: 1;
    transform: translateX(0);
}
.site-notif-icon {
    font-size: 1.1rem;
    line-height: 1;
    margin-top: 1px;
    flex-shrink: 0;
}
.site-notif-body {
    flex: 1;
    min-width: 0;
}
.site-notif-title {
    font-weight: 800;
    font-size: 0.88rem;
    color: var(--csbc-navy);
    margin-bottom: 2px;
}
.site-notif-msg {
    font-size: 0.8rem;
    color: #3a4360;
    line-height: 1.4;
    word-wrap: break-word;
}
.site-notif-close {
    background: none;
    border: none;
    color: #9aa3bd;
    font-size: 0.9rem;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
    padding: 2px;
}
.site-notif-close:hover {
    color: #3a4360;
}
.site-notif-info    { border-left-color: var(--csbc-blue); }
.site-notif-sucesso { border-left-color: #16a34a; }
.site-notif-aviso    { border-left-color: #d97706; }
.site-notif-urgente {
    border-left-color: #dc2626;
    animation: siteNotifPulse 1.6s ease-in-out infinite;
}
@keyframes siteNotifPulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(8, 14, 50, 0.22), 0 2px 8px rgba(0,0,0,0.08); }
    50% { box-shadow: 0 10px 30px rgba(220, 38, 38, 0.35), 0 2px 8px rgba(0,0,0,0.08); }
}
@media (max-width: 480px) {
    #site-notif-stack {
        top: 10px;
        right: 10px;
        width: calc(100vw - 20px);
    }
}

/* ══════════════════════════════════════════════
     PODIUM TAB — CHAMPIONS PAGE
  ══════════════════════════════════════════════ */
.podium-page {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.champions-stage {
    background: linear-gradient(150deg, var(--csbc-navy) 0%, var(--csbc-blue) 55%, var(--csbc-bright) 100%);
    border-radius: 22px;
    padding: 3.5rem 2rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.champions-stage::before {
    content: '';
    position: absolute;
    top: -45%; right: -18%;
    width: 480px; height: 480px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    pointer-events: none;
}
.champions-stage::after {
    content: '';
    position: absolute;
    bottom: -25%; left: -8%;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}
.champions-stage-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 2.8rem;
}
.champions-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.5rem;
}
.champions-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.04em;
    line-height: 1;
    margin-bottom: 0.5rem;
    text-wrap: balance;
}
.champions-subtitle {
    font-size: 0.85rem;
    color: rgba(208, 217, 255, 0.7);
    font-style: italic;
    font-weight: 300;
}

.stage-podium {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 0;
}
.stage-slot {
    flex: 1;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.stage-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 0.75rem 1rem;
    width: 100%;
}
.stage-crown {
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 2px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
.stage-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}
.stage-slot:nth-child(2) .stage-avatar {
    width: 80px;
    height: 80px;
    font-size: 1.6rem;
    border: 4px solid rgba(212, 168, 67, 0.75);
    box-shadow: 0 0 0 6px rgba(212, 168, 67, 0.18), 0 8px 24px rgba(0, 0, 0, 0.45);
}
.stage-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.stage-slot:nth-child(2) .stage-name {
    font-size: 1.1rem;
}
.stage-uni {
    font-size: 0.8rem;
    color: rgba(208, 217, 255, 0.65);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.stage-score {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
}
.stage-slot:nth-child(2) .stage-score {
    font-size: 1.45rem;
    color: var(--gold);
}

.stage-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: 0.05em;
    border-radius: 12px 12px 0 0;
    transition: transform var(--transition-fast);
}
.stage-slot:nth-child(1) .stage-block {
    height: 90px;
    background: linear-gradient(180deg, #c4d4de 0%, #9badb8 100%);
    color: rgba(55, 71, 79, 0.5);
    box-shadow: 0 -2px 10px rgba(155, 173, 184, 0.3);
}
.stage-slot:nth-child(2) .stage-block {
    height: 130px;
    background: linear-gradient(180deg, #e4bf5a 0%, #d4a843 100%);
    color: rgba(122, 88, 0, 0.45);
    box-shadow: 0 -4px 16px rgba(212, 168, 67, 0.35);
}
.stage-slot:nth-child(3) .stage-block {
    height: 65px;
    background: linear-gradient(180deg, #c88a60 0%, #b07248 100%);
    color: rgba(78, 38, 0, 0.4);
    box-shadow: 0 -2px 8px rgba(176, 114, 72, 0.25);
}

.uni-podium-section {}
.section-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.uni-podium-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 640px) {
    .uni-podium-row {
        grid-template-columns: 1fr;
    }
}

.uni-podium-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.35rem 1.6rem;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition-smooth), transform var(--transition-smooth);
    box-shadow: var(--shadow-xs);
}
.uni-podium-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.uni-podium-card.gold-card {
    border-color: rgba(212, 168, 67, 0.4);
    background: linear-gradient(135deg, #fffdf5 0%, #fffae8 100%);
}
.uni-podium-card.silver-card {
    border-color: rgba(155, 173, 184, 0.4);
    background: linear-gradient(135deg, #fafbfc 0%, #f2f5f8 100%);
}
.uni-podium-card.bronze-card {
    border-color: rgba(176, 114, 72, 0.35);
    background: linear-gradient(135deg, #fdfaf6 0%, #f9f0e6 100%);
}
.uni-podium-card-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 16px 0 0 16px;
}
.uni-podium-card.gold-card .uni-podium-card-accent {
    background: linear-gradient(180deg, #e4bf5a, #d4a843);
}
.uni-podium-card.silver-card .uni-podium-card-accent {
    background: linear-gradient(180deg, #c4d4de, #9badb8);
}
.uni-podium-card.bronze-card .uni-podium-card-accent {
    background: linear-gradient(180deg, #c88a60, #b07248);
}

.uni-podium-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.uni-podium-medal {
    font-size: 1.6rem;
    line-height: 1;
}
.uni-podium-pos {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.uni-podium-uni-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.uni-podium-uni-full {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.9rem;
    line-height: 1.3;
}
.uni-podium-stats {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}
.uni-podium-stat {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.uni-podium-stat-val {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1;
}
.uni-podium-card.gold-card .uni-podium-stat-val:first-of-type {
    color: #b07a00;
}
.uni-podium-card.silver-card .uni-podium-stat-val:first-of-type {
    color: #52687a;
}
.uni-podium-card.bronze-card .uni-podium-stat-val:first-of-type {
    color: #8a4e20;
}
.uni-podium-stat-lbl {
    font-size: 0.74rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 500;
}

.uni-podium-students {
    display: flex;
    flex-direction: column;
    gap: 7px;
    border-top: 1px solid rgba(13, 27, 94, 0.07);
    padding-top: 0.8rem;
    margin-top: 0.1rem;
}
.uni-podium-student {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.88rem;
}
.mini-rank {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mini-rank-1 {
    background: var(--gold);
    color: #7a5800;
}
.mini-rank-2 {
    background: var(--silver);
    color: #37474f;
}
.mini-rank-3 {
    background: var(--bronze);
    color: #4e2600;
}
.uni-podium-student-name {
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.uni-podium-student-pts {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.runners-up-section {}
.runners-up-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.runners-up-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 20px;
    border-bottom: 1px solid rgba(13, 27, 94, 0.04);
    transition: background var(--transition-fast);
}
.runners-up-row:last-child {
    border-bottom: none;
}
.runners-up-row:hover {
    background: rgba(74, 107, 255, 0.03);
}
.runners-up-pos {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-muted);
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}
.runners-up-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    flex: 1;
}
.runners-up-course {
    font-size: 0.84rem;
    color: var(--text-muted);
}
.runners-up-pts {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--csbc-blue);
    white-space: nowrap;
}

@media (max-width: 640px) {
    .stage-podium {
        gap: 4px;
    }
    .stage-slot {
        max-width: 120px;
    }
    .stage-slot:nth-child(2) .stage-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    .stage-avatar {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
    .champions-stage {
        padding: 2rem 1rem 0;
    }
    .stage-block {
        font-size: 1.4rem;
    }
    .stage-slot:nth-child(1) .stage-block {
        height: 70px;
    }
    .stage-slot:nth-child(2) .stage-block {
        height: 100px;
    }
    .stage-slot:nth-child(3) .stage-block {
        height: 52px;
    }
}

/* ══════════════════════════════════════════════
     FIREBASE CONNECTION ERROR OVERLAY
  ══════════════════════════════════════════════ */
#db-error-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(240, 244, 255, 0.72);
    backdrop-filter: blur(10px) saturate(1.2);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    align-items: center;
    justify-content: center;
}
#db-error-overlay.show {
    display: flex;
    animation: dbOverlayIn 0.3s ease;
}
@keyframes dbOverlayIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
.db-error-card {
    background: #ffffff;
    border: 1px solid rgba(13, 27, 94, 0.12);
    border-radius: 22px;
    padding: 2.5rem 2.5rem 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(13, 27, 94, 0.18), 0 2px 8px rgba(13, 27, 94, 0.08);
    animation: dbCardIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes dbCardIn {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.db-error-spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto 1.4rem;
    position: relative;
}
.db-error-spinner svg {
    width: 52px;
    height: 52px;
    animation: spinRound 1.1s linear infinite;
}
@keyframes spinRound {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
.db-error-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    line-height: 1;
}
.db-error-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--csbc-navy);
    letter-spacing: 0.02em;
    margin-bottom: 0.55rem;
}
.db-error-msg {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.db-error-attempts {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1rem;
}
.db-error-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 0.5rem;
}
.db-error-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--csbc-accent);
    animation: dotPulse 1.4s ease-in-out infinite;
}
.db-error-dot:nth-child(2) {
    animation-delay: 0.22s;
}
.db-error-dot:nth-child(3) {
    animation-delay: 0.44s;
}
@keyframes dotPulse {
    0%,
    80%,
    100% {
        opacity: 0.25;
        transform: scale(0.75);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Avatar com foto real */
.avatar img,
.stage-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ── Scrollbar refinada (webkit) ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(13, 27, 94, 0.15);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 27, 94, 0.28);
}

/* ── Foco visível para acessibilidade ── */
:focus-visible {
    outline: 2px solid var(--csbc-accent);
    outline-offset: 2px;
    border-radius: 3px;
}
.search-box input:focus-visible,
.filter-select:focus-visible,
.tab-btn:focus-visible {
    outline: 2px solid var(--csbc-accent);
    outline-offset: -1px;
}

/* ══════════════════════════════════════════════
   AGENDA — MODERN CALENDAR
══════════════════════════════════════════════ */

.agenda-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── Top bar ── */
.ag-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.ag-title-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.ag-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.7rem;
    letter-spacing: 0.03em;
    color: var(--text-primary);
    line-height: 1;
}
.ag-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}
.ag-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(22,163,74,0.12) 0%, rgba(34,197,94,0.08) 100%);
    border: 1.5px solid rgba(34,197,94,0.3);
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 24px;
    padding: 6px 14px;
}
.ag-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
    animation: livePulseAg 1.6s ease-in-out infinite;
}
@keyframes livePulseAg {
    0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
    50% { box-shadow: 0 0 0 6px rgba(34,197,94,0.0); }
}

/* ── Layout: calendar side + timeline side ── */
.ag-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 860px) {
    .ag-body { grid-template-columns: 1fr; }
}

/* ── Mini calendar card ── */
.ag-cal-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 86px;
}
.ag-cal-header {
    background: linear-gradient(135deg, var(--csbc-navy) 0%, var(--csbc-blue) 100%);
    padding: 1.1rem 1.25rem 1rem;
    color: #fff;
}
.ag-cal-month {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1px;
}
.ag-cal-year {
    font-size: 0.75rem;
    color: rgba(208,217,255,0.7);
    font-weight: 500;
    letter-spacing: 0.06em;
}
.ag-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0.5rem 0.75rem 0.25rem;
    border-bottom: 1px solid var(--border);
}
.ag-cal-wd {
    text-align: center;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 4px 0;
}
.ag-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 0.5rem 0.75rem 0.9rem;
    gap: 3px;
}
.ag-cal-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: default;
    position: relative;
    transition: all var(--transition-fast);
}
.ag-cal-cell.has-event {
    cursor: pointer;
    font-weight: 700;
    color: var(--text-primary);
}
.ag-cal-cell.has-event:hover {
    background: rgba(74,107,255,0.1);
    color: var(--csbc-blue);
}
.ag-cal-cell.is-today {
    color: var(--csbc-blue);
    font-weight: 800;
}
.ag-cal-cell.is-today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--csbc-accent);
}
.ag-cal-cell.is-selected {
    background: linear-gradient(135deg, var(--csbc-blue) 0%, var(--csbc-mid) 100%);
    color: #fff !important;
    font-weight: 800;
    box-shadow: 0 3px 12px rgba(26,47,158,0.35);
}
.ag-cal-cell.is-selected::after { display: none; }
.ag-cal-cell.is-event-day:not(.is-selected):not(.is-today) {
    background: rgba(91,127,255,0.09);
    color: var(--csbc-blue);
}
.ag-cal-cell.other-month {
    color: rgba(136,146,176,0.35);
    cursor: default;
}
.ag-cal-cell.other-month:hover { background: none; }

/* Event dot indicator inside calendar cells */
.ag-cal-cell-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

/* Status legend inside cal card */
.ag-cal-legend {
    padding: 0.75rem 1.25rem 0.9rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ag-legend-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.ag-legend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background var(--transition-fast);
}
.ag-legend-row:hover { background: rgba(13,27,94,0.04); }
.ag-legend-row.filter-active {
    background: rgba(74,107,255,0.08);
}
.ag-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ag-legend-dot.s-ocorrendo { background: #22c55e; }
.ag-legend-dot.s-programado { background: var(--csbc-accent); }
.ag-legend-dot.s-finalizado { background: var(--text-muted); }
.ag-legend-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    flex: 1;
}
.ag-legend-count {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Right panel: day header + timeline ── */
.ag-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.ag-day-header {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 1rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-xs);
}
.ag-day-label {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.ag-day-num-big {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 2.8rem;
    line-height: 1;
    color: var(--csbc-blue);
}
.ag-day-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.ag-day-weekday {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
}
.ag-day-month-year {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}
.ag-day-count-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(74,107,255,0.08);
    border: 1px solid rgba(74,107,255,0.15);
    color: var(--csbc-blue);
    font-size: 0.76rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 5px 12px;
}
.ag-day-today-tag {
    background: linear-gradient(135deg, rgba(34,197,94,0.15) 0%, rgba(22,163,74,0.08) 100%);
    border: 1.5px solid rgba(34,197,94,0.3);
    color: #15803d;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 20px;
    padding: 4px 12px;
}

/* ── Nav arrows ── */
.ag-day-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ag-nav-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}
.ag-nav-btn:hover:not(:disabled) {
    border-color: var(--csbc-accent);
    color: var(--csbc-blue);
    background: rgba(74,107,255,0.06);
}
.ag-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ── Timeline ── */
.ag-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}
.ag-timeline::before {
    content: '';
    position: absolute;
    left: 55px;
    top: 8px;
    bottom: 8px;
    width: 1.5px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(13,27,94,0.12) 8%,
        rgba(13,27,94,0.12) 92%,
        transparent 100%);
    pointer-events: none;
}

.ag-event-row {
    display: flex;
    gap: 0;
    padding: 6px 0;
}

.ag-time-col {
    width: 55px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 16px;
    padding-top: 16px;
    gap: 1px;
}
.ag-t-start {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1;
}
.ag-t-end {
    font-size: 0.67rem;
    color: var(--text-muted);
    font-weight: 500;
}

.ag-node-col {
    width: 18px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 19px;
    position: relative;
}
.ag-node {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--csbc-accent);
    position: relative;
    z-index: 2;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}
.ag-node.s-ocorrendo {
    border-color: #22c55e;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.18);
    animation: nodeGlow 2s ease-in-out infinite;
}
.ag-node.s-finalizado {
    border-color: var(--text-muted);
    background: var(--text-muted);
}
.ag-node.s-programado {
    border-color: var(--csbc-accent);
    background: #fff;
}
@keyframes nodeGlow {
    0%,100% { box-shadow: 0 0 0 4px rgba(34,197,94,0.18); }
    50% { box-shadow: 0 0 0 7px rgba(34,197,94,0.06); }
}

.ag-card-col {
    flex: 1;
    min-width: 0;
    padding-left: 14px;
}

/* ── Event card ── */
.ag-card {
    border-radius: 16px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-smooth);
    box-shadow: var(--shadow-xs);
}
.ag-card:hover {
    border-color: rgba(74,107,255,0.35);
    box-shadow: var(--shadow-md);
    transform: translateX(2px);
}
.ag-card.s-ocorrendo {
    border-color: rgba(34,197,94,0.3);
    background: linear-gradient(135deg, rgba(34,197,94,0.03) 0%, #fff 40%);
}
.ag-card.s-finalizado {
    opacity: 0.75;
}
.ag-card.is-expanded {
    border-color: rgba(74,107,255,0.4);
    box-shadow: var(--shadow-md);
}
.ag-card.s-ocorrendo.is-expanded {
    border-color: rgba(34,197,94,0.45);
}

/* Colored left stripe */
.ag-card-stripe {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
}
.ag-card-inner {
    position: relative;
    padding: 0.85rem 1.1rem 0.85rem 1.2rem;
}

.ag-card-top-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.ag-card-info { flex: 1; min-width: 0; }
.ag-card-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    background: rgba(13,27,94,0.03);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition-smooth);
    margin-top: 1px;
}
.ag-card.is-expanded .ag-card-toggle {
    background: rgba(74,107,255,0.1);
    border-color: rgba(74,107,255,0.25);
    color: var(--csbc-blue);
    transform: rotate(180deg);
}

.ag-card-name {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 5px;
}
.ag-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.ag-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    padding: 3px 9px;
    white-space: nowrap;
}
.ag-chip-location {
    background: rgba(13,27,94,0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.ag-chip-count {
    background: rgba(74,107,255,0.08);
    color: var(--csbc-blue);
    border: 1px solid rgba(74,107,255,0.14);
}
.ag-chip-status {
    border: 1px solid transparent;
}
.ag-chip-status.s-ocorrendo {
    background: rgba(34,197,94,0.1);
    color: #16a34a;
    border-color: rgba(34,197,94,0.22);
}
.ag-chip-status.s-programado {
    background: rgba(74,107,255,0.08);
    color: var(--csbc-blue);
    border-color: rgba(74,107,255,0.17);
}
.ag-chip-status.s-finalizado {
    background: rgba(136,146,176,0.09);
    color: var(--text-muted);
    border-color: rgba(136,146,176,0.18);
}
.ag-chip-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: livePulseAg 1.4s ease-in-out infinite;
}

/* ── Expanded body ── */
.ag-card-body {
    display: none;
    border-top: 1.5px solid var(--border);
    padding: 0.9rem 1.1rem 1rem 1.2rem;
    animation: fadeIn 0.22s ease;
}
.ag-card.is-expanded .ag-card-body { display: block; }

.ag-atv-header {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.ag-atv-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ag-atv-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: start;
    gap: 10px;
    padding: 9px 12px;
    background: rgba(13,27,94,0.025);
    border-radius: 10px;
    border: 1px solid rgba(13,27,94,0.055);
    transition: background var(--transition-fast);
}
.ag-atv-item:hover { background: rgba(74,107,255,0.05); }

.ag-atv-time {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--csbc-blue);
    padding-top: 1px;
    white-space: nowrap;
}
.ag-atv-content { min-width: 0; }
.ag-atv-name {
    font-weight: 500;
    font-size: 0.86rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}
.ag-atv-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin-bottom: 5px;
}
.ag-atv-pts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.ag-pts-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(212,168,67,0.1);
    color: #92600a;
    border: 1px solid rgba(212,168,67,0.22);
}
.ag-atv-sala {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(13,27,94,0.05);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 4px 9px;
    white-space: nowrap;
    align-self: start;
    margin-top: 1px;
}

/* ── Empty ── */
.ag-empty {
    text-align: center;
    padding: 3.5rem 2rem;
    background: var(--surface);
    border: 1.5px dashed var(--border);
    border-radius: 20px;
}
.ag-empty-icon { font-size: 2.8rem; margin-bottom: 0.75rem; }
.ag-empty-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 3px;
}
.ag-empty-sub { font-size: 0.84rem; color: var(--text-muted); }

/* ── Responsive ── */
@media (max-width: 600px) {
    .ag-timeline::before { left: 44px; }
    .ag-time-col { width: 44px; padding-right: 10px; }
    .ag-atv-item { grid-template-columns: 1fr auto; }
    .ag-atv-time { grid-column: 1 / -1; font-size: 0.75rem; }
    .ag-day-num-big { font-size: 2.1rem; }
}
