/* CurveLab uses EquityLab's components directly. Only domain-specific layout lives here. */
@import url('/shared/workbench_theme.css');
@import url('/shared/option_studio.css');

.upload.drag {outline:2px dashed var(--accent);outline-offset:6px;background:var(--accent-light);}
.curves-page .csv-editor textarea {min-height:156px;}
.curves-page .curve-panel {margin-top:14px;}
#result-identity,#result-note,#run-id {overflow-wrap:anywhere;}
#run-id {display:block;margin-top:8px;}
#result-badge {flex-shrink:0;}
.curves-page .plot-toolbar {align-items:flex-start;}
.curves-page .plot-title p {margin-top:12px;}
.curve-plot-controls {flex:1 1 320px;justify-content:flex-end;}
.curves-page .pillar-chart-wrap {min-height:0;margin:14px 0;padding:12px;}
.curves-page .pillar-chart-wrap .plot-canvas {min-height:180px;}
.curves-page .pillar-chart-wrap .chart-controls {margin:8px 0 4px;padding:0;border:0;}
.projection-line,.discount-line {display:inline-block;width:18px;border-top:2px solid #0071e3;}
.discount-line {border-color:#d55e00;border-top-style:dashed;}
.curves-page .price-table {margin-top:14px;}
.curves-page pre {white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;}
.progress {height:3px;overflow:hidden;background:var(--line-light);margin-bottom:15px;}
.progress i {display:block;height:100%;width:35%;background:var(--accent);animation:curve-progress 2s infinite;}
@keyframes curve-progress {from{transform:translateX(-100%)}to{transform:translateX(400%)}}
@media(max-width:900px){.curve-plot-controls{width:100%;}.curve-plot-controls label{max-width:none;}}
@media(max-width:540px){.curve-plot-controls{flex-basis:100%;}.curve-plot-controls label{flex-basis:100%;}.curves-page .panel-heading .tag{white-space:normal;text-align:right;}.curves-page .input-actions a{white-space:normal;}}
@media(prefers-reduced-motion:reduce){.progress i{animation:none;}}


.instrument-item {display:grid;grid-template-columns:minmax(110px,1fr) minmax(0,3fr);align-items:baseline;gap:8px;padding:7px 0;border-bottom:1px solid var(--line-light);font-size:12px;}
.instrument-item code {font-size:11px;overflow-wrap:anywhere;white-space:normal;}
@media(max-width:540px){.instrument-item{grid-template-columns:1fr;gap:3px;}}

.interpolation-selectors {display:grid;grid-template-columns:minmax(0,1fr);gap:12px;margin-top:10px;}
.interpolation-choice-row {display:grid;gap:3px;}
.interpolation-choice-row label {margin-top:8px;}
.interpolation-choice-row .field-note {margin:0;font-weight:400;}
.interpolation-process {display:grid;gap:2px;padding-inline-start:18px;}
.settings-disclosure .setting-note {margin:0;font-weight:400;}
#fixings-wrap {margin-top:18px;}
#reference-editor,#fixings-editor {min-height:156px;}
#convention-controls .convention-field {display:flex;flex-direction:column;gap:7px;min-width:0;margin-top:18px;}
#convention-controls .convention-label-row {display:flex;align-items:center;gap:6px;min-height:19px;}
#convention-controls .convention-label {display:block;margin:0;min-width:0;font-size:12.5px;font-weight:500;color:var(--ink-secondary);}
#convention-controls .convention-field.not-applicable .convention-label,
#quote-shift-field.not-applicable {color:#96969c;}
#convention-controls .convention-help {position:relative;display:inline-flex;flex:0 0 auto;}
#convention-controls .convention-help-button {display:grid;place-items:center;width:17px;height:17px;padding:0;border:1px solid #b7b7bd;border-radius:50%;background:#fff;color:#62626a;font-size:11px;font-weight:600;line-height:1;cursor:help;}
#convention-controls .convention-help-button:hover {color:var(--accent);border-color:var(--accent);background:var(--accent-light);}
#convention-controls .convention-field.not-applicable .convention-help-button {color:#96969c;border-color:#d2d2d7;}
#convention-controls .convention-help-tooltip {position:absolute;z-index:70;left:0;bottom:calc(100% - 2px);width:min(270px,calc(100vw - 56px));padding:9px 11px;border:1px solid #414147;border-radius:9px;background:#29292e;color:#fff;box-shadow:0 6px 22px #0003;font-size:11.5px;font-weight:400;line-height:1.5;white-space:normal;visibility:hidden;opacity:0;pointer-events:none;transition:opacity .12s ease;}
#convention-controls .convention-help:hover .convention-help-tooltip,#convention-controls .convention-help:focus-within .convention-help-tooltip {visibility:visible;opacity:1;pointer-events:auto;}

.output-frequency-bar {display:flex;align-items:flex-end;flex-wrap:wrap;gap:12px;margin:14px 0 10px;padding:12px 14px;background:#f5f5f7;border:1px solid var(--line-light);border-radius:10px;}
.output-frequency-bar label {min-width:180px;margin-top:0;}
.output-frequency-bar select, .output-frequency-bar input {background:#fff;}
.output-frequency-bar button {height:36px;padding:0 14px;font-size:12.5px;}
.frequency-summary {margin:0 0 6px auto;align-self:center;font-weight:500;color:var(--muted);font-size:12px;}

.panel-heading-actions {display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.panel-download-link {display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 12px;border-radius:14px;font-size:12px;font-weight:500;color:var(--accent);background:var(--accent-light);border:1px solid var(--accent-border);text-decoration:none;transition:all .15s ease;}
.panel-download-link:hover:not(.disabled) {background:#dbeafe;text-decoration:none;}
.panel-download-link.disabled {opacity:.45;pointer-events:none;cursor:default;}

.curves-page [hidden] {display:none!important;}
.curves-page .curve-build-toolbar {
 display:block;margin:0;
}
.curves-page .run-actions {display:flex;align-items:center;flex-wrap:wrap;gap:.55rem;}
.curves-page .curve-build-toolbar .run-actions button {min-height:44px;padding:10px 20px;font-size:14px;}
.curves-page #run-stage {margin:.75rem 0 0;overflow-wrap:anywhere;}
.curves-page .inline-error,.curves-page .result-warning {
 border-inline-start:3px solid;padding:.65rem .8rem;border-radius:4px;overflow-wrap:anywhere;font-size:.86rem;
}
.curves-page .inline-error {color:#9c212b;background:#fff0f1;}
.curves-page .result-warning {color:#693e00;background:#fff3dc;}
.curves-page .inline-check {display:flex;align-items:center;gap:.5rem;margin:0;}
.curves-page .inline-check input {width:auto;min-height:0;}
.curves-page #shared-pillars-field {display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;column-gap:8px;}
.curves-page #shared-pillars-field .field-note {flex-basis:100%;margin:0 0 0 22px;}
.curves-page .chart-inspection {margin-top:1rem;display:grid;gap:.5rem;}
.curves-page .chart-inspection label {margin:0;}
.curves-page .chart-inspection input[type="range"] {width:100%;height:24px;padding:0;accent-color:var(--accent);}
.curves-page .chart-inspection output {font-size:.85rem;font-variant-numeric:tabular-nums;min-height:1.4em;overflow-wrap:anywhere;}
.curves-page #chart text,.curves-page #benchmark-plot text {font-size:12px;fill:#4f5668;}
.curves-page .chart-guide {stroke:#59667c;stroke-width:1;stroke-dasharray:2 4;pointer-events:none;}
.curves-page #chart-legend {display:flex;flex-wrap:wrap;gap:.45rem 1rem;}
.curves-page #chart-legend i {display:inline-block;width:1.3em;border-top:2px solid currentColor;margin-right:.35rem;vertical-align:middle;}
.curves-page .table-wrap {max-width:100%;overflow:auto;}
.curves-page .table-wrap td:first-child {overflow-wrap:anywhere;}
.curves-page .table-wrap tr:focus {outline:2px solid var(--accent);outline-offset:-2px;}
.curves-page #rename-run {display:flex;flex-wrap:wrap;gap:.65rem;align-items:end;}
.curves-page #rename-run label {flex:1 1 180px;}
.curves-page #history {width:100%;text-overflow:ellipsis;}
.curves-page #benchmark-filters {gap:.55rem 1rem;}
.curves-page #fit-rmse,.curves-page #max-error {overflow-wrap:anywhere;line-height:1.2;}
.curves-page .input-actions > *, .curves-page .run-actions > * {max-width:100%;}
@media(max-width:540px){
 .curves-page .run-actions {gap:.4rem;}
 .curves-page .run-actions button,.curves-page .input-actions button {white-space:normal;height:auto;min-height:36px;}
 .curves-page .output-frequency-bar label {min-width:min(180px,100%);}
 .curves-page .chart-wrap .plot-canvas {min-height:160px;}
 .curves-page .metrics {grid-template-columns:1fr;}
 .curves-page #benchmark-filters {grid-template-columns:repeat(2,minmax(0,1fr));}
}
