.table-header {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;

    .search-section {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .bulk-actions-section {
        display: flex;
        align-items: center;
        gap: 12px;
    }
}

.sessions-table-wrapper {
    flex: 1 1 auto;
    overflow: hidden;
    border: 1px solid var(--color-divider-regular);
    background: var(--color-nodes-actionbar-bg);
    min-height: 300px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    table-layout: fixed;

    th,
    td {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid var(--color-divider-subtle);
    }

    th:nth-child(1),
    td:nth-child(1) {
        width: 40px;
        min-width: 40px;
    }

    th:nth-child(2),
    td:nth-child(2) {
        width: 70px;
        min-width: 70px;
    }

    th:nth-child(3),
    td:nth-child(3) {
        width: 100px;
        min-width: 100px;
    }

    th:nth-child(4),
    td:nth-child(4) {
        width: 150px;
        min-width: 150px;
    }

    th:nth-child(5),
    td:nth-child(5) {
        width: 150px;
        min-width: 150px;
    }

    th:nth-child(6),
    td:nth-child(6) {
        min-width: 180px;
        width: 180px;
    }

    th:nth-child(7),
    td:nth-child(7) {
        min-width: 60px;
        width: 60px;
        text-align: center;
        padding: 12px 8px;
    }

    td[colspan="7"] {
        border-bottom: none;
    }

    thead {
        display: table-header-group;
    }

    tbody {
        display: table-row-group;
        max-height: 400px;
        overflow-y: auto;
        &::-webkit-scrollbar {
            width: 8px;
        }
        &::-webkit-scrollbar-track {
            background: var(--color-divider-subtle);
            border-radius: 4px;
        }
        &::-webkit-scrollbar-thumb {
            background: var(--color-divider-regular);
            border-radius: 4px;
            &:hover {
                background: var(--color-divider-strong);
            }
        }
    }

    thead tr,
    tbody tr {
        display: table-row;
    }

    td[colspan="7"] {
        padding: 40px;
        vertical-align: middle;
    }

    th {
        background-color: var(--color-sidenav-background);
        color: var(--color-text-primary);
        font-weight: 600;
    }

    td {
        color: var(--color-text-secondary);
    }
    .actions-container {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 160px;
        flex-shrink: 0;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
}

.view-btn,
.delete-btn {
    border: none;
    outline: none;
    padding: 6px 14px;
    margin-right: 8px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 70px;
    max-width: 80px;
}

.view-btn {
    background: var(--accent-color);
    color: #fff;
}
.view-btn:hover {
    background: var(--accent-color-hover);
}

.delete-btn {
    background: #e0575b !important;
    color: #fff !important;
    border: none;
    outline: none;
    padding: 6px 14px;
    margin-right: 8px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}
.delete-btn:hover {
    background: #b32b36 !important;
    color: #fff !important;
}

.session-search-input {
    padding: 6px 12px;
    border: 1px solid var(--color-divider-regular, #ccc);
    border-radius: 6px;
    font-size: 1em;
    outline: none;
    transition: border 0.18s;
    min-width: 220px;
    max-width: 320px;
    background: var(--color-background-body, #fff);
    color: var(--color-text-primary, #222);
}
.session-search-input:focus {
    border-color: var(--accent-color);
}

.stop-icon-btn {
    background: transparent;
    border: none;
    padding: 0px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    margin: 0 auto;
}
.stop-icon-btn svg {
    display: block;
}
.stop-icon-btn:hover rect {
    fill: #d94c4a;
}

.stop-btn {
    background: #e0575b;
    color: #fff;
    border: none;
    outline: none;
    padding: 6px 14px;
    margin-right: 8px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 70px;
    max-width: 80px;
}
.stop-btn:hover {
    background: #b32b36;
    color: #fff;
}

.no-sessions-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    height: 100%;
    min-height: 180px;

    p {
        margin: 0 0 8px 0;
        font-size: 1.1em;
        color: var(--color-text-primary);
    }

    small {
        color: var(--color-text-secondary);
        font-size: 0.9em;
    }
}
