/* ==================================
   rafaInvest - Design Profissional
   Paleta Corporativa / Clean
   ================================== */

/* ===== RESET & FONTS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Paleta Premium Profissional */
    --bg-primary: #0A0E1A;
    --bg-secondary: #151B2E;
    --bg-tertiary: #1E2744;
    --bg-surface: #F8FAFC;
    --bg-surface-elevated: #FFFFFF;
    
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-dark: #0F172A;
    --text-light: #64748B;
    --text-muted: #94A3B8;
    
    --accent-primary: #6366F1;
    --accent-primary-hover: #4F46E5;
    --accent-secondary: #8B5CF6;
    
    --success: #10B981;
    --success-bg: #D1FAE5;
    --danger: #EF4444;
    --danger-bg: #FEE2E2;
    --warning: #F59E0B;
    --info: #3B82F6;
    
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    --border-dark: #334155;
    
    --sidebar-width: 280px;
    --header-height: 72px;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 24px 48px -8px rgba(0, 0, 0, 0.20);
    --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(15, 23, 42, 0.16);
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    --gradient-surface: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    
    --blur-sm: blur(8px);
    --blur-md: blur(16px);
    
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-surface);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

/* ===== LAYOUT PRINCIPAL ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0;
    overflow-y: auto;
    transition: var(--transition);
    z-index: 1000;
    backdrop-filter: var(--blur-md);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?w=800&auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center 35%;
    background-repeat: no-repeat;
    opacity: 0.45;
    z-index: 1;
    pointer-events: none;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 250px;
    left: 0;
    width: 100%;
    height: calc(100% - 250px);
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.4) 30%, rgba(15, 23, 42, 0.7) 100%);
    z-index: 1;
    pointer-events: none;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar-logo {
    padding: 2rem 1.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.25rem;
    position: relative;
    z-index: 100;
}

.sidebar-logo svg {
    position: relative;
    z-index: 100;
}

.sidebar-logo h1 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #FFFFFF 0%, #94A3B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    color: var(--accent-primary);
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.4));
}

.sidebar-nav {
    list-style: none;
    padding: 0 0.75rem 2rem;
    position: relative;
    z-index: 100;
}

.sidebar-nav-item {
    margin: 0.25rem 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: var(--transition-fast);
    border-radius: var(--radius-md);
    position: relative;
}

.sidebar-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--accent-primary);
    border-radius: 0 3px 3px 0;
    transition: var(--transition-fast);
}

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateX(4px);
}

.sidebar-nav-link:hover::before {
    height: 24px;
}

.sidebar-nav-link.active {
    background: var(--bg-secondary);
    color: var(--info);
    border-left: 3px solid var(--info);
}

.sidebar-nav-link .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Link de Recomendações (destacado) */
.sidebar-nav-link.recommendations-link {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    margin: 0 0.75rem;
    position: relative;
    font-size: 0.875rem;
}

.sidebar-nav-link.recommendations-link:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateX(4px);
}

.sidebar-nav-link.recommendations-link .icon {
    color: #10B981;
    width: 18px;
    height: 18px;
}

/* Menu Mobile */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: none;
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: var(--bg-secondary);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle .icon {
    width: 24px;
    height: 24px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* ===== CONTEÚDO PRINCIPAL ===== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    height: 380px;
    background: linear-gradient(135deg, #4A5FBF 0%, #667eea 50%, #764ba2 100%);
    background-image: 
        linear-gradient(135deg, rgba(74, 95, 191, 0.7) 0%, rgba(102, 126, 234, 0.65) 50%, rgba(118, 75, 162, 0.7) 100%),
        url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?w=1920&auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 14, 26, 0.15) 0%, rgba(30, 39, 68, 0.1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 0 2rem;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero-title .icon {
    vertical-align: middle;
    margin-top: -0.25rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.page-title .icon {
    flex-shrink: 0;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.hero-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-hero-primary,
.btn-hero-secondary {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: 'Inter', sans-serif;
}

.btn-hero-primary {
    background: white;
    color: #4A5FBF;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

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

.btn-hero-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

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

.content-body {
    padding: 3rem;
    max-width: 1440px;
    margin: 0 auto;
    background: var(--bg-surface);
}

/* ===== SEÇÕES DE CONTEÚDO ===== */
.page-section {
    display: none;
}

.page-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* ===== CARDS ===== */
.card {
    background: var(--bg-surface-elevated);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    opacity: 0;
    transition: var(--transition-fast);
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
    border-color: var(--border-color);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.card-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    letter-spacing: -0.01em;
}

.card-title .icon {
    width: 22px;
    height: 22px;
    color: var(--accent-primary);
    opacity: 0.9;
}

.card-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0.75rem 0;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.card-change {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.card-change.positive {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.card-change.negative {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* ===== CARDS POR TIPO DE ATIVO ===== */
.card-crypto::before {
    background: linear-gradient(90deg, #F59E0B 0%, #F97316 100%);
}

.card-fii::before {
    background: linear-gradient(90deg, #3B82F6 0%, #2563EB 100%);
}

.card-cdb::before {
    background: linear-gradient(90deg, #10B981 0%, #059669 100%);
}

.card-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}

.badge-crypto {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.badge-fii {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.badge-cdb {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.card-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.icon-crypto {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
}

.icon-fii {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
}

.icon-cdb {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
}

.card-icon-wrapper .icon {
    width: 28px;
    height: 28px;
}

.icon-crypto .icon {
    color: #F59E0B;
}

.icon-fii .icon {
    color: #3B82F6;
}

.icon-cdb .icon {
    color: #10B981;
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-asset-name {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-dark);
    letter-spacing: -0.01em;
    line-height: 1.3;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-symbol {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.card-value-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.5rem 0;
}

.card-main-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.card-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.icon-xs {
    width: 14px;
    height: 14px;
}

.card-footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.info-label {
    font-size: 0.8125rem;
    color: var(--text-light);
    font-weight: 500;
}

.info-value {
    font-size: 0.875rem;
    color: var(--text-dark);
    font-weight: 600;
}

.info-highlight {
    font-size: 0.9375rem;
    font-weight: 700;
}

/* === ASSET CARDS - Clean Professional Layout === */
.card-asset {
    position: relative;
    text-align: center;
    padding: 1.25rem 1.5rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.asset-type-badge {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    padding: 0.3rem 0.65rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}

.badge-orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(251, 146, 60, 0.15));
    color: var(--color-orange);
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(96, 165, 250, 0.15));
    color: var(--color-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(74, 222, 128, 0.15));
    color: var(--color-green);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.asset-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.25rem;
    margin-bottom: 0.35rem;
}

.icon-orange {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(251, 146, 60, 0.05));
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

.icon-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(96, 165, 250, 0.05));
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.icon-green {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(74, 222, 128, 0.05));
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.asset-icon-wrapper .icon {
    width: 26px;
    height: 26px;
}

.asset-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0;
    line-height: 1.2;
}

.asset-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.asset-main-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0;
    width: 100%;
}

.cdb-display {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(74, 222, 128, 0.02));
    border: 2px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    width: 100%;
}

.cdb-rate-large {
    font-family: 'JetBrains Mono', monospace;
    font-size: 2.375rem;
    font-weight: 800;
    color: var(--color-green);
    line-height: 1;
}

.cdb-rate-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

.asset-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5625rem;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1;
}

.asset-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
}

.asset-change.positive {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(74, 222, 128, 0.05));
    color: var(--color-green);
}

.asset-change.negative {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.05));
    color: var(--color-red);
}

.icon-change {
    width: 14px;
    height: 14px;
}

.asset-details {
    width: 100%;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid var(--color-border);
}

.detail-row.highlight {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), rgba(74, 222, 128, 0.02));
    margin: 0 -1.5rem;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    border: none;
}

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

.detail-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* ===== GRID DE CARDS ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    justify-items: stretch;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Centraliza último card se ficar sozinho */
.cards-grid > .card:last-child:nth-child(odd) {
    grid-column: span 1;
    max-width: 450px;
    width: 100%;
}

/* Para tela grande com 5 cards, coloca 3 em cima e 2 embaixo centralizados */
@media (min-width: 1200px) {
    #siglasGrid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    #siglasGrid > .card:nth-child(4),
    #siglasGrid > .card:nth-child(5) {
        max-width: none;
    }
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

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

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* ===== BOTÕES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn .icon {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

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

.btn-secondary:hover {
    background: white;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

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

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.04);
}

.btn-outline:hover {
    border-color: var(--info);
    color: var(--info);
}

/* ===== MODAIS ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: white;
    border-radius: 1rem;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: var(--transition);
}

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

.modal-close .icon {
    width: 24px;
    height: 24px;
}

.modal-body {
    padding: 2.5rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Formatação de conteúdo educacional nos modais */
.modal-body p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
    line-height: 1.7;
}

.modal-body p strong {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1.125rem;
    display: block;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

.modal-body h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.modal-body ul, .modal-body ol {
    margin: 1rem 0 1.5rem 0;
    padding-left: 1.5rem;
}

.modal-body li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    font-size: 0.9375rem;
}

.modal-body li strong {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 1rem;
    display: inline;
    margin: 0;
}

/* Alertas educacionais */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    border-left: 4px solid;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.alert .icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert div {
    flex: 1;
}

.alert strong {
    display: block;
    font-weight: 700;
    margin-bottom: 0.375rem;
    font-size: 1rem;
}

.alert-info {
    border-left-color: var(--info);
    background: rgba(59, 130, 246, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-info .icon {
    color: var(--info);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-success {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.alert-success .icon {
    color: var(--success);
}

.alert-warning {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.alert-warning .icon {
    color: var(--warning);
}

.alert-danger {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.alert-danger .icon {
    color: var(--danger);
}

/* Tabela de comparação */
.comparison-table {
    margin: 1.5rem 0;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-light);
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.comparison-item {
    padding: 1.25rem;
    background: white;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-light);
    transition: var(--transition-fast);
}

.comparison-item:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-card);
}

.comparison-item strong {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-light);
}

.comparison-item ul {
    margin: 0;
    padding-left: 1.25rem;
}

.comparison-item li {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* Utility classes */
.mt-3 {
    margin-top: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

/* ===== CARDS EDUCACIONAIS ===== */
.card-educational {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 360px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 251, 0.9) 100%);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-educational:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.educational-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.educational-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.educational-icon .icon {
    width: 30px;
    height: 30px;
    color: var(--accent-primary);
}

.educational-badge {
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-muito-baixo {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-baixo {
    background: rgba(52, 211, 153, 0.1);
    color: #10B981;
}

.badge-médio {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.badge-alto {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.badge-muito-alto {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.educational-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.educational-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 500;
}

.educational-summary {
    font-size: 0.875rem;
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.educational-footer {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.educational-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-value {
    font-size: 0.8125rem;
    color: var(--text-dark);
    font-weight: 600;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ===== TABELAS ===== */
.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

thead {
    background: var(--bg-surface);
    border-bottom: 2px solid var(--border-color);
}

th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--bg-surface);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    color: var(--text-dark);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--info);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert .icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ===== LOADING ===== */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--info);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
}

.loading-content .loading-spinner {
    width: 48px;
    height: 48px;
    border-width: 4px;
    margin-bottom: 1rem;
}

/* ===== UTILITÁRIOS ===== */
.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-info {
    color: var(--info) !important;
}

.text-muted {
    color: var(--text-light) !important;
}

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1100;
        box-shadow: none;
        transition: transform 0.3s ease;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1050;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1040;
        background: rgba(10, 14, 26, 0.9);
        backdrop-filter: blur(10px);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.75rem;
        border-radius: 12px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    /* Hero responsivo */
    .hero-section {
        height: 400px;
        background-attachment: scroll;
        padding: 1rem;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 1.875rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .content-body {
        padding: 1rem;
        max-width: 100%;
    }
    
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    /* Forçar grid responsivo */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Cards educacionais mobile */
    .card-educational {
        min-height: auto !important;
        padding: 1.5rem !important;
    }
    
    .educational-title {
        font-size: 1.125rem !important;
    }
    
    .educational-subtitle {
        font-size: 0.8125rem !important;
    }
    
    .educational-summary {
        font-size: 0.8125rem !important;
    }
    
    .educational-stats {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .stat-item {
        width: 100%;
    }
    
    /* Cards de assets mobile */
    .card-asset {
        padding: 1.25rem !important;
    }
    
    .asset-header h3 {
        font-size: 1rem !important;
    }
    
    .asset-price {
        font-size: 1.25rem !important;
    }
    
    /* Filtros mobile */
    .filters {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .form-input,
    #searchAssets {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .card.mb-3 > div {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .card.mb-3 > div > div {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    .card.mb-3 > div > div:last-child {
        text-align: left !important;
        margin-top: 0.5rem;
    }
    
    .btn-group {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-filter,
    .btn-outline {
        font-size: 0.8125rem;
        padding: 0.625rem 1rem;
        flex: 1;
        min-width: auto;
    }
    
    .btn-outline[data-filter] {
        flex: 1 1 calc(50% - 0.25rem);
        text-align: center;
    }
    
    /* Modal mobile */
    .modal {
        width: 95%;
        max-width: 95vw;
        max-height: 90vh;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .modal-header h3 {
        font-size: 1.125rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(90vh - 120px);
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* Tabelas mobile */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 0.8125rem;
        min-width: 500px;
    }
    
    table th,
    table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    #fiisTable {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #fiisTable table {
        min-width: 100%;
    }
    
    /* Gráficos mobile */
    .chart-container {
        height: 250px !important;
    }
    
    /* News cards mobile */
    .news-card {
        flex-direction: column;
    }
    
    .news-card img {
        width: 100%;
        height: 180px;
    }
    
    /* Calculadoras mobile */
    .calculators-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .calculator-form {
        padding: 1rem;
    }
    
    .calculator-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .calculator-tab {
        flex: 1;
        min-width: 45%;
        font-size: 0.8125rem;
        padding: 0.625rem 0.75rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.875rem;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .form-group input,
    .form-group select {
        width: 100%;
        font-size: 16px !important;
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .form-input {
        width: 100% !important;
    }
    
    /* Quiz mobile */
    .quiz-question {
        padding: 1rem;
    }
    
    .quiz-question h4 {
        font-size: 1rem;
    }
    
    .quiz-options label {
        font-size: 0.875rem;
        padding: 0.75rem;
    }
    
    /* Dashboard mobile específico */
    #page-dashboard .card.mb-3 {
        padding: 1rem !important;
    }
    
    #page-dashboard .card.mb-3 > div {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }
    
    #page-dashboard .card.mb-3 > div > div {
        width: 100% !important;
        margin-left: 0 !important;
    }
    
    #page-dashboard .card.mb-3 > div > div:first-child {
        width: 100% !important;
    }
    
    #page-dashboard .card.mb-3 input#searchAssets {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    
    #page-dashboard .card.mb-3 > div > div:nth-child(2) {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    #page-dashboard .card.mb-3 button[data-filter] {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
        padding: 0.625rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    #page-dashboard #assetsGrid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    #page-dashboard .dashboard-charts-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }
    
    .cards-grid {
        grid-template-columns: 1fr !important;
    }
    
    #cryptoChart,
    #fiisTable {
        max-height: 300px;
        overflow-y: auto;
    }
    
    #fiisTable table {
        font-size: 0.8125rem;
    }
    
    #fiisTable th,
    #fiisTable td {
        padding: 0.5rem !important;
    }
    
    #fiisTable th:nth-child(2),
    #fiisTable td:nth-child(2) {
        display: none;
    }
    
    /* Perfil - opções de radio mobile */
    #quizQuestions .form-group {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
        background: var(--bg-surface) !important;
    }
    
    #quizQuestions .form-group .form-label {
        font-size: 0.9375rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.4 !important;
    }
    
    #quizQuestions .form-group > div {
        margin-bottom: 0.625rem !important;
    }
    
    #quizQuestions .form-group > div > label {
        padding: 0.875rem !important;
        font-size: 0.875rem !important;
        display: flex !important;
        align-items: flex-start !important;
        border: 2px solid var(--border-color) !important;
        border-radius: 0.5rem !important;
        cursor: pointer !important;
        transition: var(--transition) !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }
    
    #quizQuestions .form-group > div > label:hover {
        border-color: var(--info) !important;
        background: rgba(59, 130, 246, 0.05) !important;
    }
    
    #quizQuestions .form-group > div > label input[type="radio"] {
        margin-right: 0.625rem !important;
        margin-top: 0.125rem !important;
        flex-shrink: 0 !important;
        width: 18px !important;
        height: 18px !important;
    }
    
    #quizQuestions .form-group > div > label span {
        line-height: 1.5 !important;
        font-size: 0.875rem !important;
        color: var(--text-dark) !important;
        flex: 1 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Cards do dashboard */
    .card-asset {
        padding: 1rem !important;
        min-height: auto !important;
    }
    
    .asset-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }
    
    .asset-info {
        width: 100%;
    }
    
    .asset-price {
        font-size: 1.5rem !important;
    }
    
    .asset-change {
        font-size: 0.875rem;
    }
    
    .asset-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    /* Perfil - opções de radio mais compactas no mobile */
    #quizQuestions .form-group {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    #quizQuestions .form-label {
        font-size: 0.9375rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    #quizQuestions .form-group > div {
        margin-bottom: 0.5rem !important;
    }
    
    #quizQuestions .form-group > div > label {
        padding: 0.625rem !important;
        font-size: 0.875rem !important;
    }
    
    #quizQuestions .form-group > div > label input[type="radio"] {
        margin-right: 0.5rem !important;
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
    
    #quizQuestions .form-group > div > label span {
        line-height: 1.4;
        font-size: 0.875rem !important;
    }
    
    .alert {
        padding: 1rem !important;
        gap: 0.75rem !important;
    }
    
    .alert .icon {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-value {
        font-size: 0.9375rem;
    }
    
    /* Calculadoras mobile */
    .calculator-form {
        padding: 1rem;
    }
    
    .calculator-result {
        padding: 1.5rem 1rem !important;
        margin-top: 1.5rem;
    }
    
    .result-value {
        font-size: 1.75rem !important;
    }
    
    .result-breakdown {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .breakdown-item {
        width: 100%;
        text-align: left !important;
    }
    
    /* Recomendações modal mobile */
    #welcomeModal .modal {
        width: 95%;
        padding: 0;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr !important;
    }
    
    .recommendation-card {
        padding: 1rem !important;
    }
    
    /* Botões mobile */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .btn-primary,
    .btn-outline {
        width: 100%;
    }
    
    /* Cards gerais mobile */
    .card {
        padding: 1.25rem;
    }
    
    .card-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .card-value {
        font-size: 1.5rem;
    }
    
    /* Inputs e selects mobile */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
    
    .form-control {
        padding: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Hero mobile pequeno */
    .hero-section {
        height: 450px;
        padding: 0.75rem;
    }
    
    .hero-content {
        padding: 0 0.75rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 0.875rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
        line-height: 1.5;
    }
    
    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 0.875rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .mobile-menu-toggle {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.625rem;
    }
    
    /* Dashboard filtros mobile pequeno */
    #page-dashboard .card.mb-3 button[data-filter] {
        flex: 1 1 100%;
        font-size: 0.8125rem;
    }
    
    #page-dashboard .card.mb-3 > div > div:last-child {
        text-align: left !important;
        font-size: 0.8125rem;
    }
    
    .content-body {
        padding: 0.75rem;
    }
    
    .card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    /* Dashboard mobile small */
    .cards-grid {
        gap: 0.75rem;
    }
    
    .card.mb-3 {
        padding: 0.875rem !important;
    }
    
    .btn-outline[data-filter] {
        flex: 1 1 100%;
        font-size: 0.8125rem;
    }
    
    #searchAssets {
        font-size: 14px !important;
        padding: 0.625rem !important;
    }
    
    #fiisTable table {
        font-size: 0.75rem;
    }
    
    #fiisTable th,
    #fiisTable td {
        padding: 0.375rem !important;
    }
    
    /* Calculadora mobile small */
    .calculator-tabs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .calculator-tab {
        width: 100%;
        text-align: center;
    }
    
    .form-group {
        margin-bottom: 0.875rem;
    }
    
    .form-group label {
        font-size: 0.8125rem;
        margin-bottom: 0.375rem;
    }
    
    .calculator-result {
        padding: 1.25rem 0.875rem !important;
    }
    
    .result-label {
        font-size: 0.8125rem;
    }
    
    .result-value {
        font-size: 1.5rem !important;
    }
    
    .card-educational {
        padding: 1.25rem !important;
    }
    
    .educational-header {
        margin-bottom: 1rem;
    }
    
    .educational-icon {
        width: 40px !important;
        height: 40px !important;
    }
    
    .educational-icon .icon {
        width: 20px !important;
        height: 20px !important;
    }
    
    .educational-title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem;
    }
    
    .educational-subtitle {
        font-size: 0.75rem !important;
    }
    
    .educational-summary {
        font-size: 0.75rem !important;
        line-height: 1.5;
    }
    
    .educational-badge {
        font-size: 0.625rem !important;
        padding: 0.25rem 0.5rem;
    }
    
    .stat-label {
        font-size: 0.625rem !important;
    }
    
    .stat-value {
        font-size: 0.75rem !important;
    }
    
    /* Assets cards mobile pequeno */
    .card-asset {
        padding: 1rem !important;
    }
    
    .asset-icon {
        width: 32px !important;
        height: 32px !important;
    }
    
    .asset-icon .icon {
        width: 16px !important;
        height: 16px !important;
    }
    
    .asset-header h3 {
        font-size: 0.9375rem !important;
    }
    
    .asset-symbol {
        font-size: 0.75rem !important;
    }
    
    .asset-price {
        font-size: 1.125rem !important;
    }
    
    .asset-change {
        font-size: 0.8125rem !important;
    }
    
    .asset-stats {
        gap: 0.5rem;
    }
    
    /* Modal muito pequeno */
    .modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    /* Filtros muito pequenos */
    .btn-filter,
    .btn-outline {
        font-size: 0.75rem;
        padding: 0.5rem 0.625rem;
    }
    
    /* Tabelas muito pequenas */
    table {
        font-size: 0.75rem;
    }
    
    table th,
    table td {
        padding: 0.375rem;
    }
    
    /* Botões muito pequenos */
    .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }
    
    /* News cards muito pequeno */
    .news-card {
        padding: 0.75rem;
    }
    
    .news-card h3 {
        font-size: 0.9375rem;
    }
    
    .news-card p {
        font-size: 0.75rem;
    }
    
    /* Calculadoras muito pequenas */
    .calculator-result {
        padding: 1rem;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    /* Página "Como Começar" mobile */
    .card h2 {
        font-size: 1.125rem !important;
    }
    
    .card h3 {
        font-size: 1rem !important;
    }
    
    .card h4 {
        font-size: 0.9375rem !important;
    }
    
    .card p {
        font-size: 0.8125rem !important;
        line-height: 1.6;
    }
    
    .card ul,
    .card ol {
        font-size: 0.8125rem !important;
    }
    
    /* Ícones numerados mobile */
    .card div[style*="width: 48px"] {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
    }
    
    .card div[style*="width: 48px"] span {
        font-size: 1.25rem !important;
    }
}

/* ===== SCROLLBAR CUSTOMIZADA ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--border-dark);
}

/* ===== AGENTE CONSULTOR FINANCEIRO ===== */
#agentModal .modal {
    max-width: 700px;
    max-height: 80vh !important;
    border-radius: 16px;
}

.agent-quick-btn {
    padding: 0.45rem 0.65rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-primary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.agent-quick-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.agent-chat-container {
    padding-bottom: 2rem;
}

.agent-message {
    margin-bottom: 1rem;
    display: flex;
    animation: slideIn 0.3s ease;
}

.agent-message-user {
    justify-content: flex-end;
}

.agent-message-bot {
    justify-content: flex-start;
}

.agent-message-content {
    max-width: 75%;
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    font-size: 0.9375rem;
    line-height: 1.6;
    word-wrap: break-word;
}

.agent-message-user .agent-message-content {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.agent-message-bot .agent-message-content {
    background: var(--bg-surface-elevated);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-card);
}

.agent-message-bot .agent-message-content strong {
    color: var(--accent-primary);
}

.agent-message-bot .agent-message-content p {
    margin: 0.5rem 0;
    line-height: 1.7;
}

.agent-message-bot .agent-message-content p:first-child {
    margin-top: 0;
}

.agent-message-bot .agent-message-content p:last-child {
    margin-bottom: 0;
}

.agent-message-bot .agent-message-content ul {
    list-style: none;
    margin: 0.75rem 0;
    padding: 0;
}

.agent-message-bot .agent-message-content li {
    position: relative;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
    line-height: 1.6;
}

.agent-message-bot .agent-message-content li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--accent-primary);
    font-weight: bold;
}

.typing-indicator-agent {
    display: flex;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: typingDot 1.4s infinite;
    margin-right: 4px;
}

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

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

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

.agent-input-container input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Mobile */
@media (max-width: 768px) {
    #agentModal .modal {
        max-width: 100% !important;
        width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        margin: 0;
        border-radius: 0;
    }
    
    #agentModal .modal-header {
        padding: 1.5rem 3rem 1.5rem 1.25rem !important;
        position: relative;
    }
    
    #agentModal .modal-close {
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
    }
    
    #welcomeModal .modal-header {
        padding: 1.5rem 3rem 1.5rem 1.5rem !important;
        position: relative;
    }
    
    #welcomeModal .modal-close {
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
    }
    
    #modalOverlay .modal-header {
        padding: 1.5rem 3rem 1.5rem 1.5rem !important;
        position: relative;
    }
    
    #modalOverlay .modal-close {
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
    }
    
    .modal-header h3 {
        font-size: 1rem !important;
    }
    
    .modal-header p {
        font-size: 0.75rem !important;
    }
    
    .modal-header > div:first-child > div:first-child {
        width: 36px !important;
        height: 36px !important;
    }
    
    .agent-message-content {
        max-width: 85%;
        font-size: 0.875rem;
        padding: 0.75rem 0.875rem;
    }
    
    .agent-quick-actions {
        padding: 0.625rem 0.75rem;
        gap: 0.25rem;
    }
    
    .agent-quick-btn {
        font-size: 0;
        padding: 0.5rem;
        min-width: 40px;
    }
    
    .agent-quick-btn .icon {
        width: 18px !important;
        height: 18px !important;
    }
    
    .agent-quick-btn .btn-text {
        display: none;
    }
    
    .agent-welcome {
        padding: 0.5rem 0.75rem 1rem !important;
    }
    
    .agent-welcome > div:first-child {
        width: 64px !important;
        height: 64px !important;
        margin-bottom: 0.75rem !important;
    }
    
    .agent-welcome h3 {
        font-size: 1.0625rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .agent-welcome p {
        font-size: 0.8125rem !important;
        line-height: 1.5 !important;
    }
    
    .agent-welcome > div:last-child {
        margin-top: 1rem !important;
        padding: 0.75rem 1rem !important;
    }
    
    .agent-input-container {
        padding: 0.875rem !important;
    }
    
    .agent-input-container input {
        font-size: 16px !important; /* Previne zoom no iOS */
        padding: 0.75rem 1rem !important;
    }
    
    .agent-input-container button {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
    }
    
    .agent-chat-container {
        padding: 1rem !important;
    }
}

@media (max-width: 480px) {
    .agent-message-content {
        max-width: 90%;
    }
    
    .agent-quick-btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
}

/* ===== ANIMAÇÃO BOTÃO RAFAELO ===== */
@keyframes rafaelo-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5), 0 0 30px rgba(99, 102, 241, 0.3);
    }
}

@keyframes rafaelo-glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.15);
    }
}

.rafaelo-btn {
    animation: rafaelo-pulse 2s ease-in-out infinite, rafaelo-glow 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.rafaelo-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    border-radius: inherit;
    animation: rafaelo-ripple 2s ease-out infinite;
}

@keyframes rafaelo-ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.rafaelo-btn:hover {
    animation-play-state: paused;
}

