/* static/css/client_admin.css */

/* ===============================
   CLIENT ADMIN — PÁGINAS
   =============================== */

.flash-wrapper {
    margin-bottom: 20px;
}

/* ---------- Auth / Login / Reset ---------- */
.login-container,
.reset-password-request,
.reset-password {
    max-width: 420px;
    margin: 80px auto;
    padding: 30px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.form-group.spaced {
    margin-top: 22px;
}


.login-container button,
.reset-password-request button,
.reset-password button {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
}

.login-container button:hover {
    background-color: var(--primary-hover);
}

/* Centraliza ações nos formulários de auth */
.login-container form,
.reset-password form,
.reset-password-request form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Mantém inputs 100% */
.login-container .form-group,
.reset-password .form-group,
.reset-password-request .form-group {
    width: 100%;
}

/* Botão continua largo, mas centralizado semanticamente */
.login-container button,
.reset-password button,
.reset-password-request button {
    width: 100%;
}

/* Centraliza links auxiliares do auth */
.login-container p,
.reset-password p,
.reset-password-request p {
    text-align: center;
    margin-top: 15px;
}



/* ---------- Settings ---------- */
.settings-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.settings-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.settings-card {
    padding: 22px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.settings-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

/* ---------- Company Selector ---------- */
.company-selector {
    margin-top: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.25);
    display: flex;
    justify-content: center;
}

.company-selector-inner {
    width: 80%;
}

.company-selector-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 6px;
}

.company-selector-dropdown {
    width: 100%;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    background-color: white;
}

/* ===============================
   SYSTEM MESSAGES — CLIENT ADMIN
   =============================== */

.system-messages {
    margin: 30px 0;
    padding: 20px;

    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-left: 5px solid var(--primary-color);
    border-radius: 6px;
}

.system-messages h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 20px;
}

/* Tabela “leve” */
.system-messages-table {
    width: 100%;
    border-collapse: collapse;
}

.system-messages-table tr {
    border-bottom: 1px solid #eee;
}

.system-messages-table tr:last-child {
    border-bottom: none;
}

.system-messages-table td {
    padding: 10px 6px;
    vertical-align: middle;
}

/* Ações */
.system-messages-table a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.system-messages-table a:hover {
    text-decoration: underline;
}

/* Botão parecer link */
.link-button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;

    font: inherit;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
}

.link-button:hover {
    text-decoration: underline;
}

/* Footer */
.system-messages-footer {
    margin-top: 14px;
    text-align: right;
}

.system-messages-footer a {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.system-messages-footer a:hover {
    text-decoration: underline;
}

/* Status na lista completa */
.system-messages-status {
    font-size: 13px;
    color: #666;
}
/* Limita largura do bloco de System Messages na Home */
.system-messages {
    max-width: 80%;          /* 👈 reduz ~20% */
}

/* Centraliza o bloco dentro do container */
.system-messages {
    margin-left: 0;
}

/* Data das System Messages */
.system-messages-date {
    font-size: 13px;
    color: #888;
}

/* Linha separadora sutil entre colunas */
.system-messages-table td + td {
    border-left: 1px solid #f0f0f0;
    padding-left: 12px;
}

/* Mais distância do menu lateral */
.system-messages {
    max-width: 80%;
    margin-left: 60px;   /* 👈 ajuste principal */
}

/* Tipos de System Messages */
.alert-type-financeiro {
    border-left: 5px solid #dc3545; /* vermelho */
}

.alert-type-trial {
    border-left: 5px solid #ffc107; /* amarelo */
}

.alert-type-cadastral {
    border-left: 5px solid #6f42c1; /* amarelo (igual trial) */
}

.alert-type-tecnico {
    border-left: 5px solid #17a2b8; /* azul */
}

/* garante alinhamento */
.system-messages-table tr.alert-row td:first-child {
    padding-left: 12px;
}

/* ===============================
   SYSTEM MESSAGES — HISTÓRICO
   =============================== */

/* Quando estiver na página de histórico */
.system-messages-history .alert-row {
    border-left-width: 3px;   /* mais sutil que a Home */
    opacity: 0.9;
}

/* Mantém as cores por tipo, mas menos agressivas */
.system-messages-history .alert-type-financeiro {
    border-left-color: #dc3545;
}

.system-messages-history .alert-type-trial {
    border-left-color: #ffc107;
}

.system-messages-history .alert-type-cadastral {
    border-left-color: #6f42c1;
}

.system-messages-history .alert-type-tecnico {
    border-left-color: #17a2b8;
}

/* Normaliza tamanho do título das mensagens (Home e Alerts) */
.system-messages-table strong {
    font-size: 15px;     /* ajuste fino: teste 14px / 15px */
    font-weight: 600;    /* mantém destaque sem “gritar” */
}

/* Ícones de System Messages */
.alert-icon {
    display: inline-block;
    margin-right: 6px;
    font-size: 16px;
    vertical-align: middle;
}

/* Tipos */
.alert-icon-financeiro::before {
    content: "💳";
}

.alert-icon-trial::before {
    content: "⏳";
}

.alert-icon-cadastral::before {
    content: "📝";
}

.alert-icon-tecnico::before {
    content: "🛠️";
}

/* Normaliza ações das System Messages (Ver | Dispensar) */
.system-messages-table a,
.system-messages-table .link-button {
    font-size: 14px;     /* levemente menor que o título */
    font-weight: 600;    /* ainda destacado, mas mais leve */
}

/* ===============================
   ERROR STATES — CLIENT ADMIN
   =============================== */

.error-state {
    max-width: 520px;
    margin: 80px auto;
    padding: 40px 30px;

    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;

    text-align: center;

    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.error-icon {
    font-size: 42px;
    margin-bottom: 16px;
}

.error-state h2 {
    margin: 0 0 12px 0;
    font-size: 22px;
    font-weight: 600;
}

.error-message {
    font-size: 15px;
    color: #555;
    margin-bottom: 28px;
    line-height: 1.5;
}

/* Ações */
.error-actions {
    display: flex;
    justify-content: center;
}

/* Botão principal reutilável */
.btn-primary {
    display: inline-block;
    padding: 10px 22px;

    background-color: var(--primary-color);
    color: white;
    text-decoration: none;

    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;

    transition: background-color 0.15s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

/* ===============================
   Página de Contextos — ações do topo e demais estilos
   =============================== */



.contexts-clients-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.contexts-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
}

.contexts-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary-color);
}

.contexts-checkbox-label:hover input[type="checkbox"] {
    outline: 2px solid var(--primary-hover);
}

.contexts-checkbox-label span.help-tooltip {
    margin-left: 4px;
}
.contexts-actions {
    display: flex; /* inline-flex*/
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.contexts-table-wrapper {

    background: white;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    padding: 10px 16px;

    overflow-x: auto;
}

.contexts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.contexts-table th,
.contexts-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #e5e5e5;
}

.contexts-table th:first-child,
.contexts-table td:first-child {
    border-left: 1px solid #e5e5e5;
}

.contexts-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    border-right: 1px solid rgba(255,255,255,0.25);
    border-left: 1px solid rgba(255,255,255,0.25);
}

.contexts-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.contexts-table tr:hover {
    background-color: #f1f1f1;
}

.contexts-table td a {
    color: var(--primary-color, #95b734);
    text-decoration: none;
}

.contexts-table td a:hover {
    text-decoration: underline;
}

.contexts-table th.col-default,
.contexts-table td.col-default,
.contexts-table th.col-whatsapp,
.contexts-table td.col-whatsapp,
.contexts-table th.col-actions,
.contexts-table td.col-actions {
    text-align: center;
}

.contexts-table th.col-keywords,
.contexts-table td.col-keywords {
    width: 30%;
}

.contexts-table th.col-default,
.contexts-table td.col-default {
    width: 10%;   
}

.contexts-table th.col-whatsapp,
.contexts-table td.col-whatsapp {
    width: 20%;
}

.contexts-table th.col-actions,
.contexts-table td.col-actions {
    width: 15%;
}

/* ===============================
   Ações inline — Contextos (Editar | Excluir)
   =============================== */

.contexts-actions-col a,
.contexts-actions-col button {

    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 20px;
    line-height: 20px;

    padding: 0;
    margin: 0;

    background: none;
    border: none;

    width: auto;

    color: var(--primary-color);
    cursor: pointer;

    font-size: 18px;      /* 👈 aumento leve */
    font-weight: 500;     /* 👈 deixa mais legível */

    text-decoration: none;
}

/* Hover padrão */
.contexts-actions-col a:hover,
.contexts-actions-col button:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Excluir */
.contexts-actions-col .delete-btn {
    color: var(--error-color);
}

.contexts-actions-col .delete-btn:hover {
    color: var(--error-color-hover);
    background: none;
}

/* Separador visual */
.contexts-actions-col .action-separator {
    margin: 0 6px;
    color: #999;
    pointer-events: none;
    user-select: none;
}

/* Ações em linha */
.contexts-actions-col {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}


/* Botões visuais da página de Contextos */

.contexts-actions a.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 20px;
    min-width: 220px;
    height: 40px;

    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;

    /* 🔥 MATA comportamento de link */
    text-decoration: none !important;
    color: white !important;

    box-sizing: border-box;
}

/* Primário */
.contexts-actions a.action-btn.primary {
    background-color: var(--primary-color);
}

.contexts-actions a.action-btn.primary:hover {
    background-color: var(--primary-hover);
}

/* Secundário (Cancelar) — funciona para <a> e <button> */
.contexts-actions .action-btn.secondary {
    background-color: var(--cancel-color);
    color: white;
}

.contexts-actions .action-btn.secondary:hover {
    background-color: var(--cancel-color-hover);
}


/* Página de Criação / Edição de Contexto */

.context-form-container .form-container {
    max-width: none;     /* 🔥 remove o limite herdado */
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;

    padding: 28px 32px;

    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}


.context-form-container {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    margin: 10px auto;
    box-sizing: border-box;
}

/* Textarea do conteúdo do contexto — largura total REAL */

.context-form-container .form-group textarea#content {
    display: block;

    width: 100% !important;
    max-width: none !important;   /* 🔥 mata qualquer trava */
    min-width: 100%;

    min-height: 350px;
    font-size: 15px;
    line-height: 1.5;

    resize: none; /* remove resize (decisão correta) */
    box-sizing: border-box;

}


/* Inputs um pouco mais confortáveis */
.context-form-container input[type="text"],
.context-form-container textarea {
    width: 100%;
}

/* Espaçamento sutil entre grupos específicos do formulário */

.context-form-container .form-group + .form-group {
    margin-top: 14px; /* espaçamento padrão */
}

/* Um pouco mais de respiro para grupos “conceituais” */
.context-form-container .form-group.spaced {
    margin-top: 22px; /* < meia linha visual */
}

.context-row-clickable{
    cursor:pointer;
    transition: background 0.15s ease;
}

.context-row-clickable:hover{
    background:#f3f6fb;
}


/* ===============================
   Página de Simulação de Contextos
   =============================== */

.simulation-form-container {
    max-width: 1000px;   /* um pouco mais largo que contextos */
}

.simulation-form-container .form-container {
    max-width: none;
    width: 100%;
}

/* Textarea da simulação */
.simulation-form-container textarea#message {
    width: 100% !important;
    max-width: none !important;
    min-width: 100%;
    min-height: 160px;
    font-size: 18px;
    line-height: 1.5;
    resize: none;
    box-sizing: border-box;
}

.simulation-debug .simulation-debug-item + .simulation-debug-item {
    margin-top: 14px;   /* mesmo padrão do form */
}

.simulation-form-container .contexts-actions {
    display: flex;
    align-items: center;      /* garante centro */
    gap: 16px;
}

/* Normaliza <a> e <button> */
.simulation-form-container .contexts-actions .action-btn {
    width: 220px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;               /* 🔥 remove diferenças internas */
    margin: 0;

    line-height: 1;           /* 🔥 remove baseline diferente */
    vertical-align: middle;

    box-sizing: border-box;
}

/* Remove estilo nativo específico de button */
.simulation-form-container .contexts-actions button.action-btn {
    appearance: none;
    -webkit-appearance: none;
    border-radius: 4px;
}


/* Títulos da simulação */

.simulation-section-title {
    padding-bottom: 6px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 16px;
}

* {
    box-sizing: border-box;
}

/* Resposta da IA na simulação */

.simulation-response {
    width: 80%;
    min-height: 140px;
    resize: none;
    background-color: #f9fafc;
}

#simulation-result {
    margin-top: 20px;
}

/* ===============================
   SIMULATION CHAT UI
   =============================== */

.simulation-conversation {
    width: 80%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
    margin: 0 auto;       /* centraliza */
    max-width: 320px;
}

/* balão base */

.simulation-bubble {

    padding: 14px 16px;
    border-radius: 10px;
    line-height: 1.6;

    font-size: 18px;   /* 🔥 aumento ~20% */
    word-wrap: break-word;
}

/* usuário */
.simulation-user {
    align-self: flex-end;
    background-color: #e8f1ff;
    border: 1px solid #cddfff;
    max-width: min(100%, 760px);
}

/* IA */

.simulation-ai {
    align-self: flex-start;
    background-color: #f4f6f8;
    border: 1px solid #e0e0e0;
    max-width: min(80%, 520px);
}

/* ===============================
   LEADS TABLE
   =============================== */

.leads-table-wrapper {

    background: white;

    border: 1px solid #e5e7eb;
    border-radius: 8px;

    padding: 10px 16px;

    overflow-x: auto;
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.leads-table th,
.leads-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #e5e5e5;
}

.leads-table th a{

    color:white;
    text-decoration:none;

    display:inline-flex;
    align-items:center;
    gap:6px;

}

.leads-table th:first-child,
.leads-table td:first-child {
    border-left: 1px solid #e5e5e5;
}

.leads-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    border-right: 1px solid rgba(255,255,255,0.25);
    border-left: 1px solid rgba(255,255,255,0.25);
}

.leads-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.leads-table tr:hover {
    background-color: #f1f1f1;
}

.leads-table td a {
    color: var(--primary-color, #95b734);
    text-decoration: none;
}

.leads-table td a:hover {
    text-decoration: underline;
}

.leads-table th.col-actions,
.leads-table td.col-actions {
    text-align: center;
    width: 15%;
}

.leads-table .lead-status-cell{
    text-align:center;
    font-size: 14px; 
}

/* ===============================
   LEADS PAGE
   =============================== */

.lead-available {
    color: #888;
    font-style: italic;
}

/* Status */

.lead-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 18px;     /* alinhado com os outros campos */
    font-weight: 600;
}

.lead-status-novo {
    color: #007bff;
    background: #e8f1ff;
}

.lead-status-em_atendimento {
    color: #15803d;
    background: #e6f7ec;
}

.lead-status-convertido {
    /* color: #0e7490;
    background: #e6f7fb; */
    color:  #b002ef; /* #0e7490; */
    background:#eae8ec; /* #e6f7fb; */
}

.lead-status-perdido {
    color: #777;
    background: #f3f4f6;
}

.lead-status-select{

    padding:6px 10px;

    border-radius:6px;

    border:1px solid #d0d7e2;

    font-size:18px;

    background:white;

}

.lead-status-select{

    padding:6px 12px;

    border-radius:20px;

    font-size:18px;

    font-weight:600;

    border:1px solid #d0d7e2;

    cursor:pointer;

}

/* cores herdadas */

.lead-status-select.lead-status-novo{
    color:#007bff;
    background:#e8f1ff;
}

.lead-status-select.lead-status-em_atendimento{
    color:#15803d;
    background:#e6f7ec;
}

.lead-status-select.lead-status-convertido{
    color:  #b002ef; /* #0e7490; */
    background:#eae8ec; /* #e6f7fb; */
}

.lead-status-select.lead-status-perdido{
    color:#777;
    background:#f3f4f6;
}

.pipeline-dot{

    width:14px;
    height:14px;

    border-radius:50%;

    margin-bottom:6px;

}

/* cores herdadas dos status */

.pipeline-dot.lead-status-novo{
    background:#007bff;
}

.pipeline-dot.lead-status-em_atendimento{
    background:#15803d;
}

.pipeline-dot.lead-status-convertido{
    background:#b002ef;
}

.pipeline-dot.lead-status-perdido{
    background:#777;
}

/* Ajuste da coluna resumo */
.contexts-table td.lead-summary {
    line-height: 1.4;
}

/* ===============================
   LEAD DETAIL PAGE
   =============================== */

.lead-card {

    background: #f8fafc; /* white; */
    border: 2px solid #779f0afb; /*  #e0e0e0; #81a4fb; */
    border-left: 4px solid #779f0afb;
    border-radius: 8px;

    padding: 24px;
    margin-top: 24px;

    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}


.lead-card h3 {


    font-size: 20px;
    font-weight: 600;
    color: #779f0afb;

    padding-bottom: 2px;
    margin-bottom: 16px;
    margin-top: 1px;

    border-bottom: 1px solid #e5e7eb;

    border-bottom: 1px solid #779f0afb /* #81a4fb; */
}

.lead-management-card {

    background:#f8fafc;

    border: 2px solid #3f75fb;
    border-left: 4px solid #3f75fb;

    border-radius: 8px;

    padding: 24px;
    margin-top: 24px;

    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}


.lead-management-card h3 {

    font-size: 20px;
    font-weight: 600;
    color: #3f75fb;

    padding-bottom: 1px;
    margin-bottom: 16px;
    margin-top: 2px;

    border-bottom: 1px solid #3f75fb /* #81a4fb; */
}

.lead-note-form {

    background: white;
    border: 1px solid #e0e0e0; /*  #e0e0e0; #81a4fb; */
    border-radius: 8px;

    padding: 24px;
    margin-top: 24px;

    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.lead-note-form h3 {


    font-size: 16px;
    font-weight: 600;
    color: #888;

    padding-bottom: 2px;
    margin-bottom: 16px;
    margin-top: 1px;

   border-bottom: 1px solid #888 /* #81a4fb; */
}


/* Rows */

.lead-row {
    display: flex;
    gap: 30px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.lead-row-clickable{
    cursor:pointer;
}

.leads-table .lead-row-clickable:hover{
    background:#f3f6fb;
}

.lead-field {
    flex: 1;
    min-width: 180px;
}

.lead-field label {
    display: block;
    font-size: 16px;
    color: #888;
    margin-bottom: 4px;
}

.lead-field > div {
    font-weight: 200;
}

/* Sections */

.lead-section {
    margin-top: 24px;
}

.lead-section h4 {
    font-size: 16px;
    color: #888;
    margin-bottom: 10px;
}

/* Summary */

.lead-summary {

    background: #f9fafc;
    border: 1px solid #e0e0e0;
    border-radius: 6px;

    padding: 16px;
    font-weight: 200;

    font-size: 18px;

    line-height: 1.5;

    max-width: 900px;
}

.lead-available {
    color: #888;
    font-style: italic;
}

/* Session */

.lead-session {

    font-family: monospace;
    font-size: 13px;

    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;

    padding: 10px;
}

/* ===============================
   LEAD RESPONSIBLE BOX

    --cancel-color: #6c757d;
    --cancel-color-hover: #5a6268;

    #6c757d;

   =============================== */

.lead-responsible-box{

    border:1px solid #b6bdc2;
    border-radius:6px;

    padding:10px 12px;

    margin-top:4px;

    background:#fafbfc;

}

.lead-responsible-email{

    font-weight:500;
    margin-bottom:8px;
    font-family:monospace;

}

.lead-responsible-action{
    display:flex;
}

/* Actions */

.lead-actions {
    margin-top: 40px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Nome do lead */

.lead-name {
    font-weight: 600;
}


/* Contato */

.lead-contact {
    font-size: 14px;
}

.lead-email {
    color: #888;
    font-size: 13px;
}

.lead-status-incompleto {
    color: #92400e;
    background: #fef3c7;
}


/* Summary limitado */

.lead-summary-cell {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.chat-user {
    background: #eef2ff;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.chat-bot {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

/* ===============================
   CONVERSATION VIEW
   =============================== */

.conversation-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* message block */

.chat-message {
    max-width: 760px;
}


/* labels */

.chat-label {
    font-size: 12px;
    color: #777;
    margin-bottom: 4px;
}


/* bubbles */

.chat-bubble {
    padding: 12px 14px;
    border-radius: 8px;
    line-height: 1.5;
    border: 1px solid #e5e7eb;
}


/* user */

.chat-user .chat-bubble {
    background: #eef2ff;
}


/* assistant */

.chat-bot .chat-bubble {
    background: #f4f4f5;
}

/* ===============================
   CHAT TIMESTAMP
   =============================== */

.chat-timestamp{
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}


/* alinhamento dos blocos */

.simulation-user-wrapper{
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.simulation-ai-wrapper{
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* card específico da conversa */

.lead-card.conversation-card {
    max-width: 660px;
    margin: 24px auto;
}

/* alinhamento */

.simulation-user-wrapper{
    align-self: flex-end;
}

.simulation-ai-wrapper{
    align-self: flex-start;
}

.lead-capture-marker {
    display: inline-block;
    margin: 12px auto;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #7a5c00;
    background-color: #fff3cd;
    border: 1px solid #ffe69c;
    border-radius: 6px;
    align-self: center;
}

.lead-note {
    border-top: 2px solid #eee;
    padding: 10px 0;
}

.lead-note-meta {
    font-size: 16px;
    color: #888;
    margin-bottom: 4px;
}

.lead-note-text {
    font-size: 18px;
}
/* ===============================
   LEAD NOTES INPUT
   =============================== */

.lead-note-input{
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.lead-note-input textarea{
    flex: 1;
    min-height: 140px;
    resize: vertical;
    padding: 10px;
    font-size: 18px;
    border:1px solid #6c757d;
    /* border: 2px solid #ddd; */
    border-radius: 6px;
}

.lead-note-input button{
    height: 42px;
    white-space: nowrap;
}

.note-counter{
    margin-top: 4px;
    font-size: 12px;
    color: #888;
    text-align: left;
    transition: color 0.2s ease;
}

.lead-note-textarea{
    flex: 1;
    display: flex;
    flex-direction: column;
}

.note-counter-warning{
    color: #f59e0b;   /* laranja */
}

.note-counter-limit{
    color: #dc2626;   /* vermelho */
}

.lead-unassigned-warning{

    background: #fff3cd;

    border: 1px solid #ffe69c;

    padding: 16px;

    border-radius: 6px;

    margin-top: 10px;

}

.lead-taken{

    color:#888;
    font-size:15px;
    font-weight:500;

    text-decoration:none;
}

.lead-taken:hover{
    text-decoration:underline;
}

.lead-taken{

    color:#888;
    font-size:15px;
    font-weight:500;

}

.btn-link.release{
    color:#dc2626;
}

.btn-link.release:hover{
    color:#b91c1c;
}

/* ===============================
   LEAD RESPONSIBILITY ACTION
   =============================== */

.lead-action{

    background:#f5f7fb;
    border:1px solid #dbe2f0;

    color:#2c3e50;

    padding:6px 12px;
    border-radius:6px;

    font-size:18px;
    font-weight:500;

    cursor:pointer;

    transition:all 0.15s ease;
}

.lead-action:hover{
    background:#eef2f8;
}

.lead-action.release{
    color:#b91c1c;
    border-color:#f1d5d5;
}

.lead-action.release:hover{
    background:#fdecec;
}


/* ===============================
   LEAD PIPELINE
   =============================== */

.lead-pipeline{

    display:flex;
    align-items:center;
    justify-content:center;

    gap:12px;

    margin:20px 0 30px 0;

}

.pipeline-step{

    display:flex;
    flex-direction:column;
    align-items:center;

    font-size:14px;
    color:#999;

}

.pipeline-dot{

    width:14px;
    height:14px;

    border-radius:50%;

    background:#d1d5db;

    margin-bottom:6px;

}

.pipeline-line{

    flex:1;
    height:2px;

    background:#e5e7eb;

    max-width:80px;

}

.pipeline-step.active .pipeline-dot{

    background:#3f75fb;

}

.pipeline-step.active .pipeline-label{

    color:#3f75fb;
    font-weight:600;

}

/* ===============================
   STATUS EVENT
   =============================== */

.lead-note-status{

    border-left:4px solid #02acef;

    padding-left:12px;

    background:#f5f8ff;

}

/* ===============================
   LEADS FILTERS
   =============================== */

.leads-filters{

    background:white;

    border:1px solid #e5e7eb;
    border-radius:8px;

    padding:6px 20px 12px 20px;

    margin-bottom:22px;

    margin-bottom:24px;

}


/* linha dos filtros */

.filters-row{

    display:grid;

    grid-template-columns:
        repeat(auto-fit, minmax(180px,1fr));

    gap:14px;

    align-items:end;

}

/* labels */

.leads-filters label{

    display:flex;
    flex-direction:column;

    font-size:14px;
    font-weight:600;

    color:#555;

}

/* inputs */

.leads-filters input,
.leads-filters select{

    margin-top:4px;

    padding:8px 10px;

    border-radius:6px;
    border:1px solid #d1d5db;

    font-size:14px;

    background:white;

}

/* hover */

.leads-filters input:focus,
.leads-filters select:focus{

    outline:none;
    border-color:var(--primary-color);

}

/* ações */

.filters-actions{

    margin-top:16px;

    display:flex;
    gap:12px;

}



/* botões */

.filters-actions button,
.filters-actions a{

    min-width:140px;
    height:38px;

    display:inline-flex;
    align-items:center;
    justify-content:center;

    border-radius:6px;

    text-decoration:none;
}

/* primário */

.filters-actions .primary{

    background:var(--primary-color);
    color:white;
    border:none;
}

.filters-actions .primary:hover{

    background:var(--primary-hover);

}

/* secundário */

.filters-actions .secondary{

    background:var(--cancel-color);
    color:white;

}

.filters-actions .secondary:hover{

    background:var(--cancel-color-hover);

}

.filters-title{
    font-size:16px;
    font-weight:600;
    margin-bottom:2px;
    margin-bottom:10px;
    color:#555;
}

/* ===============================
   LEADS PAGINATION
   =============================== */

.pagination{

    margin-top:18px;

    display:flex;
    justify-content:center;
    align-items:center;

    gap:14px;

    font-size:15px;
}

/* links */

.pagination a{

    padding:6px 12px;

    border-radius:6px;

    background:#f3f4f6;

    border:1px solid #e5e7eb;

    text-decoration:none;

    color:#333;

    transition:all 0.15s ease;

}

.pagination a:hover{

    background:#e5e7eb;

}

/* ===============================
   USERS FORM
   =============================== */

.users-form-container {

    max-width: 520px;
    margin: 40px auto;

}

.users-form-container .form-container {

    background: white;

    border: 1px solid #e0e0e0;
    border-radius: 8px;

    padding: 28px 30px;

    box-shadow: 0 4px 14px rgba(0,0,0,0.05);

}

/* Select padrão (mesmo estilo dos filtros) */

.users-form-container select {

    width: 100%;

    padding: 8px 10px;

    border-radius: 6px;
    border: 1px solid #d1d5db;

    font-size: 14px;

    background: white;

}

.users-form-container select:focus {

    outline: none;
    border-color: var(--primary-color);

}

.form-help{
    display:block;
    margin-top:6px;
    font-size:13px;
    color:#777;
}

/* ===============================
   USERS ROLE BADGE
   =============================== */

.role-badge {

    display: inline-block;

    padding: 4px 10px;

    border-radius: 14px;

    font-size: 13px;
    font-weight: 600;

    text-transform: uppercase;

}

/* ADMIN */

.role-admin {

    color: #155724;
    background-color: #d4edda;

}

/* OPERATOR */

.role-operator {

    color: #444;
    background-color: #e9ecef;

}

.leads-table th a{

    color:white;
    text-decoration:none;

    display:flex;
    align-items:center;
    justify-content:center;

    gap:6px;

}

.leads-table th a:hover{
    text-decoration:underline;
}

.leads-table th{

    cursor:pointer;

}

.active-filters{

    font-size:18px;
    color:#666;

    margin-top:4px;

}

.pipeline-count{

    font-size:14px;
    font-weight:600;

    margin-top:2px;

}

.pipeline-click{
    text-decoration:none;
    color:inherit;
}

.pipeline-click:hover{

    transform:translateY(-2px);
    cursor:pointer;

}

.pipeline-click:hover .pipeline-dot{

    box-shadow:0 0 0 4px rgba(0,0,0,0.05);

}

/* ===============================
   WEBCHAT TEST PAGE
   =============================== */
.webchat-test-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* conteúdo */
.webchat-test-content {
    flex: 1;
    max-width: 720px;
}

/* área do chat */
.webchat-test-chat {
    width: 380px;
    height: 600px;
    border: 0px solid #e5e5e5; /* coloquei 0 para não aparecer o frame na página, e assim ele só serve como espaçador */
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

/* 👇 ESSENCIAL */
#chat-embed-area {
    width: 100%;
    height: 100%;
}