/* Dashboard Admin Styles */

/* Header Styles */
header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.98) 0%, rgba(118, 75, 162, 0.98) 100%);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 1920px;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    font-size: 48px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    animation: pulse 2s ease-in-out infinite;
}

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

.brand-text h1 {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin: 4px 0 0 0;
    font-weight: 500;
    letter-spacing: 0.3px;
}

header nav ul {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav li {
    margin: 0;
}

header nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.nav-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.nav-text {
    position: relative;
}

header nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

header nav a:hover::before {
    transform: translateX(0);
}

header nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

header nav a:hover .nav-icon {
    transform: scale(1.15) rotate(5deg);
}

header nav a.active {
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    border-color: white;
}

header nav a.active .nav-icon {
    animation: bounce 1s ease infinite;
}

header nav a.active::before {
    display: none;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Responsive Header */
@media (max-width: 1024px) {
    header .container {
        padding: 20px 30px;
    }
    
    .brand-text h1 {
        font-size: 24px;
    }
    
    .logo-icon {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        text-align: center;
    }
    
    .header-brand {
        flex-direction: column;
        gap: 12px;
    }
    
    .brand-text h1 {
        font-size: 22px;
    }
    
    .brand-subtitle {
        font-size: 12px;
    }
    
    .logo-icon {
        font-size: 36px;
    }
    
    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    header nav a {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .nav-icon {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    header .container {
        padding: 16px;
    }
    
    .brand-text h1 {
        font-size: 20px;
    }
    
    .brand-subtitle {
        font-size: 11px;
    }
    
    header nav ul {
        width: 100%;
    }
    
    header nav li {
        flex: 1;
    }
    
    header nav a {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
        justify-content: center;
    }
}

.dashboard-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 32px;
    margin: 20px auto;
    max-width: 1920px;
    box-shadow: var(--shadow-xl);
}

/* Filtros de Período */
.period-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.25);
}

.period-btn {
    padding: 12px 28px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.period-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.period-btn.active {
    background: white;
    color: var(--primary-color);
    border-color: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Seções */
.stats-section {
    margin-bottom: 48px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    border-radius: 10px;
}

/* Grid de Estatísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
    border-left: 5px solid;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

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

.stat-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.05);
}

.stat-info {
    flex: 1;
}

.stat-info h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-600);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 32px;
    font-weight: 800;
    margin: 8px 0;
    color: var(--gray-900);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
}

/* Cores dos Cards */
.stat-primary {
    border-left-color: var(--primary-color);
}

.stat-primary .stat-icon {
    background: var(--primary-light);
    color: var(--primary-color);
}

.stat-success {
    border-left-color: var(--success-color);
}

.stat-success .stat-icon {
    background: #d1fae5;
    color: var(--success-color);
}

.stat-warning {
    border-left-color: var(--warning-color);
}

.stat-warning .stat-icon {
    background: #fef3c7;
    color: var(--warning-color);
}

.stat-info {
    border-left-color: var(--info-color);
}

.stat-info .stat-icon {
    background: #dbeafe;
    color: var(--info-color);
}

.stat-revenue {
    border-left-color: #8b5cf6;
}

.stat-revenue .stat-icon {
    background: #ede9fe;
    color: #8b5cf6;
}

.stat-received {
    border-left-color: #10b981;
}

.stat-received .stat-icon {
    background: #d1fae5;
    color: #10b981;
}

.stat-pending {
    border-left-color: #f59e0b;
}

.stat-pending .stat-icon {
    background: #fef3c7;
    color: #f59e0b;
}

.stat-commission {
    border-left-color: #ef4444;
}

.stat-commission .stat-icon {
    background: #fee2e2;
    color: #ef4444;
}

/* Estatísticas do Kanban */
.kanban-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.kanban-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.kanban-stat-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.kanban-stat-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-700);
}

.kanban-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-200);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}

.progress-fill[data-etapa="novo_lead"] {
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.progress-fill[data-etapa="contato_inicial"] {
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.progress-fill[data-etapa="qualificado"] {
    background: linear-gradient(90deg, #f472b6, #ec4899);
}

.progress-fill[data-etapa="proposta"] {
    background: linear-gradient(90deg, #34d399, #10b981);
}

.progress-fill[data-etapa="negociacao"] {
    background: linear-gradient(90deg, #a78bfa, #8b5cf6);
}

.progress-fill[data-etapa="sem_contato"] {
    background: linear-gradient(90deg, #f87171, #ef4444);
}

/* Tabela de Vendedores */
.table-container {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

.vendedores-table {
    width: 100%;
    border-collapse: collapse;
}

.vendedores-table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.vendedores-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vendedores-table th:first-child {
    border-top-left-radius: 12px;
}

.vendedores-table th:last-child {
    border-top-right-radius: 12px;
}

.vendedores-table tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

.vendedores-table tbody tr:hover {
    background: var(--gray-50);
}

.vendedores-table tbody tr:last-child {
    border-bottom: none;
}

.vendedores-table td {
    padding: 16px 20px;
    color: var(--gray-700);
}

.vendedores-table td:nth-child(3),
.vendedores-table td:nth-child(4) {
    font-weight: 700;
    color: var(--gray-900);
}

.vendedores-table .empty-state {
    text-align: center;
    color: var(--gray-400);
    padding: 40px;
    font-style: italic;
}

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

.status-badge.pago {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.pendente {
    background: #fef3c7;
    color: #92400e;
}

/* Responsivo */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .kanban-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .kanban-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .period-filters {
        flex-direction: column;
    }
    
    .period-btn {
        width: 100%;
    }
    
    .dashboard-section {
        padding: 16px;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .vendedores-table {
        font-size: 13px;
    }
    
    .vendedores-table th,
    .vendedores-table td {
        padding: 12px 8px;
    }
}

@media (max-width: 576px) {
    .kanban-stats {
        grid-template-columns: 1fr;
    }
}
