/**
 * Estilos Customizados - Sistema B2B Central
 * Design inspirado na Apple: clean, espaçoso, animações suaves
 */

/* =============================================
   RESET & BASE
   ============================================= */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* =============================================
   ANIMAÇÕES
   ============================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* CORRIGIDO: elementos .animate começam visíveis e apenas transicionam */
.animate {
    opacity: 0;
    transform: translateY(20px);
    /* A animação será aplicada via JS inline, não via classes que podem ser removidas */
}

/* =============================================
   HEADER FIXO
   ============================================= */
.header-fixed {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.header-fixed.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* =============================================
   BOTÕES
   ============================================= */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    transform: translateY(-1px);
}

/* =============================================
   CARDS
   ============================================= */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-feature {
    background: white;
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.card-feature:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* =============================================
   GRADIENTES
   ============================================= */
.gradient-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

/* =============================================
   INPUTS
   ============================================= */
.input-field {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.input-field:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* =============================================
   TABS
   ============================================= */
.tab-button {
    position: relative;
    transition: all 0.3s ease;
    padding-bottom: 12px;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.tab-button.active::after,
.tab-button:hover::after {
    width: 100%;
}

/* =============================================
   CHAT (Simulador)
   ============================================= */
.chat-container {
    background: #f9fafb;
    border-radius: 20px;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.chat-input-container {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 16px;
}

/* =============================================
   PROGRESS BAR (Dashboard)
   ============================================= */
.progress-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s ease;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e5e7eb;
    z-index: -1;
}

.progress-step:first-child::before {
    display: none;
}

.progress-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 3px solid #e5e7eb;
    transition: all 0.4s ease;
    z-index: 1;
}

.progress-step.completed .progress-circle {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.progress-step.active .progress-circle {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.progress-step.locked .progress-circle {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #9ca3af;
}

/* =============================================
   MODAIS
   ============================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    animation: fadeInUp 0.4s ease;
}

/* =============================================
   UTILIDADES
   ============================================= */
.shadow-apple {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* =============================================
   ADMIN PANEL
   ============================================= */
.admin-tab {
    transition: all 0.3s ease;
}

.admin-tab.active {
    border-bottom-width: 2px;
}

/* =============================================
   RESPONSIVIDADE
   ============================================= */
@media (max-width: 768px) {
    .card-feature {
        padding: 20px;
    }
    
    .chat-messages {
        height: 300px;
    }
}
