/* ==========================================================================
   INGRA — Modelos e IA: abas do módulo, modelos, editor de documentos,
   agentes jurídicos, conversas, peça guiada e próximos passos.
   Tema: azul-marinho #013252/#006699, destaque #2dd4ea, Plus Jakarta Sans + Fraunces.
   ========================================================================== */

/* ---------- Abas do módulo ---------- */
.mia-cabecalho { display: flex; flex-direction: column; gap: 18px; }
.mia-abas {
    display: flex; gap: 6px; flex-wrap: wrap; padding: 6px;
    background: linear-gradient(135deg, #013252, #004e78); border-radius: 16px;
    box-shadow: 0 10px 30px rgba(1, 50, 82, .18);
}
.mia-aba {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px;
    color: #bfe3f0; font-size: 13.5px; font-weight: 700; text-decoration: none; transition: background .15s, color .15s;
}
.mia-aba:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.mia-aba.ativa { background: #2dd4ea; color: #001b29; box-shadow: 0 6px 16px rgba(45, 212, 234, .35); }
.mia-aba-ic { width: 18px; height: 18px; }

/* ---------- Modelos (cards, visualizar, editor do documento) ---------- */
.mdl-variavel {
    display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--ig-surface-brand, #eef6fb); color: var(--ig-brand-text, #01527d);
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif; font-size: .82em; font-weight: 700; border: 1px dashed #7cc7e3;
}
.mdl-visualizar { display: flex; flex-direction: column; gap: 12px; }
.mdl-visualizar-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mdl-visualizar-meta p { width: 100%; margin: 4px 0 0; color: var(--ig-text-2, #64748b); font-size: 13.5px; }
.mdl-selo { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--ig-link, #006699); background: var(--ig-surface-brand, #eef6fb); border: 1px solid var(--ig-border-brand, #bfe3f0); border-radius: 999px; padding: 4px 10px; }
.mdl-folha {
    max-height: 60vh; overflow: auto; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 36px 44px;
    font-family: 'Times New Roman', Times, serif; font-size: 15px; line-height: 1.6; color: #111;
}
.mdl-folha h1, .mdl-folha h2 { text-align: center; font-size: 17px; font-weight: 700; margin: 0 0 12px; }
.mdl-folha h3 { font-weight: 700; margin: 16px 0 8px; }
.mdl-folha p { margin: 0 0 10px; text-align: justify; }
.mdl-folha ol, .mdl-folha ul { margin: 0 0 10px 22px; list-style: revert; }
.mdl-folha table { width: 100%; border-collapse: collapse; margin: 0 0 10px; }
.mdl-folha td, .mdl-folha th { border: 1px solid #cbd5e1; padding: 4px 6px; }
.mdl-folha .quebra-pagina { border-top: 2px dashed #bfe3f0; margin: 16px 0; }
.mdl-legenda { font-size: 12.5px; color: var(--ig-text-2, #64748b); margin: 0; }
.mdl-link { color: var(--ig-link, #006699); font-weight: 700; text-decoration: none; }
.mdl-link:hover { text-decoration: underline; }
.mdl-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 1200px) { .mdl-editor-layout { grid-template-columns: 1fr; } }
.mdl-editor-lateral { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 80px; }
.mdl-cartao { background: var(--ig-surface, #fff); border: 1px solid var(--ig-border-soft, #e2e8f0); border-radius: 18px; padding: 16px 18px; box-shadow: 0 6px 20px rgba(1, 50, 82, .06); }
.mdl-cartao h3 { font-family: 'Fraunces', Georgia, serif; font-size: 16px; font-weight: 600; color: var(--ig-text, #0f2a3d); margin: 0 0 10px; }
.mdl-dados { display: flex; flex-direction: column; gap: 8px; margin: 0; font-size: 13px; }
.mdl-dados dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; }
.mdl-dados dd { margin: 0; color: var(--ig-text, #0f2a3d); }
.mdl-dicas ul { margin: 0 0 10px 16px; padding: 0; list-style: disc; font-size: 12.5px; color: var(--ig-text-soft, #334155); line-height: 1.5; }
.mdl-dicas mark { background: #fff3bf; }
.mdl-config-acoes { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.mdl-previa { width: 100%; height: 70vh; border: 0; border-radius: 12px; background: var(--ig-surface-3, #f1f5f9); }

/* ---------- Editor de documentos ---------- */
.ied { border: 1px solid var(--ig-border-soft, #e2e8f0); border-radius: 16px; background: var(--ig-surface-3, #f1f5f9); overflow: hidden; }
.ied-barra {
    display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; position: sticky; top: 0; z-index: 5;
    background: linear-gradient(135deg, #013252, #00456b); border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.ied-grupo { display: flex; align-items: center; gap: 2px; padding-right: 6px; border-right: 1px solid rgba(255, 255, 255, .12); }
.ied-grupo:last-child { border-right: 0; }
.ied-grupo-variaveis { flex-wrap: wrap; gap: 4px; }
.ied-rotulo-grupo { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #7cc7e3; margin: 0 4px; }
.ied-bt {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 30px; height: 30px; padding: 0 7px;
    border: 0; border-radius: 8px; background: transparent; color: #dff4fb; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700;
}
.ied-bt:hover { background: rgba(45, 212, 234, .16); color: #fff; }
.ied-bt-texto { font-family: Georgia, serif; font-size: 15px; }
.ied-bt-variavel { background: rgba(45, 212, 234, .12); color: #aef0f9; }
.ied-ic { width: 17px; height: 17px; }
.ied-gravando { background: #dc2626 !important; color: #fff !important; animation: ied-pulso 1.2s infinite; }
@keyframes ied-pulso { 50% { box-shadow: 0 0 0 5px rgba(220, 38, 38, .25); } }
.ied-ic-p { width: 13px; height: 13px; }
.ied-select { height: 30px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); color: #dff4fb; font-size: 12.5px; padding: 0 26px 0 8px; }
.ied-select option { color: var(--ig-text, #0f2a3d); }
.ied-select-curto { width: 76px; }
.ied-cor { position: relative; }
.ied-cor input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ied-cor-letra { font-family: Georgia, serif; font-size: 15px; border-bottom: 3px solid #2dd4ea; line-height: 1; }
.ied-oculto { display: none; }
.ied-menu { position: relative; }
.ied-pop {
    position: absolute; top: 36px; left: 0; z-index: 30; background: var(--ig-surface, #fff); border: 1px solid var(--ig-border-soft, #e2e8f0); border-radius: 14px;
    box-shadow: 0 18px 40px rgba(1, 50, 82, .22); padding: 8px;
}
.ied-pop-variaveis { width: 360px; max-height: 360px; overflow: auto; }
.ied-pop-titulo { margin: 0 0 6px; font-size: 12px; font-weight: 800; color: var(--ig-link, #006699); text-align: center; }
.ied-grade { display: grid; grid-template-columns: repeat(8, 18px); gap: 3px; }
.ied-grade span { width: 18px; height: 18px; border: 1px solid var(--ig-border-soft, #e2e8f0); border-radius: 3px; background: var(--ig-surface-2, #f8fafc); cursor: pointer; }
.ied-grade span.ativa { background: #bfeefc; border-color: #06b6d4; }
.ied-item-variavel {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 7px 9px; border: 0; border-radius: 9px;
    background: transparent; cursor: pointer; text-align: left; font: inherit; color: var(--ig-text, #0f2a3d);
}
.ied-item-variavel:hover { background: var(--ig-surface-brand, #eef6fb); }
.ied-item-variavel span { font-size: 13px; font-weight: 600; }
.ied-item-variavel code { font-size: 11px; color: var(--ig-brand-text, #01527d); }
.ied-contexto { display: flex; flex-wrap: wrap; gap: 6px; padding: 7px 10px; background: var(--ig-surface-brand, #eef6fb); border-bottom: 1px solid #cfe6f1; }
.ied-contexto-grupo { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ied-contexto .ied-rotulo-grupo { color: var(--ig-link, #006699); }
.ied-bt-mini {
    display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--ig-border-brand, #bfe3f0); background: var(--ig-surface, #fff); color: var(--ig-brand-text, #01527d); border-radius: 8px;
    padding: 4px 9px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.ied-bt-mini:hover { background: var(--ig-surface-brand, #eef6fb); }
.ied-bt-mini.perigo { color: #b91c1c; border-color: #fecaca; }
.ied-cor-mini input { width: 22px; height: 18px; border: 0; padding: 0; background: none; }
.ied-localizar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 10px; background: var(--ig-surface, #fff); border-bottom: 1px solid var(--ig-border-soft, #e2e8f0); }
.ied-localizar input { height: 30px; border: 1px solid var(--ig-border-soft, #e2e8f0); border-radius: 8px; padding: 0 9px; font-size: 13px; }
.ied-localizar-info { font-size: 12px; color: var(--ig-text-2, #64748b); }
.ied-area { max-height: calc(var(--ied-altura, 560px) + 140px); overflow: auto; padding: 24px 12px; }
.ied-folha {
    min-height: var(--ied-altura, 560px); max-width: 820px; margin: 0 auto; padding: 56px 64px; background: #fff; color: #111;
    border-radius: 4px; box-shadow: 0 10px 30px rgba(1, 50, 82, .12); outline: none;
    font-family: 'Times New Roman', Times, serif; font-size: 12pt; line-height: 1.5;
}
.ied-folha:focus { box-shadow: 0 0 0 2px #2dd4ea, 0 10px 30px rgba(1, 50, 82, .12); }
.ied-folha p { margin: 0 0 10pt; }
.ied-folha h1 { font-size: 1.5em; text-align: center; margin: 12pt 0 8pt; }
.ied-folha h2 { font-size: 1.25em; text-align: center; margin: 12pt 0 8pt; }
.ied-folha h3 { font-size: 1.1em; margin: 12pt 0 6pt; }
.ied-folha ul { list-style: disc; margin: 0 0 10pt 24px; }
.ied-folha ol { list-style: decimal; margin: 0 0 10pt 24px; }
.ied-folha blockquote { margin: 0 0 10pt 4cm; font-size: .92em; }
.ied-folha table { border-collapse: collapse; width: 100%; margin: 0 0 10pt; }
.ied-folha td, .ied-folha th { min-width: 30px; }
.ied-folha img { max-width: 100%; height: auto; cursor: pointer; }
.ied-folha img.ied-img-ativa { outline: 3px solid #2dd4ea; }
.ied-folha mark { background: #fff3bf; }
.ied-folha hr { border: 0; border-top: 1px solid #94a3b8; margin: 12pt 0; }
.ied-folha .quebra-pagina {
    position: relative; height: 0; margin: 22px -64px; border-top: 2px dashed #7cc7e3;
}
.ied-folha .quebra-pagina::after {
    content: 'Quebra de página'; position: absolute; left: 50%; top: -11px; transform: translateX(-50%);
    background: #e7f5fb; color: #006699; font: 700 10.5px 'Plus Jakarta Sans', system-ui, sans-serif; padding: 2px 10px; border-radius: 999px;
}
@media (max-width: 760px) { .ied-folha { padding: 28px 22px; } .ied-folha .quebra-pagina { margin: 22px -22px; } }

/* ---------- Agentes Jurídicos IA ---------- */
.ag-pagina { display: flex; flex-direction: column; gap: 18px; }
.ag-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.ag-resumo-item {
    display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 18px;
    background: linear-gradient(135deg, #013252, #00527d); color: #eaf7fc; box-shadow: 0 10px 30px rgba(1, 50, 82, .18);
}
.ag-resumo-rotulo { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #7cc7e3; }
.ag-resumo-item strong { font-family: 'Fraunces', Georgia, serif; font-size: 28px; font-weight: 700; color: #fff; }
.ag-resumo-item strong small { font-size: 15px; color: #8fb9cd; font-weight: 600; }
.ag-resumo-item .ag-resumo-texto { font-size: 19px; }
.ag-resumo-nota { font-size: 12.5px; color: #bfe3f0; line-height: 1.45; }
.ag-resumo-nota .mdl-link { color: #2dd4ea; }
.ag-resumo-filtros { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; align-content: center; padding: 10px; border-radius: 18px; background: var(--ig-surface, #fff); border: 1px solid var(--ig-border-soft, #e2e8f0); }
.ag-filtro { border: 1px solid var(--ig-border-soft, #e2e8f0); background: var(--ig-surface-2, #f8fafc); color: var(--ig-text, #0f2a3d); border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.ag-filtro.ativo { background: #006699; border-color: #006699; color: #fff; }
.ag-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ag-cartao {
    position: relative; display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; background: var(--ig-surface, #fff);
    border: 1px solid var(--ig-border-soft, #e2e8f0); box-shadow: 0 8px 24px rgba(1, 50, 82, .07); overflow: hidden; transition: transform .15s, box-shadow .15s;
}
.ag-cartao::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--ag-cor, #2dd4ea); }
.ag-cartao:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(1, 50, 82, .12); }
.ag-cartao.inativo { background: var(--ig-surface-2, #f8fafc); }
.ag-cartao.inativo .ag-avatar { filter: grayscale(.6); opacity: .8; }
.ag-cartao-topo { display: flex; align-items: center; gap: 12px; }
.ag-cartao-topo h3 { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 17px; font-weight: 700; color: var(--ig-text, #0f2a3d); }
.ag-area { font-size: 12px; color: var(--ig-text-2, #64748b); font-weight: 600; }
.ag-avatar {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 14px;
    background: color-mix(in srgb, var(--ag-cor, #2dd4ea) 16%, var(--ig-surface, #fff)); color: var(--ag-cor, #006699);
    border: 1px solid color-mix(in srgb, var(--ag-cor, #2dd4ea) 35%, var(--ig-surface, #fff));
}
.ag-avatar-ic { width: 24px; height: 24px; }
.ag-status { margin-left: auto; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; background: var(--ig-surface-3, #f1f5f9); color: #94a3b8; }
.ag-status.on { background: #dcfce7; color: #15803d; }
.ag-descricao { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ig-text-soft, #334155); }
.ag-pecas { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none; }
.ag-pecas li { font-size: 11.5px; font-weight: 600; color: var(--ig-brand-text, #01527d); background: var(--ig-surface-brand, #eef6fb); border-radius: 8px; padding: 3px 8px; }
.ag-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; }
.ag-bt {
    display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 11px; padding: 8px 14px; cursor: pointer; text-decoration: none;
    font: inherit; font-size: 13px; font-weight: 800; background: linear-gradient(135deg, #006699, #0a83bd); color: #fff;
    box-shadow: 0 6px 16px rgba(0, 102, 153, .25);
}
.ag-bt:hover { filter: brightness(1.07); }
.ag-bt:disabled { opacity: .5; cursor: not-allowed; }
.ag-bt-claro { background: var(--ig-surface, #fff); color: var(--ig-link, #006699); border: 1px solid var(--ig-border-brand, #bfe3f0); box-shadow: none; }
.ag-bt-ic { width: 16px; height: 16px; }
.ag-nota { font-size: 12px; color: #94a3b8; }
.ag-recentes h2 { font-family: 'Fraunces', Georgia, serif; font-size: 18px; color: var(--ig-text, #0f2a3d); margin: 0 0 10px; }
.ag-recentes-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.ag-recente { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; background: var(--ig-surface, #fff); border: 1px solid var(--ig-border-soft, #e2e8f0); text-decoration: none; color: var(--ig-text, #0f2a3d); }
.ag-recente:hover { border-color: #7cc7e3; }
.ag-recente-agente { font-size: 11px; font-weight: 800; color: #06b6d4; text-transform: uppercase; letter-spacing: .05em; }
.ag-recente span:last-child { font-size: 12px; color: #94a3b8; }

/* ---------- Configurações > Inteligência Artificial ---------- */
.cia-lista { display: flex; flex-direction: column; gap: 8px; }
.cia-item { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 16px; background: var(--ig-surface, #fff); border: 1px solid var(--ig-border-soft, #e2e8f0); }
.cia-item.ativo { border-color: color-mix(in srgb, var(--ag-cor, #2dd4ea) 45%, var(--ig-surface, #fff)); box-shadow: 0 6px 18px rgba(1, 50, 82, .06); }
.cia-texto { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.cia-texto strong { font-size: 14.5px; color: var(--ig-text, #0f2a3d); }
.cia-texto strong small { font-weight: 600; color: var(--ig-text-2, #64748b); margin-left: 6px; }
.cia-texto span { font-size: 12.5px; color: var(--ig-text-2, #64748b); }
.cia-chave { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--ig-border-soft, #e2e8f0); background: var(--ig-surface-2, #f8fafc); color: var(--ig-text-soft, #334155); border-radius: 999px; padding: 5px 12px 5px 6px; font-size: 12.5px; font-weight: 800; cursor: pointer; }
.cia-chave span { width: 30px; height: 18px; border-radius: 999px; background: #cbd5e1; position: relative; transition: background .15s; }
.cia-chave span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.cia-chave.on { border-color: #86efac; background: #f0fdf4; color: #15803d; }
.cia-chave.on span { background: #22c55e; }
.cia-chave.on span::after { transform: translateX(12px); }
.cia-chave:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 760px) { .cia-item { flex-wrap: wrap; } }

/* ---------- Conversa com agentes / Íris ---------- */
.cv-pagina .ia-hero { background: linear-gradient(135deg, #013252, color-mix(in srgb, var(--ag-cor, #006699) 55%, #013252)); }
.cv-voltar { display: inline-flex; align-items: center; gap: 6px; color: #7cc7e3; font-size: 12.5px; font-weight: 700; text-decoration: none; margin-bottom: 8px; }
.cv-voltar:hover { color: #fff; }
.cv-voltar-ic { width: 15px; height: 15px; }
.cv-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1280px) { .cv-layout { grid-template-columns: 230px minmax(0, 1fr); } .cv-layout > .ia-lateral { grid-column: 1 / -1; } }
@media (max-width: 860px) { .cv-layout { grid-template-columns: 1fr; } }
.cv-lista { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 20px; background: var(--ig-surface, #fff); border: 1px solid var(--ig-border-soft, #e2e8f0); position: sticky; top: 80px; }
.cv-nova { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 12px; padding: 10px; background: linear-gradient(135deg, #006699, #0a83bd); color: #fff; font-weight: 800; font-size: 13px; cursor: pointer; }
.cv-busca { display: flex; align-items: center; gap: 6px; border: 1px solid var(--ig-border-soft, #e2e8f0); border-radius: 10px; padding: 0 8px; color: #94a3b8; }
.cv-busca input { border: 0; outline: none; background: transparent; width: 100%; height: 34px; font-size: 13px; color: var(--ig-text, #0f2a3d); box-shadow: none; }
.cv-ic { width: 16px; height: 16px; flex: none; }
.cv-ic-p { width: 14px; height: 14px; }
.cv-itens { display: flex; flex-direction: column; gap: 3px; max-height: 52vh; overflow: auto; }
.cv-item { position: relative; display: flex; align-items: center; border-radius: 10px; }
.cv-item:hover, .cv-item.ativo { background: var(--ig-surface-brand, #eef6fb); }
.cv-item.ativo { box-shadow: inset 3px 0 0 #06b6d4; }
.cv-item-abrir { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; border: 0; background: transparent; text-align: left; padding: 8px 10px; cursor: pointer; }
.cv-item-titulo { font-size: 13px; font-weight: 700; color: var(--ig-text, #0f2a3d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-item-data { font-size: 11px; color: #94a3b8; }
.cv-item-input { flex: 1; margin: 4px; height: 30px; border: 1px solid #7cc7e3; border-radius: 8px; padding: 0 8px; font-size: 13px; }
.cv-item-acoes { display: none; gap: 2px; padding-right: 6px; }
.cv-item:hover .cv-item-acoes { display: flex; }
.cv-item-acoes button { border: 0; background: transparent; color: var(--ig-text-2, #64748b); padding: 4px; border-radius: 6px; cursor: pointer; }
.cv-item-acoes button:hover { background: var(--ig-surface-brand, #eef6fb); color: var(--ig-brand-text, #01527d); }
.cv-vazio { font-size: 12.5px; color: #94a3b8; text-align: center; margin: 10px 0; }
.cv-limpar { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: transparent; color: #b91c1c; font-size: 12px; font-weight: 700; cursor: pointer; padding: 6px; }
.cv-avatar { background: color-mix(in srgb, var(--ag-cor, #2dd4ea) 25%, #013252); }
.cv-link { color: #2dd4ea; font-weight: 700; }
.cv-markdown table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 13px; display: block; overflow-x: auto; }
.cv-markdown th, .cv-markdown td { border: 1px solid rgba(255, 255, 255, .14); padding: 5px 8px; text-align: left; }
.cv-markdown th { background: rgba(45, 212, 234, .12); }
.cv-markdown ul { list-style: disc; margin: 6px 0 6px 18px; }
.cv-markdown ol { list-style: decimal; margin: 6px 0 6px 18px; }
.cv-markdown p { margin: 0 0 8px; }
.cv-markdown h1, .cv-markdown h2, .cv-markdown h3 { font-weight: 800; margin: 10px 0 6px; }
.cv-anexo {
    display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 12px; border-radius: 12px; text-decoration: none;
    background: rgba(34, 197, 94, .14); border: 1px solid rgba(34, 197, 94, .35); color: #bbf7d0; font-weight: 700; font-size: 13px;
}
.cv-anexo small { color: #86efac; font-weight: 600; }
.cv-acao { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(45, 212, 234, .08); border: 1px solid rgba(45, 212, 234, .3); }
.cv-acao.confirmada { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .35); }
.cv-acao.descartada { opacity: .6; }
.cv-acao-texto { display: flex; gap: 8px; font-size: 13px; color: #eaf7fc; }
.cv-acao-botoes { display: flex; gap: 8px; }
.cv-confirmar { border: 0; border-radius: 9px; padding: 6px 14px; background: #2dd4ea; color: #001b29; font-weight: 800; font-size: 12.5px; cursor: pointer; }
.cv-descartar { border: 1px solid rgba(255, 255, 255, .2); border-radius: 9px; padding: 6px 12px; background: transparent; color: #bfe3f0; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.cv-acao-status { font-size: 12px; color: #86efac; }
.cv-rodape-msg { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cv-avaliacao { display: inline-flex; gap: 2px; }
.cv-avaliacao button { border: 0; background: transparent; color: #8fb9cd; padding: 3px; border-radius: 6px; cursor: pointer; }
.cv-avaliacao button:hover, .cv-avaliacao button.on { color: #2dd4ea; background: rgba(45, 212, 234, .12); }
.cv-pecas { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cv-pecas a { display: block; padding: 7px 10px; border-radius: 10px; background: var(--ig-surface-2, #f8fafc); color: var(--ig-brand-text, #01527d); font-size: 13px; font-weight: 700; text-decoration: none; }
.cv-pecas a:hover { background: var(--ig-surface-brand, #eef6fb); }
.cv-lista-dicas { margin: 0 0 0 16px; padding: 0; list-style: disc; font-size: 12.5px; line-height: 1.5; color: var(--ig-text-soft, #334155); display: flex; flex-direction: column; gap: 4px; }

/* ---------- Peça guiada ---------- */
.gp-pagina { display: flex; flex-direction: column; gap: 16px; }
.gp-topo { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; border-radius: 22px; background: linear-gradient(135deg, #013252, color-mix(in srgb, var(--ag-cor, #006699) 50%, #013252)); }
.gp-titulo { display: flex; align-items: center; gap: 14px; }
.gp-titulo h1 { margin: 0; font-family: 'Fraunces', Georgia, serif; font-size: 24px; color: #fff; }
.gp-titulo span { color: #bfe3f0; font-size: 13px; }
.gp-retomar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px; border-radius: 18px; background: var(--ig-surface, #fff); border: 1px solid var(--ig-border-brand, #bfe3f0); }
.gp-retomar strong { display: block; color: var(--ig-text, #0f2a3d); }
.gp-retomar span { font-size: 13px; color: var(--ig-text-2, #64748b); }
.gp-retomar-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.gp-passos { display: flex; flex-wrap: wrap; gap: 6px; }
.gp-passo { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 7px; border-radius: 999px; border: 1px solid var(--ig-border-soft, #e2e8f0); background: var(--ig-surface, #fff); color: #94a3b8; font-weight: 700; font-size: 13px; cursor: pointer; }
.gp-passo:disabled { cursor: not-allowed; }
.gp-passo-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ig-surface-3, #f1f5f9); font-size: 12px; }
.gp-passo.visitado { color: var(--ig-brand-text, #01527d); border-color: var(--ig-border-brand, #bfe3f0); }
.gp-passo.visitado .gp-passo-num { background: var(--ig-surface-brand, #eef6fb); }
.gp-passo.atual { background: #006699; border-color: #006699; color: #fff; }
.gp-passo.atual .gp-passo-num { background: #2dd4ea; color: #001b29; }
.gp-etapa { padding: 22px; border-radius: 22px; background: var(--ig-surface, #fff); border: 1px solid var(--ig-border-soft, #e2e8f0); box-shadow: 0 8px 24px rgba(1, 50, 82, .06); }
.gp-etapa h2 { margin: 0 0 14px; font-family: 'Fraunces', Georgia, serif; font-size: 20px; color: var(--ig-text, #0f2a3d); }
.gp-pecas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gp-peca { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--ig-border-soft, #e2e8f0); background: var(--ig-surface-2, #f8fafc); cursor: pointer; text-align: left; color: var(--ig-text, #0f2a3d); }
.gp-peca:hover { border-color: #7cc7e3; background: var(--ig-surface-brand, #eef6fb); }
.gp-peca.escolhida { border-color: #06b6d4; background: var(--ig-surface-brand, #eef6fb); box-shadow: 0 0 0 2px rgba(6, 182, 212, .2); }
.gp-peca-ic { width: 22px; height: 22px; color: var(--ag-cor, #006699); flex: none; }
.gp-campos { display: flex; flex-direction: column; gap: 14px; }
.gp-grade-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .gp-grade-2 { grid-template-columns: 1fr; } }
.gp-campo { display: flex; flex-direction: column; gap: 6px; }
.gp-rotulo { font-size: 13px; font-weight: 800; color: var(--ig-text, #0f2a3d); }
.gp-campo input[type=text], .gp-campo input[type=date], .gp-campo select, .gp-campo textarea, .gp-tese input, .gp-tese textarea {
    width: 100%; border: 1px solid var(--ig-border-soft, #e2e8f0); border-radius: 11px; padding: 9px 11px; font: inherit; font-size: 14px; color: var(--ig-text, #0f2a3d); background: var(--ig-surface, #fff);
}
.gp-campo textarea:focus, .gp-campo input:focus, .gp-campo select:focus, .gp-tese input:focus, .gp-tese textarea:focus { outline: none; border-color: #06b6d4; box-shadow: 0 0 0 3px rgba(6, 182, 212, .15); }
.gp-campo small { font-size: 12px; color: var(--ig-text-2, #64748b); }
.gp-opcoes { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--ig-text, #0f2a3d); }
.gp-opcoes label { display: inline-flex; gap: 6px; align-items: center; }
.gp-upload { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px; border: 2px dashed var(--ig-border-brand, #bfe3f0); border-radius: 14px; background: var(--ig-surface-2, #f8fafc); color: var(--ig-brand-text, #01527d); font-size: 13px; cursor: pointer; }
.gp-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gp-upload-ic { width: 22px; height: 22px; flex: none; }
.gp-anexo { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--ig-surface-2, #f8fafc); font-size: 13px; color: var(--ig-text, #0f2a3d); }
.gp-anexo small { color: var(--ig-text-2, #64748b); margin-left: auto; }
.gp-anexo button { border: 0; background: transparent; color: #b91c1c; cursor: pointer; }
.gp-carregando { font-size: 12.5px; color: #06b6d4; }
.gp-erro { margin: 0; font-size: 12.5px; color: #dc2626; }
.gp-nota { font-size: 13px; color: var(--ig-text-2, #64748b); margin: 0 0 12px; }
.gp-teses-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gp-teses { display: flex; flex-direction: column; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; counter-reset: tese; }
.gp-tese { display: flex; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--ig-border-soft, #e2e8f0); background: var(--ig-surface-2, #f8fafc); counter-increment: tese; }
.gp-tese::before { content: counter(tese); display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--ig-surface-brand, #eef6fb); color: var(--ig-brand-text, #01527d); font-weight: 800; font-size: 12.5px; }
.gp-tese-campos { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.gp-tese-campos input { font-weight: 700; }
.gp-tese-acoes { display: flex; flex-direction: column; gap: 4px; }
.gp-tese-acoes button { border: 1px solid var(--ig-border-soft, #e2e8f0); background: var(--ig-surface, #fff); color: var(--ig-text-soft, #334155); border-radius: 8px; padding: 5px; cursor: pointer; }
.gp-tese-acoes button:disabled { opacity: .35; cursor: default; }
.gp-tese-acoes button.perigo { color: #b91c1c; }
.gp-resumo { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0 0 12px; }
.gp-resumo div { padding: 10px 12px; border-radius: 12px; background: var(--ig-surface-2, #f8fafc); }
.gp-resumo dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; }
.gp-resumo dd { margin: 2px 0 0; font-weight: 700; color: var(--ig-text, #0f2a3d); }
.gp-gerar { padding: 12px 22px; font-size: 14.5px; }
.gp-rodape { display: flex; justify-content: space-between; gap: 10px; }

/* ---------- Próximos passos sugeridos ---------- */
.pp-lista { display: flex; flex-direction: column; gap: 8px; }
.pp-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ig-border-soft, #e2e8f0); text-decoration: none; background: var(--ig-surface, #fff); transition: border-color .15s, background .15s; }
.pp-item:hover { border-color: #06b6d4; background: var(--ig-surface-brand, #eef6fb); }
.pp-numero { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #013252; color: #2dd4ea; font-weight: 800; font-size: 13px; flex: none; }
.pp-texto { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pp-texto strong { color: var(--ig-text, #0f2a3d); font-size: 14px; }
.pp-texto small { color: var(--ig-text-2, #64748b); font-size: 12px; }
.pp-responsavel { display: inline-flex; align-items: center; gap: 4px; }
.pp-ic { width: 13px; height: 13px; }
.pp-confianca { font-size: 12px; font-weight: 800; color: #15803d; background: #dcfce7; border-radius: 999px; padding: 3px 9px; }

/* ---------- Atalho da Íris (ao lado da busca global) ---------- */
.iris-atalho {
    display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; text-decoration: none;
    background: linear-gradient(135deg, #013252, #006699); color: #eaf7fc; font-size: 12.5px; font-weight: 800;
    box-shadow: 0 6px 16px rgba(0, 102, 153, .25); border: 1px solid rgba(45, 212, 234, .35);
}
.iris-atalho:hover { filter: brightness(1.1); }
.iris-atalho-ic { width: 18px; height: 18px; color: #2dd4ea; }
@media (max-width: 640px) { .iris-atalho-texto { display: none; } .iris-atalho { padding: 6px; } }
