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

body {
    font-family: Arial, sans-serif;
    font-size: 14px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    overflow: hidden;
}

body.auth-locked .app-container {
    filter: blur(2px);
    pointer-events: none;
    user-select: none;
}

body.auth-locked #loginModal {
    pointer-events: auto;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    background-color: #252526;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3c3c3c;
    position: relative;
    z-index: 100002;
}

.header h1 {
    font-size: 18px;
    color: #ffffff;
}

.header-controls {
    display: flex;
    gap: 10px;
}

/* Toolbar */
.toolbar {
    background-color: #252526;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #3c3c3c;
    gap: 4px;
    user-select: none;
}

.toolbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    color: #cccccc;
    min-width: 55px;
}

.toolbar-btn:hover {
    background-color: #3e3e42;
    border-color: #555;
}

.toolbar-btn:active {
    background-color: #094771;
    border-color: #0e639c;
}

.toolbar-icon {
    width: 16px;
    height: 16px;
    margin-bottom: 2px;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toolbar-label {
    font-size: 9px;
    color: #cccccc;
    white-space: nowrap;
}

.toolbar-separator {
    width: 1px;
    height: 32px;
    background-color: #3c3c3c;
    margin: 0 4px;
}

/* Menu Bar */
.menu-bar {
    background-color: #2d2d30;
    display: flex;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid #3c3c3c;
    position: relative;
    user-select: none;
    z-index: 100002;
    pointer-events: auto;
}

.menu-item {
    position: relative;
    z-index: 100002;
}

.menu-label {
    display: block;
    padding: 8px 16px;
    color: #cccccc;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}

.menu-item:hover > .menu-label {
    background-color: #3e3e42;
}

.menu-item:hover > .menu-dropdown {
    display: block;
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #252526;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    z-index: 100003;
    border: 1px solid #3c3c3c;
}

.menu-dropdown a {
    display: block;
    padding: 8px 16px;
    color: #cccccc;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.2s;
}

.menu-dropdown a:hover {
    background-color: #094771;
    color: #ffffff;
}

.menu-separator {
    height: 1px;
    background-color: #3c3c3c;
    margin: 4px 0;
}

.menu-section-title {
    display: block;
    padding: 6px 16px 2px;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8c8c8c;
}

.menu-radio {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-radio .radio {
    width: 16px;
    text-align: center;
    font-size: 12px;
    color: #8c8c8c;
}

.menu-radio.checked {
    color: #ffffff;
}

.menu-radio.checked .radio {
    color: #4ec9b0;
}

.menu-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-checkbox .checkbox {
    width: 16px;
    text-align: center;
    font-size: 12px;
}

.menu-checkbox:not(.checked) .checkbox {
    visibility: hidden;
}

.menu-hint {
    margin-left: auto;
    padding: 8px 16px;
    color: #858585;
    font-size: 12px;
    font-style: italic;
}

/* Buttons */
.btn-primary, .btn-secondary, .add-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: #0e639c;
    color: white;
}

.btn-primary:hover {
    background-color: #1177bb;
}

.btn-secondary {
    background-color: #3c3c3c;
    color: #e0e0e0;
}

.btn-secondary:hover {
    background-color: #505050;
}

.add-btn {
    background-color: #238636;
    color: white;
    padding: 4px 12px;
    font-size: 12px;
}

.add-btn:hover {
    background-color: #2ea043;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.left-panel {
    flex: 0 0 65%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.right-panel {
    flex: 0 0 35%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Panels */
.panel {
    background-color: #252526;
    margin: 8px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    min-width: 200px;
    min-height: 150px;
}

.panel.dragging-panel {
    opacity: 0.8;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.panel-header {
    cursor: move;
    user-select: none;
}

.panel-header:active {
    cursor: grabbing;
}

.panel-resizer {
    position: absolute;
    background: transparent;
}

.panel-resizer.right {
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: ew-resize;
}

.panel-resizer.bottom {
    left: 0;
    right: 0;
    bottom: 0;
    height: 5px;
    cursor: ns-resize;
}

.panel-resizer.corner {
    right: 0;
    bottom: 0;
    width: 10px;
    height: 10px;
    cursor: nwse-resize;
}

.quotes-panel {
    flex: 0 0 70%;
}

.watchlist-panel {
    flex: 0 0 30%;
}

.chart-panel {
    flex: 0 0 50%;
}

.additional-chart-panel,
.extra-chart-panel {
    position: fixed;
    display: flex;
    flex-direction: column;
    background-color: #1f1f23;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    min-width: 360px;
    min-height: 260px;
    overflow: hidden;
}

.indices-panel {
    flex: 0 0 25%;
}

.forex-panel {
    flex: 0 0 25%;
}

.panel-header {
    padding: 10px 15px;
    background-color: #2d2d30;
    border-bottom: 1px solid #3c3c3c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.panel-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-controls-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.window-controls {
    display: flex;
    gap: 4px;
}

.win-btn {
    width: 24px;
    height: 20px;
    background-color: transparent;
    border: none;
    color: #cccccc;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    border-radius: 2px;
    padding: 0;
    line-height: 1;
}

.win-btn:hover {
    background-color: #3e3e42;
}

.win-btn.close-btn:hover {
    background-color: #e81123;
    color: #ffffff;
}

.win-btn.minimize-btn {
    font-size: 14px;
    padding-bottom: 4px;
}

.win-btn.maximize-btn {
    font-size: 13px;
}

/* Tables */
.table-container {
    overflow: auto;
    flex: 1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table thead {
    background-color: #2d2d30;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #cccccc;
    border-bottom: 1px solid #3c3c3c;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.data-table th:hover {
    background-color: #2a2a2a;
}

.data-table th.sortable::after {
    content: ' ⇅';
    opacity: 0.3;
    font-size: 10px;
}

.data-table th.sort-asc::after {
    content: ' ▲';
    opacity: 1;
    color: #0e639c;
}

.data-table th.sort-desc::after {
    content: ' ▼';
    opacity: 1;
    color: #0e639c;
}

.data-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #2d2d2d;
    white-space: nowrap;
}

.data-table.no-grid td {
    border-bottom: none;
}

.data-table.no-grid th {
    border-bottom: 1px solid #3c3c3c;
}

.data-table tbody tr {
    transition: background-color 0.15s;
}

.data-table tbody tr:hover {
    background-color: #2a2a2a;
    cursor: pointer;
}

.data-table tbody tr.drop-target-before {
    box-shadow: inset 0 2px 0 #0e639c;
}

.data-table tbody tr.drop-target-after {
    box-shadow: inset 0 -2px 0 #0e639c;
}

.data-table thead th.column-drop-before {
    box-shadow: inset 2px 0 0 #0e639c;
}

.data-table thead th.column-drop-after {
    box-shadow: inset -2px 0 0 #0e639c;
}

.data-table thead th.column-dragging {
    opacity: 0.7;
}

.editable-cell {
    cursor: cell;
    position: relative;
}

.editable-cell:hover::after {
    content: '✎';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.5;
}

.data-table.compact td,
.data-table.compact th {
    padding: 5px 8px;
}

/* Price Change Colors */
:root {
    --price-up-color: #4ec9b0;
    --price-down-color: #f48771;
}

.price-up {
    color: var(--price-up-color);
}

.price-down {
    color: var(--price-down-color);
}

.price-neutral {
    color: #cccccc;
}

.flash-green {
    animation: flashGreen 0.8s ease-in-out;
}

.flash-red {
    animation: flashRed 0.8s ease-in-out;
}

@keyframes flashGreen {
    0% { background-color: transparent; }
    25% { background-color: rgba(78, 201, 176, 0.5); }
    50% { background-color: rgba(78, 201, 176, 0.3); }
    75% { background-color: rgba(78, 201, 176, 0.2); }
    100% { background-color: transparent; }
}

@keyframes flashRed {
    0% { background-color: transparent; }
    25% { background-color: rgba(244, 135, 113, 0.5); }
    50% { background-color: rgba(244, 135, 113, 0.3); }
    75% { background-color: rgba(244, 135, 113, 0.2); }
    100% { background-color: transparent; }
}

.cell-flash-up {
    animation: cellFlashUp 1.6s ease-out;
    will-change: background-color, box-shadow;
}

.cell-flash-down {
    animation: cellFlashDown 1.6s ease-out;
    will-change: background-color, box-shadow;
}

@keyframes cellFlashUp {
    0% {
        background-color: transparent;
        box-shadow: none;
    }
    15% {
        background-color: rgba(78, 201, 176, 0.45);
        box-shadow: inset 0 0 12px rgba(78, 201, 176, 0.35);
    }
    50% {
        background-color: rgba(78, 201, 176, 0.2);
        box-shadow: inset 0 0 8px rgba(78, 201, 176, 0.2);
    }
    100% {
        background-color: transparent;
        box-shadow: none;
    }
}

@keyframes cellFlashDown {
    0% {
        background-color: transparent;
        box-shadow: none;
    }
    15% {
        background-color: rgba(244, 135, 113, 0.45);
        box-shadow: inset 0 0 12px rgba(244, 135, 113, 0.35);
    }
    50% {
        background-color: rgba(244, 135, 113, 0.2);
        box-shadow: inset 0 0 8px rgba(244, 135, 113, 0.2);
    }
    100% {
        background-color: transparent;
        box-shadow: none;
    }
}
.data-table td {
    /* Removed transition to allow JS full control */
}


/* Chart */
.chart-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.zoom-btn {
    width: 28px;
    height: 28px;
    background-color: #3c3c3c;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.zoom-btn:hover {
    background-color: #505050;
    border-color: #0e639c;
}

.zoom-btn:active {
    background-color: #0e639c;
}

.select-control {
    padding: 4px 8px;
    background-color: #3c3c3c;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
}

.select-control:focus {
    outline: none;
    border-color: #0e639c;
}

.chart-container {
    padding: 15px;
    flex: 1;
    position: relative;
    min-height: 300px;
}

.extra-chart-panel .chart-container,
.additional-chart-panel .chart-container {
    flex: 1;
    min-height: 220px;
    height: calc(100% - 52px);
}

.extra-chart-panel .chart-container > div,
.additional-chart-panel .chart-container > div {
    width: 100%;
    height: 100%;
}

.extra-chart-controls {
    display: flex;
    gap: 6px;
    align-items: center;
}

.extra-chart-controls .select-control {
    min-width: 90px;
}

#stockChart {
    width: 100%;
    height: 100%;
}

/* Status Bar */
.status-bar {
    background-color: #007acc;
    color: white;
    padding: 4px 15px;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

#statusText {
    font-weight: 600;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #252526;
    border-radius: 6px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 15px 20px;
    background-color: #2d2d30;
    border-bottom: 1px solid #3c3c3c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px 6px 0 0;
}

.modal-header h3 {
    font-size: 16px;
    color: #ffffff;
}

.close {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #cccccc;
    font-size: 13px;
}

.form-group input {
    width: 100%;
    padding: 8px 10px;
    background-color: #3c3c3c;
    border: 1px solid #555;
    border-radius: 3px;
    color: #e0e0e0;
    font-size: 13px;
}

.form-group input:focus {
    outline: none;
    border-color: #0e639c;
}

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

/* Delete Button */
.delete-btn {
    background-color: #c73838;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

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

/* Drag and Drop */
.draggable {
    cursor: grab;
}

.draggable:active {
    cursor: grabbing;
}

.dragging {
    opacity: 0.5;
    background-color: #094771 !important;
}

.drop-zone {
    position: relative;
}

.drop-zone.drag-over::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(14, 99, 156, 0.2);
    border: 2px dashed #0e639c;
    pointer-events: none;
    z-index: 10;
}

.drag-ghost {
    position: fixed;
    pointer-events: none;
    background-color: #252526;
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    font-size: 13px;
    color: #ffffff;
    border: 1px solid #0e639c;
}


/* Indicators */
.indicators-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.indicator-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    background-color: #2d2d30;
    border-radius: 4px;
}

.indicator-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.indicator-checkbox {
    cursor: pointer;
}

.color-picker {
    width: 50px;
    height: 32px;
    border: 2px solid #555;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.color-picker:hover {
    border-color: #0e639c;
    box-shadow: 0 0 0 2px rgba(14, 99, 156, 0.2);
}

.color-picker:focus {
    outline: none;
    border-color: #0e639c;
    box-shadow: 0 0 0 3px rgba(14, 99, 156, 0.3);
}

/* Context Menu */
.context-menu {
    display: none;
    position: fixed;
    background-color: #252526;
    border: 1px solid #3c3c3c;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 100004;
    min-width: 180px;
    padding: 4px 0;
}

.context-menu.active {
    display: block;
}

.context-menu-item {
    padding: 8px 16px;
    color: #cccccc;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item:hover {
    background-color: #094771;
    color: #ffffff;
}

.context-menu-separator {
    height: 1px;
    background-color: #3c3c3c;
    margin: 4px 0;
}

.context-menu-item.disabled {
    color: #666666;
    cursor: not-allowed;
}

.context-menu-item.disabled:hover {
    background-color: transparent;
    color: #666666;
}

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

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

::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 5px;
}

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

/* News Panel */
.news-panel {
    flex: 0 0 40%;
}

.news-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

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

.news-item {
    background-color: #2d2d30;
    padding: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-left: 3px solid #0e639c;
}

.news-item:hover {
    background-color: #3e3e42;
}

.news-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.news-item-time {
    font-size: 11px;
    color: #858585;
}

.news-item-symbol {
    font-size: 11px;
    color: #0e639c;
    font-weight: 600;
}

.news-item-title {
    font-size: 13px;
    color: #e0e0e0;
    font-weight: 600;
    margin-bottom: 4px;
}

.news-item-summary {
    font-size: 12px;
    color: #cccccc;
    line-height: 1.4;
}

.search-input {
    padding: 7px 12px;
    background-color: #3c3c3c;
    border: 1px solid #555;
    border-radius: 3px;
    color: #e0e0e0;
    font-size: 14px;
    min-width: 240px;
}

.search-input:focus {
    outline: none;
    border-color: #0e639c;
}

.news-article-meta {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3c3c3c;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #858585;
}

.news-article-content {
    color: #e0e0e0;
    line-height: 1.6;
    font-size: 14px;
}

/* Order Book Panel */
.orderbook-panel {
    flex: 0 0 35%;
}

.orderbook-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.orderbook-header {
    text-align: center;
    padding: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #2d2d30;
    border-radius: 4px;
    margin-bottom: 10px;
}

.orderbook-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.orderbook-side {
    flex: 1;
    overflow-y: auto;
}

.orderbook-side h4 {
    color: #cccccc;
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.orderbook-side.asks h4 {
    color: #f48771;
}

.orderbook-side.bids h4 {
    color: #4ec9b0;
}

.orderbook-table {
    width: 100%;
    font-size: 11px;
}

.orderbook-table thead th {
    padding: 6px;
    text-align: right;
    color: #858585;
    font-weight: 600;
    border-bottom: 1px solid #3c3c3c;
}

.orderbook-table tbody td {
    padding: 4px 6px;
    text-align: right;
}

.orderbook-side.asks tbody td:first-child {
    color: #f48771;
}

.orderbook-side.bids tbody td:first-child {
    color: #4ec9b0;
}

.orderbook-spread {
    text-align: center;
    padding: 8px;
    background-color: #2d2d30;
    border-radius: 4px;
    font-size: 13px;
    color: #cccccc;
}

/* Info Panel */
.info-panel {
    flex: 0 0 30%;
}

.info-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.info-content h3 {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 15px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-item {
    background-color: #2d2d30;
    padding: 10px;
    border-radius: 4px;
}

.info-item label {
    display: block;
    font-size: 11px;
    color: #858585;
    margin-bottom: 4px;
}

.info-item span {
    display: block;
    font-size: 14px;
    color: #e0e0e0;
    font-weight: 600;
}

/* Alerts List */
.alerts-list {
    max-height: 400px;
    overflow-y: auto;
}

.alert-item {
    background-color: #2d2d30;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-info {
    flex: 1;
}

.alert-symbol {
    font-weight: 600;
    color: #0e639c;
    margin-bottom: 4px;
}

.alert-condition {
    font-size: 12px;
    color: #cccccc;
}

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

/* Lists Manager */
.lists-sidebar {
    background-color: #2d2d30;
    border-radius: 4px;
    padding: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.list-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 3px;
    margin-bottom: 4px;
    color: #cccccc;
    transition: background-color 0.2s;
}

.list-item:hover {
    background-color: #3e3e42;
}

.list-item.active {
    background-color: #094771;
    color: #ffffff;
}

.list-symbols {
    background-color: #2d2d30;
    border-radius: 4px;
    padding: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.symbol-item {
    padding: 8px 12px;
    background-color: #3c3c3c;
    border-radius: 3px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.symbol-item-name {
    color: #e0e0e0;
    font-weight: 600;
}

/* Exchange Select Dropdown */
.exchange-select {
    padding: 4px 6px;
    background-color: #3c3c3c;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    min-width: 90px;
}

.exchange-select:focus {
    outline: none;
    border-color: #0e639c;
}

.exchange-select:hover {
    background-color: #505050;
}

/* Lists Container for Watchlist/Layout Modals */
.lists-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.list-item {
    background-color: #2d2d30;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    border-left: 3px solid #0e639c;
}

.list-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #ffffff;
    font-size: 14px;
}

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

.badge {
    background-color: #238636;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* Auth UI Updates */
.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Detach Button */
.win-btn.detach-btn {
    font-size: 14px;
}

.win-btn.detach-btn:hover {
    background-color: #238636;
    color: #ffffff;
}

/* Responsive */
@media (max-width: 1200px) {
    .left-panel {
        flex: 0 0 60%;
    }

    .right-panel {
        flex: 0 0 40%;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .left-panel,
    .right-panel {
        flex: 1 1 auto;
        border-left: none;
        border-top: 1px solid #3c3c3c;
    }
}

/* Symbol Search Results */
.search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-result-item {
    background-color: #2d2d30;
    padding: 12px 15px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    border-left: 3px solid #0e639c;
}

.search-result-item:hover {
    background-color: #3e3e42;
}

.search-result-info {
    flex: 1;
}

.search-result-name {
    font-size: 14px;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 4px;
}

.search-result-ticker {
    font-size: 12px;
    color: #0e639c;
    font-weight: 600;
}

.search-result-rank {
    font-size: 11px;
    color: #858585;
    margin-left: 10px;
}

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

.add-to-list-btn {
    background-color: #238636;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    transition: background-color 0.2s;
}

.add-to-list-btn:hover {
    background-color: #2ea043;
}

.search-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #858585;
    font-size: 13px;
}

.search-loading {
    text-align: center;
    padding: 20px;
    color: #0e639c;
    font-size: 13px;
}

/* Settings Modal Styles */
.settings-modal-content {
    width: 650px;
    max-width: 95%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.settings-modal-content .modal-body {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    border-bottom: 1px solid #3c3c3c;
    background-color: #2d2d30;
    padding: 0 20px;
}

.settings-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    color: #cccccc;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
    top: 1px;
}

.settings-tab:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.settings-tab.active {
    color: #ffffff;
    border-bottom-color: #0e639c;
}

/* Settings Tab Content */
.settings-tab-content {
    display: none;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(85vh - 150px);
}

.settings-tab-content.active {
    display: block;
}

.settings-section {
    background-color: #1e1e1e;
    border: 1px solid #3c3c3c;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-section:last-of-type {
    margin-bottom: 20px;
}

.settings-section-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #3c3c3c;
}

.settings-section .form-group:last-child {
    margin-bottom: 0;
}

/* Checkbox Labels */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #cccccc;
    font-size: 13px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.checkbox-label span {
    user-select: none;
}

/* Account Info Styles */
.account-info {
    background-color: #252526;
    border-radius: 4px;
    padding: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #3c3c3c;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #858585;
    font-size: 13px;
    font-weight: 600;
}

.info-value {
    color: #e0e0e0;
    font-size: 13px;
}

/* Form Control */
.form-control {
    width: 100%;
    padding: 10px 12px;
    background-color: #3c3c3c;
    border: 1px solid #555;
    border-radius: 4px;
    color: #e0e0e0;
    font-size: 13px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #0e639c;
    box-shadow: 0 0 0 2px rgba(14, 99, 156, 0.2);
}

.form-control::placeholder {
    color: #858585;
}

/* Error and Success Messages */
.error-message {
    background-color: rgba(244, 135, 113, 0.1);
    border-left: 3px solid #f48771;
    color: #f48771;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 10px;
}

.success-message {
    background-color: rgba(78, 201, 176, 0.1);
    border-left: 3px solid #4ec9b0;
    color: #4ec9b0;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 10px;
}

/* Color picker wrapper for better visibility */
.settings-section .form-group > .color-picker {
    width: 100%;
    height: 45px;
    border: 2px solid #555;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-section .form-group > .color-picker:hover {
    border-color: #0e639c;
    box-shadow: 0 0 8px rgba(14, 99, 156, 0.3);
    transform: scale(1.02);
}

.settings-section .form-group > .color-picker:focus {
    outline: none;
    border-color: #0e639c;
    box-shadow: 0 0 12px rgba(14, 99, 156, 0.5);
}

/* Blinking settings color pickers - smaller inline style */
.settings-section label .color-picker {
    min-width: 80px;
    height: 36px;
    border: 2px solid #555;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-section label .color-picker:hover {
    border-color: #0e639c;
    box-shadow: 0 0 6px rgba(14, 99, 156, 0.3);
}

.settings-section label .color-picker:focus {
    outline: none;
    border-color: #0e639c;
    box-shadow: 0 0 8px rgba(14, 99, 156, 0.4);
}

/* Password Input Wrapper with Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 45px;
}

.password-toggle-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #858585;
    transition: color 0.2s;
    border-radius: 3px;
}

.password-toggle-btn:hover {
    color: #0e639c;
    background-color: rgba(14, 99, 156, 0.1);
}

.password-toggle-btn:active {
    color: #ffffff;
    background-color: #0e639c;
}

.password-toggle-btn .eye-icon {
    pointer-events: none;
}

.password-toggle-btn.showing {
    color: #0e639c;
}
