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

th,
td {
    padding: 9px 8px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.data-table th,
.data-table td {
    padding: 8px 7px;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.data-table thead th {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

th {
    background: #f3f4f6;
    font-weight: 600;
}

tr:hover td {
    background: #fafafa;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

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

.table-scroll--wide,
.layout-wide .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll--wide table,
.layout-wide .table-scroll table {
    min-width: 0;
    table-layout: fixed;
}

.table-scroll--wide table.data-table--services,
.layout-wide .table-scroll table.data-table--services {
    min-width: 1680px;
}

.layout-wide .table-scroll table.data-table--applications {
    table-layout: auto;
    min-width: 1280px;
    width: max-content;
    max-width: 100%;
}

.data-table--applications th,
.data-table--applications td {
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.data-table--services th,
.data-table--services td {
    padding: 7px 6px;
    font-size: 0.8rem;
    vertical-align: top;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

.data-table th.col-select.no-sort {
    width: 2.75rem;
    min-width: 2.75rem;
    max-width: 2.75rem;
    cursor: default;
    padding: 8px 4px;
    vertical-align: middle;
    text-align: center;
    overflow: visible;
}

.data-table th.col-select.no-sort::after {
    content: none !important;
}

.data-table--services .col-domain {
    width: 13%;
}

.data-table--services .col-ip {
    width: 9%;
}

.data-table--services .col-type {
    width: 9%;
    white-space: normal;
    line-height: 1.3;
}

.data-table--services .col-cf {
    width: 6%;
    min-width: 4.5rem;
    white-space: nowrap;
}

.data-table--services .col-type .record-type {
    display: inline-block;
    max-width: 100%;
}

.data-table--services .col-dept {
    width: 10%;
    line-height: 1.3;
}

.data-table--services .col-host,
.data-table--services .col-container {
    width: 7%;
}

.data-table--services .col-webapp {
    width: 11%;
    min-width: 7rem;
    white-space: normal;
    line-height: 1.3;
    overflow: visible;
}

.data-table--services .col-whois {
    width: 10%;
    min-width: 6.5rem;
    white-space: normal;
    line-height: 1.3;
    overflow: visible;
}

.data-table--services .col-cert {
    width: 10%;
    min-width: 6.5rem;
    white-space: normal;
    line-height: 1.3;
    overflow: visible;
}

.data-table--services .col-git {
    width: 11%;
}

.data-table--services .col-tools {
    width: 7%;
    white-space: nowrap;
    overflow: visible;
}

.data-table--services .col-managers {
    min-width: 9rem;
    width: 11%;
}

.table-filter-actions {
    display: flex;
    justify-content: flex-end;
    margin: 0.35rem 0 0.5rem;
}

.table-filter-actions .table-clear-filters[hidden] {
    display: none;
}

.manager-link {
    color: var(--zhp-green-dark);
    text-decoration: none;
}

.manager-link:hover {
    text-decoration: underline;
}

.data-table--services .col-source {
    width: 8%;
    min-width: 5rem;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.data-table--services .git-author {
    line-height: 1.35;
}

.data-table--services .git-author .text-muted {
    font-size: 0.78rem;
}

@media (max-width: 900px) {
    .table-scroll--wide table,
    .layout-wide .table-scroll table {
        table-layout: auto;
        min-width: 960px;
    }

    .table-scroll--wide table.data-table--services,
    .layout-wide .table-scroll table.data-table--services {
        min-width: 1180px;
    }
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.select-all-label input,
.rowCheckbox {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.rowCheckbox {
    accent-color: #16a34a;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.toolbar-right {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.toolbar input,
.toolbar select {
    min-width: 180px;
    margin: 0;
}

.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 0;
}

.table-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.table-pagination[hidden] {
    display: none !important;
}

.pagination-size-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4b5563;
}

.pagination-size {
    min-width: 5.5rem;
    margin: 0;
    padding: 6px 8px;
    font-size: 13px;
}

.pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination-info,
.search-meta {
    color: #6b7280;
    font-size: 13px;
}

.pagination button {
    padding: 8px 12px;
}

.search-meta {
    margin-top: 8px;
    font-size: 12px;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

th.sortable:hover {
    background: #e5e7eb;
}

th.sortable::after {
    content: " ⇅";
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 400;
}

th.sort-asc::after {
    content: " ↑";
    color: #16a34a;
}

th.sort-desc::after {
    content: " ↓";
    color: #16a34a;
}

.table-filter-row {
    background: #f4f8ec;
}

.table-filter-cell {
    padding: 0.35rem 0.45rem !important;
    vertical-align: middle;
}

.table-filter-select,
.table-filter-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0.25rem 0.35rem;
    font-size: 0.75rem;
    border: 1px solid #cfe3a1;
    border-radius: 4px;
    background: #fff;
    color: var(--text-main, #1f2933);
}

.table-filter-input {
    box-sizing: border-box;
}

tr.table-filter-empty td {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
}

.sync-error {
    color: #b42318;
    font-size: 0.85rem;
}

.data-table .sync-error {
    color: #b42318;
    font-size: 0.85rem;
}

.url-cell {
    max-width: 420px;
}

.url-cell span {
    display: inline-block;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
