﻿:root {
    --enzo-primary: #1f4e79;
    --enzo-bg: #f5f7fa;
}

html { font-size: 15px; }
body { background: var(--enzo-bg); min-height: 100vh; }

.bg-enzo { background: var(--enzo-primary); }

.card { border-radius: .6rem; }

/* Chat (estilo conversa: coluna central, sem moldura; caixa de pergunta arredondada embaixo) */
.chat-wrapper { display: flex; flex-direction: column; height: calc(100dvh - 92px); min-height: 420px; }
.chat-column { width: 100%; max-width: 800px; margin: 0 auto; padding: 0 .5rem; }

.chat-header { display: flex; align-items: center; gap: .6rem; padding-bottom: .5rem; flex: 0 0 auto; }
.chat-back { text-decoration: none; font-size: 1.2rem; color: #6c757d; line-height: 1; }
.chat-back:hover { color: var(--enzo-primary); }
.chat-title { font-weight: 600; font-size: 1rem; }
.chat-subtitle { font-size: .8rem; color: #6c757d; }

.chat-messages { flex: 1 1 auto; overflow-y: auto; padding: .5rem 0 1rem; }
.chat-bottom { flex: 0 0 auto; padding-top: .25rem; }

/* Sessao vazia: sem area de mensagens, caixa de pergunta centralizada */
.chat-wrapper.is-empty .chat-messages { flex: 0 0 auto; padding: 0; }
.chat-wrapper.is-empty .chat-bottom { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; padding-bottom: 12vh; }
.chat-welcome { font-size: 1.45rem; font-weight: 500; text-align: center; margin-bottom: 1.25rem; color: #212529; }

.msg { margin-bottom: 1.5rem; }
.msg-body { overflow-wrap: anywhere; line-height: 1.6; }
.msg-text { white-space: pre-wrap; }
.msg-meta { font-size: .75rem; color: #8a6d3b; margin-bottom: .2rem; }

.msg-user { display: flex; justify-content: flex-end; }
.msg-user .msg-body { background: #e4eaf2; padding: .6rem 1rem; border-radius: 1.25rem; max-width: 80%; }
.msg-assistant .msg-body { padding: 0 .25rem; }
.msg-system .msg-body { background: #fff8e8; border-left: 3px solid #e0a83a; padding: .5rem .9rem; border-radius: .4rem; font-size: .92rem; }
.msg-attachments { margin-top: .4rem; }

.composer { background: #fff; border: 1px solid #d5dbe2; border-radius: 1.5rem; padding: .6rem .7rem .5rem 1.1rem;
            box-shadow: 0 2px 10px rgba(16, 38, 64, .07); }
.composer:focus-within { border-color: #9db7d3; }
.composer-input { width: 100%; border: 0; outline: 0; resize: none; background: transparent; padding: .3rem 0;
                  max-height: 220px; line-height: 1.5; }
.composer-input:disabled { background: transparent; color: #6c757d; }
.composer-actions { display: flex; align-items: center; justify-content: space-between; margin-top: .25rem; }
.composer-attach { width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid #d5dbe2; display: inline-flex;
                   align-items: center; justify-content: center; cursor: pointer; color: #495057; font-size: 1.15rem; margin: 0; }
.composer-attach:hover { background: #f1f3f5; }
.composer-send { width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 0; background: var(--enzo-primary); color: #fff;
                 font-size: 1.1rem; font-weight: 700; line-height: 1; }
.composer-send:disabled { background: #c3ccd6; }
.composer-note { font-size: .75rem; color: #8a939c; text-align: center; margin-top: .45rem; }

.progress-pill { display: flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid #d5dbe2; border-radius: 1rem;
                 padding: .4rem .9rem; margin-bottom: .6rem; font-size: .9rem; }

.answer h2 { font-size: 1.1rem; margin-top: 1rem; color: var(--enzo-primary); }
.answer h2:first-child { margin-top: 0; }
.answer h3 { font-size: 1rem; margin-top: .8rem; }
.answer table { width: 100%; margin: .5rem 0 1rem; border-collapse: collapse; font-size: .9rem; }
.answer th, .answer td { border: 1px solid #dee2e6; padding: .35rem .5rem; vertical-align: top; }
.answer th { background: #f1f3f5; }
.answer code { color: #8a2c55; background: #f6f0f3; padding: 0 .25rem; border-radius: .2rem; }
.answer pre code { display: block; padding: .5rem; overflow-x: auto; }

.attachment-thumb { max-height: 140px; max-width: 220px; border: 1px solid #dee2e6; border-radius: .4rem; margin: .25rem .25rem 0 0; }


.session-list a { text-decoration: none; }
.text-pre { white-space: pre-wrap; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.preview-list img { max-height: 70px; margin: 0 .4rem .4rem 0; border-radius: .5rem; border: 1px solid #dee2e6; cursor: pointer; }

/* Paineis de renomear / repositorios no cabecalho do chat */
.session-panel { padding: .5rem 0 .75rem; border-bottom: 1px solid #e9ecef; margin-bottom: .25rem; align-items: center; }

/* Resumo final da investigacao */
.summary-card { border-color: #cfe2ff; }
.summary-card .card-header { background: #f1f6ff; }
