.quant-card {
    background-color: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.03);
    height: 100%;
    position: relative;
}

.iq-input {
    background-color: rgba(128, 128, 128, 0.05) !important;
    border: 1px solid var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
    border-radius: 10px;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s ease;
}
.iq-input:focus {
    background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.15) !important;
}
.iq-input:disabled { opacity: 0.5; cursor: not-allowed; }
.iq-input option { background-color: var(--bs-card-bg); color: var(--bs-body-color); }

#tickerList .dropdown-item, #assetList .dropdown-item {
    color: var(--bs-body-color) !important;
    transition: all 0.2s ease;
}
#tickerList .dropdown-item:hover, #assetList .dropdown-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
    color: var(--bs-primary) !important;
    padding-left: 1.5rem !important;
}
#tickerSearch::placeholder, #assetSearch::placeholder { color: var(--iq-muted); opacity: 0.7; }

.insight-box {
    background: rgba(128, 128, 128, 0.03);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
}
.insight-stat {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px dashed var(--bs-border-color);
}
.insight-stat:last-child { border-bottom: none; padding-bottom: 0; }
.rub-val { font-size: 0.75rem; opacity: 0.8; font-family: 'JetBrains Mono', monospace; }

.data-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px dashed var(--bs-border-color);
}
.data-row:last-child { border-bottom: none; padding-bottom: 0; }
.data-label { color: var(--iq-muted); font-size: 0.85rem; }
.data-value { font-weight: 700; color: var(--bs-body-color); font-family: 'JetBrains Mono', monospace; font-size: 0.95rem; text-align: right; }
.block-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(var(--bs-primary-rgb), 0.1); color: var(--bs-primary);
    font-size: 1.2rem; margin-right: 15px;
}

.level-row {
    display: flex; align-items: center; padding: 12px 20px; border-radius: 8px; margin-bottom: 8px;
    background: rgba(128,128,128, 0.02); border: 1px solid var(--bs-border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.level-row:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.level-R { background: rgba(239, 68, 68, 0.05); border-color: rgba(239, 68, 68, 0.2); }
.level-R .level-name, .level-R .level-val { color: #ef4444; }
.level-S { background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.2); }
.level-S .level-name, .level-S .level-val { color: #10b981; }
.level-P { background: rgba(var(--bs-primary-rgb), 0.1); border-color: var(--bs-primary); border-width: 2px; }
.level-P .level-name, .level-P .level-val { color: var(--bs-primary); font-weight: 800;}
.level-CURRENT { background: var(--bs-body-color); color: var(--bs-body-bg); border-radius: 12px; box-shadow: 0 10px 20px rgba(0,0,0,0.15); transform: scale(1.03); z-index: 10; position: relative; }
.level-CURRENT:hover { transform: scale(1.05); }
.level-CURRENT .level-name, .level-CURRENT .level-val { color: var(--bs-body-bg) !important; font-weight: bold; }
.pulse-dot { width: 10px; height: 10px; background: #10b981; border-radius: 50%; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); animation: pulse 1.5s infinite; }
@keyframes pulse { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }

.svg-container { position: relative; width: 100%; height: 350px; background-image: radial-gradient(rgba(128,128,128,0.05) 1px, transparent 1px); background-size: 20px 20px; border-radius: 8px; border: 1px dashed var(--bs-border-color); }
.bell-curve-area { fill: url(#bell-grad); opacity: 0.15; }
.bell-curve-stroke { fill: none; stroke: var(--bs-primary); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0px 0px 8px rgba(var(--bs-primary-rgb), 0.3)); }
.sigma-line { stroke: var(--bs-border-color); stroke-width: 1; stroke-dasharray: 4 4; }
.sigma-text { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; fill: var(--iq-muted); text-anchor: middle; }
.today-marker { fill: #f59e0b; stroke: #fff; stroke-width: 2; filter: drop-shadow(0px 0px 10px rgba(245, 158, 11, 0.8)); }
.today-pulse { fill: #f59e0b; opacity: 0.4; animation: svg-pulse 1.8s infinite ease-out; }
@keyframes svg-pulse { 0% { r: 5px; opacity: 0.6; } 100% { r: 25px; opacity: 0; } }

.true-scale-chart { display: flex; align-items: flex-end; justify-content: space-around; height: 380px; padding-top: 40px; position: relative; background-image: linear-gradient(rgba(128,128,128,0.1) 1px, transparent 1px); background-size: 100% 25%; }
.chart-divider { width: 2px; height: 100%; background: repeating-linear-gradient(to bottom, var(--bs-border-color) 0, var(--bs-border-color) 5px, transparent 5px, transparent 10px); }
.bar-column { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 20%; height: 100%; position: relative; z-index: 2; }
.bar-value { font-weight: 800; margin-bottom: 8px; font-size: 1.1rem; text-align: center; line-height: 1.2; }
.bar-traders { font-size: 0.75rem; margin-top: 8px; color: var(--iq-muted); border-top: 2px solid; padding-top: 4px; width: 100%; text-align: center; }
.bar { width: 100%; border-radius: 6px 6px 0 0; transition: height 1.2s cubic-bezier(0.16, 1, 0.3, 1); position: relative; box-shadow: inset 0 0 20px rgba(0,0,0,0.2); }
.bar-long { background: linear-gradient(180deg, #10b981 0%, #059669 100%); }
.bar-short { background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%); }
.text-long { color: #10b981 !important; }
.text-short { color: #ef4444 !important; }
.border-long { border-color: #10b981 !important; }
.border-short { border-color: #ef4444 !important; }
.bias-bar-container { height: 12px; border-radius: 6px; overflow: hidden; display: flex; background: var(--bs-border-color); }
.bias-long { background-color: #10b981; transition: width 1s ease-out; }
.bias-short { background-color: #ef4444; transition: width 1s ease-out; }

.heatmap-grid { display: grid; grid-template-columns: 40px repeat(15, 1fr); gap: 4px; margin-top: 10px; }
.hm-header { text-align: center; font-size: 0.7rem; color: var(--iq-muted); font-family: 'JetBrains Mono', monospace; margin-bottom: 5px; }
.hm-day-label { display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; font-size: 0.8rem; font-weight: bold; color: var(--bs-body-color); font-family: 'JetBrains Mono', monospace; }
.hm-cell { aspect-ratio: 1; border-radius: 6px; background-color: rgba(128, 128, 128, 0.1); cursor: crosshair; transition: transform 0.1s, box-shadow 0.1s; position: relative; }
.hm-cell:hover { transform: scale(1.15); z-index: 10; box-shadow: 0 5px 15px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.5); }
.hm-tooltip { position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); padding: 10px 15px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); white-space: nowrap; pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.2s; z-index: 100; font-family: 'JetBrains Mono', monospace; }
.hm-cell:hover .hm-tooltip { opacity: 1; visibility: visible; }

.canvas-wrapper { width: 100%; height: 480px; background-color: rgba(128,128,128,0.02); border-radius: 8px; border: 1px solid var(--bs-border-color); position: relative; overflow: hidden; }
#pnfCanvas { cursor: grab; }
#pnfCanvas:active { cursor: grabbing; }

.profile-container { position: relative; height: 450px; display: flex; flex-direction: column; border-right: 1px solid var(--bs-border-color); padding-right: 15px; }
.profile-row { flex-grow: 1; display: flex; align-items: center; position: relative; }
.profile-bar { height: 80%; background-color: rgba(128, 128, 128, 0.15); border-radius: 0 4px 4px 0; transition: width 0.8s ease-out; min-width: 2px; position: relative; }
.is-va .profile-bar { background-color: rgba(var(--bs-primary-rgb), 0.4); }
.is-poc .profile-bar { background-color: #f59e0b !important; box-shadow: 0 0 10px rgba(245, 158, 11, 0.5); }
.poc-label { position: absolute; right: -45px; font-size: 0.65rem; color: #f59e0b; font-weight: 800; letter-spacing: 1px; }
.price-label { width: 75px; text-align: left; font-size: 0.75rem; color: var(--iq-muted); font-family: 'JetBrains Mono', monospace; }
.floating-marker { position: absolute; left: 0; right: 0; border-top: 1px dashed; z-index: 10; display: flex; align-items: center; transform: translateY(-50%); transition: top 0.5s ease; }
.marker-current { border-color: #10b981; }
.marker-current .badge { background-color: #10b981; color: #fff; }
.marker-vwap { border-color: #6366f1; border-top-style: dotted; }
.marker-vwap .badge { background-color: #6366f1; color: #fff; }

.curve-area { fill: rgba(var(--bs-primary-rgb), 0.08); transition: fill 0.3s; }
.curve-current { fill: none; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.curve-week { fill: none; stroke: var(--bs-body-color); stroke-width: 2; stroke-dasharray: 6 6; opacity: 0.4; }
.curve-month { fill: none; stroke: var(--iq-muted); stroke-width: 2; stroke-dasharray: 2 4; opacity: 0.2; }
.node-point { stroke: var(--bs-card-bg); stroke-width: 3; transition: r 0.2s, stroke-width 0.2s; pointer-events: none; }
.node-point.active { r: 8; stroke-width: 0; filter: drop-shadow(0px 0px 8px currentColor); }
.state-BACKWARDATION .curve-current { stroke: #ef4444; filter: drop-shadow(0px 0px 10px rgba(239, 68, 68, 0.4)); }
.state-BACKWARDATION .node-point { fill: #ef4444; }
.state-BACKWARDATION .status-text { color: #ef4444; }
.state-BACKWARDATION .curve-area { fill: rgba(239, 68, 68, 0.08); }
.state-BACKWARDATION .quant-card.hero-card { border-left: 5px solid #ef4444 !important; background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%); }
.state-CONTANGO .curve-current { stroke: #10b981; filter: drop-shadow(0px 0px 10px rgba(16, 185, 129, 0.4)); }
.state-CONTANGO .node-point { fill: #10b981; }
.state-CONTANGO .status-text { color: #10b981; }
.state-CONTANGO .curve-area { fill: rgba(16, 185, 129, 0.08); }
.state-CONTANGO .quant-card.hero-card { border-left: 5px solid #10b981 !important; background: linear-gradient(90deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%); }

.radar-table th, .radar-table td { border-color: var(--bs-border-color) !important; color: var(--bs-body-color); background-color: transparent !important; }
.radar-table tbody tr { cursor: pointer; transition: background-color 0.2s; }
.radar-table tbody tr:hover { background-color: rgba(var(--bs-primary-rgb), 0.03) !important; }
.signal-badge { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; padding: 5px 10px; border-radius: 6px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; display: inline-block; }
.sig-WAIT { background-color: rgba(128, 128, 128, 0.1); color: var(--iq-muted); border: 1px solid var(--bs-border-color); }
.sig-LONG_A_SHORT_B { background-color: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.sig-SHORT_A_LONG_B { background-color: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.spread-line { fill: none; stroke: var(--bs-primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0px 0px 8px rgba(var(--bs-primary-rgb), 0.4)); }
.sig-zero { stroke: var(--bs-body-color); opacity: 0.4; stroke-width: 1.5; stroke-dasharray: none; }
.sig-normal { stroke: var(--bs-border-color); opacity: 0.4; }
.sig-risk { stroke: #f59e0b; opacity: 0.5; }
.sig-extreme { stroke: #ef4444; opacity: 0.6; }

.axis-text { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; fill: var(--iq-muted); pointer-events: none; }
.axis-label-x { font-weight: bold; fill: var(--bs-body-color); }
.crosshair-line { stroke: var(--bs-body-color); stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.3; pointer-events: none; transition: x1 0.1s, x2 0.1s; }
.smart-tooltip { position: absolute; top: 0; left: 0; background: rgba(var(--bs-card-bg-rgb, 20, 20, 20), 0.95); backdrop-filter: blur(10px); border: 1px solid var(--bs-border-color); border-radius: 12px; padding: 16px; box-shadow: 0 15px 35px rgba(0,0,0,0.2); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, transform 0.1s ease; z-index: 1000; min-width: 260px; color: var(--bs-body-color); }
.smart-tooltip.visible { opacity: 1; visibility: visible; }
.tt-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 0.8rem; }
.tt-val { font-family: 'JetBrains Mono', monospace; font-weight: bold; }
.tt-delta.positive { color: #10b981; }
.tt-delta.negative { color: #ef4444; }

.calc-tabs .nav-link { color: var(--bs-body-color); border: 1px solid transparent; border-bottom: 2px solid transparent; border-radius: 0; padding: 15px 10px; font-weight: bold; background: transparent; transition: all 0.2s; font-size: 0.9rem; }
.calc-tabs .nav-link:hover { color: var(--bs-primary); }
.calc-tabs .nav-link.active { color: var(--bs-primary); border-bottom: 2px solid var(--bs-primary); background: rgba(var(--bs-primary-rgb), 0.05); }
.btn-check:checked + .btn-outline-success { background-color: #10b981; border-color: #10b981; color: #fff; }
.btn-check:checked + .btn-outline-danger { background-color: #ef4444; border-color: #ef4444; color: #fff; }
.btn-check:checked + .btn-outline-secondary { background-color: rgba(128, 128, 128, 0.2); border-color: var(--bs-border-color); color: var(--bs-body-color); }
.dca-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }


#btnCalculateCustom {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #111 !important;
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    border-radius: 10px;
    transition: all 0.2s ease;
}
#btnCalculateCustom:hover {
    filter: brightness(0.9);
    box-shadow: 0 0 15px rgba(var(--bs-primary-rgb), 0.3);
}
#btnCalculateCustom:active {
    transform: scale(0.98);
}

[data-theme="light"] #btnCalculateCustom {
    color: #fff !important;
}