.sfwa-table-container {
    overflow: auto;
    position: relative;
    width: 100%;
    max-width: 100%;
    max-height: 70vh;
    border: 1px solid #ddd;
}

.sfwa-table-container button {
    padding: 2px 5px;
    font-size: 11px;
    margin: 0 2px;
}

.sfwa-data-table {
    table-layout: fixed;
    width: 100%;
    min-width: 800px;
    border-collapse: separate;
    border-spacing: 0;
}

.sfwa-data-table th, .sfwa-data-table td {
    width: 150px;
    min-width: 150px;
    box-sizing: border-box;
}

.sfwa-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
    padding: 10px;
}

.sfwa-data-table td:first-child,
.sfwa-data-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 11;
    background: #fff;
    border-right: 2px solid #ddd;
    width: 120px;
}

.sfwa-data-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: top;
}

.sfwa-data-table tr.is-editing td,
.sfwa-data-table td:has(input:focus) {
    white-space: normal;
    height: auto;
}

.sfwa-data-table td input {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    box-sizing: border-box;
    display: none;
}

.sfwa-sticky-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 10;
    width: 100px;
    white-space: nowrap;
}

.sfwa-toolbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px;
    background: #f9f9f9;
    border-bottom: 2px solid #ddd;
    display: flex;
    gap: 10px;
    align-items: center;
}

.sfwa-row-template {
    display: none !important;
}

.sfwa-data-table tbody tr:hover {
    background-color: #fcfcfc;
}

td.editable select {
    width: 100%;
    height: 30px;
    padding: 2px 5px;
    font-size: 13px;
    border: 1px solid #ccd0d4;
    border-radius: 3px;
    background: #fff;
    box-sizing: border-box;
    vertical-align: middle;
}

td.editable select:focus {
    border-color: #321866;
    outline: none;
    box-shadow: 0 0 0 1px #321866;
}

th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    background-color: #ddd;
}

tr.state-blue td {
    background-color: #d1ecf1 !important;
}

tr.state-green td {
    background-color: #d4edda !important;
}