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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

.page-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px;
}

.container {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.table-container {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 0; /* Предотвращает переполнение flex контейнера */
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    overflow-x: hidden;
}

h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.filter-row {
    margin-bottom: 15px;
}

input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Обновленные стили таблиц */
table {
    width: 100%;
    border: none;
    margin-bottom: 20px;
    border-collapse: collapse;
    table-layout: fixed;
}

table thead th {
    font-weight: bold;
    text-align: left;
    border: none;
    padding: 10px 15px;
    background: #d8d8d8;
    font-size: 14px;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

table tbody td {
    text-align: left;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    padding: 10px 15px;
    font-size: 14px;
    vertical-align: top;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

table thead tr th:first-child, 
table tbody tr td:first-child {
    border-left: none;
}

table thead tr th:last-child, 
table tbody tr td:last-child {
    border-right: none;
}

table tbody tr:nth-child(even) {
    background: #f3f3f3;
}

/* Сохраняем ширину столбцов */
th:nth-child(1), td:nth-child(1) { width: 30%; }  /* Caption  */
/* th:nth-child(2), td:nth-child(2) { width: 35%; } DateTime_Last */
th:nth-child(4), td:nth-child(4) { width: 15%; } /* card_First */

/* Обновляем стили для футера таблицы */
tfoot td {
    background: #d8d8d8;
    font-size: 14px;
    padding: 10px 15px;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    position: sticky;
    bottom: 0;
}

tfoot tr td:first-child {
    border-left: none;
}

tfoot tr td:last-child {
    border-right: none;
}

#totalContainers {
    font-weight: bold;
    color: #2c5282;
}

/* Добавляем скролл для таблиц */
.table-container {
    max-height: calc(100vh - 150px); /* Высота с учетом отступов */
    overflow-y: auto;
}

/* Стили для скроллбара */
.table-container::-webkit-scrollbar {
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

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

/* Добавляем стили для шапки */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 0;
}

.admin-btn {
    display: inline-block;
    padding: 8px 16px;
    background-color: #4299e1;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.admin-btn:hover {
    background-color: #3182ce;
}

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

.refresh-btn {
    padding: 8px 16px;
    background-color: #48bb78;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.last-update {
    color: #666;
    font-size: 14px;
}

@media (max-width: 1200px) {
    .container {
        flex-direction: column;
    }
    
    .table-container {
        margin-bottom: 20px;
        max-height: 500px; /* Фиксированная высота на мобильных */
    }
} 