/* Score badge colors */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
}
.score-1, .score-2 { background: #dc2626; color: white; }
.score-3, .score-4 { background: #f97316; color: white; }
.score-5, .score-6 { background: #eab308; color: black; }
.score-7, .score-8 { background: #22c55e; color: white; }
.score-9, .score-10 { background: #16a34a; color: white; }

/* Block card */
.block-card {
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: border-color 0.2s;
}
.block-card:hover {
    border-color: #3b82f6;
}

/* Progress bar */
.progress-bar {
    height: 4px;
    background: #374151;
    border-radius: 2px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: #3b82f6;
    transition: width 0.3s ease;
}

/* Loading spinner */
.spinner {
    border: 3px solid #374151;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Parameter row */
.param-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #374151;
}
.param-row:last-child {
    border-bottom: none;
}

/* Nav active */
.nav-link.active {
    color: #3b82f6;
    font-weight: 600;
}

/* Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #374151;
}
.data-table th {
    color: #9ca3af;
    font-size: 0.75rem;
    text-transform: uppercase;
}
.data-table tr:hover {
    background: #1f2937;
}

/* ═══════════════════════════════════════════════════════ */
/* Мобильная адаптация — все страницы                     */
/* ═══════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Header — скрыть навигацию, показать бургер */
    header .flex.items-center.gap-6 nav {
        display: none;
    }

    /* Main content — меньше отступы */
    #app-content {
        padding: 0.75rem !important;
        max-width: 100% !important;
    }

    /* Заголовки */
    h2 { font-size: 1.25rem !important; }

    /* Таблицы — горизонтальный скролл */
    table { font-size: 0.75rem !important; }
    th, td { padding: 0.375rem 0.5rem !important; white-space: nowrap; }

    /* Кнопки — компактнее */
    button, a.rounded { font-size: 0.75rem !important; padding: 0.375rem 0.625rem !important; }

    /* Грид — в одну колонку */
    .grid.lg\:grid-cols-2 { grid-template-columns: 1fr !important; }

    /* Поиск — на полную ширину */
    input[type="text"] { width: 100% !important; }

    /* Скрыть некритичные столбцы в таблицах */
    .hide-mobile { display: none !important; }
}

@media (max-width: 640px) {
    #ws-dynamics-wrapper {
        -webkit-overflow-scrolling: touch;
    }
    #ws-dynamics-summary {
        font-size: 0.75rem;
        line-height: 1.6;
    }

    /* Ещё компактнее */
    header { padding: 0.5rem 0.75rem !important; }
    header h1 { font-size: 1rem !important; }
    #app-content { padding: 0.5rem !important; }
}
