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

:root {
  color-scheme: light;
  --bg: #0a1222;
  --bg-alt: #0f2036;
  --surface: #13243d;
  --surface-light: #1a2f4d;
  --text: #e6e8eb;
  --muted: #9fb0c7;
  --accent: #5b7cfa;
  --accent-2: #3bb3ff;
  --accent-3: #7b6cff;
  --accent-green: #22c55e;
  --accent-green-2: #16a34a;
  --accent-soft: rgba(91, 124, 250, 0.18);
  --border: rgba(120, 150, 200, 0.22);
  --success-bg: rgba(34, 197, 94, 0.15);
  --success-border: rgba(34, 197, 94, 0.4);
  --error-bg: rgba(239, 68, 68, 0.15);
  --error-border: rgba(239, 68, 68, 0.4);
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

/* ========================================
   TICKER TAPE (Cotações)
======================================== */
.ticker-tape {
  background: linear-gradient(90deg, #0d1929, #101d2f);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  height: 32px;
}

.ticker-tape::before,
.ticker-tape::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}

.ticker-tape::before {
  left: 0;
  background: linear-gradient(90deg, #0d1929, transparent);
}

.ticker-tape::after {
  right: 0;
  background: linear-gradient(90deg, transparent, #0d1929);
}

.ticker-tape-content {
  display: flex;
  align-items: center;
  height: 100%;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
  gap: 32px;
  padding: 0 20px;
}

.ticker-tape-content:hover {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-tape-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
}

.ticker-tape-symbol {
  color: var(--text);
  font-weight: 600;
}

.ticker-tape-price {
  color: var(--muted);
}

.ticker-tape-change {
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.ticker-tape-change--up {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
}

.ticker-tape-change--down {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.ticker-tape-change--neutral {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.ticker-tape-separator {
  color: var(--border);
  opacity: 0.5;
}

/* Destacar tickers do usuário */
.ticker-tape-item--user {
  background: rgba(34, 197, 94, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  margin: 0 -4px;
}

.ticker-tape-symbol--user {
  color: var(--accent-green) !important;
}

.ticker-tape-loading {
  color: var(--muted);
  font-size: 0.75rem;
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* ========================================
   MARKET STATUS CARD
======================================== */
.market-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.market-status-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.market-status-indicator {
  font-size: 0.8rem;
  animation: blink 2s ease-in-out infinite;
}

.market-status-indicator.market-open {
  color: #22c55e;
}

.market-status-indicator.market-closed {
  color: #ef4444;
}

.market-status-indicator.market-holiday {
  color: #fbbf24;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.market-status-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.market-next-holiday {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
}

.holiday-label {
  color: var(--muted);
}

.holiday-info {
  color: var(--accent);
  font-weight: 500;
}

/* ========================================
   HEADER
======================================== */
.header {
  position: relative;
  background: linear-gradient(90deg, rgba(10, 18, 34, 0.98), rgba(10, 22, 40, 0.98));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 1.3rem;
  color: var(--text);
  flex-shrink: 0;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
}

.nav a {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-green);
  transition: width 0.2s ease;
}

.nav a:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
.mobile-nav {
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav a {
  color: var(--muted);
  font-size: 1rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-of-type {
  border-bottom: none;
}

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.mobile-nav-actions .button {
  width: 100%;
  justify-content: center;
}

/* ========================================
   HEADER DASHBOARD
======================================== */
.header--dashboard {
  background: linear-gradient(90deg, rgba(10, 18, 34, 0.98), rgba(15, 32, 54, 0.98));
}

.nav-dashboard {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-dashboard-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-dashboard-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-dashboard-item.active {
  color: var(--accent-green);
  background: rgba(34, 197, 94, 0.1);
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

/* ========================================
   HERO
======================================== */
.hero {
  padding: 80px 0 60px;
  background: radial-gradient(circle at 15% 20%, rgba(59, 179, 255, 0.2), transparent 55%),
    radial-gradient(circle at 85% 10%, rgba(91, 124, 250, 0.22), transparent 50%),
    linear-gradient(180deg, rgba(10, 18, 34, 0.2), rgba(10, 18, 34, 1));
}

.eyebrow {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin: 12px 0;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 20px;
}

h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.lead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 680px;
}

.hero-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 720px;
}

.price-highlight {
  color: #ff4d4f;
  font-weight: 700;
  text-decoration: line-through;
}

.free-trial-highlight {
  color: #22c55e;
  font-weight: 700;
}

.section-head {
  margin-bottom: 28px;
}

.cta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ========================================
   BUTTONS
======================================== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-green-2));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.button:hover {
  background: linear-gradient(135deg, #2bd46f, #129a46);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button--ghost {
  background: transparent;
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
  box-shadow: none;
}

.button--ghost:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--accent-green);
  color: var(--accent-green);
  box-shadow: none;
  transform: none;
}

.button--link {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 0;
  box-shadow: none;
}

.button--link:hover {
  color: var(--text);
  background: transparent;
  transform: none;
  box-shadow: none;
}

.button--small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* ========================================
   SECTIONS
======================================== */
.section {
  padding: 60px 0;
}

.section--alt {
  background: linear-gradient(180deg, var(--bg-alt), rgba(15, 32, 54, 0.8));
}

.grid {
  display: grid;
  gap: 16px;
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(10, 30, 60, 0.25);
}

.card--preview {
  max-width: 640px;
}

.demo-video {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 12px;
  display: block;
  background: #0b1118;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.list li {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(18, 36, 61, 0.8), rgba(12, 26, 44, 0.7));
  font-size: 0.95rem;
}

/* ========================================
   AUTH SECTION
======================================== */
.auth-section {
  min-height: 400px;
}

.auth-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(10, 30, 60, 0.3);
}

.auth-card h3 {
  font-size: 1.2rem;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

/* ========================================
   TOAST
======================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  width: auto;
  max-width: 360px;
}

@media (max-width: 768px) {
  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

/* ========================================
   AUTH MODAL (estilo Amazon)
======================================== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 20px;
  overflow-y: auto;
}

.auth-modal-overlay.hidden {
  display: none;
}

.auth-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  padding: 0;
  position: relative;
  animation: modalSlideIn 0.25s ease-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

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

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  z-index: 10;
}

.auth-modal-close:hover {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: #f87171;
}

.auth-modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.auth-modal-tab {
  flex: 1;
  padding: 16px;
  background: transparent;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.auth-modal-tab:hover {
  color: var(--text);
}

.auth-modal-tab.active {
  color: var(--accent);
}

.auth-modal-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.auth-modal-content {
  padding: 24px;
}

.auth-modal-content.hidden {
  display: none;
}

.auth-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-modal-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-modal-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .auth-modal-form .form-row {
    grid-template-columns: 1fr;
  }
}

.auth-modal-form label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.auth-modal-form input {
  padding: 12px 14px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.auth-modal-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-modal-form input::placeholder {
  color: var(--muted);
}

.auth-modal-form .button--full {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
}

.auth-modal-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-modal-switch {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-modal-switch:hover {
  text-decoration: underline;
}

.toast {
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease;
  pointer-events: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.toast--success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: #4ade80;
}

.toast--error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  color: #f87171;
}

.toast--info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.toast-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

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

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

/* ========================================
   DASHBOARD MAIN
======================================== */
.dashboard-main {
  min-height: calc(100vh - 140px);
  padding: 32px 0;
  background: radial-gradient(circle at 10% 20%, rgba(34, 197, 94, 0.06), transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(59, 179, 255, 0.06), transparent 50%);
}

.dashboard-welcome {
  margin-bottom: 28px;
}

.dashboard-welcome h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 8px;
}

.dashboard-welcome p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.dashboard-section {
  animation: fadeIn 0.3s ease;
}

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

.dashboard-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 40px rgba(10, 30, 60, 0.3);
  margin-bottom: 20px;
}

.dashboard-card--main {
  padding: 28px;
}

.dashboard-card h2 {
  margin: 0;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.dashboard-card-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.2);
  color: var(--accent-green);
}

/* Tickers */
.current-tickers {
  margin-bottom: 32px;
}

.current-tickers-title {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.ticker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
}

.ticker-item-code {
  font-weight: 600;
  color: var(--accent-green);
}

.ticker-item-name {
  color: var(--muted);
  font-size: 0.8rem;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticker-item-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  margin-left: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.ticker-item-remove:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  border: 1px dashed var(--border);
  width: 100%;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
  opacity: 0.6;
}

.empty-state p {
  margin: 0;
  font-size: 0.95rem;
}

.empty-state-hint {
  margin-top: 6px !important;
  font-size: 0.85rem !important;
  opacity: 0.7;
}

/* Add ticker */
.add-ticker-section {
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.add-ticker-section h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.add-ticker-section .form-note {
  margin-bottom: 16px;
}

.ticker-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ticker-autocomplete {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.ticker-autocomplete input {
  width: 100%;
}

.ticker-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 4px;
  max-height: 250px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ticker-suggestion {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.ticker-suggestion:last-child {
  border-bottom: none;
}

.ticker-suggestion:hover,
.ticker-suggestion.selected {
  background: rgba(34, 197, 94, 0.1);
}

.ticker-suggestion-code {
  font-weight: 600;
  color: var(--accent-green);
}

.ticker-suggestion-name {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Profile */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.profile-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.profile-header-info h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}

.profile-header-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-form {
  display: grid;
  gap: 20px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.profile-field input {
  background: #0b1830;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.profile-field input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.profile-field input:disabled {
  background: rgba(11, 24, 48, 0.5);
  color: var(--muted);
  cursor: not-allowed;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.7;
}

.profile-actions {
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.profile-actions .button {
  width: 100%;
}

/* Dashboard info card */
.dashboard-info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.dashboard-info-card h3 {
  margin: 0 0 14px;
  font-size: 0.95rem;
}

.dashboard-info-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-info-card li {
  margin-bottom: 8px;
}

.dashboard-info-card li:last-child {
  margin-bottom: 0;
}


/* ========================================
   FORMS
======================================== */
.form {
  display: grid;
  gap: 16px;
}

.form--flat {
  background: transparent;
  border: none;
  padding: 0;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

input,
select {
  background: #0b1830;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  width: 100%;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

/* ========================================
   FOOTER
======================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
}

/* ========================================
   NEWS SECTION
======================================== */
.news-date-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.news-date-selector label {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.news-date-selector input[type="date"] {
  max-width: 180px;
}

.news-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-periodo-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(91, 124, 250, 0.1);
  border: 1px solid rgba(91, 124, 250, 0.3);
  border-radius: 10px;
  font-size: 0.9rem;
}

.news-periodo-label {
  color: var(--muted);
}

.news-periodo-valor {
  color: var(--accent);
  font-weight: 600;
}

/* ========================================
   NEWS SECTION LAYOUT (duas colunas)
======================================== */
.news-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.news-section-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--text);
}

.news-periodo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 10px 14px;
  background: var(--surface-light);
  border-radius: 8px;
  font-size: 0.85rem;
}

.news-periodo-header .news-periodo-label {
  color: var(--muted);
}

.news-periodo-header .news-periodo-valor {
  color: var(--accent);
  font-weight: 600;
}

.news-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.news-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 20px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.sidebar-card-header {
  background: var(--surface-light);
  padding: 12px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.sidebar-card .news-calendar-container {
  max-width: none;
  border: none;
  border-radius: 0;
  margin: 0;
}

.sidebar-card .market-status-card {
  margin: 0;
  border: none;
  border-radius: 0;
}

.sidebar-card--info {
  background: rgba(91, 124, 250, 0.05);
  border-color: rgba(91, 124, 250, 0.2);
}

.sidebar-info-list {
  list-style: none;
  padding: 12px 14px;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.sidebar-info-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-info-list li:last-child {
  border-bottom: none;
}

.news-main {
  min-width: 0;
}

/* Sidebar toggle headers */
.sidebar-card-header--toggle {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.sidebar-card-header--toggle:hover {
  background: rgba(91, 124, 250, 0.1);
}

.sidebar-toggle-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  color: var(--muted);
}

.sidebar-card-header--toggle.expanded .sidebar-toggle-arrow {
  transform: rotate(180deg);
}

.sidebar-card-content {
  max-height: 500px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.sidebar-card-content.collapsed {
  max-height: 0;
}

/* Filtro de Ticker */
.ticker-filter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
}

.ticker-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.ticker-filter-item:hover {
  background: var(--surface-light);
  color: var(--text);
}

.ticker-filter-item.active {
  background: rgba(91, 124, 250, 0.15);
  color: var(--accent);
  font-weight: 600;
}

.ticker-filter-item .ticker-badge {
  background: var(--surface-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.ticker-filter-item.active .ticker-badge {
  background: rgba(91, 124, 250, 0.2);
  color: var(--accent);
}

/* Mobile: sidebar no topo */
@media (max-width: 900px) {
  .news-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .news-sidebar {
    position: relative;
    top: 0;
    flex-direction: column;
    gap: 8px;
  }

  .sidebar-card {
    width: 100%;
  }

  .sidebar-card--info {
    display: none;
  }

  .news-section-header h2 {
    font-size: 1.2rem;
  }

  /* Mobile: calendário e filtros compactos (colapsados por padrão) */
  .sidebar-card-content {
    max-height: 0;
    overflow: hidden;
  }

  .sidebar-card-content.expanded {
    max-height: 500px;
  }

  .sidebar-card-header--toggle .sidebar-toggle-arrow {
    display: inline;
  }
}

@media (max-width: 600px) {
  .news-sidebar {
    flex-direction: column;
  }

  .sidebar-card {
    min-width: 100%;
  }
}

/* ========================================
   MAPA DE CALOR
======================================== */
.heatmap-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.heatmap-section-header h2 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--text);
}

.heatmap-updated {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--surface-light);
  padding: 6px 12px;
  border-radius: 6px;
}

.heatmap-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

.heatmap-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 20px;
}

.heatmap-main {
  min-width: 0;
}

/* Filtro de setor */
.setor-filter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.setor-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.setor-filter-item:hover {
  background: var(--surface-light);
  color: var(--text);
}

.setor-filter-item.active {
  background: rgba(91, 124, 250, 0.15);
  color: var(--accent);
  font-weight: 600;
}

.setor-filter-item .setor-badge {
  background: var(--surface-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: auto;
}

/* Legenda */
.heatmap-legend {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.heatmap-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.heatmap-legend-color {
  width: 24px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.heatmap-legend-size {
  border-radius: 4px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.heatmap-legend-size--large {
  width: 36px;
  height: 18px;
}

.heatmap-legend-size--medium {
  width: 20px;
  height: 16px;
}

.heatmap-legend-size--small {
  width: 16px;
  height: 14px;
}

/* Legenda de opacidade (notícias) */
.heatmap-legend-opacity {
  width: 24px;
  height: 18px;
  border-radius: 3px;
  background: var(--accent);
}

.heatmap-legend-opacity--has-news {
  opacity: 1;
}

.heatmap-legend-opacity--no-news {
  opacity: 0.4;
}

.heatmap-legend-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Seletor de Data do Heatmap */
.heatmap-date-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
}

.heatmap-date-btn {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

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

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

.heatmap-date-display {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  min-width: 100px;
  text-align: center;
}

.heatmap-date-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0 12px 12px;
  margin: 0;
}

/* Ação sem notícias no mapa */
.heatmap-item--no-news {
  opacity: 0.4;
}

/* Container do mapa */
.heatmap-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
}

.heatmap-container:empty {
  display: none;
}

/* Setor no mapa */
.heatmap-sector {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.heatmap-sector-title {
  background: var(--surface-light);
  padding: 12px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.heatmap-sector-count {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 3px;
  padding: 8px;
}

/* Item individual */
.heatmap-item {
  aspect-ratio: 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  padding: 3px;
  min-height: 38px;
  /* Tamanho padrão (pequeno) */
  grid-column: span 1;
  grid-row: span 1;
}

/* Tamanhos baseados no market cap - sutis */
.heatmap-item--large {
  grid-column: span 2;
  grid-row: span 1;
  aspect-ratio: 2.2;
  min-height: 44px;
}

.heatmap-item--medium {
  grid-column: span 1;
  grid-row: span 1;
  aspect-ratio: 1.1;
  min-height: 42px;
}

.heatmap-item--small {
  grid-column: span 1;
  grid-row: span 1;
  min-height: 38px;
}

.heatmap-item:hover {
  transform: scale(1.05);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.heatmap-item--highlight {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Itens do portfólio no mapa */
.heatmap-item--portfolio {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.6) inset;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.heatmap-ticker {
  font-weight: 700;
  font-size: 0.7rem;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.heatmap-item--large .heatmap-ticker {
  font-size: 0.85rem;
}

.heatmap-item--medium .heatmap-ticker {
  font-size: 0.75rem;
}

.heatmap-change {
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  line-height: 1;
}

.heatmap-item--large .heatmap-change {
  font-size: 0.6rem;
}

.heatmap-item--medium .heatmap-change {
  font-size: 0.55rem;
}

/* Cores por variação */
.heatmap-item--strong-up {
  background: linear-gradient(135deg, #15803d, #16a34a);
}

.heatmap-item--up {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.heatmap-item--slight-up {
  background: linear-gradient(135deg, #22c55e, #4ade80);
}

.heatmap-item--slight-down {
  background: linear-gradient(135deg, #f87171, #fca5a5);
}

.heatmap-item--down {
  background: linear-gradient(135deg, #ef4444, #f87171);
}

.heatmap-item--strong-down {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}

.heatmap-item--neutral {
  background: linear-gradient(135deg, #4b5563, #6b7280);
}

/* Loading state */
.heatmap-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--muted);
  gap: 16px;
}

.heatmap-loading.hidden {
  display: none;
}

/* Mobile */
@media (max-width: 900px) {
  .heatmap-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .heatmap-sidebar {
    position: relative;
    top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .heatmap-sidebar .sidebar-card {
    flex: 1;
    min-width: 140px;
  }

  .heatmap-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .setor-filter-list {
    max-height: 200px;
  }

  .heatmap-container {
    grid-template-columns: 1fr;
  }

  .heatmap-grid {
    grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
    gap: 3px;
  }

  .heatmap-item {
    aspect-ratio: 1.2;
  }

  .heatmap-ticker {
    font-size: 0.65rem;
  }

  .heatmap-change {
    font-size: 0.55rem;
  }
}

/* ========================================
   MODAL DE NOTÍCIAS DO TICKER (MAPA DE CALOR)
======================================== */
.ticker-news-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ticker-news-modal.hidden {
  display: none;
}

.ticker-news-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.ticker-news-modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ticker-news-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--surface-light);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.2rem;
  color: var(--muted);
  cursor: pointer;
  z-index: 10;
  transition: all 0.15s ease;
}

.ticker-news-modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.ticker-news-modal-header {
  padding: 24px 64px 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.ticker-news-modal-ticker {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.ticker-news-modal-price {
  text-align: right;
}

.ticker-news-modal-price .price-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.ticker-news-modal-price .price-change {
  font-size: 0.9rem;
  font-weight: 600;
}

.ticker-news-modal-price .price-change.positive {
  color: #22c55e;
}

.ticker-news-modal-price .price-change.negative {
  color: #ef4444;
}

.ticker-news-modal-sentiment {
  padding: 12px 24px;
  background: var(--surface-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticker-news-modal-sentiment .sentiment-emoji {
  font-size: 1.2rem;
}

.ticker-news-modal-sentiment .sentiment-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.ticker-news-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.ticker-news-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--muted);
  gap: 16px;
}

.ticker-news-content.hidden {
  display: none;
}

.ticker-news-block {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 10px;
  background: var(--surface-light);
}

.ticker-news-block.hidden {
  display: none;
}

.ticker-news-block--positive {
  border-left: 4px solid #22c55e;
}

.ticker-news-block--negative {
  border-left: 4px solid #ef4444;
}

.ticker-news-block-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 12px;
  color: var(--text);
}

.ticker-news-block-text {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--muted);
  text-align: justify;
}

.ticker-news-sources {
  margin-top: 20px;
}

.ticker-news-sources-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 10px;
  color: var(--text);
}

.ticker-news-sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ticker-news-sources-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

.ticker-news-sources-list li:last-child {
  border-bottom: none;
}

.ticker-news-sources-list li strong {
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}

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

.ticker-news-empty.hidden {
  display: none;
}

.ticker-news-modal-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-light);
}

.ticker-news-date {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Mobile */
@media (max-width: 600px) {
  .ticker-news-modal {
    padding: 10px;
  }

  .ticker-news-modal-content {
    max-height: 90vh;
    border-radius: 12px;
  }

  .ticker-news-modal-header {
    padding: 16px;
  }

  .ticker-news-modal-ticker {
    font-size: 1.4rem;
  }

  .ticker-news-modal-body {
    padding: 16px;
  }

  .ticker-news-block {
    padding: 12px;
  }
}

/* ========================================
   DESTAQUE DO DIA
======================================== */
.destaque-container {
  margin-bottom: 20px;
}

.destaque-card {
  background: linear-gradient(135deg, rgba(91, 124, 250, 0.15), rgba(123, 108, 255, 0.1));
  border: 2px solid var(--accent);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.destaque-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
}

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

.destaque-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.destaque-ticker {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-green);
  margin-bottom: 8px;
}

.destaque-titulo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.destaque-resumo {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.destaque-sentimento {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.destaque-sentimento--positivo {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.destaque-sentimento--negativo {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.destaque-sentimento--neutro {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.destaque-sentimento-icon {
  font-size: 1rem;
}

.destaque-sentimento-text {
  font-size: 0.85rem;
}

/* ========================================
   CALENDAR TOGGLE
======================================== */
.calendar-toggle-container {
  margin-bottom: 16px;
}

.calendar-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 500;
}

.calendar-toggle-btn:hover {
  background: rgba(91, 124, 250, 0.1);
  border-color: var(--accent);
  color: var(--text);
}

.calendar-toggle-btn.active {
  background: rgba(91, 124, 250, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.calendar-toggle-icon {
  font-size: 1rem;
}

.calendar-toggle-arrow {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  margin-left: auto;
}

.calendar-toggle-btn.active .calendar-toggle-arrow {
  transform: rotate(180deg);
}

/* ========================================
   CALENDAR (COMPACTO)
======================================== */
.news-calendar-container {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
  max-width: 320px;
  animation: slideDown 0.2s ease;
}

.news-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.calendar-month-year {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.calendar-nav-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
}

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

.news-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 0;
}

.calendar-days {
  display: contents;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border-radius: 6px;
  cursor: default;
  transition: all 0.2s ease;
  color: var(--muted);
}

.calendar-day--empty {
  background: transparent;
}

.calendar-day--today {
  border: 2px solid var(--accent);
  font-weight: 700;
  color: var(--accent);
}

.calendar-day--has-news {
  cursor: pointer;
  color: white;
  font-weight: 600;
}

.calendar-day--has-news:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Cores de fundo para dias com notícias (substitui pontinho) */
.calendar-day--positive {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.7), rgba(34, 197, 94, 0.5));
  color: white;
}

.calendar-day--negative {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.7), rgba(239, 68, 68, 0.5));
  color: white;
}

.calendar-day--neutral {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.7), rgba(251, 191, 36, 0.5));
  color: #1a1a1a;
}

.calendar-day--selected {
  background: var(--accent) !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(91, 124, 250, 0.4);
}

.calendar-day--disabled {
  opacity: 0.35;
}

.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.legend-dot--positive {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(34, 197, 94, 0.6));
}

.legend-dot--negative {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.8), rgba(239, 68, 68, 0.6));
}

.legend-dot--neutral {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.8), rgba(251, 191, 36, 0.6));
}

/* ========================================
   SENTIMENT CHART
======================================== */
.sentiment-chart-container {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.sentiment-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sentiment-chart-title {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.sentiment-tendencia {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}

.tendencia--positiva {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.tendencia--negativa {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.tendencia--neutra {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.sentiment-chart {
  position: relative;
}

.sentiment-chart-svg {
  width: 100%;
  height: 60px;
  display: block;
}

.sentiment-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.sentiment-chart-labels span {
  font-size: 0.65rem;
  color: var(--muted);
  opacity: 0.7;
}

.news-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 16px;
}

.news-loading p {
  color: var(--muted);
  margin: 0;
}

.news-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* News Ticker Card */
.news-ticker-card {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.2s ease;
}

.news-ticker-card:hover {
  border-color: var(--accent-green);
}

.news-ticker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}

.news-ticker-code {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-green);
  margin: 0;
}

.news-ticker-preco {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

.preco-valor {
  color: var(--muted);
}

.preco-data {
  color: var(--muted);
  font-size: 0.8rem;
  opacity: 0.7;
  margin-left: 6px;
}

.variacao-positiva {
  color: #22c55e;
  font-weight: 600;
}

.variacao-negativa {
  color: #ef4444;
  font-weight: 600;
}

.variacao-neutra {
  color: var(--muted);
  font-weight: 600;
}

/* Resumo executivo */
.news-resumo {
  margin-bottom: 16px;
  padding: 16px;
  background: rgba(91, 124, 250, 0.08);
  border-radius: 10px;
  border-left: 3px solid var(--accent);
}

.news-resumo h4 {
  font-size: 0.9rem;
  color: var(--accent);
  margin: 0 0 10px;
  font-weight: 600;
}

.news-resumo p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

/* Análise consolidada */
.news-consolidado {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-bloco {
  padding: 16px;
  border-radius: 10px;
}

.news-bloco h5 {
  font-size: 0.85rem;
  margin: 0 0 10px;
  font-weight: 600;
}

.news-bloco p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text);
  text-align: justify;
}

.news-bloco--positivo {
  background: rgba(34, 197, 94, 0.08);
  border-left: 3px solid #22c55e;
}

.news-bloco--positivo h5 {
  color: #22c55e;
}

.news-bloco--negativo {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
}

.news-bloco--negativo h5 {
  color: #ef4444;
}

/* ========================================
   RESPONSIVE - MOBILE FIRST
======================================== */
@media (max-width: 768px) {
  /* Ticker tape mobile */
  .ticker-tape {
    height: 28px;
  }

  .ticker-tape-content {
    gap: 24px;
    padding: 0 12px;
  }

  .ticker-tape-item {
    font-size: 0.7rem;
    gap: 6px;
  }

  .ticker-tape-change {
    font-size: 0.65rem;
    padding: 1px 5px;
  }

  /* Market status card mobile */
  .market-status-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
  }

  .market-status-text {
    font-size: 0.8rem;
  }

  .market-next-holiday {
    font-size: 0.75rem;
    flex-wrap: wrap;
  }

  /* Base mobile adjustments */
  .container {
    padding: 0 16px;
  }

  .nav {
    display: none;
  }

  .header-actions {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .header .container {
    padding: 10px 16px;
  }

  .brand {
    font-size: 1.1rem;
    gap: 8px;
  }

  .brand-logo {
    width: 32px;
    height: 32px;
  }

  .hero {
    padding: 50px 0 40px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .lead {
    font-size: 0.95rem;
  }

  .cta {
    flex-direction: column;
    align-items: stretch;
  }

  .cta .button {
    width: 100%;
    justify-content: center;
  }

  .cta .button--link {
    text-align: center;
  }

  .section {
    padding: 40px 0;
  }

  .auth-forms {
    grid-template-columns: 1fr;
  }

  /* Dashboard mobile */
  .nav-dashboard {
    gap: 2px;
  }

  .nav-dashboard-item {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .nav-dashboard-item span {
    display: none;
  }

  .header-user {
    gap: 8px;
  }

  .header-user-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .button--small {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .dashboard-main {
    padding: 20px 0;
  }

  .dashboard-welcome {
    margin-bottom: 20px;
  }

  .dashboard-welcome h1 {
    font-size: 1.3rem;
    margin-bottom: 6px;
  }

  .dashboard-welcome p {
    font-size: 0.9rem;
  }

  .dashboard-card {
    padding: 16px;
    border-radius: 14px;
  }

  .dashboard-card--main {
    padding: 16px;
  }

  .dashboard-card h2 {
    font-size: 1.1rem;
  }

  .dashboard-card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .badge {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .ticker-picker {
    flex-direction: column;
  }

  .ticker-picker .button {
    width: 100%;
    justify-content: center;
  }

  .ticker-autocomplete {
    min-width: 100%;
  }

  .ticker-item {
    padding: 8px 12px;
  }

  .ticker-item-name {
    display: none;
  }

  .current-tickers {
    margin-bottom: 24px;
  }

  .add-ticker-section {
    padding-top: 20px;
  }

  .footer {
    padding: 24px 0;
  }

  .footer .container {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .footer p {
    font-size: 0.8rem;
  }

  /* News section mobile */
  .news-date-selector {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
  }

  .news-date-selector label {
    font-size: 0.85rem;
  }

  .news-date-selector input[type="date"] {
    max-width: 100%;
    padding: 10px 12px;
  }

  .news-date-selector .button {
    width: 100%;
    justify-content: center;
  }

  .news-periodo-info {
    padding: 12px 14px;
    font-size: 0.85rem;
    flex-wrap: wrap;
  }

  /* Destaque mobile */
  .destaque-card {
    padding: 16px;
    border-radius: 14px;
  }

  .destaque-header {
    margin-bottom: 12px;
  }

  .destaque-label {
    font-size: 0.7rem;
  }

  .destaque-ticker {
    font-size: 1.2rem;
  }

  .destaque-titulo {
    font-size: 0.95rem;
  }

  .destaque-resumo {
    font-size: 0.85rem;
    margin-bottom: 12px;
  }

  .destaque-sentimento {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  /* Calendar toggle mobile */
  .calendar-toggle-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    width: 100%;
    justify-content: flex-start;
  }

  /* Calendar mobile */
  .news-calendar-container {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 14px;
  }

  .news-calendar-header {
    margin-bottom: 10px;
  }

  .calendar-month-year {
    font-size: 0.85rem;
  }

  .calendar-nav-btn {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  .news-calendar-grid {
    gap: 2px;
  }

  .calendar-weekday {
    font-size: 0.65rem;
    padding: 4px 0;
  }

  .calendar-day {
    font-size: 0.7rem;
    border-radius: 4px;
  }

  .calendar-legend {
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .legend-item {
    font-size: 0.65rem;
    gap: 4px;
  }

  .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
  }

  .news-container {
    gap: 16px;
  }

  .news-ticker-card {
    padding: 14px;
    border-radius: 12px;
  }

  .news-ticker-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .news-ticker-code {
    font-size: 1.15rem;
  }

  .news-ticker-preco {
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.85rem;
  }

  .preco-data {
    font-size: 0.75rem;
    margin-left: 4px;
  }

  .news-resumo {
    padding: 12px;
    margin-bottom: 12px;
  }

  .news-resumo h4 {
    font-size: 0.85rem;
    margin-bottom: 8px;
  }

  .news-resumo p {
    font-size: 0.85rem;
    line-height: 1.55;
  }

  .news-consolidado {
    gap: 10px;
  }

  .news-bloco {
    padding: 12px;
  }

  .news-bloco h5 {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .news-bloco p {
    font-size: 0.82rem;
    line-height: 1.55;
    text-align: left;
  }

  /* Dashboard info card mobile */
  .dashboard-info-card {
    padding: 16px;
    border-radius: 12px;
  }

  .dashboard-info-card h3 {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  .dashboard-info-card ul {
    font-size: 0.85rem;
    padding-left: 16px;
  }

  .dashboard-info-card li {
    margin-bottom: 6px;
  }

  /* Profile mobile */
  .profile-header {
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .profile-avatar-large {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
  }

  .profile-header-info h3 {
    font-size: 1.1rem;
  }

  .profile-header-info p {
    font-size: 0.85rem;
  }

  .profile-form {
    gap: 16px;
  }

  .profile-field label {
    font-size: 0.8rem;
  }

  .profile-field input {
    padding: 12px 14px;
    font-size: 0.9rem;
  }

  .field-hint {
    font-size: 0.7rem;
  }

  /* Sentiment chart mobile */
  .sentiment-chart-container {
    padding: 12px;
    margin-bottom: 12px;
  }

  .sentiment-chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
  }

  .sentiment-chart-title {
    font-size: 0.75rem;
  }

  .sentiment-tendencia {
    font-size: 0.7rem;
    padding: 3px 8px;
  }

  .sentiment-chart-svg {
    height: 50px;
  }

  .sentiment-chart-labels span {
    font-size: 0.6rem;
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 32px;
  }

  .header .container {
    padding: 14px 32px;
  }

  .brand {
    font-size: 1.4rem;
  }

  .brand-logo {
    width: 44px;
    height: 44px;
  }

  .hero {
    padding: 100px 0 80px;
  }

  .section {
    padding: 70px 0;
  }

  .dashboard-card--main {
    padding: 32px;
  }
}
