/* ═══════════════════════════════════════════════════
   TradeVision AI — Main Stylesheet
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-primary: #080b14;
  --bg-secondary: #0d1117;
  --bg-tertiary: #111827;
  --bg-card: #0f1623;
  --glass-bg: rgba(15, 22, 35, 0.8);
  --glass-border: rgba(99, 179, 237, 0.12);
  --neon-blue: #3b82f6;
  --neon-cyan: #06b6d4;
  --neon-purple: #8b5cf6;
  --neon-green: #10b981;
  --neon-red: #ef4444;
  --neon-orange: #f97316;
  --neon-yellow: #eab308;
  --text-primary: #f0f4ff;
  --text-secondary: #8898aa;
  --text-muted: #4a5568;
  --bull: #10b981;
  --bear: #ef4444;
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --glow-blue: 0 0 20px rgba(59, 130, 246, 0.3);
  --glow-green: 0 0 20px rgba(16, 185, 129, 0.3);
  --glow-red: 0 0 20px rgba(239, 68, 68, 0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden
}

a {
  color: var(--neon-cyan);
  text-decoration: none
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit
}

input,
select,
textarea {
  font-family: inherit;
  outline: none;
  border: none
}

img {
  max-width: 100%
}

.hidden {
  display: none !important
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px
}

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

::-webkit-scrollbar-thumb {
  background: rgba(99, 130, 200, 0.4);
  border-radius: 4px
}

/* ── Glass ── */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ═══ AUTH OVERLAY ═══ */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.15), transparent 60%), radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1), transparent 50%), #080b14
}

.auth-modal {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  margin: 1rem
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  justify-content: center
}

.logo-icon {
  font-size: 2rem;
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.6))
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary)
}

.logo-text em {
  color: var(--neon-cyan);
  font-style: normal
}

.auth-form {
  display: none
}

.auth-form.active {
  display: block
}

.auth-form h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.25rem
}

.auth-sub {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 0.9rem
}

.auth-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem
}

.auth-switch {
  margin-top: 1.25rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem
}

.auth-demo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--glass-border);
  font-size: 0.8rem;
  color: var(--text-muted)
}

.btn-demo {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--neon-blue);
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  transition: var(--transition)
}

.btn-demo:hover {
  background: rgba(59, 130, 246, 0.2)
}

/* ═══ FORM ELEMENTS ═══ */
.form-group {
  margin-bottom: 1rem
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.925rem;
  transition: var(--transition)
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1)
}

.input-dark {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: var(--transition)
}

.input-dark:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1)
}

.select-dark {
  background: rgba(8, 11, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer
}

.select-dark.sm,
.input-dark.sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem
}

.input-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem
}

.label-badge {
  background: rgba(59, 130, 246, 0.2);
  color: var(--neon-blue);
  font-size: 0.7rem;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  margin-left: 0.5rem;
  font-weight: 500
}

/* ═══ BUTTONS ═══ */
.btn-primary {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem
}

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

.btn-primary.w-full {
  width: 100%;
  justify-content: center
}

.btn-primary.sm {
  padding: 0.5rem 1rem;
  font-size: 0.82rem
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  padding: 0.65rem 1.1rem;
  border-radius: 9px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: var(--transition)
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px)
}

.btn-icon {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1rem
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.14)
}

.btn-loader {
  animation: blink 1s infinite
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0.3
  }
}

.w-full {
  width: 100%
}

/* ═══ SIDEBAR ═══ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: rgba(8, 11, 20, 0.97);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition)
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem
}

.logo .logo-icon {
  font-size: 1.4rem;
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.5))
}

.logo .logo-text {
  font-size: 1.05rem;
  font-weight: 800
}

.logo .logo-text em {
  color: var(--neon-cyan);
  font-style: normal
}

.sidebar-toggle {
  background: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 0.25rem
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0
}

.nav-section {
  margin-bottom: 1.5rem
}

.nav-section-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 1rem 0.5rem
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  margin: 0.1rem 0.5rem;
  border-radius: 9px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative
}

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

.nav-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.1));
  color: var(--neon-cyan);
  border: 1px solid rgba(6, 182, 212, 0.2)
}

.nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center
}

.nav-label {
  flex: 1
}

.nav-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.05em
}

.nav-badge.new {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
  color: #fff
}

.sidebar-user {
  padding: 1rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 0.75rem
}

.user-avatar,
.user-mini .mini-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0
}

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

.user-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.user-plan {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  color: #fff;
  text-transform: uppercase
}

.logout-btn {
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition)
}

.logout-btn:hover {
  color: var(--neon-red)
}

/* ═══ MAIN CONTENT ═══ */
.app {
  display: flex;
  min-height: 100vh
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh
}

.topbar {
  height: var(--topbar-h);
  background: rgba(8, 11, 20, 0.95);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px)
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem
}

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

.mobile-menu-btn {
  display: none;
  background: none;
  color: var(--text-primary);
  font-size: 1.3rem
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem
}

.market-ticker {
  display: flex;
  gap: 1.25rem;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent)
}

.ticker-item {
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-secondary)
}

.ticker-item.bull span {
  color: var(--bull)
}

.ticker-item.bear span {
  color: var(--bear)
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem
}

.user-mini {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500
}

/* ═══ VIEWS ═══ */
.view-content {
  display: none;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease
}

.view-content.active {
  display: block
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px)
  }

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

/* ═══ ANALYZER LAYOUT ═══ */
.analyzer-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 1.25rem;
  align-items: start
}

.analyzer-left {
  display: flex;
  flex-direction: column;
  gap: 1rem
}

.upload-panel {
  padding: 1.5rem
}

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

.panel-header h2 {
  font-size: 1rem;
  font-weight: 700
}

.panel-badge {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em
}

/* ── Drop Zone ── */
.drop-zone {
  border: 2px dashed rgba(99, 179, 237, 0.25);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--neon-cyan);
  background: rgba(6, 182, 212, 0.05);
  box-shadow: var(--glow-blue)
}

.drop-content {
  pointer-events: none
}

.drop-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4))
}

.drop-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem
}

.drop-content p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1rem
}

.drop-formats {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 0.5rem
}

.drop-formats span {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--neon-blue);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px
}

.drop-platforms {
  font-size: 0.72rem;
  color: var(--text-muted)
}

.drop-preview {
  position: relative;
  width: 100%;
  height: 200px
}

.drop-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  border-radius: 8px;
  transition: var(--transition);
  color: #fff;
  font-size: 0.85rem
}

.drop-preview:hover .preview-overlay {
  opacity: 1
}

/* ── Settings ── */
.analysis-settings {
  margin-top: 1.25rem
}

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

.settings-grid .form-group:first-child {
  grid-column: 1/-1
}

.btn-analyze {
  width: 100%;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
  color: #fff;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden
}

.btn-analyze:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--glow-blue), 0 8px 32px rgba(59, 130, 246, 0.3)
}

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

.btn-analyze::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s
}

.btn-analyze:hover:not(:disabled)::before {
  transform: translateX(100%)
}

.btn-icon-ai {
  font-size: 1.1rem;
  animation: pulse 2s infinite
}

.btn-tag {
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.08em
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1)
  }

  50% {
    transform: scale(1.15)
  }
}

/* ── Progress ── */
.analysis-progress {
  margin-top: 1.25rem;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 10px;
  padding: 1rem
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600
}

.progress-pct {
  color: var(--neon-cyan)
}

.progress-bar {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  height: 6px;
  overflow: hidden;
  margin-bottom: 0.75rem
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-cyan));
  border-radius: 6px;
  transition: width 0.4s ease;
  width: 0%
}

.progress-steps {
  font-size: 0.78rem;
  color: var(--text-secondary)
}

.step-item {
  padding: 0.2rem 0;
  transition: var(--transition)
}

.step-item.active {
  color: var(--neon-cyan)
}

.step-item.done {
  color: var(--neon-green)
}

/* ── Quick Stats ── */
.quick-stats {
  padding: 1rem;
  display: flex;
  gap: 0.75rem
}

.stat-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem
}

.stat-icon {
  font-size: 1.25rem
}

.stat-val {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon-cyan)
}

.stat-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500
}

/* ── Results Placeholder ── */
.results-placeholder {
  padding: 3rem 2rem;
  text-align: center;
  height: 100%;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center
}

.placeholder-icon {
  font-size: 3.5rem;
  color: var(--neon-cyan);
  filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.4));
  margin-bottom: 1.25rem;
  animation: float 3s ease-in-out infinite
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-8px)
  }
}

.results-placeholder h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem
}

.results-placeholder p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 380px;
  line-height: 1.7;
  margin-bottom: 1.5rem
}

.feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  text-align: left;
  width: 100%
}

.feature-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary)
}

/* ── Analysis Results ── */
.analysis-results {
  display: flex;
  flex-direction: column;
  gap: 1rem
}

/* Signal Header */
.signal-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem
}

.signal-left {
  display: flex;
  align-items: center;
  gap: 1.25rem
}

.signal-badge {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase
}

.signal-badge.STRONG_BUY,
.signal-badge.BUY {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.5);
  color: var(--bull);
  box-shadow: var(--glow-green)
}

.signal-badge.STRONG_SELL,
.signal-badge.SELL {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.1));
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: var(--bear);
  box-shadow: var(--glow-red)
}

.signal-badge.HOLD {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  color: var(--neon-yellow)
}

.signal-badge.NO_TRADE {
  background: rgba(100, 100, 120, 0.2);
  border: 1px solid rgba(150, 150, 180, 0.3);
  color: var(--text-secondary)
}

.signal-symbol {
  display: block;
  font-size: 1.25rem;
  font-weight: 800
}

.signal-meta {
  font-size: 0.8rem;
  color: var(--text-secondary)
}

.signal-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0
}

.score-circle {
  width: 100px;
  height: 100px;
  position: relative
}

.score-circle svg {
  width: 100%;
  height: 100%
}

.score-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center
}

.score-val {
  font-size: 1.6rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace
}

.score-lbl {
  font-size: 0.65rem;
  color: var(--text-muted)
}

.signal-scores {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 140px
}

.mini-score {}

.ms-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem
}

.ms-val {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace
}

.ms-val.danger {
  color: var(--neon-red)
}

.ms-bar {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  height: 4px;
  margin-top: 0.25rem;
  overflow: hidden
}

.ms-fill {
  height: 100%;
  background: var(--neon-cyan);
  border-radius: 4px;
  transition: width 1.2s ease
}

.ms-fill.danger {
  background: var(--neon-red)
}

/* Price Levels */
.price-levels {
  padding: 1.25rem
}

.section-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem
}

.level-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem;
  text-align: center;
  transition: var(--transition)
}

.level-card:hover {
  background: rgba(255, 255, 255, 0.08)
}

.level-card.entry {
  border-color: rgba(6, 182, 212, 0.3)
}

.level-card.stop {
  border-color: rgba(239, 68, 68, 0.3)
}

.level-card.tp1,
.level-card.tp2,
.level-card.tp3 {
  border-color: rgba(16, 185, 129, 0.25)
}

.level-card.rr {
  border-color: rgba(139, 92, 246, 0.3)
}

.level-icon {
  font-size: 1rem;
  display: block;
  margin-bottom: 0.35rem
}

.level-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem
}

.level-val {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary)
}

.level-card.entry .level-val {
  color: var(--neon-cyan)
}

.level-card.stop .level-val {
  color: var(--neon-red)
}

.level-card.tp1 .level-val,
.level-card.tp2 .level-val,
.level-card.tp3 .level-val {
  color: var(--bull)
}

.level-card.rr .level-val {
  color: var(--neon-purple)
}

/* Score Grid */
.score-grid {
  padding: 1.25rem
}

.score-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem
}

.score-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem
}

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

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

.si-val {
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace
}

.si-bar {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  height: 5px;
  overflow: hidden
}

.si-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.2s ease 0.3s
}

/* Analysis Tabs */
.analysis-tabs {
  overflow: hidden
}

.tabs-header {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--glass-border);
  padding: 0 1.25rem;
  gap: 0.25rem
}

.tab {
  background: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.85rem 0.85rem;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap
}

.tab:hover {
  color: var(--text-primary)
}

.tab.active {
  color: var(--neon-cyan);
  border-bottom-color: var(--neon-cyan)
}

.tabs-content {
  padding: 1.25rem
}

.tab-panel {
  display: none
}

.tab-panel.active {
  display: block
}

/* Tab content cards */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.65rem 0.85rem;
  border-radius: 8px
}

.ii-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em
}

.ii-val {
  font-size: 0.88rem;
  font-weight: 600
}

.ii-val.bull {
  color: var(--bull)
}

.ii-val.bear {
  color: var(--bear)
}

.ii-val.neutral {
  color: var(--neon-yellow)
}

.tab-summary {
  margin-top: 1rem;
  padding: 0.85rem;
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-secondary)
}

.bool-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.83rem
}

.bool-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0
}

.bool-dot.yes {
  background: var(--bull)
}

.bool-dot.no {
  background: rgba(255, 255, 255, 0.2)
}

.bool-dot.warn {
  background: var(--neon-red)
}

/* Patterns */
.pattern-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem
}

.ptag {
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: 6px
}

.ptag.candle {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--neon-cyan)
}

/* AI Report */
.ai-report-content {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-line
}

.ai-report-content strong {
  color: var(--text-primary)
}

.key-observations {
  margin-top: 1rem
}

.obs-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem
}

.obs-item {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--text-secondary)
}

.obs-item::before {
  content: '◈';
  color: var(--neon-cyan);
  font-size: 0.75rem;
  flex-shrink: 0;
  margin-top: 0.1rem
}

/* Warnings */
.warnings-section {
  margin-top: 0
}

.warnings-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start
}

.warn-icon {
  font-size: 1.2rem;
  flex-shrink: 0
}

.warn-item {
  font-size: 0.83rem;
  color: #fca5a5;
  padding: 0.2rem 0
}

/* Result Actions */
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.5rem 0
}

/* ═══ HISTORY VIEW ═══ */
.history-controls {
  padding: 1rem 1.25rem;
  margin-bottom: 1rem
}

.filter-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem
}

.history-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: var(--transition)
}

.history-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow)
}

.hc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem
}

.hc-symbol {
  font-size: 1rem;
  font-weight: 700
}

.hc-signal {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em
}

.hc-signal.STRONG_BUY,
.hc-signal.BUY {
  background: rgba(16, 185, 129, 0.2);
  color: var(--bull);
  border: 1px solid rgba(16, 185, 129, 0.3)
}

.hc-signal.STRONG_SELL,
.hc-signal.SELL {
  background: rgba(239, 68, 68, 0.15);
  color: var(--bear);
  border: 1px solid rgba(239, 68, 68, 0.3)
}

.hc-signal.HOLD {
  background: rgba(234, 179, 8, 0.15);
  color: var(--neon-yellow);
  border: 1px solid rgba(234, 179, 8, 0.3)
}

.hc-signal.NO_TRADE {
  background: rgba(100, 100, 120, 0.15);
  color: var(--text-muted);
  border: 1px solid rgba(150, 150, 180, 0.2)
}

.hc-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem
}

.hc-score {
  display: flex;
  align-items: center;
  gap: 0.75rem
}

.hc-score-bar {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden
}

.hc-score-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-cyan))
}

.hc-score-val {
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-cyan)
}

.hc-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 0.75rem;
  opacity: 0.8
}

.hc-quality {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  display: inline-block;
  text-transform: uppercase
}

.quality-ultra_strong {
  background: rgba(16, 185, 129, 0.2);
  color: var(--bull)
}

.quality-strong {
  background: rgba(59, 130, 246, 0.2);
  color: var(--neon-blue)
}

.quality-good {
  background: rgba(6, 182, 212, 0.15);
  color: var(--neon-cyan)
}

.quality-medium {
  background: rgba(234, 179, 8, 0.15);
  color: var(--neon-yellow)
}

.quality-avoid {
  background: rgba(239, 68, 68, 0.15);
  color: var(--bear)
}

/* Pagination */
.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap
}

.page-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: 7px;
  font-size: 0.83rem;
  transition: var(--transition)
}

.page-btn:hover,
.page-btn.active {
  background: var(--neon-blue);
  border-color: var(--neon-blue);
  color: #fff
}

/* ═══ JOURNAL ═══ */
.journal-header {
  margin-bottom: 1rem
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem
}

.journal-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem
}

.jc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem
}

.jc-symbol {
  font-size: 1rem;
  font-weight: 700
}

.jc-dir {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 6px
}

.jc-dir.LONG {
  background: rgba(16, 185, 129, 0.2);
  color: var(--bull)
}

.jc-dir.SHORT {
  background: rgba(239, 68, 68, 0.15);
  color: var(--bear)
}

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

.jc-stat {
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  padding: 0.5rem
}

.jcs-val {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace
}

.jcs-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase
}

/* ═══ WATCHLIST ═══ */
.watchlist-controls {
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem
}

.watch-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem
}

.watch-card:hover {
  border-color: rgba(6, 182, 212, 0.3)
}

.wc-symbol {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem
}

.wc-market {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase
}

/* ═══ STATS ═══ */
.stats-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem
}

.stats-card-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem
}

.stats-big-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center
}

.sbc-val {
  font-size: 2.2rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--neon-cyan);
  display: block
}

.sbc-lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em
}

.stats-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem
}

.chart-card {
  padding: 1.25rem
}

.chart-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-secondary)
}

.chart-card canvas {
  max-height: 200px
}

/* ═══ FEAR & GREED ═══ */
.fg-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start
}

.fg-meter-card {
  padding: 2rem;
  text-align: center
}

.fg-meter-card h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem
}

.fg-gauge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem
}

.fg-gauge {
  position: relative;
  width: 220px
}

.gauge-svg {
  width: 100%;
  display: block
}

.gauge-label {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  text-align: center
}

.gauge-val {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  display: block
}

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

.fg-zones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem
}

.fg-zone {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px
}

.fg-zone.fear {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5
}

.fg-zone.fear2 {
  background: rgba(249, 115, 22, 0.15);
  color: #fdba74
}

.fg-zone.neutral {
  background: rgba(234, 179, 8, 0.15);
  color: #fcd34d
}

.fg-zone.greed {
  background: rgba(132, 204, 22, 0.15);
  color: #bef264
}

.fg-zone.greed2 {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac
}

.fg-history-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap
}

.fg-hist-item {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  padding: 0.4rem 0.75rem;
  text-align: center;
  font-size: 0.75rem
}

.fhi-val {
  display: block;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace
}

.fhi-date {
  color: var(--text-muted);
  font-size: 0.65rem
}

.market-emotion-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem
}

.emotion-card {
  padding: 1rem
}

.emotion-card h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.85rem
}

.emotion-meter {
  margin-bottom: 0.5rem
}

.em-bar {
  height: 8px;
  background: linear-gradient(90deg, #ef4444, #eab308, #22c55e);
  border-radius: 6px;
  position: relative;
  overflow: hidden
}

.em-fill {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0 6px 6px 0;
  transition: width 1s ease
}

.em-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 0.35rem
}

.emotion-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--neon-yellow)
}

/* ═══ CALENDAR ═══ */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem
}

.calendar-card,
.news-card {
  padding: 1.5rem
}

.cal-legend {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.75rem
}

.impact.high {
  color: var(--neon-red)
}

.impact.med {
  color: var(--neon-yellow)
}

.impact.low {
  color: var(--bull)
}

.cal-events {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 500px;
  overflow-y: auto
}

.cal-event {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid;
  border-radius: 0 8px 8px 0;
  padding: 0.65rem 0.85rem
}

.cal-event.high {
  border-color: var(--neon-red)
}

.cal-event.medium {
  border-color: var(--neon-yellow)
}

.cal-event.low {
  border-color: var(--bull)
}

.ce-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace
}

.ce-name {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.2rem 0
}

.ce-actual {
  font-size: 0.77rem;
  color: var(--text-secondary)
}

.news-filter-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap
}

.news-filter-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.35rem 0.85rem;
  border-radius: 7px;
  font-size: 0.8rem;
  transition: var(--transition)
}

.news-filter-btn.active,
.news-filter-btn:hover {
  background: var(--neon-blue);
  border-color: var(--neon-blue);
  color: #fff
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 500px;
  overflow-y: auto
}

.news-item {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 0.75rem;
  transition: var(--transition)
}

.news-item:hover {
  background: rgba(255, 255, 255, 0.08)
}

.ni-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  line-height: 1.4
}

.ni-meta {
  font-size: 0.72rem;
  color: var(--text-muted)
}

.ni-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.2);
  color: var(--neon-blue);
  margin-left: 0.4rem
}

/* ═══ SETTINGS ═══ */
.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem
}

.settings-card {
  padding: 1.5rem
}

.settings-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--glass-border)
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem
}

.toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  cursor: pointer;
  transition: var(--transition)
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  left: 3px;
  bottom: 3px;
  transition: var(--transition)
}

.toggle input:checked+.toggle-slider {
  background: var(--neon-cyan)
}

.toggle input:checked+.toggle-slider::before {
  transform: translateX(22px)
}

/* ═══ CHATBOT ═══ */
.chatbot-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4), 0 0 0 0 rgba(59, 130, 246, 0.4);
  animation: chatPulse 3s ease-in-out infinite;
  transition: var(--transition)
}

.chatbot-fab:hover {
  transform: scale(1.1)
}

@keyframes chatPulse {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4), 0 0 0 0 rgba(59, 130, 246, 0.4)
  }

  50% {
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4), 0 0 0 10px rgba(59, 130, 246, 0)
  }
}

.chatbot-window {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 340px;
  height: 460px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden
}

.chat-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem
}

.chat-avatar {
  font-size: 1.2rem;
  color: var(--neon-cyan)
}

.chat-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 700
}

.chat-status {
  font-size: 0.7rem;
  color: var(--bull)
}

.chat-header button {
  background: none;
  color: var(--text-muted);
  font-size: 1rem;
  transition: var(--transition)
}

.chat-header button:hover {
  color: var(--text-primary)
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem
}

.chat-msg {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start
}

.chat-msg.user {
  flex-direction: row-reverse
}

.msg-avatar {
  font-size: 1rem;
  color: var(--neon-cyan);
  flex-shrink: 0;
  margin-top: 2px
}

.msg-content {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 0.65rem 0.875rem;
  font-size: 0.82rem;
  line-height: 1.6;
  max-width: 85%
}

.chat-msg.user .msg-content {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.3)
}

.chat-input-row {
  padding: 0.75rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 0.5rem
}

.chat-input-row .input-dark {
  flex: 1;
  padding: 0.55rem 0.875rem;
  font-size: 0.83rem
}

.chat-send {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-cyan));
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition)
}

.chat-send:hover {
  transform: scale(1.05)
}

/* ═══ MODAL ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem
}

.modal {
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column
}

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

.modal-header h2 {
  font-size: 1rem;
  font-weight: 700
}

.modal-header button {
  background: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition)
}

.modal-header button:hover {
  color: var(--text-primary)
}

.modal-body {
  overflow-y: auto;
  padding: 1.5rem
}

/* ═══ EMPTY STATE ═══ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem
}

.empty-state p {
  color: var(--text-secondary);
  font-size: 0.875rem
}

/* ═══ TOAST ═══ */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem
}

.toast {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  max-width: 320px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  backdrop-filter: blur(20px)
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.4)
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4)
}

.toast.info {
  border-color: rgba(59, 130, 246, 0.4)
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px)
  }

  to {
    opacity: 1;
    transform: translateX(0)
  }
}

/* ═══ LOADING ═══ */
.loading-spinner {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
  font-size: 0.9rem
}

/* ═══ BACKGROUND DECORATION ═══ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 10%, rgba(59, 130, 246, 0.06) 0%, transparent 50%), radial-gradient(ellipse at 80% 90%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0
}

/* ═══ RESPONSIVE ═══ */
@media(max-width:1100px) {
  .analyzer-layout {
    grid-template-columns: 1fr
  }

  .settings-layout {
    grid-template-columns: 1fr
  }

  .stats-charts-row {
    grid-template-columns: 1fr
  }

  .fg-dashboard {
    grid-template-columns: 1fr
  }

  .calendar-layout {
    grid-template-columns: 1fr
  }
}

@media(max-width:768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 300
  }

  .sidebar.open {
    transform: translateX(0)
  }

  .main-content {
    margin-left: 0
  }

  .mobile-menu-btn {
    display: flex
  }

  .market-ticker {
    display: none
  }

  .levels-grid {
    grid-template-columns: 1fr 1fr
  }

  .score-items {
    grid-template-columns: 1fr
  }

  .info-grid {
    grid-template-columns: 1fr
  }

  .settings-layout {
    grid-template-columns: 1fr
  }

  .chatbot-window {
    width: calc(100vw - 3rem);
    right: 1.5rem
  }
}

@media(max-width:480px) {
  .levels-grid {
    grid-template-columns: 1fr
  }

  .view-content {
    padding: 1rem
  }

  .signal-header {
    flex-direction: column;
    gap: 1rem
  }

  .signal-right {
    width: 100%;
    justify-content: center
  }
}