:root {
    --color-navy: #0B1F3B;
    --color-royal: #1E4ED8;
    --color-gold: #C8A24A;
    --bg-app: #F7F8FA;
    --bg-surface: #ffffff;
    --bg-sidebar: #ffffff;
    --brand-color: #1E4ED8;
    --brand-hover: #1a42b8;
    --brand-light: #EBF1FD;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow-sm: 0 1px 2px rgba(11, 31, 59, 0.04);
    --shadow-md: 0 2px 8px rgba(11, 31, 59, 0.06);
    --shadow-lg: 0 8px 24px rgba(11, 31, 59, 0.08);

    --header-height: 70px;
    --sidebar-width: 260px;
    --sidebar-mini-width: 78px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Vazirmatn', system-ui, sans-serif;
    direction: rtl;
    background-color: var(--bg-app);
    color: var(--text-main);
    overflow-x: hidden;
}

/* هدر — رسمی و مینیمال */
.main-header {
    height: var(--header-height);
    background-color: var(--bg-surface);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    background: none;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.action-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-main);
}

/* کانتینر اصلی */
.app-container {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* سایدبار ارتقا یافته */
.sidebar-wrapper {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    right: 0;
    z-index: 90;
    transition: var(--transition);
}

.sidebar-nav {
    padding: 24px 14px;
    height: 100%;
    overflow-y: auto;
}

.menu-root {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* آیتم‌های منو */
.menu-link {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    font-size: 16px;
    margin-left: 12px;
    color: #94a3b8; /* رنگ آیکون‌ها کمی ملایم‌تر */
    transition: var(--transition);
}

.chevron-icon {
    margin-right: auto;
    font-size: 11px;
    transition: var(--transition);
}

.menu-link:hover {
    background-color: #f8fafc;
    color: var(--text-main);
}

.menu-link:hover .link-icon {
    color: var(--text-main);
}

/* استایل منوی باز شده */
.has-children.expanded > .menu-link {
    background-color: var(--brand-light);
    color: var(--brand-color);
}

.has-children.expanded > .menu-link .link-icon {
    color: var(--brand-color);
}

.has-children.expanded .chevron-icon {
    transform: rotate(-90deg);
}

.has-children a {
    text-decoration: none;
}

/* اصلاح انیمیشن زیرمنو */
.menu-sub {
    list-style: none;
    padding: 0;
    margin-right: 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* این کلاس توسط جاوااسکریپت اضافه می‌شود */
.menu-sub.show {
    max-height: 500px; /* یک مقدار پیش‌فرض بالا برای باز شدن کامل */
    padding: 4px 0;
}

.sub-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.sub-link-dot {
    width: 5px;
    height: 5px;
    background-color: #cbd5e1;
    border-radius: 50%;
    margin-left: 10px;
    transition: var(--transition);
}

.sub-link-icon {
    width: 18px;
    margin-left: 8px;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
    transition: var(--transition);
}

.sub-link:hover .sub-link-icon {
    color: var(--brand-color);
}

.sub-link:hover {
    color: var(--text-main);
    background-color: #f8fafc;
}

.sub-link:hover .sub-link-dot {
    background-color: var(--brand-color);
    transform: scale(1.4);
}

/* محتوا */
.main-viewport {
    flex-grow: 1;
    margin-right: var(--sidebar-width);
    padding: 32px;
    transition: var(--transition);
}

/* --- حالت مینی سایدبار هوشمند و فوق مدرن --- */
.sidebar-wrapper.collapsed {
    width: var(--sidebar-mini-width);
}

.sidebar-wrapper.collapsed .link-text,
.sidebar-wrapper.collapsed .chevron-icon {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.sidebar-wrapper.collapsed .menu-link {
    justify-content: center;
    padding: 12px;
}

.sidebar-wrapper.collapsed .link-icon {
    margin-left: 0;
    font-size: 18px;
}

/* پاپ‌آپ زیرمنوها در حالت هاور مینی‌سایدبار */
@media (min-width: 769px) {
    .sidebar-wrapper.collapsed .has-children:hover .menu-sub {
        position: absolute;
        right: var(--sidebar-mini-width);
        top: 0;
        background-color: #ffffff;
        width: 200px;
        max-height: 500px;
        padding: 8px;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-color);
        display: block !important;
        margin-right: 4px;
    }
    .sidebar-wrapper.collapsed .has-children:hover .sub-link {
        padding: 10px 12px;
    }
}

.main-viewport.expanded {
    margin-right: var(--sidebar-mini-width);
}

/* دراپ داون پروفایل هدر */
.profile-dropdown {
    position: relative;
}

.dropdown-toggle-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.dropdown-toggle-btn:hover {
    background-color: #f1f5f9;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-meta {
    text-align: right;
}

.user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-main);
    display: block;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.dropdown-card {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: var(--transition);
    z-index: 110;
}

.profile-dropdown.active .dropdown-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.dropdown-links {
    list-style: none;
    padding: 6px;
}

.dropdown-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    border-radius: 8px;
    transition: var(--transition);
}

.dropdown-links a:hover {
    background-color: #f8fafc;
    color: var(--text-main);
}

#mobile-trigger { display: none; }

@media (max-width: 768px) {
    #desktop-trigger { display: none; }
    #mobile-trigger { display: block; }

    .sidebar-wrapper {
        right: calc(-1 * var(--sidebar-width));
        box-shadow: var(--shadow-lg);
        background-color: #ffffff;
    }

    .sidebar-wrapper.mobile-open {
        right: 0;
    }

    .main-viewport {
        margin-right: 0 !important;
        padding: 20px;
    }
}


/* ======================================
   💎 استایل‌های فوق مدرن صفحه ورود (Premium Guest)
   ====================================== */

:root {
    --login-bg-app: #F7F8FA;
    --login-card-bg: #ffffff;
    --login-brand: var(--brand-color);
    --login-brand-hover: var(--brand-hover);
    --login-text-main: #1F2937;
    --login-text-muted: #6B7280;
    --login-border: #E5E7EB;
    --login-radius: 16px;
    --login-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
}

.modern-login-wrapper {
    min-height: 100vh;
    background-color: var(--login-bg-app);
    font-family: 'Vazirmatn', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    direction: rtl;
}

/* بردکرامب مدرن */
.modern-breadcrumb-container {
    margin-bottom: 24px;
}
.modern-breadcrumb {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
}
.modern-breadcrumb li {
    font-size: 13px;
}
.modern-breadcrumb .breadcrumb-link {
    color: var(--login-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}
.modern-breadcrumb .breadcrumb-link:hover {
    color: var(--login-brand);
}
.modern-breadcrumb .chevron {
    color: #cbd5e1;
    font-size: 10px;
}
.modern-breadcrumb .breadcrumb-active {
    color: var(--login-text-main);
    font-weight: 500;
}

/* کارت اصلی ورود */
.login-card-container {
    width: 100%;
    max-width: 450px;
}
.login-card {
    background-color: var(--login-card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--login-border);
    border-radius: var(--login-radius);
    padding: 40px 32px;
    box-shadow: var(--login-shadow);
}

.login-card-header {
    text-align: center;
    margin-bottom: 32px;
}
.login-card-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--login-text-main);
    margin-bottom: 8px;
}
.login-card-header p {
    font-size: 13.5px;
    color: var(--login-text-muted);
    line-height: 1.6;
}

/* فرم‌ها و فیلدها */
.modern-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--login-text-main);
}
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-wrapper .input-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
}
.input-wrapper input {
    width: 100%;
    padding: 12px 42px 12px 14px; /* فضای سمت راست برای آیکون */
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background-color: #ffffff;
    font-size: 14px;
    color: var(--login-text-main);
    outline: none;
    transition: all 0.2s ease;
}

/* چپ‌چین کردن فیلد ایمیل در تایپ برای پایداری بصری */
.input-wrapper input[type="email"] {
    direction: ltr;
    text-align: right;
}
.input-wrapper input[type="email"]:focus {
    text-align: left;
}

.input-wrapper input:focus {
    border-color: var(--login-brand);
}
.input-wrapper input:focus ~ .input-icon {
    color: var(--login-brand);
}

/* حالت خطا در فیلدها */
.form-group.has-error input {
    border-color: #ef4444;
}
.form-group.has-error input:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}
.form-group.has-error .input-icon {
    color: #ef4444 !important;
}

/* آپشن‌های فرم (مرا به خاطر بسپار) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-top: 4px;
}
.remember-me-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    user-select: none;
}
.remember-me-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.custom-checkmark {
    width: 18px;
    height: 18px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
}
.remember-me-checkbox input:checked ~ .custom-checkmark {
    background-color: var(--login-brand);
    border-color: var(--login-brand);
}
.custom-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.remember-me-checkbox input:checked ~ .custom-checkmark:after {
    display: block;
}
.remember-me-checkbox .label-text {
    color: var(--login-text-muted);
}
.forgot-password-link {
    color: var(--login-brand);
    text-decoration: none;
    font-weight: 500;
}
.forgot-password-link:hover {
    text-decoration: underline;
}

/* دکمه ورود کاملا کاستوم مدرن */
.modern-submit-btn {
    background-color: var(--login-brand);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    margin-top: 10px;
}
.modern-submit-btn:hover {
    background-color: var(--login-brand-hover);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}
.modern-submit-btn:active {
    transform: translateY(0);
}
.modern-submit-btn i {
    font-size: 14px;
    transition: transform 0.2s ease;
}
.modern-submit-btn:hover i {
    transform: translateX(-4px); /* انیمیشن فلش به سمت چپ در زمان هاور */
}

/* فوتر کارت */
.login-card-footer {
    text-align: center;
    margin-top: 16px;
    border-top: 1px solid var(--login-border);
    padding-top: 20px;
    font-size: 13.5px;
    color: var(--login-text-muted);
}
.login-card-footer a {
    color: var(--login-brand);
    text-decoration: none;
    font-weight: 600;
}
.login-card-footer a:hover {
    text-decoration: underline;
}

/* آلرت اختصاصی و مدرن خطا */
.modern-alert {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #ef4444;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    animation: alertSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modern-alert i {
    font-size: 15px;
}

@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ریسپانسیو اختصاصی دیوایس‌های کوچک */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 20px;
    }
}

/* ======================================
   ✨ استایل دکمه‌های اجتماعی و دکمه چشم پسورد
   ====================================== */

/* کانتینر دکمه‌های گوگل و گیت هاب */
.social-login-container {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background-color: #ffffff;
    color: var(--login-text-main);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.social-btn:active {
    transform: translateY(0);
}

.social-btn.github-btn {
    background-color: #181717;
    color: #ffffff;
    border: none;
}

.social-btn.github-btn:hover {
    background-color: #24292e;
    box-shadow: 0 4px 12px rgba(24, 23, 23, 0.2);
}

.social-btn.github-btn i {
    font-size: 18px;
}

.social-svg {
    display: block;
}

/* جداکننده خطی کلمه‌ی "یا" */
.form-separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
}

.form-separator::before,
.form-separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px dashed #e2e8f0;
}

.form-separator:not(:empty)::before {
    margin-left: .75em;
}

.form-separator:not(:empty)::after {
    margin-right: .75em;
}

/* استایل دکمه چشمک‌زن پسورد */
.toggle-password-btn {
    position: absolute;
    left: 14px; /* به دلیل ساختار RTL آیکون چشم سمت چپ باکس قرار می‌گیرد */
    right: auto;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    height: 100%;
    font-size: 16px;
    transition: color 0.2s ease;
    z-index: 5;
}

.toggle-password-btn:hover {
    color: var(--login-brand);
}

/* اضافه کردن پدینگ چپ به فیلد پسورد تا متن رمز زیر آیکون چشم نرود */
.input-wrapper input[type="password"],
.input-wrapper input[type="text"]#password {
    padding-left: 42px;
}

/* اضافه کردن پدینگ چپ فیلد تایید پسورد برای آیکون چشم */
.input-wrapper input[type="password"]#password-confirm,
.input-wrapper input[type="text"]#password-confirm {
    padding-left: 42px;
}

/*//////////////////////////////////////////////*/

/* ========================================================
   💎 استایل پلتفرم پریمیوم کاملاً راست‌چین (RTL Premium Dashboard)
   ======================================================== */

.premium-settings-wrapper {
    width: 100%;
    direction: rtl;
    text-align: right;
}

/* هدر لوکس */
.settings-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    gap: 16px;
    direction: rtl;
}
.settings-hero-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.settings-hero-header p {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

/* دکمه ذخیره مدرن هدر */
.premium-save-btn {
    background-color: var(--brand-color) !important;
    color: #ffffff !important;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(30, 78, 216, 0.2);
}
.premium-save-btn:hover {
    background-color: var(--brand-hover) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* منوی تب‌های کپسولی معلق بالای صفحه */
.premium-tabs-navbar {
    display: flex;
    gap: 6px;
    background-color: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
    margin-bottom: 28px;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
}
.pill-tab-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: none;
    border: none;
    border-radius: 10px;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.pill-tab-link i {
    font-size: 15px;
    color: #94a3b8;
}
.pill-tab-link.active {
    background-color: #ffffff;
    color: var(--brand-color);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}
.pill-tab-link.active i {
    color: var(--brand-color);
}

.premium-card {
    display: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.premium-card.active {
    display: block;
    animation: premiumFade 0.25s ease;
}

.card-inner-header {
    margin-bottom: 28px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 16px;
}
.card-inner-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.card-inner-header p {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 4px;
}

/* گرید فرم‌ها */
.premium-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.input-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.input-block label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.premium-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

/* فیکس آیکون‌ها در سمت راست فرم فارسی */
.premium-input-box .field-icon {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    font-size: 15px;
}
.premium-input-box input {
    width: 100%;
    padding: 11px 42px 11px 14px; /* پدینگ راست بیشتر برای آیکون */
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    color: #0f172a;
    transition: all 0.2s ease;
    text-align: right;
    font-family: inherit;
}
.premium-input-box input:focus {
    border-color: var(--brand-color);
}

/* فیلدهای متنی فنی (مثل SMTP) که بهتر است چپ‌چین تایپ شوند ولی آیکون آن‌ها در راست بماند */
.premium-input-box input.rtl-technical-input {
    direction: ltr !important;
    text-align: left !important;
}

/* بخش آپلودرها */
.premium-uploader-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 28px;
}
.modern-file-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e2e8f0;
    padding: 16px 20px;
    border-radius: 12px;
    background-color: #f8fafc;
    gap: 12px;
}
.modern-file-card h5 {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}
.modern-file-card p {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 4px;
}
.file-action-zone {
    display: flex;
    align-items: center;
    gap: 12px;
}
.circle-preview, .avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 18px;
    flex-shrink: 0;
}
.favicon-preview {
    width: 34px !important;
    height: 34px !important;
}
.custom-file-trigger {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.custom-file-trigger:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
}
.custom-file-trigger input {
    position: absolute; opacity: 0; width: 0; height: 0;
}

/* سوئیچ‌های توگل iOS */
.toggle-switch-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.toggle-row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    gap: 16px;
}
.toggle-text h5 {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.toggle-text p {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.ios-switch {
    position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0;
}
.ios-switch input { opacity: 0; width: 0; height: 0; }
.ios-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #e2e8f0; border-radius: 34px; transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
}
.ios-slider:before {
    position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px;
    background-color: white; border-radius: 50%; transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.ios-switch input:checked + .ios-slider { background-color: var(--brand-color); }
.ios-switch input:checked + .ios-slider:before { transform: translateX(20px); }

.text-danger-zone { background-color: #fff5f5; border-color: #fee2e2; }
.ios-switch.switch-danger input:checked + .ios-slider { background-color: #ef4444; }

/* ابزارهای سیستم */
.maintenance-tools-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.tool-action-stripe {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    gap: 16px;
}
.stripe-info h5 { font-size: 14px; font-weight: 700; color: #1e293b; margin: 0; }
.stripe-info p { font-size: 12px; color: #64748b; margin-top: 5px; line-height: 1.6; }

.stripe-btn {
    padding: 10px 18px; border-radius: 8px; font-family: inherit; font-size: 12.5px;
    font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap; border: none;
}
.stripe-btn.btn-secondary { background-color: #ffffff; color: #334155; border: 1px solid #cbd5e1; }
.stripe-btn.btn-primary { background-color: var(--brand-color) !important; color: #ffffff !important; }

/* آلرت موفقیت */
.premium-alert-toast {
    background-color: #e0e7ff;
    color: var(--brand-hover);
    border: 1px solid #c7d2fe;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

/* ========================================================
   ❌ حذف کادر/بوردر مشکی در زمان فوکوس و کلیک روی دکمه‌ها و تب‌ها
   ======================================================== */
.pill-tab-link:focus,
.pill-tab-link:active,
.premium-save-btn:focus,
.stripe-btn:focus,
.custom-file-trigger:focus,
input:focus,
button:focus {
    outline: none !important;
    box-shadow: none !important;
}

.premium-input-box input:focus {
    border-color: var(--brand-color) !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08) !important;
}

@keyframes premiumFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
    .settings-hero-header { flex-direction: column; align-items: flex-start; }
    .premium-save-btn { width: 100%; justify-content: center; }
    .tool-action-stripe { flex-direction: column; align-items: flex-start; }
    .stripe-btn { width: 100%; }
}


/* ========================================================

🛡️ استایل ماتریس مدرن دسترسی‌ها (Access Matrix Premium)

======================================================== */

.premium-select-field {
    width: 100%;
    padding: 12px 42px 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    color: #0f172a;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    background-size: 16px;
    font-family: inherit;
}

.premium-select-field:focus {
    border-color: var(--brand-color);
}

.sections-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.matrix-section-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 20px;
    transition: all 0.2s ease;
}

.matrix-section-card:hover {
    border-color: #cbd5e1;
    background-color: #f1f5f9;
}

.matrix-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--brand-color);
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

.matrix-section-title i {
    font-size: 16px;
}

.matrix-chips-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modern-access-chip {
    cursor: pointer;
    margin: 0;
}

.modern-access-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.modern-access-chip .chip-content {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;

}

.modern-access-chip .check-icon { display: none; }

.modern-access-chip .uncheck-icon { display: inline-block; color: #94a3b8; }

.modern-access-chip:hover .chip-content {
    border-color: #94a3b8;
    color: #1e293b;
}

.modern-access-chip input[type="checkbox"]:checked + .chip-content {
    background-color: #eff6ff;
    border-color: #3b82f6;
    color: #2563eb;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.1);
}

.modern-access-chip input[type="checkbox"]:checked + .chip-content .uncheck-icon { display: none; }

.modern-access-chip input[type="checkbox"]:checked + .chip-content .check-icon { display: inline-block; color: #3b82f6; }

.modern-access-chip input:focus + .chip-content,



.animate-fade-in {

    animation: premiumFade 0.25s ease forwards;

}

