table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0; /* Remove padding from th */
    border: 1px solid #ccc;
    text-align: left;
    vertical-align: middle;
}

td {
    padding: 6px 10px; /* Keep padding on td */
}

th {
    position: relative;
}

th a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
    transition: background-color 0.2s ease;
    padding: 6px 10px; /* Move padding to the link */
    box-sizing: border-box;
}

th a:hover {
    background-color: #f2f2f2;
    text-decoration: none;
    cursor: pointer;
}

/* Arrow indicators for sorted columns */
th.sorted-asc a::after,
th.sorted-desc a::after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
}

th.sorted-asc a::after {
    content: "▲";
    font-size: 0.7em;
}

th.sorted-desc a::after {
    content: "▼";
    font-size: 0.7em;
}

.right-align {
    text-align: right;
}

.search-container {
    margin: 20px 0;
}

.search-container form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-container input[type="text"] {
    padding: 0 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
    max-width: 400px;
    height: 38px;
    box-sizing: border-box;
    line-height: 38px;
}

.search-container button {
    padding: 0 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    height: 38px;
    box-sizing: border-box;
    line-height: 1;
    margin: 0;
}

.search-container button:hover {
    background-color: #0056b3;
}

.search-container .clear-search {
    padding: 0 16px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    height: 38px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.search-container .clear-search:hover {
    background-color: #545b62;
}