/* Visual contract for the approved "Final mockup 22".
   It is deliberately scoped to the Neurodialogs route so other GramJet modules
   keep their current appearance. */
body.gramjet-shell-active,
body.neurodialogs-active {
  --nd-bg: #eef6fc;
  --nd-surface: #fff;
  --nd-soft: #f8fbfe;
  --nd-text: #163a59;
  --nd-muted: #667f94;
  --nd-line: #d7e6f3;
  --nd-blue: #1976d2;
  --nd-blue-soft: #e7f3ff;
  --nd-green: #08783e;
  --nd-green-soft: #dcf7e7;
  --nd-orange: #a85c00;
  --nd-orange-soft: #fff0d9;
  --nd-red: #b3261e;
  margin: 0;
  background: var(--nd-bg);
  color: var(--nd-text);
  font: 14px/1.45 Inter, "Segoe UI", Arial, sans-serif;
}

body.neurodialogs-active .neuro-range-head,
body.neurodialogs-active .neuro-rule-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
body.neurodialogs-active .neuro-range { width:100%; accent-color:#1976d2; }
body.neurodialogs-active .neuro-rules-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
}
body.neurodialogs-active .neuro-rule {
  display:grid;
  gap:10px;
  padding:14px;
  border:1px solid #d9e6f1;
  border-radius:12px;
  background:#f9fbfd;
  transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease,transform .12s ease;
}
body.neurodialogs-active .neuro-rule:hover,
body.neurodialogs-active .neuro-rule:focus-within { border-color:#75b5e4; background:#f2f9ff; box-shadow:0 5px 16px rgb(35 112 168 / 10%); transform:translateY(-1px); }
body.neurodialogs-active .neuro-rule:has(input[type="checkbox"]:checked) { border-color:#86bfe8; background:#f1f9ff; }
body.neurodialogs-active .neuro-rule-wide { grid-column:1 / -1; }
body.neurodialogs-active .neuro-reveal { padding-top:8px; border-top:1px solid #dce7f0; }
body.neurodialogs-active [data-neuro-limit-mode].active { border-color:#1976d2 !important; color:#fff !important; background:#1976d2 !important; box-shadow:0 4px 12px rgb(25 118 210 / 24%); }
body.neurodialogs-active .neuro-prompt-choice { display:flex; align-items:center; justify-content:space-between; gap:10px; }
body.neurodialogs-active .neuro-prompt-actions { display:flex; gap:6px; flex-wrap:wrap; }
body.neurodialogs-active .neuro-visual-tools,
body.neurodialogs-active .neuro-log-toolbar {
  display:flex;
  justify-content:space-between;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
body.neurodialogs-active .neuro-visual-tools input,
body.neurodialogs-active .neuro-log-toolbar input { min-width:220px; }
body.neurodialogs-active .neuro-drafts-details { display:none !important; }
.neuro-prompt-backdrop {
  position:fixed;
  inset:0;
  z-index:1000;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgb(15 42 66 / 48%);
}
.neuro-prompt-backdrop.hidden { display:none; }
.neuro-prompt-backdrop > .neuro-rule-head,
.neuro-prompt-backdrop > .neuro-prompt-editor {
  width:min(780px,calc(100vw - 48px));
  box-sizing:border-box;
  background:#fff;
}
.neuro-prompt-backdrop > .neuro-rule-head {
  padding:18px 20px 0;
  border-radius:14px 14px 0 0;
}
.neuro-prompt-backdrop > .neuro-prompt-editor {
  max-height:calc(100vh - 130px);
  overflow:auto;
  padding:14px 20px 20px;
  border-radius:0 0 14px 14px;
  box-shadow:0 20px 55px rgb(15 42 66 / 28%);
}
.neuro-prompt-backdrop > .neuro-prompt-editor.hidden { display:none; }
@media (max-width:850px) {
  body.neurodialogs-active .neuro-rules-grid { grid-template-columns:1fr; }
  body.neurodialogs-active .neuro-rule-wide { grid-column:auto; }
}

body.neurodialogs-active *,
body.neurodialogs-active *::before,
body.neurodialogs-active *::after {
  box-sizing: border-box;
}

/* Yandex/Chromium may paint native number spinners far outside their inputs. */
body.neurodialogs-active input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

body.neurodialogs-active input[type="number"]::-webkit-inner-spin-button,
body.neurodialogs-active input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

body.gramjet-shell-active main {
  max-width: none;
  margin: 0;
  padding: 0;
}

body.gramjet-shell-active main > .topbar,
body.gramjet-shell-active main > .muted,
body.gramjet-shell-active #appNavigation {
  display: none !important;
}

body.gramjet-shell-active #mainWorkspace,
body.gramjet-shell-active .gramjet-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
}

body.gramjet-shell-active .gramjet-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: var(--nd-bg);
  box-shadow: none;
}

body.gramjet-shell-active .service-sidebar {
  box-sizing: border-box;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  width: 224px;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  padding: 22px 14px;
  overflow-y: auto;
  color: #dceeff;
  background: linear-gradient(180deg, #133b62, #0f2d49);
  box-shadow: none;
  scrollbar-color: #4e86b4 #123858;
}

body.gramjet-shell-active .service-sidebar-brand {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 0 11px;
  padding: 0 10px 21px;
}

body.gramjet-shell-active .service-sidebar-brand::before {
  content: "G";
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  color: #fff;
  background: #2684dd;
  font-size: 20px;
}

body.gramjet-shell-active .service-sidebar-brand strong {
  color: #fff;
  font-size: 20px;
}

body.gramjet-shell-active .service-sidebar-brand span {
  color: #a8cae8;
}

body.gramjet-shell-active .service-sidebar-caption {
  margin: 17px 10px 7px;
  color: #7fa9ce;
  font-size: 10px;
  letter-spacing: .14em;
}

body.gramjet-shell-active .service-nav {
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  color: #cfe6f8;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

body.gramjet-shell-active .service-nav:hover,
body.gramjet-shell-active .service-nav.active {
  color: #fff;
  background: #1d527f;
}

body.gramjet-shell-active .service-nav.active {
  box-shadow: inset 3px 0 #5db2ff;
}

body.gramjet-shell-active .service-sidebar-note {
  margin-top: auto;
}

body.gramjet-shell-active .service-session {
  min-width: 0;
  margin-bottom: 6px;
  padding: 10px 4px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.gramjet-shell-active .service-session.hidden {
  display: none;
}

body.gramjet-shell-active .service-session-identity {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin-bottom: 14px;
  padding: 0 6px 16px;
  border-bottom: 1px solid #365978;
  overflow-wrap: anywhere;
}

body.gramjet-shell-active .service-session-identity small {
  color: #b9d7ef;
  font-size: .75rem;
}

body.gramjet-shell-active #serviceUserLogin {
  color: #fff;
  font-size: 1.625rem;
  font-weight: 750;
  line-height: 1.3;
  white-space: normal;
}

body.gramjet-shell-active #serviceUserRole {
  color: #cde7fb;
  font-size: .875rem;
  line-height: 1.4;
}

body.gramjet-shell-active #serviceLogout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 6px;
  border: 1px solid #4a789e;
  border-radius: 9px;
  color: #dceeff;
  background: transparent;
  font-size: .8125rem;
}

body.gramjet-shell-active #serviceLogout.hidden { display: none; }
body.gramjet-shell-active #serviceLogout:hover { background: #204f75; border-color: #79b4e1; }
body.gramjet-shell-active #serviceLogout:focus-visible { outline: 2px solid #8ac9ff; outline-offset: 3px; }
body.gramjet-shell-active #serviceLogout:disabled { opacity: .6; cursor: wait; }

body.gramjet-shell-active .service-session .message {
  overflow-wrap: anywhere;
}

body.gramjet-shell-active .service-session .message:empty {
  display: none;
}

body.gramjet-shell-active .service-content {
  min-width: 0;
  padding: 22px;
  background: var(--nd-bg);
}

body.gramjet-shell-active .service-view {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
}

body.gramjet-shell-active #storiesView {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.gramjet-shell-active .service-view:not(.hidden) {
  animation: gramjet-service-view-in 140ms ease-out;
}

@keyframes gramjet-service-view-in {
  from { opacity: .72; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body.gramjet-shell-active .service-view:not(.hidden) { animation: none; }
}

body.gramjet-shell-active #moduleWorkspaceView,
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) {
  width: 100%;
}

body.gramjet-shell-active #moduleWorkspaceView {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.neurodialogs-active #moduleWorkspaceView > :is(#neurodialogsWorkspace,#genericModuleWorkspace) {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.neurodialogs-active .neurodialogs-header {
  align-items: center;
  margin-bottom: 15px;
}

body.neurodialogs-active .neuro-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.neurodialogs-active .neurodialogs-header h2 {
  margin: 0;
  color: var(--nd-text);
  font-size: 28px;
  letter-spacing: -.4px;
}

body.neurodialogs-active .neurodialogs-header .hint {
  margin-top: 3px;
}

body.neurodialogs-active .neuro-demo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #725100;
  background: #fff0c8;
  font-size: 12px;
  font-weight: 700;
}

body.neurodialogs-active .neurodialogs-safe-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #bfe4ce;
  border-radius: 11px;
  color: #176b3b;
  background: #f2fcf6;
  line-height: 1.45;
}

body.neurodialogs-active .neuro-integration-status,
body.neurodialogs-active #neuroRuntimeSafety,
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) > .neuro-run-controls {
  display: none;
}

body.neurodialogs-active .neuro-run-controls {
  gap: 8px;
  margin: 0 0 14px;
}

body.neurodialogs-active .neuro-section {
  margin: 14px 0;
  padding: 17px;
  border: 1px solid var(--nd-line);
  border-radius: 14px;
  background: var(--nd-surface);
  box-shadow: 0 8px 26px rgb(25 78 122 / 8%);
}

body.neurodialogs-active .neuro-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

body.neurodialogs-active .neuro-section-head.neuro-title-row {
  flex-wrap: nowrap;
}

body.neurodialogs-active .neuro-title-row > div:first-of-type {
  min-width: 0;
  flex: 1;
}

body.neurodialogs-active .neuro-step {
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  color: var(--nd-blue);
  background: var(--nd-blue-soft);
  font-weight: 800;
}

body.neurodialogs-active .neuro-section-head h3 {
  margin: 0;
  color: var(--nd-text);
  font-size: 18px;
  letter-spacing: 0;
}

body.neurodialogs-active .hint,
body.neurodialogs-active .neuro-section-head p {
  color: var(--nd-muted);
  font-size: 12px;
}

body.neurodialogs-active .neuro-section-head p {
  margin: 3px 0 0;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) button,
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) input,
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) select,
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) textarea {
  font: inherit;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) button {
  min-height: 34px;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid var(--nd-line);
  border-radius: 8px;
  color: #fff;
  background: var(--nd-blue);
  box-shadow: none;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) button:hover {
  filter: brightness(.98);
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) button.alt {
  color: #31536f;
  background: #fff;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) button.danger {
  border-color: #e5b9bd;
  color: var(--nd-red);
  background: #fff6f6;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) select,
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cdddea;
  border-radius: 8px;
  color: var(--nd-text);
  background: #fff;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) textarea {
  min-height: 76px;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) label {
  color: #3d5870;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) input[type="checkbox"],
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) input[type="radio"] {
  width: auto;
  accent-color: var(--nd-blue);
}

body.neurodialogs-active .neuro-switch,
body.neurodialogs-active .neuro-section-head > .neuro-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--nd-text);
  font-weight: 700;
  white-space: nowrap;
}

body.neurodialogs-active .neuro-switch input,
body.neurodialogs-active .neuro-section-head > .neuro-check input {
  position: relative;
  appearance: none;
  flex: 0 0 38px;
  width: 38px !important;
  height: 22px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: #bdcbd7;
  transition: .2s;
}

body.neurodialogs-active .neuro-switch input::after,
body.neurodialogs-active .neuro-section-head > .neuro-check input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: .2s;
}

body.neurodialogs-active .neuro-switch input:checked,
body.neurodialogs-active .neuro-section-head > .neuro-check input:checked {
  background: var(--nd-blue);
}

body.neurodialogs-active .neuro-switch input:checked::after,
body.neurodialogs-active .neuro-section-head > .neuro-check input:checked::after {
  transform: translateX(16px);
}

body.neurodialogs-active .neuro-grid {
  gap: 10px;
}

body.neurodialogs-active .neuro-grid.neuro-account-columns {
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .85fr);
  gap: 12px;
}

body.neurodialogs-active .neuro-panel {
  container-type: inline-size;
  min-width: 0;
  padding: 13px;
  border: 1px solid #dce8f2;
  border-radius: 11px;
  background: var(--nd-soft);
}

body.neurodialogs-active .neuro-panel h4 {
  margin: 0;
  color: var(--nd-text);
  font-size: 15px;
}

body.neurodialogs-active .neuro-account-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) .neuro-account-toolbar button {
  padding: 6px 9px;
  font-size: 12px;
}

body.neurodialogs-active .neuro-account-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 130px 130px;
  gap: 7px;
  margin: 10px 0 0;
}

body.neurodialogs-active .neuro-account-filters > input {
  grid-column: 1;
}

body.neurodialogs-active .neuro-account-filters details {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
}

body.neurodialogs-active .neuro-account-filters details > summary {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #cdddea;
  border-radius: 8px;
  color: var(--nd-text);
  background: #fff;
  cursor: pointer;
  list-style: none;
}

body.neurodialogs-active .neuro-account-filters details > summary::after {
  content: "⌄";
  margin-left: auto;
  color: #54728c;
}

body.neurodialogs-active .neuro-filter-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  gap: 4px;
  width: max-content;
  min-width: 190px;
  max-height: 240px;
  padding: 9px;
  overflow: auto;
  border: 1px solid var(--nd-line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(16 55 90 / 16%);
}

body.neurodialogs-active .neuro-filter-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px;
}

body.neurodialogs-active .neuro-account-filters > .neuro-check {
  margin: 2px 0 0;
}

body.neurodialogs-active .neuro-account-filters > .neuro-check:first-of-type {
  grid-column: 1;
}

body.neurodialogs-active .neuro-account-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  min-height: 152px;
  max-height: none;
  margin-top: 10px;
  overflow: visible;
  align-content: start;
}

body.neurodialogs-active :is(#neuroSelectedAccounts,#warmingSelectedAccounts) {
  grid-template-columns: 1fr;
}

body.neurodialogs-active .neuro-account-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: start;
  min-width: 0;
  height: auto;
  padding: 11px;
  border: 1px solid #d9e6f1;
  border-radius: 10px;
  background: #fff;
}

body.neurodialogs-active .neuro-account-card.selected {
  border-color: #b9d9f5;
  background: #fff;
}

body.neurodialogs-active .neuro-account-card-main {
  position: relative;
}

body.neurodialogs-active .neuro-account-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

body.neurodialogs-active .neuro-account-identity {
  display: flex;
  min-width: 0;
  gap: 9px;
}

body.neurodialogs-active .neuro-account-copy {
  min-width: 0;
  overflow: hidden;
}

body.neurodialogs-active .neuro-account-avatar {
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #1765a7;
  background: #dff0ff;
  font-weight: 800;
}

body.neurodialogs-active .neuro-account-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.neurodialogs-active .neuro-account-avatar > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

body.neurodialogs-active .neuro-account-avatar > span[hidden] {
  display: none;
}

body.neurodialogs-active .neuro-account-card-head strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--nd-text);
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.25;
}

body.neurodialogs-active .neuro-account-card-head small {
  display: block;
  max-width: 100%;
  overflow: visible;
  text-overflow: clip;
  margin-top: 2px;
  color: var(--nd-muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

body.neurodialogs-active .neuro-account-meta {
  display: flex;
  align-items: center;
  column-gap: 12px;
  row-gap: 6px;
  flex-wrap: wrap;
}

body.neurodialogs-active .neuro-account-meta .neuro-country-badge {
  min-width: 40px;
  height: 22px;
  padding: 0 5px;
  margin-right: -7px;
}

body.neurodialogs-active .neuro-account-meta .neuro-country-flag,
body.neurodialogs-active .neuro-account-meta .neuro-country-flag svg {
  width: 16px;
  height: 11px;
  flex-basis: 16px;
}

body.neurodialogs-active .neuro-copy-field {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) .neuro-copy-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  min-width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border: 1px solid #c8dbea;
  border-radius: 5px;
  color: #416b8d;
  background: #f6faff;
  font-size: 13px;
  line-height: 1;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) .neuro-copy-button svg {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) .neuro-copy-button:hover,
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) .neuro-copy-button.copied {
  border-color: #8fbce0;
  color: #08783e;
  background: #e6f7ee;
}

body.neurodialogs-active .neuro-account-countries {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 5px;
}

body.neurodialogs-active .neuro-country-badge {
  gap: 3px;
  min-width: 37px;
  height: 28px;
  padding: 0 6px;
  border-radius: 5px;
  color: #315d84;
  background: #edf5fb;
  font-size: 10px;
}

body.neurodialogs-active .neuro-country-flag {
  display: inline-flex;
  flex: 0 0 18px;
  width: 18px;
  height: 12px;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgb(24 51 77 / 12%);
}

body.neurodialogs-active .neuro-country-flag svg {
  display: block;
  width: 18px;
  height: 12px;
}

body.neurodialogs-active .neuro-account-status-row,
body.neurodialogs-active .neuro-account-roles {
  display: flex;
  align-items: flex-start;
  align-self: flex-start;
  gap: 5px;
  flex-wrap: wrap;
}

body.neurodialogs-active .neuro-account-status-row {
  margin-top: 8px;
  width: 100%;
  align-items: center;
  align-content: flex-end;
  min-height: 31px;
  padding-right: 72px;
}

body.neurodialogs-active .neuro-account-roles {
  min-width: 0;
  margin-top: 0;
}

body.neurodialogs-active .neuro-account-status-row .neuro-account-roles {
  display: contents;
}

body.neurodialogs-active .neuro-account-status-row .neuro-account-action {
  position: absolute;
  right: 0;
  bottom: 0;
  margin-left: 0;
}

body.neurodialogs-active .neuro-account-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 31px;
  margin-top: 9px;
}

body.neurodialogs-active .neuro-account-pill,
body.neurodialogs-active .neuro-role-chip {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center;
  align-self: flex-start !important;
  width: auto !important;
  min-width: 0;
  min-height: 24px !important;
  max-height: 24px;
  padding: 3px 8px !important;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}

body.neurodialogs-active .neuro-account-pill.good {
  color: var(--nd-green);
  background: var(--nd-green-soft);
}

body.neurodialogs-active .neuro-account-pill.warn {
  color: var(--nd-orange);
  background: var(--nd-orange-soft);
}

body.neurodialogs-active .neuro-role-chip {
  border-radius: 6px;
  color: #315d84;
  background: #e8f1fb;
}

body.neurodialogs-active .neuro-role-chip.role-chatting {
  color: #bd650f;
  background: #fff0df;
}

body.neurodialogs-active .neuro-role-chip.role-dialogs {
  color: #137760;
  background: #e1f6f0;
}

body.neurodialogs-active .neuro-role-chip.role-unknown {
  color: #596b7d;
  background: #edf1f5;
}

body.neurodialogs-active .neuro-account-action {
  flex: 0 0 auto;
  align-self: center;
  margin-top: 0 !important;
  padding: 6px 9px !important;
  font-size: 12px !important;
}

body.neurodialogs-active .neuro-account-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.neurodialogs-active .neuro-compact-controls { display:flex; align-items:center; gap:5px; min-height:28px; }
body.neurodialogs-active .neuro-compact-controls .neuro-check { display:flex; align-items:center; gap:7px; min-height:28px; margin:0; padding:3px 6px; border-radius:8px; color:#294b68; font-size:12px; font-weight:700; cursor:pointer; transition:color .18s ease,background .18s ease; }
body.neurodialogs-active .neuro-compact-controls .neuro-check:hover { color:#1769aa; background:#f0f7fd; }
body.neurodialogs-active .neuro-compact-controls .neuro-check:has(input:checked) { color:#1769aa; background:#e7f3ff; }
body.neurodialogs-active .neuro-compact-controls .neuro-check input { position:relative; flex:0 0 32px; width:32px !important; min-width:32px !important; height:18px !important; margin:0; border:0; border-radius:999px; outline:0; background:#b9c9d7; appearance:none; cursor:pointer; transition:background .18s ease; }
body.neurodialogs-active .neuro-compact-controls .neuro-check input::after { content:""; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgb(25 66 101 / 25%); transition:transform .18s ease; }
body.neurodialogs-active .neuro-compact-controls .neuro-check input:checked { background:#2580ce; }
body.neurodialogs-active .neuro-compact-controls .neuro-check input:checked::after { transform:translateX(14px); }
body.neurodialogs-active .neuro-compact-controls .neuro-check input:focus-visible { box-shadow:0 0 0 3px rgb(37 128 206 / 18%); }
body.neurodialogs-active .neuro-compact-settings { position:relative; }
body.neurodialogs-active .neuro-compact-settings > summary { display:flex; align-items:center; justify-content:center; gap:5px; min-width:92px; height:28px; padding:0 9px; border:1px solid #cbddeb; border-radius:8px; color:#42627e; background:#fff; cursor:pointer; font-size:11px; font-weight:700; line-height:1; list-style:none; transition:border-color .18s ease,background .18s ease,color .18s ease; }
body.neurodialogs-active .neuro-compact-settings > summary::before { content:"Настроить"; }
body.neurodialogs-active .neuro-compact-settings > summary > span { display:inline-block; font-size:12px; transition:transform .18s ease; }
body.neurodialogs-active .neuro-compact-settings > summary::-webkit-details-marker { display:none; }
body.neurodialogs-active .neuro-compact-settings > summary:hover { border-color:#2580ce; color:#fff; background:#2580ce; box-shadow:0 4px 12px rgb(37 128 206 / 22%); transform:translateY(-1px); }
body.neurodialogs-active .neuro-compact-settings > summary:active { transform:translateY(0) scale(.97); }
body.neurodialogs-active .neuro-compact-settings[open] > summary { border-color:#1769aa; color:#fff; background:#1769aa; box-shadow:0 4px 12px rgb(23 105 170 / 22%); }
body.neurodialogs-active .neuro-compact-settings[open] > summary > span { transform:rotate(180deg); }
body.neurodialogs-active .neuro-compact-menu { position:absolute; z-index:40; top:38px; right:0; width:340px; padding:14px; border:1px solid #cbddeb; border-radius:12px; background:#fff; box-shadow:0 14px 34px rgb(20 64 102 / 18%); }
body.neurodialogs-active .neuro-compact-menu > strong { color:#174474; font-size:13px; }
body.neurodialogs-active .neuro-compact-menu > .hint { margin:4px 0 0; font-size:11px; }
body.neurodialogs-active .neuro-compact-options { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; margin:12px 0; }
body.neurodialogs-active .neuro-compact-options label { display:flex; align-items:center; gap:7px; min-height:28px; padding:4px 7px; border:1px solid transparent; border-radius:7px; font-size:12px; cursor:pointer; transition:border-color .16s ease,background .16s ease,color .16s ease; }
body.neurodialogs-active .neuro-compact-options label:hover { border-color:#b9d8f0; color:#1769aa; background:#f0f8ff; }
body.neurodialogs-active .neuro-compact-options label:has(input:checked) { border-color:#9fcbed; color:#1769aa; background:#e7f3ff; font-weight:700; }
body.neurodialogs-active .neuro-compact-options input { width:auto; margin:0; accent-color:#1976d2; }
body.neurodialogs-active .neuro-compact-actions { display:flex; justify-content:flex-end; gap:6px; padding-top:10px; border-top:1px solid #e1eaf2; }
body.neurodialogs-active .neuro-compact-actions button { margin:0; padding:7px 10px; font-size:11px; transition:color .16s ease,background .16s ease,border-color .16s ease,transform .12s ease,box-shadow .16s ease; }
body.neurodialogs-active .neuro-compact-actions button:hover { transform:translateY(-1px); box-shadow:0 4px 10px rgb(24 86 137 / 16%); }
body.neurodialogs-active .neuro-compact-actions button:active { transform:translateY(0) scale(.97); }
body.neurodialogs-active :is(#neuroCompactSelectAll,#warmingCompactSelectAll):hover { border-color:#69aee4 !important; color:#125f99 !important; background:#dcefff !important; }
body.neurodialogs-active :is(#neuroCompactReset,#warmingCompactReset):hover { border-color:#e2a45f !important; color:#9a520c !important; background:#fff0dc !important; }
body.neurodialogs-active :is(#neuroCompactSelectAll,#warmingCompactSelectAll):hover { border-color:#1976d2; color:#fff; background:#1976d2; }
body.neurodialogs-active :is(#neuroCompactReset,#warmingCompactReset):hover { border-color:#dc9f39; color:#754800; background:#fff0cc; }
body.neurodialogs-active :is(#neuroCompactDone,#warmingCompactDone) { border-color:#1976d2; color:#fff; background:#1976d2; }
body.neurodialogs-active :is(#neuroCompactDone,#warmingCompactDone):hover { border-color:#115f9e; background:#115f9e; }
body.neurodialogs-active :is(#neuroAccountsSection,#warmingAccountSelector) .neuro-account-toolbar button.alt,
body.neurodialogs-active :is(#neuroAccountsSection,#warmingAccountSelector) .neuro-account-action { transition:color .16s ease,background .16s ease,border-color .16s ease,transform .12s ease,box-shadow .16s ease; }
body.neurodialogs-active :is(#neuroAccountsSection,#warmingAccountSelector) .neuro-account-toolbar button.alt:hover,
body.neurodialogs-active :is(#neuroAccountsSection,#warmingAccountSelector) .neuro-account-action:hover { border-color:#1976d2 !important; color:#fff !important; background:#1976d2 !important; box-shadow:0 5px 12px rgb(25 118 210 / 20%); transform:translateY(-1px); }
body.neurodialogs-active :is(#neuroAccountsSection,#warmingAccountSelector) .neuro-account-toolbar button.alt:active,
body.neurodialogs-active :is(#neuroAccountsSection,#warmingAccountSelector) .neuro-account-action:active { transform:translateY(0) scale(.97); }
body.neurodialogs-active :is(#neuroClearAccounts,#warmingClearAccounts) { border-color:#efb0b0 !important; color:#c92b2b !important; background:#fff7f7 !important; transition:color .16s ease,background .16s ease,border-color .16s ease,transform .12s ease,box-shadow .16s ease; }
body.neurodialogs-active button.danger:hover,
body.neurodialogs-active :is(#neuroClearAccounts,#warmingClearAccounts):hover,
body.neurodialogs-active .neuro-account-card.selected .neuro-account-action:hover { border-color:#d86767 !important; color:#fff !important; background:#d86767 !important; box-shadow:0 4px 10px rgb(184 67 67 / 16%); transform:translateY(-1px); }
body.neurodialogs-active :is(#neuroClearAccounts,#warmingClearAccounts):active,
body.neurodialogs-active button.danger:active,
body.neurodialogs-active .neuro-account-card.selected .neuro-account-action:active { border-color:#bf4d4d !important; color:#fff !important; background:#bf4d4d !important; box-shadow:none; transform:translateY(0) scale(.97); }
body.neurodialogs-active .neuro-compact-account-id { display:inline-flex !important; align-items:center; gap:4px; color:#7b8c9b; font-size:10px; white-space:nowrap; }
body.neurodialogs-active .neuro-account-list.compact .neuro-account-status-row,
body.neurodialogs-active .neuro-account-list.compact .neuro-account-roles { display:flex; }
body.neurodialogs-active .neuro-compact-hide-avatar .neuro-account-list.compact .neuro-account-avatar,
body.neurodialogs-active .neuro-compact-hide-name .neuro-account-list.compact .neuro-account-copy > strong,
body.neurodialogs-active .neuro-compact-hide-id .neuro-account-list.compact .neuro-compact-account-id,
body.neurodialogs-active .neuro-compact-hide-phone-country .neuro-account-list.compact .neuro-account-meta > .neuro-country-badge,
body.neurodialogs-active .neuro-compact-hide-phone .neuro-account-list.compact .neuro-account-meta > .neuro-copy-field:nth-child(2),
body.neurodialogs-active .neuro-compact-hide-username .neuro-account-list.compact .neuro-account-meta > .neuro-copy-field:nth-child(3),
body.neurodialogs-active .neuro-compact-hide-proxy-country .neuro-account-list.compact .neuro-account-countries,
body.neurodialogs-active .neuro-compact-hide-validity .neuro-account-list.compact .neuro-account-status-row > :nth-child(1),
body.neurodialogs-active .neuro-compact-hide-proxy .neuro-account-list.compact .neuro-account-status-row > :nth-child(2),
body.neurodialogs-active .neuro-compact-hide-ggr .neuro-account-list.compact .neuro-account-status-row > :nth-child(3),
body.neurodialogs-active .neuro-compact-hide-roles .neuro-account-list.compact .neuro-account-roles { display:none !important; }
body.neurodialogs-active :is(#neuroAccountsSection,#warmingAccountSelector):not(.neuro-compact-hide-id) .neuro-account-list.compact .neuro-compact-account-id { display:inline-flex !important; }
@media (max-width:560px) { body.neurodialogs-active .neuro-compact-menu { position:fixed; top:80px; right:12px; left:12px; width:auto; } }

body.neurodialogs-active :is(#neuroSelectedAccounts,#warmingSelectedAccounts).compact {
  grid-template-columns: 1fr;
}

@container (max-width: 700px) {
  body.neurodialogs-active .neuro-account-list,
  body.neurodialogs-active .neuro-account-list.compact {
    grid-template-columns: 1fr;
  }
}

body.neurodialogs-active .neuro-protection-grid,
body.neurodialogs-active .neuro-mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

body.neurodialogs-active .neuro-protection-mode,
body.neurodialogs-active .neuro-mode {
  position: relative;
  min-height: 92px;
  padding: 13px !important;
  border: 1px solid #d7e4ef !important;
  border-radius: 11px !important;
  color: var(--nd-text) !important;
  background: #fff !important;
  text-align: left;
}

body.neurodialogs-active .neuro-mode-info {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #bcd0e2;
  border-radius: 50%;
  color: #46708f !important;
  background: #fff;
  font-weight: 800;
}

body.neurodialogs-active .neuro-mode-popover {
  position: absolute;
  z-index: 30;
  top: 36px;
  right: 7px;
  display: none;
  width: 245px;
  padding: 10px;
  border: 1px solid var(--nd-line);
  border-radius: 9px;
  color: var(--nd-text) !important;
  background: #fff;
  box-shadow: 0 8px 26px rgb(25 78 122 / 16%);
  font-size: 12px;
  line-height: 1.45;
}

body.neurodialogs-active .neuro-protection-mode.show-info .neuro-mode-popover {
  display: block;
}

body.neurodialogs-active .neuro-protection-mode strong,
body.neurodialogs-active .neuro-mode strong {
  display: block;
  margin-bottom: 5px;
  color: var(--nd-text);
}

body.neurodialogs-active .neuro-protection-mode span,
body.neurodialogs-active .neuro-protection-mode small,
body.neurodialogs-active .neuro-mode small {
  color: var(--nd-muted);
  font-size: 12px;
}

body.neurodialogs-active .neuro-protection-mode.active,
body.neurodialogs-active .neuro-mode.active {
  border-color: var(--nd-blue) !important;
  color: var(--nd-text) !important;
  background: var(--nd-blue-soft) !important;
  box-shadow: inset 0 0 0 1px var(--nd-blue);
}

body.neurodialogs-active [data-neuro-protection="aggressive"] strong {
  color: var(--nd-orange);
}

body.neurodialogs-active .neuro-protection-mode .neuro-protection-summary { display:block; margin-bottom:5px; color:#294f6d !important; }
body.neurodialogs-active .neuro-protection-mode .neuro-protection-summary b { color:var(--nd-blue); }
body.neurodialogs-active .neuro-protection-edit { display:inline-flex; width:fit-content; margin-top:9px; padding:5px 9px; border:1px solid #aac8df; border-radius:7px; color:#245f8d !important; background:#fff; font-size:12px; font-weight:700; }
body.neurodialogs-active .neuro-protection-edit:hover, body.neurodialogs-active .neuro-protection-edit:focus-visible { border-color:var(--nd-blue); background:#e6f3ff; outline:none; }
body.neurodialogs-active .neuro-protection-settings { display:grid; grid-template-columns:minmax(165px,.55fr) minmax(0,2fr) auto; align-items:end; gap:10px; margin-top:10px; padding:10px 12px; border:1px solid #cfe0ee; border-radius:10px; background:#f7fbff; }
body.neurodialogs-active .neuro-protection-settings.hidden { display:none; }
body.neurodialogs-active .neuro-protection-settings p { margin:4px 0 0; }
body.neurodialogs-active .neuro-protection-fields { display:grid; grid-template-columns:minmax(220px,1.35fr) minmax(130px,.8fr) minmax(130px,.8fr); gap:8px; }
body.neurodialogs-active .neuro-protection-fields-two { grid-template-columns:repeat(2,minmax(150px,1fr)); }
body.neurodialogs-active .neuro-protection-field-group { min-width:0; padding:7px 8px; border:1px solid #d6e5f0; border-radius:8px; background:#fff; }
body.neurodialogs-active .neuro-protection-field-group > strong { display:block; margin-bottom:5px; font-size:11px; }
body.neurodialogs-active .neuro-protection-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; }
body.neurodialogs-active .neuro-protection-pair label { min-width:0; }
body.neurodialogs-active .neuro-protection-pair.hidden { display:none; }
body.neurodialogs-active .neuro-protection-pair input { height:34px; padding:6px 7px; }
body.neurodialogs-active .neuro-protection-field-group:first-child .neuro-protection-pair input { min-width:100px; padding-right:5px; font-size:13px; }
body.neurodialogs-active .neuro-protection-actions { display:flex; justify-content:flex-end; align-items:end; }
body.neurodialogs-active #neuroRestoreConservative, body.neurodialogs-active #neuroRestoreBalanced, body.neurodialogs-active #neuroRestoreAggressive { border-color:#9dbdd5 !important; color:#315f80 !important; background:#f7fbff !important; transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .08s ease; }
body.neurodialogs-active #neuroRestoreConservative:hover, body.neurodialogs-active #neuroRestoreBalanced:hover, body.neurodialogs-active #neuroRestoreAggressive:hover { border-color:#5796c2 !important; color:#174f78 !important; background:#dceeff !important; box-shadow:0 3px 9px rgb(39 111 161 / 16%); }
body.neurodialogs-active #neuroRestoreConservative:active, body.neurodialogs-active #neuroRestoreBalanced:active, body.neurodialogs-active #neuroRestoreAggressive:active { background:#cbe5f8 !important; transform:translateY(1px); box-shadow:none; }
body.neurodialogs-active .neuro-balanced-always { min-height:34px; margin-top:4px; }
body.neurodialogs-active .neuro-custom-mark { display:inline-flex; margin-left:5px; padding:2px 6px; border-radius:999px; color:#3a6787; background:#e4f1fa; font-size:10px; font-style:normal; font-weight:700; }

body.neurodialogs-active .neuro-prompt-layout {
  grid-template-columns: 1fr;
}

body.neurodialogs-active .neuro-prompt-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 145px));
  gap: 8px;
  align-items: stretch;
}
body.neurodialogs-active .neuro-prompt-list.hidden { display:none; }

body.neurodialogs-active .neuro-system-prompt-toggle {
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-sizing:border-box;
  width:100%;
  min-height:32px;
  margin:0;
  padding:4px 2px;
  border:0 !important;
  border-radius:0;
  color:#365f79 !important;
  background:rgba(55,139,193,.045) !important;
  box-shadow:none !important;
  text-align:left;
}
body.neurodialogs-active .neuro-system-prompt-toggle:hover { color:#28536f !important; background:rgba(55,139,193,.075) !important; }
body.neurodialogs-active .neuro-system-prompt-label { display:flex; align-items:center; gap:7px; }
body.neurodialogs-active .neuro-system-prompt-symbol { color:#43a7bc; font-size:15px; }
body.neurodialogs-active .neuro-system-prompt-label strong { font-size:13px; }
body.neurodialogs-active .neuro-system-prompt-caret {
  display:block;
  box-sizing:border-box;
  width:9px;
  height:9px;
  margin-right:4px;
  border-right:2px solid currentColor;
  border-bottom:2px solid currentColor;
  transform:rotate(225deg);
  transition:transform .15s ease;
}
body.neurodialogs-active .neuro-system-prompt-toggle.collapsed .neuro-system-prompt-caret { transform:rotate(45deg); }

body.neurodialogs-active .neuro-custom-prompt-items { display:contents; }
body.neurodialogs-active .neuro-prompt-create-choice {
  display:grid;
  place-items:center;
  align-content:center;
  gap:2px;
  box-sizing:border-box;
  width:145px;
  min-height:54px;
  margin:0;
  padding:6px 10px;
  border:1px dashed #b9d3e6;
  border-radius:9px;
  color:#356883;
  background:#f7fbfe;
  box-shadow:none;
}
body.neurodialogs-active .neuro-prompt-create-choice:hover { border-color:#66a9d5; background:#eaf6fd; }
body.neurodialogs-active .neuro-prompt-create-icon { font-size:18px; line-height:16px; }
body.neurodialogs-active .neuro-prompt-create-choice strong { font-size:12px; line-height:14px; }

body.neurodialogs-active .neuro-prompt-choice {
  position: relative;
  display: flex;
  width: 145px;
  min-height: 54px;
  padding: 8px 58px 8px 10px;
  border-radius: 9px;
  cursor:pointer;
  transition:border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
body.neurodialogs-active .neuro-prompt-choice:hover { border-color:#8ebddd; background:#f4faff; box-shadow:0 2px 7px rgba(35,91,128,.1); }
body.neurodialogs-active .neuro-prompt-choice.active { border-color:#1976d2; background:#e7f3ff; box-shadow:0 0 0 2px rgba(25,118,210,.12); }
body.neurodialogs-active .neuro-prompt-choice.active::before {
  content:"✓";
  position:absolute;
  top:-6px;
  left:-6px;
  z-index:2;
  display:grid;
  place-items:center;
  box-sizing:border-box;
  width:18px;
  height:18px;
  border:2px solid #fff;
  border-radius:50%;
  color:#fff;
  background:#1976d2;
  box-shadow:0 1px 4px rgba(20,72,112,.24);
  font-size:11px;
  font-weight:800;
  line-height:1;
}

body.neurodialogs-active .neuro-prompt-choice > span:first-child {
  min-width: 0;
  align-self: center;
}

body.neurodialogs-active .neuro-prompt-choice strong {
  display: block;
  overflow: hidden;
  color: #244963;
  font-size: 12px;
  max-height: 29px;
  line-height: 1.15;
  white-space: normal;
  text-overflow: ellipsis;
}

body.neurodialogs-active .neuro-prompt-choice small {
  display: none;
}

body.neurodialogs-active .neuro-prompt-actions {
  position: absolute;
  top: 18px;
  right: 6px;
  bottom: auto;
  display: flex;
  justify-content: flex-end;
  gap: 3px;
}

body.neurodialogs-active .neuro-prompt-actions .neuro-prompt-icon {
  appearance: none !important;
  display: grid !important;
  place-items: center !important;
  box-sizing: border-box;
  width: 20px !important;
  min-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #d3e1ec !important;
  border-radius: 5px;
  color: transparent !important;
  background: #fff !important;
  box-shadow: none !important;
  text-decoration: none !important;
  text-indent: 0 !important;
  font-size: 0 !important;
  line-height: 1 !important;
  transform: none !important;
}

body.neurodialogs-active .neuro-prompt-custom { padding:7px 8px 24px 10px; }
body.neurodialogs-active .neuro-prompt-custom .neuro-prompt-actions { top:auto; bottom:4px; }
body.neurodialogs-active .neuro-prompt-actions .neuro-prompt-icon::before { content:"" !important; display:block !important; width:12px; height:12px; margin:0 !important; background-position:center; background-repeat:no-repeat; background-size:contain; pointer-events:none; }
body.neurodialogs-active .neuro-prompt-actions .neuro-prompt-icon::after { content:none !important; display:none !important; }
body.neurodialogs-active .neuro-prompt-actions .neuro-prompt-icon:hover { border-color:#8db9dc !important; background:#edf7ff !important; box-shadow:none !important; transform:none !important; }
body.neurodialogs-active .neuro-prompt-actions .neuro-prompt-icon:active { background:#dceeff !important; transform:scale(.94) !important; }
body.neurodialogs-active [data-neuro-prompt-preview]::before { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23315f80' stroke-width='2'%3E%3Cpath d='M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E"); }
body.neurodialogs-active [data-neuro-prompt-select]::before { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231976d2'%3E%3Cpath d='M8 5.5v13l10-6.5L8 5.5Z'/%3E%3C/svg%3E"); }
body.neurodialogs-active [data-neuro-prompt-edit]::before { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23315f80' stroke-width='2'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16v4Z'/%3E%3Cpath d='m13.5 6.5 4 4'/%3E%3C/svg%3E"); }
body.neurodialogs-active [data-neuro-prompt-delete]::before { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b14f4f' stroke-width='2'%3E%3Cpath d='M4 7h16M9 7V4h6v3m-8 0 1 13h8l1-13M10 11v5m4-5v5'/%3E%3C/svg%3E"); }

body.neurodialogs-active .neuro-prompt-test { width:min(680px, calc(100vw - 32px)); max-height:calc(100vh - 40px); overflow:auto; padding:20px; border-radius:16px; background:#fff; box-shadow:0 22px 60px rgb(20 57 86 / 24%); }
body.neurodialogs-active .neuro-prompt-test > .neuro-rule-head { align-items:center; }
body.neurodialogs-active .neuro-prompt-test > .neuro-rule-head h4 { margin:0; font-size:19px; }
body.neurodialogs-active .neuro-prompt-test-head { display:flex; align-items:center; gap:12px; margin:14px 0; padding:14px; border:1px solid #cce4f6; border-radius:12px; background:linear-gradient(135deg,#eef9ff,#f7f4ff); }
body.neurodialogs-active .neuro-prompt-test-head small { display:block; margin-top:3px; color:#60788a; }
body.neurodialogs-active .neuro-prompt-test-symbol { display:grid; place-items:center; width:42px; height:42px; border-radius:10px; color:#fff; background:#1595dc; box-shadow:0 5px 14px rgb(21 149 220 / 24%); }
body.neurodialogs-active .neuro-prompt-test-fields-title { margin:14px 0 9px; color:#294b63; font-size:14px; }
body.neurodialogs-active .neuro-prompt-test-fields { display:grid; gap:10px; }
body.neurodialogs-active .neuro-prompt-test-fields label { display:grid; gap:6px; padding:10px; border:1px solid #e0e9f0; border-radius:10px; background:#fbfdff; }
body.neurodialogs-active .neuro-prompt-test-fields label > span { color:#405d72; font-size:12px; font-weight:700; }
body.neurodialogs-active .neuro-prompt-test-fields code { margin-right:6px; padding:2px 5px; border-radius:5px; color:#1683bd; background:#e6f5fb; }
body.neurodialogs-active .neuro-prompt-test-fields input,
body.neurodialogs-active .neuro-prompt-test-fields textarea { width:100%; margin:0; }
body.neurodialogs-active .neuro-prompt-test-result { margin-top:12px; padding:12px; border:1px solid #b9d9ef; border-radius:10px; background:#f0f9ff; }
body.neurodialogs-active .neuro-prompt-test-result p { margin:4px 0 8px; color:#567185; font-size:12px; }
body.neurodialogs-active .neuro-prompt-test-result pre { max-height:220px; overflow:auto; margin:0; padding:10px; border-radius:8px; white-space:pre-wrap; color:#28485f; background:#fff; font:12px/1.45 ui-monospace,Consolas,monospace; }
body.neurodialogs-active .neuro-prompt-test-footer { display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
body.neurodialogs-active .neuro-system-prompt-preview { width:min(700px, calc(100vw - 32px)); max-height:calc(100vh - 40px); overflow:auto; padding:20px; border-radius:16px; background:#fff; box-shadow:0 22px 60px rgb(20 57 86 / 24%); }
body.neurodialogs-active .neuro-system-prompt-preview .neuro-rule-head { align-items:flex-start; }
body.neurodialogs-active .neuro-system-prompt-preview .neuro-rule-head h4 { margin:0 0 6px; font-size:19px; }
body.neurodialogs-active .neuro-system-prompt-preview .neuro-rule-head .hint { max-width:560px; margin:0; line-height:1.45; }
body.neurodialogs-active .neuro-modal-close { display:grid; place-items:center; width:34px; min-width:34px; height:34px; min-height:34px; margin:0; padding:0; border:1px solid #c9d9e5; border-radius:9px; color:#5d7485; background:#fff; box-shadow:none; font-size:22px; line-height:1; }
body.neurodialogs-active .neuro-system-preview-section { margin-top:14px; }
body.neurodialogs-active .neuro-system-preview-section > strong { display:block; margin-bottom:7px; color:#294b63; font-size:13px; }
body.neurodialogs-active .neuro-system-preview-section pre { box-sizing:border-box; height:260px; overflow-x:hidden; overflow-y:scroll; scrollbar-gutter:stable; margin:0; padding:14px; border:1px solid #dce7ef; border-radius:10px; white-space:pre-wrap; color:#29475c; background:#f8fbfd; font:12px/1.5 ui-monospace,Consolas,monospace; }
body.neurodialogs-active .neuro-system-preview-section pre { scrollbar-width:thin; scrollbar-color:#63aee0 #e8f3fa; }
body.neurodialogs-active .neuro-system-preview-section pre::-webkit-scrollbar { width:9px; }
body.neurodialogs-active .neuro-system-preview-section pre::-webkit-scrollbar-track { border-radius:8px; background:#e8f3fa; }
body.neurodialogs-active .neuro-system-preview-section pre::-webkit-scrollbar-thumb { border:2px solid #e8f3fa; border-radius:8px; background:#63aee0; }
body.neurodialogs-active .neuro-system-preview-section pre::-webkit-scrollbar-thumb:hover { background:#348fc9; }
body.neurodialogs-active .neuro-system-preview-meta { display:flex; align-items:center; justify-content:space-between; margin-top:10px; padding:10px 12px; border:1px solid #dce7ef; border-radius:9px; color:#536d80; background:#fbfdff; }
body.neurodialogs-active .neuro-system-preview-meta strong { color:#1879bd; }
body.neurodialogs-active .neuro-system-preview-variables { display:flex; flex-wrap:wrap; gap:6px; }
body.neurodialogs-active .neuro-system-preview-variables code { padding:5px 7px; border-radius:6px; color:#1683bd; background:#e7f5fb; font-size:11px; }
body.neurodialogs-active .neuro-custom-prompt-backdrop > .neuro-rule-head,
body.neurodialogs-active .neuro-custom-prompt-backdrop > .neuro-prompt-editor { width:min(700px, calc(100vw - 32px)); }
body.neurodialogs-active .neuro-custom-prompt-backdrop > .neuro-rule-head { align-items:center; padding:18px 20px 12px; }
body.neurodialogs-active .neuro-custom-prompt-backdrop > .neuro-rule-head h4 { margin:0; font-size:19px; }
body.neurodialogs-active .neuro-custom-prompt-backdrop > .neuro-prompt-editor { position:relative; max-height:calc(100vh - 112px); padding:0 20px 76px; }
body.neurodialogs-active .neuro-prompt-identity { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
body.neurodialogs-active .neuro-prompt-identity label,
body.neurodialogs-active .neuro-prompt-template-label { color:#31536a; font-size:13px; font-weight:700; }
body.neurodialogs-active .neuro-prompt-identity input { margin-top:6px; }
body.neurodialogs-active .neuro-prompt-template-label { display:grid; gap:7px; margin-top:16px; }
body.neurodialogs-active .neuro-prompt-template-label textarea { box-sizing:border-box; height:265px; overflow-y:scroll; resize:none; scrollbar-width:thin; scrollbar-color:#63aee0 #e8f3fa; font:12px/1.5 ui-monospace,Consolas,monospace; }
body.neurodialogs-active .neuro-variable-picker { margin-top:16px; padding:14px; border:1px solid #c7e1f3; border-radius:12px; background:#f2fbff; }
body.neurodialogs-active .neuro-variable-picker > strong { color:#1683bd; text-transform:uppercase; font-size:12px; }
body.neurodialogs-active .neuro-variable-picker > p { margin:4px 0 10px; color:#60788a; font-size:11px; }
body.neurodialogs-active .neuro-variable-picker-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
body.neurodialogs-active .neuro-variable-picker-grid button { display:grid; grid-template-columns:1fr auto; gap:2px 8px; min-height:54px; margin:0; padding:9px 12px; border:1px solid #9fd0eb; border-radius:9px; color:#36566c; background:#e3f5fc; box-shadow:none; text-align:left; }
body.neurodialogs-active .neuro-variable-picker-grid button::after { content:"↖"; grid-column:2; grid-row:1 / span 2; align-self:center; color:#65acd4; }
body.neurodialogs-active .neuro-variable-picker-grid code { color:#1683bd; font-weight:700; }
body.neurodialogs-active .neuro-variable-picker-grid span { overflow:hidden; font-size:11px; line-height:1.25; text-overflow:ellipsis; }
body.neurodialogs-active .neuro-prompt-parameters,
body.neurodialogs-active .neuro-prompt-knowledge { margin-top:18px; }
body.neurodialogs-active .neuro-prompt-parameters h5,
body.neurodialogs-active .neuro-prompt-knowledge h5 { margin:0 0 10px; color:#294b63; font-size:15px; }
body.neurodialogs-active .neuro-prompt-parameters label { display:grid; gap:8px; width:280px; padding:14px 18px; border:1px solid #c7e1f3; border-radius:11px; background:#f3fbff; }
body.neurodialogs-active .neuro-prompt-parameters label > span,
body.neurodialogs-active .neuro-prompt-parameters label > small { display:flex; justify-content:space-between; align-items:center; }
body.neurodialogs-active .neuro-prompt-parameters label > span { text-transform:uppercase; color:#536d80; font-size:11px; }
body.neurodialogs-active .neuro-prompt-parameters label > span strong { color:#1683bd; font-size:18px; }
body.neurodialogs-active .neuro-prompt-parameters label > small { color:#718696; }
body.neurodialogs-active .neuro-prompt-knowledge p { margin:0 0 12px; color:#60788a; font-size:12px; line-height:1.45; }
body.neurodialogs-active .neuro-upload-button { display:inline-flex; align-items:center; width:auto; padding:9px 12px; border:1px solid #d4e0e9; border-radius:8px; color:#567085; background:#fff; cursor:pointer; }
body.neurodialogs-active .neuro-prompt-editor-footer { position:sticky; bottom:-76px; display:flex; justify-content:flex-end; gap:8px; margin:18px -20px -76px; padding:12px 20px; border-top:1px solid #e0e8ee; background:#fff; }
body.neurodialogs-active .neuro-prompt-editor-footer button { margin:0; }
@media (max-width:700px) {
  body.neurodialogs-active .neuro-prompt-identity,
  body.neurodialogs-active .neuro-variable-picker-grid { grid-template-columns:1fr; }
  body.neurodialogs-active .neuro-prompt-parameters label { width:auto; }
}

body.neurodialogs-active .neuro-prompt-choice,
body.neurodialogs-active .neuro-run-chip {
  color: #31536f !important;
  background: #fff !important;
}

body.neurodialogs-active .neuro-prompt-choice.active,
body.neurodialogs-active .neuro-run-chip.active {
  border-color: var(--nd-blue) !important;
  color: #165f9f !important;
  background: var(--nd-blue-soft) !important;
}

body.neurodialogs-active .neuro-model-card {
  border-color: #bcd9f1;
  border-radius: 11px;
  background: linear-gradient(135deg, #edf7ff, #fff);
  box-shadow: none;
}

body.neurodialogs-active .neuro-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.neurodialogs-active .neuro-timeline {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

body.neurodialogs-active .neuro-timeline-step {
  min-width: 0;
  padding: 9px;
  border-radius: 9px;
  background: #edf6ff;
  text-align: center;
  font-size: 12px;
}

body.neurodialogs-active .neuro-timeline-arrow {
  height: 2px;
  min-width: 20px;
  overflow: hidden;
  color: transparent;
  background: #b6d5ef;
}

body.neurodialogs-active .neuro-status-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 7px;
}

body.neurodialogs-active .neuro-stat {
  padding: 10px;
  border: 1px solid #dce8f2;
  border-radius: 9px;
  background: #fff;
}

body.neurodialogs-active .neuro-stat strong {
  color: var(--nd-text);
  font-size: 19px;
}

body.neurodialogs-active .neuro-stat span {
  color: var(--nd-muted);
  font-size: 11px;
}

body.neurodialogs-active .neuro-progress-bar {
  background: var(--nd-blue);
}

body.neurodialogs-active .neuro-progress-bar.indeterminate {
  width: 35% !important;
  animation: neuro-progress-indeterminate 1.3s ease-in-out infinite;
}

@keyframes neuro-progress-indeterminate {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(300%); }
}

body.neurodialogs-active .neuro-tabs {
  gap: 10px;
  margin: 16px 0;
}

body.neurodialogs-active .neuro-tabs button {
  min-width: 132px;
  min-height: 46px;
  padding: 11px 24px !important;
  border-width: 2px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #31536f !important;
  background: #fff !important;
}

body.neurodialogs-active .neuro-tabs button.active {
  border-color: var(--nd-blue) !important;
  color: #fff !important;
  background: var(--nd-blue) !important;
  box-shadow: 0 7px 16px rgba(31, 128, 221, .22);
}

body.neurodialogs-active .neuro-visual {
  min-height: 235px;
  padding: 0;
  background: transparent;
}

body.neurodialogs-active .neuro-visual-fullscreen-head {
  display: none;
}

body.neurodialogs-active .neuro-run-dialogs {
  grid-template-columns: minmax(310px, .62fr) minmax(0, 1.38fr);
  gap: 12px;
  min-height: 520px;
}

body.neurodialogs-active .neuro-run-contacts,
body.neurodialogs-active .neuro-conversation {
  box-sizing: border-box;
  min-height: 520px;
  max-height: 650px;
  border-color: #dce8f2;
  border-radius: 12px;
  background: #fff;
}

body.neurodialogs-active .neuro-dialog-sidebar {
  display: flex;
  min-width: 0;
  max-height: 650px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dce8f2;
  border-radius: 12px;
  background: #fff;
}

body.neurodialogs-active #neuroVisualToolsMount {
  padding: 12px;
  border-bottom: 1px solid #e1ebf3;
}

body.neurodialogs-active #neuroVisualToolsMount .neuro-visual-tools,
body.neurodialogs-active #neuroVisualToolsMount .neuro-inline {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr;
  gap: 8px;
}

body.neurodialogs-active #neuroVisualToolsMount [data-neuro-visual-status] {
  display: inline-flex;
  width: auto;
  min-height: 32px;
  margin: 0 5px 0 0;
  padding: 6px 10px !important;
}

body.neurodialogs-active #neuroVisualToolsMount .neuro-inline:last-child {
  display: flex;
  flex-wrap: wrap;
}

body.neurodialogs-active #neuroVisualToolsMount .neuro-visual-search-row {
  grid-template-columns: minmax(0, 1fr) 40px;
}

body.neurodialogs-active #neuroVisualToolsMount .neuro-visual-search-row select {
  grid-column: 1 / -1;
}

body.neurodialogs-active #neuroVisualToolsMount .neuro-visual-expand {
  width: 40px;
  min-width: 40px;
  height: 40px;
  padding: 9px !important;
  color: #078dcc;
  background: #f5fbff;
}

body.neurodialogs-active #neuroVisualToolsMount .neuro-visual-expand svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  grid-template-rows: 54px minmax(0, 1fr);
  height: 100vh;
  max-height: none;
  margin: 0;
  background: #fff;
  box-shadow: none;
}

body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen .neuro-visual-fullscreen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid #e3e8ee;
  background: #f8fafc;
}

body.neurodialogs-active .neuro-visual-fullscreen-title,
body.neurodialogs-active .neuro-visual-fullscreen-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.neurodialogs-active .neuro-visual-fullscreen-title span {
  color: #078dcc;
  font-size: 20px;
}

body.neurodialogs-active .neuro-visual-connected {
  color: #91a1b2;
  font-size: 13px;
}

body.neurodialogs-active .neuro-visual-connected::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #58d3b0;
}

body.neurodialogs-active #neuroVisualBack {
  color: #078dcc;
  background: #eaf6fc;
}

body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen > #neuroRunSelect,
body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen > #neuroRunHistory,
body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen > #neuroRunAccounts,
body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen > .neuro-export-tools {
  display: none !important;
}

body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen .neuro-run-dialogs {
  grid-row: 2;
  grid-template-columns: 394px minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  height: 100%;
}

body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen .neuro-dialog-sidebar,
body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen .neuro-run-contacts,
body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen .neuro-conversation {
  min-height: 0;
  max-height: none;
  height: 100%;
  border-radius: 0;
}

body.neuro-visual-fullscreen-open {
  overflow: hidden;
}

body.neurodialogs-active .neuro-run-contacts {
  flex: 1;
  min-height: 0;
  padding: 0;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
}

body.neurodialogs-active .neuro-run-contact {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  margin: 0;
  padding: 10px 12px;
  border: 0 !important;
  border-bottom: 1px solid #e5edf4 !important;
  border-radius: 0 !important;
  color: #26394d !important;
  background: #fff !important;
}

body.neurodialogs-active .neuro-run-contact:hover,
body.neurodialogs-active .neuro-run-contact.active {
  color: #17324d !important;
  background: #eaf5ff !important;
  box-shadow: inset 4px 0 #178bd1;
}

body.neurodialogs-active .neuro-chat-avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 50%;
  color: #fff;
  background: #118bc8;
  font-weight: 800;
}

body.neurodialogs-active .neuro-chat-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

body.neurodialogs-active .neuro-voice-player {
  display: block;
  width: min(330px, 100%);
  height: 38px;
  margin-top: 7px;
}

body.neurodialogs-active .neuro-chat-language {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: #71879a;
  font-size: 12px;
}

body.neurodialogs-active .neuro-chat-language-source {
  padding: 6px 9px;
  border: 1px solid #d6e4ef;
  border-radius: 8px;
  color: #31536f;
  background: #f7fbfe;
  font-weight: 700;
}

body.neurodialogs-active .neuro-chat-language button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px !important;
  padding: 6px 10px !important;
  border-color: #91c4e8 !important;
  color: #14689f !important;
  background: #eef8ff !important;
}

body.neurodialogs-active .neuro-chat-language button.active,
body.neurodialogs-active .neuro-chat-language button[aria-pressed="true"] {
  border-color: #1976d2 !important;
  color: #fff !important;
  background: #1976d2 !important;
}

body.neurodialogs-active .neuro-language-flag {
  width: 24px;
  height: 16px;
  flex: 0 0 24px;
  overflow: hidden;
  border: 1px solid rgb(22 58 89 / 18%);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgb(22 58 89 / 12%);
}

body.neurodialogs-active .neuro-chat-translated .neuro-chat-thread::before {
  content: "Переведено на русский · только для просмотра";
  display: block;
  margin: 0 auto 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #176aa5;
  background: #eaf6ff;
  font-size: 11px;
}

body.neurodialogs-active .neuro-chat-contact-copy {
  min-width: 0;
  text-align: left;
}

body.neurodialogs-active .neuro-chat-contact-copy strong,
body.neurodialogs-active .neuro-chat-contact-copy small,
body.neurodialogs-active .neuro-chat-contact-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.neurodialogs-active .neuro-chat-contact-copy small { color: #587087; }
body.neurodialogs-active .neuro-chat-contact-copy em { color: #8ba0b5; font-size: 11px; font-style: normal; }
body.neurodialogs-active .neuro-run-contact time { align-self: start; color: #8ba0b5; font-size: 11px; }

body.neurodialogs-active .neuro-conversation {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

body.neurodialogs-active .neuro-chat-head {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px 16px;
  border-bottom: 1px solid #e1ebf3;
}

body.neurodialogs-active .neuro-chat-head > span:nth-child(2) { min-width: 0; flex: 1; }
body.neurodialogs-active .neuro-chat-head strong,
body.neurodialogs-active .neuro-chat-head small { display: block; }
body.neurodialogs-active .neuro-chat-head small { color: #7b91a6; }
body.neurodialogs-active .neuro-chat-head b { color: #18875e; font-size: 12px; }

body.neurodialogs-active .neuro-chat-thread {
  flex: 1;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  background: linear-gradient(145deg, #f2f8fc, #edf5fb);
}

body.neurodialogs-active .neuro-bubble {
  width: fit-content;
  max-width: 76%;
  margin: 8px 0;
  padding: 10px 12px 7px;
  color: #24384c;
  background: #fff;
  border: 1px solid #dce8f2;
  border-radius: 14px 14px 14px 4px;
  box-shadow: 0 3px 10px rgba(34, 71, 105, .07);
}

body.neurodialogs-active .neuro-bubble.reply {
  margin-left: auto;
  color: #174474;
  background: #dff2ff;
  border-radius: 14px 14px 4px 14px;
}

body.neurodialogs-active .neuro-bubble span,
body.neurodialogs-active .neuro-bubble time { display: block; }
body.neurodialogs-active .neuro-bubble time { margin-top: 4px; color: #7890a5; font-size: 10px; text-align: right; }
body.neurodialogs-active .neuro-chat-loading,
body.neurodialogs-active .neuro-chat-empty,
body.neurodialogs-active .neuro-chat-empty-small { display: grid; place-content: center; gap: 8px; min-height: 180px; color: #72889d; text-align: center; }
body.neurodialogs-active .neuro-chat-empty { flex: 1; }
body.neurodialogs-active .neuro-chat-empty-icon { font-size: 48px; color: #67b8e4; }
body.neurodialogs-active .neuro-chat-privacy { margin: 0; padding: 7px 12px; color: #8398aa; border-top: 1px solid #e1ebf3; font-size: 11px; text-align: center; }
body.neurodialogs-active .neuro-chat-error { margin: 16px; padding: 12px; color: #a73b35; background: #fff0ee; border-radius: 9px; }

body.neurodialogs-active .neuro-chat-composer {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px 42px;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #dce8f2;
  background: #fff;
}
body.neurodialogs-active .neuro-chat-composer.recording { grid-template-columns: minmax(0, 1fr) 42px; }
body.neurodialogs-active .neuro-chat-composer.recording > [data-neuro-photo],
body.neurodialogs-active .neuro-chat-composer.recording > [data-neuro-send] { display: none; }

body.neurodialogs-active .neuro-file-preview {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 8px;
  border: 1px solid #42a5e5;
  border-radius: 12px;
  background: #eef8ff;
  color: #244c67;
}
body.neurodialogs-active .neuro-file-preview[hidden] { display: none; }
body.neurodialogs-active .neuro-file-preview b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.neurodialogs-active .neuro-file-preview em { color: #2789c8; font-size: 12px; font-style: normal; white-space: nowrap; }
body.neurodialogs-active .neuro-file-preview button { width: 28px; height: 28px; color: #d84545; font-size: 15px; }

body.neurodialogs-active .neuro-chat-composer input[type="text"] {
  height: 42px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid #42a5e5;
  border-radius: 22px;
  background: #fff;
}

body.neurodialogs-active .neuro-chat-composer button {
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
}

body.neurodialogs-active .neuro-chat-composer button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
  vertical-align: middle;
}

body.neurodialogs-active .neuro-chat-composer small {
  grid-column: 1 / -1;
  min-height: 0;
  color: #6f8497;
  text-align: center;
}

body.neurodialogs-active .neuro-voice-recording {
  display: flex;
  min-width: 0;
  height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 10px 0 14px;
  border: 1px solid #42a5e5;
  border-radius: 22px;
  color: #31566f;
}
body.neurodialogs-active .neuro-voice-recording[hidden] { display: none; }
body.neurodialogs-active .neuro-recording-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #e84b4b; animation: neuro-recording-pulse 1s infinite; }
body.neurodialogs-active .neuro-recording-wave { display: flex; min-width: 70px; flex: 1; align-items: center; justify-content: center; gap: 3px; }
body.neurodialogs-active .neuro-recording-wave i { width: 3px; height: 8px; border-radius: 2px; background: #42a5e5; animation: neuro-recording-wave .8s ease-in-out infinite alternate; }
body.neurodialogs-active .neuro-recording-wave i:nth-child(3n+2) { animation-delay: .2s; }
body.neurodialogs-active .neuro-recording-wave i:nth-child(3n) { animation-delay: .4s; }
body.neurodialogs-active .neuro-voice-recording.paused i, body.neurodialogs-active .neuro-voice-recording.paused .neuro-recording-dot { animation-play-state: paused; }
body.neurodialogs-active .neuro-voice-recording button { width: 30px; height: 30px; flex: 0 0 auto; font-size: 15px; }
body.neurodialogs-active .neuro-voice-recording button.danger { color: #d84545; }
@keyframes neuro-recording-pulse { 50% { opacity: .35; } }
@keyframes neuro-recording-wave { from { height: 5px; } to { height: 22px; } }

body.neurodialogs-active .neuro-log {
  min-height: 235px;
  color: #d5e9fa;
  background: #102b44;
  font: 12px/1.65 Consolas, monospace;
}

/* Scoped log sizing: the content remains the same node in the full-screen dialog. */
/* Compact identity-rich log. Stable rows retain loaded account photos. */
#neuroLogContent .neuro-log-day { color:#aec6d9; font:600 12px/1.5 system-ui,sans-serif; padding:9px 0 4px; border-bottom:1px solid #ffffff20; margin:0 0 4px; }
#neuroLogContent .neuro-log-day:first-child { padding-top:0; }
#neuroLogContent .neuro-log-entry { line-height:24px; overflow-wrap:anywhere; }
#neuroLogContent details.neuro-log-entry { margin:0; padding:3px 0; border:0; background:transparent; color:inherit; }
#neuroLogContent .neuro-log-summary { display:list-item; cursor:pointer; list-style:disclosure-closed inside; margin:0; padding:0; color:inherit; background:transparent; font:inherit; line-height:24px; overflow-wrap:anywhere; }
#neuroLogContent details[open] > .neuro-log-summary { list-style-type:disclosure-open; }
#neuroLogContent .neuro-log-summary:focus-visible { outline:2px solid #9bd5ff; outline-offset:2px; border-radius:3px; }
#neuroLogContent .neuro-log-stage-count { white-space:nowrap; font:inherit; font-size:11px; color:#aec6d9; }
#neuroLogContent .neuro-log-stages { margin:4px 0 8px 8px; padding:2px 0 2px 12px; border-left:2px solid #9bd5ff55; }
#neuroLogContent .neuro-log-stage { line-height:22px; overflow-wrap:anywhere; color:#d6e5ee; }
#neuroLogContent .neuro-log-entry.error > summary,#neuroLogContent .neuro-log-stage.error { color:#ffb8b8; }
#neuroLogContent .neuro-log-entry.warning > summary,#neuroLogContent .neuro-log-stage.warning { color:#ffe0a3; }
#neuroLogContent .neuro-log-entry.success > summary { color:#b1eecb; }
#neuroLogContent .neuro-log-time { font-variant-numeric:tabular-nums; white-space:nowrap; color:inherit; opacity:.8; margin-right:5px; cursor:help; }
#neuroLogContent .neuro-log-account { display:inline-flex; align-items:center; gap:5px; vertical-align:middle; max-width:100%; }
#neuroLogContent .neuro-log-account b { font:inherit; font-weight:600; overflow-wrap:anywhere; min-width:0; }
#neuroLogContent .neuro-log-avatar { display:inline-flex; align-items:center; justify-content:center; flex:0 0 20px; width:20px!important; height:20px!important; border-radius:50%; overflow:hidden; position:relative; background:#5b8def; color:white; font:600 9px/20px system-ui,sans-serif; }
#neuroLogContent .neuro-log-avatar img { position:absolute; inset:0; width:20px!important; height:20px!important; object-fit:cover; border-radius:50%; }
#neuroLogContent .neuro-log-avatar img[hidden] { display:none!important; }
#neuroLogContent button.neuro-log-peer { display:inline!important; margin:0!important; padding:0!important; min-height:0!important; width:auto!important; border:0!important; border-radius:2px; background:transparent!important; color:inherit!important; font:inherit!important; line-height:inherit!important; text-decoration:underline dotted; text-underline-offset:3px; box-shadow:none!important; }
#neuroLogContent button.neuro-log-peer:hover { color:#9bd5ff; }
#neuroLogContent button.neuro-log-peer:focus-visible { outline:2px solid #9bd5ff; outline-offset:2px; }
.neuro-log-peer-dialog { box-sizing:border-box; width:300px; max-width:calc(100vw - 28px); padding:24px; border:1px solid #c6dceb; border-radius:14px; background:white; color:#183d58; text-align:center; box-shadow:0 16px 60px #102b4433; }
.neuro-log-peer-dialog::backdrop { background:#102b4460; }
.neuro-log-peer-dialog > strong,.neuro-log-peer-dialog > span:not(.neuro-log-peer-photo),.neuro-log-peer-dialog > small { display:block; margin-top:8px; overflow-wrap:anywhere; }
.neuro-log-peer-dialog > small { color:#607c90; }
.neuro-log-peer-dialog [data-log-peer-close] { position:absolute; right:8px; top:8px; margin:0; padding:4px 8px; min-height:28px; background:transparent; color:#607c90; border:0; }
.neuro-log-peer-dialog .neuro-log-peer-photo { display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; border-radius:50%; width:56px; height:56px; margin:0 auto 12px; background:#5b8def; color:white; font:600 20px/1 system-ui,sans-serif; }
.neuro-log-peer-dialog .neuro-log-peer-photo img { position:absolute; inset:0; width:56px!important; height:56px!important; object-fit:cover; }
.neuro-log-peer-dialog img[hidden] { display:none!important; }
#neuroLogsPanel .neuro-log-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px 0; color:#183d58; }
#neuroLogsPanel .neuro-log-head button { flex:none; color:var(--project-color,#078fcf); border:1px solid color-mix(in srgb,var(--project-color,#078fcf) 35%,white); background:white; padding:7px 12px; border-radius:8px; }
#neuroLogsPanel .neuro-log-body { position:relative; min-height:0; }
#neuroLogsPanel #neuroLogContent { box-sizing:border-box; height:260px; min-height:160px; max-height:none; padding-bottom:34px; overflow:auto; overflow-wrap:anywhere; }
#neuroLogsPanel .neuro-log-resize { position:absolute; right:2px; bottom:2px; width:32px!important; height:30px!important; min-height:30px!important; margin:0!important; padding:0!important; border:0!important; border-radius:8px 0 8px 0!important; background:color-mix(in srgb,var(--project-color,#078fcf) 18%,white)!important; color:var(--project-color,#078fcf)!important; cursor:ns-resize; touch-action:none; font:25px/1 sans-serif!important; box-shadow:none!important; }
#neuroLogsPanel .neuro-log-resize:focus-visible,#neuroLogExpand:focus-visible { outline:3px solid var(--project-color,#078fcf); outline-offset:2px; }
.neuro-log-dialog { box-sizing:border-box; inset:12px; width:calc(100vw - 24px); height:calc(100dvh - 24px); max-width:none; max-height:none; margin:0; padding:16px; border:1px solid #bcd6e5; border-radius:14px; background:#f5faff; color:#183d58; overflow:hidden; }
.neuro-log-dialog::backdrop { background:#102b4499; }
.neuro-log-dialog[open] { display:flex; }
.neuro-log-dialog #neuroLogsPanel { display:flex!important; flex-direction:column; width:100%; height:100%; min-width:0; min-height:0; }
.neuro-log-dialog .neuro-log-head { margin-top:0!important; }
.neuro-log-dialog #neuroLogsPanel .neuro-log-toolbar { flex-shrink:0; flex-wrap:wrap; justify-content:flex-start; }
.neuro-log-dialog #neuroLogsPanel .neuro-log-toolbar input { flex:1; width:auto; }
.neuro-log-dialog .neuro-log-body { flex:1; display:flex; }
.neuro-log-dialog #neuroLogContent { height:auto!important; min-height:0!important; flex:1; width:100%; }
.neuro-log-dialog #neuroLogResize { display:none; }
body:has(.neuro-log-dialog[open]) { overflow:hidden; }
@media(max-width:600px) {
  #neuroLogsPanel .neuro-log-toolbar { flex-wrap:wrap; }
  #neuroLogsPanel .neuro-log-toolbar input { min-width:0; width:100%; flex:1 1 100%; }
  .neuro-log-dialog { inset:4px; width:calc(100vw - 8px); height:calc(100dvh - 8px); padding:10px; border-radius:10px; }
  #neuroLogsPanel .neuro-log-head { gap:8px; }
  #neuroLogsPanel .neuro-log-head button { padding:7px 9px; font-size:12px; }
}

body.neurodialogs-active .neuro-cost-panel {
  padding: 0;
  border: 0;
  background: transparent;
}

body.neurodialogs-active .neuro-billing-grid {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
}

body.neurodialogs-active .neuro-manual-balance {
  margin-top: 12px;
  padding: 13px 0 0;
  border-top: 1px solid #d8e6f2;
}

body.neurodialogs-active .neuro-cost-table {
  background: #fff;
}

body.neurodialogs-active .neuro-cost-table th {
  color: var(--nd-text);
}

body.neurodialogs-active .neuro-drafts-details {
  border-top-color: #d8e6f2;
}

@media (max-width: 1100px) {
  body.gramjet-shell-active .service-sidebar-brand { display: grid; padding: 0 4px 18px; }
  body.gramjet-shell-active .service-sidebar-brand strong,
  body.gramjet-shell-active .service-sidebar-brand span,
  body.gramjet-shell-active .service-nav span { display: inline; }
  body.gramjet-shell-active .service-sidebar-caption,
  body.gramjet-shell-active .service-sidebar-note { display: block; }
  body.gramjet-shell-active .service-sidebar > * { flex-shrink: 0; }
  body.gramjet-shell-active .gramjet-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  body.gramjet-shell-active .service-sidebar {
    width: 200px;
    padding: 18px 9px;
  }

  body.gramjet-shell-active .service-nav {
    justify-content: flex-start;
    padding: 12px 7px;
    font-size: 14px;
  }

body.gramjet-shell-active #serviceLogout span {
    display: inline;
    font-size: .875rem;
  }

  body.neurodialogs-active .neuro-grid.neuro-account-columns,
  body.neurodialogs-active .neuro-prompt-layout {
    grid-template-columns: 1fr;
  }

  body.neurodialogs-active .neuro-status-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  body.gramjet-shell-active .gramjet-shell {
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    width: 100%;
  }

  body.gramjet-shell-active .service-sidebar {
    position: sticky;
    flex-direction: column;
    width: 176px;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    padding: 7px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.gramjet-shell-active .service-nav {
    flex: 0 0 auto;
    width: 100%;
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.gramjet-shell-active .service-nav span {
    display: inline;
    font-size: 14px;
  }

  body.gramjet-shell-active .service-session {
    box-sizing: border-box;
    flex: 0 0 auto;
    max-width: 100%;
    margin: 8px 0;
  }

  body.gramjet-shell-active .service-content {
    padding: 10px;
    overflow-x: auto;
  }

  /* Keep forms usable beside the persistent left menu. Narrow phones may
     pan the working area independently; the menu never becomes a top bar. */
  body.gramjet-shell-active .service-content > #accountsView {
    min-width: 360px;
  }

  body.neurodialogs-active .neurodialogs-header,
  body.neurodialogs-active .neuro-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  body.neurodialogs-active .neuro-section-head.neuro-title-row {
    display: grid;
    grid-template-columns: 27px minmax(0, 1fr);
  }

  body.neurodialogs-active .neuro-section-head.neuro-title-row > :not(.neuro-step):not(:first-of-type) {
    grid-column: 1 / -1;
  }

  body.neurodialogs-active .neuro-account-filters,
  body.neurodialogs-active .neuro-grid.three,
  body.neurodialogs-active .neuro-protection-grid,
  body.neurodialogs-active .neuro-mode-grid,
  body.neurodialogs-active .neuro-account-list,
  body.neurodialogs-active .neuro-account-list.compact,
  body.neurodialogs-active .neuro-billing-grid {
    grid-template-columns: 1fr;
  }

  body.neurodialogs-active .neuro-account-filters > *,
  body.neurodialogs-active .neuro-account-filters > .neuro-check:first-of-type {
    grid-column: 1;
  }

  body.neurodialogs-active .neuro-timeline {
    grid-template-columns: 1fr;
  }

  body.neurodialogs-active .neuro-timeline-arrow {
    width: 2px;
    height: 15px;
    margin: auto;
  }

  body.neurodialogs-active .neuro-run-dialogs {
    grid-template-columns: 1fr;
  }

  body.neurodialogs-active .neuro-status-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.neuro-story-viewers-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:12px;min-width:0}
/* Viewer rows must grow with their content, including the shared readable scale. */
body #neuroStoryList { display:flex; flex-direction:column; gap:8px; overflow-x:hidden; padding:3px 5px 3px 3px; }
body #neuroStoryList .neuro-story-person { flex:0 0 auto; grid-template-columns:22px 48px minmax(0,1fr) auto; min-width:0; height:auto; max-height:none; min-height:86px; padding:12px; gap:10px; align-items:center; white-space:normal; }
body #neuroStoryList .neuro-story-avatar { width:48px!important; height:48px!important; min-width:48px!important; flex-basis:48px!important; align-self:start; }
body #neuroStoryList .neuro-story-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
body #neuroStoryList .neuro-story-avatar img[hidden] { display:none; }
body #neuroStoryList .neuro-story-check { width:20px; height:20px; min-height:0; font-size:13px!important; line-height:1!important; }
body #neuroStoryList .neuro-story-person-copy { display:block; min-width:0; text-align:left; }
body #neuroStoryList .neuro-story-person-copy strong { display:block; font-size:18px!important; line-height:1.4!important; overflow-wrap:anywhere; }
body #neuroStoryList .neuro-story-person-copy small { display:block; margin-top:3px; color:#526b80; white-space:normal; overflow:visible; overflow-wrap:anywhere; text-overflow:clip; }
body #neuroStoryList .neuro-story-person-copy small,
body #neuroStoryList .neuro-story-person-copy small span { font-size:15px!important; line-height:1.5!important; }
body #neuroStoryList .neuro-story-person-copy .neuro-story-person-stats { display:flex; flex-wrap:wrap; gap:2px 14px; }
body #neuroStoryList .neuro-story-metric { display:inline; }
body #neuroStoryList .neuro-story-metric.reaction:not(.active) { color:#526b80; }
body #neuroStoryList .neuro-story-tag { font-size:13px!important; line-height:1.4!important; align-self:start; margin-top:2px; }
body #neuroStoryViewersSection .neuro-story-viewers-grid > .neuro-panel { min-width:0; }
body #neuroStoryViewersSection .neuro-story-viewers-grid .neuro-section-head { flex-wrap:wrap; }
@media(max-width:600px) {
  body #neuroStoryList .neuro-story-person { grid-template-columns:20px 48px minmax(0,1fr); padding:10px; gap:8px; }
  body #neuroStoryList .neuro-story-tag { grid-column:3; justify-self:start; margin:0; }
}
.neuro-story-account-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:0 0 12px;padding:10px;border:1px solid #d5e5f3;border-radius:12px;background:#f8fbfe}
.neuro-story-account-picker{position:relative;min-width:min(360px,100%)}
#neuroStoryViewersSection .neuro-story-account-identity,
#neuroStoryViewersSection #neuroStoryAccountPickerLabel{display:flex;align-items:center;gap:9px;min-width:0;text-align:left}
#neuroStoryViewersSection .neuro-story-account-identity>span:last-child{min-width:0}
#neuroStoryViewersSection #neuroStoryAccountPickerLabel{flex:1 1 auto}
#neuroStoryViewersSection .neuro-story-account-selected-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#neuroStoryViewersSection .neuro-story-account-avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;min-width:32px;height:32px;border-radius:50%;overflow:hidden;background:#e5eef8;color:#225c8c}
#neuroStoryViewersSection .neuro-story-account-avatar>span{font-size:14px!important;line-height:1!important;font-weight:600}
#neuroStoryViewersSection .neuro-story-account-avatar>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
#neuroStoryViewersSection .neuro-story-account-avatar>img[hidden]{display:none}
.neurodialogs-workspace #neuroStoryAccountPicker{display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;min-height:42px;margin:0;color:#17324a;background:#fff;border:1px solid #bcd7eb;box-shadow:0 3px 10px rgba(26,102,160,.08)}
.neuro-story-account-panel{position:absolute;z-index:40;top:calc(100% + 7px);left:0;display:flex;flex-direction:column;width:min(520px,calc(100vw - 64px));height:min(460px,70vh);min-height:280px;max-height:78vh;padding:11px;overflow:hidden;resize:vertical;box-sizing:border-box;border:1px solid #bcd7eb;border-radius:13px;background:#fff;box-shadow:0 16px 38px rgba(25,74,112,.2)}
.neuro-story-account-panel.hidden{display:none}.neuro-story-account-panel input{margin:0 0 9px}.neuro-story-account-filters{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:9px}.neuro-story-account-filters button{margin:0;padding:7px 9px}.neuro-story-account-filters button.active{color:#fff!important;background:#1976d2!important}
.neuro-story-account-list{display:grid;flex:1 1 auto;align-content:start;gap:6px;min-height:140px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:3px}.neurodialogs-workspace .neuro-story-account-option{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin:0;padding:9px 10px;color:#17324a!important;background:#fff!important;border:1px solid #d8e6f1;text-align:left}.neurodialogs-workspace .neuro-story-account-option:hover{border-color:#79b4df;background:#f5fbff!important}.neurodialogs-workspace .neuro-story-account-option.active{color:#fff!important;background:#1976d2!important;border-color:#1976d2}.neuro-story-account-option span:first-child{min-width:0}.neuro-story-account-option strong,.neuro-story-account-option small{display:block}.neuro-story-account-option small{margin-top:2px;color:#71879a}.neuro-story-account-option.active small{color:#e9f5ff}.neuro-story-account-counters{display:flex;gap:5px;flex:0 0 auto}.neuro-story-account-option.active .badge{color:#155f9f;background:#fff}
/* Account menu: two-line rows must not shrink into single-line grid tracks. */
#neuroStoryAccountPanel > input,
#neuroStoryAccountPanel > .neuro-story-account-filters { flex-shrink:0; }
#neuroStoryAccountList { grid-auto-rows:max-content; min-height:0; }
body.neurodialogs-active #neuroStoryAccountList .neuro-story-account-option { height:auto; min-height:64px; padding:9px 10px; }
#neuroStoryAccountList .neuro-story-account-option > span:first-child:not(.badge) { flex:1 1 auto; min-width:0; }
#neuroStoryAccountList .neuro-story-account-option strong,
#neuroStoryAccountList .neuro-story-account-option small { white-space:normal; overflow-wrap:anywhere; }
#neuroStoryAccountList .neuro-story-account-option > .badge,
#neuroStoryAccountList .neuro-story-account-counters { flex-shrink:0; white-space:nowrap; }
.neuro-story-attention-accounts{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.neuro-story-attention-accounts button{margin:0;padding:7px 9px}.neuro-story-attention-accounts button .badge{margin-left:4px}
.neuro-story-toolbar{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:12px}
.neuro-story-toolbar label,.neuro-story-field{display:grid;gap:5px;color:#587188;font-size:12px}
.neuro-story-live{display:inline-flex;align-items:center;gap:6px;color:#08783e;font-size:12px;font-weight:700}.neuro-story-live::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
.neuro-story-list{display:grid;align-content:start;grid-auto-rows:minmax(58px,max-content);gap:8px;height:360px;min-height:220px;max-height:70vh;overflow-y:auto;resize:vertical;scrollbar-gutter:stable;padding-right:4px}.neurodialogs-workspace .neuro-story-person{display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:center;gap:9px;width:100%;min-height:58px;margin:0;padding:9px;border:1px solid #d5e5f3;border-radius:10px;color:#17324a!important;background:#fff!important;text-align:left;box-shadow:none}.neurodialogs-workspace .neuro-story-person.active{border-color:#1e83d3;background:#eef8ff!important;box-shadow:0 0 0 2px #d9efff}
.neuro-story-check{display:grid;place-items:center;width:20px;height:20px;border:1px solid #8fb8d8;border-radius:5px;color:#fff;background:#1e83d3;font-size:12px}.neuro-story-check.empty{color:transparent;background:#fff}.neuro-story-avatar,.neuro-story-detail-avatar{display:grid;place-items:center;overflow:hidden;border-radius:50%;color:#1765a7;background:#dff0ff;font-weight:700}.neuro-story-avatar{width:38px;height:38px}.neuro-story-detail-avatar{width:52px;height:52px;flex:0 0 52px}.neuro-story-avatar img,.neuro-story-detail-avatar img{width:100%;height:100%;object-fit:cover}.neuro-story-avatar-unavailable{position:relative;display:grid;place-items:center;width:100%;height:100%;background:linear-gradient(145deg,#e5f3ff,#cfe7fa);box-shadow:inset 0 0 0 1px rgba(32,105,160,.14)}.neuro-story-avatar-unavailable[hidden]{display:none}.neuro-story-avatar-initials{color:#1765a7;font-size:1em;font-weight:700;letter-spacing:.02em}.neuro-story-detail-avatar .neuro-story-avatar-initials{font-size:1.15em}.neuro-story-avatar-lock{position:absolute;right:0;bottom:0;display:grid;place-items:center;width:14px;height:14px;border-radius:50%;color:#fff;background:#2c7fbd;box-shadow:0 0 0 2px #e5f3ff}.neuro-story-detail-avatar .neuro-story-avatar-lock{width:17px;height:17px}.neuro-story-avatar-lock svg{width:9px;height:9px;overflow:visible;fill:currentColor}.neuro-story-avatar-lock path{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}.neuro-story-contact{display:flex;align-items:center;gap:10px}.neuro-story-person small{display:block;margin-top:3px;color:#6f8496}.neuro-story-tag,.neuro-story-chip{padding:4px 7px;border-radius:999px;color:#08783e;background:#e5f8ed;font-size:11px;white-space:nowrap}
.neuro-story-person small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.neuro-story-metric{display:inline-flex;align-items:center;gap:3px;font-weight:600}.neuro-story-metric.views{color:#2579b8}.neuro-story-metric.reaction{color:#9aa9b5}.neuro-story-metric.reaction.active{color:#e53935}.neuro-story-separator{color:#aab7c1}.neuro-story-summary{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 12px}.neuro-story-chip{color:#47647c;background:#edf5fb}.neuro-story-compose{padding:10px;border:1px solid #d5e5f3;border-radius:10px;background:#fbfdff}.neuro-story-compact{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:end;margin-bottom:9px}.neuro-story-compose textarea{min-height:72px}.neuro-story-footer{display:flex;justify-content:space-between;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px;padding-top:12px;border-top:1px solid #d5e5f3}.neuro-story-autoqueue{display:grid;gap:12px;margin-top:12px;padding:12px;border:1px solid #bad9ef;border-radius:12px;background:#f5fbff}.neuro-story-autoqueue-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:9px}.neuro-story-autoqueue.hidden{display:none}.neuro-story-disabled{opacity:.58;pointer-events:none}.neuro-story-switch{display:flex;align-items:center;gap:7px;font-weight:700}.neuro-story-switch input{width:auto}
.neurodialogs-workspace [data-neuro-story-filter].active{color:#fff!important;background:#1976d2!important;border-color:#1976d2!important;box-shadow:0 3px 10px rgb(25 118 210 / 28%)}
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) #neuroStoryAutoQueueOpen.active{color:#fff;border-color:#176fc1;background:#1e78d6;box-shadow:0 5px 14px rgba(30,120,214,.2)}body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) #neuroStoryAutoQueueOpen.active .badge{color:#155f9f;background:#fff}

/* Every actionable control in Stories must look and feel actionable. */
body.neurodialogs-active #neuroStoryViewersSection button:not(:disabled) {
  cursor: pointer;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
body.neurodialogs-active #neuroStoryViewersSection button.alt:not(:disabled):hover,
body.neurodialogs-active #neuroStoryViewersSection button.alt:not(:disabled):focus-visible {
  border-color: #67aee0 !important;
  color: #135f98 !important;
  background: #eaf6ff !important;
  box-shadow: 0 4px 12px rgb(25 118 210 / 14%);
  transform: translateY(-1px);
}
body.neurodialogs-active #neuroStoryViewersSection button:not(:disabled):active {
  transform: translateY(0) scale(.97);
  box-shadow: none !important;
}
body.neurodialogs-active #neuroStoryRefresh,
body.neurodialogs-active #neuroStoryProfile,
body.neurodialogs-active #neuroStoryDetails,
body.neurodialogs-active #neuroStoryTextConfigure,
body.neurodialogs-active #neuroStoryGenerate {
  border-color: #98c6e7 !important;
  color: #176aa5 !important;
  background: #f4faff !important;
}
body.neurodialogs-active #neuroStoryClearContact:not(:disabled) {
  border-color: #e7b6b6 !important;
  color: #b44141 !important;
  background: #fff7f7 !important;
}
body.neurodialogs-active #neuroStoryClearContact:not(:disabled):hover,
body.neurodialogs-active #neuroStoryClearContact:not(:disabled):focus-visible {
  border-color: #d66767 !important;
  color: #fff !important;
  background: #d66767 !important;
}
body.neurodialogs-active #neuroStoryViewersSection button:disabled {
  border-color: #d8e2ea !important;
  color: #93a3b1 !important;
  background: #f4f7f9 !important;
  opacity: .72;
}
body.neurodialogs-active #neuroStoryQueue:not(:disabled),
body.neurodialogs-active #neuroStorySend:not(:disabled) {
  border-color: #1976d2 !important;
  color: #fff !important;
  background: #1976d2 !important;
}
@media(max-width:950px){.neuro-story-toolbar{grid-template-columns:1fr 1fr}.neuro-story-viewers-grid{grid-template-columns:1fr}.neuro-story-autoqueue-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.neuro-story-toolbar{grid-template-columns:1fr}.neuro-story-person{grid-template-columns:auto auto minmax(0,1fr)}.neuro-story-person>.neuro-story-tag{grid-column:2 / -1;justify-self:start}}

/* Схема закрепления: появляется только при выборе нескольких аккаунтов. */
.neuro-chat-assignment-section {
  position: relative;
  margin-top: 14px !important;
  padding: 18px 18px 14px !important;
  border: 1px solid #9bd8f8 !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #f3fbff 0%, #edf8fe 100%) !important;
  box-shadow: none !important;
}
.neuro-chat-assignment-section.hidden,
.neuro-chat-assignment-body.hidden,
.neuro-chat-assignment-menu.hidden,
.neuro-chat-assignment-card-body.hidden,
#neuroChatAssignmentImportFile.hidden { display: none !important; }
.neuro-chat-assignment-summary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: -4px 0 14px; color: #5c7286;
}
.neuro-chat-assignment-summary span {
  padding: 6px 12px; border-radius: 7px; color: #087bb8; background: #dff3fc;
}
.neuro-chat-assignment-summary .accounts { color: #168448; background: #ddf6e7; }
.neuro-chat-assignment-head {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.neuro-chat-assignment-head h3 { margin: 0 0 8px; color: #087fbe; font-size: 13px; letter-spacing: .04em; }
.neuro-chat-assignment-counts { display: flex; gap: 9px; }
.neuro-chat-assignment-counts span {
  padding: 5px 11px; border: 1px solid #d4e2ea; border-radius: 16px; color: #52677a; background: #f3f7f9;
}
.neuro-chat-assignment-counts span:last-child { border-color: #a7dcf8; color: #087fbe; background: #e7f7ff; }
.neuro-chat-assignment-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.neuro-chat-assignment-actions > button,
.neuro-chat-assignment-common button {
  min-height: 38px; padding: 8px 13px; border: 1px solid #d7e2e9 !important; border-radius: 7px !important;
  color: #536273 !important; background: #fff !important; font-weight: 600;
}
.neuro-chat-assignment-actions #neuroChatAssignmentAll,
.neuro-chat-assignment-actions #neuroChatAssignmentToggle.active,
.neuro-chat-assignment-common #neuroChatAssignmentDistribute {
  border-color: #078fcf !important; color: #fff !important; background: #078fcf !important;
}
.neuro-chat-assignment-actions #neuroChatAssignmentMore {
  min-width: 40px; min-height: 38px; padding: 5px 10px; border: 1px solid #cfe0e9 !important;
  border-radius: 7px !important; color: #078fcf !important; background: #fff !important; font-size: 21px; line-height: 1;
}
.neuro-chat-assignment-lock {
  position: relative;
  display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 5px 9px;
  border: 1px solid #65c2ef; border-radius: 8px; color: #078fcf; background: #e7f7ff; cursor: pointer;
}
.neuro-chat-assignment-lock > svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.neuro-chat-assignment-lock-tip {
  position: absolute; z-index: 110; right: 0; bottom: calc(100% + 10px); display: none; width: 230px; padding: 10px 12px;
  border-radius: 7px; color: #fff; background: #344258; box-shadow: 0 8px 22px rgba(28, 42, 58, .25); font-size: 13px; font-weight: 600; line-height: 1.45;
}
.neuro-chat-assignment-lock-tip::after { content: ""; position: absolute; right: 30px; top: 100%; border: 6px solid transparent; border-top-color: #344258; }
.neuro-chat-assignment-lock:hover .neuro-chat-assignment-lock-tip,
.neuro-chat-assignment-lock:focus-within .neuro-chat-assignment-lock-tip { display: block; }
.neuro-chat-assignment-lock input { position: absolute; opacity: 0; pointer-events: none; }
.neuro-chat-assignment-lock .neuro-switch-ui {
  position: relative; width: 42px; height: 24px; border-radius: 14px; background: #b9c9d3; transition: .18s ease;
}
.neuro-chat-assignment-lock .neuro-switch-ui::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .18s ease;
}
.neuro-chat-assignment-lock input:checked + .neuro-switch-ui { background: #0796d5; }
.neuro-chat-assignment-lock input:checked + .neuro-switch-ui::after { transform: translateX(18px); }
.neuro-chat-assignment-more-wrap { position: relative; }
.neuro-chat-assignment-menu {
  position: absolute; z-index: 90; top: calc(100% + 6px); right: 0; width: 220px; padding: 6px;
  border: 1px solid #d8e3ea; border-radius: 8px; background: #fff; box-shadow: 0 10px 28px rgba(31, 54, 74, .18);
}
.neuro-chat-assignment-menu button {
  display: block; width: 100%; padding: 9px 11px; border: 0 !important; border-radius: 6px !important;
  color: #4b5d70 !important; background: transparent !important; text-align: left;
}
.neuro-chat-assignment-menu button:hover { background: #eef8fd !important; }
.neuro-chat-assignment-body { margin-top: 14px; }
.neuro-chat-assignment-common {
  padding: 16px; border: 1px solid #d5e5ee; border-radius: 12px; background: #fff;
}
.neuro-chat-assignment-common > strong { color: #087fbe; font-size: 13px; }
.neuro-chat-assignment-common > p { margin: 7px 0 12px; color: #64778a; }
.neuro-chat-assignment-common textarea,
.neuro-chat-assignment-card textarea,
.neuro-chat-assignment-card input[type="datetime-local"] {
  box-sizing: border-box; width: 100%; border: 1px solid #cbd9e3; border-radius: 7px; color: #34495e; background: #fff;
}
.neuro-chat-assignment-common textarea { min-height: 118px; padding: 12px; resize: vertical; }
.neuro-chat-assignment-common > div { display: flex; justify-content: flex-end; gap: 0; margin-top: 10px; }
.neuro-chat-assignment-common #neuroChatAssignmentAppend { border-radius: 7px 0 0 7px !important; }
.neuro-chat-assignment-common #neuroChatAssignmentDistribute { border-radius: 0 7px 7px 0 !important; }
#neuroChatAssignmentMessage { margin: 10px 0; padding: 0; }
#neuroChatAssignmentMessage.success { padding: 10px 12px; border: 1px solid #8be0b0; border-radius: 8px; color: #2a9b60; background: #e8fff1; }
#neuroChatAssignmentMessage.error { padding: 10px 12px; border: 1px solid #f0a4a4; border-radius: 8px; color: #b23a3a; background: #fff1f1; }
.neuro-chat-assignment-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; gap: 9px; }
.neuro-chat-assignment-card { overflow: hidden; min-height: 92px; border: 1px solid #9bd8f8; border-radius: 9px; background: linear-gradient(180deg, #e9f8ff, #e2f3fb); }
.neuro-chat-assignment-card header { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: 8px; padding: 12px; }
.neuro-chat-assignment-card header > button:first-child { display: grid; gap: 2px; padding: 0; border: 0 !important; color: #21374a !important; background: transparent !important; text-align: left; }
.neuro-chat-assignment-card header strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neuro-chat-assignment-card header span { color: #078fcf; }
.neuro-chat-assignment-card header small { margin-top: 4px; color: #75899a; }
.neuro-chat-assignment-card .gear { padding: 0; border: 0 !important; color: #159edb !important; background: transparent !important; }
.neuro-chat-assignment-card-body { margin: 0 12px 12px; padding-top: 12px; border-top: 1px dashed #b8dbe9; }
.neuro-chat-assignment-card-body label { display: grid; gap: 8px; color: #078fcf; font-size: 12px; font-weight: 700; }
.neuro-chat-assignment-card-body textarea { min-height: 160px; padding: 11px; resize: vertical; font-size: 16px; font-weight: 400; }
.neuro-chat-assignment-card-body p { margin: 7px 0 14px; padding-bottom: 8px; border-bottom: 1px dashed #b8dbe9; color: #72879a; font-size: 12px; }
.neuro-chat-assignment-card-body input { padding: 10px 12px; font-size: 15px; font-weight: 400; }
.neuro-chat-assignment-card-body > small { display: block; margin-top: 8px; color: #72879a; }
@media (max-width: 980px) {
  .neuro-chat-assignment-head { align-items: flex-start; flex-direction: column; }
  .neuro-chat-assignment-actions { flex-wrap: wrap; justify-content: flex-start; }
}
.neuro-chat-avatar-deleted { background: #b9b9b9 !important; color: #fff; }
.neuro-chat-avatar-deleted svg { width: 72%; height: 72%; display: block; }
body.neurochatting-preview :is(#neurodialogsWorkspace,#genericModuleWorkspace) > :not(.neurodialogs-header):not(:is(#neuroAccountsSection,#warmingAccountSelector)):not(#neuroProtectionSection):not(#neuroChatModeGrid):not(#neuroGroupPlan):not(#neuroChatAssignmentSection):not(#neuroChatTargetGroupsSection):not(#neuroChatStyleScenarioSection):not(#neuroChatLanguageContextSection):not(#neuroChatSecondaryGrid):not(#neuroChatPromotionSection):not(#neuroChatDelaysSection):not(#neuroChatSettingsPresetsSection):not(#neuroChatSpecialSection):not(#neuroChatLaunchSection):not(#neuroChatMessageHistorySection):not(#neuroChatBlacklistSection):not(#neuroViewerSection):not([data-live-settings]):not([data-form-autosave]):not([data-live-toast]) {
  display: none !important;
}

body.neurochatting-preview:not(.neurochatting-reaction-preview) [data-live-toast],
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroViewerSection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatModeGrid {
  display: none !important;
}

body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatAssignmentSection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatTargetGroupsSection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatStyleScenarioSection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatLanguageContextSection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatSecondaryGrid,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatPromotionSection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatDelaysSection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatSettingsPresetsSection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatSpecialSection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatLaunchSection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatMessageHistorySection,
body.neurochatting-preview:not(.neurochatting-reaction-preview) #neuroChatBlacklistSection {
  display: none !important;
}

body.neurochatting-reaction-preview #neuroChatModeGrid {
  display: grid !important;
}

body.neurochatting-reaction-preview #neuroReactionSection,
body.neurochatting-reaction-preview #neuroChatWorkModeSection,
body.neurochatting-reaction-preview #neuroChatAssignmentSection,
body.neurochatting-reaction-preview #neuroChatTargetGroupsSection,
body.neurochatting-reaction-preview #neuroChatStyleScenarioSection,
body.neurochatting-reaction-preview #neuroChatLanguageContextSection,
body.neurochatting-reaction-preview #neuroChatWorkHoursSection,
body.neurochatting-reaction-preview #neuroChatAutoReplySection,
body.neurochatting-reaction-preview #neuroChatPromotionSection,
body.neurochatting-reaction-preview #neuroChatDelaysSection,
body.neurochatting-reaction-preview #neuroChatSettingsPresetsSection,
body.neurochatting-reaction-preview #neuroChatSpecialSection,
body.neurochatting-reaction-preview #neuroChatLaunchSection,
body.neurochatting-reaction-preview #neuroChatMessageHistorySection,
body.neurochatting-reaction-preview #neuroChatBlacklistSection {
  display: block !important;
}

body.neurochatting-reaction-preview #neuroChatAssignmentSection.hidden {
  display: none !important;
}

body.neurochatting-reaction-preview #neuroChatSecondaryGrid {
  display: grid !important;
}

body.neurochatting-preview :is(#neurodialogsWorkspace,#genericModuleWorkspace) .neuro-header-actions {
  display: none !important;
}

body.neurochatting-preview :is(#neuroAccountsSection,#warmingAccountSelector) {
  margin-top: 0 !important;
}

body.neurochatting-preview #vpsPanel {
  display: none !important;
}

.neuro-chat-mode-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.neuro-chat-mode-grid > .neuro-section {
  height: auto;
  margin-top: 0 !important;
}

.neuro-reaction-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 4px 0 16px;
  padding: 4px;
  border: 1px solid #cfe0ee;
  border-radius: 12px;
  background: #f1f7fb;
}

.neurodialogs-workspace .neuro-reaction-tabs button {
  min-width: 150px;
  margin: 0;
  border-color: transparent !important;
  color: #526c82 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.neurodialogs-workspace .neuro-reaction-tabs button.active {
  border-color: #1976d2 !important;
  color: #fff !important;
  background: #1976d2 !important;
  box-shadow: 0 4px 12px rgb(25 118 210 / 20%) !important;
}

.neuro-reaction-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d4e4f0;
  border-radius: 13px;
  background: #f9fcff;
}

.neuro-reaction-panel.hidden { display: none; }

.neuro-reaction-value,
.neuro-range-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#neuroReactionInterval .neuro-probability-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
#neuroReactionInterval .neuro-probability-presets button[data-neuro-probability] { margin: 0; min-height: 34px !important; padding: 5px 12px; border: 1px solid #c9d7e3 !important; color: #52677b !important; background: #fff !important; box-shadow: none !important; }
#neuroReactionInterval .neuro-probability-presets button[data-neuro-probability]:not(.active):hover { background: #eaf1f7 !important; }
#neuroReactionInterval .neuro-probability-presets button[data-neuro-probability].active { color: #fff !important; background: #1976d2 !important; border-color: #1976d2 !important; }
#neuroReactionInterval .neuro-probability-presets button[data-neuro-probability]:focus-visible { outline: 2px solid #174f85 !important; outline-offset: 2px; }
.neuro-reaction-value output {
  padding: 5px 9px;
  border-radius: 999px;
  color: #1765a7;
  background: #dff0ff;
  font-weight: 800;
}

.neuro-reaction-panel input[type="range"] {
  width: 100%;
  accent-color: #1976d2;
}

.neuro-range-scale { color: #7890a3; font-size: 12px; }
.neuro-reaction-label { color: #294a64; font-weight: 700; }
.neuro-heading-with-info { display: inline-flex; align-items: center; gap: 7px; }
.neuro-info-button {
  position: relative;
  display: inline-grid;
  flex: 0 0 17px;
  width: 17px !important;
  min-width: 17px !important;
  max-width: 17px !important;
  height: 17px !important;
  min-height: 17px !important;
  max-height: 17px !important;
  margin: 0 !important;
  padding: 0 !important;
  place-items: center;
  border: 1px solid #8da9bf !important;
  border-radius: 50% !important;
  color: #66849b !important;
  background: #fff !important;
  box-shadow: none !important;
  font: 700 11px/1 sans-serif;
}
.neuro-info-button.compact { flex-basis: 16px; width: 16px !important; min-width: 16px !important; max-width: 16px !important; height: 16px !important; min-height: 16px !important; max-height: 16px !important; margin: 0 0 0 3px !important; vertical-align: 1px; }
.neuro-info-glyph {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font: 700 11px/1 Arial, sans-serif !important;
  text-align: center !important;
  transform: translateY(-.25px);
  pointer-events: none;
}
.neuro-info-button.compact .neuro-info-glyph { font-size: 10px !important; }
.neuro-info-tooltip {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 50%;
  display: none;
  width: min(280px, 70vw);
  padding: 11px 13px;
  border-radius: 8px;
  color: #fff;
  background: #344258;
  box-shadow: 0 8px 22px rgb(30 50 70 / 24%);
  font: 600 12px/1.45 sans-serif;
  text-align: left;
  white-space: normal !important;
  overflow-wrap: anywhere;
  transform: translateX(-50%);
}
.neuro-info-button:hover .neuro-info-tooltip,
.neuro-info-button:focus-visible .neuro-info-tooltip,
.neuro-info-button.show-info .neuro-info-tooltip { display: block; }
.neuro-trigger-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.neuro-trigger-entry input { min-width: 0; }
.neuro-trigger-actions { display: flex; gap: 8px; }
.neuro-trigger-preset-actions {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: start;
  gap: 10px;
  margin-top: 12px;
}
.neurodialogs-workspace .neuro-trigger-save-preset {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #9ce7bc;
  border-radius: 12px;
  background: #eafff1;
  color: #35c979;
  font-weight: 700;
}
.neurodialogs-workspace .neuro-trigger-save-preset:disabled {
  border-color: #d6e8df;
  background: #f4faf6;
  color: #a9cbb7;
}
.neuro-trigger-preset-picker { position: relative; min-width: 0; }
.neurodialogs-workspace .neuro-trigger-preset-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #168bdd;
  border-radius: 10px;
  color: #6b7f94;
  background: #fff;
  box-shadow: none;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}
.neuro-trigger-preset-toggle > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.neuro-trigger-preset-toggle > span:last-child { color: #88a0b6; font-size: 20px; }
.neuro-trigger-preset-list {
  position: absolute;
  z-index: 35;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  overflow: hidden;
  padding: 4px;
  border: 1px solid #d5e2ec;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(24, 58, 88, .18);
}
.neuro-trigger-preset-list > .hint { margin: 10px 12px; }
.neuro-trigger-preset-item { display: grid; grid-template-columns: minmax(0, 1fr) 42px; align-items: center; border-radius: 7px; }
.neuro-trigger-preset-item.active { background: #d9f1fc; }
.neurodialogs-workspace .neuro-trigger-preset-item button {
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  color: #263f57;
  background: transparent;
  box-shadow: none;
  text-align: left;
}
.neurodialogs-workspace .neuro-trigger-preset-item button:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.neurodialogs-workspace .neuro-trigger-preset-item button.danger { padding: 0; color: #ff7474; font-size: 20px; text-align: center; }
.neurodialogs-workspace .neuro-trigger-icon {
  width: 42px;
  min-width: 42px;
  padding: 0 !important;
  border-color: #cadce9 !important;
  color: #7590a4 !important;
  background: #f8fbfd !important;
  box-shadow: none !important;
  font-size: 21px;
}
.neurodialogs-workspace .neuro-trigger-icon.primary { border-color: #72bce8 !important; color: #fff !important; background: #6fc0ed !important; }
.neurodialogs-workspace .neuro-trigger-icon.danger { border-color: #ffd2d2 !important; color: #ef7777 !important; background: #fff7f7 !important; }
.neurodialogs-workspace .neuro-trigger-icon:disabled { cursor: default; opacity: .45; }
.neuro-trigger-list { display: flex; gap: 7px; flex-wrap: wrap; min-height: 30px; }
.neuro-trigger-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid #c6e9cf; border-radius: 999px; color: #347047; background: rgba(218, 244, 225, .78); font-size: 12px; font-weight: 700; }
.neuro-trigger-chip button { margin: 0 !important; padding: 0 !important; border: 0 !important; color: #6a9a78 !important; background: transparent !important; box-shadow: none !important; }
.neuro-theme-matching { align-items: flex-start; padding-top: 12px; border-top: 1px solid #d9e7f1; }
.neuro-theme-matching > span { display: grid; gap: 3px; }
.neuro-theme-matching > span > small { color: #6c8395; font-weight: 400; }
.neuro-reaction-ai-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid #bfe0f4;
  border-radius: 10px;
  color: #527896;
  background: #f1f9fe;
}
.neuro-reaction-ai-note span { color: #0f91cc; font-size: 18px; line-height: 1.25; }
.neuro-reaction-ai-note p { margin: 0; font-size: 12px; line-height: 1.5; }

.neuro-preset-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: #0c2f50;
  box-shadow: 0 24px 70px rgba(10, 32, 55, 0.35);
}
.neuro-preset-dialog::backdrop { background: rgba(13, 24, 35, 0.58); }
.neuro-preset-dialog-head,
.neuro-preset-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
}
.neuro-preset-dialog-head { border-bottom: 1px solid #e2ebf3; }
.neuro-preset-dialog-head h3 { margin: 0; font-size: 19px; }
.neuro-preset-dialog-close {
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #8aa1b8;
  border-radius: 12px;
  background: #fff;
  color: #60788f;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}
.neuro-preset-dialog-body { display: grid; gap: 10px; padding: 18px 22px 8px; }
.neuro-preset-dialog-body label { font-weight: 700; }
.neuro-preset-dialog-body input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #d6e0ea;
  border-radius: 12px;
  background: #f4f7fa;
}
.neuro-preset-dialog-body .hint { margin: 0; }
.neuro-preset-dialog-actions { justify-content: flex-end; padding-top: 22px; }

.neuro-target-groups-section { grid-column: 1 / -1; }
.neuro-target-groups-head,
.neuro-target-title,
.neuro-target-selected-head,
.neuro-target-folder-row {
  display: flex;
  align-items: center;
}
.neuro-target-groups-head { justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px dashed #d8e5ef; }
.neuro-target-title { gap: 12px; }
.neuro-target-title h3 { margin: 0 0 4px; }
.neuro-target-title .hint { margin: 0; }
.neuro-target-icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #049fdb, #087db8);
  box-shadow: 0 8px 18px rgba(0, 135, 190, .24);
}
.neuro-target-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.neuro-target-count { min-width: 28px; padding: 4px 9px; border-radius: 8px; color: #fff; background: #0789c6; font-weight: 800; text-align: center; }
.neuro-target-tabs { display: flex; gap: 4px; margin-top: 16px; padding: 5px; border-radius: 14px; background: #f2f7fa; }
.neurodialogs-workspace .neuro-target-tabs button { min-height: 42px; margin: 0; padding: 0 20px; border: 0; }
/* The shared primary-button theme must not mark every source tab selected. */
#neuroChatTargetGroupsSection .neuro-target-tabs button[data-neuro-target-tab] { color: #52677b !important; background: transparent !important; box-shadow: none !important; }
#neuroChatTargetGroupsSection .neuro-target-tabs button[data-neuro-target-tab]:not(.active):hover { color: #29465e !important; background: #e5edf3 !important; }
#neuroChatTargetGroupsSection .neuro-target-tabs button[data-neuro-target-tab].active { color: #fff !important; background: #1976d2 !important; box-shadow: 0 3px 8px rgba(25, 118, 210, .18) !important; }
#neuroChatTargetGroupsSection .neuro-target-tabs button[data-neuro-target-tab]:focus-visible { outline: 2px solid #174f85 !important; outline-offset: 2px; }
.neuro-target-panel { margin-top: 16px; }
.neuro-target-manual-row { display: grid; grid-template-columns: minmax(0, 1fr) 138px; gap: 12px; align-items: stretch; }
.neuro-target-textarea-wrap { position: relative; min-width: 0; }
.neuro-target-textarea-wrap textarea { width: 100%; min-height: 88px; padding: 14px 14px 30px; resize: vertical; }
.neuro-target-line-count { position: absolute; right: 14px; bottom: 10px; color: #70869a; font-size: 12px; }
.neurodialogs-workspace #neuroTargetAddManual { min-height: 88px; margin: 0; font-weight: 800; }
.neurodialogs-workspace #neuroTargetAddManual:disabled,
.neurodialogs-workspace #neuroTargetAddFolder:disabled { color: #fff; background: #ced4da; opacity: 1; }
.neuro-target-history-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.neurodialogs-workspace .neuro-target-history-card { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 13px 14px; border: 1px solid #d9e5ee; color: #22425d; background: #fff; box-shadow: none; text-align: left; }
.neurodialogs-workspace .neuro-target-history-card.active { border-color: #7fcce9; background: #eaf8fe; }
.neuro-target-history-card small { color: #8094a6; }
#neuroChatTargetGroupsSection .neuro-target-history-card { flex-direction: column; justify-content: flex-start; gap: 5px; min-width: 0; overflow-wrap: anywhere; color: #22425d !important; background: #fff !important; box-shadow: none !important; }
#neuroChatTargetGroupsSection .neuro-target-history-card:not(.active):hover { background: #edf4fa !important; }
#neuroChatTargetGroupsSection .neuro-target-history-card.active { color: #fff !important; background: #1976d2 !important; border-color: #1976d2 !important; }
#neuroChatTargetGroupsSection .neuro-target-history-card.active small { color: #fff !important; }
#neuroChatTargetGroupsSection .neuro-target-history-card:focus-visible { outline: 2px solid #174f85 !important; outline-offset: 2px; }
.neuro-target-run-preview { margin-top: 14px; padding: 14px; border: 1px solid #d9e5ee; border-radius: 10px; background: #f8fbff; }
.neuro-target-run-preview[hidden] { display: none !important; }
.neuro-target-run-targets { max-height: 240px; overflow: auto; padding-left: 24px; overflow-wrap: anywhere; }
.neuro-target-run-targets li { margin: 6px 0; }
.neuro-target-run-targets small { display: block; color: #60778a; }
#neuroTargetHistoryPanel [hidden] { display: none !important; }
.neuro-target-history-toolbar { display: flex; align-items: center; gap: 7px; }
#neuroTargetRunToggle { flex: 1; min-width: 0; text-align: left; overflow-wrap: anywhere; }
#neuroTargetHistoryMenuButton { min-width: 38px; }
#neuroTargetHistoryPanel .neuro-target-history-toolbar button,
#neuroTargetHistoryPanel .neuro-target-history-actions button,
#neuroTargetRunPreview [data-neuro-history-reset] { margin: 0; color: #34546e !important; background: #fff !important; box-shadow: none !important; }
.neuro-target-history-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
#neuroTargetHistoryPanel .neuro-target-history-actions button { min-height: 34px; padding: 6px 9px; }
#neuroTargetRunPicker { margin-top: 10px; }
#neuroTargetHistoryList { display:block; height:var(--neuro-history-auto-height,auto); min-height:64px; max-height:none; width:100%; box-sizing:border-box; overflow:auto; resize:vertical; padding-bottom:12px; margin-top:8px; border:1px solid #d9e5ee; border-radius:8px; }
.neuro-target-history-tools { display:flex; flex-wrap:wrap; gap:6px; }
.neuro-target-history-summary,.neuro-target-history-undo { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-top:8px; font-size:13px; }
.neuro-target-history-undo { justify-content:flex-start; background:#eaf8ef; border:1px solid #c8e6d2; border-radius:7px; padding:5px 9px; }
#neuroTargetHistoryPanel .neuro-target-history-summary button,#neuroTargetHistoryPanel .neuro-target-history-undo button { min-height:30px!important; margin:0!important; padding:4px 9px!important; font-size:13px!important; background:#fff!important; color:#34546e!important; border:1px solid #cbdbe8!important; box-shadow:none!important; }
#neuroTargetHistoryPanel .neuro-target-resize-hint { margin:5px 0 0; font-size:12px; }
#neuroTargetHistoryList .neuro-target-history-remove { display:grid; place-items:center; flex:0 0 44px; width:44px!important; min-width:44px!important; min-height:44px!important; padding:10px!important; margin:0 5px 0 0!important; color:#9b5360!important; background:transparent!important; border:1px solid transparent!important; border-radius:6px; box-shadow:none!important; }
#neuroTargetHistoryList .neuro-target-history-remove:hover { background:#fff0f0!important; border-color:#f0c3ca!important; color:#b72c43!important; }
#neuroTargetHistoryList .neuro-target-history-remove:focus-visible { outline:2px solid #174f85; outline-offset:1px; }
#neuroTargetHistoryList > .hint { padding: 12px; }
.neuro-target-history-row { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #e4edf4; }
.neuro-target-history-row:last-child { border-bottom: 0; }
#neuroTargetHistoryList .neuro-target-history-card { flex:1; min-width:0; flex-direction:row; align-items:center; justify-content:space-between; width:auto!important; min-height:56px; padding:8px 10px; border:0!important; border-radius:0; }
#neuroTargetHistoryList .neuro-target-history-card > span:first-child { min-width: 0; }
#neuroTargetHistoryList .neuro-target-history-card small { display: block; font-size: 12px !important; line-height: 1.35 !important; }
#neuroTargetHistoryList .neuro-target-history-card > span:last-child { max-width: 34%; text-align: right; font-size: 13px !important; }
#neuroTargetHistoryList .neuro-target-history-card { justify-content:flex-start; gap:12px; min-height:68px; }
#neuroTargetHistoryList .neuro-target-history-card > .neuro-target-history-count { flex:0 0 auto; max-width:150px; padding:7px 10px; background:#e7f3ff; color:#165589; border-radius:7px; font-size:18px!important; font-weight:800; text-align:left; }
#neuroTargetHistoryList .neuro-target-history-card > span.neuro-target-history-description { flex:1; min-width:0; max-width:none; text-align:left; overflow-wrap:anywhere; }
#neuroTargetHistoryList .neuro-target-history-description strong { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; line-height:1.3; font-size:15px!important; }
#neuroTargetHistoryList .neuro-target-history-description small { margin-top:4px; }
#neuroTargetHistoryList .neuro-target-history-card.active > .neuro-target-history-count { background:#fff; color:#165589; }
@media(max-width:600px) {
  #neuroTargetHistoryList .neuro-target-history-card > .neuro-target-history-count { max-width:95px; padding:6px; font-size:16px!important; }
}
#neuroTargetHistoryList input[type=checkbox],#neuroTargetRunPreview input[type=checkbox] { width: 16px !important; height: 16px !important; flex: 0 0 16px; margin: 4px 0 0; }
#neuroTargetHistoryList input[type=checkbox] { margin-left: 9px; }
.neuro-target-history-confirm { border: 1px solid #cbdbe8; border-radius: 8px; padding: 10px; margin-top: 10px; background: #f1f7fb; }
.neuro-target-preview-heading,.neuro-target-preview-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.neuro-target-preview-footer > small { flex: 1; min-width: 150px; color: #60778a; }
#neuroTargetRunPreview { padding: 12px; margin-top: 10px; }
#neuroTargetRunPreview .neuro-target-run-targets { max-height: 140px; padding: 0; margin: 9px 0; display: grid; gap: 5px; }
#neuroTargetRunPreview .neuro-target-run-targets label { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-weight: 400; }
#neuroTargetRunPreview .neuro-target-run-targets label > span { min-width: 0; overflow-wrap: anywhere; }
#neuroTargetPills { max-height: 118px; overflow-y: auto; }
#neuroTargetPills .neuro-target-pill { max-width: 100%; min-width: 0; }
#neuroTargetPills .neuro-target-pill > span { min-width: 0; overflow-wrap: anywhere; }
#neuroTargetPills .neuro-target-pill > button { flex: none; }
@media(max-width:550px) {
  #neuroChatTargetGroupsSection .neuro-target-tabs { display: flex; flex-wrap: wrap; }
  #neuroChatTargetGroupsSection .neuro-target-tabs button[data-neuro-target-tab] { flex: 1; min-width: 0; padding: 7px 6px !important; font-size: 12px !important; }
  #neuroTargetHistoryList .neuro-target-history-card { gap: 6px; }
}
.neuro-target-folder-row { gap: 10px; }
.neuro-target-folder-row > span { color: #1495cd; font-size: 24px; }
.neuro-target-folder-row input { flex: 1; min-width: 0; }
.neurodialogs-workspace #neuroTargetAddFolder { width: 44px; min-width: 44px; min-height: 42px; margin: 0; padding: 0; font-size: 24px; }
.neuro-target-selected { margin-top: 16px; padding-top: 14px; border-top: 1px solid #dce8f1; }
.neuro-target-selected-head { justify-content: space-between; gap: 12px; }
.neurodialogs-workspace #neuroTargetClearAll { margin: 0; padding: 7px 10px; border: 0; color: #ef6d6d; background: transparent; box-shadow: none; }
.neuro-target-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.neuro-target-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #bfe4cc; border-radius: 999px; color: #347047; background: rgba(218, 244, 225, .78); font-weight: 700; }
.neurodialogs-workspace .neuro-target-pill button { margin: 0; padding: 0; border: 0; color: #6a9a78; background: transparent; box-shadow: none; }
#neuroTargetMessage { margin: 10px 0 0; }

.neuro-chat-secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.neuro-chat-secondary-grid > .neuro-section { height: auto; min-height: 179px; margin: 0; }
.neuro-chat-work-hours-section {
  min-height: 0;
  background: #f1f8fd;
}
.neuro-chat-work-hours-section > .neuro-section-head {
  align-items: flex-start;
  flex-flow: row nowrap;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.neuro-chat-work-hours-section > .neuro-section-head > div { flex: 1; min-width: 0; }
.neuro-chat-work-hours-toggle { flex: 0 0 auto; margin-left: auto; }
.neuro-chat-work-hours-fields {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 6px;
}
.neuro-chat-work-hours-fields label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: auto;
  color: #50708b;
}
.neuro-chat-work-hours-fields input {
  width: 98px;
  min-height: 42px;
  border-color: #bfd6e7;
  background: #fff;
}
.neuro-chat-work-hours-fields input:disabled { color: #91a5b5; background: #e7eff5; }
#neuroChatWorkHoursHint { margin: 8px 0 0; }

.neuro-chat-auto-reply-section { background: #fff; }
.neuro-chat-auto-reply-section > .neuro-section-head {
  flex-flow: row nowrap;
  margin-bottom: 0;
}
.neuro-chat-auto-reply-section > .neuro-section-head > div { flex: 1; min-width: 0; }
.neuro-auto-reply-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.neurodialogs-workspace .neuro-auto-reply-tabs button {
  min-height: 42px;
  margin: 0;
  border: 1px solid #d1dce6 !important;
  color: #34495e !important;
  background: #f7f9fb !important;
  box-shadow: none !important;
}
.neurodialogs-workspace .neuro-auto-reply-tabs button.active {
  border-color: #69bde2 !important;
  color: #087fbb !important;
  background: #e2f4fc !important;
}
.neuro-auto-reply-panel {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d9e7f0;
  border-radius: 12px;
  background: #f8fbfd;
}
.neuro-auto-reply-panel.hidden { display: none !important; }
#neuroChatAutoReplyHint { margin: 8px 0 0; }
.neuro-auto-reply-panel > label { color: #244761; font-weight: 800; }
.neuro-auto-reply-panel textarea { min-height: 104px; resize: vertical; }
.neuro-auto-reply-note {
  display: flex;
  gap: 8px;
  margin: 2px 0 0;
  padding: 11px 12px;
  border: 1px solid #bfe1f2;
  border-radius: 10px;
  color: #4c718a;
  background: #eef9fe;
}
#neuroChatAutoReplyHint { margin: 12px 0 0; }

.neuro-chat-promotion-section { margin-top: 16px; background: #fff; }
.neuro-promotion-head {
  align-items: center;
  flex-flow: row nowrap;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.neuro-promotion-head > div { flex: 1; min-width: 0; }
.neuro-promotion-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #f5a000, #e97800);
  box-shadow: 0 7px 16px rgba(232, 126, 0, .22);
}
.neuro-promotion-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.neuro-promotion-toggle { flex: 0 0 auto; margin-left: auto; }
.neuro-promotion-body { display: grid; gap: 20px; margin-top: 16px; padding-top: 18px; border-top: 1px dashed #d8e4ed; }
.neuro-promotion-body.hidden { display: none !important; }
.neuro-promotion-body > label { display: grid; gap: 8px; color: #58718a; }
.neuro-promotion-body input[type="text"] { min-height: 46px; font-size: 16px; }
.neuro-promotion-body textarea { min-height: 66px; resize: vertical; font-size: 15px; }
.neuro-promotion-probability { display: grid; gap: 7px; }
.neuro-promotion-value { color: #7f8fb8; text-align: center; font-size: 12px; }
.neuro-promotion-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 13px;
  border: 1px solid #cfe4f0;
  border-radius: 10px;
  color: #587a94;
  background: #f0f9fd;
}
.neuro-promotion-note > span {
  display: grid;
  place-items: center;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 1px solid #1594cc;
  border-radius: 50%;
  color: #1594cc;
  font-size: 11px;
  font-weight: 800;
}

.neuro-chat-delays-section { margin-top: 16px; background: #fff; }
.neuro-chat-delays-head { align-items: center; flex-flow: row nowrap; margin-bottom: 0; }
.neuro-delay-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #ffb52e, #ed9200);
  box-shadow: 0 7px 16px rgba(237, 146, 0, .22);
  font-size: 23px;
}
.neuro-delay-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.neuro-delay-heading { flex: 1; min-width: 150px; }
.neuro-delay-heading h3 { margin: 0; }
.neuro-delay-presets { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.neurodialogs-workspace .neuro-delay-preset { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; margin: 0; padding: 7px 11px; border: 1px solid #d4e0e8 !important; color: #46657d !important; background: #fff !important; box-shadow: none !important; }
.neurodialogs-workspace .neuro-delay-preset svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.neurodialogs-workspace .neuro-delay-preset.min { border-color: #ead99e !important; color: #b48822 !important; background: #fffdf5 !important; }
.neurodialogs-workspace .neuro-delay-preset.recommended { border-color: #a9ddd1 !important; color: #168069 !important; background: #f7fffc !important; }
.neurodialogs-workspace .neuro-delay-preset.max { border-color: #afd2e3 !important; color: #397d9f !important; background: #f8fcfe !important; }
.neurodialogs-workspace .neuro-delay-preset:hover { filter: brightness(.97); transform: translateY(-1px); }
.neurodialogs-workspace .neuro-delay-preset.active { color: #fff !important; font-weight: 750; box-shadow: 0 0 0 3px rgb(27 58 82 / 16%) !important; }
.neurodialogs-workspace .neuro-delay-preset.active::after { content: "✓"; margin-left: 3px; font-weight: 900; }
.neurodialogs-workspace .neuro-delay-preset.min.active { border-color: #875500 !important; background: #986000 !important; }
.neurodialogs-workspace .neuro-delay-preset.recommended.active { border-color: #075c48 !important; background: #0b735a !important; }
.neurodialogs-workspace .neuro-delay-preset.max.active { border-color: #105378 !important; background: #176694 !important; }
.neurodialogs-workspace .neuro-delay-preset:focus-visible { outline: 3px solid #172f46; outline-offset: 4px; }
.neurodialogs-workspace .neuro-delay-collapse { width: 34px; min-width: 34px; min-height: 34px; margin: 0 0 0 4px; padding: 0; border: 0 !important; color: #8498a9 !important; background: transparent !important; box-shadow: none !important; font-size: 18px; }
.neuro-delay-collapse svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.neuro-delay-collapse.collapsed svg { transform: rotate(180deg); }
.neuro-chat-delays-head, .neuro-chat-delays-body { width: 100%; }
.neuro-chat-delays-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; row-gap: 28px; margin-top: 16px; padding: 8px 0 4px; overflow: visible; }
.neuro-chat-delays-body.hidden { display: none !important; }
.neuro-delay-field { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(190px, 1fr) auto; align-items: center; gap: 18px; min-width: 0; padding: 0; border: 0; background: transparent; }
.neuro-delay-field:has(.neuro-info-button.show-info) { z-index: 60; }
.neuro-delay-label { display: flex; align-items: center; gap: 7px; margin: 0; color: #274963; }
.neuro-delay-info { position: relative; z-index: 2; display: inline-grid; }
.neuro-delay-info.show-info { z-index: 70; }
.neuro-delay-info .neuro-info-tooltip { z-index: 80; top: auto; bottom: calc(100% + 9px); left: 0; transform: none; }
.neuro-delay-info .neuro-info-tooltip::after {
  position: absolute;
  top: 100%;
  left: 8px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-top-color: #344258;
  content: "";
}
.neuro-delay-pair { display: flex; align-items: center; gap: 8px; color: #7790a3; }
.neuro-delay-pair em { color: #8296a6; font-size: 12px; font-style: normal; }
.neuro-delay-single { color: #274963; }
.neuro-delay-number { display: inline-flex; align-items: stretch; min-height: 38px; border: 1px solid #d3e0e8; border-radius: 7px; overflow: hidden; background: #fff; }
.neurodialogs-workspace .neuro-delay-number button { display: grid; place-items: center; width: 34px; min-width: 34px; min-height: 38px; margin: 0; padding: 0; border: 0 !important; border-radius: 0 !important; color: #7d93a5 !important; background: #f7f9fb !important; box-shadow: none !important; font-size: 19px; }
.neurodialogs-workspace .neuro-delay-number button:first-child { border-right: 1px solid #e2e9ee; }
.neurodialogs-workspace .neuro-delay-number button:last-child { border-left: 1px solid #e2e9ee; }
.neurodialogs-workspace .neuro-delay-number button:hover { color: #168fc7 !important; background: #edf7fc !important; }
.neuro-delay-number input { width: 70px; min-height: 38px; padding: 7px 2px; border: 0 !important; border-radius: 0 !important; color: #213f56; background: #fff; box-shadow: none !important; font-weight: 700; text-align: center; appearance: textfield; }
.neuro-delay-number input::-webkit-outer-spin-button, .neuro-delay-number input::-webkit-inner-spin-button { margin: 0; appearance: none; }
.neuro-delay-number em { align-self: center; padding-right: 7px; color: #7890a3; font-size: 12px; font-style: normal; }

.neuro-chat-settings-presets-section { margin-top: 16px; background: #fff; }
.neuro-settings-presets-head { align-items: center; justify-content: flex-start !important; gap: 12px; margin-bottom: 0; }
.neuro-settings-presets-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #12a8df, #087eae);
  box-shadow: 0 7px 16px rgba(8, 126, 174, .22);
}
.neuro-settings-presets-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.neuro-settings-presets-heading { flex: 1; min-width: 0; }
.neuro-settings-presets-heading h3 { margin: 0 0 3px; }
.neuro-settings-presets-heading .hint { margin: 0; }
.neurodialogs-workspace .neuro-settings-presets-toggle { display: grid; place-items: center; width: 34px; min-width: 34px; min-height: 34px; margin: 0 0 0 auto; padding: 0; border: 0 !important; color: #93a3b0 !important; background: transparent !important; box-shadow: none !important; }
.neuro-settings-presets-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.neuro-settings-presets-toggle.expanded svg { transform: rotate(180deg); }
.neuro-settings-presets-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid #edf2f5; }
.neuro-settings-presets-toolbar { display: flex; justify-content: flex-end; }
.neurodialogs-workspace .neuro-settings-preset-save { display: inline-flex; align-items: center; gap: 5px; min-height: 38px; margin: 0; padding: 8px 14px; border-color: #0d91c8; color: #fff; background: #0d91c8; box-shadow: 0 4px 10px rgba(13, 145, 200, .18); }
.neuro-settings-presets-list { display: grid; gap: 8px; margin-top: 12px; }
.neuro-settings-presets-empty { display: grid; min-height: 125px; place-items: center; align-content: center; gap: 8px; color: #9aabb8; text-align: center; }
.neuro-settings-presets-empty svg { width: 30px; height: 30px; fill: none; stroke: #b7c4ce; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.neuro-settings-preset-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; border: 1px solid #dce7ee; border-radius: 9px; background: #fff; }
.neuro-settings-preset-item[role="button"] { cursor: pointer; }
.neuro-settings-preset-item[role="button"]:hover { border-color: #b8d6e4; background: #f8fcfe; }
.neuro-settings-preset-item.active { border-color: #9bd8b7; background: #edf9f2; box-shadow: 0 0 0 2px rgba(50, 180, 110, .08); }
.neuro-settings-preset-item.active:hover { border-color: #82cda4; background: #e8f7ee; }
.neuro-settings-preset-info { display: grid; gap: 3px; min-width: 0; }
.neuro-settings-preset-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.neuro-settings-preset-info strong { overflow: hidden; color: #243e55; text-overflow: ellipsis; white-space: nowrap; }
.neuro-settings-preset-info small { color: #8a9dab; }
.neuro-settings-preset-applied { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; color: #238757; background: #d9f2e4; font-size: 11px; font-weight: 700; }
.neuro-settings-preset-actions { display: flex; gap: 7px; }
.neurodialogs-workspace .neuro-settings-preset-actions button { display: grid; place-items: center; width: 36px; min-width: 36px; min-height: 36px; margin: 0; padding: 0; border: 1px solid #d7e4ec !important; color: #348cad !important; background: #f7fbfd !important; box-shadow: none !important; }
.neurodialogs-workspace .neuro-settings-preset-actions button.danger { border-color: #ffd4d4 !important; color: #ea6b6b !important; background: #fff8f8 !important; }
.neurodialogs-workspace .neuro-settings-preset-actions button.load.active { border-color: #8fd2ad !important; color: #238757 !important; background: #dff5e8 !important; }
.neuro-settings-preset-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.neuro-settings-preset-hint { display: flex; align-items: flex-start; gap: 7px; margin: 0; color: #6f8799; font-size: 12px; line-height: 1.45; }
.neuro-settings-preset-hint > span { display: grid; place-items: center; flex: 0 0 16px; width: 16px; height: 16px; border: 1px solid #83a6bb; border-radius: 50%; color: #62849b; font-size: 10px; font-weight: 800; }

.neuro-chat-special-section { margin-top: 16px; padding: 0 !important; overflow: hidden; background: #fff; }
.neuro-special-head { align-items: center; gap: 12px; margin: 0 !important; padding: 15px 16px; background: #f3f8fb; }
.neuro-special-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 10px; color: #fff; background: linear-gradient(145deg, #657995, #425873); box-shadow: 0 5px 12px rgba(54, 77, 104, .18); }
.neuro-special-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.neuro-special-heading { flex: 1; min-width: 0; }
.neuro-special-heading h3 { margin: 0 0 3px; }
.neuro-special-heading .hint { margin: 0; }
.neuro-special-active-count { flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; color: #26794e; background: #dcf3e6; font-size: 11px; font-weight: 700; }
.neurodialogs-workspace .neuro-special-toggle { display: grid; place-items: center; flex: 0 0 34px; width: 34px; min-width: 34px; min-height: 34px; margin: 0; padding: 0; border: 0 !important; color: #93a3b0 !important; background: transparent !important; box-shadow: none !important; }
.neuro-special-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .18s ease; }
.neuro-special-toggle.expanded svg { transform: rotate(180deg); }
.neuro-special-body { display: grid; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid #e5edf2; background: #f8fbfd; }
.neuro-special-body.hidden { display: none !important; }
.neuro-special-row { overflow: hidden; border: 1px solid #e2e9ee; border-radius: 10px; background: #fff; }
.neuro-special-row-main { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 9px 12px; }
.neuro-special-row-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; color: #188fbd; background: #e9f6fb; font-size: 17px; }
.neurodialogs-workspace .neuro-special-row-title { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; margin: 0; padding: 4px 0; border: 0 !important; color: #28445b !important; background: transparent !important; box-shadow: none !important; text-align: left; font-weight: 700; }
.neuro-special-row-title > span:last-child { color: #9babb7; transition: transform .18s ease; }
.neuro-special-row-title.expanded > span:last-child { transform: rotate(180deg); }
.neuro-special-warning { color: #d39a2a !important; font-size: 16px; }
.neuro-special-help { margin: 0; padding: 0 54px 12px; color: #647d90; font-size: 12px; line-height: 1.48; }
.neuro-special-inline-warning { margin: -3px 54px 11px; color: #a17421; font-size: 11px; }
.neuro-special-number { display: grid; grid-template-columns: 34px 50px 34px; flex: 0 0 auto; overflow: hidden; border: 1px solid #d9e5ec; border-radius: 8px; background: #fff; }
.neurodialogs-workspace .neuro-special-number button { min-width: 34px; min-height: 34px; margin: 0; padding: 0; border: 0 !important; color: #258eb8 !important; background: #f5fafc !important; box-shadow: none !important; font-size: 20px; }
.neuro-special-number input { width: 50px; min-width: 0; padding: 6px 2px; border: 0; border-right: 1px solid #e3ebf0; border-left: 1px solid #e3ebf0; outline: 0; color: #29465d; background: #fff; text-align: center; font-weight: 700; appearance: textfield; }
.neuro-special-number input::-webkit-inner-spin-button { appearance: none; }

.neuro-chat-launch-section,.neuro-chat-history-section,.neuro-chat-blacklist-section{margin-top:16px;padding:0!important;overflow:hidden;background:#fff}
.neuro-chat-operational-head{align-items:center;gap:12px;margin:0!important;padding:15px 16px;background:#f5f9fc}
.neuro-chat-operational-heading{flex:1;min-width:0}.neuro-chat-operational-heading h3{margin:0}.neuro-chat-operational-icon{display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:10px;color:#fff;background:linear-gradient(145deg,#ffac1c,#ed8700);box-shadow:0 5px 12px rgba(230,133,0,.2);font-size:21px}.neuro-chat-operational-icon.history{background:linear-gradient(145deg,#1ca7bd,#087f9e)}.neuro-chat-operational-icon.blacklist{background:linear-gradient(145deg,#f06969,#cf3c49)}
.neuro-chat-launch-body,.neuro-chat-history-body,.neuro-chat-blacklist-body{padding:16px;border-top:1px solid #e4edf3}.neuro-chat-launch-body.hidden,.neuro-chat-history-body.hidden,.neuro-chat-blacklist-body.hidden,.neuro-chat-schedule.hidden,.neuro-chat-launch-log.hidden,.neuro-chat-launch-visual.hidden,.neuro-chat-blacklist-add-panel.hidden,#neuroChatBlacklistFile.hidden{display:none!important}
.neuro-chat-launch-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.neuro-chat-launch-summary>div{display:grid;gap:4px;padding:13px 15px;border:1px solid #dce8ef;border-radius:10px;background:#f8fbfd}.neuro-chat-launch-summary small{color:#7890a2;font-size:11px;font-weight:700}.neuro-chat-launch-summary strong{color:#193a53;font-size:22px}
.neuro-chat-launch-problems{margin-top:12px;padding:12px 14px;border:1px solid #ffcaca;border-radius:10px;color:#a93d45;background:#fff4f4}.neuro-chat-launch-problems strong{display:block;margin-bottom:6px}.neuro-chat-launch-problems ul{margin:0;padding-left:20px}
.neuro-chat-launch-controls{display:flex;align-items:center;gap:9px;margin-top:12px}.neuro-chat-launch-status{margin-right:auto;padding:7px 11px;border-radius:999px;color:#7a8893;background:#eef3f6;font-size:12px;font-weight:700}.neuro-chat-launch-status.ready{color:#21764b;background:#ddf4e7}.neurodialogs-workspace .neuro-chat-launch-start{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:150px;min-height:42px;margin:0;border-color:#1593c5;color:#087eac;background:#fff;box-shadow:none}.neurodialogs-workspace .neuro-chat-launch-start span{font-size:18px;line-height:1}.neurodialogs-workspace .neuro-chat-launch-start:hover:not(:disabled){background:#eef9fd}.neurodialogs-workspace .neuro-chat-launch-start:disabled{border-color:#d8e0e5;color:#9aa8b2;background:#fff;box-shadow:none}.neurodialogs-workspace .neuro-chat-square-button{display:grid;place-items:center;width:42px;min-width:42px;min-height:42px;margin:0;padding:0;border-color:#d7e4ec;color:#338aab;background:#fff}
.neuro-chat-schedule{display:grid;grid-template-columns:auto minmax(210px,280px) minmax(0,1fr);align-items:center;gap:10px;margin-top:10px;padding:11px 13px;border:1px solid #d7e7ef;border-radius:10px;background:#f3f9fc}.neuro-chat-schedule input{min-height:38px}.neuro-chat-schedule span{color:#6d8495;font-size:12px}.neurodialogs-workspace .neuro-chat-cancel-stuck{margin:10px 0 0;padding:8px 11px;border-color:#ffd0d0;color:#c94f59;background:#fff7f7;box-shadow:none}
.neuro-chat-launch-tabs{display:flex;align-items:center;gap:6px;margin-top:14px;padding-top:12px;border-top:1px solid #e5edf2}.neuro-chat-launch-tabs>span{flex:1}.neurodialogs-workspace .neuro-chat-launch-tabs button{min-height:36px;margin:0;padding:7px 12px;border-color:#d8e4eb;color:#607d91;background:#fff;box-shadow:none}.neurodialogs-workspace .neuro-chat-launch-tabs button.active{border-color:#96cfe4;color:#0a83b3;background:#eaf7fc}.neurodialogs-workspace .neuro-chat-launch-tabs button.icon{width:36px;min-width:36px;padding:0}
.neuro-chat-launch-visual{margin-top:10px}.neuro-chat-launch-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.neuro-chat-launch-preview>div{display:grid;gap:3px;padding:11px;border:1px solid #dfe9ef;border-radius:9px;background:#fff}.neuro-chat-launch-preview small,.neuro-chat-launch-preview span{color:#7b91a1;font-size:11px}.neuro-chat-launch-preview.compact{display:block}.neuro-chat-launch-preview.compact>div{grid-template-columns:80px minmax(0,1fr) auto;align-items:center;border-radius:0;border-width:0 0 1px}
.neuro-chat-launch-log {
  box-sizing: border-box;
  width: 100%;
  height: clamp(260px, 50vh, 420px);
  min-height: 220px;
  max-height: none;
  margin-top: 10px;
  padding: 14px;
  overflow: auto;
  overflow-wrap: anywhere;
  resize: vertical;
  scrollbar-gutter: stable;
  border: 1px solid #40586c;
  border-radius: 8px;
  color: #e2eef5;
  background: #203243;
  font: 14px/1.6 Consolas, monospace;
}
.neuro-chat-launch-log:focus-visible { outline: 2px solid #1593c5; outline-offset: 2px; }
.neuro-chat-client-history { margin-top: 16px; padding-top: 12px; border-top: 1px solid #63758a; color: #ccd9e5; }
.neuro-chat-client-history > summary { cursor: pointer; padding: 6px 0; }
.neuro-chat-client-history > p { color: #ccd9e5; font-size: 13px; line-height: 1.6; }
.neuro-chat-client-history > div { margin: 9px 0; }
.neuro-chat-launch-metrics.hidden { display: none !important; }
.neuro-chat-launch-metrics { min-width: 0; padding-top: 8px; }
.neuro-chat-launch-tabs { flex-wrap: wrap; }
.neurodialogs-workspace .neuro-chat-launch-tabs [data-neuro-chat-launch-tab] { color: #28506d; background: #fff; border: 1px solid #b9d0e2; }
.neurodialogs-workspace .neuro-chat-launch-tabs [data-neuro-chat-launch-tab].active { color: #fff; background: #146dc1; border-color: #146dc1; box-shadow: 0 0 0 2px #dcecff; }
#neuroChatMetricsSummary { padding: 12px 14px; margin: 10px 0; border: 1px solid #d3e4f1; border-radius: 8px; color: #244861; background: #f0f7fd; line-height: 1.7; }
#neuroChatMetricsList { max-width: 100%; overflow-x: auto; }
.neuro-chat-metrics-table { width: 100%; min-width: 780px; border-collapse: collapse; table-layout: fixed; color: #203c54; font-size: 14px; }
.neuro-chat-metrics-table caption { padding: 12px 8px; text-align: left; font-weight: 600; }
.neuro-chat-metrics-table th, .neuro-chat-metrics-table td { padding: 12px 10px; border: 1px solid #dce7ef; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.neuro-chat-metrics-table th { color: #234c6c; background: #edf4fa; }
.neuro-chat-metrics-table th:first-child { width: 30px; }
.neuro-chat-metrics-table th:nth-child(3) { width: 65px; }
.neuro-chat-metrics-table th:last-child { width: 150px; }
.neuro-chat-metrics-table tr:nth-child(even) { background: #f9fbfd; }
.neuro-chat-metric-kind, .neuro-chat-metric-result { display: inline-block; padding: 4px 7px; border-radius: 6px; line-height: 1.4; background: #e8eff5; }
.neuro-chat-metric-result.success { color: #17613b; background: #e2f4e8; }
.neuro-chat-metric-result.error { color: #942f34; background: #fff0f0; }
.neuro-chat-metric-time strong { font-size: 16px; white-space: nowrap; }
.neuro-chat-metric-time small { display: block; margin-top: 5px; color: #62778b; }
.neuro-chat-metrics-table summary { cursor: pointer; color: #1463a8; }
.neuro-chat-metrics-table dl { margin: 10px 0 0; font-size: 12px; }
.neuro-chat-metrics-table dl div { padding: 5px 0; border-bottom: 1px solid #dce7ef; }
.neuro-chat-metrics-table dt, .neuro-chat-metrics-table dd { margin: 0; }
.neuro-chat-metrics-table dd { font-weight: 600; }
.neuro-chat-launch-log > div + div { margin-top: 7px; }
.neuro-chat-log-resize-hint { margin: 7px 0 0; color: #607d91; font-size: 12px; text-align: right; }
.neuro-chat-log-shell { position: relative; }
.neuro-chat-log-shell.hidden, .neuro-chat-log-shell.hidden + .neuro-chat-log-resize-hint { display: none; }
.neuro-chat-log-shell .neuro-chat-launch-log { resize: none; padding-bottom: 48px; }
.neurodialogs-workspace .neuro-chat-log-resize { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 40px; min-width: 40px; height: 40px; min-height: 40px; margin: 0; padding: 0; border: 1px solid #8bb9cf; border-radius: 8px 0 8px 0; background: #366079; color: #fff; box-shadow: none; font-size: 26px; cursor: ns-resize; touch-action: none; user-select: none; }
.neurodialogs-workspace .neuro-chat-log-resize:hover, .neurodialogs-workspace .neuro-chat-log-resize:focus-visible { background: #187ba3; outline: 2px solid #8edbfc; outline-offset: 2px; }
.neuro-chat-log-sync { color: #a9d9ea; margin-bottom: 12px; }
.neuro-chat-log-sync.warning { color: #ffd391; }
.neuro-chat-log-live { padding: 12px; margin-bottom: 14px; border: 1px solid #526b7f; border-radius: 6px; background: #293f52; }
.neuro-chat-log-live > div, .neuro-chat-log-events > div { margin-top: 8px; }
.neuro-chat-history-badge{padding:5px 9px;border-radius:999px;color:#177f98;background:#ddf4f8;font-size:11px;font-weight:700}.neurodialogs-workspace .neuro-chat-history-open{min-height:38px;margin:0;padding:8px 12px;border-color:#9bd6e2;color:#15839d;background:#eef9fb;box-shadow:none}.neuro-chat-history-list{display:grid;gap:12px}.neuro-chat-history-list>.neuro-chat-history-card{display:flex;flex-direction:column;gap:10px;min-width:0;padding:16px;border:1px solid #d6e5ee;border-radius:12px;background:#f8fbfe}.neuro-chat-history-list small{color:#617487}.neuro-chat-history-card>header{display:flex;flex-wrap:wrap;gap:8px 20px;font-size:13px;overflow-wrap:anywhere}.neuro-chat-history-card time{margin-left:auto;color:#52677b}.neuro-chat-history-state{font-size:12px;color:#52677b}.neuro-chat-history-card>.neuro-chat-history-text{margin:0!important;padding:12px!important;background:#fff;border-radius:8px;color:#17334d;font-size:15px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.neuro-chat-history-controls{display:flex;align-items:center;flex-wrap:wrap;gap:12px;margin:12px 0}.neuro-chat-history-controls label{display:flex;align-items:center;gap:8px;min-width:0}.neuro-chat-history-controls select{max-width:min(460px,65vw);min-width:0}.neuro-chat-history-controls button{width:auto!important;margin:0!important}
.neuro-chat-blacklist-addbox{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:14px 16px;border:1px dashed #bacbd7;border-radius:10px;color:#597185;background:#fbfdfe}.neurodialogs-workspace .neuro-chat-blacklist-addbox>button{margin:0;border-color:#ef9aa1;color:#c64d58;background:#fff}.neuro-chat-blacklist-add-panel{display:grid;grid-column:1/-1;grid-template-columns:minmax(220px,2fr) minmax(160px,1fr) minmax(180px,1fr) auto;gap:8px;padding-top:10px;border-top:1px solid #e6edf2}.neuro-chat-blacklist-add-panel textarea{min-height:72px}.neuro-chat-blacklist-add-panel select,.neuro-chat-blacklist-add-panel input{min-height:42px}.neurodialogs-workspace .neuro-chat-blacklist-add-panel button{min-height:42px;margin:0;color:#fff;background:#cf4d58}
.neuro-chat-blacklist-summary{margin-top:12px;padding:14px;border:1px solid #e1e9ee;border-radius:10px}.neuro-chat-blacklist-summary-title{display:flex;align-items:center;gap:9px}.neuro-chat-blacklist-summary-title .neuro-chat-operational-icon{width:30px;height:30px;flex-basis:30px;border-radius:7px;font-size:15px}.neuro-chat-blacklist-summary-title>span:last-child{margin-left:auto;padding:3px 8px;border-radius:999px;color:#b4434c;background:#fde6e8;font-weight:700}.neuro-chat-blacklist-toolbar{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px}.neurodialogs-workspace .neuro-chat-blacklist-toolbar button{min-height:36px;margin:0;padding:7px 10px;border-color:#dbe6ec;color:#4d7188;background:#f9fcfd;box-shadow:none}.neurodialogs-workspace .neuro-chat-blacklist-toolbar .danger-link{margin-left:auto;border-color:#ffd1d4;color:#c94f59;background:#fff8f8}.neuro-chat-blacklist-groups{display:grid;gap:9px;margin-top:12px}.neuro-chat-blacklist-groups>section{padding:11px;border:1px solid #e4ebef;border-radius:9px;background:#fbfdfe}.neuro-chat-blacklist-groups header{display:flex;align-items:center;gap:7px}.neuro-chat-blacklist-groups header>span{padding:2px 7px;border-radius:999px;background:#edf3f6;font-size:11px}.neurodialogs-workspace .neuro-chat-blacklist-groups header button{margin-left:auto;min-width:30px;min-height:30px;padding:0;border:0;color:#c4525c;background:transparent;box-shadow:none}.neuro-chat-blacklist-groups section>div{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.neuro-chat-blacklist-chip{display:inline-flex;align-items:center;gap:6px;padding:6px 7px 6px 10px;border:1px solid #ead3d6;border-radius:999px;color:#7b3f47;background:#fff7f8}.neuro-chat-blacklist-chip small{color:#9a7379}.neurodialogs-workspace .neuro-chat-blacklist-chip button{min-width:22px;min-height:22px;margin:0;padding:0;border:0;color:#bd4d57;background:transparent;box-shadow:none}.neuro-chat-blacklist-empty{margin:0;color:#899ba8;text-align:center}
.neuro-chat-blacklist-category-clear{position:relative}.neuro-chat-blacklist-category-clear::after{position:absolute;right:-3px;bottom:calc(100% + 8px);z-index:20;width:max-content;padding:7px 10px;border-radius:7px;color:#fff;background:#344257;box-shadow:0 5px 14px rgba(30,45,60,.2);content:attr(data-tooltip);font-size:11px;font-weight:600;opacity:0;pointer-events:none;transform:translateY(3px);transition:opacity .15s ease,transform .15s ease}.neuro-chat-blacklist-category-clear:hover::after,.neuro-chat-blacklist-category-clear:focus-visible::after{opacity:1;transform:translateY(0)}
#neuroTargetMessage.neuro-target-message-error,#neuroTargetMessage.neuro-target-message-success{margin:10px 0 0;padding:9px 11px;border-radius:8px;font-weight:600}#neuroTargetMessage.neuro-target-message-error{border:1px solid #ffcaca;color:#a93d45;background:#fff4f4}#neuroTargetMessage.neuro-target-message-success{border:1px solid #a9ddbf;color:#28764e;background:#edf9f2}
@media(max-width:900px){.neuro-chat-launch-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.neuro-chat-launch-preview{grid-template-columns:1fr 1fr}.neuro-chat-schedule{grid-template-columns:1fr}.neuro-chat-blacklist-add-panel{grid-template-columns:1fr 1fr}}
@media(max-width:720px){.neuro-special-row-main{align-items:flex-start;flex-wrap:wrap}.neuro-special-row-title{min-width:calc(100% - 46px)}.neuro-special-row-main>.neuro-switch,.neuro-special-row-main>.neuro-special-number{margin-left:42px}.neuro-special-help{padding-left:54px}.neuro-special-inline-warning{margin-left:54px}}

@media(max-width:900px) {
  .neuro-chat-delays-head { flex-wrap: wrap; }
  .neuro-delay-presets { order: 4; width: 100%; margin: 10px 0 0; }
  .neuro-chat-delays-body { grid-template-columns: 1fr; }
}

@media(max-width:560px) {
  .neuro-chat-mode-grid { grid-template-columns: 1fr; }
  .neuro-reaction-tabs { display: grid; width: 100%; }
  .neurodialogs-workspace .neuro-reaction-tabs button { min-width: 0; }
  .neuro-trigger-entry { grid-template-columns: 1fr; }
  .neuro-trigger-actions { justify-content: flex-end; }
  .neuro-trigger-preset-actions { grid-template-columns: 1fr; }
  .neuro-target-tabs { display: grid; grid-template-columns: 1fr; }
  .neuro-target-manual-row { grid-template-columns: 1fr; }
  .neurodialogs-workspace #neuroTargetAddManual { min-height: 44px; }
  .neuro-target-history-list { grid-template-columns: 1fr; }
  .neuro-chat-secondary-grid { grid-template-columns: 1fr; }
  .neuro-chat-secondary-grid > .neuro-section { min-height: 0; }
  .neuro-chat-work-hours-section > .neuro-section-head { flex-direction: column; }
  .neuro-chat-work-hours-toggle { margin-left: 0; }
  .neuro-auto-reply-tabs { grid-template-columns: 1fr; }
  .neuro-promotion-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .neuro-delay-field { grid-template-columns: 1fr; }
  .neuro-delay-presets { display: grid; grid-template-columns: 1fr; }
  .neuro-delay-pair { flex-wrap: wrap; }
  .neuro-chat-launch-summary,.neuro-chat-launch-preview,.neuro-chat-blacklist-add-panel{grid-template-columns:1fr}
  .neuro-chat-operational-head{flex-wrap:wrap}.neuro-chat-operational-heading{min-width:calc(100% - 110px)}.neuro-chat-history-open{order:5;width:100%}
  .neuro-chat-launch-controls{flex-wrap:wrap}.neuro-chat-launch-status{width:100%}.neuro-chat-launch-start{flex:1}
  .neuro-chat-blacklist-toolbar .danger-link{margin-left:0!important}
}
/* Manual bot keyboards: never mixed with automatic replies. */
.neuro-bot-controls, .neuro-bot-button-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0; }
.neuro-bot-controls { padding: 10px 14px; border-top: 1px solid #c9def2; }
.neuro-bot-keyboard { margin-top: 8px; }
.neuro-bot-controls button, .neuro-bot-button-row button {
  min-height: 36px; padding: 7px 12px; border: 1px solid #9cc7ec;
  border-radius: 8px; background: #eaf5ff; color: #15558a; font: inherit;
  cursor: pointer; overflow-wrap: anywhere;
}
.neuro-bot-controls button:disabled, .neuro-bot-button-row button:disabled {
  background: #f0f3f6; color: #788897; border-color: #d8e0e7; cursor: not-allowed;
}
.neuro-bot-controls button:focus-visible, .neuro-bot-button-row button:focus-visible {
  outline: 3px solid #1877cf; outline-offset: 2px;
}
.neuro-bot-button-row button { flex: 1; min-width: 90px; white-space: normal; }
.neuro-bubble a { color: #075fbb; text-decoration: underline; overflow-wrap: anywhere; }
[data-neuro-bot-notice] { padding: 8px 14px; white-space: pre-wrap; }

#neuroChatCapacityPanel { display: none; margin-bottom: 16px; }
body.neurochatting-reaction-preview #neuroChatCapacityPanel { display: block; }
body.neurodialogs-active :is(#neurodialogsWorkspace,#genericModuleWorkspace) #neuroChatCapacityPanel input { width: 110px; max-width: 100%; margin: 8px 0; }
#neuroChatCapacityPanel > summary { color: var(--nd-text); font-size: 14px; font-weight: 700; line-height: 1.5; }
#neuroChatCapacityPanel[open] > summary { margin-bottom: 10px; }
#neuroChatCapacityPanel > summary:focus-visible { outline: 2px solid #0878d1; outline-offset: 4px; border-radius: 3px; }
#neuroChatCapacityPanel details { padding: 10px 0; }
#neuroChatCapacityPanel summary { cursor: pointer; font-weight: 600; }
#neuroChatCapacityPanel .neuro-inline { flex-wrap: wrap; }
#neuroChatCapacityPanel label { white-space: normal; }

#neuroChatReplyForecast { padding: 14px; margin: 12px 0; background: #edf6ff; border: 1px solid #a9ccec; border-radius: 9px; line-height: 1.65; overflow-wrap: anywhere; }

/* Launch control room: state first, one primary action, secondary tools disclosed. */
#neuroChatLaunchSection { border: 1px solid #a9d2e5; border-radius: 14px; }
#neuroChatLaunchSection .neuro-chat-operational-head { background: #fff; padding: 18px 20px; }
#neuroChatLaunchSubtitle { margin: 4px 0 0; font-size: 13px; color: #6a7e90; }
#neuroChatLaunchSection .neuro-step { color: #c66b1e; background: #fff1e5; border-color: #ffe0c7; }
#neuroChatLaunchBody { padding: 0 20px 20px; border: 0; }
#neuroChatLaunchSection .hidden { display: none !important; }
#neuroChatLaunchSection .neuro-chat-launch-live { padding: 5px 9px; border-radius: 6px; color: #16784d; background: #e6f7ed; font-size: 12px; font-weight: 700; white-space: nowrap; }
#neuroChatLaunchSection .neuro-chat-launch-summary { gap: 12px; }
#neuroChatLaunchSection .neuro-chat-launch-summary > div { background: #fff; border-color: #dfe6ee; border-radius: 9px; padding: 14px 16px; }
#neuroChatLaunchSection .neuro-chat-launch-summary small { color: #61788a; font-size: 12px; letter-spacing: .04em; }
#neuroChatLaunchSection .neuro-chat-launch-summary strong { font-size: 24px; font-variant-numeric: tabular-nums; color: #152e43; }
#neuroChatLaunchScope { margin: 10px 0 16px; color: #647c8f; font-size: 12px; line-height: 1.5; }
#neuroChatLaunchSection .neuro-chat-launch-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 18px; padding: 18px; margin: 0; border: 1px solid #dce6ef; border-radius: 10px; background: #fbfdff; }
.neuro-chat-launch-state { display: grid; justify-items: start; gap: 7px; min-width: 0; }
#neuroChatLaunchStatus { width: auto; margin: 0; max-width: 100%; padding: 9px 12px; font-size: 14px; line-height: 1.4; font-weight: 500; color: #667485; background: #edf1f6; }
#neuroChatLaunchStatus.ready { color: #157549; background: #e3f5eb; }
#neuroChatLaunchStatus.warning { color: #896006; background: #fff3d6; }
#neuroChatLaunchStatus.error { color: #ac2b38; background: #ffe9eb; }
#neuroChatLaunchConnection { color: #6d8191; font-size: 12px; padding-left: 4px; }
.neuro-chat-launch-primary { display: flex; justify-content: center; }
#neuroChatLaunchStart, #neuroChatLaunchStop { display: inline-flex; align-items: center; justify-content: center; gap: 11px; width: 242px; min-width: 210px; min-height: 58px; padding: 14px 24px; margin: 0; border: 1px solid #078bcc !important; border-radius: 12px; background: #079cdc !important; color: #fff !important; box-shadow: 0 5px 13px #0391d32b !important; font-size: 19px; font-weight: 650; line-height: 1.3; }
#neuroChatLaunchStart span, #neuroChatLaunchStop span { font-size: inherit; line-height: inherit; }
#neuroChatLaunchSection #neuroChatLaunchStart, #neuroChatLaunchSection #neuroChatLaunchStop { min-height: 58px !important; padding: 14px 24px !important; font-size: 19px !important; border-radius: 12px !important; }
#neuroChatLaunchSection #neuroChatLaunchStart span, #neuroChatLaunchSection #neuroChatLaunchStop span { font-size: 19px !important; }
#neuroChatLaunchStart:hover:not(:disabled) { background: #0789c4 !important; }
#neuroChatLaunchStop { border-color: #d82b37 !important; background: #eb3541 !important; box-shadow: 0 5px 13px #d8354121 !important; }
#neuroChatLaunchStop:hover:not(:disabled) { background: #d62835 !important; }
#neuroChatLaunchStart:disabled, #neuroChatLaunchStop:disabled { background: #e7edf2 !important; color: #748491 !important; border-color: #d6e0e7 !important; box-shadow: none !important; cursor: not-allowed; }
#neuroChatLaunchStart svg, #neuroChatLaunchStop svg, #neuroChatScheduleToggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.neuro-chat-launch-schedule-action { justify-self: start; }
#neuroChatScheduleToggle { height: 50px; width: 50px; border: 1px solid #dbe4ec !important; border-radius: 11px; color: #718094 !important; background: #fff !important; box-shadow: none !important; }
#neuroChatScheduleToggle[aria-expanded="true"] { border-color: #8dcce6 !important; background: #ecf8fe !important; }
#neuroChatSchedulePanel { display: grid; grid-template-columns: minmax(0,1fr) minmax(250px,1fr); gap: 12px 24px; margin: 8px 0 0; padding: 18px; border: 1px solid #b6dcf0; border-radius: 10px; background: #f1f9ff; box-shadow: 0 3px 9px #17699709; }
#neuroChatSchedulePanel .neuro-chat-schedule-heading { display: grid; align-content: center; gap: 5px; }
#neuroChatSchedulePanel strong { color: #1c546f; font-size: 16px; }
#neuroChatSchedulePanel small { color: #617c90; font-size: 13px; }
#neuroChatSchedulePanel label { display: grid; gap: 7px; min-width: 0; color: #385a71; font-size: 14px; }
#neuroChatScheduleAt { width: 100%; box-sizing: border-box; min-width: 0; min-height: 46px; margin: 0; padding: 10px 12px; border: 1px solid #a8cde3; border-radius: 8px; color: #20455e; background: #fff; font-size: 16px; color-scheme: light; }
#neuroChatScheduleAt:focus-visible { outline: 2px solid #129bcf; outline-offset: 2px; }
#neuroChatSchedulePanel > p { grid-column: 1 / -1; margin: 0; color: #58768d; font-size: 13px; line-height: 1.5; }
#neuroChatLaunchSection .neuro-chat-launch-progress { margin-top: 14px; padding: 16px; border: 1px solid #d4eafa; border-radius: 10px; background: #f5fbff; }
.neuro-chat-progress-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: #176c9b; font-size: 15px; }
#neuroChatLaunchProgressValue { color: #15374f; font-variant-numeric: tabular-nums; font-size: 17px; white-space: nowrap; }
.neuro-chat-progress-track { height: 12px; margin-top: 12px; border-radius: 5px; background: #e2ebf3; overflow: hidden; }
.neuro-chat-progress-track > span { display: block; height: 100%; width: 0; border-radius: inherit; background: #0b9ed7; transition: width .2s ease; }
#neuroChatLaunchProgressHint { margin: 9px 0 0; font-size: 12px; color: #617e91; }
#neuroChatLaunchProgress.stale .neuro-chat-progress-track > span { background: #8c9aa8; }
#neuroChatLaunchSection .neuro-chat-launch-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0; }
#neuroChatSaveSettings, #neuroChatForecastRefresh, #neuroChatLaunchSection .neuro-chat-launch-tools button { margin: 0; min-height: 36px; padding: 7px 12px; border: 1px solid #d7e3ed !important; border-radius: 7px; background: #fff !important; color: #47657c !important; font-size: 14px; box-shadow: none !important; }
.neuro-chat-launch-secondary > span { color: #7d8e9d; font-size: 12px; }
#neuroChatLaunchSection .neuro-chat-launch-options { border-top: 1px solid #edf1f5; color: #405f76; font-size: 14px; }
#neuroChatLaunchSection .neuro-chat-launch-options > summary { padding: 12px 0; cursor: pointer; }
#neuroChatLaunchSection .neuro-chat-launch-options > summary:hover { color: #098fc3; }
#neuroChatLaunchSection .neuro-chat-launch-options .neuro-check { margin: 14px 0; }
#neuroChatLaunchSection .neuro-chat-launch-tools { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 14px; }
#neuroChatLaunchSection .neuro-chat-launch-tabs { margin-top: 4px; gap: 4px; padding-top: 14px; }
#neuroChatLaunchSection .neuro-chat-launch-tabs [role="tab"] { border: 1px solid transparent; border-radius: 7px; background: #f1f4f7; color: #5d7182; font-size: 14px; min-height: 40px; padding: 8px 14px; box-shadow: none; }
#neuroChatLaunchSection .neuro-chat-launch-tabs [role="tab"].active { border-color: #bcdcec; color: #096da0; background: #eaf6fd; box-shadow: inset 0 -2px #139ace; font-weight: 650; }
#neuroChatLaunchSection .neuro-chat-launch-tabs [data-neuro-chat-launch-view] { color: #7b8fa0 !important; background: #f5f7fa !important; border-color: #e3e9ef !important; box-shadow: none !important; }
#neuroChatLaunchSection .neuro-chat-launch-tabs [data-neuro-chat-launch-view].active { color: #097cab !important; background: #e8f4fb !important; border-color: #b9dcea !important; }
#neuroChatLaunchSection .neuro-chat-launch-tabs [role="tab"]:focus-visible, #neuroChatLaunchSection button:focus-visible, #neuroChatLaunchSection summary:focus-visible { outline: 2px solid #088dcb; outline-offset: 3px; }
@media(max-width:700px) {
  #neuroChatSchedulePanel { grid-template-columns: minmax(0,1fr); padding: 14px; gap: 12px; }
  #neuroChatLaunchBody { padding: 0 12px 14px; }
  #neuroChatLaunchSection .neuro-chat-operational-head { padding: 14px 12px; gap: 8px; }
  #neuroChatLaunchSubtitle { font-size: 12px; }
  #neuroChatLaunchSection .neuro-chat-launch-summary { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  #neuroChatLaunchSection .neuro-chat-launch-summary > div { padding: 12px; }
  #neuroChatLaunchSection .neuro-chat-launch-controls { grid-template-columns: minmax(0,1fr) auto; gap: 14px 10px; padding: 14px; }
  .neuro-chat-launch-state { grid-column: 1 / -1; }
  #neuroChatLaunchStart, #neuroChatLaunchStop { width: 100%; min-width: 0; font-size: 17px; padding: 13px 16px; }
  .neuro-chat-launch-primary { min-width: 0; }
  #neuroChatLaunchSection .neuro-chat-launch-live { font-size: 11px; }
  #neuroChatLaunchSection .neuro-chat-launch-tabs [role="tab"] { padding: 8px 9px; }
  .neuro-chat-progress-heading { font-size: 14px; }
}
@media(prefers-reduced-motion:reduce) { .neuro-chat-progress-track > span { transition: none; } }
#neuroChatLaunchErrors { max-height: 480px; overflow: auto; padding: 12px; }

/* Unified group plan: existing controls and storage, compact account cards. */
#neuroGroupPlan { background:#fff; border:1px solid #cfe2f4; border-radius:14px; padding:18px; margin:16px 0; color:#193d5c; min-width:0; }
#neuroGroupPlan [hidden] { display:none!important; }
#neuroGroupPlan .neuro-group-plan-head { display:flex; align-items:center; gap:12px; padding-bottom:14px; border-bottom:1px dashed #cfe2f4; }
#neuroGroupPlan .neuro-group-plan-head>span { background:#087ecc; color:#fff; border-radius:9px; padding:9px; font-weight:700; white-space:nowrap; flex-shrink:0; }
#neuroChatModeGrid>#neuroReactionSection:only-child { grid-column:1 / -1; }
#neuroGroupPlan .neuro-group-plan-head h3 { margin:0; font-size:21px; }
#neuroGroupPlan>.neuro-section { border:0; border-radius:0; box-shadow:none; background:transparent; padding:16px 0; margin:0; min-width:0; }
#neuroGroupPlan>.neuro-section + .neuro-section { border-top:1px solid #dce9f4; }
#neuroGroupPlan .neuro-target-icon, #neuroGroupPlan .neuro-chat-assignment-summary, #neuroGroupPlan #neuroChatAssignmentToggle, #neuroGroupPlan .neuro-chat-assignment-lock { display:none!important; }
#neuroGroupPlan #neuroChatAssignmentSection .neuro-chat-assignment-head { display:flex; flex-direction:column; align-items:stretch; gap:10px; }
#neuroGroupPlan .neuro-chat-assignment-actions { display:flex; flex-wrap:wrap; gap:7px; justify-content:flex-start; }
#neuroGroupPlan .neuro-chat-assignment-actions button { background:#fff; color:#24516f; border:1px solid #c8ddf0; border-radius:7px; padding:8px 12px; }
#neuroGroupPlan #neuroChatAssignmentRecalculate { background:#147bd1; color:#fff; border-color:#147bd1; order:-2; }
#neuroGroupPlan [data-neuro-assignment-action="shuffle"] { order:-1; }
#neuroGroupPlan [data-neuro-assignment-action="rotate"] { order:0; }
#neuroGroupPlan #neuroChatAssignmentAll { order:1; }
#neuroGroupPlan #neuroChatAssignmentAll[aria-pressed="true"] { background:#e9f4ff; border-color:#147bd1; color:#14528b; }
#neuroGroupPlan .neuro-chat-assignment-more-wrap { order:2; }
#neuroGroupPlan .neuro-chat-assignment-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--neuro-card-min,200px)),1fr)); gap:8px; align-items:start; }
#neuroGroupPlan .neuro-chat-assignment-card { min-width:0; background:#eef7ff; border:1px solid #cbdff2; border-radius:8px; padding:8px; }
#neuroGroupPlan .neuro-chat-assignment-card header { display:flex; align-items:flex-start; gap:6px; padding:0 0 6px; }
#neuroGroupPlan .neuro-group-card-identity { display:grid; gap:2px; min-width:0; width:100%; }
#neuroGroupPlan .neuro-group-card-identity strong { font-size:13px; line-height:18px; }
#neuroGroupPlan .neuro-group-card-identity span { font-size:12px; line-height:16px; color:#617e96; }
#neuroGroupPlan .neuro-group-card-identity>* { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#neuroGroupPlan .neuro-chat-assignment-card-body { display:block; padding:0; margin:0; border:0; }
#neuroGroupPlan .neuro-chat-assignment-card-body textarea { display:block; width:100%; height:80px; min-height:80px; max-height:400px; padding:5px 7px; margin:0; resize:vertical; overflow:auto; background:#fff; color:#193d5c; font-size:13px; line-height:17px; box-sizing:border-box; }
#neuroGroupPlan .neuro-chat-assignment-card-body label { display:block; font-size:12px; color:#2673a3; }
#neuroGroupPlan .neuro-chat-assignment-card-body p { font-size:12px; }
#neuroGroupPlan .neuro-group-density { display:flex; align-items:center; justify-content:flex-end; gap:4px; margin:8px 0; font-size:12px; }
#neuroGroupPlan .neuro-group-density button { padding:4px 9px!important; min-height:28px!important; font-size:12px!important; background:#fff!important; color:#45677e!important; border:1px solid #cbdff2!important; border-radius:6px; box-shadow:none!important; }
#neuroGroupPlan .neuro-group-density button[aria-pressed="true"] { background:#147bd1!important; border-color:#147bd1!important; color:#fff!important; }
#neuroGroupPlan .neuro-group-card-footer { display:flex; align-items:center; justify-content:space-between; gap:4px; margin-top:5px; font-size:11px; color:#617e96; }
#neuroGroupPlan .neuro-group-card-footer>span { white-space:nowrap; }
#neuroGroupPlan .neuro-group-card-footer button { min-width:0; min-height:24px!important; padding:2px 3px!important; font-size:11px!important; line-height:18px!important; background:transparent!important; border:0!important; color:#2673a3!important; box-shadow:none!important; white-space:nowrap; }
#neuroGroupPlan .neuro-group-card-footer button:hover { background:#dfeffc!important; }
#neuroGroupPlan .neuro-group-card-settings { margin-top:6px; border-top:1px dashed #cbdff2; padding-top:6px; }
#neuroGroupPlan .neuro-group-card-settings input { width:100%; min-width:0; padding:4px; font-size:12px; box-sizing:border-box; }
#neuroGroupPlan .neuro-group-grid-note { font-size:12px; margin:8px 0 0; }
#neuroGroupPlan #neuroChatAssignmentRecalculate { display:none!important; }
#neuroGroupPlan .neuro-chat-assignment-actions > button { background:#f5f9fc!important; color:#34546e!important; border:1px solid #cbdff2!important; box-shadow:none!important; }
#neuroGroupPlan .neuro-chat-assignment-actions > button:hover:not(:disabled) { background:#e3eff9!important; }
#neuroGroupPlan .neuro-chat-assignment-actions > button:disabled { opacity:.45; cursor:not-allowed; }
#neuroGroupPlan .neuro-card-target-box { position:relative; height:114px; min-height:80px; max-height:800px; background:white; border:1px solid #cbdff2; border-radius:6px; box-sizing:border-box; }
#neuroGroupPlan .neuro-card-target-content { height:100%; box-sizing:border-box; overflow:auto; padding:4px 4px 22px; }
#neuroGroupPlan .neuro-card-target-row { display:flex; align-items:center; min-height:25px; gap:3px; }
#neuroGroupPlan .neuro-card-target-row > span { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
#neuroGroupPlan .neuro-card-target-row button { flex:0 0 24px; width:24px!important; min-height:24px!important; padding:0!important; margin:0!important; background:transparent!important; color:#7b5460!important; border:0!important; box-shadow:none!important; }
#neuroGroupPlan .neuro-card-tools { display:flex; flex-wrap:wrap; gap:4px; padding-top:5px; }
#neuroGroupPlan .neuro-card-tools button,#neuroGroupPlan .neuro-card-notice button { width:auto!important; min-height:26px!important; margin:0!important; padding:3px 5px!important; font-size:11px!important; background:#f7fbff!important; color:#34546e!important; border:1px solid #cbdff2!important; box-shadow:none!important; }
#neuroGroupPlan .neuro-card-notice { padding:5px 0; font-size:12px; color:#34546e; }
#neuroGroupPlan .neuro-card-target-box textarea { height:100%; min-height:0; max-height:none; border:0; resize:none; }
#neuroGroupPlan .neuro-card-resize { position:absolute; right:0; bottom:0; width:24px!important; height:22px; min-height:22px!important; margin:0!important; padding:0!important; border:0!important; border-radius:4px 0!important; background:color-mix(in srgb,var(--project-color,#078fcf) 15%,white)!important; color:var(--project-color,#078fcf)!important; cursor:ns-resize; touch-action:none; box-shadow:none!important; font-size:21px!important; line-height:20px; }
#neuroGroupPlan .neuro-card-resize:focus-visible { outline:2px solid var(--project-color,#078fcf); outline-offset:1px; }
#neuroGroupPlan .neuro-group-work-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(240px,.8fr); gap:16px; }
#neuroGroupPlan .neuro-group-cap-box { background:#f4f9fe; border:1px solid #d2e4f4; border-radius:9px; padding:12px; min-width:0; }
#neuroGroupPlan .neuro-group-cap-tools { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
#neuroGroupPlan #neuroGroupCapMode { color:#1268ae; background:#e2f0fe; border-radius:6px; padding:3px 8px; font-size:12px; }
#neuroGroupPlan .neuro-group-number { width:110px; max-width:100%; text-align:right; background:#fff; color:#193d5c; border:1px solid #cbdff2; border-radius:7px; padding:7px; }
#neuroGroupPlan #neuroChatWorkCountValue, #neuroGroupPlan #neuroChatWorkTimeValue { display:none; }
#neuroGroupPlan #neuroChatPerGroup { max-width:150px; display:block; margin-top:8px; }
#neuroGroupPlan .neuro-reaction-value { gap:8px; flex-wrap:wrap; }
#neuroGroupPlan #neuroChatWorkModeSection>.hint { display:none; }
#neuroGroupPlan .neuro-group-live { margin-top:12px; border-top:1px dashed #cbdff2; padding-top:8px; }
#neuroGroupPlan #neuroGroupLiveConfirm { background:#fff8e9; color:#735321; padding:12px; border-radius:8px; margin-top:10px; }
#neuroGroupPlan #neuroGroupLiveConfirm label { display:block; margin:10px 0; }
#neuroGroupPlan .neuro-target-selected-head { flex-wrap:wrap; justify-content:flex-start; gap:8px; }
#neuroGroupPlan .neuro-target-selected-head>strong { margin-right:auto; }
#neuroGroupPlan .neuro-target-pill input { width:16px; height:16px; margin:0 4px 0 0; }
@media(max-width:760px) { #neuroGroupPlan .neuro-group-work-columns { grid-template-columns:1fr; } #neuroGroupPlan { padding:12px; } #neuroGroupPlan .neuro-chat-assignment-card-body textarea { font-size:16px; line-height:19px; height:88px; } #neuroGroupPlan .neuro-target-tabs button { min-width:0; white-space:normal; } }
:is(#neurodialogsWorkspace,#genericModuleWorkspace) .neuro-chat-event-error { background: #fff0f0; color: #9b2020; border-left: 4px solid #cf3636; padding: 9px 12px; margin: 6px 0; overflow-wrap: anywhere; }
:is(#neurodialogsWorkspace,#genericModuleWorkspace) .neuro-chat-event-warning { background: #fff7e3; color: #725000; border-left: 4px solid #c89624; padding: 9px 12px; margin: 6px 0; overflow-wrap: anywhere; }
/* The same last viewer block is available in Neurodialogs and Neurochatting only. */
body.neurochatting-preview.neurochatting-reaction-preview #neurodialogsWorkspace > #neuroViewerSection { display:block !important; }
[data-live-toast] { position:fixed; top:76px; right:24px; z-index:100; max-width:min(460px,calc(100vw - 48px)); padding:10px 16px; border:1px solid #b7d7f0; border-radius:10px; background:#f4fbff; color:#185c98; font-size:14px; line-height:1.4; box-shadow:0 3px 12px #1c527b20; pointer-events:none; }
[data-live-toast][hidden] { display:none !important; }
[data-live-toast][data-error="true"] { color:#a33722; background:#fff7f4; border-color:#e7b4a7; }
body.neurodialogs-active:not(.neurochatting-preview) [data-form-autosave]:not([data-save-error]),
body.neurochatting-reaction-preview [data-form-autosave]:not([data-save-error]) { display:none !important; }
.neuro-viewer-section .neuro-viewer-toggle { display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-weight:600; white-space:nowrap; }
.neuro-viewer-section .neuro-viewer-toggle input { width:18px; height:18px; margin:0; }
.neuro-viewer-section #neuroVisualPanel.hidden { display:none !important; }
.neuro-viewer-section #neuroViewerHint { margin:0 0 12px; }
/* Account picker is local to the independent conversation viewer. */
#neuroViewerSection #neuroVisualAccount[hidden] { display:none !important; }
#neuroViewerSection .neuro-viewer-filters { display:flex; flex-wrap:wrap; gap:5px; margin-bottom:8px; }
#neuroViewerSection .neuro-viewer-filters button { margin:0!important; padding:6px 8px!important; font-size:13px!important; min-height:34px!important; }
#neuroViewerSection .neuro-viewer-filters button[aria-pressed="true"] { background:#147bd1!important; border-color:#147bd1!important; color:#fff!important; }
#neuroViewerSection #neuroViewerCountsHint { display:block; margin:0; color:#627e96; font-size:11px; }
#neuroViewerSection #neuroViewerCountsHint[hidden] { display:none!important; }
/* Keep the reader controls compact without shrinking conversation rows. */
body.neurodialogs-active #neuroViewerSection #neuroVisualToolsMount { padding:10px; }
body.neurodialogs-active #neuroViewerSection #neuroVisualToolsMount .neuro-visual-tools { gap:6px; }
#neuroViewerSection .neuro-viewer-filters { margin-bottom:0; }
body.neurodialogs-active #neuroViewerSection #neuroVisualToolsMount .neuro-visual-search-row {
  display:grid; grid-template-columns:minmax(0,1fr) 40px; align-items:center; gap:6px;
}
#neuroViewerSection #neuroVisualSearch { min-width:0; width:100%; margin:0; }
#neuroViewerSection #neuroVisualExpand { margin:0; }
#neuroViewerSection #neuroViewerAccountMenu { position:relative; margin:0; padding:0; border:0; min-width:0; }
#neuroViewerSection #neuroViewerAccountSummary,
#neuroViewerSection .neuro-viewer-account-option { display:flex; align-items:center; gap:8px; box-sizing:border-box; width:100%; min-width:0; padding:9px!important; border:1px solid #c9dfef; border-radius:8px; background:#fff!important; color:#193e5b!important; text-align:left; box-shadow:none!important; cursor:pointer; list-style:none; }
#neuroViewerSection #neuroViewerAccountSummary::-webkit-details-marker { display:none; }
#neuroViewerSection #neuroViewerAccountSummary:focus-visible,
#neuroViewerSection .neuro-viewer-account-option:focus-visible { outline:2px solid #1682d5; outline-offset:-2px; }
#neuroViewerSection .neuro-viewer-account-avatar { position:relative; flex:0 0 32px; width:32px; height:32px; border-radius:50%; overflow:hidden; display:grid; place-items:center; background:#e0effb; color:#246893; font-size:12px; }
#neuroViewerSection .neuro-viewer-account-avatar img { position:absolute; inset:0; width:32px!important; height:32px!important; object-fit:cover; }
#neuroViewerSection .neuro-viewer-account-identity { flex:1; min-width:0; }
#neuroViewerSection .neuro-viewer-account-identity strong { display:block; font-size:13px!important; line-height:18px; overflow-wrap:anywhere; }
#neuroViewerSection .neuro-viewer-account-identity small { display:block; font-size:12px!important; line-height:17px; color:#55738d; overflow-wrap:anywhere; white-space:normal; }
#neuroViewerSection .neuro-viewer-account-count { flex:0 0 auto; text-align:right; }
#neuroViewerSection .neuro-viewer-account-count b { display:block; font-size:15px!important; }
#neuroViewerSection .neuro-viewer-account-count small { display:block; font-size:10px!important; color:#627e96; }
#neuroViewerSection .neuro-viewer-account-check { width:12px; flex:0 0 12px; color:#117cd0; }
#neuroViewerSection .neuro-viewer-account-dropdown { position:absolute; top:calc(100% + 4px); left:0; right:0; z-index:40; padding:6px; border:1px solid #bdd8ed; border-radius:9px; background:#fff; box-shadow:0 8px 24px #183f5c25; }
#neuroViewerSection #neuroViewerAccountSearch { box-sizing:border-box; width:100%; min-width:0; margin:0 0 5px; font-size:13px!important; }
#neuroViewerSection #neuroViewerAccountOptions { max-height:min(300px,45vh); overflow-y:auto; overscroll-behavior:contain; }
#neuroViewerSection .neuro-viewer-account-option { border:0; border-radius:5px; margin:0 0 3px!important; min-height:58px; }
#neuroViewerSection .neuro-viewer-account-option:hover { background:#f0f7fc!important; }
#neuroViewerSection .neuro-viewer-account-option[aria-pressed="true"] { background:#e3f1fd!important; }
.neuro-viewer-section .neuro-visual { min-width:0; }
body.gramjet-shell-active #neuroViewerSection .neuro-chat-avatar {
  width:42px !important; height:42px !important; min-width:42px !important;
  flex-basis:42px !important;
}
.neuro-viewer-section .neuro-viewer-export {
  display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px;
  padding:14px 16px; border:1px solid #d7e6f2; border-top:0;
  border-radius:0 0 12px 12px; background:#fff;
}
.neuro-viewer-section .neuro-viewer-export > div { flex:1 1 240px; }
.neuro-viewer-section .neuro-viewer-export > div p { margin:3px 0 0; }
.neuro-viewer-section .neuro-viewer-export label { display:inline-flex; align-items:center; gap:6px; }
.neuro-viewer-section .neuro-viewer-export input[type=date] { min-width:0; width:145px; }
.neuro-viewer-section .neuro-viewer-export #neuroViewerExportCount,
.neuro-viewer-section .neuro-viewer-export #neuroViewerExportHint { flex-basis:100%; }
body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen { grid-template-rows:54px minmax(0,1fr) auto; }
body.neurodialogs-active #neuroVisualPanel.neuro-visual-fullscreen .neuro-viewer-export {
  grid-row:3; max-height:35vh; overflow-y:auto; border-radius:0;
}
#neuroViewerSection .neuro-viewer-open-bot { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
#neuroViewerSection .neuro-viewer-open-bot input { flex:1 1 150px; min-width:0; margin:0; }
#neuroViewerSection .neuro-viewer-open-bot button { flex:0 0 auto; margin:0; }
#neuroViewerSection .neuro-viewer-open-bot small { flex-basis:100%; color:#55738d; }
#neuroViewerSection .neuro-viewer-open-bot small:empty { display:none; }
#neuroViewerSection .neuro-dialog-actions { position:relative; flex:0 0 auto; margin-left:4px; }
#neuroViewerSection .neuro-dialog-actions summary { display:grid; place-items:center; width:34px; height:34px; border:1px solid #c9dfef; border-radius:8px; background:#fff; color:#285775; cursor:pointer; list-style:none; font-size:23px; line-height:1; }
#neuroViewerSection .neuro-dialog-actions summary::-webkit-details-marker { display:none; }
#neuroViewerSection .neuro-dialog-actions > div { position:absolute; z-index:50; top:calc(100% + 4px); right:0; min-width:220px; padding:6px; border:1px solid #bdd8ed; border-radius:9px; background:#fff; box-shadow:0 8px 24px #183f5c25; }
#neuroViewerSection .neuro-dialog-actions button { width:100%; text-align:left; white-space:normal; }
dialog.neuro-viewer-confirm { box-sizing:border-box; width:min(560px,calc(100vw - 24px)); max-height:calc(100vh - 24px); overflow-y:auto; padding:22px; border:1px solid #cbdceb; border-radius:14px; color:#173e5b; background:#fff; box-shadow:0 18px 60px #102a4960; }
dialog.neuro-viewer-confirm::backdrop { background:#102c4a70; }
dialog.neuro-viewer-confirm h3 { margin:0 0 8px; font-size:21px; }
dialog.neuro-viewer-confirm p { margin:10px 0; line-height:1.5; }
dialog.neuro-viewer-confirm dl { display:grid; gap:8px; margin:16px 0; }
dialog.neuro-viewer-confirm dl > div { display:grid; grid-template-columns:105px minmax(0,1fr); gap:8px; padding:9px 10px; border-radius:8px; background:#f1f7fb; }
dialog.neuro-viewer-confirm dt { color:#607e95; }
dialog.neuro-viewer-confirm dd { margin:0; overflow-wrap:anywhere; font-weight:600; }
dialog.neuro-viewer-confirm [data-viewer-revoke-row] { display:flex; gap:8px; align-items:flex-start; margin:14px 0; }
dialog.neuro-viewer-confirm [data-viewer-revoke-row][hidden] { display:none; }
dialog.neuro-viewer-confirm [data-viewer-revoke] { margin-top:3px; }
dialog.neuro-viewer-confirm .neuro-viewer-danger-note { color:#994125; }
dialog.neuro-viewer-confirm [data-viewer-action-status] { min-height:22px; color:#34657f; }
dialog.neuro-viewer-confirm .neuro-viewer-confirm-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:8px; margin-top:18px; }
dialog.neuro-viewer-confirm [data-viewer-action-confirm] { background:#c83d42; border-color:#c83d42; color:#fff; }
dialog.neuro-viewer-confirm [data-viewer-action-confirm]:disabled { opacity:.55; }
.neuro-viewer-section .neuro-audio { display:flex; flex-direction:column; align-items:flex-start; gap:5px; margin-top:6px; max-width:100%; }
.neuro-viewer-section .neuro-audio [hidden] { display:none; }
.neuro-viewer-section .neuro-audio button { min-height:36px; margin:0; padding:7px 12px; color:#185c98; background:#fff; border:1px solid #b9d4eb; }
.neuro-viewer-section .neuro-audio button:focus-visible { outline:2px solid #146ac3; outline-offset:2px; }
.neuro-viewer-section .neuro-audio small { max-width:250px; color:#567188; line-height:1.35; white-space:normal; }
.neuro-viewer-section .neuro-audio small:empty { display:none; }
.neuro-viewer-section .neuro-chat-read-controls { display:flex; flex-direction:column; align-items:flex-end; gap:3px; min-width:0; max-width:270px; }
.neuro-viewer-section .neuro-chat-read-controls > div { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:6px; }
.neuro-viewer-section .neuro-chat-read-label { display:inline-flex; align-items:center; gap:5px; color:#fff; background:#146ac3; border:1px solid #146ac3; border-radius:999px; padding:5px 9px; font-size:12px; font-weight:600; line-height:1.35; cursor:default; white-space:normal; }
.neuro-viewer-section [data-neuro-mark-read] { padding:7px 10px; font-size:13px; min-height:34px; color:#244966; background:#fff; border:1px solid #b9cddd; white-space:normal; box-shadow:none; }
.neuro-viewer-section [data-neuro-mark-read]:hover:not(:disabled) { background:#eef5fc; border-color:#146ac3; color:#125ba6; }
.neuro-viewer-section [data-neuro-mark-read]:focus-visible { outline:2px solid #146ac3; outline-offset:2px; }
.neuro-viewer-section .neuro-chat-read-confirmed { display:inline-flex; align-items:center; gap:5px; min-height:34px; padding:7px 10px; border-radius:8px; border:1px solid #a7dbb9; background:#e8f7ee; color:#176238; font-size:13px; font-weight:600; box-sizing:border-box; }
.neuro-viewer-section .neuro-chat-read-controls small { color:#6b8295; line-height:1.25; text-align:right; overflow-wrap:anywhere; }
.neuro-viewer-section .neuro-chat-read-controls [data-neuro-mark-status] { color:#256b84; }
.neuro-viewer-section .neuro-chat-read-controls [hidden] { display:none; }
@media(max-width:600px) {
  .neuro-viewer-section .neuro-viewer-export { padding:12px; }
  .neuro-viewer-section .neuro-viewer-export > div { flex-basis:100%; }
  .neuro-viewer-section .neuro-viewer-export label { flex:1 1 135px; }
  .neuro-viewer-section .neuro-viewer-export input[type=date] { width:100%; }
  .neuro-viewer-section .neuro-chat-head { flex-wrap:wrap; }
  .neuro-viewer-section .neuro-chat-head > span:nth-child(2) { overflow:hidden; }
  .neuro-viewer-section .neuro-chat-head small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .neuro-viewer-section .neuro-chat-head .neuro-chat-language { order:3; flex:1 0 100%; justify-content:flex-end; }
  .neuro-viewer-section .neuro-chat-head .neuro-dialog-actions { order:2; margin-left:auto; }
  .neuro-viewer-section .neuro-chat-head .neuro-chat-read-controls { order:4; flex:1 0 100%; max-width:none; align-items:flex-start; }
  .neuro-viewer-section .neuro-chat-read-controls > div { justify-content:flex-start; }
  .neuro-viewer-section .neuro-chat-read-controls small { text-align:left; white-space:normal; overflow:visible; text-overflow:clip; }
  dialog.neuro-viewer-confirm { padding:18px; }
  dialog.neuro-viewer-confirm dl > div { grid-template-columns:1fr; gap:2px; }
}

/* Shared launch panel above history/statistics; controls retain original handlers. */
#neurodialogsWorkspace .neuro-unified-launch {
  display:grid; grid-template-columns:minmax(0,1fr) 170px minmax(0,1fr); align-items:center; gap:12px;
  width:100%; box-sizing:border-box; padding:18px; margin:0 0 14px;
  border:1px solid #cfe0f2; border-radius:12px; background:#f5faff;
}
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state { grid-column:1; grid-row:1; margin-right:0; min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:7px; overflow-wrap:anywhere; }
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state small { font-size:12px; color:#66809b; }
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-primary { grid-column:2; grid-row:1; display:grid; grid-template-columns:170px; align-items:center; justify-content:center; min-width:0; width:100%; }
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-schedule-action { grid-column:3; grid-row:1; justify-self:start; min-width:0; max-width:100%; }
#neurodialogsWorkspace .neuro-unified-launch button { min-height:44px; border-radius:9px; white-space:normal; }
#neurodialogsWorkspace .neuro-unified-launch #neuroDemoStart,
#neurodialogsWorkspace .neuro-unified-launch #neuroDemoStop,
#neurodialogsWorkspace .neuro-unified-launch #neuroChatLaunchStart,
#neurodialogsWorkspace .neuro-unified-launch #neuroChatLaunchStop { grid-column:1; grid-row:1; min-width:170px; width:170px; padding:12px 22px; font-size:15px; }
#neurodialogsWorkspace .neuro-unified-launch > #neuroDemoStart,
#neurodialogsWorkspace .neuro-unified-launch > #neuroDemoStop { grid-column:2; }
#neurodialogsWorkspace .neuro-unified-launch #neuroChatScheduleToggle { grid-column:2; grid-row:1; justify-self:start; display:flex; align-items:center; gap:8px; width:auto; max-width:100%; padding:12px 16px; font-size:14px; }
#neurodialogsWorkspace .neuro-unified-launch #neuroChatScheduleToggle svg { width:18px; height:18px; flex:none; }
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state button { display:block; max-width:100%; padding:11px 16px; background:#e7edf4; color:#49627d; border:1px solid transparent; font-size:16px; line-height:1.3; font-weight:700; text-align:left; cursor:pointer; }
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state button::after { content:' ⌄'; font-size:12px; }
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state button[aria-expanded=true]::after { content:' ⌃'; }
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state button[data-run-state=running] { background:#ddf4e9; color:#177247; }
#neurodialogsWorkspace .neuro-unified-launch[data-run-state=draining],
#neurodialogsWorkspace .neuro-unified-launch[data-run-state=paused] { background:#fff8e9; border-color:#f3c979; }
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state button[data-run-state=paused],
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state button[data-run-state=draining] { background:#ffdf98; color:#704900; }
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state button[data-run-state=offline],
#neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state button[data-run-state=failed] { background:#ffe3e1; color:#a52a2a; }
#neurodialogsWorkspace .neuro-unified-launch button[aria-disabled=true] { opacity:.5; cursor:not-allowed; }
#neurodialogsWorkspace .neuro-unified-launch button:focus-visible { outline:3px solid #1776dc; outline-offset:3px; }
#neurodialogsWorkspace .neuro-update-details { padding:12px 16px; margin:0 0 14px; border-radius:8px; background:#f0f6fc; color:#4f6e89; font-size:14px; }
@media(max-width:700px) {
  #neurodialogsWorkspace .neuro-unified-launch { grid-template-columns:minmax(0,1fr); padding:14px; gap:14px; }
  #neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-state { grid-column:1; grid-row:1; }
  #neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-primary { grid-column:1; grid-row:2; grid-template-columns:170px; justify-content:center; }
  #neurodialogsWorkspace .neuro-unified-launch .neuro-chat-launch-schedule-action { grid-column:1; grid-row:3; justify-self:center; }
  #neurodialogsWorkspace .neuro-unified-launch #neuroDemoStart,
  #neurodialogsWorkspace .neuro-unified-launch #neuroDemoStop,
  #neurodialogsWorkspace .neuro-unified-launch #neuroChatLaunchStart,
  #neurodialogsWorkspace .neuro-unified-launch #neuroChatLaunchStop { min-width:170px; width:170px; }
  #neurodialogsWorkspace .neuro-unified-launch > #neuroDemoStart,
  #neurodialogsWorkspace .neuro-unified-launch > #neuroDemoStop { grid-column:1; grid-row:2; justify-self:center; }
  #neurodialogsWorkspace .neuro-unified-launch #neuroChatScheduleToggle { grid-column:1; grid-row:2; justify-self:center; }
}

/* Independent viewer: multi-select types, no indeterminate state. */
#neuroViewerSection .neuro-viewer-types {display:grid;gap:5px;min-width:0;color:#617f97;font-size:13px;}
#neuroViewerTypeMenu {position:relative;margin:0;border:1px solid #c8dfee;border-radius:7px;background:#fff;color:#214e73;}
#neuroViewerTypeMenu > summary {display:flex;justify-content:space-between;align-items:center;gap:8px;padding:11px;cursor:pointer;list-style:none;overflow-wrap:anywhere;}
#neuroViewerTypeMenu > summary::-webkit-details-marker {display:none;}
#neuroViewerTypeMenu > summary::after {content:'⌄';flex-shrink:0;}
#neuroViewerTypeMenu > summary:hover {background:#f0f7fc;}
#neuroViewerTypeMenu > summary:focus-visible {outline:2px solid #167bd1;outline-offset:2px;}
#neuroViewerTypeMenu .neuro-viewer-type-options {position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:15;padding:6px;background:#fff;border:1px solid #c8dfee;border-radius:8px;box-shadow:0 6px 18px #214e7324;}
#neuroViewerTypeMenu label {display:flex!important;justify-content:flex-start!important;align-items:center;gap:9px;padding:10px;margin:0;cursor:pointer;border-radius:5px;color:#214e73;background:#fff;font-size:14px;}
#neuroViewerTypeMenu label:hover {background:#edf6fd;}
#neuroViewerTypeMenu input {appearance:auto;width:16px!important;min-width:16px!important;max-width:16px!important;height:16px;flex:0 0 16px;margin:0;accent-color:#167bd1;}
#neuroViewerSection .neuro-chat-composer[hidden], #neuroViewerSection .neuro-dialog-actions[hidden], #neuroViewerSection [data-neuro-mark-read][hidden] {display:none!important;}
#neuroViewerSection .neuro-content-media {display:flex;flex-direction:column;gap:8px;max-width:440px;margin:4px 0 8px;}
#neuroViewerSection .neuro-content-media img,#neuroViewerSection .neuro-content-media video {display:block;width:auto;max-width:100%;height:auto;max-height:440px;object-fit:contain;border-radius:10px;background:#e9f1f7;}
#neuroViewerSection .neuro-content-media img[data-content-preview] {width:280px;min-height:100px;cursor:zoom-in;}
#neuroViewerSection .neuro-content-media video {width:420px;}
#neuroViewerSection .neuro-content-media audio {max-width:100%;width:320px;}
#neuroViewerSection .neuro-content-media.round video {width:240px;height:240px;border-radius:50%;}
#neuroViewerSection .neuro-content-media button {align-self:flex-start;max-width:100%;white-space:normal;overflow-wrap:anywhere;}
#neuroViewerSection .neuro-content-media small {white-space:normal;color:#647e98;font-size:12px;}
#neuroViewerSection .neuro-content-media [hidden],#neuroViewerSection .neuro-history-more[hidden] {display:none!important;}
#neuroViewerSection .neuro-content-media[data-content-hidden] > :not([data-content-reveal]) {display:none!important;}
#neuroViewerSection .neuro-content-author {display:block;color:#1674b5;font-size:13px;margin-bottom:4px;}
#neuroViewerSection .neuro-content-meta {display:block;font-size:11px;color:#647e98;margin:3px 0;}
#neuroViewerSection .neuro-content-card {border-left:3px solid #b6dafa;padding:6px 10px;margin:4px 0;white-space:pre-wrap;overflow-wrap:anywhere;}
#neuroViewerSection .neuro-bubble > span[data-message-id] {white-space:pre-wrap;overflow-wrap:anywhere;}
#neuroViewerSection .neuro-album-item {border-left:3px solid #a9d1f0;}
#neuroViewerSection .neuro-history-more {margin:6px auto;display:block;font-size:13px;max-width:95%;white-space:normal;}
#neuroViewerSection .neuro-text-spoiler:not(.revealed) {color:transparent;background:#91a4b6;border-radius:3px;cursor:pointer;}
#neuroViewerSection .neuro-text-spoiler:not(.revealed) * {visibility:hidden;}

/* Telegram history metadata, shared by the viewer and read-only discussions. */
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-day-divider {align-self:stretch;text-align:center;margin:12px 0;flex-shrink:0;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-day-divider span {display:inline-block;padding:5px 12px;border-radius:20px;background:#dcebf5;color:#466783;font-size:13px;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-service-event {align-self:center;text-align:center;max-width:90%;padding:7px 13px;margin:5px auto;border-radius:12px;background:#e0edf7;color:#486984;font-size:13px;overflow-wrap:anywhere;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-service-event time {display:block;margin-top:4px;color:#668098;font-size:11px;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-service-event .neuro-content-media {align-items:center;margin-top:8px;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-post-meta {display:flex;justify-content:flex-end;align-items:center;gap:8px;flex-wrap:wrap;margin-top:5px;color:#668098;font-size:12px;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-post-meta time {font-size:12px;margin:0;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-reactions {display:flex;gap:5px;flex-wrap:wrap;margin-top:7px;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-reaction {border-radius:16px;background:#e9f3fa;padding:3px 8px;color:#28628d;font-size:13px;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-reaction.chosen {box-shadow:inset 0 0 0 1px #64a6d4;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-reply-preview {margin:5px 0;padding:5px 9px;border-left:3px solid #7db5dc;background:#f2f8fc;font-size:12px;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-reply-preview strong,:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-reply-preview span {display:block;overflow-wrap:anywhere;}
:is(#neuroViewerSection,.neuro-comments-dialog) .neuro-comments-open {display:block;width:100%;margin-top:8px;text-align:left;background:#f4f9fd;color:#176caa;border:1px solid #d4e6f4;}
.neuro-comments-dialog {width:min(720px,92vw);max-height:90dvh;padding:16px;border:1px solid #cbdfee;border-radius:14px;color:#254966;background:white;}
.neuro-comments-dialog::backdrop {background:#12314966;}
.neuro-comments-dialog header {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.neuro-comments-dialog p {font-size:13px;color:#668098;}
.neuro-comments-dialog .neuro-chat-thread {display:flex;flex-direction:column;gap:8px;overflow:auto;height:55dvh;background:#f0f7fc;padding:12px;margin-top:10px;}
.neuro-comments-dialog .neuro-bubble {align-self:flex-start;max-width:90%;border-radius:12px;background:white;padding:10px;border:1px solid #dbe8f2;overflow-wrap:anywhere;}
.neuro-comments-dialog .neuro-bubble.reply {align-self:flex-end;background:#e0f1fd;}
.neuro-chat-thread .neuro-bubble.neuro-group-message {position:relative;margin-left:44px;max-width:calc(100% - 52px);}
.neuro-chat-thread .neuro-bubble .neuro-message-avatar {position:absolute;left:-44px;top:2px;width:34px;height:34px;border-radius:50%;background:#dbeafd;color:#23598e;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:600;overflow:hidden;}
.neuro-message-avatar img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%;}
.neuro-message-avatar img[hidden] {display:none!important;}
.neuro-comments-dialog .neuro-content-media {display:flex;flex-direction:column;gap:7px;max-width:100%;}
.neuro-comments-dialog .neuro-content-media :is(img,video) {max-width:100%;height:auto;max-height:330px;object-fit:contain;}
.neuro-comments-dialog [hidden] {display:none!important;}
.neuro-comments-dialog .neuro-content-media[data-content-hidden] > :not([data-content-reveal]) {display:none!important;}
.neuro-comments-dialog .neuro-text-spoiler:not(.revealed) {color:transparent;background:#91a4b6;}
.neuro-comments-dialog .neuro-text-spoiler:not(.revealed) * {visibility:hidden;}

/* One page-wide run selection; settings and the existing report keep their places. */
#neuroRunWorkspaceBar .neuro-section-head {display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;}
#neuroRunWorkspaceBar .neuro-workspace-picker {display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:12px 0;}
#neuroRunWorkspaceBar .neuro-workspace-picker label {display:flex;flex:1 1 360px;flex-direction:column;gap:6px;min-width:0;}
#neuroRunWorkspaceBar select {width:100%;max-width:100%;min-height:40px;}
#neuroRunWorkspaceBar h3 {margin:0;}
#neuroRunWorkspaceBar .hint {margin:6px 0 0;}
#neuroRunWorkspaceBar [hidden], #neuroRunSelect[hidden] {display:none!important;}
#neurodialogsWorkspace .neuro-run-occupied {margin:0 0 8px;padding:0 10px;color:#657b93;font-size:12px;}
#neuroSelectedRunCaption {overflow-wrap:anywhere;}
@media(max-width:600px){#neuroRunWorkspaceBar .neuro-workspace-picker label {flex-basis:100%;}#neuroRunWorkspaceBar .neuro-section-head>button {width:100%;}}
