.atache-ai {
  --ai-ink: #11120f;
  --ai-coral: #ff5b36;
  --ai-acid: #dff56e;
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 1000;
  font-family: "Manrope", sans-serif;
}

.atache-ai__launcher {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 7px 18px 7px 7px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: var(--ai-ink);
  color: #fff;
  box-shadow: 0 18px 55px rgba(17, 18, 15, .28);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}

.atache-ai__launcher:hover { transform: translateY(-3px); box-shadow: 0 24px 65px rgba(17, 18, 15, .36); }
.atache-ai__monogram { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ai-coral); font-weight: 800; }
.atache-ai__launcher-label { font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.atache-ai__pulse { position: absolute; left: 38px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--ai-acid); box-shadow: 0 0 0 4px rgba(223, 245, 110, .17); }

.atache-ai__panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto;
  width: min(390px, calc(100vw - 32px));
  height: min(610px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid rgba(17, 18, 15, .12);
  border-radius: 28px;
  background: rgba(252, 250, 245, .97);
  box-shadow: 0 32px 90px rgba(17, 18, 15, .28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .28s cubic-bezier(.2, .8, .2, 1);
  backdrop-filter: blur(22px);
}

.atache-ai__panel.is-open { opacity: 1; pointer-events: auto; transform: none; }
.atache-ai__header { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 17px; background: var(--ai-ink); color: #fff; }
.atache-ai__header div { display: grid; gap: 2px; }
.atache-ai__title { font-family: "Bodoni Moda", serif; font-size: 22px; }
.atache-ai__subtitle { color: rgba(255, 255, 255, .58); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.atache-ai__close { width: 36px; height: 36px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; background: transparent; color: #fff; font-size: 24px; cursor: pointer; }
.atache-ai__messages { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding: 18px; background-image: radial-gradient(circle at 10% 0, rgba(255, 91, 54, .09), transparent 28%); }
.atache-ai__message { max-width: 86%; padding: 12px 14px; border-radius: 17px; white-space: pre-wrap; font-size: 13px; line-height: 1.55; animation: ai-message-in .24s ease both; }
.atache-ai__message--assistant { align-self: flex-start; border: 1px solid rgba(17, 18, 15, .09); border-bottom-left-radius: 5px; background: #fff; color: var(--ai-ink); }
.atache-ai__message--user { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--ai-coral); color: #fff; }
.atache-ai__message.is-thinking { color: var(--ai-coral); letter-spacing: 4px; }
.atache-ai__sources { display: flex; flex-wrap: wrap; gap: 7px; margin-top: -5px; }
.atache-ai__sources a { padding: 7px 10px; border: 1px solid rgba(17, 18, 15, .11); border-radius: 999px; background: rgba(223, 245, 110, .42); color: var(--ai-ink); font-size: 10px; font-weight: 800; text-decoration: none; }
.atache-ai__sources a:hover { background: var(--ai-acid); }
.atache-ai__sales-cta { margin: 0 14px 10px; min-height: 40px; border: 0; border-radius: 13px; background: var(--ai-acid); color: var(--ai-ink); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.atache-ai__lead-form { position: absolute; inset: 72px 12px 12px; z-index: 4; align-content: start; gap: 10px; overflow-y: auto; padding: 20px; border: 1px solid rgba(17, 18, 15, .12); border-radius: 20px; background: #fff; box-shadow: 0 18px 60px rgba(17, 18, 15, .22); }
.atache-ai__lead-form[hidden] { display: none; }
.atache-ai__lead-title { margin-bottom: 4px; font-family: "Bodoni Moda", serif; font-size: 23px; }
.atache-ai__lead-form input:not([type="checkbox"]) { width: 100%; min-height: 43px; border: 1px solid rgba(17, 18, 15, .14); border-radius: 12px; padding: 10px 12px; background: #f6f3eb; color: var(--ai-ink); font: inherit; box-sizing: border-box; }
.atache-ai__consent { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; color: rgba(17, 18, 15, .72); font-size: 11px; line-height: 1.4; }
.atache-ai__lead-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 8px; }
.atache-ai__lead-actions button { min-height: 42px; border: 0; border-radius: 12px; font: inherit; font-size: 11px; font-weight: 800; cursor: pointer; }
.atache-ai__lead-cancel { background: #eeeae0; color: var(--ai-ink); }
.atache-ai__lead-submit { background: var(--ai-coral); color: #fff; }
.atache-ai__form { display: grid; grid-template-columns: 1fr auto; gap: 9px; padding: 12px 14px; border-top: 1px solid rgba(17, 18, 15, .09); background: #fff; }
.atache-ai__input { min-height: 44px; max-height: 110px; resize: vertical; border: 1px solid rgba(17, 18, 15, .13); border-radius: 14px; padding: 11px 13px; background: #f6f3eb; color: var(--ai-ink); font: inherit; font-size: 13px; outline: none; }
.atache-ai__input:focus { border-color: var(--ai-coral); box-shadow: 0 0 0 3px rgba(255, 91, 54, .1); }
.atache-ai__send { align-self: end; min-height: 44px; border: 0; border-radius: 14px; padding: 0 16px; background: var(--ai-ink); color: #fff; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.atache-ai__send:disabled { cursor: wait; opacity: .5; }
.atache-ai__notice { padding: 0 16px 13px; background: #fff; color: rgba(17, 18, 15, .48); font-size: 9px; line-height: 1.4; text-align: center; }

@keyframes ai-message-in { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 600px) {
  .atache-ai { right: 12px; bottom: 12px; }
  .atache-ai__launcher { min-height: 50px; padding-right: 14px; }
  .atache-ai__panel { position: fixed; right: 10px; bottom: 74px; width: calc(100vw - 20px); height: min(640px, calc(100vh - 92px)); border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .atache-ai__panel, .atache-ai__launcher, .atache-ai__message { transition: none; animation: none; }
}
