/* DIAGNOSIS STYLES - ОБНОВЛЕННАЯ ВЕРСИЯ */
.diagnosis-page { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0;
    font-family: var(--font-primary);
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

/* Заголовок на темном фоне */
.diagnosis-page h1 {
    background: #2c3e50;
    color: white;
    padding: 20px;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    font-family: var(--font-primary);
}

.search-form { 
    margin: 0;
    padding: 30px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.search-form input { 
    padding: 12px 15px; 
    width: 300px; 
    margin-right: 10px; 
    border: 1px solid #ddd; 
    border-radius: 6px;
    font-family: var(--font-primary);
    font-weight: 500;
}

.search-form button { 
    padding: 12px 20px; 
    background: #3498db; 
    color: white; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer;
    font-family: var(--font-primary);
    font-weight: 500;
    transition: background 0.2s;
}

.search-form button:hover { 
    background: #2980b9;
}

.status-block { 
    padding: 20px; 
    border-radius: 8px; 
    margin: 20px 0; 
}

.status-HEALTHY { 
    background: #d4edda; 
    border: 1px solid #c3e6cb; 
    color: #155724;
}

.status-LOW_LIQUIDITY { 
    background: #fff3cd; 
    border: 1px solid #ffeaa7; 
    color: #856404;
}

.status-INACTIVE { 
    background: #f8d7da; 
    border: 1px solid #f5c6cb; 
    color: #721c24;
}

.status-DATA_ISSUES { 
    background: #e2e3e5; 
    border: 1px solid #d6d8db; 
    color: #383d41;
}

.metrics-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 15px; 
    margin: 20px 0; 
}

.metric-card { 
    padding: 20px; 
    background: white; 
    border: 1px solid #e9ecef; 
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.metric-value { 
    font-size: 24px; 
    font-weight: bold; 
    margin: 10px 0; 
}

.metric-good { color: #27ae60; }
.metric-warning { color: #f39c12; }
.metric-danger { color: #e74c3c; }

.problems-list { margin: 20px 0; }
.problem-item { 
    padding: 15px; 
    margin: 10px 0; 
    background: #f8f9fa; 
    border-left: 4px solid #e74c3c; 
    border-radius: 4px;
    color: #2c3e50;
}

.comparison-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th, .comparison-table td { 
    padding: 12px 15px; 
    text-align: left; 
    border-bottom: 1px solid #e9ecef; 
}

.comparison-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.match { color: #27ae60; font-weight: 600; }
.mismatch { color: #e74c3c; font-weight: 600; }

.error { 
    color: #721c24; 
    padding: 20px; 
    background: #f8d7da; 
    border-radius: 8px; 
    margin: 20px 0; 
    border: 1px solid #f1b0b7;
}

.success { 
    color: #155724; 
    padding: 20px; 
    background: #d4edda; 
    border-radius: 8px; 
    margin: 20px 0;
    border: 1px solid #c3e6cb;
}

.section { 
    margin: 0;
    padding: 30px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.section:last-child {
    border-bottom: none;
}

.section h2 { 
    margin-top: 0; 
    color: #2c3e50; 
    border-bottom: 2px solid #f8f9fa; 
    padding-bottom: 15px;
    font-size: 20px;
    font-weight: 600;
}

.refresh-btn { 
    background: #27ae60; 
    color: white; 
    border: none; 
    padding: 12px 20px; 
    border-radius: 6px; 
    cursor: pointer; 
    margin-left: 10px;
    font-family: var(--font-primary);
    font-weight: 500;
    transition: background 0.2s;
}

.refresh-btn:hover { 
    background: #219653;
}

.yield-high { color: #27ae60; font-weight: bold; }
.yield-medium { color: #f39c12; font-weight: 500; }
.yield-low { color: #e74c3c; font-weight: 500; }

/* Диагностика */
.diagnosis-value, .metric, .financial-data {
    font-family: var(--font-mono), var(--font-mono-fallback);
    font-variant-numeric: tabular-nums;
}

.diagnosis-title {
    font-family: var(--font-primary);
    font-weight: 500;
}

/* Адаптивность */
@media (max-width: 768px) {
    .diagnosis-page {
        margin: 10px;
    }
    
    .search-form input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .search-form form {
        display: flex;
        flex-direction: column;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 20px 15px;
    }
}