/* ============================================================
   Vera live demo — chat panel + document scanner
   ============================================================ */

.vera-demo-hero .hero-card li span {
  color: var(--red);
  font-weight: 800;
  margin-right: 0.35rem;
}

.vera-panel-section {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- chat shell ---------- */
.vera-chat-shell {
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vera-chat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.vera-chat-head strong { display: block; line-height: 1.15; }
.vera-chat-head small { color: rgba(0, 0, 0, 0.55); font-size: 0.78rem; }

.vera-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(204, 18, 18, 0.15);
}

.vera-live-pill {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: #1c7c46;
  background: rgba(28, 124, 70, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.vera-messages {
  min-height: 320px;
  max-height: 520px;
  overflow-y: auto;
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.vera-welcome p { margin: 0 0 0.8rem; }

.vera-suggestions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.vera-suggestions button {
  text-align: left;
  font: inherit;
  font-size: 0.86rem;
  padding: 0.7rem 0.85rem;
  background: rgba(0, 0, 0, 0.035);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.vera-suggestions button:hover { border-color: var(--red); background: rgba(204, 18, 18, 0.04); }

.vera-msg-user {
  align-self: flex-end;
  max-width: 85%;
  background: rgba(204, 18, 18, 0.08);
  padding: 0.65rem 0.9rem;
  border-radius: 14px 14px 4px 14px;
  font-size: 0.92rem;
}

.vera-msg-assistant { max-width: 100%; font-size: 0.92rem; line-height: 1.55; }

.vera-msg-assistant .vera-answer { white-space: pre-wrap; }
.vera-msg-assistant .vera-answer strong { font-weight: 700; }

.vera-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.5rem; }

.vera-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.vera-tool-chip::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #18b59b;
}

.vera-cite {
  display: inline-block;
  margin: 0 2px;
  padding: 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(204, 18, 18, 0.08);
  border-radius: 4px;
  vertical-align: super;
}

.vera-sources {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.vera-sources .vera-sources-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
}

.vera-source-row { display: flex; gap: 0.5rem; font-size: 0.78rem; color: rgba(0, 0, 0, 0.6); }
.vera-source-row .vera-cite { align-self: flex-start; margin-top: 1px; }

.vera-thinking { color: rgba(0, 0, 0, 0.45); font-size: 0.85rem; }
.vera-thinking::after { content: "…"; animation: vera-ellipsis 1.2s steps(4) infinite; }

@keyframes vera-ellipsis { 0% { content: ""; } 33% { content: "."; } 66% { content: ".."; } 100% { content: "…"; } }

.vera-input {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.vera-input textarea {
  flex: 1;
  resize: none;
  max-height: 110px;
  font: inherit;
  font-size: 0.92rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  outline: none;
}

.vera-input textarea:focus { border-color: var(--red); }

.vera-input button {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: none;
  border-radius: 12px;
  background: var(--red);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
}

.vera-input button:disabled { opacity: 0.45; cursor: default; }

/* ---------- scanner ---------- */
.vera-scan-shell { display: flex; flex-direction: column; gap: 1rem; }

.vera-drop {
  border: 2px dashed rgba(204, 18, 18, 0.4);
  border-radius: var(--radius-md);
  background: rgba(204, 18, 18, 0.02);
  padding: 2.2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.vera-drop:hover, .vera-drop:focus-visible, .vera-drop.vera-drop-over {
  border-color: var(--red);
  background: rgba(204, 18, 18, 0.05);
}

.vera-drop-icon { font-size: 1.8rem; color: var(--red); margin-bottom: 0.4rem; }
.vera-drop p { margin: 0 0 0.25rem; }
.vera-drop small { color: rgba(0, 0, 0, 0.5); }

.vera-queue { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.vera-queue-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  box-shadow: var(--shadow-card);
}

.vera-queue-item img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.vera-queue-item .vera-file-pdf {
  width: 34px; height: 34px; border-radius: 6px;
  display: grid; place-items: center;
  background: rgba(204, 18, 18, 0.08); color: var(--red);
  font-size: 0.6rem; font-weight: 800;
}
.vera-queue-item button {
  border: none; background: transparent; cursor: pointer;
  color: rgba(0, 0, 0, 0.4); font-size: 0.9rem; padding: 0 0.2rem;
}

.vera-scan-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }

.vera-results { display: flex; flex-direction: column; gap: 1rem; }

.vera-result-card {
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 1.1rem 1.2rem;
}

.vera-result-card h3 { margin: 0 0 0.2rem; font-size: 1.02rem; }

.vera-result-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.35rem 0 0.7rem;
}

.vera-badge {
  font-size: 0.7rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px;
  background: rgba(0, 0, 0, 0.05); color: rgba(0, 0, 0, 0.6);
}
.vera-badge.vera-badge-type { background: rgba(204, 18, 18, 0.08); color: var(--red); }
.vera-badge.vera-badge-high { background: rgba(28, 124, 70, 0.1); color: #1c7c46; }
.vera-badge.vera-badge-medium { background: rgba(217, 161, 59, 0.15); color: #96690f; }
.vera-badge.vera-badge-low { background: rgba(204, 18, 18, 0.1); color: var(--red); }

.vera-result-card .vera-summary { font-size: 0.88rem; color: rgba(0, 0, 0, 0.65); margin: 0 0 0.8rem; }

.vera-fields { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.vera-fields td { padding: 0.35rem 0.5rem; border-top: 1px solid rgba(0, 0, 0, 0.06); vertical-align: top; }
.vera-fields td:first-child { color: rgba(0, 0, 0, 0.5); white-space: nowrap; width: 38%; }

.vera-flags { margin: 0.8rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.vera-flags li {
  font-size: 0.82rem;
  background: rgba(217, 161, 59, 0.1);
  border-left: 3px solid #d9a13b;
  padding: 0.45rem 0.6rem;
  border-radius: 0 8px 8px 0;
}
.vera-flags li.vera-flag-clean { background: rgba(28, 124, 70, 0.08); border-left-color: #1c7c46; }

.vera-error {
  font-size: 0.85rem; color: var(--red);
  background: rgba(204, 18, 18, 0.06);
  border-radius: 10px; padding: 0.6rem 0.8rem;
}

@media (max-width: 640px) {
  .vera-suggestions { grid-template-columns: 1fr; }
  .vera-messages { max-height: 60vh; }
}

.vera-hero-mascot {
  width: min(300px, 80%);
  height: auto;
  margin: 1rem auto 0;
  display: block;
  border-radius: var(--radius-md);
}
