.ai-launcher {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 35;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  min-width: 220px;
  padding: 12px 14px;
  border: 1px solid rgba(221, 236, 116, 0.2);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #0d4b46, #0d7068);
  box-shadow: 0 18px 45px rgba(8, 54, 50, 0.27);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-launcher:hover { transform: translateY(-3px); box-shadow: 0 22px 55px rgba(8, 54, 50, 0.32); }
.ai-launcher > span:nth-child(2) { text-align: left; }
.ai-launcher small, .ai-launcher strong { display: block; }
.ai-launcher small { margin-bottom: 2px; color: #ddec74; font-size: 7px; letter-spacing: 1.2px; }
.ai-launcher strong { font-size: 12px; }
.ai-launcher b { padding: 7px 9px; border-radius: 9px; color: #ddec74; background: rgba(255,255,255,.08); font-size: 8px; }

.ai-orbit { position: relative; display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid rgba(221,236,116,.35); border-radius: 50%; }
.ai-orbit::before { content: ""; width: 14px; height: 14px; border: 1px solid rgba(221,236,116,.22); border-radius: 50%; }
.ai-orbit > i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #ddec74; box-shadow: 0 0 8px rgba(221,236,116,.7); }
.ai-orbit > i:first-child { transform: translate(-10px, 2px); }.ai-orbit > i:nth-child(2) { transform: translate(5px, -11px); }.ai-orbit > i:last-child { transform: translate(9px, 8px); }

.ai-panel {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 45;
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr) auto auto auto;
  width: min(410px, calc(100vw - 36px));
  height: min(680px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid #d9e5e2;
  border-radius: 24px;
  background: #f8faf9;
  box-shadow: 0 30px 90px rgba(7, 45, 42, 0.28);
  opacity: 0;
  transform: translateY(18px) scale(.97);
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.ai-panel.open { opacity: 1; transform: translateY(0) scale(1); visibility: visible; }
.ai-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 19px; color: white; background: linear-gradient(135deg, #0c4541, #0d675f); }
.ai-title { display: flex; align-items: center; gap: 11px; }.ai-title .ai-orbit { width: 32px; height: 32px; }.ai-title strong, .ai-title small { display: block; }.ai-title strong { margin-bottom: 4px; font-size: 13px; }.ai-title small { display: flex; align-items: center; gap: 6px; color: #a9cec7; font-size: 8px; }.ai-title small i { width: 5px; height: 5px; border-radius: 50%; background: #ddec74; box-shadow: 0 0 7px #ddec74; }
.ai-header-actions { display: flex; align-items: center; gap: 7px; }.ai-header-actions button { border: 1px solid rgba(255,255,255,.15); border-radius: 9px; color: #dcebe8; background: rgba(255,255,255,.07); cursor: pointer; }.ai-header-actions button:first-child { padding: 8px 10px; font-size: 8px; }.ai-header-actions button:last-child { width: 31px; height: 31px; font-size: 18px; }
.ai-context { padding: 12px 18px; border-bottom: 1px solid #e4ebe9; background: #fff; }.ai-context span { color: #4d6f69; font-size: 9px; font-weight: 700; }.ai-context span b { color: #0d7068; }.ai-context p { margin: 5px 0 0; color: #8b9b98; font-size: 8px; }
.ai-messages { overflow-y: auto; padding: 18px; scroll-behavior: smooth; }
.ai-message { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }.ai-message > span { flex: 0 0 auto; display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; color: #fff; background: #0d7068; font-size: 7px; font-weight: 800; }.ai-message p { max-width: 82%; margin: 0; padding: 11px 12px; border: 1px solid #dfe8e5; border-radius: 4px 13px 13px 13px; color: #3d5b57; background: #fff; font-size: 10px; line-height: 1.65; word-break: keep-all; }.ai-message.user { flex-direction: row-reverse; }.ai-message.user > span { color: #50362d; background: #f6b48e; }.ai-message.user p { color: #fff; border-color: #0d7068; border-radius: 13px 4px 13px 13px; background: #0d7068; }
.ai-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: -8px 0 14px 33px; }.ai-tags span { padding: 5px 7px; border-radius: 999px; color: #4d756f; background: #e5f2ee; font-size: 7px; }
.ai-alert { margin: 0 0 14px 33px; padding: 10px 11px; border-left: 3px solid #d1df5c; border-radius: 8px; color: #49635f; background: #f3f7d9; font-size: 8px; line-height: 1.55; }
.ai-suggestions { display: flex; gap: 6px; overflow-x: auto; padding: 9px 15px 3px; scrollbar-width: none; }.ai-suggestions::-webkit-scrollbar { display: none; }.ai-suggestions button { flex: 0 0 auto; padding: 7px 9px; border: 1px solid #dbe6e3; border-radius: 999px; color: #5c7470; background: #fff; font-size: 8px; cursor: pointer; }.ai-suggestions button:hover { color: #0d7068; border-color: #a9cec6; }
.ai-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; margin: 10px 14px 0; padding: 8px 8px 8px 13px; border: 1px solid #d6e2df; border-radius: 15px; background: #fff; }.ai-form textarea { max-height: 88px; resize: none; overflow-y: auto; border: 0; outline: 0; padding: 5px 0; color: #254844; background: transparent; font: inherit; font-size: 10px; line-height: 1.5; }.ai-form textarea::placeholder { color: #9aaba7; }.ai-form button { width: 34px; height: 34px; border: 0; border-radius: 11px; color: white; background: #0d7068; font-size: 17px; cursor: pointer; }.ai-disclaimer { margin: 8px 16px 13px; color: #98a5a2; font-size: 7px; text-align: center; }

@media (max-width: 720px) {
  .ai-launcher { right: 14px; bottom: 82px; min-width: 176px; padding: 9px 10px; }.ai-launcher b { display: none; }.ai-orbit { width: 31px; height: 31px; }
  .ai-panel { right: 0; bottom: 0; width: 100%; height: min(760px, 92vh); border-radius: 22px 22px 0 0; }
}

@media (prefers-reduced-motion: reduce) { .ai-panel, .ai-launcher { transition: none; } }
