/* Tooltips robustos (todos temas) */
.tooltip {
  z-index: 3000 !important;
}

/* CTA section readability (light) */
.cta-section .card-body { color: #fff; }
.cta-section .card-body .lead,
.cta-section .card-body h2,
.cta-section .card-body p { color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,0.35); }

/* Online green dot (global) */
.dot-online { display:inline-block; width:8px; height:8px; border-radius:50%; background:#10b981; box-shadow:0 0 0 0 rgba(16,185,129,.6); animation: pulse 1.6s infinite; vertical-align:middle; margin-right:6px; position: relative; top: -1px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.6); } 70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.tooltip .tooltip-inner {
  max-width: 280px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  padding: 8px 10px;
}
.snapshot-tip .tooltip-inner { min-width: 240px; max-width: 360px; padding: 10px 12px; border-radius: 10px; white-space: normal; }
.snap-tip { display:block; }
.snap-tip .snap-head { font-weight: 700; font-size: 12px; opacity: .8; margin-bottom: 6px; }
.snap-tip .snap-name { font-weight: 600; margin-bottom: 6px; }
.snap-tip .snap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.snap-tip .snap-grid .lbl { font-size: 11px; color: var(--text-secondary); display:block; }
.snap-tip .snap-grid .val { font-size: 12px; font-weight: 700; display:block; }
.snap-tip .snap-grid .val.pos { color: #37ed00; }
.snap-tip .snap-grid .val.neg { color: #FF0000; }
.snap-tip .snap-grid .val.neu { color: var(--text-primary); }
.snapcam { font-size: 12px; color: var(--text-secondary); opacity: .7; cursor: help; vertical-align: middle; }
.snapcam:hover { opacity: 1; }
html.light .tooltip .tooltip-inner {
  background: rgba(22, 27, 34, 0.92);
  color: #fff;
}
html.dark-blue .tooltip .tooltip-inner,
html.all-black .tooltip .tooltip-inner {
  background: rgba(255,255,255,0.96);
  color: #0b1220;
  border: 1px solid rgba(0,0,0,0.08);
}
.tooltip.bs-tooltip-top .tooltip-arrow::before,
.tooltip.bs-tooltip-bottom .tooltip-arrow::before,
.tooltip.bs-tooltip-start .tooltip-arrow::before,
.tooltip.bs-tooltip-end .tooltip-arrow::before {
  border-style: solid;
}
html.light .tooltip.bs-tooltip-top .tooltip-arrow::before { border-top-color: rgba(22,27,34,0.92) !important; }
html.light .tooltip.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: rgba(22,27,34,0.92) !important; }
html.light .tooltip.bs-tooltip-start .tooltip-arrow::before { border-left-color: rgba(22,27,34,0.92) !important; }
html.light .tooltip.bs-tooltip-end .tooltip-arrow::before { border-right-color: rgba(22,27,34,0.92) !important; }
html.dark-blue .tooltip.bs-tooltip-top .tooltip-arrow::before,
html.all-black .tooltip.bs-tooltip-top .tooltip-arrow::before { border-top-color: rgba(255,255,255,0.96) !important; }
html.dark-blue .tooltip.bs-tooltip-bottom .tooltip-arrow::before,
html.all-black .tooltip.bs-tooltip-bottom .tooltip-arrow::before { border-bottom-color: rgba(255,255,255,0.96) !important; }
html.dark-blue .tooltip.bs-tooltip-start .tooltip-arrow::before,
html.all-black .tooltip.bs-tooltip-start .tooltip-arrow::before { border-left-color: rgba(255,255,255,0.96) !important; }
html.dark-blue .tooltip.bs-tooltip-end .tooltip-arrow::before,
html.all-black .tooltip.bs-tooltip-end .tooltip-arrow::before { border-right-color: rgba(255,255,255,0.96) !important; }

/* Evitar que tooltips fiquem sob headers ou cards */
.card .tooltip { z-index: 3001 !important; }
.navbar .tooltip { z-index: 3002 !important; }

/* Baixar levemente os cards de cotação da index para alinhamento visual */
.home-preview-cards { margin-top: 6px; }
@media (min-width: 992px) { /* desktop */
  .home-preview-cards { margin-top: 18px; }
}
/**
 * Terminal Operebem - Main CSS
 * Modern UI with animations and dark theme support
 */

/* Reset e configurações base */
* {
    box-sizing: border-box;
}

/* Cores garantidas para variação */
.text-success, .text-success-alt { color: #37ed00 !important; }
.text-danger { color: #FF0000 !important; }
.text-neutral { color: var(--text-primary, #000000) !important; }

/* Home preview: garantir que não haja fundo no TD (somente o texto muda de cor) */
.home-preview-cards td,
.home-preview-cards td * {
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

.home-preview-cards table {
    --bs-table-bg: transparent !important;
    --bs-table-striped-bg: transparent !important;
    --bs-table-hover-bg: transparent !important;
    --bs-table-active-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
}

/* Cobre seletor do Bootstrap para células: table > :not(caption) > * > * */
.home-preview-cards .table > :not(caption) > * > * {
    background-color: transparent !important;
    box-shadow: none !important;
}

.home-preview-cards .table td::before,
.home-preview-cards .table td::after,
.home-preview-cards .table tr::before,
.home-preview-cards .table tr::after {
    background: transparent !important;
}

.home-preview-cards .bg-success,
.home-preview-cards .bg-success-subtle,
.home-preview-cards .table-success,
.home-preview-cards .bg-danger,
.home-preview-cards .bg-danger-subtle,
.home-preview-cards .table-danger {
    background-color: transparent !important;
}

/* Flash de atualização para valores (cor do TEXTO) */
.flash-green { animation: flashColorGreen 1.5s ease; }
.flash-red { animation: flashColorRed 1.5s ease; }
/* garantir que nenhum fundo seja aplicado no flash */
.flash-green, .flash-red { background: transparent !important; }
@keyframes flashColorGreen { 0% { color: #37ed00; } 100% { color: var(--text-primary); } }
@keyframes flashColorRed { 0% { color: #FF0000; } 100% { color: var(--text-primary); } }

/* Versões exclusivas para texto (evitar conflito com animações antigas de fundo) */
.text-flash-up { animation: flashColorGreen 1.5s ease; background: transparent !important; }
.text-flash-down { animation: flashColorRed 1.5s ease; background: transparent !important; }

/* Status bubble (mercado) */
.status-bubble {
    position: relative;
    width: 10px; /* hitbox maior para hover */
    height: 10px; /* hitbox maior para hover */
    display: inline-block;
    vertical-align: middle;
    opacity: .6;
}
.status-bubble::after{
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px; /* visual original */
    height: 5px; /* visual original */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background-color: #999; /* default */
}
.status-bubble:hover { cursor: pointer; }
.status-bubble.active::after { background-color: #00bf63; }
.status-bubble.close::after { background-color: #999; }
.status-bubble.after-hours::after { background-color: #0d47a1; }
.status-bubble.pre-market::after { background-color: #fbbf24; }

/* Tooltips globais baseadas em data-tooltip */
.tooltip-target, .tooltip-target-left {
    position: relative;
    cursor: help;
}
.tooltip-target:hover::after,
.tooltip-target-left:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 30%;
  transform: translateX(0%);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 1;
  visibility: visible;
  font-weight: 600;
  font-size: 12px;
  transition: opacity 0.15s ease;
  z-index: 9999;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  border: 1px solid var(--border-color);
}
.tooltip-target-left:hover::after {
    left: auto;
    right: 0;
}

/* Quando o elemento também usa Bootstrap tooltip, não renderizar pseudo-tooltip */
.tooltip-target[data-bs-toggle="tooltip"]::after,
.tooltip-target-left[data-bs-toggle="tooltip"]::after {
    content: none !important;
    display: none !important;
}

/* Evitar recorte de tooltips (manter .card com overflow padrão para preservar bordas arredondadas) */
.card-body, .card .table, .card .table-responsive { overflow: visible; }

/* Cor neutra (para variação = 0%) */
.text-neutral { color: #000 !important; }
html.dark .text-neutral { color: var(--text-primary) !important; }

/* Theme toggle button (circular) */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: all 0.2s ease;
}
.theme-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}
.theme-toggle-btn i { font-size: 14px; }

/* Flash de atualização de cotações */
.flash-green {
    animation: flashGreen 1.5s ease;
}
.flash-red {
    animation: flashRed 1.5s ease;
}
@keyframes flashGreen {
    0% { background-color: rgba(34,197,94,0.25); }
    100% { background-color: transparent; }
}
@keyframes flashRed {
    0% { background-color: rgba(239,68,68,0.25); }
    100% { background-color: transparent; }
}

*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Variáveis CSS para temas */
:root {
    /* Cores principais - Azul moderno */
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #1e293b;
    /* Compat token used by legacy focus rules */
    --secondary-color: var(--primary);
    --secondary-light: #334155;
    
    /* Cores de status */
    --success: #10b981;
    --success-light: #34d399;
    --danger: #ef4444;
    --danger-light: #f87171;
    --warning: #f59e0b;
    --warning-light: #fbbf24;
    --info: #06b6d4;
    --info-light: #22d3ee;
    
    /* Cores neutras */
    --light: #f8fafc;
    --dark: #0f172a;
    --white: #ffffff;
    --black: #000000;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --gradient-secondary: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
}

/* Light Theme Variables */
html.light {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --sidebar-bg: #f8fafc;
    --input-bg: #ffffff;
    --modal-bg: #ffffff;
    --overlay-bg: rgba(0, 0, 0, 0.5);
}

/* Dark Theme Variables */
html.dark {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --navbar-bg: rgba(15, 23, 42, 0.95);
    --sidebar-bg: #1e293b;
    --input-bg: #334155;
    --modal-bg: #1e293b;
    --overlay-bg: rgba(0, 0, 0, 0.7);
}

/* Dark Blue Theme Variables (Legacy) */
html.dark-blue {
    /* Profound Navy-inspired palette */
    --bg-primary: #0b1220;      /* base background */
    --bg-secondary: #0f1e33;    /* cards/sections */
    --bg-tertiary: #15253b;     /* subtle surfaces */
    --text-primary: #e6f0ff;    /* high contrast text */
    --text-secondary: #b5c7e3;  /* secondary text */
    --text-muted: #8fa4c2;      /* muted text */
    --border-color: #20354e;    /* separators */
    --card-bg: #0f1e33;         /* card body */
    --navbar-bg: rgba(15, 30, 51, 0.92);
    --sidebar-bg: #0f1e33;
    --input-bg: #15253b;        /* inputs */
    --modal-bg: #0f1e33;
    --overlay-bg: rgba(4, 10, 20, 0.7);
}

/* All Black Theme Variables (Legacy) */
html.all-black {
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #222222;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --border-color: #333333;
    --card-bg: #111111;
    --navbar-bg: rgba(26, 26, 26, 0.95);
    --sidebar-bg: #111111;
    --input-bg: #333333;
    --modal-bg: #111111;
    --overlay-bg: rgba(0, 0, 0, 0.8);
}

/* Aplicar variáveis aos elementos */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    font-variant-numeric: tabular-nums;
}

/* Animações base */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

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

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

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

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

/* Classes de animação */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Delays para animações sequenciais */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    background: transparent;
    opacity: 0;
    transition: none;
}

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

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

.card-header {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: var(--space-lg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    font-weight: 600;
}

.card-body {
    padding: var(--space-xl);
}

.card-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-lg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Removed conflicting CSS - using .modern-header instead */

/* Removed conflicting CSS - using .modern-header .nav-link instead */

/* Forms */
.form-control,
.form-select {
    background-color: var(--input-bg);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    transition: var(--transition);
    border-radius: var(--radius);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.95rem;
    position: relative;
}

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

.form-control::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.form-control:focus::placeholder {
    color: var(--text-secondary);
}

.form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: var(--space-xs);
}

/* Input Groups */
.input-group {
    position: relative;
}

.input-group-text {
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius) 0 0 var(--radius);
    transition: var(--transition);
}

.input-group .input-group-text + .form-control {
    border-left: none;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.input-group .input-group-text + .form-control:focus {
    border-left: none;
}

.input-group .form-control:focus + .input-group-text,
.input-group .form-control:focus ~ .input-group-text {
    border-color: var(--primary);
    color: var(--primary);
}

/* Form Validation */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--success);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='m2.3 6.73.94-.94 1.88 1.88L8.73 4.5l.94.94L4.12 10.5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--danger);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ef4444'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4 1.4-1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
}

.valid-feedback,
.invalid-feedback {
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: var(--space-xs);
}

.valid-feedback {
    color: var(--success);
}

.invalid-feedback {
    color: var(--danger);
}

/* Buttons */
.btn {
    transition: var(--transition);
    font-weight: 600;
    border-radius: var(--radius);
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.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: var(--transition);
}

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

.btn-primary {
    background: var(--gradient-primary);
    border-color: var(--primary);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

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

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* Provider-style sign-in button (similar to Google) */
.btn-terminal-signin {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    letter-spacing: 0;
}
.btn-terminal-signin:hover {
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.btn-terminal-signin:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}
/* refine provider-style details */
.btn-terminal-signin {
    text-transform: none !important;
    padding: 10px 16px;
}
.btn-terminal-signin img { width: 18px; height: 18px; }
.btn-terminal-signin:focus { outline: none; box-shadow: 0 0 0 3px rgba(59,130,246,0.18); }

/* Theming for logged-in navbar */
.navbar-auth {
    background-color: var(--navbar-bg) !important;
    border-bottom: 1px solid var(--border-color);
}
.navbar-auth .navbar-brand,
.navbar-auth .nav-link {
    color: var(--text-primary) !important;
}
.navbar-auth .nav-link:hover { color: var(--primary) !important; }

/* Offcanvas (mobile) theming */
.offcanvas { background-color: var(--modal-bg); color: var(--text-primary); }
.offcanvas .offcanvas-title { color: var(--text-primary); }
.offcanvas .nav-link { color: var(--text-primary); }
.offcanvas .nav-link:hover { background-color: var(--bg-tertiary); }

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%);
    border-color: var(--success);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, var(--success) 100%);
    border-color: #059669;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, var(--danger-light) 100%);
    border-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, var(--danger) 100%);
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-lg {
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

/* Extra compact buttons (header/index CTAs) */
.btn-compact {
    padding: 6px 10px !important;
    font-size: 0.78rem !important;
    line-height: 1.1 !important;
    border-radius: 8px !important;
}

/* Button States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: var(--shadow-sm);
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Dropdowns */
.dropdown-menu {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: var(--shadow);
    z-index: 2000 !important; /* garantir acima de iframes/widgets */
}

.dropdown-item {
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.dropdown-divider {
    border-top-color: var(--border-color);
}

/* Modals */
.modal {
    backdrop-filter: blur(5px);
}

/* Garantir que navbar e dropdowns fiquem acima de iframes/widgets (TradingView) */
.navbar,
.navbar.navbar-auth {
    position: relative;
    z-index: 1100; /* acima do backdrop padrão */
}

.tradingview-widget-container,
.tradingview-widget-container__widget,
.tradingview-widget-container iframe {
    z-index: 0 !important; /* manter atrás dos overlays */
}

/* TradingView – Glassmorphism bar abaixo do header */
.tv-glass {
    background: transparent; /* remover fundo */
    -webkit-backdrop-filter: blur(8px); /* manter leve blur sem cor de fundo */
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 0;
    box-shadow: none;
    /* Header spacer já está no layout; usar margem mínima */
    margin: 2px auto;
    min-height: 46px; /* reserva altura do ticker */
    padding: 0;
    position: relative;
    overflow: hidden;
}
.tv-glass .tradingview-widget-container__widget { opacity: 0.96; background: transparent !important; }
/* Garantir que o wrapper do widget também não aplique fundo */
.tv-glass .tradingview-widget-container { background: transparent !important; }
html.dark .tv-glass { background: transparent; }
html.dark .tv-glass .tradingview-widget-container__widget { opacity: 0.98; }

/* Bunny video: unclickable, fills container */
.bunny-hero-video .ratio { border-radius: 12px; overflow: hidden; }
.bunny-hero-video iframe { width: 100%; height: 100%; pointer-events: none; }

/* Evitar que o widget cubra dropdowns/menus */
.tv-glass,
.tv-glass * { z-index: 500; }
.navbar, .dropdown-menu { z-index: 1100; }

/* Garantir tooltips/popovers acima de cards e modais */
.tooltip { z-index: 2050 !important; }
.popover { z-index: 2050 !important; }

.modal-content {
    background-color: var(--modal-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    animation: scaleIn 0.3s ease-out;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-xl);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.modal-title {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-xl);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: var(--space-xl);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    background-color: var(--bg-secondary);
}

/* Modal sizing & polish (Terminal-like) */
#loginModal .modal-dialog { max-width: 480px; }
#registerModal .modal-dialog { max-width: 860px; }
#registerModal .badge.active { background: var(--primary) !important; color: #fff !important; }
.modal .form-label { font-weight: 600; }
.modal .input-group-text, .modal .form-control { border-width: 2px; }

.btn-close {
    filter: var(--bs-btn-close-white-filter, none);
    opacity: 0.7;
    transition: var(--transition);
    border-radius: var(--radius);
    padding: var(--space-sm);
}

.btn-close:hover {
    opacity: 1;
    background-color: var(--bg-tertiary);
}

html.dark .btn-close,
html.dark-blue .btn-close,
html.all-black .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Modal Backdrop */
.modal-backdrop {
    background-color: var(--overlay-bg);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.step-indicator .badge {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    transition: var(--transition);
}

.step-indicator .badge.bg-primary {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow);
}

.step-indicator .badge.bg-success {
    background: linear-gradient(135deg, var(--success) 0%, var(--success-light) 100%) !important;
    box-shadow: var(--shadow);
}

.step-indicator .badge.bg-secondary {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-muted) !important;
}

.step-indicator span:not(.badge) {
    color: var(--text-muted);
    font-weight: 600;
    margin: 0 var(--space-sm);
}

/* Tables */
.table {
    color: var(--text-primary);
}

/* Forçar cards do dashboard a respeitar tema no corpo e tabelas */
.card .card-body { background-color: var(--card-bg) !important; }
.card .table { --bs-table-bg: transparent !important; color: var(--text-primary) !important; }
.card .table > :not(caption) > * > * { background-color: transparent !important; color: var(--text-primary) !important; border-color: var(--border-color) !important; }
.card .table thead th { color: var(--text-primary) !important; border-color: var(--border-color) !important; }

.table th {
    border-top-color: var(--border-color);
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

.table td {
    border-top-color: var(--border-color);
}

.table-striped > tbody > tr:nth-of-type(odd) > td,
.table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: var(--bg-secondary);
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Alerts */
.alert {
    border-color: var(--border-color);
}

/* Progress bars */
.progress {
    background-color: var(--bg-secondary);
}

/* Borders */
.border {
    border-color: var(--border-color) !important;
}

.border-top {
    border-top-color: var(--border-color) !important;
}

.border-bottom {
    border-bottom-color: var(--border-color) !important;
}

.border-start {
    border-left-color: var(--border-color) !important;
}

.border-end {
    border-right-color: var(--border-color) !important;
}

/* Text colors */
.text-muted {
    color: var(--text-muted) !important;
}

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

/* Custom Components */

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Toast Notifications */
.toast-notification {
    min-width: 300px;
    max-width: 500px;
    z-index: 9999;
}

/* Hero Section */
.hero-section {
    background: var(--hero-bg, linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%));
    min-height: calc(100vh - var(--header-height, 80px) - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 24px; /* reduzir ainda mais a distância entre ticker e hero */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%" r="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/><circle cx="900" cy="800" r="80" fill="url(%23a)"/></svg>');
    opacity: 0.3;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    animation: float 20s ease-in-out infinite;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-section .container { position: relative; z-index: 3; }
.hero-video-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-video-bg iframe { position: absolute; top: 50%; left: 50%; width: 177.78vh; height: 100vh; min-width: 100%; min-height: 100%; border: 0; filter: blur(3px) brightness(0.78) saturate(105%); transform: translate(-50%, -50%) scale(1.04); transform-origin: center; }

/* Hero background (no video) */
.hero-bg {
    background:
      radial-gradient(1200px 600px at -10% -20%, rgba(59,130,246,0.10), transparent 60%),
      linear-gradient(180deg, rgba(59,130,246,0.06), transparent 55%);
    position: relative;
}
html.dark .hero-bg {
    background:
      radial-gradient(1200px 600px at -10% -20%, rgba(59,130,246,0.12), transparent 60%),
      linear-gradient(180deg, rgba(2,6,23,0.6), rgba(2,6,23,0.0) 60%);
}

.header-spacer { display: block; width: 100%; flex-shrink: 0; }

.hero-title { 
    font-size: clamp(2.25rem, 4.5vw, 3.5rem); 
    line-height: 1.1; 
    letter-spacing: -0.02em; 
    margin-bottom: 0.75rem; 
}

.hero-subtitle { 
    font-size: clamp(1rem, 1.3vw, 1.25rem); 
    max-width: 58ch; 
    color: var(--text-secondary); 
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.cta-buttons .btn { 
    padding: 0.65rem 1.25rem; 
    border-width: 2px; 
}

.hero-stats { 
    gap: 0.75rem; 
}

.hero-stats .hero-stat-card { 
    border-radius: 12px; 
    backdrop-filter: blur(2px); 
}

.hero-stats .hero-stat-number { 
    font-size: 1.125rem; 
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1e293b !important;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748b !important;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #374151 !important;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

/* Hero Stats - Cards Ovais */
.hero-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-stat-card {
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.35);
    transition: all 0.25s ease;
    min-width: 180px;
    position: relative;
    overflow: hidden;
}

.hero-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
}

.hero-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.hero-stat-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

html.light .hero-stat-icon { box-shadow: none; }

.hero-stat-content { position: relative; z-index: 1; }

.hero-stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af !important;
    margin-bottom: 0.1rem;
    line-height: 1.1;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: #475569 !important;
    font-weight: 600;
    line-height: 1.2;
}

/* Dashboard Preview Styles */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
}

.dashboard-preview {
    background: white !important;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: all 0.3s ease;
}

.dashboard-preview:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.preview-header {
    background: #f8fafc !important;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0;
}

.preview-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.preview-title {
    font-weight: 600;
    color: #374151 !important;
    font-size: 0.875rem;
}

.preview-content {
    padding: 1.5rem;
}

.chart-container {
    height: 200px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.chart-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
    border-radius: 1px;
    animation: chartMove 3s ease-in-out infinite;
}

.chart-line:nth-child(1) {
    top: 30%;
    width: 60%;
    animation-delay: 0s;
}

.chart-line:nth-child(2) {
    top: 50%;
    width: 80%;
    animation-delay: 0.5s;
}

.chart-line:nth-child(3) {
    top: 70%;
    width: 70%;
    animation-delay: 1s;
}

@keyframes chartMove {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.metric-card {
    background: #f8fafc !important;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af !important;
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.75rem;
    color: #64748b !important;
    font-weight: 500;
}

/* Removed conflicting CSS - using .hero-title instead */

/* Removed conflicting CSS - using .hero-subtitle instead */

/* Removed conflicting CSS - using the first .feature-item definition */

/* Dashboard Preview */
.dashboard-preview {
    position: relative;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.dashboard-preview .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
    animation: float 6s ease-in-out infinite;
}

.chart-placeholder {
    text-align: center;
    padding: var(--space-2xl);
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.chart-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    animation: shimmer 3s infinite;
}

.chart-placeholder i {
    color: var(--primary);
    position: relative;
    z-index: 2;
}

/* Cards "voando" (leve flutuação e deslocamento) */
.home-preview-cards .card.fly-card {
    will-change: transform;
    animation-name: cardFloat;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    transform: translate3d(0,0,0);
}
.home-preview-cards .card.fly-1 { animation-duration: 6s; animation-delay: 0.2s; }
.home-preview-cards .card.fly-2 { animation-duration: 7s; animation-delay: 0.6s; }
.home-preview-cards .card.fly-3 { animation-duration: 8s; animation-delay: 1s; }

@keyframes cardFloat {
    0%   { transform: translate3d(0, 0, 0) rotate(0.05deg); }
    50%  { transform: translate3d(8px, -10px, 0) rotate(0.4deg); }
    100% { transform: translate3d(0, 0, 0) rotate(0.05deg); }
}

/* FAQ moderno */
.faq-section {
    background: #000000;
    padding: 80px 0 !important;
}
.faq-section .title_login {
    color: #ffffff;
}
.faq-section .accordion-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}
.faq-section .accordion-item:last-child {
    margin-bottom: 0;
}
.faq-section .accordion-button {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem 1.25rem;
}
.faq-section .accordion-button:not(.collapsed) {
    color: var(--text-primary);
    box-shadow: none;
}
.faq-section .accordion-body {
    background: var(--card-bg);
    color: var(--text-secondary);
    padding: 1rem 1.25rem;
}
.faq-section .accordion-button::after {
    filter: brightness(0) invert(0.3);
}
html.dark .faq-section .accordion-button::after,
html.dark-blue .faq-section .accordion-button::after,
html.all-black .faq-section .accordion-button::after {
    filter: invert(1) brightness(0.9);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    z-index: 1000;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: var(--space-sm);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.theme-toggle button {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    padding: var(--space-sm);
    border-radius: var(--radius);
    transition: var(--transition);
}

.theme-toggle button:hover {
    background-color: var(--bg-secondary);
    color: var(--primary);
}

/* Dashboard Specific */
.dashboard-card {
    transition: var(--transition-fast);
}

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

.metric-card {
    text-align: center;
    padding: 1.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Profile Page */
.theme-preview {
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid transparent;
}

.theme-preview:hover {
    transform: scale(1.02);
}

.theme-option input:checked + label .theme-preview {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
}

.password-strength .progress {
    height: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding-top: 60px;
        min-height: auto;
    }
    
    .hero-content {
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stat-card {
        min-width: 250px;
        padding: 1.25rem 1.75rem;
    }
    
    .dashboard-preview {
        transform: none;
        max-width: 100%;
    }
    
    .modern-header .navbar {
        min-height: 60px;
        padding: 0.5rem 0;
    }
    
    .modern-header .navbar-brand {
        font-size: 1.25rem;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-features {
        gap: 0.8rem;
    }
    
    .hero-visual {
        padding-top: 0.8rem;
    }
    
    .dashboard-preview {
        max-width: 100%;
        transform: none;
        box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    }
    
    .preview-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-features {
        gap: 0.6rem;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-visual {
        padding-top: 0.5rem;
    }
    
    .dashboard-preview {
        max-width: 100%;
        transform: none;
        box-shadow: 0 10px 24px rgba(0,0,0,0.12);
    }
    
    .preview-title {
        font-size: 0.8rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-stat-number { 
        font-size: clamp(1rem, 4.2vw, 1.25rem); 
    }
    
    .hero-stat-label { 
        font-size: clamp(0.7rem, 3.4vw, 0.8rem); 
    }
}

@media (max-width: 360px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* ========================================
   MODERN HEADER/NAVIGATION
   ======================================== */

.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* Glassmorphism branco (mais translúcido) */
    background: rgba(255, 255, 255, 0.60) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.modern-header .navbar {
    padding: 0.75rem 0;
    min-height: 70px;
}

.modern-header .navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af !important;
    text-shadow: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modern-header .navbar-brand:hover {
    transform: scale(1.02);
    color: #1e40af !important;
}

.modern-header .brand-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modern-header .brand-icon svg {
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.modern-header .brand-text {
    margin-left: 0.5rem;
    color: #1e40af;
}

.modern-header .nav-link {
    color: #1e40af !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.modern-header .nav-link:hover {
    color: #1e40af !important;
    background: rgba(30, 64, 175, 0.08);
    transform: translateY(-2px);
}

.modern-header .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: rgba(30, 64, 175, 0.5);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.modern-header .nav-link:hover::after {
    width: 80%;
}

.modern-header .navbar-toggler {
    border: none;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
}

.modern-header .navbar-toggler:focus {
    box-shadow: none;
}

.modern-header .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2830, 64, 175, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.modern-header .navbar-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modern-header .navbar-auth .btn {
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.modern-header .navbar-auth .btn-outline-light {
    color: #1e40af;
    border-color: #1e40af;
    background: transparent;
}

.modern-header .navbar-auth .btn-outline-light:hover {
    background: #1e40af;
    color: #ffffff;
    border-color: #1e40af;
    transform: translateY(-2px);
    outline: none;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.25);
}

.modern-header .navbar-auth .btn-light {
    background: white;
    color: #1e40af;
    border-color: white;
}

.modern-header .navbar-auth .btn-light:hover {
    background: #f0f9ff;
    color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .modern-header .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 10px;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
        border: 1px solid #e5e7eb;
    }
    .modern-header .navbar-collapse .navbar-nav {
        margin-bottom: 0;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: .5rem;
    }
    
    .modern-header .navbar-auth {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Scroll effect */
.modern-header.scrolled {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

/* ========================================
   OVERLAY PRIORITY (modals, dropdowns x iframes)
   ======================================== */
/* Modais e backdrop acima de qualquer widget/iframe */
.modal-backdrop { z-index: 2050 !important; }
.modal { z-index: 2060 !important; }
.modal-tooltips-hidden .tooltip { display: none !important; }
/* Dropdown de usuário acima dos widgets */
.dropdown-menu { z-index: 2000 !important; }
/* Manter iframes/widgets abaixo dos overlays */
.tradingview-widget-container,
.tradingview-widget-container__widget,
.tradingview-widget-container iframe {
  z-index: 1 !important;
}

/* ========================================
   ANIMATED BACKGROUND
   ======================================== */

.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(30, 64, 175, 0.2));
    backdrop-filter: blur(1px);
    animation: floatRotate 60s infinite linear;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: -10%;
    animation-duration: 60s;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: -5%;
    animation-duration: 45s;
    animation-delay: -15s;
    animation-direction: reverse;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 30%;
    right: 20%;
    animation-duration: 40s;
    animation-delay: -30s;
}

.circle-4 {
    width: 250px;
    height: 250px;
    bottom: 20%;
    left: 10%;
    animation-duration: 50s;
    animation-delay: -20s;
    animation-direction: reverse;
}

.circle-5 {
    width: 180px;
    height: 180px;
    top: 70%;
    left: 50%;
    animation-duration: 35s;
    animation-delay: -10s;
}

.circle-6 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 70%;
    animation-duration: 25s;
    animation-delay: -5s;
    animation-direction: reverse;
}

.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(59, 130, 246, 0.6);
    border-radius: 50%;
    animation: particleFloat 20s infinite linear;
}

.particle-1 {
    top: 20%;
    left: 20%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.particle-2 {
    top: 40%;
    left: 80%;
    animation-delay: -5s;
    animation-duration: 18s;
}

.particle-3 {
    top: 60%;
    left: 30%;
    animation-delay: -10s;
    animation-duration: 12s;
}

.particle-4 {
    top: 80%;
    left: 70%;
    animation-delay: -15s;
    animation-duration: 16s;
}

.particle-5 {
    top: 30%;
    left: 60%;
    animation-delay: -8s;
    animation-duration: 14s;
}

.particle-6 {
    top: 50%;
    left: 10%;
    animation-delay: -12s;
    animation-duration: 20s;
}

/* Animações */
@keyframes floatRotate {
    0% {
        transform: rotate(0deg) translateX(0px) translateY(0px);
    }
    25% {
        transform: rotate(90deg) translateX(20px) translateY(-10px);
    }
    50% {
        transform: rotate(180deg) translateX(0px) translateY(-20px);
    }
    75% {
        transform: rotate(270deg) translateX(-20px) translateY(-10px);
    }
    100% {
        transform: rotate(360deg) translateX(0px) translateY(0px);
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-40px) translateX(0px);
        opacity: 0.6;
    }
    75% {
        transform: translateY(-20px) translateX(-10px);
        opacity: 0.9;
    }
    100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.3;
    }
}

/* Responsive adjustments for background */
@media (max-width: 768px) {
    .floating-circle {
        opacity: 0.5;
    }
    
    .circle-1, .circle-4 {
        width: 200px;
        height: 200px;
    }
    
    .circle-2, .circle-5 {
        width: 150px;
        height: 150px;
    }
    
    .circle-3, .circle-6 {
        width: 100px;
        height: 100px;
    }
    
    .particle {
        width: 3px;
        height: 3px;
    }
}

/* ========================================
   FEATURES SECTION
   ======================================== */

.features-section {
    padding: 100px 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1e40af);
    border-radius: 2px;
}

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

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
    height: 100%;
}

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

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.2);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.feature-card:hover .feature-icon i {
    transform: scale(1.1);
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.feature-card:hover .feature-title {
    color: #3b82f6;
}

.feature-description {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.feature-highlight {
    margin-top: auto;
}

.highlight-text {
    display: inline-block;
    background: linear-gradient(135deg, #3b82f6, #1e40af);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.feature-card:hover .highlight-text {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Animations for feature cards */
.feature-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

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

/* Responsive adjustments for features */
@media (max-width: 768px) {
    .features-section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
    
    .feature-title {
        font-size: 1.3rem;
    }
}

/* ========================================
   STATISTICS SECTION
   ======================================== */

.statistics-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    position: relative;
    overflow: hidden;
}

.statistics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="60" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="40" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.statistics-section .section-title {
    color: white;
}

.statistics-section .section-title::after {
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4));
}

.statistics-section .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.stat-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.stat-icon i {
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.stat-card:hover .stat-icon i {
    transform: scale(1.1);
}

/* Statistics Section - Specific styles */
.statistics-section .stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: white !important;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.statistics-section .stat-card:hover .stat-number {
    transform: scale(1.05);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.statistics-section .stat-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: white !important;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.stat-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.stat-card:hover .stat-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Animations for stat cards */
.stat-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Responsive adjustments for statistics */
@media (max-width: 768px) {
    .statistics-section {
        padding: 60px 0;
    }
    
    .statistics-section .section-title {
        font-size: 2rem;
    }
    
    .statistics-section .section-subtitle {
        font-size: 1.1rem;
    }
    
    .stat-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .stat-icon i {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 1.1rem;
    }
}

/* ========================================
   FINAL CTA SECTION
   ======================================== */

.final-cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    position: relative;
    overflow: hidden;
}

html.all-black .final-cta-section {
    background: linear-gradient(135deg, #000000 0%, #0b0b0b 100%);
}

.final-cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.cta-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
    transform: translateY(30px);
}

.cta-buttons {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
    transform: translateY(30px);
}

.cta-buttons .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.cta-buttons .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 0.5s ease;
}

.cta-buttons .btn:hover::before {
    left: 100%;
}

.cta-buttons .btn-light {
    background: white;
    color: #1e40af;
    border-color: white;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.cta-buttons .btn-light:hover {
    background: #f0f9ff;
    color: #1e40af;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

.cta-buttons .btn-outline-light {
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.cta-buttons .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
    transform: translateY(30px);
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-feature:hover {
    color: white;
    transform: scale(1.05);
}

.cta-feature i {
    color: #60a5fa;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.cta-feature:hover i {
    color: white;
    transform: scale(1.1);
}

/* Responsive adjustments for CTA */
@media (max-width: 768px) {
    .final-cta-section {
        padding: 60px 0;
    }
    
    .cta-title {
        font-size: 2.2rem;
    }
    
    .cta-subtitle {
        font-size: 1.1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin: 0;
    }
    
    .cta-features {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }
    
    .cta-feature {
        font-size: 0.9rem;
    }
}

/* Utility Classes */
.transition-all {
    transition: var(--transition);
}

.transition-fast {
    transition: var(--transition-fast);
}

.shadow-custom {
    box-shadow: var(--shadow);
}

.shadow-lg-custom {
    box-shadow: var(--shadow-lg);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .toast-notification {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
}
/* ========================================
   Mobile fixes (global)
   ======================================== */
 img, svg, video, iframe { max-width: 100%; height: auto; }

 @media (max-width: 575.98px) {
  /* Hero */
  .hero-section { padding-top: 8px; }
  .hero-title { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1rem; margin-bottom: 1rem; padding: 0 12px; }
  .hero-features { padding: 0 12px; }
  .hero-buttons { flex-direction: column; gap: 0.6rem; align-items: center; }
  .hero-buttons .btn, .hero-buttons .btn.btn-lg {
    padding: .5rem .9rem; font-size: .95rem; line-height: 1.1; white-space: nowrap;
  }
  .hero-buttons .btn.me-3 { margin-right: 0 !important; }
  .hero-visual { margin-top: 0.75rem; }
  .home-preview-cards .card { border-radius: 12px; }
  .home-preview-cards .card.fly-card { animation-duration: 7s; }
  .media-percentage { right: 8px; font-size: 0.95em; }
  .card_indices .card-body { overflow-x: auto; }
  /* Corrigir largura mínima das tabelas nos cards de cotações no mobile */
  .card_indices .card-body .table { min-width: 100%; table-layout: fixed; }
  /* Card tables text size */
  .card .table th, .card .table td { font-size: clamp(12px, 3.4vw, 14px); }
  .card .card-header { font-size: clamp(14px, 3.6vw, 16px); min-height: 52px; display: flex; align-items: center; }
  .title-card i { font-size: 0.95em; }
  .cta-buttons { flex-direction: row; gap: 0.5rem; }
  .cta-buttons .btn { flex: 1 1 calc(50% - 0.5rem); }
  .cta-buttons .btn + .btn { margin-top: 0; }
  .hero-stat-icon i { font-size: 1rem !important; }
  /* Navbar links mais compactos */
  .modern-header .nav-link { padding: 0.5rem 0.75rem !important; }
  /* Spacer para páginas públicas com header fixo */
  .header-spacer { height: var(--header-height, 64px); }
  /* CTA features em linha no mobile */
  .cta-features { flex-direction: row; flex-wrap: nowrap; gap: .75rem; }
}

@media (max-width: 360px) {
  .hero-title { font-size: 1.9rem; }
  .theme-toggle-btn { width: 32px; height: 32px; }
  .card .table th, .card .table td { font-size: 12px; }
}

/* Desktop default spacer para páginas com header fixo */
.header-spacer { height: var(--header-height, 80px); }

/* ========================================
   Media badge (global) – usado em Home e Dashboard
   ======================================== */
.card_indices .card-header.title-card {
  position: relative;
  padding-right: 96px; /* reserva espaço para badge + ícone */
  min-height: 56px; display: flex; align-items: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-percentage {
  font-size: 1em;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
  background: transparent;
  position: absolute;
  right: 44px; /* deixa espaço para o botão/ícone do header */
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
  min-width: 72px;
  justify-content: flex-end;
}
.media-percentage.positive {
  color: #37ed00;
  border-color: rgba(55, 237, 0, 0.3);
}
.media-percentage.negative {
  color: #FF0000;
  border-color: rgba(255, 0, 0, 0.3);
}
.media-percentage.neutral {
  color: #6c757d;
  border-color: rgba(108, 117, 125, 0.3);
}

/* Ícones animados de tendência */
.media-percentage .arrow-icon { opacity: 0.9; }
.media-percentage.trend-up .arrow-icon {
  animation: arrowUp 1.6s ease-in-out infinite;
}
.media-percentage.trend-down .arrow-icon {
  animation: arrowDown 1.6s ease-in-out infinite;
}

@keyframes arrowUp {
  0% { transform: translateY(2px); opacity: 0.75; }
  50% { transform: translateY(-2px); opacity: 1; }
  100% { transform: translateY(2px); opacity: 0.75; }
}

@keyframes arrowDown {
  0% { transform: translateY(-2px); opacity: 0.75; }
  50% { transform: translateY(2px); opacity: 1; }
  100% { transform: translateY(-2px); opacity: 0.75; }
}

/* Mobile overrides (placed after base to take precedence) */
@media (max-width: 575.98px) {
  /* Shrink media badge size on Home cards only */
  .home-preview-cards .media-percentage {
    font-size: 0.82em !important;
    padding: 1px 6px !important;
    min-width: 56px !important;
  }
  #iso27001Modal .modal-header, 
  #iso27001Modal .modal-body, 
  #iso27001Modal .modal-footer { padding: 0.75rem 0.9rem !important; }
  #iso27001Modal .modal-title { font-size: 1rem !important; }
  #iso27001Modal .modal-body p, 
  #iso27001Modal .modal-body li { font-size: 0.9rem !important; line-height: 1.35 !important; }
  #iso27001Modal .badge { font-size: 0.7rem !important; padding: .25rem .4rem !important; }
  #iso27001Modal .btn, 
  #iso27001Modal .btn.btn-primary, 
  #iso27001Modal .btn.btn-outline-secondary { padding: .4rem .6rem !important; font-size: .85rem !important; border-radius: 8px !important; }
}

/* Hide reCAPTCHA v3 badge (we show legal text elsewhere) */
.grecaptcha-badge { visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }

/* Alerts contrast on dark themes */
html.dark-blue .alert { color: #e6e9f0; border-color: rgba(255,255,255,0.2); }
html.dark-blue .alert-danger { background: rgba(220,53,69,0.12); }
html.dark-blue .alert-success { background: rgba(25,135,84,0.12); }
html.dark-blue .alert-warning { background: rgba(255,193,7,0.12); color: #ffe9a6; }
html.all-black .alert { color: #f1f5f9; border-color: rgba(255,255,255,0.15); }
html.all-black .alert-danger { background: rgba(220,53,69,0.16); }
html.all-black .alert-success { background: rgba(25,135,84,0.16); }
html.all-black .alert-warning { background: rgba(255,193,7,0.16); color: #ffe9a6; }

/* Input groups: align toggle buttons to inputs */
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.input-group .form-control, .input-group .input-group-text, .input-group .btn { height: calc(1.5em + .75rem + 2px); }
.input-group-lg .form-control, .input-group-lg .input-group-text, .input-group-lg .btn { height: calc(1.5em + 1.5rem + 2px); }
.input-group .btn i { pointer-events: none; }
/* Guarantee left border and radius when there is no left addon */
.input-group .form-control:first-child { border-top-left-radius: var(--radius) !important; border-bottom-left-radius: var(--radius) !important; border-left: 1px solid var(--border-color) !important; }
.input-group .form-control:first-child:focus { border-left: 1px solid var(--secondary-color) !important; }
.input-group-lg .form-control:first-child { border-top-left-radius: var(--radius-lg) !important; border-bottom-left-radius: var(--radius-lg) !important; }

/* Dashboard tables on mobile: keep one-line rows (iPhone) */
@media (max-width: 575.98px) {
  .card_indices table td, .card_indices table th { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; padding-left: 6px !important; padding-right: 6px !important; }
}

/* Mobile: slightly increase navbar and card header heights */
@media (max-width: 575.98px) {
  .navbar { padding-top: .75rem; padding-bottom: .75rem; }
  .card .card-header.title-card { min-height: 52px; display: flex; align-items: center; }
}

/* Input-group button rounding to match inputs */
.input-group .btn:last-child { border-top-right-radius: var(--bs-border-radius); border-bottom-right-radius: var(--bs-border-radius); }
.input-group-lg .btn:last-child { border-top-right-radius: var(--bs-border-radius-lg); border-bottom-right-radius: var(--bs-border-radius-lg); }
.input-group .btn.btn-outline-secondary { border-color: var(--border-color); }

/* Modal performance tweaks */
.modal.fade .modal-dialog { will-change: transform, opacity; transform: translateZ(0); }
@media (prefers-reduced-motion: reduce) {
  .modal.fade .modal-dialog { transition: none !important; }
  .animate-fade-in-up, .animate-delay-100, .animate-delay-200, .animate-delay-300, .animate-delay-400, .animate-delay-500, .animate-delay-600 { animation: none !important; transition: none !important; }
}
@media (max-width: 575.98px) {
  .modal-content { box-shadow: 0 8px 18px rgba(0,0,0,.25); }
}

/* Navbar mobile vertical centering */
@media (max-width: 575.98px) {
  .navbar-auth .container { align-items: center; }
  .navbar-auth .navbar-brand { display: flex; align-items: center; }
  .navbar-auth .dropdown-toggle { display: flex; align-items: center; }
  .modern-header .navbar, .modern-header .navbar .container { align-items: center; }
  .modern-header .navbar-brand, .modern-header .navbar-auth, .modern-header .navbar-toggler { display: flex; align-items: center; }
}

/* reCAPTCHA legal formatting */
.app-footer .recaptcha-legal { font-size: .85rem; color: var(--text-secondary); line-height: 1.35; display: block; opacity: .75; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-footer .recaptcha-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Footer mobile – refined layout */
@media (max-width: 575.98px) {
  .app-footer .container { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .app-footer .footer-brand { display: flex; align-items: center; justify-content: space-between; width: 100%; }
  .app-footer .footer-links .nav { justify-content: space-between; flex-wrap: wrap; row-gap: 6px; }
  .app-footer .footer-actions { width: 100%; justify-content: space-between; }
  .app-footer .status-dot { margin-right: 6px; }
}

/* Lesson list (courses sidebar) – consistent theming across all themes */
.lesson-list .list-group-item {
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  transition: var(--transition-fast);
}
.lesson-list .list-group-item:hover {
  background-color: var(--bg-secondary) !important;
}
.lesson-list .list-group-item.active {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);
}
html.dark .lesson-list .list-group-item.active,
html.dark-blue .lesson-list .list-group-item.active,
html.all-black .lesson-list .list-group-item.active {
  border-color: rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

/* Override Bootstrap list-group variables for lesson-list */
.lesson-list {
  --bs-list-group-color: var(--text-primary);
  --bs-list-group-bg: var(--card-bg);
  --bs-list-group-border-color: var(--border-color);
  --bs-list-group-hover-bg: var(--bg-secondary);
  --bs-list-group-hover-color: var(--text-primary);
  --bs-list-group-action-hover-color: var(--text-primary);
  --bs-list-group-action-hover-bg: var(--bg-secondary);
  --bs-list-group-active-bg: var(--bg-secondary);
  --bs-list-group-active-color: var(--text-primary);
  --bs-list-group-active-border-color: var(--border-color);
}

/* Ensure placeholders inside lesson-list are dark-friendly */
.lesson-list .bg-secondary { background-color: var(--bg-secondary) !important; }
html.dark .lesson-list .bg-secondary,
html.dark-blue .lesson-list .bg-secondary,
html.all-black .lesson-list .bg-secondary { background-color: var(--bg-secondary) !important; }

/* Extra safety: force list-group backgrounds in dark themes */
html.dark .lesson-list .list-group-item,
html.dark-blue .lesson-list .list-group-item,
html.all-black .lesson-list .list-group-item { background-color: var(--card-bg) !important; color: var(--text-primary) !important; }
html.dark .lesson-list .list-group-item:hover,
html.dark-blue .lesson-list .list-group-item:hover,
html.all-black .lesson-list .list-group-item:hover { background-color: var(--bg-secondary) !important; }
