/**
 * =============================================
 * فایل: assets/css/main.css
 * توضیح: استایل‌های سراسری - متغیرها، ریست، تایپوگرافی، فرم‌ها، مودال، تُست
 * =============================================
 */

/* ---- متغیرهای سراسری (رنگ‌ها، اندازه‌ها، فونت‌ها) ---- */
:root {
    /* سایدبار */
    --sidebar-bg:           #0a1628;
    --sidebar-submenu-bg:   #071020;
    --sidebar-hover:        #142440;
    --sidebar-active:       rgba(200, 150, 12, 0.12);
    --sidebar-text:         #8899b0;
    --sidebar-text-hover:   #c0d0e8;
    --sidebar-text-active:  #d4a020;
    --sidebar-border:       rgba(255, 255, 255, 0.06);
    --sidebar-width:        260px;
    --sidebar-collapsed-width: 70px;

    /* هدر */
    --header-bg:            #ffffff;
    --header-height:        60px;
    --header-shadow:        0 1px 3px rgba(0, 0, 0, 0.06);

    /* محتوا */
    --content-bg:           #f0f2f7;
    --card-bg:              #ffffff;
    --card-shadow:          0 1px 3px rgba(0, 0, 0, 0.06);
    --card-radius:          12px;

    /* رنگ‌های اصلی */
    --accent:               #c8960c;
    --accent-hover:         #b38609;
    --accent-light:         rgba(200, 150, 12, 0.1);
    --primary:              #2563eb;
    --primary-hover:        #1d4ed8;
    --primary-light:        rgba(37, 99, 235, 0.1);
    --success:              #059669;
    --success-light:        rgba(5, 150, 105, 0.1);
    --warning:              #d97706;
    --warning-light:        rgba(217, 119, 6, 0.1);
    --danger:               #dc2626;
    --danger-light:         rgba(220, 38, 38, 0.1);
    --info:                 #0891b2;
    --info-light:           rgba(8, 145, 178, 0.1);

    /* متن */
    --text-primary:         #111827;
    --text-secondary:       #6b7280;
    --text-muted:           #9ca3af;
    --text-inverse:         #ffffff;

    /* حاشیه */
    --border:               #e5e7eb;
    --border-light:         #f3f4f6;

    /* فونت */
    --font-en:              'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ku:              'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;

    /* انیمیشن */
    --transition:           0.2s ease;
    --transition-slow:      0.3s ease;
}


/* ---- ریست پایه ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-en);
    background-color: var(--content-bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* فونت کردی برای حالت RTL */
[dir="rtl"] body {
    font-family: var(--font-ku);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}


/* ---- لینک‌های اصلی (در محتوا) ---- */
.main-wrapper {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    transition: margin 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[dir="rtl"] .main-wrapper {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}

.main-content {
    padding: 24px;
    min-height: calc(100vh - var(--header-height));
}


/* ---- تایپوگرافی ---- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }


/* ---- دکمه‌ها ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    line-height: 1.5;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
}
.btn-primary:hover { background: var(--primary-hover); color: var(--text-inverse); }

.btn-accent {
    background: var(--accent);
    color: var(--text-inverse);
}
.btn-accent:hover { background: var(--accent-hover); color: var(--text-inverse); }

.btn-success {
    background: var(--success);
    color: var(--text-inverse);
}
.btn-success:hover { background: #047857; color: var(--text-inverse); }

.btn-danger {
    background: var(--danger);
    color: var(--text-inverse);
}
.btn-danger:hover { background: #b91c1c; color: var(--text-inverse); }

.btn-warning {
    background: var(--warning);
    color: var(--text-inverse);
}
.btn-warning:hover { background: #b45309; color: var(--text-inverse); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    background: var(--border-light);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    font-size: 0.875rem;
}


/* ---- فرم‌ها ---- */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

[dir="rtl"] select.form-control {
    background-position: left 12px center;
    padding-right: 14px;
    padding-left: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.8125rem;
    color: var(--danger);
    margin-top: 4px;
}


/* ---- برچسب‌ها (Badges) ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    line-height: 1.5;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary);
}


/* ---- آواتار ---- */
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: var(--text-inverse);
    font-weight: 700;
    flex-shrink: 0;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
}

.avatar-md {
    width: 42px;
    height: 42px;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.25rem;
}
.avatar-img {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-img.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-img.avatar-md {
    width: 42px;
    height: 42px;
}

.avatar-img.avatar-lg {
    width: 64px;
    height: 64px;
}


/* ---- کارت‌ها ---- */
.card {
    background: var(--card-bg);
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-light);
    background: var(--border-light);
}


/* ---- جدول‌ها ---- */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead {
    background: var(--border-light);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[dir="rtl"] .data-table th {
    text-align: right;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: var(--primary-light);
}

.data-table .actions-cell {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}


/* ---- مودال ---- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--card-bg);
    border-radius: 16px;
    width: 700px;
    max-width: 92%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px) scale(0.98);
    transition: transform var(--transition-slow);
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}


/* ---- پیام Toast ---- */
#toast-container {
    position: fixed;
    top: 76px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

[dir="rtl"] #toast-container {
    right: auto;
    left: 24px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    min-width: 320px;
    max-width: 450px;
    border-left: 4px solid var(--border);
    animation: slideInRight 0.3s ease forwards;
}

[dir="rtl"] .toast {
    border-left: none;
    border-right: 4px solid var(--border);
    animation: slideInLeft 0.3s ease forwards;
}

.toast-success { border-color: var(--success); }
.toast-success i:first-child { color: var(--success); }

.toast-error { border-color: var(--danger); }
.toast-error i:first-child { color: var(--danger); }

.toast-warning { border-color: var(--warning); }
.toast-warning i:first-child { color: var(--warning); }

.toast-info { border-color: var(--info); }
.toast-info i:first-child { color: var(--info); }

.toast span {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.toast button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 0.875rem;
    transition: color var(--transition);
}

.toast button:hover {
    color: var(--text-primary);
}

.toast-hide {
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

[dir="rtl"] .toast-hide {
    transform: translateX(-100%);
}


/* ---- انیمیشن‌ها ---- */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-100%); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* ---- حالت بارگذاری (Loading Spinner) ---- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    gap: 16px;
}

.loading-state .spinner {
    width: 40px;
    height: 40px;
    border-width: 3px;
}


/* ---- حالت خالی (Empty State) ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.9375rem;
}


/* ---- سرصفحه صفحات ماژول ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    color: var(--accent);
}

.page-actions {
    display: flex;
    gap: 8px;
}


/* ---- صفحه‌بندی (Pagination) ---- */
.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.pagination a:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse);
}


/* ---- Utility Classes ---- */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }
.text-muted   { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.d-flex    { display: flex; }
.gap-1     { gap: 8px; }
.gap-2     { gap: 16px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap  { flex-wrap: wrap; }

.hidden    { display: none !important; }

/* اطمینان از نمایش دکمه‌های هدر */
.header-toggle {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}
/* ===== Quick Launch Menu (افزوده شده در انتهای فایل) ===== */
.header-quicklaunch {
    position: relative;
}
.quicklaunch-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 280px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    z-index: 1003;
    padding: 8px 0;
    margin-top: 8px;
    border: 1px solid #e5e7eb;
    animation: fadeUp 0.2s ease;
}
[dir="rtl"] .quicklaunch-dropdown {
    right: auto;
    left: 0;
}
.quicklaunch-dropdown.open {
    display: block;
}
.ql-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-primary);
}
.ql-header i {
    color: var(--accent);
    font-size: 1rem;
}
.ql-divider {
    border-top: 1px solid #f3f4f6;
    margin: 4px 0;
}
.ql-items {
    padding: 4px 0;
}
.ql-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}
[dir="rtl"] .ql-item {
    text-align: right;
}
.ql-item:hover {
    background: #f3f4f6;
}
.ql-item i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    flex-shrink: 0;
    background: #eff6ff;
    color: #2563eb;
}
.ql-item-info {
    flex: 1;
    min-width: 0;
}
.ql-item-title {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
}
.ql-item-desc {
    display: block;
    font-size: 0.6875rem;
    color: #6b7280;
}
.ql-footer {
    padding: 6px 16px 4px;
    font-size: 0.6rem;
    color: #9ca3af;
    border-top: 1px solid #f3f4f6;
    margin-top: 4px;
}
.ql-shortcut-hint {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* اضافه شدن به انیمیشن‌های موجود */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* ============================================
   RTL Header Fix
   ============================================ */
[dir="rtl"] .header {
    direction: rtl;
}

[dir="rtl"] .header-left {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-right {
    flex-direction: row-reverse;
    margin-left: 0 !important;
    margin-right: auto;
}

[dir="rtl"] .header-brand {
    margin-right: 0;
    margin-left: 12px;
}

[dir="rtl"] .header-branch,
[dir="rtl"] .header-lang {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-branch i,
[dir="rtl"] .header-lang i {
    margin-left: 4px;
    margin-right: 0;
}

[dir="rtl"] .header-profile .profile-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .header-profile .profile-toggle {
    flex-direction: row-reverse;
}

[dir="rtl"] .profile-name {
    margin-left: 0;
    margin-right: 4px;
}

[dir="rtl"] .profile-arrow {
    margin-left: 0;
    margin-right: 4px;
}

[dir="rtl"] .header-icon-btn {
    margin: 0 2px;
}

/* ===== Quick Launch RTL Fix ===== */
[dir="rtl"] .quicklaunch-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .ql-item {
    text-align: right;
}

[dir="rtl"] .ql-item i {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .ql-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .ql-shortcut-hint {
    flex-direction: row-reverse;
}

/* ===== Sidebar Toggle Buttons RTL ===== */
[dir="rtl"] #sidebarToggleBtn {
    margin-right: 0;
    margin-left: 4px;
}

[dir="rtl"] #sidebarFullHide {
    margin-right: 0;
    margin-left: 4px;
}

[dir="rtl"] .header .fa-bars,
[dir="rtl"] .header .fa-arrow-left-to-line {
    transform: scaleX(-1);
}

/* ===== Header Actions (Calculator, Branch, Lang) RTL ===== */
[dir="rtl"] .header-right .header-icon-btn,
[dir="rtl"] .header-right .header-branch,
[dir="rtl"] .header-right .header-lang,
[dir="rtl"] .header-right .header-quicklaunch {
    order: 0;
}

[dir="rtl"] .header-right .header-profile {
    order: -1;
}

/* ===== Profile Dropdown Items RTL ===== */
[dir="rtl"] .dropdown-item {
    text-align: right;
}

[dir="rtl"] .dropdown-item i {
    margin-left: 8px;
    margin-right: 0;
}

[dir="rtl"] .dropdown-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .dropdown-user-info {
    text-align: right;
}
/* ===== SweetAlert Z-Index Fix ===== */
.swal2-popup.swal2-zindex-high {
    z-index: 999999 !important;
}

.swal2-container {
    z-index: 999998 !important;
}
/* ============================================
   Floating Modal (مودال شناور برای ماشین حساب‌ها)
   ============================================ */
.floating-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.floating-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* پس‌زمینه تیره (برای ماشین حساب ارز) */
.floating-modal-overlay.dark-bg {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* پس‌زمینه شفاف (برای ماشین حساب معمولی) */
.floating-modal-overlay.transparent-bg {
    background: transparent;
    backdrop-filter: none;
    pointer-events: none;
}

.floating-modal-overlay.transparent-bg.active {
    pointer-events: none;
}

.floating-modal-overlay.transparent-bg .floating-modal-container {
    pointer-events: auto;
}

.floating-modal-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 96%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 0;
    position: relative;
    pointer-events: auto;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s ease;
}

.floating-modal-overlay.active .floating-modal-container {
    transform: translateY(0) scale(1);
}

.floating-modal-container.no-padding {
    padding: 0;
}

.floating-modal-container.no-padding .floating-modal-body {
    padding: 0;
}

.floating-modal-container.with-padding {
    padding: 20px;
}

.floating-modal-container.with-padding .floating-modal-body {
    padding: 0;
}

.floating-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.floating-modal-close:hover {
    background: #f3f4f6;
    color: #1e40af;
    transform: rotate(90deg);
}

.floating-modal-body {
    padding: 0;
}

/* RTL Support برای مودال شناور */
[dir="rtl"] .floating-modal-close {
    right: auto;
    left: 16px;
}

/* اطمینان از نمایش محتوای ماشین حساب */
.floating-modal-body .calculator-container,
.floating-modal-body .currency-converter {
    display: block;
    min-height: 200px;
}