* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f9fa;
}

/* Шапка */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 2em;
}

.header-description {
    margin: 20px auto;
    max-width: 900px;
    color: #333;
}

.header-description p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.header-note {
    font-size: 0.95em;
    color: #666;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eaeaea;
}

/* Поле поиска */
.search-container {
    margin-bottom: 25px;
}

#searchInput {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #4a90e2;
}

.hint {
    font-size: 0.9em;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

/* Блок фильтров */
.filters-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filters-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.1em;
}

.filters-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.filter-checkbox input {
    margin-right: 8px;
    cursor: pointer;
}

.filter-label {
    padding: 6px 12px;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    transition: all 0.2s;
    font-size: 0.95em;
}

.filter-checkbox input:checked + .filter-label {
    font-weight: 600;
}

/* Цвета для разных статусов */
#filterApp1:checked + .filter-label {
    background: #ffebee;
    border-color: #ef9a9a;
    color: #c62828;
}

#filterApp2:checked + .filter-label {
    background: #fff3e0;
    border-color: #ffcc80;
    color: #ef6c00;
}

#filterApp3:checked + .filter-label {
    background: #e8f5e9;
    border-color: #a5d6a7;
    color: #2e7d32;
}

.filters-hint {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
}

/* Описание поиска */
.search-description {
    background: #f0f7ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4a90e2;
    font-size: 0.95em;
}

.search-description strong {
    color: #2c3e50;
}

/* Контейнер результатов */
.results-container {
    margin-top: 20px;
    min-height: 300px;
}

/* Начальное сообщение */
.initial-message {
    text-align: center;
    color: #666;
    padding: 60px 20px;
    font-size: 1.1em;
    background: white;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.example-queries {
    margin-top: 20px;
    font-size: 0.9em;
    color: #888;
}

.example-queries code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 0 5px;
    font-family: monospace;
    color: #555;
}

/* Сообщение "нет результатов" */
.no-results {
    text-align: center;
    padding: 60px;
    color: #666;
    font-style: italic;
    background: white;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.no-results strong {
    color: #2c3e50;
}

/* Статистика результатов */
.results-count {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4a90e2;
    color: #333;
}

.results-count strong {
    color: #2c3e50;
}

/* Таблица результатов */
.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.results-table th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.results-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.results-table tr:hover {
    background-color: #f9f9f9;
}

/* Столбцы таблицы */
.col-code { width: 15%; }
.col-name { width: 40%; }
.col-app1 { width: 15%; }
.col-app2 { width: 15%; }
.col-app3 { width: 15%; }

/* Стили для ячеек статусов */
.status-cell {
    text-align: center;
}

.status-empty {
    color: #999;
    font-style: italic;
}

/* Стили для ссылок на пункты приложений */
.point-link {
    display: inline-block;
    padding: 4px 8px;
    margin: 2px;
    background: #f0f7ff;
    border-radius: 4px;
    color: #4a90e2;
    text-decoration: none;
    font-size: 0.9em;
    border: 1px solid #d0e3ff;
    transition: all 0.2s;
}

.point-link:hover {
    background: #4a90e2;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Специфичные цвета для приложений */
.app1-link { 
    background: #ffebee; 
    border-color: #ef9a9a; 
    color: #c62828; 
}
.app1-link:hover { 
    background: #c62828; 
}

.app2-link { 
    background: #fff3e0; 
    border-color: #ffcc80; 
    color: #ef6c00; 
}
.app2-link:hover { 
    background: #ef6c00; 
}

.app3-link { 
    background: #e8f5e9; 
    border-color: #a5d6a7; 
    color: #2e7d32; 
}
.app3-link:hover { 
    background: #2e7d32; 
}

/* Квота для Прил.3 */
.quota-badge {
    font-size: 0.8em;
    background: #2e7d32;
    color: white;
    padding: 1px 5px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Контейнер для кода и кнопки копирования */
.code-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.code-text {
    font-weight: bold;
    color: #2c3e50;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    letter-spacing: 0.5px;
}

/* Кнопка копирования */
.copy-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9em;
    color: #666;
    transition: all 0.2s;
    line-height: 1;
}

.copy-btn:hover {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: #2ecc71;
    color: white;
    border-color: #27ae60;
}

/* Пагинация */
.more-results {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    border-top: 1px dashed #ddd;
    margin-top: 20px;
}

.show-all-btn {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 1em;
    transition: all 0.2s;
}

.show-all-btn:hover {
    background-color: #357ae8;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Подсветка совпадений */
mark {
    background-color: #fff9c4;
    color: inherit;
    padding: 0;
    border-radius: 2px;
}

.code-match {
    background-color: #e3f2fd;
    color: inherit;
    font-weight: bold;
    padding: 0;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(33, 150, 243, 0.2);
}

/* Футер */
footer {
    margin-top: 50px;
    text-align: center;
    font-size: 0.9em;
    color: #666;
    padding-top: 20px;
    border-top: 2px solid #eaeaea;
}

.footer-note {
    margin-top: 15px;
    font-size: 0.85em;
    color: #888;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Адаптивность */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .filters-checkboxes {
        flex-direction: column;
        gap: 10px;
    }
    
    .results-table {
        display: block;
        overflow-x: auto;
    }
    
    .col-code, .col-name, .col-app1, .col-app2, .col-app3 {
        width: auto;
    }
    
    .results-table th,
    .results-table td {
        padding: 12px 10px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.6em;
    }
    
    .header-description p {
        font-size: 0.95em;
    }
    
    .code-container {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .copy-btn {
        font-size: 0.8em;
        padding: 3px 6px;
    }
    
    .point-link {
        font-size: 0.8em;
        padding: 3px 6px;
        margin: 1px;
    }
}