/*
    Users Shared UI
    Keep shared portal controls here so dashboard/profile/billing pages use the
    same visual language instead of page-local chip implementations.
*/

.users-page {
    color: #101828;
}

.users-page * {
    letter-spacing: 0;
}

.users-hero,
.users-panel,
.users-card,
.users-stat-card {
    background: #ffffff;
    border: 1px solid #e6eaf0;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, .06);
}

.users-hero {
    padding: 22px;
    margin-bottom: 18px;
}

.users-panel,
.users-card,
.users-stat-card {
    margin-bottom: 18px;
}

.users-panel {
    padding: 20px;
}

.users-eyebrow {
    display: block;
    color: #667085 !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.users-title {
    margin: 4px 0 0;
    color: #101828 !important;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.users-subtitle {
    margin: 8px 0 0;
    color: #667085 !important;
    font-size: 14px;
}

.users-chip-stack {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.users-panel-header,
.users-stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.users-panel-header {
    margin-bottom: 18px;
}

.users-panel-title {
    margin: 0;
    color: #101828 !important;
    font-size: 16px;
    font-weight: 800;
}

.users-panel-subtitle {
    margin: 5px 0 0;
    color: #667085 !important;
    font-size: 13px;
}

.users-stat-card {
    min-height: 122px;
    padding: 18px;
}

.users-stat-label,
.users-field-label {
    color: #667085 !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.users-stat-value {
    margin-top: 12px;
    color: #101828 !important;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
    word-break: break-word;
}

.users-stat-note,
.users-muted {
    color: #667085 !important;
    font-size: 13px;
}

.users-stat-note {
    margin-top: 8px;
}

.users-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #eef4ff;
    color: #2563eb !important;
    font-size: 18px;
    flex: 0 0 auto;
}

.users-filter {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f8fafc;
}

.users-filter label {
    color: #344054 !important;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.users-table-wrap {
    overflow-x: auto;
    margin-top: 18px;
}

.users-table {
    margin-bottom: 0;
}

.users-table thead th {
    border-top: 0;
    border-bottom: 1px solid #e6eaf0;
    color: #667085 !important;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.users-table tbody td {
    border-top: 1px solid #eef2f6;
    color: #344054 !important;
    vertical-align: middle;
}

.users-table strong {
    color: #101828 !important;
}

.users-empty {
    padding: 22px;
    border: 1px dashed #d0d5dd;
    border-radius: 8px;
    color: #667085 !important;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .users-chip-stack {
        justify-content: flex-start;
        margin-top: 14px;
    }
}

.sap-filter-chips,
.sap-selection-chips,
.sap-selection-chip-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    min-height: 34px;
    align-items: center;
    white-space: nowrap;
    min-width: 0;
}

.sap-selection-chip,
button.sap-selection-chip,
.btn.sap-selection-chip {
    appearance: none;
    position: relative;
    isolation: isolate;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.76)) !important;
    color: #334155 !important;
    border-radius: 999px !important;
    padding: 0.44rem 0.74rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    transition: all .22s ease;
    white-space: nowrap;
    flex: 0 0 auto;
    cursor: pointer;
    text-decoration: none !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 26px rgba(15, 23, 42, 0.10) !important;
}

.sap-selection-chip::before,
button.sap-selection-chip::before,
.btn.sap-selection-chip::before {
    content: '';
    position: absolute;
    inset: -9px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(191, 219, 254, 0.16));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 10px 24px rgba(15, 23, 42, 0.06);
    opacity: 0;
    transform: scale(0.955);
    transition: opacity .22s ease, transform .22s ease, box-shadow .22s ease, background .22s ease;
    pointer-events: none;
    z-index: -1;
    backdrop-filter: blur(18px) saturate(125%);
    -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.sap-selection-chip:hover,
button.sap-selection-chip:hover,
.btn.sap-selection-chip:hover,
.sap-selection-chip:focus-visible,
button.sap-selection-chip:focus-visible,
.btn.sap-selection-chip:focus-visible {
    border-color: rgba(203, 213, 225, 0.42) !important;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.48), rgba(226, 232, 240, 0.24)) !important;
    color: #0f172a !important;
    transform: translateY(-1px);
    backdrop-filter: blur(26px) saturate(145%);
    -webkit-backdrop-filter: blur(26px) saturate(145%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78), inset 0 -1px 0 rgba(148, 163, 184, 0.12), inset 0 0 20px rgba(226, 232, 240, 0.18), 0 14px 26px rgba(15, 23, 42, 0.08) !important;
}

.sap-selection-chip:hover::before,
button.sap-selection-chip:hover::before,
.btn.sap-selection-chip:hover::before,
.sap-selection-chip:focus-visible::before,
button.sap-selection-chip:focus-visible::before,
.btn.sap-selection-chip:focus-visible::before {
    opacity: 1;
    transform: scale(1);
    background: linear-gradient(180deg, rgba(241, 245, 249, 0.56), rgba(203, 213, 225, 0.30));
    border-color: rgba(203, 213, 225, 0.52);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 0 0 1px rgba(203, 213, 225, 0.34), 0 0 0 9px rgba(203, 213, 225, 0.14), 0 20px 36px rgba(100, 116, 139, 0.18), 0 12px 28px rgba(15, 23, 42, 0.10);
}

.sap-selection-chip.is-active,
button.sap-selection-chip.is-active,
.btn.sap-selection-chip.is-active {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.94), rgba(29, 78, 216, 0.84)) !important;
    border-color: rgba(96, 165, 250, 0.64) !important;
    color: #eff6ff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 16px 32px rgba(37, 99, 235, 0.28) !important;
}

.sap-selection-chip.is-active::before,
button.sap-selection-chip.is-active::before,
.btn.sap-selection-chip.is-active::before {
    opacity: 0;
    transform: scale(0.955);
}

.sap-selection-chip.is-active:hover,
button.sap-selection-chip.is-active:hover,
.btn.sap-selection-chip.is-active:hover,
.sap-selection-chip.is-active:focus-visible,
button.sap-selection-chip.is-active:focus-visible,
.btn.sap-selection-chip.is-active:focus-visible {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.94), rgba(29, 78, 216, 0.84)) !important;
    border-color: rgba(96, 165, 250, 0.64) !important;
    color: #eff6ff !important;
    transform: translateY(-1px);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 0 0 1px rgba(226, 232, 240, 0.52), 0 0 0 4px rgba(255, 255, 255, 0.10), 0 0 0 10px rgba(203, 213, 225, 0.22), 0 22px 40px rgba(100, 116, 139, 0.22), 0 12px 28px rgba(15, 23, 42, 0.11) !important;
}

.sap-selection-chip.is-active:hover::before,
button.sap-selection-chip.is-active:hover::before,
.btn.sap-selection-chip.is-active:hover::before,
.sap-selection-chip.is-active:focus-visible::before,
button.sap-selection-chip.is-active:focus-visible::before,
.btn.sap-selection-chip.is-active:focus-visible::before {
    opacity: 0;
    transform: scale(0.955);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.sap-selection-chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    color: inherit;
    font-size: 10px;
    margin-left: 4px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.sap-selection-chip.is-active .sap-selection-chip-count {
    background: rgba(255, 255, 255, 0.22);
}

.sap-chip,
a.sap-chip,
button.sap-chip,
.btn.sap-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.74rem;
    border-radius: 999px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(241, 245, 249, 0.76)) !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    color: #334155 !important;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 12px 26px rgba(15, 23, 42, 0.10) !important;
}

a.sap-chip:hover,
button.sap-chip:hover,
.btn.sap-chip:hover {
    color: #0f172a !important;
    transform: translateY(-1px);
}

.sap-chip.is-success,
.sap-selection-chip.is-success {
    background: linear-gradient(180deg, rgba(236, 253, 245, 0.96), rgba(209, 250, 229, 0.80)) !important;
    border-color: rgba(16, 185, 129, 0.36) !important;
    color: #047857 !important;
}

.sap-chip.is-info,
.sap-selection-chip.is-info {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.96), rgba(219, 234, 254, 0.80)) !important;
    border-color: rgba(59, 130, 246, 0.32) !important;
    color: #1d4ed8 !important;
}

.sap-chip.is-warning,
.sap-selection-chip.is-warning {
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.96), rgba(254, 243, 199, 0.84)) !important;
    border-color: rgba(245, 158, 11, 0.34) !important;
    color: #92400e !important;
}

.sap-chip.is-danger,
.sap-selection-chip.is-danger {
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.96), rgba(254, 226, 226, 0.82)) !important;
    border-color: rgba(239, 68, 68, 0.34) !important;
    color: #b91c1c !important;
}

.sap-chip.is-dark,
.sap-selection-chip.is-dark {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.90)) !important;
    border-color: rgba(15, 23, 42, 0.40) !important;
    color: #f8fafc !important;
}

body.authentication-bg-pattern {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.24), transparent 34%),
        linear-gradient(135deg, #f8fafc 0%, #eef4ff 42%, #f8fafc 100%) !important;
}

body.authentication-bg-pattern .account-pages {
    margin-top: 28px !important;
    margin-bottom: 28px !important;
}

body.authentication-bg-pattern .footer-alt {
    color: #667085 !important;
}

.users-auth-card,
body.authentication-bg-pattern .card.bg-pattern,
body.authentication-bg-pattern .card:not(.users-skip-auth-card) {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94) !important;
    background-image: none !important;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

body.authentication-bg-pattern .card-body {
    padding: 28px !important;
}

.users-auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

body.authentication-bg-pattern .text-center.w-80.m-auto {
    width: 100% !important;
    margin-bottom: 14px !important;
}

body.authentication-bg-pattern .text-center.w-80.m-auto img {
    width: 154px;
    height: auto;
}

body.authentication-bg-pattern .svgContainer {
    width: 178px;
    height: 178px;
    margin: 10px auto 18px;
    border: 1px solid rgba(58, 94, 119, 0.18);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

body.authentication-bg-pattern .custom_form label,
.users-auth-form label {
    color: #344054 !important;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

body.authentication-bg-pattern .custom_form .form-control,
.users-auth-form .form-control {
    min-height: 44px;
    border-color: #d0d5dd;
    border-radius: 8px;
    color: #101828;
    box-shadow: none;
}

body.authentication-bg-pattern .custom_form .form-control:focus,
.users-auth-form .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

body.authentication-bg-pattern .btn-primary,
.users-auth-submit {
    min-height: 42px;
    border: 1px solid #2563eb !important;
    border-radius: 8px !important;
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.users-auth-page {
    color: #101828;
}

.users-auth-shell {
    width: min(100%, 520px);
    margin: 0 auto;
}

.users-auth-panel {
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.users-auth-heading {
    text-align: center;
    margin-bottom: 22px;
}

.users-auth-heading img {
    width: 154px;
    height: auto;
    margin-bottom: 16px;
}

.users-auth-eyebrow {
    display: block;
    color: #667085 !important;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.users-auth-title {
    margin: 4px 0 0;
    color: #101828 !important;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.users-auth-subtitle {
    margin: 8px 0 0;
    color: #667085 !important;
    font-size: 14px;
}

.users-auth-alert {
    padding: 13px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 700;
}

.users-auth-alert.is-danger {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c !important;
}

.users-auth-alert.is-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534 !important;
}

.users-auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.users-auth-link,
body.authentication-bg-pattern .text-white-50,
body.authentication-bg-pattern .text-white {
    color: #1d4ed8 !important;
    font-weight: 700;
}

.users-auth-error-list {
    margin: 0 0 16px;
    padding-left: 18px;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 575.98px) {
    body.authentication-bg-pattern .account-pages {
        margin-top: 14px !important;
        margin-bottom: 14px !important;
    }

    body.authentication-bg-pattern .card-body,
    .users-auth-panel {
        padding: 22px !important;
    }

    body.authentication-bg-pattern .svgContainer {
        width: 150px;
        height: 150px;
    }
}
