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

body {
    background: #131722;
    color: #d1d4dc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

#toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    background: #1e222d;
    border-bottom: 1px solid #2a2e39;
    flex-shrink: 0;
    height: 42px;
}

#user-menu-wrap {
    margin-left: auto;
    position: relative;
}

#user-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3a7bd5;
    border: none;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0;
    line-height: 1;
    transition: background 0.15s;
}
#user-btn:hover { background: #2e69c4; }

#user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #1e222d;
    border: 1px solid #2a2e39;
    border-radius: 6px;
    padding: 6px 0;
    min-width: 160px;
    box-shadow: 0 4px 16px #0006;
    z-index: 1000;
}

#user-dropdown-name {
    padding: 6px 14px 8px;
    font-size: 12px;
    color: #787b86;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-sep {
    height: 1px;
    background: #2a2e39;
    margin: 0 0 4px;
}

#user-logout-btn {
    display: block;
    width: 100%;
    padding: 7px 14px;
    background: none;
    border: none;
    color: #d1d4dc;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.1s;
}
#user-logout-btn:hover { background: #2a2e39; }

#symbol-select {
    background: #2a2e39;
    color: #d1d4dc;
    border: 1px solid #363a45;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    outline: none;
}

#symbol-select:hover {
    border-color: #4c525e;
}

#tf-buttons {
    display: flex;
    gap: 2px;
}

#tf-buttons button {
    background: transparent;
    color: #b2b5be;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

#tf-buttons button:hover {
    color: #d1d4dc;
    background: #2a2e39;
}

#tf-buttons button.active {
    color: #2196f3;
    background: #2a2e39;
}

#ohlcv-legend {
    display: flex;
    gap: 8px;
    font-size: 12px;
    margin-left: 16px;
}

.lbl-o, .lbl-h, .lbl-l, .lbl-c {
    color: #b2b5be;
}

.lbl-o span, .lbl-h span, .lbl-l span, .lbl-c span {
    color: #d1d4dc;
}

.lbl-v {
    color: #b2b5be;
}

.lbl-v span {
    color: #b2b5be;
}

#status {
    color: #b2b5be;
    font-size: 12px;
}

#status.connected {
    color: #26a69a;
}

#status.error {
    color: #ef5350;
}

#chart-area {
    position: relative;
    display: flex;
    flex: 1;
    min-height: 0;
}

#chart-canvas {
    flex: 1;
    min-width: 0;
    min-height: 0;
    cursor: crosshair;
}

/* --- Drawing Toolbar (left sidebar) --- */

#drawing-toolbar {
    width: 46px;
    background: #1e222d;
    border-right: 1px solid #2a2e39;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    gap: 2px;
    flex-shrink: 0;
}

.dtool-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    outline: none;
}

.dtool-btn:hover {
    color: #d1d4dc;
    background: #2a2e39;
}

.dtool-btn.active {
    color: #2196f3;
    background: #2a2e39;
}

.dtool-btn svg {
    width: 26px;
    height: 26px;
}

.dtool-sep {
    width: 28px;
    height: 1px;
    background: #2a2e39;
    margin: 4px 0;
}

/* Group tool (wrapper for button + dropdown) */
.dtool-group {
    position: relative;
}

.dtool-group-arrow {
    position: absolute;
    right: 1px;
    bottom: 0px;
    font-size: 9px;
    color: #b2b5be;
    line-height: 1;
    pointer-events: none;
}

.dtool-btn.active .dtool-group-arrow {
    color: #2196f3;
}

.dtool-dropdown {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 4px;
    background: #1e222d;
    border: 1px solid #2a2e39;
    border-radius: 6px;
    padding: 4px 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    min-width: 160px;
}

.dtool-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
    color: #d1d4dc;
    font-size: 12px;
    white-space: nowrap;
}

.dtool-dropdown-item:hover {
    background: #2a2e39;
}

.dtool-dropdown-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dtool-dropdown-icon svg {
    width: 16px;
    height: 16px;
}

/* --- Floating Favorites Toolbar --- */

.float-toolbar {
    position: fixed;
    z-index: 2000;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    background: #1e222d;
    border: 1px solid #2a2e39;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.float-toolbar-drag {
    cursor: grab;
    color: #b2b5be;
    font-size: 14px;
    padding: 0 4px;
    user-select: none;
}
.float-toolbar-drag:active { cursor: grabbing; }

.float-toolbar-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.float-toolbar-btn:hover { color: #d1d4dc; background: #2a2e39; }
.float-toolbar-btn.active { color: #2196f3; background: #2a2e39; }
.float-toolbar-btn svg { width: 24px; height: 24px; }

/* --- Drawing Properties Panel --- */

.dprops-panel {
    position: fixed;
    z-index: 2500;
    background: #1e222d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px;
    width: 270px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

/* Shared panel header template — used by drawing props + indicator settings */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-title {
    color: #b2b5be;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.panel-close {
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: #b2b5be;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.panel-close:hover {
    background: rgba(234, 57, 67, 0.15);
    color: #ea3943;
}

/* Drawing properties — context-specific overrides */
.dprops-header { margin-bottom: 12px; }

.dprops-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
}

.dprops-label {
    color: #d1d4dc;
    font-size: 12px;
    min-width: 55px;
}

.dprops-select {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 12px;
    padding: 5px 8px;
    cursor: pointer;
    outline: none;
}

.dprops-select:focus {
    border-color: #2196f3;
}

.dprops-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    gap: 8px;
}
.dprops-footer-actions {
    display: flex;
    gap: 6px;
}
.dprops-btn-cancel {
    padding: 5px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    color: #b2b5be;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.dprops-btn-cancel:hover {
    color: #d1d4dc;
    border-color: rgba(255, 255, 255, 0.2);
}
.dprops-btn-ok {
    padding: 5px 20px;
    background: #2196f3;
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.dprops-btn-ok:hover {
    background: #1e88e5;
}

.dprops-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 0;
    cursor: pointer;
    color: #d1d4dc;
    font-size: 12px;
}

.dprops-check input[type="checkbox"] {
    accent-color: #26a69a;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.dprops-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dprops-tab {
    flex: 1;
    padding: 6px 0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #b2b5be;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

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

.dprops-tab.active {
    color: #d1d4dc;
    border-bottom-color: #2196f3;
}

.dprops-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 12px;
    padding: 6px 8px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.dprops-input:focus { border-color: #2196f3; }
.dprops-input-sm { flex: 0 0 80px; width: 80px; text-align: right; }

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

.dprops-grid-cell {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.15s;
}

.dprops-grid-cell:hover {
    background: rgba(255, 255, 255, 0.12);
}

.dprops-grid-cell.active {
    background: #2196f3;
    border-color: #2196f3;
}

.dprops-btn-group {
    display: flex;
    gap: 4px;
}

.dprops-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    color: #b2b5be;
    cursor: pointer;
    transition: all 0.15s;
}

.dprops-icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #d1d4dc;
}

.dprops-icon-btn.active {
    background: rgba(33, 150, 243, 0.15);
    border-color: #2196f3;
    color: #2196f3;
}

/* --- Fib Level Editor --- */

.dprops-section-title {
    color: #e6b800;
    font-size: 11px;
    padding: 0 0 5px;
    margin: 12px 0 0;
    background: none;
    border-bottom: 1px solid rgba(230, 184, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.dprops-section-title:first-child {
    margin-top: 0;
}

.dprops-section-title:hover {
    color: #f0c840;
}

.dprops-section-title::after {
    content: '';
    border: solid #e6b800;
    border-width: 0 1.5px 1.5px 0;
    display: inline-block;
    padding: 2.5px;
    transform: rotate(45deg);
    margin-top: -3px;
    margin-left: auto;
    transition: transform 0.15s;
    opacity: 0.5;
}

.dprops-section-title.collapsed::after {
    transform: rotate(-45deg);
    margin-top: 1px;
}

.dprops-section-body {
    overflow: hidden;
    padding-top: 2px;
}

.dprops-section-body.collapsed {
    display: none;
}

.dprops-levels {
    padding: 2px 12px 8px;
    max-height: 300px;
    overflow-y: auto;
}

.dprops-level-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
}

.dprops-level-row input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.dprops-level-input {
    width: 60px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    color: #d1d4dc;
    font-size: 12px;
    padding: 2px 6px;
    text-align: right;
}

.dprops-level-input:focus {
    border-color: #2196f3;
    outline: none;
}

.dprops-level-swatch {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #141820;
    cursor: pointer;
    flex-shrink: 0;
}

/* --- Inline Text Editor --- */

.chart-text-editor {
    position: fixed;
    transform: translate(-50%, -50%);
    background: rgba(30, 34, 45, 0.95);
    border: 1px solid #2196f3;
    border-radius: 4px;
    outline: none;
    text-align: center;
    min-width: 80px;
    padding: 4px 8px;
    z-index: 1000;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Context Menu --- */

.ctx-menu {
    position: fixed;
    z-index: 2000;
    background: #1e222d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 4px 0;
    min-width: 180px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

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

.ctx-menu-icon {
    display: flex;
    align-items: center;
    opacity: 0.7;
}

.ctx-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* --- Settings Dialog --- */

.settings-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.settings-dialog {
    background: #1e222d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #d1d4dc;
    flex-shrink: 0;
}

.settings-close {
    background: none;
    border: none;
    color: #4c525e;
    font-size: 22px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.15s;
}

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

/* Main area: sidebar + content */
.settings-main {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Left sidebar tabs */
.stabs-sidebar {
    width: 150px;
    background: rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    flex-shrink: 0;
    overflow-y: auto;
}

.stabs-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    color: #b2b5be;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.stabs-item:hover {
    color: #d1d4dc;
    background: rgba(255, 255, 255, 0.03);
}

.stabs-item.active {
    color: #d1d4dc;
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #2196f3;
}

.stabs-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.stabs-item.active svg {
    opacity: 1;
}

/* Right content */
.stabs-content {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
}

.stabs-panel {
    min-height: 200px;
}

/* Sections */
.settings-section {
    color: #e6b800;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0 0 5px;
    margin: 0 0 8px;
    border-bottom: 1px solid rgba(230, 184, 0, 0.2);
}

.settings-section:not(:first-child) {
    margin-top: 20px;
}

/* Color table */
.settings-color-table {
    margin-top: 12px;
}

.sct-row {
    display: grid;
    grid-template-columns: 70px 36px 36px;
    align-items: center;
    gap: 12px;
    padding: 5px 0;
}

.sct-header span {
    color: #636b78;
    font-size: 11px;
    text-align: center;
    font-weight: 500;
}

.sct-header span:first-child {
    text-align: left;
}

/* Color swatch (square) */
.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    border: 3px solid #141820;
    transition: all 0.15s;
    outline: none;
}

.color-swatch:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.08);
}

.color-swatch:focus-visible {
    border-color: #2196f3;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 0;
}

.settings-label {
    color: #d1d4dc;
    font-size: 13px;
}

.settings-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 18px 0;
}

.settings-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    color: #d1d4dc;
    font-size: 13px;
}

.settings-check input[type="checkbox"] {
    accent-color: #2196f3;
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Data tab */
.settings-hint {
    color: #b2b5be;
    font-size: 12px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.bar-slider-group {
    padding: 8px 0;
}

.bar-count-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: #2a2e39;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}
.bar-count-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2196f3;
    cursor: pointer;
    border: 2px solid #131722;
}
.bar-count-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2196f3;
    cursor: pointer;
    border: 2px solid #131722;
}

.bar-slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 2px;
}

.bar-slider-label {
    font-size: 11px;
    color: #b2b5be;
    transition: color 0.15s;
}
.bar-slider-label.active {
    color: #2196f3;
    font-weight: 600;
}

.bar-slider-value {
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #d1d4dc;
    font-weight: 600;
}

/* Footer */
.settings-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    flex-shrink: 0;
}

.settings-footer-spacer {
    flex: 1;
}

.settings-btn {
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    background: rgba(255, 255, 255, 0.04);
    color: #d1d4dc;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.settings-btn-ok {
    background: #2196f3;
    border-color: transparent;
    color: #fff;
    font-weight: 500;
}

.settings-btn-ok:hover {
    background: #1e88e5;
}

/* --- Color Picker Popover --- */

.cpop {
    position: fixed;
    z-index: 3000;
    background: #1e222d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 14px;
    width: 270px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.cpop-hex-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.cpop-hex-preview {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.cpop-hex-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    padding: 7px 10px;
    outline: none;
    transition: border-color 0.15s;
}

.cpop-hex-input:focus {
    border-color: #2196f3;
}

.cpop-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 3px;
    margin-bottom: 12px;
}

.cpop-cell {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.12s;
}

.cpop-cell:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.cpop-cell.active {
    border-color: #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.cpop-custom-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 6px;
    transition: background 0.15s;
}

.cpop-custom-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.cpop-native {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
    pointer-events: none;
}

.cpop-custom-label {
    color: #b2b5be;
    font-size: 12px;
}

.cpop-custom-label::before {
    content: '+ ';
}

/* Opacity slider */
.cpop-opacity-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 2px;
}

.cpop-opacity-label {
    color: #b2b5be;
    font-size: 12px;
    flex-shrink: 0;
}

.cpop-opacity-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.cpop-opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d1d4dc;
    cursor: pointer;
    border: 2px solid #1e222d;
}

.cpop-opacity-value {
    color: #d1d4dc;
    font-size: 12px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    min-width: 36px;
    text-align: right;
}

/* --- Drawing Preset / Template --- */

.dprops-preset-row {
    position: relative;
}

.dprops-preset-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 12px;
    cursor: pointer;
    transition: border-color 0.15s;
    white-space: nowrap;
}

.dprops-preset-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.dprops-preset-arrow {
    color: #b2b5be;
    font-size: 10px;
}

.dprops-preset-dropdown {
    position: fixed;
    min-width: 200px;
    background: #1e222d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 4px 0;
    z-index: 3000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    max-height: 240px;
    overflow-y: auto;
}

.dprops-preset-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    cursor: pointer;
    color: #d1d4dc;
    font-size: 12px;
    transition: background 0.1s;
}

.dprops-preset-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.dprops-preset-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dprops-preset-delete {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.dprops-preset-delete:hover {
    background: rgba(239, 83, 80, 0.15);
    color: #ef5350;
}

.dprops-preset-overwrite {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #b2b5be;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.dprops-preset-overwrite:hover {
    background: rgba(33, 150, 243, 0.15);
    color: #2196f3;
}

.dprops-preset-confirm-text {
    flex: 1;
    font-size: 11px;
    color: #ffa726;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dprops-preset-confirm-btns {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.dprops-preset-confirm-yes {
    padding: 2px 8px;
    background: #2196f3;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s;
}

.dprops-preset-confirm-yes:hover {
    background: #1e88e5;
}

.dprops-preset-confirm-no {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 3px;
    color: #b2b5be;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}

.dprops-preset-confirm-no:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #d1d4dc;
}

.dprops-preset-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 0;
}

.dprops-preset-action {
    color: #b2b5be;
}

.dprops-preset-action:hover {
    color: #d1d4dc;
}

.dprops-preset-save-row {
    display: flex;
    gap: 6px;
    padding: 6px 10px;
}

.dprops-preset-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #d1d4dc;
    font-size: 12px;
    padding: 4px 8px;
    outline: none;
}

.dprops-preset-input:focus {
    border-color: #2196f3;
}

.dprops-preset-save-confirm {
    padding: 4px 10px;
    background: #2196f3;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.dprops-preset-save-confirm:hover {
    background: #1e88e5;
}

/* === Drawing Quick Tools bar === */

.dqt-bar {
    --dqt-bg: #1e222d;
    position: fixed;
    display: none;          /* shown by JS */
    align-items: center;
    gap: 2px;
    background: var(--dqt-bg);
    border: 1px solid #2a2e39;
    border-radius: 8px;
    padding: 4px 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    z-index: 900;
    pointer-events: auto;
    user-select: none;
}

/* Drag handle — braille dot icon (matches float-toolbar-drag) */
.dqt-handle {
    cursor: grab;
    color: #b2b5be;
    font-size: 14px;
    padding: 0 4px;
}
.dqt-handle:active {
    cursor: grabbing;
}
.dqt-handle:hover {
    color: #d1d4dc;
}

.dqt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    border-radius: 5px;
    color: #b2b5be;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}

.dqt-btn:hover { color: #d1d4dc; background: #2a2e39; }
.dqt-btn:active { background: #363a45; }
.dqt-btn svg { width: 18px; height: 18px; }

/* === Indicator Panel === */

.ind-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    color: #b2b5be;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    margin-left: 8px;
}
.ind-toolbar-btn:hover {
    color: #d1d4dc;
    background: #2a2e39;
}
.ind-toolbar-btn svg {
    flex-shrink: 0;
}

/* --- Indicator Modal --- */

.ind-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2500;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 10vh;
    backdrop-filter: blur(2px);
}

.ind-settings-overlay {
    background: none;
    backdrop-filter: none;
    pointer-events: none;
}

.ind-settings-overlay > * {
    pointer-events: auto;
}

.ind-modal {
    background: #1e222d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    width: 380px;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.ind-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px 12px;
    flex-shrink: 0;
}

.ind-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #d1d4dc;
}

.ind-modal-close {
    background: none;
    border: none;
    color: #4c525e;
    font-size: 22px;
    cursor: pointer;
    padding: 2px 6px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.15s;
}
.ind-modal-close:hover {
    color: #d1d4dc;
    background: rgba(255, 255, 255, 0.06);
}

.ind-modal-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 16px 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    transition: border-color 0.15s;
}
.ind-modal-search-wrap:focus-within {
    border-color: #2196f3;
}

.ind-modal-search {
    flex: 1;
    background: none;
    border: none;
    color: #d1d4dc;
    font-size: 13px;
    outline: none;
}
.ind-modal-search::placeholder {
    color: #4c525e;
}

.ind-modal-active-section {
    flex-shrink: 0;
}

.ind-modal-section-label {
    padding: 4px 20px;
    font-size: 10px;
    font-weight: 600;
    color: #636b78;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.ind-modal-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 16px;
}

.ind-active-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 20px;
    transition: background 0.12s;
}
.ind-active-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ind-active-name {
    flex: 1;
    font-size: 13px;
    color: #2196f3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ind-active-actions {
    display: flex;
    gap: 2px;
}

.ind-active-settings,
.ind-active-remove {
    background: none;
    border: none;
    color: #4c525e;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.12s;
}
.ind-active-settings:hover {
    color: #d1d4dc;
    background: rgba(255, 255, 255, 0.06);
}
.ind-active-remove:hover {
    color: #ef5350;
    background: rgba(239, 83, 80, 0.1);
}

/* Available indicator list */
.ind-modal-list {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 8px;
}

.ind-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    cursor: pointer;
    transition: background 0.12s;
}
.ind-list-item:hover {
    background: #2a2e39;
}

.ind-list-icon {
    flex-shrink: 0;
    opacity: 0.6;
}

.ind-list-name {
    flex: 1;
    font-size: 13px;
    color: #d1d4dc;
}

.ind-badge {
    font-size: 9px;
    color: #b2b5be;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    padding: 1px 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.ind-modal-empty {
    padding: 24px 20px;
    font-size: 13px;
    color: #4c525e;
    text-align: center;
}

/* --- Indicator Settings Dialog --- */

.ind-settings {
    background: #1e222d;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    min-width: 340px;
    width: fit-content;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

/* Indicator settings — context-specific overrides (base from .panel-header) */
.ind-settings-header {
    padding: 16px 20px 12px;
    flex-shrink: 0;
}

.ind-settings-body {
    padding: 4px 24px 16px;
    overflow-y: auto;
    max-height: 50vh;
    display: grid;
    grid-template-columns: minmax(120px, auto) 1fr;
    gap: 10px 16px;
    align-items: center;
}

.ind-settings-section {
    display: contents;
}

.ind-settings-group-header {
    grid-column: 1 / -1;
    color: #e6b800;
    font-size: 11px;
    padding: 8px 0 5px;
    background: none;
    border-bottom: 1px solid rgba(230, 184, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.ind-settings-group-header:hover {
    color: #f0c840;
}

.ind-settings-group-header::after {
    content: '';
    border: solid #e6b800;
    border-width: 0 1.5px 1.5px 0;
    display: inline-block;
    padding: 2.5px;
    transform: rotate(45deg);
    margin-top: -3px;
    margin-left: auto;
    transition: transform 0.15s;
    opacity: 0.5;
}

.ind-settings-group-header.collapsed::after {
    transform: rotate(-45deg);
    margin-top: 1px;
}

.ind-settings-group-body {
    display: contents;
}

.ind-settings-group-body.collapsed {
    display: none;
}

.ind-settings-row {
    display: contents;
}

.ind-settings-label {
    color: #b2b5be;
    font-size: 13px;
    white-space: nowrap;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.ind-settings-inline {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ind-settings-inline > * {
    flex-shrink: 0;
}

.ind-settings-inline-label {
    color: #b2b5be;
    font-size: 11px;
    margin-left: 6px;
}

.ind-settings-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 13px;
    padding: 6px 10px;
    outline: none;
    max-width: 120px;
}
.ind-settings-input:focus {
    border-color: #2196f3;
}

.ind-settings-select {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 13px;
    padding: 6px 8px;
    outline: none;
    cursor: pointer;
    max-width: 120px;
}
.ind-settings-select:focus {
    border-color: #2196f3;
}

.ind-settings-checkbox {
    accent-color: #2196f3;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ind-settings-color {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.ind-settings-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.ind-settings-btn {
    padding: 7px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    background: rgba(255, 255, 255, 0.04);
    color: #d1d4dc;
}
.ind-settings-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ind-settings-btn-ok {
    background: #2196f3;
    border-color: transparent;
    color: #fff;
    font-weight: 500;
}
.ind-settings-btn-ok:hover {
    background: #1e88e5;
}

.ind-settings-btn-remove {
    padding: 7px 14px;
    border: 1px solid rgba(239, 83, 80, 0.25);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background: rgba(239, 83, 80, 0.08);
    color: #ef5350;
    transition: all 0.15s;
}
.ind-settings-btn-remove:hover {
    background: rgba(239, 83, 80, 0.18);
    border-color: rgba(239, 83, 80, 0.4);
}

/* Defaults dropdown */
.ind-defaults-wrap {
    position: relative;
    margin-left: 8px;
}
.ind-defaults-btn {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ind-defaults-arrow {
    font-size: 8px;
    line-height: 1;
}
.ind-defaults-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 4px;
    min-width: 160px;
    background: #1e222d;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    z-index: 999;
}
.ind-defaults-menu.open {
    display: block;
}
.ind-defaults-item {
    padding: 9px 14px;
    font-size: 13px;
    color: #d1d4dc;
    cursor: pointer;
    transition: background 0.12s;
}
.ind-defaults-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Settings tabs */
.ind-settings-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.ind-settings-tab {
    padding: 8px 16px;
    font-size: 13px;
    color: #b2b5be;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.ind-settings-tab:hover {
    color: #d1d4dc;
}
.ind-settings-tab.active {
    color: #2196f3;
    border-bottom-color: #2196f3;
}

/* Style tab rows */
.ind-style-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
}
.ind-style-label {
    color: #b2b5be;
    font-size: 13px;
    min-width: 60px;
}
.ind-style-color-wrap {
    flex-shrink: 0;
}
.ind-style-color {
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    background: none;
}
.ind-style-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #d1d4dc;
    font-size: 12px;
    padding: 4px 6px;
    outline: none;
    cursor: pointer;
    width: 60px;
}
.ind-style-select:focus {
    border-color: #2196f3;
}
.ind-style-width {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #d1d4dc;
    font-size: 12px;
    padding: 4px 6px;
    outline: none;
    width: 48px;
    text-align: center;
}
.ind-style-width:focus {
    border-color: #2196f3;
}

/* Indicator legend overlay on chart */
#ind-legend {
    position: absolute;
    top: 6px;
    left: 54px;  /* clear the drawing toolbar (46px + padding) */
    display: flex;
    flex-direction: column;
    gap: 1px;
    z-index: 10;
}

.ind-legend-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    transition: background 0.12s;
}
.ind-legend-row:hover {
    background: rgba(30, 34, 45, 0.9);
}

.ind-legend-row.ind-legend-focused {
    background: rgba(33, 150, 243, 0.12);
}
.ind-legend-row.ind-legend-focused .ind-legend-name {
    color: #2196f3;
}

.ind-legend-name {
    font-size: 14px;
    color: #b2b5be;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    white-space: nowrap;
    transition: color 0.12s;
}
.ind-legend-row:hover .ind-legend-name {
    color: #d1d4dc;
}

.ind-legend-actions {
    display: none;
    gap: 1px;
}
.ind-legend-row:hover .ind-legend-actions {
    display: flex;
}

.ind-legend-btn {
    background: none;
    border: none;
    color: #b2b5be;
    cursor: pointer;
    padding: 3px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    transition: all 0.12s;
}
.ind-legend-btn.ind-legend-settings:hover {
    color: #d1d4dc;
    background: rgba(255, 255, 255, 0.08);
}
.ind-legend-btn.ind-legend-remove:hover {
    color: #ef5350;
    background: rgba(239, 83, 80, 0.12);
}
.ind-legend-btn.ind-legend-eye:hover {
    color: #d1d4dc;
    background: rgba(255, 255, 255, 0.08);
}
.ind-legend-btn.ind-legend-eye.ind-hidden {
    color: #4c525e;
}

/* Error state */
.ind-legend-row.ind-legend-error .ind-legend-name {
    color: #ef5350;
}
.ind-legend-err-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef5350;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    cursor: help;
}

/* Loading state */
.ind-legend-row.ind-legend-pending .ind-legend-name {
    color: #4c525e;
}
.ind-legend-loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #363a45;
    border-top-color: #b2b5be;
    border-radius: 50%;
    animation: ind-spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes ind-spin {
    to { transform: rotate(360deg); }
}

/* Sub-pane legends */
.ind-pane-legend {
    position: absolute;
    left: 54px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    z-index: 10;
    pointer-events: auto;
}

.ind-list-check {
    flex-shrink: 0;
    margin-left: auto;
}

.ind-list-fav {
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    opacity: 0.4;
    transition: opacity 0.15s;
}
.ind-list-fav:hover { opacity: 0.8; }
.ind-list-fav[data-is-fav="1"] { opacity: 1; }
.ind-list-star { display: block; }

/* ─── Login overlay ───────────────────────────────────────────────────────── */

.hidden { display: none !important; }

/* Hide toolbar + chart until auth resolves — avoids z-index fight with overlay */
body.pre-auth #toolbar,
body.pre-auth #chart-area { visibility: hidden; }

/* === Mobile Block === */
#mobile-block {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: #0b0e17;
    z-index: 99999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
    text-align: center;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    #mobile-block { display: flex; }
    html, body { overflow: hidden; width: 100vw; height: 100vh; }
}
.mobile-block-title {
    font-size: 20px;
    font-weight: 700;
    color: #d1d4dc;
    letter-spacing: 0.1em;
}
.mobile-block-sub {
    font-size: 13px;
    color: #555a68;
    line-height: 1.7;
}

/* === Login === */
/* overlay: covers full screen with solid bg — blocks chart completely */
#login-overlay {
    position: fixed;
    inset: 0;
    background: #080c14;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(33,150,243,0.13) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 10% 85%, rgba(99,60,220,0.09) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 88% 12%, rgba(0,188,212,0.08) 0%, transparent 60%),
        linear-gradient(rgba(33,150,243,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33,150,243,0.03) 1px, transparent 1px);
    background-size: auto, auto, auto, 44px 44px, 44px 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* opacity:0 keeps canvas animating; display:flex keeps layout intact */
#login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* canvas is inside overlay, covers it fully for particle animation */
#login-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.login-box {
    background: rgba(18, 22, 34, 0.92);
    border: 1px solid rgba(33, 150, 243, 0.18);
    border-radius: 14px;
    padding: 48px 44px 40px;
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 0 60px rgba(33,150,243,0.07), 0 20px 60px rgba(0,0,0,0.7);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 1;
}

.login-logo {
    font-size: 38px;
    font-weight: 800;
    color: #e8eaf0;
    text-align: center;
    letter-spacing: 0.22em;
    line-height: 1;
}
.login-logo-n {
    color: #2196f3;
}

.login-tagline {
    font-size: 10px;
    color: #3a4055;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 20px;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-input-wrap {
    position: relative;
}
.login-input-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: #3a4055;
    pointer-events: none;
}

#login-form input {
    background: #0d1017;
    border: 1px solid #1e2435;
    border-radius: 6px;
    color: #d1d4dc;
    font-size: 13px;
    padding: 10px 12px 10px 34px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

#login-form input:focus {
    border-color: rgba(33,150,243,0.5);
    box-shadow: 0 0 0 3px rgba(33,150,243,0.08);
}

#login-form button {
    background: linear-gradient(135deg, #1e6fd9, #2196f3);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 11px;
    margin-top: 8px;
    letter-spacing: 0.06em;
    transition: opacity 0.15s, box-shadow 0.15s;
    width: 100%;
    box-shadow: 0 4px 16px rgba(33,150,243,0.25);
}

#login-form button:hover { opacity: 0.88; }
#login-form button:disabled { background: #1e2435; box-shadow: none; cursor: not-allowed; }

#login-error {
    color: #ef5350;
    font-size: 12px;
    text-align: center;
    margin-top: -2px;
}
