/* Page-scoped workbench: quiet tools at left, analytical surfaces at right. */
.q-allocation-minimal { color: var(--q-text-normal); }
.q-allocation-workbench { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--q-space-8); }
.q-allocation-workspace { min-width: 0; }
.q-allocation-chart-shell { position: relative; min-width: 0; }
.q-allocation-chart-placeholder { display: none; }
.q-allocation-workspace.is-initial .q-allocation-chart-shell > .dash-graph,
.q-allocation-workspace.is-initial .q-detail-tabs .tab-content,
.q-allocation-workspace.is-initial .q-risk-expand {
    visibility: hidden;
}
.q-allocation-workspace.is-initial .q-allocation-chart-placeholder {
    display: block;
    position: absolute;
    inset: 0;
    border-radius: var(--q-radius-sm);
    background: var(--q-surface);
}
.q-allocation-summary strong {
    display: inline-block;
    min-width: 80px;
    min-height: 24px;
}
.q-allocation-workspace.is-initial .q-allocation-summary strong {
    color: transparent;
    border-radius: var(--q-radius-sm);
    background: var(--q-surface-muted);
}
.q-allocation-legend-placeholder,
.q-allocation-settings-placeholder {
    min-height: 24px;
    margin: var(--q-space-2) 0;
    border-radius: var(--q-radius-sm);
    background: var(--q-surface);
}
.q-allocation-legend-placeholder { min-height: 96px; }
.q-allocation-result-error:empty { display: none; }
.q-allocation-result-error {
    color: var(--q-text-normal);
    padding: var(--q-space-3) 0;
}
.q-allocation-sidebar, .q-sidebar-backdrop { display: none; }
.q-allocation-sidebar {
    min-width: 0; padding: var(--q-space-5) var(--q-space-6) var(--q-space-6) 0;
    border-right: 1px solid var(--q-border-subtle); background: var(--q-canvas);
    overflow-y: auto; scrollbar-gutter: stable;
}
.q-sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--q-space-2); }
.q-sidebar-heading h2 { margin: 0; font-size: var(--q-font-size-md); font-weight: var(--q-font-weight-semibold); color: var(--q-text-strong); }
.q-sidebar-close, .q-sidebar-open {
    border: 0; background: transparent; color: var(--q-text-muted); cursor: pointer;
    padding: var(--q-space-2); font: inherit; font-size: var(--q-font-size-md);
}
.q-sidebar-close { font-size: var(--q-font-size-2xl); }
.q-sidebar-search {
    margin: var(--q-space-3) 0; width: 100%; min-width: 0; height: var(--q-control-height-compact);
    border: 1px solid var(--q-border-subtle); border-radius: var(--q-radius-sm);
    background: var(--q-canvas); color: var(--q-text-normal); padding: var(--q-space-2) var(--q-space-3);
    font-size: var(--q-font-size-sm);
}
.q-allocation-sidebar .q-allocation-scatter-legend {
    padding: 0; border: 0; max-height: 40vh; overflow-y: auto; font-size: var(--q-font-size-sm);
}
.q-allocation-sidebar .q-scatter-legend-heading,
.q-allocation-sidebar .q-scatter-legend-group-heading,
.q-allocation-sidebar .q-scatter-legend-item { font-size: var(--q-font-size-sm); }
.q-allocation-sidebar .q-scatter-legend-label { white-space: normal; overflow-wrap: anywhere; }
.q-sidebar-controls { margin-top: var(--q-space-4); border-top: 1px solid var(--q-border-subtle); padding-top: var(--q-space-4); }
.q-strategy-section, .q-strategy-family { min-width: 0; }
.q-strategy-heading, .q-strategy-family-heading {
    display: flex; align-items: center; gap: var(--q-space-2); list-style: none;
    color: var(--q-text-strong); cursor: pointer; font-size: var(--q-font-size-sm);
    padding: var(--q-space-2) 0; font-weight: var(--q-font-weight-medium);
}
.q-strategy-heading::-webkit-details-marker, .q-strategy-family-heading::-webkit-details-marker { display: none; }
.q-strategy-heading::before, .q-strategy-family-heading::before { content: "›"; width: 10px; flex-shrink: 0; font-size: var(--q-font-size-xl); line-height: 1; }
.q-strategy-section[open] > .q-strategy-heading::before,
.q-strategy-family[open] > .q-strategy-family-heading::before { transform: rotate(90deg); }
.q-strategy-heading > span:first-child { font-weight: var(--q-font-weight-semibold); }
#allocation-strategy-summary { margin-left: auto; color: var(--q-text-muted); font-weight: var(--q-font-weight-regular); text-align: right; overflow-wrap: anywhere; }
.q-strategy-tree { padding-left: var(--q-space-3); margin: var(--q-space-1) 0 var(--q-space-3); }
.q-strategy-options { padding-left: var(--q-space-5); }
.q-strategy-choice {
    display: block; width: 100%; border: 0; border-left: 2px solid transparent; background: transparent;
    text-align: left; color: var(--q-text-normal); font: inherit; font-size: var(--q-font-size-sm);
    padding: var(--q-space-2) var(--q-space-3); cursor: pointer; overflow-wrap: anywhere;
}
.q-strategy-choice:hover { background: var(--q-surface); }
.q-strategy-choice.is-selected { background: var(--q-surface-selected); border-left-color: var(--q-primary); color: var(--q-primary); }
.q-sidebar-controls .q-allocation-switch { display: flex; justify-content: space-between; margin: var(--q-space-3) 0; }
.q-sidebar-controls .q-product-switch { width: 100%; }
.q-sidebar-controls .q-product-switch.form-switch { padding-left: 0; }
.q-sidebar-controls .q-product-switch .form-check-input { order: 2; float: none; margin: 0; flex-shrink: 0; }
.q-sidebar-controls .q-product-switch .form-check-label { order: 1; }
.q-sidebar-label { font-size: var(--q-font-size-sm); font-weight: var(--q-font-weight-semibold); margin-top: var(--q-space-4); }
.q-return-mode { display: flex; align-items: center; margin: var(--q-space-2) 0 var(--q-space-3); gap: var(--q-space-3); }
.q-return-mode .form-check { padding: 0; margin: 0; flex: 1; }
.q-return-mode .form-check-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.q-return-mode .form-check-label { display: block; text-align: center; padding: var(--q-space-2); font-size: var(--q-font-size-sm); cursor: pointer; border-bottom: 2px solid transparent; }
.q-return-mode .form-check-input:checked + .form-check-label { border-bottom-color: var(--q-primary); color: var(--q-text-strong); }
.q-return-mode .form-check-input:focus-visible + .form-check-label { outline: 2px solid var(--q-primary); outline-offset: 2px; }
.q-sidebar-model-link, .q-sidebar-actions-toggle, .q-risk-expand {
    color: var(--q-primary); background: transparent; border: 0; box-shadow: none; padding: var(--q-space-2) 0;
    font: inherit; font-size: var(--q-font-size-sm); text-align: left; cursor: pointer;
}
.q-sidebar-model-caption { color: var(--q-text-muted); font-size: var(--q-font-size-xs); margin-bottom: var(--q-space-4); }
.q-sidebar-actions-toggle { color: var(--q-text-normal); }
.q-sidebar-actions-toggle:hover, .q-sidebar-actions-toggle:focus { background: var(--q-surface); color: var(--q-text-strong); }
.q-sidebar-search:focus-visible, .q-sidebar-close:focus-visible, .q-sidebar-open:focus-visible,
.q-strategy-heading:focus-visible, .q-strategy-family-heading:focus-visible,
.q-strategy-choice:focus-visible, .q-sidebar-model-link:focus-visible, .q-risk-expand:focus-visible {
    outline: 2px solid var(--q-primary); outline-offset: 2px;
}
.q-allocation-minimal .q-allocation-control-panel { border: 0; margin: var(--q-space-5) 0 var(--q-space-5); padding: 0; }
.q-allocation-minimal .q-allocation-header { align-items: center; margin-bottom: var(--q-space-2); gap: var(--q-space-4); }
.q-allocation-minimal .q-allocation-heading { display: flex; align-items: center; flex-wrap: wrap; gap: var(--q-space-4); min-width: 0; }
.q-allocation-minimal .q-allocation-title { font-size: var(--q-font-size-4xl); font-weight: var(--q-font-weight-semibold); }
.q-allocation-selection-context { color: var(--q-text-muted); font-size: var(--q-font-size-sm); }
.q-allocation-minimal .q-allocation-metadata { justify-content: flex-start; gap: var(--q-space-4); }
.q-allocation-minimal .q-allocation-chip { background: transparent; border: 0; padding: 0; min-height: 0; white-space: normal; }
.q-allocation-minimal .q-allocation-chip-value { font-weight: var(--q-font-weight-medium); }
.q-allocation-minimal .q-allocation-status-chip { color: var(--q-text-muted); }
.q-allocation-minimal .q-allocation-status-chip .q-allocation-chip-value { color: var(--q-success-fg); }
.q-allocation-sources { position: relative; color: var(--q-primary); font-size: var(--q-font-size-sm); }
.q-allocation-sources > summary { cursor: pointer; list-style: none; }
.q-allocation-sources > summary::-webkit-details-marker { display: none; }
.q-allocation-source-details { position: absolute; z-index: 20; top: 100%; left: 0; min-width: 260px; max-width: min(480px, 75vw); background: var(--q-canvas); color: var(--q-text-normal); border: 1px solid var(--q-border-subtle); padding: var(--q-space-4); overflow-wrap: anywhere; }
.q-allocation-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--q-space-7); margin: var(--q-space-5) 0 0; font-size: var(--q-font-size-sm); }
.q-allocation-summary > div { display: flex; align-items: baseline; gap: var(--q-space-3); }
.q-allocation-summary strong { font-weight: var(--q-font-weight-semibold); font-size: var(--q-font-size-2xl); color: var(--q-text-strong); }
.q-allocation-minimal .q-main-decision-area { margin: 0; padding: 0; }
.q-allocation-minimal .q-main-decision-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: var(--q-space-7); }
.q-allocation-minimal .q-risk-return-title, .q-allocation-minimal .q-target-summary-title { font-size: var(--q-font-size-lg); font-weight: var(--q-font-weight-semibold); color: var(--q-text-strong); margin: 0 0 var(--q-space-2); white-space: normal; }
.q-allocation-minimal .q-allocation-scatter-graph { height: 440px; }
.q-allocation-targets { min-width: 0; }
.q-allocation-target-section + .q-allocation-target-section { padding-top: var(--q-space-4); border-top: 1px solid var(--q-border-subtle); }
.q-target-risk-heading { display: flex; align-items: baseline; justify-content: space-between; gap: var(--q-space-3); }
.q-target-risk-caption { color: var(--q-text-muted); font-size: var(--q-font-size-xs); }
.q-allocation-minimal .q-detail-tabs { margin-top: var(--q-space-4); }
.q-allocation-minimal .q-detail-tabs .nav-link { padding: var(--q-space-3) var(--q-space-4); border: 0; border-bottom: 2px solid transparent; font-size: var(--q-font-size-sm); font-weight: var(--q-font-weight-medium); background: transparent; }
.q-allocation-minimal .q-detail-tabs .nav-link.active { color: var(--q-primary); border-bottom-color: var(--q-primary); }
.q-allocation-minimal .q-grid-panel-title { font-size: var(--q-font-size-md); font-weight: var(--q-font-weight-semibold); }
.q-allocation-minimal .q-allocation-grid { --ag-borders: none; --ag-row-border-color: var(--q-border-grid-row); --ag-header-background-color: var(--q-surface); }
.q-allocation-minimal .q-allocation-matrix-cell { border-right: 0 !important; }
.q-allocation-minimal .q-allocation-target-column-cell { background: var(--q-surface-selected) !important; border-left: 0 !important; border-right: 0 !important; }
.q-allocation-minimal .q-allocation-target-column-header { background: transparent; border-left: 0; border-right: 0; border-top: 2px solid var(--q-primary); }
.q-allocation-minimal .q-detail-tabs-nested .tab-content { padding-top: var(--q-space-3); }
.q-portfolio-detail { position: relative; padding-top: var(--q-space-5); }
.q-portfolio-measure { display: flex; align-items: center; gap: var(--q-space-2); justify-content: flex-end; margin-bottom: var(--q-space-2); font-size: var(--q-font-size-sm); }
.q-portfolio-measure .q-product-dropdown { width: 180px; }
.q-portfolio-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--q-space-3); margin-bottom: var(--q-space-3); }
.q-portfolio-toolbar .q-grid-panel-title, .q-portfolio-toolbar .q-portfolio-measure { margin: 0; }
.q-portfolio-detail .q-grid-panel-header { display: none; }
.q-portfolio-controls { display: flex; align-items: center; flex-wrap: wrap; gap: var(--q-space-3); justify-content: flex-end; }
.q-portfolio-controls .q-portfolio-measure .q-weights-view-dropdown { width: 270px; max-width: 100%; }
.q-weights-view-note { margin-top: var(--q-space-2); }
.q-weights-view-note p { margin: 0 0 var(--q-space-1); }

@media (min-width: 1600px) {
    .q-allocation-workbench.is-sidebar-open .q-allocation-sidebar { display: block; position: sticky; top: var(--q-space-4); align-self: start; max-height: calc(100vh - var(--q-navbar-height) - 32px); }
    .q-allocation-workbench.is-sidebar-open .q-sidebar-open { display: none; }
}
@media (max-width: 1599px) {
    .q-allocation-workbench.is-sidebar-open .q-allocation-sidebar { display: block; position: fixed; inset: 0 auto 0 0; z-index: 1050; width: min(300px, 90vw); padding: var(--q-space-5); }
    .q-allocation-workbench.is-sidebar-open .q-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1040; border: 0; background: rgba(15, 23, 42, 0.18); }
}
@media (max-width: 900px) {
    .q-allocation-minimal .q-main-decision-grid { grid-template-columns: minmax(0, 1fr); }
    .q-allocation-targets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--q-space-4); }
    .q-allocation-target-section + .q-allocation-target-section { border-top: 0; padding-top: 0; }
    .q-allocation-selection-context { flex-basis: 100%; }
}
@media (max-width: 540px) {
    .q-allocation-targets { grid-template-columns: minmax(0, 1fr); }
    .q-allocation-minimal .q-allocation-scatter-graph { height: 340px; }
    .q-allocation-minimal .q-allocation-title { font-size: var(--q-font-size-2xl); }
    .q-allocation-summary { gap: var(--q-space-4); }
    .q-allocation-metadata { position: relative; }
    .q-allocation-sources { position: static; }
    .q-allocation-source-details { left: 0; right: 0; min-width: 0; max-width: 100%; }
}

/* The light shell applies only while this workbench is on the page. */
body:has(.q-allocation-minimal) .q-navbar {
    --q-nav-text: var(--q-text-normal); --q-nav-text-strong: var(--q-text-strong);
    --q-nav-text-muted: var(--q-text-muted); --q-nav-active: var(--q-primary);
    --q-nav-hover-bg: var(--q-surface); background: var(--q-canvas) !important;
    border-bottom-color: var(--q-border-subtle); box-shadow: none;
}
body:has(.q-allocation-minimal) .q-navbar .nav-link.active,
body:has(.q-allocation-minimal) .q-navbar .q-navbar-link.is-active,
body:has(.q-allocation-minimal) .q-navbar .q-navbar-dropdown.is-active > .nav-link,
body:has(.q-allocation-minimal) .q-navbar .nav-link:hover,
body:has(.q-allocation-minimal) .q-navbar .nav-link:focus { color: var(--q-text-strong) !important; }

/* Matching side panels and a result-only center. */
.q-sidebar-section-label { font-size: var(--q-font-size-sm); font-weight: var(--q-font-weight-semibold); margin: var(--q-space-5) 0 0; }
.q-allocation-workbench.is-sidebar-open .q-allocation-sidebar { display: flex; flex-direction: column; }
.q-sidebar-actions { position: sticky; bottom: 0; margin-top: auto; background: var(--q-canvas); padding-top: var(--q-space-4); border-top: 1px solid var(--q-border-subtle); }
.q-sidebar-actions .q-allocation-command { width: 100%; margin-bottom: var(--q-space-2); }
.q-sidebar-action { display: block; border: 0; background: transparent; color: var(--q-primary); padding: var(--q-space-2) 0; text-align: left; font: inherit; font-size: var(--q-font-size-sm); cursor: pointer; }
.q-sidebar-action:focus-visible { outline: 2px solid var(--q-primary); outline-offset: 2px; }
.q-strategy-choice:disabled { color: var(--q-text-muted); cursor: default; }
.q-allocation-minimal .q-allocation-header { display: flex; justify-content: space-between; }
.q-allocation-minimal .q-allocation-title { margin: 0; }
.q-allocation-selection-context { font-weight: var(--q-font-weight-semibold); color: var(--q-text-strong); }
.q-allocation-sources { display: contents; }
.q-allocation-sources > summary { color: var(--q-primary); font-size: var(--q-font-size-sm); }
.q-allocation-sources:not([open]) > .q-allocation-source-details { display: none; }
.q-allocation-source-details { position: static; flex-basis: 100%; min-width: 0; max-width: none; width: 100%; padding: var(--q-space-3) 0; border: 0; border-top: 1px solid var(--q-border-subtle); display: flex; flex-wrap: wrap; gap: var(--q-space-3) var(--q-space-6); }
.q-allocation-source-note { margin: 0; flex-basis: 100%; font-size: var(--q-font-size-xs); color: var(--q-text-muted); }
.q-allocation-workspace { container-type: inline-size; }
.q-allocation-summary { margin-top: var(--q-space-5); }
.q-allocation-summary strong { font-size: var(--q-font-size-xl); }
.q-allocation-settings-sidebar { display: none; min-width: 0; background: var(--q-canvas); border-left: 1px solid var(--q-border-subtle); padding: var(--q-space-5) 0 var(--q-space-6) var(--q-space-6); overflow-y: auto; scrollbar-gutter: stable; }
.q-settings-content.collapsing { transition: none; }
.q-settings-context { font-size: var(--q-font-size-xs); color: var(--q-text-muted); margin: var(--q-space-2) 0 var(--q-space-5); }
.q-settings-model-info { margin: var(--q-space-3) 0; font-size: var(--q-font-size-sm); }
.q-settings-model-info dt { font-weight: var(--q-font-weight-regular); color: var(--q-text-muted); margin-top: var(--q-space-3); }
.q-settings-model-info dd { margin: var(--q-space-1) 0; color: var(--q-text-strong); }
.q-settings-section { padding: var(--q-space-3) 0; border-top: 1px solid var(--q-border-subtle); }
.q-settings-section > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--q-space-2); cursor: pointer; list-style: none; color: var(--q-text-strong); font-size: var(--q-font-size-sm); font-weight: var(--q-font-weight-semibold); padding: var(--q-space-2) 0; }
.q-settings-section > summary::-webkit-details-marker { display: none; }
.q-settings-section > summary::after { content: "›"; font-size: var(--q-font-size-xl); font-weight: var(--q-font-weight-regular); }
.q-settings-section[open] > summary::after { transform: rotate(90deg); }
.q-settings-section .q-settings-section { border-top: 0; padding: var(--q-space-2) 0 var(--q-space-2) var(--q-space-3); }
.q-settings-description, .q-allocation-settings-sidebar .q-slider-group-note { color: var(--q-text-muted); font-size: var(--q-font-size-xs); line-height: 1.5; margin: var(--q-space-2) 0; }
.q-allocation-settings-sidebar .q-settings-model-controls { display: block; }
.q-allocation-settings-sidebar .q-allocation-filter { margin: var(--q-space-3) 0; }
.q-allocation-settings-sidebar .q-slider-group-actions { justify-content: flex-start; flex-wrap: wrap; gap: var(--q-space-3); margin: var(--q-space-2) 0; }
.q-allocation-settings-sidebar .q-slider-group-actions .btn { border: 0; background: transparent; color: var(--q-primary); padding: var(--q-space-2) 0; font-size: var(--q-font-size-xs); }
.q-allocation-settings-sidebar .q-slider-group-actions .form-check-label { font-size: var(--q-font-size-xs); }
.q-allocation-settings-sidebar .q-slider-item-summary { min-height: var(--q-control-height-compact); padding: var(--q-space-2) 0; border: 0; gap: var(--q-space-3); }
.q-allocation-settings-sidebar .q-slider-item-label, .q-allocation-settings-sidebar .q-slider-item-value { font-size: var(--q-font-size-sm); font-weight: var(--q-font-weight-regular); }
.q-settings-input-row.is-expanded > .q-slider-item-summary .q-slider-item-chevron { transform: rotate(90deg); color: var(--q-primary); }
.q-allocation-settings-sidebar .q-slider-item-chevron { display: inline-block; font-size: var(--q-font-size-xl); line-height: 1; }
.q-settings-input-row.is-expanded > .q-slider-item-summary .q-slider-item-label { color: var(--q-primary); }
.q-settings-input-row.is-modified > .q-slider-item-summary .q-slider-item-value::before { content: ""; width: 5px; height: 5px; background: var(--q-primary); border-radius: 50%; margin-right: var(--q-space-1); }
.q-settings-input-row.is-modified > .q-slider-item-summary .q-slider-item-value-number { color: var(--q-primary); }
.q-allocation-settings-sidebar .q-shared-slider-editor { display: flex; flex-direction: column; gap: var(--q-space-3); padding: var(--q-space-2) 0 var(--q-space-4) var(--q-space-3); }
.q-allocation-settings-sidebar .q-slider-editor-eyebrow, .q-allocation-settings-sidebar .q-slider-editor-title { display: none; }
.q-allocation-settings-sidebar .q-slider-editor-header { flex-wrap: wrap; gap: var(--q-space-3); }
.q-allocation-settings-sidebar .q-slider-editor-actions { margin: 0; }
.q-allocation-settings-sidebar .q-slider-editor-step { font-size: var(--q-font-size-xs); }
.q-allocation-settings-sidebar .q-slider-editor-back { font-size: var(--q-font-size-xs); order: 6; }
.q-allocation-settings-sidebar .q-slider-editor-header { order: 1; }
.q-allocation-settings-sidebar .q-slider-value-control { order: 2; }
.q-allocation-settings-sidebar .q-slider-track { order: 3; }
.q-shared-slider-editor > .q-settings-description { order: 4; }
.q-shared-slider-editor > .q-sidebar-action { order: 5; align-self: flex-start; }
.q-shared-slider-editor > .q-view-context { order: 7; }
.q-allocation-settings-sidebar .q-slider-track { margin: var(--q-space-2) 0; }
.q-allocation-settings-sidebar .q-slider-value-input { width: 80px; }
.q-allocation-settings-sidebar summary:focus-visible { outline: 2px solid var(--q-primary); outline-offset: 2px; }
.q-save-name { width: 100%; padding: var(--q-space-3); border: 1px solid var(--q-border-subtle); border-radius: var(--q-radius-sm); margin: var(--q-space-2) 0 var(--q-space-4); }
.q-save-date { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--q-space-3); margin: var(--q-space-3) 0; }
.q-save-summary { font-size: var(--q-font-size-sm); color: var(--q-text-muted); margin-bottom: var(--q-space-4); }
@media (min-width: 1600px) {
    .q-allocation-workbench.is-settings-open .q-allocation-settings-sidebar { display: block; position: sticky; top: var(--q-space-4); align-self: start; max-height: calc(100vh - var(--q-navbar-height) - 32px); }
}
@media (max-width: 1599px) {
    .q-allocation-workbench.is-settings-open .q-allocation-settings-sidebar { display: block; position: fixed; inset: 0 0 0 auto; z-index: 1050; width: min(360px, 95vw); padding: var(--q-space-5); }
    .q-allocation-workbench.is-settings-open .q-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1040; border: 0; background: rgba(15, 23, 42, 0.18); }
}
@container (max-width: 850px) {
    .q-allocation-minimal .q-main-decision-grid { grid-template-columns: minmax(0, 1fr); }
    .q-allocation-targets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--q-space-4); }
    .q-allocation-target-section + .q-allocation-target-section { border-top: 0; padding-top: 0; }
}
@media (max-width: 540px) {
    .q-allocation-targets { grid-template-columns: minmax(0, 1fr); }
    .q-allocation-selection-context { flex-basis: auto; }
    .q-allocation-minimal .q-allocation-metadata { gap: var(--q-space-2) var(--q-space-4); }
    .q-allocation-summary { gap: var(--q-space-3) var(--q-space-5); }
    .q-allocation-source-details { margin-top: var(--q-space-2); }
}

/* Five-section settings panel: only this surface changes. */
.q-allocation-settings-sidebar .q-settings-section > summary { justify-content:flex-start; gap:var(--q-space-3); min-height:34px; }
.q-allocation-settings-sidebar .q-settings-section > summary::after { display:none; }
.q-allocation-settings-sidebar .q-settings-section > summary::before { content:'›'; flex:0 0 9px; font-size:17px; font-weight:400; line-height:1; }
.q-allocation-settings-sidebar .q-settings-section[open] > summary::before { transform:rotate(90deg); }
.q-allocation-settings-sidebar .q-settings-section-summary { margin-left:auto; font-size:var(--q-font-size-xs); font-weight:400; color:var(--q-text-muted); text-align:right; }
.q-allocation-settings-sidebar .q-settings-section-body { min-width:0; }
.q-allocation-settings-sidebar .q-settings-main-section { padding:var(--q-space-2) 0; }
.q-allocation-settings-sidebar .q-settings-main-section > summary { min-height:42px; }
.q-allocation-settings-sidebar .q-settings-main-section .q-settings-section { padding-left:0; }
.q-allocation-settings-sidebar .q-reference-source-menu { margin-bottom:var(--q-space-2); }
.q-allocation-settings-sidebar .q-reference-source-choice { display:block; width:100%; min-height:32px; padding:6px 10px; border:0; border-left:2px solid transparent; background:transparent; color:var(--q-text-normal); font:inherit; font-size:var(--q-font-size-sm); text-align:left; }
.q-allocation-settings-sidebar .q-reference-source-choice[aria-pressed=true] { color:var(--q-primary); border-left-color:var(--q-primary); background:var(--q-surface-selected); }
.q-allocation-settings-sidebar .q-reference-source-choice:disabled { color:var(--q-text-disabled); }
.q-allocation-settings-sidebar .q-reference-preview { white-space:pre-line; font-size:var(--q-font-size-xs); color:var(--q-text-muted); line-height:1.7; }
.q-allocation-settings-sidebar .q-reference-total { border-top:1px solid var(--q-border-subtle); padding:var(--q-space-3) 0; font-size:var(--q-font-size-sm); text-align:right; }
/* #1028: ref/kıyas toplamı %100 üstü bilgi; mevcut uyarı token'ı, ikon + metin. */
.q-allocation-settings-sidebar .q-reference-leverage { color:var(--q-warning-fg); }
.q-allocation-settings-sidebar .q-settings-input-row.is-expanded > .q-slider-item-summary { border-left:2px solid var(--q-primary); background:var(--q-surface-selected); padding-left:var(--q-space-2); }
.q-allocation-settings-sidebar .q-settings-input-row.is-readonly .q-slider-item-chevron { visibility:hidden; }
.q-allocation-settings-sidebar .q-sidebar-action { min-height:32px; font-size:var(--q-font-size-xs); }
.q-allocation-settings-sidebar .q-sidebar-action:disabled { color:var(--q-text-disabled); cursor:default; }
.q-allocation-settings-sidebar .q-settings-model-info dd,
.q-allocation-settings-sidebar .q-settings-description { overflow-wrap:anywhere; }
.q-allocation-settings-sidebar .q-settings-model-controls .q-inline-select-label { overflow-wrap:anywhere; }
@media(max-width:767px) {
    .q-allocation-settings-sidebar .q-settings-section > summary,
    .q-allocation-settings-sidebar .q-reference-source-choice,
    .q-allocation-settings-sidebar .q-sidebar-action { min-height:44px; }
}
