/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
	font-family: 'Vazir';
	src: url('fonts/Vazirmatn-Regular.woff2');

}

body {
    font-family: 'Vazir', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fff3e0;
    color: #5d4037;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    direction: rtl;
}

/* هدر */
.header {
    background: rgba(230, 74, 25, 0.8);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.header .logo h1 {
    font-size: 2rem;
    color: #fff;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ffcc80;
}

/* سایدبار */
.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar ul {
    list-style: none;
}

.sidebar-link {
    display: block;
    padding: 10px;
    color: #5d4037;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background 0.3s ease, color 0.3s ease;
    border-radius: 8px;
}

.sidebar-link:hover {
    background: rgba(230, 74, 25, 0.8);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(230, 74, 25, 0.8);
    color: #fff;
}

/* محتوای اصلی */
.container {
    display: flex;
    flex: 1;
}

.main-content {
    flex: 1;
    padding: 20px;
    margin-right: 0; /* کاهش فاصله با سایدبار */
}

.glass-card {
    background: rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.glass-card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #bf360c;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.input-group {
    margin-bottom: 20px;
    text-align: right;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
    color: #5d4037;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.3);
    color: #5d4037;
    border: 1px solid rgba(255, 167, 38, 0.5);
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #e64a19;
    outline: none;
}

.glass-button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(230, 74, 25, 0.8);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-button:hover {
    background: rgba(191, 54, 12, 0.8);
}

/* فوتر */
.footer {
    background: rgba(230, 74, 25, 0.8);
    padding: 10px;
    text-align: center;
    color: #fff;
}

/* استایل جدول کاربران */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    text-align: center;
}

.user-table th, .user-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 167, 38, 0.3);
}

.user-table th {
    background-color: rgba(230, 74, 25, 0.8);
    color: #fff;
    font-weight: 500;
}

.user-table tr:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.edit-button {
    background: rgba(41, 182, 246, 0.8);
}

.edit-button:hover {
    background: rgba(21, 101, 192, 0.8);
}

.danger-button {
    background: rgba(244, 67, 54, 0.8);
}

.danger-button:hover {
    background: rgba(198, 40, 40, 0.8);
}

/* استایل پیام‌ها */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 1rem;
    text-align: right;
}

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

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

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

/* چک‌باکس در حالت فعال (فشرده شدن) */
    input[type="checkbox"]:active {
        transform: scale(0.95);
    }

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.input-group input,
.input-group textarea,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Vazir', sans-serif;
}

.glass-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Vazir', sans-serif;
}

.glass-button:hover {
    background-color: #2980b9;
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    border-radius: 5px;
    color: white;
    display: none;
}

.notification.success {
    background-color: #27ae60;
}

.notification.error {
    background-color: #e74c3c;
}

.drop-zone {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin-top: 10px;
    border-radius: 5px;
}

.drop-zone.dragover {
    border-color: #3498db;
}

.paste-area {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin-top: 10px;
    border-radius: 5px;
}

.progress-bar-container {
    margin-top: 10px;
}

.progress-bar {
    height: 20px;
    background-color: #4CAF50;
    width: 0%;
    border-radius: 5px;
}

.progress-percent {
    margin-left: 10px;
}

#numberInput {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.3);
    color: #5d4037;
    border: 1px solid rgba(255, 167, 38, 0.5);
    transition: border-color 0.3s ease;

}

.btn {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn:hover {
    background-color: #0056b3;
}

.response-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.response-message.success {
    background-color: #d4edda;
    color: #155724;
}

.response-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

.messages-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.messages-table th, .messages-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.messages-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.messages-table tr:hover {
    background-color: #f1f1f1;
}

/* استایل کلی دکمه‌ها */
.view-message-btn, .mark-read-btn, .delete-btn, .reply-form button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

/* دکمه "مشاهده پیام" */
.view-message-btn {
    background-color: #007bff;
    color: white;
}

.view-message-btn:hover {
    background-color: #0056b3;
}

/* دکمه "خوانده‌شده" */
.mark-read-btn {
    background-color: #28a745;
    color: white;
}

.mark-read-btn:hover {
    background-color: #218838;
}

/* دکمه "حذف" */
.delete-btn {
    background-color: #dc3545;
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
}

/* دکمه "ارسال پاسخ" */
.reply-form button {
    background-color: #17a2b8;
    color: white;
    margin-top: 10px;
}

.reply-form button:hover {
    background-color: #138496;
}

/* استایل فرم پاسخ */
.reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 10px;
    resize: vertical; /* امکان تغییر اندازه عمودی */
}

/* استایل بخش نمایش پیام */
.message-details {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-top: 10px;
    border: 1px solid #ddd;
}

.floating-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ff4444; /* رنگ پس‌زمینه قرمز */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: float 3s infinite; /* انیمیشن شناور */
    z-index: 1000; /* مطمئن شوید اعلان بالای سایر عناصر است */
}

.floating-notification a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }

50% { transform: translateY(-10px); }

}
.floating-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ff4444; /* رنگ پس‌زمینه قرمز */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: float 3s infinite; /* انیمیشن شناور */
    z-index: 1000; /* مطمئن شوید اعلان بالای سایر عناصر است */
}

}
#numberInput:focus {
        border-color: #45a049;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

.emoji-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            overflow: hidden;
        }

.emoji-buttons button {
            font-size: 1.5em;
            border: none;
            background: none;
            cursor: pointer;
            padding: 10px;
            transition: transform 0.2s ease-in-out;
        }

.emoji-buttons button:hover {
            transform: scale(1.2);
        }

.emoji-container {
            margin-top: 20px;
        }

.more-btn {
            margin-top: 10px;
            background-color: #5d4037;
            color: white;
            padding: 10px 15px;
            border: none;
            cursor: pointer;
            border-radius: 5px;
            font-size: 1.2em;
            transition: background-color 0.3s;
        }

.more-btn:hover {
            background-color: #d32f2f;
        }

/* استایل کلی برای بخش ویرایش و حذف منوها */
.edit-menus {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    width: 100%; /* عرض کامل */
    max-width: 1200px; /* حداکثر عرض */
    margin: 0 auto; /*居中*/
}

.edit-menus h3 {
    font-size: 1.8rem; /* بزرگ‌تر */
    color: #333;
    margin-bottom: 25px;
}

.edit-menus table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.1rem; /* بزرگ‌تر */
}

.edit-menus th, .edit-menus td {
    padding: 15px; /* بزرگ‌تر */
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.edit-menus th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #555;
}

.edit-menus tr:hover {
    background-color: #f1f1f1;
}

/* استایل دکمه‌های ویرایش و حذف */
.edit-button, .delete-button {
    padding: 10px 15px; /* بزرگ‌تر */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem; /* بزرگ‌تر */
    transition: background-color 0.3s ease;
}

.edit-button {
    background-color: #4CAF50;
    color: white;
}

.edit-button:hover {
    background-color: #45a049;
}

.delete-button {
    background-color: #f44336;
    color: white;
}

.delete-button:hover {
    background-color: #e53935;
}

/* استایل کلی برای مودال */
.modal {
    display: none; /* مخفی کردن مودال به طور پیش‌فرض */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5); /* پس‌زمینه تاریک */
}

/* محتوای مودال */
.modal-content {
    background-color: #fff;
    margin: 10% auto; /* فاصله از بالا و وسط صفحه */
    padding: 20px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 50%; /* عرض مودال */
    max-width: 600px; /* حداکثر عرض */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s; /* انیمیشن باز شدن */
}

/* دکمه‌ی بستن */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* استایل گروه‌های ورودی */
.input-group {
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

/* دکمه‌ی شیشه‌ای */
.glass-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 5px;
    color: #000;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.glass-button:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* انیمیشن باز شدن مودال */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

}
.glass-button {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px; /* بزرگ‌تر */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem; /* بزرگ‌تر */
    transition: background-color 0.3s ease;
}

.glass-button:hover {
    background-color: #45a049;
}

/* استایل بخش تنظیم دسترسی‌ها */
.permissions-management {
    background-color: #ffffff;
    padding: 25px; /* بزرگ‌تر */
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    width: 100%; /* عرض کامل */
    max-width: 1200px; /* حداکثر عرض */
    margin: 0 auto; /*居中*/
}

.permissions-management h3 {
    font-size: 1.8rem; /* بزرگ‌تر */
    color: #333;
    margin-bottom: 25px;
}

.permissions-management .input-group {
    margin-bottom: 20px; /* بزرگ‌تر */
}

.permissions-management .input-group label {
    display: block;
    margin-bottom: 8px; /* بزرگ‌تر */
    color: #555;
    font-size: 1.1rem; /* بزرگ‌تر */
}

.permissions-management .input-group select {
    width: 100%;
    padding: 10px; /* بزرگ‌تر */
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1.1rem; /* بزرگ‌تر */
}

.permissions-management .menu-list {
    margin-top: 20px; /* بزرگ‌تر */
}

.permissions-management .menu-item {
    margin-bottom: 15px; /* بزرگ‌تر */
    font-size: 1.1rem; /* بزرگ‌تر */
}

.permissions-management .menu-item input[type="checkbox"] {
    margin-left: 10px;
}

.permissions-management .menu-item label {
    color: #555;
}

.button {
    background: linear-gradient(145deg, #4CAF50, #45a049);
    border: none;
    color: white;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    font-weight: bold;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    outline: none;
}

.button:hover {
    background: linear-gradient(145deg, #45a049, #4CAF50);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.button:active {
    background: linear-gradient(145deg, #3d8b40, #4CAF50);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2), 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.custom-margin {
    margin-top: 20px; /* فقط روی این دکمه اعمال می‌شود */
}

/* استایل کلی برای همه‌ی چک‌باکس‌ها */
input[type="checkbox"] {
    appearance: none; /* غیرفعال کردن استایل پیش‌فرض مرورگر */
    -webkit-appearance: none; /* برای مرورگرهای مبتنی بر WebKit */
    width: 25px;
    height: 25px;
    background-color: #ff4444; /* رنگ پیش‌فرض قرمز */
    border-radius: 5px;
    border: 2px solid #ccc;
    cursor: pointer;
    margin-right: 10px; /* فاصله از متن */
    vertical-align: middle;
    transition: background-color 0.3s;
    position: relative; /* برای موقعیت‌دهی علامت تیک */
}

/* وقتی چک‌باکس انتخاب شده است (تیک خورده) */
input[type="checkbox"]:checked {
    background-color: #4CAF50; /* رنگ سبز */
    border-color: #4CAF50;
}

/* ایجاد علامت تیک */
input[type="checkbox"]:checked::before {
    content: "✔"; /* علامت تیک */
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* مرکز کردن تیک */
    color: white;
    font-size: 14px; /* اندازه‌ی کوچک‌تر برای تیک */
    line-height: 1;
}

textarea {
    width: 100%; /* عرض کامل */
    min-height: 200px; /* حداقل ارتفاع */
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    resize: none; /* غیرفعال کردن تغییر اندازه دستی */
    overflow: hidden; /* جلوگیری از نمایش اسکرول */
}

.locked-users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.locked-users-table th, .locked-users-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

.locked-users-table th {
    background-color: #f4f4f4;
}

.glass-button {
    background-color: #4CAF50;
    color: white;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.password-strength {
    margin-top: 10px;
    height: 10px;
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.password-strength-weak {
    background-color: #ff4d4d;
    width: 33%;
}

.password-strength-medium {
    background-color: #ffcc00;
    width: 66%;
}

.password-strength-strong {
    background-color: #4caf50;
    width: 100%;
}


/* واکنش‌گرایی برای موبایل */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100% !important;
        order: 1;
    }

    .main-content {
        width: 100% !important;
        order: 2;
    }

    .btn,
    .glass-button,
    .button,
    .edit-button,
    .delete-button,
    .view-message-btn,
    .mark-read-btn,
    .reply-form button,
    .more-btn {
        width: 100% !important;
        display: block;
        margin-bottom: 10px;
    }

    textarea,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select {
        width: 100% !important;
    }

    .user-table,
    .messages-table,
    .locked-users-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .emoji-buttons {
        flex-direction: column;
    }

    .edit-menus,
    .permissions-management {
        width: 100% !important;
    }
}
.response-box pre {
    max-height: 300px;       /* ارتفاع محدود */
    overflow: auto;          /* اسکرول بشه */
    background-color: #f5f5f5;
    padding: 15px;
    font-size: 0.9rem;       /* فونت کوچیک‌تر */
    border-radius: 5px;
    direction: ltr;          /* اگه پیام انگلیسیه */
    white-space: pre-wrap;   /* خطاها رو بشکنه توی خط بعدی */
    word-wrap: break-word;
}
@media screen and (max-width: 768px) {
    .user-table {
        width: 100%;
        display: block;
        overflow-x: auto; /* اسکرول افقی برای جدول */
        table-layout: auto; /* ستون‌ها به اندازه محتوای خود تنظیم شوند */
    }

    .user-table thead {
        display: none; /* مخفی کردن هدر در موبایل */
    }

    .user-table tr {
        display: block;
        margin-bottom: 10px;
        border: 1px solid #ddd;
        padding: 10px;
        background-color: #f9f9f9;
    }

    .user-table td {
        display: block;
        width: 100%;
        text-align: left;
        padding: 10px;
        border: none;
        border-bottom: 1px solid #ddd;
    }

    .user-table td::before {
        content: attr(data-label); /* اضافه کردن برچسب به سلول‌ها */
        font-weight: bold;
        margin-right: 60px;
    }

    .user-table .actions {
        display: block;
        margin-top: 10px;
    }

    .user-table .glass-button {
        width: 100%;
        margin-top: 5px;
    }
}