:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #0d1118;
  --panel-2: #121823;
  --panel-3: #161e2b;
  --line: #202a38;
  --line-soft: #18212d;
  --text: #f3f6fa;
  --muted: #8490a0;
  --subtle: #586575;
  --green: #20dda0;
  --red: #ff6078;
  --accent: #7094ff;
  --accent-soft: rgba(112, 148, 255, .11);
}

* { box-sizing: border-box; }
html { scrollbar-color: #263142 transparent; scrollbar-gutter: stable; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: radial-gradient(circle at 48% -14%, rgba(74, 109, 196, .17), transparent 35%), var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid rgba(112, 148, 255, .65); outline-offset: 2px; }

.shell { width: min(1280px, calc(100% - 40px)); margin: 0 auto; padding: 38px 0 30px; }
.topbar, .panel-head, footer { display: flex; align-items: center; justify-content: space-between; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid #354563; border-radius: 11px; background: linear-gradient(145deg, #1a2540, #101622); color: #a9bcff; font-size: 16px; font-weight: 850; box-shadow: inset 0 1px rgba(255, 255, 255, .05); }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -.04em; }
.header-actions { display: flex; align-items: center; gap: 17px; }
.language-switch { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: rgba(13, 17, 24, .8); }
.language-button { width: 34px; height: 26px; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #687588; font-size: .66rem; font-weight: 800; cursor: pointer; }
.language-button:hover { color: #c7d0dd; }
.language-button.active { background: #1c2940; color: #b9c9ff; }
.live-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .78rem; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(32, 221, 160, .1); }
.live-state.error .live-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(255, 96, 120, .1); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 12px; overflow: visible; }
.tabs::-webkit-scrollbar { display: none; }
.tab { min-width: 162px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 11px; background: rgba(13, 17, 24, .55); color: var(--muted); text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease; }
.tab:hover { color: var(--text); border-color: #354256; }
.tab { position: relative; flex-shrink: 0; padding-right: 32px; }
.tab .tab-grip { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); cursor: grab; touch-action: none; padding: 5px; }
.tab.list-drop-target { box-shadow: inset 3px 0 var(--accent); }
.tab.active { color: var(--text); border-color: #42577f; background: var(--accent-soft); }
.tab span { display: block; font-size: .82rem; font-weight: 750; }
.tab small { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; }

.universe-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(13, 17, 24, .7); overflow: hidden; }
.universe-stats[hidden] { display: none; }
.universe-stats div { display: flex; align-items: baseline; gap: 8px; min-height: 58px; padding: 17px 20px; border-right: 1px solid var(--line-soft); }
.universe-stats div:last-child { border-right: 0; }
.universe-stats strong { font-size: 1.05rem; font-weight: 790; font-variant-numeric: tabular-nums; }
.universe-stats span { color: var(--muted); font-size: .72rem; }

.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(13, 17, 24, .96); box-shadow: 0 24px 90px rgba(0, 0, 0, .28); }
.panel-head { min-height: 82px; padding: 18px 21px; border-bottom: 1px solid var(--line); }
.title-row { display: flex; align-items: center; gap: 9px; }
.panel-head h2 { margin: 0; font-size: 1rem; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: .74rem; }
.result-count { padding: 3px 7px; border-radius: 5px; background: #182131; color: #9eacc0; font-size: .66rem; font-weight: 700; }
.panel-actions { display: flex; align-items: center; gap: 8px; }
.search-wrap { position: relative; display: block; }
.search-wrap > svg { position: absolute; left: 11px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); fill: none; stroke: #657184; stroke-width: 1.8; }
.search { width: 270px; height: 36px; padding: 0 12px 0 33px; border: 1px solid var(--line); border-radius: 9px; outline: none; background: var(--panel-2); color: var(--text); font-size: .76rem; }
.search::placeholder { color: #5f6b7a; }
.search:focus { border-color: #4a6395; }
.refresh { display: flex; height: 36px; align-items: center; gap: 7px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); color: #aab4c1; font-size: .73rem; cursor: pointer; }
.refresh:hover { color: var(--text); border-color: #38475a; }
.refresh:disabled { opacity: .6; cursor: wait; }
.refresh svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.refresh.loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.explorer-controls { padding: 17px 20px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(18, 24, 35, .75), rgba(13, 17, 24, .35)); }
.explorer-controls[hidden] { display: none; }
.class-filters { display: flex; gap: 7px; padding-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.class-filter { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border: 1px solid #263244; border-radius: 8px; background: #111720; color: #8f9cac; font-size: .74rem; cursor: pointer; }
.class-filter small { display: grid; min-width: 19px; height: 19px; padding: 0 5px; place-items: center; border-radius: 5px; background: #1b2533; color: #768397; font-size: .62rem; }
.class-filter:hover { color: #d9e0e9; border-color: #394a62; }
.class-filter.active { border-color: #526fa8; background: rgba(79, 111, 184, .18); color: #e8edff; }
.class-filter.active small { background: rgba(112, 148, 255, .17); color: #aec1ff; }
.facet-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)) auto; gap: 9px; align-items: end; }
.facet-grid label { min-width: 0; }
.facet-grid label > span { display: block; margin: 0 0 5px 2px; color: #657284; font-size: .64rem; font-weight: 720; letter-spacing: .035em; text-transform: uppercase; }
.facet-grid select { width: 100%; height: 35px; padding: 0 30px 0 10px; border: 1px solid #263244; border-radius: 8px; outline: none; background: #111720; color: #c9d1db; font-size: .72rem; }
.facet-grid select:hover { border-color: #394a62; }
.reset-filters { height: 35px; padding: 0 11px; border: 0; background: transparent; color: #718095; font-size: .7rem; cursor: pointer; white-space: nowrap; }
.reset-filters:hover { color: #bdc7d4; }
.active-path { display: flex; align-items: center; gap: 7px; min-height: 18px; margin-top: 11px; color: #687587; font-size: .68rem; }
.active-path b { color: #3d4c60; font-weight: 500; }

.table-wrap { position: relative; min-height: 285px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 40px; padding: 0 20px; border-bottom: 1px solid var(--line-soft); color: #657183; font-size: .65rem; font-weight: 750; letter-spacing: .065em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.sort-button { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; padding: 7px 0; border: 0; background: transparent; color: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.sort-button span { width: 10px; color: #485466; font-size: .7rem; }
.sort-button:hover, .sort-button.active { color: #c0cad7; }
.sort-button.active span { color: var(--accent); }
td { height: 66px; padding: 0 20px; border-bottom: 1px solid var(--line-soft); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .14s ease; }
tbody tr[data-url] { cursor: pointer; }
tbody tr[data-url]:hover { background: rgba(255, 255, 255, .025); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.asset { display: flex; min-width: 220px; align-items: center; gap: 11px; }
.rank { width: 20px; flex: 0 0 20px; color: #596575; font-size: .68rem; font-weight: 700; text-align: right; }
.asset-mark { position: relative; display: grid; width: 32px; height: 32px; flex: 0 0 32px; place-items: center; border: 1px solid #293545; border-radius: 9px; background: #151c27; color: #aeb8c5; font-size: .58rem; font-weight: 800; overflow: hidden; }
.asset-mark img, .asset-fallback { grid-area: 1 / 1; }
.asset-mark img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.asset-mark.has-logo { border-color: rgba(255, 255, 255, .08); background: #fff; }
.asset-symbol { display: flex; align-items: center; gap: 6px; color: #edf1f5; font-size: .8rem; font-weight: 780; }
.asset-name, .asset-location { display: block; max-width: 270px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-name { margin-top: 2px; color: var(--muted); font-size: .7rem; }
.asset-location { margin-top: 2px; color: #536071; font-size: .62rem; }
.context-column { width: 220px; }
.panel:not(.explorer-mode) .context-column { display: none; }
.type-pill { display: inline-flex; padding: 3px 6px; border: 1px solid #29384e; border-radius: 5px; color: #95a9c8; font-size: .62rem; font-weight: 700; }
.subcategory { display: block; max-width: 190px; margin-top: 4px; overflow: hidden; color: #6f7b8a; font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.price, .market-cap { color: #cbd3dc; font-size: .75rem; white-space: nowrap; }
.change { display: inline-block; min-width: 70px; padding: 5px 8px; border-radius: 6px; font-size: .71rem; font-weight: 730; text-align: center; white-space: nowrap; }
.positive { background: rgba(32, 221, 160, .085); color: var(--green); }
.negative { background: rgba(255, 96, 120, .09); color: var(--red); }
.flat { background: rgba(126, 135, 147, .1); color: #9ba6b3; }
.unavailable { color: #566273; }
.info-button { display: grid; width: 16px; height: 16px; padding: 0; place-items: center; border: 1px solid #364457; border-radius: 50%; background: transparent; color: #78869a; font-size: .61rem; font-weight: 800; line-height: 1; cursor: help; }
.info-button:hover { border-color: var(--accent); color: #b3c4ff; }
.favorite-button { display: grid; width: 18px; height: 18px; padding: 0; place-items: center; border: 0; background: transparent; color: #596677; font-size: .95rem; cursor: pointer; }
.favorite-button:hover, .favorite-button.active { color: #f1c65e; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 54px; border-top: 1px solid var(--line); color: #738093; font-size: .7rem; }
.pagination[hidden] { display: none; }
.pagination button { min-width: 82px; height: 30px; border: 1px solid #293548; border-radius: 7px; background: #121923; color: #aeb8c5; font-size: .69rem; cursor: pointer; }
.pagination button:hover:not(:disabled) { border-color: #425573; color: #eef2f6; }
.pagination button:disabled { opacity: .35; cursor: default; }

.company-tooltip { position: fixed; z-index: 50; padding: 17px; border: 1px solid #334156; border-radius: 13px; background: rgba(15, 20, 28, .985); box-shadow: 0 18px 60px rgba(0, 0, 0, .62); color: var(--text); pointer-events: none; }
.company-tooltip[hidden] { display: none; }
.tip-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tip-heading strong { display: block; font-size: .88rem; }
.tip-heading div > span { display: block; margin-top: 3px; color: var(--muted); font-size: .66rem; }
.exposure-tag { flex: 0 0 auto; padding: 4px 7px; border-radius: 5px; background: var(--accent-soft); color: #b2c2ff; font-size: .61rem; font-weight: 750; }
.tip-summary { margin: 13px 0 12px; color: #c3cbd5; font-size: .72rem; line-height: 1.55; }
.tip-themes { display: flex; flex-wrap: wrap; gap: 5px; margin: -2px 0 13px; }
.tip-theme { padding: 3px 6px; border-radius: 5px; background: #192231; color: #8798af; font-size: .59rem; }
.tip-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.tip-facts small { display: block; margin-bottom: 3px; color: #657184; font-size: .59rem; text-transform: uppercase; letter-spacing: .05em; }
.tip-facts b { display: block; overflow: hidden; color: #dce2e9; font-size: .66rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.tip-facts b.profitable { color: var(--green); }
.tip-facts b.unprofitable { color: var(--red); }
.tip-facts b.neutral { color: #9aa5b1; }
.tip-note { margin: 13px 0 0; color: #5b6878; font-size: .59rem; line-height: 1.4; }
.empty { position: absolute; inset: 40px 0 0; display: grid; place-items: center; color: var(--muted); font-size: .76rem; }
.empty.hidden { display: none; }
footer { gap: 20px; padding: 14px 4px 0; color: #566171; font-size: .66rem; }

@media (max-width: 900px) {
  .facet-grid { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
  .reset-filters { justify-self: start; }
  .universe-stats { grid-template-columns: repeat(2, 1fr); }
  .universe-stats div:nth-child(2) { border-right: 0; }
  .universe-stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
}

@media (max-width: 680px) {
  .shell { width: min(100% - 22px, 1280px); padding-top: 24px; }
  .topbar { align-items: flex-end; }
  .header-actions { align-items: flex-end; flex-direction: column-reverse; gap: 8px; }
  .brand-mark { width: 34px; height: 34px; }
  .tabs { margin-top: 22px; }
  .tab { min-width: 138px; flex: 1 0 138px; padding: 10px 12px; }
  .universe-stats div { min-height: 52px; padding: 13px; flex-direction: column; gap: 2px; }
  .panel-head { align-items: stretch; flex-direction: column; gap: 13px; padding: 15px; }
  .panel-actions { width: 100%; }
  .search-wrap { flex: 1; }
  .search { width: 100%; }
  .refresh { width: 36px; padding: 0; justify-content: center; font-size: 0; }
  .explorer-controls { padding: 14px; }
  .facet-grid { grid-template-columns: 1fr 1fr; }
  th, td { padding: 0 13px; }
  .price-column { display: none; }
  .context-column { display: none !important; }
  td { height: 67px; }
  .asset { min-width: 170px; gap: 9px; }
  .asset-name, .asset-location { max-width: 155px; }
  footer { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (max-width: 430px) {
  h1 { font-size: 1.35rem; }
  .live-state { font-size: .68rem; }
  .facet-grid { grid-template-columns: 1fr; }
  .universe-stats strong { font-size: .92rem; }
  .universe-stats span { font-size: .63rem; }
  th, td { padding: 0 10px; }
  .asset { min-width: 145px; }
  .asset-mark { width: 28px; height: 28px; flex-basis: 28px; border-radius: 8px; }
  .asset-name, .asset-location { max-width: 112px; }
  .market-cap { font-size: .69rem; }
}
.manager-toolbar{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.manager-toolbar button,dialog button,#manager-notice button{background:#182334;color:#cbd7e8;border:1px solid #34435a;border-radius:7px;padding:8px 12px;cursor:pointer}.manager-toolbar button:hover,dialog button:hover{background:#293b56}.drag-handle,.remove-asset{border:0;background:transparent;color:#8191a8;cursor:grab;padding:6px;font-size:18px}.drag-handle{touch-action:none}.remove-asset{cursor:pointer}.remove-asset:hover{color:#ff6078}.dragging{opacity:.5}.drop-target{box-shadow:inset 0 3px #7094ff}dialog{width:min(720px,94vw);max-height:85vh;overflow:auto;background:#101722;color:#eff3fa;border:1px solid #36465e;border-radius:16px;padding:22px}dialog::backdrop{background:#0009}dialog header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}dialog h2{font-size:20px;margin:0}dialog input{width:100%;background:#080e18;color:#eff3fa;border:1px solid #36465e;border-radius:8px;padding:13px;margin-bottom:14px}.symbol-filters{display:flex;gap:7px;flex-wrap:wrap}.symbol-result{display:flex;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid #263245}.symbol-result>div{flex:1;min-width:0}.symbol-result small{display:block;color:#8797ad;margin-top:5px}.symbol-result>span{font-size:12px;color:#8797ad}.symbol-result button{font-size:20px}.symbol-result button:disabled{opacity:.5;cursor:default}#search-status{color:#8797ad;font-size:13px}#manager-notice{padding:10px;margin-bottom:10px;color:#a9bedb}#manager-notice button{margin-left:15px}@media(max-width:600px){.symbol-result{gap:6px}.symbol-result>span{max-width:100px}.manager-toolbar button{font-size:12px;padding:7px}}

.price.price-positive { color: var(--green); }
.price.price-negative { color: var(--red); }
.price.price-flat { color: #cbd3dc; }
.price-column { display: table-cell; }
.table-wrap table { min-width: 1180px; }
.table-wrap th, .table-wrap td { padding-left: 12px; padding-right: 12px; }


body:not(.show-intraday) .intraday-column { display: none; }
body:not(.show-intraday) .table-wrap table { min-width: 1000px; }
.intraday-option { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; cursor: pointer; }
.intraday-option input { accent-color: var(--accent); }
#manage-dialog header { position: sticky; top: -22px; background: #101722; z-index: 2; padding: 8px 0; }
#manage-dialog [data-close-dialog] { position: relative; z-index: 3; flex: 0 0 36px; min-height: 36px; pointer-events: auto; }


.movement-setting { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; cursor: pointer; }
.movement-setting input { accent-color: var(--green); }
#movement-toasts { position: fixed; bottom: 20px; right: 20px; z-index: 80; width: min(350px, calc(100vw - 40px)); display: grid; gap: 10px; }
.movement-toast { padding: 17px; border: 1px solid #287458; border-radius: 12px; background: #101e1b; box-shadow: 0 8px 35px #0008; }
.movement-toast strong { color: var(--green); }
.movement-toast p { margin: 8px 0 0; font-size: 12px; color: #a3b5b0; line-height: 1.5; }
.movement-toast button { float: right; background: transparent; color: #a3b5b0; border: 0; font-size: 21px; cursor: pointer; }


#desktop-alert-status { flex-basis: 100%; font-size: 12px; color: var(--muted); }
#desktop-alert-status:empty { display: none; }
#desktop-alerts[aria-pressed="true"] { color: var(--green); }

#alert-settings-button { background: transparent; border-color: transparent; color: var(--muted); font-size: 12px; padding: 6px 8px; }
#alert-settings-button:hover { color: var(--text); border-color: var(--line); }
#alert-settings-dialog { width: min(720px,94vw); }
#alert-settings-dialog header { position: sticky; top: -22px; background: #101722; z-index: 2; padding: 8px 0; }
#alert-settings-dialog fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 15px; margin: 16px 0; min-width: 0; }
#alert-settings-dialog legend { padding: 0 6px; font-size: 14px; font-weight: 650; }
.alert-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.alert-fields label { color: var(--muted); font-size: 12px; }
.alert-fields input, .alert-fields select { display: block; margin: 6px 0 0; }
#alert-settings-dialog select { width: 100%; min-height: 42px; padding: 8px; border: 1px solid #36465e; border-radius: 8px; background: #080e18; color: var(--text); }
.alert-explanation { font-size: 12px; color: var(--muted); line-height: 1.6; }
.alert-level-editor { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); gap: 8px; }
.alert-level-editor input { margin-bottom: 0; }
.alert-level-editor button { min-height: 42px; }
#price-level-list { font-size: 12px; color: var(--muted); margin-top: 14px; }
.price-level-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.price-level-row span { overflow-wrap: anywhere; }
#level-error { font-size: 12px; color: var(--red); }
.alert-form-actions, #alert-delivery-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.alert-delivery { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.alert-delivery h3 { font-size: 14px; }
.movement-toast[data-direction="down"] { border-color: #863d50; }
.movement-toast[data-direction="down"] strong { color: var(--red); }
@media(max-width:540px) { .alert-fields { grid-template-columns: 1fr; } .alert-level-editor { grid-template-columns: 1fr; } }

/* Compact market header */
.shell { padding-top: 22px; }
.topbar { gap: 18px; align-items: center; margin-bottom: 18px; }
.header-actions { gap: 12px; flex-shrink: 0; }
.header-actions .live-state { white-space: nowrap; }
.market-overview { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); gap: 1px; border: 1px solid var(--line); border-radius: 12px; background: var(--line); overflow: hidden; }
.overview-item { padding: 13px 12px; background: var(--panel); text-decoration: none; display:flex; flex-direction:column; gap:7px; font-variant-numeric:tabular-nums; }
.overview-item span { font-size: 11px; font-weight:600; white-space:nowrap; }
.overview-item strong { font-size: 15px; }
.overview-item .overview-price { font-size:14px; color:inherit; font-weight:600; }
.overview-item .overview-name { color:#fff; }
.overview-item.positive { color: var(--green); }
.overview-item.negative { color: var(--red); }
.overview-item.flat,.overview-item.unavailable { color: var(--muted); }
.overview-item:hover { background: var(--panel-2); }
.manager-toolbar #new-list,.manager-toolbar #add-asset,.manager-toolbar #rename-list { padding:5px 9px; font-size:11px; border-radius:6px; min-height:28px; }
.manager-toolbar { align-items:center; }
.manager-toolbar #alert-settings-button { padding:6px 10px; border:1px solid #354b74; border-radius:8px; background:linear-gradient(145deg,#1d2c48,#131e32); color:#bacbfa; font-size:11px; display:inline-flex; align-items:center; gap:6px; }
#alert-settings-button::before { content:'⚙'; font-size:15px; }
.manager-toolbar #alert-settings-button:hover { background:#243758; border-color:#7094ff; }
.global-search-wrap { position:relative; width:min(460px,100%); }
#global-search { width:100%; height:38px; border:1px solid var(--line); border-radius:10px; background:var(--panel-2); color:var(--text); padding:0 14px; font-size:13px; }
#global-search:focus { border-color:var(--accent); }
#global-results { position:absolute; top:46px; left:0; width:min(560px,calc(100vw - 40px)); max-height:65vh; overflow:auto; background:#111925; border:1px solid #344562; border-radius:12px; z-index:100; box-shadow:0 18px 55px #0009; padding:8px 14px; }
.global-search-status { color:var(--muted); font-size:12px; margin:8px 0; }
.global-result { padding:12px 0; border-top:1px solid var(--line); }
.global-result strong { display:block; font-size:13px; }
.global-result small { display:block; color:var(--muted); font-size:11px; margin-top:4px; }
.global-destinations { display:flex; flex-wrap:wrap; gap:5px; margin-top:9px; }
.global-destinations button { cursor:pointer; border:1px solid #354b74; background:#1b2940; color:#b9ccfa; padding:4px 8px; border-radius:5px; font-size:11px; }
.global-destinations button:hover { background:#2a4166; }
@media(max-width:1000px) { .market-overview { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media(max-width:600px) { .topbar { flex-wrap:wrap; } .global-search-wrap { width:100%; } .header-actions { width:100%; justify-content:flex-end; } .market-overview { grid-template-columns:repeat(3,minmax(0,1fr)); } .tab { min-width:0; flex:1 1 140px; } .tabs { overflow:visible; } }
body.chart-open { overflow:hidden; }
#asset-chart-dialog { width:calc(100vw - 32px); max-width:1600px; height:94vh; height:94dvh; max-height:96vh; padding:0; overflow:hidden; border-radius:14px; background:#0d1118; }
#asset-chart-dialog[open] { display:flex; flex-direction:column; }
#asset-chart-dialog header { padding:12px 16px; margin:0; flex-shrink:0; border-bottom:1px solid var(--line); gap:12px; }
#asset-chart-title { font-size:15px; }
.chart-actions { display:flex; align-items:center; gap:16px; }
.chart-actions a { color:#a9bcff; text-decoration:none; font-size:12px; }
#close-asset-chart { font-size:24px; line-height:24px; padding:3px 10px; }
#chart-mount { flex:1; min-height:0; }
#chart-mount .tradingview-widget-container { height:100%; width:100%; }
#chart-mount .tradingview-widget-container__widget { height:calc(100% - 28px); width:100%; }
#chart-mount .tradingview-widget-copyright { height:28px; text-align:center; font-size:11px; padding:5px; }
#chart-mount .tradingview-widget-copyright a { color:#8da8f7; }
#chart-help { margin:0; padding:6px 12px; color:var(--muted); font-size:10px; flex-shrink:0; }
.chart-external-notice { height:100%; display:grid; place-items:center; overflow:auto; padding:28px 20px; background:radial-gradient(ellipse at center,rgba(100,128,205,.07),transparent 65%); }
.chart-external-card { width:min(100%,440px); text-align:center; }
.chart-symbol-badge { display:inline-block; padding:6px 11px; border:1px solid var(--line); border-radius:7px; color:#c6d2ed; font-size:12px; letter-spacing:.03em; }
.chart-external-card h3 { margin:20px 0 10px; color:var(--text); font-size:22px; font-weight:600; }
.chart-external-card p { margin:0 auto 24px; max-width:380px; color:var(--muted); font-size:14px; line-height:1.7; }
.chart-external-button { display:inline-flex; align-items:center; justify-content:center; padding:11px 18px; border:1px solid #617bca; border-radius:8px; background:#354e8b; color:#f2f5ff; text-decoration:none; font-size:13px; font-weight:600; transition:background .15s,border-color .15s; }
.chart-external-button:hover { background:#425e9f; border-color:#8097de; }
.chart-external-button:focus-visible { outline:2px solid #b4c5ff; outline-offset:4px; }
.chart-external-caption { display:block; margin-top:12px; color:var(--muted); font-size:11px; }
@media(max-width:600px) { #asset-chart-dialog { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; border-radius:0; } #asset-chart-dialog header { padding:8px; } #asset-chart-title { font-size:12px; } .chart-actions { gap:8px; } .chart-actions a { font-size:10px; } }
.topbar { justify-content:flex-end; }
.shell > .global-search-wrap { margin:18px 0 12px; }
.watchlist-actions { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.watchlist-actions button { background:#182334; color:#cbd7e8; border:1px solid #34435a; border-radius:6px; padding:5px 9px; font-size:11px; min-height:28px; cursor:pointer; }
.watchlist-actions button:hover { background:#293b56; }
.panel-head,.panel-actions { flex-wrap:wrap; gap:12px; }
.market-overview { display:flex; flex-wrap:wrap; }
.overview-item { flex:1 1 120px; }
.overview-add { flex:0 0 42px; min-height:64px; background:var(--panel); color:var(--muted); border:0; font-size:24px; cursor:pointer; }
.overview-add:hover { color:var(--text); background:var(--panel-2); }
@media(max-width:600px) { .panel-actions { width:100%; } .watchlist-actions { width:100%; } .overview-item { flex-basis:95px; } }
.overview-custom { position:relative; flex:1 1 120px; display:flex; }
.overview-custom .overview-item { padding-right:26px; }
.overview-remove { position:absolute; right:5px; top:5px; border:0; background:transparent; color:var(--muted); cursor:pointer; opacity:0; }
.overview-custom:hover .overview-remove,.overview-custom:focus-within .overview-remove { opacity:1; }
@media(hover:none) { .overview-remove { opacity:1; } }
.overview-name { display:flex; align-items:center; gap:7px; }
.overview-logo { display:inline-flex; align-items:center; justify-content:center; flex:0 0 22px; width:22px; height:22px; border-radius:50%; background:#253149; color:#edf2ff; font-size:9px !important; overflow:hidden; }
.overview-logo img { width:100%; height:100%; object-fit:contain; }
.chart-intervals { display:flex; gap:4px; flex-wrap:wrap; }
.chart-intervals[hidden] { display:none; }
.chart-intervals button { padding:5px 9px; font-size:12px; }
.chart-intervals button[aria-pressed=true] { background:#345b9c; border-color:#779cec; color:white; }
#asset-chart-dialog header { flex-wrap:wrap; }
.chart-metrics { display:flex; align-items:center; gap:24px; margin:0 auto 0 8px; padding-left:20px; border-left:1px solid var(--line); }
.chart-metrics > div { min-width:110px; }
.chart-metrics dt { color:var(--muted); font-size:10px; font-weight:500; margin-bottom:3px; }
.chart-metrics dd { margin:0; color:var(--text); font-size:14px; font-weight:600; font-variant-numeric:tabular-nums; white-space:nowrap; }
.chart-metrics .is-unavailable dd { color:var(--muted); }
@media(max-width:700px) { #asset-chart-dialog .chart-actions { margin-left:auto; } .chart-metrics { flex-basis:100%; margin:0; padding:10px 0 2px; border-left:0; border-top:1px solid var(--line); gap:24px; } .chart-metrics dd { font-size:13px; } }
@media(max-width:600px) { .chart-intervals { flex-basis:100%; } .chart-metrics { order:0; } #asset-chart-dialog .chart-actions { margin-left:auto; } }
#list-meta:empty { display:none; }
.tabs { margin-top:34px; }
.tab .watchlist-title { display:flex; align-items:center; gap:7px; }
.watchlist-icon { width:17px; height:17px; flex-shrink:0; color:#94a8ca; }
.tab.active .watchlist-icon { color:#b9ceff; }
.tab[data-list="favorites"] .watchlist-icon { color:#d4b675; }
.tab[data-list="crypto-all"] .watchlist-icon { color:#7abfba; }
.tab[data-list="ai-global"] .watchlist-icon { color:#b09bd6; }
.manager-toolbar > .global-search-wrap { margin:0; flex:0 1 460px; min-width:180px; }
@media(max-width:700px) { .manager-toolbar > .global-search-wrap { flex:1 1 100%; } .manager-toolbar .intraday-option { margin-left:0; } }
.intraday-column .sort-button { text-transform:none; }
.crypto-rank { width:32px; flex-basis:32px; font-variant-numeric:tabular-nums; }
.watchlist-brand { border-radius:50%; object-fit:contain; }
.tab[data-list^="custom-"] .watchlist-icon { color:#d4b675; }
.tabs .tab.dragging { opacity:.25; border-style:dashed; }
.tabs .tab.list-drop-target { border-color:#9ab5ff; background:#263859; box-shadow:inset 4px 0 #9ab5ff,0 0 0 2px #7094ff40; }
.watchlist-drag-preview { position:fixed; z-index:10000; pointer-events:none !important; opacity:.78; transform:scale(1.06) rotate(-2deg); box-shadow:0 14px 35px #0009; border-color:#a2baff; background:#263859; transition:none; margin:0; }
.watchlist-drag-active,.watchlist-drag-active * { cursor:grabbing !important; user-select:none; }
.watchlist-actions[hidden] { display:none; }
.asset-drag-preview { position:fixed; z-index:10000; pointer-events:none; opacity:.76; background:var(--panel-2); box-shadow:0 12px 32px #0009; outline:1px solid var(--accent); transform:scale(1.01); margin:0; table-layout:fixed; }
.asset-drag-preview * { pointer-events:none !important; }
.asset-drag-active,.asset-drag-active * { cursor:grabbing !important; user-select:none; }
@media(prefers-reduced-motion:reduce) { .watchlist-drag-preview { transform:none; } }

.watchlist-create { align-self:center; flex:0 0 30px; width:30px; height:30px; padding:0; border:1px solid #34435a; border-radius:8px; background:#121c2b; color:#bac9dc; font-size:22px; cursor:pointer; }
.watchlist-create:hover { color:#fff; background:#293b56; border-color:#57759c; }
.watchlist-create:focus-visible { outline:2px solid #729bff; outline-offset:3px; }

.tab { touch-action:none; cursor:grab; user-select:none; }
.tab.renameable { padding-right:64px; }
.watchlist-rename { position:absolute; right:34px; top:50%; transform:translateY(-50%); padding:4px; font-size:18px; line-height:1; color:#aabbd1; opacity:0; cursor:pointer; }
.tab:hover .watchlist-rename,.tab:focus-within .watchlist-rename { opacity:1; }
.watchlist-rename:hover { color:#fff; }
.reorderable-row { cursor:grab; touch-action:none; user-select:none; }
@media(hover:none) { .watchlist-rename { opacity:1; } }
