/* =========================================
   TRADE PANEL CSS (Right Side Column)
   ========================================= */

.trade-panel {
    display: flex;
    flex-direction: column;
    padding: 10px;
        background: linear-gradient(180deg, #05070c 0%, #0b0f19 50%, #05070c 100%);
    color: #b7bdc6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    height: 100%;
}

/* --- Top Row: Symbol & Price --- */
.pair-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px; /* इसे 12px से घटाकर 6px किया गया */
    border-bottom: 1px solid #2b3139;
    margin-bottom: 8px;  /* इसे 15px से घटाकर 8px किया गया */
}

.pair-row .symbol {
    display: flex;
    align-items: center;
    gap: 8px;
}

#symbolDisplay {
    font-size: 14px;
    font-weight: 700;
    color: #eaecef;
}

.live-indicator {
    font-size: 10px;
    color: #0ecb81;
    background-color: rgba(14, 203, 129, 0.1);
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.pair-row .prices {
    display: flex;
    flex-direction: column;
    text-align: right;
    font-size: 12px;
}

.pair-row .prices .label {
    color: #848e9c;
    margin-right: 4px;
}

.pair-row .prices span {
    color: #eaecef;
    font-weight: 600;
}

/* --- Order Form Section --- */
.order-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 8px;
}

.order-grid, .sl-tp-row {
    display: grid;
    gap: 10px;
}

.order-grid {
    grid-template-columns: 1fr 1fr 1fr;
}

.sl-tp-row {
    grid-template-columns: 1fr 1fr;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field label {
    font-size: 11px;
    color: #848e9c;
    font-weight: 600;
    text-transform: uppercase;
}

.field input, .field select {
    width: 100%;
    background-color: #2b3139;
    border: 1px solid #363c4e;
    color: #eaecef;
    padding: 8px;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
}

.field input:focus, .field select:focus {
    border-color: #f0b90b; /* Binance style yellow glow */
}

.field input[readonly] {
    background-color: #1e232f;
    color: #848e9c;
    cursor: not-allowed;
}

/* --- Action Buttons (Buy/Sell) --- */
.right-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trade-btns {
    display: flex;
    gap: 10px;
}

.btn-sell, .btn-buy {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: filter 0.2s;
}

.btn-sell {
    background-color: #f6465d;
}

.btn-sell:hover {
    filter: brightness(1.1);
}

.btn-buy {
    background-color: #0ecb81;
}

.btn-buy:hover {
    filter: brightness(1.1);
}

/* ─── DIALOG OVERLAY ─── */
.dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}
.dialog-overlay.active { display: flex; }

.dialog-container {
    background: linear-gradient(145deg, #1a1f2e, #131722);
    border: 1px solid #2a3a4a;
    border-radius: 16px;
    padding: 0;
    max-width: 460px;
    width: 92%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.9);
    overflow: hidden;
    animation: slideUp 0.25s ease;
}
.dialog-header {
    padding: 18px 24px 10px 24px;
    border-bottom: 1px solid #1e2632;
    background: rgba(255,255,255,0.02);
}
.dialog-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #f0f2f5;
}
.dialog-header h3 i { margin-right: 8px; color: #f0b90b; }
.dialog-body {
    padding: 20px 24px 16px 24px;
    color: #d1d4dc;
    font-size: 14px;
    line-height: 1.6;
    max-height: 70vh;
    overflow-y: auto;
}
.dialog-footer {
    padding: 12px 24px 20px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #1e2632;
}
.dialog-footer .dialog-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}
.dialog-footer .dialog-btn:active { transform: scale(0.96); }
.dialog-footer .dialog-btn-confirm {
    background: #3b82f6;
    color: #fff;
}
.dialog-footer .dialog-btn-confirm:hover {
    background: #60a5fa;
    box-shadow: 0 4px 20px rgba(59,130,246,0.35);
}
.dialog-footer .dialog-btn-confirm.danger {
    background: #d32f2f;
}
.dialog-footer .dialog-btn-confirm.danger:hover {
    background: #f23645;
    box-shadow: 0 4px 20px rgba(242,54,69,0.35);
}
.dialog-footer .dialog-btn-confirm.success {
    background: #00a854;
}
.dialog-footer .dialog-btn-confirm.success:hover {
    background: #00c96a;
    box-shadow: 0 4px 20px rgba(0,168,84,0.35);
}
.dialog-footer .dialog-btn-cancel {
    background: transparent;
    color: #787b86;
}
.dialog-footer .dialog-btn-cancel:hover {
    background: #1a1f2a;
    color: #d1d4dc;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Account Summary --- */
.account-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 15px;
    padding-top: 15px;
    border-top: 1px dashed #363c4e;
}

.account-summary .item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #848e9c;
}

.account-summary .value {
    color: #eaecef;
    font-weight: 600;
}

/* --- Market Info Footer --- */
.market-info {
    margin-top: auto;
    padding-top: 15px;
    text-align: center;
    font-size: 11px;
    color: #848e9c;
}

.market-info i {
    margin-right: 4px;
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #2b3139;
    border-left: 4px solid #f0b90b;
    color: #eaecef;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    font-size: 13px;
    display: none; /* Shown via JS */
    animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Scrollbar styling for inputs if any dropdown gets large */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #161a25;
}
::-webkit-scrollbar-thumb {
    background: #2b3139;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #363c4e;
}