/* Стили таблиц */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    min-width: 480px;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table th {
    font-weight: bold;
    background-color: var(--table-header-bg);
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Стили кнопок */
.btn {
    font-size: 85%;
    vertical-align: middle;
}

.download-btn {
    width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Медиа-запросы для таблиц */
@media (max-width: 992px) {
    .table {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        overflow-x: visible;
        overflow-y: visible;
    }

    .table {
        width: 100%;
        min-width: unset;
        font-size: 1rem;
    }

    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
    }

    .table td {
        text-align: right;
        position: relative;
        border-top: none;
    }

    .table td::before {
        content: attr(data-label);
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }

    td[data-label="Действия"] {
        display: flex;
        justify-content: end;
        align-items: center;
    }

    td[data-label="Смены"] {
        display: flex;
        justify-content: end;
        align-items: center;
    }

    td[data-label] {
        padding-left: 25% !important;
        word-wrap: break-word;
    }
}

@media (max-width: 767px) {
    .info-table {
        display: table;
        width: 100% !important;
        border-collapse: separate;
        border-spacing: 0;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        overflow: hidden;
    }
    .info-table tbody {
        display: table-row-group;
    }
    .info-table tr {
        display: table-row;
        border: none;
        border-bottom: 1px solid #dee2e6;
    }
    .info-table td, .info-table th {
        display: table-cell;
        width: 50% !important;
        border: none;
        position: relative;
        padding: 0.75rem;
    }
    .info-table td {
        text-align: left;
    }
    .info-label {
        font-weight: bold;
        background-color: #f8f9fa;
    }
    .info-value {
        word-break: break-word;
    }
    .info-table tr:last-child {
        border-bottom: none;
    }
}