/* Regional layout: shared table styles plus compact geographic navigation. */
.tabs:empty { display:none; }
.shell { padding-top:12px; }
.topbar { min-height:12px; margin-bottom:8px; }
.header-actions .live-state { gap:5px; color:#748091; font-size:9px; line-height:12px; }
.header-actions .live-dot { width:3px; height:3px; box-shadow:none; }
.header-actions .live-state.error .live-dot { box-shadow:none; }
.market-overview { border-color:#1c242e; background:#0e1218; }
/* Content-sized cards stay compact; wrapped rows remain centered. */
@media(min-width:701px) { .market-overview { justify-content:center; } }
.market-overview .overview-custom { flex:0 0 124px; min-width:0; }
.market-overview .overview-item { flex:1 1 auto; min-width:0; }
.market-overview .overview-custom .overview-item { touch-action:pan-x pan-y; }
.market-overview .overview-name { min-width:0; }
.market-overview .overview-label { min-width:0; overflow:hidden; text-overflow:ellipsis; }
.market-overview .overview-proxy { flex:none; font-size:8px; font-weight:500; color:#a3b2c4; border:1px solid #ffffff20; border-radius:3px; padding:1px 3px; }
.market-overview .overview-add { flex:0 0 34px; align-self:stretch; }
.overview-item { min-height:76px; padding:9px 12px; gap:5px; }
@media(min-width:701px) {
  .market-overview { border-radius:6px; gap:0; }
  .market-overview .overview-custom { flex:0 0 var(--overview-stable-width,160px); width:var(--overview-stable-width,160px); min-width:0; max-width:100%; }
  .market-overview .overview-custom .overview-item { display:grid; grid-template-columns:minmax(0,1fr) var(--overview-change-width,44px); flex:1 1 auto; width:100%; max-width:100%; box-sizing:border-box; align-content:center; gap:2px 6px; min-height:38px; padding:4px 16px 4px 7px; }
  .market-overview .overview-name { grid-column:1 / -1; gap:4px; line-height:14px; }
  .market-overview .overview-logo { width:14px; height:14px; flex-basis:14px; font-size:7px !important; }
  .market-overview .overview-label { font-size:10px; font-weight:500; }
  .market-overview .overview-item .overview-price { min-width:0; overflow:hidden; text-overflow:ellipsis; justify-self:stretch; font-size:11px; line-height:14px; font-weight:500; white-space:nowrap; }
  .market-overview .overview-item strong { margin:0; min-width:0; max-width:100%; overflow:hidden; text-overflow:ellipsis; justify-self:end; font-size:10px; line-height:14px; font-weight:500; white-space:nowrap; }
  .market-overview .overview-remove { top:3px; right:2px; width:14px; height:14px; padding:0; line-height:14px; font-size:11px; }
  .market-overview .overview-add { min-height:38px; flex-basis:28px; font-size:16px; }
  .market-overview .overview-proxy { font-size:7px; padding:0 2px; line-height:11px; }
  .shell .tabs.region-navigation { margin-top:12px; }
}

/* The landing view keeps the market overview and navigation in focus. */
.watchlist-home .manager-toolbar,.panel[hidden],footer[hidden],.watchlist-welcome[hidden] { display:none; }
.watchlist-welcome { margin:0; padding:34px 16px; color:#8897aa; font-size:13px; line-height:1.6; text-align:center; }

/* All regions stay visible. Compact rows leave more room for market data. */
.tabs.region-navigation { display:block; margin:18px 0 10px; padding:4px 16px; background:#0e1218; border:1px solid #1d252f; border-radius:10px; }
.region-group { display:grid; grid-template-columns:184px minmax(0,1fr); align-items:start; gap:20px; padding:8px 0; }
.region-group + .region-group { border-top:1px solid #ffffff05; }
/* A compact emblem column keeps all region names and first buttons aligned. */
.region-heading { display:grid; grid-template-columns:52px minmax(0,1fr); align-items:center; gap:10px; min-width:0; min-height:34px; margin:0; color:#b5c0cf; font-size:12px; font-weight:500; letter-spacing:0; text-transform:none; line-height:18px; white-space:nowrap; }
.region-emblems { display:flex; align-items:center; justify-content:center; width:52px; isolation:isolate; }
.region-emblems img { position:relative; z-index:3; display:block; flex:none; width:20px; height:15px; object-fit:cover; border-radius:2px; outline:1px solid #ffffff12; outline-offset:-1px; box-shadow:0 0 0 1px #0e1218; }
.region-emblems img + img { margin-inline-start:-4px; }
.region-emblems img:nth-child(2) { z-index:2; }
.region-emblems img:nth-child(3) { z-index:1; }
.region-symbol { height:20px; }
.region-symbol .watchlist-icon { width:17px; height:17px; color:#9aabc4; }
[data-region="personal"] .region-symbol .watchlist-icon { color:#c8b17f; }
.region-symbol > .region-icon { display:block; width:20px; height:20px; flex:none; }
.region-watchlists { display:flex; align-items:center; flex-wrap:wrap; gap:6px; min-width:0; width:var(--region-row-width,100%); max-width:100%; }
.region-navigation .tab,.tab.watchlist-drag-preview { min-height:34px; max-width:100%; padding:6px 10px; gap:7px; border-radius:7px; border-color:#ffffff08; background:#161d26; color:#c6d0df; flex:0 0 auto; line-height:20px; transition:background-color .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease; }
.region-navigation .tab .watchlist-title,.tab.watchlist-drag-preview .watchlist-title { min-width:0; font-size:12px; font-weight:500; gap:7px; white-space:normal; overflow-wrap:anywhere; line-height:20px; }
.region-navigation .tab .watchlist-name,.tab.watchlist-drag-preview .watchlist-name { font:inherit; align-self:baseline; }
.region-navigation .tab small,.tab.watchlist-drag-preview small { display:none; }
.region-navigation .tab.active { color:#f3f7ff; background:#263c57; border-color:#6584ac; box-shadow:inset 0 1px 0 #ffffff08; }
.region-navigation .tab:hover { color:#f1f6ff; background:#202b38; border-color:#ffffff1c; }
.region-navigation .tab.active:hover { background:#2c4462; border-color:#84a1c5; }
.region-navigation .tab:focus-visible { outline:2px solid #8eafe0; outline-offset:2px; }
.region-navigation .tab .watchlist-icon,.tab.watchlist-drag-preview .watchlist-icon { width:16px; height:16px; flex:0 0 16px; object-fit:contain; }
.region-navigation .tab svg.watchlist-icon,.tab.watchlist-drag-preview svg.watchlist-icon { box-sizing:border-box; padding:1px; }
.region-navigation .tab .watchlist-brand,.tab.watchlist-drag-preview .watchlist-brand { border-radius:4px; }
.region-navigation .tab.removable,.tab.watchlist-drag-preview.removable { padding-right:28px; }
.region-navigation .tab.removable.renameable,.tab.watchlist-drag-preview.removable.renameable { padding-right:46px; }
.region-navigation .tab .watchlist-delete,.tab.watchlist-drag-preview .watchlist-delete { right:5px; width:18px; height:18px; }
.region-navigation .tab.removable .watchlist-rename,.tab.watchlist-drag-preview.removable .watchlist-rename { right:24px; width:18px; height:18px; }
.region-navigation .tab .watchlist-rename svg,.tab.watchlist-drag-preview .watchlist-rename svg { width:13px; height:13px; }
.region-navigation .watchlist-create { position:relative; display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; flex:0 0 20px; padding:0; border:0; font-size:0; line-height:0; background:transparent; color:#95a5ba; border-radius:4px; }
.region-navigation .watchlist-create::before { content:""; position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); box-sizing:border-box; width:20px; height:20px; border:0; border-radius:5px; background:transparent; transition:background .16s ease; pointer-events:none; }
.region-navigation .watchlist-create svg { position:relative; display:block; flex:none; width:12px; height:12px; pointer-events:none; }
.region-navigation .watchlist-create:hover { color:#d6e2f1; background:transparent; }
.region-navigation .watchlist-create:hover::before,.region-navigation .watchlist-create:focus-visible::before { background:#ffffff08; }
.region-navigation .tab.list-drop-target { border-color:#a1baff; box-shadow:inset 3px 0 #9cb6ee,0 0 0 2px #6b93d529; }
.region-navigation .tab.dragging { opacity:.24; }
.region-navigation .tab.watchlist-shortcut { cursor:pointer; touch-action:manipulation; }
.tab.watchlist-drag-preview { opacity:.8; background:#253c60; border-color:#9ab5e1; box-shadow:0 14px 32px #0009; }

/* Quiet utility controls; a consistent baseline for search and alerts. */
.manager-toolbar { align-items:center; gap:12px; margin-bottom:10px; }
#global-search,.search { height:34px; border-color:#27313d; background:#10161e; color:#e3e9f2; }
#global-search::placeholder,.search::placeholder { color:#95a2b4; }
.intraday-option,.movement-setting { font-size:12px; color:#a4b0c0; }
.manager-toolbar #alert-settings-button,.manager-toolbar #alert-history-button { height:32px; border-color:transparent; border-radius:6px; font-size:12px; color:#aebccd; background:transparent; }
.manager-toolbar #alert-settings-button:hover,.manager-toolbar #alert-history-button:hover { border-color:#303e50; background:#19222d; color:#ecf0f6; }

/* The table carries the strongest hierarchy; sectors are secondary filters. */
.panel { border-color:#232d39; }
.panel-head { min-height:56px; padding:10px 14px; border-bottom-color:#202936; }
.panel-head h2 { font-size:16px; letter-spacing:-.015em; }
.panel-head p { margin-top:4px; font-size:11px; color:#98a7b9; }
.watchlist-sections { padding:8px 12px; gap:8px; border-bottom-color:#202936; }
.section-buttons { gap:4px; }
.section-filter { min-height:28px; padding:4px 8px; gap:6px; border-color:transparent; background:transparent; color:#aebacc; font-size:12px; line-height:18px; border-radius:5px; }
.section-filter small { opacity:1; color:#8593a6; }
.section-filter:hover:not(:disabled) { background:#1a232e; border-color:transparent; color:#e1e8f2; }
.section-filter.active { background:#202b39; border-color:#344559; color:#edf2f9; }
.section-filter.active small { color:#b6c4d8; }
.section-performance { padding-left:2px; border-left:0; font-weight:500; }
.crypto-rank-filters { padding-top:7px; border-top-color:#ffffff08; gap:4px; }
.rank-filter-label { font-size:11px; }
th { height:36px; padding:6px 13px; font-size:11px; letter-spacing:.035em; color:#a0aec1; }
.sort-button { padding:5px 0; }
#asset-heading .sort-button { justify-content:flex-start; width:100%; text-align:left; }

@media(max-width:1080px) {
  .region-group { gap:16px; }
}
@media(max-width:700px) {
  .market-overview .overview-custom { flex-basis:132px; }
  .market-overview { flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; max-width:100%; gap:0; scrollbar-width:thin; scrollbar-color:#344052 transparent; scroll-snap-type:x proximity; }
  .market-overview .overview-custom { flex:0 0 174px; border-right:1px solid #ffffff08; scroll-snap-align:start; }
  .market-overview .overview-custom .overview-item { display:grid; grid-template-columns:minmax(0,1fr) auto; align-content:center; gap:5px 9px; min-height:64px; padding:8px 12px; flex-basis:auto; touch-action:pan-x pan-y; cursor:pointer; }
  .market-overview .overview-name { grid-column:1 / -1; padding-right:18px; gap:6px; }
  .market-overview .overview-label { font-size:11px; }
  .market-overview .overview-logo { width:17px; height:17px; flex-basis:17px; }
  .market-overview .overview-price { font-size:12px; letter-spacing:-.015em; overflow:hidden; text-overflow:ellipsis; }
  .market-overview .overview-item strong { font-size:11px; align-self:center; white-space:nowrap; }
  .market-overview .overview-remove { top:5px; right:5px; width:24px; height:24px; padding:0; font-size:14px; opacity:.65; }
  .market-overview .overview-add { min-height:64px; flex:0 0 36px; font-size:18px; scroll-snap-align:end; }
  .topbar { margin-bottom:10px; }
  .tabs.region-navigation { padding:2px 11px; margin-top:16px; }
  .region-group { grid-template-columns:minmax(0,1fr); gap:7px; padding:10px 0; }
  .region-heading { width:184px; max-width:100%; min-height:20px; }
  .region-navigation .tab { min-height:36px; padding:7px 9px; }
  .manager-toolbar { gap:10px; }
  .panel-head { flex-wrap:wrap; padding:10px 12px; }
  .watchlist-sections { padding:8px; }
  .section-filter { min-height:32px; padding:5px 7px; }
}
@media(pointer:coarse) {
  .region-navigation .tab { min-height:44px; }
  .region-navigation .watchlist-create { min-height:36px; min-width:36px; flex-basis:36px; }
  .section-filter { min-height:40px; }
  .manager-toolbar #alert-settings-button,.manager-toolbar #alert-history-button { min-height:40px; }
}
@media(min-width:701px) and (pointer:coarse) {
  .region-heading { min-height:44px; }
}
@media(prefers-reduced-motion:reduce) {
  .region-navigation .tab { transition:none; }
}

/* Reserve the add control beside the final quote, never on a row of its own. */
.market-overview.overview-fit-desktop{column-gap:0}
.market-overview.overview-fit-desktop .overview-custom{flex-basis:calc(var(--overview-stable-width,160px) - var(--overview-fit-trim,0px));width:calc(var(--overview-stable-width,160px) - var(--overview-fit-trim,0px))}
.market-overview.overview-fit-desktop .overview-custom .overview-item{padding-left:calc(7px - var(--overview-fit-trim,0px))}
.market-overview.overview-fit-desktop .overview-tail{margin-right:28px;max-width:calc(100% - 28px)}
.market-overview.overview-fit-desktop .overview-add{box-sizing:border-box;flex:0 0 28px;width:28px;min-width:28px;max-width:28px;margin-left:-28px}

.region-symbol>.personal-profile-icon{width:18px;height:18px;color:#91a5be}
@media(max-width:700px){.region-symbol>.personal-profile-icon{width:15px;height:15px}}

/* Drop position overlay never changes button dimensions. */
.watchlist-insertion-bar{position:fixed;width:2px;border-radius:2px;background:#9cb6ee;box-shadow:0 0 5px #9cb6ee44;z-index:10001;pointer-events:none}
.watchlist-insertion-bar[hidden]{display:none}
