/* ===== Reset e Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --pink: #ec0978;
  --pink-600: #d0086c;
  --pink-50: #fff4fa;
  --ink: #0f172a;
  --sky: #f8fafc;
  --footer: #232a3b;
  --muted: #6b7280;
  --radius: 16px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== TOPBAR ===== */
.topbar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: #1e293b;
}

.mark {
  width: 32px;
  height: 32px;
  background: var(--pink);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1.2rem;
}

.menu {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #334155;
  font-weight: 500;
}

.menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  opacity: 0.85;
}

.menu a:hover {
  opacity: 1;
}

.menu .active {
  position: relative;
  color: #0f172a;
  opacity: 1;
}

.menu .active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 3px;
  background: var(--pink);
  border-radius: 2px;
}

.avatar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge {
  height: 34px;
  width: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--pink);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
}

.caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #0f172a;
  opacity: 0.65;
}

/* ===== HERO / MAIN ===== */
.hero {
  flex: 1;
  padding: 32px 16px 24px;
  background: radial-gradient(1200px 800px at 70% -20%, #ffd8ea 0, transparent 60%),
              linear-gradient(180deg, rgba(236,9,120,.05), transparent 60%);
}

.shell {
  max-width: 800px;
  margin: 0 auto;
}

.card {
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(236,9,120,.08);
  overflow: hidden;
}

.card-head {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fff, #fff8fc);
}

.status-dot {
  height: 10px;
  width: 10px;
  border-radius: 999px;
  background: var(--pink);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.card-title {
  font-weight: 700;
  color: #111827;
}

/* ===== CHAT CONTAINER ===== */
.chat-container {
  padding: 20px;
  min-height: 500px;
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.message-row.user {
  justify-content: flex-end;
}

.avatar-chat {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar-chat img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bubble {
  max-width: 70%;
  padding: 12px 16px;
  border-radius: 16px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.bubble.bot {
  background: #f1f5f9;
  color: #1e293b;
  border-bottom-left-radius: 4px;
}

.bubble.user {
  background: var(--pink);
  color: white;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #94a3b8;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ===== INPUT AREA ===== */
.input-area {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 12px;
}

.input-cpf {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.input-cpf:focus {
  border-color: var(--pink);
}

.btn-primary {
  padding: 12px 24px;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--pink-600);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

/* ===== IMAGES ===== */
.bubble-image {
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
}

.bubble-image img {
  display: block;
  width: 100%;
  height: auto;
}

.bubble-image.small {
  max-width: 200px;
}

.bubble-image.medium {
  max-width: 320px;
}

.bubble-image.large {
  max-width: 400px;
}

/* ===== YOUTUBE ===== */
.youtube-container {
  border-radius: 12px;
  overflow: hidden;
  max-width: 400px;
  background: #000;
}

.youtube-container iframe {
  display: block;
  width: 100%;
  height: 225px;
}

/* ===== AUDIO PLAYER ===== */
.audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: 24px;
  min-width: 280px;
  max-width: 300px;
  width: 100%;
}

.play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--pink);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.play-btn svg {
  width: 14px;
  height: 14px;
}

.audio-progress {
  flex: 1;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  overflow: hidden;
}

.audio-progress-bar {
  height: 100%;
  background: var(--pink);
  width: 0%;
  transition: width 0.1s;
}

.audio-time {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

/* ===== DATA LIST ===== */
.data-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.data-item {
  font-size: 0.9rem;
  color: #475569;
}

/* ===== APPROVED BANNER ===== */
.approved-banner {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  max-width: 350px;
}

.approved-banner-header {
  background: var(--pink);
  color: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.approved-banner-header h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.approved-banner-header p {
  font-size: 0.85rem;
  opacity: 0.9;
}

.check-icon {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-icon svg {
  width: 24px;
  height: 24px;
}

.approved-content {
  padding: 20px;
  text-align: center;
  background: linear-gradient(to bottom, #fff, #fff8fc);
}

.approved-content img {
  width: 80px;
  height: auto;
  margin-bottom: 12px;
}

.approved-content h4 {
  color: #1e293b;
  margin-bottom: 8px;
}

.approved-content p {
  color: #64748b;
  font-size: 0.9rem;
}

/* ===== ACORDO BOX ===== */
.acordo-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  max-width: 350px;
}

.acordo-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
}

.acordo-row:last-child {
  border-bottom: none;
}

.acordo-label {
  color: #64748b;
  font-size: 0.9rem;
}

.acordo-value {
  font-weight: 600;
  color: #1e293b;
}

.acordo-value.highlight {
  color: #16a34a;
}

/* ===== SCORE CARD ===== */
.score-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  max-width: 350px;
}

.score-card-header {
  background: var(--pink);
  color: white;
  padding: 12px 16px;
  font-size: 0.9rem;
  text-align: center;
}

.score-card-body {
  padding: 20px;
  text-align: center;
}

.score-meter {
  width: 150px;
  height: 75px;
  margin: 0 auto 16px;
  position: relative;
}

.score-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
}

.score-value span {
  font-size: 1rem;
  font-weight: 400;
  color: #64748b;
}

.score-label {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e293b;
}

/* ===== FOOTER ===== */
footer {
  background: var(--footer);
  color: #cbd5e1;
  margin-top: auto;
}

.foot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 16px 32px;
}

.foot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.9;
}

.foot-brand .mark {
  height: 30px;
  width: 30px;
  border-radius: 8px;
  background: #2d3550;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #fff;
}

.links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.links a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
}

.links a:hover {
  color: #fff;
}

.foot-mid {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.policies {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.policies a {
  color: #e5e7eb;
  text-decoration: none;
}

.policies a:hover {
  text-decoration: underline;
}

/* ===== MODAL ===== */
dialog {
  width: min(820px, 92vw);
  border: 0;
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}

dialog::backdrop {
  background: rgba(0,0,0,0.5);
}

.modal-head {
  padding: 16px 18px;
  background: var(--pink);
  color: #fff;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 18px;
  max-height: 70vh;
  overflow: auto;
  background: #fff;
}

.modal-body h4 {
  margin: 1rem 0 0.25rem;
  color: #111827;
}

.btn-close {
  all: unset;
  cursor: pointer;
  font-weight: 900;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .menu {
    display: none;
  }
  
  .bubble {
    max-width: 85%;
  }
  
  .chat-container {
    padding: 15px;
  }
}


/* ===== AUDIO PLAYER NATIVO ===== */
.audio-player audio {
  width: 100%;
  max-width: 300px;
  height: 40px;
  border-radius: 20px;
}

/* ===== BOTÃO ROSA ===== */
.btn-primary {
  padding: 12px 24px;
  background: linear-gradient(135deg, #ec0978 0%, #d0086c 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 15px rgba(236,9,120,0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236,9,120,0.5);
  background: linear-gradient(135deg, #d0086c 0%, #ec0978 100%);
}

.btn-primary:active {
  transform: translateY(0);
}
