/* =========
   Reset + base
   ========= */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #3b1b2f;
}

/* =========
   Background (sem Tailwind)
   ========= */
.page {
  min-height: 100%;
  overflow: auto;

  /* bg-gradient-to-br from-pink-100 via-rose-50 to-purple-100 */
  background: linear-gradient(135deg, #fce7f3 0%, #fff1f2 45%, #f3e8ff 100%);

  /* heart-bg (igual ao seu data-uri) */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath fill='%23ec489915' d='M30 54s-18-12.5-18-27c0-8.3 6.7-15 15-15 4.8 0 9.1 2.3 12 5.8 2.9-3.5 7.2-5.8 12-5.8 8.3 0 15 6.7 15 15 0 14.5-18 27-18 27h-18z'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #fce7f3 0%, #fff1f2 45%, #f3e8ff 100%);
}

/* =========
   Layout
   ========= */
.app {
  width: 100%;
  min-height: 100%;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.header {
  width: 100%;
  max-width: 520px;
  margin-bottom: 24px;
  text-align: center;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid #fbcfe8; /* pink-200 */
  background: rgba(255,255,255,.70);
  backdrop-filter: blur(8px);
  text-decoration: none;
  color: #7a2953;
  transition: background .2s ease, transform .2s ease;
}
.btn-back:hover { background: rgba(255,255,255,.92); transform: translateY(-1px); }

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.brand-icon {
  width: 36px;
  height: 36px;
  color: #ec4899;
}

.brand-name {
  margin: 0;
  font-weight: 800;
  font-size: 34px;
  line-height: 1.1;

  /* bg-gradient-to-r from-pink-500 to-purple-600 + text-transparent */
  background: linear-gradient(90deg, #ec4899 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  margin: 8px 0 0;
  font-weight: 600;
  color: #db2777; /* pink-600 */
}

/* =========
   Card
   ========= */
.card {
  width: 100%;
  max-width: 520px;
  border-radius: 24px;
  overflow: hidden;

  border: 1px solid #fbcfe8;
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 45px rgba(0,0,0,.12);
}

.card-top {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;

  background: linear-gradient(90deg, #f472b6 0%, #a855f7 100%);
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 18px rgba(0,0,0,.16);

  display: grid;
  place-items: center;
  font-size: 34px;
}

.agent-title {
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

.agent-status {
  margin: 4px 0 0;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4ade80; /* green-400 */
}

/* =========
   Messages
   ========= */
.messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;

  max-height: 384px;
  overflow-y: auto;
}

.msg-row { display: flex; }
.msg-left { justify-content: flex-start; }
.msg-right { justify-content: flex-end; }

.bubble {
  max-width: 360px;
  padding: 12px;
  border-radius: 18px;
  white-space: pre-line;
  position: relative;
}

.bubble-agent {
  background: #fff;
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
  color: #3b1b2f;
}

.bubble-user {
  background: #ec4899;
  color: #fff;
}

.bubble-agent::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 12px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent #fff transparent transparent;
}

.bubble-user::before {
  content: "";
  position: absolute;
  right: -8px;
  left: auto;
  top: 12px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent transparent transparent #ec4899;
}

/* =========
   Input area
   ========= */
.input {
  padding: 16px;
  background: #fdf2f8; /* pink-50 */
  border-top: 1px solid #fbcfe8; /* pink-200 */
}

.form-row {
  display: flex;
  gap: 10px;
}

.field {
  flex: 1;
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid #fbcfe8;
  outline: none;
  background: #fff;
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field:focus {
  border-color: #ec4899;
  box-shadow: 0 0 0 4px rgba(236,72,153,.15);
}

.btn-send {
  padding: 12px 18px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(90deg, #ec4899 0%, #a855f7 100%);
  transition: transform .15s ease, filter .15s ease;
}
.btn-send:hover { transform: translateY(-1px); filter: brightness(0.98); }
.btn-send:active { transform: translateY(0px); }

.meta-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.link {
  color: #be185d; /* pink-700 */
  font-weight: 700;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.meta-hint {
  font-size: 12px;
  color: #db2777; /* pink-600 */
}

/* =========
   Progress
   ========= */
.progress {
  width: 100%;
  max-width: 520px;
  margin-top: 16px;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
  color: #db2777;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #fbcfe8;
  overflow: hidden;
}

.progress-bar {
  height: 8px;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ec4899 0%, #a855f7 100%);
  transition: width .5s ease;
}

.footnote {
  width: 100%;
  max-width: 520px;
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: #be185d;
}

/* =========
   Animations (as suas)
   ========= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-5px); }
}
@keyframes pulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.05); }
}
@keyframes typing {
  0%,60%,100% { opacity: 1; }
  30%         { opacity: .3; }
}

.fade-in { animation: fadeInUp .5s ease-out both; }
.bounce { animation: bounce 2s ease-in-out infinite; }
.pulse-soft { animation: pulse 2s ease-in-out infinite; }

/* Typing dots */
.typing { display: inline-flex; gap: 6px; align-items: center; }
.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f472b6; /* pink-400 */
  animation: typing 1.4s ease-in-out infinite;
}
.typing-dot:nth-child(2){ animation-delay: .2s; }
.typing-dot:nth-child(3){ animation-delay: .4s; }

/* =========
   Responsive
   ========= */
@media (min-width: 768px){
  .brand-name { font-size: 40px; }
  .subtitle { font-size: 18px; }
  .bubble { max-width: 420px; }
}