:root {
  --bg-color: #080b11;
  --sidebar-bg: #0d121f;
  --text-color: #e2e8f0;
  --text-secondary: #94a3b8;
  --primary-color: #00e5ff;
  --primary-hover: #00b8d4;
  --primary-glow: rgba(0, 229, 255, 0.15);
  --accent-color: #00e676; /* Bullish Green */
  --danger-color: #ff1744;  /* Bearish Red */
  --warning-color: #ffd600; /* Caution Amber */
  --info-color: #81d4fa;    /* Wait Sky Blue */
  --border-color: rgba(255, 255, 255, 0.06);
  --input-bg: #111726;
  --card-bg: rgba(17, 24, 43, 0.45);
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 50% 50%, #121828 0%, #080b11 100%);
  color: var(--text-color);
  height: 100vh;
  display: flex;
  overflow: hidden;
  letter-spacing: -0.01em;
}

#app {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Sidebar Styles */
#sidebar {
  width: 320px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
  z-index: 100;
  flex-shrink: 0;
  box-sizing: border-box;
}

#sidebar h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

.search-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input,
select {
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 12px;
  border-radius: 8px;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

input::placeholder {
  color: #64748b;
}

input:focus,
select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-glow);
  background-color: #151d30;
}

button {
  background-color: var(--primary-color);
  background-image: linear-gradient(135deg, var(--primary-color) 0%, #00b0ff 100%);
  color: #090d16;
  border: none;
  padding: 11px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.15);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 229, 255, 0.3);
  filter: brightness(1.05);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #475569 !important;
  cursor: not-allowed;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text-color) !important;
  box-shadow: none !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

.scan-section {
  border-top: 1px solid var(--border-color);
  padding-top: 18px;
  margin-top: auto;
}

/* Sidebar Accordions */
.sidebar-section {
  border-bottom: 1px solid var(--border-color);
}

.section-header {
  font-family: var(--font-display);
  font-weight: 500;
  padding: 12px 4px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  color: var(--text-secondary);
  user-select: none;
  transition: color 0.2s ease;
}

.section-header:hover {
  color: #fff;
}

.section-header .arrow {
  font-size: 0.7rem;
  color: #64748b;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-section:not(.collapsed) .arrow {
  transform: rotate(90deg);
  color: var(--primary-color);
}

.sidebar-section:not(.collapsed) .section-header {
  color: #fff;
}

.section-content {
  padding: 4px 4px 16px 4px;
  animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Main Content Styles */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

#chartsArea {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.chart-box {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background-color: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  border-radius: 12px 12px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.panel-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 0.8rem;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.panel-content {
  flex: 1;
  position: relative;
  padding: 16px;
  min-height: 0;
}

/* Minimized State */
.chart-box.minimized {
  height: auto !important;
  flex: 0 0 auto;
}

.chart-box.minimized .panel-content {
  display: none;
}

.chart-box.minimized .panel-header {
  border-bottom: none;
  border-radius: 12px;
}

/* Maximized State */
.chart-box.maximized {
  position: fixed;
  top: 15px;
  left: 15px;
  width: calc(100vw - 30px) !important;
  height: calc(100vh - 30px) !important;
  z-index: 9999;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.chart-box.maximized .panel-content {
  height: calc(100% - 48px);
}

/* Specific heights apply ONLY when not maximized or minimized (default) */
#priceChartBox:not(.maximized):not(.minimized) {
  height: 480px;
}

#rsiChartBox:not(.maximized):not(.minimized) {
  height: 240px;
}

#macdChartBox:not(.maximized):not(.minimized) {
  height: 240px;
}

#candlestickChartBox:not(.maximized):not(.minimized) {
  height: 420px;
}

canvas {
  width: 100% !important;
  height: 100% !important;
}

#newsContainer {
  padding: 0;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  height: 100%;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

#newsContainer .panel-content {
  overflow-y: auto;
  height: 100%;
  padding: 20px;
}

#newsContainer.minimized {
  height: auto !important;
}

#newsContainer.maximized {
  height: 100vh !important;
}

/* News List Revamp */
#newsList {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#newsList li {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 16px;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#newsList li:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 229, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

#newsList li a {
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  transition: color 0.2s ease;
}

#newsList li a:hover {
  color: var(--primary-color);
}

#newsList li .news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

#newsList li p {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #94a3b8;
}

/* Scan results */
#scanResults {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  height: 100%;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#scanResults strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--accent-color);
  letter-spacing: -0.01em;
}

#scanList {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#scanList li {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 0;
  padding: 10px 16px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

#scanList li:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

#scanList li button {
  padding: 6px 12px;
  font-size: 0.75rem;
  background-image: linear-gradient(135deg, var(--accent-color) 0%, #2e7d32 100%);
  color: #080b11;
  box-shadow: 0 2px 8px rgba(0, 230, 118, 0.15);
}

#scanList li button:hover {
  box-shadow: 0 4px 12px rgba(0, 230, 118, 0.3);
}

/* Alerts Toast System */
#alerts {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  z-index: 10000;
}

#alerts > div {
  background: rgba(13, 18, 31, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
  font-size: 0.88rem;
  backdrop-filter: blur(8px);
  pointer-events: auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: fadeInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* Lists styling inside Accordions */
.fav-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.fav-item:last-child {
  border-bottom: none;
}

.fav-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.fav-active {
  color: #ffd700 !important;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.active-ticker {
  background-color: rgba(0, 229, 255, 0.1) !important;
  color: var(--primary-color) !important;
  border-left: 3px solid var(--primary-color);
  border-radius: 0 6px 6px 0;
}

/* Portfolio Styles */
.portfolio-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.portfolio-item:last-child {
  border-bottom: none;
}

.portfolio-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.pf-delete-btn {
  background: none;
  border: none;
  color: var(--danger-color);
  font-weight: bold;
  cursor: pointer;
  padding: 0 6px;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.pf-delete-btn:hover {
  color: #ff5252;
}

.roi-positive {
  color: var(--accent-color);
  font-weight: 600;
}

.roi-negative {
  color: var(--danger-color);
  font-weight: 600;
}

/* Hamburger Menu & Mobile Responsive */
.menu-toggle {
  display: none;
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 2000;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 1.3rem;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  #app {
    flex-direction: column;
  }

  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 270px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1500;
  }

  #sidebar.open {
    transform: translateX(0);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.7);
  }

  #main {
    width: 100%;
    padding: 16px;
    padding-top: 68px;
  }

  #priceChartBox:not(.maximized):not(.minimized) {
    height: 380px;
  }

  #rsiChartBox:not(.maximized):not(.minimized),
  #macdChartBox:not(.maximized):not(.minimized) {
    height: 200px;
  }
}

/* Tabs Navigation */
.tabs-nav {
  display: flex;
  background-color: rgba(13, 18, 31, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 18px;
  padding: 4px;
  align-items: center;
}

.tab-btn {
  flex: none;
  background: none;
  border: none;
  padding: 8px 18px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: none;
}

.tab-btn:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: #fff;
}

.tab-btn.active {
  background-color: rgba(0, 229, 255, 0.12);
  color: var(--primary-color);
  font-weight: 600;
  box-shadow: none;
}

.close-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.95rem;
  line-height: 1;
  color: #777;
  transition: all 0.2s ease;
  margin-left: 6px;
}

.close-tab-btn:hover {
  background-color: rgba(244, 67, 54, 0.2);
  color: var(--danger-color);
  cursor: pointer;
}

/* Tab Content */
.tab-content {
  display: none;
  flex: 1;
  overflow: hidden;
  position: relative;
  flex-direction: column;
}

.tab-content.active {
  display: flex;
  height: 100%;
  overflow-y: auto;
}

/* Stats Grid & Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.02);
  padding: 14px 12px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.stat-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
}

/* Specific Stat Indicators style borders */
#infoPrice {
  color: #fff;
}

#stockInfoPanel {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 6, 12, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-content {
  background: #0d1220;
  padding: 24px;
  border-radius: 14px;
  width: 90%;
  max-width: 440px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  animation: modalEnter 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
}

.close-modal {
  font-size: 1.4rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #fff;
}

.modal-body {
  max-height: 400px;
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-body label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.modal-body input[type="number"] {
  width: 75px;
  padding: 6px 10px;
  text-align: right;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 16px;
}

/* Market Status Pill Badge */
.market-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 8px;
  vertical-align: middle;
}

.market-status-pill.open {
  background: rgba(0, 230, 118, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(0, 230, 118, 0.2);
}

.market-status-pill.closed {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.market-status-pill .pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-green 1.5s infinite;
}

.market-status-pill.closed .pulse-dot {
  background-color: var(--text-secondary);
  animation: none;
}

@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(0, 230, 118, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 230, 118, 0);
  }
}

/* Premium Trade Signal Cards */
#tradeSignalBox {
  margin-top: 16px;
  padding: 18px;
  border-radius: 12px;
  font-family: var(--font-body);
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.signal-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.signal-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 12px;
  display: block;
}

.signal-metrics {
  margin-top: 12px;
  font-size: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.signal-metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #94a3b8;
}

.signal-metric-item span.metric-status {
  font-weight: 600;
}

.signal-strategy {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  font-style: italic;
}

/* Sentiment Gradient Glass Backgrounds */
.sentiment-strong_buy {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.15) 0%, rgba(13, 18, 31, 0.4) 100%) !important;
  border-color: rgba(0, 230, 118, 0.35) !important;
  box-shadow: 0 8px 30px rgba(0, 230, 118, 0.1) !important;
}
.sentiment-strong_buy .signal-title { color: var(--accent-color); }
.sentiment-strong_buy .signal-strategy { background: rgba(0, 230, 118, 0.08); color: #81c784; }

.sentiment-buy {
  background: linear-gradient(135deg, rgba(139, 195, 74, 0.15) 0%, rgba(13, 18, 31, 0.4) 100%) !important;
  border-color: rgba(139, 195, 74, 0.35) !important;
  box-shadow: 0 8px 30px rgba(139, 195, 74, 0.1) !important;
}
.sentiment-buy .signal-title { color: #aed581; }
.sentiment-buy .signal-strategy { background: rgba(139, 195, 74, 0.08); color: #d4e157; }

.sentiment-take_profit {
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.18) 0%, rgba(13, 18, 31, 0.4) 100%) !important;
  border-color: rgba(0, 230, 118, 0.4) !important;
  box-shadow: 0 8px 30px rgba(0, 230, 118, 0.15) !important;
}
.sentiment-take_profit .signal-title { color: var(--accent-color); text-shadow: 0 0 10px rgba(0, 230, 118, 0.3); }
.sentiment-take_profit .signal-strategy { background: rgba(0, 230, 118, 0.1); color: #a5d6a7; }

.sentiment-sell {
  background: linear-gradient(135deg, rgba(255, 23, 68, 0.15) 0%, rgba(13, 18, 31, 0.4) 100%) !important;
  border-color: rgba(255, 23, 68, 0.35) !important;
  box-shadow: 0 8px 30px rgba(255, 23, 68, 0.1) !important;
}
.sentiment-sell .signal-title { color: var(--danger-color); }
.sentiment-sell .signal-strategy { background: rgba(255, 23, 68, 0.08); color: #ef9a9a; }

.sentiment-hold {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.12) 0%, rgba(13, 18, 31, 0.4) 100%) !important;
  border-color: rgba(255, 214, 0, 0.3) !important;
  box-shadow: 0 8px 30px rgba(255, 214, 0, 0.08) !important;
}
.sentiment-hold .signal-title { color: var(--warning-color); }
.sentiment-hold .signal-strategy { background: rgba(255, 214, 0, 0.06); color: #ffe082; }

.sentiment-wait {
  background: linear-gradient(135deg, rgba(129, 212, 250, 0.12) 0%, rgba(13, 18, 31, 0.4) 100%) !important;
  border-color: rgba(129, 212, 250, 0.3) !important;
  box-shadow: 0 8px 30px rgba(129, 212, 250, 0.08) !important;
}
.sentiment-wait .signal-title { color: var(--info-color); }
.sentiment-wait .signal-strategy { background: rgba(129, 212, 250, 0.06); color: #b3e5fc; }

.portfolio-summary-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.02) !important;
}
.portfolio-summary-card:hover {
  background-color: #2d2d30 !important;
  border-color: rgba(0, 229, 255, 0.35) !important;
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.15) !important;
}

/* Transactions Import & Ledger Styling */
.btn-import-tx {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2) 0%, rgba(124, 77, 255, 0.2) 100%);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-import-tx:hover {
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.35) 0%, rgba(124, 77, 255, 0.35) 100%);
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
}

.btn-view-tx {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-view-tx:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.tx-mode-badge {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

.tx-badge {
  background: rgba(0, 229, 255, 0.2);
  color: #00e5ff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
}

.tx-metric-card {
  background: #121829;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 8px 12px;
}

.tx-metric-card .metric-label {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.tx-metric-card .metric-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.tx-action-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.tx-action-buy { background: rgba(34, 197, 94, 0.15); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); }
.tx-action-sell { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.tx-action-div { background: rgba(0, 229, 255, 0.15); color: #38bdf8; border: 1px solid rgba(0, 229, 255, 0.3); }
.tx-action-dep { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.tx-action-fxt { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); }
.tx-action-other { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }

#transactionsTable tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}

#transactionsTable tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* =========================================================
   Market Indices & Portfolio Exposure Cards
   ========================================================= */
.indices-section {
  background: rgba(18, 24, 41, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

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

.index-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.portfolio-chart-box {
  transition: all 0.25s ease;
}

.portfolio-chart-box:hover {
  border-color: rgba(0, 229, 255, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.index-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(0, 229, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.index-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.index-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 5px;
}

.index-ticker-tag {
  font-size: 0.65rem;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.index-sub {
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 1px;
}

.index-quote {
  text-align: right;
}

.index-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-display);
}

.index-change {
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  margin-top: 2px;
}

.index-change.pos {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.index-change.neg {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.index-change.neutral {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Exposure Box */
.index-exposure-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

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

.exposure-label {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.exposure-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #00e5ff;
  font-family: var(--font-display);
}

.exposure-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.exposure-fill {
  height: 100%;
  background: linear-gradient(90deg, #00e5ff, #3b82f6);
  border-radius: 3px;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

.index-exposure-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  color: #cbd5e1;
}

.index-impact {
  font-size: 0.68rem;
  font-weight: 600;
}

.index-impact.pos {
  color: #4ade80;
}

.index-impact.neg {
  color: #f87171;
}

.index-holdings-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
  min-height: 18px;
}

.holding-chip {
  font-size: 0.64rem;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: default;
  transition: all 0.15s ease;
}

.holding-chip:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.4);
  color: #00e5ff;
}

.holding-chip-pct {
  color: #94a3b8;
  font-size: 0.6rem;
}

/* Portfolio Items in Sidebar */
.portfolio-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 10px 10px 12px;
  background: rgba(18, 24, 38, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  margin-bottom: 8px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.2s ease;
}

.portfolio-item:hover {
  background: rgba(24, 32, 51, 0.9);
  border-color: rgba(0, 229, 255, 0.3);
}

.pf-delete-btn {
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  font-size: 0.95rem !important;
  padding: 2px 5px !important;
  cursor: pointer;
  box-shadow: none !important;
  transform: none !important;
  line-height: 1;
  border-radius: 4px;
  margin-left: 4px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.pf-delete-btn:hover {
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.18) !important;
}

/* AI Portfolio Decision Badges in Sidebar & Portfolio */
.pf-ai-badge {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 0.74rem;
  margin-top: 6px;
  border: 1px solid transparent;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.2s ease;
}

.pf-ai-badge-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.74rem;
  line-height: 1.25;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.pf-ai-badge-reason {
  font-size: 0.68rem;
  line-height: 1.35;
  color: #cbd5e1;
  word-break: break-word;
  white-space: normal;
  opacity: 0.92;
  margin-top: 1px;
}

.pf-ai-urgent-sell {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  animation: pf-urgent-pulse 2s infinite ease-in-out;
}

.pf-ai-trim {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fcd34d;
}

.pf-ai-hold {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.3);
  color: #67e8f9;
}

.pf-ai-scale-in {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.pf-ai-wait {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.45);
  color: #d8b4fe;
}

@keyframes pf-urgent-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    border-color: rgba(239, 68, 68, 0.6);
  }
  50% {
    box-shadow: 0 0 10px 2px rgba(239, 68, 68, 0.6);
    border-color: #ef4444;
  }
}

/* Urgent Alert Modal / Banner */
.pf-urgent-banner {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(185, 28, 28, 0.4));
  border: 1px solid #ef4444;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 0.78rem;
}

.no-stocks-tag {
  font-size: 0.65rem;
  color: #64748b;
  font-style: italic;
}

/* =========================================================
   TRADE ANALYSIS & AI TRADING COACH STYLES
   ========================================================= */

.btn-trade-analysis {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(0, 229, 255, 0.2));
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #e2e8f0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-trade-analysis:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(0, 229, 255, 0.35));
  border-color: #00e5ff;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
  transform: translateY(-1px);
}

/* Empty State */
.ta-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: rgba(18, 24, 41, 0.4);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  margin: 20px auto;
  max-width: 600px;
}

/* Scorecard Grid */
.ta-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ta-kpi-card {
  background: rgba(18, 24, 41, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.ta-kpi-card:hover {
  border-color: rgba(0, 229, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ta-border-green {
  border-left: 3px solid #22c55e !important;
}

.ta-border-red {
  border-left: 3px solid #ef4444 !important;
}

.ta-kpi-title {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ta-kpi-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: #ffffff;
  line-height: 1.2;
}

.ta-kpi-sub {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 2px;
}

/* Toolbar */
.ta-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: rgba(18, 24, 41, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.ta-search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #0f1422;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 4px 10px;
  flex: 1;
  min-width: 180px;
}

.ta-search-box input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.8rem;
  width: 100%;
  outline: none;
}

.ta-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.ta-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
}

.ta-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.ta-pill.active {
  background: rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.4);
  color: #00e5ff;
  font-weight: 600;
}

.ta-sort-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ta-sort-box select {
  background: #0f1422;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
}

.ta-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.ta-btn-batch-ai {
  background: linear-gradient(135deg, #9333ea, #6366f1);
  border: none;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(147, 51, 234, 0.3);
}

.ta-btn-batch-ai:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(147, 51, 234, 0.5);
  filter: brightness(1.1);
}

.ta-btn-export {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.ta-btn-export:hover {
  background: #334155;
  color: #ffffff;
}

/* Progress Box */
.ta-progress-box {
  background: rgba(147, 51, 234, 0.1);
  border: 1px solid rgba(147, 51, 234, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.ta-progress-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}

.ta-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #00e5ff);
  border-radius: 3px;
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

/* Stock Cards List */
.ta-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ta-stock-card {
  background: rgba(18, 24, 41, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.ta-stock-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.ta-card-win {
  border-left: 3px solid #22c55e;
}

.ta-card-loss {
  border-left: 3px solid #ef4444;
}

.ta-card-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.ta-col-sym {
  flex: 1.2;
  min-width: 130px;
}

.ta-ticker-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.ta-status-tag {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tag-active {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.tag-closed {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.ta-company-desc {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.ta-col-metric {
  flex: 1;
  text-align: right;
}

.ta-m-label {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.ta-m-val {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: #ffffff;
}

.ta-col-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 8px;
}

.ta-btn-ai-card {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ta-btn-ai-card:hover {
  background: rgba(168, 85, 247, 0.3);
  color: #ffffff;
  border-color: #a855f7;
  transform: translateY(-1px);
}

.btn-ai-analyzed {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.4);
  color: #00e5ff;
}

.ta-expand-arrow {
  color: #64748b;
  font-size: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

/* Card Body (Accordion) */
.ta-card-body {
  padding: 0 16px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.15);
}

/* Details Grid */
.ta-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ta-detail-pill {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ta-detail-pill .lbl {
  font-size: 0.65rem;
  color: #64748b;
  text-transform: uppercase;
}

.ta-detail-pill .val {
  font-size: 0.8rem;
  font-weight: 700;
  color: #e2e8f0;
}

/* AI Trading Coach Box */
.ta-ai-box {
  margin: 12px 0;
  background: rgba(24, 18, 41, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 8px;
  padding: 14px 16px;
  position: relative;
}

.ta-ai-placeholder {
  text-align: center;
  padding: 16px 10px;
}

.ta-btn-run-ai-large {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border: none;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.ta-btn-run-ai-large:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.5);
  filter: brightness(1.1);
}

.ta-ai-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  text-align: center;
}

.ta-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(168, 85, 247, 0.2);
  border-top-color: #00e5ff;
  border-radius: 50%;
  animation: ta-spin 0.8s linear infinite;
}

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

.ta-ai-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.ta-ai-source-badge {
  font-size: 0.7rem;
  font-weight: 600;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.ta-grade-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}

.ta-grade-badge-large {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 4px;
}

.grade-a {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.grade-b {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.grade-c {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.4);
}

.grade-d {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.4);
}

.grade-f {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.ta-verdict-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

.ta-btn-reanalyze {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ta-btn-reanalyze:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.ta-ai-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.ta-ai-card-col {
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.ta-strengths-box {
  border-left: 3px solid #22c55e;
}

.ta-weaknesses-box {
  border-left: 3px solid #f59e0b;
}

.ta-ai-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.ta-ai-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ta-ai-bullets li {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.4;
  position: relative;
  padding-left: 12px;
}

.ta-ai-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #94a3b8;
}

.ta-takeaways-box {
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 8px;
}

/* Trade Executions Table */
.ta-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  margin: 12px 0 6px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ta-trades-table-container {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  background: #090d16;
}

.ta-trades-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
  text-align: left;
}

.ta-trades-table thead {
  position: sticky;
  top: 0;
  background: #111728;
  color: #94a3b8;
  border-bottom: 1px solid #1e293b;
}

.ta-trades-table th,
.ta-trades-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ta-badge-side {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
}

.side-buy {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.side-sell {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

@media (max-width: 768px) {
  .ta-hide-mobile {
    display: none;
  }
  .ta-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .ta-actions-group {
    margin-left: 0;
    justify-content: space-between;
  }
}

/* =========================================================
   AI DAILY MARKET & PORTFOLIO BRIEFING STYLES
   ========================================================= */
.ai-briefing-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 5px 60px;
  animation: fadeInBriefing 0.3s ease-out;
}

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

.ai-briefing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.briefing-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 8px;
}

.briefing-pulsing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseDot 1.8s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

.briefing-main-title {
  margin: 0 0 4px;
  font-size: 1.55rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.briefing-subtitle {
  font-size: 0.84rem;
  color: #94a3b8;
}

.briefing-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.briefing-refresh-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}

/* Language Toggle */
.briefing-lang-toggle {
  display: inline-flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.briefing-lang-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.briefing-lang-btn:hover {
  color: #fff;
}

.briefing-lang-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Macro Overview Card */
.briefing-macro-card {
  background: radial-gradient(circle at top right, rgba(30, 58, 138, 0.15), transparent 70%),
              linear-gradient(135deg, rgba(17, 24, 39, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.briefing-sentiment-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.briefing-ai-source {
  font-size: 0.72rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.briefing-headline {
  margin: 10px 0 10px;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  color: #f1f5f9;
}

.briefing-summary {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 18px;
  white-space: pre-line;
}

/* Macro Indices Strip */
.briefing-indices-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.briefing-index-badge {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.briefing-index-badge:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.index-badge-name {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.index-badge-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
}

.index-badge-change {
  font-size: 0.75rem;
  font-weight: 600;
}

/* Sector Dispersion Pulse Box */
.briefing-sectors-box {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
}

.briefing-sectors-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.briefing-sectors-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 8px;
}

.briefing-sector-badge {
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(4px);
  transition: transform 0.15s ease;
}

.briefing-sector-badge:hover {
  transform: translateY(-1px);
}

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

.sector-badge-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #f1f5f9;
}

.sector-badge-tag {
  font-size: 0.65rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
}

.sector-badge-metrics {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.sector-badge-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5e1;
}

.sector-badge-change {
  font-size: 0.75rem;
  font-weight: 700;
}

/* Drivers Box */
.briefing-drivers-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px 16px;
}

.briefing-drivers-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.briefing-drivers-list {
  margin: 0;
  padding-left: 18px;
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.55;
}

/* Strategic Gameplan Card */
.briefing-gameplan-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.7));
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-left: 4px solid #a855f7;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.gameplan-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.gameplan-items-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gameplan-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.gameplan-number-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  font-weight: 700;
  font-size: 0.72rem;
  margin-top: 1px;
}

/* Portfolio Section */
.portfolio-section-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.portfolio-holdings-pill {
  font-size: 0.72rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
}

/* Stock Cards Grid */
.briefing-stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.briefing-stock-card {
  background: linear-gradient(135deg, rgba(24, 32, 51, 0.8), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.briefing-stock-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.stock-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stock-card-ticker {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.stock-card-prices {
  text-align: right;
}

.stock-card-live-price {
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
}

.stock-card-live-change {
  font-size: 0.75rem;
  font-weight: 600;
}

.stock-card-outlook-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.stock-card-levels-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.72rem;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.stock-card-expectation {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #cbd5e1;
  flex: 1;
}

.stock-card-tactical-box {
  background: rgba(30, 41, 59, 0.6);
  border-left: 3px solid #38bdf8;
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: #e2e8f0;
}

/* Skeleton Loading Box */
.briefing-skeleton-card {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* AI Entry Timing Card & Warning System */
.entry-timing-card {
  margin-top: 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.entry-timing-card.timing-danger {
  background: radial-gradient(circle at top left, rgba(239, 68, 68, 0.2), transparent 70%),
              linear-gradient(135deg, rgba(32, 14, 18, 0.95), rgba(20, 10, 12, 0.98));
  border-color: rgba(239, 68, 68, 0.45);
}

.entry-timing-card.timing-warning {
  background: radial-gradient(circle at top left, rgba(234, 179, 8, 0.2), transparent 70%),
              linear-gradient(135deg, rgba(35, 28, 12, 0.95), rgba(24, 18, 8, 0.98));
  border-color: rgba(234, 179, 8, 0.45);
}

.entry-timing-card.timing-good {
  background: radial-gradient(circle at top left, rgba(34, 197, 94, 0.2), transparent 70%),
              linear-gradient(135deg, rgba(12, 32, 20, 0.95), rgba(8, 22, 14, 0.98));
  border-color: rgba(34, 197, 94, 0.45);
}

.entry-timing-card.timing-neutral {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.15), transparent 70%),
              linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(11, 17, 32, 0.98));
  border-color: rgba(56, 189, 248, 0.35);
}

.entry-timing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.entry-timing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.timing-danger .entry-timing-badge { color: #f87171; }
.timing-warning .entry-timing-badge { color: #facc15; }
.timing-good .entry-timing-badge { color: #4ade80; }
.timing-neutral .entry-timing-badge { color: #38bdf8; }

.entry-timing-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.entry-timing-body {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.entry-timing-metrics {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.78rem;
  color: #94a3b8;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.entry-timing-metrics span strong {
  color: #f1f5f9;
}

.entry-timing-coach-lesson {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.14);
  border-left: 3px solid #ef4444;
  font-size: 0.82rem;
  color: #fca5a5;
  line-height: 1.45;
}

.entry-timing-coach-lesson strong {
  color: #fff;
}

/* AI Stock Catalyst & Dip-Rebound Diagnostic Card */
.ai-catalyst-card {
  margin-top: 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: inherit;
}

.ai-catalyst-card.catalyst-trap {
  background: radial-gradient(circle at top right, rgba(239, 68, 68, 0.22), transparent 70%),
              linear-gradient(135deg, rgba(30, 10, 14, 0.95), rgba(18, 8, 10, 0.98));
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.18);
}

.ai-catalyst-card.catalyst-rebound {
  background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.22), transparent 70%),
              linear-gradient(135deg, rgba(8, 28, 16, 0.95), rgba(6, 18, 11, 0.98));
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.18);
}

.ai-catalyst-card.catalyst-caution {
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.2), transparent 70%),
              linear-gradient(135deg, rgba(32, 22, 8, 0.95), rgba(20, 14, 5, 0.98));
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.18);
}

.catalyst-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.catalyst-badge-container {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.catalyst-badge {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalyst-trap .catalyst-badge { color: #f87171; }
.catalyst-rebound .catalyst-badge { color: #4ade80; }
.catalyst-caution .catalyst-badge { color: #fbbf24; }

.catalyst-header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalyst-ai-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.catalyst-refresh-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 5px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.catalyst-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: rotate(45deg);
}

.catalyst-section {
  margin-bottom: 12px;
}

.catalyst-section-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.catalyst-summary-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #e2e8f0;
}

/* Callout Box for Rebound Advice */
.catalyst-rebound-box {
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 0.88rem;
  line-height: 1.55;
  border-left: 4px solid #ef4444;
}

.catalyst-trap .catalyst-rebound-box {
  background: rgba(239, 68, 68, 0.14);
  border-left-color: #ef4444;
  color: #fecaca;
}

.catalyst-rebound .catalyst-rebound-box {
  background: rgba(34, 197, 94, 0.14);
  border-left-color: #22c55e;
  color: #dcfce7;
}

.catalyst-caution .catalyst-rebound-box {
  background: rgba(245, 158, 11, 0.14);
  border-left-color: #f59e0b;
  color: #fef3c7;
}

/* Factors Tags & News */
.catalyst-factors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  margin-bottom: 12px;
}

.catalyst-factor-chip {
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.catalyst-news-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.catalyst-news-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  text-decoration: none;
  transition: all 0.2s ease;
}

.catalyst-news-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

.catalyst-news-title {
  color: #93c5fd;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.catalyst-news-source {
  color: #64748b;
  font-size: 0.72rem;
  white-space: nowrap;
}

/* Loading Skeleton */
.catalyst-skeleton {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: pulseSkeleton 1.5s infinite ease-in-out;
}

@keyframes pulseSkeleton {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}