* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f1f5f9;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ساختار اصلی با Toolbar */
.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* ===== Toolbar بالا - با دکمه‌های هم اندازه ===== */
.toolbar {
    width: 100%;
    height: 70px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.toolbar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* ===== لوگوی Journal Me (بدون دور) ===== */
.journalme-logo {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.journalme-logo:hover {
    transform: scale(1.05);
}

.journal-text {
    font-family: 'Poppins', 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.me-text {
    font-family: 'Poppins', 'Montserrat', 'Segoe UI', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.toolbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.toolbar-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 120px;
    justify-content: center;
    height: 44px;
}

.toolbar-btn i {
    font-size: 1.1rem;
    color: #64748b;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #f1f5f9;
    transform: translateY(-2px);
}

.toolbar-btn:hover i {
    color: #3b82f6;
}

.toolbar-btn.active {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-bottom: 2px solid #3b82f6;
}

.toolbar-btn.active i {
    color: #3b82f6;
}

.toolbar-calculator {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.toolbar-calculator .calculator-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    justify-content: center;
    height: 44px;
}

.toolbar-calculator .calculator-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

/* محتوای اصلی */
.main-wrapper {
    margin-top: 90px;
    padding: 20px;
    width: 100%;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background-color: rgba(30, 41, 59, 0.95);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    padding: 25px;
    border: 1px solid #334155;
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 1024px) {
    .toolbar-btn {
        min-width: 100px;
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .toolbar {
        height: auto;
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    
    .toolbar-menu {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .toolbar-btn {
        min-width: calc(50% - 5px);
        flex: 1;
    }
    
    .journal-text, .me-text {
        font-size: 1.4rem;
    }
    
    .main-wrapper {
        margin-top: 180px;
    }
}

@media (max-width: 480px) {
    .toolbar-btn {
        min-width: 100%;
    }
}

/* بالانس */
.balance-container {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #475569;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.balance-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.balance-icon {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-title {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.balance-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #10b981;
}

#currentAccountName {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 5px;
}

.balance-details {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.balance-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-label {
    color: #cbd5e1;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 700;
}

#totalPnL {
    color: #10b981;
}

#activeAccountIndicator {
    color: #3b82f6;
}

.balance-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.balance-btn {
    padding: 10px 16px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    color: #60a5fa;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.balance-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

/* ===== معاملات باز ===== */
.open-trades-container {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #334155;
}

.open-trades-title {
    color: #f59e0b;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.open-trades-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.open-trade-item {
    background: rgba(30, 41, 59, 0.6);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #334155;
    transition: all 0.2s;
}

.open-trade-item:hover {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.open-trade-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.open-trade-symbol {
    font-weight: 700;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 1rem;
}

.open-trade-detail {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.open-trade-detail i {
    color: #64748b;
    width: 16px;
}

.open-trade-detail span {
    color: #f1f5f9;
    font-weight: 600;
}

.open-trade-actions {
    display: flex;
    gap: 10px;
}

.open-trade-actions .btn-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.open-trade-actions .btn-icon:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: scale(1.05);
}

.no-open-trades {
    text-align: center;
    padding: 30px;
    color: #64748b;
    font-style: italic;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 8px;
}

/* مودال‌ها */
.modal-box {
    background: rgba(30, 41, 59, 0.95);
    border-radius: 12px;
    border: 1px solid #475569;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    padding: 0 25px;
    border-width: 0;
    margin: 0;
}

.modal-box.active {
    max-height: 800px;
    opacity: 1;
    transform: translateY(0);
    padding: 25px;
    border-width: 1px;
    margin-top: 15px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #475569;
}

.modal-title {
    color: #60a5fa;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.modal-input-group {
    display: flex;
    flex-direction: column;
}

.modal-label {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-input {
    width: 100%;
    padding: 12px;
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.modal-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
}

.modal-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.modal-btn-secondary {
    background-color: #475569;
    color: #e2e8f0;
}

.modal-btn-secondary:hover {
    background-color: #64748b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(71, 85, 105, 0.3);
}

.modal-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.modal-btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.preset-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.preset-btn {
    padding: 8px 5px;
    background: rgba(71, 85, 105, 0.3);
    border: 1px solid #475569;
    border-radius: 6px;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    text-align: center;
}

.preset-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: #3b82f6;
    transform: translateY(-2px);
}

.current-balance-display {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-balance-label {
    color: #94a3b8;
    font-size: 0.9rem;
}

.current-balance-value {
    color: #10b981;
    font-size: 1.1rem;
    font-weight: 700;
}

.accounts-list-container {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #475569;
    padding: 10px;
    background-color: rgba(15, 23, 42, 0.5);
}

.account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #475569;
    transition: all 0.2s;
}

.account-item:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.account-item:last-child {
    border-bottom: none;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.account-name {
    font-weight: 600;
    color: #f1f5f9;
}

.account-balance {
    font-size: 0.9rem;
    color: #94a3b8;
}

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

.account-action-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.account-action-btn:hover {
    color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.account-action-btn.delete:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.active-account {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
}

.active-badge {
    background-color: #10b981;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 5px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* بخش‌های اصلی */
.section, .dashboard-section {
    background-color: rgba(15, 23, 42, 0.7);
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #475569;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

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

.section.active-section, .dashboard-section.active-section {
    display: block;
}

.section-title {
    color: #60a5fa;
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #475569;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* فرم ثبت معامله */
.trade-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

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

label {
    margin-bottom: 8px;
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

input, select {
    padding: 12px;
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #f1f5f9;
    transition: all 0.3s;
    height: 44px;
}

input[type="text"] {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-align: left;
    direction: ltr;
    font-size: 0.95rem;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.prices-section {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(71, 85, 105, 0.3);
}

.prices-title {
    color: #60a5fa;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.price-display {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 0.5px;
    direction: ltr;
    text-align: left;
    font-size: 0.95rem;
}

.quick-risk-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.quick-risk-btn {
    padding: 8px 12px;
    background-color: rgba(71, 85, 105, 0.5);
    border: 1px solid #475569;
    border-radius: 6px;
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    flex: 1;
    min-height: 36px;
}

.quick-risk-btn:hover {
    background-color: #64748b;
    transform: translateY(-2px);
}

.screenshot-upload-input {
    width: 100%;
    padding: 12px;
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 0.9rem;
    transition: all 0.3s;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-align: center;
}

.screenshot-upload-input:hover {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.screenshot-upload-input i {
    color: #94a3b8;
}

.screenshot-upload-input span {
    color: #94a3b8;
}

.screenshot-preview-container {
    margin-top: 10px;
    text-align: center;
    display: none;
}

.screenshot-preview-container.active {
    display: block;
}

.screenshot-preview-image {
    max-width: 100%;
    max-height: 150px;
    border-radius: 8px;
    border: 1px solid #475569;
    margin-bottom: 5px;
}

.screenshot-remove-link {
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.screenshot-remove-link:hover {
    text-decoration: underline;
}

.risk-summary-section {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(71, 85, 105, 0.3);
    margin-top: 15px;
}

.risk-summary-title {
    color: #60a5fa;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.risk-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.risk-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(30, 41, 59, 0.5);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #475569;
}

.risk-summary-label {
    color: #cbd5e1;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.risk-summary-value {
    font-size: 1.1rem;
    font-weight: 700;
}

#riskAmount {
    color: #ef4444;
}

#potentialProfit {
    color: #10b981;
}

.fee-info-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 18px;
    margin-top: 15px;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.fee-row span {
    color: #f59e0b;
}

.fee-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 600;
    padding-top: 10px;
    border-top: 1px solid rgba(245, 158, 11, 0.3);
    margin-top: 10px;
}

.fee-total span {
    color: #f59e0b;
}

#netProfitAmount {
    color: #10b981;
    font-weight: 600;
}

.fee-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 8px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background-color: #475569;
    color: #e2e8f0;
}

.btn-secondary:hover {
    background-color: #64748b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(71, 85, 105, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

/* جداول */
.trades-table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #475569;
    margin-top: 15px;
    max-height: 500px;
    overflow-y: auto;
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
    direction: ltr;
}

.trades-table th {
    background: linear-gradient(135deg, #1e40af, #3730a3);
    color: white;
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #3b82f6;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.trades-table td {
    padding: 12px;
    border-bottom: 1px solid #475569;
    font-size: 0.9rem;
    text-align: left;
}

.trades-table tr:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

.profit {
    color: #10b981;
    font-weight: 700;
    background-color: rgba(16, 185, 129, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.loss {
    color: #ef4444;
    font-weight: 700;
    background-color: rgba(239, 68, 68, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.neutral {
    color: #94a3b8;
    font-weight: 700;
    background-color: rgba(148, 163, 184, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.85rem;
}

.crypto-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(16, 185, 129, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #10b981;
}

.crypto-badge i {
    color: #10b981;
}

.actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    min-width: 120px;
}

.btn-icon {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 36px;
    min-width: 36px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-icon i {
    font-size: 1rem;
}

.btn-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.3);
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* آمار */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    border: 1px solid #475569;
    min-height: 95px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    opacity: 0.7;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    border-color: #60a5fa;
}

.stat-icon {
    font-size: 0.95rem;
    margin-bottom: 8px;
    opacity: 0.7;
    color: #94a3b8;
}

.stat-label {
    color: #cbd5e1;
    font-size: 0.8rem;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 5px 0;
    font-family: 'Segoe UI', 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.positive {
    color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.negative {
    color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.neutral-stat {
    color: #94a3b8;
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.1), rgba(148, 163, 184, 0.05));
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.fee-stat {
    color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* ===== باکس‌های رنگی برای آمار ===== */
.percentage-box {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.percentage-box.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.positive-box {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.negative-box {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ===== بخش آمار تفصیلی ===== */
.detailed-stats-table {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    border: 1px solid #334155;
}

.detailed-stats-title {
    color: #60a5fa;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: rgba(30, 41, 59, 0.3);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #2d3748;
}

.stats-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stats-label {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.stats-value {
    color: #f1f5f9;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* ===== بخش نمودار رشد حساب ===== */
.growth-chart-container,
.monthly-chart-container {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 20px;
    margin-top: 25px;
    border: 1px solid #334155;
}

.growth-chart-title,
.monthly-chart-title {
    color: #60a5fa;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#accountGrowthChart,
#monthlyGrowthChart {
    width: 100%;
    height: 300px;
    max-height: 300px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 10px;
    padding: 10px;
}

.chart-axis-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    color: #94a3b8;
    font-size: 0.9rem;
}

.axis-label.x-axis {
    margin-right: auto;
}

.axis-label.y-axis {
    margin-left: auto;
}

/* پشتیبان‌گیری */
.backup-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 15px;
}

.backup-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    padding: 22px;
    border-radius: 10px;
    border: 1px solid #475569;
    display: flex;
    flex-direction: column;
}

.backup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    color: #60a5fa;
    font-size: 1.05rem;
}

.backup-description {
    color: #cbd5e1;
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

.btn-backup {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    width: 100%;
}

.btn-backup:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.file-input {
    width: 100%;
    padding: 12px;
    background-color: #1e293b;
    border: 1px solid #475569;
    border-radius: 8px;
    color: #f1f5f9;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* داشبورد */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #475569;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-title {
    color: #60a5fa;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.month-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.month-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 36px;
}

.month-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.month-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.current-month {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.dashboard-stat-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    border: 1px solid #475569;
}

.dashboard-stat-label {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.dashboard-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
}

#monthlyTotalPnL {
    color: #94a3b8;
}

#monthlyProfitable {
    color: #10b981;
}

#monthlyLoss {
    color: #ef4444;
}

.monthly-trades-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #475569;
}

.monthly-trades-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
    direction: ltr;
}

.monthly-trades-table th {
    background: linear-gradient(135deg, #1e40af, #3730a3);
    color: white;
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #3b82f6;
    font-size: 0.9rem;
    position: sticky;
    top: 0;
}

.monthly-trades-table td {
    padding: 12px;
    border-bottom: 1px solid #475569;
    font-size: 0.9rem;
    text-align: left;
}

.monthly-trades-table tr:hover {
    background-color: rgba(59, 130, 246, 0.1);
    cursor: pointer;
}

.no-trades-month {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

/* ===== مودال‌های تصویر و جزئیات ===== */

/* مودال تصویر بزرگ - مخصوص نمایش تمام صفحه */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    display: none;
    cursor: pointer;
}

.image-modal-content {
    max-width: 95%;
    max-height: 95%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid #475569;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(239, 68, 68, 0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 20001;
    border: 2px solid white;
}

.image-modal-close:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* مودال جزئیات معامله */
.details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 15000;
    display: none;
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px;
}

.details-modal-content {
    max-width: 650px;
    width: 95%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid #475569;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: modalSlideUp 0.4s ease-out;
    margin: 30px auto;
    position: relative;
}

.details-modal-content h3 {
    color: #60a5fa;
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.3rem;
    padding-bottom: 15px;
    border-bottom: 1px solid #334155;
}

/* استایل اسکرین‌شات‌ها در مودال جزئیات */
.screenshot-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.screenshot-item {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #334155;
}

.screenshot-item h4 {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-align: center;
}

.screenshot-image {
    max-width: 100%;
    max-height: 150px;
    width: auto;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
    display: block;
    margin: 0 auto;
}

.screenshot-image:hover {
    transform: scale(1.02);
    border-color: #3b82f6;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

/* مودال بستن معامله */
.close-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 15000;
    display: none;
    backdrop-filter: blur(5px);
}

.close-modal-content {
    max-width: 450px;
    width: 90%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #475569;
    animation: modalSlideUp 0.4s ease-out;
}

.close-modal-content h3 {
    color: #60a5fa;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.2rem;
}

.close-preview {
    max-width: 100%;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    display: none;
    border: 2px solid #334155;
}

.close-preview.active {
    display: block;
    margin: 15px auto 0;
}

/* انیمیشن */
@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* بقیه استایل‌های مودال */
.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.detail-value {
    color: #f1f5f9;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 12px;
    background-color: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    border: 1px solid #334155;
}

.detail-value.price {
    font-family: 'Courier New', monospace;
    direction: ltr;
    text-align: right;
}

.detail-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #334155;
}

.detail-section-title {
    color: #60a5fa;
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.no-screenshot {
    color: #64748b;
    font-size: 0.85rem;
    text-align: center;
    padding: 30px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 8px;
    font-style: italic;
}

.details-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 25px;
    justify-content: center;
}

.screenshot-remove-wrapper {
    margin-top: 15px;
    text-align: center;
}

.screenshot-remove {
    color: #ef4444;
    cursor: pointer;
    display: none;
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.1);
}

.screenshot-remove.active {
    display: inline-block;
}

.screenshot-remove:hover {
    background: rgba(239, 68, 68, 0.2);
}

.screenshot-upload {
    width: 100%;
    padding: 12px;
    background-color: #1e293b;
    border: 2px dashed #475569;
    border-radius: 8px;
    color: #f1f5f9;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
    transition: all 0.3s;
}

.screenshot-upload:hover {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

/* پیشرفت پشتیبان */
.backup-progress {
    margin-top: 20px;
    padding: 15px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 8px;
    border: 1px solid #475569;
    display: none;
}

.backup-progress.active {
    display: block;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #334155;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 8px;
    text-align: center;
}

.backup-status {
    color: #10b981;
    font-weight: 600;
    margin-top: 10px;
}

.cancel-import-container {
    text-align: center;
    margin-top: 10px;
}

#cancelImportBtn {
    display: none;
    width: 200px;
    margin: 0 auto;
}

#noTradesMessage {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    display: none;
}

#noTradesMessage i {
    font-size: 2rem;
    margin-bottom: 15px;
    display: block;
}

/* واکنش‌گرایی برای بخش‌های جدید */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stats-item {
        padding: 10px 0;
        border-bottom: 1px solid #2d3748;
    }
    
    .stats-item:last-child {
        border-bottom: none;
    }
    
    #accountGrowthChart,
    #monthlyGrowthChart {
        height: 250px;
    }
}
