/* فونت وزیر برای پنل ادمین */

@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/static/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* اعمال فونت به همه المان‌ها */
* {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif !important;
}

/* تغییر رنگ‌های آبی به قرمز */

/* رنگ اصلی هدر */
#header {
    background: #c9302c !important;
    color: #fff !important;
}

/* مخفی کردن لینک نمایش وبگاه */
#header #site-name + a,
#header a[href="/"] {
    display: none !important;
}

/* حذف کامل پس‌زمینه همه المان‌های داخل هدر */
html body #header *,
html body #header *:before,
html body #header *:after {
    background-color: transparent !important;
    background-image: none !important;
    background: transparent !important;
}

/* تمام دکمه‌ها و لینک‌های هدر */
#header button,
#header .button,
#header a.button,
#header input[type="button"],
#header a,
#header a:link,
#header a:visited,
#header a:active,
#header button:focus,
#header button:active {
    border: none !important;
    box-shadow: none !important;
    color: #fff !important;
}

#header button:hover,
#header .button:hover,
#header a.button:hover,
#header input[type="button"]:hover,
#header a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    background-image: none !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

/* آیکون‌های SVG - رنگ سفید */
#header svg {
    fill: #fff !important;
}

#header svg path,
#header svg circle,
#header svg line,
#header svg polyline,
#header svg polygon,
#header svg rect,
#header svg ellipse {
    fill: #fff !important;
    stroke: #fff !important;
}

/* لینک‌های هدر */
#header a:link,
#header a:visited,
#header a {
    color: #fff !important;
}

#header a:hover,
#header a:focus {
    color: #f0f0f0 !important;
}

/* دکمه‌های اصلی */
.button, input[type=submit], input[type=button], .submit-row input, button {
    background: #c9302c !important;
    border-color: #a32824 !important;
    color: #fff !important;
}

.button:hover, input[type=submit]:hover, input[type=button]:hover, .submit-row input:hover, button:hover {
    background: #d9534f !important;
    color: #fff !important;
}

.button:active, input[type=submit]:active, input[type=button]:active, .submit-row input:active, button:active {
    background: #a32824 !important;
    color: #fff !important;
}

/* لینک‌ها */
a:link, a:visited {
    color: #d9534f !important;
}

a:focus, a:hover {
    color: #c9302c !important;
}

/* هدر جداول */
#changelist-form .results table thead th {
    background: #c9302c !important;
    color: #fff !important;
}

#changelist-form .results table thead th a {
    color: #fff !important;
}

#changelist-form .results table thead th a:hover {
    color: #f0f0f0 !important;
}

/* ردیف‌های انتخاب شده */
tr.selected {
    background-color: #f9e6e5 !important;
}

/* تب‌های فعال */
.module h2, .module caption, .inline-group h2 {
    background: #c9302c !important;
    color: #fff !important;
}

.module h2 a, .module caption a, .inline-group h2 a {
    color: #fff !important;
}

.module h2 a:hover, .module caption a:hover, .inline-group h2 a:hover {
    color: #f0f0f0 !important;
}

/* دکمه افزودن */
.addlink, .changelink, .add-row a {
    color: #d9534f !important;
    background-color: transparent !important;
}

/* لینک‌های "مشاهده" و "افزودن" در صفحه اصلی */
#content-main .module table td a {
    color: #555 !important;
    background-color: transparent !important;
}

#content-main .module table td a:hover {
    color: #d9534f !important;
    background-color: transparent !important;
}

/* آیکون‌های فعال */
.viewlink, .inlineviewlink {
    background-color: transparent !important;
}

/* breadcrumb */
div.breadcrumbs {
    background: #d9534f !important;
    color: #fff !important;
}

div.breadcrumbs a {
    color: #fff !important;
}

/* تقویم و ساعت */
.calendarbox h2, .clockbox h2 {
    background: #c9302c !important;
    color: #fff !important;
}

.calendar caption, .calendarbox h2 {
    background: #c9302c !important;
    color: #fff !important;
}

.calendar td a:hover, .timelist a:hover, .calendar td a:focus, .timelist a:focus {
    background: #d9534f !important;
    color: white !important;
}

.calendar td.selected a {
    background: #c9302c !important;
}

.calendar td a:active {
    background: #a32824 !important;
}

/* صفحه‌بندی */
.paginator a:link, .paginator a:visited {
    background: #c9302c !important;
    color: white !important;
}

.paginator a:hover, .paginator a:focus {
    background: #d9534f !important;
}

.paginator a.showall:hover, .paginator a.showall:focus {
    background: #d9534f !important;
}

/* فرم‌ها */
.selector-chosen h2 {
    background: #c9302c !important;
    color: #fff !important;
}

.selector-add, .selector-remove {
    background: #c9302c !important;
    color: #fff !important;
}

.selector-add:hover, .selector-remove:hover {
    background: #d9534f !important;
    color: #fff !important;
}

/* دکمه جستجو */
#changelist-search input[type="submit"] {
    background: #c9302c !important;
    border-color: #a32824 !important;
    color: #fff !important;
}

#changelist-search input[type="submit"]:hover {
    background: #d9534f !important;
    color: #fff !important;
}

/* فیلترها */
#changelist-filter h2 {
    background: #c9302c !important;
    color: #fff !important;
}

#changelist-filter li.selected a {
    color: #d9534f !important;
    font-weight: bold !important;
}

#changelist-filter a {
    color: #555 !important;
}

#changelist-filter a:hover {
    color: #d9534f !important;
}

/* متن کمکی */
.help {
    color: #666 !important;
}

/* مخفی کردن دکمه تغییر تم */
#theme-toggle,
button[data-theme-toggle],
.theme-toggle,
a.theme-toggle,
button.theme-toggle {
    display: none !important;
}

/* اولویت بالا برای تمام دکمه‌ها و لینک‌های داخل هدر */
#header * {
    background-image: none !important;
}

#header button *,
#header a * {
    background-color: transparent !important;
    background-image: none !important;
    background: transparent !important;
}

/* Responsive: وسط‌چین کردن عنوان و status در موبایل */
@media (max-width: 768px) {
    #site-name {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }
    
    #site-name a {
        margin-bottom: 8px !important;
    }
    
    #userbot-status {
        margin-right: 0 !important;
        margin-top: 5px !important;
    }
}
