/* NexaMind · main.css · Beta MVP */

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

:root {
    --primary: #00a884;
    --primary-dark: #008f72;
    --bg: #f7f9fa;
    --card: #ffffff;
    --border: #e9edef;
    --text: #111b21;
    --muted: #667781;
    --danger: #ea0038;
    --warning: #f59e0b;
    --wa-out: #d9fdd3;
    --wa-in: #ffffff;
    --wa-bg: #efeae2;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== BANNER BETA ===== */
.beta-banner {
    background: #fff8e1;
    border-bottom: 1px solid #f5c518;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    color: #5d4a04;
}
.beta-banner a { color: var(--primary-dark); margin-left: 6px; }

.beta-tag {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 6px;
}

/* ===== HEADER ===== */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.3px;
}
.header nav { display: flex; gap: 16px; flex: 1; }
.header nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
}
.header nav a:hover { background: var(--bg); }

.contador-wrap {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.contador-tag {
    background: var(--primary);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}
.contador-email { color: var(--muted); margin-left: 8px; font-size: 11px; }
.btn-sair {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 8px;
    font-weight: 500;
}
.btn-sair:hover { background: #fee; border-color: var(--danger); color: var(--danger); }

/* ===== MAIN ===== */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
    width: 100%;
    flex: 1;
}

.footer {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    align-items: center;
}
.footer-whatsapp {
    color: #fff;
    background: #25d366;
    text-decoration: none;
    font-weight: 600;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(37,211,102,0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.footer-whatsapp:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(37,211,102,0.55);
    text-decoration: none;
}
.footer-link {
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
}
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* Botao "+200 creditos" no topo (header) */
.btn-creditos-topo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(37,211,102,0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    line-height: 1.1;
}
.btn-creditos-topo:hover {
    background: #1ebe5b;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(37,211,102,0.45);
}
.btn-creditos-topo .wa-icon-mini {
    display: inline-flex;
    align-items: center;
}

/* Botao "Exportar prompt" no card de atendente · destacado */
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    line-height: 1.1;
    transition: background 0.15s ease, transform 0.1s ease;
}
.btn-export:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}
.btn-export svg { display: block; }

/* Dica destacada no welcome modal */
.welcome-tip {
    background: #eafff5;
    border-left: 3px solid var(--primary);
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 10px;
}
.welcome-tip code {
    background: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
    color: var(--primary-dark);
    border: 1px solid #d6f0e2;
}
.welcome-slide code {
    background: #f0f9ff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.92em;
    color: var(--primary-dark);
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 64px 24px;
}
.hero h1 {
    font-size: 38px;
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 16px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.hero .subtitle {
    color: var(--muted);
    font-size: 17px;
    max-width: 700px;
    margin: 0 auto 32px;
}
.cta-row { display: flex; justify-content: center; gap: 12px; }

/* ===== CARDS ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 48px;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}
.card h3 { margin-bottom: 12px; color: var(--primary-dark); }
.card p { color: var(--muted); font-size: 14px; }

/* ===== PAGE HEADER ===== */
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 28px; margin-bottom: 8px; }
.page-header p { color: var(--muted); margin-bottom: 16px; }
.muted { color: var(--muted); font-size: 13px; }

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-secondary:hover { background: #e8f7f1; }
.btn-link {
    background: transparent;
    color: var(--muted);
    border: none;
    padding: 8px 0;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn-link:hover { color: var(--primary); }
.btn-whatsapp { background: #25d366; }
.btn-whatsapp:hover { background: #1faa54; }

/* ===== MODAL ===== */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}
.overlay.active { display: flex; }
.modal {
    background: #fff;
    width: 420px;
    max-width: 92vw;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.modal h2 { font-size: 22px; margin-bottom: 8px; line-height: 1.3; }
.modal p { color: var(--muted); margin-bottom: 18px; font-size: 14px; }
.modal label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    margin-top: 12px;
    margin-bottom: 6px;
}
.modal input, .modal textarea, .modal select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.modal input:focus, .modal textarea:focus, .modal select:focus {
    border-color: var(--primary);
    background: #fff;
}
.aceite { display: flex; gap: 8px; margin-top: 16px; font-size: 12px; color: var(--muted); }
.aceite input { width: auto; margin-top: 2px; }
.modal .btn-primary { width: 100%; margin-top: 18px; }
.erro { color: var(--danger); font-size: 12px; margin-top: 8px; min-height: 16px; }
.loading { color: var(--muted); font-size: 12px; text-align: center; margin-top: 8px; }

/* ===== FORM CARD ===== */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    max-width: 640px;
}
.form-card label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    margin-top: 16px;
    margin-bottom: 6px;
}
.form-card input[type=text], .form-card textarea, .form-card select {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.form-card input[type=range] { width: 100%; }
.form-card .recep-valor { color: var(--primary); font-size: 16px; margin-left: 8px; }
.form-card .btn-primary { margin-top: 24px; }

/* ===== PERSONAS ===== */
.grid-personas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.card-persona {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.persona-head { display: flex; justify-content: space-between; align-items: center; }
.persona-head h3 { font-size: 17px; }
.persona-receptividade {
    background: var(--bg);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--primary-dark);
    font-weight: 600;
}
.persona-meta { color: var(--muted); font-size: 12px; }
.persona-desc { color: var(--text); font-size: 13px; line-height: 1.4; }
.persona-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ===== PASTAS (organizar personas por cliente) ===== */
.pastas-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.barra-pastas {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}
.chip-pasta {
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.chip-pasta:hover { border-color: var(--primary); }
.chip-pasta.ativo {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}
.btn-nova-pasta {
    background: transparent;
    border: 1px dashed var(--primary);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.btn-nova-pasta:hover { background: var(--bg); }
.acoes-pasta-ativa {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    align-items: center;
}
.btn-link-danger { color: #b00020 !important; }
.persona-pasta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--muted);
}
.persona-pasta-row label { white-space: nowrap; }
.persona-pasta-select {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 12px;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
}
.empty-state, .loading-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--muted);
    background: var(--card);
    border-radius: 12px;
    border: 1px dashed var(--border);
}

/* ===== SIMULADOR ===== */
.sim-layout {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 16px;
    align-items: start;
}
@media (max-width: 1100px) { .sim-layout { grid-template-columns: 1fr; } }

.sim-config, .sim-score {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}
.sim-config h2 { font-size: 17px; margin-bottom: 6px; }
.sim-config label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 14px;
    margin-bottom: 4px;
}
.sim-config select, .sim-config textarea {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}
.sim-config .btn-primary, .sim-config .btn-secondary { width: 100%; margin-top: 12px; }
.sim-config .status {
    margin-top: 12px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.sim-chat {
    background: var(--wa-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: 600px;
    display: flex;
    flex-direction: column;
}
.wa-header {
    background: var(--primary-dark);
    color: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.wa-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}
.wa-nome { font-size: 14px; font-weight: 600; }
.wa-status { font-size: 11px; opacity: 0.85; }

.wa-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wa-msg {
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 75%;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}
.wa-msg-out { background: var(--wa-out); align-self: flex-end; }
.wa-msg-in { background: var(--wa-in); align-self: flex-start; }
.wa-empty { text-align: center; color: var(--muted); padding: 24px; }
.wa-typing {
    padding: 8px 16px;
    display: flex;
    gap: 4px;
}
.wa-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    animation: typing 1.2s infinite;
}
.wa-typing span:nth-child(2) { animation-delay: 0.15s; }
.wa-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%,60%,100%{opacity:0.3} 30%{opacity:1} }

/* ===== SCORE ===== */
.sim-score h3 { margin-bottom: 12px; }
.score-geral {
    text-align: center;
    font-size: 38px;
    color: var(--primary);
    font-weight: 800;
    margin: 12px 0 4px;
}
.score-list {
    list-style: none;
    margin-top: 16px;
}
.score-list li {
    display: grid;
    grid-template-columns: 110px 1fr 30px;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 12px;
}
.score-bar {
    background: var(--bg);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
}
.score-bar > span {
    background: var(--primary);
    height: 100%;
    display: block;
}
.score-feedback {
    margin-top: 16px;
    background: var(--bg);
    padding: 12px;
    border-radius: 8px;
}
.score-feedback h4 { font-size: 13px; margin-bottom: 6px; }
.score-feedback p { font-size: 13px; line-height: 1.5; }

/* ===== REPLAYS ===== */
.replay-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
}
@media (max-width: 900px) { .replay-layout { grid-template-columns: 1fr; } }

.grid-replays {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.card-replay {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: transform 0.15s, border-color 0.15s;
}
.card-replay:hover { transform: translateY(-2px); border-color: var(--primary); }
.card-replay-link {
    display: block;
    padding: 16px;
    text-decoration: none;
    color: var(--text);
}
.replay-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding-right: 30px; }
.replay-head h3 { font-size: 15px; }
.replay-meta { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-excluir-replay {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 6px;
    opacity: 0.65;
    transition: color 0.15s, background 0.15s, opacity 0.15s;
}
.btn-excluir-replay:hover { color: var(--danger); background: #fde2e2; opacity: 1; }
.badge {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge-ativa { background: #fff4d6; color: #5d4a04; }
.badge-encerrada { background: #d6f4e6; color: #0a5c3a; }
.badge-erro { background: #fde2e2; color: #8b0a16; }
.badge-limite { background: #fde2e2; color: #8b0a16; }

/* ===== PROSE (sobre-o-beta) ===== */
.prose {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    max-width: 720px;
    line-height: 1.7;
}
.prose h2 { margin: 24px 0 8px; font-size: 18px; color: var(--primary-dark); }
.prose ul { margin: 8px 0 12px 24px; }
.prose li { margin-bottom: 4px; }
.prose .btn-primary { margin-top: 24px; }

/* ===== TRILHA B · CRIAR VIA CHATS ===== */
.info-card {
    background: #f0f7ff;
    border: 1px solid #bcd9ff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}
.info-card ul { margin: 6px 0 0 18px; }
.info-card li { margin-bottom: 2px; }

.slot-conversa {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
}
.slot-conversa summary {
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 600;
    user-select: none;
    list-style-position: inside;
}
.slot-conversa[open] summary { border-bottom: 1px solid var(--border); }
.slot-status { color: #0a5c3a; font-weight: 400; font-size: 13px; }
.slot-body { padding: 12px 14px; }
.slot-body textarea {
    width: 100%;
    font-family: inherit;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}
.slot-arquivo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 6px;
    font-size: 13px;
}
.slot-arquivo .btn-link {
    cursor: pointer;
    color: var(--primary, #2563eb);
    text-decoration: underline;
}
.slot-info { color: #6b7280; }

.contador-conversas {
    margin: 16px 0;
    padding: 8px 12px;
    background: #f7f7f7;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.resultado-card {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #bcd9ff;
    background: #f0f7ff;
    border-radius: 10px;
}
.resultado-card h3 { margin-top: 0; color: var(--primary-dark, #1e40af); }
.resultado-card p { margin: 6px 0; line-height: 1.5; }
.resultado-card .btn-primary { margin-top: 12px; display: inline-block; }

/* ===== TRILHA B v2 · CARDS DE PERFIL ===== */
.card-perfil {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fff;
}
.card-atendente { background: #fffbe8; border-color: #f0d97a; }
.perfil-head {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.perfil-head input[type=checkbox] {
    width: 18px; height: 18px; cursor: pointer;
}
.perfil-titulo { flex: 1; font-size: 15px; }
.perfil-titulo [contenteditable="true"] {
    outline: none;
    border-bottom: 1px dashed transparent;
    padding: 0 2px;
}
.perfil-titulo [contenteditable="true"]:focus,
.perfil-titulo [contenteditable="true"]:hover {
    border-bottom-color: var(--primary, #2563eb);
}
.perfil-recep {
    background: #eef2ff;
    color: #1e3a8a;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
}
.perfil-body {
    padding-left: 28px;
    font-size: 14px;
    line-height: 1.5;
}
.perfil-body p { margin: 4px 0; }
.perfil-body [contenteditable="true"] {
    outline: none;
    border-bottom: 1px dashed #ccc;
    padding: 0 3px;
    cursor: text;
}
.perfil-body [contenteditable="true"]:focus { border-bottom-color: var(--primary, #2563eb); background: #f7faff; }
.perfil-desc {
    background: #fafafa;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #eee;
    margin: 4px 0;
    min-height: 40px;
}
.perfil-evidencia {
    margin-top: 8px;
    padding: 6px 8px;
    background: #f0f9ff;
    border-radius: 6px;
    font-size: 13px;
    color: #334155;
}
.hint { color: #666; font-size: 13px; }

/* ===== STORY 04 · EDITOR DE PROMPTS ===== */
.bloco-atendentes, .bloco-personas { margin-top: 32px; }
.bloco-atendentes h2, .bloco-personas h2 { margin-bottom: 10px; }

.bloco-atendentes .card-atendente {
    background: #fffbe8;
    border: 1px solid #f0d97a;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.atendente-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.atendente-head h3 { margin: 0; font-size: 16px; }
.atendente-default-tag {
    background: #fff4d6;
    color: #5d4a04;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.atendente-desc { color: #555; font-size: 14px; line-height: 1.5; margin: 4px 0 8px; }
.atendente-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.atendente-actions .btn-link { font-size: 13px; }

.persona-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.prompt-editavel {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: #fff;
}
.prompt-editavel.card-atendente { background: #fffbe8; border-color: #f0d97a; }
.prompt-head { font-size: 15px; margin-bottom: 6px; }
.prompt-textarea {
    width: 100%;
    font-family: ui-monospace, "Cascadia Code", Menlo, monospace;
    font-size: 13px;
    line-height: 1.5;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-sizing: border-box;
    resize: vertical;
    min-height: 200px;
    background: #fafafa;
}
.prompt-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}
.prompt-status { font-size: 13px; color: #666; }
.prompt-status.ok { color: #0a7a3a; font-weight: 600; }
.prompt-status.erro { color: #b00; font-weight: 600; }
.badge-default {
    background: #fff4d6;
    color: #5d4a04;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    margin-left: 8px;
}
.prompt-body { padding-top: 8px; }

/* Modal large pro editor de atendente */
.modal-large {
    max-width: 800px !important;
    width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-large textarea#editorAtendentePrompt {
    width: 100%;
    font-family: ui-monospace, monospace;
    font-size: 13px;
    line-height: 1.5;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    resize: vertical;
}
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* ===== Modal Welcome (7 etapas) ===== */
.modal-welcome {
    width: 520px;
    max-width: 92vw;
    min-height: 420px;
    display: flex;
    flex-direction: column;
}
.welcome-progress {
    font-size: 12px;
    color: var(--muted);
    text-align: right;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.welcome-slide { display: none; flex: 1; }
.welcome-slide.active { display: block; }
.welcome-slide .welcome-num {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.welcome-slide h2 { font-size: 20px; margin-bottom: 12px; line-height: 1.3; }
.welcome-slide p { color: var(--text); margin-bottom: 12px; font-size: 14px; }
.welcome-slide ul { padding-left: 18px; margin-bottom: 12px; }
.welcome-slide li { margin-bottom: 6px; font-size: 14px; }
.welcome-slide .btn-link { font-size: 13px; }
.welcome-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.welcome-actions .btn-link {
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    line-height: 1.2;
}
.welcome-actions .btn-link:hover { background: var(--bg); color: var(--text); }
.welcome-actions .btn-primary { padding: 10px 24px; line-height: 1.2; }

/* ===== Progress bar (criar persona via chats) ===== */
.progress-wrap {
    margin-top: 14px;
    padding: 14px 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
}
.progress-label {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 8px;
}
.progress-track {
    width: 100%;
    height: 8px;
    background: #e0f2fe;
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary) 0%, #00cfa8 100%);
    border-radius: 999px;
    transition: width 0.3s ease-out;
}
.progress-meta {
    margin-top: 6px;
    font-size: 11px;
    color: var(--muted);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.progress-aviso {
    margin-top: 10px;
    padding: 8px 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    font-size: 12px;
    color: #9a3412;
    line-height: 1.4;
}
.progress-aviso strong { color: #7c2d12; }
