﻿/* ===========================================================================
   User module: Index / Create / EditProfile / ResetPassword / ViewPermissions
   Depends on shared tokens + components in echoquote.css
   (:root vars, .bar, .card, .ch, .filt, table, th.sortable, .btn*, .fg, .f,
    .err, .acts, .split, .stack, .pgn, .empty, .chklist, .chkrow, .lad)
   =========================================================================== */

/* ---------- list toolbar (Index + ViewPermissions) ---------- */
.us-toolbar {
    justify-content: space-between;
    align-items: center
}

.us-length {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--mut)
}

.us-search {
    width: 240px
}

/* ---------- list tables ---------- */
.us-table-wrap {
    overflow-x: auto
}

.us-table {
    min-width: 520px
}

.us-col-name {
    width: 32%
}

.us-muted {
    color: var(--mut)
}

.us-actions {
    white-space: nowrap
}

    .us-actions .btn + .btn {
        margin-left: 6px
    }

.us-page-label {
    margin: 0 8px
}

/* permission names (System Permissions page) */
.us-perm-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: 0
}

/* ---------- create / edit profile / reset password: form ---------- */
.us-summary {
    display: none;
    margin-bottom: 14px;
    padding: 12px 15px;
    background: var(--red-soft);
    border-left: 3px solid var(--red);
    border-radius: var(--rs);
    color: var(--red);
    font-size: 13px;
    font-weight: 500
}

    .us-summary.validation-summary-errors {
        display: block
    }

    .us-summary ul {
        margin: 0;
        padding-left: 18px
    }

.us-form .err {
    display: block
}

.us-form .input-validation-error {
    border-color: var(--red)
}

    .us-form .input-validation-error:focus {
        box-shadow: 0 0 0 3px rgba(196, 69, 61, .12)
    }

/* single-column details card (Reset password) */
.us-form .fg.us-fg-single {
    grid-template-columns: 1fr
}

/* ---------- user groups checklist card ---------- */
.us-groups {
    padding: 14px 18px
}

    .us-groups .err {
        margin-top: 6px
    }

/* ---------- About card ---------- */
.us-about {
    padding: 4px 18px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--mut)
}

/* ---------- row action icons (Edit profile / Reset password) ---------- */
.us-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 4px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--rs);
    background: #fff;
    color: var(--mut);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s
}

    .us-ico:hover {
        color: var(--ink);
        border-color: #CFCFDE;
        background: #FCFCFE
    }

    .us-ico svg {
        width: 15px;
        height: 15px
    }

    /* reset password: amber, matching the old button */
    .us-ico.amber {
        color: var(--amber-ink);
        border-color: #F3DBAE
    }

        .us-ico.amber:hover {
            background: var(--amber-soft);
            border-color: var(--amber);
            color: var(--amber-ink)
        }

.us-ico.is-edit {
    color: #2F80D1;
    border-color: #BFDAF3
}

    .us-ico.is-edit:hover {
        background: #EAF3FC;
        border-color: #2F80D1;
        color: #1F6BB8
    }

/* ---------- responsive ---------- */
@media(max-width:860px) {
    .us-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px
    }

    .us-search {
        width: 100%
    }

    .us-actions {
        white-space: normal
    }

        .us-actions .btn {
            margin-bottom: 4px
        }
}
