/* style.css */

/* تنظیمات عمومی برای تمام عناصر */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* اطمینان از اینکه html و body کل صفحه را پوشش دهند */
html {
    height: 100%; /* HTML should take full viewport height */
    background-color: #f0f2f5; /* Softer gray background for the entire page */
}

body {
    height: 100%; /* Body should take full HTML height */
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Use custom font for the entire body with high priority */
    line-height: 1.6;
    background: transparent; /* Body itself should not have a white background so HTML background is visible */
    color: #333;
    display: flex;
    flex-direction: column; /* Arranges content in a column */
    justify-content: flex-start; /* Starts content from the top (instead of center) */
    align-items: center; /* Centers content horizontally */
    min-height: 100vh; /* Minimum page height equal to viewport height */
    direction: rtl; /* Right-to-left direction for Persian language */
    text-align: right; /* Align text to the right */
    overflow-y: auto; /* Enable vertical scrolling if needed */
    overflow-x: hidden; /* Prevent unwanted horizontal scrolling */
    padding: 20px; /* Overall padding for spacing from browser edges */
}

/* Define IRANYekanXFaNum Regular font */
@font-face {
    font-family: 'IRANYekanXFaNum';
    src: local('IRANYekanXFaNum Regular'),
         url('../fonts/IRANYekanXFaNum-Regular.woff2') format('woff2'),
         url('../fonts/IRANYekanXFaNum-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Define IRANYekanXFaNum Bold font */
@font-face {
    font-family: 'IRANYekanXFaNum';
    src: local('IRANYekanXFaNum Bold'),
         url('../fonts/IRANYekanXFaNum-Bold.woff2') format('woff2'),
         url('../fonts/IRANYekanXFaNum-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Define IRANYekanX Regular font (for when FaNum is not needed or available) */
@font-face {
    font-family: 'IRANYekanX';
    src: local('IRANYekanX Regular'),
         url('../fonts/IRANYekanX-Regular.woff2') format('woff2'),
         url('../fonts/IRANYekanX-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Define IRANYekanX Bold font (for when FaNum is not needed or available) */
@font-face {
    font-family: 'IRANYekanX';
    src: local('IRANYekanX Bold'),
         url('../fonts/IRANYekanX-Bold.woff2') format('woff2'),
         url('../fonts/IRANYekanX-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Styling for the main container */
.container {
    background: #fff; /* White background for content container */
    padding: 25px; /* 25px padding on all four sides */
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Ensure shadow exists */
    width: 100%; /* Occupy full available width */
    max-width: 1050px; /* Maximum width of the box */
    margin-top: 20px; /* Margin from top for spacing from messages */
    margin-bottom: 20px; /* Margin from bottom */
    flex-shrink: 0; /* Prevent container from shrinking too much in limited space */
}

/* Styling for headings (general) */
h1, h2, h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center; /* Center headings */
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply font with high priority */
    font-weight: bold !important; /* Ensure bold font weight is applied */
}

/* Styling for forms and form groups (general) */
.form-group {
    margin-bottom: 20px; /* Increase spacing between form groups */
    display: block; /* Ensure block display for vertical layout */
}

.form-group label {
    display: flex; /* To place icon and label text side-by-side */
    align-items: center; /* Vertical alignment of icon and text */
    margin-bottom: 10px; /* More space from input */
    font-weight: bold;
    color: #34495e; /* Darker color for label */
    font-size: 1.05em; /* Slightly larger */
    text-align: right; /* Ensure right alignment */
}

.form-group label .fas {
    margin-left: 10px; /* Space between icon and label text */
    color: #3498db; /* Icon color */
    font-size: 1.1em; /* Icon size */
    display: inline-block; /* Ensure icon is inline */
}

.form-group input[type="email"]{
    width: 100%;
    padding: 12px; /* More padding for fields */
    border: 1px solid #ced4da; /* Softer border */
    border-radius: 6px; /* Rounder corners */
    font-size: 1.05em; /* Slightly larger font */
    font-family: 'Arial', sans-serif !important; /* Apply font to input fields and select */
    background-color: #f8f9fa; /* Slightly gray background for fields */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: block; /* Ensure input is displayed as a block */
}

.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px; /* More padding for fields */
    border: 1px solid #ced4da; /* Softer border */
    border-radius: 6px; /* Rounder corners */
    font-size: 1.05em; /* Slightly larger font */
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply font to input fields and select */
    background-color: #f8f9fa; /* Slightly gray background for fields */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    display: block; /* Ensure input is displayed as a block */
}
/* استایل اختصاصی برای select#contract_select */
#contract_select {
    width: 100%; /* اینها را از بالا به ارث می‌برد، اما برای اطمینان می‌توان تکرار کرد */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    /* اعمال فونت لاتین با اولویت بالا */
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif !important;
    direction: ltr !important; /* جهت چپ به راست */
    text-align: right !important; /* تراز متن به راست */
    unicode-bidi: embed; /* برای اطمینان از نمایش صحیح اعداد انگلیسی/لاتین */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #80bdff; /* Border color on focus */
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); /* Soft blue shadow on focus */
}

.form-group input[type="checkbox"] {
    margin-left: 5px; /* Spacing from label text in RTL */
}

/* Styling for buttons (general) */
.btn {
    display: inline-flex; /* To align icon and text */
    align-items: center;
    justify-content: center; /* Center text horizontally inside buttons */
    gap: 8px; /* Space between icon and text */
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px; /* Slightly more padding */
    border: none;
    border-radius: 8px; /* Rounder corners */
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease; /* Smooth animation */
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply font with high priority */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); /* Soft shadow */
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px); /* Slight upward movement on hover */
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15); /* Slightly stronger shadow */
    filter: brightness(1.1); /* Slightly brighter */
}

/* Specific colors for buttons */
.btn-primary { /* Subscription management / Activation */
    background-color: #a7288c;
    color: #fff;
}
.btn-primary:hover {
    background-color: #218838;
}

.btn-info { /* Profile editing */
    background-color: #007bff;
    color: #fff;
}
.btn-info:hover {
    background-color: #0056b3;
}

.btn-secondary { /* Your transactions and back to dashboard */
    background-color: #17a2b8;
    color: #fff;
}
.btn-secondary:hover {
    background-color: #138496;
}

.btn-danger { /* Logout */
    background-color: #dc3545;
    color: #fff;
}
.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning { /* Mobile verification (new) */
    background-color: #ffc107;
    color: #333;
}
.btn-warning:hover {
    background-color: #e0a800;
}

/* Styling for link buttons */
.link-button {
    display: inline-block; /* Change to inline-block for more flexibility */
    text-align: center;
    margin-top: 15px;
    color: #007bff;
    text-decoration: none;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply font to links with high priority */
}

.link-button:hover {
    text-decoration: underline;
}

/* Styling for error and success messages */
.message {
    padding: 15px; /* More padding */
    margin-bottom: 25px; /* More spacing */
    border-radius: 8px; /* Rounder corners */
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply font with high priority */
    text-align: center; /* Center message text */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Soft shadow */
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.warning, .message.info { /* Add info to warning */
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}


/* Styling for tables (for manage_users.php and transactions.php) */
table.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply font to table with high priority */
    border: 1px solid #ddd; /* Add border to the entire table */
    border-radius: 8px; /* Rounded corners for the table */
    overflow: hidden; /* Ensures rounded corners are visible with borders */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Subtle shadow for the table */
}

table.data-table th, table.data-table td {
    padding: 12px;
    border: 1px solid #ddd; /* Borders for cells */
    text-align: right;
}

table.data-table th {
    background-color: #f2f2f2;
    color: #555;
    font-weight: bold; /* Ensure header text is bold */
}

table.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table.data-table tr:hover {
    background-color: #f1f1f1;
}

/* Styling for modal (popup) */
#deleteConfirmationModal {
    display: none; /* Hidden by default */
    position: fixed; /* Positions on top of all content */
    z-index: 1000; /* Higher than other elements */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* Dark and transparent background */
    display: flex; /* For centering modal content */
    justify-content: center;
    align-items: center;
}

#deleteConfirmationModal > div {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Style for subscription status display box (old style, replaced by .card) */
/* This class is no longer directly used and is replaced by .message.info */
.subscription-status-display {
    /* Previous styles for this class are now covered by .message.info */
}
.subscription-status-display p {
    /* Previous styles for this class are now covered by .message.info p */
}

/* --- New styles for enhanced appeal (Dashboard and Profile Edit) --- */

/* Styling for the main dashboard container and similar pages */
.dashboard-container {
    padding: 30px; /* More padding for better spacing */
    max-width: 1000px; /* Increased max-width */
    background: #ffffff;
    border-radius: 12px; /* Rounder corners */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* Deeper, more professional shadow */
    margin-top: 30px;
    margin-bottom: 30px;
}

/* Styling for the main dashboard title and similar pages */
.dashboard-title {
    font-size: 2.2em; /* Larger size */
    color: #2c3e50; /* Darker, more professional color */
    margin-bottom: 35px;
    position: relative;
    padding-bottom: 10px;
}
.dashboard-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #3498db; /* Underline for the title */
    margin: 10px auto 0 auto;
    border-radius: 2px;
}

/* Styling for info cards */
.card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px; /* Round corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Softer shadow */
    padding: 25px;
    margin-bottom: 25px; /* Spacing between cards */
    display: flex; /* For aligning icon and content */
    align-items: flex-start; /* Align content to the top */
    gap: 20px; /* Space between icon and text */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Hover animation */
}

.card:hover {
    transform: translateY(-5px); /* Move upward on hover */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); /* More prominent shadow on hover */
}

.card-icon {
    font-size: 2.5em; /* Icon size */
    color: #3498db; /* Icon color */
    min-width: 50px; /* Minimum width for icon */
    text-align: center;
}
.card-icon .fas {
    display: block; /* Ensure icon is properly centered */
    margin-bottom: 5px;
}

.card-content {
    flex-grow: 1;
    text-align: right; /* Align text to the right */
}

.card-content h3 {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
    text-align: right; /* Heading inside card should be right-aligned */
}

.card-content p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.8;
}

.user-info-card .welcome-message {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    text-align: right;
}
.user-info-card .user-role {
    font-size: 1em;
    color: #7f8c8d;
    text-align: right;
}

/* Style for mobile verification warning message */
.mobile-verify-warning.message.error {
    background-color: #ffe0b2; /* Soft orange color */
    border-color: #ffcc80;
    color: #e65100; /* Dark orange text color */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.mobile-verify-warning p {
    margin: 0;
    font-size: 1.1em;
    font-weight: bold;
}
.mobile-verify-warning .fas {
    margin-left: 10px; /* Space between icon and text */
    font-size: 1.3em;
}


/* Style for subscription progress bar */
.progress-bar-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 5px;
    height: 20px;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background-color: #28a745; /* Green for progress */
    border-radius: 5px;
    text-align: center;
    color: white;
    font-size: 0.9em;
    line-height: 20px;
    transition: width 0.5s ease-in-out; /* Smooth animation for width change */
}

.progress-bar-lifetime {
    background-color: #007bff; /* Blue for lifetime */
}

.progress-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #333;
    font-size: 0.9em;
    line-height: 20px;
    font-weight: bold;
    text-shadow: 0 0 2px rgba(255,255,255,0.7); /* Shadow for better readability on bar */
}


/* Style for arbitrage button */
.arbitrage-section {
    text-align: center;
    padding: 30px;
    background-color: #f7f7f7; /* Slightly different background */
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 25px;
}
.btn-arbitrage {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%); /* Gold/orange gradient */
    color: #333 !important; /* Dark text color for contrast */
    padding: 18px 40px; /* Larger padding */
    font-size: 1.4em; /* Larger font */
    font-weight: bold;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 6px 15px rgba(255, 193, 7, 0.4); /* Attractive shadow */
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex; /* For icon and text alignment */
    align-items: center;
    gap: 10px;
}
.btn-arbitrage:hover {
    transform: translateY(-3px); /* Move upward on hover */
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.6); /* Stronger shadow */
    filter: brightness(1.05); /* Slightly brighter */
}
.btn-arbitrage .fas {
    font-size: 1.2em; /* Icon size inside button */
}


/* Style for bottom button group */
.action-buttons-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* For responsiveness */
    gap: 15px; /* Space between buttons */
    margin-top: 30px;
    margin-bottom: 20px;
}

/* General button styling (improved) */
.btn {
    padding: 12px 25px; /* Slightly more padding */
    border-radius: 8px; /* Rounder corners */
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1); /* Soft shadow */
    display: inline-flex; /* For icon and text alignment */
    align-items: center;
    justify-content: center; /* Center text horizontally inside buttons */
    gap: 8px; /* Space between icon and text */
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px); /* Slight upward movement */
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15); /* Slightly stronger shadow */
    filter: brightness(1.1); /* Slightly brighter */
}

/* Specific colors for buttons */
.btn-primary { /* Subscription management / Activation */
    background-color: #28a745; /* Green */
    color: #fff;
}
.btn-primary:hover {
    background-color: #218838;
}

.btn-info { /* Profile editing */
    background-color: #007bff; /* Blue */
    color: #fff;
}
.btn-info:hover {
    background-color: #0056b3;
}

.btn-secondary { /* Your transactions and back to dashboard */
    background-color: #17a2b8; /* Teal */
    color: #fff;
}
.btn-secondary:hover {
    background-color: #138496;
}

.btn-danger { /* Logout */
    background-color: #dc3545; /* Red */
    color: #fff;
}
.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning { /* Mobile verification (new) */
    background-color: #ffc107;
    color: #333; /* Dark text for better contrast */
}
.btn-warning:hover {
    background-color: #e0a800;
}

/* --- Specific styles for profile edit form --- */
.profile-edit-form {
    display: block; /* Form should be displayed as a block so it doesn't mess up cards */
    padding: 25px; /* Padding for the form */
}

/* Style for mobile verification warning message inside form */
.profile-edit-form .mobile-verify-warning.message.error {
    background-color: #ffe0b2;
    border-color: #ffcc80;
    color: #e65100;
    padding: 15px;
    border-radius: 8px;
    box-shadow: none; /* Remove extra shadow */
    margin-top: 15px; /* Space from mobile field */
    text-align: right;
    display: flex; /* For icon and text layout */
    align-items: flex-start;
    gap: 10px;
}

.profile-edit-form .mobile-verify-warning p {
    margin: 0;
    font-size: 1em;
    font-weight: normal;
}

.profile-edit-form .mobile-verify-warning .fas {
    font-size: 1.1em;
    margin-left: 0; /* Remove extra margin-left */
    margin-right: 10px; /* Space icon from text */
    color: #e65100; /* Warning icon color */
}

/* Style for form submit button */
.profile-edit-form .btn {
    width: auto; /* Button should not take full width */
    margin-top: 20px; /* Space from last field */
    /* align-self: flex-end; This line is removed so the button is in normal block flow */
}

/* --- Specific styles for subscribe.php page --- */
.subscription-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px; /* Increase space between cards */
    margin-top: 25px;
    margin-bottom: 25px;
}

.subscription-plan-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px; /* Rounder corners */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); /* More attractive shadow */
    padding: 30px; /* More padding */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* For vertical content layout */
    flex-direction: column;
    justify-content: space-between; /* Distribute space */
    align-items: center; /* Horizontal centering of content */
}

.subscription-plan-card:hover {
    transform: translateY(-8px); /* Move upward on hover */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15); /* More prominent shadow on hover */
}

.subscription-plan-card h3 {
    font-size: 1.8em; /* Larger heading */
    color: #2c3e50;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 8px;
    text-align: center; /* Ensure centering */
}
.subscription-plan-card h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: #3498db;
    margin: 8px auto 0 auto;
    border-radius: 2px;
}

.subscription-plan-card .price {
    font-size: 1.8em; /* Larger size for price */
    font-weight: bold;
    color: #007bff; /* Blue color for prices */
    margin-bottom: 15px;
}

.subscription-plan-card .duration {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 25px; /* More space to button */
}

.subscription-plan-card form {
    margin-top: auto; /* Pushes button to the bottom of the card */
    width: 100%; /* Form takes full width of card */
}

.subscription-plan-card .btn {
    width: 100%; /* Buttons take full width of card */
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: bold;
}

.subscription-plan-card .btn-primary { /* For free activation */
    background-color: #28a745;
}
.subscription-plan-card .btn-primary:hover {
    background-color: #218838;
}

.subscription-plan-card .btn-info { /* For purchase */
    background-color: #007bff;
}
.subscription-plan-card .btn-info:hover {
    background-color: #0056b3;
}

.subscription-plan-card .info-text {
    color: #007bff;
    margin-top: 15px;
    font-weight: bold;
}

.subscription-plan-card .muted-text {
    color: #6c757d;
    margin-top: 15px;
    text-align: center; /* Ensure centering of these texts */
}

/* --- Specific styles for login.php page --- */
.login-links-group {
    text-align: center; /* Center links */
    margin-top: 25px; /* Space from form */
    margin-bottom: 15px; /* Space from footer */
}

.login-links-group .link-button {
    display: block; /* Links appear one below another */
    margin-bottom: 10px; /* Space between links */
}

.login-links-group .link-button:last-child {
    margin-bottom: 0; /* Remove margin from last link */
}

/* --- Specific styles for register.php page --- */
.register-links-group {
    text-align: center; /* Center links */
    margin-top: 25px; /* Space from form */
    margin-bottom: 15px; /* Space from footer */
}

.register-links-group .link-button {
    display: block; /* Links appear one below another */
    margin-bottom: 10px; /* Space between links */
}

.register-links-group .link-button:last-child {
    margin-bottom: 0; /* Remove margin from last link */
}

/* --- Specific styles for forgot_password.php page --- */
.forgot-password-links-group {
    text-align: center; /* Center links */
    margin-top: 25px; /* Space from form */
    margin-bottom: 15px; /* Space from footer */
}

.forgot-password-links-group .link-button {
    display: block; /* Links appear one below another */
    margin-bottom: 10px; /* Space between links */
}

.forgot-password-links-group .link-button:last-child {
    margin-bottom: 0; /* Remove margin from last link */
}


/* --- Responsive (Mobile) - Integrated Section --- */
@media (max-width: 768px) { /* Changed from 600px to 768px to cover tablets */
    body {
        padding: 15px; /* Reduce overall body padding on mobile */
    }

    .container {
        padding: 20px; /* Container padding on mobile */
        margin: 15px auto;
        width: calc(100% - 30px); /* Adjust width for body padding */
    }

    .dashboard-container { /* Responsive styles for dashboard and profile edit form */
        padding: 20px;
        margin: 15px auto;
    }
    .dashboard-title {
        font-size: 1.8em;
    }
    .card {
        flex-direction: column; /* Icon and content stack on mobile */
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 20px;
    }
    .card-icon {
        margin-bottom: 10px;
    }
    .card-content {
        text-align: center;
    }
    .card-content h3 {
        text-align: center;
    }
    .user-info-card .welcome-message,
    .user-info-card .user-role {
        text-align: center;
    }
    .action-buttons-group .btn {
        width: 100%; /* Buttons take full width on mobile */
        margin-bottom: 10px;
    }
    .btn-arbitrage {
        padding: 15px 25px;
        font-size: 1.1em;
    }

    /* Responsive styles for profile edit form */
    .profile-edit-form .form-group {
        /* On mobile, form groups are still vertical but no need for re-flexbox */
        display: block; /* Ensure block display */
        text-align: right; /* Align to the right */
    }
    .profile-edit-form .form-group label {
        justify-content: flex-start; /* Align icon and label text to the right */
    }
    .profile-edit-form .btn {
        width: 100%; /* Button takes full width on mobile */
        align-self: center; /* Center button */
    }
    .profile-edit-form .mobile-verify-warning {
        flex-direction: column; /* Icon and warning text stack on mobile */
        align-items: center;
        text-align: center;
    }
    .profile-edit-form .mobile-verify-warning .fas {
        margin-right: 0;
        margin-bottom: 5px;
    }

    /* Responsive styles for table (transactions.php) */
    table, thead, tbody, th, td, tr {
        display: block !important; /* Force block display */
    }

    thead tr {
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }

    tr {
        border: 1px solid #ccc !important;
        margin-bottom: 10px !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        background-color: #fff !important; /* Ensure white background for rows */
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important; /* Add shadow to each row */
    }

    td {
        border: none !important;
        border-bottom: 1px solid #eee !important;
        position: relative !important;
        padding: 15px !important; /* Consistent padding for cell */
        text-align: right !important;
        display: flex !important; /* Use flexbox for internal td layout */
        flex-direction: column !important; /* Stack elements inside td vertically */
        align-items: flex-start !important; /* Align internal elements to the right */
    }

    td:before {
        content: attr(data-label) !important; /* Use data-label for column title */
        font-weight: bold !important;
        color: #555 !important; /* Title color */
        margin-bottom: 8px !important; /* Space between title and content */
        display: block !important; /* Ensure title is on a separate line */
        width: 100% !important; /* Title takes full width */
        text-align: right !important; /* Align title to the right */
        font-size: 0.9em !important; /* Slightly smaller for title */
    }

    /* Specific styles for date and time content in transactions table */
    td .transaction-datetime-group {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
    }
    td .transaction-date {
        font-size: 1em !important;
        color: #333 !important;
        margin-bottom: 5px !important;
    }

    td .transaction-time {
        font-size: 0.8em !important;
        color: #666 !important;
        display: block !important;
        margin-top: 0 !important;
    }

    td:last-child {
        border-bottom: none !important;
    }

    /* For action buttons in mobile table */
    td a.btn {
        display: inline-block !important;
        width: auto !important;
        margin-bottom: 0 !important;
        padding: 5px 10px !important;
        font-size: 12px !important;
    }

    /* Adjust message styles on mobile (if needed) */
    .message {
        padding: 15px !important;
        margin-bottom: 15px !important;
        border-radius: 8px !important;
        font-size: 0.95em !important;
    }

    /* Responsive styles for subscription cards */
    .subscription-plans-grid {
        grid-template-columns: 1fr !important; /* Single column on mobile */
        gap: 20px !important;
    }
    .subscription-plan-card {
        padding: 25px !important;
    }
    .subscription-plan-card h3 {
        font-size: 1.6em !important;
    }
    .subscription-plan-card .price {
        font-size: 1.6em !important;
    }
    .subscription-plan-card .duration {
        font-size: 1em !important;
    }
    .subscription-plan-card .btn {
        font-size: 1em !important;
        padding: 10px 15px !important;
    }
}
















    /* --- استایل‌های خاص برای صفحه make_deal.php --- */

    .make-deal-container {
        max-width: 700px; /* عرض مناسب برای این صفحه */
        margin-top: 30px;
    }

    .make-deal-form .form-section {
        background-color: #e3f2fd; /* آبی روشن */
        border: 1px solid #90caf9;
        border-radius: 10px;
        padding: 25px;
        margin-bottom: 30px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .make-deal-form .section-title {
        text-align: right;
        color: #1a237e; /* آبی تیره */
        font-size: 1.6em;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .make-deal-form .section-title .fas {
        color: #2196f3; /* آبی روشن‌تر */
    }

    .make-deal-form .input-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
        margin-bottom: 25px;
    }

    .make-deal-form .input-group {
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .make-deal-form .input-group h4 {
        text-align: center;
        color: #3f51b5; /* آبی بنفش */
        margin-bottom: 20px;
        font-size: 1.2em;
        position: relative;
        padding-bottom: 8px;
    }
    .make-deal-form .input-group h4::after {
        content: '';
        display: block;
        width: 40px;
        height: 3px;
        background-color: #3f51b5;
        margin: 8px auto 0 auto;
        border-radius: 2px;
    }

    .make-deal-form .input-group .form-group {
        margin-bottom: 15px;
    }
    .make-deal-form .input-group .form-group:last-child {
        margin-bottom: 0;
    }

    .make-deal-form .calculate-btn {
        width: 100%;
        padding: 15px;
        font-size: 1.2em;
        background-color: #28a745; /* سبز */
    }
    .make-deal-form .calculate-btn:hover {
        background-color: #218838;
    }

    /* --- استایل‌های پاپ‌آپ تایید معامله --- */
    .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        opacity: 1;
        transition: opacity 0.3s ease-in-out;
    }

    .modal-overlay.hidden {
        opacity: 0;
        pointer-events: none;
    }

    .modal-content {
        background-color: #fff;
        padding: 30px;
        border-radius: 12px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
        max-width: 500px;
        width: 90%;
        text-align: center;
        position: relative;
        animation: fadeInScale 0.3s ease-out forwards;
        font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important;
    }

    @keyframes fadeInScale {
        from { opacity: 0; transform: scale(0.9); }
        to { opacity: 1; transform: scale(1); }
    }

    .modal-close-button {
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 28px;
        cursor: pointer;
        color: #888;
        transition: color 0.2s ease;
    }

    .modal-close-button:hover {
        color: #333;
    }

    .modal-icon .fas {
        font-size: 3em;
        color: #007bff;
        margin-bottom: 15px;
    }

    .modal-content h3 {
        color: #333;
        margin-bottom: 10px;
        font-size: 24px;
        font-weight: bold;
    }

    .modal-content p {
        color: #555;
        font-size: 16px;
        line-height: 1.8;
        margin-bottom: 15px;
    }

    .deal-summary {
        background-color: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 20px;
        text-align: right; /* متن خلاصه به راست تراز شود */
    }

    .deal-summary p {
        margin-bottom: 8px;
        font-size: 1.05em;
        color: #495057;
    }

    .deal-summary p:last-child {
        margin-bottom: 0;
    }

    .deal-summary strong {
        color: #343a40;
        margin-left: 5px; /* فاصله بین لیبل و مقدار */
    }

    .deal-summary span {
        direction: rtl; /* برای مقادیر عددی و لاتین داخل خلاصه */
        unicode-bidi: embed;
        font-weight: normal;
    }

    .modal-actions {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-top: 20px;
    }

    .modal-actions .btn {
        padding: 10px 25px;
        font-size: 1.1em;
        border-radius: 8px;
    }

    .modal-actions .btn-success {
        background-color: #28a745;
    }
    .modal-actions .btn-success:hover {
        background-color: #218838;
    }

    .modal-actions .btn-danger {
        background-color: #dc3545;
    }
    .modal-actions .btn-danger:hover {
        background-color: #c82333;
    }

    /* ریسپانسیو برای make_deal.php */
    @media (max-width: 768px) {
        .make-deal-container {
            padding: 15px;
        }
        .make-deal-form .form-section {
            padding: 20px;
        }
        .make-deal-form .input-grid {
            grid-template-columns: 1fr;
            gap: 20px;
        }
        .make-deal-form .input-group {
            padding: 15px;
        }
        .make-deal-form .calculate-btn {
            font-size: 1.1em;
            padding: 12px;
        }
        .modal-content {
            padding: 20px;
            max-width: 95%;
        }
        .modal-content h3 {
            font-size: 20px;
        }
        .modal-content p {
            font-size: 14px;
        }
        .modal-close-button {
            font-size: 24px;
            top: 10px;
            right: 15px;
        }
        .modal-actions {
            flex-direction: column;
            gap: 10px;
        }
        .modal-actions .btn {
            width: 100%;
        }
    }
    /* --- استایل‌های پاپ‌آپ ثبت موفقیت (Success Modal) --- */
.success-modal-content {
    background-color: #e6ffe6; /* سبز روشن برای پس‌زمینه */
    border: 1px solid #a0e0a0;
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.2); /* سایه سبز */
}

.success-modal-content .modal-icon.success-icon .fas {
    color: #28a745; /* رنگ سبز برای آیکون تیک */
}

.success-modal-content h3 {
    color: #1e7e34; /* سبز تیره برای عنوان */
}

.success-modal-content p {
    color: #336600; /* سبز متوسط برای متن */
}

.success-modal-content .modal-actions .btn-success {
    background-color: #28a745; /* سبز دکمه */
}

.success-modal-content .modal-actions .btn-success:hover {
    background-color: #218838; /* سبز تیره‌تر در هاور */
}























/* Unique styles for accounting.php page */
.accounting-container-unique {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
    text-align: right;
}

.accounting-title-unique, .accounting-section-title-unique {
    text-align: center;
    font-family: 'Vazirmatn', sans-serif;
    color: #343a40;
    margin-bottom: 20px;
}

.accounting-section-title-unique {
    font-size: 1.2rem;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-top: 30px;
}

.accounting-form-section-unique {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.accounting-input-grid-unique {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.accounting-form-group-unique {
    display: flex;
    flex-direction: column;
}

.accounting-form-group-unique label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #495057;
}

.accounting-form-group-unique select {
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
}

.accounting-flows-list-unique {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.accounting-flow-item-unique {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,.05);
    transition: transform 0.2s;
}

.accounting-flow-item-unique:hover {
    transform: translateY(-3px);
}

.accounting-flow-icon-container-unique {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 15px;
}

.accounting-icon-positive-unique {
    color: #28a745;
    font-size: 1.5rem;
}

.accounting-icon-negative-unique {
    color: #dc3545;
    font-size: 1.5rem;
}

.accounting-flow-details-unique {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.accounting-flow-title-unique {
    font-size: 1.1rem;
    font-weight: bold;
    color: #343a40;
}

.accounting-flow-meta-unique {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 5px;
}

.accounting-flow-amount-unique {
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 20px;
}

.accounting-amount-positive-unique {
    color: #28a745;
}

.accounting-amount-negative-unique {
    color: #dc3545;
}

.accounting-flow-info-icon-container-unique {
    position: relative;
    cursor: pointer;
    margin-right: 10px;
}

.accounting-flow-info-icon-unique {
    font-size: 1rem;
    color: #17a2b8;
}

/* Tooltip styles */
[data-tooltip-unique]::after {
    content: attr(data-tooltip-unique);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #343a40;
    color: #fff;
    padding: 8px;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    z-index: 10;
}

[data-tooltip-unique]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Pagination Styles */
.accounting-pagination-container-unique {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}

.accounting-pagination-btn-unique {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    color: #495057;
    transition: background-color 0.2s, color 0.2s;
}

.accounting-pagination-btn-unique:hover {
    background-color: #e9ecef;
}

.accounting-pagination-btn-active-unique {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.accounting-pagination-btn-active-unique:hover {
    background-color: #0056b3;
}

.accounting-no-flows-message-unique,
.accounting-error-message-unique {
    text-align: center;
    font-size: 1.1rem;
    color: #6c757d;
    padding: 20px;
    background-color: #f1f1f1;
    border-radius: 8px;
}

/* Loading Overlay Styles */
.accounting-loading-overlay-unique {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}
.accounting-loading-content-unique {
    text-align: center;
    padding: 20px 40px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.accounting-spinner-unique {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin-unique 1s linear infinite;
    margin: 0 auto 15px;
}
@keyframes spin-unique {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}




















/* --- استایل‌های اختصاصی برای صفحه offline_arbitrage.php --- */

/* کانتینر اصلی صفحه آربیتراژ */
.offline-arbitrage-container {
    max-width: 1100px; /* افزایش عرض کانتینر برای این صفحه خاص */
    /* background, padding, border-radius, box-shadow, width, margin-top, margin-bottom, flex-shrink از .container عمومی به ارث برده می‌شوند */
}

/* نوار اطلاعات بالا (تاریخ، ساعت، وضعیت) */
.info-bar {
    display: flex;
    justify-content: space-between; /* توزیع فضا بین آیتم‌ها */
    align-items: center;
    background-color: #e0f2f7; /* رنگ آبی روشن */
    border: 1px solid #b3e5fc;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    font-size: 1.1em;
    font-weight: bold;
    color: #01579b;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    flex-wrap: wrap; /* برای ریسپانسیو بودن در صفحات کوچک */
}

.info-bar .info-item {
    padding: 0 10px;
    white-space: nowrap; /* جلوگیری از شکستن خط */
    flex-grow: 1; /* اجازه رشد به آیتم‌ها برای پر کردن فضا */
    text-align: center; /* مرکزیت متن در هر آیتم */
}

.info-bar .date-info {
    text-align: right; /* تراز راست برای تاریخ */
    flex-basis: 35%; /* تخصیص فضای بیشتر به تاریخ در دسکتاپ */
}

.info-bar .time-info {
    text-align: center; /* مرکزیت برای ساعت */
    flex-basis: 30%; /* تخصیص فضا برای ساعت */
    direction: ltr; /* جهت چپ به راست برای ساعت */
    unicode-bidi: embed;
}

.info-bar .status-info {
    text-align: left; /* تراز چپ برای وضعیت روز کاری */
    flex-basis: 35%; /* تخصیص فضا برای وضعیت روز */
}


/* جدید: استایل برای کادر وضعیت بازار آتی */
.market-status-box {
    background-color: #f0f0f0; /* رنگ پیش‌فرض خاکستری */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px; /* فاصله از کادر هشدار */
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.market-status-box.status-preopen {
    background-color: #fff3cd; /* زرد برای پیش گشایش */
    border-color: #ffeeba;
    color: #856404;
}

.market-status-box.status-open {
    background-color: #d4edda; /* سبز برای باز */
    border-color: #c3e6cb;
    color: #155724;
}

.market-status-box.status-closed {
    background-color: #f8d7da; /* قرمز برای بسته */
    border-color: #f5c6cb;
    color: #721c24;
}









/* New: Styles for the Profit Comparison Chart */
.chart-section {
    background: linear-gradient(145deg, #fcfcfc, #f0f0f0); /* Light gradient background */
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    padding: 25px;
    margin-top: 40px; /* Increased space from the section above */
    margin-bottom: 30px; /* Space before the next section */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    text-align: center;
}

.chart-section .chart-title {
    font-size: 1.6em;
    color: #34495e;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    display: flex; /* To center title and icon */
    align-items: center;
    justify-content: center; /* Center title */
    gap: 10px;
    font-weight: bold;
}

.profit-comparison-chart {
    width: 100%;
    height: 150px; /* Adjust height as needed */
    display: flex; /* To center the SVG */
    justify-content: center;
    align-items: center;
}

.profit-comparison-chart svg {
    overflow: visible; /* Allow labels to go outside SVG bounds if needed */
}

/* Styles for D3 elements */
.bar {
    /* Styles are set dynamically by D3, but general styles can be here */
    transition: all 0.3s ease;
}

.bar-label {
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif;
    font-size: 0.9em; /* Smaller font size for category labels */
    font-weight: normal; /* Ensure not bold */
}

.bar-value-label {
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Changed to custom font */
    font-size: 0.8em; /* Smaller font size for values */
    fill: #ffffff; /* Changed to white for better contrast */
    font-weight: normal; /* Not bold */
    direction: ltr; /* Ensure LTR for numbers */
    unicode-bidi: embed;
}

/* Responsive adjustments for chart */
@media (max-width: 768px) {
    .chart-section {
        padding: 15px;
        margin-top: 30px; /* Adjusted for mobile */
        margin-bottom: 20px;
    }
    .chart-section .chart-title {
        font-size: 1.4em;
        margin-bottom: 15px;
    }
    .profit-comparison-chart {
        height: 100px; /* Smaller height on mobile */
    }
    .bar-label {
        font-size: 0.8em;
    }
    .bar-value-label {
        font-size: 0.7em;
    }
}











/* کادر هشدار */
.warning-note {
    background-color: #fff3cd; /* رنگ زرد هشدار */
    border: 1px solid #ffeeba;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1em;
    color: #856404;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* استایل بخش‌های فرم */
.arbitrage-form .form-section {
    background: linear-gradient(145deg, #f0f0f0, #ffffff); /* تغییر رنگ به گرادیانت خاکستری */
    border: 1px solid #e0e0e0; /* تغییر رنگ حاشیه */
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.arbitrage-form .section-title {
    text-align: right;
    color: #1a237e; /* آبی تیره */
    font-size: 1.6em;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.arbitrage-form .section-title .fas {
    color: #2196f3; /* آبی روشن‌تر */
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.input-group {
    background: linear-gradient(145deg, #f0f0f0, #ffffff); /* تغییر رنگ به گرادیانت خاکستری */
    border: 1px solid #e0e0e0; /* تغییر رنگ حاشیه */
    border-radius: 12px; /* گوشه‌های گردتر */
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); /* سایه همخوانی با سایر باکس‌ها */
}

.input-group h4 {
    text-align: center;
    color: #3f51b5; /* آبی بنفش */
    margin-bottom: 20px;
    font-size: 1.2em;
    position: relative;
    padding-bottom: 8px;
}
.input-group h4::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background-color: #3f51b5;
    margin: 8px auto 0 auto;
    border-radius: 2px;
}

.input-group .form-group {
    margin-bottom: 15px; /* کاهش فاصله بین فیلدها در گروه */
}
.input-group .form-group:last-child {
    margin-bottom: 0;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    background-color: #4caf50; /* سبز */
}
.calculate-btn:hover {
    background-color: #43a047;
}

/* --- استایل‌های جدید برای کادرهای نتیجه در user/offline_arbitrage.php --- */

.results-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* دو ستون در دسکتاپ */
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

/* جدید: کانتینر برای ردیف دوم (نسبت و وضعیت) */
.arbitrage-ratio-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* دو ستون در دسکتاپ */
    gap: 20px;
    margin-top: 20px; /* فاصله از ردیف بالا */
    width: 100%;
}


.result-group-card {
    background: linear-gradient(145deg, #f0f0f0, #ffffff); /* گرادیانت خاکستری روشن پیش‌فرض */
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    justify-content: space-around; /* توزیع فضا بین آیتم‌ها */
    align-items: flex-end; /* تراز به راست */
    text-align: right; /* تراز متن به راست */
    transition: background 0.5s ease; /* انیمیشن برای تغییر رنگ پس‌زمینه */
}

.result-item-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
}

.result-item-inline:last-child {
    margin-bottom: 0;
}

.result-item-stacked {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* تراز به راست */
    width: 100%;
}

.result-label {
    font-size: 1em;
    color: #555;
    font-weight: normal;
    margin-left: 10px; /* فاصله از مقدار */
}

.result-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
    direction: ltr; /* برای نمایش صحیح اعداد فارسی */
    text-align: left; /* تراز اعداد به چپ */
    unicode-bidi: embed; /* برای اطمینان از نمایش صحیح اعداد */
}

/* استایل خاص برای کادرهای تک آیتمی (وضعیت آربیتراژ و نسبت سود) */
.result-group-card.single-item-card {
    /* این کلاس فقط برای تنظیمات چیدمان است و نباید پس‌زمینه را override کند */
    justify-content: center; /* مرکزیت عمودی برای آیتم تکی */
    min-height: 120px; /* حداقل ارتفاع برای هم‌اندازه بودن با کادرهای دیگر */
}

.result-group-card.single-item-card .result-value {
    font-size: 1.8em; /* فونت بزرگتر برای مقادیر اصلی */
    margin-top: 10px;
    width: 100%; /* اطمینان از اینکه مقدار تمام عرض را بگیرد */
    text-align: center; /* مرکزیت مقدار */
}

.result-group-card.single-item-card .result-label {
    width: 100%; /* اطمینان از اینکه لیبل تمام عرض را بگیرد */
    text-align: center; /* مرکزیت لیبل */
}

/* استایل برای بخش اطلاعات سرمایه اضافی */
.additional-capital-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
    width: 100%;
}

.additional-capital-card {
    background: linear-gradient(145deg, #f0f0f0, #ffffff); /* تغییر رنگ به گرادیانت خاکستری */
    border: 1px solid #e0e0e0; /* تغییر رنگ حاشیه */
    border-radius: 12px; /* گوشه‌های گردتر */
    padding: 20px; /* پدینگ بیشتر برای همخوانی با سایر باکس‌ها */
    text-align: center; /* مرکزیت کلی محتوا */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); /* سایه همخوانی با سایر باکس‌ها */
    display: flex;
    flex-direction: column;
    justify-content: center; /* مرکزیت عمودی */
    align-items: center; /* مرکزیت افقی */
    min-height: 120px; /* افزایش ارتفاع برای همخوانی با سایر باکس‌ها */
}

.additional-label {
    font-size: 1em; /* فونت بزرگتر برای لیبل */
    color: #555; /* رنگ خاکستری تیره‌تر */
    margin-bottom: 8px; /* فاصله بیشتر از مقدار */
    font-weight: normal; /* وزن فونت عادی */
    white-space: normal; /* اجازه شکستن خط */
    overflow: visible; /* نمایش کامل متن */
    text-overflow: clip; /* عدم نمایش سه نقطه */
    text-align: center; /* مرکزیت متن لیبل */
}

.additional-value {
    font-size: 1.4em; /* فونت بزرگتر برای مقدار */
    font-weight: bold;
    color: #333; /* رنگ خاکستری تیره‌تر */
    direction: ltr; /* برای نمایش صحیح اعداد فارسی */
    text-align: center; /* مرکزیت مقدار */
    unicode-bidi: embed; /* برای اطمینان از نمایش صحیح اعداد */
    width: 100%; /* اطمینان از اینکه مقدار تمام عرض را بگیرد */
}

/* استایل برای بخش پیش‌نمایش قراردادها */
.contract-preview-section {
    background-color: #fcfcfc;
    border: 1px solid #e9eef2;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
}

.contract-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* تراز به راست */
    text-align: right;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.preview-label {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 5px;
}

.preview-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #007bff;
    direction: ltr; /* برای نام و تاریخ قرارداد */
    unicode-bidi: embed;
    text-align: left;
}

/* استایل برای دکمه‌های اکشن در پایین صفحه */
.action-buttons-group {
    text-align: center;
    margin-top: 40px;
}

.action-buttons-group .btn {
    margin: 0 10px;
    padding: 12px 25px;
    font-size: 1.05em;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.action-buttons-group .btn-secondary {
    background-color: #6c757d;
}

.action-buttons-group .btn-secondary:hover {
    background-color: #5a6268;
}

/* استایل برای لودینگ اوورلی */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none; /* اجازه می‌دهد کلیک‌ها از آن عبور کنند وقتی پنهان است */
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: auto; /* فعال کردن کلیک‌ها وقتی نمایش داده می‌شود */
}

.loading-content {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    text-align: center;
    color: #333;
    font-size: 1.2em;
}

.spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* جلوگیری از اسکرول بدنه اصلی وقتی لودینگ فعال است */
body.no-scroll {
    overflow: hidden;
}

/* --- Responsive Adjustments for offline_arbitrage.php --- */
@media (max-width: 768px) {
    .offline-arbitrage-container {
        padding: 15px;
    }

    .info-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .info-bar .info-item {
        padding: 5px 0;
        text-align: center; /* مرکزیت در موبایل */
        flex-basis: 100%; /* هر آیتم یک خط کامل */
    }
    .info-bar .date-info,
    .info-bar .time-info,
    .info-bar .status-info {
        text-align: center; /* اطمینان از مرکزیت در موبایل */
    }


    .arbitrage-form .form-section {
        padding: 20px;
    }

    .input-grid {
        grid-template-columns: 1fr; /* یک ستون در موبایل */
        gap: 20px;
    }

    .input-group {
        padding: 15px;
    }

    .results-grid-container {
        grid-template-columns: 1fr; /* یک ستون در موبایل */
        gap: 15px;
    }

    .result-group-card {
        padding: 15px;
    }

    /* ریسپانسیو برای ردیف دوم (نسبت و وضعیت) */
    .arbitrage-ratio-status-grid {
        grid-template-columns: 1fr; /* یک ستون در موبایل */
        gap: 15px;
    }

    .contract-preview-section {
        padding: 20px;
    }

    .contract-preview-grid {
        grid-template-columns: 1fr; /* یک ستون در موبایل */
    }

    .calculate-btn {
        font-size: 1.1em;
        padding: 12px;
    }

    .additional-capital-info-grid {
        grid-template-columns: 1fr; /* یک ستون در موبایل */
        gap: 10px;
        padding: 10px;
    }

    .additional-capital-card {
        padding: 12px;
        min-height: 70px;
    }

    .additional-label {
        font-size: 0.8em;
    }

    .additional-value {
        font-size: 1.1em;
    }

    .result-item-inline {
        flex-direction: column; /* لیبل و مقدار در موبایل به صورت ستونی */
        align-items: flex-start; /* تراز به راست */
        padding-bottom: 10px;
    }
    .result-item-inline .result-label {
        margin-left: 0;
        margin-bottom: 5px;
    }
    .result-item-inline .result-value {
        text-align: right; /* تراز به راست برای مقادیر در موبایل */
        width: 100%; /* مقدار تمام عرض را بگیرد */
    }

    .result-item-stacked {
        align-items: center; /* مرکزیت در موبایل */
    }

    .result-group-card.single-item-card .result-value {
        font-size: 1.6em;
    }

    .preview-item {
        padding: 12px;
        align-items: center; /* مرکزیت در موبایل */
        text-align: center;
    }
    .preview-value {
        text-align: center; /* مرکزیت تاریخ */
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .offline-arbitrage-container {
        max-width: 900px;
    }
    .input-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    /* ریسپانسیو برای ردیف دوم (نسبت و وضعیت) در تبلت */
    .arbitrage-ratio-status-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}





















/* style.css additions for make_deal.php layout improvements */

/* General container width adjustment for better layout on larger screens */
.container.make-deal-container {
    max-width: 1200px; /* افزایش عرض کانتینر اصلی */
    width: 95%; /* استفاده از درصد برای واکنش‌گرایی */
    margin: 20px auto; /* مرکز قرار گرفتن در صفحه */
}

/* Recent Deals Section - ensure it aligns with the main container */
.recent-deals-section {
    max-width: 1200px; /* هماهنگی با عرض کانتینر اصلی */
    width: 95%; /* هماهنگی با عرض کانتینر اصلی */
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin: 30px auto 0 auto; /* مرکز قرار گرفتن و فاصله از بالا */
    direction: rtl; /* Right-to-left for Persian text */
}

.deals-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Spacing between deal items */
}

/* Individual Deal Item Card Layout */
.deal-item-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex; /* Use flexbox for main layout */
    justify-content: space-between; /* Push details to left, action to right */
    align-items: center; /* Vertically align items */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.deal-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Deal Details Group */
.deal-item-details {
    flex-grow: 1; /* Allow details to take available space */
    display: flex;
    flex-wrap: wrap; /* Allow individual detail items to wrap if needed */
    gap: 10px 25px; /* Spacing between individual detail items (row-gap, column-gap) */
    justify-content: flex-start; /* Align details to the start */
    padding-left: 10px; /* Small padding to prevent details from touching the left edge */
}

/* Individual Deal Detail Item */
.deal-detail {
    display: flex;
    flex-direction: column; /* Stack label and value vertically */
    font-size: 0.9em;
    color: #555;
    white-space: nowrap; /* Prevent wrapping for individual detail text */
}

.deal-detail strong {
    color: #333;
    font-size: 1.1em;
}

/* Action Button (Delete) Container */
.deal-item-action {
    flex-shrink: 0; /* Prevent the action button from shrinking */
    margin-left: 20px; /* Space between details and button */
    display: flex; /* Use flex for button content alignment */
    align-items: center;
    justify-content: center;
}

/* Delete Button Specific Styles */
.delete-deal-btn {
    background-color: #dc3545; /* Red for delete */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    display: flex; /* Use flex for icon and text inside button */
    align-items: center;
    gap: 5px;
    font-family: inherit; /* اطمینان از تبعیت از فونت سفارشی */
}

.delete-deal-btn:hover {
    background-color: #c82333;
}

/* Load More Button Styles */
.load-more-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    margin-top: 25px;
    width: 100%;
    transition: background-color 0.2s ease;
    display: block; /* Make it a block element to take full width */
    font-family: inherit; /* اطمینان از تبعیت از فونت سفارشی */
}

.load-more-btn:hover {
    background-color: #0056b3;
}

/* Responsive adjustments for deal items */
@media (max-width: 768px) {
    .deal-item-card {
        flex-direction: column; /* Stack items vertically on small screens */
        align-items: flex-start; /* Align details to the left */
    }
    .deal-item-details {
        width: 100%; /* Take full width on small screens */
        margin-bottom: 10px; /* Space below details */
        gap: 8px 15px;
        justify-content: flex-start; /* Details start from left */
        padding-left: 0; /* Remove left padding on mobile */
    }
    .deal-item-action {
        width: 100%; /* Take full width on small screens */
        margin-left: 0; /* Remove left margin */
        text-align: center; /* Center the button */
    }
    .delete-deal-btn {
        width: 100%; /* Make button full width on mobile */
        justify-content: center; /* Center content within the button */
    }
}

/* Delete Confirmation Modal - Reusing existing modal styles but with specific ID */
#deleteConfirmationModal .modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    direction: rtl;
}

#deleteConfirmationModal .modal-icon {
    font-size: 3em;
    color: #dc3545; /* Red for delete confirmation */
    margin-bottom: 15px;
}

#deleteConfirmationModal h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
}

#deleteConfirmationModal p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

#deleteConfirmationModal .modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#deleteConfirmationModal .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

#deleteConfirmationModal .btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

#deleteConfirmationModal .btn-danger:hover {
    background-color: #c82333;
}

#deleteConfirmationModal .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

#deleteConfirmationModal .btn-secondary:hover {
    background-color: #5a6268;
}

.no-deals-message {
    text-align: center;
    color: #777;
    font-size: 1.1em;
    padding: 20px;
    border: 1px dashed #ddd;
    border-radius: 10px;
    margin-top: 20px;
}

/* New styles for Delete Success Modal */
#deleteSuccessModal .modal-content.delete-success-modal-content {
    background-color: #fffacd; /* Light yellow background */
    border: 1px solid #ffeb3b; /* Yellow border */
    color: #333;
}

#deleteSuccessModal .modal-icon.success-icon {
    color: #fbc02d; /* Darker yellow for icon */
}

#deleteSuccessModal h3 {
    color: #333;
}

#deleteSuccessModal p {
    color: #555;
}

#deleteSuccessModal .btn-success {
    background-color: #fbc02d; /* Yellow button */
    border: none;
    color: #333;
}

#deleteSuccessModal .btn-success:hover {
    background-color: #f9a825; /* Darker yellow on hover */
}








































/* General container width adjustment for better layout on larger screens */
.container.deal-records-container {
    max-width: 1200px; /* افزایش عرض کانتینر اصلی */
    width: 95%; /* استفاده از درصد برای واکنش‌گرایی */
    margin: 20px auto; /* مرکز قرار گرفتن در صفحه */
}

/* Filter Section Styles */
.filter-section {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin: 30px auto; /* فاصله از بالا و پایین و مرکز قرار گرفتن */
    direction: rtl;
    max-width: 1200px; /* هماهنگی با عرض کانتینر اصلی */
    width: 95%; /* هماهنگی با عرض کانتینر اصلی */
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 3 ستون در دسکتاپ، واکنش‌گرا */
    gap: 20px;
    margin-bottom: 20px;
}

.filter-section .form-group {
    margin-bottom: 0; /* Remove default margin-bottom from form-group */
}

.filter-section .btn {
    width: auto; /* Buttons should not take full width */
    margin-left: 10px; /* Space between buttons */
    padding: 10px 20px;
    font-size: 0.95em;
}

/* Deals List Section (similar to make_deal.php but with edit button) */
.recent-deals-section {
    max-width: 1200px; /* هماهنگی با عرض کانتینر اصلی */
    width: 95%; /* هماهنگی با عرض کانتینر اصلی */
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin: 30px auto 0 auto; /* مرکز قرار گرفتن و فاصله از بالا */
    direction: rtl; /* Right-to-left for Persian text */
}

.deals-list {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Spacing between deal items */
}

/* Individual Deal Item Card Layout */
.deal-item-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex; /* Use flexbox for main layout */
    justify-content: space-between; /* Push details to left, action to right */
    align-items: center; /* Vertically align items */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.deal-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Deal Details Group */
.deal-item-details {
    flex-grow: 1; /* Allow details to take available space */
    display: flex;
    flex-wrap: wrap; /* Allow individual detail items to wrap if needed */
    gap: 10px 25px; /* Spacing between individual detail items (row-gap, column-gap) */
    justify-content: flex-start; /* Align details to the start */
    padding-left: 10px; /* Small padding to prevent details from touching the left edge */
}

/* Individual Deal Detail Item */
.deal-detail {
    display: flex;
    flex-direction: column; /* Stack label and value vertically */
    font-size: 0.9em;
    color: #555;
    white-space: nowrap; /* Prevent wrapping for individual detail text */
}

.deal-detail strong {
    color: #333;
    font-size: 1.1em;
}

/* Action Buttons Group (Edit and Delete) */
.deal-item-actions-group {
    flex-shrink: 0; /* Prevent the action buttons from shrinking */
    margin-left: 20px; /* Space between details and buttons */
    display: flex; /* Use flex for buttons to be side-by-side */
    gap: 10px; /* Space between buttons */
    align-items: center;
    justify-content: center;
}

/* Edit Button Specific Styles */
.btn-edit {
    background-color: #ffc107; /* Yellow for edit */
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}

.btn-edit:hover {
    background-color: #e0a800;
}

/* Delete Button Specific Styles (reusing existing styles but applying to .btn-delete) */
.btn-delete {
    background-color: #dc3545; /* Red for delete */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* Load More Button Styles */
.load-more-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    margin-top: 25px;
    width: 100%;
    transition: background-color 0.2s ease;
    display: block; /* Make it a block element to take full width */
    font-family: inherit;
}

.load-more-btn:hover {
    background-color: #0056b3;
}

/* Responsive adjustments for deal items */
@media (max-width: 768px) {
    .deal-item-card {
        flex-direction: column; /* Stack items vertically on small screens */
        align-items: flex-start; /* Align details to the left */
    }
    .deal-item-details {
        width: 100%; /* Take full width on small screens */
        margin-bottom: 10px; /* Space below details */
        gap: 8px 15px;
        justify-content: flex-start; /* Details start from left */
        padding-left: 0; /* Remove left padding on mobile */
    }
    .deal-item-actions-group {
        width: 100%; /* Take full width on small screens */
        margin-left: 0; /* Remove left margin */
        justify-content: center; /* Center the buttons */
    }
    .btn-edit, .btn-delete {
        width: 48%; /* Make buttons take almost half width on mobile */
        justify-content: center; /* Center content within the button */
    }
    .filter-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
    .filter-section .btn {
        width: 100%; /* Full width buttons on mobile */
        margin-left: 0;
        margin-bottom: 10px; /* Space between stacked buttons */
    }
    .filter-section .btn:last-child {
        margin-bottom: 0;
    }
}

/* Delete Confirmation Modal - Reusing existing modal styles but with specific ID */
#deleteConfirmationModal .modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    direction: rtl;
}

#deleteConfirmationModal .modal-icon {
    font-size: 3em;
    color: #dc3545; /* Red for delete confirmation */
    margin-bottom: 15px;
}

#deleteConfirmationModal h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.5em;
}

#deleteConfirmationModal p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

#deleteConfirmationModal .modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

#deleteConfirmationModal .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

#deleteConfirmationModal .btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

#deleteConfirmationModal .btn-danger:hover {
    background-color: #c82333;
}

#deleteConfirmationModal .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

#deleteConfirmationModal .btn-secondary:hover {
    background-color: #5a6268;
}

.no-deals-message {
    text-align: center;
    color: #777;
    font-size: 1.1em;
    padding: 20px;
    border: 1px dashed #ddd;
    border-radius: 10px;
    margin-top: 20px;
}

/* New styles for Delete Success Modal */
#deleteSuccessModal .modal-content.delete-success-modal-content {
    background-color: #fffacd; /* Light yellow background */
    border: 1px solid #ffeb3b; /* Yellow border */
    color: #333;
}

#deleteSuccessModal .modal-icon.success-icon {
    color: #fbc02d; /* Darker yellow for icon */
}

#deleteSuccessModal h3 {
    color: #333;
}

#deleteSuccessModal p {
    color: #555;
}

#deleteSuccessModal .btn-success {
    background-color: #fbc02d; /* Yellow button */
    border: none;
    color: #333;
}

#deleteSuccessModal .btn-success:hover {
    background-color: #f9a825; /* Darker yellow on hover */
}

/* New styles for Edit Deal Modal */
#editDealModal .modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px; /* Slightly wider for edit form */
    text-align: right; /* Align text to right for Persian */
    position: relative;
    direction: rtl;
}

#editDealModal .modal-icon {
    font-size: 1em;
    color: #007bff; /* Blue for edit icon */
    margin-bottom: 15px;
    text-align: center; /* Center the icon */
}

#editDealModal h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.6em;
    text-align: center; /* Center the title */
}

#editDealModal .form-group {
    margin-bottom: 15px;
}

#editDealModal label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

#editDealModal input[type="text"],
#editDealModal input[type="number"],
#editDealModal select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit; /* Ensure custom font */
    box-sizing: border-box; /* Include padding in width */
}

#editDealModal .modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

#editDealModal .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

#editDealModal .btn-success {
    background-color: #28a745; /* Green for save */
    color: white;
    border: none;
}

#editDealModal .btn-success:hover {
    background-color: #218838;
}

#editDealModal .btn-danger {
    background-color: #dc3545; /* Red for cancel */
    color: white;
    border: none;
}

#editDealModal .btn-danger:hover {
    background-color: #c82333;
}

/* New styles for Edit Success Modal (Green) */
#editSuccessModal .modal-content.edit-success-modal-content {
    background-color: #ffffff; /* Light green background */
    border: 1px solid #28a745; /* Green border */
    color: #155724; /* Dark green text */
}

#editSuccessModal .modal-icon.success-icon {
    color: #28a745; /* Green icon */
}

#editSuccessModal h3 {
    color: #155724;
}

#editSuccessModal p {
    color: #155724;
}

#editSuccessModal .btn-success {
    background-color: #28a745; /* Green button */
    border: none;
    color: white;
}

#editSuccessModal .btn-success:hover {
    background-color: #218838;
}

/* New styles for Delete All Confirmation Modal (Yellow) */
#deleteAllConfirmationModal .modal-content.delete-all-confirmation-content {
    background-color: #fffacd; /* Light yellow background */
    border: 1px solid #ffeb3b; /* Yellow border */
    color: #333;
}

#deleteAllConfirmationModal .modal-icon {
    font-size: 3em;
    color: #fbc02d; /* Darker yellow for icon */
    margin-bottom: 15px;
}

#deleteAllConfirmationModal h3 {
    color: #333;
}

#deleteAllConfirmationModal p {
    color: #555;
    margin-bottom: 15px;
}

#deleteAllConfirmationModal .form-group {
    margin-bottom: 20px;
}

#deleteAllConfirmationModal .form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    text-align: center; /* Center the typed text */
    font-family: inherit;
}

#deleteAllConfirmationModal .modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

#deleteAllConfirmationModal .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

#deleteAllConfirmationModal .btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

#deleteAllConfirmationModal .btn-danger:hover:not(:disabled) {
    background-color: #c82333;
}

#deleteAllConfirmationModal .btn-danger:disabled {
    background-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}

#deleteAllConfirmationModal .btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

#deleteAllConfirmationModal .btn-secondary:hover {
    background-color: #5a6268;
}


/* Persian Datepicker specific styles to ensure RTL and font */
.datepicker-plot-area {
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important;
    direction: rtl;
    text-align: right;
}

.datepicker-plot-area .datepicker-day-view .month-grid-box {
    direction: rtl;
}
.datepicker-plot-area .datepicker-day-view .month-grid-box .header {
    direction: rtl;
}
.datepicker-plot-area .datepicker-day-view .month-grid-box .header .title {
    float: right; /* Align month/year to right */
}
.datepicker-plot-area .datepicker-day-view .month-grid-box .header .next,
.datepicker-plot-area .datepicker-day-view .month-grid-box .header .prev {
    float: left; /* Align nav buttons to left */
}
.datepicker-plot-area .datepicker-day-view .month-grid-box .header .prev {
    margin-left: 10px; /* Space between prev and next */
}

/* Ensure font for datepicker inputs */
.jalali-date-picker {
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important;
    direction: rtl;
    text-align: right;
}























/* Additions for make_offset.php to ensure consistent styling */

/* Reusing .make-deal-container for .make-offset-container */
.container.make-offset-container {
    max-width: 1200px;
    width: 95%;
    margin: 20px auto;
}

/* Reusing .make-deal-form for .make-offset-form */
.make-offset-form {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    direction: rtl;
}

/* Reusing .recent-deals-section for recent offsets */
.recent-offsets-section { /* New class for offsets list section */
    max-width: 1200px;
    width: 95%;
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin: 30px auto 0 auto;
    direction: rtl;
}

/* Reusing .deals-list for .offsets-list */
.offsets-list { /* New class for the list container */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Reusing .deal-item-card for .offset-item-card */
.offset-item-card { /* New class for individual offset items */
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
    flex-wrap: wrap;
}

.offset-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Reusing .deal-item-details for .offset-item-details */
.offset-item-details { /* New class for offset details group */
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 25px;
    justify-content: flex-start;
    padding-left: 10px;
}

/* Reusing .deal-detail for .offset-detail */
.offset-detail { /* New class for individual offset detail */
    display: flex;
    flex-direction: column;
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
}

.offset-detail strong {
    color: #333;
    font-size: 1.1em;
}

/* Reusing .deal-item-action for .offset-item-action */
.offset-item-action { /* New class for offset action button container */
    flex-shrink: 0;
    margin-left: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Reusing .delete-deal-btn for .delete-offset-btn */
.delete-offset-btn { /* New class for delete offset button */
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: inherit;
}

.delete-offset-btn:hover {
    background-color: #c82333;
}

/* Reusing .load-more-btn for .load-more-offsets-btn */
.load-more-offsets-btn { /* New class for load more offsets button */
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    margin-top: 25px;
    width: 100%;
    transition: background-color 0.2s ease;
    display: block;
    font-family: inherit;
}

.load-more-offsets-btn:hover {
    background-color: #0056b3;
}

/* Responsive adjustments for offset items (reusing deal item responsive styles) */
@media (max-width: 768px) {
    .offset-item-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .offset-item-details {
        width: 100%;
        margin-bottom: 10px;
        gap: 8px 15px;
        justify-content: flex-start;
        padding-left: 0;
    }
    .offset-item-action {
        width: 100%;
        margin-left: 0;
        text-align: center;
    }
    .delete-offset-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Reusing .no-deals-message for .no-offsets-message */
.no-offsets-message { /* New class for no offsets message */
    text-align: center;
    color: #777;
    font-size: 1.1em;
    padding: 20px;
    border: 1px dashed #ddd;
    border-radius: 10px;
    margin-top: 20px;
}

/* Reusing modal styles with new IDs */
#confirmationOffsetModal .modal-content,
#successOffsetModal .modal-content,
#deleteConfirmationOffsetModal .modal-content,
#deleteSuccessOffsetModal .modal-content {
    /* These will inherit from the general modal styles, but can be overridden if needed */
}

/* Specific styling for delete success modal (reusing existing styles) */
#deleteSuccessOffsetModal .modal-content.delete-success-modal-content {
    background-color: #fffacd; /* Light yellow background */
    border: 1px solid #ffeb3b; /* Yellow border */
    color: #333;
}

#deleteSuccessOffsetModal .modal-icon.success-icon {
    color: #fbc02d; /* Darker yellow for icon */
}

#deleteSuccessOffsetModal h3 {
    color: #333;
}

#deleteSuccessOffsetModal p {
    color: #555;
}

#deleteSuccessOffsetModal .btn-success {
    background-color: #fbc02d; /* Yellow button */
    border: none;
    color: #333;
}

#deleteSuccessOffsetModal .btn-success:hover {
    background-color: #f9a825; /* Darker yellow on hover */
}









/* New styles for Quick Access Section */
.quick-access-section {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    direction: rtl;
    text-align: center; /* Center the title and grid */
}

.quick-access-grid {
    display: grid;
    /* این خط را تغییر دهید */
    grid-template-columns: repeat(4, 1fr);
    /* این خط برای موبایل هم هست که در ادامه توضیح میدم */
    gap: 20px;
    justify-content: center;
    margin-top: 20px;

}

.quick-access-card {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    min-height: 120px; /* Ensure consistent card height */

}

.quick-access-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #eaf6ff; /* Light blue on hover */
    border-color: #aed6f1;
}

.quick-access-icon {
    font-size: 2.5em;
    color: #3498db; /* Blue icon color */
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.quick-access-card:hover .quick-access-icon {
    color: #2980b9; /* Darker blue on hover */
}

.quick-access-label {
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    line-height: 1.3;
}

/* Responsive adjustments for quick access section */
@media (max-width: 768px) {
    .quick-access-grid {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }
    .quick-access-card {
        min-height: 100px; /* Adjust height for mobile */
    }
    .quick-access-icon {
        font-size: 2em;
    }
    .quick-access-label {
        font-size: 1em;
    }
}


.under-construction-message {
    text-align: center;
    padding: 30px 20px;
    background-color: #fffbe6; /* Light yellow background */
    border: 1px solid #ffe082; /* Yellow border */
    border-radius: 10px;
    color: #8d6e00; /* Dark yellow text */
    font-size: 1.1em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%; /* Take full width of its parent grid */
    min-height: 150px; /* Ensure it's tall enough */
}

.under-construction-icon {
    font-size: 3em;
    color: #ffc107; /* Bright yellow icon */
}

.under-construction-message p {
    margin: 0; /* Remove default paragraph margin */
    font-weight: bold;
}

































/* General container for arbitrage page */
.arbitrage-page-container {
    max-width: 1200px; /* افزایش عرض کانتینر اصلی برای دسکتاپ */
    width: 95%; /* استفاده از درصد برای واکنش‌گرایی بهتر */
    margin: 30px auto;
    padding: 20px;
    background-color: #f8f9fa; /* Light background for the container */
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    direction: rtl; /* Right-to-left for Persian text */
}

/* Page title */
.arbitrage-page-title {
    text-align: center;
    color: #343a40;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: bold;
    position: relative;
    padding-bottom: 10px;
}

.arbitrage-page-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #007bff; /* Blue underline */
    border-radius: 2px;
}

/* Grid for main cards */
.arbitrage-grid-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* افزایش حداقل عرض کارت‌ها */
    gap: 25px;
    margin-bottom: 30px;
    justify-content: center; /* Center items if not filling full grid */
}

/* Grid for sub-cards */
.arbitrage-grid-sub {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* افزایش حداقل عرض کارت‌های فرعی */
    margin-top: 20px;
    margin-bottom: 20px;
    gap: 20px;
    justify-content: center;
}

/* Card base styles */
.arbitrage-card {
    background-color: #ffffff;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden; /* For pseudo-elements */
    min-height: 180px; /* Ensure consistent height */
}

.arbitrage-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Active card state for main cards */
.arbitrage-main-card.arbitrage-active {
    border: 2px solid #007bff; /* Blue border for active state */
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2); /* Light blue glow */
}

/* Card icons */
.arbitrage-card-icon {
    font-size: 3.5em; /* Larger icons */
    color: #007bff; /* Blue color for icons */
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.arbitrage-card:hover .arbitrage-card-icon {
    color: #0056b3; /* Darker blue on hover */
}

/* Card labels (titles) */
.arbitrage-card-label {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #343a40;
}

/* Card descriptions */
.arbitrage-card-description {
    font-size: 0.95em;
    color: #6c757d;
    line-height: 1.5;
}

/* Sub-card specific adjustments */
.arbitrage-sub-card {
    min-height: 160px; /* Slightly smaller height for sub-cards */
    padding: 25px 15px;
}

.arbitrage-sub-card .arbitrage-card-icon {
    font-size: 3em; /* Smaller icons for sub-cards */
}

.arbitrage-sub-card .arbitrage-card-label {
    font-size: 1.2em;
}

/* Section titles within level containers */
.arbitrage-section-title {
    text-align: center;
    color: #495057;
    font-size: 1.8em;
    margin-bottom: 25px;
    margin-top: 40px;
    font-weight: bold;
    position: relative;
    padding-bottom: 8px;
}

.arbitrage-section-title i {
    color: #007bff; /* Icon color for section titles */
    margin-left: 10px;
}

.arbitrage-section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #6c757d; /* Grey underline */
    border-radius: 1.5px;
}

/* Hidden containers for levels */
.arbitrage-level-container {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.5s ease-out, max-height 0.7s ease-out;
    visibility: hidden;
    pointer-events: none; /* Disable interaction when hidden */
}

.arbitrage-level-container.arbitrage-hidden {
    opacity: 0;
    max-height: 0;
    visibility: hidden;
    pointer-events: none;
}

.arbitrage-level-container:not(.arbitrage-hidden) {
    opacity: 1;
    max-height: 500px; /* A value large enough to contain content */
    visibility: visible;
    pointer-events: auto;
}

/* Button styles (using arbitrage- prefix) */
.arbitrage-btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none; /* Ensure links look like buttons */
    display: inline-flex; /* Align icon and text */
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.arbitrage-btn-primary {
    background-color: #007bff;
    color: white;
    border: none;
}

.arbitrage-btn-primary:hover {
    background-color: #0056b3;
}

.arbitrage-btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

.arbitrage-btn-secondary:hover {
    background-color: #5a6268;
}

.arbitrage-btn-success {
    background-color: #28a745;
    color: white;
    border: none;
}

.arbitrage-btn-success:hover {
    background-color: #218838;
}

/* Message styles */
.arbitrage-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.1em;
}

.arbitrage-error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal styles for "Under Construction" popup */
.arbitrage-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.arbitrage-modal-overlay.arbitrage-hidden {
    opacity: 0;
    visibility: hidden;
}

.arbitrage-modal-overlay:not(.arbitrage-hidden) {
    opacity: 1;
    visibility: visible;
}

.arbitrage-modal-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    direction: rtl;
    transform: translateY(20px); /* Initial position for animation */
    transition: transform 0.3s ease-in-out;
}

.arbitrage-modal-overlay:not(.arbitrage-hidden) .arbitrage-modal-content {
    transform: translateY(0); /* Final position for animation */
}

.arbitrage-modal-close-button {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.8em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease;
}

.arbitrage-modal-close-button:hover {
    color: #333;
}

.arbitrage-modal-icon {
    font-size: 4em;
    color: #ffc107; /* Yellow for warning/under construction */
    margin-bottom: 20px;
}

.arbitrage-modal-icon svg {
    fill: currentColor; /* Ensures SVG uses the color set by parent */
}

.arbitrage-modal-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.arbitrage-modal-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* No scroll on body when modal is open */
body.arbitrage-no-scroll {
    overflow: hidden;
}

/* Styles for the "Back to Dashboard" card */
.arbitrage-back-to-dashboard-container {
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Center horizontally */
    margin-top: 40px; /* Add some space above it */
    margin-bottom: 30px;
}

.arbitrage-dashboard-card {
    min-height: 150px; /* Adjust height as needed */
    width: 100%; /* Take full width of its container */
    max-width: 400px; /* Limit maximum width for a good look on larger screens */
    background-color: #e9ecef; /* Lighter background to differentiate, or keep white */
    color: #495057; /* Darker text for contrast */
    border: 1px solid #dee2e6; /* Light border */
}

.arbitrage-dashboard-card .arbitrage-card-icon {
    color: #6c757d; /* Grey icon color */
    font-size: 3em; /* Adjust icon size */
}

.arbitrage-dashboard-card:hover {
    background-color: #dae0e5; /* Slightly darker on hover */
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .arbitrage-grid-main,
    .arbitrage-grid-sub {
        grid-template-columns: 1fr; /* Stack cards on small screens */
    }
    .arbitrage-card {
        min-height: 150px;
    }
    .arbitrage-sub-card {
        min-height: 130px;
    }
    .arbitrage-page-title {
        font-size: 1.8em;
    }
    .arbitrage-card-icon {
        font-size: 3em;
    }
    .arbitrage-card-label {
        font-size: 1.2em;
    }
    .arbitrage-card-description {
        font-size: 0.9em;
    }
    .arbitrage-section-title {
        font-size: 1.5em;
    }
    .arbitrage-modal-content {
        padding: 25px;
    }
    .arbitrage-modal-icon {
        font-size: 3em;
    }
    .arbitrage-modal-content h3 {
        font-size: 1.5em;
    }
    .arbitrage-dashboard-card {
        max-width: 90%; /* Allow it to take more width on smaller screens */
    }
}


















    /* Custom styles for offline_arbitrage_details.php */
    /* این استایل‌ها به دلیل خاص بودن برای این صفحه یا بازنویسی استایل‌های عمومی، ضروری هستند */

    .section-title i {
        order: 2; /* آیکون را بعد از متن قرار می‌دهد */
        color: #007bff; /* رنگ آیکون */
    }
    .section-title span {
        order: 1; /* متن را قبل از آیکون قرار می‌دهد */
    }

    /* کارت‌های جزئیات (هر بلوک اطلاعاتی) */
    .detail-card {
        background-color: #f8f8f8; /* پس‌زمینه کمی خاکستری برای کارت‌ها */
        border: 1px solid #e0e0e0; /* حاشیه روشن */
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 15px;
        display: flex;
        flex-direction: column; /* چیدمان عمودی برای محتوا */
        gap: 5px; /* فاصله بین خطوط فرمول */
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03); /* سایه نرم */
    }

    /* عنوان داخل کارت‌های جزئیات (مثلاً "تنظیمات دارایی") */
    .detail-card h4 {
        color: #34495e;
        margin-top: 0;
        margin-bottom: 15px;
        font-size: 1.2em;
        font-weight: 600;
        
        align-items: center;
        gap: 8px;
        border-bottom: 1px dashed #e0e0e0;
        padding-bottom: 10px;
        text-align: right;
        justify-content: flex-end; /* آیکون و متن را به راست می‌چسباند */
    }
    .detail-card h4 i {
        order: 2; /* آیکون را بعد از متن قرار می‌دهد */
        color: #2ecc71; /* رنگ سبز برای آیکون */
    }
    .detail-card h4 span {
        order: 1; /* متن را قبل از آیکون قرار می‌دهد */
    }

    /* متن بولد (لیبل‌ها) داخل کارت‌های جزئیات */
    .detail-card strong {
        color: #34495e;
        font-size: 1.1em;
        margin-bottom: 5px;
        display: block; /* اطمینان از اینکه در خط جداگانه قرار گیرد */
        text-align: right; /* راست‌چین کردن لیبل */
    }

    /* فرمول‌های فارسی */
    .detail-formula-persian {
        font-size: 0.9em;
        color: #555;
        background-color: #eef; /* پس‌زمینه آبی روشن برای فرمول */
        padding: 10px 13px;
        border-radius: 4px;
        direction: rtl; /* راست به چپ */
        text-align: right; /* راست‌چین */
        font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* فونت سفارشی فارسی */
        overflow-x: auto; /* اسکرول افقی در صورت نیاز */
        white-space: nowrap; /* جلوگیری از شکستن خط */
    }

    /* فرمول‌های لاتین */
    .detail-formula-latin {
        font-size: 0.9em;
        color: #555;
        background-color: #eef; /* پس‌زمینه آبی روشن برای فرمول */
        padding: 5px 8px;
        border-radius: 4px;
        direction: ltr; /* چپ به راست */
        text-align: left; /* چپ‌چین */
        font-family: 'monospace', sans-serif; /* فونت monospace */
        overflow-x: auto; /* اسکرول افقی در صورت نیاز */
        white-space: nowrap; /* جلوگیری از شکستن خط */
    }

    /* مقادیر نهایی در کارت‌های جزئیات */
    .detail-value {
        font-size: 1.1em;
        color: #007bff; /* رنگ آبی برای مقادیر */
        font-weight: bold;
        text-align: right; /* راست‌چین */
        margin-top: 10px;
        padding-top: 5px;
        border-top: 1px dashed #e0e0e0; /* خط جداکننده */
    }

    /* استایل‌های خاص برای کارت‌های مجموع هزینه و مجموع سرمایه */
    .detail-item.total-cost,
    .detail-item.total-capital {
        background-color: #e8f5e9; /* سبز روشن */
        border-color: #c8e6c9;
    }

    /* استایل خاص برای کارت نتایج نهایی */
    .final-results-card {
        background-color: #e0f7fa; /* آبی روشن */
        border-color: #b2ebf2;
    }
    .final-results-card h4 i {
        color: #007bff; /* رنگ آبی برای آیکون */
    }

    /* کارت خلاصه وضعیت آربیتراژ */
    .summary-card {
        background-color: #f0f0f0; /* پس‌زمینه پیش‌فرض */
        border: 1px solid #e0e0e0;
        color: #333;
        padding: 20px;
        border-radius: 12px;
        margin-top: 30px;
        text-align: center;
        font-size: 1.3em;
        font-weight: bold;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
    }
    .summary-card.arbitrage-positive {
        background-color: #d4edda; /* سبز برای آربیتراژ مستقیم */
        border-color: #c3e6cb;
        color: #155724;
    }
    .summary-card.arbitrage-negative {
        background-color: #f8d7da; /* قرمز برای آربیتراژ معکوس */
        border-color: #f5c6cb;
        color: #721c24;
    }
    .summary-card.arbitrage-neutral {
        background-color: #fff3cd; /* زرد برای وضعیت نامشخص */
        border-color: #ffeeba;
        color: #856404;
    }

    /* دکمه بازگشت */
    .back-button-container {
        text-align: center;
        margin-top: 30px;
    }
    .back-button {
        display: inline-block;
        background-color: #6c757d; /* خاکستری */
        color: #fff;
        padding: 10px 20px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: bold;
        transition: background-color 0.3s ease;
    }
    .back-button:hover {
        background-color: #5a6268;
    }

    /* MathJax specific styling for formulas */
    .detail-formula-persian .mjx-chtml {
        direction: rtl; /* اطمینان از راست به چپ برای MathJax فارسی */
        text-align: right;
        display: inline-block;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
    .detail-formula-latin .mjx-chtml {
        direction: ltr; /* اطمینان از چپ به راست برای MathJax لاتین */
        text-align: left;
        display: inline-block;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Responsive Adjustments (بر اساس media queries موجود در ffffffff.css) */
    @media (max-width: 768px) {
        .container {
            margin: 10px;
            padding: 15px;
        }
        .section-title {
            font-size: 1.1em; /* کاهش سایز فونت در موبایل */
            gap: 5px;
        }
        .detail-card strong {
            font-size: 1em;
        }
        .detail-formula-persian,
        .detail-formula-latin {
            font-size: 0.8em; /* کاهش سایز فونت فرمول در موبایل */
            padding: 3px 5px;
        }

        .summary-card {
            font-size: 1.1em;
            padding: 15px;
        }
        .back-button {
            padding: 8px 15px;
            font-size: 0.9em;
        }
    }






/* style.css */

.contract-display-box {
    background-color: #e9f7ef; /* A light green background for visibility */
    border: 1px solid #d4edda; /* A slightly darker border */
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px; /* Space below the box */
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #155724; /* Dark green text */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Vertically center content */
    justify-content: center; /* Horizontally center content */
    min-height: 60px; /* Ensure it has some height */
}

/* Responsive adjustments if needed */
@media (max-width: 768px) {
    .contract-display-box {
        font-size: 0.95em;
        padding: 12px 15px;
    }
}










/* CSS for Countdown Bar in Success Modals */
.countdown-bar-container {
    width: 100%;
    height: 8px; /* ارتفاع نوار زمان */
    background-color: #e0e0e0; /* رنگ پس‌زمینه نوار */
    border-radius: 4px; /* گوشه‌های گرد */
    overflow: hidden; /* برای اطمینان از اینکه نوار داخل کانتینر بماند */
    margin-top: 15px; /* فاصله از متن بالا */
    margin-bottom: 10px; /* فاصله از دکمه‌های پایین */
}

.countdown-bar {
    height: 100%;
    width: 100%; /* شروع از عرض کامل */
    background-color: #4CAF50; /* رنگ سبز برای نوار زمان */
    border-radius: 4px; /* گوشه‌های گرد */
    /* انیمیشن با جاوا اسکریپت کنترل می‌شود */
}

















/* subscribe_custom.css */

/* Main container for the subscribe page */
.subscribe-page-main-container {
    max-width: 1000px; /* Adjust max-width as needed for better layout */
    width: 95%; /* Use percentage for responsiveness */
    margin: 30px auto; /* Center the container with vertical spacing */
    padding: 25px; /* Padding inside the container */
    background-color: #ffffff; /* White background */
    border-radius: 15px; /* Rounded corners */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* Soft, professional professional shadow */
    direction: rtl; /* Right-to-left for Persian text */
    text-align: right; /* Align text to the right */
}

/* Page title styling */
.subscribe-page-title {
    font-size: 1.8em; /* Adjusted title font size */
    color: #2c3e50; /* Darker, more professional color */
    margin-bottom: 30px; /* More space below the title */
    position: relative;
    padding-bottom: 10px;
    text-align: center; /* Center the title */
}

.subscribe-page-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #3498db; /* Blue underline */
    margin: 10px auto 0 auto; /* Center the underline */
    border-radius: 2px;
}

/* Current Subscription Status Card */
.subscribe-current-status-card {
    background-color: #e0f2f7; /* Light blue background for info */
    border: 1px solid #b3e5fc; /* Light blue border */
    border-radius: 12px; /* Rounded corners */
    padding: 18px 22px; /* Slightly reduced padding */
    margin-bottom: 25px; /* Space below the card */
    display: flex; /* Use flexbox for icon and content alignment */
    align-items: center; /* Vertically center items */
    gap: 15px; /* Space between icon and text */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); /* Soft shadow */
    text-align: right; /* Ensure text aligns right */
}

.subscribe-status-icon {
    font-size: 2.2em; /* Slightly smaller icon size */
    color: #007bff; /* Blue icon color */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.subscribe-status-content {
    flex-grow: 1; /* Allow content to take available space */
}

.subscribe-status-label {
    font-size: 1em; /* Slightly smaller font */
    color: #555;
    margin-bottom: 4px; /* Slightly reduced margin */
}

.subscribe-status-value {
    font-size: 1.1em; /* Slightly smaller font */
    font-weight: bold;
    color: #333;
}

/* Grid container for subscription plans */
.subscribe-plans-grid-container {
    display: grid;
    /* Adjusted minmax to 190px to ensure 4 columns on desktop within 1000px max-width */
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); 
    gap: 20px; /* Reduced gap between cards */
    margin-top: 20px; /* Reduced margin */
    margin-bottom: 30px; /* More space before the back button */
}

/* Individual Subscription Plan Card */
.subscribe-plan-individual-card {
    background-color: #ffffff; /* White background */
    border: 1px solid #e0e0e0; /* Light border */
    border-radius: 15px; /* More rounded corners */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* More prominent shadow */
    padding: 15px; /* Further reduced padding for smaller boxes */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex; /* Flexbox for vertical layout */
    flex-direction: column;
    justify-content: space-between; /* Push button to bottom */
    align-items: center; /* Center content horizontally */
    min-height: 280px; /* Further reduced min-height for smaller boxes */
}

.subscribe-plan-individual-card:hover {
    transform: translateY(-8px); /* Slightly less lift on hover */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12); /* Slightly less strong shadow on hover */
    border-color: #3498db; /* Blue border on hover */
}

/* Featured Plan (e.g., Annual) */
.subscribe-plan-individual-card.featured-plan {
    border: 2px solid #f1e792; /* Highlight with a blue border */
    box-shadow: 0 8px 30px rgba(241, 241, 155, 0.3); /* Blue glow shadow */
    transform: translateY(-5px); /* Slightly lifted by default */
}
.subscribe-plan-individual-card.featured-plan:hover {
    transform: translateY(-15px); /* More lift on hover for featured */
    box-shadow: 0 15px 40px rgba(241, 241, 186, 0.4); /* Stronger blue glow */
}

/* Icon Container for each plan */
.subscribe-plan-icon-container {
    width: 70px; /* Slightly smaller icon container */
    height: 70px; /* Slightly smaller icon container */
    border-radius: 50%; /* Circular background for icon */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px; /* Reduced margin */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Specific icon color for non-trial plans */
.subscribe-plan-icon-container:not(.trial-color) .subscribe-plan-icon {
    color: #ffffff !important; /* Uniform icon color: WHITE for all except trial */
}

/* Trial icon should retain its original color */
.subscribe-plan-icon-container.trial-color .subscribe-plan-icon {
    color: #f39c12 !important; /* Keep original color for trial icon (yellow/orange) */
}


/* Specific colors for icon containers (backgrounds remain unique) */
.subscribe-plan-icon-container.trial-color {
    background: linear-gradient(135deg, #f1c40f, #f39c12); /* Yellow/Orange */
}
.subscribe-plan-icon-container.three-month-color {
    background: linear-gradient(135deg, #9b59b6, #8e44ad); /* Purple */
}
.subscribe-plan-icon-container.annual-color {
    background: linear-gradient(135deg, #3498db, #2980b9); /* Blue */
}
.subscribe-plan-icon-container.lifetime-color {
    background: linear-gradient(135deg, #2ecc71, #27ae60); /* Green */
}


/* Plan Title */
.subscribe-plan-title {
    font-size: 1.2em; /* Further reduced title font size */
    color: #34495e;
    margin-bottom: 8px; /* Reduced margin */
    position: relative;
    padding-bottom: 5px; /* Reduced padding */
}
.subscribe-plan-title::after {
    content: '';
    display: block;
    width: 30px; /* Smaller underline */
    height: 3px;
    background-color: #bdc3c7; /* Light grey underline */
    margin: 5px auto 0 auto; /* Reduced margin */
    border-radius: 2px;
}

/* Plan Price */
.subscribe-plan-price {
    font-size: 1.6em; /* Further reduced price font size */
    font-weight: bold;
    color: #2c3e50; /* Darker color for price */
    margin-bottom: 8px; /* Reduced margin */
}

/* Plan Duration */
.subscribe-plan-duration {
    font-size: 0.8em; /* Further reduced duration font size */
    color: #7f8c8d; /* Muted grey for duration */
    margin-bottom: 15px; /* Reduced margin */
}

/* Plan Buttons */
.subscribe-plan-form {
    margin-top: auto; /* Pushes the form (and button) to the bottom */
    width: 100%; /* Make form take full width */
}

.subscribe-plan-btn {
    width: 100%; /* Button takes full width of card */
    padding: 10px 15px; /* Further reduced padding for buttons */
    font-size: 0.9em; /* Further reduced button text size */
    font-weight: bold;
    border: none;
    border-radius: 10px; /* More rounded button corners */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: inline-flex; /* For icon and text alignment (if icons were added) */
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply custom font */
}

.subscribe-btn-activate {
    background-color: #28a745; /* Green for activate trial */
    color: #fff;
}
.subscribe-btn-activate:hover {
    background-color: #218838;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.subscribe-btn-purchase {
    background-color: #007bff; /* Blue for purchase */
    color: #fff;
}
.subscribe-btn-purchase:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Info/Muted text within cards */
.subscribe-plan-info-text,
.subscribe-plan-muted-text {
    font-size: 0.8em; /* Further reduced font size */
    margin-top: 8px; /* Reduced margin */
    padding: 6px; /* Reduced padding */
    border-radius: 8px;
    width: 100%; /* Ensure it takes full width */
}

.subscribe-plan-info-text {
    color: #28a745; /* Green for active trial info */
    background-color: #e6ffe6;
    border: 1px solid #a0e0a0;
}

.subscribe-plan-muted-text {
    color: #6c757d; /* Grey for muted text */
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
}

/* Back to Dashboard Button */
.subscribe-back-to-dashboard-section {
    text-align: center;
    margin-top: 30px; /* Reduced margin */
    margin-bottom: 20px;
}

.subscribe-back-to-dashboard-btn {
    display: inline-flex; /* Align icon and text */
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #6c757d; /* Grey button */
    color: #fff;
    padding: 10px 20px; /* Reduced padding */
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9em; /* Reduced font size */
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply custom font */
}

.subscribe-back-to-dashboard-btn:hover {
    background-color: #5a6268;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .subscribe-page-main-container {
        padding: 15px;
        margin: 15px auto;
    }

    .subscribe-page-title {
        font-size: 1.6em; /* Adjusted for mobile */
        margin-bottom: 20px;
    }

    .subscribe-current-status-card {
        flex-direction: column; /* Stack icon and text on mobile */
        text-align: center;
        padding: 15px;
    }
    .subscribe-status-icon {
        margin-bottom: 8px; /* Adjusted for mobile */
        font-size: 2em;
    }
    .subscribe-status-content {
        text-align: center;
    }

    .subscribe-plans-grid-container {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 15px; /* Reduced gap for mobile */
    }

    .subscribe-plan-individual-card {
        padding: 20px; /* Adjusted for mobile */
        min-height: auto; /* Allow height to adjust */
    }

    .subscribe-plan-title {
        font-size: 1.4em; /* Adjusted for mobile */
    }

    .subscribe-plan-price {
        font-size: 1.6em; /* Adjusted for mobile */
    }

    .subscribe-plan-duration {
        font-size: 0.85em; /* Adjusted for mobile */
    }

    .subscribe-plan-btn {
        padding: 10px 12px; /* Adjusted for mobile */
        font-size: 0.9em;
    }

    .subscribe-back-to-dashboard-btn {
        padding: 8px 15px; /* Adjusted for mobile */
        font-size: 0.85em;
    }
}

/* --- Purchase Modal Styles --- */
.purchase-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of other content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.purchase-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%; /* Responsive width */
    max-width: 550px; /* Max width for larger screens */
    position: relative;
    transform: translateY(20px); /* Initial slight offset */
    transition: transform 0.3s ease;
    direction: rtl; /* Right-to-left */
    text-align: right; /* Align text to the right */
}

.purchase-modal-overlay.is-visible .purchase-modal-content {
    transform: translateY(0); /* Slide in effect */
}

.purchase-modal-close-btn {
    position: absolute;
    top: 15px;
    left: 15px; /* Position on the left for RTL */
    background: none;
    border: none;
    font-size: 2em;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s ease;
}

.purchase-modal-close-btn:hover {
    color: #555;
}

.purchase-modal-title {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.purchase-modal-title i {
    color: #3498db; /* Blue icon */
    font-size: 1.1em;
}

.purchase-modal-details-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 15px;
    margin-bottom: 25px;
}

.purchase-modal-detail-item {
    display: flex;
    justify-content: space-between; /* Space labels and values */
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #eee; /* Dashed separator */
}

.purchase-modal-detail-item:last-of-type {
    border-bottom: none; /* No border for the last item */
}

.purchase-modal-detail-label {
    font-size: 1em;
    color: #555;
    font-weight: normal;
}

.purchase-modal-detail-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    text-align: left; /* Align values to the left for better number readability */
    direction: ltr; /* Ensure numbers are LTR */
    unicode-bidi: embed;
}

.purchase-modal-discount-input {
    flex-grow: 1; /* Take available space */
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    margin-left: 10px; /* Space between input and button */
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif; /* Apply custom font */
    text-align: right; /* Align text to the right inside input */
}

.purchase-modal-apply-discount-btn {
    background-color: #28a745; /* Green for apply button */
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: bold;
    transition: background-color 0.2s ease;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply custom font */
}

.purchase-modal-apply-discount-btn:hover {
    background-color: #218838;
}

.purchase-modal-total {
    border-top: 2px solid #3498db; /* Stronger border for total */
    padding-top: 15px !important; /* More padding above total */
    margin-top: 10px;
}

.purchase-modal-total .purchase-modal-detail-label,
.purchase-modal-total .purchase-modal-detail-value {
    font-size: 1.3em; /* Larger font for total */
    font-weight: bold;
    color: #3498db; /* Blue color for total */
}

.purchase-modal-actions {
    display: flex;
    justify-content: center; /* Center buttons */
    gap: 15px;
    margin-top: 30px;
}

.purchase-modal-confirm-btn,
.purchase-modal-cancel-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.2s ease;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply custom font */
}

.purchase-modal-confirm-btn {
    background-color: #3498db; /* Blue for confirm */
    color: #fff;
}

.purchase-modal-confirm-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.purchase-modal-cancel-btn {
    background-color: #e74c3c; /* Red for cancel */
    color: #fff;
}

.purchase-modal-cancel-btn:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.modal-message {
    padding: 10px;
    margin-top: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95em;
    font-weight: bold;
}

.modal-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.modal-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading Overlay for AJAX */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8); /* White semi-transparent */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Higher than modal */
    transition: opacity 0.3s ease;
}

.spinner {
    border: 6px solid #f3f3f3; /* Light grey */
    border-top: 6px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    font-size: 1.2em;
    color: #555;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif;
}


/* Responsive Adjustments for Modal */
@media (max-width: 600px) {
    .purchase-modal-content {
        padding: 20px;
        max-width: 95%;
    }

    .purchase-modal-title {
        font-size: 1.5em;
        margin-bottom: 20px;
    }

    .purchase-modal-detail-label,
    .purchase-modal-detail-value {
        font-size: 0.95em;
    }

    .purchase-modal-total .purchase-modal-detail-label,
    .purchase-modal-total .purchase-modal-detail-value {
        font-size: 1.1em;
    }

    .purchase-modal-discount-input {
        padding: 8px 12px;
        font-size: 0.9em;
    }

    .purchase-modal-apply-discount-btn {
        padding: 8px 15px;
        font-size: 0.85em;
    }

    .purchase-modal-actions {
        flex-direction: column; /* Stack buttons on small screens */
        gap: 10px;
    }

    .purchase-modal-confirm-btn,
    .purchase-modal-cancel-btn {
        width: 100%; /* Full width buttons */
        font-size: 1em;
        padding: 10px 15px;
    }
}




















/* assets/css/admin_discount_codes.css */

.admin-discount-codes-main-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    direction: rtl;
    text-align: right;
}

.admin-discount-codes-page-title {
    font-size: 2.2em;
    color: #2c3e50;
    margin-bottom: 35px;
    position: relative;
    padding-bottom: 10px;
    text-align: center;
}

.admin-discount-codes-page-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #3498db;
    margin: 10px auto 0 auto;
    border-radius: 2px;
}

/* Form Card */
.admin-discount-codes-form-card,
.admin-discount-codes-list-card {
    background-color: #f8f9fa; /* Light grey background */
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.admin-discount-codes-form-title,
.admin-discount-codes-list-title {
    font-size: 1.6em;
    color: #34495e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.admin-discount-codes-form-title i,
.admin-discount-codes-list-title i {
    color: #3498db;
    font-size: 1.1em;
}

.admin-discount-codes-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.admin-discount-codes-form .form-group {
    margin-bottom: 0; /* Reset default form-group margin */
}

.admin-discount-codes-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size: 0.95em;
}

.admin-discount-codes-form input[type="text"],
.admin-discount-codes-form input[type="number"],
.admin-discount-codes-form input[type="date"],
.admin-discount-codes-form select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1em;
    color: #495057;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif; /* Apply custom font */
    direction: rtl; /* Ensure RTL for input text */
    text-align: right; /* Align text to right for inputs */
}

.admin-discount-codes-form input[type="text"]:focus,
.admin-discount-codes-form input[type="number"]:focus,
.admin-discount-codes-form input[type="date"]:focus,
.admin-discount-codes-form select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.admin-discount-codes-form-actions {
    display: flex;
    justify-content: flex-end; /* Align buttons to the left (end in RTL) */
    gap: 15px;
    margin-top: 20px;
}

.admin-discount-codes-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply custom font */
}

.admin-discount-codes-btn-primary {
    background-color: #007bff;
    color: #fff;
}

.admin-discount-codes-btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.2);
}

.admin-discount-codes-btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.admin-discount-codes-btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(108, 117, 125, 0.2);
}

.admin-discount-codes-btn-edit {
    background-color: #ffc107; /* Warning yellow */
    color: #343a40;
}
.admin-discount-codes-btn-edit:hover {
    background-color: #e0a800;
}

.admin-discount-codes-btn-delete {
    background-color: #dc3545; /* Danger red */
    color: #fff;
}
.admin-discount-codes-btn-delete:hover {
    background-color: #c82333;
}


/* Table Styles */
.admin-discount-codes-table-responsive {
    overflow-x: auto; /* Enable horizontal scroll on small screens */
    border-radius: 10px; /* Rounded corners for the table container */
    border: 1px solid #e9ecef;
}

.admin-discount-codes-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
}

.admin-discount-codes-table th,
.admin-discount-codes-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.9em;
}

.admin-discount-codes-table th {
    background-color: #f0f2f5;
    color: #34495e;
    font-weight: bold;
    text-transform: uppercase;
}

.admin-discount-codes-table tbody tr:hover {
    background-color: #f5f5f5;
}

.admin-discount-codes-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start; /* Align action buttons to the right */
}

.no-records-message {
    text-align: center;
    color: #777;
    padding: 30px;
    font-size: 1.1em;
}

/* Quick Access Section */
.admin-discount-codes-quick-access-section {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.admin-discount-codes-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #6c757d;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-weight: bold;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Apply custom font */
}

.admin-discount-codes-back-btn:hover {
    background-color: #5a6268;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Delete Confirmation Modal */
.admin-discount-codes-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.admin-discount-codes-modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.admin-discount-codes-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 450px;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    direction: rtl;
}

.admin-discount-codes-modal-overlay.is-visible .admin-discount-codes-modal-content {
    transform: translateY(0);
}

.admin-discount-codes-modal-title {
    font-size: 1.6em;
    color: #dc3545; /* Red for danger */
    margin-bottom: 20px;
}

.admin-discount-codes-modal-content p {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
}

.admin-discount-codes-modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Responsive Table for smaller screens */
@media (max-width: 768px) {
    .admin-discount-codes-form-grid {
        grid-template-columns: 1fr; /* Stack inputs on small screens */
    }

    .admin-discount-codes-table thead {
        display: none; /* Hide table headers on small screens */
    }

    .admin-discount-codes-table,
    .admin-discount-codes-table tbody,
    .admin-discount-codes-table tr,
    .admin-discount-codes-table td {
        display: block; /* Make table elements behave like blocks */
        width: 100%;
    }

    .admin-discount-codes-table tr {
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 10px;
        background-color: #fff;
    }

    .admin-discount-codes-table td {
        text-align: right;
        padding-left: 50%; /* Space for data-label */
        position: relative;
    }

    .admin-discount-codes-table td::before {
        content: attr(data-label); /* Display data-label as pseudo-element */
        position: absolute;
        right: 15px;
        width: 45%;
        padding-left: 10px;
        font-weight: bold;
        text-align: right;
        color: #34495e;
    }

    .admin-discount-codes-actions {
        justify-content: center; /* Center action buttons on mobile */
        margin-top: 15px;
    }
}












/* --- استایل‌های عمومی برای مودال پاپ‌آپ پیام (برای style.css) --- */

.notification-modal-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* پس‌زمینه نیمه‌شفاف */
    z-index: 9999; /* بالاترین لایه برای نمایش روی همه چیز */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px; /* پدینگ کلی برای موبایل */
}

.notification-modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.notification-modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.notification-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    max-width: 600px; /* حداکثر عرض مودال */
    width: 95%; /* عرض ریسپانسیو */
    text-align: right;
    direction: rtl;
    transform: translateY(-20px); /* شروع کمی بالاتر برای انیمیشن */
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.notification-modal-overlay:not(.hidden) .notification-modal-content {
    transform: translateY(0); /* بازگشت به جای اصلی */
    opacity: 1;
}

.notification-modal-close-btn {
    position: absolute;
    top: 15px;
    left: 15px; /* در RTL، دکمه بستن در سمت چپ بالا */
    background: none;
    border: none;
    font-size: 2.5em;
    color: #888;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    border-radius: 50%;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.notification-modal-close-btn:hover {
    color: #333;
    background-color: #f0f0f0;
}

.notification-modal-content h3 {
    color: #0056b3; /* رنگ آبی برای عنوان */
    margin-bottom: 20px;
    font-size: 1.8em;
    padding-left: 30px; /* برای جلوگیری از تداخل با دکمه بستن */
}

.notification-modal-content #notificationModalBody {
    line-height: 1.7;
    color: #444;
    font-size: 1.05em;
    max-height: 70vh; /* حداکثر ارتفاع برای محتوا با اسکرول */
    overflow-y: auto; /* اسکرول برای محتوای بلند */
    padding-left: 5px; /* برای جلوگیری از برش متن در اسکرول‌بار */
    padding-bottom: 15px; /* فاصله از نوار زمان‌سنج */
}

/* جلوگیری از اسکرول بدنه اصلی وقتی مودال باز است */
body.notification-no-scroll {
    overflow: hidden;
}

/* نوار زمان‌سنج */
.notification-countdown-bar-container {
    width: 100%;
    height: 8px; /* ارتفاع نوار زمان */
    background-color: #e0e0e0; /* رنگ پس‌زمینه نوار */
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden; /* برای اطمینان از اینکه نوار داخل کانتینر بماند */
}

.notification-countdown-bar {
    height: 100%;
    width: 100%; /* شروع از 100% و کاهش به 0% */
    background-color: #28a745; /* رنگ سبز */
    border-radius: 4px;
    transform-origin: right; /* شروع انیمیشن از راست به چپ در RTL */
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .notification-modal-content {
        padding: 20px;
        border-radius: 8px;
    }

    .notification-modal-close-btn {
        font-size: 2em;
        top: 10px;
        left: 10px;
    }

    .notification-modal-content h3 {
        font-size: 1.5em;
        margin-bottom: 15px;
        padding-left: 25px;
    }

    .notification-modal-content #notificationModalBody {
        font-size: 1em;
        max-height: 60vh;
    }
}






/* Trial Activation Confirmation Modal Styles */
.trial-confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    opacity: 0;
}

.trial-confirm-modal-overlay.is-visible {
    display: flex;
    opacity: 1;
}

.trial-confirm-modal-content {
    background-color: #ffffff;
    color: #333;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.trial-confirm-modal-overlay.is-visible .trial-confirm-modal-content {
    transform: scale(1);
}

.trial-confirm-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.trial-confirm-modal-message {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
}

.trial-confirm-modal-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.trial-confirm-modal-confirm-btn,
.trial-confirm-modal-cancel-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trial-confirm-modal-confirm-btn {
	font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Use custom font for the entire body with high priority */
    background-color: #2ecc71; /* Green color for confirm */
    color: #fff;
}

.trial-confirm-modal-confirm-btn:hover {
    background-color: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 204, 113, 0.3);
}

.trial-confirm-modal-cancel-btn {
	font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* Use custom font for the entire body with high priority */
    background-color: #bdc3c7; /* Gray color for cancel */
    color: #333;
}

.trial-confirm-modal-cancel-btn:hover {
    background-color: #95a5a6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(189, 195, 199, 0.3);
}

.trial-confirm-modal-close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 24px;
    line-height: 1;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease;
}

.trial-confirm-modal-close-btn:hover {
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .trial-confirm-modal-content {
        padding: 20px;
    }

    .trial-confirm-modal-title {
        font-size: 1.3rem;
    }

    .trial-confirm-modal-actions {
        flex-direction: column;
    }
}





/* برای نمایش دو فیلد "مدت زمان نمایش" و "تاخیر نمایش" در کنار هم */
.notification-delay-and-duration-group {
    display: flex;
    flex-wrap: wrap; /* برای اینکه در نمایشگرهای کوچک به زیر هم بروند */
    gap: 1rem; /* فاصله بین فیلدها */
    grid-column: 1 / -1; /* اطمینان از اینکه در یک ستون کامل قرار می‌گیرد */
}

/* هر فرم‌گروپ درون این ظرف، یک فضای برابر می‌گیرد */
.notification-delay-and-duration-group .form-group {
    flex: 1 1 200px; /* رشد کند، کوچک شود، و حداقل عرض ۲۰۰ پیکسل را داشته باشد */
}









/* Unique CSS for the info icon and tooltip */

.deal-info-icon-unique-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin-right: 5px; /* Adjust spacing as needed */
}

.deal-info-icon-unique {
    color: var(--primary-color, #007bff); /* یا هر رنگ مناسب دیگر */
    font-size: 1.2rem;
}

/* Tooltip container (the text bubble) */
.deal-info-icon-unique-container[data-tooltip-unique]::before {
    content: attr(data-tooltip-unique);
    position: absolute;
    bottom: 125%; /* Positions the tooltip above the icon */
    left: 50%; /* Centers it horizontally relative to the parent */
    transform: translateX(-50%); /* Adjusts for centering */
    background-color: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    min-width: 150px;
    text-align: right;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow (the small triangle) */
.deal-info-icon-unique-container[data-tooltip-unique]::after {
    content: '';
    position: absolute;
    bottom: 110%; /* Positions the arrow just below the tooltip */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #333; /* Color matches the tooltip background */
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show tooltip and arrow on hover */
.deal-info-icon-unique-container:hover[data-tooltip-unique]::before,
.deal-info-icon-unique-container:hover[data-tooltip-unique]::after {
    opacity: 1;
    visibility: visible;
}














/* Custom styles for transaction icons and buttons in the deals list */

/* Align button group to the right within the card */
.deal-item-actions-group {
    display: flex;
    align-items: center;
    gap: 8px; /* Space between action buttons and icons */
}

/* Base style for custom buttons to make them square */
.deal-item-actions-group .btn-custom {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 1rem;
    box-shadow: none;
    border: 1px solid transparent;
}

.deal-item-actions-group .btn-custom.btn-delete {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.deal-item-actions-group .btn-custom.btn-edit {
    background-color: #ffc107;
    border-color: #ffc107;
    color: black;
}

/* Styles for the transaction type icon container */
.transaction-type-icon-unique-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.transaction-type-icon-unique-container:hover {
    transform: scale(1.1);
}

.transaction-type-icon-unique-container .fas {
    font-size: 1.5rem;
}

.transaction-icon-unique-deal {
    color: #28a745; /* Green for deals */
}

.transaction-icon-unique-offset {
    color: #dc3545; /* Red for offsets */
}

/* Tooltip styles for the transaction type icon */
.transaction-type-icon-unique-container[data-tooltip-unique]::after {
    content: attr(data-tooltip-unique);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 10;
    text-align: center;
    font-size: 0.9em;
}

.transaction-type-icon-unique-container:hover[data-tooltip-unique]::after {
    opacity: 1;
    visibility: visible;
}





/* CSS for margin transaction icons */
.transaction-type-icon-unique-container {
    margin-right: 8px; /* فاصله از دکمه‌ها */
}

.transaction-icon-unique-increase {
    color: #dc3545; /* Red for decrease */
}

.transaction-icon-unique-decrease {
    color: #28a745; /* Green for increase */
}















/* Unique styles for accounting.php page */

.accounting-container-unique {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
    text-align: right;
}

.accounting-title-unique {
    text-align: center;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif;
    color: #343a40;
    margin-bottom: 20px;
}

.accounting-section-title-unique {
    font-size: 1.2rem;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-top: 30px;
    font-weight: bold; /* Added bold to match site style */
}

/* Updated filter and form sections to match deal_records.php structure */
.accounting-filter-section-unique {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.accounting-input-grid-unique {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.accounting-form-group-unique {
    display: flex;
    flex-direction: column;
}

.accounting-form-group-unique label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #495057;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important;
}

.accounting-form-group-unique select, .accounting-form-group-unique input {
    padding: 10px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important;
}

/* Filter specific grid to align with deal_records.php image */
.filter-grid-unique {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 4 columns on desktop */
}

.accounting-filter-actions-unique {
    display: flex;
    justify-content: flex-start; /* Align buttons to the right in RTL */
    gap: 10px;
    margin-top: 20px;
}

.accounting-filter-btn-unique {
    font-size: 0.9em;
    padding: 10px 20px;
}

/* List section */
.accounting-flows-list-unique {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.accounting-flow-item-unique {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,.05);
    transition: transform 0.2s;
}

.accounting-flow-item-unique:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.accounting-flow-icon-container-unique {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-left: 15px;
}

.accounting-icon-positive-unique {
    color: #28a745;
    font-size: 1.5rem;
}

.accounting-icon-negative-unique {
    color: #dc3545;
    font-size: 1.5rem;
}

.accounting-flow-details-unique {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.accounting-flow-title-unique {
    font-size: 1.1rem;
    font-weight: bold;
    color: #343a40;
}

.accounting-flow-meta-unique {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 5px;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif;
}

.accounting-flow-amount-unique {
    font-size: 1.2rem;
    font-weight: bold;
    margin-right: 20px;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important;
}

.accounting-amount-positive-unique {
    color: #28a745;
}

.accounting-amount-negative-unique {
    color: #dc3545;
}

.accounting-flow-info-icon-container-unique {
    position: relative;
    cursor: pointer;
    margin-right: 10px;
}

.accounting-flow-info-icon-unique {
    font-size: 1rem;
    color: #17a2b8;
}

/* Tooltip styles */
[data-tooltip-unique]::after {
    content: attr(data-tooltip-unique);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #343a40;
    color: #fff;
    padding: 8px;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
    z-index: 10;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif;
}

[data-tooltip-unique]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Pagination Styles */
.accounting-pagination-container-unique {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
}

.accounting-pagination-btn-unique {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important;
    color: #495057;
    transition: background-color 0.2s, color 0.2s;
}

.accounting-pagination-btn-unique:hover {
    background-color: #e9ecef;
}

.accounting-pagination-btn-active-unique {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.accounting-pagination-btn-active-unique:hover {
    background-color: #0056b3;
}

.accounting-no-flows-message-unique,
.accounting-error-message-unique {
    text-align: center;
    font-size: 1.1rem;
    color: #6c757d;
    padding: 20px;
    background-color: #f1f1f1;
    border-radius: 8px;
}

/* Loading Overlay Styles */
.accounting-loading-overlay-unique {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
}
.accounting-loading-content-unique {
    text-align: center;
    padding: 20px 40px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.accounting-spinner-unique {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top-color: #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin-unique 1s linear infinite;
    margin: 0 auto 15px;
}
@keyframes spin-unique {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .accounting-input-grid-unique {
        grid-template-columns: 1fr;
    }
    .accounting-flow-item-unique {
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
    }
    .accounting-flow-details-unique {
        align-items: flex-end;
        text-align: right;
    }
    .accounting-flow-icon-container-unique {
        position: absolute;
        top: 15px;
        left: 15px;
        margin-left: 0;
    }
    .accounting-flow-amount-unique {
        margin-top: 10px;
    }
    .accounting-flow-info-icon-container-unique {
        position: static;
        margin-top: 10px;
        margin-right: 0;
        align-self: flex-start;
    }
}

/* Quick access section unique styles */
.quick-access-section-unique {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-top: 30px;
    direction: rtl;
    text-align: center;
}
.quick-access-grid-unique {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}
.quick-access-card-unique {
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    min-height: 120px;
}
.quick-access-card-unique:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: #eaf6ff;
    border-color: #aed6f1;
}
.quick-access-icon-unique {
    font-size: 2.5em;
    color: #3498db;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}
.quick-access-card-unique:hover .quick-access-icon-unique {
    color: #2980b9;
}
.quick-access-label-unique {
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    line-height: 1.3;
}
@media (max-width: 768px) {
    .quick-access-grid-unique {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

















/* Style for this specific page */
.statement-container .deal-item-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.statement-container .deal-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.result-item {
    background-color: #f8f9fa;
    border-right: 5px solid #007bff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,.05);
    position: relative;
    overflow: hidden;
}
.result-item.positive-flow {
    border-right-color: #28a745;
}
.result-item.negative-flow {
    border-right-color: #dc3545;
}
.result-label {
    display: block;
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
    position: relative;
    z-index: 1;
}
.result-value {
    font-size: 1.2rem;
    color: #343a40;
    position: relative;
    z-index: 1;
}
.result-date {
    display: block;
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}
.formula-text {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    text-align: right;
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px dashed #e9ecef;
    position: relative;
    z-index: 1;
}
.formula-en {
    font-family: 'monospace';
    direction: ltr;
    text-align: left;
    font-size: 0.7rem;
    color: #888;
}
.total-contracts-box {
    background-color: #e9ecef;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.arbitrage-statement-total-contracts-box {
    background-color: #e9ecef;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}
.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}
.cash-flow-subtitle {
    text-align: right;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 2rem;
    color: #343a40;
}
.nav-input-section .input-grid {
    grid-template-columns: 1fr 1fr;
}
.nav-input-section .input-grid .form-group {
    margin-bottom: 0;
}
.debug-section {
    background-color: #f1f1f1;
    border-radius: 8px;
    padding: 20px;
}
.debug-section h4, .debug-section h5 {
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    margin-bottom: 15px;
}
.debug-section p {
    margin-bottom: 5px;
}
</style>









/* --- New Unique Styles for user/statement.php --- */

/* Main Container */
.arbitrage-statement-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    direction: rtl;
    text-align: right;
}

/* Page Titles and Headings */
.arbitrage-statement-title {
    font-size: 2.2em;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
}

.arbitrage-statement-section-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #34495e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}
.arbitrage-statement-section-title .fas {
    color: #007bff;
}



/* Form and Input Section */
.arbitrage-statement-form-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.arbitrage-statement-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Result Sections and Cards */
#arbitrage-statement-results-container.hidden {
    display: none;
}
#arbitrage-statement-results-container {
    margin-top: 30px;
    animation: fadeIn 0.5s ease-in-out;
}

.arbitrage-statement-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.arbitrage-statement-result-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.arbitrage-statement-result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.arbitrage-statement-result-label {
    font-weight: bold;
    color: #555;
    margin-bottom: 5px;
}


.arbitrage-statement-result-value {
    font-size: 1.2rem;
    color: #333;
    text-align: right;
    unicode-bidi: embed;
}

/* Colored borders for result items */
.arbitrage-statement-result-item.positive-flow { border-right: 4px solid #28a745; }
.arbitrage-statement-result-item.negative-flow { border-right: 4px solid #dc3545; }
.arbitrage-statement-result-item.summary { border-right: 4px solid #007bff; }
.arbitrage-statement-result-item.return { border-right: 4px solid #ffc107; }

/* Message Boxes */
#arbitrage-statement-status-message.hidden {
    display: none;
}
.arbitrage-statement-message {
    font-weight: normal;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}
.arbitrage-statement-message.warning {
    font-weight: normal;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}
.arbitrage-statement-message.error {
    font-weight: normal;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.arbitrage-statement-message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Loading Overlay & Modal */
#arbitrage-statement-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
#arbitrage-statement-loading-overlay.hidden {
    display: none;
}

#arbitrage-statement-loading-overlay .arbitrage-statement-loading-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    direction: rtl;
}

#arbitrage-statement-loading-overlay .arbitrage-statement-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: arbitrage-statement-spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

#arbitrage-statement-error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000; /* بالاتر از لودینگ */
}
#arbitrage-statement-error-modal.hidden {
    display: none;
}

#arbitrage-statement-error-modal .arbitrage-statement-modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    text-align: center;
    direction: rtl;
    position: relative;
}

#arbitrage-statement-error-modal .arbitrage-statement-modal-icon {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 15px;
}

#arbitrage-statement-error-modal .arbitrage-statement-countdown-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden;
}

#arbitrage-statement-error-modal .arbitrage-statement-countdown-bar {
    height: 100%;
    background-color: #dc3545;
}
#arbitrage-statement-error-modal .modal-close-button {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .arbitrage-statement-input-grid {
        grid-template-columns: 1fr;
    }
    .arbitrage-statement-results-grid {
        grid-template-columns: 1fr;
    }
    .arbitrage-statement-title {
        font-size: 1.8em;
    }
    .arbitrage-statement-section-title {
        font-size: 1.2em;
    }
}




/* Custom CSS for user/statement.php */

/* Make the calculation button full-width */
.arbitrage-statement-form-section .btn-statement-primary {
    width: 100%;
    margin-top: 15px; /* Optional: adds space above the button */
}

/* Flexbox for titles to place icon before text */
.arbitrage-statement-section-title {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between icon and text */
}

/* Ensure icons are correctly positioned */
.arbitrage-statement-section-title i {
    order: -1; /* This places the icon before the text */
}

/* Custom CSS for arbitrage-statement error modal button */

/* Container for actions to create space */
.arbitrage-statement-modal-actions {
    margin-top: 20px; /* Adjust spacing as needed */
}

/* Style for the button inside the error modal */
.arbitrage-statement-error-modal-btn {
    background-color: #dc3545; /* Red color */
    border-color: #dc3545;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.arbitrage-statement-error-modal-btn:hover {
    background-color: #c82333; /* Darker red on hover */
    border-color: #c82333;
}






















































/* Unique CSS for the new online.php page to prevent conflicts */

.online-arbitrage-page-container {
    max-width: 1200px;
    width: 95%;
    margin: 30px auto;
    background-color: #f0f2f5;
    box-shadow: none;
    padding: 0;
}

.online-arbitrage-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.online-arbitrage-header-info {
    display: flex;
    gap: 20px;
    font-size: 1.1em;
    font-weight: bold;
    color: #495057;
    flex-wrap: wrap;
}

.online-arbitrage-header-item {
    white-space: nowrap;
}

.online-arbitrage-status-box {
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.online-arbitrage-status-box.status-preopen {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.online-arbitrage-status-box.status-open {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.online-arbitrage-status-box.status-closed {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.online-arbitrage-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.online-arbitrage-info-box {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    min-height: 370px;
    display: grid;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.online-arbitrage-info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.online-arbitrage-box-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.online-arbitrage-box-right,
.online-arbitrage-box-center,
.online-arbitrage-box-left {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

.online-arbitrage-box-center {
    border-left: 1px solid #e0e0e0;
}

.online-arbitrage-box-right {
    border-left: 1px solid #e0e0e0;
}

.box-title-section {
    text-align: center;
    margin-bottom: 20px;
}
.title-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #343a40;
}
.title-content i {
    color: #007bff;
}
.title-underline {
    height: 2px;
    width: 50px;
    background: linear-gradient(to right, #007bff, #00c6ff);
    margin: 6px auto 0 auto;
    border-radius: 1px;
}


.online-arbitrage-price-section,
.online-arbitrage-details-section,
.online-arbitrage-contract-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.online-arbitrage-price-group,
.online-arbitrage-detail-group,
.online-arbitrage-contract-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}

.online-arbitrage-box-right .online-arbitrage-contract-info:first-child span {
    color: #007bff;
}


.value-group-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.online-arbitrage-label-persian {
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
}







/*
 * این کلاس را به فایل CSS اصلی خود اضافه کنید.
 * این استایل یک لودر دایره‌ای کوچک ایجاد می‌کند که در مرکز المان قرار می‌گیرد.
*/
.price-loader {
    display: inline-block;
    width: 16px; /* اندازه لودر */
    height: 16px; /* اندازه لودر */
    border: 2px solid rgba(200, 200, 200, 0.4); /* رنگ حلقه پس‌زمینه لودر */
    border-radius: 50%;
    border-top-color: #ffffff; /* رنگ بخش متحرک لودر */
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle; /* برای هم‌ترازی با متن‌های اطراف */
    margin: 0 auto; /* برای قرارگیری در مرکز المان والد */
}

/* انیمیشن چرخش برای لودر */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/*
 * این کلاس‌ها برای اطمینان از نمایش صحیح لودر در مرکز المان‌های والد استفاده می‌شوند.
 * به المان‌های span که قیمت‌ها را نمایش می‌دهند اضافه می‌شود تا لودر در مرکز قرار گیرد.
*/
//.online-arbitrage-value,
//.online-arbitrage-value-important,
//.parenthesis-value {
 //   display: inline-flex;
   // justify-content: center;
   // align-items: center;
   // min-width: 25px; /* حداقل عرض برای جلوگیری از پرش‌های ظاهری */
  //  min-height: 20px; /* حداقل ارتفاع */
//}






.online-arbitrage-value {
    font-size: 1.1em;
    color: #333;
    flex-grow: 1;
    text-align: left;
}

.online-arbitrage-value-important {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    flex-grow: 1;
    text-align: left;
}

.parenthesis-value {
    font-weight: normal;
    font-size: 12px;
    color: #555;
}

.online-arbitrage-value.ltr, .parenthesis-value.ltr {
    direction: ltr;
    unicode-bidi: embed;
    text-align: left;
}

.online-arbitrage-value.contractid {
    font-family: Arial, sans-serif;
    font-weight: normal;
}

.online-arbitrage-chart-section,
.online-arbitrage-ratio-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    position: absolute;
    bottom: 77px;
    left: 15px;
    right: 15px;
    width: calc(100% - 30px);
}

.online-arbitrage-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    position: relative;
    font-size: 1.2rem;
}


/* --- Style for Active Notification Buttons --- */

.online-arbitrage-btn.notification-active {
    background-color: #ffc107; /* A nice yellow color */
    color: #212529; /* Dark text for better contrast on yellow */
    border-color: #ffc107;
}

.online-arbitrage-btn.notification-active:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Ensure the icon color also changes */
.online-arbitrage-btn.notification-active i {
    color: #212529;
}



.online-arbitrage-btn.btn-calculate {
    background-color: #007bff;
    color: #fff;
}

.online-arbitrage-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.online-arbitrage-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    background-color: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 10;
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important;
}

.online-arbitrage-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

.box-button-container {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
}

.bar-chart-container.bottom-chart {
    position: absolute;
    bottom: 59px;
    left: 15px;
    right: 15px;
    width: calc(100% - 30px);
    height: 8px;
    background-color: #f0f2f5;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.bar-chart-negative {
    height: 100%;
    background: linear-gradient(to left, #ff8a8a, #ff0000);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    margin-left: auto;
    transition: width 0.3s ease-in-out;
}

.bar-chart-positive {
    height: 100%;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    transition: width 0.3s ease-in-out, background 0.3s ease-in-out;
}

.bar-chart-positive.yellow {
    background: linear-gradient(to right, #fff200, #ffc500);
}

.bar-chart-positive.green {
     background: linear-gradient(to right, #a8ff78, #78ffd6);
}

.message-wrapper {
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
}

.no-active-contracts-message {
    background-color: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: normal;
}


@media (max-width: 1024px) {
    .online-arbitrage-box-container {
        flex-direction: column;
        gap: 15px;
    }

    .online-arbitrage-box-right,
    .online-arbitrage-box-center,
    .online-arbitrage-box-left {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 90px;
        padding-top: 15px;
    }
    
    .box-button-container,
    .bar-chart-container.bottom-chart,
    .online-arbitrage-chart-section,
    .online-arbitrage-ratio-section {
        position: static;
        transform: none;
        width: 100%;
        margin: 10px auto 0 auto;
    }
    .box-button-container {
        justify-content: center;
        margin-top: 8px;
    }
    .online-arbitrage-chart-section,
    .online-arbitrage-ratio-section {
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .online-arbitrage-header-section {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    .online-arbitrage-header-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    .online-arbitrage-status-box {
        width: 100%;
    }
}

.online-arbitrage-box-right .online-arbitrage-contract-section .online-arbitrage-contract-info:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}

.online-arbitrage-box-right .online-arbitrage-contract-section .online-arbitrage-contract-info:first-child .online-arbitrage-label-persian {
    order: 2;
    margin-left: auto;
}

.online-arbitrage-box-right .online-arbitrage-contract-section .online-arbitrage-contract-info:first-child .online-arbitrage-value.conname {
    order: 1;
}

.online-arbitrage-box-right .online-arbitrage-contract-section .online-arbitrage-contract-info:first-child .online-arbitrage-value.condate {
    order: 3;
    text-align: right;
}


/* --- Notification Modal Styles (Corrected) --- */

/* Overlay for the modal */
.notification-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notification-popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Main modal container */
.notification-popup-content {
    background-color: #fff;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 480px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.notification-popup-overlay.visible .notification-popup-content {
    transform: scale(1);
}

/* Modal header */
.notification-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.notification-popup-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-popup-close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

/* Form group styling */
.notification-form-group {
    margin-bottom: 18px;
}

.notification-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.notification-form-group .input-group {
    display: flex;
    gap: 10px;
}

.notification-form-group select,
.notification-form-group input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-family: 'IRANYekanX', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.notification-form-group select {
    flex: 1;
}

.notification-form-group input[type="number"] {
    flex: 2;
}

.notification-form-group select:focus,
.notification-form-group input[type="number"]:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Checkbox container */
.notification-checkbox-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.notification-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
}

.notification-checkbox-label input {
    margin-left: 8px;
    width: 18px;
    height: 18px;
}

/* Footer alignment */
.notification-popup-footer {
    display: flex;
    justify-content: flex-end; /* Aligns buttons to the left (in RTL) */
    margin-top: 25px;
}

/* Base style for ALL buttons inside popups */
.notification-popup-footer button {
    font-family: 'IRANYekanXFaNum', 'IRANYekanX', 'Arial', sans-serif !important; /* CORRECTED: Removed extra quote */
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

/* Save Button Style */
.notification-save-btn {
    background-color: #007bff;
    color: white;
}

.notification-save-btn:hover {
    background-color: #0056b3;
}

/* Deactivate Button Style */
.notification-deactivate-btn {
    background-color: #dc3545;
    color: white;
    margin-left: 10px; /* Space between buttons */
}

.notification-deactivate-btn:hover {
    background-color: #c82333;
}

/* Loading indicator inside the modal */
.notification-popup-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 10;
    border-radius: 12px;
}

.notification-popup-loading .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

.notification-popup-loading p {
    margin-top: 15px;
    font-size: 1rem;
    color: #333;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Confirmation Modal */
.success-popup-content {
    padding: 20px 25px;
    text-align: center;
    max-width: 350px;
}
.success-popup-content h3 {
    font-size: 1.2rem;
    margin-top: 10px;
    margin-bottom: 20px;
}
.success-icon {
    font-size: 3rem;
    color: #28a745;
}

/* Countdown Timer Bar */
.countdown-bar-container {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    height: 8px;
    margin-top: 15px;
}
.countdown-bar {
    height: 100%;
    width: 100%;
    background-color: #28a745;
    border-radius: 5px;
    transition: width 5s linear;
}

/* General hidden class */
.hidden {
    display: none !important;
}


















/* =========================================================================
   Styles for Telegram Setup Modal
   ========================================================================= */

.telegram-setup-body {
    padding: 15px 25px;
    line-height: 1.8;
    color: #455a64;
    text-align: right;
}

.telegram-setup-body p {
    margin-bottom: 20px;
    font-size: 15px;
}

.telegram-setup-steps {
    list-style-type: decimal;
    margin-right: 20px;
    margin-bottom: 25px;
}

.telegram-setup-steps li {
    margin-bottom: 15px;
}

.telegram-bot-link {
    display: inline-block;
    background-color: #0088cc;
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 5px;
    transition: background-color 0.3s;
}

.telegram-bot-link:hover {
    background-color: #0077b3;
}

#telegram-chat-id-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    text-align: left;
    direction: ltr;
    margin-top: 5px;
}

.telegram-setup-error {
    color: #d9534f;
    font-size: 13px;
    margin-top: 5px;
}














/* =========================================================================
   Styles for Telegram Test Button
   ========================================================================= */

.notification-test-btn {
    background-color: #0088cc; /* Telegram Blue */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s, box-shadow 0.3s;
    margin-left: 10px; /* Add some space between buttons */
}

.notification-test-btn:hover {
    background-color: #0077b3;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.notification-test-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.notification-test-btn i {
    margin-left: 8px;
}













