/* ============================================================================
   av-market-scanner.css — Modulo CSS estratto da av.html
   AIVEK Vision — Generato automaticamente
   ============================================================================ */

/* ========================================
   MARKET SCANNER UI STYLES
   ======================================== */
.market-scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.market-scanner-title-section {
    flex: 1;
}
.market-scanner-subtitle {
    font-size: 10px;
    color: #9ca3af;
    margin: 0;
}
.market-scanner-quick-actions {
    display: flex;
    gap: 4px;
}
.market-scanner-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #667eea;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
}
.market-scanner-action-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

/* Tabs */
.market-scanner-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 8px;
    padding: 3px;
}
.ms-tab {
    flex: 1;
    padding: 6px 4px;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ms-tab:hover {
    color: #667eea;
}
.ms-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

/* Tab Content */
.ms-tab-content {
    display: none;
}
.ms-tab-content.active {
    display: block;
    animation: fadeInContent 0.3s ease;
}

/* KPI Row - more compact */
.ms-kpi-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}
.ms-kpi-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.08) 100%);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
}
.ms-kpi-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
}
.ms-kpi-data {
    display: flex;
    flex-direction: column;
}
.ms-kpi-value {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}
.ms-kpi-label {
    font-size: 9px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Search Card */
.ms-search-card {
    padding: 10px;
    overflow: hidden;
}
.ms-search-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
}
.ms-input {
    flex: 1 1 40%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    color: #374151;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.ms-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}
.ms-select {
    flex: 0 1 28%;
    min-width: 0;
    max-width: 80px;
    padding: 8px 4px;
    border: 1px solid rgba(102, 126, 234, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 9px;
    color: #374151;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    text-overflow: ellipsis;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    padding-right: 18px;
}
.ms-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
}
.ms-sources-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.ms-source-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    background: rgba(102, 126, 234, 0.08);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 12px;
    font-size: 9px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ms-source-chip:has(input:checked) {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    color: #667eea;
}
.ms-source-chip input {
    display: none;
}

/* Live Feed */
.ms-live-feed {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}
.ms-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(102, 126, 234, 0.1);
    font-size: 10px;
    font-weight: 600;
    color: #667eea;
}
.ms-feed-status {
    padding: 2px 6px;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 8px;
    font-size: 8px;
    text-transform: uppercase;
}
.ms-feed-status.active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}
.ms-feed-content {
    max-height: 120px;
    overflow-y: auto;
    padding: 8px;
}
.ms-feed-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 11px;
}
.ms-feed-item:last-child {
    margin-bottom: 0;
}
.ms-feed-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}
.ms-feed-icon.movement { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.ms-feed-icon.anomaly { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.ms-feed-icon.alert { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.ms-feed-icon.shift { background: rgba(16, 185, 129, 0.15); color: #10b981; }

/* Section Cards */
.ms-section-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 100%);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
}
.ms-section-header {
    font-size: 10px;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Mini Bars (Trend Graph) */
.ms-trend-graph {
    height: 80px;
    display: flex;
    align-items: flex-end;
    padding: 10px 0;
}
.ms-mini-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    width: 100%;
    height: 100%;
}
.ms-mini-bar {
    flex: 1;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px 4px 0 0;
    min-height: 8px;
    transition: height 0.3s ease;
}

/* Keyword Cloud */
.ms-keyword-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.ms-keyword {
    padding: 5px 10px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    font-size: 11px;
    color: #667eea;
}
.ms-keyword[data-weight="1"] { opacity: 0.5; font-size: 10px; }
.ms-keyword[data-weight="2"] { opacity: 0.7; }
.ms-keyword[data-weight="3"] { font-weight: 600; }
.ms-keyword[data-weight="4"] { font-weight: 700; font-size: 12px; }

/* Sentiment Bar */
.ms-sentiment-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}
.ms-sentiment-positive { background: #10b981; }
.ms-sentiment-neutral { background: #6b7280; }
.ms-sentiment-negative { background: #ef4444; }
.ms-sentiment-labels {
    display: flex;
    justify-content: space-between;
}
.ms-sentiment-label {
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.ms-sentiment-label.positive { color: #10b981; }
.ms-sentiment-label.neutral { color: #6b7280; }
.ms-sentiment-label.negative { color: #ef4444; }

/* Heatmap */
.ms-heatmap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.ms-heat-cell {
    aspect-ratio: 1;
    border-radius: 6px;
    transition: transform 0.2s ease;
}
.ms-heat-cell:hover {
    transform: scale(1.05);
}
.ms-heat-cell.low { background: rgba(16, 185, 129, 0.4); }
.ms-heat-cell.medium { background: rgba(245, 158, 11, 0.5); }
.ms-heat-cell.high { background: rgba(239, 68, 68, 0.6); }

/* Alerts Timeline */
.ms-alerts-timeline {
    max-height: 120px;
    overflow-y: auto;
}
.ms-alert-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    font-size: 11px;
}
.ms-alert-item:last-child {
    border-bottom: none;
}
.ms-alert-item.placeholder {
    color: #9ca3af;
}
.ms-alert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    flex-shrink: 0;
}
.ms-alert-item.critical .ms-alert-dot { background: #ef4444; }
.ms-alert-item.warning .ms-alert-dot { background: #f59e0b; }
.ms-alert-item.info .ms-alert-dot { background: #3b82f6; }

/* Risk & Scoreboard Lists */
.ms-risk-list, .ms-scoreboard, .ms-breakout-list {
    max-height: 100px;
    overflow-y: auto;
}
.ms-empty-state-mini {
    text-align: center;
    color: #9ca3af;
    font-size: 11px;
    padding: 16px;
}
.ms-risk-item, .ms-score-item, .ms-breakout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 11px;
}
.ms-risk-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}
.ms-risk-badge.high { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.ms-risk-badge.medium { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.ms-risk-badge.low { background: rgba(16, 185, 129, 0.15); color: #10b981; }

/* Suggestions */
.ms-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ms-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(102, 126, 234, 0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ms-suggestion-item:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}
.ms-suggestion-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.15) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-size: 12px;
}
.ms-suggestion-text {
    font-size: 12px;
    color: #374151;
}

/* Footer Actions */
.ms-footer-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(102, 126, 234, 0.15);
}
.ms-primary-btn {
    width: 100%;
    margin-bottom: 10px;
}
.ms-footer-secondary {
    display: flex;
    gap: 8px;
}
.ms-secondary-btn {
    flex: 1;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    color: #667eea;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.ms-secondary-btn:hover {
    background: rgba(102, 126, 234, 0.2);
}

