.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 40px 0 40px;
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    transition: border-color .15s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--blue-500);
}

.search-clear {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: var(--text-muted);
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.search-clear:hover {
    background-color: var(--bg);
    color: var(--text);
}

.search-submit {
    width: auto;
    padding: 0 24px;
    white-space: nowrap;
}


.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.active-filters-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 14px;
    background-color: rgba(47, 123, 240, .12);
    color: var(--blue-600);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.filter-chip a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: var(--blue-600);
    text-decoration: none;
    font-size: 11px;
    transition: background-color .15s ease;
}

.filter-chip a:hover {
    background-color: rgba(47, 123, 240, .25);
}

.filter-clear-all {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
}

.filter-clear-all:hover {
    color: var(--red);
    text-decoration: underline;
}

.table-wrapper {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--text-message);
    background-color: var(--blue-700);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 16px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background-color: var(--bg);
}

.table-action-btn {
    width: auto;
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    gap: 6px;
}

.table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.data-table thead th.col-actions {
    text-align: right;
}

.empty-state {
    text-align: center;
    padding: 32px 16px !important;
    color: var(--text-muted);
    font-style: italic;
}


.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-type {
    background-color: rgba(47, 123, 240, .12);
    color: var(--blue-600);
}

.badge-link {
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease;
}

.badge-link:hover {
    background-color: rgba(47, 123, 240, .22);
}

.badge-status-blue {
    background-color: rgba(37, 99, 235, .12);
    color: var(--blue-600);
}

.badge-status-purple {
    background-color: rgba(124, 58, 237, .15);
    color: var(--purple);
}

.badge-status-cyan {
    background-color: rgba(8, 145, 178, .15);
    color: var(--cyan);
}

.badge-status-amber {
    background-color: rgba(217, 119, 6, .15);
    color: var(--amber-dark);
}

.badge-status-green {
    background-color: rgba(22, 163, 74, .15);
    color: var(--green);
}

.badge-status-green-dark {
    background-color: rgba(21, 128, 61, .15);
    color: var(--green-dark);
}

.badge-status-red {
    background-color: rgba(220, 38, 38, .12);
    color: var(--red);
}

.badge-status-gray {
    background-color: rgba(107, 114, 128, .12);
    color: var(--gray);
}

.table-link {
    color: var(--text);
    text-decoration: none;
    transition: color .15s ease;
}

.table-link:hover {
    color: var(--blue-600);
    text-decoration: underline;
}

.table-link:visited {
    color: var(--text);
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }

    .search-submit {
        width: 100%;
    }

    .table-wrapper {
        background: transparent;
        border: none;
        box-shadow: none;
    }

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

    .data-table thead {
        display: none;
    }

    .data-table tbody tr {
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        padding: 14px;
        margin-bottom: 16px;
    }

    .data-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 16px;
        padding: 8px 0;
        border: none;
        text-align: right;
    }

    .data-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        text-align: left;
        flex-shrink: 0;
    }

    .empty-state {
        display: block !important;
        text-align: center !important;
    }
}

.table-row-clickable {
    cursor: pointer;
}

.data-table tbody tr.table-row-clickable:hover {
    background-color: var(--hover);
}

.search-form select {
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--text);
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
    min-width: 200px;
}

.search-form select:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 3px rgba(47, 123, 240, 0.15);
}

@media (max-width: 768px) {
    .search-form select {
        width: 100%;
        min-width: 0;
    }
}