/* ===========================
   AGENTE META INTELBRAS
   Redesign — Brandbook 2026
=========================== */

:root {
  --green:        #00A335;
  --green-hover:  #00863F;
  --green-dark:   #006B2E;
  --green-light:  #E5F6ED;
  --green-mid:    #B8EACC;
  --blue:         #405792;
  --dark:         #2B2E38;
  --text:         #3E5055;
  --text-light:   #6B7C80;
  --border:       #DDE3E5;
  --bg-page:      #F4F7F8;
  --bg-card:      #FFFFFF;
  --radius-xl:    20px;
  --radius-lg:    14px;
  --radius-md:    10px;
  --shadow-card:  0 20px 60px rgba(0,0,0,.09), 0 4px 16px rgba(0,163,53,.07);
  --shadow-btn:   0 4px 14px rgba(0,163,53,.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── HEADER ── */
.header {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,163,53,.25);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo { height: 34px; }

.header-divider {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,.3);
}

.header-title p {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
}

.header-title small {
  color: rgba(255,255,255,.7);
  font-size: 12px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-mid);
  animation: pulse 1.5s ease-in-out infinite;
}

.header-status span {
  color: rgba(255,255,255,.75);
  font-size: 12px;
}

/* ── MAIN GRID ── */
.hero-centered {
  flex: 1;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 48px;
  align-items: start;
}

/* ── LEFT COLUMN ── */
.hero-content-centered {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-light);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 100px;
  width: fit-content;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.hero-content-centered h2 {
  font-size: 38px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

.hero-content-centered h2 span { color: var(--green); }

.hero-description {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-light);
}

/* ── FEATURES GRID ── */
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .2s, transform .2s;
}

.feature-item:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.07);
  transform: translateY(-2px);
}

.feature-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.feature-icon svg { width: 18px; height: 18px; }

.feature-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}

.feature-desc {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.5;
}

/* ── STATS BAR ── */
.stats-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-item { text-align: center; }

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
}

.stat-label {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
}

/* ── CHAT CARD ── */
.chat-container { width: 100%; }

.chat-card {
  background: var(--bg-card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  height: 620px;
}

.chat-header {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.chat-header-info { flex: 1; }

.chat-header-name {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

.chat-header-status {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
}

.chat-header-status .status-dot { width: 6px; height: 6px; }

.chat-header-status span {
  color: rgba(255,255,255,.7);
  font-size: 11px;
}

/* ── MESSAGES ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 18px;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 8px;
}

/* ── MESSAGE BUBBLES ── */
.msg-row-user {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.msg-row-agent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.msg-agent-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
  box-shadow: 0 2px 8px rgba(0,163,53,.3);
}

.msg-user-bubble {
  max-width: 72%;
}

.msg-user-bubble .bubble {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.msg-user-bubble .msg-time {
  text-align: right;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

.msg-agent-body { flex: 1; min-width: 0; }

.msg-agent-body .bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px 18px 18px 18px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
  overflow-x: auto;
}

.msg-agent-body .msg-time {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ── MARKDOWN INSIDE AGENT ── */
.bubble h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  border-bottom: 2px solid var(--green-light);
  padding-bottom: 4px;
  margin: 16px 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bubble h2:first-child { margin-top: 0; }

.bubble h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin: 10px 0 6px;
}

.bubble p { margin-bottom: 8px; color: var(--text); }
.bubble p:last-child { margin-bottom: 0; }

.bubble strong { color: var(--green-dark); }

.bubble hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.bubble ol, .bubble ul { padding-left: 20px; margin: 8px 0; }
.bubble li { margin-bottom: 6px; }

.bubble code {
  background: var(--bg-page);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.bubble pre {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
  margin: 10px 0;
  font-size: 12px;
}

/* ── COPY BUTTON ── */
.copy-btn {
  background: var(--green-light);
  color: var(--green);
  border: none;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}

.copy-btn:hover { background: var(--green-mid); }

/* ── TYPING INDICATOR ── */
.msg-typing {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}

.typing-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px 18px 18px 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-light);
  animation: bounce 0.9s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: .15s; }
.typing-dot:nth-child(3) { animation-delay: .30s; }

/* ── CHAT FORM ── */
.chat-form-wrapper {
  padding: 14px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg-page);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
  transition: border-color .2s;
}

.chat-form:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,163,53,.08);
}

.chat-form textarea {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  outline: none;
  font-size: 14px;
  line-height: 1.6;
  font-family: inherit;
  color: var(--text);
  min-height: 24px;
  max-height: 120px;
}

.chat-form textarea::placeholder { color: var(--text-light); }

.btn-send {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: opacity .2s, box-shadow .2s;
  box-shadow: var(--shadow-btn);
}

.btn-send:hover { opacity: .88; }
.btn-send:disabled { background: var(--border); box-shadow: none; cursor: not-allowed; }

.btn-send svg { width: 15px; height: 15px; }

.form-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 8px;
}

/* ── FOOTER ── */
.footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-light);
}

.footer strong { color: var(--green); font-weight: 600; }

/* ── ANIMATIONS ── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

@keyframes bounce {
  0%, 80%, 100% { transform: translateY(0); }
  40%           { transform: translateY(-6px); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg-row-user,
.msg-row-agent,
.msg-typing {
  animation: fadeInUp .22s ease forwards;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hero-centered {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }

  .chat-card { height: 70vh; }
}

@media (max-width: 640px) {
  .header { padding: 14px 20px; }
  .header-title small { display: none; }
  .hero-centered { gap: 28px; }
  .hero-content-centered h2 { font-size: 28px; }
  .stats-bar { display: none; }
  .chat-card { height: 65vh; border-radius: 18px; }
}
