/*Base*/

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Noto+Sans+Arabic:wght@100;200;300;400;500;600;700;900&family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
    --dark-color: hsl(0 0% 15% / 100%);
    --white-color: hsl(0, 100%, 100%, 100%);
    --green-color: hsl(120 60% 50% / 100%);
    --red-color: hsl(5 60% 50% / 100%);
    --yellow-color: hsl(60 60% 50% / 100%);
    --blue-color: hsl(240 60% 50% / 100%);
    --shadow-01: 0 10px 20px 0 hsl(0 0% 0% /20%);
    --shadow-02: 0 10px 10px 0 hsl(0 0% 0% /45%);
    --shadow-03: inset 0px 3px 8px hsl(0 0% 0% / 24%);
    --shadow-04: 0px 2px 4px hsl(0 0% 0% / 40%), 0px 7px 13px -3px hsl(0 0% 0% / 30%), inset 0px -3px 0px hsl(0 0% 0% / 20%);
    --shadow-05: 0px 3px 8px hsl(0 0% 0% / 24%);
    --primary-font: 'Noto Naskh Arabic';
    --secondary-font: "Lalezar";
}

/*Common*/

*,
::before,
::after {
    direction: rtl;
    box-sizing: border-box;
}

*:not(dialog) {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background: var(--dark-color);
    color: var(--white-color);
    /* scrollbar-gutter: stable both-edges; */
}

html:has(dialog[open]:modal, .nav-right.active) {
    overflow: hidden;
}

body {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    font-family: var(--primary-font);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--white-color);
}

h1,
h2,
h3,
h4 {
    font-family: var(--secondary-font);
    font-weight: 400;
    line-height: normal;
}

button,
a,
i {
    cursor: none;
}

/*Common*/
.main {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-flow: row wrap;
    margin: 5px;
    min-height: calc(100vh - 100px);
    min-height: calc(100svh - 100px);
}

.main.main-top {
    align-items: unset;
}

.section {
    box-shadow: var(--shadow-03);
    padding: 10px;
    border-radius: 10px;
    height: 100%;
    margin: 30px auto;
    width: 100%;
}

.section.section-center {
    width: clamp(400px, 500px, 100%);
}

.section.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-flow: column wrap;
    gap: 30px;
}

.section.error-page img {
    background: hsl(0 0% 100% / 20%);
}

.section.error-page h2 {
    text-align: center;
}

.section .section-header {
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    padding: 15px;
}

.section header h1 {
    text-align: center;
}

.separator-line {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-flow: row;
}

.separator-line::before,
.separator-line::after {
    content: "";
    flex: 1 1 auto;
    border-bottom: 1px solid white;
}

.title-line::before {
    margin-left: 10px;
}

.title-line::after {
    margin-right: 10px;
}

.separator-line.title-line {
    margin: 10px 0;
}

.two-col {
    display: flex;
    flex-wrap: wrap;
}

.two-col > * {
    width: 100%;
}

.two-col .panel {
    border-radius: 10px;
    box-shadow: var(--shadow-01);
    margin: 5px;
    padding: 1rem;
}

.two-col .panel ul li {
    line-height: 2.5;
    padding: 5px;
    position: relative;
}

.two-col .panel ul li:hover {
    box-shadow: var(--shadow-03);
    border-radius: 10px 0 0 10px;
}

.two-col .panel ul li::before {
    content: '';
    display: block;
    z-index: -1;
    position: absolute;
    right: 0;
    top: 0;
    width: 0;
    height: 100%;
    border-left: 1px solid hsl(0 0% 25% / 100%);
    border-radius: 10px 0 0 10px;
    background: hsl(0 0% 20% / 100%);
    transition: .5s ease;
}

.two-col .panel ul li:hover::before {
    width: 100%;
}

.two-col .panel ul li.active {
    box-shadow: var(--shadow-03);
    border-radius: 10px 0 0 10px;
    pointer-events: none;
}

.two-col .panel ul li.active::before {
    width: 100%;
}

.two-col .panel ul li.sign-out::before {
    border-left: 1px solid var(--red-color);
    background: var(--red-color);
}

.two-col .content {
    border-radius: 10px;
    box-shadow: var(--shadow-01);
    margin: 5px;
    padding: 1rem;
}

/*Alert*/
.alert {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-flow: row nowrap;
    padding: 5px;
    width: 100%;
}

.alert .alert-btn {
    border: 0;
    outline: 0;
    background: transparent;
}

.alert .alert-btn:is(:hover, :active) {
    border: 1px solid;
    border-radius: 50%;
}

.alert.alert-primary {
    background: hsl(0 0% 25% / 100%);
}

.alert.alert-secondary {
    background-color: var(--white-color);
}

.alert.alert-info {
    background: var(--blue-color);
}

.alert.alert-success {
    background: var(--green-color);
}

.alert.alert-warning {
    background: var(--yellow-color);
}

.alert.alert-error {
    background: var(--red-color);
}

.alert:is(.alert-primary, .alert-info, .alert-error) {
    color: var(--white-color);
}

.alert:is(.alert-secondary, .alert-success, .alert-warning) {
    color: var(--dark-color);
}

.alert:is(.alert-primary, .alert-info, .alert-error) .alert-btn {
    color: var(--white-color);
}

.alert:is(.alert-secondary, .alert-success, .alert-warning) .alert-btn {
    color: var(--dark-color);
}

/*Button*/
.btn {
    text-align: center;
    line-height: 1.7;
    border-radius: 5px;
    border: 0;
    outline: 0;
    font-size: 1.2rem;
    padding: 5px 15px;
    box-shadow: var(--shadow-04);
    transition: 0.25s;
}

.btn.btn-block {
    display: block;
    width: 100%;
}

.btn.btn-primary {
    background: hsl(0 0% 25% / 100%);
    color: hsl(220 4% 86% / 100%);
}

.btn.btn-primary:hover {
    background: hsl(0 0% 20% / 90%);
}

.btn.btn-primary:active {
    background: hsl(0 0% 20% / 100%);
    box-shadow: var(--shadow-05);
}

.btn.btn-secondary {
    color: hsl(0 0% 18% / 100%);
    background: hsl(0 0% 100% / 60%);
}

.btn.btn-secondary:hover {
    color: hsl(0 0% 100% / 60%);
    background: hsl(0 0% 18% / 100%);
}

.btn.btn-secondary:active {
    background: hsl(0 0% 18% / 100%);
    box-shadow: var(--shadow-05);
}

.btn.btn-info {
    color: hsl(220 4% 86% / 100%);
    background: var(--blue-color);
}

.btn.btn-info:hover {
    background: hsl(240 60% 40% / 100%);
}

.btn.btn-info:active {
    background: hsl(240 60% 40% / 100%);
    box-shadow: var(--shadow-05);
}

.btn.btn-success {
    color: hsl(0 0% 18% / 100%);
    background: var(--green-color);
}

.btn.btn-success:hover {
    background: hsl(120 60% 35% / 100%);
}

.btn.btn-success:active {
    background: hsl(120 60% 35% / 100%);
    box-shadow: var(--shadow-05);
}

.btn.btn-warning {
    color: hsl(0 0% 18% / 100%);
    background: hsl(60 60% 50% / 100%);
}

.btn.btn-warning:hover {
    background: hsl(60 60% 40% / 100%);
}

.btn.btn-warning:active {
    background: hsl(60 60% 40% / 100%);
    box-shadow: var(--shadow-05);
}

.btn.btn-error {
    color: hsl(220 4% 86% / 100%);
    background: var(--red-color);
}

.btn.btn-error:hover {
    background: hsl(5 60% 40% / 100%);
}

.btn.btn-error:active {
    background: hsl(5 60% 40% / 100%);
    box-shadow: var(--shadow-05);
}

/*Card*/

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 450px));
    grid-gap: 16px;
    justify-content: center;
    padding: initial;
    font-family: var(--secondary-font);
    font-weight: 400;
    direction: ltr;
}

.card {
    display: flex;
    flex-direction: column;
    height: auto;
    margin: 5px;
    border-radius: 10px;
    box-shadow: 0px 5px 15px hsl(0 0% 0% / 35%);
}

.card * {
    direction: ltr;
}

.card .card-header {
    background: hsl(0 0% 25% / 100%);
    border-radius: 10px 10px 0 0;
    padding: 0 10px;
}

.card .card-body {
    background: hsl(0 0% 40% / 100%);
    padding: 5px;
    flex: 1;
    font-size: 1.25rem;
    word-break: break-word;
}

.card .card-body > * {
    margin-bottom: 10px;
}

.card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: hsl(0 0% 25% / 100%);
    border-radius: 0 0 10px 10px;
    padding: 0 10px;
    font-size: 1.2rem;
}

.card .card-footer .version {
    display: flex;
    justify-content: center;
    align-items: center;
}

.card .card-footer .version .old {
    color: var(--red-color);
}

.card .card-footer .version .new {
    color: var(--green-color);
}

.card .card-footer .version .same {
    color: hsl(0 20% 80% / 100%);
}

/*Footer*/
.footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-flow: column;
    background: var(--dark-color);
    box-shadow: var(--shadow-03);
}

/*Header*/
.menu-toggle {
    display: none;
}

.header {
    display: flex;
    justify-content: space-between;
    position: sticky;
    top: 0;
    line-height: 60px;
    height: 60px;
    box-shadow: var(--shadow-02);
    width: 100%;
    background: var(--dark-color);
    z-index: 1001;
}

.menu-toggle {
    padding: 0 15px;
}

.nav-left {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-right {
    display: flex;
}

.list-inline {
    position: relative;
    display: flex;
}

.list-inline li a {
    padding: 0 15px;
}

.dropdown > .list-inline {
    position: absolute;
    display: none;
    flex-flow: column nowrap;
    line-height: 45px;
    background-color: var(--dark-color);
    box-shadow: var(--shadow-05);
    max-height: 400px;
    overflow: auto;
}

.dropdown a > i {
    padding: 0 5px;
    transform: rotate(0deg);
    transition: transform 0.5s ease;
}

.dropdown > .list-inline li a {
    position: relative;
}

.dropdown > .list-inline li a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    top: 50%;
    right: 0;
    background: var(--white-color);
    border-radius: 50%;
    transform: translateY(-50%);
    transition: width 0.3s, height 0.3s;
}

.dropdown > .list-inline li a:hover::before {
    width: 8px;
    height: 8px;
}


.dropdown.mega-menu > .list-inline {
    left: 0;
    right: 0;
    width: 100%;
}

.header .search-float {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--dark-color);
    z-index: 1000;
    display: none;
}

form.search :where(i) {
    position: absolute;
    left: 0;
    top: 0;
}

form.search .input {
    outline: 0;
    width: 100%;
    color: var(--white-color);
    padding: 15px 50px;
}

form.search i {
    font-size: 20px;
    width: 50px;
    height: 100%;
}

form.search :where(i:not(:first-child)) {
    left: auto;
    right: 0;
}

form :where(.input, select, textarea) {
    font-size: 14px;
    border: 1px solid var(--white-color);
    outline: 0;
    background: transparent;
    padding: 10px 20px;
    transition: border 0.3s;
}

form :where(input, select, textarea):focus {
    border-color: var(--dark-color);
}

form :where(input, select, textarea)::placeholder {
    color: var(--white-color);
}

form.search i {
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .search .input {
    display: flex;
    border: 0;
    height: 60px;
    font-size: 18px;
}

.search-float.active {
    display: block;
}

.overlay {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
}

[data-search-btn] {
    padding: 0 15px;
}

.overlay {
    background: var(--dark-color);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    box-shadow: var(--shadow-03);
    z-index: 999;
    transition: opacity 0.3s, visibility 0.3s;
}

.overlay.active {
    opacity: 075;
    visibility: visible;
    pointer-events: all;
}

/*Input*/

.form-group,
.form-btn {
    display: flex;
    flex-flow: column wrap;
    gap: 5px;
    position: relative;
    border: 0;
}

.form-group > :is(.form-label, span),
.form-inline > .form-label {
    font-size: 1.2em;
    font-weight: 400;
    text-indent: 10px;
}

:is(.form-group, .form-inline) > .form-input {
    background: hsl(0 0% 18% / 100%);
    color: hsl(220 4% 86% / 100%);
    line-height: 1.7;
    border-radius: 5px;
    border: 0;
    outline: 0;
    font-size: 1.2rem;
    padding: 5px 15px;
    box-shadow: var(--shadow-04);
    transition: 0.25s;
    width: 100%;
    direction: ltr;
    color-scheme: dark;
}

:is(.form-group, .form-inline) .form-input::placeholder {
    color: hsl(0 0% 100% / 35%);
    text-align: right;
}

:is(.form-group, .form-inline) .form-input:focus {
    box-shadow: var(--shadow-05);
}

:is(.form-group, .form-inline) .form-input:read-only {
    box-shadow: var(--shadow-05);
}


:is(.form-group, .form-inline) .form-input:autofill {
    box-shadow: var(--shadow-05);
}

:is(.form-group, .form-inline) .form-input:disabled {
    box-shadow: unset;
    background: hsl(0 0% 21% / 95%);
}

:is(.form-group, .form-inline) .form-input[type="number"]::-webkit-inner-spin-button,
:is(.form-group, .form-inline) .form-input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
}

.form-group .form-input:is([type="password"], [type="text"]) {
    padding: 5px 35px 5px 25px;
}

.form-group .form-input:is([type="password"], [type="text"]) + i {
    display: none;
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
}

.form-group .form-input:is([type="password"], [type="text"]):focus + i,
.form-group .form-input:is([type="password"], [type="text"]) + i:hover {
    display: initial;
}

:is(.form-group, .form-inline) .form-input[type="number"] {
    padding: 5px 20px 5px 30px;
}

:is(.form-group, .form-inline):has(.form-input[type="number"]) > i:first-child {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
}

:is(.form-group, .form-inline):has(.form-input[type="number"]) > i:last-child {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
}

.form-inline {
    display: flex;
    justify-content: flex-start;
    border: 0;
    color: hsl(220 4% 86% / 100%);
    padding: 5px 15px;
    font-size: 1.2rem;
    border: 0;
    outline: 0;
    border-radius: 5px;
    transition: 0.25s;
    line-height: 1.7;
    color-scheme: dark;
    width: 100%;
    position: relative;
}

.form-inline:has(.form-input[type="radio"], .form-input[type="checkbox"]) {
    background: hsl(0 0% 18% / 100%);
    box-shadow: var(--shadow-04);
    align-items: center;
}

.form-inline:has(.btn) {
    flex: 1;
}

.form-inline > .form-label {
    margin: 0 3px;
}

.form-inline:has(.form-input[type="radio"], .form-input[type="checkbox"]) > .form-input {
    width: 1.2rem;
    height: 1.2rem;
}

.form-inline:has(.form-input:not([type="radio"]):not([type="checkbox"])) > .form-label {
    flex: 1 0 auto;
    background: hsl(0 0% 18% / 100%);
    box-shadow: var(--shadow-04);
    padding: 5px;
    margin: 0;
    border-radius: 5px;
    transition: 0.25s;
}

.form-inline:has(.form-input:not([type="radio"]):not([type="checkbox"]):focus) > .form-label {
    box-shadow: var(--shadow-05);
}

.form-group.form-row {
    flex-flow: row wrap;
    justify-content: space-between;
    background: hsl(0 0% 18% / 100%);
    box-shadow: var(--shadow-04);
    margin: 10px 0;
}

.form-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, max-content));
    gap: 15px;
    border: 0;
    margin: 15px 0;
    box-shadow: var(--shadow-05);
    background: hsl(0 0% 17% / 100%);
    margin: 20px 0;
    padding: 10px;
}

.form-col > .form-group {
    box-shadow: var(--shadow-04);
    border-radius: 5px;
    padding: 5px;
}


.form-col > .form-btn > .btn {
    margin: 0 10px;
}

form .form-btn {
    margin-top: 15px;
}

/*Modal*/
.modal {
    background: hsl(0 0% 10% / 100%);
    color: hsl(0 0% 100% / 100%);
    border: 1px solid hsl(0 0% 50% / 100%);
    box-shadow: var(--shadow-01);
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    flex-flow: row wrap;
    padding: 0;
    max-width: 80svh;
    max-height: 80svh;
}

.modal[open] {
    display: flex;
}

.modal::backdrop {
    background: hsl(0 0% 0% / 60%);
}

.modal > * {
    padding: 10px;
}

.modal :is(.modal-header, .modal-footer) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-flow: row;
    width: 100%;
}

.modal .modal-header {
    border-bottom: 1px solid hsl(0 0% 100% / 40%);
}

.modal .modal-body {
    flex: 1;
    max-height: 60vh;
    max-height: 60svh;
    overflow: auto;
}

.modal .modal-footer {
    border-top: 1px solid hsl(0 0% 100% / 40%);
}

[data-modal-close] {
    outline: 0;
    border: 0;
    background: transparent;
    color: whitesmoke;
}

/*Pagination*/
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0 0 0;
    flex-flow: row wrap;
    position: relative;
}

.pagination.row {
    flex-flow: row nowrap;
}

.pagination .page-item {
    flex: 0 0 30px;
    margin: 2px;
    border-radius: 10px;
    background: hsl(0 0% 18% / 100%);
    border-bottom: 2px solid transparent;
}

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.pagination .page-item:is(:hover, .active) {
    box-shadow: var(--shadow-03), var(--shadow-03), var(--shadow-03);
    border-bottom: 2px solid hsl(0 50% 50% / 50%);
}

.pagination .page-item:is(.disabled, .active) {
    pointer-events: none;
}

.pagination .page-item.hidden {
    display: none;
}

/*Table*/
.table-container {
    padding: 0 10%;
    margin: 40px auto 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: hsl(0 0% 20% / 100%);
}

.table thead tr th {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.35px;
    opacity: 1;
    padding: 12px;
    vertical-align: top;
    border: 1px solid #dee2e685;
}

.table tbody tr td {
    font-size: 14px;
    letter-spacing: 0.35px;
    font-weight: normal;
    color: #f1f1f1;
    background: #3c3f44;
    padding: 8px;
    text-align: center;
    border: 1px solid #dee2e685;
}

/*Media Queries*/

/*Only on touch*/
@media (pointer: coarse) {
    .dropdown.active > .list-inline {
        display: flex;
    }

    .dropdown.active a > i {
        transform: rotate(180deg);
    }
}

/*Only on mouse*/
@media (pointer:fine) {
    .dropdown:hover > .list-inline {
        display: flex;
    }

    .dropdown:hover a > i {
        transform: rotate(180deg);
    }

    a,
    i,
    button {
        cursor: pointer;
    }
}

/* width <= 768px*/
@media screen and (max-width:48rem) {
    .menu-toggle {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .nav-right > .list-inline {
        position: absolute;
        top: 61px;
        display: flex;
        flex-flow: column;
        background: var(--dark-color);
        box-shadow: var(--shadow-01);
        transform: translateX(100%);
        transition: 0.3s ease;
        width: 20rem;
        max-width: 100%;
        height: calc(100vh - 61px);
        height: calc(100svh - 61px);
    }

    .nav-right.active > .list-inline {
        transform: translateX(0%);
    }

    .dropdown > .list-inline {
        box-shadow: var(--shadow-03);
        position: relative;
    }

    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tr {
        margin-bottom: 15px;
    }

    .table tbody tr td {
        text-align: left;
        /*padding-right: 50%;*/
        word-wrap: break-word;
        position: relative;
    }

    .table td::before {
        content: attr(data-label);
        position: absolute;
        right: 0;
        width: 50%;
        padding-right: 15px;
        font-weight: 600;
        font-size: 14px;
        text-align: right;
    }
}

/* width >= 568px*/
@media screen and (min-width:35.5em) {}

/* width >= 768px*/
@media screen and (min-width:48em) {
    .section .section-header {
        flex-flow: row wrap;
    }

    .section .section-header :last-child {
        min-width: 150px;
    }

    .two-col {
        flex-flow: row nowrap;
        min-height: calc(100vh - 160px);
        min-height: calc(100svh - 160px);
    }

    .two-col > .panel {
        width: 25%;
    }

    .two-col > .person-panel {
        display: grid;
        margin: auto;
        width: 430px;
    }

    .form-group.form-row > .form-inline {
        box-shadow: unset;
    }

    .form-inline {
        width: unset;
    }

    .form-group.form-row > .form-inline:hover {
        box-shadow: var(--shadow-04);
    }
}

/* width >= 1024px*/
@media screen and (min-width:64em) {}

/* width >= 1280px*/
@media screen and (min-width:80em) {}

/* width >= 1920px*/
@media screen and (min-width:120em) {}

/* width >= 2560px*/
@media screen and (min-width:160em) {}

/* width >= 3840px*/
@media screen and (min-width:240em) {}