:root {
    --primary: #0F2C56;
    --secondary: #173E77;
    --white: #ffffff;
    --bg: #f9f9f9;
    --text-light: #555;
    --color-accent: #D6C28A;
    --color-light: #F5F5F2;
    --color-dark: #09182F;
    --text-dark: #111827;
    --text-light: #4b5563;
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --white: #ffffff;
    --success: #198754;
    --danger: #dc3545;
    --info: #0d6efd;
    --warning: #ffd000;
    --gray-light: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

a {
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    text-wrap: nowrap;
}

.d-grid {
    display: grid !important;
}

.d-flex {
    display: flex !important;
}


.justify-center {
    justify-content: center !important;
}

.align-center {
    align-items: center !important;
}

.justify-right {
    justify-content: right !important;
}

.justify-left {
    justify-content: left !important;
}

.flex-d-column {
    flex-direction: column !important;
}

.flex-d-column-r {
    flex-direction: column-reverse !important;
}

.flex-d-row {
    flex-direction: row !important;
}

.flex-d-row-r {
    flex-direction: row-reverse !important
}

.gap-10 {
    gap: 10px !important;
}

.text-danger {
    color: #ff0000 !important;
}

.text-success {
    color: #008000 !important;
}

.text-center {
    text-align: center;
}

.text-white {
    color: #fff !important;
}

.bg-primary {
    background-color: #008000 !important;
    color: #fff;
}
.bg-info {
    background-color: #005c80 !important;
    color: #fff;
}

.bg-secondary {
    background-color: #4b4d4b !important;
    color: #fff;
}

.bg-success {
    background-color: #008000 !important;
    color: #fff;
}

.bg-warning {
    background-color: #ffd000 !important;
    color: #000;
}

.bg-danger {
    background-color: #ff0000 !important;
    color: #fff;
}

.text-right {
    text-align: right !important;
}

.text-left {
    text-align: left !important;
}

.hidden {
    display: none;
}

/* Buttons */
.btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: 0.3s;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.btn-reset {
    border: none;
    background-color: var(--white);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--white);
}

.btn-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-info {
    background-color: var(--info);
    color: var(--white);
}

.btn-warning {
    background-color: var(--warning);
    color: var(--text-dark);
    /* برای خوانایی بهتر */
}

/* دکمه‌های توخالی (Outline) */
.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-secondary {
    border: 1px solid var(--secondary);
    color: var(--secondary);
    background: transparent;
}

.btn-outline-success {
    border: 1px solid var(--success);
    color: var(--success);
    background: transparent;
}

.btn-outline-danger {
    border: 1px solid var(--danger);
    color: var(--danger);
    background: transparent;
}

.btn-outline-info {
    border: 1px solid var(--info);
    color: var(--info);
    background: transparent;
}

.btn-outline-warning {
    border: 1px solid var(--warning);
    color: var(--warning);
    background: transparent;
}

/* اندازه‌های دکمه‌ها */
.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 6px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 18px;
    border-radius: 10px;
}

.btn:hover {
    filter: brightness(1.1);
    /* روشن‌تر شدن در هنگام هاور */
}

.btn-dark {
    background: var(--bg-dark);
    color: var(--white);
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: var(--white);
}

.alert {
    background: #fffae6;
    border: 1px solid #ffecb3;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
}

.alert ul {
    padding: 0 10px;
}

.alert-danger {
    background: #fd4646;
    border: 1px solid #f32f0d;
    color: #fff;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
}

.status-success {
    background: #32af32;
    border: 1px solid #009b00;
    color: #fff;
    padding: 2px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
}

.status-pending {
    background: #fffae6;
    border: 1px solid #f8dc8e;
    color: #f32f0d;
    padding: 2px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
}

.status-danger {
    background: #fd4646;
    border: 1px solid #f32f0d;
    color: #fff;
    padding: 2px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
}

.status-approved {
    background: #9546fd;
    border: 1px solid #7304bd;
    color: #fff;
    padding: 2px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
}

.pagination {
    gap: 5px;
    /* فاصله بین دکمه‌ها */
}

.pagination .page-link {

    min-width: 40px;
    text-align: center;
}

@media (max-width: 576px) {
    .pagination {
        font-size: 14px;
        /* کوچیک‌تر روی موبایل */
    }

    .pagination .page-link {
        min-width: 32px;
        padding: 6px 10px;
    }
}

.pagination {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding-left: 0;
    list-style: none;
    border-radius: 0.25rem;
}

.page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: #007bff;
    background-color: #fff;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    z-index: 2;
    color: #0056b3;
    text-decoration: none;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-link:focus {
    z-index: 2;
    outline: 0;
    -webkit-box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.page-link:not(:disabled):not(.disabled) {
    cursor: pointer;
}

.page-item:first-child .page-link {
    margin-left: 0;
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.page-item:last-child .page-link {
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.page-item.active .page-link {
    z-index: 1;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    cursor: auto;
    background-color: #fff;
    border-color: #dee2e6;
}

.pagination-lg .page-link {
    padding: 0.75rem 1.5rem;
    font-size: 1.25rem;
    line-height: 1.5;
}

.pagination-lg .page-item:first-child .page-link {
    border-top-left-radius: 0.3rem;
    border-bottom-left-radius: 0.3rem;
}

.pagination-lg .page-item:last-child .page-link {
    border-top-right-radius: 0.3rem;
    border-bottom-right-radius: 0.3rem;
}

.pagination-sm .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.pagination-sm .page-item:first-child .page-link {
    border-top-left-radius: 0.2rem;
    border-bottom-left-radius: 0.2rem;
}

.pagination-sm .page-item:last-child .page-link {
    border-top-right-radius: 0.2rem;
    border-bottom-right-radius: 0.2rem;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .btn {
    padding: 4px 8px;
    font-size: 18px;
    line-height: 1;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.dropdown-item {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: #333;
    min-width: 140px;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--primary-light);
}

/* نمایش منو وقتی active باشه */
.dropdown.show .dropdown-menu {
    display: grid;
    justify-content: center;
    align-items: center;
}

.m-0 {
    margin: 0 !important
}

.m-1 {
    margin: .25rem !important
}

.m-2 {
    margin: .5rem !important
}

.m-3 {
    margin: 1rem !important
}

.m-4 {
    margin: 1.5rem !important
}

.m-5 {
    margin: 3rem !important
}

.mt-0 {
    margin-top: 0 !important
}

.mt-1 {
    margin-top: .25rem !important
}

.mt-2 {
    margin-top: .5rem !important
}

.mt-3 {
    margin-top: 1rem !important
}

.mt-4 {
    margin-top: 1.5rem !important
}

.mt-5 {
    margin-top: 3rem !important
}

.me-0 {
    margin-right: 0 !important
}

.me-1 {
    margin-right: .25rem !important
}

.me-2 {
    margin-right: .5rem !important
}

.me-3 {
    margin-right: 1rem !important
}

.me-4 {
    margin-right: 1.5rem !important
}

.me-5 {
    margin-right: 3rem !important
}

.mb-0 {
    margin-bottom: 0 !important
}

.mb-1 {
    margin-bottom: .25rem !important
}

.mb-2 {
    margin-bottom: .5rem !important
}

.mb-3 {
    margin-bottom: 1rem !important
}

.mb-4 {
    margin-bottom: 1.5rem !important
}

.mb-5 {
    margin-bottom: 3rem !important
}

.ms-0 {
    margin-left: 0 !important
}

.ms-1 {
    margin-left: .25rem !important
}

.ms-2 {
    margin-left: .5rem !important
}

.ms-3 {
    margin-left: 1rem !important
}

.ms-4 {
    margin-left: 1.5rem !important
}

.ms-5 {
    margin-left: 3rem !important
}

.mx-0 {
    margin-right: 0 !important;
    margin-left: 0 !important
}

.mx-1 {
    margin-right: .25rem !important;
    margin-left: .25rem !important
}

.mx-2 {
    margin-right: .5rem !important;
    margin-left: .5rem !important
}

.mx-3 {
    margin-right: 1rem !important;
    margin-left: 1rem !important
}

.mx-4 {
    margin-right: 1.5rem !important;
    margin-left: 1.5rem !important
}

.mx-5 {
    margin-right: 3rem !important;
    margin-left: 3rem !important
}

.my-0 {
    margin-top: 0 !important;
    margin-bottom: 0 !important
}

.my-1 {
    margin-top: .25rem !important;
    margin-bottom: .25rem !important
}

.my-2 {
    margin-top: .5rem !important;
    margin-bottom: .5rem !important
}

.my-3 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important
}

.my-4 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important
}

.my-5 {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important
}

.p-0 {
    padding: 0 !important
}

.p-1 {
    padding: .25rem !important
}

.p-2 {
    padding: .5rem !important
}

.p-3 {
    padding: 1rem !important
}

.p-4 {
    padding: 1.5rem !important
}

.p-5 {
    padding: 3rem !important
}

.pt-0 {
    padding-top: 0 !important
}

.pt-1 {
    padding-top: .25rem !important
}

.pt-2 {
    padding-top: .5rem !important
}

.pt-3 {
    padding-top: 1rem !important
}

.pt-4 {
    padding-top: 1.5rem !important
}

.pt-5 {
    padding-top: 3rem !important
}

.pe-0 {
    padding-right: 0 !important
}

.pe-1 {
    padding-right: .25rem !important
}

.pe-2 {
    padding-right: .5rem !important
}

.pe-3 {
    padding-right: 1rem !important
}

.pe-4 {
    padding-right: 1.5rem !important
}

.pe-5 {
    padding-right: 3rem !important
}

.pb-0 {
    padding-bottom: 0 !important
}

.pb-1 {
    padding-bottom: .25rem !important
}

.pb-2 {
    padding-bottom: .5rem !important
}

.pb-3 {
    padding-bottom: 1rem !important
}

.pb-4 {
    padding-bottom: 1.5rem !important
}

.pb-5 {
    padding-bottom: 3rem !important
}

.ps-0 {
    padding-left: 0 !important
}

.ps-1 {
    padding-left: .25rem !important
}

.ps-2 {
    padding-left: .5rem !important
}

.ps-3 {
    padding-left: 1rem !important
}

.ps-4 {
    padding-left: 1.5rem !important
}

.ps-5 {
    padding-left: 3rem !important
}

.px-0 {
    padding-right: 0 !important;
    padding-left: 0 !important
}

.px-1 {
    padding-right: .25rem !important;
    padding-left: .25rem !important
}

.px-2 {
    padding-right: .5rem !important;
    padding-left: .5rem !important
}

.px-3 {
    padding-right: 1rem !important;
    padding-left: 1rem !important
}

.px-4 {
    padding-right: 1.5rem !important;
    padding-left: 1.5rem !important
}

.px-5 {
    padding-right: 3rem !important;
    padding-left: 3rem !important
}

.py-0 {
    padding-top: 0 !important;
    padding-bottom: 0 !important
}

.py-1 {
    padding-top: .25rem !important;
    padding-bottom: .25rem !important
}

.py-2 {
    padding-top: .5rem !important;
    padding-bottom: .5rem !important
}

.py-3 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important
}

.w-100 {
    width: 100% !important;
}

.w-10 {
    width: 10% !important;
}

.w-20 {
    width: 20% !important;
}

.w-30 {
    width: 30% !important;
}

.w-40 {
    width: 40% !important;
}

.half {
    width: 50% !important;
}

.full {
    width: 100% !important
}


@media (max-width: 768px) {

    .half,
    .w-10,
    .w-20,
    .w-30,
    .w-40 {
        width: 100% !important;
    }
}

/* Custom Modal Styles */
.custom-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    /* پیش‌فرض مخفی است */
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.custom-modal.is-open {
    display: flex;
    /* وقتی فعال می‌شود، نمایش داده شود */
}

.custom-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

.custom-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.custom-modal-title {
    margin: 0;
    font-size: 1.25rem;
}

.custom-modal-close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.custom-modal-close-btn:hover,
.custom-modal-close-btn:focus {
    color: #000;
}

.custom-modal-body {
    padding: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.custom-modal-footer {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    text-align: right;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base styles for all select elements */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    display: block;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;

    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: #34495e;

    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;

    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover state for a softer feel */
select:hover {
    border-color: #c0c0c0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Focus state for a professional look */
select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.2);
    background-color: #f8fbff;
}

/* Styling for the disabled state */
select:disabled {
    background-color: #f5f5f5;
    color: #a0a0a0;
    cursor: not-allowed;
    border-color: #e0e0e0;
}

option:hover {
    transition: all 0.5s ease;
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -ms-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
}
