﻿body {
    direction: rtl !important;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    /*background-color: #e9e9e9;*/
}

body.bg-greenhouse {
    /*background-color: #c8f7d4 !important;*/
    background: linear-gradient(to bottom right, #e9fdeb, #d5f8d5) !important;
}

body.bg-machine {
    background-color: #d8e7ff !important;
}

body.bg-admin {
    background-color: #e9e9e9 !important;
}

.background-container {
    position: relative;
    width: 99vw;
    height: 98vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /*overflow: hidden;*/
}
.image-style img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: -5;
}

.login-container {
    display: block;
    position: relative;
    z-index: 0;
    margin: 6rem auto;
    padding: 3rem;
    width: 100%;
    max-width: 350px;
    min-height: 450px;
    background-color: rgba(36, 36, 36, 0.727);
    box-shadow: 0 50px 70px -20px rgba(0, 0, 0, 0.85);
    border-radius: 2%;
}

/*.login-container:after {
    content: "";
    display: inline-block;
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 2%;
    box-shadow: 0 -20px 150px -20px rgba(0, 0, 0, 0.5);
}*/

.form-login {
    position: relative;
    z-index: 1;
    margin:2rem;
    padding-bottom: 3.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.login-nav {
    position: relative;
    padding: 0;
    margin: 0 0 2em 1rem;
}

.login-nav__item {
    list-style: none;
    display: inline-block;
    position: relative;
}

.login-nav__item + .login-nav__item {
    margin-left: 2.25rem;
}

.login-nav__item a {
    position: relative;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 1.25rem;
    padding-bottom: 0.5rem;
    transition: 0.2s all ease;
    cursor: pointer;
    z-index:10;
}

.login-nav__item a:hover {
    color: #ffffff;
    transition: 0.15s all ease;
 }

.login-nav__item a:after {
    content: "";
    display: inline-block;
    height: 10px;
    background-color: rgb(255, 255, 255);
    position: absolute;
    right: 100%;
    bottom: -1px;
    left: 0;
    border-radius: 50%;
    transition: 0.15s all ease;
}

 .login-nav__item a:hover:after {
     /*background-color: rgb(254,194,22);*/
     height: 2px;
     right: 0;
     bottom: 2px;
     border-radius: 0;
     transition: 0.2s all ease;
 }

 .nav__item__machin a:hover:after {
    background-color: rgb(254,194,22);
 }

.nav__item__greenhouse a:hover:after {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
    --tw-gradient-from: #16a34a; /* رنگ شروع */
    --tw-gradient-to: #059669; /* رنگ پایان */
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.nav__item__admin a:hover:after {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
    --tw-gradient-from: #0966fe; /* رنگ شروع */
    --tw-gradient-to: #dbbef6; /* رنگ پایان */
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.login__label--checkbox {
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 0.75rem;
    margin-bottom: 1rem;
}

.login__label--checkbox {
    display: inline-block;
    position: relative;
    padding-left: 1.5rem;
    margin-top: 2rem;
    margin-left: 1rem;
    color: #ffffff;
    font-size: 0.9rem;
    text-transform: inherit;
}

.login__input--checkbox {
    /*position: absolute;*/
    top: 0.1rem;
    /*left: 0;*/
    margin: 0;
}

.button-container {
    margin-top:3rem;
    display: flex;
    gap: 10px; /* فاصله بین دکمه‌ها */
    justify-content: center; /* تراز کردن دکمه‌ها به مرکز */
    align-items: center; /* تراز عمودی دکمه‌ها */
}


.login__submit {
    color: #ffffff;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 2rem;
    display: block;
    width: 100%;
    /*background-color: rgb(254,194,22);*/
    border: none;
    cursor: pointer;
}

.login__submit__machin,
#machine-client {
    color: #ffffff;
    background-color: rgb(254,194,22);
}

.login__submit__greenhouse,
#greenhouse-client {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
    --tw-gradient-from: #16a34a; /* رنگ شروع */
    --tw-gradient-to: #059669; /* رنگ پایان */
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.login__submit__admin,
#admin-client {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
    --tw-gradient-from: #0966fe; /* رنگ شروع */
    --tw-gradient-to: #dbbef6; /* رنگ پایان */
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}


.login__submit__machin:hover, #machine-client:hover {
    background-color: rgb(255,165,17);
}

.login__submit__greenhouse:hover,
#greenhouse-client:hover {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
    --tw-gradient-from: #22c55e;
    --tw-gradient-to: #10b981;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.login__submit__admin:hover,
#admin-client:hover {
    --tw-gradient-from: #054bcc; /* رنگ پررنگ‌تر برای شروع */
    --tw-gradient-to: #b488e6; /* رنگ پررنگ‌تر برای پایان */
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.login__submit__greenhouse:hover {
    background-color: rgb(30, 97, 55);
}


.login__input {
    color: white;
    font-size: 0.8rem;
    width: 90%;
    padding: 0.6rem 1rem;
    border: 2px solid transparent;
    outline: none;
    border-radius: 1.5rem;
    background-color: rgba(255, 255, 255, 0.699);
    letter-spacing: 1px;
}

.login__input_error {
    border: 2px solid rgba(246, 0, 0, 0.837);
}

.login__input:hover,
.login__input:focus {
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background-color: transparent;
}

.login__input + .login__label {
    margin-top: 1.5rem;
}

.login__label_error {
    color: rgba(250, 4, 4, 0.918) !important;
}

.login__label {
    display: block;
    padding-left: 1rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
}

.error_message {
    color: rgba(250, 4, 4, 0.918);
    font-size: 0.75rem /* 12px */;
    line-height: 1rem /* 16px */;
    text-align: right;
    margin-top: 0.5rem /* 8px */;
}

.cancel {
    background-color: gray;
}


/* رسانه‌های پرس‌وجو برای نمایشگرهای کوچک‌تر */
@media screen and (max-width: 768px) {
    /* .background-container {
      height: auto;
    } */

    .login-container {
        margin: 4rem auto 0;
        padding: 2rem;
        width: 90%;
        max-width: 300px;
    }

    .form-login {
        padding-bottom: 2rem;
    }

    .login__submit {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .login-nav {
        margin: 0 0 1em 0;
    }

    .login-nav__item {
        margin-left: 1rem;
    }

    .login__label--checkbox {
        font-size: 0.65rem;
        margin-left: 0.5rem;
        margin-top: 1rem;
    }

    .messageStyle {
        min-width: 250px !important;
        max-width: 100rem !important; /* اصلاح از mm به rem */
    }
}

/* رسانه‌های پرس‌وجو برای موبایل */
@media screen and (max-width: 480px) {
    .login-container {
        padding: 1.5rem;
        /* margin: 4rem auto; */
        width: 95%;
    }

    .login__submit {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    .login-nav__item a {
        font-size: 1rem;
    }

    .login__label--checkbox {
        font-size: 0.6rem;
    }

    .messageStyle {
        min-width: 250px !important;
        max-width: 100rem !important; /* اصلاح از mm به rem */
    }
}


.container {
    width: 100%;
    max-width: 800px;
    text-align: center;
}

h1 {
    margin-bottom: 2rem;
    color: #333;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

.btn-default {
    background: linear-gradient(135deg, #0a5e79, #2ba888);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #00E676, #00B8D4);
    color: white;
}

.btn-error {
    background: linear-gradient(135deg, #f0223e, #f34238);
    color: white;
}

/* استایل‌های پایه برای مودال */
.messageStyle {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 30000;
    min-width: 360px;
    min-height: 145px;
    max-width: 150rem; /* اصلاح از mm به rem */
    max-height: 25rem; /* اصلاح از mm به rem */
    color: #fff;
    background: linear-gradient(135deg, #806679, #2ba888); /* اصلاح رنگ */
    border-radius: 12px; /* اصلاح از 120% به 12px */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 36px;
    opacity: 0;
    text-align: center;
    display: flex; /* اصلاح از flag به flex */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    will-change: transform, opacity; /* اصلاح نگارشی */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* افزودن transition */
}

    .messageStyle .title {
        font-size: 20px;
        text-transform: uppercase;
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); /* اصلاح شده از zpx */
        font-weight: 700;
        margin-bottom: 12px;
        position: relative;
        opacity: 0;
        transform: translateY(-10px); /* اصلاح شده از translater */
        transition: all 0.3s ease 0.1s; /* اصلاح شده از case */
    }

    /* استایل متن پیام */
    .messageStyle .msg {
        font-size: 14px;
        line-height: 1.4;
        font-style: italic;
        position: relative;
        opacity: 0;
        transform: translateY(-5px); /* اصلاح شده از translater */
        transition: all 0.3s ease 0.2s;
    }

    .messageStyle .close {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 2;
        cursor: pointer;
        width: 28px;
        height: 28px;
        opacity: 0;
        background: rgba(255, 255, 255, 0.25);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: auto;
        transition: all 0.3s ease 0.3s;
        b /* order: none;
          color: white;
          font-weight: bold; */
    }

        /* افکت hover برای دکمه بستن */
        .messageStyle .close:hover {
            background: rgba(255, 255, 255, 0.3);
            /* transform: scale(1.1); */
        }

    .messageStyle.messageStyle-error {
        background: linear-gradient(135deg, #f0223e, #f34238);
    }

    .messageStyle.messageStyle-success {
        background: linear-gradient(135deg, #00E676, #00B8D4);
    }

    /* حالت فعال مودال */
    .messageStyle.active {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        pointer-events: auto;
    }

        .messageStyle.active .title,
        .messageStyle.active .msg {
            opacity: 1;
            transform: translateY(0);
        }

        .messageStyle.active .close {
            opacity: 1;
        }

    .messageStyle.closing {
        opacity: 0;
        transform: translate(-50%, 50%) scale(0.8);
        transition: all 0.3s cubic-bezier(0.6, -0.2, 0.735, 0.045);
    }

        .messageStyle.closing .title,
        .messageStyle.closing .msg,
        .messageStyle.closing .close {
            opacity: 0;
            transform: all 0.2s ease;
        }

/* استایل overlay پس‌زمینه */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* اصلاح از 180% به 100% */
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease; /* اصلاح از 0.35 به 0.35s */
    z-index: 2000;
    will-change: opacity; /* اصلاح از will-changer */
    backdrop-filter: blur(4px); /* اضافه کردن افکت بلور */
}

    /* حالت فعال overlay */
    .alert-overlay.active {
        visibility: visible;
        opacity: 1;
        z-index29000;
    }

/* استایل کانتینر آیکون */
.icon-container {
    margin-bottom: 15px; /* اصلاح از 150% */
    height: auto; /* اصلاح از 400% */
    display: flex;
    align-items: center; /* اصلاح از align-1 */
    justify-content: center;
}

/* استایل پایه برای آیکون‌ها */
.success-icon,
.error-icon,
.info-icon {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease 0.25s;
}

/* حالت فعال برای آیکون‌ها */
.messageStyle.active .success-icon,
.messageStyle.active .error-icon,
.messageStyle.active .info-icon {
    transform: scale(1) rotate(0deg);
    opacity: 1;
}


/********************logout**********************/

.success-container {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
}

.success-card {
    width: 100%;
    max-width: 32rem !important;
/*    background: white;
    box-shadow: 0 50px 70px -20px rgba(0, 0, 0, 0.85);
    border-radius: 2%;
    padding: 1.5rem;*/
}

.card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1ecf5f;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: #ffffff;
    font-size: 1rem;
}

.success-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: #667c6d;
    border-radius: 50%;
    color: #1ecf5f;
    margin-bottom: 1rem;
}


.card-content {
    margin-bottom: 1.5rem;
}

.security-tips {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #171718;
    margin-bottom: 0.5rem;
}

.security-tips ul {
    margin: 0;
}

.security-tips li {
    font-size: 0.75rem;
    color: #171718;
    margin-bottom: 0.25rem;
    padding-left: 0.5rem;
    position: relative;
}

.countdown {
    text-align: center;
}

.countdown p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.card-footer {
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
}

@media (min-width: 640px) {
    .card-footer {
        flex-direction: row;
    }
}

.btn-outline {
    background: #808080;
    border-color: #d1d5db;
    color: #ffffff;
}

    .btn-outline:hover {
        background: #5f5959;
    }
