/* ==================== 1. CORE VARIABLES & RESET ==================== */
:root { 
    --mt5-bg: #1c1c1c; 
    --mt5-border: #000; 
    --mt5-toolbar: #3b3b3b; 
    --mt5-blue: #2962ff; 
    --up: #0ecb81; 
    --down: #f6465d;
    --panel: #2a2a2a;
    --text: #d1d4dc;
    --white: #ffffff;
    --gray-800: #1e222d;
    --gray-700: #2b2f3a;
    --gray-600: #333;
    --gray-500: #444;
    --gray-400: #666;
    --gray-300: #888;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    -webkit-tap-highlight-color: transparent; 
}

body, html { 
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background: #000; 
    color: var(--text); 
    font-family: 'Segoe UI', Arial, sans-serif; 
}

/* ==================== 2. FIXED TOOLBAR (Top) ==================== */
.mt5-toolbar { 
    height: 40px; 
    background: var(--mt5-toolbar); 
    display: flex; 
    align-items: center; 
    padding: 0 5px; 
    border-bottom: 1px solid #000; 
    overflow-x: auto; 
    white-space: nowrap;
    position: relative;
    z-index: 1000;
}

.tool-group { 
    display: flex; 
    align-items: center; 
    gap: 4px; 
}

.v-divider { 
    width: 1px; 
    height: 20px; 
    background: #555; 
    margin: 0 8px; 
    flex-shrink: 0; 
}

.mt5-toolbar button { 
    background: transparent; 
    border: 1px solid transparent; 
    color: var(--white); 
    padding: 6px 10px; 
    font-size: 11px; 
    cursor: pointer; 
    flex-shrink: 0;
    transition: background 0.2s;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8); 
}

.mt5-toolbar button:hover { 
    background: rgba(255,255,255,0.1); 
}

.mt5-toolbar button.active { 
    background: #555; 
    border: 1px solid #777; 
    border-radius: 2px; 
    color: #fff; 
}

#tool-reset { 
    color: #ff5e71 !important; 
    font-weight: bold; 
}

#tool-reset:hover { 
    background: rgba(246, 70, 93, 0.15) !important; 
}

/* ==================== 3. USER MENU ==================== */
.user-menu {
    position: absolute;
    top: 5px;
    right: 50px;
    z-index: 1001;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-trigger:hover {
    background: #333;
}

.user-avatar {
    width: 24px;
    height: 24px;
    background: #2962ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-avatar-large {
    width: 40px;
    height: 40px;
    background: #2962ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

#user-name {
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-arrow {
    color: #888;
    font-size: 10px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 280px;
    background: #1e222d;
    border: 1px solid #333;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 1002;
}

.user-dropdown.hidden {
    display: none;
}

.user-info {
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-details {
    flex: 1;
}

.user-details #dropdown-username {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 3px;
}

.user-details #dropdown-email {
    color: #888;
    font-size: 11px;
}

.dropdown-divider {
    height: 1px;
    background: #333;
    margin: 5px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #333;
}

.dropdown-item .icon {
    width: 20px;
    color: #888;
}

/* ==================== 4. AUTH OVERLAY ==================== */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #000 0%, #1a1a2e 100%);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.auth-container {
    background: #1e222d;
    border: 1px solid #333;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease;
}

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

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: #888;
    font-size: 16px;
    font-weight: bold;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.auth-tab.active {
    color: #fff;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2962ff;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 5px;
    text-align: center;
}

.auth-subtitle {
    color: #888;
    font-size: 12px;
    text-align: center;
    margin-bottom: 25px;
}

/* ==================== 5. FORM ELEMENTS ==================== */
.form-row {
    display: flex;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group.half {
    flex: 1;
}

.form-group label {
    display: block;
    color: #888;
    font-size: 11px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: #000;
    border: 1px solid #444;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2962ff;
    outline: none;
}

.form-group input.readonly {
    background: #222;
    color: #888;
    cursor: not-allowed;
}

.show-password {
    position: absolute;
    right: 12px;
    bottom: 12px;
    color: #888;
    cursor: pointer;
    user-select: none;
    z-index: 2;
}

.password-strength {
    margin-top: -10px;
    margin-bottom: 20px;
}

.strength-bar {
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #f6465d;
    transition: all 0.2s;
}

.strength-bar.weak::after { 
    width: 33%; 
    background: #f6465d; 
}

.strength-bar.medium::after { 
    width: 66%; 
    background: #f0b90b; 
}

.strength-bar.strong::after { 
    width: 100%; 
    background: #0ecb81; 
}

#strength-text,
#new-strength-text {
    font-size: 10px;
    color: #888;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox {
    display: flex;
    align-items: center;
    color: #888;
    font-size: 12px;
    cursor: pointer;
}

.checkbox input {
    width: auto;
    margin-right: 8px;
}

#forgot-password,
.back-to-login {
    color: #2962ff;
    font-size: 12px;
    text-decoration: none;
}

#forgot-password:hover,
.back-to-login:hover {
    text-decoration: underline;
}

/* ==================== 6. AUTH BUTTONS ==================== */
.auth-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.auth-btn.login-btn,
.auth-btn.register-btn {
    background: #2962ff;
    color: #fff;
}

.auth-btn.login-btn:hover,
.auth-btn.register-btn:hover {
    background: #1a4abf;
}

.auth-btn.google-btn {
    background: #fff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn.google-btn img {
    width: 20px;
    height: 20px;
}

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

.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #333;
}

.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-divider span {
    background: #1e222d;
    padding: 0 10px;
    color: #888;
    font-size: 12px;
    position: relative;
    z-index: 1;
}

.terms {
    font-size: 12px;
}

.terms a {
    color: #2962ff;
    text-decoration: none;
}

/* ==================== 7. LAYOUT WRAPPER ==================== */
#app-wrapper { 
    display: flex; 
    width: 100vw; 
    height: calc(100vh - 40px);
}

@media (orientation: portrait) {
    #app-wrapper { 
        flex-direction: column; 
    }
    #chart-container { 
        flex: 0 0 50%; 
        width: 100%; 
        position: relative; 
        border-bottom: 2px solid #000; 
    }
    #feature-panel { 
        flex: 0 0 50%; 
        width: 100%; 
        background: var(--mt5-bg); 
        overflow-y: auto; 
    }
}

@media (orientation: landscape) {
    #app-wrapper { 
        flex-direction: row; 
    }
    #chart-container { 
        flex: 0 0 50%; 
        height: 100%; 
        position: relative; 
        border-right: 2px solid #000; 
    }
    #feature-panel { 
        flex: 0 0 50%; 
        height: 100%; 
        background: var(--mt5-bg); 
        overflow-y: auto; 
    }
}

/* ==================== 8. CHART AREA ==================== */
#main-canvas { 
    display: block; 
    width: 100% !important; 
    height: 100% !important; 
    touch-action: none; 
    background: #000; 
}

.symbol-info { 
    position: absolute; 
    top: 10px; 
    left: 10px; 
    z-index: 10; 
    font-weight: bold; 
    color: var(--white) !important; 
    pointer-events: none; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.9); 
    font-size: 13px;
}

#btn-recent {
    position: absolute;
    bottom: 50px; 
    right: 80px;  
    width: 32px; 
    height: 32px;
    background: #2a2a2a; 
    color: #fff;
    border: 1px solid #555; 
    border-radius: 50%;
    z-index: 8000 !important; 
    cursor: pointer;
    display: flex; 
    align-items: center; 
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: all 0.2s;
}

#btn-recent:hover { 
    background: var(--mt5-blue); 
    border-color: var(--mt5-blue); 
    transform: scale(1.1); 
}

/* ==================== 9. FEATURE PANEL & TABS ==================== */
.mt5-tabs { 
    display: flex; 
    background: var(--mt5-toolbar); 
    position: sticky; 
    top: 0; 
    z-index: 50; 
    border-bottom: 1px solid #000; 
}

.tab-link { 
    padding: 12px 15px; 
    background: transparent; 
    border: none; 
    color: #aaa; 
    font-size: 11px; 
    font-weight: bold; 
    cursor: pointer; 
    text-transform: uppercase; 
}

.tab-link.active { 
    background: var(--mt5-bg); 
    color: #fff; 
    border-top: 2px solid var(--mt5-blue); 
}

#feature-panel { 
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
}

.mt5-content { 
    min-height: 101%; 
    padding-bottom: 80px; 
}

/* ==================== 10. TRADING TICKET ==================== */
.mt5-order-ticket { 
    padding: 12px; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.price-grid { 
    display: flex; 
    gap: 6px; 
    margin: 8px 0; 
}

.price-box { 
    flex: 1; 
    padding: 15px 5px; 
    text-align: center; 
    cursor: pointer; 
    user-select: none; 
    border-radius: 2px; 
    transition: transform 0.05s; 
    border: 1px solid rgba(0,0,0,0.3); 
}

.price-box.sell-side { 
    background: #aa2626; 
    border-bottom: 4px solid #7a1a1a; 
}

.price-box.buy-side { 
    background: var(--mt5-blue); 
    border-bottom: 4px solid #1a4abf; 
}

.price-box:active { 
    transform: scale(0.96); 
    border-bottom-width: 1px; 
    margin-top: 3px; 
}

.p-lbl { 
    font-size: 10px; 
    font-weight: bold; 
    display: block; 
    margin-bottom: 4px; 
    color: var(--white) !important; 
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6); 
}

.p-val { 
    font-size: 22px; 
    font-weight: bold; 
    font-family: monospace; 
    display: block; 
    color: var(--white) !important; 
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.lot-wrapper { 
    display: flex; 
    background: #000; 
    border: 1px solid #444; 
    border-radius: 4px; 
    overflow: hidden; 
}

.lot-wrapper button { 
    width: 45px; 
    background: #333; 
    border: none; 
    color: #fff; 
    font-size: 18px; 
    cursor: pointer; 
}

.lot-wrapper input { 
    flex: 1; 
    text-align: center; 
    background: transparent; 
    color: #fff; 
    border: none; 
    padding: 10px; 
    font-size: 16px; 
    font-family: monospace; 
}

.mt5-btn { 
    padding: 15px; 
    border: none; 
    font-weight: 900;
    color: var(--white) !important; 
    border-radius: 2px; 
    cursor: pointer; 
    font-size: 13px; 
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.mt5-btn.sell { 
    background: #aa2626; 
    border-bottom: 3px solid #7a1a1a; 
}

.mt5-btn.buy { 
    background: var(--mt5-blue); 
    border-bottom: 3px solid #1a4abf; 
}

/* ==================== 11. ACCOUNT SUMMARY ==================== */
.account-summary {
    background: #1e222d;
    border-radius: 4px;
    padding: 10px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

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

.balance-item span:first-child {
    color: #888;
    margin-bottom: 4px;
}

.balance-item span:last-child {
    color: #fff;
    font-weight: bold;
}

/* ==================== 12. QUICK ACTIONS ==================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    margin-top: 10px;
}

.action-btn {
    padding: 8px;
    background: #2b2f3a;
    border: 1px solid #444;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #3b3f4a;
}

.action-btn.close-all-btn {
    background: #f6465d;
    border-color: #aa2626;
}

.action-btn.close-profit-btn {
    background: #0ecb81;
    border-color: #0a9e63;
}

.action-btn.close-loss-btn {
    background: #f6465d;
    border-color: #aa2626;
}

.action-btn.cancel-all-btn {
    background: #888;
    border-color: #666;
}

/* ==================== 13. POSITIONS LIST ==================== */
.positions-list, .orders-list, .history-list {
    padding: 10px;
}

.position-item, .order-item, .history-item {
    background: #1e222d;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
}

.position-header, .order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.symbol {
    font-weight: bold;
    color: #fff;
}

.side {
    font-weight: bold;
}

.side.buy {
    color: #0ecb81;
}

.side.sell {
    color: #f6465d;
}

.quantity {
    color: #888;
}

.position-details, .order-details {
    font-size: 11px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    color: #888;
}

.detail-row span:last-child {
    color: #fff;
}

.detail-row.pnl {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #333;
}

.detail-row.pnl span:first-child {
    font-weight: bold;
}

.detail-row.pnl.positive span:first-child {
    color: #0ecb81;
}

.detail-row.pnl.negative span:first-child {
    color: #f6465d;
}

.close-position-btn, .cancel-order-btn {
    padding: 4px 12px;
    background: #f6465d;
    border: none;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 2px;
    cursor: pointer;
}

.cancel-order-btn {
    background: #888;
}

/* ==================== 14. HISTORY ITEMS ==================== */
.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.history-header .date {
    color: #888;
    font-size: 10px;
}

.history-details {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
}

.history-details .pnl {
    font-weight: bold;
}

.history-details .pnl.positive {
    color: #0ecb81;
}

.history-details .pnl.negative {
    color: #f6465d;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-size: 12px;
}

/* ==================== 15. MODALS ==================== */
.modal-overlay { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0,0,0,0.85); 
    backdrop-filter: blur(4px);
    z-index: 9999; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.modal-wrap { 
    background: #222; 
    border: 1px solid #444; 
    width: 90%; 
    max-width: 450px; 
    padding: 20px; 
    border-radius: 8px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
}

.modal-wrap.large {
    max-width: 600px;
}

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

.modal-header h3 { 
    font-size: 14px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: var(--white); 
}

#close-indicators, 
#close-search,
.close-modal { 
    background: none; 
    border: none; 
    color: #fff; 
    font-size: 24px; 
    cursor: pointer; 
}

/* ==================== 16. INDICATOR MANAGER ==================== */
.scroll-list { 
    max-height: 350px; 
    overflow-y: auto; 
    margin-bottom: 15px; 
    padding-right: 5px; 
}

.scroll-list::-webkit-scrollbar { 
    width: 4px; 
}

.scroll-list::-webkit-scrollbar-thumb { 
    background: #444; 
    border-radius: 10px; 
}

.indicator-card { 
    background: #1e222d; 
    border: 1px solid #333; 
    border-radius: 6px; 
    padding: 12px; 
    margin-bottom: 12px; 
}

.card-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 11px; 
    font-weight: bold; 
    margin-bottom: 10px; 
    color: var(--white); 
}

.card-body { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
}

.param-input label { 
    display: block; 
    font-size: 9px; 
    color: #888; 
    margin-bottom: 4px; 
    text-transform: uppercase; 
}

.param-input input { 
    width: 100%; 
    background: #000; 
    color: #fff; 
    border: 1px solid #444; 
    padding: 6px; 
    border-radius: 3px; 
    font-size: 11px; 
    outline: none; 
}

.param-input input:focus { 
    border-color: var(--mt5-blue); 
}

.remove-btn { 
    background: transparent; 
    border: none; 
    color: #f6465d; 
    cursor: pointer; 
    font-size: 10px; 
    text-transform: uppercase; 
    font-weight: bold; 
}

/* ==================== 17. SEARCH MODAL ==================== */
#sym-input { 
    width: 100%; 
    padding: 12px; 
    background: #000; 
    border: 1px solid var(--mt5-blue); 
    color: #fff; 
    font-size: 16px; 
    border-radius: 4px; 
    outline: none; 
    margin-bottom: 10px; 
}

#search-results { 
    max-height: 300px; 
    overflow-y: auto; 
}

.search-item { 
    padding: 12px; 
    border-bottom: 1px solid #333; 
    cursor: pointer; 
    font-size: 14px; 
    color: #ddd; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.search-item:hover { 
    background: #333; 
    color: #fff; 
}

.search-item small { 
    color: #888; 
    font-size: 11px; 
}

/* ==================== 18. CONFIRMATION MODAL ==================== */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    animation: fadeIn 0.2s;
}

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

.confirmation-modal .modal-content {
    background: #1e222d;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    max-width: 300px;
    width: 90%;
}

.confirmation-modal h3 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
}

.confirmation-modal p {
    color: #888;
    font-size: 12px;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.5;
}

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

.modal-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
}

.modal-buttons .confirm-btn {
    background: #2962ff;
    color: #fff;
}

.modal-buttons .cancel-btn {
    background: #444;
    color: #fff;
}

/* ==================== 19. WARNING BOX ==================== */
.warning-box {
    background: rgba(246, 70, 93, 0.1);
    border: 1px solid #f6465d;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    color: #f6465d;
    font-size: 12px;
}

/* ==================== 20. API INSTRUCTIONS ==================== */
.api-instructions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333;
}

.api-instructions h4 {
    color: #fff;
    font-size: 14px;
    margin-bottom: 10px;
}

.api-instructions ol {
    color: #888;
    font-size: 12px;
    padding-left: 20px;
}

.api-instructions li {
    margin-bottom: 5px;
}

.api-instructions a {
    color: #2962ff;
    text-decoration: none;
}

/* ==================== 21. FORM ACTIONS ==================== */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
}

.change-password-btn {
    background: #444 !important;
    border-bottom-color: #333 !important;
}

/* ==================== 22. 2FA SECTION ==================== */
.qrcode-container {
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    margin: 15px 0;
    display: flex;
    justify-content: center;
}

.manual-key {
    background: #000;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 16px;
    letter-spacing: 2px;
    text-align: center;
    margin: 10px 0;
    color: #0ecb81;
}

.success-message {
    background: rgba(14, 203, 129, 0.1);
    border: 1px solid #0ecb81;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    color: #0ecb81;
    font-size: 14px;
    text-align: center;
}

/* ==================== 23. SESSIONS LIST ==================== */
.sessions-list {
    max-height: 400px;
    overflow-y: auto;
}

.session-item {
    background: #1e222d;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
}

.session-device {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.session-device span:first-child {
    color: #fff;
    font-weight: bold;
    font-size: 12px;
}

.session-device .current-badge {
    background: #0ecb81;
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
}

.session-details {
    font-size: 10px;
    color: #888;
}

.session-details div {
    margin-bottom: 3px;
}

.session-actions {
    margin-top: 8px;
    text-align: right;
}

.revoke-session-btn {
    background: #f6465d;
    border: none;
    color: #fff;
    font-size: 9px;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
}

/* ==================== 24. LOADING SPINNER ==================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #444;
    border-top-color: #2962ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
    display: block;
}

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

/* ==================== 25. NOTIFICATION ==================== */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 21000;
}

.notification {
    padding: 10px 20px;
    background: #2962ff;
    color: white;
    border-radius: 4px;
    margin-bottom: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
    max-width: 300px;
    font-size: 12px;
}

.notification.success {
    background: #0ecb81;
}

.notification.error {
    background: #f6465d;
}

.notification.warning {
    background: #f0b90b;
    color: #000;
}

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

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

/* ==================== 26. UTILS ==================== */
.hidden { 
    display: none !important; 
}

.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mb-10 {
    margin-bottom: 10px;
}

.ml-5 {
    margin-left: 5px;
}

.mr-5 {
    margin-right: 5px;
}

/* ==================== 27. RESPONSIVE ADJUSTMENTS ==================== */
@media (max-width: 480px) {
    .auth-container {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .modal-wrap.large {
        width: 95%;
    }
    
    .user-dropdown {
        width: 260px;
    }
    
    .price-box {
        padding: 12px 3px;
    }
    
    .p-val {
        font-size: 18px;
    }
}

@media (max-width: 360px) {
    .mt5-toolbar button {
        padding: 4px 6px;
        font-size: 10px;
    }
    
    .user-menu {
        right: 45px;
    }
    
    .user-avatar {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    #user-name {
        max-width: 60px;
        font-size: 10px;
    }
}

/* ==================== 28. TOUCH OPTIMIZATIONS ==================== */
button, 
.price-box,
.lot-wrapper button,
.dropdown-item,
.search-item,
.action-btn,
.close-position-btn,
.cancel-order-btn,
.revoke-session-btn {
    min-height: 44px; /* iOS minimum touch target */
}

input, 
select {
    font-size: 16px !important; /* Prevent zoom on iOS */
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior-y: contain;
}

/* Smooth scrolling */
#feature-panel,
.scroll-list,
#search-results,
.sessions-list {
    -webkit-overflow-scrolling: touch;
}

/* ==================== 29. CHART TRADE VISUALIZATION ==================== */
.chart-trade-arrow {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.chart-sl-line,
.chart-tp-line {
    stroke-dasharray: 5,5;
    stroke-width: 1.5;
}

.chart-sl-line {
    stroke: #f6465d;
}

.chart-tp-line {
    stroke: #0ecb81;
}

.chart-drag-handle {
    fill: #ff0;
    filter: drop-shadow(0 0 5px rgba(255,255,0,0.5));
    cursor: grab;
}

.chart-drag-handle:active {
    cursor: grabbing;
}

.chart-pnl-indicator {
    background: rgba(0,0,0,0.7);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    pointer-events: none;
}

/* ==================== 30. CROSSHAIR ==================== */
.crosshair-line {
    stroke: rgba(255,255,255,0.3);
    stroke-dasharray: 4,4;
    pointer-events: none;
}

.crosshair-label {
    background: #2b2f3a;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 2px;
    pointer-events: none;
}