/* === ESTATÍSTICAS GERAIS === */

.estatisticas-gerais-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.estatisticas-gerais-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(59,130,246,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Cabeçalho */
.estatisticas-header {
    text-align: center;
    margin-bottom: 60px;
}

.estatisticas-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    line-height: 1.2;
}

.highlight-text {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.estatisticas-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grid de Estatísticas */
.estatisticas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

/* Cards de Estatística */
.estatistica-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.estatistica-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
}

.estatistica-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.estatistica-card.clientes::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.estatistica-card.conversas::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

/* Ícones */
.estatistica-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.clientes .estatistica-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: #10b981;
}

.conversas .estatistica-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    color: #f59e0b;
}

/* Conteúdo */
.estatistica-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.estatistica-numero {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    font-family: 'Orbitron', monospace;
    line-height: 1;
}

.estatistica-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}

.estatistica-descricao {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.4;
}

/* Badge */
.estatistica-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clientes .estatistica-badge {
    background: linear-gradient(135deg, #10b981, #059669);
}

.conversas .estatistica-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Indicador de Atualização */
.atualizacao-indicador {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.atualizacao-texto {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

/* Responsividade */
@media (max-width: 768px) {
    .estatisticas-gerais-section {
        padding: 60px 0;
    }
    
    .estatisticas-title {
        font-size: 2.2rem;
    }
    
    .estatisticas-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .estatistica-card {
        padding: 30px 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .estatistica-icon {
        font-size: 2.5rem;
        width: 70px;
        height: 70px;
    }
    
    .estatistica-numero {
        font-size: 2rem;
    }
    
    .estatistica-badge {
        position: static;
        margin-top: 15px;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .estatisticas-title {
        font-size: 1.8rem;
    }
    
    .estatisticas-subtitle {
        font-size: 1rem;
    }
    
    .estatistica-card {
        padding: 25px 15px;
    }
    
    .estatistica-numero {
        font-size: 1.8rem;
    }
}

/* === RELÓGIO DE ECONOMIA DE TEMPO === */

.economia-tempo-section {
    margin-top: 60px;
    padding: 50px 30px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 25px;
    color: white;
    position: relative;
    overflow: hidden;
}

.economia-tempo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid-dark" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid-dark)"/></svg>');
    opacity: 0.3;
}

.economia-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.economia-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.economia-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Container do Relógio */
.relogio-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Relógio Digital */
.relogio-digital {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tempo-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tempo-grupo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tempo-numero {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Orbitron', monospace;
    color: #10b981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    min-width: 60px;
    text-align: center;
}

.tempo-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tempo-separador {
    font-size: 2rem;
    font-weight: 800;
    color: #10b981;
    opacity: 0.7;
    animation: piscar 2s infinite;
}

@keyframes piscar {
    0%, 50% { opacity: 0.7; }
    51%, 100% { opacity: 0.2; }
}

/* Informações do Relógio */
.relogio-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    border-left: 4px solid #10b981;
}

.info-icon {
    font-size: 1.5rem;
}

.info-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* Gráfico Circular */
.grafico-economia {
    display: flex;
    justify-content: center;
    align-items: center;
}

.circulo-economia {
    position: relative;
    width: 200px;
    height: 200px;
}

.circulo-economia svg {
    width: 100%;
    height: 100%;
}

.circulo-texto {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.economia-porcentagem {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Orbitron', monospace;
    color: #10b981;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.economia-legenda {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

/* Responsividade do Relógio */
@media (max-width: 1024px) {
    .relogio-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .tempo-numero {
        font-size: 2rem;
        min-width: 50px;
    }
    
    .tempo-separador {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .economia-tempo-section {
        margin-top: 40px;
        padding: 40px 20px;
    }
    
    .economia-title {
        font-size: 1.8rem;
    }
    
    .tempo-display {
        padding: 20px;
        gap: 10px;
    }
    
    .tempo-numero {
        font-size: 1.8rem;
        min-width: 45px;
    }
    
    .tempo-separador {
        font-size: 1.2rem;
    }
    
    .circulo-economia {
        width: 160px;
        height: 160px;
    }
    
    .economia-porcentagem {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .tempo-display {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .tempo-grupo {
        min-width: 80px;
    }
    
    .tempo-numero {
        font-size: 1.5rem;
    }
    
    .tempo-separador {
        display: none;
    }
    
    .info-item {
        padding: 12px 15px;
    }
    
    .info-text {
        font-size: 0.85rem;
    }
}

/* === SISTEMA DE TOAST === */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
    max-width: 320px;
}

.toast-notification {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #10b981;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    overflow: hidden;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 320px;
    min-height: 120px;
    max-height: 120px;
}

.toast-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-title {
    font-size: 13px;
    font-weight: 600;
    color: #10b981;
    flex: 1;
}

.toast-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.toast-content {
    font-size: 12px;
    line-height: 1.4;
    overflow: hidden;
}

.toast-client {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-phone {
    font-family: 'Courier New', monospace;
    color: #10b981;
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-company {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-service {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #34d399);
    width: 100%;
    transform-origin: left;
    animation: toast-progress 4s linear forwards;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Hover effect (quando o usuário passar o mouse) */
.toast-notification:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

/* Animação sutil de pulse para chamar atenção */
.toast-notification::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #10b981, #059669, #10b981);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    animation: toast-glow 3s ease-in-out infinite;
}

@keyframes toast-glow {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
}

/* Responsividade para dispositivos móveis */
@media (max-width: 480px) {
    .toast-container {
        right: 15px;
        left: 15px;
        max-width: none;
    }
    
    .toast-notification {
        padding: 14px;
        width: 100%;
        min-height: 110px;
        max-height: 110px;
    }
    
    .toast-header {
        margin-bottom: 8px;
    }
    
    .toast-title {
        font-size: 12px;
    }
    
    .toast-time {
        font-size: 10px;
    }
    
    .toast-content {
        font-size: 11px;
    }
}
