/* Nexo — плавающий ассистент */
.nexo-root{ position:fixed; right:24px; bottom:24px; z-index:600; font-family:var(--font-body, Inter, sans-serif); }

.nexo-orb{
  width:58px; height:58px; border-radius:50%; border:1px solid var(--border, #2B2830);
  background:linear-gradient(145deg, #1C1B1E, #101012);
  color:var(--red, #E8342A); display:grid; place-items:center; cursor:pointer;
  box-shadow:0 12px 34px -10px rgba(0,0,0,.8), 0 0 0 0 rgba(232,52,42,.45);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  animation:nexo-pulse 3.6s ease-in-out infinite;
}
.nexo-orb svg{ width:30px; height:30px; }
.nexo-orb:hover{ transform:translateY(-3px) scale(1.04); border-color:var(--red, #E8342A); }
.nexo-orb.active{ border-color:var(--red, #E8342A); animation:none; }
@keyframes nexo-pulse{
  0%,100%{ box-shadow:0 12px 34px -10px rgba(0,0,0,.8), 0 0 0 0 rgba(232,52,42,.4); }
  50%{ box-shadow:0 12px 34px -10px rgba(0,0,0,.8), 0 0 0 12px rgba(232,52,42,0); }
}

.nexo-teaser{
  position:absolute; right:0; bottom:70px; white-space:nowrap;
  background:var(--surface, #141315); border:1px solid var(--border, #2B2830);
  color:var(--white, #F4F2ED); font-size:.84rem; padding:9px 14px;
  border-radius:14px 14px 4px 14px; cursor:pointer;
  box-shadow:0 10px 28px -12px rgba(0,0,0,.9);
  animation:nexo-in .28s ease;
}
.nexo-teaser::after{
  content:""; position:absolute; right:14px; bottom:-5px; width:9px; height:9px;
  background:var(--surface, #141315);
  border-right:1px solid var(--border, #2B2830); border-bottom:1px solid var(--border, #2B2830);
  transform:rotate(45deg);
}
@keyframes nexo-in{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }

.nexo-window{
  position:fixed; right:24px; bottom:96px; width:380px; max-width:calc(100vw - 32px);
  height:520px; max-height:calc(100vh - 130px);
  background:var(--surface, #141315); border:1px solid var(--border, #2B2830);
  border-radius:18px; display:flex; flex-direction:column; overflow:hidden;
  box-shadow:0 30px 70px -24px rgba(0,0,0,.92);
  animation:nexo-in .2s ease;
}
.nexo-window.dragging{ animation:none; user-select:none; cursor:grabbing; }

.nexo-head{
  display:flex; align-items:center; gap:11px; padding:13px 15px;
  border-bottom:1px solid var(--border-soft, #211F26); cursor:grab;
  background:linear-gradient(150deg, rgba(232,52,42,.1), transparent 70%);
}
.nexo-head:active{ cursor:grabbing; }
.nexo-avatar{
  width:34px; height:34px; border-radius:11px; flex-shrink:0; display:grid; place-items:center;
  background:var(--black, #0A0A0B); border:1px solid var(--red-dim, #7A1A14); color:var(--red, #E8342A);
}
.nexo-avatar svg{ width:20px; height:20px; }
.nexo-title{ flex:1; min-width:0; line-height:1.3; }
.nexo-title b{ display:block; font-size:.92rem; color:var(--white, #F4F2ED); }
.nexo-title span{ font-family:var(--font-mono, monospace); font-size:.68rem; color:var(--grey-dim, #5B5760); }
.nexo-icon-btn{
  width:30px; height:30px; border-radius:8px; flex-shrink:0;
  border:1px solid transparent; background:transparent; color:var(--grey-dim, #5B5760);
  display:grid; place-items:center; cursor:pointer;
}
.nexo-icon-btn:hover{ color:var(--red-hi, #FF5A45); border-color:var(--border, #2B2830); }
.nexo-icon-btn svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; }
.nexo-icon-btn:disabled{ opacity:.4; cursor:not-allowed; }

.nexo-body{ flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:11px; }
.nexo-state{ text-align:center; color:var(--grey-dim, #5B5760); font-size:.85rem; padding:22px 10px; line-height:1.6; }
.nexo-state a{ color:var(--red-hi, #FF5A45); }

.nexo-msg{ display:flex; }
.nexo-msg.mine{ justify-content:flex-end; }
.nexo-bubble{
  max-width:84%; background:var(--surface-2, #1C1B1E); border:1px solid var(--border, #2B2830);
  border-radius:14px; padding:9px 13px; position:relative;
}
.nexo-msg.mine .nexo-bubble{ background:rgba(232,52,42,.13); border-color:var(--red-dim, #7A1A14); }
.nexo-text{ font-size:.87rem; color:var(--white, #F4F2ED); line-height:1.6; word-break:break-word; }
.nexo-text a{ color:var(--red-hi, #FF5A45); text-decoration:underline; }
.nexo-text code{
  font-family:var(--font-mono, monospace); font-size:.82em; background:var(--black, #0A0A0B);
  border:1px solid var(--border, #2B2830); border-radius:5px; padding:1px 5px;
}
.nexo-text pre{
  background:var(--black, #0A0A0B); border:1px solid var(--border, #2B2830);
  border-radius:9px; padding:10px 12px; margin:8px 0; overflow-x:auto;
}
.nexo-text pre code{ border:0; padding:0; background:none; font-size:.78rem; line-height:1.55; }
.nexo-time{ display:block; font-family:var(--font-mono, monospace); font-size:.63rem; color:var(--grey-dim, #5B5760); margin-top:5px; text-align:right; }
.nexo-file-tag{
  display:inline-block; font-family:var(--font-mono, monospace); font-size:.7rem;
  background:var(--black, #0A0A0B); border:1px solid var(--border, #2B2830);
  border-radius:6px; padding:3px 8px; margin-bottom:6px; color:var(--grey, #93909A);
}

.nexo-dots{ display:inline-flex; gap:4px; padding:3px 0; }
.nexo-dots i{ width:6px; height:6px; border-radius:50%; background:var(--grey-dim, #5B5760); animation:nexo-bounce 1.1s infinite; }
.nexo-dots i:nth-child(2){ animation-delay:.15s; }
.nexo-dots i:nth-child(3){ animation-delay:.3s; }
@keyframes nexo-bounce{ 0%,60%,100%{ opacity:.3; transform:translateY(0); } 30%{ opacity:1; transform:translateY(-4px); } }

.nexo-attach-row{ display:flex; align-items:center; gap:9px; padding:0 15px 8px; }
.nexo-drop{ background:none; border:0; color:var(--red-hi, #FF5A45); font-size:.74rem; text-decoration:underline; cursor:pointer; }
.nexo-warn{ font-size:.76rem; color:var(--red-hi, #FF5A45); }

.nexo-input{
  display:flex; align-items:flex-end; gap:8px; padding:11px 13px;
  border-top:1px solid var(--border-soft, #211F26);
}
.nexo-input textarea{
  flex:1; resize:none; max-height:110px; background:var(--black, #0A0A0B);
  border:1px solid var(--border, #2B2830); border-radius:14px; padding:.6rem .9rem;
  color:var(--white, #F4F2ED); font-family:inherit; font-size:.87rem; line-height:1.5;
}
.nexo-input textarea:focus{ outline:none; border-color:var(--red, #E8342A); }
.nexo-send{
  width:36px; height:36px; flex-shrink:0; border-radius:50%; border:0;
  background:var(--red, #E8342A); color:#120503; display:grid; place-items:center; cursor:pointer;
}
.nexo-send:hover{ background:var(--red-hi, #FF5A45); }
.nexo-send:disabled{ background:var(--surface-2, #1C1B1E); color:var(--grey-dim, #5B5760); cursor:not-allowed; }
.nexo-send svg{ width:17px; height:17px; fill:currentColor; }

@media (max-width: 560px){
  .nexo-root{ right:16px; bottom:16px; }
  .nexo-orb{ width:52px; height:52px; }
  .nexo-window{
    right:8px; left:8px; bottom:80px; width:auto;
    height:min(70vh, 480px);
  }
  .nexo-head{ cursor:default; }
}

/* таблицы в ответах Nexo */
.nexo-table-wrap{ overflow-x:auto; margin:9px 0; -webkit-overflow-scrolling:touch; }
.nexo-table{
  border-collapse:collapse; width:100%; min-width:280px;
  font-size:.8rem; background:var(--black, #0A0A0B);
  border:1px solid var(--border, #2B2830); border-radius:9px; overflow:hidden;
}
.nexo-table th, .nexo-table td{
  border-bottom:1px solid var(--border-soft, #211F26);
  border-right:1px solid var(--border-soft, #211F26);
  padding:7px 10px; text-align:left; vertical-align:top; line-height:1.5;
}
.nexo-table th{
  background:var(--surface-2, #1C1B1E); color:var(--white, #F4F2ED);
  font-weight:600; font-size:.76rem; white-space:nowrap;
}
.nexo-table td{ color:var(--grey, #93909A); }
.nexo-table tr:last-child td{ border-bottom:0; }
.nexo-table th:last-child, .nexo-table td:last-child{ border-right:0; }
