/* Modern table and quick-filter layer. Loaded after the dashboard theme. */

:root {
    --stajsis-font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body,
button,
input,
select,
textarea,
.menu-link,
.form-control,
.form-select,
.btn,
.card,
.table {
    font-family: var(--stajsis-font-family) !important;
}

.status-quick-filters {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin: -0.25rem 0 1.5rem;
    padding: 0.95rem 1.25rem;
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(67, 89, 113, 0.05);
}

.status-quick-title {
    flex: 0 0 auto;
    color: #697a8d;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.status-quick-buttons {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1 1 420px;
    flex-wrap: wrap;
}

.status-quick-button {
    min-height: 42px;
    padding: 0.62rem 1.1rem;
    background: #fff;
    color: #2f3a47;
    border-color: #d9dee3;
    box-shadow: 0 1px 2px rgba(67, 89, 113, 0.04);
}

.status-quick-button:hover,
.status-quick-button:focus {
    background: #f7faf8;
    border-color: #c8e6c9;
    color: #1f5127;
}

.status-quick-button.active {
    background: #e8f5e9;
    border-color: #58d68d;
    color: #1f5127;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.12);
}

.users-management-toolbar {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1.25rem;
}

.users-management-toolbar .status-quick-filters {
    margin: 0;
}

.users-search-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.users-search-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
}

.users-search-group .form-control,
.users-search-group .btn-unified {
    min-height: 42px;
}

.users-search-group .btn-unified {
    flex: 0 0 auto;
    padding-left: 1.45rem;
    padding-right: 1.45rem;
}

.card .table tr:not(:first-child):hover > td,
.card .table tbody tr:hover > * {
    background-color: #f7fbf8 !important;
}

.table-modern {
    overflow: hidden;
    border-collapse: separate !important;
    border-spacing: 0;
    color: #384551;
}

.table-modern thead th {
    background: #f6f8fa !important;
    color: #566a7f;
    border-bottom: 1px solid #e9edf2;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    vertical-align: middle;
}

.table-modern tbody td {
    border-bottom: 1px solid #edf1f5;
    color: #384551;
    vertical-align: middle;
}

.table-modern tbody tr {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.table-modern tbody tr:hover > td {
    background-color: #f3fbf5 !important;
}

.table-modern tbody tr.row-selected > td {
    background-color: #edf8ef !important;
}

.table-modern tbody tr.row-selected:hover > td {
    background-color: #e4f4e7 !important;
}

.table-modern .selection-checkbox {
    width: 1.15rem;
    height: 1.15rem;
    cursor: pointer;
    accent-color: #2e7d32;
}

.select-acd-table-scroll {
    max-height: 62vh;
    overflow: auto;
    border: 1px solid #e9edf2;
    border-radius: 8px;
}

.select-acd-table-scroll .select-acd-table {
    min-width: 620px;
    margin-bottom: 0;
}

.select-acd-table-scroll .select-acd-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.select-acd-table .select-acd-name-header .table-sort-button {
    justify-content: flex-start;
    text-align: left;
}

.select-acd-table .select-acd-name-cell {
    text-align: left;
}

.select-acd-table .select-acd-name-content {
    justify-content: flex-start;
}

.table-modern .badge,
.table-modern .badge p,
.table-modern p.badge {
    margin: 0;
}

.table-sort-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
}

.table-sort-button:hover,
.table-sort-button:focus {
    color: #2e7d32;
    outline: none;
}

.table-sort-button .sort-icon {
    color: #a1acb8;
    font-size: 1rem;
    line-height: 1;
}

.table-sort-button.active {
    color: #2e7d32;
}

.table-sort-button.active .sort-icon {
    color: #2e7d32;
}

@media (max-width: 768px) {
    .status-quick-filters {
        align-items: stretch;
        padding: 0.9rem;
    }

    .status-quick-title {
        width: 100%;
    }

    .status-quick-buttons {
        flex: 1 1 100%;
    }

    .status-quick-button {
        flex: 1 1 160px;
    }

    .users-search-group {
        align-items: stretch;
        flex-direction: column;
    }

    .users-search-group .btn-unified {
        width: 100%;
    }
}
