.collection-choice { width: min(680px, calc(100vw - 32px)); }
.collection-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; margin:var(--ds-space-4) 0 var(--ds-space-1); }
.collection-option { display: flex; flex-direction: column; align-items: flex-start; gap:var(--ds-space-3); padding:22px; border:var(--ds-border-width) solid #d8dfdb; border-radius: 18px; background: #f8faf8; color: #253c32; text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.collection-option:hover, .collection-option:focus-visible { border-color: #307456; background: #eef6f0; }
.collection-option strong { font-size: 1.2rem; }
.collection-option > span:not(.collection-option-icon) { line-height: 1.5; }
.collection-option-icon { font-size: 2rem; color: #327753; }
.collection-option small { padding:10px; background: #fff6df; border-radius: 8px; color: #73551c; line-height: 1.45; }
.collection-option-link { margin-top:auto; font-weight: 600; font-size: .88rem; }
.watchlists-dialog { width: min(980px, calc(100vw - 32px)); }
.watchlist-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap:10px; margin:20px 0; }
.watchlist-toolbar > div { flex: 1 1 220px; min-width: 0; }
.watchlist-toolbar label, .watchlist-search label { margin-top:0; }
.watchlist-toolbar select { width: 100%; }
.watchlist-search { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(180px, 2fr) auto; gap:var(--ds-space-3); align-items: end; padding:var(--ds-space-4); background: #f3f6f4; border-radius:var(--ds-radius-panel); }
.watchlist-search > div { min-width: 0; }
.watchlist-search input, .watchlist-search select { width: 100%; min-width: 0; }
.watchlist-search .button { min-height:var(--ds-control-min-height); }
.watchlist-heading { display: flex; justify-content: space-between; align-items: baseline; gap:var(--ds-space-3); margin-top:22px; }
.watchlist-heading h3 { overflow-wrap: anywhere; margin:var(--ds-space-2) 0; }
.watchlist-heading > span { flex-shrink: 0; color: #647069; font-size: .88rem; }
.watchlist-empty { padding:var(--ds-space-6) 20px; border: 1px dashed #bdcfc2; border-radius:var(--ds-radius-dialog); text-align: center; color: #647069; line-height: 1.5; }
.watchlist-entry { display: grid; grid-template-columns: var(--ds-control-min-height) minmax(0, 1fr); align-items: center; gap:var(--ds-space-1); margin-bottom:5px; }
.watchlist-entry-name { display: flex; flex-direction: column; gap:6px; min-width: 0; overflow-wrap: anywhere; }
.watchlist-entry-name small { color: #647069; }
.watchlist-entry-price { display: flex; flex-direction: column; gap:var(--ds-space-1); align-items: flex-end; font-variant-numeric: tabular-nums; }
.watchlist-entry-price small { font-size:var(--ds-font-size-caption); color: #647069; text-align: right; }
.watchlist-entry-actions { display: flex; flex-direction: column; gap:var(--ds-space-2); }
.watchlist-entry-actions .button { min-height:var(--ds-control-min-height); }
.watchlist-small-dialog { width: min(440px, calc(100vw - 32px)); }
#watchlist-status, #watchlist-search-status { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .collection-options { grid-template-columns: 1fr; }
  .collection-option { padding:var(--ds-space-4); gap:var(--ds-space-2); }
  .collection-option-icon { font-size: 1.5rem; }
  .watchlist-toolbar { align-items: stretch; }
  .watchlist-toolbar > div { flex-basis: 100%; }
  .watchlist-toolbar > button { flex: 1 1 120px; min-height:var(--ds-control-min-height); }
  .watchlist-search { grid-template-columns: minmax(0, 1fr); padding:var(--ds-space-3); }
  .watchlist-entry { grid-template-columns: minmax(0, 1fr) auto; gap:var(--ds-space-3); }
  .watchlist-entry-name { grid-column: 1 / -1; }
  .watchlist-entry-price { align-items: flex-start; }
  .watchlist-entry-price small { text-align: left; }
  .watchlist-entry-actions { align-items: stretch; }
}

.collection-close { justify-content: flex-end; margin:0; }
.compact-collection-menu, .instrument-destination-menu { position: fixed; inset: auto; margin:0; width: min(340px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-sizing: border-box; overflow-y: auto; border:var(--ds-border-width) solid #dedede; border-radius: 11px; padding:var(--ds-space-2); background: #fff; box-shadow: 0 10px 30px #172a1c26; color: #23382d; }
.compact-collection-menu .collection-options { display: flex; flex-direction: column; gap:0; margin:0; }
.compact-collection-menu .collection-option { display: grid; grid-template-columns: 24px minmax(0, 1fr); border: 0; border-radius:var(--ds-radius-control); padding:var(--ds-space-3); gap:6px 10px; background: #fff; }
.compact-collection-menu .collection-option strong { font-size:var(--ds-font-size-body); align-self: center; }
.compact-collection-menu .collection-option > span:not(.collection-option-icon), .compact-collection-menu .collection-option small { grid-column: 2; font-size:var(--ds-font-size-help); line-height: 1.4; }
.compact-collection-menu .collection-option-icon { font-size: 1.35rem; }
.compact-collection-menu .collection-option small { padding:0; color: #876227; background: transparent; }
.compact-collection-menu .collection-option:hover, .instrument-destination-menu .collection-option:hover { background: #f2f7f3; }
.compact-collection-menu .collection-option + .collection-option { border-top: 1px solid #edf0ee; border-radius: 0 0 7px 7px; }
.compact-collection-menu .collection-close .icon-button { min-width: 32px; min-height: 32px; width: 32px; height: 32px; }
.instrument-destination-menu { width: min(270px, calc(100vw - 24px)); }

.destination-options { display: grid; gap:var(--ds-space-1); }
.destination-options .collection-option { padding:var(--ds-space-3); border: 0; border-radius:var(--ds-radius-input); background: white; min-height:var(--ds-control-min-height); }
.watchlist-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.watchlist-table th:first-child { width: 65%; }
.watchlist-table th:nth-child(2) { width: 20%; }
.watchlist-table th:last-child { width: 15%; }
.watchlist-table th, .watchlist-table td { padding:14px 10px; text-align: left; border-bottom: 1px solid #e1e7e3; }
.watchlist-list-row { cursor: pointer; }
.watchlist-list-row:hover { background: #f5f8f5; }
.watchlist-name-link { padding:var(--ds-space-1) 0; border: 0; background: transparent; color: #245e3f; font: inherit; font-weight: 600; text-align: left; overflow-wrap: anywhere; cursor: pointer; min-height:var(--ds-control-min-height); }
.watchlist-name-link:hover { text-decoration: underline; }
.watchlist-list-actions { text-align: right !important; }
.watchlist-default svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.watchlist-default[aria-pressed="true"] svg { fill: currentColor; }
.watchlist-default { color: var(--ds-color-action-text); flex-shrink: 0; }
.watchlist-list-actions .row-menu-content { right: 0; }
.watchlist-check { display: flex; align-items: center; gap:var(--ds-space-3); min-height: 48px; padding:10px; border-bottom: 1px solid #e3e9e5; cursor: pointer; margin:0; }
.watchlist-check input { width: 20px; height: 20px; flex: 0 0 20px; margin:0; accent-color: #36734f; }
.watchlist-check span { overflow-wrap: anywhere; min-width: 0; }
.watchlist-check small { color: #647069; margin-left:auto; }
#watchlist-picker-options { max-height: 45dvh; overflow-y: auto; margin-bottom:14px; }
#watchlist-active-name, [data-watchlist-node="watchlist-active-name"] { overflow-wrap: anywhere; }
#value-editor-dialog.is-watchlist .basic-fields { grid-template-columns: minmax(0, 1fr); }
#value-editor-dialog.is-watchlist .asset-type-field, #value-editor-dialog.is-watchlist .listing-autocomplete { grid-column: 1 / -1; }
@media (max-width: 600px) {
  .watchlist-table thead { display: none; }
  .watchlist-table, .watchlist-table tbody { display: block; }
  .watchlist-table tr { display: grid; grid-template-columns: minmax(0, 1fr) 92px; border-bottom: 1px solid #e1e7e3; padding:10px 0; }
  .watchlist-table td { display: block; border: 0; padding:2px 6px; }
  .watchlist-table td:first-child { grid-column: 1; }
  .watchlist-table td:nth-child(2) { grid-column: 1; color: #647069; font-size: .85rem; }
  .watchlist-table td:nth-child(2)::before { content: attr(data-label) ': '; }
  .watchlist-table .watchlist-list-actions { grid-column: 2; grid-row: 1 / 3; align-self: center; display: flex; align-items: center; justify-content: flex-end; padding: 0; gap: 4px; }
  .watchlist-check small { max-width: 80px; font-size:var(--ds-font-size-caption); }
}

.compact-collection-menu { padding:5px; }
.compact-collection-menu .collection-menu-row { display: grid; grid-template-columns: minmax(0, 1fr) 40px; align-items: center; }
.compact-collection-menu .collection-menu-row + .collection-menu-row { border-top: 1px solid #edf0ee; }
.compact-collection-menu .collection-option { display: block; min-width: 0; min-height:var(--ds-control-min-height); padding:10px; font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.collection-info { display: flex; align-items: center; justify-content: center; width: 40px; min-height:var(--ds-control-min-height); padding:0; border: 0; border-radius:var(--ds-radius-control); background: transparent; color: #657269; cursor: pointer; }
.collection-info > span { display: flex; align-items: center; justify-content: center; width: 17px; height: 17px; border:var(--ds-border-width) solid currentColor; border-radius:var(--ds-radius-round); font-family: Georgia, serif; font-size: 12px; font-weight: bold; line-height: 1; }
.collection-info:hover, .collection-info:focus-visible, .collection-info[aria-expanded=true] { background: #edf4ef; color: #245e3f; }
.collection-menu-help { grid-column: 1 / -1; margin:0; padding:2px 10px var(--ds-space-3); color: #657269; font-size:var(--ds-font-size-help); line-height: 1.45; overflow-wrap: anywhere; }
.collection-menu-help[hidden] { display: none; }

.watchlists-dialog .watchlist-entry-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(75px, .45fr) minmax(150px, .8fr); align-items: center; gap:var(--ds-space-1) var(--ds-space-3); padding:3px 10px; border:var(--ds-border-width) solid #d6e5ed; border-radius: 10px; background: #f7fbfd; }
.watchlist-entry-card .watchlist-entry-name { display: flex; flex-direction: row; align-items: center; gap:var(--ds-space-2); grid-column: 1; grid-row: 1; min-width: 0; }
.watchlist-entry-card .watchlist-name-link { color: var(--orange-dark, #a34f00); text-decoration: underline; font-size: .94rem; font-weight:var(--ds-font-weight-heading); line-height: 1.25; min-width: 0; min-height:var(--ds-control-min-height); }
.watchlist-remove-entry { display: inline-grid; place-items: center; width: var(--ds-control-min-height); min-height:var(--ds-control-min-height); border: 0; border-radius: 8px; background: transparent; color: var(--orange-dark, #a34f00); font-size: 1.2rem; cursor: pointer; }
.watchlist-remove-entry:hover, .watchlist-remove-entry:focus-visible { background: #fff0db; }
.watchlists-dialog .watchlist-entry-card .watchlist-entry-price { display: block; grid-column: 2; grid-row: 1; color: #111; padding:0; min-width: 0; font-size:var(--ds-font-size-control); font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.watchlist-entry-card .watchlist-daily-change { display: block; grid-column: 3; grid-row: 1; margin:0; padding:0; border: 0; min-width: 0; color: #111; font-size:var(--ds-font-size-control); line-height: 1.3; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.watchlist-entry-card .watchlist-daily-change.positive { color: #078329; }
.watchlist-entry-card .watchlist-daily-change.negative { color: #d21f2b; }
.watchlist-group-heading { margin:14px 0 6px; padding:5px 10px; color: #725647; background: #faf7f5; border-block: 1px solid #e6ddd6; font-size: .7rem; line-height: 1.3; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.watchlist-group-heading:first-child { margin-top:0; }
.watchlist-crypto-icon { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border-radius:var(--ds-radius-round); overflow: hidden; }
.watchlist-crypto-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.watchlist-crypto-icon .crypto-icon-monogram { display: grid; place-items: center; width: 100%; height: 100%; background: #e7edf1; color: #485a66; font-size: .62rem; font-weight:var(--ds-font-weight-heading); }

.instrument-destination-menu { overflow-x: hidden; }
.destination-options { min-width: 0; }
.destination-options .collection-option { width: 100%; min-width: 0; box-sizing: border-box; white-space: normal; overflow-wrap: anywhere; text-align: left; }

.compact-collection-menu .collection-option, .destination-options .collection-option { display: flex; flex-direction: row; align-items: center; gap:var(--ds-space-2); }
.collection-item-icon { display: block; width: 28px; height: 28px; flex: 0 0 28px; object-fit: contain; }
.compact-collection-menu .collection-option > .collection-item-label, .destination-options .collection-option > .collection-item-label { min-width: 0; font-size: inherit; line-height: 1.35; overflow-wrap: anywhere; }
.collection-section-title { display: flex; align-items: center; gap:9px; min-width: 0; }
.collection-section-title h2 { margin:0; min-width: 0; overflow-wrap: anywhere; }
.collection-section-icon { display: block; width: 34px; height: 34px; flex: 0 0 34px; object-fit: contain; }
@media (max-width: 400px) {
  .collection-section-title { gap:7px; }
  .collection-section-icon { width: 28px; height: 28px; flex-basis: 28px; }
}
.watchlist-title-editor { display: flex; align-items: center; gap: var(--ds-space-2); min-width: 0; }
.watchlist-title-editor h2 { min-width: 0; margin: 0; }
.watchlist-editable-name { display: block; max-width: 100%; min-height: var(--ds-control-min-height); padding: var(--ds-space-1) var(--ds-space-2); border: var(--ds-border-width) dashed var(--ds-color-action-border); border-radius: var(--ds-radius-control); background: var(--ds-color-action-surface); color: inherit; font: inherit; text-align: left; overflow-wrap: anywhere; touch-action: manipulation; }
.watchlist-editable-name:hover { background: var(--ds-color-action-soft); border-color: var(--ds-color-action); }
#watchlist-count, [data-watchlist-node="watchlist-count"] { margin: 0; }
.watchlist-name-input { box-sizing: border-box; width: 100%; min-width: 0; margin: 0; font: inherit; }
.watchlist-name-input[hidden], .watchlist-editable-name[hidden] { display: none; }
#portfolio-dialog .collection-section-title { gap: 4px; margin-left: -8px; }
#portfolio-dialog .collection-section-icon { width: 41px; height: 41px; flex-basis: 41px; }
@media (max-width: 400px) {
  #portfolio-dialog .collection-section-icon { width: 34px; height: 34px; flex-basis: 34px; }
}

.watchlist-entry-meta { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 0 var(--ds-space-2); min-width: 0; color: var(--ds-color-text-muted); overflow-wrap: anywhere; }
.watchlist-entry-meta small { min-width: 0; font-size: var(--ds-font-size-help); }
.watchlist-entry-listing { font-weight: var(--ds-font-weight-heading); }
@media (max-width: 700px) {
  .watchlists-dialog .watchlist-entry { display:block; position:relative; overflow:hidden; }
  .watchlists-dialog .watchlist-entry-card { grid-template-columns: minmax(0, 1fr) minmax(100px, .8fr); gap: 1px var(--ds-space-2); padding: 2px 9px 7px; }
  .watchlist-entry-card .watchlist-entry-name { grid-column: 1; grid-row: 1; }
  .watchlists-dialog .watchlist-entry-card .watchlist-entry-price { grid-column: 2; grid-row: 1; align-self: center; text-align: right; }
  .watchlist-entry-card .watchlist-daily-change { grid-column: 2; grid-row: 2; }
  .watchlist-remove-entry { position:absolute; top:var(--ds-space-2); left:var(--ds-space-2); }
}
