/* Основные стили для страницы SSSR Registry */

/* Убираем хлебные крошки */
.breadcrumb {
    display: none !important;
}

/* Уменьшаем верхний отступ основного контейнера */
.main-content-wrapper {
    max-width: 1400px;
    margin: 50px auto 0 !important; /* Уменьшили с 70px до 50px */
    padding: 0 20px 20px !important; /* Уменьшили снизу с 40px до 20px */
}

.content-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-top: 15px !important; /* Уменьшили отступ сверху */
}

.content-header {
    padding: 25px 35px 15px !important; /* Уменьшили паддинги */
    border-bottom: 1px solid #f0f2f5;
}

.content-body {
    padding: 0 35px 30px !important; /* Уменьшили паддинги */
}

.page-title {
    font-size: 1.8rem !important; /* Немного уменьшили */
    color: #2c3e50;
    margin: 0 0 8px 0 !important; /* Уменьшили отступ */
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-subtitle {
    color: #5a6c7d;
    font-size: 0.95rem !important; /* Немного уменьшили */
    margin: 0;
    line-height: 1.4;
}

/* Таблица - делаем шире и компактнее */
.table-container {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    margin-bottom: 25px !important;
}

.sssr-table {
    width: 100% !important;
    min-width: 1100px !important; /* Увеличили минимальную ширину */
    border-collapse: collapse;
    font-size: 13px !important; /* Уменьшили размер шрифта */
}

.sssr-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.sssr-table th {
    padding: 12px 10px !important; /* Уменьшили паддинги */
    text-align: left;
    color: #2c3e50;
    font-weight: 600;
    font-size: 12px !important; /* Уменьшили размер шрифта заголовков */
    border-bottom: 2px solid #e9ecef;
    vertical-align: middle;
    white-space: nowrap;
}

.sssr-table td {
    padding: 10px !important; /* Уменьшили паддинги */
    border-bottom: 1px solid #f1f3f4;
    vertical-align: top;
    line-height: 1.4 !important; /* Уменьшили межстрочный интервал */
}

.sssr-table tbody tr {
    transition: background-color 0.2s;
}

.sssr-table tbody tr:hover {
    background: #f8f9fa;
}

/* Увеличиваем ширину столбцов для более широкой таблицы */
.col-number { 
    width: 12% !important; 
    min-width: 150px;
}
.col-date { 
    width: 8% !important; 
    min-width: 90px;
}
.col-name { 
    width: 50% !important; /* Увеличили ширину столбца с названием */
}
.col-group { 
    width: 15% !important;
}
.col-mpi { 
    width: 15% !important;
}

/* Номер СИ в одну строку */
.sssr-number {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #2c3e50;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    font-size: 12px;
    border: 1px solid #e9ecef;
    white-space: nowrap !important; /* Важно: запрещаем перенос */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100%;
}

/* Убираем отметку НСУТ */
.sssr-nsut {
    display: none !important; /* Полностью скрываем */
}

.sssr-name {
    font-size: 13px !important; /* Уменьшили размер шрифта */
    line-height: 1.4 !important;
}

.sssr-group {
    font-size: 12px !important;
    color: #5a6c7d;
}

.sssr-mpi {
    font-size: 12px !important;
    color: #6c757d;
    font-style: italic;
}

.sssr-date {
    font-family: 'Courier New', monospace;
    font-size: 12px !important;
    color: #666;
    white-space: nowrap;
}

/* Статистика - делаем компактнее */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px !important; /* Уменьшили промежутки */
    margin-bottom: 20px !important; /* Уменьшили отступ снизу */
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 15px !important; /* Уменьшили паддинги */
    box-shadow: 0 3px 10px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.stat-card .stat-number {
    font-size: 1.6rem !important; /* Уменьшили */
    font-weight: 700;
    color: #3498db;
    margin: 0 0 8px 0 !important;
}

.stat-card .stat-label {
    font-size: 0.85rem !important; /* Уменьшили */
    color: #6c757d;
    margin: 0;
}

/* Форма поиска - делаем компактнее */
.search-section {
    background: #f8f9fa;
    padding: 20px !important; /* Уменьшили паддинги */
    border-radius: 8px;
    margin-bottom: 20px !important; /* Уменьшили отступ */
    border: 1px solid #e9ecef;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px !important; /* Уменьшили промежутки */
    align-items: end;
}

.form-label {
    display: block;
    margin-bottom: 6px !important; /* Уменьшили */
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.85rem !important; /* Уменьшили */
}

.form-control {
    width: 100%;
    padding: 10px 12px !important; /* Уменьшили паддинги */
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s;
    background: white;
}

.form-select {
    width: 100%;
    padding: 10px 12px !important; /* Уменьшили паддинги */
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
}

.search-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px !important; /* Уменьшили паддинги */
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px !important; /* Уменьшили высоту */
}

.reset-btn {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #ddd;
    padding: 10px 20px !important; /* Уменьшили паддинги */
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px !important; /* Уменьшили высоту */
    text-decoration: none;
}

/* Заголовок результатов */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px !important; /* Уменьшили отступ */
    padding-bottom: 12px !important; /* Уменьшили паддинг */
    border-bottom: 1px solid #f0f2f5;
}

.results-count {
    font-size: 1rem !important; /* Уменьшили */
    color: #2c3e50;
    font-weight: 500;
}

/* Пагинация - делаем компактнее */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px !important; /* Уменьшили отступ сверху */
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px !important; /* Уменьшили размер кнопок */
    height: 36px !important;
    border-radius: 6px;
    background: white;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #e9ecef;
    transition: all 0.2s;
    font-size: 0.9rem;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .search-form {
        grid-template-columns: 1fr 1fr;
    }
    
    .sssr-table {
        min-width: 1000px !important;
    }
}

@media (max-width: 768px) {
    .main-content-wrapper {
        padding: 0 15px 15px !important;
        margin-top: 40px !important;
    }
    
    .content-header {
        padding: 20px 25px 12px !important;
    }
    
    .content-body {
        padding: 0 25px 20px !important;
    }
    
    .page-title {
        font-size: 1.5rem !important;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .search-section {
        padding: 15px !important;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px !important;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .page-link {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.85rem;
    }
    
    .sssr-table th,
    .sssr-table td {
        padding: 8px !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Дополнительные компактные стили */
.highlight {
    background: #fff3cd;
    padding: 0 1px;
    border-radius: 2px;
}

.empty-results {
    text-align: center;
    padding: 40px 20px !important; /* Уменьшили паддинги */
}

.empty-results i {
    font-size: 3rem !important; /* Уменьшили */
    color: #ddd;
    margin-bottom: 15px;
}

.empty-results h3 {
    color: #999;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.empty-results p {
    color: #777;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

/* Добавьте в конец файла styles.css */

/* Стили для копирования номеров */
.sssr-number {
    cursor: pointer;
    position: relative;
    display: inline-block;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #2c3e50;
}

.sssr-number:hover {
    background: #e3f2fd;
    border-color: #bbdefb;
    color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sssr-number:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sssr-number:after {
    content: '📋';
    font-size: 0.8rem;
    margin-left: 5px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.sssr-number:hover:after {
    opacity: 1;
}

.copy-hint {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 100;
    pointer-events: none;
}

.copy-hint:after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}

.sssr-number:hover .copy-hint {
    display: block;
}

/* Уведомление о копировании */
.copy-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 14px 22px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    transform: translateX(150%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 300px;
}

.copy-notification.show {
    transform: translateX(0);
}

.copy-notification i {
    font-size: 1.3rem;
}

.copy-notification.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .sssr-number {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .copy-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        transform: translateY(-150%);
    }
    
    .copy-notification.show {
        transform: translateY(0);
    }
}