/* One dashboard for everybody: a card is shown only to people who hold the right it names.
   Controls the person may not use are not shown at all (they were greyed out before). */

.permission-action-disabled,
[data-requires][hidden] {
    display: none !important;
}

.dashboard-extras {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.dashboard-extras[hidden] {
    display: none;
}

.employee-self-session {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 12px;
}

/* the sidebar must really drop what the person may not open (author display rules beat the hidden attribute) */
.nav-item[hidden],
.nav-subitem[hidden],
.nav-parent[hidden],
.nav-group[hidden] {
    display: none !important;
}

/* people without the print right: no text selection, and the browser's print command prints only a notice */
html.content-locked body {
    -webkit-user-select: none;
    user-select: none;
}

html.content-locked :is(input, textarea, select, [contenteditable="true"]) {
    -webkit-user-select: text;
    user-select: text;
}

@media print {
    html.print-blocked body > * {
        display: none !important;
    }

    html.print-blocked body::before {
        content: "چاپ برای این حساب اجازه ندارد — از بخش مدیریت بخواهید.";
        display: block;
        padding: 40mm 10mm;
        font: 700 16pt sans-serif;
        text-align: center;
        direction: rtl;
    }
}
