.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-controls > * {
    height: 38px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.refresh-btn {
    background: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
}

.refresh-btn:hover {
    background: #45a049;
}

.admin-btn {
    background-color: #4a5568;
    color: white;
    text-decoration: none;
}

.admin-btn:hover {
    background-color: #2d3748;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.export-btn {
    background-color: #48bb78;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
}

.export-btn:hover {
    background-color: #38a169;
}

.export-btn::before {
    content: "⬇";
    font-size: 1.1em;
}

th[data-sort] {
    cursor: pointer;
    user-select: none;
}

th[data-sort]:hover {
    background-color: #f3f4f6;
}

.sort-arrow {
    display: inline-block;
    margin-left: 5px;
    font-size: 0.8em;
}

.history-btn {
    background: #673AB7;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(103, 58, 183, 0.2);
}

.history-btn:hover {
    background: #5e35b1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(103, 58, 183, 0.3);
}

.history-btn::before {
    content: "📋";
    font-size: 1.1em;
} 

/* Стили для вкладок */
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    padding: 10px 20px;
    background-color: #f1f1f1;
    border: none;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    font-weight: 500;
}

.tab-button:hover {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: #4CAF50;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Стили для таблицы на всю ширину с горизонтальной прокруткой */
.full-width {
    width: 100%;
    overflow-x: auto;
}

/* Стили для таблицы Stage ID2 */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 15px;
    -webkit-overflow-scrolling: touch;
}

#stageTable {
    width: auto;
    min-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

/* Фиксированная ширина для каждого столбца */
#stageTable th:nth-child(1), /* Название */
#stageTable td:nth-child(1) {
    width: 25%;
    max-width: 200px;
}

#stageTable th:nth-child(2), /* Время начала */
#stageTable td:nth-child(2) {
    width: 25%;
    max-width: 200px;
}

#stageTable th:nth-child(3), /* Время окончания */
#stageTable td:nth-child(3) {
    width: 25%;
    max-width: 200px;
}

#stageTable th:nth-child(4), /* ID метки */
#stageTable td:nth-child(4) {
    width: 25%;
    max-width: 100px;
}

#stageTable th, 
#stageTable td {
    padding: 8px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #ddd;
}

/* Стили для экспорта */
.export-btn {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.export-btn:hover {
    background-color: #0b7dda;
}

/* Стили для таблиц */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    /* Убираем table-layout: fixed для лучшего отображения */
}

table th {
    background-color: #f2f2f2;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* Минимальная ширина для колонок */
    min-width: 100px;
}

table th:hover {
    background-color: #e0e0e0;
}

table td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    /* Минимальная ширина для ячеек */
    /* min-width: 120px; */
}

table tr:hover {
    background-color: #f5f5f5;
}

/* Стили для стрелок сортировки */
.sort-arrow {
    margin-left: 5px;
    font-size: 0.8em;
}

/* Стили для фильтров */
.filter-row {
    margin: 10px 0;
}

.filter-row input {
    padding: 8px;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
} 

/* Стили для адаптивной таблицы с прокруткой */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 0;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
    -webkit-overflow-scrolling: touch;
}

.stage-table-wrapper {
    position: relative;
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Стили для скроллбара в WebKit браузерах */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #555;
} 