@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');:root{font-family:Inter,-apple-system,BlinkMacSystemFont,sans-serif;color:#e9edf9;background:#090c15;font-synthesis:none}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}.hidden{display:none!important}.workspace{height:100dvh;display:flex;background:#0c101b}.sidebar{width:278px;background:#0a0e18;border-right:1px solid #222a3a;display:flex;flex-direction:column;padding:25px 15px 16px;flex-shrink:0}.side-brand{display:flex;align-items:center;gap:11px;padding:2px 11px 29px;font-size:17px;letter-spacing:-.5px}.side-brand span,.brand span{color:#8d84ff}.logo-mark{height:47px;width:47px;border-radius:15px;background:linear-gradient(135deg,#8576fa,#5e52de);display:grid;place-items:center;box-shadow:0 10px 38px #7263ff44;color:white;font-size:27px}.logo-mark.small{height:34px;width:34px;border-radius:10px;font-size:21px}.new-chat{height:46px;border:1px solid #40415a;border-radius:13px;background:linear-gradient(145deg,#252443,#161b30);color:#f5f4ff;font-weight:600;text-align:left;padding:0 15px;font-size:19px;display:flex;gap:12px;align-items:center}.new-chat span{font-size:13px}.new-chat:hover{border-color:#8579ff}.section-label{color:#747c91;font-size:10px;font-weight:800;letter-spacing:1.3px;margin:35px 11px 15px}.chat-list{overflow-y:auto;flex:1}.chat-item{display:block;width:100%;border:0;background:transparent;color:#a8b1c5;text-align:left;padding:13px;border-radius:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;margin-bottom:3px}.chat-item:hover,.chat-item.active{background:#1a2132;color:#fff}.chat-item.active{box-shadow:inset 2px 0 #8a7bff}.sidebar-foot{border-top:1px solid #252b38;padding:17px 5px 0}.connection,.system-pill{display:flex;align-items:center;gap:8px;color:#9aa6bd;font-size:11px;padding:0 6px 18px}.connection i,.system-pill i{width:7px;height:7px;border-radius:50%;background:#4bdb9a;box-shadow:0 0 13px #4bdb9a70}.profile{display:flex;align-items:center;gap:10px;padding:11px 7px;border-radius:12px;background:#141a28}.avatar{height:34px;width:34px;border-radius:11px;background:#504ca0;display:grid;place-items:center;font-weight:700}.profile div:nth-child(2){flex:1;min-width:0}.profile b,.profile small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile b{font-size:12px}.profile small{font-size:10px;color:#7f8ca6;margin-top:5px}.icon-btn{border:0;background:transparent;color:#a6b3c9;font-size:19px}.main{min-width:0;flex:1;display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% -25%,#191937 0,transparent 55%),#0d111d}.topbar{min-height:78px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #222a38;padding:0 35px}.top-title>div{font-size:15px;font-weight:700}.top-title small{display:block;color:#7e8ba2;margin-top:6px;font-size:11px}.top-badge{background:#2f2856;color:#a99bff;font-size:9px;border:1px solid #5b4aa6;padding:3px 6px;border-radius:5px;margin-left:6px}.top-actions{display:flex;align-items:center;gap:10px}.system-pill{border:1px solid #263b3a;border-radius:25px;padding:8px 13px;color:#9fc7b3;background:#10221f}.outline{background:#1b2335;color:#dae1f5;border:1px solid #343e59;padding:9px 13px;border-radius:9px;font-size:12px}.messages{flex:1;overflow-y:auto;scrollbar-color:#333b50 transparent;padding:0 max(24px,calc((100% - 880px)/2))}.welcome{max-width:800px;margin:12vh auto 0;text-align:center}.welcome-icon{width:70px;height:70px;margin:auto;background:linear-gradient(145deg,#665ce0,#373663);border-radius:22px;display:grid;place-items:center;font-size:38px;box-shadow:0 0 70px #665ce044}.welcome h1{font-size:clamp(24px,3vw,34px);margin:26px 0 12px;letter-spacing:-1px}.welcome p{font-size:14px;color:#8f9bb2;line-height:1.75;max-width:480px;margin:auto}.suggestions{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:40px auto;max-width:720px}.suggestions button{background:#171e2d;border:1px solid #2c364b;color:#8c82ff;border-radius:14px;padding:16px;text-align:left;font-size:21px;min-height:108px;transition:.2s}.suggestions button:hover{transform:translateY(-3px);border-color:#7368dc}.suggestions b,.suggestions span{display:block}.suggestions b{color:#e5e9f6;font-size:12px;margin:9px 0 5px}.suggestions span{color:#8693a8;font-size:10px}.message-list{padding:25px 0 15px}.message{display:flex;gap:12px;margin:15px 0 30px;max-width:100%;line-height:1.75}.message .msg-avatar{width:33px;height:33px;border-radius:10px;display:grid;place-items:center;flex-shrink:0;background:#4c448c;color:#fff;font-size:17px}.message.user .msg-avatar{background:#273249}.message-body{min-width:0;flex:1}.message-head{font-size:12px;font-weight:700;margin:4px 0 8px;color:#c3c6eb}.message.user .message-head{color:#afbad4}.message-content{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;color:#d5def0}.message.user .message-content{background:#182032;border:1px solid #2a3650;border-radius:13px;padding:13px 16px}.queue-status{padding:12px 14px;border-radius:12px;color:#bbb2ff;background:#222041;font-size:12px;margin-bottom:18px}.composer-wrap{padding:15px max(24px,calc((100% - 880px)/2)) 19px;background:linear-gradient(transparent,#0d111d 20%)}.composer{border:1px solid #34405a;background:#161d2c;border-radius:17px;padding:14px 15px 11px;box-shadow:0 10px 55px #0003}.composer:focus-within{border-color:#7168ad}.composer textarea{width:100%;color:#fff;background:transparent;outline:0;border:0;resize:none;max-height:160px;min-height:40px;line-height:1.7;font-size:13px}.composer textarea::placeholder{color:#727e95}.composer-bottom{display:flex;justify-content:space-between;align-items:center;gap:15px}.composer-bottom>div{display:flex;align-items:center;gap:15px}.attach-btn{display:flex;align-items:center;gap:7px;color:#aab7cf;font-size:20px;cursor:pointer}.attach-btn span{font-size:11px}.hint,.disclaimer{font-size:10px;color:#6c7890}.send-btn{width:35px;height:35px;border:0;border-radius:10px;background:#8072ed;color:white;font-size:24px;font-weight:700}.send-btn:hover{background:#978bff}.disclaimer{text-align:center;margin-top:12px}.file-chips{display:flex;gap:6px;flex-wrap:wrap}.chip{background:#2d3152;color:#bdbbff;border-radius:7px;font-size:11px;padding:6px 8px;margin-bottom:10px}.login-screen{min-height:100dvh;display:grid;place-items:center;background:#080b15;position:relative;overflow:auto;padding:20px}.login-orb{position:absolute;width:500px;height:500px;border-radius:50%;filter:blur(110px);opacity:.19;pointer-events:none}.orb-a{background:#7665ef;top:-270px;left:-140px}.orb-b{background:#3d50a6;right:-170px;bottom:-240px}.login-card{position:relative;width:min(100%,430px);padding:38px;border:1px solid #31374e;border-radius:24px;background:linear-gradient(165deg,#191e31,#101420);box-shadow:0 30px 100px #0008}.login-card .brand{font-size:19px;font-weight:800;margin-top:17px}.login-card h1{font-size:28px;letter-spacing:-.8px;margin:30px 0 8px}.login-card p,.modal p{color:#8995aa;line-height:1.7;font-size:12px;margin-bottom:28px}label{display:block;color:#b9c3d6;font-size:12px;margin-bottom:17px}label input{width:100%;display:block;margin-top:8px;background:#101522;border:1px solid #333e54;color:#f1f2fa;outline:0;border-radius:10px;padding:13px}.login-card input:focus{border-color:#8176ed}.primary{display:flex;align-items:center;justify-content:space-between;background:#8074ef;border:0;color:#fff;border-radius:10px;padding:14px 17px;font-weight:700;width:100%;margin-top:10px}.login-card small{display:block;text-align:center;color:#67738a;margin-top:26px;font-size:10px}.error{color:#ff9f9f;font-size:12px;margin:10px 0}.modal-backdrop{position:fixed;inset:0;background:#05060bba;display:grid;place-items:center;padding:20px;z-index:9}.modal{position:relative;width:min(100%,400px);border:1px solid #37425b;background:#171d2c;border-radius:18px;padding:29px}.modal h2{margin:0;font-size:20px}.modal-close{position:absolute;right:20px;top:18px;color:#a5b2ca;border:0;background:none}.toast{position:fixed;right:25px;bottom:25px;z-index:20;border:1px solid #4a5671;border-radius:10px;background:#212b40;color:#f2f5ff;padding:12px 18px;font-size:12px;max-width:350px}.mobile-only{display:none}@media(max-width:850px){.sidebar{position:fixed;z-index:8;top:0;bottom:0;left:0;transform:translateX(-100%);transition:.25s}.sidebar.open{transform:translateX(0)}.mobile-only{display:block}.side-brand .mobile-only{margin-left:auto}.topbar{padding:0 20px;gap:10px}.messages,.composer-wrap{padding-left:15px;padding-right:15px}.welcome{margin:9vh auto 0}.suggestions{grid-template-columns:1fr;margin:25px auto}.suggestions button{min-height:70px}.suggestions span{display:none}.hint{display:none}.system-pill{display:none}}
.asset-panel{border:1px solid #303756;background:#171d30;border-radius:14px;margin:12px 0 26px;padding:15px 18px;display:flex;flex-direction:column;gap:9px}.asset-panel>b{font-size:12px;color:#c1c5ed}.asset-link{display:block;max-width:100%;overflow-wrap:anywhere;text-decoration:none;color:#b3adff;font-size:12px;padding:7px 10px;border-radius:8px;background:#272746;border:1px solid #373761}.asset-link:hover{background:#37345d;color:white}.message-body>.asset-link{margin:8px 0}
.asset-preview{max-width:min(100%,420px);max-height:340px;object-fit:contain;border:1px solid #36415c;border-radius:12px;margin:4px 0 10px;background:#101522}

/* PROHOR_MEDIA_UI_V1 */
.prohor-file-chip {display:inline-flex;align-items:center;gap:8px;max-width:100%;white-space:normal}
.prohor-thumb{width:40px;height:40px;object-fit:cover;border-radius:8px}
.prohor-remove-file{border:0;background:transparent;color:inherit;font-size:19px;cursor:pointer;padding:0 4px}
.prohor-drag-active{outline:2px dashed #8b80f7;outline-offset:3px}
.prohor-media-results{display:flex;flex-direction:column;gap:12px;max-width:760px}
.prohor-asset-item{display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.prohor-output-image{display:block;max-width:100%;max-height:500px;object-fit:contain;border-radius:12px;border:1px solid #343653}

/* PROHOR_DEV_HIDE_AUTH */
#logout, #adminBtn {
    display: none !important;
}

/* PROHOR_IMAGE_SIZE_FIX */
#messageList img,
#messageList .asset-preview {
    max-width: min(100%, 420px) !important;
    max-height: 320px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 12px;
}

/* PROHOR_COMPACT_IMAGES_V2 */
#messageList img,
#messageList .asset-preview {
    max-width: min(100%, 380px) !important;
    max-height: 280px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 12px !important;
}

/* PROHOR_CHAT_MANAGEMENT_V1 */
.chat-row{display:flex;align-items:center;gap:2px;position:relative;border-radius:10px;margin-bottom:4px}
.chat-row .chat-item{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
.chat-row.selected{background:#1a2235}
.chat-menu{position:relative;flex-shrink:0}
.chat-menu>summary{list-style:none;cursor:pointer;color:#9da7c0;padding:7px 10px;border-radius:9px;font-size:22px;line-height:1}
.chat-menu>summary::-webkit-details-marker{display:none}
.chat-menu>summary:hover,.chat-menu[open]>summary{background:#2b304a;color:white}
.chat-menu-panel{position:fixed;min-width:185px;z-index:10;background:#1e2639;border:1px solid #38445f;padding:5px;border-radius:11px;box-shadow:0 12px 28px #0009}
.chat-menu-option{display:block;width:100%;text-align:left;border:0;background:transparent;color:#d8ddf1;border-radius:7px;font-size:12px;padding:9px 10px;white-space:nowrap}
.chat-menu-option:hover{background:#353a59}
.chat-menu-option.danger{color:#ffaba8}




/* PROHOR_BEAUTIFUL_CHAT_UI_V3 */

:root {
  --prohor-accent: #897cff;
  --prohor-border: #333955;
  --prohor-hover: #242944;
}

/* История чатов */
.sidebar {
  background: #0b0f1b;
}

.chat-list {
  padding: 2px 3px 12px;
  scrollbar-width: thin;
  scrollbar-color: #343954 transparent;
}

.chat-row {
  display: flex !important;
  align-items: center !important;
  position: relative;
  min-height: 44px;
  gap: 3px;
  padding: 3px 5px;
  margin: 0 0 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: background .18s, border-color .18s;
}

.chat-row:hover {
  background: #171d30;
  border-color: #2c3450;
}

.chat-row.selected {
  background: #22243e;
  border-color: #4a457a;
}

.chat-row .chat-item {
  display: block;
  flex: 1;
  min-width: 0;
  padding: 9px 7px !important;
  margin: 0 !important;
  border: 0;
  box-shadow: none !important;
  background: transparent !important;
  color: #aeb9d0;
  font-size: 12px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.chat-row.selected .chat-item,
.chat-row:hover .chat-item {
  color: #f2f0ff;
}

/* Кнопка с тремя точками */
.chat-menu {
  flex-shrink: 0;
  position: relative;
}

.chat-menu > summary {
  display: grid !important;
  place-items: center;
  list-style: none !important;
  width: 30px;
  height: 30px;
  margin: 0;
  padding: 0 !important;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #a9aed1;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background .18s, color .18s;
}

.chat-menu > summary::marker {
  content: "";
}

.chat-menu > summary::-webkit-details-marker {
  display: none !important;
}

.chat-menu > summary:hover,
.chat-menu[open] > summary {
  color: #fff;
  background: #343155;
  border-color: #4c467c;
}

.chat-menu:not([open]) .chat-menu-panel {
  display: none !important;
}

/* Выпадающее меню */
.chat-menu-panel {
  position: fixed !important;
  z-index: 9999 !important;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 224px;
  min-width: 224px;
  padding: 7px !important;
  background: #191e31 !important;
  border: 1px solid #3b3c62 !important;
  border-radius: 15px !important;
  box-shadow:
    0 18px 55px #0009,
    0 4px 16px #0005;
  backdrop-filter: blur(18px);
}

.chat-menu-option {
  display: flex !important;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 39px;
  padding: 10px 11px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  color: #e3e6f5 !important;
  text-align: left;
  font-size: 12px !important;
  font-weight: 500;
  white-space: nowrap;
  transition: background .16s, color .16s;
}

.chat-menu-option::before {
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  font-size: 17px;
  color: #a99fff;
}

.chat-menu-option:nth-child(1)::before {
  content: "✎";
}

.chat-menu-option:nth-child(2)::before {
  content: "◇";
}

.chat-menu-option:nth-child(3)::before {
  content: "↑";
}

.chat-menu-option:nth-child(4)::before {
  content: "↓";
}

.chat-menu-option:hover {
  background: #303252 !important;
  color: #fff !important;
}

.chat-menu-option:focus-visible,
.chat-menu > summary:focus-visible {
  outline: 2px solid #9387ff;
  outline-offset: 2px;
}

/* Удаление */
.chat-menu-option.danger {
  margin-top: 5px !important;
  padding-top: 12px !important;
  border-top: 1px solid #353750 !important;
  border-radius: 5px 5px 9px 9px !important;
  color: #ff999f !important;
}

.chat-menu-option.danger::before {
  content: "×";
  color: #ff818b;
  font-size: 22px;
}

.chat-menu-option.danger:hover {
  background: #432632 !important;
  color: #ffd1d4 !important;
}

/* Кнопка создания */
.new-chat {
  background: linear-gradient(120deg,#292647,#1b1d34);
  border-color: #44426b;
  border-radius: 13px;
  transition: background .18s, border-color .18s;
}

.new-chat:hover {
  background: linear-gradient(120deg,#38305c,#242440);
  border-color: #8d7aff;
}

/* Кнопка очистки */
#clearAllChats {
  border-radius: 10px !important;
  background: transparent !important;
  border: 1px solid #50313c !important;
  color: #ec9fa5 !important;
  font-size: 11px;
  transition: background .2s;
}

#clearAllChats:hover {
  background: #38202c !important;
}

/* Изображения в переписке */
#messageList img,
#messageList .asset-preview,
#messageList .prohor-output-image {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: min(100%, 420px) !important;
  max-height: 290px !important;
  object-fit: contain !important;
  border: 1px solid #343956;
  border-radius: 13px !important;
}

/* Мобильный интерфейс */
@media (max-width: 850px) {
  .chat-menu > summary {
    width: 33px;
    height: 33px;
  }

  .chat-menu-panel {
    width: min(224px, calc(100vw - 25px));
    min-width: 0;
  }
}


/* PROHOR_HIDE_ENTER_HINT */
.composer .hint {
    display: none !important;
}

/* PROHOR_STRICT_QUEUE_V1 - compact busy notice in existing theme */
.global-queue-notice {
  box-sizing: border-box;
  max-width: 760px;
  margin: 0 auto 10px;
  padding: 12px 16px;
  background: #1d2036;
  border: 1px solid #4b4779;
  border-radius: 13px;
  color: #e0dcff;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  box-shadow: 0 8px 28px rgba(10,12,27,.18);
}
.global-queue-notice.hidden {display:none !important;}
#submit:disabled {opacity:.5;cursor:not-allowed;filter:saturate(.65);}

/* PROHOR_SUITE_V1: responsive workspace entry and shared queue notice. */
.top-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.top-actions .outline{white-space:nowrap;display:inline-flex;align-items:center;padding:8px 11px;border-radius:10px}
@media(max-width:640px){.top-actions .outline{font-size:10px;padding:7px 8px}.top-title small{display:none}}

/* PROHOR_CHAT_SIDES_V1: users on the right, assistant on the left. */
#messageList .message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
#messageList .message.user {
  flex-direction: row-reverse;
  justify-content: flex-start;
}
#messageList .message.user .message-body {
  flex: 0 1 auto;
  width: max-content;
  max-width: min(78%, 660px);
  min-width: 0;
}
#messageList .message.user .message-head { text-align: right; }
#messageList .message.user .message-content {
  width: 100%;
  max-width: 100%;
  text-align: left;
  border-radius: 15px 5px 15px 15px;
}
#messageList .message.user .prohor-asset-item { align-items: flex-end; }
#messageList .message.user .asset-link { max-width: 100%; }
#messageList .message.assistant {
  flex-direction: row;
  justify-content: flex-start;
}
#messageList .message.assistant .message-body {
  flex: 1 1 auto;
  max-width: calc(100% - 46px);
  min-width: 0;
}
#messageList .message.assistant .message-head,
#messageList .message.assistant .message-content { text-align: left; }
@media (max-width: 850px) {
  #messageList .message.user .message-body { max-width: 86%; }
}
@media (max-width: 480px) {
  #messageList .message { gap: 8px; }
  #messageList .message.user .message-body { max-width: calc(100% - 42px); }
}

