﻿/* استایل‌های پایه و مشترک */
:root {
    scroll-behavior: smooth;
    --sidebar-width: 280px;
    --header-height: 60px;
    --primary-color: #1C39BB;
    --secondary-color: #42E2B8;
    --footer-color: #1C39BB;
    --accent-color: #CC3333;
}

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, sans-serif;
    background-color: #FFFFF8;
    transition: all 0.3s;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: #4154f1;
    text-decoration: none;
}

    a:hover {
        color: #717ff5;
        text-decoration: none;
    }


ol {
    counter-reset: item
}

.numbered-list > li {
    display: block
}

    .numbered-list > li:before {
        content: counters(item, "-") "- ";
        counter-increment: item
    }

.form-group {
    margin-top: 8px;
    margin-bottom: 8px;
}

.control-label {
    margin-bottom: 4px;
}

.multiline {
    white-space: pre-wrap;
}

.list-options {
    white-space: nowrap !important;
}

p {
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.chosen-single {
    height: 37.6px !important;
    border-radius: 0.375rem !important;
    border: 1px solid #ced4da !important;
}

    .chosen-single > span {
        padding-top: 6px;
    }

    .chosen-single > div {
        padding-top: 6px;
    }

.chosen-container-single {
    width: 100% !important;
    height: 2rem;
}

    .chosen-container-single .chosen-single {
        background: none;
    }

.form-ticket-message {
    min-height: 10rem;
}

.table {
    display: block;
    overflow-x: auto;
}

.form-textarea {
    min-height: 10rem;
}

.accordion-button::after {
    background-image: none !important;
}

.invisible-message {
    background-color: #CCC !important;
}

.text-justify {
    text-align: justify;
}

.zoom {
    transition: transform .2s;
}

    .zoom:hover {
        transform: scale(1.2);
    }

/* FAQs */
.faq .basic h6 {
    font-size: 18px;
    font-weight: 600;
    color: #4154f1;
}

.faq .basic p {
    color: #6980aa;
}

/* Card */
.card {
    margin-bottom: 30px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0px 0 30px rgba(1, 41, 112, 0.1);
}

.card-header:first-child {
    border-radius: 1rem;
}

.card-header,
.card-footer {
    border-color: #ebeef4;
    background-color: #fff;
    color: #798eb3;
    padding: 15px;
}

.card-title {
    padding: 20px 0 15px 0;
    font-size: 18px;
    font-weight: 500;
    color: #012970;
    font-family: "Poppins", sans-serif;
}

    .card-title span {
        color: #899bbd;
        font-size: 14px;
        font-weight: 400;
    }

.card-body {
    padding: 0 20px 20px 20px;
}

.card-img-overlay {
    background-color: rgba(255, 255, 255, 0.6);
}

/* استایل هدر */
.header {
    background: linear-gradient(135deg, var(--primary-color), #643ABC);
    color: white;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.navbar-logo {
    height: 42px;
    width: auto;
    filter: drop-shadow(0 0 2px white) drop-shadow(0 0 1px white);
}

.navbar-brand {
    font-size: x-large;
    font-weight: 500;
}

/* نوار مسیر */
.breadcrumb-container {
    background-color: white;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #e3e6f0;
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
}

.breadcrumb {
    margin-bottom: 0;
    padding: 0;
    background-color: transparent;
}

.breadcrumb-item + .breadcrumb-item {
    padding: 0;
}

    .breadcrumb-item + .breadcrumb-item::before {
        content: ">";
        padding: 0 0.5rem;
    }


/* نوار کناری */
.sidebar {
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    position: fixed;
    top: var(--header-height);
    right: 0;
    background: white;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    z-index: 1020;
}

.sidebar-collapsed {
    right: calc(-1 * var(--sidebar-width));
}

.sidebar-top {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    min-height: 300px;
}

.sidebar-bottom {
    border-top: 1px solid #e3e6f0;
    padding: 1rem;
    min-height: 200px;
    overflow-y: auto;
}

/* تغییر اندازه نوار کناری */
.resizer {
    height: 10px;
    background: #e3e6f0;
    cursor: row-resize;
    position: relative;
    user-select: none;
}

    .resizer::after {
        content: "";
        position: absolute;
        top: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 2px;
        background: #b7b9cc;
        border-radius: 2px;
    }

/* محتوای اصلی */
.main-content {
    margin-top: var(--header-height);
    margin-right: var(--sidebar-width);
    padding: 20px;
    transition: all 0.3s;
    flex: 1;
}

.main-content-expanded {
    margin-right: 0;
}

/* منوها */
.nav-main {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-main-item {
    margin-bottom: 5px;
}

.nav-main-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #5a5c69;
    text-decoration: none;
    border-radius: 0.35rem;
    transition: all 0.3s;
}

    .nav-main-link:hover {
        color: var(--primary-color);
        background-color: rgba(78, 115, 223, 0.1);
    }

    .nav-main-link.active {
        color: white;
        background-color: var(--primary-color);
    }

.nav-main-icon {
    flex: 0 0 1.75rem;
    font-size: 0.85rem;
    line-height: 1;
    text-align: center;
}

/* محتوای فرعی */
.auxiliary-content {
    margin-top: var(--header-height);
    margin-right: var(--sidebar-width);
    padding: 20px;
    transition: all 0.3s;
    flex: 1;
}

.auxiliary-content-expanded {
    margin-right: 0;
}

/* منوها */
.nav-auxiliary {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-auxiliary-item {
    margin-bottom: 5px;
}

.nav-auxiliary-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #5a5c69;
    text-decoration: none;
    border-radius: 0.35rem;
    transition: all 0.3s;
}

    .nav-auxiliary-link:hover {
        color: var(--primary-color);
        background-color: rgba(78, 115, 223, 0.1);
    }

    .nav-auxiliary-link.active {
        color: white;
        background-color: var(--primary-color);
    }

.nav-auxiliary-icon {
    flex: 0 0 1.75rem;
    font-size: 0.85rem;
    line-height: 1;
    text-align: center;
}

/* بخش‌های محتوا */
.content-section {
    display: none;
    border-radius: 0.35rem;
}

    .content-section.active {
        display: block;
        animation: fadeIn 0.3s ease-in-out;
    }

@@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* دکمه جمع/باز کردن نوار کناری */
.sidebar-toggle {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    right: var(--sidebar-width);
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.3);
    cursor: pointer;
    z-index: 1030;
    transition: all 0.3s;
}

.sidebar-toggle-collapsed {
    right: 10px;
}

/* جعبه محتوا */
.content-box {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* پاورقی */
.footer {
    background-color: var(--footer-color);
    color: white;
    padding: 30px 0 20px;
    position: relative;
    z-index: 1010;
    margin-right: var(--sidebar-width);
    transition: all 0.3s;
}

.footer-expanded {
    margin-right: 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    padding: 0 15px;
    margin-bottom: 20px;
}

    .footer-section h5 {
        font-size: 1rem;
        margin-bottom: 15px;
        position: relative;
        padding-bottom: 5px;
    }

        .footer-section h5::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 40px;
            height: 2px;
            background-color: var(--accent-color);
        }

    .footer-section ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .footer-section ul li {
            margin-bottom: 8px;
        }

.footer-link {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.85rem;
}

    .footer-link:hover {
        color: white;
        padding-right: 5px;
    }

.footer-contact p {
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.footer-contact i {
    width: 20px;
    text-align: center;
    margin-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    font-size: 0.8rem;
    color: #bdc3c7;
}

/* منوهای آبشاری هدر */
.dropdown-menu {
    border: none;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
}

    .dropdown-item:hover {
        background-color: rgba(78, 115, 223, 0.1);
        color: var(--primary-color);
    }

.theme-switch-container {
    position: relative;
}

.theme-icons {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 24px;
    margin-top: -2px;
}

    .theme-icons i {
        font-size: 14px;
        transition: all 0.3s ease;
        position: absolute;
        bottom: 6px;
    }

        .theme-icons i.fa-moon {
            color: #000;
            filter: drop-shadow(0 0 2px white) drop-shadow(0 0 1px white);
        }

        .theme-icons i.fa-sun {
            color: #fff;
            filter: drop-shadow(0 0 2px black) drop-shadow(0 0 1px black);
            transform: translateY(20px);
            opacity: 0;
        }

.form-check-input:checked ~ .theme-icons i.fa-moon {
    transform: translateY(-20px);
    opacity: 0;
}

.form-check-input:checked ~ .theme-icons i.fa-sun {
    transform: translateY(0);
    opacity: 1;
}

/* استایل سوئیچ */
.form-switch .form-check-input {
    cursor: pointer;
    position: relative;
    z-index: 1;
    opacity: 0;
}

    /* پس‌زمینه سوئیچ */
    .form-switch .form-check-input::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: #e9ecef;
        border-radius: 12px;
        transition: all 0.3s ease;
    }

.form-check-input:checked::before {
    background-color: #212529;
}

/* طراحی واکنش‌گرا */
@@media (max-width: 992px) {
    .sidebar {
        right: calc(-1 * var(--sidebar-width));
    }

    .sidebar-collapsed {
        right: 0;
    }

    .main-content {
        margin-right: 0;
    }

    .main-content-expanded {
        margin-right: 0;
    }

    .footer {
        margin-right: 0;
    }

    .sidebar-toggle {
        right: 10px;
    }

    .footer-section {
        min-width: 100%;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: center !important;
    }

        .header-actions > * {
            margin-bottom: 5px;
        }
}

/* نماد اعتماد */
.enamad-logo {
    background: white;
    padding: 5px;
    border-radius: 5px;
    display: inline-block;
    margin-bottom: 10px;
}

.chosen-container-single .chosen-single,
.chosen-search,
.chosen-results,
.no-results {
    background-color: var(--bs-body-bg) !important;
    color: var(--bs-body-color) !important;
}

.text-ltr {
    margin-inline-start: 0;
}

/* ========== استایل‌های تم رنگی ========== */
/* تم تاریک */
[data-bs-theme="dark"] {
    --primary-color: #1C39BB;
    --secondary-color: #42E2B8;
    --footer-color: #050404;
    --accent-color: #CC3333;
}

    [data-bs-theme="dark"] body {
        background-color: #1a1f33;
        color: #d1d5db;
    }

    [data-bs-theme="dark"] a:not(.btn) {
        color: #7171f1;
    }

        [data-bs-theme="dark"] a:not(.btn):hover {
            color: #9191f7;
        }

    [data-bs-theme="dark"] .header {
        background: linear-gradient(135deg, var(--primary-color), #1a1f33);
    }

    [data-bs-theme="dark"] .sidebar {
        background-color: #2a3042;
    }

    [data-bs-theme="dark"] .sidebar-toggle {
        background: black;
    }

    [data-bs-theme="dark"] .content-box {
        background-color: #2a3042;
        color: #d1d5db;
    }

    [data-bs-theme="dark"] .nav-main-link {
        color: #d1d5db;
    }

    [data-bs-theme="dark"] .card-header,
    [data-bs-theme="dark"] .card-footer {
        background-color: #113;
    }

    [data-bs-theme="dark"] .breadcrumb-container {
        background-color: #2a3042;
        border-bottom-color: #374151;
    }

    [data-bs-theme="dark"] .footer {
        background-color: #1a1f33;
    }

    [data-bs-theme="dark"] .footer-section ul li a {
        color: #9ca3af;
    }

    [data-bs-theme="dark"] .breadcrumb {
        --bs-breadcrumb-divider-color: #adb5bd;
        --bs-breadcrumb-item-active-color: #dee2e6;
        background-color: transparent;
    }

    [data-bs-theme="dark"] .breadcrumb-item a {
        color: #adb5bd;
    }

    [data-bs-theme="dark"] .breadcrumb-item.active {
        color: #dee2e6;
    }

    [data-bs-theme="dark"] .breadcrumb-item + .breadcrumb-item::before {
        color: var(--bs-breadcrumb-divider-color);
    }

/* ========== استایل‌های جهت چینش ========== */
/* حالت RTL */
[dir="rtl"] .ltr {
    direction: ltr;
    float: left;
}

[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: unset !important;
}

[dir="rtl"] .header-nav .profile .dropdown-item i {
    margin-left: 10px;
    margin-right: 0;
}

[dir="rtl"] .alert-dismissible .btn-close {
    right: unset;
}

[dir="rtl"] .text-ltr {
    direction: ltr;
    text-align: right;
}

/* حالت LTR */
[dir="ltr"] .text-ltr {
    direction: ltr;
    text-align: left;
}

[dir="ltr"] .breadcrumb-item + .breadcrumb-item::before {
    /* content: ">";*/
}

[dir="ltr"] .footer-section h5::after {
    right: auto;
    left: 0;
}

[dir="ltr"] .footer-section ul li a:hover {
    padding-right: 0;
    padding-left: 5px;
}

[dir="ltr"] .footer-contact i {
    margin-left: 0;
    margin-right: 5px;
}

[dir="ltr"] .sidebar {
    left: 0;
    right: auto;
}

[dir="ltr"] .sidebar-collapsed {
    left: calc(-1 * var(--sidebar-width));
}

[dir="ltr"] .sidebar-toggle {
    left: var(--sidebar-width);
}

[dir="ltr"] .sidebar-toggle-collapsed {
    left: 10px;
}

[dir="ltr"] .main-content,
[dir="ltr"] .footer {
    margin-left: var(--sidebar-width);
    margin-right: 0;
}

[dir="ltr"] .main-content-expanded,
[dir="ltr"] .footer-expanded {
    margin-left: 0;
}

[dir="ltr"] .breadcrumb-item + .breadcrumb-item {
    padding-right: var(--bs-breadcrumb-item-padding-x);
    padding-left: 0;
}
