﻿/* ============================================ */
/* فایل استایل یکپارچه ابزار علم وبسنجی */
/* ============================================ */

/* ============================================ */
/* تنظیمات پایه و ریست */
/* ============================================ */
/* ============================================ */
/* استایل باکس‌های گزارشات - ارتفاع 60% */
/* ============================================ */
.report-stat-card {
    background: white;
    border-radius: 10px;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    text-align: center;
    transition: all 0.2s;
    min-height: 100px;
    height: 60%;
    max-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    .report-stat-card .icon {
        font-size: 28px;
        display: block;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .report-stat-card .number {
        font-size: 20px;
        font-weight: 700;
        color: #0b4f8a;
        line-height: 1.3;
    }

        .report-stat-card .number.green {
            color: #2e7d32;
        }

        .report-stat-card .number.orange {
            color: #f59e0b;
        }

        .report-stat-card .number.red {
            color: #c62828;
        }

    .report-stat-card .label {
        font-size: 11px;
        color: #888;
        margin-top: 2px;
        line-height: 1.3;
    }

    .report-stat-card .sub-label {
        font-size: 10px;
        color: #999;
        line-height: 1.2;
    }

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .report-stat-card {
        min-height: 80px;
        max-height: 110px;
        padding: 8px 10px;
    }

        .report-stat-card .icon {
            font-size: 22px;
        }

        .report-stat-card .number {
            font-size: 16px;
        }

        .report-stat-card .label {
            font-size: 10px;
        }

        .report-stat-card .sub-label {
            font-size: 9px;
        }
}

@media (max-width: 480px) {
    .report-stat-card {
        min-height: 70px;
        max-height: 95px;
        padding: 6px 8px;
    }

        .report-stat-card .icon {
            font-size: 18px;
        }

        .report-stat-card .number {
            font-size: 14px;
        }

        .report-stat-card .label {
            font-size: 9px;
        }

        .report-stat-card .sub-label {
            font-size: 8px;
        }
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

body {
    margin: 0;
    font-family: 'Vazirmatn', 'Tahoma', 'Segoe UI', sans-serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: #f4f6f9;
}

/* ============================================ */
/* سایدبار */
/* ============================================ */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #f7f7f7, #ececec);
    border-left: 1px solid #d0d0d0;
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: -2px 0 8px rgba(0,0,0,0.04);
    z-index: 2;
    overflow-y: auto;
    flex-shrink: 0;
}

    .sidebar button {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        font-size: 15px;
        font-family: 'Vazirmatn', 'Tahoma', sans-serif;
        font-weight: 700;
        line-height: 1.5;
        color: #222;
        cursor: pointer;
        background: #ffffff;
        border: 1px solid #d7d7d7;
        border-radius: 12px;
        transition: all 0.25s ease;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        text-align: right;
        width: 100%;
    }

        .sidebar button:hover {
            background: #e8f0fe;
            border-color: #9bbcf7;
            transform: translateX(-2px);
        }

        .sidebar button.active {
            background: #dcecff;
            border-color: #4d8fe6;
            color: #0d3f75;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

        .sidebar button span {
            font-size: 20px;
            min-width: 32px;
            text-align: center;
        }

    .sidebar .toolbox-btn {
        background: linear-gradient(135deg, #22c55e, #16a34a);
        color: white;
        border: none;
        margin-bottom: 0;
    }

        .sidebar .toolbox-btn:hover {
            background: linear-gradient(135deg, #1eae56, #128c3e);
            transform: translateX(-2px);
        }

    .sidebar hr {
        display: none !important;
    }

/* ============================================ */
/* محتوای اصلی */
/* ============================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #fff;
    overflow: hidden;
    min-width: 0;
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* ============================================ */
/* تاپبار (هدر) - دسکتاپ */
/* ============================================ */
.topbar {
    background: linear-gradient(90deg, #0b4f8a, #1565a9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.topbar-right {
    font-size: clamp(16px, 4vw, 28px);
    font-weight: 800;
    white-space: normal;
    word-break: break-word;
    text-align: right;
    line-height: 1.4;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .topbar-left img {
        height: clamp(40px, 6vh, 55px);
        width: auto;
        object-fit: contain;
        background: rgba(255,255,255,0.08);
        border-radius: 10px;
        padding: 4px;
    }

/* ============================================ */
/* منوی کاربری - یکپارچه نهایی */
/* ============================================ */
.user-menu-container {
    position: relative;
    display: inline-block;
}

/* ============================================ */
/* دکمه منوی کاربری - اصلاح نهایی */
/* ============================================ */
.profile-menu-btn {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 4px 12px 4px 8px !important;
    min-height: 50px !important;
    min-width: 50px !important;
    border-radius: 50px !important;
    background: rgba(255,255,255,0.1) !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: white !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    font-size: 13px !important;
}

    .profile-menu-btn:hover {
        background: rgba(255,255,255,0.2) !important;
        border-color: rgba(255,255,255,0.5) !important;
    }

    /* عکس پروفایل - کاملاً وسط با object-fit */
    .profile-menu-btn #profileIconImage {
        width: 43px !important;
        height: 43px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        display: block !important;
        flex-shrink: 0 !important;
        margin: 0 auto !important;
        padding: 0 !important;
        position: relative !important;
        border: none !important;
    }

    /* آیکون پیش‌فرض - وسط */
    .profile-menu-btn .profile-icon {
        font-size: 34px !important;
        line-height: 1 !important;
        display: none; /* ← پیش‌فرض مخفی — جاوااسکریپت نشانش می‌دهد */
        text-align: center !important;
    }

    /* وقتی کاربر مهمان است، آیکون پیش‌فرض نمایش داده شود */
    .profile-menu-btn.guest .profile-icon {
        display: inline-block;
    }

    /* وقتی کاربر لاگین و عکس دارد، آیکون پیش‌فرض مخفی شود */
    .profile-menu-btn.logged-in .profile-icon {
        display: none;
    }

    /* وقتی کاربر لاگین و عکس ندارد، آیکون پیش‌فرض نمایش داده شود */
    .profile-menu-btn.logged-in.no-image .profile-icon {
        display: inline-block;
    }

    /* عکس پروفایل — فقط وقتی src دارد نمایش داده شود */
    .profile-menu-btn img#profileIconImage {
        width: 43px !important;
        height: 43px !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        display: none; /* ← پیش‌فرض مخفی */
        flex-shrink: 0 !important;
        margin: 0 auto !important;
        padding: 0 !important;
        position: relative !important;
        border: none !important;
    }

        /* وقتی src دارد، نمایش داده شود */
        .profile-menu-btn img#profileIconImage[src]:not([src=""]) {
            display: block;
        }

    /* دایره وضعیت (سبز/قرمز) - تنظیم موقعیت دقیق */
    .profile-menu-btn.logged-in::after,
    .profile-menu-btn.guest::after {
        content: '' !important;
        position: absolute !important;
        bottom: 2px !important;
        right: 2px !important;
        width: 17px !important;
        height: 17px !important;
        border-radius: 50% !important;
        border: 2.5px solid #ffffff !important;
        z-index: 10 !important;
        display: block !important;
        pointer-events: none !important;
        box-shadow: 0 0 4px rgba(0,0,0,0.2) !important;
    }

    .profile-menu-btn.logged-in::after {
        background: #22c55e !important;
    }

    .profile-menu-btn.guest::after {
        background: #ef4444 !important;
    }

    /* بدون دایره */
    .profile-menu-btn.no-indicator::after {
        display: none !important;
    }

.profile-label-mobile {
    display: none;
    font-size: 11px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
}

/* ============================================ */
/* نام کاربری با عکس */
/* ============================================ */
.user-name-display {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 4px 14px 4px 10px !important;
    border-radius: 50px !important;
    background: rgba(255,255,255,0.1) !important;
    border: 2px solid rgba(255,255,255,0.2) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: white !important;
}

    .user-name-display.show {
        display: inline-flex !important;
    }

    .user-name-display:hover {
        background: rgba(255,255,255,0.2) !important;
        border-color: rgba(255,255,255,0.4) !important;
    }

    .user-name-display .avatar {
        position: relative !important;
        display: inline-block !important;
        width: 43px !important;
        height: 43px !important;
        flex-shrink: 0 !important;
    }

        .user-name-display .avatar img {
            width: 43px !important;
            height: 43px !important;
            border-radius: 50% !important;
            object-fit: cover !important;
            display: block !important;
        }

        .user-name-display .avatar .avatar-indicator {
            position: absolute !important;
            bottom: -2px !important;
            right: -2px !important;
            width: 15px !important;
            height: 15px !important;
            border-radius: 50% !important;
            border: 2.5px solid white !important;
        }

            .user-name-display .avatar .avatar-indicator.online {
                background: #22c55e !important;
            }

            .user-name-display .avatar .avatar-indicator.offline {
                background: #ef4444 !important;
            }

    .user-name-display .name {
        font-size: 14px !important;
        font-weight: 600 !important;
        color: white !important;
        max-width: 120px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

/* ============================================ */
/* عکس در دراپ‌داون */
/* ============================================ */
#dropdownProfileImage {
    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    flex-shrink: 0 !important;
}

#dropdownDefaultAvatar {
    font-size: 38px !important;
    display: inline-block !important;
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    left: 0;
    background: white;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 8px 0;
    z-index: 1000;
    border: 1px solid #eee;
    direction: rtl;
}

    .profile-dropdown.show {
        display: block;
        animation: fadeIn 0.2s ease;
    }

    .profile-dropdown .user-header {
        padding: 12px 20px 10px;
        border-bottom: 1px solid #f0f0f0;
    }

    .profile-dropdown .user-name {
        font-weight: 700;
        color: #0b4f8a;
        font-size: 14px;
    }

    .profile-dropdown .user-mobile {
        font-size: 12px;
        color: #888;
        margin-top: 2px;
    }

    .profile-dropdown .dropdown-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 20px;
        color: #333;
        font-size: 13px;
        transition: background 0.2s;
        cursor: pointer;
        border: none;
        background: none;
        width: 100%;
        text-align: right;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
    }

        .profile-dropdown .dropdown-item:hover {
            background: #f5f7fa;
        }

        .profile-dropdown .dropdown-item .icon {
            font-size: 16px;
            min-width: 24px;
        }

        .profile-dropdown .dropdown-item.logout {
            color: #d32f2f;
            border-top: 1px solid #f0f0f0;
            margin-top: 5px;
            padding-top: 12px;
        }

            .profile-dropdown .dropdown-item.logout:hover {
                background: #fde8e8;
            }

        .profile-dropdown .dropdown-item.register-item {
            color: #0b4f8a;
            border-bottom: 1px solid #f0f0f0;
            margin-bottom: 5px;
        }

            .profile-dropdown .dropdown-item.register-item:hover {
                background: #e8f0fe;
            }

/* ============================================ */
/* هدر موبایل - مخفی در دسکتاپ */
/* ============================================ */
.mobile-header {
    display: none;
}

/* ============================================ */
/* تولبار موبایل - مخفی در دسکتاپ */
/* ============================================ */
.mobile-toolbar {
    display: none !important;
}

/* ============================================ */
/* محتوای اصلی (area) */
/* ============================================ */


/* ============================================ */
/* Placeholder */
/* ============================================ */
.placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 20px;
    background: #fff;
    z-index: 1;
}

    .placeholder img {
        width: min(60%, 300px);
        max-width: 300px;
        height: auto;
        opacity: 0.9;
        object-fit: contain;
    }

/* ============================================ */
/* iframe */
/* ============================================ */
/* ============================================ */
/* iframe - کاهش z-index */
/* ============================================ */
iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: none;
    background: #fff;
    position: relative;
    z-index: 1; /* ✅ z-index پایین برای iframe */
}

/* ============================================ */
/* محتوای اصلی - اطمینان از z-index مناسب */
/* ============================================ */
.content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    min-height: 0;
    overflow-x: hidden !important;
    max-width: 100% !important;
    z-index: 1; /* ✅ z-index پایین */
}

/* ============================================ */
/* تاپبار - z-index بالا */
/* ============================================ */
.topbar {
    background: linear-gradient(90deg, #0b4f8a, #1565a9);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 70px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    flex-shrink: 0;
    position: relative;
    z-index: 100; /* ✅ z-index بالا برای تاپبار */
}

/* ============================================ */
/* منوی کاربری container */
/* ============================================ */
.user-menu-container {
    position: relative;
    display: inline-block;
    z-index: 9999; /* ✅ z-index بسیار بالا */
}

/* ============================================ */
/* لودر */
/* ============================================ */
.loader-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.92);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10;
    flex-direction: column;
    gap: 16px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #1565a9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-text {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-size: 15px;
    color: #0b4f8a;
    font-weight: 500;
}

/* ============================================ */
/* پنل جعبه ابزار */
/* ============================================ */
#toolboxPanel {
    display: none;
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 5;
    padding: 30px 20px;
    text-align: center;
    min-height: 300px;
    overflow-y: auto;
}

    #toolboxPanel .toolbox-inner {
        max-width: 550px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 100%;
    }

    #toolboxPanel .toolbox-header {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        margin-bottom: 25px;
        padding-bottom: 12px;
        border-bottom: 2px solid #e8f0fe;
    }

    #toolboxPanel .toolbox-icon {
        font-size: 36px;
        display: inline-block;
        line-height: 1;
    }

    #toolboxPanel .toolbox-header h3 {
        color: #0b4f8a;
        font-size: 20px;
        margin: 0;
        font-weight: 700;
    }

    #toolboxPanel .toolbox-buttons {
        display: flex;
        gap: 16px;
        justify-content: center;
        flex-wrap: wrap;
    }

    #toolboxPanel .toolbox-btn-main {
        padding: 18px 22px;
        border: none;
        border-radius: 14px;
        font-size: 16px;
        font-weight: bold;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 200px;
        max-width: 240px;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        line-height: 1.4;
    }

        #toolboxPanel .toolbox-btn-main:hover {
            transform: translateY(-3px);
        }

    #toolboxPanel .toolbox-btn-linkduni {
        background: linear-gradient(135deg, #0b4f8a, #1565a9);
        color: white;
        box-shadow: 0 4px 15px rgba(11, 79, 138, 0.3);
    }

        #toolboxPanel .toolbox-btn-linkduni:hover {
            box-shadow: 0 6px 25px rgba(11, 79, 138, 0.4);
        }

        #toolboxPanel .toolbox-btn-linkduni .toolbox-btn-sub {
            display: block;
            font-size: 11px;
            font-weight: 400;
            color: rgba(255,255,255,0.85);
            margin-top: 2px;
            line-height: 1.5;
        }

        #toolboxPanel .toolbox-btn-linkduni .toolbox-btn-free {
            display: inline-block;
            font-size: 10px;
            font-weight: 700;
            color: #ffd700;
            background: rgba(255,215,0,0.2);
            padding: 2px 12px;
            border-radius: 20px;
            margin-top: 4px;
        }

    #toolboxPanel .toolbox-btn-download {
        background: linear-gradient(135deg, #e8e8e8, #d5d5d5);
        color: #555;
        box-shadow: none;
        cursor: not-allowed;
        opacity: 0.7;
    }

        #toolboxPanel .toolbox-btn-download:hover {
            transform: none;
            box-shadow: none;
        }

        #toolboxPanel .toolbox-btn-download .toolbox-btn-main-icon {
            font-size: 22px;
        }

        #toolboxPanel .toolbox-btn-download .toolbox-btn-title {
            font-size: 16px;
            font-weight: 700;
            color: #444;
        }

        #toolboxPanel .toolbox-btn-download .toolbox-btn-sub {
            display: block;
            font-size: 11px;
            font-weight: 400;
            color: #888;
            margin-top: 2px;
            line-height: 1.5;
        }

        #toolboxPanel .toolbox-btn-download .toolbox-btn-badge {
            display: inline-block;
            font-size: 9px;
            font-weight: 700;
            color: #fff;
            background: #22c55e;
            padding: 2px 12px;
            border-radius: 20px;
            margin-top: 4px;
        }

/* ============================================ */
/* صفحات Login, Register, Forgot */
/* ============================================ */
.login-page, .register-page, .forgot-page {
    display: none;
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #f0f4ff, #ffffff);
    z-index: 10;
    padding: 40px 20px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    overflow-y: auto;
}

    .login-page.show, .register-page.show, .forgot-page.show {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

.login-box, .register-box, .forgot-box {
    background: white;
    border-radius: 20px;
    padding: 30px 28px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
}

    .login-box .login-icon, .register-box .register-icon, .forgot-box .forgot-icon {
        font-size: 48px;
        margin-bottom: 8px;
    }

    .login-box h2, .register-box h2, .forgot-box h2 {
        color: #0b4f8a;
        font-size: 20px;
        margin-bottom: 4px;
    }

    .login-box .subtitle, .register-box .subtitle, .forgot-box .subtitle {
        color: #888;
        font-size: 13px;
        margin-bottom: 18px;
    }

    .login-box .form-group, .register-box .form-group, .forgot-box .form-group {
        margin-bottom: 14px;
        text-align: right;
    }

        .login-box .form-group label, .register-box .form-group label, .forgot-box .form-group label {
            display: block;
            font-weight: 600;
            font-size: 13px;
            color: #333;
            margin-bottom: 4px;
        }

        .login-box .form-group input, .register-box .form-group input, .forgot-box .form-group input {
            width: 100%;
            padding: 10px 14px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-size: 14px;
            font-family: 'Vazirmatn', Tahoma, sans-serif;
            transition: border-color 0.3s;
            box-sizing: border-box;
            background: #f8fafc;
            direction: ltr;
            text-align: left;
        }

            .login-box .form-group input:focus, .register-box .form-group input:focus, .forgot-box .form-group input:focus {
                border-color: #0b4f8a;
                outline: none;
                background: white;
            }

            .login-box .form-group input::placeholder, .register-box .form-group input::placeholder, .forgot-box .form-group input::placeholder {
                direction: rtl;
                text-align: right;
            }

    .login-box .remember-me {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 10px 0;
        font-size: 13px;
        color: #555;
        flex-wrap: wrap;
        gap: 8px;
    }

        .login-box .remember-me label {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
        }

        .login-box .remember-me a {
            color: #0b4f8a;
            text-decoration: none;
            cursor: pointer;
            font-size: 12px;
        }

            .login-box .remember-me a:hover {
                text-decoration: underline;
            }

    .login-box .btn-login, .register-box .btn-register, .forgot-box .btn-register {
        width: 100%;
        padding: 12px;
        background: linear-gradient(135deg, #0b4f8a, #1565a9);
        color: white;
        border: none;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 700;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        cursor: pointer;
        transition: transform 0.2s, box-shadow 0.2s;
        box-shadow: 0 4px 15px rgba(11, 79, 138, 0.3);
    }

        .login-box .btn-login:hover, .register-box .btn-register:hover, .forgot-box .btn-register:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 25px rgba(11, 79, 138, 0.4);
        }

    .login-box .auth-switch, .register-box .auth-switch, .forgot-box .auth-switch {
        margin-top: 14px;
        font-size: 13px;
        color: #666;
    }

        .login-box .auth-switch a, .register-box .auth-switch a, .forgot-box .auth-switch a {
            color: #0b4f8a;
            font-weight: 600;
            text-decoration: none;
            cursor: pointer;
        }

            .login-box .auth-switch a:hover, .register-box .auth-switch a:hover, .forgot-box .auth-switch a:hover {
                text-decoration: underline;
            }

    .login-box .message, .register-box .message, .forgot-box .message {
        margin-top: 12px;
        padding: 8px 14px;
        border-radius: 8px;
        font-size: 13px;
        display: none;
    }

        .login-box .message.success, .register-box .message.success, .forgot-box .message.success {
            display: block;
            background: #e8f5e9;
            color: #2e7d32;
            border: 1px solid #a5d6a7;
        }

        .login-box .message.error, .register-box .message.error, .forgot-box .message.error {
            display: block;
            background: #fde8e8;
            color: #c62828;
            border: 1px solid #ef9a9a;
        }

    .register-box .password-hint {
        font-size: 11px;
        color: #888;
        text-align: right;
        margin-top: 4px;
    }

        .register-box .password-hint ul {
            margin: 4px 0 0 0;
            padding-right: 20px;
        }

        .register-box .password-hint li {
            list-style: none;
            font-size: 11px;
            color: #999;
            text-align: right;
        }

            .register-box .password-hint li.valid {
                color: #2e7d32;
            }

            .register-box .password-hint li.invalid {
                color: #c62828;
            }

    .register-box .code-group, .forgot-box .code-group {
        display: flex;
        gap: 10px;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
    }

        .register-box .code-group input, .forgot-box .code-group input {
            flex: 2;
            max-width: 200px;
            min-width: 160px;
            text-align: center;
            font-size: 20px;
            letter-spacing: 8px;
            padding: 12px 10px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-weight: bold;
            font-family: monospace;
            direction: ltr;
            background: #f8fafc;
        }

            .register-box .code-group input:focus, .forgot-box .code-group input:focus {
                border-color: #22c55e;
                outline: none;
                box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
            }

        .register-box .code-group button, .forgot-box .code-group button {
            flex: 1;
            max-width: 100px;
            background: #22c55e;
            margin-top: 0;
            color: white;
            border: none;
            padding: 12px 15px;
            border-radius: 10px;
            cursor: pointer;
            font-weight: bold;
            font-size: 14px;
            transition: all 0.2s;
        }

            .register-box .code-group button:hover, .forgot-box .code-group button:hover {
                background: #16a34a;
            }

    .register-box .code-hint, .forgot-box .code-hint {
        font-size: 12px;
        color: #888;
        margin-top: 10px;
    }

    .register-box .resend-link, .forgot-box .resend-link {
        color: #0b4f8a;
        cursor: pointer;
        font-size: 12px;
        text-decoration: none;
    }

        .register-box .resend-link:hover, .forgot-box .resend-link:hover {
            text-decoration: underline;
        }

/* ============================================ */
/* پنل کاربری (مجموعه‌ها و دامنه‌ها) */
/* ============================================ */
.user-panel {
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 5;
    padding: 20px 15px;
    overflow-y: auto;
    display: none;
    cursor: default;
}

    .user-panel.show {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .user-panel .panel-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        flex-wrap: wrap;
        gap: 8px;
    }

        .user-panel .panel-header h2 {
            color: #0b4f8a;
            font-size: 17px;
            margin: 0;
        }

        .user-panel .panel-header h3 {
            color: #0b4f8a;
            font-size: 16px;
            margin: 0;
        }

/* ============================================ */
/* راهنماها - یکپارچه */
/* ============================================ */
.guide-box {
    background: linear-gradient(135deg, #f0f7ff, #e3eef9);
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
    border-right: 4px solid #0b4f8a;
    box-shadow: 0 2px 8px rgba(11, 79, 138, 0.08);
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
    transition: all 0.3s ease;
}

.guide-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    cursor: pointer !important;
    padding: 6px 0 !important;
    user-select: none;
}

    .guide-header:hover {
        opacity: 0.8;
    }

    .guide-header div {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

#guideContent {
    padding-top: 12px !important;
    border-top: 2px dashed #c5d5e8 !important;
    margin-top: 8px !important;
    animation: slideDown 0.3s ease;
}

    #guideContent p {
        margin-bottom: 10px !important;
        font-size: 14px !important;
        color: #333 !important;
        line-height: 1.9 !important;
        text-align: justify !important;
    }

    #guideContent strong {
        color: #0b4f8a !important;
        font-weight: 700 !important;
        display: inline !important;
    }

    #guideContent .tip-box {
        background: #e8f0fe !important;
        border-radius: 8px !important;
        padding: 10px 12px !important;
        margin-top: 6px !important;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/* مجموعه‌ها */
/* ============================================ */
.collection-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    transition: all 0.2s;
    gap: 10px;
}

    .collection-item:hover {
        background: #e8f0f8;
        border-color: #0b4f8a;
    }

    .collection-item.active {
        background: #0b4f8a;
        border-color: #0b4f8a;
    }

        .collection-item.active .collection-title {
            color: white;
        }

        .collection-item.active .collection-meta {
            color: rgba(255, 255, 255, 0.8);
        }

.collection-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.collection-title {
    font-weight: 700;
    font-size: 14px;
    color: #0b4f8a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-meta {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-badge {
    display: inline-block;
    background: #22c55e;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
}

.collection-actions {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0;
    margin-right: 5px;
}

    .collection-actions button,
    .domain-actions button {
        position: relative;
        cursor: pointer;
        flex-shrink: 0;
        min-width: 32px;
        min-height: 32px;
        font-size: 16px !important;
        padding: 4px 8px !important;
        border: none !important;
        border-radius: 6px !important;
        transition: all 0.2s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

.edit-collection-btn {
    background: #17a2b8 !important;
    color: white !important;
}

    .edit-collection-btn:hover {
        background: #138496 !important;
        transform: scale(1.05);
    }

.delete-btn {
    background: #dc3545 !important;
    color: white !important;
}

    .delete-btn:hover {
        background: #c82333 !important;
        transform: scale(1.05);
    }

.edit-btn {
    background: #ffc107 !important;
    color: #333 !important;
}

    .edit-btn:hover {
        background: #e0a800 !important;
        transform: scale(1.05);
    }

.links-btn {
    background: #17a2b8 !important;
    color: white !important;
}

    .links-btn:hover {
        background: #138496 !important;
        transform: scale(1.05);
    }

.collection-actions button[title]:hover::after,
.domain-actions button[title]:hover::after {
    content: attr(title);
    position: fixed;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    font-weight: 400;
    z-index: 10000;
    pointer-events: none;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.collection-actions button[title]:hover::before,
.domain-actions button[title]:hover::before {
    content: '';
    position: fixed;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    pointer-events: none;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.btn-green {
    background: #22c55e;
    color: white;
}

    .btn-green:hover {
        background: #16a34a;
    }

.btn-blue {
    background: #0b4f8a;
    color: white;
}

    .btn-blue:hover {
        background: #1565a9;
    }

.btn-gray {
    background: #6c757d;
    color: white;
}

    .btn-gray:hover {
        background: #5a6268;
    }

.btn-outline {
    background: transparent;
    border: 2px solid #ddd;
    color: #666;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

    .btn-outline:hover {
        border-color: #0b4f8a;
        color: #0b4f8a;
    }

    .btn-outline.active {
        border-color: #0b4f8a;
        background: #0b4f8a;
        color: white;
    }

.form-group-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

    .form-group-inline label {
        min-width: 80px;
        font-weight: 600;
        font-size: 13px;
        color: #333;
    }

    .form-group-inline input,
    .form-group-inline textarea {
        flex: 1;
        min-width: 180px;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 13px;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
    }

        .form-group-inline input:focus,
        .form-group-inline textarea:focus {
            outline: none;
            border-color: #0b4f8a;
        }

.add-form {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    display: none;
}

    .add-form.show {
        display: block;
    }

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

    .form-actions .btn {
        flex: 0 1 auto;
        min-width: 100px;
        padding: 8px 20px;
        font-size: 13px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        font-weight: 600;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        transition: all 0.2s ease;
    }

    .form-actions .btn-blue {
        background: #0b4f8a;
        color: white;
    }

        .form-actions .btn-blue:hover {
            background: #1565a9;
            transform: translateY(-1px);
        }

    .form-actions .btn-gray {
        background: #6c757d;
        color: white;
    }

        .form-actions .btn-gray:hover {
            background: #5a6268;
            transform: translateY(-1px);
        }

.message {
    margin-top: 12px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: none;
}

    .message.success {
        display: block;
        background: #e8f5e9;
        color: #2e7d32;
        border: 1px solid #a5d6a7;
    }

    .message.error {
        display: block;
        background: #fde8e8;
        color: #c62828;
        border: 1px solid #ef9a9a;
    }

#domainPanel {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

    #domainPanel.show {
        display: block;
    }

.domains-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

    .domains-table th,
    .domains-table td {
        border: 1px solid #ddd;
        padding: 8px 10px;
        text-align: right;
        word-break: break-word;
    }

    .domains-table th {
        background: #0b4f8a;
        color: white;
        font-weight: bold;
    }

.domain-status {
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 11px;
    display: inline-block;
    white-space: nowrap;
}

    .domain-status.active {
        background: #e8f5e9;
        color: #2e7d32;
    }

    .domain-status.pending {
        background: #fff3e0;
        color: #e65100;
    }

    .domain-status.expired {
        background: #ffebee;
        color: #c62828;
    }

    .domain-status.rejected {
        background: #ffebee;
        color: #c62828;
    }

    .domain-status.unknown {
        background: #e0e0e0;
        color: #616161;
    }

.domain-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

/* ============================================ */
/* مودال‌ها */
/* ============================================ */
.edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

    .edit-modal.show {
        display: flex;
    }

.edit-modal-content {
    background: white;
    border-radius: 16px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .edit-modal-header h3 {
        color: #0b4f8a;
    }

.links-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

    .links-modal.show {
        display: flex;
    }

.links-modal-content {
    background: white;
    border-radius: 16px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.links-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

    .links-modal-header h3 {
        color: #0b4f8a;
    }

.link-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.link-label {
    min-width: 100px;
    font-weight: bold;
    font-size: 13px;
    color: #0b4f8a;
}

.link-value {
    flex: 1;
    background: #f5f5f5;
    padding: 6px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 11px;
    direction: ltr;
    text-align: left;
    word-break: break-all;
}

.link-row button {
    background: #0b4f8a;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 12px;
}

    .link-row button:hover {
        background: #1565a9;
    }

.show-modal {
    display: flex !important;
}

/* ============================================ */
/* فوتر */
/* ============================================ */
.footer {
    background: #eef2f7;
    border-top: 1px solid #d8dde6;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

    .footer:hover {
        background: #e2e8f0;
    }

.footer-line1 {
    font-size: clamp(13px, 3vw, 16px);
    font-weight: 800;
    color: #0b4f8a;
}

.footer-line2 {
    font-size: clamp(10px, 2.5vw, 12px);
    font-weight: 500;
    color: #555;
}

/* ============================================ */
/* پیام ثابت */
/* ============================================ */
.fixed-message-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    width: 90%;
    max-width: 500px;
    text-align: center;
    pointer-events: none;
}

.fixed-message {
    background: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    margin-bottom: 10px;
    pointer-events: auto;
}

    .fixed-message.success {
        background: #2e7d32;
    }

    .fixed-message.error {
        background: #c62828;
    }

/* ============================================ */
/* لینک کانال در تاپبار */
/* ============================================ */
.channel-link-container {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px 4px 6px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    margin-left: 8px;
}

    .channel-link-container:hover {
        background: rgba(255, 255, 255, 0.18);
        border-color: rgba(255, 255, 255, 0.25);
    }

.channel-link-display {
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    direction: ltr;
    text-align: left;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

    .channel-link-display:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    .channel-link-display .channel-edit-icon {
        font-size: 12px;
        opacity: 0.6;
        transition: opacity 0.2s;
        margin-right: 2px;
    }

    .channel-link-display:hover .channel-edit-icon {
        opacity: 1;
    }

.channel-share-btn,
.channel-copy-btn {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    font-size: 14px;
    padding: 0;
    flex-shrink: 0;
}

    .channel-share-btn:hover,
    .channel-copy-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        transform: scale(1.05);
    }

    .channel-share-btn:active,
    .channel-copy-btn:active {
        transform: scale(0.95);
    }

/* ============================================ */
/* مودال ویرایش کانال */
/* ============================================ */
#editChannelModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

    #editChannelModal.show {
        display: flex;
    }

    #editChannelModal .edit-modal-content {
        background: white;
        border-radius: 16px;
        padding: 25px;
        max-width: 500px;
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
    }

    #editChannelModal .edit-modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
    }

        #editChannelModal .edit-modal-header h3 {
            color: #0b4f8a;
        }

/* ============================================ */
/* آکاردئون مجموعه‌ها */
/* ============================================ */
.collection-accordion {
    margin-bottom: 8px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #fff;
}

.collection-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    transition: all 0.2s;
    gap: 10px;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
    border: none;
}

    .collection-item:hover {
        background: #e8f0f8;
    }

.accordion-arrow {
    font-size: 14px;
    color: #0b4f8a;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.accordion-content {
    display: none;
    background: #fafbfc;
    padding: 0;
    animation: slideDown 0.3s ease;
}

.accordion-inner {
    padding: 12px 14px;
    border-top: 2px solid #e0e0e0;
}

/* ============================================ */
/* باکس افزودن دامنه در آکاردئون */
/* ============================================ */
.domain-add-box {
    background: #f0f7ff;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #d5e5f5;
    overflow: hidden;
}

.domain-add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    color: #0b4f8a;
    transition: background 0.2s;
}

    .domain-add-header:hover {
        background: rgba(11, 79, 138, 0.05);
    }

    .domain-add-header .toggle-icon {
        font-size: 12px;
        transition: transform 0.3s ease;
    }

.domain-add-form {
    padding: 12px 14px 14px;
    border-top: 1px solid #d5e5f5;
    background: white;
}

    .domain-add-form .form-group-inline {
        margin-bottom: 8px;
    }

        .domain-add-form .form-group-inline label {
            min-width: 100px;
            font-size: 12px;
        }

        .domain-add-form .form-group-inline input {
            padding: 6px 10px;
            font-size: 12px;
        }

    .domain-add-form .form-actions {
        margin-top: 6px;
    }

        .domain-add-form .form-actions .btn {
            padding: 6px 16px;
            font-size: 12px;
        }

/* ============================================ */
/* لیست دامنه‌ها در آکاردئون */
/* ============================================ */
.domains-list-container {
    margin-top: 4px;
}

.domains-loading {
    text-align: center;
    padding: 15px;
    color: #888;
    font-size: 13px;
}

.domains-list-container .domains-table {
    font-size: 12px;
    margin-top: 0;
}

    .domains-list-container .domains-table th,
    .domains-list-container .domains-table td {
        padding: 6px 8px;
    }

    .domains-list-container .domains-table th {
        background: #0b4f8a;
        color: white;
        font-size: 11px;
    }

    .domains-list-container .domains-table td {
        font-size: 11px;
    }

.domains-list-container .domain-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
}

    .domains-list-container .domain-actions button {
        font-size: 12px !important;
        padding: 2px 8px !important;
        min-width: 28px !important;
        min-height: 28px !important;
    }

/* ============================================ */
/* کنترل پنل - شبکه ۳ ستونه */
/* ============================================ */
#panelMainMenu {
    display: block;
    width: 100%;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.panel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
    background: #ffffff;
    border: 2px solid #e8edf4;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 160px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    position: relative;
}

    .panel-card:hover:not(.disabled) {
        border-color: #0b4f8a;
        background: #f0f5ff;
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(11, 79, 138, 0.12);
    }

    .panel-card.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        filter: grayscale(0.3);
    }

        .panel-card.disabled:hover {
            transform: none;
            box-shadow: none;
        }

.panel-card-icon {
    font-size: 36px;
    margin-bottom: 8px;
    line-height: 1;
}

.panel-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0b4f8a;
    line-height: 1.3;
    margin-bottom: 2px;
}

.panel-card-desc {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
    margin-bottom: 4px;
}

.panel-card-badge {
    display: inline-block;
    font-size: 9px;
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 600;
    margin-top: 2px;
    line-height: 1.6;
}

    .panel-card-badge.free {
        color: #2e7d32;
        background: #e8f5e9;
    }

    .panel-card-badge.soon {
        color: #e65100;
        background: #fff3e0;
    }

    .panel-card-badge.disabled {
        color: #999;
        background: #f0f0f0;
    }

.panel-card-arrow {
    font-size: 14px;
    color: #ccc;
    margin-top: 6px;
    transition: transform 0.3s ease;
}

.panel-card:hover:not(.disabled) .panel-card-arrow {
    color: #0b4f8a;
    transform: translateX(4px);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
    height: 38px;
}

    .section-header .back-btn {
        background: none;
        border: none;
        color: #0b4f8a;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        padding: 4px 10px;
        border-radius: 6px;
        transition: background 0.2s;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        height: 32px;
        display: flex;
        align-items: center;
        white-space: nowrap;
    }

        .section-header .back-btn:hover {
            background: #f0f5ff;
        }

    .section-header h3 {
        margin: 0;
        color: #0b4f8a;
        font-size: 15px;
        font-weight: 700;
        white-space: nowrap;
    }

/* ============================================ */
/* مرکز دانلود - بخش اصلی */
/* ============================================ */
.download-panel-content,
.resume-panel-content,
.stats-panel-content {
    animation: fadeIn 0.3s ease;
}

/* ============================================ */
/* باکس فضای ذخیره‌سازی */
/* ============================================ */
.storage-info-box {
    background: linear-gradient(135deg, #f0f7ff, #e3eef9);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 12px;
    border-right: 4px solid #0b4f8a;
}

.storage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #0b4f8a;
    flex-wrap: wrap;
    gap: 4px;
}

.storage-level {
    font-size: 11px;
    background: #0b4f8a;
    color: white;
    padding: 1px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.storage-bar-container {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}

.storage-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 10px;
    transition: width 0.5s ease;
}

    .storage-bar.warning {
        background: linear-gradient(90deg, #f59e0b, #d97706);
    }

    .storage-bar.danger {
        background: linear-gradient(90deg, #ef4444, #dc2626);
    }

.storage-details {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #555;
    justify-content: flex-start;
    flex-wrap: wrap;
}

    .storage-details span {
        background: rgba(255,255,255,0.6);
        padding: 2px 10px;
        border-radius: 12px;
        font-weight: 500;
    }

.storage-used-text {
    font-weight: 700;
    color: #0b4f8a;
    font-size: 14px;
}

.storage-total-text {
    font-size: 12px;
    color: #888;
    margin-right: 6px;
}

/* ============================================ */
/* نوار ابزار دانلود */
/* ============================================ */
.download-toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

/* ============================================ */
/* Breadcrumb با دکمه پوشه جدید */
/* ============================================ */
.breadcrumb-container {
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 44px;
}

.breadcrumb-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.breadcrumb-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
}

.breadcrumb-add-btn {
    padding: 4px 12px !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
}

    .breadcrumb-add-btn span {
        font-size: 14px !important;
    }

.breadcrumb-label {
    color: #666;
    font-weight: 600;
    font-size: 12px;
}

.breadcrumb-items {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.breadcrumb-item {
    color: #0b4f8a;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 12px;
}

    .breadcrumb-item:hover {
        background: #e8f0fe;
    }

    .breadcrumb-item.active {
        font-weight: 700;
        color: #0b4f8a;
    }

.breadcrumb-separator {
    color: #ccc;
    margin: 0 2px;
    font-size: 12px;
}

/* ============================================ */
/* درخت دانلود */
/* ============================================ */
.download-tree-container {
    margin-top: 10px;
    min-height: 200px;
}

    .download-tree-container .loading {
        text-align: center;
        padding: 30px;
        color: #888;
        font-size: 14px;
    }

/* ============================================ */
/* گره‌های درخت - تاریخ و اندازه زیر هم */
/* ============================================ */
.download-node {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
    cursor: default;
    flex-wrap: wrap;
    gap: 6px;
}

    .download-node.clickable {
        cursor: pointer;
    }

        .download-node.clickable:hover {
            background: #f0f5ff;
            border-color: #0b4f8a;
        }

    .download-node.folder {
        border-right: 3px solid #f59e0b;
        background: #fefcf5;
    }

        .download-node.folder:hover {
            background: #fdf6e3;
        }

    .download-node.file {
        border-right: 3px solid #0b4f8a;
        background: #f8faff;
    }

        .download-node.file:hover {
            background: #f0f5ff;
        }

    .download-node.expanded {
        background: #f0f7ff;
    }

    .download-node.inactive {
        opacity: 0.5;
    }

.download-node-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 2;
    min-width: 200px;
}

.toggle-icon {
    display: inline-block;
    width: 20px;
    font-size: 12px;
    color: #0b4f8a;
    cursor: pointer;
    flex-shrink: 0;
    text-align: center;
    user-select: none;
    transition: transform 0.2s;
}

    .toggle-icon:hover {
        color: #1565a9;
        font-weight: bold;
    }

.download-node.expanded .toggle-icon {
    transform: rotate(0deg);
}

.download-node:not(.expanded) .toggle-icon {
    transform: rotate(-90deg);
}

.download-node-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.download-node-title-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}

.download-node-title {
    font-size: 14px;
    font-weight: 500;
    color: #0b4f8a;
    cursor: default;
    user-select: none;
}

.download-node.file .download-node-title {
    cursor: default;
}

    .download-node.file .download-node-title:hover {
        text-decoration: none;
    }

/* ============================================ */
/* ستون تاریخ و اندازه - زیر هم (عمودی) */
/* ============================================ */
.download-node-date-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex: 0 1 auto;
    min-width: 100px;
    padding: 0 4px;
}

    .download-node-date-col span {
        font-size: 11px;
        color: #555;
        white-space: nowrap;
        direction: ltr;
        text-align: left;
    }

.download-node-date {
    color: #444 !important;
    font-weight: 500;
    font-size: 11px !important;
}

.download-node-size {
    color: #666 !important;
    font-size: 10px !important;
}

.download-node-count {
    color: #0b4f8a !important;
    font-weight: 600;
    font-size: 10px !important;
}

.download-node-private {
    color: #c62828 !important;
    font-weight: 500;
    font-size: 10px !important;
}

/* ============================================ */
/* دکمه‌های عملیات - فقط ویرایش و حذف برای فایل‌ها */
/* ============================================ */
.download-node-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

    .icon-btn .icon-text {
        display: none;
    }

    .icon-btn:hover {
        background: rgba(0,0,0,0.05);
        transform: scale(1.05);
    }

        .icon-btn:hover::after {
            content: attr(title);
            position: absolute;
            bottom: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.85);
            color: white;
            padding: 4px 12px;
            border-radius: 6px;
            font-size: 11px;
            white-space: nowrap;
            z-index: 100;
            font-weight: 400;
            font-family: 'Vazirmatn', Tahoma, sans-serif;
        }

        .icon-btn:hover::before {
            content: '';
            position: absolute;
            bottom: calc(100% + 2px);
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: rgba(0, 0, 0, 0.85);
            z-index: 100;
        }

    .icon-btn.delete:hover {
        background: #fde8e8;
        color: #c62828;
    }

    .icon-btn.edit:hover {
        background: #fff3e0;
        color: #e65100;
    }

    .icon-btn.upload:hover {
        background: #e3f2fd;
        color: #0b4f8a;
    }

    .icon-btn.add-subfolder:hover {
        background: #f3e5f5;
        color: #7b1fa2;
    }

/* ============================================ */
/* فرزندان پوشه */
/* ============================================ */
.download-children {
    margin-right: 25px;
    border-right: 2px solid #e9ecef;
    padding-right: 10px;
    display: block;
}

.empty-folder {
    color: #999 !important;
    font-size: 12px !important;
    padding: 6px 12px !important;
    border-right: 2px dashed #e0e0e0 !important;
    margin-right: 5px !important;
    background: #fafafa !important;
    border-radius: 4px !important;
    margin-bottom: 4px !important;
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================ */
/* توضیحات فایل */
/* ============================================ */
.file-description {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    max-width: 100%;
}

.file-description-text {
    overflow: hidden;
    transition: max-height 0.3s ease;
    line-height: 1.5;
    font-size: 12px;
    color: #555;
    direction: rtl;
    text-align: right;
    padding-right: 4px;
}

    .file-description-text.collapsed {
        max-height: 4.5em;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .file-description-text:not(.collapsed) {
        max-height: none;
    }

.desc-toggle-btn {
    background: none;
    border: none;
    color: #0b4f8a;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    margin-top: 2px;
}

    .desc-toggle-btn:hover {
        background: #e8f0fe;
        color: #0d3f75;
    }

/* ============================================ */
/* فرم آپلود فایل */
/* ============================================ */
.upload-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.upload-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .upload-field label {
        font-size: 12px;
        font-weight: 600;
        color: #333;
    }

    .upload-field input,
    .upload-field select {
        padding: 6px 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 12px;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        background: white;
        width: 100%;
    }

        .upload-field input:focus,
        .upload-field select:focus {
            outline: none;
            border-color: #0b4f8a;
            box-shadow: 0 0 0 2px rgba(11, 79, 138, 0.1);
        }

        .upload-field input[type="file"] {
            padding: 4px;
            border: 1px dashed #bbb;
            background: #fafafa;
            cursor: pointer;
        }

.upload-hint {
    font-size: 11px;
    color: #888;
    padding: 4px 0 8px 0;
    border-bottom: 1px dashed #e0e0e0;
    margin-bottom: 8px;
}

.required-star {
    color: #c62828;
    font-weight: 700;
}

/* ============================================ */
/* دکمه بازگشت به والد */
/* ============================================ */
#btnGoToParent {
    background: #0b4f8a;
    color: white;
    border: none;
    padding: 4px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    display: none;
}

    #btnGoToParent:hover {
        background: #1565a9;
        transform: translateY(-1px);
    }

    #btnGoToParent:active {
        transform: translateY(0);
    }

/* ============================================ */
/* هدر پنل - یکپارچه */
/* ============================================ */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8edf4;
    flex-wrap: wrap;
    gap: 8px;
}

.panel-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .panel-header-left h2 {
        color: #0b4f8a;
        font-size: 17px;
        margin: 0;
    }

.panel-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================ */
/* انیمیشن‌ها */
/* ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.add-sub-collection-btn {
    color: #2e7d32;
    font-size: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

    .add-sub-collection-btn:hover {
        background: #e8f5e9;
    }

.collection-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* ============================================ */
/* دکمه‌های عملیات - موبایل */
/* ============================================ */
@media (max-width: 768px) {
    .icon-btn {
        padding: 4px 10px;
        font-size: 12px;
        border: 1px solid #e0e0e0;
        border-radius: 6px;
        background: #f8f9fa;
    }

        .icon-btn .icon-label {
            font-size: 14px;
        }

        .icon-btn .icon-text {
            display: inline-block;
            font-size: 10px;
            font-weight: 500;
            color: #555;
        }

        .icon-btn:hover::after,
        .icon-btn:hover::before {
            display: none;
        }

        .icon-btn.delete {
            border-color: #fde8e8;
        }

            .icon-btn.delete .icon-text {
                color: #c62828;
            }

        .icon-btn.edit {
            border-color: #fff3e0;
        }

            .icon-btn.edit .icon-text {
                color: #e65100;
            }

        .icon-btn.upload {
            border-color: #e3f2fd;
        }

            .icon-btn.upload .icon-text {
                color: #0b4f8a;
            }

        .icon-btn.add-subfolder {
            border-color: #f3e5f5;
        }

            .icon-btn.add-subfolder .icon-text {
                color: #7b1fa2;
            }
}

@media (max-width: 480px) {
    .icon-btn {
        padding: 3px 6px;
        font-size: 10px;
    }

        .icon-btn .icon-label {
            font-size: 12px;
        }

        .icon-btn .icon-text {
            font-size: 8px;
        }
}

/* ============================================ */
/* دسکتاپ - دکمه‌ها به صورت افقی */
/* ============================================ */
@media (min-width: 769px) {
    .domain-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 4px !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
    }

    .collection-actions {
        display: flex !important;
        flex-direction: row !important;
        gap: 5px !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
    }

        .collection-actions button,
        .domain-actions button {
            font-size: 16px !important;
            padding: 4px 8px !important;
            min-width: 32px !important;
            min-height: 32px !important;
            width: auto !important;
        }

            .collection-actions button::after,
            .domain-actions button::after {
                content: none !important;
            }
}

/* ============================================ */
/* ریسپانسیو - تبلت و موبایل */
/* ============================================ */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        display: none;
    }

 

    .topbar-right {
        font-size: clamp(14px, 3.5vw, 20px) !important;
        max-width: 100% !important;
        text-align: center !important;
        width: 100% !important;
        order: 1 !important;
        margin-bottom: 2px !important;
    }

    .topbar-left {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        order: 2 !important;
    }

        .topbar-left img {
            height: clamp(35px, 5vh, 45px) !important;
            order: 1 !important;
        }

        .topbar-left a {
            order: 1 !important;
        }

        .topbar-left .user-menu-container {
            order: 2 !important;
            display: flex !important;
            align-items: center !important;
        }

    .profile-menu-btn {
        min-width: 80px !important;
        width: auto !important;
        padding: 5px 12px !important;
        border-radius: 20px !important;
        gap: 6px !important;
        background: rgba(255, 255, 255, 0.15) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        white-space: nowrap !important;
        overflow: visible !important;
        height: auto !important;
        position: relative !important;
        right: auto !important;
        left: auto !important;
    }

    .profile-label-mobile {
        display: inline-block !important;
        white-space: nowrap !important;
        font-size: 12px !important;
        color: white !important;
        font-weight: 500 !important;
    }

    .profile-menu-btn .profile-icon {
        font-size: 34px !important;
        line-height: 1 !important;
        display: inline-block !important;
        text-align: center !important;
    }

    /* ✅ وقتی عکس پروفایل نمایش داده می‌شود، آیکون پیش‌فرض مخفی شود */
    .profile-menu-btn.has-profile-image .profile-icon {
        display: none !important;
    }

    .profile-menu-btn.guest::after {
        display: none !important;
    }

    .profile-menu-btn.hidden-mobile {
        display: none !important;
    }

    .user-name-display {
        display: none !important;
    }

        .user-name-display.show {
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
            color: white !important;
            font-size: 13px !important;
            font-weight: 500 !important;
            background: rgba(255, 255, 255, 0.12) !important;
            padding: 4px 14px 4px 4px !important;
            border-radius: 30px !important;
            border: 1px solid rgba(255, 255, 255, 0.15) !important;
            cursor: pointer !important;
            transition: all 0.3s ease !important;
            order: 2 !important;
        }

        .user-name-display .avatar {
            width: 28px !important;
            height: 28px !important;
            border-radius: 50% !important;
            background: rgba(255, 255, 255, 0.2) !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            font-size: 14px !important;
        }

        .user-name-display .name {
            white-space: nowrap !important;
            max-width: 80px !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
            font-size: 12px !important;
        }

    .mobile-header {
        display: none !important;
    }

    .mobile-toolbar {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 5px !important;
        padding: 6px 8px !important;
        background: linear-gradient(90deg, #f7f7f7, #ffffff);
        border-bottom: 1px solid #ddd;
        flex-shrink: 0;
        overflow: visible !important;
        max-height: none !important;
    }

        .mobile-toolbar button {
            font-size: 10px !important;
            padding: 4px 8px !important;
            gap: 3px !important;
            border-radius: 30px !important;
            border: 1px solid #d7d7d7 !important;
            background: #ffffff !important;
            color: #222 !important;
            white-space: nowrap !important;
        }

            .mobile-toolbar button span {
                font-size: 13px !important;
            }

        .mobile-toolbar .toolbox-mobile {
            background: linear-gradient(135deg, #22c55e, #16a34a) !important;
            color: white !important;
            border: none !important;
        }

            .mobile-toolbar .toolbox-mobile:hover {
                background: linear-gradient(135deg, #1eae56, #128c3e) !important;
            }

    .main-content {
        height: 100vh;
    }

    .placeholder img {
        width: 75%;
    }

    .footer {
        padding: 6px 10px;
        gap: 2px;
    }

    .footer-line1 {
        font-size: 11px;
    }

    .footer-line2 {
        font-size: 9px;
    }

    #toolboxPanel {
        padding: 10px 15px !important;
        padding-top: 5px !important;
        margin: 0 !important;
    }

        #toolboxPanel .toolbox-inner {
            justify-content: flex-start !important;
            padding-top: 5px !important;
        }

        #toolboxPanel .toolbox-header {
            margin-bottom: 15px !important;
            padding-bottom: 8px !important;
            gap: 8px !important;
        }

        #toolboxPanel .toolbox-icon {
            font-size: 24px !important;
        }

        #toolboxPanel .toolbox-header h3 {
            font-size: 15px !important;
            margin: 0 !important;
        }

        #toolboxPanel .toolbox-btn-main {
            min-width: 120px !important;
            max-width: 100% !important;
            padding: 12px 14px !important;
            font-size: 13px !important;
        }

    .login-page, .register-page, .forgot-page {
        padding: 20px 10px !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .login-box, .register-box, .forgot-box {
        padding: 20px 16px !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 10px !important;
        border-radius: 16px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

        .login-box .login-icon, .register-box .register-icon, .forgot-box .forgot-icon {
            font-size: 32px !important;
            margin-bottom: 4px !important;
        }

        .login-box h2, .register-box h2, .forgot-box h2 {
            font-size: 17px !important;
            margin-bottom: 2px !important;
        }

        .login-box .subtitle, .register-box .subtitle, .forgot-box .subtitle {
            font-size: 12px !important;
            margin-bottom: 12px !important;
        }

        .login-box .form-group, .register-box .form-group, .forgot-box .form-group {
            margin-bottom: 10px !important;
        }

            .login-box .form-group label, .register-box .form-group label, .forgot-box .form-group label {
                font-size: 12px !important;
            }

            .login-box .form-group input, .register-box .form-group input, .forgot-box .form-group input {
                padding: 8px 12px !important;
                font-size: 13px !important;
                border-radius: 8px !important;
            }

        .login-box .btn-login, .register-box .btn-register, .forgot-box .btn-register {
            padding: 10px !important;
            font-size: 14px !important;
            border-radius: 8px !important;
        }

        .login-box .remember-me {
            font-size: 12px !important;
            margin: 6px 0 !important;
            gap: 4px !important;
        }

        .login-box .auth-switch, .register-box .auth-switch, .forgot-box .auth-switch {
            font-size: 12px !important;
            margin-top: 10px !important;
        }

        .login-box .message, .register-box .message, .forgot-box .message {
            font-size: 12px !important;
            padding: 6px 12px !important;
            margin-top: 8px !important;
        }

    .code-group {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

        .code-group input {
            flex: 2 !important;
            max-width: 160px !important;
            min-width: 120px !important;
            text-align: center !important;
            font-size: 16px !important;
            letter-spacing: 4px !important;
            padding: 10px 8px !important;
            border: 2px solid #e0e0e0 !important;
            border-radius: 8px !important;
            font-weight: bold !important;
            font-family: monospace !important;
            direction: ltr !important;
            background: #f8fafc !important;
        }

        .code-group button {
            flex: 1 !important;
            max-width: 80px !important;
            background: #22c55e !important;
            margin-top: 0 !important;
            color: white !important;
            border: none !important;
            padding: 10px 12px !important;
            border-radius: 8px !important;
            cursor: pointer !important;
            font-weight: bold !important;
            font-size: 13px !important;
            transition: all 0.2s !important;
        }

            .code-group button:hover {
                background: #16a34a !important;
            }

    .resend-link {
        color: #0b4f8a !important;
        cursor: pointer !important;
        font-size: 11px !important;
        text-decoration: none !important;
    }

        .resend-link:hover {
            text-decoration: underline !important;
        }

    .domain-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
    }

    .collection-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        align-items: center !important;
        justify-content: center !important;
        flex-wrap: nowrap !important;
    }

        .collection-actions button,
        .domain-actions button {
            font-size: 10px !important;
            padding: 3px 10px !important;
            min-width: 50px !important;
            min-height: 28px !important;
            gap: 3px !important;
            border-radius: 4px !important;
            font-weight: 500 !important;
            width: 100% !important;
            justify-content: center !important;
        }

            .collection-actions button::after,
            .domain-actions button::after {
                content: attr(data-label) !important;
                font-size: 9px !important;
                margin-right: 2px !important;
            }

            .collection-actions button[title]:hover::after,
            .domain-actions button[title]:hover::after,
            .collection-actions button[title]:hover::before,
            .domain-actions button[title]:hover::before {
                display: none !important;
            }

    .domains-table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        font-size: 11px !important;
    }

        .domains-table tbody,
        .domains-table thead {
            display: table !important;
            width: 100% !important;
        }

        .domains-table tr {
            display: table-row !important;
        }

        .domains-table td,
        .domains-table th {
            display: table-cell !important;
            white-space: nowrap !important;
            padding: 4px 6px !important;
            font-size: 10px !important;
            vertical-align: middle !important;
        }

            .domains-table td:last-child,
            .domains-table th:last-child {
                min-width: 60px !important;
                max-width: 70px !important;
                width: 70px !important;
            }

            .domains-table th:nth-child(3),
            .domains-table td:nth-child(3),
            .domains-table th:nth-child(4),
            .domains-table td:nth-child(4) {
                display: none !important;
            }

    .edit-modal-content {
        max-width: 95%;
        padding: 20px;
    }

    .links-modal-content {
        max-width: 95%;
        padding: 20px;
    }

    .collection-item {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .collection-info {
        width: 100% !important;
    }

    .collection-actions {
        flex-direction: row !important;
        justify-content: flex-start !important;
        gap: 8px !important;
    }

        .collection-actions button {
            width: auto !important;
            min-width: 60px !important;
            padding: 4px 12px !important;
            font-size: 11px !important;
        }

    .panel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .panel-card {
        padding: 16px 12px;
        min-height: 130px;
    }

    .panel-card-icon {
        font-size: 30px;
        margin-bottom: 6px;
    }

    .panel-card-title {
        font-size: 13px;
    }

    .panel-card-desc {
        font-size: 10px;
    }

    .panel-card-badge {
        font-size: 8px;
        padding: 1px 10px;
    }

    .guide-box {
        padding: 6px 12px;
        min-height: 38px;
    }

    .guide-header div span:first-child {
        font-size: 16px !important;
    }

    .guide-header div span:nth-child(2) {
        font-size: 12px !important;
    }

    .storage-details {
        gap: 8px;
        font-size: 11px;
    }

    .breadcrumb-container {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 6px 10px;
    }

    .breadcrumb-left {
        justify-content: flex-start;
    }

    .breadcrumb-right {
        justify-content: flex-start;
    }

    .breadcrumb-add-btn {
        font-size: 11px !important;
        padding: 3px 10px !important;
    }

    .download-node-date-col {
        min-width: 80px;
    }

        .download-node-date-col span {
            font-size: 10px;
        }

    .channel-link-container {
        padding: 2px 6px 2px 4px;
        gap: 4px;
        margin-left: 4px;
        max-width: 160px;
    }

    .channel-link-display {
        font-size: 10px;
        max-width: 80px;
    }

    .channel-share-btn,
    .channel-copy-btn {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .channel-link-display .channel-edit-icon {
        font-size: 10px;
    }

    .file-description {
        font-size: 11px;
    }

    .file-description-text {
        font-size: 11px;
        max-height: 3.8em;
    }

    .desc-toggle-btn {
        font-size: 10px;
        padding: 1px 6px;
    }
}

/* ============================================ */
/* ریسپانسیو - موبایل کوچک */
/* ============================================ */
@media (max-width: 480px) {
    .topbar-right {
        font-size: clamp(12px, 2.5vw, 16px) !important;
    }

    .topbar-left {
        gap: 6px !important;
    }

        .topbar-left img {
            height: 28px !important;
        }

    .profile-menu-btn {
        min-width: 60px !important;
        padding: 3px 8px !important;
        gap: 3px !important;
        font-size: 12px !important;
    }

    .profile-label-mobile {
        font-size: 9px !important;
    }

    .profile-menu-btn .profile-icon {
        font-size: 12px !important;
    }

    .user-name-display.show {
        font-size: 11px !important;
        padding: 3px 10px 3px 3px !important;
    }

    .user-name-display .avatar {
        width: 22px !important;
        height: 22px !important;
        font-size: 11px !important;
    }

    .user-name-display .name {
        max-width: 60px !important;
        font-size: 10px !important;
    }

    .login-box, .register-box, .forgot-box {
        padding: 15px 12px !important;
        margin: 5px !important;
        border-radius: 12px !important;
    }

        .login-box .login-icon, .register-box .register-icon, .forgot-box .forgot-icon {
            font-size: 28px !important;
        }

        .login-box h2, .register-box h2, .forgot-box h2 {
            font-size: 15px !important;
        }

        .login-box .subtitle, .register-box .subtitle, .forgot-box .subtitle {
            font-size: 11px !important;
        }

        .login-box .form-group input, .register-box .form-group input, .forgot-box .form-group input {
            padding: 6px 10px !important;
            font-size: 12px !important;
        }

        .login-box .btn-login, .register-box .btn-register, .forgot-box .btn-register {
            padding: 8px !important;
            font-size: 13px !important;
        }

    .code-group input {
        font-size: 14px !important;
        letter-spacing: 2px !important;
        padding: 8px !important;
        max-width: 120px !important;
        min-width: 80px !important;
    }

    .code-group button {
        font-size: 12px !important;
        padding: 8px 10px !important;
        max-width: 70px !important;
    }

    #toolboxPanel .toolbox-btn-main {
        padding: 10px 12px !important;
        font-size: 12px !important;
        min-width: 100px !important;
    }

    #toolboxPanel .toolbox-header h3 {
        font-size: 13px !important;
    }

    #toolboxPanel .toolbox-icon {
        font-size: 20px !important;
    }

    .mobile-toolbar button {
        padding: 4px 8px !important;
        font-size: 9px !important;
        border-radius: 30px !important;
    }

        .mobile-toolbar button span {
            font-size: 12px !important;
        }

    .spinner {
        width: 40px;
        height: 40px;
        border-width: 3px;
    }

    .footer {
        padding: 4px 8px;
    }

    .footer-line1 {
        font-size: 10px;
    }

    .footer-line2 {
        font-size: 8px;
    }

    .profile-dropdown {
        min-width: 150px;
        left: -5px;
    }

        .profile-dropdown .dropdown-item {
            padding: 8px 12px;
            font-size: 12px;
        }

    .edit-modal-content {
        padding: 15px;
    }

    .links-modal-content {
        padding: 15px;
    }

    .collection-actions button,
    .domain-actions button {
        font-size: 9px !important;
        padding: 2px 8px !important;
        min-width: 40px !important;
        min-height: 24px !important;
    }

        .collection-actions button::after,
        .domain-actions button::after {
            font-size: 8px !important;
        }

    .domains-table td,
    .domains-table th {
        padding: 3px 4px !important;
        font-size: 9px !important;
    }

        .domains-table td:last-child,
        .domains-table th:last-child {
            min-width: 50px !important;
            max-width: 60px !important;
            width: 60px !important;
        }

    .collection-actions {
        flex-direction: column !important;
        gap: 4px !important;
        width: 100% !important;
    }

        .collection-actions button {
            width: 100% !important;
            justify-content: center !important;
        }

    .panel-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .panel-card {
        padding: 12px 8px;
        min-height: 110px;
        border-radius: 10px;
    }

    .panel-card-icon {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .panel-card-title {
        font-size: 11px;
    }

    .panel-card-desc {
        font-size: 9px;
    }

    .panel-card-badge {
        font-size: 7px;
        padding: 1px 8px;
    }

    .panel-card-arrow {
        font-size: 11px;
        margin-top: 4px;
    }

    .guide-box {
        padding: 4px 10px;
        min-height: 34px;
    }

    .guide-header div span:first-child {
        font-size: 14px !important;
    }

    .guide-header div span:nth-child(2) {
        font-size: 11px !important;
    }

    .guide-header div span:last-child {
        font-size: 9px !important;
    }

    .section-header {
        height: 30px;
        gap: 4px;
    }

        .section-header .back-btn {
            font-size: 11px;
            height: 24px;
            padding: 2px 6px;
        }

        .section-header h3 {
            font-size: 12px;
        }

    .storage-details {
        gap: 4px;
        font-size: 10px;
    }

        .storage-details span {
            padding: 1px 6px;
        }

    .breadcrumb-add-btn {
        font-size: 10px !important;
        padding: 2px 8px !important;
    }

        .breadcrumb-add-btn span {
            font-size: 12px !important;
        }

    .download-node-date-col {
        min-width: 60px;
    }

        .download-node-date-col span {
            font-size: 9px;
        }

    .upload-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .upload-form-inline {
        padding: 10px 12px;
        margin: 6px 0 6px 15px;
    }

    .upload-field label {
        font-size: 11px;
    }

    .upload-field input,
    .upload-field select {
        font-size: 11px;
        padding: 5px 8px;
    }

    .upload-hint {
        font-size: 10px;
    }

    .channel-link-container {
        max-width: 120px;
        padding: 2px 4px 2px 3px;
    }

    .channel-link-display {
        font-size: 9px;
        max-width: 60px;
    }

    .channel-share-btn,
    .channel-copy-btn {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .file-description {
        font-size: 10px;
    }

    .file-description-text {
        font-size: 10px;
        max-height: 3.5em;
    }

    .desc-toggle-btn {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* ============================================ */
/* Tooltip */
/* ============================================ */
[data-tooltip] {
    position: relative;
}

    [data-tooltip]:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.85);
        color: white;
        padding: 4px 12px;
        border-radius: 6px;
        font-size: 11px;
        white-space: nowrap;
        z-index: 100;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        font-weight: 400;
    }

    [data-tooltip]:hover::before {
        content: '';
        position: absolute;
        bottom: calc(100% + 2px);
        left: 50%;
        transform: translateX(-50%);
        border: 6px solid transparent;
        border-top-color: rgba(0, 0, 0, 0.85);
        z-index: 100;
    }

    [data-tooltip].tooltip-left:hover::after {
        left: 0;
        transform: translateX(0);
    }

    [data-tooltip].tooltip-left:hover::before {
        left: 20px;
        transform: translateX(0);
    }

    [data-tooltip].tooltip-right:hover::after {
        left: auto;
        right: 0;
        transform: translateX(0);
    }

    [data-tooltip].tooltip-right:hover::before {
        left: auto;
        right: 20px;
        transform: translateX(0);
    }

/* ============================================ */
/* راست‌چین کردن باکس‌های ویرایش پروفایل */
/* ============================================ */
.profile-edit-form .form-group-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
    direction: rtl !important;
}

    .profile-edit-form .form-group-inline label {
        min-width: 100px;
        font-weight: 600;
        font-size: 13px;
        color: #333;
        text-align: right;
    }

    .profile-edit-form .form-group-inline input,
    .profile-edit-form .form-group-inline textarea {
        flex: 1;
        min-width: 180px;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 13px;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        text-align: right !important;
        direction: rtl !important;
    }

/* ============================================ */
/* راست‌چین کردن باکس‌های ویرایش پروفایل */
/* ============================================ */
.profile-edit-form .form-group-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
    direction: rtl !important;
}

    .profile-edit-form .form-group-inline label {
        min-width: 120px;
        font-weight: 600;
        font-size: 13px;
        color: #333;
        text-align: right !important;
        padding-right: 4px;
    }

    .profile-edit-form .form-group-inline input,
    .profile-edit-form .form-group-inline textarea {
        flex: 1;
        min-width: 200px;
        padding: 8px 12px;
        border: 1px solid #ddd;
        border-radius: 8px;
        font-size: 13px;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        text-align: right !important;
        direction: rtl !important;
        background: #f8fafc;
        transition: border-color 0.3s;
    }

        .profile-edit-form .form-group-inline input:focus,
        .profile-edit-form .form-group-inline textarea:focus {
            outline: none;
            border-color: #0b4f8a;
            background: white;
        }

        .profile-edit-form .form-group-inline input::placeholder,
        .profile-edit-form .form-group-inline textarea::placeholder {
            text-align: right !important;
            direction: rtl !important;
            color: #999;
        }

/* ============================================ */
/* استایل مودال هشدار دسترسی */
/* ============================================ */
#channelAccessModal .edit-modal-content {
    animation: fadeIn 0.3s ease;
}

#channelAccessModal .btn {
    transition: all 0.3s ease;
}

    #channelAccessModal .btn:hover {
        transform: translateY(-2px);
    }

#channelAccessModal .btn-blue:hover {
    background: #1565a9;
    box-shadow: 0 4px 15px rgba(11, 79, 138, 0.3);
}

#channelAccessModal .btn-gray:hover {
    background: #5a6268;
}

/* ============================================ */
/* استایل فیلدهای رمز عبور با آیکون چشم در گوشه راست - نسخه نهایی */
/* ============================================ */

.password-group {
    position: relative;
    margin-bottom: 12px !important;
}

.password-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    background: #f8fafc !important;
    border-radius: 8px !important;
    border: 2px solid #e0e0e0 !important;
    transition: border-color 0.3s ease !important;
    overflow: hidden !important;
    direction: rtl !important;
}

    .password-wrapper:focus-within {
        border-color: #0b4f8a !important;
        box-shadow: 0 0 0 3px rgba(11, 79, 138, 0.1) !important;
    }

    .password-wrapper input[type="password"],
    .password-wrapper input[type="text"] {
        flex: 1 !important;
        border: none !important;
        padding: 8px 40px 8px 12px !important;
        font-size: 13px !important;
        font-family: 'Vazirmatn', Tahoma, sans-serif !important;
        background: transparent !important;
        outline: none !important;
        direction: ltr !important;
        text-align: left !important;
        min-height: 38px !important;
        color: #333 !important;
        width: 100% !important;
    }

    .password-wrapper input::placeholder {
        direction: rtl !important;
        text-align: right !important;
        color: #999 !important;
        padding-right: 4px !important;
    }

.toggle-password-btn {
    position: absolute !important;
    right: 8px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 4px 6px !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    color: #888 !important;
    z-index: 5 !important;
}

    .toggle-password-btn:hover {
        background: rgba(0, 0, 0, 0.05) !important;
        color: #0b4f8a !important;
    }

    .toggle-password-btn .eye-icon {
        display: inline-block !important;
        line-height: 1 !important;
        font-size: 20px !important;
        transition: all 0.3s ease !important;
    }

    .toggle-password-btn.active .eye-icon {
        color: #0b4f8a !important;
        transform: scale(1.1) !important;
    }

#regFullName {
    text-align: right !important;
    direction: rtl !important;
}

    #regFullName::placeholder {
        text-align: right !important;
        direction: rtl !important;
    }

.password-strength-bar {
    display: flex !important;
    gap: 4px !important;
    margin-top: 8px !important;
    height: 6px !important;
    border-radius: 3px !important;
    overflow: hidden !important;
}

.strength-segment {
    flex: 1;
    height: 100%;
    background: #e0e0e0;
    border-radius: 2px;
    transition: all 0.4s ease;
}

    .strength-segment.weak {
        background: #ef4444;
    }

    .strength-segment.fair {
        background: #f59e0b;
    }

    .strength-segment.good {
        background: #22c55e;
    }

    .strength-segment.strong {
        background: #16a34a;
    }

.password-strength-text {
    font-size: 11px !important;
    color: #888;
    margin-top: 4px !important;
    text-align: right;
    font-weight: 600;
}

    .password-strength-text.weak {
        color: #ef4444;
    }

    .password-strength-text.fair {
        color: #f59e0b;
    }

    .password-strength-text.good {
        color: #22c55e;
    }

    .password-strength-text.strong {
        color: #16a34a;
    }

.password-hint {
    font-size: 10px !important;
    color: #888;
    text-align: right;
    margin-top: 4px !important;
}

    .password-hint ul {
        margin: 2px 0 0 0 !important;
        padding-right: 16px !important;
        list-style: none;
    }

    .password-hint li {
        list-style: none;
        font-size: 10px !important;
        color: #999;
        text-align: right;
        padding: 1px 0 !important;
        transition: all 0.3s ease;
        line-height: 1.5 !important;
    }

        .password-hint li.valid {
            color: #2e7d32 !important;
            font-weight: 500;
        }

        .password-hint li.invalid {
            color: #c62828 !important;
        }

.password-match-status {
    font-size: 11px !important;
    margin-top: 4px !important;
    text-align: right;
    font-weight: 500;
    min-height: 18px !important;
}

    .password-match-status.match {
        color: #2e7d32;
    }

    .password-match-status.no-match {
        color: #c62828;
    }

    .password-match-status .icon {
        margin-left: 4px;
    }

@media (max-width: 768px) {
    .password-wrapper input[type="password"],
    .password-wrapper input[type="text"] {
        padding: 6px 34px 6px 10px !important;
        font-size: 12px !important;
        min-height: 34px !important;
    }

    .toggle-password-btn {
        right: 6px !important;
        font-size: 16px !important;
        padding: 2px 4px !important;
    }

        .toggle-password-btn .eye-icon {
            font-size: 18px !important;
        }

    .password-strength-bar {
        height: 5px !important;
        margin-top: 6px !important;
        gap: 3px !important;
    }

    .password-strength-text {
        font-size: 10px !important;
    }

    .password-hint {
        font-size: 9px !important;
    }

        .password-hint li {
            font-size: 9px !important;
        }

    .password-match-status {
        font-size: 10px !important;
    }
}

@media (max-width: 480px) {
    .password-wrapper input[type="password"],
    .password-wrapper input[type="text"] {
        padding: 4px 30px 4px 8px !important;
        font-size: 11px !important;
        min-height: 28px !important;
    }

    .toggle-password-btn {
        right: 4px !important;
        font-size: 14px !important;
        padding: 1px 3px !important;
    }

        .toggle-password-btn .eye-icon {
            font-size: 16px !important;
        }

    .password-strength-bar {
        height: 4px !important;
        margin-top: 4px !important;
        gap: 2px !important;
    }

    .password-strength-text {
        font-size: 9px !important;
    }

    .password-hint {
        font-size: 8px !important;
    }

        .password-hint li {
            font-size: 8px !important;
            line-height: 1.3 !important;
        }

    .password-match-status {
        font-size: 9px !important;
    }
}

/* ============================================ */
/* باکس سیستم پشتیبانی - استایل ویژه */
/* ============================================ */
.panel-card[onclick*="openSupportSystem"] {
    border-color: #e8d5f5;
    background: linear-gradient(135deg, #faf5ff, #f3e8ff);
}

    .panel-card[onclick*="openSupportSystem"]:hover:not(.disabled) {
        border-color: #9c27b0;
        background: #f3e5f5;
        box-shadow: 0 8px 25px rgba(156, 39, 176, 0.15);
    }

    .panel-card[onclick*="openSupportSystem"] .panel-card-icon {
        color: #9c27b0;
    }

    .panel-card[onclick*="openSupportSystem"] .panel-card-title {
        color: #7b1fa2;
    }

    .panel-card[onclick*="openSupportSystem"] .panel-card-badge {
        background: #f3e5f5;
        color: #7b1fa2;
    }

/* ============================================ */
/* مودال کد دسترسی */
/* ============================================ */
#supportAccessModal .edit-modal-content {
    animation: fadeIn 0.3s ease;
}

#supportAccessModal .btn {
    transition: all 0.3s ease;
}

    #supportAccessModal .btn:hover {
        transform: translateY(-2px);
    }

#supportAccessModal input:focus {
    border-color: #9c27b0 !important;
    box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.15) !important;
}

/* ============================================ */
/* استایل هدر سیستم پشتیبانی در تولز */
/* ============================================ */
#supportHeaderContainer {
    animation: fadeIn 0.3s ease;
    width: 100%;
}

    #supportHeaderContainer button {
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        white-space: nowrap;
    }

        #supportHeaderContainer button:active {
            transform: scale(0.95);
        }

.topbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 70px !important;
}

.topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: nowrap !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ============================================ */
/* خط جداکننده سایدبار */
/* ============================================ */
.sidebar hr {
    border: none;
    border-top: 2px dashed #d0d0d0;
    margin: 6px 0;
    display: none; /* پیش‌فرض مخفی */
}

/* ============================================ */
/* دکمه‌های ابزارهای کاربر */
/* ============================================ */
.sidebar .user-tool-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    font-weight: 700;
    line-height: 1.5;
    color: #222;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #d7d7d7;
    border-radius: 12px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    text-align: right;
    width: 100%;
}

    .sidebar .user-tool-btn:hover {
        background: #e8f0fe;
        border-color: #9bbcf7;
        transform: translateX(-2px);
    }

    .sidebar .user-tool-btn.active {
        background: #dcecff;
        border-color: #4d8fe6;
        color: #0d3f75;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

    .sidebar .user-tool-btn span {
        font-size: 20px;
        min-width: 32px;
        text-align: center;
    }

    .sidebar .user-tool-btn .pin-icon {
        font-size: 12px;
        color: #f59e0b;
        margin-right: 4px;
    }

/* ============================================ */
/* کلید ابزارهای من - استایل ویژه */
/* ============================================ */
.panel-card[onclick*="openMyTools"] {
    border-color: #0b4f8a;
    background: linear-gradient(135deg, #f0f7ff, #e3eef9);
}

    .panel-card[onclick*="openMyTools"]:hover:not(.disabled) {
        border-color: #0b4f8a;
        background: #e8f0fe;
        box-shadow: 0 8px 25px rgba(11, 79, 138, 0.15);
    }

    .panel-card[onclick*="openMyTools"] .panel-card-icon {
        color: #0b4f8a;
    }

    .panel-card[onclick*="openMyTools"] .panel-card-title {
        color: #0b4f8a;
    }

    .panel-card[onclick*="openMyTools"] .panel-card-badge {
        background: #0b4f8a;
        color: white;
    }

/* ============================================ */
/* استایل آیکون‌های سورت */
/* ============================================ */
.sort-icon {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-right: 3px;
    display: inline-block;
    width: 14px;
    text-align: center;
    transition: color 0.3s ease;
}

th:hover .sort-icon {
    color: white;
}

#clickStatsTable th {
    transition: background 0.2s ease;
}

    #clickStatsTable th:hover {
        background: #1565a9 !important;
    }

/* ============================================ */
/* دکمه Home در تاپبار */
/* ============================================ */
/* ============================================ */
/* دکمه Home در تاپبار - پس‌زمینه سفید */
/* ============================================ */
/* ============================================ */
/* دکمه Home در تاپبار - پس‌زمینه سفید با متن سفید */
/* ============================================ */
.home-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: #ffffff !important; /* ✅ پس‌زمینه کاملاً سفید */
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 30px !important;
    color: #ffffff !important; /* ✅ رنگ متن سفید */
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

    .home-button .home-text {
        color: #ffffff !important; /* ✅ رنگ متن سفید */
        font-size: 13px;
        font-weight: 600;
    }

    .home-button .home-icon {
        font-size: 18px;
        line-height: 1;
        color: #ffffff !important; /* ✅ رنگ آیکون سفید */
    }

    .home-button:hover {
        background: #0b4f8a !important; /* ✅ هاور با رنگ آبی */
        border-color: #ffffff !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 24px rgba(11, 79, 138, 0.3);
    }

        .home-button:hover .home-text {
            color: #ffffff !important;
        }

        .home-button:hover .home-icon {
            color: #ffffff !important;
        }

    .home-button:active {
        transform: translateY(0px);
        box-shadow: 0 2px 8px rgba(11, 79, 138, 0.15);
    }

    /* ============================================ */
    /* دکمه Home - مخفی برای مهمان */
    /* ============================================ */
    .home-button.hidden {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

/* ============================================ */
/* ریسپانسیو موبایل */
/* ============================================ */
@media (max-width: 768px) {
    .home-button {
        padding: 6px 14px;
        font-size: 12px;
        gap: 5px;
    }

        .home-button .home-icon {
            font-size: 15px;
        }

        .home-button .home-text {
            font-size: 11px;
        }
}

@media (max-width: 480px) {
    .home-button {
        padding: 4px 10px;
        font-size: 11px;
        gap: 4px;
    }

        .home-button .home-icon {
            font-size: 13px;
        }

        .home-button .home-text {
            font-size: 10px;
        }
}
/* ============================================ */
/* دکمه Home در تاپبار - طراحی جدید */
/* ============================================ */
    /* ============================================ */
    /* دکمه Home - مخفی برای مهمان */
    /* ============================================ */
    .home-button.hidden {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }

/* ============================================ */
/* ریسپانسیو موبایل */
/* ============================================ */
@media (max-width: 768px) {
    .home-button {
        padding: 6px 14px;
        font-size: 12px;
        gap: 5px;
    }

        .home-button .home-icon {
            font-size: 15px;
        }

        .home-button .home-text {
            font-size: 11px;
        }
}

@media (max-width: 480px) {
    .home-button {
        padding: 4px 10px;
        font-size: 11px;
        gap: 4px;
    }

        .home-button .home-icon {
            font-size: 13px;
        }

        .home-button .home-text {
            font-size: 10px;
        }
}
/* ============================================ */
/* دکمه‌های ابزار موبایل (در منوی بالایی) */
/* ============================================ */
.mobile-tool-btn {
    font-size: 10px !important;
    padding: 4px 10px !important;
    border-radius: 30px !important;
    border: 1px solid #d7d7d7 !important;
    background: #ffffff !important;
    color: #222 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
}

    .mobile-tool-btn:hover {
        background: #e8f0fe !important;
        border-color: #0b4f8a !important;
    }

    .mobile-tool-btn:active {
        transform: scale(0.95);
    }

    .mobile-tool-btn span {
        font-size: 13px !important;
    }

/* ============================================ */
/* تنظیمات نوار ابزار موبایل (توپبار) */
/* ============================================ */
.mobile-toolbar {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-toolbar {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 5px !important;
        padding: 6px 8px !important;
        background: linear-gradient(90deg, #f7f7f7, #ffffff);
        border-bottom: 1px solid #ddd;
        flex-shrink: 0;
        overflow: visible !important;
        max-height: none !important;
        align-items: center !important;
    }

        .mobile-toolbar .toolbox-mobile {
            background: linear-gradient(135deg, #22c55e, #16a34a) !important;
            color: white !important;
            border: none !important;
            font-size: 10px !important;
            padding: 4px 10px !important;
            border-radius: 30px !important;
            cursor: pointer !important;
            font-family: 'Vazirmatn', Tahoma, sans-serif !important;
            white-space: nowrap !important;
        }

            .mobile-toolbar .toolbox-mobile:hover {
                background: linear-gradient(135deg, #1eae56, #128c3e) !important;
            }

            .mobile-toolbar .toolbox-mobile span {
                font-size: 13px !important;
            }

    #mobileDefaultTools {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        align-items: center !important;
        flex: 1 !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .mobile-toolbar {
        padding: 4px 6px !important;
        gap: 3px !important;
    }

    .mobile-tool-btn {
        font-size: 9px !important;
        padding: 3px 6px !important;
    }

        .mobile-tool-btn span {
            font-size: 11px !important;
        }

    .mobile-toolbar .toolbox-mobile {
        font-size: 9px !important;
        padding: 3px 8px !important;
    }

        .mobile-toolbar .toolbox-mobile span {
            font-size: 11px !important;
        }
}
/* ============================================ */
/* 🔍 باکس جستجو - طراحی جدید و زیبا */
/* ============================================ */
.search-section {
    background: #f8faff;
    padding: 16px 5% 12px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.search-container {
    width: 100%;
    max-width: 580px;
    position: relative;
}

.search-box-wrapper {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 2px 4px 2px 2px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

    .search-box-wrapper:hover {
        border-color: #cbd5e0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    }

    .search-box-wrapper:focus-within {
        border-color: #0b4f8a;
        box-shadow: 0 0 0 4px rgba(11, 79, 138, 0.08);
    }

    .search-box-wrapper .search-input-main {
        flex: 1;
        background: transparent;
        border: none;
        color: #1a202c;
        padding: 10px 16px;
        font-size: 14px;
        font-family: 'Vazirmatn', Tahoma, sans-serif;
        outline: none;
        min-width: 80px;
    }

        .search-box-wrapper .search-input-main::placeholder {
            color: #a0aec0;
            font-weight: 400;
        }

    .search-box-wrapper .search-clear-btn {
        color: #a0aec0;
        cursor: pointer;
        font-size: 16px;
        padding: 0 12px;
        transition: all 0.2s ease;
        flex-shrink: 0;
        display: none;
        font-weight: 300;
    }

        .search-box-wrapper .search-clear-btn:hover {
            color: #e53e3e;
            transform: scale(1.1);
        }

/* ============================================ */
/* نتایج جستجو */
/* ============================================ */
#searchResults {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    max-height: 380px;
    overflow-y: auto;
    padding: 6px 0;
    direction: rtl;
    border: 1px solid #eef2f7;
}

    #searchResults::-webkit-scrollbar {
        width: 5px;
    }

    #searchResults::-webkit-scrollbar-track {
        background: #f5f5f5;
        border-radius: 10px;
    }

    #searchResults::-webkit-scrollbar-thumb {
        background: #d0d5dd;
        border-radius: 10px;
    }

        #searchResults::-webkit-scrollbar-thumb:hover {
            background: #b0b5bd;
        }

.search-result-item {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f2f5;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .search-result-item:hover {
        background: #f5f8ff;
    }

    .search-result-item:last-child {
        border-bottom: none;
    }

.search-result-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: #0b4f8a;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-weight: 600;
    color: #0b4f8a;
    font-size: 14px;
    line-height: 1.4;
}

.search-result-channel {
    font-size: 11px;
    color: #888;
    direction: ltr;
    text-align: left;
    margin-top: 1px;
}

.search-result-title {
    font-size: 11px;
    color: #999;
    margin-top: 1px;
}

.search-result-empty {
    text-align: center;
    padding: 24px 16px;
    color: #888;
    font-size: 13px;
}

    .search-result-empty .empty-icon {
        font-size: 40px;
        display: block;
        margin-bottom: 8px;
    }

.search-result-loading {
    text-align: center;
    padding: 24px 16px;
    color: #888;
    font-size: 13px;
}

    .search-result-loading .spinner-small {
        display: inline-block;
        width: 22px;
        height: 22px;
        border: 3px solid #e8edf4;
        border-top: 3px solid #0b4f8a;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin-bottom: 6px;
    }

.search-result-more {
    text-align: center;
    padding: 10px;
    color: #888;
    font-size: 11px;
    border-top: 1px solid #f0f0f0;
}

/* ============================================ */
/* هایلایت متن */
/* ============================================ */
.highlight-text {
    background: #ffd700;
    color: #333;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

/* ============================================ */
/* ریسپانسیو موبایل */
/* ============================================ */
@media (max-width: 768px) {
    .search-section {
        padding: 12px 3% 10px;
    }

    .search-container {
        max-width: 100%;
    }

    .search-box-wrapper {
        border-radius: 30px;
        padding: 2px 3px 2px 2px;
    }

        .search-box-wrapper .search-input-main {
            font-size: 13px;
            padding: 8px 12px;
            min-width: 50px;
        }

    #searchResults {
        position: fixed;
        top: auto;
        left: 10px;
        right: 10px;
        max-height: 45vh;
        border-radius: 12px;
    }

    .search-result-item {
        padding: 8px 12px;
        gap: 8px;
    }

    .search-result-avatar {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .search-result-name {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .search-section {
        padding: 8px 2% 8px;
    }

    .search-box-wrapper {
        border-radius: 25px;
        padding: 1px 2px 1px 1px;
        border-width: 1.5px;
    }

        .search-box-wrapper .search-input-main {
            font-size: 12px;
            padding: 6px 8px;
            min-width: 40px;
        }

        .search-box-wrapper .search-clear-btn {
            font-size: 13px;
            padding: 0 6px;
        }

    #searchResults {
        left: 4px;
        right: 4px;
        max-height: 40vh;
        border-radius: 10px;
        padding: 3px 0;
    }

    .search-result-item {
        padding: 6px 8px;
        gap: 6px;
    }

    .search-result-avatar {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .search-result-name {
        font-size: 12px;
    }

    .search-result-channel {
        font-size: 10px;
    }

    .search-result-title {
        font-size: 9px;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
/* ============================================ */
/* اسکرول کامل صفحه ثبت‌نام */
/* ============================================ */
/* ============================================ */
/* اسکرول کامل صفحه ثبت‌نام - نسخه نهایی */
/* ============================================ */
/* ============================================ */
/* اسکرول کامل صفحه ثبت‌نام - نسخه پایدار */
/* ============================================ */
.register-page {
    display: none !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 20px 10px 30px 10px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: 100% !important;
    min-height: 100% !important;
    width: 100% !important;
    flex-direction: column !important;
    background: linear-gradient(180deg, #f0f4ff, #ffffff) !important;
    z-index: 10 !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
}

    .register-page.show {
        display: flex !important;
    }

.register-box {
    padding: 20px 18px 30px 18px !important;
    margin: 10px auto 20px auto !important;
    border-radius: 16px !important;
    max-width: 420px !important;
    width: 100% !important;
    max-height: none !important;
    height: auto !important;
    overflow-y: visible !important;
    flex-shrink: 0 !important;
    background: white !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1) !important;
    position: relative !important;
}

    .register-box .form-group {
        margin-bottom: 12px !important;
    }

        .register-box .form-group label {
            font-size: 12px !important;
            margin-bottom: 4px !important;
            display: block !important;
            font-weight: 600 !important;
            color: #333 !important;
        }

        .register-box .form-group input,
        .register-box .form-group .password-wrapper input {
            padding: 8px 12px !important;
            font-size: 13px !important;
            min-height: 36px !important;
            width: 100% !important;
            border-radius: 8px !important;
            border: 2px solid #e0e0e0 !important;
            background: #f8fafc !important;
            transition: border-color 0.3s !important;
        }

            .register-box .form-group input:focus,
            .register-box .form-group .password-wrapper input:focus {
                border-color: #0b4f8a !important;
                outline: none !important;
                background: white !important;
            }

.btn-register {
    padding: 10px !important;
    font-size: 14px !important;
    margin-top: 8px !important;
    width: 100% !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #0b4f8a, #1565a9) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    transition: all 0.3s ease !important;
}

    .btn-register:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 25px rgba(11, 79, 138, 0.3) !important;
    }

/* ============================================ */
/* ریسپانسیو موبایل - ثبت‌نام */
/* ============================================ */
@media (max-width: 768px) {
    .register-page {
        position: absolute !important;
        padding: 10px 5px 20px 5px !important;
        height: 100% !important;
        min-height: 100% !important;
    }

    .register-box {
        padding: 14px 12px 25px 12px !important;
        margin: 5px auto 15px auto !important;
        border-radius: 12px !important;
        max-height: none !important;
        overflow-y: visible !important;
        height: auto !important;
    }

        .register-box .form-group {
            margin-bottom: 8px !important;
        }

            .register-box .form-group label {
                font-size: 11px !important;
            }

            .register-box .form-group input,
            .register-box .form-group .password-wrapper input {
                padding: 6px 10px !important;
                font-size: 12px !important;
                min-height: 32px !important;
            }
}

@media (max-width: 480px) {
    .register-page {
        position: absolute !important;
        padding: 5px 3px 15px 3px !important;
        height: 100% !important;
        min-height: 100% !important;
    }

    .register-box {
        padding: 10px 8px 20px 8px !important;
        border-radius: 10px !important;
        margin: 3px auto 10px auto !important;
        max-height: none !important;
        overflow-y: visible !important;
        height: auto !important;
    }

        .register-box .form-group {
            margin-bottom: 6px !important;
        }

            .register-box .form-group label {
                font-size: 10px !important;
            }

            .register-box .form-group input,
            .register-box .form-group .password-wrapper input {
                padding: 4px 8px !important;
                font-size: 11px !important;
                min-height: 28px !important;
            }
}