/**
 * Estilos para o Dashboard de Inscrições
 * Plugin Sevo Eventos
 */

/* Reset e Base */
/* Container removido - agora usa sevo-dashboard-wrapper do dashboard-common.css */

/* Cabeçalho */
.sevo-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sevo-dashboard-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.sevo-dashboard-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.sevo-user-welcome {
    font-size: 16px;
    color: #555;
}

.sevo-user-role {
    font-size: 12px;
    padding: 4px 8px;
    background: #3498db;
    color: white;
    border-radius: 12px;
    font-weight: 500;
}

/* Cards de Estatísticas */
.sevo-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.sevo-stat-card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sevo-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.sevo-stat-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
}

.sevo-stat-total .sevo-stat-icon { background: #e3f2fd; }
.sevo-stat-pending .sevo-stat-icon { background: #fff3e0; }
.sevo-stat-approved .sevo-stat-icon { background: #e8f5e8; }
.sevo-stat-rejected .sevo-stat-icon { background: #ffebee; }

.sevo-stat-content {
    flex: 1;
}

.sevo-stat-number {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 3px;
}

.sevo-stat-total .sevo-stat-number { color: #2196f3; }
.sevo-stat-pending .sevo-stat-number { color: #ff9800; }
.sevo-stat-approved .sevo-stat-number { color: #4caf50; }
.sevo-stat-rejected .sevo-stat-number { color: #f44336; }

.sevo-stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* Summary cards são carregados do CSS da landing page */

/* Filtros Simplificados - Estilo da Landing Page */
.sevo-dashboard-filters {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
}

.sevo-filters-single-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 2fr 1fr 1fr 0.8fr;
    gap: 12px;
    align-items: end;
    max-width: 100%;
}

.sevo-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sevo-filter-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 2px;
}

.sevo-filter-input,
.sevo-filter-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background-color: white;
    color: #374151;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sevo-filter-input:focus,
.sevo-filter-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sevo-filter-input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.sevo-filter-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    grid-column: 1 / -1;
    margin-top: 15px;
}

.sevo-filter-actions .sevo-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

/* Botão de limpar filtros com ícone */
#clear-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 8px 12px;
}

#clear-filters i.dashicons {
    font-size: 18px;
    line-height: 1;
    display: inline-block;
    width: auto;
    height: auto;
}

#clear-filters:hover {
    background: #7f8c8d !important;
    transform: scale(1.05);
}

/* Responsividade para filtros */
@media (max-width: 1024px) {
    .sevo-filters-single-row {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .sevo-dashboard-filters {
        padding: 12px;
    }
    
    .sevo-filters-single-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .sevo-filter-actions {
        grid-column: 1 / -1;
        margin-top: 15px;
        justify-content: center;
    }
    
    .sevo-filter-input,
    .sevo-filter-select {
        font-size: 13px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .sevo-filters-single-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .sevo-filter-group label {
        font-size: 12px;
    }
    
    .sevo-filter-input,
    .sevo-filter-select {
        font-size: 12px;
        padding: 5px 8px;
    }
}

/* Botões */
.sevo-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    line-height: 1;
}

.sevo-btn-primary {
    background: #3498db !important;
    color: white !important;
}

.sevo-btn-primary:hover {
    background: #2980b9 !important;
    color: white !important;
}

.sevo-btn-secondary {
    background: #95a5a6;
    color: white;
}

.sevo-btn-secondary:hover {
    background: #7f8c8d;
}

.sevo-btn-success {
    background: #27ae60;
    color: white;
}

.sevo-btn-success:hover {
    background: #229954;
}

.sevo-btn-danger {
    background: #e74c3c;
    color: white;
}

.sevo-btn-danger:hover {
    background: #c0392b;
}

.sevo-btn-warning {
    background: #f39c12;
    color: white;
}

.sevo-btn-warning:hover {
    background: #e67e22;
}

.sevo-btn-info {
    background: #3498db !important;
    color: white !important;
}

.sevo-btn-info:hover {
    background: #2980b9 !important;
    color: white !important;
}

/* === ESTILOS PARA DASHICONS EM BOTÕES === */
.sevo-btn i.dashicons,
.sevo-btn .dashicons {
    font-family: dashicons !important;
    font-size: 16px !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    text-decoration: none !important;
    vertical-align: middle !important;
    margin: 0 !important;
}

/* Garantir que dashicons apareçam para usuários normais */
.sevo-card-actions .sevo-btn i.dashicons,
.sevo-filter-actions .sevo-btn i.dashicons {
    font-family: dashicons !important;
    font-size: 16px !important;
    line-height: 1 !important;
    speak: none !important;
    font-style: normal !important;
    font-weight: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.sevo-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Ícones dos botões de ação */
.approve-btn {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.reject-btn {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.revert-btn {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
}

.view-btn {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* Ícones dos botões já estão no HTML */

/* Controles da Tabela */
.sevo-table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sevo-table-info {
    font-size: 14px;
    color: #666;
}

.sevo-table-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sevo-table-actions label {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.sevo-table-actions select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Tabela */
.sevo-table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

/* Coluna ID */
.sevo-inscricoes-table .inscricao-id {
    width: 60px;
    text-align: center;
    font-weight: 600;
    color: #666;
    font-size: 12px;
}

.sevo-inscricoes-table th[data-sort="inscricao_id"] {
    width: 60px;
    text-align: center;
}

.sevo-table-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.sevo-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tabela */
.sevo-inscricoes-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.sevo-inscricoes-table th {
    background: #f8f9fa;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
    position: relative;
}

.sevo-inscricoes-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.sevo-inscricoes-table th.sortable:hover {
    background: #e9ecef;
}

.sevo-inscricoes-table th.sortable::after {
    content: '↕';
    position: absolute;
    right: 8px;
    opacity: 0.5;
    font-size: 12px;
}

.sevo-inscricoes-table th.sort-asc::after {
    content: '↑';
    opacity: 1;
}

.sevo-inscricoes-table th.sort-desc::after {
    content: '↓';
    opacity: 1;
}

.sevo-inscricoes-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

.sevo-inscricoes-table tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-solicitada {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-aceita {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-rejeitada {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-cancelada {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* Ações */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

/* Sem Resultados */
.sevo-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.sevo-no-results p {
    margin: 0;
    font-size: 16px;
}

/* Paginação */
.sevo-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sevo-pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sevo-pagination button:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #3498db;
}

.sevo-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sevo-pagination button.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.sevo-pagination .page-info {
    margin: 0 15px;
    font-size: 14px;
    color: #666;
}

/* Modal */
/* Estilos de modal removidos - agora usando modal-unified.css */

/* Toast */
.sevo-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10001;
    max-width: 400px;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sevo-toast.success {
    border-left: 4px solid #27ae60;
}

.sevo-toast.error {
    border-left: 4px solid #e74c3c;
}

.sevo-toast.warning {
    border-left: 4px solid #f39c12;
}

.sevo-toast.info {
    border-left: 4px solid #3498db;
}

.sevo-toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.sevo-toast-icon {
    font-size: 18px;
}

.sevo-toast.success .sevo-toast-icon::before { content: '✓'; color: #27ae60; }
.sevo-toast.error .sevo-toast-icon::before { content: '✗'; color: #e74c3c; }
.sevo-toast.warning .sevo-toast-icon::before { content: '⚠'; color: #f39c12; }
.sevo-toast.info .sevo-toast-icon::before { content: 'ℹ'; color: #3498db; }

.sevo-toast-message {
    font-size: 14px;
    color: #333;
}

.sevo-toast-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sevo-toast-close:hover {
    color: #666;
}

/* Erro de Dashboard */
.sevo-dashboard-error {
    background: #fff;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #721c24;
}

.sevo-dashboard-error p {
    margin: 0 0 15px 0;
    font-size: 16px;
}

.sevo-dashboard-error a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.sevo-dashboard-error a:hover {
    text-decoration: underline;
}

/* Responsividade */
@media (max-width: 768px) {
    .sevo-dashboard-wrapper {
        padding: 10px;
    }
    
    .sevo-dashboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .sevo-dashboard-user-info {
        align-items: center;
    }
    
    .sevo-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .sevo-filters-row {
        grid-template-columns: 1fr;
    }
    
    .sevo-table-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .sevo-table-actions {
        justify-content: space-between;
    }
    
    .sevo-inscricoes-table {
        font-size: 12px;
    }
    
    .sevo-inscricoes-table th,
    .sevo-inscricoes-table td {
        padding: 8px 6px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .sevo-modal-container {
        width: 95%;
        margin: 10px;
    }
    
    .sevo-toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .sevo-dashboard-title {
        font-size: 24px;
    }
    
    .sevo-stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .sevo-inscricoes-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}