/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #2e2f2f;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #ffffff;
}

/* Container Styles */
.container {
    background-color: #3a3b3b;
    padding: 2rem;
    border-radius: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    margin: 20px;
    transition: transform 0.3s ease;
}

h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #ffffff;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #ffffff;
}

.form-group input {
    width: 94%;
    padding: 0.8rem;
    border: 2px solid #4a4b4b;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #2e2f2f;
    color: #ffffff;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #7e0f15;
    outline: none;
    box-shadow: 0 0 5px rgba(126, 15, 21, 0.5);
}

/* Buttons */
.btn {
    width: 40%;
    padding: 0.8rem;
    background-color: #7e0f15;
    border: none;
    border-radius: 6px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    display: block;
    margin: 0 auto;
    cursor: pointer;
    
    transition:background-color 0.3s ease,transform 0.2s ease;
}

.btn:hover {
    background-color: #005a4c;
    transform: translateY(-1px);
}

/* Messages */
.error-message {
    background-color: #ffd2d2;
    color: #ff4444;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.success-message {
    background-color: #9be0b7;
    color: #005a4c;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

/* Links */
.links {
    margin-top: 1.5rem;
    text-align: center;
}

.links a {
    color: #ffffff;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    display: block;
    margin: 0.5rem 0;
}

.links a:hover {
    color: #ff4d4d;
}

.links a:hover::after {
    width: 100%;
}

/* Password Hint */
.password-hint {
    font-size: 0.85rem;
    color: #a0a0a0;
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
        margin: 10px;
    }

    .form-group input {
        font-size: 0.9rem;
        padding: 0.7rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.7rem;
    }

    .links a {
        display: block;
        margin: 0.5rem 0;
    }
}
/* دکمه منو در سمت چپ بالا */
.menu-toggle {
    position: fixed;
    top: 15px;
    left: 15px;
    background: #2e2f2f;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    border-radius: 4px;
    display: block;
    /* همیشه نمایش داده شود */
}

/* سایدبار با بازشدن از چپ */
.sidebar {
    height: 100%;
    width: 250px;
    position: fixed;
    top: 0;
    left: -250px;
    background-color: #2e2f2f;
    overflow-x: hidden;
    transition: 0.5s;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.open {
    left: 0;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 2rem;
    color: white;
    text-decoration: none;
    padding: 5px 10px;
}

.user-profile {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #3a3b3b;
    margin-bottom: 20px;
}

.user-email {
    color: #ffffff;
    font-size: 0.9rem;
    word-break: break-all;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0 10px;
}

.sidebar-nav a {
    color: white;
    padding: 12px 15px;
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    border-radius: 4px;
    margin-bottom: 5px;
    transition: all 0.3s;
    gap: 10px;
}

.sidebar-nav a:hover {
    background-color: #008B74;
}

.sidebar-nav .icon {
    margin-left: 10px;
    font-size: 1.2rem;
    font-style: normal;
}


/* محتوای اصلی */
.main-content {
    transition: margin-left 0.5s;
    padding: 20px;
    min-height: 100vh;
}

.main-content.shifted {
    margin-left: 250px;
}

/* استایل‌های واکنش‌گرا */
@media (max-width: 992px) {
    .sidebar {
        width: 220px;
        left: -220px;
    }

    .main-content.shifted {
        margin-left: 220px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content.shifted {
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 75%;
        left: -75%;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-nav a {
        padding: 15px 20px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
    }
}
/* اضافه کردن استایل برای پیام‌ها */
.message-box {
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    text-align: center;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
/* اضافه کردن استایل‌های جدید */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.token-form {
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.token-form p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.token-form strong {
    font-family: monospace;
    font-size: 1.2rem;
    color: #2e2f2f;
}

/* استایل‌های عمومی Remember Me */
.remember-me {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.remember-me input[type="checkbox"] {
    margin: 0 10px 0 0;
    width: auto;
    height: auto;
    cursor: pointer;
}

.remember-me label {
    margin: 0;
    cursor: pointer;
    color: #555;
    font-size: 14px;
}

/* تغییر رنگ چک‌باکس در حالت عادی */
.remember-me input[type="checkbox"] {
    accent-color: #4CAF50;
    /* سبز */
}

/* تغییر رنگ چک‌باکس در حالت تیره */
@media (prefers-color-scheme: dark) {
    .remember-me label {
        color: #ddd;
    }

    .remember-me input[type="checkbox"] {
        accent-color: #2E7D32;
        /* سبز تیره */
    }
}

/* استایل‌های واکنش‌گرا برای موبایل */
@media (max-width: 768px) {
    .remember-me {
        margin: 10px 0;
    }

    .remember-me label {
        font-size: 16px;
        /* کمی بزرگتر برای موبایل */
    }
}
