:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --accent: #2196f3;
    --accent-glow: rgba(33, 150, 243, 0.3);
    --title-color: #ffffff;
    --border-color: #333333;
    --peak-color: #4caf50;
    --valley-color: #f44336;
    --pending-color: #ff9800;
}
* {
    box-sizing: border-box;
    transition: background-color 0.3s, border-color 0.3s;
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}
h1 {
    color: var(--title-color);
    margin-bottom: 30px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.controls {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(22, 22, 22, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    margin: 0;
    max-width: 100%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
}
.controls-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.controls-inputs {
    display: flex;
    align-items: center;
    gap: 15px;
}
.dashboard-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 75px; /* Espaço para a barra fixa */
    box-sizing: border-box;
}
select {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-width: 160px;
}
select:hover {
    border-color: var(--accent);
}
select option {
    background-color: var(--card-bg);
    color: var(--text-color);
}

/* TABS SYSTEM STYLES */
.tabs-container {
    display: flex;
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 6px;
    gap: 8px;
    margin-bottom: 25px;
    box-sizing: border-box;
}
.tab-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: #aeb9ba;
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}
.tab-button i {
    transition: transform 0.25s ease;
}
.tab-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.03);
}
.tab-button:hover i {
    transform: translateY(-1px);
}
.tab-button.active {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #1976d2);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.35);
}
.tab-content {
    display: none;
    animation: tabFadeIn 0.35s ease-out;
    width: 100%;
}
.tab-content.active {
    display: block;
}
.tab-section-header {
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
    text-align: left;
    width: 100%;
}
.tab-section-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tab-section-header h2 i {
    width: 22px;
    height: 22px;
}
.tab-section-header p {
    font-size: 0.85rem;
    color: #b3b3b3;
    margin: 0;
}
.tab-section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    justify-content: center;
    box-sizing: border-box;
}
.highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    margin-bottom: 25px;
}
.highlight-card {
    background: linear-gradient(145deg, #1e1e1e, #161616);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.card-title h3 {
    margin: 0 0 15px 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #b3b3b3;
}
.split-container {
    display: flex;
    justify-content: center;
    gap: 15px;
}
.split-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.split-half .label {
    font-size: 0.7rem;
    font-weight: 800;
    margin-bottom: 4px;
}
.split-peak .label { color: var(--peak-color); }
.split-valley .label { color: var(--valley-color); }

.split-half .value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--title-color);
    line-height: 1;
}
.split-half .date {
    font-size: 0.75rem;
    color: #9e9e9e;
    margin-top: 4px;
}

.summary-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    background: linear-gradient(145deg, #1e1e1e, #161616);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    max-width: 1100px;
    margin: 10px auto 30px auto;
    width: 100%;
    gap: 20px;
}
.summary-item {
    flex: 1;
    text-align: center;
    position: relative;
}
.summary-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.1);
}
.summary-item h3 {
    margin: 0 0 8px 0;
    color: #aeb9ba;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.summary-item p {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--title-color);
}
.summary-item p.accent-val {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}
.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    flex: 1 1 calc(50% - 15px);
    min-width: 0;
    max-width: 100%;
}
.card.card-wide {
    flex: 1 1 100%;
}
.card h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--title-color);
}
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}
.footer {
    margin-top: 40px;
    font-size: 0.9rem;
    color: #aeb9ba;
    max-width: 1100px;
    width: 100%;
    margin: 40px auto;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

/* Media Queries moved to the end for correct overrides */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    h1 {
        font-size: 1.6rem;
        margin-top: 10px;
        margin-bottom: 20px;
        text-align: center;
    }
    .controls {
        position: fixed;
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
        gap: 10px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    }
    .controls-brand {
        justify-content: center;
    }
    .controls-inputs {
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }
    .controls-inputs select {
        flex: 1;
        min-width: 120px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    .dashboard-container {
        padding-top: 125px; /* Mais espaço para a barra que quebra em 2 linhas */
    }
    .tabs-container {
        flex-wrap: wrap;
        border-radius: 12px;
        gap: 4px;
        margin-bottom: 20px;
    }
    .tab-button {
        padding: 10px 8px;
        font-size: 0.8rem;
        gap: 6px;
        border-radius: 8px;
        flex: 1 1 calc(50% - 4px); /* Fica em grade 2x2 no mobile */
    }
    .tab-button i {
        width: 15px !important;
        height: 15px !important;
    }
    .dashboard {
        gap: 15px;
    }
    .card {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
    .card h2 {
        font-size: 1rem;
    }
    .highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .highlight-card {
        padding: 14px;
    }
    .split-half .value {
        font-size: 1.4rem;
    }
    .split-half .label {
        font-size: 0.65rem;
    }
    .summary-card {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    .summary-item:not(:last-child)::after {
        display: none;
    }
    .summary-item {
        border-bottom: 1px solid rgba(255,255,255,0.07);
        padding-bottom: 15px;
        width: 100%;
    }
    .summary-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    .summary-item p {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    .chart-container {
        height: 220px;
    }
}

@media (max-width: 480px) {
    .highlights {
        grid-template-columns: 1fr;
    }
    .split-half .value {
        font-size: 1.2rem;
    }
    .summary-item p {
        font-size: 1.5rem;
    }
}

.trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    line-height: 1;
}
.trend-up {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.2);
}
.trend-down {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
}
.trend-neutral {
    color: #888;
    background: rgba(136, 136, 136, 0.1);
    border: 1px solid rgba(136, 136, 136, 0.2);
}

.summary-item .trend-badge {
    margin-top: 8px;
    font-size: 0.8rem;
    padding: 4px 10px;
}

/* HEATMAP STYLES */
.heatmap-wrapper {
    overflow-x: auto;
    padding: 10px 0;
    width: 100%;
}
.heatmap-flex {
    display: flex;
    align-items: flex-start;
}
.heatmap-container {
    display: inline-grid;
    grid-template-rows: repeat(7, 12px);
    grid-auto-flow: column;
    grid-gap: 4px;
    padding-bottom: 10px;
}
.heatmap-day {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background-color: #1a1a1a;
    position: relative;
    cursor: pointer;
}
.heatmap-day:hover {
    outline: 1px solid #fff;
    z-index: 10;
}
.heatmap-day[data-level="0"] { background-color: #161b22; }
.heatmap-day[data-level="1"] { background-color: #0b2545; } /* 10% - Azul Profundo */
.heatmap-day[data-level="2"] { background-color: #134074; } /* 20% - Azul Escuro */
.heatmap-day[data-level="3"] { background-color: #0077b6; } /* 30% - Azul Médio */
.heatmap-day[data-level="4"] { background-color: #0096c7; } /* 40% - Azul Claro */
.heatmap-day[data-level="5"] { background-color: #03b5aa; } /* 50% - Verde-Água/Teal */
.heatmap-day[data-level="6"] { background-color: #06d6a0; } /* 60% - Verde Esmeralda */
.heatmap-day[data-level="7"] { background-color: #ffd166; } /* 70% - Amarelo Pastel */
.heatmap-day[data-level="8"] { background-color: #f77f00; } /* 80% - Laranja Quente */
.heatmap-day[data-level="9"] { background-color: #e63946; } /* 90% - Vermelho Vivo */
.heatmap-day[data-level="10"] { background-color: #9b2226; } /* 100% - Vermelho Rubi / Calor Extremo */

.heatmap-labels {
    display: grid;
    grid-template-rows: repeat(7, 12px);
    gap: 4px;
    font-size: 0.65rem;
    color: #b3b3b3;
    margin-right: 12px;
}
.heatmap-labels span {
    display: flex;
    align-items: center;
}
.heatmap-months {
    display: grid;
    grid-auto-flow: column;
    grid-gap: 4px; /* Mesmo gap do grid */
    font-size: 0.7rem;
    color: #b3b3b3;
    margin-bottom: 8px;
    position: relative;
    height: 20px;
}
.heatmap-months span {
    position: absolute;
    white-space: nowrap;
}
.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    color: #b3b3b3;
    margin-top: 10px;
    justify-content: flex-end;
}
.heatmap-legend-square {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.user-badges-container {
    display: flex;
    gap: 6px;
    margin-top: 5px;
}
.user-badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 1px;
    border-radius: 4px;
    cursor: help;
}
.user-badge-icon i {
    width: 8px;
    height: 8px;
}

/* PREDICTION CARD STYLES */
.prediction-card {
    background: linear-gradient(135deg, #0d47a1, #1a237e);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(33, 150, 243, 0.2);
    position: relative;
    overflow: hidden;
}
.prediction-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.prediction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
}
.ai-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
.prediction-body {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}
.prediction-main {
    flex: 1;
    min-width: 200px;
}
.prediction-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.prediction-value {
    font-size: 3.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.prediction-unit {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}
.prediction-divider {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
}
.prediction-stats {
    display: flex;
    gap: 25px;
    flex: 2;
    justify-content: space-around;
}
.p-stat {
    display: flex;
    flex-direction: column;
}
.p-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.p-val {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

@media (max-width: 768px) {
    .prediction-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .prediction-divider {
        width: 100%;
        height: 1px;
        display: block;
    }
    .prediction-stats {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }
    .prediction-value {
        font-size: 2.2rem;
    }
    .p-val {
        font-size: 0.9rem;
    }
    .prediction-stats {
        gap: 12px;
        flex-wrap: wrap;
    }
    .prediction-card {
        padding: 16px;
    }
    .p-label {
        font-size: 0.65rem;
    }
}

/* ==========================================
   Estilos de Destaque de Usuários
   ========================================== */
.user-badge-special {
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

/* Container de info do usuário */
.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
}

/* Badge do Desenvolvedor - Mauricio de Britto */
.user-badge-dev {
    background: linear-gradient(135deg, #00f7ff, #0088ff);
    color: #000;
    box-shadow: 0 0 10px rgba(0, 247, 255, 0.4);
    animation: glow-pulse 2s infinite alternate;
}

/* Efeito Glow para a linha do Ranking / Feed */
.row-highlight-dev {
    position: relative;
    background: rgba(0, 247, 255, 0.03) !important;
    border-left: 3px solid #00f7ff !important;
    box-shadow: inset 0 0 15px rgba(0, 247, 255, 0.05) !important;
}

.row-highlight-dev:hover {
    background: rgba(0, 247, 255, 0.06) !important;
}

/* Destaque por GIF animado (URL) */
.row-gif-bg {
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

.feed-row.row-gif-bg td {
    background: transparent !important;
    padding: 33px 15px !important;
}

/* Garante exibição perfeita de todas as linhas de tabela e do GIF de fundo como elemento contínuo no desktop */
@media (min-width: 601px) {
    .feed-table, .feed-table tbody, .feed-table thead {
        display: block !important;
        width: 100% !important;
    }
    
    .feed-table thead tr,
    .feed-row {
        display: grid !important;
        grid-template-columns: 80px 1.8fr 1.2fr 1fr !important;
        align-items: center !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .feed-row {
        border-radius: 12px !important;
        border: 1px solid var(--border-color) !important;
        margin-bottom: 8px !important;
    }
    
    .feed-row td, .feed-table th {
        display: block !important;
        border: none !important;
        padding: 12px 15px !important;
        box-sizing: border-box !important;
    }
}

/* Efeito Glow para Avatar */
.avatar-highlight-dev {
    border: 2px solid #00f7ff !important;
    box-shadow: 0 0 8px rgba(0, 247, 255, 0.5) !important;
    animation: glow-avatar 2s infinite alternate;
}

/* Destaque Genérico Premium */
.user-badge-generic {
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
    color: #fff;
    box-shadow: 0 0 8px rgba(255, 8, 68, 0.3);
}

.row-highlight-generic {
    position: relative;
    background: rgba(255, 8, 68, 0.02) !important;
    border-left: 3px solid #ff0844 !important;
}

.avatar-highlight-generic {
    border: 2px solid #ff0844 !important;
}

@keyframes glow-pulse {
    0% {
        box-shadow: 0 0 5px rgba(0, 247, 255, 0.4);
        filter: brightness(1);
    }
    100% {
        box-shadow: 0 0 15px rgba(0, 247, 255, 0.8);
        filter: brightness(1.2);
    }
}

@keyframes glow-avatar {
    0% {
        box-shadow: 0 0 3px rgba(0, 247, 255, 0.3);
        border-color: #0088ff;
    }
    100% {
        box-shadow: 0 0 10px rgba(0, 247, 255, 0.6);
        border-color: #00f7ff;
    }
}

/* --- Efeito Dourado Lendário (Gold) --- */
.row-highlight-gold {
    position: relative;
    background: rgba(255, 215, 0, 0.02) !important;
    border-left: 3px solid #ffd700 !important;
    box-shadow: inset 0 0 15px rgba(255, 215, 0, 0.04) !important;
}
.avatar-highlight-gold {
    border: 2px solid #ffd700 !important;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.4) !important;
    animation: gold-shine 2s infinite alternate;
}
.user-badge-gold {
    background: linear-gradient(135deg, #ffe066 0%, #f5b041 100%);
    color: #000 !important;
    font-weight: 800 !important;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.3) !important;
}
@keyframes gold-shine {
    0% {
        box-shadow: 0 0 3px rgba(255, 215, 0, 0.3);
        border-color: #f5b041;
    }
    100% {
        box-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
        border-color: #ffd700;
    }
}

/* --- Efeito Arco-Íris Cromático (Rainbow) --- */
.row-highlight-rainbow {
    position: relative;
    background: rgba(255, 255, 255, 0.01) !important;
    border-left: 3px solid #ff007f !important;
    animation: rainbow-border 6s linear infinite;
}
.avatar-highlight-rainbow {
    border: 2px solid #ff007f !important;
    animation: rainbow-glow 5s linear infinite;
}
.user-badge-rainbow {
    background: linear-gradient(90deg, #ff007f, #7f00ff, #00f7ff, #7f00ff, #ff007f);
    background-size: 200% auto !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 0 6px rgba(127, 0, 255, 0.4) !important;
    animation: rainbow-scroll 3s linear infinite;
}
@keyframes rainbow-scroll {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}
@keyframes rainbow-glow {
    0%, 100% { border-color: #ff007f; box-shadow: 0 0 8px rgba(255, 0, 127, 0.5); }
    33% { border-color: #00f7ff; box-shadow: 0 0 8px rgba(0, 247, 255, 0.5); }
    66% { border-color: #7f00ff; box-shadow: 0 0 8px rgba(127, 0, 255, 0.5); }
}
@keyframes rainbow-border {
    0%, 100% { border-left-color: #ff007f; }
    33% { border-left-color: #00f7ff; }
    66% { border-left-color: #7f00ff; }
}

/* --- Efeito Esmeralda Mística (Emerald) --- */
.row-highlight-emerald {
    position: relative;
    background: rgba(46, 204, 113, 0.02) !important;
    border-left: 3px solid #2ecc71 !important;
    box-shadow: inset 0 0 15px rgba(46, 204, 113, 0.04) !important;
}
.avatar-highlight-emerald {
    border: 2px solid #2ecc71 !important;
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.4) !important;
    animation: emerald-pulse 2s infinite alternate;
}
.user-badge-emerald {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #fff !important;
    box-shadow: 0 0 6px rgba(46, 204, 113, 0.3) !important;
}
@keyframes emerald-pulse {
    0% {
        box-shadow: 0 0 3px rgba(46, 204, 113, 0.3);
        border-color: #27ae60;
    }
    100% {
        box-shadow: 0 0 10px rgba(46, 204, 113, 0.6);
        border-color: #2ecc71;
    }
}

/* Container de info do usuário */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.user-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* Responsividade Mobile - Foto e Badges */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 600px) {
    #rankingTable thead {
        display: none;
    }

    #rankingTable, #rankingBody {
        display: block;
        width: 100%;
    }

    .ranking-row {
        display: grid !important;
        grid-template-areas: 
            "badge user time"
            "badge tags time";
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        align-items: center;
        gap: 8px 16px;
        padding: 16px;
        background-color: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 16px !important;
        margin-bottom: 12px;
        width: 100%;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .ranking-row td {
        display: block;
        padding: 0 !important;
        border: none !important;
        background: transparent !important;
    }

    /* Posição (Rank Badge) */
    .ranking-row td:nth-child(1) {
        grid-area: badge;
        justify-self: center;
    }

    /* Estudante (Foto + Info) */
    .ranking-row td:nth-child(2) {
        grid-area: user;
        align-self: end;
    }

    /* Tags (Presenças + Rota) */
    .ranking-row td:nth-child(3) {
        grid-area: tags;
        align-self: start;
    }

    .ranking-tags-container {
        display: flex;
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 6px;
        align-items: center;
    }

    /* Média Horário (Direita) */
    .ranking-row td:nth-child(4) {
        grid-area: time;
        text-align: right;
        justify-self: end;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* Transições e Animações Premium para Reatividade no Ranking (subidas/descidas) */
.ranking-row {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.4s ease;
}

.ranking-row-ascended {
    animation: pulse-ascended 1.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.ranking-row-descended {
    animation: pulse-descended 1.8s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes pulse-ascended {
    0% {
        box-shadow: inset 0 0 25px rgba(76, 175, 80, 0.35);
        background-color: rgba(76, 175, 80, 0.12) !important;
    }
    100% {
        box-shadow: inset 0 0 0px rgba(76, 175, 80, 0);
        background-color: transparent;
    }
}

@keyframes pulse-descended {
    0% {
        box-shadow: inset 0 0 25px rgba(244, 67, 54, 0.25);
        background-color: rgba(244, 67, 54, 0.08) !important;
    }
    100% {
        box-shadow: inset 0 0 0px rgba(244, 67, 54, 0);
        background-color: transparent;
    }
}

/* ==========================================================
   ALTURA DIFERENCIADA COM SELETOR FORTE PARA DESTAQUE AO GIF
   ========================================================== */

/* No Desktop (telas > 600px) */
@media (min-width: 601px) {
    tr.feed-row.row-gif-bg {
        min-height: 120px !important;
    }
    tr.feed-row.row-gif-bg td {
        padding-top: 22px !important;
        padding-bottom: 22px !important;
    }
}

/* No Mobile (telas <= 600px) */
@media (max-width: 600px) {
    tr.ranking-row.row-gif-bg {
        min-height: 90px !important;
        padding: 16px !important;
    }
    
    tr.ranking-row.row-gif-bg td,
    tr.feed-row.row-gif-bg td {
        padding: 0 !important;
    }
}

/* Animação de Rotação Suave para Carregamentos */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================
   PAINEL ADMIN - ESTILOS PREMIUM E MODERNIZAÇÃO
   ========================================================== */

/* Ajustes no contêiner das tabelas do Painel Admin */
.admin-table-container {
    background: rgba(12, 12, 12, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE e Edge antigo */
}

.admin-table-container table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.admin-table-container th {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 14px 16px !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
}

.admin-table-container td {
    padding: 14px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
    font-size: 0.85rem !important;
    color: #fff;
}

.admin-table-container tr:last-child td {
    border-bottom: none !important;
}

/* Formulários do Painel Admin */
.admin-form-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 22px !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
}

.admin-form-box h4 {
    margin: 0 0 4px 0 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Scrollbar ocultada para contêineres de tabela */
.admin-table-container::-webkit-scrollbar {
    display: none;
}

/* Espaçamento extra de segurança para a coluna de ações e o scrollbar */
.admin-table-container th:last-child,
.admin-table-container td:last-child {
    padding-right: 24px !important;
}

/* Badge Premium para Datas Ignoradas (skipDates) */
.date-badge {
    font-family: 'Inter', monospace;
    font-weight: 700;
    background: rgba(33, 150, 243, 0.08) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(33, 150, 243, 0.2) !important;
    padding: 5px 11px !important;
    border-radius: 6px;
    font-size: 0.78rem !important;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.date-badge:hover {
    background: rgba(33, 150, 243, 0.15) !important;
    border-color: rgba(33, 150, 243, 0.4) !important;
    transform: translateY(-1px);
}

/* Efeito Premium e Glow nos Inputs Administrativos */
.admin-form-box input, 
.admin-form-box select,
.card input {
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.admin-form-box input:focus, 
.admin-form-box select:focus,
.card input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.2) !important;
    background-color: rgba(0, 0, 0, 0.4) !important;
}

/* Tabela Admin - Efeito Hover nas linhas */
.admin-table-container tr {
    transition: background-color 0.15s ease;
}

.admin-table-container tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

