/* تنظیم متغیرهای رنگی */
:root {
    --primary-color: #4f46e5; /* رنگ اصلی (بنفش مایل به آبی) */
    --primary-dark: #4338ca;
    --secondary-color: #64748b;
    
    /* تغییر مهم: گرادینت پس‌زمینه ملایم‌تر */
    --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    
    /* تغییر مهم: هدر سفید و شیشه‌ای */
    --glass-nav-bg: rgba(255, 255, 255, 0.90); 
    --nav-text-color: #334155; /* رنگ متن منو (تیره) */
}

/* استایل کلی بدنه */
body {
    font-family: 'Vazirmatn', sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: #334155;
}

/* --- استایل نوبار (هدر) اصلاح شده --- */
.glass-nav {
    background-color: var(--glass-nav-bg) !important; /* اجبار رنگ روشن */
    backdrop-filter: blur(12px); /* تاری بیشتر برای زیبایی */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* سایه خیلی نرم */
    z-index: 1030;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

/* اصلاح رنگ متن‌های منو برای دیده شدن روی زمینه سفید */
.glass-nav .navbar-brand, 
.glass-nav .nav-link {
    color: var(--nav-text-color) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.glass-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* آیکون برند (لوگو) */
.brand-icon-wrapper {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, var(--primary-color), #818cf8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    color: white !important; /* آیکون داخل باکس سفید بماند */
}
.brand-icon-wrapper i {
    color: white !important;
}

/* --- استایل فوتر (اگر در صفحه دارید) --- */
footer, .footer {
    background-color: var(--glass-nav-bg) !important;
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--nav-text-color);
    margin-top: 40px;
    padding: 20px 0;
}

/* --- استایل کارت اصلی فرم --- */
.custom-card {
    border-radius: 24px;
    background: #ffffff;
    position: relative;
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.05), 0 10px 20px -5px rgba(0, 0, 0, 0.02); /* سایه لطیف‌تر */
}

/* نوار رنگی بالای کارت */
.card-header-bar {
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), #a5b4fc);
    border-radius: 24px 24px 0 0;
}

/* --- استایل فیلدهای ورودی (Inputs) --- */
.custom-input-group {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.custom-input-group:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: #fff;
}

.custom-input-group .input-group-text {
    background-color: transparent;
    border: none;
    color: var(--secondary-color);
    padding-right: 15px;
}

.custom-input-group .form-control,
.custom-input-group .form-select {
    border: none;
    background-color: transparent;
    padding: 12px 15px;
    font-size: 0.95rem;
    color: #1e293b;
}

.custom-input-group .form-control:focus,
.custom-input-group .form-select:focus {
    box-shadow: none;
}

/* --- استایل آپلود فایل --- */
.file-upload-wrapper input[type=file] {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 10px;
    background: #f8fafc;
    transition: all 0.3s;
    cursor: pointer;
    width: 100%;
    color: var(--secondary-color);
}

.file-upload-wrapper input[type=file]:hover {
    border-color: var(--primary-color);
    background: #eff6ff;
    color: var(--primary-color);
}

/* --- دکمه‌ها --- */
.btn-gradient-primary {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.6);
    color: white;
}

/* --- تنظیمات ظاهری CKEditor --- */
.cke_chrome {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
    overflow: hidden;
}

.cke_top {
    background: #f8fafc !important; /* رنگ خیلی روشن */
    border-bottom: 1px solid #e2e8f0 !important;
}

.cke_bottom {
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    border-radius: 0 0 12px 12px !important;
}

/* --- اسکرول بار --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
