/* users-admin.css */

.users-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.users-title h1 {
    margin: 0;
    font-size: 31px;
    color: #092a52;
    font-weight: 800;
}

.users-title p {
    margin: 8px 0 0;
    color: #6e7a90;
    font-size: 14px;
    line-height: 1.8;
}

.users-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.users-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 17px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(20, 40, 70, .05);
}

.stat-label {
    display: block;
    color: #7a869b;
    font-size: 12px;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    color: #092a52;
    font-size: 27px;
    font-weight: 800;
}

.users-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px 180px;
    gap: 12px;
    align-items: center;
}

.users-search,
.users-filter {
    width: 100%;
    height: 46px;
    border: 1px solid #dfe5ee;
    border-radius: 12px;
    background: #fff;
    padding: 0 13px;
    color: #23324a;
    outline: none;
}

.users-search:focus,
.users-filter:focus {
    border-color: #8da6c5;
    box-shadow: 0 0 0 4px rgba(9, 42, 82, .06);
}

.users-table-panel {
    background: #fff;
    border: 1px solid #dfe5ee;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 26px rgba(20, 40, 70, .05);
}

.users-table-wrap {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1050px;
}

.users-table thead th {
    background: #f7f9fc;
    color: #56637a;
    font-size: 12px;
    font-weight: 800;
    padding: 14px 16px;
    border-bottom: 1px solid #e8edf4;
    text-align: right;
    white-space: nowrap;
}

.users-table tbody td {
    padding: 15px 16px;
    border-bottom: 1px solid #edf1f6;
    vertical-align: middle;
    color: #26344d;
    font-size: 13px;
}

.users-table tbody tr {
    transition: .18s ease;
}

.users-table tbody tr:hover {
    background: #fafcff;
}

.users-table tbody tr:last-child td {
    border-bottom: 0;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: linear-gradient(145deg, #092a52, #7f1623);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 16px;
    font-weight: 800;
}

.user-meta strong {
    display: block;
    color: #092a52;
    font-size: 14px;
}

.user-meta .status-badge {
    margin-top: 5px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.status-badge.enabled {
    background: #eaf8ef;
    color: #15733a;
}

.status-badge.disabled {
    background: #fff0f2;
    color: #8d1e2b;
}

.status-badge.admin {
    background: #edf3ff;
    color: #244d8c;
}

.user-actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 11px;
    border-radius: 9px;
    border: 1px solid #dfe5ee;
    background: #fff;
    color: #092a52;
    font-size: 12px;
    font-weight: 700;
    transition: .18s ease;
}

.action-btn:hover {
    border-color: #9eb1ca;
    background: #f7faff;
}

.action-btn.password {
    color: #7f1623;
}

.users-empty {
    padding: 50px 20px;
    text-align: center;
    color: #738097;
}

.users-empty strong {
    display: block;
    color: #092a52;
    font-size: 18px;
    margin-bottom: 8px;
}

.users-empty-hidden {
    display: none;
}

@media (max-width: 1100px) {
    .users-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .users-toolbar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .users-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .users-toolbar {
        grid-template-columns: 1fr;
    }

    .users-title h1 {
        font-size: 25px;
    }

    .users-header {
        align-items: flex-start;
    }

    .users-header-actions {
        width: 100%;
    }

    .users-header-actions .btnx {
        flex: 1;
    }
}

@media (max-width: 430px) {
    .users-stats {
        grid-template-columns: 1fr;
    }
}
