/* Estilos Admin - Sistema de QR Code DigitalEDU */

.digitaledu-qrcode-admin-dashboard {
    padding: 20px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 40px;
    line-height: 1;
}

.stat-content h3 {
    margin: 0;
    font-size: 28px;
    color: #0A0A2E;
    font-weight: 600;
}

.stat-content p {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 14px;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    margin-bottom: 30px;
}

.dashboard-actions .button {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    text-align: center;
}

/* Regras específicas para botões pequenos em tabelas (não afetam dashboard) */
.wp-list-table .button,
.wp-list-table .button-small {
    width: auto !important;
    min-width: auto;
}

@media (max-width: 1400px) {
    .dashboard-actions {
        flex-wrap: wrap;
    }
    
    .dashboard-actions .button {
        flex: 1 1 calc(33.333% - 7px);
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .dashboard-actions .button {
        flex: 1 1 calc(50% - 5px);
        min-width: 150px;
    }
}

.recent-collections {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.recent-collections h2 {
    margin-top: 0;
    color: #0A0A2E;
}

.digitaledu-qrcode-admin-collections .filters-form {
    margin-bottom: 20px;
}

.collections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.collections-header h2 {
    margin: 0;
    color: #0A0A2E;
}

.status-active {
    color: #28a745;
    font-weight: 600;
}

.status-inactive {
    color: #dc3545;
    font-weight: 600;
}

.digitaledu-qrcode-admin-stats .stats-overview {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.top-sponsors,
.top-events {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.top-sponsors h2,
.top-events h2 {
    margin-top: 0;
    color: #0A0A2E;
}

/* ============================================
   MELHORIAS DE LAYOUT - FORMULÁRIOS DE FILTRO
   ============================================ */

.filters-form .form-table {
    margin-bottom: 15px;
}

.filters-form .submit {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.filters-form .submit .button {
    margin: 0;
    padding: 4px 12px;
    font-size: 12px;
    white-space: nowrap;
    min-width: auto;
    width: auto;
    flex-shrink: 0;
}

/* Estilo global para botões de fechar */
.button[onclick*="digitaleduCloseSection"],
.button[onclick*="close"],
#digitaledu-dynamic-section .button {
    padding: 4px 10px !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    min-width: auto !important;
    width: auto !important;
    flex-shrink: 0 !important;
}

/* ============================================
   MELHORIAS DE LAYOUT - TABELA DE QR CODES
   ============================================ */

.digitaledu-qrcode-admin-qrcodes .wp-list-table td:last-child {
    white-space: nowrap;
}

.digitaledu-qrcode-admin-qrcodes .wp-list-table td:last-child .button {
    display: inline-block;
    margin: 0 3px;
    vertical-align: middle;
}

/* ============================================
   MELHORIAS DE LAYOUT - TABELA DE PATROCINADORES
   ============================================ */

.digitaledu-sponsor-links-section .wp-list-table th:nth-child(5),
.digitaledu-sponsor-links-section .wp-list-table td:nth-child(5) {
    width: 120px !important;
    min-width: 120px;
    max-width: 120px;
}

.digitaledu-sponsor-links-section .wp-list-table th:last-child,
.digitaledu-sponsor-links-section .wp-list-table td:last-child {
    width: auto !important;
    min-width: 280px;
}

.digitaledu-sponsor-links-section .wp-list-table td:last-child {
    white-space: nowrap;
}

.digitaledu-sponsor-links-section .wp-list-table td:last-child .button,
.digitaledu-sponsor-links-section .wp-list-table td:last-child a.button {
    display: inline-block;
    margin: 0 3px;
    padding: 4px 8px;
    font-size: 11px;
    white-space: nowrap;
    min-width: auto;
    width: auto;
}

.digitaledu-sponsor-links-section .wp-list-table td:nth-child(5) strong {
    font-size: 14px;
    display: block;
    margin-bottom: 5px;
}

.digitaledu-sponsor-links-section .wp-list-table td:nth-child(5) button {
    font-size: 11px;
    padding: 4px 8px;
    margin-top: 5px;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .filters-form .submit {
        flex-direction: column;
        width: 40%;
    }
    
    .filters-form .submit .button {
        width: 100%;
    }
    
    .digitaledu-qrcode-admin-qrcodes .wp-list-table td:last-child .button {
        display: block;
        margin: 3px 0;
        width: 100%;
    }
    
    .digitaledu-sponsor-links-section .wp-list-table td:last-child .button,
    .digitaledu-sponsor-links-section .wp-list-table td:last-child a.button {
        display: block;
        margin: 3px 0;
        width: 100%;
    }
}