/* ============================================
   DASHBOARD - Estilos Modernos e Responsivos
   ============================================ */

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    animation: fadeIn 0.5s ease-in-out;
    /* min-height e overflow removidos para permitir scroll no container pai */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   HEADER DO DASHBOARD
   ============================================ */

.dashboard-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem 0.5rem;
}

.dashboard-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    font-size: 0.95rem;
    color: #888;
    font-weight: 400;
    margin: 0;
}

/* ============================================
   GRID DE EVENTOS
   ============================================ */

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.event-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-card:hover::before {
    opacity: 1;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
}

.event-card:focus {
    outline: 3px solid #14b8a6;
    outline-offset: 2px;
}

.event-card-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1rem;
    overflow: hidden;
}

.event-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.event-card:hover .event-card-image img {
    transform: scale(1.1);
}

.event-card-content {
    padding: 1rem;
    text-align: center;
}

.event-card-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.3rem 0;
}

.event-card-content p {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
    font-weight: 400;
}

/* ============================================
   SEPARADOR DE SEÇÕES
   ============================================ */

.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 2rem;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e2e8f0 50%, transparent 100%);
}

.divider-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    padding: 0 1rem;
    white-space: nowrap;
}

/* ============================================
   SEÇÃO DE ADMINISTRAÇÃO
   ============================================ */

.admin-section {
    margin-top: 1rem;
    padding-bottom: 2rem;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-card {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border-radius: 12px;
    padding: 1.2rem 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-card:hover::before {
    opacity: 1;
}

.admin-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

.admin-card:focus {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

.admin-icon {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.admin-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.3rem 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-card p {
    font-size: 0.8rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    line-height: 1.4;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }

    .dashboard-header h2 {
        font-size: 2rem;
    }

    .dashboard-subtitle {
        font-size: 1rem;
    }

    .event-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .admin-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .section-divider {
        margin: 3rem 0 2rem;
    }

    .divider-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .dashboard-header {
        padding: 1rem;
        margin-bottom: 2rem;
    }

    .dashboard-header h2 {
        font-size: 1.5rem;
    }

    .dashboard-subtitle {
        font-size: 0.9rem;
    }

    .event-card-image {
        height: 140px;
    }

    .event-card-content h3 {
        font-size: 1.2rem;
    }

    .event-card-content p {
        font-size: 0.85rem;
    }

    .admin-icon {
        font-size: 2.5rem;
    }

    .admin-card h3 {
        font-size: 1.1rem;
    }

    .admin-card p {
        font-size: 0.85rem;
    }
}

/* ============================================
   TEMA ESCURO
   ============================================ */

@media (prefers-color-scheme: dark) {
    .dashboard-header h2 {
        background: linear-gradient(135deg, #5eead4 0%, #06b6d4 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .dashboard-subtitle {
        color: #94a3b8;
    }

    .event-card {
        background: linear-gradient(145deg, #1e293b 0%, #334155 100%);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .event-card-image {
        background: linear-gradient(135deg, #334155 0%, #475569 100%);
    }

    .event-card-content h3 {
        color: #f1f5f9;
    }

    .event-card-content p {
        color: #94a3b8;
    }

    .divider-line {
        background: linear-gradient(90deg, transparent 0%, #334155 50%, transparent 100%);
    }

    .divider-text {
        color: #f1f5f9;
    }

    .admin-card {
        background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    }

    .event-card:hover {
        box-shadow: 0 12px 40px rgba(167, 139, 250, 0.3);
    }

    .admin-card:hover {
        box-shadow: 0 8px 30px rgba(167, 139, 250, 0.4);
    }
}

/* ============================================
   ACESSIBILIDADE
   ============================================ */

.event-card:focus-visible,
.admin-card:focus-visible {
    outline: 3px solid #14b8a6;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    .dashboard-container,
    .event-card,
    .admin-card,
    .admin-icon,
    .event-card-image img {
        animation: none;
        transition: none;
    }
}

/* ============================================
   BOTÃO FLUTUANTE - PAINEL DE CONTROLE TV
   ============================================ */

.control-panel-floating-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.control-panel-floating-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.6);
    border-color: rgba(255, 255, 255, 0.4);
}

.control-panel-floating-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.control-panel-floating-btn .control-icon {
    font-size: 24px;
    line-height: 1;
    animation: pulse 2s ease-in-out infinite;
}

.control-panel-floating-btn .control-text {
    font-size: 16px;
    letter-spacing: 0.5px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .control-panel-floating-btn {
        bottom: 20px;
        left: 20px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .control-panel-floating-btn .control-icon {
        font-size: 20px;
    }
    
    .control-panel-floating-btn .control-text {
        font-size: 14px;
    }
}

/* Acessibilidade */
.control-panel-floating-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .control-panel-floating-btn .control-icon {
        animation: none;
    }
}