.adm-ai-panel {
  width: min(430px, calc(100vw - 24px));
  background: #f7f8fc;
}
.adm-ai-panel .adm-ai-header {
  min-height: 82px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #111c44, #202f68);
}
.adm-ai-header > div { min-width: 0; }
.adm-ai-header strong {
  display: block;
  color: #fff;
  font: 700 15px/1.3 "DM Sans", Arial, sans-serif;
}
.adm-ai-header small {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  color: #d8deef;
  font: 500 10px/1.35 "DM Sans", Arial, sans-serif;
}
.adm-ai-subtitle,
.adm-ai-online,
.adm-ai-knowledge { display: block; }
.adm-ai-online::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #05cd99;
  box-shadow: 0 0 0 3px rgba(5, 205, 153, .14);
}
.adm-ai-knowledge { color: #aeb9d8; }
.adm-ai-messages {
  min-height: 0;
  padding: 20px;
  background: #f7f8fc;
}
.adm-ai-home {
  padding: 20px;
  border: 1px solid #e4e8f2;
  border-radius: 18px;
  background: #fff;
  color: #2b3674;
  box-shadow: 0 12px 28px rgba(112, 144, 176, .1);
}
.adm-ai-home h2 {
  margin: 0 0 13px;
  color: #1b2559;
  font: 700 17px/1.35 "DM Sans", Arial, sans-serif;
}
.adm-ai-home p { margin: 0 0 8px; }
.adm-ai-home ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 14px;
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}
.adm-ai-home li::before { content: "•"; margin-right: 8px; color: #c89238; font-weight: 800; }
.adm-ai-home strong { color: #1b2559; }
.adm-ai-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
  margin: 18px 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #34405e;
  font: 400 13px/1.65 "DM Sans", Arial, sans-serif;
}
.adm-ai-message > img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  padding: 4px;
  border: 1px solid #e3e8f2;
  border-radius: 9px;
  background: #fff;
  object-fit: contain;
}
.adm-ai-message-content { min-width: 0; }
.adm-ai-message-content p { margin: 0 0 9px; white-space: pre-line; }
.adm-ai-message--user {
  display: block;
  max-width: 82%;
  margin-left: auto;
  padding: 10px 13px;
  border-radius: 14px 14px 4px 14px;
  background: #fff3d8;
  color: #1b2559;
}
.adm-ai-source {
  display: inline-flex;
  margin-top: 4px;
  color: #8f5f1d;
  font-weight: 700;
}
.adm-ai-answer-actions,
.adm-ai-quick-actions {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.adm-ai-answer-actions { flex-wrap: wrap; margin-top: 10px; }
.adm-ai-answer-actions a,
.adm-ai-answer-actions button,
.adm-ai-quick-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border: 1px solid #dfe4ef;
  border-radius: 10px;
  background: #fff;
  color: #2b3674;
  font: 700 11px/1.2 "DM Sans", Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.adm-ai-answer-actions button { cursor: pointer; }
.adm-ai-quick-actions {
  flex: 0 0 auto;
  padding: 10px 14px;
  border-top: 1px solid #e6e9f1;
  background: #fff;
}
.adm-ai-quick-actions a:hover,
.adm-ai-quick-actions a:focus-visible,
.adm-ai-answer-actions a:hover,
.adm-ai-answer-actions button:hover { border-color: #c89238; background: #fff8e9; }
.adm-ai-suggestions {
  display: block;
  min-height: 0;
  padding: 10px 16px 8px;
  background: #f7f8fc;
}
.adm-ai-suggestions[hidden] { display: none; }
.adm-ai-suggestions > strong {
  display: block;
  margin-bottom: 7px;
  color: #718096;
  font: 700 10px/1.2 "DM Sans", Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.adm-ai-suggestion-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.adm-ai-suggestion {
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #e0e5ef;
  border-radius: 10px;
  background: #fff;
  color: #465274;
  font: 600 11px/1.35 "DM Sans", Arial, sans-serif;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}
.adm-ai-form {
  flex: 0 0 auto;
  min-height: 72px;
  height: auto;
  padding: 12px 14px;
  background: #fff;
}
.adm-ai-form input {
  height: 46px !important;
  border: 1px solid #ccd4e2 !important;
  border-radius: 13px !important;
  font-family: "DM Sans", Arial, sans-serif !important;
}
.adm-ai-form input:focus {
  border-color: #c89238 !important;
  outline: 3px solid rgba(200, 146, 56, .16);
}
.adm-ai-form button { cursor: pointer; }
.adm-ai-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
}
.adm-ai-chat--public .adm-ai-panel {
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
}
.adm-ai-panel[hidden] { display: none !important; }

@media (max-width: 600px) {
  .horizon-portal .adm-ai-panel {
    top: 70px;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    height: auto !important;
    max-height: none;
  }
  .adm-ai-home { padding: 16px; }
  .adm-ai-home ul, .adm-ai-suggestion-list { grid-template-columns: 1fr; }
  .adm-ai-messages { padding: 14px; }
  .adm-ai-panel .adm-ai-header { min-height: 72px; padding: 11px 13px; }
  .adm-ai-knowledge { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .adm-ai-suggestions { max-height: 150px; overflow-y: auto; }
}
