/* Market Intelligence & Portfolio Portal Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-main: #070a13;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-card: rgba(51, 65, 85, 0.6);
  --border-highlight: rgba(99, 102, 241, 0.3);
  --accent-green: #10b981;
  --accent-red: #f43f5e;
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: #f1f5f9;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 0.75rem;
  transition: all 0.2s ease-in-out;
}

.glass-panel:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
}

.glass-header {
  background: rgba(11, 17, 33, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0b0f19;
}
::-webkit-scrollbar-thumb {
  background: #27354a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3b4d66;
}

/* Tab Switching Active State */
.nav-tab.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
  border-color: rgba(99, 102, 241, 0.7);
  color: #ffffff;
  box-shadow: 0 0 15px -3px rgba(99, 102, 241, 0.3);
}

/* Live Pulse Animation */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

.live-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-green);
  border-radius: 50%;
  display: inline-block;
  animation: pulseGlow 2s infinite;
}

/* Table Responsive Scrolling & Sticky Column */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.95);
  white-space: nowrap;
}

table td {
  padding: 0.875rem 1rem;
  border-top: 1px solid rgba(30, 41, 59, 0.6);
  font-size: 0.875rem;
  white-space: nowrap;
}

tbody tr:hover {
  background: rgba(30, 41, 59, 0.4);
}

/* Broker Badges */
.badge-upstox {
  background: rgba(139, 92, 246, 0.15);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-angelone {
  background: rgba(249, 115, 22, 0.15);
  color: #fdba74;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.badge-icici {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* PnL Styling */
.text-profit {
  color: #10b981;
}

.text-loss {
  color: #f43f5e;
}

.bg-profit-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.bg-loss-badge {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Modal Animations */
.modal-overlay {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  transition: opacity 0.2s ease-out;
}

.modal-content {
  max-height: 90vh;
  overflow-y: auto;
}

/* Loading Shimmer */
.skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

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