:root {
  color-scheme:dark;
  --bg:#0c1015;
  --panel:#141a21;
  --head:#191f28;
  --line:#29313c;
  --muted:#8a94a2;
  --text:#dce2eb;
  --accent:#dc7d92;
  --positive:#7fd3ac;
  --negative:#de94a1;
  font:13px/1.4 Arial,sans-serif
}
* {
  box-sizing:border-box
}
body {
  height:100dvh;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  margin:0;
  background:var(--bg);
  color:var(--text)
}
button,input,select {
  font:inherit;
  color:inherit;
  border:1px solid var(--line);
  border-radius:4px;
  background:#1c232d
}
button {
  cursor:pointer;
  padding:5px 10px;
  white-space:nowrap
}
button:hover {
  background:#27303c;
  border-color:#646375
}
button:disabled {
  opacity:.45;
  cursor:default
}
button:focus-visible,input:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:2px
}
input,select {
  padding:7px 9px;
  min-width:0
}
input::placeholder {
  color:#727f90
}
button.primary {
  background:#a94f66;
  border-color:#bc6379;
  color:#fff;
  font-weight:600
}
button.primary:hover {
  background:#bd5f77
}
button.quiet {
  background:transparent;
  border-color:transparent;
  color:var(--muted)
}
button.quiet:hover {
  background:#222a35;
  color:var(--text)
}
[hidden] {
  display:none!important
}
.topbar {
  flex:none;
  height:48px;
  display:flex;
  align-items:center;
  gap:16px;
  padding:0 14px;
  border-bottom:1px solid var(--line);
  background:#11161d;
  position:sticky;
  top:0;
  z-index:50
}
.brand {
  display:flex;
  align-items:center;
  gap:0;
  text-decoration:none;
  white-space:nowrap;
  color:var(--text);
  font-size:18px;
  font-weight:650;
  letter-spacing:-.5px
}
.brand>span:last-child {
  font-weight:400;
  color:#bfc6d1
}
.berry-mark {
  width:23px;
  height:24px;
  margin-right:8px;
  position:relative;
  display:inline-block
}
.berry-mark i {
  position:absolute;
  width:10px;
  height:10px;
  background:#b75b73;
  border-radius:50%;
  box-shadow:inset -2px -2px 0 #0002
}
.berry-mark i:nth-child(1) {
  left:1px;
  top:5px
}
.berry-mark i:nth-child(2) {
  left:11px;
  top:5px;
  background:#d17a8e
}
.berry-mark i:nth-child(3) {
  left:6px;
  top:13px;
  background:#9b475e
}
.berry-mark:before {
  content:"";
  position:absolute;
  width:10px;
  height:5px;
  background:#76967a;
  border-radius:8px 0;
  left:11px;
  top:0;
  transform:rotate(-20deg)
}
nav {
  height:100%;
  display:flex;
  gap:3px;
  align-items:center
}
nav button {
  height:32px;
  background:transparent;
  border:1px solid transparent;
  padding:0 13px;
  color:var(--muted)
}
nav button.active {
  color:#f0b8c6;
  background:#2b202b;
  border-color:#5a3546
}
.connection {
  margin-left:auto;
  font-size:10px;
  color:var(--muted);
  white-space:nowrap
}
.connection:before {
  content:"";
  display:inline-block;
  width:5px;
  height:5px;
  margin-right:6px;
  border-radius:50%;
  background:var(--positive)
}
.connection.offline:before {
  background:#e7ab69
}
.identity {
  color:#758396;
  font-size:10px;
  max-width:145px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
main {
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:auto;
  padding:0 8px 8px
}
.workspace-bar {
  flex:none;
  min-height:32px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:2px 2px;
  color:var(--muted)
}
.workspace-bar h1 {
  font-size:12px;
  font-weight:600;
  line-height:1;
  margin:0;
  color:#c9d0db
}
.workspace-hint {
  font-size:10px;
  color:#677488
}
.workspace-bar button {
  font-size:10px;
  margin-left:auto;
  padding:3px 6px
}
.workspace-bar #save-status {
  font-size:10px;
  min-width:65px;
  text-align:right;
  color:var(--positive)
}
#widget-count {
  font-size:10px;
  color:#778498
}
#notice {
  color:#f6ba80;
  font-size:11px
}
#notice:not(:empty) {
  padding:5px 8px;
  background:#32291f;
  border-radius:4px;
  margin-bottom:6px
}
#grid {
  position:relative;
  width:100%;
  min-height:100%
}
.widget {
  position:absolute;
  display:flex;
  flex-direction:column;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:5px;
  overflow:hidden;
  min-width:180px;
  min-height:100px;
  contain:layout style
}
.widget-head {
  flex:none;
  height:31px;
  display:flex;
  align-items:center;
  gap:5px;
  padding:0 5px 0 8px;
  background:var(--head);
  border-bottom:1px solid var(--line);
  cursor:grab;
  touch-action:none;
  user-select:none
}
.widget-head:active {
  cursor:grabbing
}
.widget-name {
  font-size:14px;
  font-weight:600;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  min-width:0
}
.market-tag {
  font-size:8px;
  color:#ba9eac;
  letter-spacing:.3px
}
.head-actions {
  display:flex;
  gap:1px;
  margin-left:auto;
  flex-shrink:0
}
.icon-button,.widget-head button {
  background:transparent;
  border:0;
  border-radius:3px;
  color:#8895a7;
  padding:0;
  width:23px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:15px
}
.widget-head button:hover,.icon-button:hover {
  background:#313d4d;
  color:#e7eaf0
}
.widget-head .history-button {
  font-size:14px
}
.widget-status {
  height:19px;
  flex:none;
  font-size:9px;
  line-height:18px;
  padding:0 7px;
  color:#748295;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.widget-status.bad {
  color:#d6a06d
}
.widget-status .filter-summary {
  color:#9ca6b4
}
.rows {
  flex:1;
  min-height:0;
  overflow:auto;
  padding:0 4px 4px;
  scrollbar-width:thin;
  scrollbar-color:#344154 transparent
}
.placeholder {
  padding:14px 8px;
  color:#758194;
  text-align:center;
  font-size:10px;
  line-height:1.7
}
table {
  color:#bdc2c9;
  border-collapse:separate;
  border-spacing:0;
  width:100%;
  font:12px/1.05 Arial,sans-serif;
  white-space:nowrap;
  font-variant-numeric:tabular-nums
}
td,th {
  padding:4px 5px;
  border-bottom:1px solid #222c38;
  text-align:right;
  line-height:1.05
}
td:first-child,th:first-child {
  text-align:left
}
th {
  font-weight:400;
  color:#7e8da0;
  background:var(--panel);
  position:sticky;
  top:0;
  z-index:1
}
tbody tr:hover td {
  background:#1b2532
}
td.positive {
  color:var(--widget-positive,var(--positive))
}
td.negative {
  color:var(--widget-negative,var(--negative))
}
.warning {
  font-size:9px;
  line-height:1.3;
  margin:0;
  padding:2px 7px 5px;
  color:#c3a06f;
  flex:none
}
.resize-e,.resize-s,.resize-se {
  position:absolute;
  z-index:4;
  border:0;
  border-radius:0;
  background:transparent;
  padding:0;
  touch-action:none
}
.resize-e {
  right:0;
  top:31px;
  bottom:9px;
  width:5px;
  cursor:ew-resize
}
.resize-s {
  left:0;
  right:9px;
  bottom:0;
  height:5px;
  cursor:ns-resize
}
.resize-se {
  right:0;
  bottom:0;
  width:13px;
  height:13px;
  cursor:nwse-resize
}
.resize-se:after {
  content:"";
  position:absolute;
  right:3px;
  bottom:3px;
  width:6px;
  height:6px;
  border-right:2px solid #647187;
  border-bottom:2px solid #647187
}
.resize-e:hover,.resize-s:hover,.resize-se:hover {
  background:#b8667c44
}
.widget.interacting {
  z-index:30;
  border-color:var(--accent);
  box-shadow:0 4px 30px #0006;
  opacity:.95
}
.widget:focus-within {
  border-color:#5f566d
}
.layout-moving {
  user-select:none
}
.empty {
  position:absolute;
  top:calc(50% - 75px);
  left:0;
  right:0;
  text-align:center;
  color:var(--muted);
  pointer-events:none
}
.empty>* {
  pointer-events:auto
}
.empty-symbol {
  display:inline-grid;
  place-items:center;
  width:40px;
  height:40px;
  border:1px solid #493343;
  border-radius:12px;
  color:var(--accent);
  font-size:22px
}
.empty h2 {
  font-size:17px;
  font-weight:500;
  color:var(--text);
  margin:14px 0 6px
}
.empty p {
  font-size:11px;
  margin-bottom:18px
}
.add-menu,.settings-menu {
  position:fixed;
  inset:unset;
  top:53px;
  right:14px;
  width:540px;
  max-width:calc(100vw - 20px);
  padding:12px;
  border:1px solid #454050;
  border-radius:7px;
  color:var(--text);
  background:#171d26;
  box-shadow:0 16px 60px #0009
}
.add-menu::backdrop,.settings-menu::backdrop {
  background:transparent
}
.menu-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:9px
}
.menu-heading strong {
  font-size:13px
}
.add-menu>input {
  width:100%;
  margin-bottom:10px;
  background:#10161e
}
.catalog-groups {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:14px
}
.catalog-group h3 {
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:1px;
  color:#aa8c9c;
  border-bottom:1px solid #30323e;
  margin:0 0 5px;
  padding:2px 6px 7px
}
.catalog-group button {
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  text-align:left;
  background:transparent;
  border-color:transparent;
  padding:7px 6px;
  font-size:11px
}
.catalog-group button:hover {
  background:#322635;
  border-color:#5b3b4c
}
.catalog-group button span:first-child {
  color:#d18d9e;
  font-size:15px;
  width:14px;
  text-align:center
}
.catalog-group button small {
  margin-left:auto;
  color:#6f7e91;
  font-size:9px
}
.menu-tip {
  display:block;
  font-size:9px;
  color:#7f8a9a;
  border-top:1px solid #30323e;
  padding-top:10px;
  margin-top:8px
}
.settings-menu {
  width:350px;
  max-height:calc(100dvh - 30px);
  overflow:auto;
  z-index:60
}
.settings-menu form {
  display:grid;
  gap:12px
}
.settings-menu label {
  font-size:12px;
  color:#9da8b8
}
.settings-menu label.field {
  display:grid;
  gap:6px
}
.settings-menu fieldset {
  border:1px solid var(--line);
  border-radius:4px;
  padding:8px;
  display:flex;
  flex-wrap:wrap;
  gap:8px 12px
}
.settings-menu legend {
  font-size:10px;
  color:#8592a4
}
.settings-menu input[type=checkbox] {
  accent-color:#c36e84;
  margin:0 4px 0 0
}
.settings-menu .settings-note {
  font-size:9px;
  color:#7e8da0;
  margin:0
}
.auth-copy .eyebrow {
  font-size:12px;
  color:#c7899b;
  letter-spacing:1.5px
}
.auth-copy h1 {
  font-size:40px;
  font-weight:500;
  line-height:1.25;
  letter-spacing:-1px;
  margin:22px 0
}
.auth-copy p {
  color:var(--muted);
  font-size:14px;
  line-height:1.8
}
#auth {
  display:grid;
  grid-template-columns:1fr 340px;
  gap:80px;
  max-width:1000px;
  margin:100px auto;
  padding:0 30px
}
#auth-form {
  background:var(--panel);
  border:1px solid var(--line);
  padding:24px;
  border-radius:8px;
  display:grid;
  gap:15px
}
#auth-form h2 {
  font-size:18px;
  font-weight:500;
  margin:0 0 6px
}
#auth-form label {
  display:grid;
  gap:7px;
  color:var(--muted)
}
#auth-message {
  font-size:11px;
  line-height:1.6;
  margin:0;
  color:#e6b178
}
#workspace {
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  position:relative
}
.topbar button#show-add {
  padding:5px 12px
}
.menu-no-results {
  color:var(--muted);
  padding:18px 6px;
  text-align:center
}
::-webkit-scrollbar {
  width:6px;
  height:6px
}
::-webkit-scrollbar-thumb {
  background:#344154;
  border-radius:5px
}
@media(max-width:850px) {
  .topbar {
    gap:8px;
    padding:0 8px
  }
  .identity {
    display:none
  }
  .workspace-hint {
    display:none
  }
  .connection {
    font-size:9px
  }
  nav button {
    padding:0 8px
  }
  .brand {
    font-size:16px
  }
  .brand .berry-mark {
    margin-right:4px
  }
  #auth {
    gap:30px;
    margin:65px auto
  }
}
@media(max-width:600px) {
  .topbar {
    height:78px;
    flex-wrap:wrap;
    gap:0 9px;
    padding:6px 8px
  }
  .brand {
    height:28px
  }
  .connection {
    margin-left:auto
  }
  nav {
    height:30px;
    order:4;
    width:calc(100% - 100px)
  }
  nav button {
    flex:1;
    height:28px
  }
  .topbar button#show-add {
    order:5;
    margin-left:auto
  }
  .topbar #logout {
    font-size:10px;
    padding:4px
  }
  .topbar .identity {
    display:none
  }
  .workspace-bar {
    min-height:30px
  }
  .workspace-bar #save-status {
    min-width:58px
  }
  main {
    padding:0 5px 5px
  }
  #grid {
    min-height:100%
  }
  .add-menu {
    top:83px;
    right:5px;
    width:390px;
    max-height:calc(100dvh - 93px);
    overflow:auto
  }
  .catalog-groups {
    grid-template-columns:1fr
  }
  .settings-menu {
    max-height:calc(100dvh - 95px);
    overflow:auto
  }
  #auth {
    display:block;
    margin:45px auto;
    max-width:380px;
    padding:0 12px
  }
  .auth-copy {
    display:none
  }
}
.add-menu.single {
  width:300px
}
.add-menu.single .catalog-groups {
  grid-template-columns:1fr
}

#notice { flex:none }
#canvas-viewport { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; position:relative }
.snap-guide { position:absolute; pointer-events:none; z-index:2147483646; background:var(--accent); opacity:.65 }
.snap-guide-x { top:0; bottom:0; width:1px }
.snap-guide-y { left:0; right:0; height:1px }

td { height:20px; padding:1px 5px }
.widget-status { font-size:11px }
.placeholder { font-size:12px }
.widget-periods { display:flex; gap:1px; flex:none }
.widget-periods button { font-size:11px; padding:2px 3px; border-color:transparent; background:transparent; color:var(--muted) }
.widget-periods button.active { color:var(--accent); border-color:#5a3546 }
th.sortable { cursor:pointer; color:#bbc5d2 }
.settings-menu .columns-fieldset { display:grid; grid-template-columns:1fr 1fr }

.rows > .placeholder { position:sticky; left:0; width:100%; white-space:normal }

.worker-controls { display:flex; flex:none; gap:4px; padding:4px }
.worker-controls input { width:80px; padding:3px 5px }
.worker-controls button { padding:3px 5px }
.worker-report { padding:8px; font-size:12px; white-space:normal; overflow-wrap:anywhere }
.worker-report pre { white-space:pre-wrap; font-size:11px }
.worker-report small { display:block; color:var(--muted) }

.rows details { white-space:normal; min-width:200px; max-width:500px }
.rows details summary { cursor:pointer }
.rows details p { white-space:pre-wrap; max-width:50ch }

/* Market categories stay visible while adding a fixed-source MOEX widget. */
.add-menu { max-height:calc(100dvh - 70px); overflow:auto }
.catalog-section + .catalog-section { margin-top:9px }
.catalog-section h4 { margin:0 0 2px; padding:4px 6px; color:#b7c2cf; font-size:12px; font-weight:600; background:#202735; border-radius:3px }
.catalog-moex button { padding:2px 6px; min-height:24px }
.catalog-moex button span:first-child { font-size:13px; line-height:16px }

.settings-menu .field { display:grid; gap:6px }
.field-caption { display:flex; align-items:center; gap:6px }
.field-caption label { flex:1 }
.settings-menu .field-help { flex:none; padding:0; width:22px; height:22px; color:#d996ab; border-color:transparent; background:transparent; font-size:15px; line-height:20px }
.settings-menu .field-explanation,.settings-menu .filter-guide p { margin:0; padding:8px; border-left:2px solid #b46a80; border-radius:3px; background:#202735; color:#c5ceda; font-size:12px; line-height:1.5; overflow-wrap:anywhere }
.filter-guide summary { cursor:pointer; color:#d996ab; font-size:12px }
.filter-guide[open] summary { margin-bottom:7px }

.widget {
  color:#d1d4d8;
  --widget-positive:#2dad6b;
  --widget-negative:#c74949;
}

tr.trade-highlight td { animation:bru-top-highlight 4s ease-out both; animation-delay:var(--highlight-delay,0ms) }
tr.trade-highlight td:first-child { animation-name:bru-top-marker }
@keyframes bru-top-highlight { from { background-color:rgba(177,80,111,.28) } to { background-color:transparent } }
@keyframes bru-top-marker { from { background-color:rgba(177,80,111,.28); box-shadow:inset 3px 0 0 #d58ca2 } to { background-color:transparent; box-shadow:inset 3px 0 0 transparent } }
@media (prefers-reduced-motion:reduce) {
  tr.trade-highlight td { animation:none; background-color:rgba(177,80,111,.16) }
  tr.trade-highlight td:first-child { box-shadow:inset 3px 0 0 #d58ca2 }
}

tr.signal-highlight td,tr.news-highlight td { animation:bru-top-highlight 4s ease-out both; animation-delay:var(--highlight-delay,0ms) }
tr.signal-highlight td:first-child { animation-name:bru-top-marker }
tr.robot-meta-early td { background-color:rgba(70,153,220,.12) }
tr.robot-meta-amplified td:first-child { box-shadow:inset 3px 0 #55b9ed }
.robot-meta-badge { color:#65bceb; font-size:.85em; white-space:nowrap }
tr.robot-warning td { background-color:rgba(193,146,89,.16) }
tr.robot-warning:hover td { background-color:rgba(193,146,89,.24) }
tr.robot-warning td:first-child { box-shadow:inset 3px 0 0 #c19259 }
tr.news-priority td:first-child { box-shadow:inset 3px 0 0 #c19259 }
@media (prefers-reduced-motion:reduce) {
  tr.signal-highlight td,tr.news-highlight td { animation:none; background-color:rgba(177,80,111,.16) }
  tr.signal-highlight td:first-child { box-shadow:inset 3px 0 0 #d58ca2 }
}

tr.ticker-action-row,.copyable-ticker { cursor:pointer }
.copyable-ticker:hover { color:var(--accent); background-color:rgba(177,80,111,.12) }
.copyable-ticker.ticker-copied { color:#efb4c7; background-color:rgba(177,80,111,.24) }
.ticker-context-menu { position:fixed; inset:unset; margin:0; max-width:calc(100vw - 16px); padding:4px; border:1px solid #5b3b4c; border-radius:5px; background:#171d26; color:var(--text); box-shadow:0 8px 24px #0008 }
.ticker-context-menu button { width:100%; padding:6px 10px; border:1px solid transparent; background:transparent; text-align:left; font-size:12px }
.ticker-context-menu button:hover,.ticker-context-menu button:focus-visible { background:#322635; border-color:#5b3b4c; color:#efb4c7 }
.robot-history-pages { display:flex; align-items:center; gap:8px; padding:8px; }
.robot-history-pages button { padding:4px 8px; }
.robot-history-detail summary { cursor:pointer; white-space:nowrap; }
.robot-history-events { white-space:normal; min-width:220px; max-width:340px; padding:6px 0; line-height:1.5; color:var(--text); }
.robot-countdown { display:inline-block; min-width:44px; font-variant-numeric:tabular-nums }
.robot-next-second { display:inline-block; margin-left:4px; min-width:32px; color:var(--muted); font-size:11px }
.robot-table { font:12px/1.05 Arial,sans-serif }
.ices-table { table-layout:fixed; width:100% }
.ices-table th,.ices-table td { overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.robot-lot-value { display:inline-block; max-width:18ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:bottom }
.robot-table th,.robot-table td { text-align:left }
.robot-table th:not(:last-child),.robot-table td:not(:last-child) { border-right:1px solid rgba(138,148,162,.16) }
.robot-table td.positive,.robot-table td.negative,.robot-countdown { font-weight:700 }

.admin-link { color:var(--accent); text-decoration:none; white-space:nowrap; padding:5px 8px }
.admin-link:hover { text-decoration:underline }
.admin-page { overflow:auto; height:auto; min-height:100dvh }
.admin-main { display:block; flex:none; width:min(1050px,100%); margin:0 auto; padding:20px }
.admin-panel { padding:18px; margin-bottom:18px; border:1px solid var(--line); border-radius:6px; background:var(--panel) }
.admin-panel h1 { font-size:18px; margin:0 0 14px }
.admin-panel p { color:var(--muted); max-width:85ch }
.admin-toggle,.admin-heading,.admin-pagination,#admin-search { display:flex; align-items:center; gap:12px }
.admin-heading { justify-content:space-between }
#admin-search { flex-wrap:wrap }
#user-query { flex:1; min-width:180px }
.admin-table-wrap { overflow-x:auto }
.admin-users { width:100%; font:13px/1.4 Arial,sans-serif }
.admin-users th,.admin-users td { text-align:left; padding:9px 10px; height:36px; border-bottom:1px solid var(--line) }
.admin-users input,.admin-toggle input { width:17px; height:17px; accent-color:var(--accent); cursor:pointer }
.admin-users td button { margin-left:8px; font-size:12px }
.admin-users select { padding:4px 6px }
#user-widget-panel > button { margin-top:14px }
.admin-pagination { margin-top:14px }

.robot-timer-button { padding:0 2px; margin-left:3px; border:0; background:transparent; color:var(--muted); font-size:12px; line-height:16px }
.robot-timer-button:hover { color:var(--accent); background:transparent }
.robot-timer-panel { position:fixed; left:0; right:0; bottom:0; z-index:2147483647; max-height:35dvh; padding:6px 12px; border-top:1px solid var(--line); background:#161c25; box-shadow:0 -6px 24px #0008 }
.robot-timer-panel-head,.robot-timer-head,.robot-timer-line { display:flex; align-items:center; gap:7px }
.robot-timer-panel-head { justify-content:space-between; padding:0 3px 5px }
.robot-timer-list { display:flex; flex-direction:column; gap:6px }
.robot-timer-panel .robot-timer-list { flex-direction:row; gap:10px; overflow:auto; max-height:calc(35dvh - 40px); padding-bottom:3px }
.robot-timer-panel .robot-timer-card { flex:0 0 190px }
.robot-timer-card { padding:6px 8px; border:1px solid var(--line); border-radius:4px; background:#1b222d; color:#bdc2c9; --widget-positive:#2dad6b; --widget-negative:#c74949 }
.robot-timer-card.robot-warning { border-color:#947348; background:#332b22 }
.robot-timer-head strong { flex:1; font-size:12px }
.robot-timer-head span { font-size:11px; font-weight:700 }
.robot-timer-head button { border:0; padding:0 2px; background:transparent; min-width:20px }
.robot-timer-line { justify-content:space-between }
.robot-timer-value { font-size:28px; font-weight:700; line-height:34px; font-variant-numeric:tabular-nums }
.robot-timer-second { font-size:13px; font-variant-numeric:tabular-nums }
.robot-timer-lot { font-size:12px; line-height:16px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere }
.robot-timer-card.last-three { border-color:var(--accent); box-shadow:inset 2px 0 var(--accent) }
.robot-timer-card.last-three .robot-timer-value { color:#efb4c7 }
.robot-timer-card.last-three:has(.robot-timer-value.positive) { border-color:var(--positive); box-shadow:inset 2px 0 var(--positive) }
.robot-timer-card.last-three .robot-timer-value.positive { color:var(--positive) }
.robot-timer-card small { color:var(--muted); font-size:10px }
.robot-timer-window { height:auto; min-height:100dvh; display:block; overflow:auto; padding:2px; background:#11151b }
.robot-timer-window .robot-timer-card { padding:3px 4px; min-width:0 }
.robot-timer-window .robot-timer-head { gap:3px; flex-wrap:wrap }
.robot-timer-window .robot-timer-head strong { min-width:40px; overflow-wrap:anywhere }
.robot-timer-window .robot-timer-head button { min-width:16px; font-size:11px }
.robot-timer-window .robot-timer-value { font-size:25px; line-height:29px }
.robot-timer-window .robot-timer-line { gap:3px; flex-wrap:wrap }
.robot-timer-window .robot-timer-card small { display:none }
.robot-timer-window .robot-timer-card[data-test-timer="true"] small { display:block }

.theme-select { padding:3px 5px; width:85px; font-size:12px }
.layout-presets { width:min(420px,calc(100vw - 24px)); max-height:calc(100dvh - 70px); overflow:auto; margin:0; padding:14px; border:1px solid var(--line); border-radius:6px; background:var(--panel); color:var(--text); box-shadow:0 6px 24px #0008 }
.layout-presets p { color:var(--muted); font-size:12px; margin:8px 0 }
.layout-slot { display:grid; grid-template-columns:1fr auto auto; gap:7px; padding:10px 0; border-top:1px solid var(--line) }
.layout-slot label,.layout-slot small { grid-column:1 / -1 }
.layout-slot small { color:var(--muted); font-size:11px }
.layout-slot input { width:100%; padding:5px }

:root[data-theme="graphite"] { --bg:#202329; --panel:#272b31; --head:#30353c; --line:#434952; --muted:#969ea9; --text:#d1d4d8; --accent:#cd839c }
[data-theme="graphite"] .topbar { background:#292d34 }
[data-theme="graphite"] button,[data-theme="graphite"] input,[data-theme="graphite"] select { background:#252a30; border-color:#4a515b }
[data-theme="graphite"] button:hover { background:#343a42 }
[data-theme="graphite"] button.primary { background:#9b526c; border-color:#b16c84 }
[data-theme="graphite"] button.quiet,[data-theme="graphite"] .icon-button,[data-theme="graphite"] .robot-timer-button,[data-theme="graphite"] .robot-timer-head button { background:transparent }
[data-theme="graphite"] nav button.active { background:#382833; color:#e2abc0; border-color:#755267 }
[data-theme="graphite"] .add-menu,[data-theme="graphite"] .settings-menu,[data-theme="graphite"] .ticker-context-menu { background:#272b31 }
[data-theme="graphite"] .catalog-section h4,[data-theme="graphite"] .field-explanation,[data-theme="graphite"] .filter-guide p { background:#30353c }
[data-theme="graphite"] .robot-timer-panel { background:#292d34 }
[data-theme="graphite"] .robot-timer-card { background:#272b31; border-color:var(--line) }
[data-theme="graphite"] .robot-timer-window { background:#202329 }
[data-theme="graphite"] .robot-timer-card.robot-warning { background:#372d25; border-color:#947348 }
[data-theme="graphite"] .robot-timer-card.last-three { border-color:var(--accent) }
.robot-rate-pair .robot-unit { margin-left:0 }
.robot-rate-pair .robot-pair-separator { padding:0; text-align:center }
.robot-print-count,.robot-unit,.robot-pair-separator { color:#8a94a2; font-weight:400 }
.robot-pair-separator { padding:0 6px }
.robot-unit { margin-left:2px }
.robot-rub-value { color:#b7c1cc }

/* Graphite surfaces match the original screener; signal colours stay shared. */
[data-theme="graphite"] .widget { border-color:#434952 }
[data-theme="graphite"] .widget-head,[data-theme="graphite"] .widget th { background:#30353c; border-color:#454b54 }
[data-theme="graphite"] .widget th { color:#a4acb7 }
[data-theme="graphite"] .widget td { border-bottom-color:#3a4048 }
[data-theme="graphite"] .widget tbody tr:nth-child(even):not(.robot-warning):not(.trade-highlight):not(.signal-highlight):not(.news-highlight) td { background:#292e35 }
[data-theme="graphite"] .widget tbody tr:not(.robot-warning):hover td { background:#343a42 }
[data-theme="graphite"] .rows { scrollbar-color:#4a515b transparent }
/* News are compact stacked stories rather than a wide market-data table. */
.news-feed { display:block; width:100%; white-space:normal; line-height:1.35 }
.news-feed thead { display:none }
.news-feed tbody { display:block }
.news-feed tr { display:grid; grid-template-columns:auto minmax(0,1fr); gap:0 8px; padding:8px 7px; border-bottom:1px solid var(--line) }
.news-feed td { display:block; min-width:0; height:auto; padding:0; border:0; text-align:left; overflow-wrap:anywhere; background:transparent!important }
.news-feed .news-tickers { grid-column:1 / -1; order:0; display:flex; flex-wrap:wrap; gap:4px; align-items:center }
.news-feed .news-tickers:not(:empty) { margin-bottom:5px }
.news-feed .news-title { grid-column:1 / -1; order:1; font-size:12px; line-height:1.4 }
.news-feed .news-time { grid-column:1; order:2; margin-top:5px; color:var(--muted); font-size:11px; white-space:nowrap }
.news-feed .news-source { grid-column:2; order:2; margin-top:5px; color:var(--muted); font-size:11px }
.rows .news-feed details { min-width:0; max-width:none; white-space:normal }
.news-feed summary { cursor:pointer; overflow-wrap:anywhere }
.rows .news-feed details p { max-width:none; margin:7px 0 0; padding-top:7px; border-top:1px solid var(--line); white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; line-height:1.5; color:var(--muted); user-select:text }
.news-ticker-badge { padding:1px 5px; border:1px solid #65505c; border-radius:3px; background:rgba(177,80,111,.1); color:#cfa1b1; font-size:11px; line-height:1.4 }
.news-important { color:#c19259; font-size:10px; font-weight:600 }
.news-feed tr.news-priority { box-shadow:inset 3px 0 0 #c19259 }
.news-feed tr.news-priority td { box-shadow:none }
.news-feed tr.news-highlight { animation:bru-top-highlight 4s ease-out both; animation-delay:var(--highlight-delay,0ms) }
.news-feed tr.news-highlight td { animation:none; box-shadow:none }
.news-feed tr:hover { background:#1b2532 }
[data-theme="graphite"] .news-feed tr:hover { background:#343a42 }
@media (prefers-reduced-motion:reduce) { .news-feed tr.news-highlight { animation:none; background-color:rgba(177,80,111,.16) } }
.subscription-card { position:relative; isolation:isolate; overflow:hidden; max-width:440px; margin-top:27px; padding:20px 23px; border:1px solid #704451; border-radius:12px; background:linear-gradient(125deg,rgba(177,80,111,.16),transparent 75%),var(--panel); box-shadow:0 10px 28px #0002 }
.subscription-card::before { content:''; position:absolute; inset:0 0 auto; height:2px; background:linear-gradient(90deg,#dc7d92,#92526d,transparent) }
.subscription-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; color:var(--text); font-size:13px }
.subscription-badge { padding:3px 8px; border:1px solid rgba(220,125,146,.24); border-radius:20px; color:#dba1b1; background:rgba(177,80,111,.1); font-size:10px }
.subscription-price { display:flex; gap:10px; align-items:center; margin:12px 0 14px; font-variant-numeric:tabular-nums }
.subscription-price strong { font-size:52px; line-height:1; font-weight:600; letter-spacing:-2px; color:var(--text) }
.subscription-price > span { display:grid; gap:1px }
.subscription-price b { font-size:24px; font-weight:400; line-height:1.1; color:#dc93a6 }
.subscription-price small { color:var(--muted); font-size:12px }
.subscription-features { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 12px; padding-top:13px; border-top:1px solid rgba(220,125,146,.17); color:var(--muted); font-size:11px; line-height:1.4 }
.subscription-features span::before { content:'✓'; margin-right:6px; color:#c68b9c }
button.danger-button { color:#dc949e; border-color:rgba(199,73,73,.35); background:rgba(199,73,73,.07) }
button.danger-button:hover { color:#f1b5bc; border-color:#98515b; background:rgba(199,73,73,.17) }
@media(max-width:600px) {
  #auth .auth-copy { display:block; margin-bottom:24px }
  .auth-copy h1 { font-size:29px; margin:15px 0 }
  .auth-copy p { font-size:12px; line-height:1.6 }
  .subscription-card { margin-top:18px; padding:17px }
  .subscription-price strong { font-size:44px }
}
/* A blocked dashboard never continues to receive market data or play timers. */
.tab-lock{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;background:var(--bg,#202329);padding:24px}
.tab-lock>div{max-width:450px;padding:28px;border:1px solid var(--line,#434952);border-radius:14px;background:var(--panel,#272b31);text-align:center}
.tab-lock p{line-height:1.5}.user-online{color:#2dad6b}
.widget:has(.key-rate){container-type:size}
.key-rate{display:flex;flex-direction:column;overflow:auto;padding:8px;gap:6px}
.key-rate-grid{display:grid;grid-template-columns:minmax(55px,.75fr) repeat(2,minmax(70px,1fr));gap:0;flex:1 0 auto;min-height:100px}
.key-rate-grid>div{padding:6px;border-bottom:1px solid var(--line,#434952);border-right:1px solid var(--line,#434952);min-width:0}
.key-rate-grid>div:nth-child(3n){border-right:0}
.key-rate-label{font-size:clamp(10px,3cqw,15px);color:var(--muted,#969ea9)}
.key-rate-source{font-size:clamp(11px,3.5cqw,18px);align-content:center;overflow-wrap:anywhere}
.key-rate-cell{display:flex;flex-direction:column;justify-content:center;gap:5px}
.key-rate-cell strong{font-size:clamp(16px,min(7cqw,12cqh),64px);font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.key-rate-cell a{color:inherit;text-decoration:none}.key-rate-cell a:hover{text-decoration:underline}
.key-rate-cell small{font-size:clamp(9px,2.6cqw,13px);line-height:1.25;color:var(--muted,#969ea9);overflow-wrap:anywhere}
.key-rate-state{flex:none;min-width:0;font-size:11px;line-height:1.4;margin:0;white-space:normal;overflow-wrap:anywhere;color:var(--muted,#969ea9)}
.key-rate-wait{flex:none;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.key-rate-cell .key-rate-error{color:#c74949}.key-rate-cell .key-rate-update{color:#cd839c}
.key-rate-new{background:rgba(205,131,156,.17);box-shadow:inset 0 0 0 1px rgba(205,131,156,.4);animation:rate-flash 1s ease-out 2}
@keyframes rate-flash{from{background:rgba(205,131,156,.4)}to{background:rgba(205,131,156,.17)}}
#rate-schedule{display:flex;gap:12px;align-items:end;flex-wrap:wrap}#rate-schedule label{display:grid;gap:6px}
.widget-away{justify-content:center;align-items:center;gap:8px;padding:12px;color:var(--muted)}
.widget-away p{margin:0}.widget-away button{max-width:100%;white-space:normal}
.widget-window{height:100dvh;overflow:hidden;padding:0;display:block}
.widget-window>.detached-mount{height:100%;width:100%;overflow:hidden}
.detached-mount>.detached-widget{position:relative!important;left:0!important;top:0!important;width:100%!important;height:100%!important;min-width:0;border-radius:0}
.detached-widget>.resize-e,.detached-widget>.resize-s,.detached-widget>.resize-se{display:none}
.detached-widget>.widget-head{cursor:default;touch-action:auto}
.floating-widgets{display:flex;flex-wrap:wrap;align-items:flex-start;gap:4px;padding-top:4px}
.floating-widgets>.detached-mount{flex:0 0 auto;min-width:180px;max-width:100%;min-height:150px;resize:both;overflow:hidden}
.shared-widget-tools{display:flex;gap:1px;flex:none}
.shared-widget-tools button{width:18px!important;font-size:13px!important}
.shared-widget-tools button[draggable]{cursor:grab;touch-action:none}
.shared-dragging{opacity:.65}
.robot-timer-window.has-floating-widgets{min-width:280px}
.has-floating-widgets>.robot-timer-list{display:flex;flex-wrap:wrap;gap:3px}
.has-floating-widgets>.robot-timer-list>.robot-timer-card{flex:1 1 150px;max-width:220px}

/* Shared chat: compact controls and a separately scrolling message list. */
.rows.chat-widget { display:flex;flex-direction:column;gap:5px;padding:5px 7px;overflow:hidden;font:12px/1.4 Arial,sans-serif;color:var(--text) }
.chat-profile { flex:none;max-height:45%;overflow:auto;color:var(--muted) }
.chat-profile summary { cursor:pointer;font-size:11px }
.chat-nickname { display:flex;gap:5px;margin:5px 0 }
.chat-nickname input { min-width:0;flex:1;padding:4px }
.chat-nickname button,.chat-compose button { padding:4px 7px;font-size:11px }
.chat-sound { display:flex;gap:5px;align-items:center;font-size:11px }
.chat-sound input { width:auto }
.chat-messages { min-height:0;flex:1;overflow:auto;scrollbar-width:thin;overflow-wrap:anywhere }
.chat-message { padding:6px 0;border-bottom:1px solid var(--line) }
.chat-message-head { display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 6px;font-size:11px }
.chat-message-head strong { color:var(--accent);max-width:100%;overflow-wrap:anywhere }
.chat-message-head time { color:var(--muted);font-size:10px;margin-left:auto;font-variant-numeric:tabular-nums }
.chat-message p { margin:3px 0 0;white-space:pre-wrap }
.chat-admin { color:var(--muted);font-size:9px }
.chat-message-head .chat-moderate { padding:1px 3px;font-size:9px;color:var(--muted);background:transparent }
.chat-compose { display:flex;flex:none;gap:5px;align-items:stretch }
.chat-compose textarea { min-width:0;flex:1;resize:none;max-height:80px;min-height:40px;font:inherit;color:var(--text);background:var(--panel);border:1px solid var(--line);border-radius:4px;padding:5px }
.chat-compose textarea:focus-visible { outline:1px solid var(--accent) }
.chat-feedback { flex:none;color:var(--muted);font-size:10px;overflow-wrap:anywhere }
.chat-more { flex:none;align-self:center;padding:2px 12px;font-size:10px }
.chat-more[hidden] { display:none }
.chat-empty { color:var(--muted) }
.chat-bans { display:flex;flex-wrap:wrap;gap:4px;margin-top:4px }

.rows.pair-widget { display:flex;flex-direction:column;gap:5px;overflow:hidden;padding:5px 7px;font:11px/1.4 Arial,sans-serif;color:var(--text) }
.pair-toolbar,.pair-controls { display:flex;flex-wrap:wrap;gap:4px;align-items:center;flex:none }
.pair-toolbar input { width:90px;min-width:45px;flex:1;padding:3px 5px;text-transform:uppercase }
.pair-toolbar button,.pair-controls button,.pair-controls select { padding:3px 5px;font-size:11px }
.pair-controls input { width:50px;padding:3px }
.pair-controls span { color:var(--muted) }
.pair-ruler-box,.pair-ruler-label { position:absolute;pointer-events:none;z-index:5;box-sizing:border-box }
.pair-ruler-box { border:1px solid #2dad6b;background:rgba(45,173,107,.14) }
.pair-ruler-box.fall { border-color:#c74949;background:rgba(199,73,73,.14) }
.pair-ruler-label { max-width:100%;padding:3px 6px;border:1px solid var(--line);border-radius:3px;background:var(--panel);color:var(--text);font:11px/1.4 Arial,sans-serif;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;box-shadow:0 2px 6px #0005 }
.pair-ruler-box[hidden],.pair-ruler-label[hidden] { display:none }
.pair-chart { flex:1;min-height:100px;min-width:0;overflow:hidden;position:relative }
.pair-metrics { flex:none;color:var(--text);font-variant-numeric:tabular-nums;font-size:11px;overflow-wrap:anywhere }
.pair-sizing { flex:none;font-size:11px;color:var(--accent);font-variant-numeric:tabular-nums;overflow-wrap:anywhere }
.pair-feedback { flex:none;color:var(--accent);font-size:10px;overflow-wrap:anywhere }
.pair-footer { flex:none;display:flex;flex-wrap:wrap;gap:3px 8px;justify-content:space-between;color:var(--muted);font-size:9px }
.pair-footer a { color:var(--muted) }

/* Compact workspace chrome; settings live in the account popover. */
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.dashboard-topbar{height:40px;gap:10px;padding:0 10px}.dashboard-topbar .brand{font-size:16px}.dashboard-topbar nav button{height:28px;padding:0 9px}.dashboard-topbar #show-add{padding:4px 8px}.dashboard-topbar #widget-count{white-space:nowrap;font-variant-numeric:tabular-nums}.dashboard-topbar #save-status{color:var(--positive);font-size:10px;max-width:130px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dashboard-topbar .connection{overflow:hidden;text-overflow:ellipsis;min-width:0}.user-menu-button{display:flex;align-items:center;justify-content:center;flex:none;width:30px;height:30px;padding:4px;border:1px solid var(--line);border-radius:50%}.user-menu-button[aria-expanded="true"]{color:var(--accent);border-color:var(--accent)}.workspace-help-button{width:24px;height:24px;padding:0;flex:none;border:1px solid var(--line);border-radius:50%;font-size:12px}
.user-menu,.workspace-help{margin:0;padding:12px;border:1px solid var(--line);border-radius:7px;color:var(--text);background:var(--panel);box-shadow:0 6px 24px #0008;max-width:calc(100vw - 16px);overflow:auto}.user-menu{width:250px}.user-menu:popover-open{display:flex;flex-direction:column;gap:4px}.user-menu .identity{display:block;max-width:none;padding:2px 4px 10px;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line)}.user-theme{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:6px 4px}.user-theme .theme-select{width:118px;padding:4px 6px}.user-menu button,.user-menu a{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;padding:7px 5px;font-size:12px;color:var(--text);text-decoration:none;border:0;border-radius:4px}.user-menu a:hover{background:var(--head)}.user-menu #logout{color:var(--negative);border-top:1px solid var(--line);border-radius:0;margin-top:3px;padding-top:10px}.workspace-help{width:310px;font-size:12px}.workspace-help p{color:var(--muted);margin:8px 0 0}
@media(max-width:850px){.dashboard-topbar{gap:7px}.dashboard-topbar .berry-mark{display:none}.dashboard-topbar #save-status{max-width:85px}.dashboard-topbar nav button{padding:0 7px}}
@media(max-width:600px){.dashboard-topbar{height:auto;min-height:40px;gap:4px 7px;padding:5px 8px}.dashboard-topbar nav{order:4;flex:1;width:auto;min-width:220px}.dashboard-topbar #show-add{order:5}.dashboard-topbar #widget-count{order:6}.dashboard-topbar #save-status{display:none}.dashboard-topbar .brand{height:28px}.dashboard-topbar #show-timers{padding:3px 5px;font-size:11px}}

.watchlist-dialog{width:min(680px,calc(100vw - 24px));max-height:85dvh;overflow:auto;margin:auto;padding:14px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text)}.watchlist-dialog::backdrop{background:#0009}.watchlist-dialog .menu-heading{margin-bottom:12px}.watchlist-dialog input[type=search]{width:100%;margin:5px 0}.watchlist-dialog p{font-size:12px;color:var(--muted)}.watchlist-toolbar,.watchlist-create{display:flex;align-items:center;gap:5px;margin:5px 0;flex-wrap:wrap}.watchlist-toolbar select,.watchlist-toolbar input,.watchlist-create input{flex:1;min-width:100px}.watchlist-toolbar button,.watchlist-create button{font-size:11px;padding:4px 6px}.watchlist-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:11px}.watchlist-table td,.watchlist-table th{padding:5px;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px solid var(--line)}.watchlist-table th:first-child{width:95px}.watchlist-dialog .watchlist-table th:last-child{width:100px}.watchlist-table button{padding:2px 5px;font-size:11px}.watchlist-symbol{border:0;background:none;font-weight:600;color:var(--text)}.watchlist-search-results{max-height:180px;overflow:auto}.watchlist-search-results button,.watchlist-pick{display:block;width:100%;padding:6px;text-align:left;font-size:12px}.watchlist-tip{padding:5px;font-size:11px;color:var(--muted)}.rows>.watchlist-toolbar{padding:2px 5px;position:sticky;top:0;background:var(--panel);z-index:1}.rows>.watchlist-toolbar select{padding:3px;font-size:11px}

.widget-costs-dialog{width:min(1180px,calc(100vw - 24px))}.widget-costs-dialog>div{overflow:auto}.widget-costs-dialog table{table-layout:auto;min-width:800px}.widget-costs-dialog th:first-child,.widget-costs-dialog td:first-child{width:auto;min-width:240px;white-space:normal}.widget-costs-dialog h3{font-size:14px;margin:16px 0 5px}
/* Account release notes; shown only after authentication. */
.updates-button{position:relative;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center}
.updates-button.has-updates::after{content:"";position:absolute;right:3px;top:3px;width:7px;height:7px;border-radius:50%;background:#e890a3}
.updates-panel,.updates-toast{color:var(--text,#e8eaf0);background:var(--panel,#171c24);border:1px solid var(--border,#343c49);border-radius:12px;box-shadow:0 16px 48px #0006;padding:18px;line-height:1.5}
.updates-panel{position:fixed;inset:60px 16px auto auto;margin:0;width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 90px);overflow:auto;box-sizing:border-box}
.updates-toast{position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);margin:0;width:min(400px,calc(100vw - 32px));max-height:65dvh;overflow:auto;z-index:90;box-sizing:border-box}
.updates-panel h2,.updates-panel h3,.updates-toast p{margin:0 0 10px}
.updates-panel section+section{border-top:1px solid var(--border,#343c49);padding-top:14px;margin-top:14px}
.updates-panel ul,.updates-toast ul{padding-left:20px;margin:10px 0 14px}
.updates-panel li,.updates-toast li{margin:5px 0}
.updates-panel button,.updates-toast button{margin:4px 6px 0 0}
.updates-panel small{opacity:.65}
.layout-presets-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.layout-presets-heading button{flex-shrink:0;padding:4px 8px;font-size:12px}
.layout-presets .layout-save-warning{color:var(--text);border-left:2px solid var(--accent);padding:4px 8px}
.user-menu #logout-all{color:var(--negative)}
.compact-confirm{width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;box-sizing:border-box;padding:20px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--text);box-shadow:0 16px 48px #0006}
.compact-confirm::backdrop{background:#0008}
.compact-confirm h2{font-size:18px;margin:0 0 12px}
.compact-confirm p{color:var(--muted);line-height:1.6;margin:0 0 18px}
.compact-confirm-actions{display:flex;flex-wrap:wrap;gap:8px}
.compact-confirm-actions button{white-space:normal;text-align:left}
.password-control{display:flex;align-items:stretch;gap:6px}
.password-control input{min-width:0;flex:1}
#auth-form .password-control button{width:auto;margin:0;padding:4px 9px;font-size:11px;flex-shrink:0}
.spam-trap{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.support-dot,.support-admin-unread{color:var(--accent)}
.user-menu-button.has-support-reply{position:relative}
.user-menu-button.has-support-reply::after{content:"";position:absolute;right:0;top:0;width:7px;height:7px;border-radius:50%;background:var(--accent)}
.support-dialog{width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);box-sizing:border-box;overflow:auto;padding:18px;border:1px solid var(--line);border-radius:9px;background:var(--panel);color:var(--text);box-shadow:0 16px 48px #0006}
.support-dialog::backdrop{background:#0007}
.support-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.support-heading h2{font-size:17px;margin:0}
.support-heading>button{font-size:20px;padding:0 8px}
.support-form{display:grid;gap:12px;margin-top:12px}
.support-form label{display:grid;gap:6px}
.support-form textarea{box-sizing:border-box;width:100%;resize:vertical;min-height:100px;max-height:30dvh;font:inherit;color:var(--text);background:var(--bg);border:1px solid var(--line);border-radius:5px;padding:9px}
.support-form small,.support-message small,.support-list-item small{color:var(--muted);font-size:11px}
.support-form>button{justify-self:start}
.support-list{display:grid;gap:8px;margin:12px 0}
.support-list-item{display:grid;gap:5px;text-align:left;padding:10px;width:100%;box-sizing:border-box}
.support-list-item span{font-weight:normal;overflow-wrap:anywhere;white-space:pre-wrap}
.support-actions{display:flex;gap:8px}
.support-messages{max-height:38dvh;overflow:auto;margin-top:12px;display:flex;flex-direction:column;gap:9px}
.support-message{padding:10px;border:1px solid var(--line);border-radius:6px;background:var(--bg)}
.support-message-admin{border-left:3px solid var(--accent)}
.support-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 0;line-height:1.5}
.support-feedback{color:var(--muted);font-size:12px}
.support-admin-unread{font-size:12px}
.volatility-stale{opacity:.55}
.volatility-group td{font-size:10px;font-weight:600;text-align:left;padding:5px 4px 3px;border-top:1px solid var(--line);background:var(--head)}
.catalog-section button .widget-new-badge{flex:none;margin-left:auto;padding:2px 5px;border:1px solid #568c74;border-radius:4px;color:#9ce3ba;font-size:9px;font-weight:700;line-height:1.2;letter-spacing:.4px}
.widget-periods button[data-limit-view]{width:auto;min-width:23px;padding:2px 5px}
.spike-aged { opacity: .5; }
.spike-rules-dialog{width:min(760px,calc(100vw - 24px))}.spike-rules-dialog table{width:100%;border-collapse:collapse;table-layout:fixed}.spike-rules-dialog th,.spike-rules-dialog td{text-align:left;padding:6px 3px}.spike-rules-dialog td input{box-sizing:border-box;width:100%;min-width:0}.spike-rules-dialog th:last-child{width:85px}.spike-rules-dialog td button{font-size:11px;padding:5px}.spike-rules-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}.spike-rules-actions button:first-child{margin-right:auto}
.spike-rules-presets{border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:12px}.spike-rules-presets label{display:flex;flex-direction:column;gap:4px;margin:8px 0}.spike-rules-presets input,.spike-rules-presets select{box-sizing:border-box;width:100%;min-width:0;max-width:100%}.spike-rules-presets p{font-size:12px;color:var(--muted)}

.robot-filters-dialog th:first-child{width:22%}.robot-filters-dialog th:nth-child(2),.robot-filters-dialog th:nth-child(3){width:32%;white-space:normal}.robot-filters-dialog th:last-child{width:14%}
.robot-filters-dialog td input[type=checkbox]{width:auto;min-width:0;margin:0}

.density-watch-panel{padding:4px 8px;border-bottom:1px solid var(--border,#39404b);font-size:11px}
.density-watch-panel summary{cursor:pointer}
.density-watch-panel p{margin:6px 0;opacity:.8}
.density-watch-item{display:flex;gap:8px;justify-content:space-between;align-items:center;padding:3px 0}
.density-watch-item button{font-size:11px;padding:2px 5px;cursor:pointer}

/* Density notifications are overlays: they never change the board geometry. */
.density-local-note{position:absolute;left:6px;right:6px;bottom:6px;z-index:8;padding:7px 9px;border:1px solid var(--accent);border-radius:5px;background:var(--panel);color:var(--text);box-shadow:0 3px 15px #0006;font-size:11px;line-height:1.4;white-space:pre-line;overflow-wrap:anywhere;pointer-events:none}
.density-local-note.error{border-color:var(--negative)}
.density-alert-toasts{position:fixed;right:12px;bottom:12px;z-index:2147483647;width:min(350px,calc(100vw - 24px));max-height:55dvh;overflow-y:auto;display:flex;flex-direction:column;gap:8px;pointer-events:none}
.density-event-card{position:relative;margin:0;padding:10px 32px 10px 12px;border:1px solid var(--accent);border-radius:6px;background:var(--panel);color:var(--text);box-shadow:0 4px 18px #0007;font-size:12px;line-height:1.5;overflow-wrap:anywhere;pointer-events:auto}
.density-event-title{display:block;font-size:16px;font-weight:700;line-height:1.25;color:var(--text)}
.density-event-details{margin-top:3px;font-size:11px;line-height:1.4;color:var(--muted);white-space:normal}
.density-local-event+.density-local-event{margin-top:7px;padding-top:7px;border-top:1px solid var(--line)}
.density-event-card small{color:var(--muted)}
.density-event-close{position:absolute;right:5px;top:5px;border:0;background:transparent;font-size:18px;line-height:1;padding:2px 4px;cursor:pointer}
.density-local-note.fired{max-height:55%;overflow-y:auto;pointer-events:auto}

.widget.widget-signal-active{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent),0 0 10px #dc7d9255}
.widget.widget-signal-active>.widget-head{background:linear-gradient(#dc7d9238,#dc7d9238),var(--head);box-shadow:inset 0 -2px 0 var(--accent);color:var(--text)}
.settings-menu .density-notify-checkbox{grid-template-columns:1fr auto;align-items:center}
.settings-menu .density-notify-checkbox input{width:auto;min-width:0;margin:0}
