/* ==========================================================================
   AI TRADING CONCIERGE & COCKPIT — DESIGN SYSTEM CSS
   Fintech Dark Mode Premium Specification (DESIGN.md)
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-primary: #090D16;
  --surface-nav: rgba(15, 23, 42, 0.85);
  --surface-card: rgba(15, 23, 42, 0.70);
  --surface-hover: rgba(30, 41, 59, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  
  --emerald: #10B981;
  --emerald-hover: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.20);

  --gold: #F59E0B;
  --gold-hover: #D97706;
  --gold-glow: rgba(245, 158, 11, 0.20);

  --blue: #3B82F6;
  --blue-glow: rgba(59, 130, 246, 0.20);
  
  --purple: #8B5CF6;
  --danger: #EF4444;
  --danger-glow: rgba(239, 68, 68, 0.20);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, monospace;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

/* Telegram WebApp Optimizations */
body.telegram-webapp {
  padding-top: 0;
  padding-bottom: calc(env(safe-area-inset-bottom, 16px) + 20px);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* Typography Utilities */
.font-mono {
  font-family: var(--font-mono);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: #334155;
}

/* ==========================================================================
   TOP NAVIGATION BAR
   ========================================================================== */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 28px;
  background: var(--surface-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.top-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}

.nav-brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  font-size: 26px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.brand-text h1 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}
.brand-text h1 span {
  color: var(--gold);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--emerald);
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   VIEW TABS (WORKSPACES)
   ========================================================================== */

.view-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.85);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.view-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

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

.view-tab-btn.active {
  color: #FFFFFF;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.22);
  font-weight: 600;
}

.view-tab-btn .tab-icon {
  font-size: 14px;
  transition: transform var(--transition-fast);
}

.view-tab-btn.active .tab-icon {
  transform: scale(1.15);
}

.quick-stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
}
.pill-label { color: var(--text-muted); }
.pill-value { font-weight: 600; font-family: var(--font-mono); }
.pill-value.positive { color: var(--emerald); }
.pill-divider { color: var(--border); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Button Component Styles */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
}
.btn-primary {
  background: var(--emerald);
  color: #FFFFFF;
  box-shadow: 0 2px 10px var(--emerald-glow);
}
.btn-primary:hover {
  background: var(--emerald-hover);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}
.btn-secondary {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.btn-secondary:hover {
  background: rgba(59, 130, 246, 0.25);
  transform: translateY(-1px);
}

/* ==========================================================================
   MAIN LAYOUT & CONTAINERS
   ========================================================================== */

.main-container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 28px 80px 28px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ==========================================================================
   WORKSPACE VIEW PANES (SPA VIEWS)
   ========================================================================== */

.view-pane {
  display: none;
  flex-direction: column;
  gap: 32px;
  animation: fadeInPane 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-pane.active {
  display: flex;
}

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

/* ==========================================================================
   CONTEXTUAL DICTIONARY SHORTCUT BUTTONS
   ========================================================================== */

.context-dict-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-full);
  color: #FBBF24;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
  line-height: 1.3;
}

.context-dict-btn:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
}

.section-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title-bar h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.live-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--emerald-glow);
  color: var(--emerald);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

/* ==========================================================================
   SECTION 1: O CONCIERGE & METRICS
   ========================================================================== */

.concierge-hero-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 30px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}
.concierge-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.concierge-avatar {
  position: relative;
  flex-shrink: 0;
}
.avatar-img {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #1E293B, #0F172A);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid var(--gold);
  position: relative;
  z-index: 2;
}
.avatar-glow {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: var(--gold-glow);
  filter: blur(12px);
  border-radius: var(--radius-full);
  z-index: 1;
}

.concierge-content {
  flex: 1;
}
.concierge-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.concierge-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.chip-balanced {
  background: var(--emerald-glow);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background-color: currentColor;
}

.concierge-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}



/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.metric-card {
  padding: 20px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}
.metric-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.metric-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.metric-icon {
  font-size: 16px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.metric-value.positive { color: var(--emerald); }

.metric-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==========================================================================
   PORTFOLIO BREAKDOWN (LIVRE VS EM NEGOCIAÇÃO)
   ========================================================================== */

.portfolio-breakdown-card {
  margin-top: 20px;
  padding: 24px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}

.portfolio-breakdown-card:hover {
  border-color: var(--border-hover);
}

.breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.breakdown-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.breakdown-icon {
  font-size: 24px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.breakdown-title-group h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.breakdown-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.breakdown-mode-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--emerald);
}

.breakdown-progress-container {
  margin: 16px 0;
}

.breakdown-progress-bar {
  height: 28px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
}

.bar-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 8px;
  transition: width 0.5s ease;
}

.segment-available {
  background: linear-gradient(90deg, #10B981, #059669);
  color: #FFFFFF;
}

.segment-trading {
  background: linear-gradient(90deg, #F59E0B, #D97706);
  color: #FFFFFF;
}

.breakdown-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.breakdown-item {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-icon-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.item-main-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
}

.item-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.item-status-pill {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

.pill-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pill-gold {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   SECTION 2: INSIGHTS DO DIA
   ========================================================================== */

.insights-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.insights-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.insight-box {
  padding: 22px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}
.box-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 8px;
}

.climate-heading, .stance-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.climate-icon {
  font-size: 24px;
}
.climate-heading h4, .stance-heading h4 {
  font-size: 17px;
  font-weight: 600;
}

.insight-box p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Triggers Section */
.triggers-section {
  padding: 22px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.triggers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.trigger-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}
.trigger-condition {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.trigger-action {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.trigger-status {
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.status-monitoring {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
}
.status-active {
  background: var(--emerald-glow);
  color: var(--emerald);
}

/* Lesson Card */
.lesson-card {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-lg);
}
.lesson-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.lesson-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}
.lesson-author {
  font-size: 12px;
  color: var(--text-muted);
}
.lesson-quote {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-style: italic;
}
.lesson-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   SECTION 2.5: RADAR DE OPORTUNIDADES DA IA (MARKET SCREENER)
   ========================================================================== */

.section-scanner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
  margin-top: 2px;
}

.scanner-breadth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--emerald);
}

/* ==========================================================================
   NEXT TARGET HERO CARD (RADAR SENTINELA)
   ========================================================================== */

.next-target-hero-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 0 25px rgba(16, 185, 129, 0.08);
  position: relative;
  overflow: hidden;
  margin-bottom: 8px;
}
.next-target-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--emerald), var(--gold), transparent);
}

.target-radar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.target-radar-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--emerald);
}
.radar-ping {
  width: 8px;
  height: 8px;
  background: var(--emerald);
  border-radius: 50%;
  animation: radarPulse 1.8s infinite;
}
@keyframes radarPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.target-status-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.live-beacon {
  width: 6px;
  height: 6px;
  background: #3B82F6;
  border-radius: 50%;
  box-shadow: 0 0 8px #3B82F6;
}

.target-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.target-coin-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}
.target-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid rgba(16, 185, 129, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.2);
}
.target-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.target-title-row h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}
.target-category-pill {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}
.pill-discount {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.pill-momentum {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.target-sub-desc {
  font-size: 13px;
  color: var(--text-secondary);
  display: block;
  margin-top: 4px;
}

.target-metrics-group {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.target-metric-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 105px;
}
.target-metric-box .metric-lbl {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.target-metric-box .metric-val {
  font-size: 16px;
  font-weight: 700;
}
.highlight-gold { color: var(--gold); }
.highlight-emerald { color: var(--emerald); }

.target-why-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.target-why-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.target-algo-tag {
  color: #c084fc;
  font-weight: 600;
  font-size: 11px;
}
.target-why-box p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}
.target-condition-alert {
  font-size: 12px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.1);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  color: #FCD34D;
}

.scanner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.scanner-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all var(--transition-normal);
  backdrop-filter: blur(12px);
  position: relative;
}
.scanner-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.scanner-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scanner-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-momentum {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.badge-discount {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-anchor {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-held {
  background: rgba(16, 185, 129, 0.2);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.scanner-score-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(245, 158, 11, 0.1);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.scanner-coin-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.scanner-coin-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.scanner-turnover-tag {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.scanner-price-group {
  text-align: right;
}
.scanner-price {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.scanner-change {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin-left: 6px;
}

.scanner-range-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.scanner-range-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.scanner-range-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
}
.scanner-range-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--emerald) 0%, var(--gold) 100%);
  transition: width 0.4s ease;
}

.scanner-why {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border-left: 2px solid rgba(245, 158, 11, 0.4);
}
.scanner-why strong {
  color: var(--gold);
}

.scanner-card-skeleton {
  padding: 24px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skeleton-line {
  height: 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
  0% { opacity: 0.4; }
  50% { opacity: 0.8; }
  100% { opacity: 0.4; }
}

/* ==========================================================================
   SECTION 3: TRADING COCKPIT & CHARTS
   ========================================================================== */

.cockpit-selectors {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pair-toggle-group {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.pair-btn {
  padding: 6px 14px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.pair-btn.active {
  background: var(--blue);
  color: #FFFFFF;
}
.interval-badge {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.cockpit-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

.chart-panel {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.chart-asset-info {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.asset-symbol {
  font-size: 18px;
  font-weight: 700;
}
.asset-price {
  font-size: 22px;
  font-weight: 700;
}
.asset-change {
  font-size: 13px;
  font-weight: 600;
  color: var(--emerald);
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--text-muted);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: var(--radius-full); }
.dot-ema20 { background-color: #3B82F6; }
.dot-sma50 { background-color: #F59E0B; }
.marker-buy { color: var(--emerald); font-size: 12px; }
.marker-sell { color: var(--danger); font-size: 12px; }

.chart-container {
  height: 440px;
  width: 100%;
}

/* Translator Sidebar */
.translator-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.translator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.translator-header h4 {
  font-size: 15px;
  font-weight: 600;
}
.info-tooltip {
  cursor: help;
  font-size: 14px;
}

.gauge-card, .translator-card {
  padding: 18px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.gauge-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.indicator-name, .card-mini-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}
.gauge-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--emerald);
}

/* RSI Gradient Pointer */
.rsi-bar-wrapper {
  position: relative;
  margin: 12px 0 6px 0;
}
.rsi-gradient-bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #10B981 0%, #3B82F6 40%, #F59E0B 75%, #EF4444 100%);
}
.rsi-pointer {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: #FFFFFF;
  border: 3px solid var(--surface-card);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
  transition: left 0.4s ease;
}
.rsi-scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.indicator-explainer {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--gold);
}

.ma-status-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin: 6px 0;
}
.ma-label { color: var(--text-muted); }
.ma-val { font-weight: 600; }

.levels-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.level-box {
  padding: 10px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.level-box.support {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.level-box.resistance {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}
.level-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.level-box.support .level-tag { color: var(--emerald); }
.level-box.resistance .level-tag { color: var(--danger); }
.level-price { font-size: 14px; font-weight: 700; }


/* ==========================================================================
   SECTION 4: TIMELINE DE DECISÕES
   ========================================================================== */

.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-card {
  padding: 18px 24px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: all var(--transition-normal);
}
.timeline-card:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.timeline-badge {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.timeline-badge.buy {
  background: var(--emerald-glow);
  color: var(--emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.timeline-badge.sell {
  background: var(--danger-glow);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.timeline-badge.rebalance {
  background: var(--blue-glow);
  color: #60A5FA;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.timeline-badge.rotation {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.timeline-body {
  flex: 1;
}
.timeline-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.timeline-title {
  font-size: 15px;
  font-weight: 600;
}
.timeline-time {
  font-size: 12px;
  color: var(--text-muted);
}
.timeline-why {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 4px;
}
.timeline-pedagogical {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.05);
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  color: #FCD34D;
}

/* ==========================================================================
   MODAL: DICIONÁRIO DO INVESTIDOR
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  background: #0F172A;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}
.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text-primary);
}

.modal-search {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-search input {
  width: 100%;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}
.modal-search input:focus {
  border-color: var(--blue);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dict-item {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.dict-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dict-term {
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
}
.dict-level {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
  color: var(--text-muted);
}
.dict-summary {
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.dict-example {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-style: italic;
}

/* ==========================================================================
   MOBILE-FIRST RESPONSIVE OPTIMIZATIONS (Smartphones & Telegram Mini App)
   ========================================================================== */

@media (max-width: 1100px) {
  .top-nav {
    padding: 10px 18px;
  }
  .cockpit-layout {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .triggers-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Page Spacing */
  body {
    font-size: 14px;
  }

  .main-container {
    padding: 10px 12px 60px 12px;
  }

  /* Compact Sticky Header (Max ~86px height total instead of 250px) */
  .top-nav {
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
  }

  .top-nav-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 8px 10px;
    align-items: center;
    width: 100%;
  }

  /* Row 1: Brand */
  .nav-brand-group {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .brand-icon {
    font-size: 18px;
    padding: 4px;
    border-radius: var(--radius-sm);
  }

  .brand-text h1 {
    font-size: 13px;
    letter-spacing: 0.02em;
    line-height: 1.1;
  }

  .brand-badge {
    font-size: 9px;
    gap: 4px;
  }

  .pulse-dot {
    width: 6px;
    height: 6px;
  }

  /* Row 1: Equity Ticker Pill */
  .quick-stat-pill {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    padding: 4px 8px;
    font-size: 11px;
    gap: 4px;
    justify-self: center;
  }

  .quick-stat-pill .pill-label {
    display: none; /* Hide label to save space on small screens */
  }

  .quick-stat-pill .pill-value {
    font-size: 12px;
  }

  /* Row 1: Action Icons */
  .nav-actions {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
  }

  .nav-action-btn {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    min-height: 32px;
  }

  .nav-btn-text {
    display: none; /* Icon-only buttons on mobile */
  }

  /* Inside Telegram WebApp or Mobile, hide redundant Telegram connect button */
  body.telegram-webapp #btn-open-telegram,
  #btn-open-telegram {
    display: none;
  }

  /* Row 2: Segmented Tabs (Full Width 50% / 50%) */
  .nav-center {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    width: 100%;
    margin-top: 2px;
  }

  .view-tabs {
    width: 100%;
    display: flex;
    padding: 3px;
    gap: 4px;
    background: rgba(15, 23, 42, 0.95);
    border-radius: var(--radius-md);
  }

  .view-tab-btn {
    flex: 1;
    justify-content: center;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
  }

  .view-tab-btn .tab-icon {
    font-size: 13px;
  }

  /* Section Titles */
  .section-title-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }

  .section-title-bar h3 {
    font-size: 16px;
  }

  .section-subtitle {
    font-size: 12px;
  }

  /* Concierge Hero Card */
  .concierge-hero-card {
    padding: 14px 16px;
    gap: 14px;
    border-radius: var(--radius-lg);
  }

  .avatar-img {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .concierge-header {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
  }

  .concierge-header h2 {
    font-size: 17px;
  }

  .status-chip {
    font-size: 10px;
    padding: 3px 8px;
  }

  .concierge-narrative {
    font-size: 13px;
    line-height: 1.55;
  }

  /* Metrics Grid (Compact 2x2 on Mobile) */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    margin-top: 10px;
  }

  .metric-card {
    padding: 12px 14px;
    border-radius: var(--radius-md);
  }

  .metric-header {
    margin-bottom: 6px;
  }

  .metric-title {
    font-size: 11px;
  }

  .metric-icon {
    font-size: 14px;
  }

  .metric-value {
    font-size: 17px;
  }

  .metric-sub {
    font-size: 10px;
    margin-top: 4px;
    line-height: 1.3;
  }

  /* Portfolio Breakdown Card */
  .portfolio-breakdown-card {
    padding: 14px 16px;
    margin-top: 12px;
    border-radius: var(--radius-lg);
  }

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

  .breakdown-title-group h4 {
    font-size: 14px;
  }

  .breakdown-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .breakdown-item {
    padding: 12px 14px;
  }

  /* Next Target Hero Card */
  .next-target-hero-card {
    padding: 14px 16px;
    gap: 14px;
    border-radius: var(--radius-lg);
  }

  .target-radar-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .target-radar-badge {
    justify-content: center;
    font-size: 10px;
    padding: 4px 10px;
  }

  .target-status-live {
    font-size: 11px;
    justify-content: center;
  }

  .target-hero-main {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .target-coin-profile {
    gap: 12px;
  }

  .target-avatar {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .target-title-row h3 {
    font-size: 17px;
  }

  .target-category-pill {
    font-size: 10px;
    padding: 2px 8px;
  }

  .target-metrics-group {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    width: 100%;
  }

  .target-metric-box {
    min-width: 0;
    padding: 8px 12px;
  }

  .target-metric-box .metric-lbl {
    font-size: 10px;
  }

  .target-metric-box .metric-val {
    font-size: 15px;
  }

  #btn-view-target-chart {
    width: 100%;
    justify-content: center;
    padding: 10px 14px;
    font-size: 13px;
    min-height: 42px;
  }

  .target-why-box {
    padding: 12px 14px;
    gap: 8px;
  }

  .target-why-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 11px;
  }

  .target-why-box p {
    font-size: 12px;
    line-height: 1.5;
  }

  .target-condition-alert {
    font-size: 11px;
    padding: 8px 10px;
  }

  /* Scanner Opportunities Grid */
  .scanner-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .scanner-card {
    padding: 14px 16px;
    gap: 12px;
  }

  .scanner-action-btn {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    font-size: 13px;
  }

  /* Timeline Cards */
  .timeline-container {
    gap: 10px;
  }

  .timeline-card {
    padding: 12px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border-radius: var(--radius-md);
  }

  .timeline-badge {
    align-self: flex-start;
    font-size: 10px;
    padding: 3px 8px;
  }

  .timeline-title-row {
    margin-bottom: 4px;
  }

  .timeline-title {
    font-size: 14px;
  }

  .timeline-time {
    font-size: 11px;
  }

  .timeline-why {
    font-size: 12px;
    line-height: 1.45;
  }

  .timeline-pedagogical {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* Market Cockpit & Chart on Mobile */
  .section-cockpit {
    gap: 12px;
  }

  .cockpit-selectors {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .pair-toggle-group {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 6px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .pair-toggle-group::-webkit-scrollbar {
    display: none;
  }

  .pair-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .interval-badge {
    align-self: flex-start;
    font-size: 11px;
  }

  .cockpit-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .chart-panel {
    padding: 12px;
    border-radius: var(--radius-lg);
  }

  .chart-container {
    height: 320px !important;
  }

  .translator-panel {
    padding: 14px 16px;
  }

  /* Insights on Mobile */
  .insights-top-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .climate-card, .stance-card, .lesson-card {
    padding: 14px 16px;
  }

  .triggers-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .trigger-card {
    padding: 12px 14px;
  }

  /* Full Screen Mobile Dictionary Drawer */
  #modal-dictionary .modal-dialog {
    max-width: 100%;
    border-radius: 0;
    height: 100%;
    max-height: 100%;
  }

  .modal-dialog {
    padding: 16px;
    width: 95%;
  }
}

/* ==========================================================================
   DRAWER / SLIDE-OVER (DICIONÁRIO DO INVESTIDOR)
   ========================================================================== */

#modal-dictionary.modal-backdrop {
  justify-content: flex-end;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#modal-dictionary.modal-backdrop.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

#modal-dictionary .modal-dialog {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  border-right: none;
  border-top: none;
  border-bottom: none;
  background: #0B1120;
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.8), -1px 0 0 rgba(255, 255, 255, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#modal-dictionary.active .modal-dialog {
  transform: translateX(0);
}

.dict-item.highlight-flash {
  border-color: var(--gold) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.4) !important;
  animation: pulseTerm 1.6s ease;
}

@keyframes pulseTerm {
  0% { transform: scale(1); background: rgba(245, 158, 11, 0.25); }
  50% { transform: scale(1.02); background: rgba(245, 158, 11, 0.35); }
  100% { transform: scale(1); background: rgba(255, 255, 255, 0.02); }
}
