/**
 * Estilos para Sistema de Comissões
 * Página: Minhas Comissões
 */

/* ========================================
   CABEÇALHO E FILTROS
======================================== */

.comissoes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.header-title h2 {
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 700;
}

.header-title .subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-actions button {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: white;
    color: #667eea;
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Filtros */
.comissoes-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.filtro-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filtro-group label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.filtro-group select {
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filtro-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* ========================================
   TOTALIZADORES
======================================== */

.comissoes-totalizadores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.totalizador-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 5px solid #ccc;
}

.totalizador-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.totalizador-card.total-geral {
    border-left-color: #667eea;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

.totalizador-card.status-pendente {
    border-left-color: #ff9800;
    background: linear-gradient(135deg, #ff980015 0%, #f5761915 100%);
}

.totalizador-card.status-liberada {
    border-left-color: #4caf50;
    background: linear-gradient(135deg, #4caf5015 0%, #66bb6a15 100%);
}

.totalizador-card.status-paga {
    border-left-color: #2196f3;
    background: linear-gradient(135deg, #2196f315 0%, #42a5f515 100%);
}

.totalizador-card.tipo-novo {
    border-left-color: #9c27b0;
    background: linear-gradient(135deg, #9c27b015 0%, #ba68c815 100%);
}

.totalizador-card.tipo-recompra {
    border-left-color: #00bcd4;
    background: linear-gradient(135deg, #00bcd415 0%, #26c6da15 100%);
}

.totalizador-icon {
    font-size: 40px;
    line-height: 1;
}

.totalizador-info {
    flex: 1;
}

.totalizador-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.totalizador-valor {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 3px;
}

.totalizador-qtd {
    font-size: 12px;
    color: #999;
}

/* ========================================
   LISTA DE COMISSÕES
======================================== */

.comissoes-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.comissao-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border-left: 5px solid #ccc;
}

.comissao-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Cores por status */
.comissao-card.status-pendente {
    border-left-color: #ff9800;
}

.comissao-card.status-liberada {
    border-left-color: #4caf50;
}

.comissao-card.status-paga {
    border-left-color: #2196f3;
}

/* Cores por tipo */
.comissao-card.tipo-novo {
    background: linear-gradient(135deg, #fff 0%, #9c27b008 100%);
}

.comissao-card.tipo-recompra {
    background: linear-gradient(135deg, #fff 0%, #00bcd408 100%);
}

/* Cabeçalho do Card */
.comissao-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    border-bottom: 1px solid #e0e0e0;
}

.comissao-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-badge,
.tipo-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-pendente {
    background: #ff9800;
    color: white;
}

.status-badge.status-liberada {
    background: #4caf50;
    color: white;
}

.status-badge.status-paga {
    background: #2196f3;
    color: white;
}

.tipo-badge.tipo-novo {
    background: #9c27b0;
    color: white;
}

.tipo-badge.tipo-recompra {
    background: #00bcd4;
    color: white;
}

.comissao-valor-destaque {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    text-align: right;
}

/* Corpo do Card */
.comissao-body {
    padding: 20px;
}

.comissao-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comissao-info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.info-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    text-align: right;
}

/* Rodapé do Card */
.comissao-footer {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.btn-detalhes {
    flex: 1;
    padding: 10px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-detalhes:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

/* Estado Vazio */
.empty-state {
    grid-column: 1 / -1;
    padding: 60px 20px;
    text-align: center;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empty-state p {
    font-size: 18px;
    color: #999;
    margin: 0;
}

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

@media (max-width: 768px) {
    .comissoes-header {
        flex-direction: column !important;
        gap: 14px !important;
        text-align: center !important;
        padding: 16px !important;
    }
    .header-title h2 {
        font-size: 20px !important;
    }
    .header-actions {
        width: 100% !important;
        flex-direction: column !important;
    }
    .header-actions button {
        width: 100% !important;
        padding: 10px !important;
    }
    .comissoes-filtros {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .comissoes-totalizadores {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .comissoes-lista {
        grid-template-columns: 1fr !important;
    }
    .comissao-card {
        padding: 14px !important;
    }
    .comissao-header {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }
    .comissao-status {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
    .comissao-valor-destaque {
        text-align: left !important;
        font-size: 22px !important;
    }
    .comissao-footer {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .totalizador-card {
        padding: 14px !important;
    }
    .totalizador-valor {
        font-size: 20px !important;
    }
}

@media (max-width: 480px) {
    .header-title h2 {
        font-size: 22px;
    }

    .totalizador-valor {
        font-size: 20px;
    }

    .comissao-valor-destaque {
        font-size: 22px;
    }

    .comissao-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .info-value {
        text-align: left;
    }
}

/* ========================================
   ANIMAÇÕES
======================================== */

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: .25; }
}

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

.comissao-card {
    animation: slideIn 0.3s ease-out;
}

.totalizador-card {
    animation: slideIn 0.3s ease-out;
}

/* Delay progressivo para cards */
.comissao-card:nth-child(1) { animation-delay: 0s; }
.comissao-card:nth-child(2) { animation-delay: 0.05s; }
.comissao-card:nth-child(3) { animation-delay: 0.1s; }
.comissao-card:nth-child(4) { animation-delay: 0.15s; }
.comissao-card:nth-child(5) { animation-delay: 0.2s; }
.comissao-card:nth-child(6) { animation-delay: 0.25s; }
