/* ═══════════════════════════════════════════════════════════════
   INSIDER FLOW TRACKER - ULTRA-MODERN STYLES (FIXED V5)
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   ✅ LOADING STATE - VERSION MINIMALISTE
   ═══════════════════════════════════════════════════════════════ */
.loading {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.loading.hidden {
    display: none !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ✅ RESPONSIVE */
@media (max-width: 768px) {
    .loading .spinner {
        width: 60px !important;
        height: 60px !important;
    }
    
    .loading .spinner i {
        font-size: 60px !important;
    }
    
    .loading p {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 480px) {
    .loading .spinner {
        width: 50px !important;
        height: 50px !important;
    }
    
    .loading .spinner i {
        font-size: 50px !important;
    }
    
    .loading p {
        font-size: 0.9rem !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   GRADIENT UTILITIES
   ═══════════════════════════════════════════════════════════════ */
   
.gradient-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.page-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* ═══════════════════════════════════════════════════════════════
   CONTAINER PARENT
   ═══════════════════════════════════════════════════════════════ */
.container {
    position: relative;
    min-height: calc(100vh - 80px);
}

/* ═══════════════════════════════════════════════════════════════
   SEARCH CONTAINER
   ═══════════════════════════════════════════════════════════════ */
.search-container {
    max-width: 100%;
    margin-bottom: 32px;
}

.search-box {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--eco-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    padding: 14px 0;
    height: 48px;
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.search-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 14px 32px;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.6);
}

.search-btn:active {
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   SEARCH OPTIONS
   ═══════════════════════════════════════════════════════════════ */
.search-options {
    display: flex;
    gap: 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.option-group {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    padding: 12px 20px;
    border: 2px solid rgba(102, 126, 234, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 250px;
    transition: all 0.3s ease;
    position: relative;
}

.option-group::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.option-group:hover::before {
    opacity: 1;
}

.option-group:hover {
    border-color: rgba(102, 126, 234, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.option-group label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    pointer-events: none;
}

.option-group label i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1rem;
}

.option-group select {
    flex: 1;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid rgba(102, 126, 234, 0.4);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.option-group select:hover {
    border-color: rgba(102, 126, 234, 0.8);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.option-group select:focus {
    border-color: rgba(102, 126, 234, 1);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.3);
}

body.dark-mode .option-group select {
    background: var(--bg-tertiary);
}

/* ═══════════════════════════════════════════════════════════════
   ERROR STATE
   ═══════════════════════════════════════════════════════════════ */
.error-state {
    text-align: center;
    padding: 60px 20px;
}

.error-state h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.6);
}

/* ═══════════════════════════════════════════════════════════════
   🤖 ALPHY AI RECOMMENDATION
   ═══════════════════════════════════════════════════════════════ */
.alphy-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius-lg);
    padding: 32px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.alphy-simple-grid {
    display: grid;
    gap: 24px;
}

.alphy-summary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
    border-radius: 16px;
    padding: 24px;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.alphy-action-row {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.alphy-action-icon-small {
    font-size: 3rem;
}

.alphy-action-text {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.alphy-score-text {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.alphy-section h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alphy-section h3 i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.insight-list,
.risk-list,
.action-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-item,
.risk-item,
.action-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    border-left: 3px solid #667eea;
}

.insight-item i,
.risk-item i,
.action-item i {
    color: #667eea;
    margin-top: 2px;
    flex-shrink: 0;
}

.risk-item {
    background: rgba(239, 68, 68, 0.05);
    border-left-color: #ef4444;
}

.risk-item i {
    color: #ef4444;
}

.action-item {
    background: rgba(16, 185, 129, 0.05);
    border-left-color: #10b981;
}

.action-item i {
    color: #10b981;
}

.ai-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.alphy-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.alphy-metric-compact {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(102, 126, 234, 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.metric-icon-small {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.metric-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   SCORE CARDS
   ═══════════════════════════════════════════════════════════════ */
.score-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.score-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
}

.score-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.score-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(102, 126, 234, 0.25);
}

.score-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.score-content {
    flex: 1;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.score-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 8px;
}

.score-sublabel {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════ */
.alerts-grid {
    display: grid;
    gap: 16px;
}

.alert {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius);
    padding: 20px 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-left: 4px solid;
    transition: var(--transition-smooth);
    border: 1px solid var(--glass-border);
}

.alert:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.alert.severity-HIGH {
    border-left-color: var(--eco-danger);
    background: rgba(239, 68, 68, 0.05);
}

.alert.severity-MEDIUM {
    border-left-color: var(--eco-warning);
    background: rgba(245, 158, 11, 0.05);
}

.alert.severity-LOW {
    border-left-color: var(--eco-info);
    background: rgba(59, 130, 246, 0.05);
}

.alert-icon {
    font-size: 1.5rem;
    margin-top: 4px;
}

.alert.severity-HIGH .alert-icon {
    color: var(--eco-danger);
}

.alert.severity-MEDIUM .alert-icon {
    color: var(--eco-warning);
}

.alert.severity-LOW .alert-icon {
    color: var(--eco-info);
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.alert-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   PATTERN CARDS
   ═══════════════════════════════════════════════════════════════ */
.pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.pattern-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border: 1px solid var(--glass-border);
    border-left-width: 4px;
    transition: var(--transition-smooth);
}

.pattern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.pattern-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.1);
    flex-shrink: 0;
}

.pattern-content h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pattern-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   CLUSTER CARDS
   ═══════════════════════════════════════════════════════════════ */
.cluster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.cluster-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border: 2px solid var(--eco-success);
    border-radius: var(--border-radius);
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.cluster-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
}

.cluster-card h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
}

.cluster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.cluster-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.confidence-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    color: white;
}

.cluster-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.cluster-stat {
    background: rgba(0, 0, 0, 0.1);
    padding: 12px;
    border-radius: 10px;
}

body.dark-mode .cluster-stat {
    background: rgba(255, 255, 255, 0.05);
}

.cluster-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.cluster-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--eco-success);
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   WHALE INSIDER TRACKER
   ═══════════════════════════════════════════════════════════════ */
.whale-grid {
    display: grid;
    gap: 16px;
}

.whale-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
    flex-wrap: wrap;
}

.whale-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
}

.whale-rank {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    flex-shrink: 0;
}

.whale-rank.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

.whale-rank.rank-2 {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: 0 0 20px rgba(148, 163, 184, 0.5);
}

.whale-rank.rank-3 {
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 0 20px rgba(251, 146, 60, 0.5);
}

.whale-info {
    flex: 1;
    min-width: 200px;
}

.whale-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.whale-role {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.whale-stats {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.whale-stat {
    text-align: right;
}

.whale-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
}

.whale-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.whale-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   TABLE
   ═══════════════════════════════════════════════════════════════ */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    color: white !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

td {
    padding: 16px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-primary);
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-buy {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.badge-sell {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.badge-neutral {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 20px;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.pagination button {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--glass-border);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pagination button:hover:not(:disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination span {
    font-weight: 700;
    color: var(--text-secondary);
    padding: 0 12px;
}

/* ═══════════════════════════════════════════════════════════════
   ✅ CHART WRAPPER - RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
.chart-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius);
    padding: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: visible;
    max-width: 100%;
}

.chart-wrapper canvas {
    max-width: 100% !important;
    width: 100% !important;
    height: 400px !important;
    display: block;
}

.chart-wrapper > div {
    position: relative;
    max-width: 100%;
    width: 100%;
    height: 400px;
}

/* ═══════════════════════════════════════════════════════════════
   NETWORK GRAPH
   ═══════════════════════════════════════════════════════════════ */
.network-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.network-btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 24px;
    background: var(--glass-bg);
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-primary), var(--bg-primary)), 
                      linear-gradient(135deg, #667eea, #764ba2);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.network-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.network-btn:hover::before {
    opacity: 1;
}

.network-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.network-graph-container {
    width: 100%;
    height: 600px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.network-stats {
    margin-top: 20px;
}

.network-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.network-stat-card {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--glass-border);
}

.network-stat-card i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════
   COMPARISON SECTION
   ═══════════════════════════════════════════════════════════════ */
.comparison-search {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.comparison-search input {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border: 2px solid rgba(102, 126, 234, 0.6);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.comparison-search input:hover {
    border-color: rgba(102, 126, 234, 0.8);
}

.comparison-search input:focus {
    border-color: rgba(102, 126, 234, 1);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

body.dark-mode .comparison-search input {
    background: var(--bg-tertiary);
}

#runComparisonBtn {
    border: 2px solid transparent;
    background-image: linear-gradient(135deg, #667eea, #764ba2), 
                      linear-gradient(135deg, #667eea, #764ba2);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    position: relative;
}

#runComparisonBtn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#runComparisonBtn:hover::before {
    opacity: 1;
}

.comparison-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 60px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
    border: 1px dashed var(--glass-border);
}

.comparison-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
}

.tag-remove {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: var(--transition-smooth);
}

.tag-remove:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.comparison-results {
    margin-top: 24px;
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.ranking-card {
    background: var(--glass-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--glass-border);
}

.ranking-card h5 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ranking-card ol {
    list-style: none;
    counter-reset: ranking;
    padding: 0;
    margin: 0;
}

.ranking-card li {
    counter-increment: ranking;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    position: relative;
    padding-left: 40px;
}

.ranking-card li::before {
    content: counter(ranking);
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.cross-company-network-container {
    margin-top: 32px;
}

.correlation-matrix {
    margin-top: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════════════
   ✅ RESPONSIVE - MOBILE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
        padding: 16px;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }

    .search-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .option-group {
        min-width: auto;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .option-group label {
        white-space: normal;
    }

    .option-group select {
        width: 100%;
    }

    .score-container {
        grid-template-columns: 1fr;
    }

    .score-card {
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
    }

    .score-icon {
        margin: 0 auto 12px;
    }

    .pattern-grid {
        grid-template-columns: 1fr;
    }

    .cluster-grid {
        grid-template-columns: 1fr;
    }

    .alphy-metrics-grid {
        grid-template-columns: 1fr;
    }

    .alphy-action-row {
        flex-direction: column;
        text-align: center;
    }

    .alphy-panel {
        padding: 20px;
    }

    .comparison-search {
        flex-direction: column;
    }

    .comparison-search input {
        width: 100%;
    }

    .network-controls {
        flex-direction: column;
    }

    .network-btn {
        width: 100%;
    }

    .network-graph-container {
        height: 500px;
    }

    .ranking-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 10px 8px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .pagination button {
        font-size: 0.85rem;
        padding: 8px 16px;
    }

    .pagination span {
        width: 100%;
        text-align: center;
        font-size: 0.9rem;
    }

    .whale-card {
        flex-direction: column;
        text-align: center;
    }

    .whale-stats {
        width: 100%;
        justify-content: center;
    }

    .chart-wrapper {
        padding: 16px;
    }

    .chart-wrapper canvas {
        height: 350px !important;
    }

    .chart-wrapper > div {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .score-card {
        flex-direction: column;
        text-align: center;
    }

    .score-icon {
        margin: 0 auto 12px;
    }

    .score-value {
        font-size: 2rem;
    }

    .chart-wrapper canvas {
        height: 320px !important;
    }

    .chart-wrapper > div {
        height: 320px;
    }

    .network-graph-container {
        height: 450px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .search-btn,
    .primary-btn {
        font-size: 0.95rem;
        padding: 12px 24px;
    }

    th, td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

    .alphy-panel {
        padding: 16px;
    }

    .alphy-action-text {
        font-size: 1.3rem;
    }

    .alphy-action-icon-small {
        font-size: 2rem;
    }

    .metric-value {
        font-size: 1.1rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.hidden {
    display: none !important;
}

* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   END OF INSIDER FLOW TRACKER STYLES
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   DATA LOADER PANEL (CONFIGURATION AVANT CHARGEMENT)
   Style identique à IPO Intelligence
   ═══════════════════════════════════════════════════════════════ */

.data-loader-panel {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    animation: fadeIn 0.6s ease;
}

.loader-panel-content {
    max-width: 800px;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    overflow: hidden;
}

.loader-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.loader-panel-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
    animation: moveStripes 20s linear infinite;
}

@keyframes moveStripes {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.loader-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.loader-title {
    color: white !important;
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: none !important;
    -webkit-text-fill-color: white !important;
    position: relative;
    z-index: 1;
}

.loader-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.loader-panel-body {
    padding: 40px;
}

.loader-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.loader-config-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loader-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loader-label i {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loader-input {
    width: 100%;
    padding: 14px 18px;
    background: var(--eco-gradient-soft);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.loader-input::placeholder {
    color: var(--text-tertiary);
    opacity: 0.6;
}

.loader-input:hover {
    border-color: var(--eco-primary);
}

.loader-input:focus {
    outline: none;
    border-color: var(--eco-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.loader-select {
    width: 100%;
    padding: 14px 18px;
    background: var(--eco-gradient-soft);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.loader-select:hover {
    border-color: var(--eco-primary);
}

.loader-select:focus {
    outline: none;
    border-color: var(--eco-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.loader-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 600;
}

.loader-hint i {
    color: var(--eco-info);
}

.loader-preview {
    background: var(--eco-gradient-soft);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.loader-preview-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.loader-preview-item i {
    font-size: 1.5rem;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loader-preview-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loader-preview-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.loader-preview-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 800;
}

.loader-analyze-btn {
    width: 100%;
    padding: 20px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.3rem;
    font-weight: 900;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.loader-analyze-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(102, 126, 234, 0.6);
}

.loader-analyze-btn:active {
    transform: translateY(-2px);
}

.loader-analyze-btn i {
    font-size: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   DATASET INFO BAR (BARRE D'INFORMATION DES DONNÉES)
   ═══════════════════════════════════════════════════════════════ */

.dataset-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--eco-gradient-soft);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dataset-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.dataset-info-item i {
    font-size: 1.3rem;
    background: var(--eco-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dataset-reconfigure-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--glass-border);
    color: var(--text-primary);
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.dataset-reconfigure-btn:hover {
    background: var(--eco-gradient);
    color: white;
    border-color: transparent;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD CONTENT (CACHÉ PAR DÉFAUT)
   ═══════════════════════════════════════════════════════════════ */

.dashboard-content {
    animation: fadeIn 0.6s ease;
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE - PANNEAU DE CONFIGURATION
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .loader-panel-header {
        padding: 40px 24px;
    }
    
    .loader-title {
        font-size: 1.8rem;
    }
    
    .loader-subtitle {
        font-size: 1rem;
    }
    
    .loader-panel-body {
        padding: 24px;
    }
    
    .loader-config-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .loader-analyze-btn {
        font-size: 1.1rem;
        padding: 16px 32px;
    }
    
    .dataset-info-bar {
        flex-direction: column;
        gap: 16px;
    }
    
    .dataset-reconfigure-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .data-loader-panel {
        padding: 20px 10px;
    }
    
    .loader-panel-header {
        padding: 30px 20px;
    }
    
    .loader-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .loader-title {
        font-size: 1.5rem;
    }
    
    .loader-subtitle {
        font-size: 0.9rem;
    }
    
    .loader-panel-body {
        padding: 20px;
    }
    
    .loader-label {
        font-size: 1rem;
    }
    
    .loader-input,
    .loader-select {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    
    .loader-analyze-btn {
        font-size: 1rem;
        padding: 14px 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   DARK MODE - PANNEAU DE CONFIGURATION
   ═══════════════════════════════════════════════════════════════ */

body.dark-mode .loader-panel-content {
    background: rgba(15, 23, 42, 0.95);
}

body.dark-mode .loader-input,
body.dark-mode .loader-select {
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
}

body.dark-mode .loader-input::placeholder {
    color: #94a3b8;
}

body.dark-mode .loader-preview {
    background: rgba(30, 41, 59, 0.6);
}

body.dark-mode .dataset-info-bar {
    background: rgba(30, 41, 59, 0.6);
}   