/* =============================================================================
   AlphaAdvisor - CSS Moderno Premium
   Tema Banco Inter com design responsivo e animações avançadas
   ============================================================================= */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Tipografia Premium - Hierarquia Clara */
    --font-hero: 900;       /* Números grandes, títulos principais */
    --font-heading: 800;    /* H1, H2 */
    --font-subheading: 700; /* H3, H4 */
    --font-emphasis: 600;   /* Destaques, labels importantes */
    --font-body: 400;       /* Texto normal */
    --font-light: 300;      /* Secundário, hints */
    
    /* Tamanhos de Fonte - Ajustados para melhor legibilidade */
    --text-hero: 2.5rem;      /* 40px - números grandes */
    --text-h1: 1.75rem;        /* 28px - títulos principais */
    --text-h2: 1.375rem;      /* 22px - subtítulos */
    --text-h3: 1.125rem;     /* 18px - seções */
    --text-body: 0.9375rem;      /* 15px - corpo (melhor legibilidade) */
    --text-small: 0.8125rem; /* 13px - secundário */
    --text-tiny: 0.6875rem;   /* 11px - labels */
    
    /* Cores Banco Inter Oficiais */
    --primary-color: #F1661F;  /* Laranja Inter */
    --primary-hover: #D85A1A;  /* Laranja Inter hover */
    --primary-light: rgba(241, 102, 31, 0.15);
    --primary-dark: #C04A15;   /* Laranja Inter escuro */
    --primary-gradient: linear-gradient(135deg, #F1661F 0%, #D85A1A 100%);
    
    /* Cores secundárias Inter */
    --secondary-color: #FFFFFF;  /* Branco */
    --secondary-hover: #F5F5F5;
    --accent-color: #2C2C2C;     /* Grafite para Win/Wealth */
    --accent-hover: #1A1A1A;
    
    /* Cores Inter Win (Wealth Management) */
    --win-primary: #2C2C2C;      /* Grafite */
    --win-accent: #F1661F;       /* Laranja */
    --win-gradient: linear-gradient(135deg, #2C2C2C 0%, #F1661F 100%);
    
    /* Cores Semânticas para Status */
    --status-enviada: #3B82F6;      /* Azul - informação */
    --status-visualizada: #F59E0B;  /* Laranja - atenção */
    --status-aceita: #F1661F;       /* Laranja Inter - sucesso */
    --status-rejeitada: #EF4444;    /* Vermelho - erro */
    --status-pendente: #8B5CF6;     /* Roxo - aguardando */
    
    /* Níveis de Conversão */
    --conversao-baixa: #EF4444;      /* <15% - vermelho */
    --conversao-media: #F59E0B;      /* 15-25% - laranja */
    --conversao-boa: #F1661F;        /* 25-35% - laranja Inter */
    --conversao-excelente: #FFD700;  /* >35% - dourado */
    
    /* Tier de Features */
    --tier-basic: #6B7280;          /* Cinza - features básicas */
    --tier-pro: var(--primary-color);/* Verde - features pro */
    --tier-enterprise: #FFD700;     /* Dourado - enterprise */
    
    /* Badges */
    --badge-roi: linear-gradient(135deg, #3B82F6, #8B5CF6);
    --badge-new: linear-gradient(135deg, #8B5CF6, #EC4899);
    
    /* ===== FASE 3: TIPOGRAFIA PREMIUM ===== */
    /* Hierarquia Clara */
    --font-hero: 900;       /* Números grandes, títulos principais */
    --font-heading: 800;    /* H1, H2 */
    --font-subheading: 700; /* H3, H4 */
    --font-emphasis: 600;   /* Destaques, labels importantes */
    --font-body: 400;       /* Texto normal */
    --font-light: 300;      /* Secundário, hints */
    
    /* Tamanhos */
    --text-hero: 3rem;      /* 48px */
    --text-h1: 2rem;        /* 32px */
    --text-h2: 1.5rem;      /* 24px */
    --text-h3: 1.25rem;     /* 20px */
    --text-body: 1rem;      /* 16px */
    --text-small: 0.875rem; /* 14px */
    --text-tiny: 0.75rem;   /* 12px */
    
    /* ===== FASE 3: PALETA DE CORES SEMÂNTICAS ===== */
    /* Status de Ofertas */
    --status-enviada: #3B82F6;      /* Azul */
    --status-visualizada: #F59E0B;  /* Laranja */
    --status-aceita: #10B981;       /* Verde */
    --status-rejeitada: #EF4444;    /* Vermelho */
    --status-pendente: #8B5CF6;     /* Roxo */
    
    /* Níveis de Conversão */
    --conversao-baixa: #EF4444;      /* <15% */
    --conversao-media: #F59E0B;      /* 15-25% */
    --conversao-boa: #10B981;        /* 25-35% */
    --conversao-excelente: #FFD700;  /* >35% */
    
    /* Tier de Features */
    --tier-basic: #6B7280;
    --tier-pro: var(--primary-color);
    --tier-enterprise: #FFD700;
    
    /* Cores de fundo premium */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-card: rgba(42, 42, 42, 0.9);
    --bg-glass: rgba(42, 42, 42, 0.7);
    --bg-overlay: rgba(0, 0, 0, 0.8);
    
    /* Cores de texto - Melhor contraste */
    --text-primary: #ffffff;
    --text-secondary: #f0f0f0;
    --text-muted: #c8c8c8;
    --text-accent: #F1661F;      /* Laranja Inter para destaque */
    --text-success: #F1661F;     /* Laranja Inter para sucesso */
    --text-warning: #F59E0B;     /* Laranja/amarelo para avisos */
    --text-error: #ff5555;
    
    /* Cores de borda - Melhor contraste */
    --border-primary: #444444;
    --border-secondary: #555555;
    --border-accent: #F1661F;      /* Laranja Inter para bordas */
    --border-glass: rgba(255, 255, 255, 0.15);
    
    /* Sombras premium */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(241, 102, 31, 0.4);
    --shadow-glow-hover: 0 0 40px rgba(241, 102, 31, 0.6);
    
    /* Transições premium */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Bordas */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    
    /* Espaçamentos - Ajustados para melhor respiração visual */
    --spacing-xs: 0.375rem;   /* 6px */
    --spacing-sm: 0.625rem;   /* 10px */
    --spacing-md: 1rem;      /* 16px */
    --spacing-lg: 1.5rem;    /* 24px */
    --spacing-xl: 2rem;      /* 32px */
    --spacing-xxl: 2.5rem;   /* 40px */
    
    /* Glassmorphism */
    --glass-bg: rgba(42, 42, 42, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-backdrop: blur(20px);
}

/* Base */
body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: 
        radial-gradient(circle at 20% 80%, rgba(241, 102, 31, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(44, 44, 44, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    font-weight: 400;
}

/* Efeito de partículas no fundo com cores Banco Inter */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(241, 102, 31, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(44, 44, 44, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(241, 102, 31, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(44, 44, 44, 0.3), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Scrollbar customizada premium */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-glow);
}

/* Layout Principal */
.app-container {
    display: flex;
    height: 100vh; /* Altura fixa da viewport */
    max-width: 1600px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    backdrop-filter: var(--glass-backdrop);
}

/* Accordion System */
.accordion {
    margin: var(--spacing-md) 0;
}

.accordion-item {
    margin-bottom: var(--spacing-sm);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    background: var(--bg-card);
    overflow: hidden;
    transition: var(--transition-normal);
}

.accordion-item:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    padding: var(--spacing-md);
    background: var(--bg-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition-fast);
    user-select: none;
}

.accordion-header:hover {
    background: var(--bg-secondary);
}

.accordion-header i:first-child {
    color: var(--primary-color);
    margin-right: var(--spacing-sm);
    width: 16px;
}

.accordion-header span {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.accordion-icon {
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal) ease-out;
    background: var(--bg-card);
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    transition: max-height var(--transition-normal) ease-in;
}

.accordion-content .setting-group {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--border-primary);
}

.accordion-content .setting-group:last-child {
    border-bottom: none;
}

/* Compact Settings Actions */
.settings-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.btn-compact {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.85rem;
    border-radius: var(--border-radius-sm);
}

.btn-compact i {
    margin-right: var(--spacing-xs);
}

/* Config Section Compact */
.config-section {
    margin-bottom: var(--spacing-md);
}

/* Ocultar elementos apenas para assessor quando perfil é cliente */
.assessor-only {
    display: none !important;
}

/* Mostrar elementos apenas para assessor quando perfil é assessor */
body[data-profile="assessor"] .config-section.assessor-only {
    display: block !important;
}

body[data-profile="assessor"] .btn.assessor-only {
    display: flex !important;
}

.config-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.config-section h3 i {
    color: var(--primary-color);
    width: 14px;
}

/* Sidebar Premium */
.sidebar {
    width: 220px;
    background: 
        linear-gradient(180deg, 
            rgba(26, 26, 26, 0.95) 0%, 
            rgba(10, 10, 10, 0.95) 100%);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 100;
    backdrop-filter: var(--glass-backdrop);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 50% 0%, rgba(255, 107, 53, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-header {
    padding: 0.875rem 1rem;  /* 14px 16px */
    border-bottom: 1px solid var(--border-glass);
    text-align: center;
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
}

.sidebar-header h1 {
    font-size: 1.25rem;  /* 20px */
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;  /* 8px */
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.3);
    line-height: 1.3;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.8125rem;  /* 13px */
    margin-bottom: 0.75rem;  /* 12px */
    font-weight: 400;
    line-height: 1.4;
}

.profile-info {
    padding: 0.625rem 0.875rem;  /* 10px 14px */
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-accent);
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    overflow: hidden;
}

.profile-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.profile-info span {
    font-size: 0.8125rem;  /* 13px */
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
    line-height: 1.4;
}

/* Assessor Profile Badge */
.profile-info.assessor-profile {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    padding: var(--spacing-sm) var(--spacing-md);
}

.profile-info.assessor-profile span {
    color: #FFD700;
    font-weight: 600;
}

.profile-info.assessor-profile::after {
    content: '👑 ADMIN';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 2px 6px;
    border-radius: 6px;
    z-index: 2;
}

.sidebar-content {
    flex: 1;
    padding: 0.875rem 1rem;  /* 14px 16px */
    overflow-y: auto;
}

.config-section {
    margin-bottom: var(--spacing-md);
    background: var(--glass-bg);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    border: 1px solid var(--border-glass);
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    overflow: hidden;
}

.config-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
}

.config-section h3 {
    font-size: 0.9375rem;  /* 15px */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;  /* 12px */
    display: flex;
    align-items: center;
    gap: 0.5rem;  /* 8px */
    line-height: 1.4;
}

/* Botões Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;  /* 8px */
    padding: 0.625rem 1rem;  /* 10px 16px */
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.875rem;  /* 14px */
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--glass-backdrop);
    line-height: 1.4;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-normal);
}

.btn:hover::before {
    left: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-accent);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-hover);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-light);
    border-color: var(--border-accent);
    transform: translateY(-1px);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    backdrop-filter: var(--glass-backdrop);
}

.btn-icon:hover {
    background: var(--primary-light);
    border-color: var(--border-accent);
    transform: scale(1.05);
}

/* Form Elements Premium */
.form-select, .form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;  /* 10px 14px */
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.875rem;  /* 14px */
    transition: all var(--transition-normal);
    backdrop-filter: var(--glass-backdrop);
    line-height: 1.4;
}

.form-select:focus, .form-input:focus {
    outline: none;
    border-color: var(--border-accent);
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: translateY(-1px);
}

.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    margin-right: var(--spacing-sm);
    cursor: pointer;
}

.setting-group {
    margin-bottom: 0.625rem;  /* 10px */
    padding: 0.5rem;  /* 8px */
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-normal);
}

.setting-group:hover {
    background: rgba(255, 107, 53, 0.05);
    border-color: rgba(255, 107, 53, 0.2);
}

.setting-group label {
    display: flex;
    align-items: center;
    font-size: 0.8125rem;  /* 13px */
    color: var(--text-secondary);
    line-height: 1.4;
    cursor: pointer;
    font-weight: 500;
}

.setting-group label:first-child {
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-weight: 600;
}

/* Quick Actions Premium */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

/* Vencimentos Card Premium */
.vencimentos-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    overflow: hidden;
}

.vencimentos-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
}

.vencimentos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.vencimentos-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.vencimentos-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.vencimentos-count {
    background: var(--primary-gradient);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.btn-refresh {
    background: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-accent);
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.btn-refresh:active {
    transform: scale(0.95);
}

.vencimentos-list {
    max-height: 200px;
    overflow-y: auto;
}

.vencimento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.vencimento-item:last-child {
    border-bottom: none;
}

.vencimento-item.urgente {
    color: var(--text-warning);
    font-weight: 600;
}

.vencimento-item.proximo {
    color: var(--text-accent);
}

.vencimento-nome {
    flex: 1;
    margin-right: var(--spacing-sm);
}

.vencimento-dias {
    font-weight: 600;
    font-size: 0.8rem;
}

.vencimentos-alert {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--text-warning);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-warning);
    font-size: 0.85rem;
    font-weight: 500;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Proactive Offers Modal Premium */
.proactive-offer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.proactive-offer-content {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    max-width: 500px;
    width: 90%;
    backdrop-filter: var(--glass-backdrop);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

.proactive-offer-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    position: relative;
}

.proactive-offer-header i {
    color: var(--text-warning);
    font-size: 1.2rem;
}

.proactive-offer-header h3 {
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.close-offer-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-offer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.proactive-offer-body {
    margin-bottom: var(--spacing-lg);
}

.proactive-offer-body p {
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.vencimentos-preview {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm);
}

.vencimento-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.vencimento-preview-item:last-child {
    border-bottom: none;
}

.vencimento-preview-item span:first-child {
    color: var(--text-primary);
}

.vencimento-preview-item span:last-child {
    color: var(--text-warning);
    font-weight: 600;
}

.proactive-offer-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

.proactive-offer-actions .btn {
    min-width: 120px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Retry Button Premium */
.retry-button-container {
    display: flex;
    justify-content: center;
    margin: var(--spacing-md) 0;
    animation: fadeIn 0.3s ease-out;
}

.retry-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 176, 79, 0.3);
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 176, 79, 0.4);
}

.retry-btn:active {
    transform: translateY(0);
}

/* Modal de Vencimento */
.vencimento-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.vencimento-modal .modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: var(--glass-backdrop);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.vencimento-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-glass);
}

.vencimento-modal .modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.vencimento-modal .modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.vencimento-modal .modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.vencimento-details {
    margin-bottom: var(--spacing-lg);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-glass);
}

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

.detail-row .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-row .value {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.pedido-button-container {
    display: flex;
    justify-content: center;
    margin: var(--spacing-md) 0;
    animation: fadeIn 0.3s ease-out;
}

/* Chart.js Styles */
.message-chart {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    backdrop-filter: var(--glass-backdrop);
}

.message-chart canvas {
    max-width: 100%;
    height: auto;
}

.message-chart img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
}

/* Fila Prioritária */
.fila-prioritaria {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.cliente-item {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    backdrop-filter: var(--glass-backdrop);
    transition: all 0.2s ease;
}

.cliente-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.cliente-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.cliente-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.cliente-nome {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.cliente-score {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    width: fit-content;
}

.cliente-valor {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.cliente-motivos {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.motivo-chip {
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.cliente-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.8rem;
}

.export-pdf-container {
    display: flex;
    justify-content: center;
    margin: var(--spacing-md) 0;
    animation: fadeIn 0.3s ease-out;
}

.export-relatorio-container {
    display: flex;
    justify-content: center;
    margin: var(--spacing-md) 0;
    animation: fadeIn 0.3s ease-out;
}

.relatorio-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.retry-btn i {
    font-size: 0.8rem;
}

/* Telemetria Panel Styles */
.telemetry-panel {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    backdrop-filter: var(--glass-backdrop);
}

.telemetry-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-xs);
    transition: all var(--transition-normal);
}

.telemetry-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.telemetry-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    font-size: 0.9rem;
}

.telemetry-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.telemetry-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.telemetry-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.telemetry-actions {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
}

.telemetry-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: var(--spacing-xs) var(--spacing-sm);
}

/* Telemetria Modal Styles */
.telemetry-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.detail-section {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    backdrop-filter: var(--glass-backdrop);
}

.detail-section h4 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.detail-section h4 i {
    color: var(--primary-color);
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-xs);
    font-size: 0.9rem;
}

.detail-date {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-count {
    color: var(--text-primary);
    font-weight: 600;
}

.detail-count.high {
    color: var(--success-color);
}

.detail-count.medium {
    color: var(--warning-color);
}

.detail-count.low {
    color: var(--error-color);
}

/* Vencimento Modal Styles */
.vencimento-modal .modal-content {
    max-width: 500px;
}

.vencimento-summary {
    margin-bottom: var(--spacing-md);
}

.summary-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    backdrop-filter: var(--glass-backdrop);
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.summary-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;  /* 8px */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.75rem;  /* 12px */
    line-height: 1.4;
}

.summary-item .value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;  /* 14px */
    line-height: 1.4;
}

.summary-item .value.highlight {
    color: var(--primary-color);
    font-size: 1rem;  /* 16px */
}

.summary-item .value.urgente {
    color: var(--error-color);
    font-weight: 700;
}

.modal-header.urgente {
    background: linear-gradient(135deg, var(--error-color), #ff4757);
    color: white;
}

.modal-header.urgente h3 {
    color: white;
}

/* CTA Styles */
.cta-primary {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.cta-secondary {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.cta-close {
    display: flex;
    justify-content: center;
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Simulação Modal Styles */
.simulacao-modal .modal-content {
    max-width: 600px;
}

.simulacao-form {
    margin-bottom: var(--spacing-md);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-weight: 500;
}

.form-input, .form-select {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-xs);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 1rem;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 176, 79, 0.2);
}

/* Resultado Modal Styles */
.resultado-modal .modal-content {
    max-width: 700px;
}

.simulacao-resultado {
    margin-bottom: var(--spacing-md);
}

.antes-depois {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.coluna {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    backdrop-filter: var(--glass-backdrop);
}

.coluna h4 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.resultado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.resultado-item:last-child {
    border-bottom: none;
}

.resultado-item .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.resultado-item .value {
    color: var(--text-primary);
    font-weight: 600;
}

.diferenca {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    backdrop-filter: var(--glass-backdrop);
}

.diferenca-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
}

.diferenca-item .label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1.1rem;
}

.diferenca-item .value {
    font-size: 1.3rem;
    font-weight: 700;
}

.diferenca-item .value.positiva {
    color: var(--success-color);
}

.diferenca-item .value.negativa {
    color: var(--error-color);
}

/* Policy Warning */
.policy-warning {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid var(--warning-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-md);
}

.policy-warning i {
    color: var(--warning-color);
    font-size: 1.2rem;
}

.policy-warning span {
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.policy-warning .btn {
    margin-left: auto;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md);
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.quick-action-btn:hover {
    border-color: var(--border-accent);
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.quick-action-btn:hover::before {
    opacity: 0.1;
}

.quick-action-btn i {
    font-size: 1.4rem;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
    transition: all var(--transition-normal);
}

.quick-action-btn:hover i {
    transform: scale(1.1);
    color: var(--primary-hover);
}

.quick-action-btn span {
    position: relative;
    z-index: 1;
    font-weight: 500;
}

/* Performance Info Premium */
.performance-info {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    backdrop-filter: var(--glass-backdrop);
}

.perf-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-xs) 0;
}

.perf-item:last-child {
    margin-bottom: 0;
}

.perf-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.perf-value {
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main Content Premium */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    position: relative;
    min-height: 0; /* Permitir que o flex funcione corretamente */
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(255, 140, 66, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* AlphaAdvisor Brand Logo */
.xp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.xp-logo {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

.xp-logo i {
    color: white;
    font-size: 18px;
    font-weight: 600;
}

.xp-title h2 {
    margin: 0;
    font-size: 1.375rem;  /* 22px */
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.xp-title p {
    margin: 2px 0 0 0;
    font-size: 0.8125rem;  /* 13px */
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.4;
}

@keyframes pulse-glow {
    0% {
        box-shadow: var(--shadow-glow);
    }
    100% {
        box-shadow: var(--shadow-glow-hover);
    }
}

/* AlphaAdvisor Brand Logo Sidebar */
.xp-brand-sidebar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: var(--spacing-sm);
}

.xp-logo-sidebar {
    width: 35px;
    height: 35px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

.xp-logo-sidebar i {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

.xp-title-sidebar h1 {
    margin: 0;
    font-size: 1.125rem;  /* 18px */
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.xp-title-sidebar .subtitle {
    margin: 4px 0 0 0;
    font-size: 0.75rem;  /* 12px */
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.4;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;  /* 16px 24px */
    border-bottom: 1px solid var(--border-glass);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    z-index: 10;
}

.header-info h2 {
    font-size: 1.375rem;  /* 22px */
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    line-height: 1.3;
}

.header-info p {
    color: var(--text-muted);
    font-size: 0.8125rem;  /* 13px */
    line-height: 1.4;
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Chat Container Premium */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    height: calc(100vh - 120px); /* Garantir altura fixa */
}

.chat-messages {
    flex: 1;
    padding: 1.25rem 1.5rem;  /* 20px 24px */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;  /* 16px */
    position: relative;
    min-height: 0; /* Permitir que o flex funcione corretamente */
}

/* Chat Messages Premium */
.message {
    display: flex;
    gap: var(--spacing-md);
    max-width: 85%;
    animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message.assistant {
    align-self: flex-start;
}

.message-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.message.user .message-avatar {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
}

.message.assistant .message-avatar {
    background: var(--glass-bg);
    border: 2px solid var(--border-glass);
    color: var(--primary-color);
    backdrop-filter: var(--glass-backdrop);
}

.message-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.message:hover .message-avatar::before {
    opacity: 1;
}

.message-content {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 0.875rem 1rem;  /* 14px 16px */
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.message:hover .message-content::before {
    opacity: 1;
}

.message.user .message-content {
    background: var(--primary-light);
    border-color: var(--border-accent);
}

.message-text {
    color: var(--text-primary);
    font-size: 0.9375rem;  /* 15px */
    line-height: 1.6;
    margin-bottom: 0.625rem;  /* 10px */
    position: relative;
    z-index: 1;
}

.message-text:last-child {
    margin-bottom: 0;
}

.message-time {
    font-size: 0.6875rem;  /* 11px */
    color: var(--text-muted);
    margin-top: 0.375rem;  /* 6px */
    opacity: 0.7;
}

/* Typing Indicator */
.typing-indicator {
    padding: var(--spacing-sm) 0;
    animation: fadeIn 0.3s ease-in;
}

.typing-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--spacing-sm);
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary-gradient);
    border-radius: 50%;
    animation: typingDot 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Charts Premium */
.message-chart {
    margin-top: var(--spacing-md);
    border-radius: var(--border-radius-sm);
    overflow: visible;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-glass);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    padding: var(--spacing-md);
    min-height: 250px;
    transition: all var(--transition-normal);
}

.message-chart img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--border-radius-sm);
}

/* Chart Controls */
.chart-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: var(--spacing-sm);
    gap: var(--spacing-xs);
}

.chart-control-buttons {
    display: flex;
    gap: var(--spacing-xs);
}

.btn-chart-control {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    padding: 8px 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 0.9rem;
    backdrop-filter: var(--glass-backdrop);
}

.btn-chart-control:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-chart-control:active {
    transform: translateY(0);
}

/* Chart Fullscreen Modal */
.chart-fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

.chart-fullscreen-content {
    width: 90%;
    height: 90%;
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    display: flex;
    flex-direction: column;
}

.close-fullscreen-btn {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.close-fullscreen-btn:hover {
    background: var(--text-error);
    color: white;
    border-color: var(--text-error);
    transform: scale(1.1);
}

.chart-fullscreen-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.chart-fullscreen-container .message-chart {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

/* Typing Indicator Premium */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--glass-bg);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-glass);
    backdrop-filter: var(--glass-backdrop);
    margin: 0 var(--spacing-lg);
    max-width: 200px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }

/* Chat Input Premium */
.chat-input-container {
    padding: 1rem 1.25rem;  /* 16px 20px */
    border-top: 1px solid var(--border-glass);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-backdrop);
    position: sticky;
    bottom: 0;
    z-index: 10;
    flex-shrink: 0; /* Não permitir que o input seja comprimido */
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 0.625rem;  /* 10px */
    background: var(--glass-bg);
    border: 2px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 0.75rem;  /* 12px */
    transition: all var(--transition-normal);
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    overflow: hidden;
}

.chat-input-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.chat-input-wrapper:focus-within {
    border-color: var(--border-accent);
    box-shadow: 0 0 0 4px var(--primary-light);
    transform: translateY(-2px);
}

.chat-input-wrapper:focus-within::before {
    opacity: 0.05;
}

.chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;  /* 15px */
    line-height: 1.5;
    resize: none;
    outline: none;
    min-height: 24px;
    max-height: 120px;
    position: relative;
    z-index: 1;
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.send-btn {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-md);
}

.send-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.send-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.input-footer {
    margin-top: var(--spacing-sm);
    text-align: center;
}

.input-hint {
    font-size: 0.6875rem;  /* 11px */
    color: var(--text-muted);
    opacity: 0.8;
    line-height: 1.4;
    margin-top: 0.5rem;  /* 8px */
}

/* Modal Premium */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
    animation: modalFadeIn 0.3s ease;
}

.modal-content {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    backdrop-filter: var(--glass-backdrop);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

.modal-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.profile-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.profile-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
    background: var(--glass-bg);
    border: 2px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    overflow: hidden;
}

.profile-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.profile-btn:hover {
    border-color: var(--border-accent);
    background: var(--primary-light);
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.profile-btn:hover::before {
    opacity: 0.1;
}

.profile-btn i {
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
    z-index: 1;
    transition: all var(--transition-normal);
}

.profile-btn:hover i {
    transform: scale(1.1);
    color: var(--primary-hover);
}

.profile-btn span {
    font-weight: 600;
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
}

.profile-btn small {
    font-size: 0.85rem;
    text-align: center;
    line-height: 1.5;
    opacity: 0.85;
}

/* Premium Badge for Assessor */
.profile-btn-premium {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 165, 0, 0.05) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.profile-btn-premium:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.15) 100%);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.3);
}

.premium-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

.premium-badge i {
    font-size: 0.8rem;
    color: #000;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(255, 215, 0, 0.6);
    }
}

.profile-btn-premium small strong {
    color: #00ff88;
    font-weight: 700;
}

/* Admin Sections in Sidebar */
.admin-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.03) 0%, rgba(255, 165, 0, 0.03) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.section-header-premium {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;  /* 8px */
}

.section-header-premium h3 {
    margin: 0;
    font-size: 0.9375rem;  /* 15px */
    display: flex;
    align-items: center;
    gap: 0.5rem;  /* 8px */
    line-height: 1.4;
}

.admin-badge-small {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 4px 8px;  /* Ajustado */
    border-radius: 6px;
    font-size: 0.6875rem;  /* 11px */
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.3);
}

.admin-badge-small i {
    font-size: 0.7rem;
}

.section-description {
    font-size: 0.75rem;  /* 12px */
    color: rgba(255, 255, 255, 0.6);
    margin: 0.375rem 0 0.625rem 0;  /* 6px 0 10px 0 */
    font-style: italic;
    line-height: 1.4;
}

/* Loading Overlay Premium */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(15px);
    animation: modalFadeIn 0.3s ease;
}

.loading-spinner {
    text-align: center;
    color: var(--text-primary);
    background: var(--glass-bg);
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-glass);
    backdrop-filter: var(--glass-backdrop);
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-glass);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
    box-shadow: var(--shadow-glow);
}

/* Toast Notifications Premium */
.toast-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 1500;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.toast {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 350px;
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.toast.success {
    border-color: var(--text-success);
    background: rgba(16, 185, 129, 0.1);
}

.toast.success::before {
    background: linear-gradient(90deg, var(--text-success), #34d399);
}

.toast.error {
    border-color: var(--text-error);
    background: rgba(239, 68, 68, 0.1);
}

.toast.error::before {
    background: linear-gradient(90deg, var(--text-error), #f87171);
}

.toast.warning {
    border-color: var(--text-warning);
    background: rgba(245, 158, 11, 0.1);
}

.toast.warning::before {
    background: linear-gradient(90deg, var(--text-warning), #fbbf24);
}

/* Animations Premium */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

@keyframes typingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

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

/* Responsive Design Premium */
@media (max-width: 1200px) {
    .app-container {
        margin: 0;
        border-radius: 0;
    }
    
    .sidebar {
        width: 260px;
    }
}

@media (max-width: 768px) {
    :root {
        /* Aumentar tamanhos de fonte para melhor legibilidade mobile */
        --spacing-xs: 0.375rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.25rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
        --spacing-xxl: 3.5rem;
    }
    
    .app-container {
        flex-direction: column;
        height: 100vh;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 50vh;
        border-right: none;
        border-bottom: 2px solid var(--border-glass);
        overflow-y: auto;
    }
    
    .sidebar-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }
    
    .config-section {
        margin-bottom: var(--spacing-md);
        font-size: 1rem;
    }
    
    .message {
        max-width: 95%;
        font-size: 1.05rem;
    }
    
    .message-text {
        line-height: 1.7;
    }
    
    .chat-header {
        padding: var(--spacing-md);
    }
    
    .chat-messages {
        padding: var(--spacing-md);
    }
    
    .chat-input-container {
        padding: var(--spacing-md);
        position: sticky;
        bottom: 0;
    }
    
    .chat-container {
        height: calc(100vh - 200px);
    }
    
    .modal-content {
        margin: var(--spacing-md);
        padding: var(--spacing-lg);
        max-width: 95%;
    }
    
    .profile-options {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
    }
    
    /* Melhorar controles de gr\u00e1ficos mobile */
    .btn-chart-control {
        padding: 10px 14px;
        font-size: 1rem;
    }
    
    .chart-controls {
        margin-top: var(--spacing-md);
    }
    
    /* Melhorar modais mobile */
    .chart-fullscreen-content {
        width: 95%;
        height: 95%;
        padding: var(--spacing-md);
    }
    
    /* Melhorar bot\u00f5es mobile */
    .btn {
        min-height: 44px;
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    /* Melhorar inputs mobile */
    .form-select,
    .form-input {
        min-height: 44px;
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .sidebar-content {
        grid-template-columns: 1fr;
    }
    
    .header-info h2 {
        font-size: 1.5rem;
    }
    
    .header-info p {
        font-size: 0.9rem;
    }
    
    .message-content {
        padding: var(--spacing-md);
        font-size: 1.1rem;
    }
    
    .chat-input-wrapper {
        padding: var(--spacing-sm);
    }
    
    .chat-input {
        font-size: 1rem;
    }
    
    .send-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    .message-avatar {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    
    /* Melhorar espa\u00e7amento mobile pequeno */
    .quick-action-btn {
        padding: var(--spacing-md);
        font-size: 1rem;
    }
    
    .quick-action-btn i {
        font-size: 1.6rem;
    }
    
    /* Melhorar cards mobile */
    .vencimentos-card,
    .recomendacao-card {
        padding: var(--spacing-md);
    }
    
    /* Melhorar contraste para touch targets */
    .btn:hover,
    .btn:focus {
        border-width: 2px;
    }
    
    /* Melhorar grid de a\u00e7\u00f5es r\u00e1pidas */
    .quick-actions {
        gap: var(--spacing-md);
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0a0a0a;
        --bg-secondary: #1a1a1a;
        --bg-tertiary: #2a2a2a;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-primary: #666666;
        --border-secondary: #888888;
        --text-muted: #cccccc;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    body::before {
        animation: none;
    }
}

/* Recomendações Cards */
.recomendacoes-cards-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.recomendacao-card {
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

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

.recomendacao-card.fora-politica {
    border-color: var(--warning-color);
    background: rgba(255, 193, 7, 0.1);
}

.recomendacao-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.recomendacao-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.politica-badge {
    padding: 4px 8px;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

.politica-badge.dentro {
    background: var(--success-color);
    color: white;
}

.politica-badge.fora {
    background: var(--warning-color);
    color: white;
}

.recomendacao-content {
    margin-bottom: var(--spacing-lg);
}

.recomendacao-content .motivo,
.recomendacao-content .impacto {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.recomendacao-content .dias-restantes {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--warning-color);
    font-weight: 500;
}

.recomendacao-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.recomendacao-actions .cta-primary,
.recomendacao-actions .cta-secondary {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
}

.recomendacao-actions .cta-secondary {
    flex-wrap: wrap;
}

.recomendacao-actions .btn {
    flex: 1;
    min-width: 120px;
}

.recomendacao-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.policy-warning {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning-color);
    border-radius: var(--border-radius-sm);
    color: var(--warning-color);
    font-size: 0.9rem;
    margin-top: var(--spacing-sm);
}

/* Seletor de Clientes */
.clientes-selector-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.clientes-select {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.clientes-select:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.clientes-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primeira opção (placeholder) com cor diferenciada */
.clientes-select option[value=""] {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.clientes-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.clientes-select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: var(--spacing-sm);
    font-weight: 500;
}

.clientes-select option:hover {
    background: #2a2a2a;
}

.clientes-select option:checked {
    background: var(--primary-color);
    color: #ffffff;
}

.clientes-actions {
    display: flex;
    gap: var(--spacing-xs);
    animation: slideDown 0.3s ease;
}

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

.clientes-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    font-size: 0.85rem;
}

.clientes-actions .btn:hover {
    transform: translateY(-2px);
}

.clientes-actions .btn:active {
    transform: translateY(0);
}

/* ===== CARDS DE CLIENTES ===== */
.clients-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.client-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: 1rem;  /* 16px - melhor espaçamento */
    backdrop-filter: var(--glass-backdrop);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.client-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.client-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.client-card:hover::before {
    opacity: 1;
}

.client-card.selected {
    border-color: var(--primary-color);
    background: rgba(241, 102, 31, 0.08);
    box-shadow: 0 4px 12px rgba(241, 102, 31, 0.2);
}

.client-card.selected::before {
    opacity: 1;
}

.client-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;  /* 10px */
    margin-bottom: 0.75rem;  /* 12px */
}

.client-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-glass);
    transition: all var(--transition-normal);
}

.client-card:hover .client-avatar {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.client-info {
    flex: 1;
    min-width: 0;
}

.client-name {
    font-size: 0.875rem;  /* 14px */
    font-weight: var(--font-emphasis);
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.client-status {
    font-size: 0.6875rem;  /* 11px */
    font-weight: var(--font-body);
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
}

.client-status.online {
    color: var(--status-aceita);
}

.client-status.offline {
    color: var(--text-muted);
}

.client-status.away {
    color: var(--status-visualizada);
}

.client-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;  /* 10px */
    margin-top: 0.75rem;  /* 12px */
    padding-top: 0.75rem;  /* 12px */
    border-top: 1px solid var(--border-glass);
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: var(--font-emphasis);
    font-family: 'Roboto Mono', monospace;
}

/* ===== MELHORIAS NA SEÇÃO DE CLIENTES ===== */
.clientes-selector-wrapper {
    position: relative;
}

.clientes-search {
    position: relative;
    margin-bottom: var(--spacing-sm);
}

.clientes-search input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-sm) 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all var(--transition-normal);
}

.clientes-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.clientes-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.clientes-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-glass);
}

.client-stat {
    text-align: center;
}

.client-stat-value {
    font-size: 1.1rem;
    font-weight: var(--font-emphasis);
    color: var(--primary-color);
    font-family: 'Roboto Mono', monospace;
}

.client-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ===== BADGES E INDICADORES DE CLIENTES ===== */
.client-badge {
    margin-left: auto;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: var(--font-emphasis);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.badge-active {
    background: linear-gradient(135deg, var(--status-aceita), #34d399);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.badge-new {
    background: linear-gradient(135deg, var(--status-visualizada), #fbbf24);
    color: #000;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.badge-standard {
    background: linear-gradient(135deg, var(--text-muted), #6b7280);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.3);
}

/* Status Dots */
.status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
}

.client-status.online .status-dot {
    background: var(--status-aceita);
    box-shadow: 0 0 6px rgba(241, 102, 31, 0.5);
    animation: pulse-orange 2s infinite;
}

.client-status.offline .status-dot {
    background: var(--text-muted);
}

.client-status.away .status-dot {
    background: var(--status-visualizada);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
    animation: pulse-yellow 2s infinite;
}

@keyframes pulse-orange {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes pulse-yellow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Valores de ROI */
.summary-value.positive {
    color: var(--status-aceita);
}

.summary-value.negative {
    color: var(--status-rejeitada);
}

/* Melhorar grid do summary para 4 colunas */
.client-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;  /* 8px */
    margin-top: 0.625rem;  /* 10px */
    padding-top: 0.625rem;  /* 10px */
    border-top: 1px solid var(--border-glass);
}

/* ===== MENSAGEM DE CONTEXTO DO CLIENTE ===== */
.context-message {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(255, 107, 53, 0.05) 100%);
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: var(--border-radius-lg);
    margin: var(--spacing-md) 0;
    animation: slideInContext 0.5s ease-out;
}

.context-message .message-content {
    padding: var(--spacing-md);
}

.context-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    border-left: 3px solid var(--primary-color);
}

.context-info h4 {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: var(--font-emphasis);
    margin: 0 0 var(--spacing-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.context-info p {
    margin: 2px 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.context-info strong {
    color: var(--text-primary);
    font-weight: var(--font-emphasis);
}

.context-note {
    background: rgba(0, 176, 79, 0.1);
    border: 1px solid rgba(0, 176, 79, 0.2);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm);
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-primary);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-xs);
}

.context-note i {
    color: var(--status-aceita);
    margin-top: 2px;
}

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

/* ===== INDICADOR DE CLIENTE ATIVO ===== */
.client-active-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-gradient);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-lg);
    font-size: 0.8rem;
    font-weight: var(--font-emphasis);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

.client-active-indicator i {
    margin-right: var(--spacing-xs);
}

/* ===== OPÇÕES DE REINVESTIMENTO MELHORADAS ===== */
.reinvestment-options {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-md) 0;
}

.reinvestment-options h4 {
    color: var(--primary-color);
    margin: 0 0 var(--spacing-md) 0;
    font-size: 1.1rem;
    font-weight: var(--font-emphasis);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.option-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.option-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.option-card:hover::before {
    opacity: 1;
}

.option-card h5 {
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
    font-size: 1rem;
    font-weight: var(--font-emphasis);
}

.option-card p {
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 0.85rem;
}

.option-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--spacing-sm) 0;
    gap: var(--spacing-xs);
}

.yield {
    background: var(--primary-gradient);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    font-weight: var(--font-emphasis);
    font-size: 0.9rem;
}

.risk {
    color: var(--status-aceita);
    font-size: 0.8rem;
    font-weight: var(--font-emphasis);
}

.option-card .btn {
    margin-top: var(--spacing-sm);
    width: 100%;
}

/* ===== AÇÕES PROATIVAS ===== */
.proactive-actions {
    margin-top: var(--spacing-md) !important;
    display: flex !important;
    gap: var(--spacing-sm) !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}

.proactive-actions .btn {
    flex: 1;
    min-width: 120px;
    max-width: 150px;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .option-details {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .proactive-actions {
        flex-direction: column !important;
    }
    
    .proactive-actions .btn {
        max-width: 100%;
    }
}

/* ===== VENCIMENTOS NA OFERTA ===== */
.vencimentos-list {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-glass);
}

.vencimentos-list h4 {
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 0.9rem;
    font-weight: var(--font-emphasis);
}

.vencimentos-list .vencimento-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-glass);
}

.vencimentos-list .vencimento-item:last-child {
    border-bottom: none;
}

.vencimentos-list .vencimento-nome {
    color: var(--text-primary);
    font-weight: var(--font-body);
}

.vencimentos-list .vencimento-valor {
    color: var(--primary-color);
    font-weight: var(--font-emphasis);
    font-family: 'Roboto Mono', monospace;
}

.vencimentos-list .vencimento-dias {
    color: var(--text-warning);
    font-weight: var(--font-emphasis);
    font-size: 0.8rem;
}

/* ===== AÇÕES DA OFERTA ===== */
.proactive-offer-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    justify-content: center;
}

.proactive-offer-actions .btn {
    flex: 1;
    max-width: 150px;
}

.offer-message {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 var(--spacing-md) 0;
}

/* Remover estilos antigos do dropdown */
.clientes-dropdown {
    position: relative;
    width: 100%;
    z-index: 100;
}

.clientes-dropdown-btn {
    width: 100%;
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.clientes-dropdown-btn:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.dropdown-btn-content {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.dropdown-btn-content i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.dropdown-btn-content span {
    font-weight: 500;
    color: var(--text-primary);
}

.dropdown-icon {
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.clientes-dropdown.active .dropdown-icon {
    transform: rotate(180deg);
}

.clientes-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow: hidden;
    display: none;
    z-index: 1000;
    animation: dropdownSlideIn 0.3s ease;
}

.clientes-dropdown.active .clientes-dropdown-menu {
    display: block;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--border-glass);
}

.dropdown-search {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.dropdown-search:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-search::placeholder {
    color: var(--text-secondary);
}

.dropdown-list {
    max-height: 320px;
    overflow-y: auto;
    padding: var(--spacing-xs);
}

.dropdown-list::-webkit-scrollbar {
    width: 8px;
}

.dropdown-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.dropdown-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.dropdown-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

.dropdown-cliente-item {
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    margin-bottom: var(--spacing-xs);
}

.dropdown-cliente-item:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
}

.dropdown-cliente-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xs);
}

.dropdown-cliente-nome {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.dropdown-cliente-valor {
    font-weight: 500;
    color: var(--success-color);
    font-size: 0.85rem;
}

.dropdown-cliente-detalhes {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dropdown-cliente-actions {
    display: flex;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xs);
}

.dropdown-cliente-actions .btn {
    padding: 4px 8px;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.dropdown-cliente-actions .btn:active {
    transform: scale(0.95);
}

/* Clientes e Dossiê */
.clientes-lista {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.cliente-item {
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.cliente-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cliente-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-sm);
}

.cliente-info h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.cliente-info p {
    margin: 2px 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.cliente-actions {
    display: flex;
    gap: var(--spacing-xs);
}

.cliente-actions .btn {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Modal de Dossiê */
.dossie-modal .modal-content {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.dossie-content {
    padding: var(--spacing-lg);
}

.dossie-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.dossie-section {
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    backdrop-filter: blur(10px);
}

.dossie-section h3 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.dossie-section.full-width {
    grid-column: 1 / -1;
}

.alocacao-chart {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-ativos-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.top-ativos-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    border-bottom: 1px solid var(--border-glass);
}

.top-ativos-list li:last-child {
    border-bottom: none;
}

.ativo-nome {
    font-weight: 500;
    color: var(--text-primary);
}

.ativo-valor {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.liquidez-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-sm);
}

.liquidez-item {
    text-align: center;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
}

.liquidez-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.liquidez-valor {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.vencimentos-urgentes {
    color: var(--error-color);
    font-weight: 600;
}

.evolucao-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
}

.evolucao-item {
    text-align: center;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
}

.evolucao-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.evolucao-valor {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--success-color);
}

.notas-internas {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-sm);
    min-height: 100px;
    font-style: italic;
    color: var(--text-secondary);
}

.dossie-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .dossie-body {
        grid-template-columns: 1fr;
    }
    
    .liquidez-grid {
        grid-template-columns: 1fr;
    }
    
    .evolucao-metrics {
        grid-template-columns: 1fr;
    }
    
    .dossie-actions {
        flex-direction: column;
    }
}

/* ===== Estilos para Relatório Consultivo no Dossiê ===== */
.relatorio-web-container {
    max-width: 100%;
    padding: var(--spacing-md);
    background: #1a1a1a;
    color: #e0e0e0;
    border-radius: var(--border-radius-md);
}

.relatorio-web-container .page-cover {
    background: linear-gradient(135deg, #FF6C00 0%, #FF8C00 50%, #FFA500 100%);
    color: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    box-shadow: 0 4px 20px rgba(255,108,0,0.2);
}

.relatorio-web-container .cover-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.relatorio-web-container .cover-subtitle {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
}

.relatorio-web-container .cover-client h3 {
    font-size: 1.5rem;
    padding: var(--spacing-md);
    background: rgba(255,255,255,0.15);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-md);
}

.relatorio-web-container .section {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: #2a2a2a;
    border-radius: var(--border-radius-md);
    border: 1px solid #3a3a3a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.relatorio-web-container .section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #FF6C00;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid #FF6C00;
    background: linear-gradient(90deg, rgba(255,108,0,0.2) 0%, transparent 100%);
    background: linear-gradient(90deg, rgba(255,108,0,0.1) 0%, transparent 100%);
    padding-left: var(--spacing-md);
    margin-left: calc(-1 * var(--spacing-md));
    border-radius: 4px 0 0 4px;
}

.relatorio-web-container .profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.relatorio-web-container .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.relatorio-web-container .portfolio-item {
    padding: var(--spacing-md);
    background: #333333;
    border-radius: var(--border-radius-sm);
    text-align: center;
    border: 2px solid #444444;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.relatorio-web-container .portfolio-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FF6C00;
}

.relatorio-web-container .portfolio-amount {
    font-size: 0.9rem;
    color: #b0b0b0;
    margin-top: 5px;
    font-weight: 500;
}

.relatorio-web-container .portfolio-total {
    text-align: center;
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    background: #2a2a2a;
    border-radius: 8px;
    font-size: 1.1rem;
    color: #e0e0e0;
    border: 2px solid #FF6C00;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255,108,0,0.2);
}

.relatorio-web-container .subsection-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: var(--spacing-md) 0 var(--spacing-sm) 0;
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid #3a3a3a;
}

.relatorio-web-container .ativos-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-sm);
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #3a3a3a;
}

.relatorio-web-container .ativos-table thead {
    background: #FF6C00;
    color: white;
}

.relatorio-web-container .ativos-table th {
    padding: var(--spacing-sm);
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
}

.relatorio-web-container .ativos-table td {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-bottom: 1px solid #3a3a3a;
    font-size: 0.9rem;
    color: #e0e0e0;
}

.relatorio-web-container .ativos-table tbody tr:hover {
    background: #333333;
}

.relatorio-web-container .liquidez-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.relatorio-web-container .liquidez-item {
    padding: var(--spacing-md);
    background: #333333;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #444444;
    transition: all 0.3s ease;
}

.relatorio-web-container .liquidez-item:hover {
    border-color: #FF6C00;
    box-shadow: 0 4px 12px rgba(255,108,0,0.15);
}

.relatorio-web-container .liquidez-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.relatorio-web-container .liquidez-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #FF6C00;
}

.relatorio-web-container .vencimentos-list {
    margin-top: var(--spacing-sm);
}

.relatorio-web-container .vencimento-item {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    background: var(--bg-secondary);
    border-radius: 6px;
    border-left: 4px solid #6c757d;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.relatorio-web-container .vencimento-item.urgente {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.relatorio-web-container .vencimento-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.relatorio-web-container .vencimento-dias {
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.relatorio-web-container .vencimento-item.urgente .vencimento-dias {
    background: #ffc107;
    color: #000;
}

.relatorio-web-container .vencimento-valor {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.relatorio-web-container .vencimento-data {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.relatorio-web-container .evolucao-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.relatorio-web-container .evolucao-item {
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--border-glass);
}

.relatorio-web-container .evolucao-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.relatorio-web-container .evolucao-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.relatorio-web-container .evolucao-value.positive {
    color: #28a745;
}

.relatorio-web-container .evolucao-value.negative {
    color: #dc3545;
}

.relatorio-web-container .notas-internas-box {
    padding: var(--spacing-md);
    background: #e7f3ff;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
    font-style: italic;
    color: var(--text-primary);
}

.relatorio-web-container .interaction-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xs);
}

.relatorio-web-container .interaction-answer {
    margin-top: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: #e7f3ff;
    border-left: 3px solid #2196f3;
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.relatorio-web-container .interactions-list,
.relatorio-web-container .recommendations-list,
.relatorio-web-container .alerts-list,
.relatorio-web-container .needs-list,
.relatorio-web-container .actions-list {
    margin-top: var(--spacing-md);
}

.relatorio-web-container .interaction-item,
.relatorio-web-container .recommendation-item,
.relatorio-web-container .alert-item,
.relatorio-web-container .action-item {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    border-radius: var(--border-radius-sm);
    border-left: 4px solid;
}

.relatorio-web-container .interaction-item {
    background: #2a2a2a;
    border-left-color: #FF6C00;
    color: #e0e0e0;
}

.relatorio-web-container .recommendation-item {
    background: #3a2a00;
    border-left-color: #ffc107;
    color: #e0e0e0;
}

.relatorio-web-container .alert-item {
    background: #3a1a1a;
    border-left-color: #dc3545;
    color: #ff6b6b;
}

.relatorio-web-container .action-item {
    background: #1a2a3a;
    border-left-color: #2196f3;
    color: #e0e0e0;
}

.relatorio-web-container .status-box {
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, #FF6C00 0%, #FF8C00 100%);
    color: white;
    border-radius: var(--border-radius-md);
    text-align: center;
    margin-top: var(--spacing-md);
    box-shadow: 0 4px 16px rgba(255,108,0,0.3);
}

.relatorio-web-container .footer {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--border-glass);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.relatorio-web-container .badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.relatorio-web-container .badge-conservador {
    background: #e3f2fd;
    color: #1976d2;
}

.relatorio-web-container .badge-moderado {
    background: #fff3e0;
    color: #f57c00;
}

.relatorio-web-container .badge-arrojado {
    background: #fce4ec;
    color: #c2185b;
}

.relatorio-web-container .badge-moderado-arrojado {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* ===== Dashboard de ROI e Performance ===== */

.roi-dashboard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.roi-card {
    background: linear-gradient(135deg, 
        rgba(0, 176, 79, 0.08) 0%, 
        rgba(0, 176, 79, 0.03) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 14px;
    border-radius: 12px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.roi-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(0, 176, 79, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.roi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 176, 79, 0.15);
    border-left-width: 5px;
}

.roi-card.alertas {
    border-left-color: #3B82F6;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(59, 130, 246, 0.03) 100%);
}

.roi-card.tempo {
    border-left-color: #F59E0B;
    background: linear-gradient(135deg, 
        rgba(245, 158, 11, 0.08) 0%, 
        rgba(245, 158, 11, 0.03) 100%);
}

.roi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.roi-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.roi-trend {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.roi-trend.positive {
    background: rgba(241, 102, 31, 0.15);
    color: #F1661F;
}

.roi-trend.positive::before {
    content: '↗';
    font-size: 0.9rem;
}

.roi-trend.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.roi-trend.negative::before {
    content: '↘';
    font-size: 0.9rem;
}

.roi-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 10px 0;
}

.roi-value .big {
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1;
    letter-spacing: -0.02em;
}

.roi-card.alertas .roi-value .big {
    color: #3B82F6;
}

.roi-card.tempo .roi-value .big {
    color: #F59E0B;
}

.roi-value .small {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.roi-conversion {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.roi-conversion strong {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-success);
}

.roi-conversion .badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.roi-conversion .badge.success {
    background: linear-gradient(135deg, #F1661F, #D85A1A);
    color: white;
    box-shadow: 0 2px 6px rgba(241, 102, 31, 0.25);
}

.roi-conversion .badge.warning {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

.roi-money {
    margin-top: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color);
    padding: 6px 10px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.roi-detail {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Botão de refresh no header */
.section-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-refresh.rotating i {
    animation: rotate360 0.5s linear;
}

@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== Comparação com Equipe (Gamificação) ===== */

.benchmark-widget {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 10px;
}

.metric-comparison {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 12px;
    transition: all var(--transition-normal);
}

.metric-comparison:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.comparison-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.comparison-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.comparison-bar {
    position: relative;
    background: var(--bg-tertiary);
    border-radius: 8px;
    height: 28px;
    overflow: hidden;
}

.comparison-bar.you {
    border: 2px solid var(--primary-color);
}

.comparison-bar.team {
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}

.bar-fill.team-fill {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
}

.bar-label {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 2;
}

.comparison-bar.you::before {
    content: 'Você:';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-color);
    z-index: 2;
}

.comparison-bar.team::before {
    content: 'Equipe:';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    z-index: 2;
}

.badge.winner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    animation: pulse-gold 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

@keyframes pulse-gold {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 4px 16px rgba(255, 215, 0, 0.6);
    }
}

/* ===== Badges de Valor em Features ===== */

.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.6rem;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
    white-space: nowrap;
}


.feature-badge.roi {
    background: var(--badge-roi);
    color: white;
}


.feature-badge.new {
    background: var(--badge-new);
    color: white;
    animation: pulse-badge 2s infinite;
}

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

/* ===== Aplicação de Tipografia Premium ===== */

/* Headers principais */
.sidebar-header h1 {
    font-size: var(--text-h1) !important;
    font-weight: var(--font-heading) !important;
    letter-spacing: -0.02em !important;
}

.modal-header h2 {
    font-weight: var(--font-heading) !important;
}

/* Seções e subtítulos */
.config-section h3,
.section-header-premium h3 {
    font-size: var(--text-h3) !important;
    font-weight: var(--font-subheading) !important;
}

/* Números grandes (Hero) */
.roi-value .big {
    font-size: 2.5rem !important;
    font-weight: var(--font-hero) !important;
    letter-spacing: -0.03em !important;
}

.roi-conversion strong {
    font-weight: var(--font-heading) !important;
}

/* Labels e destaques */
.roi-label,
.comparison-label,
.vencimentos-title {
    font-weight: var(--font-emphasis) !important;
}

/* Texto do corpo */
.section-description,
.roi-detail {
    font-weight: var(--font-body) !important;
}

/* Texto secundário/leve */
.roi-value .small,
.subtitle {
    font-weight: var(--font-light) !important;
}

/* Botões com peso */
.btn {
    font-weight: var(--font-emphasis) !important;
}

.btn-primary {
    font-weight: var(--font-subheading) !important;
}

/* ===== Microanimações de Feedback ===== */

/* Click feedback em botões */
.btn:active,
.quick-action-btn:active,
.btn-primary:active,
.btn-secondary:active {
    transform: scale(0.97);
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.1s ease;
}

/* Hover em cards */
.roi-card,
.metric-comparison,
.vencimentos-card,
.conta-item,
.instituicao-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.roi-card:hover,
.vencimentos-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 176, 79, 0.2);
}

/* Pulse em elementos importantes */
.vencimentos-count {
    animation: pulse-count 2s ease-in-out infinite;
}

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

/* Shimmer effect para skeleton loaders */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Fade in ao carregar */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Bounce para notificações */
.bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Glow em elementos premium */
.feature-badge:hover,
.badge.winner:hover {
    filter: brightness(1.2);
    transform: scale(1.08);
    transition: all 0.3s ease;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Loading spinner melhorado */
.spinner {
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* Hover em links e botões de ação */
.quick-action-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 176, 79, 0.25);
}

/* ===== Ranking de Produtos ===== */

.produtos-ranking {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 12px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.ranking-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    transition: width 0.3s ease;
}

.ranking-item.gold::before {
    background: linear-gradient(180deg, #FFD700, #FFA500);
}

.ranking-item.silver::before {
    background: linear-gradient(180deg, #C0C0C0, #A8A8A8);
}

.ranking-item.bronze::before {
    background: linear-gradient(180deg, #CD7F32, #A0522D);
}

.ranking-item:hover {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.05);
}

.ranking-item:hover::before {
    width: 6px;
}

.ranking-number {
    font-size: 1.2rem;
    font-weight: var(--font-hero);
    color: var(--text-muted);
    min-width: 30px;
    text-align: center;
}

.ranking-item.gold .ranking-number {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.ranking-item.silver .ranking-number {
    color: #C0C0C0;
}

.ranking-item.bronze .ranking-number {
    color: #CD7F32;
}

.produto-info {
    flex: 1;
}

.produto-nome {
    font-size: 0.85rem;
    font-weight: var(--font-emphasis);
    color: var(--text-primary);
    margin-bottom: 4px;
}

.produto-stats {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.produto-stats .stat {
    font-weight: var(--font-body);
}

.produto-stats .stat.conversion {
    color: var(--primary-color);
    font-weight: var(--font-emphasis);
}

.produto-stats .stat.value {
    color: var(--secondary-color);
    font-weight: var(--font-emphasis);
}

.produto-stats .divider {
    color: var(--border-primary);
}

.ranking-badge {
    font-size: 1.2rem;
    animation: bounce-slow 2s ease-in-out infinite;
}

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

.insight-box {
    margin-top: 12px;
    padding: 10px 12px;
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3B82F6;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.insight-box i {
    color: #3B82F6;
    font-size: 1rem;
    margin-top: 2px;
}

.insight-box p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.insight-box strong {
    color: var(--text-primary);
    font-weight: var(--font-emphasis);
}

/* ===== Estilos para Alertas Inteligentes ===== */

/* Collapsible sections */
.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    user-select: none;
}

.collapsible-header:hover {
    opacity: 0.8;
}

.section-toggle-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.section-toggle-icon.rotated {
    transform: rotate(-180deg);
}

.collapsible-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin-top 0.3s ease;
    opacity: 1;
    margin-top: 15px;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

/* Preset buttons mini */
.preset-buttons-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.preset-mini-btn {
    padding: 8px;
    border: 2px solid #444;
    background: var(--bg-tertiary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
    color: var(--text-secondary);
}

.preset-mini-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
    background: var(--bg-card);
}

.preset-mini-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
}

/* Setting label with toggle */
.setting-label-with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 10px;
}

.setting-label-with-toggle span {
    font-size: 13px;
    color: var(--text-primary);
}

/* Sub-settings */
.sub-settings {
    margin-left: 20px;
    padding-left: 15px;
    border-left: 2px solid var(--border-primary);
    margin-top: 10px;
}

.sub-settings label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: block;
}

/* Form row compact */
.form-row-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.form-row-compact > div {
    display: flex;
    flex-direction: column;
}

/* Form input small */
.form-input-sm {
    padding: 6px 10px;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    font-size: 13px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s;
}

.form-input-sm:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

/* Alerts stats */
.alerts-stats {
    animation: fadeIn 0.3s ease-in;
    color: var(--text-muted);
}

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

/* ===== Estilos para Open Finance / Agregação de Contas ===== */

/* Contas conectadas na sidebar */
.contas-conectadas-wrapper {
    width: 100%;
}

.contas-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.empty-contas {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

.conta-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.conta-item:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
}

.conta-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.conta-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    padding: 4px;
    object-fit: contain;
}

.conta-nome {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.conta-tipo {
    font-size: 11px;
    color: var(--text-muted);
}

.conta-actions {
    display: flex;
    gap: 5px;
}

.btn-conta-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-conta-icon:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

/* Modal de conectar instituição */
.filtros-instituicoes {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filtro-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-primary);
    background: var(--bg-tertiary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.3s;
}

.filtro-btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-card);
}

.filtro-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-gradient);
    color: white;
    font-weight: 600;
}

.instituicoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.instituicao-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.instituicao-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 176, 79, 0.2);
}

.instituicao-card.conectada {
    border-color: var(--primary-color);
    background: var(--primary-light);
    cursor: not-allowed;
    opacity: 0.7;
}

.instituicao-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    background: white;
    border-radius: 12px;
    padding: 8px;
    object-fit: contain;
}

.instituicao-nome {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.instituicao-tipo-badge {
    font-size: 10px;
    padding: 3px 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    color: var(--text-muted);
}

/* Modal de autenticação Open Finance */
.auth-step {
    display: none;
}

.auth-step.active {
    display: block;
    animation: fadeInSlide 0.4s ease-out;
}

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

.auth-step-header {
    text-align: center;
    margin-bottom: 25px;
}

.instituicao-logo-pequena {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instituicao-logo-grande {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.permissoes-list-compact {
    list-style: none;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin: 20px 0;
}

.permissoes-list-compact li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.permissoes-list-compact li i {
    color: var(--primary-color);
    font-size: 16px;
}

.info-box {
    background: var(--primary-light);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 20px;
}

.info-box i {
    color: var(--primary-color);
    font-size: 20px;
    margin-top: 2px;
}

.info-box p {
    margin: 0;
    font-size: 12px;
    color: var(--text-primary);
}

.form-input {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Loading State */
.auth-loading {
    text-align: center;
    padding: 40px 20px;
}

.spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-primary);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    width: 0%;
    transition: width 0.5s ease;
}

/* Success State */
.auth-success {
    text-align: center;
    padding: 40px 20px;
}

.auth-success i {
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal de consentimento (antigo - manter para compatibilidade) */
.consentimento-info {
    text-align: center;
}

.permissoes-list {
    list-style: none;
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.permissoes-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.permissoes-list li i {
    color: var(--primary-color);
    font-size: 16px;
}

.consentimento-seguranca {
    margin-top: 20px;
    padding: 20px;
    background: var(--primary-light);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
}

.consentimento-seguranca i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.consentimento-seguranca p {
    margin: 5px 0;
}

/* Dashboard consolidado */
.patrimonio-total-card {
    background: var(--primary-gradient);
    color: white;
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(0, 176, 79, 0.3);
}

.patrimonio-total-card h2 {
    font-size: 48px;
    font-weight: 800;
    margin: 10px 0;
}

.patrimonio-total-card p {
    font-size: 14px;
    opacity: 0.9;
}

.instituicoes-distribuicao {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.instituicao-resumo-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
}

.instituicao-resumo-card h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.instituicao-resumo-card .valor {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 5px 0;
}

.instituicao-resumo-card .percentual {
    font-size: 12px;
    color: var(--text-muted);
}

/* =============================================================================
   ROADMAP MELHORIAS UI/UX - NOVOS ESTILOS
   ============================================================================= */

/* ===== FASE 1: ROI Dashboard ===== */
.roi-dashboard {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    backdrop-filter: var(--glass-backdrop);
    position: relative;
    overflow: hidden;
}

.roi-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.roi-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.roi-dashboard-header h3 {
    font-size: var(--text-h3);
    font-weight: var(--font-heading);
    color: var(--text-primary);
    margin: 0;
}

.roi-dashboard-update {
    font-size: var(--text-tiny);
    color: var(--text-muted);
    font-weight: var(--font-light);
}

.roi-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.roi-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.roi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-gradient);
}

.roi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-accent);
}

.roi-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.roi-card-icon {
    font-size: 1.3rem;
}

.roi-card-title {
    font-size: var(--text-small);
    font-weight: var(--font-emphasis);
    color: var(--text-primary);
}

.roi-card-trend {
    margin-left: auto;
    font-size: var(--text-tiny);
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: var(--font-emphasis);
}

.roi-card-trend.positive {
    background: rgba(16, 185, 129, 0.2);
    color: var(--status-aceita);
}

.roi-card-trend.negative {
    background: rgba(239, 68, 68, 0.2);
    color: var(--status-rejeitada);
}

.roi-card-value {
    font-size: var(--text-h1);
    font-weight: var(--font-hero);
    color: var(--primary-color);
    margin: var(--spacing-xs) 0;
    font-family: 'Roboto Mono', monospace;
}

.roi-card-subtitle {
    font-size: var(--text-tiny);
    color: var(--text-muted);
    font-weight: var(--font-light);
}

.roi-card-details {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-glass);
    font-size: var(--text-small);
    color: var(--text-secondary);
}

/* ===== FASE 2: Tabs System ===== */
.sidebar-tabs {
    display: flex;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
}

.sidebar-tab {
    flex: 1;
    padding: var(--spacing-sm);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--text-small);
    font-weight: var(--font-emphasis);
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.sidebar-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-tab.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.sidebar-tab-content {
    display: none;
}

.sidebar-tab-content.active {
    display: block;
    animation: fadeInTab 0.3s ease-in;
}

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

/* ===== FASE 2: KPIs Área Principal ===== */
.kpis-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
}

.kpi-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    backdrop-filter: var(--glass-backdrop);
    transition: all var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

.kpi-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-accent);
}

.kpi-value {
    font-size: var(--text-hero);
    font-weight: var(--font-hero);
    color: var(--primary-color);
    margin: var(--spacing-sm) 0;
    font-family: 'Roboto Mono', monospace;
    text-shadow: 0 0 20px rgba(0, 176, 79, 0.3);
}

.kpi-label {
    font-size: var(--text-small);
    color: var(--text-muted);
    font-weight: var(--font-emphasis);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
    font-size: var(--text-small);
    font-weight: var(--font-emphasis);
}

.kpi-trend.positive {
    color: var(--status-aceita);
}

.kpi-trend.negative {
    color: var(--status-rejeitada);
}

.kpi-trend.neutral {
    color: var(--text-muted);
}

/* ===== FASE 3: Badges de Valor ===== */
.feature-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: var(--text-tiny);
    font-weight: var(--font-emphasis);
    margin-left: var(--spacing-sm);
    animation: badgePulse 2s infinite;
}

.badge-most-used {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-hover));
    color: #000;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

.badge-roi {
    background: linear-gradient(135deg, var(--status-aceita), #34d399);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.badge-exclusive {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.badge-new {
    background: linear-gradient(135deg, var(--status-visualizada), #fbbf24);
    color: #000;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    animation: badgePulseNew 2s infinite;
}

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

@keyframes badgePulseNew {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 4px 16px rgba(245, 158, 11, 0.6);
    }
}

/* ===== FASE 3: Microanimações ===== */
.btn-primary:active {
    transform: scale(0.98);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.roi-number {
    animation: countUp 0.8s ease-out;
}

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

/* ===== FASE 4: Ofertas Tracking ===== */
.ofertas-tracking-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.oferta-track-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    backdrop-filter: var(--glass-backdrop);
    transition: all var(--transition-normal);
}

.oferta-track-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-accent);
}

.oferta-track-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
}

.oferta-track-title {
    font-size: var(--text-h3);
    font-weight: var(--font-heading);
    color: var(--text-primary);
    margin: 0 0 var(--spacing-xs) 0;
}

.oferta-track-subtitle {
    font-size: var(--text-small);
    color: var(--text-muted);
}

.oferta-status-badge {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: var(--text-tiny);
    font-weight: var(--font-emphasis);
    text-transform: uppercase;
}

.status-enviada {
    background: rgba(59, 130, 246, 0.2);
    color: var(--status-enviada);
    border: 1px solid var(--status-enviada);
}

.status-visualizada {
    background: rgba(245, 158, 11, 0.2);
    color: var(--status-visualizada);
    border: 1px solid var(--status-visualizada);
}

.status-aceita {
    background: rgba(16, 185, 129, 0.2);
    color: var(--status-aceita);
    border: 1px solid var(--status-aceita);
}

.status-rejeitada {
    background: rgba(239, 68, 68, 0.2);
    color: var(--status-rejeitada);
    border: 1px solid var(--status-rejeitada);
}

.status-pendente {
    background: rgba(139, 92, 246, 0.2);
    color: var(--status-pendente);
    border: 1px solid var(--status-pendente);
}

.oferta-timeline {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-md);
    border-left: 2px solid var(--border-glass);
}

.timeline-item {
    position: relative;
    padding: var(--spacing-sm) 0 var(--spacing-sm) var(--spacing-md);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--bg-primary);
}

.timeline-time {
    font-size: var(--text-tiny);
    color: var(--text-muted);
    margin-bottom: 2px;
}

.timeline-event {
    font-size: var(--text-small);
    color: var(--text-primary);
    font-weight: var(--font-emphasis);
}

.oferta-score {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.score-label {
    font-size: var(--text-small);
    font-weight: var(--font-emphasis);
    color: var(--text-primary);
}

.score-value {
    font-size: var(--text-h2);
    font-weight: var(--font-hero);
    color: var(--primary-color);
    font-family: 'Roboto Mono', monospace;
}

.score-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.score-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    transition: width 0.8s ease-out;
}

.oferta-next-step {
    background: var(--primary-light);
    border: 1px solid var(--border-accent);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.next-step-title {
    font-size: var(--text-small);
    font-weight: var(--font-emphasis);
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
}

.next-step-action {
    font-size: var(--text-body);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.next-step-prazo {
    font-size: var(--text-tiny);
    color: var(--text-muted);
}

/* ===== FASE 4: Comparação com Equipe ===== */
.comparacao-equipe-container {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    backdrop-filter: var(--glass-backdrop);
}

.comparacao-title {
    font-size: var(--text-h3);
    font-weight: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

.comparacao-item {
    margin-bottom: var(--spacing-lg);
}

.comparacao-label {
    font-size: var(--text-small);
    font-weight: var(--font-emphasis);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.comparacao-bars {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.comparacao-bar-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.comparacao-bar-label {
    min-width: 60px;
    font-size: var(--text-tiny);
    color: var(--text-muted);
}

.comparacao-bar {
    flex: 1;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.comparacao-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.8s ease-out;
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-sm);
    font-size: var(--text-tiny);
    font-weight: var(--font-emphasis);
    color: white;
}

.comparacao-bar-fill.voce {
    background: var(--primary-gradient);
}

.comparacao-bar-fill.equipe {
    background: linear-gradient(135deg, #6B7280, #9CA3AF);
}

.comparacao-diferenca {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-sm);
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
}

.diferenca-icon {
    font-size: 1.2rem;
}

.diferenca-text {
    font-size: var(--text-small);
    font-weight: var(--font-emphasis);
}

.diferenca-positiva {
    color: var(--status-aceita);
}

.diferenca-negativa {
    color: var(--status-rejeitada);
}

/* ===== FASE 4: Produtos Ranking ===== */
.produtos-ranking-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.produto-rank-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    backdrop-filter: var(--glass-backdrop);
    transition: all var(--transition-normal);
    position: relative;
}

.produto-rank-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-accent);
}

.produto-rank-position {
    position: absolute;
    top: -10px;
    left: var(--spacing-md);
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-h3);
    font-weight: var(--font-hero);
    color: white;
    box-shadow: var(--shadow-glow);
}

.produto-rank-header {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.produto-rank-nome {
    font-size: var(--text-h3);
    font-weight: var(--font-heading);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.produto-rank-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.produto-stat {
    text-align: center;
}

.produto-stat-value {
    font-size: var(--text-h2);
    font-weight: var(--font-hero);
    color: var(--primary-color);
    font-family: 'Roboto Mono', monospace;
}

.produto-stat-label {
    font-size: var(--text-tiny);
    color: var(--text-muted);
    text-transform: uppercase;
}

.produto-rank-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.produto-tendencia {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--text-small);
    font-weight: var(--font-emphasis);
}

.produto-perfil {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: var(--text-tiny);
    color: var(--text-muted);
}

/* ===== FASE 4: Conversões Timeline ===== */
.conversoes-timeline-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.conversao-timeline-item {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-md);
    backdrop-filter: var(--glass-backdrop);
    transition: all var(--transition-normal);
    position: relative;
    padding-left: calc(var(--spacing-md) * 3);
}

.conversao-timeline-item::before {
    content: '';
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 3px solid var(--bg-primary);
}

.conversao-timeline-item.confirmada::before {
    background: var(--status-aceita);
}

.conversao-timeline-item.pendente::before {
    background: var(--status-visualizada);
}

.conversao-timeline-item.recusada::before {
    background: var(--status-rejeitada);
}

.conversao-timeline-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-accent);
}

.conversao-timeline-time {
    font-size: var(--text-tiny);
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.conversao-timeline-client {
    font-size: var(--text-body);
    font-weight: var(--font-emphasis);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.conversao-timeline-product {
    font-size: var(--text-small);
    color: var(--text-secondary);
}

.conversao-timeline-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-sm);
}

.conversao-timeline-canal {
    font-size: var(--text-tiny);
    color: var(--text-muted);
}

.conversao-timeline-value {
    font-size: var(--text-small);
    font-weight: var(--font-emphasis);
    color: var(--primary-color);
}

/* ===== FASE 4: Insights Automáticos ===== */
.insights-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.insight-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    backdrop-filter: var(--glass-backdrop);
    transition: all var(--transition-normal);
    position: relative;
}

.insight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
}

.insight-card.impacto-alto::before {
    background: linear-gradient(180deg, var(--status-aceita), #34d399);
}

.insight-card.impacto-medio::before {
    background: linear-gradient(180deg, var(--status-visualizada), #fbbf24);
}

.insight-card.impacto-baixo::before {
    background: linear-gradient(180deg, #6B7280, #9CA3AF);
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-accent);
}

.insight-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.insight-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.insight-title {
    flex: 1;
    font-size: var(--text-body);
    font-weight: var(--font-heading);
    color: var(--text-primary);
}

.insight-impact-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: var(--text-tiny);
    font-weight: var(--font-emphasis);
    text-transform: uppercase;
}

.insight-impact-badge.alto {
    background: rgba(16, 185, 129, 0.2);
    color: var(--status-aceita);
}

.insight-impact-badge.medio {
    background: rgba(245, 158, 11, 0.2);
    color: var(--status-visualizada);
}

.insight-impact-badge.baixo {
    background: rgba(107, 114, 128, 0.2);
    color: var(--tier-basic);
}

.insight-description {
    font-size: var(--text-small);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive adjustments for new components */
@media (max-width: 768px) {
    .kpis-dashboard {
        grid-template-columns: 1fr;
    }
    
    .roi-cards {
        grid-template-columns: 1fr;
    }
    
    .produto-rank-stats {
        grid-template-columns: 1fr;
    }
    
    .comparacao-bars {
        font-size: 0.8rem;
    }
}