.view-toolbar { display:flex; align-items:center; gap:12px; margin:0 0 16px; min-width:0; }
.watchlist-scope { display:flex; flex:1; align-items:center; gap:8px; min-width:0; }
.watchlist-scope[hidden], .watch-filter-menu[hidden] { display:none; }
.watch-scope-indicator { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border:1px solid var(--border); border-radius:var(--design-chip-radius,8px); background:var(--panel-2); color:var(--text); font-size:11px; font-weight:600; line-height:18px; white-space:nowrap; }
.watch-scope-indicator[hidden] { display:none; }
.watch-scope-dot { width:6px; height:6px; border-radius:50%; background:var(--up); }
html[data-watchlist-filtered] #navWatchlist { position:relative; }
html[data-watchlist-filtered] #navWatchlist::after { content:''; position:absolute; top:8px; right:8px; width:7px; height:7px; border-radius:50%; background:var(--up); box-shadow:0 0 0 2px var(--bg); }
html[data-watchlist-filtered] :is(#eventsView,#weeklyView,#atlasView,#dashboardView,#connectionsView,#stocksView,#daysView,#signalView,#mapView)::before { content:'FILTERED TO WATCHLIST'; display:table; margin:0 0 12px; padding:0 0 0 14px; background:radial-gradient(circle at 3px 50%,var(--up) 3px,transparent 4px) no-repeat; color:var(--text-meta); font-size:10px; font-weight:600; letter-spacing:.04em; line-height:1.5; }
html[data-watchlist-filtered] :is(.chart-folder,#weeklyChart,.dash-trend-panel,.atlas-detail-panel:has(.atlas-line))::before, html[data-watchlist-filtered] .cx-map-caption::after { content:'WATCHLIST SCOPE'; display:table; margin:8px 10px; padding:0 0 0 14px; background:radial-gradient(circle at 3px 50%,var(--up) 3px,transparent 4px) no-repeat; color:var(--text-meta); font-size:10px; font-weight:600; letter-spacing:.03em; line-height:1.5; }
html[data-theme] .view-toolbar .view-sort-picker select { height:36px; min-height:36px; min-width:0; padding:0 28px 0 10px; border:1px solid var(--border); border-radius:8px; background:var(--panel); color:var(--text); font:inherit; font-size:12px; cursor:pointer; }
.watch-scope-controls { display:inline-flex; flex:0 0 auto; align-items:center; gap:2px; padding:2px; border:1px solid var(--border); border-radius:10px; background:transparent; }
html[data-theme] .watch-scope-controls button { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:30px; margin:0; padding:0 10px; border:0; border-radius:7px; background:transparent; color:var(--text-meta); box-shadow:none; font:inherit; font-size:12px; line-height:1.4; white-space:nowrap; cursor:pointer; }
html[data-theme] .watch-scope-controls button[aria-pressed="true"] { background:var(--panel-2); color:var(--text); }
.watch-scope-controls [data-watch-count] { font-size:10px; font-variant-numeric:tabular-nums; opacity:.75; }
.watch-filter-menu { position:relative; flex:0 0 auto; }
.watch-filter-menu summary { display:flex; align-items:center; gap:6px; min-height:36px; padding:0 8px; color:var(--text-meta); font-size:12px; list-style:none; cursor:pointer; }
.watch-filter-menu summary::-webkit-details-marker { display:none; }
.watch-filter-menu summary:hover, .watch-filter-menu[open] summary { color:var(--text); }
[data-watch-links-count] { font-size:10px; font-variant-numeric:tabular-nums; color:var(--text-meta); }
.watch-filter-panel { position:absolute; top:calc(100% + 8px); left:0; z-index:60; width:240px; padding:14px; border:1px solid var(--border); border-radius:12px; background:var(--panel); backdrop-filter:blur(28px); -webkit-backdrop-filter:blur(28px); box-shadow:0 12px 36px rgba(0,0,0,.24); }
.watch-link-groups { display:grid; gap:2px; min-inline-size:0; margin:0; padding:0 0 10px; border:0; }
.watch-link-groups legend { margin-bottom:8px; padding:0; font-size:11px; color:var(--text-meta); }
.watch-link-groups label { display:flex; align-items:center; gap:9px; min-height:34px; color:var(--text); font-size:12px; cursor:pointer; }
.watch-link-groups input { appearance:auto; flex:0 0 14px; width:14px; height:14px; min-height:0; margin:0; padding:0; accent-color:var(--accent); cursor:pointer; }
.watch-link-groups label:has(input:disabled) { opacity:.5; cursor:wait; }
.watch-manage { display:flex; align-items:center; justify-content:space-between; width:100%; padding:12px 0 0; border:0; border-top:1px solid var(--border); background:transparent; color:var(--text); font:inherit; font-size:12px; cursor:pointer; }
.watchlist-note { font-size:11px; line-height:1.5; color:var(--text-meta); }
.watchlist-note:empty { display:none; }
.watchlist-action, .watch-retry { min-height:40px; padding:8px 12px; border:1px solid var(--border); border-radius:var(--design-button-radius,9px); background:var(--panel); color:var(--text); font:inherit; font-size:12px; cursor:pointer; }
.watchlist-scope :is(button,input,select,summary):focus-visible, .watchlist-page :is(button,input,select):focus-visible, .view-sort-picker select:focus-visible { outline:2px solid var(--text-meta); outline-offset:3px; }
.watchlist-scope :is(button,input):disabled, .watchlist-page button:disabled { opacity:.5; cursor:wait; }
html[data-theme] .view-toolbar .events-sort-bar { display:flex; align-items:center; flex-direction:row; min-height:0; height:auto; margin:0 0 0 auto; gap:16px; }
.view-sort-picker { display:flex; align-items:center; gap:8px; color:var(--text-meta); font-size:12px; white-space:nowrap; }
html[data-theme] .view-toolbar .events-sort-segmented { display:none; }
.main:not(:has(> #eventsView:not(.hidden))) .view-toolbar .events-sort-bar { display:none; }
.main:not(:has(> #eventsView:not(.hidden))) .view-toolbar:has(.watchlist-scope[hidden]) { display:none; }
@media (max-width:768px) {
  .view-toolbar { margin-bottom:12px; }
  .watchlist-scope { position:relative; flex-wrap:wrap; gap:4px; }
  .watch-filter-menu { position:static; }
  html[data-theme] .watch-scope-controls button { min-height:36px; padding:0 8px; font-size:11px; }
  .watch-filter-menu summary { min-height:40px; }
  .watch-filter-panel { left:0; right:auto; width:min(260px,calc(100vw - 32px)); }
  .watch-link-groups label { min-height:40px; }
  .watchlist-note { flex:1 1 100%; }
  .view-toolbar .view-sort-picker, .view-toolbar .events-pro-badge { display:none; }
  html[data-theme] .view-toolbar .events-sort-segmented.is-open { display:grid; }
}
.watch-star { display: inline-flex; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--design-button-radius, 10px); background: var(--panel-2); color: var(--text-meta); cursor: pointer; }
.watch-star.is-saved { color: var(--text); }
.watch-star:disabled { opacity: .5; cursor: wait; }
.watch-star svg { flex: 0 0 18px; }
.cluster-title { display:flex; align-items:center; gap:10px; min-width:0; }
.cluster-title .cluster-name { flex:1; min-width:0; margin:0; }
.watchlist-scope button:focus-visible, .watchlist-page :is(button,input,select):focus-visible, .watch-star:focus-visible { outline: 2px solid var(--text-meta); outline-offset: 3px; }
.stocks-tile-wrap { position: relative; min-width: 0; }
.stocks-tile-wrap .stocks-tile { width: 100%; height: 100%; padding-bottom: 44px; }
.stocks-tile-wrap > .watch-star { position: absolute; bottom: 5px; right: 5px; }
.watchlist-page { padding: 10px 0 32px; }
.watchlist-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.watchlist-heading h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.035em; }
.watchlist-heading p, .watchlist-status { color: var(--text-meta); font-size: 12px; line-height: 1.6; }
.watchlist-status { min-height: 20px; }
.watchlist-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 8px; }
.watchlist-stock { display: grid; grid-template-columns:minmax(0,1fr) auto; align-items: start; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--design-card-radius, 12px); background: var(--panel); }
.watchlist-stock > div { min-width: 0; }
.watchlist-stock strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.watchlist-stock small { display: block; margin-top: 5px; color: var(--text-meta); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.watchlist-company-open { border:0; background:transparent; padding:0; color:var(--text); font:inherit; font-size:14px; font-weight:600; text-align:left; overflow-wrap:anywhere; cursor:pointer; }
.watchlist-company-open:hover { text-decoration:underline; text-underline-offset:3px; }
.watchlist-card-price,.watchlist-card-themes { grid-column:1/-1; display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 10px; font-size:12px; }
.watchlist-card-price small { flex-basis:100%; }
.watchlist-card-themes { color:var(--text-meta); font-size:11px; }
.watchlist-panel { margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: var(--design-card-radius, 16px); background: var(--panel); }
.watchlist-panel h2 { margin: 0 0 16px; font-size: 17px; }
.watchlist-add-form { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.watchlist-add-form label, .watchlist-search { display: grid; gap: 7px; color: var(--text-meta); font-size: 12px; }
.watchlist-add-form label:first-child { flex: 1 1 180px; }
.watchlist-page input, .watchlist-page select { min-width: 0; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--design-input-radius, 9px); background: var(--panel-2); color: var(--text); font: inherit; font-size: 14px; }
.watchlist-empty { grid-column: 1 / -1; margin: 0; padding: 15px 0; font-size: 13px; line-height: 1.7; color: var(--text-meta); }
.watchlist-panel > .watchlist-action { margin-top: 12px; }
.price-bar-title:has(.watch-star) { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
@media (max-width: 768px) {
  .watchlist-action, .watch-retry { min-height: 44px; }
  .watch-star { width: 44px; height: 44px; flex-basis: 44px; }
  .stocks-tile-wrap .stocks-tile { padding-bottom: 52px; }
  .watchlist-panel { padding: 14px; }
  .watchlist-page input, .watchlist-page select { font-size: 16px; }
  .watchlist-add-form { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  .watchlist-add-form label:first-child { grid-column: 1 / -1; }
  .watchlist-grid { grid-template-columns: minmax(0,1fr); }
}
