* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0d0e12;
    color: #d1d4dc;
    overflow: hidden;
    font-size: 11px;
}

/* Container class - only used by Charts page which handles its own flex */
.container {
    /* No flex here - pages use display: block by default */
}

/* ========================================
   Global Layout with Watchlist & Positions
   ======================================== */

.main-app-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    height: calc(100vh - 40px);
}

/* Middle section with watchlist and content */
.main-app-middle {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Global Watchlist Module (Left Sidebar) */
.global-watchlist {
    width: 160px;
    min-width: 160px;
    background: #131417;
    border-right: 1px solid #2b2d35;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.watchlist-header {
    padding: 8px 10px;
    background: #1a1b1f;
    border-bottom: 1px solid #2b2d35;
    font-size: 10px;
    font-weight: 700;
    color: #808080;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.watchlist-add-btn {
    background: none;
    border: none;
    color: #808080;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    line-height: 1;
}

.watchlist-add-btn:hover {
    color: #2962ff;
}

.watchlist-items {
    flex: 1;
    overflow-y: auto;
}

.watchlist-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid #1e2229;
    cursor: pointer;
    transition: background 0.15s;
}

.watchlist-item:hover {
    background: #1e2229;
}

.watchlist-item.active {
    background: rgba(41, 98, 255, 0.15);
    border-left: 2px solid #2962ff;
}

.watchlist-symbol {
    font-weight: 600;
    font-size: 11px;
    color: #d1d4dc;
    flex: 1;
}

.watchlist-price {
    font-size: 10px;
    font-weight: 600;
    text-align: right;
}

.watchlist-change {
    font-size: 9px;
    text-align: right;
    margin-left: 6px;
    min-width: 40px;
}

.watchlist-change.positive {
    color: #26a69a;
}

.watchlist-change.negative {
    color: #ef5350;
}

/* Watchlist remove button */
.watchlist-remove-btn {
    background: none;
    border: none;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    padding: 0 4px;
    margin-left: 4px;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    line-height: 1;
}

.watchlist-item:hover .watchlist-remove-btn {
    opacity: 1;
}

.watchlist-remove-btn:hover {
    color: #ef5350;
}

/* Watchlist loading state */
.watchlist-loading {
    padding: 20px 10px;
    text-align: center;
    color: #666;
    font-size: 11px;
}

/* Main Content Area (center, between watchlist and order panel) */
.main-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    min-height: 0;
}

.page-content-wrapper {
    overflow: auto;
}

/* When Charts page is active, the wrapper needs to flex to fill space */
.page-content-wrapper:has(#page-charts.active) {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* When Options page is active, the wrapper needs to flex to fill space */
.page-content-wrapper:has(#page-options.active) {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Bottom Panel Resize Handle */
.bottom-panel-resize-handle {
    height: 5px;
    background: #2b2d35;
    cursor: ns-resize;
    flex-shrink: 0;
    position: relative;
    transition: background 0.15s;
}

.bottom-panel-resize-handle:hover,
.bottom-panel-resize-handle.resizing {
    background: #2962ff;
}

.bottom-panel-resize-handle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 3px;
    background: #555;
    border-radius: 2px;
    transition: background 0.15s;
}

.bottom-panel-resize-handle:hover::after,
.bottom-panel-resize-handle.resizing::after {
    background: #fff;
}

/* Global Positions Module (Bottom Panel - spans full width) */
.global-positions {
    height: 130px;
    min-height: 50px;
    max-height: 70vh;
    background: #131417;
    border-top: 1px solid #2b2d35;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
    transition: height 0.05s ease-out;
}

.global-positions.resizing {
    transition: none;
    user-select: none;
}

.positions-header {
    padding: 6px 10px;
    background: #1a1b1f;
    border-bottom: 1px solid #2b2d35;
    font-size: 10px;
    font-weight: 700;
    color: #808080;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 15px;
}

.positions-tab {
    cursor: pointer;
    padding: 2px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
}

.positions-tab:hover {
    color: #d1d4dc;
}

.positions-tab.active {
    color: #2962ff;
    border-bottom-color: #2962ff;
}

.positions-content {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
}

.positions-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.positions-table th {
    background: #1a1b1f;
    color: #808080;
    font-weight: 600;
    text-align: left;
    padding: 4px 8px;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 1px solid #2b2d35;
}

.positions-table td {
    padding: 4px 8px;
    white-space: nowrap;
    border-bottom: 1px solid #1e2229;
    color: #d1d4dc;
}

.positions-table tbody tr:hover {
    background: #1e2229;
}

.positions-table .positive {
    color: #26a69a;
}

.positions-table .negative {
    color: #ef5350;
}

.positions-close-btn {
    background: #ef5350;
    color: white;
    border: none;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    cursor: pointer;
    font-weight: 600;
}

.positions-close-btn:hover {
    background: #ff1744;
}

/* Option Strategy Row Styles */
.option-strategy-row {
    background: rgba(41, 98, 255, 0.05);
}

.option-strategy-row:hover {
    background: rgba(41, 98, 255, 0.1) !important;
}

.option-strategy-row .expand-icon {
    color: #808080;
    font-size: 10px;
    transition: transform 0.2s;
}

.option-strategy-row.expanded .expand-icon {
    color: #2962ff;
}

.option-leg-row {
    background: rgba(0, 0, 0, 0.2);
}

.option-leg-row:hover {
    background: rgba(0, 0, 0, 0.3) !important;
}

.option-leg-row td:first-child {
    border-left: 2px solid #2962ff;
}

.leg-close-btn {
    background: #3a3c45 !important;
    font-size: 8px !important;
    padding: 2px 4px !important;
}

.leg-close-btn:hover {
    background: #ef5350 !important;
}

/* Position row styling */
.position-row {
    transition: background 0.15s;
}

/* Order row styling */
.order-row {
    transition: background 0.15s;
}

/* Trade row styling */
.trade-row {
    transition: background 0.15s;
}

/* Toolbar */
.toolbar {
    background: #1a1b1f;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #2b2d35;
    flex-wrap: nowrap;
    min-height: 28px;
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-label {
    color: #808080;
    font-size: 10px;
    font-weight: 500;
}

label {
    color: #808080;
    font-size: 10px;
}

select {
    background: #2b2d35;
    color: #d1d4dc;
    border: 1px solid #3a3c45;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    outline: none;
}

select:hover {
    border-color: #4a4c55;
}

select:focus {
    border-color: #2962ff;
}

.tool-btn {
    background: #2b2d35;
    color: #d1d4dc;
    border: 1px solid #3a3c45;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    min-width: 26px;
    height: 26px;
    font-size: 10px;
}

.tool-btn:hover {
    background: #3a3c45;
    border-color: #4a4c55;
}

.tool-btn.active {
    background: #2962ff;
    border-color: #2962ff;
    color: white;
}

.tool-btn.danger {
    color: #ef5350;
}

.tool-btn.danger:hover {
    background: #ef5350;
    color: white;
    border-color: #ef5350;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    font-size: 10px;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 12px;
    height: 12px;
}

.status {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
}

.status.connected {
    background: rgba(38, 166, 154, 0.2);
    color: #26a69a;
}

.status.disconnected {
    background: rgba(239, 83, 80, 0.2);
    color: #ef5350;
}

.price-display {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    background: #2b2d35;
    border-radius: 3px;
    min-width: 80px;
    text-align: center;
}

.price-display.up {
    color: #26a69a;
}

.price-display.down {
    color: #ef5350;
}

/* Charts Page Header */
.charts-page-header {
    background: #1a1b1f;
    padding: 4px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #2b2d35;
}

.add-chart-btn {
    background: #2962ff;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.add-chart-btn:hover {
    background: #1e4fd9;
}

.refresh-session-btn {
    background: #2b2d35;
    color: #d1d4dc;
    border: 1px solid #3a3c45;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.refresh-session-btn:hover {
    background: #3a3c45;
    border-color: #4a4c55;
}

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

.refresh-session-btn.refreshing {
    background: #1e4fd9;
    border-color: #2962ff;
}

.refresh-session-btn.refreshing svg {
    animation: spin 1s linear infinite;
}

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

.layout-controls {
    display: flex;
    gap: 4px;
    padding-left: 10px;
    border-left: 1px solid #2b2d35;
}

.layout-btn {
    background: #2b2d35;
    color: #d1d4dc;
    border: 1px solid #3a3c45;
    padding: 4px 6px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    width: 26px;
    height: 22px;
}

.layout-btn:hover {
    background: #3a3c45;
    border-color: #4a4c55;
}

.layout-btn.active {
    background: #2962ff;
    border-color: #2962ff;
    color: white;
}

/* Charts Main Wrapper */
.charts-main-wrapper {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #0d0e12;
    min-height: 0; /* Critical: allows flex child to shrink */
}

/* Charts Grid Container */
.charts-grid-container {
    flex: 1;
    display: grid;
    gap: 1px;
    background: #0d0e12;
    overflow: hidden;
    min-height: 0; /* Critical: allows flex child to shrink */
}

.charts-grid-container[data-layout="1x1"] {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.charts-grid-container[data-layout="2x1"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.charts-grid-container[data-layout="1x2"] {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
}

.charts-grid-container[data-layout="2x2"] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

/* Chart Module */
.chart-module {
    display: flex;
    flex-direction: column;
    background: #0d0e12;
    border: 1px solid #2b2d35;
    overflow: hidden;
    min-height: 0; /* Allow flex item to shrink below content size */
    max-height: 100%; /* Constrain to grid cell */
    height: 100%; /* Ensure it fills the grid cell */
}

/* Chart Toolbar */
.chart-toolbar {
    background: #1a1b1f;
    padding: 3px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #2b2d35;
    flex-wrap: nowrap;
    min-height: 26px;
}

.chart-price-display {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    background: #2b2d35;
    border-radius: 3px;
    min-width: 70px;
    text-align: center;
    color: #d1d4dc;
}

.chart-price-display.up {
    color: #26a69a;
}

.chart-price-display.down {
    color: #ef5350;
}

.chart-close-btn {
    background: transparent;
    border: 1px solid #3a3c45;
    color: #808080;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 6px;
}

.chart-close-btn:hover {
    background: #ef5350;
    border-color: #ef5350;
    color: white;
}

/* Chart Content Area (Canvas + DOM side by side) */
.chart-content-area {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0; /* Allow flex item to shrink */
}

/* DOM Container - HIDDEN by default, shown when .visible class is added */
.dom-container {
    display: none;
    flex-shrink: 0;
    min-width: 180px;
    width: 180px;
    height: 100%;
    background: #131417;
    border-left: 1px solid #2b2d35;
}

/* Show DOM container when visible class is added */
.dom-container.visible {
    display: flex;
    flex-direction: column;
}

/* DOM Toggle Checkbox in Chart Toolbar */
.dom-toggle-label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 2px 6px;
    border: 1px solid #3a3c45;
    background: #2b2d35;
    border-radius: 3px;
    font-size: 10px;
    color: #d1d4dc;
    user-select: none;
}

.dom-toggle-label:hover {
    background: #3a3c45;
    border-color: #4a4c55;
}

.dom-toggle-checkbox {
    width: 12px;
    height: 12px;
    margin: 0;
    cursor: pointer;
    accent-color: #4a9eff;
}

.dom-toggle-checkbox:checked + .dom-toggle-text {
    color: #4a9eff;
}

.dom-toggle-text {
    font-weight: 500;
}

/* Chart Canvas Wrapper */
.chart-canvas-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 0; /* Allow flex item to shrink */
}

.chart-canvas {
    display: block;
    cursor: crosshair;
    width: 100% !important;
    height: 100% !important;
}

/* Old Chart Container (deprecated) */
.chart-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #0d0e12;
    display: flex;
}

.chart-container {
    position: relative;
    flex: 1;
    height: 100%;
}

canvas {
    display: block;
    cursor: crosshair;
    width: 100% !important;
    height: 100% !important;
}

/* Crosshair */
.crosshair {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: none;
}

.crosshair.active {
    display: block;
}

.crosshair-horizontal,
.crosshair-vertical {
    position: absolute;
    background: rgba(100, 100, 100, 0.5);
}

.crosshair-horizontal {
    height: 1px;
    width: 100%;
}

.crosshair-vertical {
    width: 1px;
    height: 100%;
}

.crosshair-price-label,
.crosshair-time-label {
    position: absolute;
    background: #3a3c45;
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.crosshair-price-label {
    right: 10px;
}

.crosshair-time-label {
    bottom: 5px;
    z-index: 10;
    pointer-events: none;
}

/* Dropdown */
.dropdown-container {
    position: relative;
}

.dropdown-btn {
    background: #2b2d35;
    color: #d1d4dc;
    border: 1px solid #3a3c45;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.dropdown-btn.icon-btn {
    padding: 3px 6px;
    min-width: 24px;
    height: 22px;
    justify-content: center;
}

.dropdown-btn:hover {
    border-color: #4a4c55;
    background: #3a3c45;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 3px;
    background: #2b2d35;
    border: 1px solid #3a3c45;
    border-radius: 3px;
    padding: 4px 0;
    min-width: 140px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    cursor: pointer;
    user-select: none;
    color: #d1d4dc;
    font-size: 10px;
    transition: background 0.2s;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: #3a3c45;
}

.dropdown-item input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

.dropdown-item svg {
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: #3a3c45;
    margin: 6px 0;
}

.dropdown-item.danger-item {
    color: #ef5350;
}

.dropdown-item.danger-item:hover {
    background: rgba(239, 83, 80, 0.1);
    color: #ff1744;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1b1f;
}

::-webkit-scrollbar-thumb {
    background: #3a3c45;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4c55;
}

/* Order Book Panel */
.order-book-panel {
    width: 320px;
    background: rgba(26, 27, 31, 0.98);
    border-left: 1px solid #2b2d35;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

/* Order Panel */
.order-panel {
    width: 180px;
    background: rgba(26, 27, 31, 0.95);
    border-left: 1px solid #2b2d35;
    padding: 10px 8px;
    font-size: 10px;
    overflow-y: auto;
    flex-shrink: 0;
}

.order-panel-header {
    font-size: 9px;
    font-weight: 700;
    color: #808080;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.order-section {
    margin-bottom: 8px;
}

.order-section label {
    display: block;
    margin-bottom: 3px;
    color: #808080;
    font-size: 9px;
}

.order-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.order-btn {
    padding: 5px 6px;
    border: none;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.buy-btn {
    background: #00e676;
    color: #0d0e12;
}

.buy-btn:hover {
    background: #00ff88;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 230, 118, 0.3);
}

.sell-btn {
    background: #ff1744;
    color: white;
}

.sell-btn:hover {
    background: #ff2f59;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 23, 68, 0.3);
}

.reverse-btn {
    background: #ff9800;
    color: white;
    margin-right: 6px;
    flex: 1;
}

.reverse-btn:hover {
    background: #ffa726;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.close-btn {
    background: #2196f3;
    color: white;
    flex: 1;
}

.close-btn:hover {
    background: #42a5f5;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.order-section:has(.reverse-btn) {
    display: flex;
    gap: 6px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.stat-item {
    background: #1e2229;
    padding: 4px 6px;
    border-radius: 3px;
    border: 1px solid #2b2d35;
}

.stat-label {
    font-size: 8px;
    color: #808080;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.stat-value {
    font-size: 10px;
    font-weight: 600;
    color: #d1d4dc;
}

.stat-value.positive {
    color: #00e676;
}

.stat-value.negative {
    color: #ff1744;
}

/* Chart Context Menu */
.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    color: #d1d4dc;
    font-size: 13px;
    transition: background 0.2s;
    user-select: none;
}

.context-menu-item:hover {
    background: #2b2d35;
    color: white;
}

.context-menu-item:first-child {
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.context-menu-item:last-child {
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.context-menu-divider {
    height: 1px;
    background: #2b2d35;
    margin: 4px 0;
}

/* Pending Orders on Chart */
.pending-order-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(41, 98, 255, 0.8);
    pointer-events: none;
    z-index: 10;
}

.pending-order-line::after {
    content: attr(data-label);
    position: absolute;
    right: 10px;
    top: -10px;
    background: rgba(41, 98, 255, 0.9);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}
/* Options P&L Payoff Diagram */
.pnl-chart-container {
    position: relative;
    width: 100%;
    height: 180px;
    background: #1e222d;
    border: 1px solid #2b2d35;
    border-radius: 4px;
    overflow: hidden;
}

.pnl-chart-container canvas {
    width: 100%;
    height: 100%;
}

/* P&L Metrics Grid */
#pnlMetrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-top: 8px;
    font-size: 10px;
}

#pnlMetrics > div {
    background: #1a1b1f;
    padding: 6px 8px;
    border-radius: 3px;
    border: 1px solid #2b2d35;
}

#pnlMetrics > div > div:first-child {
    color: #808080;
    margin-bottom: 2px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#pnlMetrics > div > div:last-child {
    font-weight: 600;
    font-size: 11px;
}

/* Profit/Loss color classes */
.pnl-profit {
    color: #00e676 \!important;
}

.pnl-loss {
    color: #ff5252 \!important;
}

.pnl-neutral {
    color: #d1d4dc \!important;
}

/* ========================================
   Global Notification System
   ======================================== */

#notification-container {
    position: fixed;
    top: 60px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    pointer-events: none;
}

.notification {
    background: #1e1f25;
    border: 1px solid #2b2d35;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    min-width: 320px;
}

.notification-show {
    opacity: 1;
    transform: translateX(0);
}

.notification-hide {
    opacity: 0;
    transform: translateX(100%);
}

.notification-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.notification-icon svg {
    width: 100%;
    height: 100%;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    font-size: 13px;
    line-height: 1.5;
    color: #d1d4dc;
    word-wrap: break-word;
}

.notification-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #808080;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.notification-close:hover {
    color: #d1d4dc;
    background: rgba(255, 255, 255, 0.1);
}

/* Notification Types */
.notification-success {
    border-left: 3px solid #26a69a;
}

.notification-success .notification-icon {
    color: #26a69a;
}

.notification-error {
    border-left: 3px solid #ef5350;
}

.notification-error .notification-icon {
    color: #ef5350;
}

.notification-warning {
    border-left: 3px solid #ffa726;
}

.notification-warning .notification-icon {
    color: #ffa726;
}

.notification-info {
    border-left: 3px solid #2962ff;
}

.notification-info .notification-icon {
    color: #2962ff;
}
