/* Enhanced Lupo Trading Platform - Professional Component Styles */

/* Real-Time Price Update Animations */
@keyframes priceUpdateFlash {
    0% { background-color: transparent; }
    20% { background-color: rgba(245, 158, 11, 0.3); }
    100% { background-color: transparent; }
}

@keyframes pulsePositive {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulseNegative {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

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

@keyframes statusDotBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Price update flash animation */
.price-update-flash {
    animation: priceUpdateFlash 0.6s ease-out;
    border-radius: var(--radius-sm);
    padding: 2px 4px;
    margin: -2px -4px;
}

/* Pulse animations for price changes */
.pulse-positive {
    animation: pulsePositive 1s ease-out;
}

.pulse-negative {
    animation: pulseNegative 1s ease-out;
}

/* Shimmer animation for recalculating values */
.shimmer {
    animation: shimmer 0.8s ease-in-out;
}

/* Market Status Indicator */
.market-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.market-status .stat-value {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    font-family: var(--font-family-mono);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.open {
    background-color: var(--color-retail-positive);
    animation: statusDotBlink 2s infinite;
}

.status-dot.closed {
    background-color: var(--color-professional-text-secondary);
}

.status-text {
    font-size: var(--font-size-xs);
    letter-spacing: 0.5px;
}

/* Real-time price ticker */
.price-ticker {
    background: var(--color-professional-dark);
    border-radius: var(--radius-md);
    padding: var(--space-8) var(--space-12);
    font-family: var(--font-family-mono);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.price-ticker.updating {
    animation: priceUpdateFlash 0.6s ease-out;
}

/* Live indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    font-size: var(--font-size-xs);
    color: var(--color-retail-positive);
    font-weight: var(--font-weight-medium);
}

.live-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-retail-positive);
    border-radius: 50%;
    animation: statusDotBlink 1.5s infinite;
}

/* Enhanced stock card animations */
.stock-card {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stock-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(245, 158, 11, 0.1), 
        transparent
    );
    transition: left 0.6s ease;
    z-index: 1;
}

.stock-card.pulse-positive::before,
.stock-card.pulse-negative::before {
    left: 100%;
}

/* Holding card real-time enhancements */
.holding-card {
    transition: all 0.3s ease;
}

.holding-card.pulse-positive {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.holding-card.pulse-negative {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

/* Price change indicators */
.price-change {
    transition: all 0.3s ease;
    position: relative;
}

.price-change::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.price-change.positive::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 6px solid var(--color-retail-positive);
}

.price-change.negative::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid var(--color-retail-negative);
}

.price-update-flash.price-change::after {
    opacity: 1;
}

/* Real-time performance indicators */
.performance-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family-mono);
}

.performance-indicator.positive {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-retail-positive);
}

.performance-indicator.negative {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-retail-negative);
}

.performance-indicator.neutral {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-professional-primary);
}

/* Responsive real-time adjustments */
@media (max-width: 768px) {
    .market-status .stat-value {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    .status-text {
        font-size: var(--font-size-xs);
    }
    
    .price-ticker {
        font-size: var(--font-size-xs);
        padding: var(--space-6) var(--space-8);
    }
}

/* Technical Analysis Chart Styling */
.technical-chart-container {
    background: var(--color-professional-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-20);
    margin: var(--space-20) 0;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.technical-chart-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.chart-controls {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
    margin-bottom: var(--space-20);
    padding-bottom: var(--space-16);
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
}

.timeframe-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-20);
    align-items: center;
}

.control-group {
    display: flex;
    align-items: center;
    gap: var(--space-12);
}

.control-label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-professional-text);
    white-space: nowrap;
}

.timeframe-buttons {
    display: flex;
    gap: var(--space-4);
    background: var(--color-professional-dark);
    border-radius: var(--radius-md);
    padding: var(--space-4);
}

.timeframe-btn {
    background: transparent;
    border: none;
    color: var(--color-professional-text-secondary);
    padding: var(--space-6) var(--space-12);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-family-mono);
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeframe-btn:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-professional-text);
}

.timeframe-btn.active {
    background: var(--color-professional-primary);
    color: var(--color-professional-dark);
    font-weight: var(--font-weight-bold);
}

.chart-select {
    background: var(--color-professional-dark);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    color: var(--color-professional-text);
    padding: var(--space-6) var(--space-12);
    font-size: var(--font-size-sm);
    font-family: var(--font-family-base);
    cursor: pointer;
}

.chart-select:focus {
    outline: none;
    border-color: var(--color-professional-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.indicator-controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
}

.indicator-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-12);
}

.indicator-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    cursor: pointer;
    user-select: none;
}

.indicator-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    background: var(--color-professional-dark);
    cursor: pointer;
    position: relative;
}

.indicator-toggle input[type="checkbox"]:checked {
    background: var(--color-professional-primary);
    border-color: var(--color-professional-primary);
}

.indicator-toggle input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: var(--color-professional-dark);
    font-size: 12px;
    font-weight: bold;
}

.toggle-label {
    font-size: var(--font-size-sm);
    color: var(--color-professional-text);
    font-family: var(--font-family-mono);
}

.chart-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
}

.chart-wrapper {
    position: relative;
    height: 400px;
    background: var(--color-professional-dark);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.technical-chart-canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-crosshair {
    position: absolute;
    display: none;
    pointer-events: none;
    z-index: 10;
}

.chart-crosshair::before,
.chart-crosshair::after {
    content: '';
    position: absolute;
    background: rgba(245, 158, 11, 0.6);
}

.chart-crosshair::before {
    width: 1px;
    height: 100vh;
    left: 0;
    top: -50vh;
}

.chart-crosshair::after {
    height: 1px;
    width: 100vw;
    top: 0;
    left: -50vw;
}

.chart-tooltip {
    position: absolute;
    display: none;
    background: var(--color-professional-surface);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    font-size: var(--font-size-sm);
    font-family: var(--font-family-mono);
    color: var(--color-professional-text);
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.tooltip-symbol {
    font-weight: var(--font-weight-bold);
    color: var(--color-professional-primary);
}

.sub-charts {
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
}

.sub-chart {
    height: 120px;
    background: var(--color-professional-dark);
    border-radius: var(--radius-md);
    padding: var(--space-8);
    position: relative;
}

.sub-chart.hidden {
    display: none;
}

.sub-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-legend {
    display: flex;
    justify-content: center;
    margin-top: var(--space-12);
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-16);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.legend-color {
    width: 12px;
    height: 2px;
    border-radius: 1px;
}

.legend-label {
    font-size: var(--font-size-sm);
    color: var(--color-professional-text);
    font-family: var(--font-family-mono);
}

.analysis-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-20);
    margin-top: var(--space-20);
    padding-top: var(--space-20);
    border-top: 1px solid rgba(245, 158, 11, 0.1);
}

.analysis-section {
    background: var(--color-professional-dark);
    border-radius: var(--radius-md);
    padding: var(--space-16);
}

.analysis-section h4 {
    margin: 0 0 var(--space-12) 0;
    color: var(--color-professional-text);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
}

.analysis-metrics,
.key-levels {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
}

.metric-row,
.level-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-6) 0;
    border-bottom: 1px solid rgba(245, 158, 11, 0.05);
}

.metric-row:last-child,
.level-item:last-child {
    border-bottom: none;
}

.metric-name,
.level-type {
    font-size: var(--font-size-sm);
    color: var(--color-professional-text-secondary);
}

.metric-value,
.level-value {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    font-family: var(--font-family-mono);
    color: var(--color-professional-text);
}

.metric-value.bullish {
    color: var(--color-retail-positive);
}

.metric-value.bearish {
    color: var(--color-retail-negative);
}

.metric-value.buy {
    color: var(--color-retail-positive);
    background: rgba(16, 185, 129, 0.1);
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-sm);
}

.metric-value.sell {
    color: var(--color-retail-negative);
    background: rgba(239, 68, 68, 0.1);
    padding: var(--space-2) var(--space-6);
    border-radius: var(--radius-sm);
}

.chart-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    text-align: center;
    color: var(--color-professional-text-secondary);
}

.chart-error h3 {
    margin-bottom: var(--space-12);
    color: var(--color-professional-text);
}

.chart-error p {
    margin-bottom: var(--space-16);
}

/* Mobile Responsive Chart */
@media (max-width: 768px) {
    .technical-chart-container {
        padding: var(--space-12);
        margin: var(--space-12) 0;
    }
    
    .chart-controls {
        gap: var(--space-12);
    }
    
    .timeframe-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-12);
    }
    
    .timeframe-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .timeframe-btn {
        flex: 1;
        text-align: center;
    }
    
    .indicator-controls {
        flex-direction: column;
        gap: var(--space-8);
    }
    
    .indicator-toggles {
        gap: var(--space-8);
    }
    
    .chart-wrapper {
        height: 300px;
    }
    
    .analysis-panel {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }
    
    .chart-crosshair {
        display: none !important; /* Disable crosshair on mobile */
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .chart-wrapper {
        height: 350px;
    }
    
    .timeframe-controls {
        flex-wrap: wrap;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .price-update-flash,
    .pulse-positive,
    .pulse-negative,
    .shimmer,
    .status-dot,
    .stock-card::before {
        animation: none;
    }
    
    .stock-card,
    .holding-card,
    .price-change,
    .timeframe-btn,
    .chart-select {
        transition: none;
    }
}

/* Portfolio Dashboard Styling */
.portfolio-chart-section {
    background: var(--color-professional-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-24);
    margin-bottom: var(--space-24);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.portfolio-chart-section h3 {
    margin-bottom: var(--space-20);
    color: var(--color-professional-text);
}

.holding-card {
    background: var(--color-professional-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-20);
    border: 1px solid rgba(245, 158, 11, 0.1);
    transition: all 0.2s ease;
}

.holding-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.holding-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-16);
}

.holding-info {
    flex: 1;
}

.holding-symbol {
    margin: 0 0 var(--space-4) 0;
    color: var(--color-professional-text);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

.holding-name {
    margin: 0;
    color: var(--color-professional-text-secondary);
    font-size: var(--font-size-sm);
}

.holding-price {
    text-align: right;
}

.current-price {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-professional-text);
    font-family: var(--font-family-mono);
}

.price-change {
    font-size: var(--font-size-sm);
    font-family: var(--font-family-mono);
    font-weight: var(--font-weight-semibold);
}

.price-change.positive {
    color: var(--color-retail-positive);
}

.price-change.negative {
    color: var(--color-retail-negative);
}

.holding-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-16);
    margin-bottom: var(--space-20);
    padding: var(--space-16);
    background: var(--color-professional-dark);
    border-radius: var(--radius-md);
}

.holding-metrics .metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-professional-text-secondary);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-professional-text);
    font-weight: var(--font-weight-semibold);
    font-family: var(--font-family-mono);
}

.metric-value.positive {
    color: var(--color-retail-positive);
}

.metric-value.negative {
    color: var(--color-retail-negative);
}

.holding-actions {
    display: flex;
    gap: var(--space-8);
    flex-wrap: wrap;
}

.btn-sm {
    padding: var(--space-8) var(--space-12);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
}

/* Transaction History Styling */
.transaction-header {
    display: grid;
    grid-template-columns: 1fr 80px 80px 60px 80px 100px;
    gap: var(--space-12);
    padding: var(--space-12) var(--space-16);
    background: var(--color-professional-dark);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-weight: var(--font-weight-semibold);
    color: var(--color-professional-text);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transaction-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px 60px 80px 100px;
    gap: var(--space-12);
    padding: var(--space-12) var(--space-16);
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
    align-items: center;
}

.transaction-row:hover {
    background: var(--color-professional-dark);
}

.transaction-col {
    display: flex;
    flex-direction: column;
    font-size: var(--font-size-sm);
}

.transaction-date {
    color: var(--color-professional-text);
    font-weight: var(--font-weight-medium);
}

.transaction-time {
    color: var(--color-professional-text-secondary);
    font-size: var(--font-size-xs);
}

.transaction-type {
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-align: center;
}

.transaction-type.buy {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-retail-positive);
}

.transaction-type.sell {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-retail-negative);
}

.transaction-total {
    font-family: var(--font-family-mono);
    font-weight: var(--font-weight-semibold);
}

.transaction-total.buy {
    color: var(--color-retail-negative);
}

.transaction-total.sell {
    color: var(--color-retail-positive);
}

/* Responsive Portfolio Layout */
@media (max-width: 768px) {
    .holding-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-12);
    }
    
    .holding-actions {
        flex-direction: column;
    }
    
    .transaction-header,
    .transaction-row {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .transaction-col {
        display: block;
    }
    
    .transaction-header {
        display: none;
    }
    
    .transaction-row {
        padding: var(--space-16);
        border-radius: var(--radius-md);
        margin-bottom: var(--space-8);
        background: var(--color-professional-dark);
    }
}

/* =================================
   DESIGN SYSTEM ENHANCEMENTS
   ================================= */

/* Professional Header Styling */
.main-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  background: rgba(var(--color-surface-rgb, 255, 255, 255), 0.95);
}

[data-theme="dark"] .main-header {
  background: rgba(26, 26, 26, 0.95);
}

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

.brand-section {
  flex: 1;
}

.brand-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  line-height: 1.2;
}

.brand-primary {
  color: var(--color-primary);
}

.brand-secondary {
  color: var(--color-primary-light);
}

.brand-tagline {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.025em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-stats {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 0.875rem;
  color: var(--color-text);
  font-weight: 600;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-secondary-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-menu-btn:hover {
  background: var(--color-border-light);
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.1);
}

/* Professional Navigation Styling */
.main-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
  position: sticky;
  top: 73px; /* Height of header */
  z-index: 90;
  backdrop-filter: blur(10px);
  background: rgba(var(--color-surface-rgb, 255, 255, 255), 0.95);
}

[data-theme="dark"] .main-nav {
  background: rgba(26, 26, 26, 0.95);
}

.nav-wrapper {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-wrapper::-webkit-scrollbar {
  display: none;
}

.nav-tabs {
  display: flex;
  gap: 0;
  min-width: max-content;
  padding: 0;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  position: relative;
}

.nav-tab:hover {
  color: var(--color-text);
  background: var(--color-secondary-bg);
  border-bottom-color: var(--color-primary-light);
}

.nav-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: rgba(245, 158, 11, 0.05);
}

.nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.nav-label {
  font-size: 0.8125rem;
  font-weight: 500;
}

/* Navigation Icons */
.opportunities-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13 7h8m0 0v8m0-8l-8 8-4-4-6 6'/%3e%3c/svg%3e");
}

.watchlist-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z'/%3e%3c/svg%3e");
}

.portfolio-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4'/%3e%3c/svg%3e");
}

.transparency-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3e%3c/svg%3e");
}

.alerts-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 17h5l-5 5v-5z'/%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 19H6.5A2.5 2.5 0 014 16.5v-9A2.5 2.5 0 016.5 5h11A2.5 2.5 0 0120 7.5V13'/%3e%3c/svg%3e");
}

.community-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z'/%3e%3c/svg%3e");
}

.education-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.246 18 16.5 18c-1.746 0-3.332.477-4.5 1.253'/%3e%3c/svg%3e");
}

.user-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3e%3c/svg%3e");
}

.chevron-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
}

/* Professional Button System */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-secondary {
  background: var(--color-secondary-bg);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-border-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--color-secondary-bg);
  color: var(--color-text);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* Button Icons */
.refresh-icon {
  width: 1rem;
  height: 1rem;
  display: block;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15'/%3e%3c/svg%3e");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.add-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 4v16m8-8H4'/%3e%3c/svg%3e");
}

.edit-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z'/%3e%3c/svg%3e");
}

.delete-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16'/%3e%3c/svg%3e");
}

/* Tab Headers */
.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-light);
}

.tab-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  line-height: 1.2;
}

/* Main Content Area */
.main-content {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

.content-tab {
  display: none;
}

.content-tab.active {
  display: block;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .header-stats {
    gap: 1rem;
  }
  
  .stat-item {
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .nav-tab {
    padding: 0.75rem 1rem;
    gap: 0.25rem;
  }
  
  .nav-icon {
    width: 1rem;
    height: 1rem;
  }
  
  .nav-label {
    font-size: 0.75rem;
  }
  
  .tab-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .tab-title {
    font-size: 1.25rem;
    text-align: center;
  }
  
  .main-content {
    padding: 1rem 0;
  }
}

/* Professional Dashboard Cards */
.intelligence-dashboard {
  padding: 2rem 0;
  background: var(--color-background);
}

.section-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 2rem 0;
  text-align: center;
  line-height: 1.2;
}

.intelligence-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 769px) {
  .intelligence-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.intelligence-card {
  background: var(--color-card-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.intelligence-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
  transform: translateY(-2px);
}

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

.card-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.sentiment-badge {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sentiment-badge.bullish {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.sentiment-badge.neutral {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-primary);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.sentiment-badge.bearish {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.sentiment-meter {
  margin: 1rem 0;
}

.meter-bar {
  width: 100%;
  height: 0.5rem;
  background: var(--color-secondary-bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.meter-fill {
  height: 100%;
  border-radius: var(--radius-md);
  transition: width 0.3s ease;
}

.retail-fill {
  background: linear-gradient(90deg, var(--color-success), #34D399);
}

.institutional-fill {
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
}

.sentiment-score {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.intelligence-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.stat {
  text-align: center;
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.stat-text {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Opportunity Categories */
.opportunities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 1025px) {
  .opportunities-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.opportunity-category {
  background: var(--color-card-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.opportunity-category:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

.category-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 1rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.stocks-grid {
  display: grid;
  gap: 0.75rem;
}

/* Stock Cards */
.stock-card {
  background: var(--color-secondary-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stock-card:hover {
  background: var(--color-border-light);
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.stock-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.stock-card:hover:before {
  opacity: 1;
}

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

.stock-symbol {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.stock-price {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.stock-name {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.stock-metrics {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.price-change {
  font-weight: 600;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.price-change.positive {
  color: var(--color-success);
}

.price-change.negative {
  color: var(--color-error);
}

.retail-interest {
  font-weight: 500;
}

/* Body Background */
body {
  background: var(--color-background);
  color: var(--color-text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Professional Modal System */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

[data-theme="dark"] .modal-overlay {
  background: rgba(0, 0, 0, 0.8);
}

.modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: translateY(30px) scale(0.95);
  transition: all 0.3s ease;
}

.modal:not(.hidden) .modal-content {
  transform: translateY(0) scale(1);
}

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

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-secondary-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--color-text-secondary);
}

.modal-close:hover {
  background: var(--color-border-light);
  border-color: var(--color-error);
  color: var(--color-error);
  transform: scale(1.05);
}

.close-icon {
  width: 1.25rem;
  height: 1.25rem;
  display: block;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12'/%3e%3c/svg%3e");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.modal-body {
  max-height: calc(90vh - 120px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-secondary-bg);
  overflow-x: auto;
  scrollbar-width: none;
}

.modal-tabs::-webkit-scrollbar {
  display: none;
}

.modal-tab {
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.modal-tab:hover {
  color: var(--color-text);
  background: var(--color-border-light);
}

.modal-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: var(--color-surface);
}

.modal-content-area {
  padding: 2rem;
}

.modal-tab-content {
  display: none;
}

.modal-tab-content.active {
  display: block;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-card-surface);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }
  
  .modal-header {
    padding: 1rem 1.5rem;
  }
  
  .modal-header h2 {
    font-size: 1.25rem;
  }
  
  .modal-content-area {
    padding: 1.5rem;
  }
  
  .modal-actions {
    padding: 1rem 1.5rem;
    flex-direction: column;
  }
  
  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Additional Button Icons */
.buy-icon {
  width: 1rem;
  height: 1rem;
  display: block;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 6v12m6-6H6'/%3e%3c/svg%3e");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.sell-icon {
  width: 1rem;
  height: 1rem;
  display: block;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 12H4'/%3e%3c/svg%3e");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

/* Chart Container */
.chart-container {
  background: var(--color-secondary-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin: 1.5rem 0;
}

/* Analysis Metrics */
.analysis-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric {
  background: var(--color-secondary-bg);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--color-border-light);
}

.metric-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.metric-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Focus States and Accessibility */
.btn:focus,
.nav-tab:focus,
.modal-tab:focus,
.modal-close:focus,
.user-menu-btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.stock-card:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.intelligence-card:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-color: var(--color-primary);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.25);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --color-border: #000000;
    --color-text-secondary: #000000;
  }
  
  [data-theme="dark"] {
    --color-border: #FFFFFF;
    --color-text-secondary: #FFFFFF;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .modal-content {
    transform: none !important;
  }
  
  .stock-card:hover,
  .intelligence-card:hover,
  .btn:hover {
    transform: none !important;
  }
}

/* Loading States */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:disabled .refresh-icon {
  animation: spin 1s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .btn:disabled .refresh-icon {
    animation: none !important;
  }
}

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

/* Skeleton Loading States */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-secondary-bg) 25%,
    var(--color-border-light) 50%,
    var(--color-secondary-bg) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-md);
}

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

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
  margin-bottom: 0;
  width: 60%;
}

.skeleton-card {
  height: 120px;
  margin-bottom: 1rem;
}

/* Enhanced Table Styling */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

thead {
  background: var(--color-secondary-bg);
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

tbody tr:hover {
  background: var(--color-secondary-bg);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Smooth Page Transitions and Micro-interactions */
.content-tab {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  pointer-events: none;
}

.content-tab.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Staggered Animation for Stock Cards */
.stock-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.stock-card:nth-child(1) { animation-delay: 0s; }
.stock-card:nth-child(2) { animation-delay: 0.1s; }
.stock-card:nth-child(3) { animation-delay: 0.2s; }
.stock-card:nth-child(4) { animation-delay: 0.3s; }
.stock-card:nth-child(5) { animation-delay: 0.4s; }
.stock-card:nth-child(6) { animation-delay: 0.5s; }

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

/* Intelligence Cards Animation */
.intelligence-card {
  opacity: 0;
  transform: scale(0.95);
  animation: fadeInScale 0.6s ease forwards;
}

.intelligence-card:nth-child(1) { animation-delay: 0.1s; }
.intelligence-card:nth-child(2) { animation-delay: 0.2s; }
.intelligence-card:nth-child(3) { animation-delay: 0.3s; }
.intelligence-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInScale {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Button Press Animation */
.btn:active {
  transform: translateY(1px) scale(0.98);
}

/* Ripple Effect for Buttons */
.btn {
  position: relative;
  overflow: hidden;
}

.btn:not(:disabled):active::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    width: 300px;
    height: 300px;
    opacity: 0;
  }
}

/* Notification Toast Animation */
.notification-toast {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.notification-toast:not(.hidden) {
  transform: translateX(0);
}

/* Pulse Animation for Active Elements */
.nav-tab.active .nav-icon {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* Hover Lift Animation for Cards */
.opportunity-category,
.intelligence-card,
.stock-card {
  will-change: transform;
}

/* Loading Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}

.loading-shimmer {
  background: linear-gradient(
    90deg,
    var(--color-secondary-bg) 0px,
    rgba(245, 158, 11, 0.1) 40px,
    var(--color-secondary-bg) 80px
  );
  background-size: 800px 104px;
  animation: shimmer 2s infinite linear;
}

/* Enhanced Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-secondary-bg);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 4px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Page Load Animation */
.main-app {
  opacity: 0;
  animation: pageLoad 0.8s ease forwards;
}

@keyframes pageLoad {
  to {
    opacity: 1;
  }
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

/* Toast Notification System */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  min-width: 320px;
  max-width: 400px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: all 0.3s ease;
  pointer-events: auto;
  overflow: hidden;
  position: relative;
}

.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--color-primary);
}

.toast-success::before {
  background: var(--color-success);
}

.toast-error::before {
  background: var(--color-error);
}

.toast-warning::before {
  background: var(--color-warning);
}

.toast-info::before {
  background: var(--color-info);
}

.toast-show {
  transform: translateX(0);
}

.toast-hide {
  transform: translateX(100%);
  opacity: 0;
}

.toast-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
}

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

.toast-text {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.toast-message {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  color: var(--color-text);
}

.toast-close .close-icon {
  width: 1rem;
  height: 1rem;
  display: block;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12'/%3e%3c/svg%3e");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

/* Trade Form Styles */
.trade-form {
  max-width: 500px;
  margin: 0 auto;
}

.stock-info {
  background: var(--color-secondary-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.stock-info .stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.stock-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.trade-form-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.trade-summary {
  background: var(--color-secondary-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin: 1rem 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-row.small {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-actions .btn {
  flex: 1;
}

/* Mobile toast adjustments */
@media (max-width: 768px) {
  .toast-container {
    top: 1rem;
    right: 1rem;
    left: 1rem;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* Disable animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .content-tab,
  .stock-card,
  .intelligence-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  
  .nav-tab.active .nav-icon {
    animation: none !important;
  }
  
  .btn:active {
    transform: none !important;
  }
  
  .btn:not(:disabled):active::after {
    animation: none !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .toast {
    transition: none !important;
  }
}

/* User Menu Styles */
.user-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  width: 280px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  overflow: hidden;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-secondary-bg);
  border-bottom: 1px solid var(--color-border);
}

.user-avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-initial {
  color: white;
  font-weight: 600;
  font-size: 1rem;
}

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

.user-name-display {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.user-email {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-items {
  padding: 0.5rem 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  color: var(--color-text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-align: left;
}

.menu-item:hover {
  background: var(--color-secondary-bg);
}

.menu-item.logout-item {
  color: var(--color-error);
}

.menu-item.logout-item:hover {
  background: rgba(239, 68, 68, 0.1);
}

.menu-icon {
  width: 1rem;
  height: 1rem;
  display: block;
  background: currentColor;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  flex-shrink: 0;
}

.profile-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z'/%3e%3c/svg%3e");
}

.settings-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z'/%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3e%3c/svg%3e");
}

.history-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z'/%3e%3c/svg%3e");
}

.security-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z'/%3e%3c/svg%3e");
}

.help-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z'/%3e%3c/svg%3e");
}

.logout-icon {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1'/%3e%3c/svg%3e");
}

.menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0.5rem 0;
}

/* Profile Modal Styles */
.profile-content {
  max-width: 500px;
  margin: 0 auto;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.profile-avatar {
  width: 4rem;
  height: 4rem;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.avatar-large {
  color: white;
  font-weight: 700;
  font-size: 1.5rem;
}

.profile-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.25rem 0;
}

.profile-email {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin: 0 0 0.25rem 0;
}

.profile-joined {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  margin: 0;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--color-secondary-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.stat-card .stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.stat-card .stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.profile-form .form-group input[readonly] {
  background: var(--color-secondary-bg);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

/* Password Reset Styles */
.password-reset-form,
.new-password-form {
  max-width: 400px;
  margin: 0 auto;
}

.reset-description {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-step {
  display: block;
}

.form-step.hidden {
  display: none;
}

.success-message {
  text-align: center;
  margin-bottom: 2rem;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.success-message h3 {
  color: var(--color-text);
  margin: 0 0 1rem 0;
}

.success-message p {
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.success-message small {
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

.success-message a {
  color: var(--color-primary);
  text-decoration: none;
}

.success-message a:hover {
  text-decoration: underline;
}

.form-help {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .user-menu {
    width: 260px;
  }
  
  .profile-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
}

:root {
  /* Enhanced Brand Colors - Keeping your exact orange */
  --color-primary: #F59E0B;
  --color-primary-light: #FBB040;
  --color-primary-dark: #D97706;
  --color-primary-rgb: 245, 158, 11;
  
  /* Enhanced Status Colors */
  --color-success: #10B981;
  --color-error: #EF4444;
  --color-warning: #F59E0B;
  --color-info: #3B82F6;
}

/* Light Mode (Default) */
:root,
[data-theme="light"] {
  /* Enhanced Professional Color Palette */
  --color-background: #FAFBFC;
  --color-surface: #FFFFFF;
  --color-card-surface: #FFFFFF;
  --color-secondary-bg: #F8FAFC;
  
  /* Enhanced Text Colors */
  --color-text: #1E293B;
  --color-text-secondary: #64748B;
  --color-text-muted: #94A3B8;
  
  /* Enhanced Borders and Dividers */
  --color-border: #E2E8F0;
  --color-border-light: #F1F5F9;
  --color-focus-ring: rgba(245, 158, 11, 0.2);
}

/* Dark Mode */
[data-theme="dark"] {
  /* Dark Professional Color Palette - True Grays and Blacks */
  --color-background: #0A0A0A;
  --color-surface: #1A1A1A;
  --color-card-surface: #262626;
  --color-secondary-bg: #333333;
  
  /* Dark Text Colors */
  --color-text: #FFFFFF;
  --color-text-secondary: #D1D5DB;
  --color-text-muted: #9CA3AF;
  
  /* Dark Borders and Dividers */
  --color-border: #404040;
  --color-border-light: #525252;
  --color-focus-ring: rgba(245, 158, 11, 0.4);
  
  /* Enhanced Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Enhanced Spacing System */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  
  /* Enhanced Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* =================================
   ENHANCED AUTHENTICATION & LOGIN COMPONENTS
   ================================= */

.auth-container,
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
  padding: var(--space-4);
  position: relative;
}

.login-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, var(--color-surface) 0%, var(--color-background) 100%);
  z-index: 1;
}

[data-theme="dark"] .login-background {
  background: 
    radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
    linear-gradient(135deg, #0A0A0A 0%, #1A1A1A 100%);
}

.login-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card,
.login-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  min-height: auto;
  border: 1px solid var(--color-border-light);
  position: relative;
  z-index: 3;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.6s ease-out;
  box-sizing: border-box;
}

@media (min-width: 769px) {
  .login-card {
    max-width: 650px;
    padding: 2.5rem;
    box-sizing: border-box;
  }
}

@media (min-width: 1025px) {
  .login-card {
    max-width: 750px;
    padding: 2.5rem 3rem;
    box-sizing: border-box;
  }
}

.auth-header,
.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
  position: relative;
}

/* Dark Mode Toggle */
.theme-toggle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
}

.theme-toggle-checkbox {
  display: none;
}

.theme-toggle-label {
  display: block;
  width: 3.5rem;
  height: 1.75rem;
  background: var(--color-border);
  border-radius: 1rem;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  border: 2px solid var(--color-border-light);
}

.theme-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.375rem;
  height: 1.375rem;
  background: var(--color-surface);
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.theme-icon {
  position: absolute;
  width: 0.75rem;
  height: 0.75rem;
  transition: all 0.3s ease;
}

.theme-icon::before {
  content: '';
  width: 100%;
  height: 100%;
  background: var(--color-text);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.sun-icon::before {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3ccircle cx='12' cy='12' r='5'/%3e%3cpath d='M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42'/%3e%3c/svg%3e");
}

.moon-icon::before {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3e%3c/svg%3e");
}

.sun-icon {
  opacity: 1;
  transform: scale(1);
}

.moon-icon {
  opacity: 0;
  transform: scale(0.8);
}

.theme-toggle-checkbox:checked + .theme-toggle-label {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.theme-toggle-checkbox:checked + .theme-toggle-label .theme-toggle-slider {
  transform: translateX(1.75rem);
}

.theme-toggle-checkbox:checked + .theme-toggle-label .sun-icon {
  opacity: 0;
  transform: scale(0.8);
}

.theme-toggle-checkbox:checked + .theme-toggle-label .moon-icon {
  opacity: 1;
  transform: scale(1);
}

.theme-toggle-label:hover {
  transform: scale(1.05);
}

.auth-title,
.login-brand {
  color: var(--color-primary);
  font-size: 2.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

@media (max-width: 480px) {
  .login-brand {
    font-size: 1.85rem;
  }
}

.auth-subtitle,
.login-tagline {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
  font-weight: 400;
}

.auth-form,
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-form .form-input,
.login-form .form-control,
.form-input,
.form-control {
  padding: 0.3rem 0.5rem !important;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem !important;
  background: var(--color-surface);
  color: var(--color-text);
  transition: all 0.2s ease;
  min-height: 2.8rem !important;
  height: 2.8rem !important;
  max-height: 2.8rem !important;
  font-weight: 400;
}

.form-input:focus,
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  transform: translateY(-1px);
}

.form-input:hover,
.form-control:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.1);
}

/* Form Validation States */
.form-input.valid,
.form-control.valid {
  border-color: var(--color-success);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2310B981'%3e%3cpath d='M13 6l-3 3-3-3'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

.form-input.invalid,
.form-control.invalid {
  border-color: var(--color-error);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.form-error {
  color: var(--color-error);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}

.form-group.has-error .form-error {
  display: block;
}

.form-group.has-error .form-input,
.form-group.has-error .form-control {
  border-color: var(--color-error);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

.form-input::placeholder,
.form-control::placeholder {
  color: var(--color-text-muted);
}

.login-btn,
.btn-primary {
  width: 60%;
  margin: 0 auto;
  display: block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--color-primary);
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  height: 3rem !important;
  letter-spacing: 0.025em;
}

.login-btn:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.login-btn:active,
.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.3);
}

.login-btn:focus,
.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-focus-ring), 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Form Options (Remember Me & Forgot Password) */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.25rem 0;
  font-size: 0.875rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-checkbox {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-checkbox:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
  position: relative;
}

.form-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: -2px;
  left: 1px;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
}

.checkbox-label {
  color: var(--color-text);
  cursor: pointer;
  font-weight: 400;
  user-select: none;
}

.forgot-password {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.forgot-password:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Button Icons */
.btn-icon {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  background: white;
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpath d='M15 3h6v6'/%3e%3cpath d='M10 14 21 3'/%3e%3cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3e%3c/svg%3e");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
}

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

/* Button Loading State */
.btn-loading {
  display: none;
}

.login-btn.loading .btn-text {
  display: none;
}

.login-btn.loading .btn-loading {
  display: inline;
}

.login-btn.loading {
  opacity: 0.8;
  cursor: not-allowed;
  pointer-events: none;
}

.login-features {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-light);
}

.login-features h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1.25rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 481px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (min-width: 1025px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
  }
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--color-secondary-bg);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  border: 1px solid var(--color-border-light);
}

.feature-item:hover {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.feature-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon::before {
  content: '';
  width: 1rem;
  height: 1rem;
  background: white;
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
}

/* Chart Icon */
.chart-icon::before {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpath d='M3 12h3l3-9 6 9 3-4 3 2'/%3e%3c/svg%3e");
}

/* Eye Icon */
.eye-icon::before {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3e%3ccircle cx='12' cy='12' r='3'/%3e%3c/svg%3e");
}

/* Portfolio Icon */
.portfolio-icon::before {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3crect x='2' y='3' width='20' height='14' rx='2' ry='2'/%3e%3cline x1='8' y1='21' x2='16' y2='21'/%3e%3cline x1='12' y1='17' x2='12' y2='21'/%3e%3c/svg%3e");
}

/* Building Icon */
.building-icon::before {
  mask-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpath d='M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z'/%3e%3cpath d='M6 12h4'/%3e%3cpath d='M6 8h4'/%3e%3cpath d='M14 8h4'/%3e%3cpath d='M14 12h4'/%3e%3c/svg%3e");
}

.feature-text {
  flex: 1;
}

.feature-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.feature-text p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.4;
}


/* =================================
   APPLICATION LAYOUT
   ================================= */

.hidden {
  display: none !important;
}

.main-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-card-border);
  padding: var(--space-16) 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.brand-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin: 0;
}

.brand-tagline {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.header-stats {
  display: flex;
  gap: var(--space-24);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

/* =================================
   DASHBOARD SECTIONS
   ================================= */

.intelligence-dashboard,
.opportunities-section,
.transparency-section,
.alerts-section,
.community-section {
  padding: var(--space-32) 0;
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-24);
  color: var(--color-text);
}

.intelligence-grid,
.opportunities-grid,
.transparency-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-16);
}

@media (min-width: 481px) {
  .intelligence-grid,
  .opportunities-grid,
  .transparency-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-20);
  }
}

@media (min-width: 769px) {
  .intelligence-grid,
  .opportunities-grid,
  .transparency-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* =================================
   CARDS
   ================================= */

.intelligence-card,
.opportunity-card,
.transparency-card,
.alert-card {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  transition: all 0.2s ease;
}

.intelligence-card:hover,
.opportunity-card:hover,
.transparency-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-16);
}

.card-header h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin: 0;
}

.card-metric {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-8);
}

.card-description {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

/* Metric colors */
.metric-bullish { color: var(--color-success); }
.metric-bearish { color: var(--color-error); }
.metric-neutral { color: var(--color-warning); }

/* =================================
   OPPORTUNITY CARDS
   ================================= */

.opportunity-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-12);
}

.stock-symbol {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

.stock-price {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  text-align: right;
}

.stock-change {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-align: right;
}

.change-positive { color: var(--color-success); }
.change-negative { color: var(--color-error); }

.stock-category {
  display: inline-block;
  padding: var(--space-4) var(--space-8);
  background: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-8);
}

.stock-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: var(--space-12);
  margin-top: var(--space-12);
}

.metric-item {
  text-align: center;
}

.metric-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}

.metric-value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

/* =================================
   MODALS
   ================================= */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-16);
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  max-width: 90vw;
  max-height: 90vh;
  width: 800px;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-20) var(--space-24);
  border-bottom: 1px solid var(--color-card-border);
}

.modal-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--font-size-xl);
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--color-secondary);
  color: var(--color-text);
}

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

.modal-tab {
  flex: 1;
  padding: var(--space-12) var(--space-16);
  background: none;
  border: none;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.modal-tab.active {
  color: var(--color-primary);
  background: var(--color-surface);
  border-bottom: 2px solid var(--color-primary);
}

.modal-tab:hover:not(.active) {
  background: var(--color-secondary);
  color: var(--color-text);
}

.modal-body {
  padding: var(--space-24);
  max-height: 60vh;
  overflow-y: auto;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* =================================
   CHARTS
   ================================= */

.chart-container {
  position: relative;
  height: 300px;
  margin: var(--space-16) 0;
}

.analysis-section {
  margin-bottom: var(--space-24);
}

.analysis-section h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-12);
}

.key-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-16);
  margin-bottom: var(--space-20);
}

.key-metric {
  text-align: center;
  padding: var(--space-12);
  background: var(--color-background);
  border-radius: var(--radius-md);
}

.key-metric-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.key-metric-value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}

/* =================================
   ALERTS
   ================================= */

.alerts-container {
  max-height: 400px;
  overflow-y: auto;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  padding: var(--space-12);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-8);
  transition: all 0.2s ease;
}

.alert-item:hover {
  background: var(--color-background);
}

.alert-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: var(--space-6);
  flex-shrink: 0;
}

.alert-high { background: var(--color-error); }
.alert-medium { background: var(--color-warning); }
.alert-low { background: var(--color-info); }

.alert-content {
  flex: 1;
}

.alert-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.alert-description {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.alert-time {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: var(--space-16);
    text-align: center;
  }
  
  .header-stats {
    justify-content: center;
  }
  
  .stat-item {
    align-items: center;
  }
  
  .intelligence-grid,
  .opportunities-grid,
  .transparency-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 95vw;
    margin: var(--space-8);
  }
  
  .modal-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .modal-tabs::-webkit-scrollbar {
    display: none;
  }
  
  .modal-tab {
    min-width: 120px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .key-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stock-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .auth-card,
  .login-card {
    padding: var(--space-20);
    margin: var(--space-8);
  }
  
  .login-content {
    max-width: 100%;
  }
  
  .login-brand {
    font-size: var(--font-size-2xl);
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: var(--font-size-2xl);
  }
  
  .brand-title {
    font-size: var(--font-size-xl);
  }
  
  .modal-header {
    padding: var(--space-16);
  }
  
  .modal-body {
    padding: var(--space-16);
  }
  
  .key-metrics,
  .stock-metrics {
    grid-template-columns: 1fr;
  }
}

/* =================================
   ENHANCED INTERACTIVE ELEMENTS & ANIMATIONS
   ================================= */

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

/* Enhanced focus states for accessibility */
.form-input:focus-visible,
.form-control:focus-visible,
.login-btn:focus-visible,
.btn-primary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .login-card {
    margin: 1rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
  }
  
  .login-brand {
    font-size: 2rem;
  }
  
  .form-options {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .login-btn,
  .btn-primary {
    width: 100%;
    margin: 0;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .feature-item {
    padding: 0.875rem;
    gap: 0.5rem;
  }
  
  .feature-icon {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .feature-icon::before {
    width: 0.875rem;
    height: 0.875rem;
  }
  
  .login-features h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .login-btn,
  .btn-primary {
    width: 80%;
  }
}

/* =================================
   ENHANCED DARK MODE SUPPORT
   ================================= */

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #0F172A;
    --color-surface: #1E293B;
    --color-card-surface: #334155;
    --color-secondary-bg: #475569;
    --color-text: #F8FAFC;
    --color-text-secondary: #CBD5E1;
    --color-text-muted: #94A3B8;
    --color-border: #334155;
    --color-border-light: #475569;
  }
  
  .login-background {
    background: 
      radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
      linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  }
  
  .auth-container,
  .login-container {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  }
}