:root{
  --bg:#0b1220;
  --card:#ffffff;
  --soft:#f3f6ff;
  --text:#0f172a;
  --muted:#64748b;
  --accent:#10b981;
  --shadow:0 24px 70px rgba(0,0,0,.22);
  --radius:18px;
  --font:system-ui,-apple-system,Segoe UI,Roboto,Arial;
}

#amcChatFab{
  position:fixed; right:18px; bottom:18px;
  width:62px; height:62px; border-radius:999px;
  border:none; cursor:pointer;
  background:linear-gradient(145deg,#0b1220,#111827);
  color:#fff; font-weight:900;
  box-shadow:0 16px 40px rgba(0,0,0,.22);
  z-index:999999;
  display:flex; align-items:center; justify-content:center;
}

#amcChatFab:hover{transform:translateY(-1px)}

#amcChatBadge{
  position:absolute; top:10px; right:10px;
  width:10px; height:10px; border-radius:999px;
  background:#ef4444; display:none;
}

#amcChatShell{
  position:fixed; right:18px; bottom:92px;
  width:390px; max-width:calc(100vw - 36px);
  height:600px; max-height:calc(100vh - 140px);
  border-radius:22px;
  box-shadow:var(--shadow);
  overflow:hidden;
  z-index:999999;
  font-family:var(--font);
  background:var(--card);
  opacity:0; pointer-events:none;
  transform:translateY(12px) scale(.98);
  transition:all .18s ease;
  display:flex;
  flex-direction:column;
}

#amcChatShell.open{
  opacity:1; pointer-events:auto;
  transform:translateY(0) scale(1);
}

#amcTop{
  background:linear-gradient(135deg,#0b1220,#111827);
  color:#fff;
  padding:12px 14px;
  display:flex; align-items:center; justify-content:space-between;
  flex:0 0 auto;
}

#amcTop .title{font-weight:950;font-size:20px;letter-spacing:.2px}
#amcTop .sub{font-size:12px; opacity:.85}

#amcClose{
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  color:#fff; width:36px; height:36px;
  border-radius:14px; cursor:pointer;
  font-size:18px; line-height:1;
}

#amcClose:hover{background:rgba(255,255,255,.16)}

#amcContent{
  flex:1 1 auto;
  overflow:auto;
  background:var(--soft);
  padding:12px 12px 0;
}

.amcRow{display:flex; margin:10px 0}
.amcRow.user{justify-content:flex-end}
.amcRow.bot{justify-content:flex-start}
.amcRow.err{justify-content:flex-start}

.amcBubble{
  max-width:86%;
  padding:10px 12px;
  border-radius:16px;
  box-shadow:0 10px 26px rgba(0,0,0,.10);
  font-size:14px; line-height:1.25;
  white-space:pre-wrap;
}

.amcRow.user .amcBubble{background:#111827;color:#fff;border-bottom-right-radius:7px}
.amcRow.bot .amcBubble{background:#fff;color:var(--text);border-bottom-left-radius:7px}
.amcRow.err .amcBubble{background:#fff7ed;color:#7c2d12;border-bottom-left-radius:7px;font-weight:900}

#amcTyping{
  display:none;
  padding:8px 12px;
  margin:0 0 10px;
  color:var(--muted);
  font-size:12px;
}

#amcTyping .dots span{
  display:inline-block; width:6px; height:6px;
  border-radius:999px; background:#94a3b8;
  margin:0 2px; animation:dot 1s infinite;
}

#amcTyping .dots span:nth-child(2){animation-delay:.2s}
#amcTyping .dots span:nth-child(3){animation-delay:.4s}
@keyframes dot{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(-3px);opacity:1}}

#amcQuick{
  padding:8px 0 6px;
  display:flex; gap:8px; flex-wrap:wrap;
}

.amcChip{
  border:1px solid rgba(17,24,39,.10);
  background:#fff;
  color:#111827;
  padding:10px 12px;
  border-radius:999px;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
  box-shadow:0 10px 22px rgba(0,0,0,.08);
  transition:.12s ease;
}

.amcChip:hover{transform:translateY(-1px)}
.amcChip:active{transform:translateY(0px); opacity:.92}

#amcCards{
  padding:6px 0 12px;
  display:grid; gap:10px;
}

.amcCard{
  background:#fff;
  border-radius:16px;
  padding:10px;
  box-shadow:0 12px 28px rgba(0,0,0,.12);
  display:grid;
  grid-template-columns:110px 1fr;
  gap:12px;
  align-items:center;
}

.amcCard img{
  width:110px;height:110px;object-fit:cover;border-radius:14px;background:#e5e7eb;
}

.amcCard b{display:block;font-size:13px;margin-bottom:6px}
.amcCard .p1{font-weight:950;font-size:14px}
.amcCard .p2{font-weight:900;opacity:.65;text-decoration:line-through;font-size:12px;margin-top:2px}
.amcCard .inst{font-weight:900;opacity:.8;font-size:12px;margin-top:6px}
.amcCard a{
  display:inline-block;
  margin-top:8px;
  text-decoration:none;
  font-weight:950;
  font-size:13px;
  color:#0f766e;
}

#amcActions{
  padding:0 0 14px;
  display:none;
}

#amcWhats{
  display:inline-block;
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:0;
  background:var(--accent);
  color:#fff;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 12px 30px rgba(16,185,129,.28);
}

#amcBottom{
  flex:0 0 auto;
  padding:10px 10px calc(10px + env(safe-area-inset-bottom));
  border-top:1px solid #e5e7eb;
  background:#fff;
  display:flex;
  gap:8px;
  align-items:center;
}

#amcInput{
  flex:1;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid #e5e7eb;
  outline:none;
  font-size:14px;
}

#amcSend{
  padding:12px 14px;
  border-radius:14px;
  border:none;
  background:var(--accent);
  color:#fff;
  cursor:pointer;
  font-weight:950;
}
