.content-grid.is-stock-flow { display: block; }
.sf-workspace { color: #173452; min-width: 0; }
.sf-header, .sf-layout > *, .sf-card, .sf-modal, .sf-detail-panel { background: #fff; border: 1px solid #d8e6f5; border-radius: 6px; }
.sf-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; }
.sf-header h1 { margin: 0 0 4px; color: #0755ad; font-size: 24px; }
.sf-header span { color: #70849b; font-size: 13px; }
.sf-tools button, .sf-tabs button, .sf-sidebar select, .sf-grid-section select, .sf-close { background: #f4f8fd; border: 1px solid #c7dbf1; border-radius: 5px; color: #1255a1; cursor: pointer; }
.sf-tools button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; }
.sf-tabs { display: flex; gap: 5px; padding: 12px 0; }
.sf-tabs button { padding: 8px 18px; font-weight: 700; }
.sf-tabs button.is-active { background: #0d6ddd; border-color: #0d6ddd; color: #fff; }
.sf-layout { display: grid; grid-template-columns: minmax(210px, 240px) minmax(0, 1fr); gap: 12px; align-items: start; }
.sf-sidebar, .sf-grid-section { min-width: 0; padding: 12px; }
.sf-sidebar > header, .sf-grid-section > header { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 8px; margin-bottom: 8px; }
.sf-sidebar h2, .sf-grid-section h2 { margin: 0; color: #0755ad; font-size: 16px; }
.sf-sidebar label, .sf-grid-section > header span { color: #7286a0; font-size: 12px; white-space: nowrap; }
.sf-sidebar select { max-width: 95px; padding: 5px 3px; font-size: 12px; }
/* The list stays pinned beside the (taller) grid while the page scrolls and fills the viewport height. */
.sf-sidebar { position: sticky; top: 12px; }
.sf-sidebar [data-sf-list] { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 150px); min-height: 310px; overflow-y: auto; }
.sf-list-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 14px 13px; gap: 6px; align-items: center; width: 100%; min-height: 53px; padding: 6px; border: 1px solid #e0eaf5; border-radius: 4px; background: #f9fbfe; text-align: left; cursor: pointer; touch-action: pan-y; }
.sf-list-row:hover, .sf-card:hover { border-color: #65a5ef; background: #f3f8ff; }
.sf-rank { color: #8ba0b8; text-align: center; font-size: 12px; }
.sf-list-name strong, .sf-list-name small, .sf-list-price small, .sf-card-head strong, .sf-card-head small { display: block; }
.sf-list-name strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-list-name small, .sf-card-head small { color: #7c90a7; font-size: 11px; }
.sf-list-price { text-align: right; font-weight: 700; font-size: 13px; }
.sf-list-price small { font-size: 11px; }
.sf-grip { color: #a4b7cc; font-size: 15px; }
.sf-remove { color: #a4b7cc; font-size: 16px; line-height: 1; text-align: center; border-radius: 3px; opacity: 0; }
.sf-list-row:hover .sf-remove, .sf-list-row:focus-visible .sf-remove { opacity: 1; }
@media (hover: none) { .sf-remove { opacity: 1; } }
.sf-remove:hover { color: #fff; background: #e34641; }
.sf-add { display: flex; gap: 6px; margin-bottom: 4px; }
.sf-add input { flex: 1; min-width: 0; padding: 5px 7px; border: 1px solid #c7dbf1; border-radius: 5px; font-size: 12px; }
.sf-add button { padding: 5px 10px; border: 1px solid #1769da; border-radius: 5px; background: #1769da; color: #fff; font-size: 12px; cursor: pointer; }
.sf-add-message { display: block; min-height: 15px; margin-bottom: 4px; color: #4f6d8f; font-size: 11px; }
.sf-add-message.sf-error { color: #e34641; }
.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
.sf-grid[data-columns="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sf-grid[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sf-grid[data-columns="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sf-grid[data-columns="3"] .sf-card-chart { height: 265px; }
.sf-grid[data-columns="2"] .sf-card-chart { height: 330px; }
.sf-grid-section select { margin-left: 2px; padding: 3px 2px; font-size: 12px; }
.sf-card { display: block; min-width: 0; min-height: 300px; padding: 10px 12px; text-align: left; cursor: pointer; touch-action: pan-y; }
.sf-card-head, .sf-card-foot { display: flex; justify-content: space-between; align-items: start; gap: 8px; }
.sf-card-head strong { font-size: 15px; }
/* Price in black; only the change carries the up (red) / down (green) colour. */
.sf-card-price, .sf-list-price, .sf-modal-price { color: #1b2533; }
.sf-card-price { font-size: 17px; font-weight: 800; text-align: right; }
.sf-card-head .sf-up, .sf-modal-head .sf-up { color: #e34641; }.sf-card-head .sf-down, .sf-modal-head .sf-down { color: #0c9b68; }
.sf-card-price small { display: block; font-size: 12px; }
.sf-card-chart { display: block; height: 215px; margin: 6px 0 2px; }
.sf-bands { display: flex; flex-direction: column; gap: 3px; height: 100%; }
.sf-band { position: relative; display: block; }
.sf-band + .sf-band { border-top: 1px solid #eef3f9; }
.sf-band svg { display: block; width: 100%; height: 100%; }
.sf-band em { position: absolute; top: 1px; left: 4px; padding: 0 2px; border-radius: 2px; background: #ffffffd9; color: #8a9bb0; font-size: 10px; font-style: normal; line-height: 1; pointer-events: none; }
.sf-empty-chart, .sf-panel-empty, .sf-modal-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: #8496ab; font-size: 13px; }
.sf-card-foot { color: #667e98; font-size: 11px; }
.sf-card-foot b { white-space: nowrap; }
.sf-partial { color: #a67126; font-size: 10px; }
.sf-up { color: #e34641; }.sf-down { color: #0c9b68; }
.sf-dragging { opacity: .55; border-color: #1677e7 !important; }.sf-drop-target { outline: 2px solid #1677e7; outline-offset: -2px; }
.sf-list-row.sf-dragging, .sf-card.sf-dragging { touch-action: none; }
.sf-modal-open { overflow: hidden; }
.sf-modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: center; padding: 20px; background: rgba(13, 32, 58, .6); }
.sf-modal { width: min(1100px, 100%); max-height: min(92vh, 1100px); overflow: auto; padding: 16px; box-shadow: 0 20px 50px #0b2b4b44; }
.sf-modal-head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.sf-modal-head > div { flex: 1; min-width: 0; }.sf-modal-head h2 { margin: 0 0 3px; font-size: 22px; }.sf-modal-head h2 small { color: #8293a8; font-size: 13px; }
.sf-modal-head span { color: #6c809a; font-size: 12px; }.sf-modal-head > strong { white-space: nowrap; font-size: 21px; }.sf-modal-head > strong small { font-size: 14px; }
.sf-close { width: 32px; height: 32px; font-size: 25px; line-height: 1; }
.sf-hover-value { position: sticky; top: -16px; z-index: 1; min-height: 30px; padding: 6px 10px; background: #edf5ff; color: #174e88; font-size: 12px; }
.sf-detail-panel { margin-top: 9px; padding: 8px 10px; }
.sf-detail-panel header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 5px; }
.sf-detail-panel h3 { margin: 0; font-size: 14px; }.sf-detail-panel h3 small { color: #8a9eb4; font-size: 11px; }
.sf-detail-panel header span { color: #5d7089; font-size: 11px; }.sf-detail-panel i { display: inline-block; width: 16px; height: 2px; margin: 0 5px 3px 9px; background: var(--line); }
.sf-detail-chart { display: block; width: 100%; height: auto; }
.sf-swatch { display: inline-block; width: 7px; height: 9px; margin: 0 1px 1px; background: var(--swatch); vertical-align: middle; }
.sf-swatch-first { margin-left: 9px; }
.sf-detail-panel .sf-dashed { height: 0; background: none; border-top: 2px dashed #b9c7d8; }
.sf-panel-empty { height: 90px; }.sf-modal-empty { min-height: 240px; }.sf-time-axis { position: relative; height: 16px; margin: 4px 11px 0; color: #7c8fa5; font-size: 11px; }
.sf-time-axis span { position: absolute; top: 0; white-space: nowrap; transform: translateX(-50%); }.sf-time-axis span:last-child { transform: translateX(-100%); }.sf-time-axis span:first-child { transform: none; }
@media (max-width: 760px) { .sf-layout { grid-template-columns: minmax(0, 1fr); }.sf-sidebar { position: static; }.sf-sidebar [data-sf-list] { max-height: 215px; min-height: 0; }.sf-grid, .sf-grid[data-columns] { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }.sf-grid[data-columns] .sf-card-chart { height: 215px; }.sf-modal-backdrop { padding: 5px; }.sf-modal { max-height: 98vh; padding: 10px; } }
