

/* ===========================================

   REALIZARE ADMIN – PREMIUM EDITION

   Paleta original: Dark + Verde #52ff66

   =========================================== */



/* Reset básico */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}



:root {

    --rlz-bg: #0f0f0f;

    --rlz-bg2: #151515;

    --rlz-bg3: #1c1c1c;

    --rlz-bg-hover: #1e1e1e;

    --rlz-border: #2a2a2a;

    --rlz-border-light: #333333;

    --rlz-green: #52ff66;

    --rlz-green-dark: #34cc48;

    --rlz-danger: #ff3b3b;

    --rlz-danger-dark: #cc2e2e;

    --rlz-text: #f1f1f1;

    --rlz-text-soft: #bfbfbf;

    --rlz-radius: 10px;

    --rlz-transition: .15s ease-out;

    --rlz-shadow: 0 0 18px rgba(0,0,0,.35);

}



/* Layout base */

body.rlz-layout {

    background: var(--rlz-bg);

    color: var(--rlz-text);

    display: flex;

    height: 100vh;

    overflow: hidden;

    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

}



/* Sidebar */

.rlz-sidebar {

    width: 250px;

    background: var(--rlz-bg2);

    border-right: 1px solid var(--rlz-border);

    display: flex;

    flex-direction: column;

    transition: width .2s ease, transform .2s ease;

}



.rlz-sidebar-user {

    padding: 18px 16px;

    border-bottom: 1px solid var(--rlz-border);

    background: radial-gradient(circle at top left, #202020 0, #111 55%);

    display: flex;

    align-items: center;

    gap: 12px;

}



.rlz-sidebar-avatar {

    width: 42px;

    height: 42px;

    border-radius: 50%;

    overflow: hidden;

    border: 2px solid rgba(82,255,102,.7);

    display: flex;

    align-items: center;

    justify-content: center;

    background: #000;

}



.rlz-sidebar-avatar img {

    width: 100%;

    height: 100%;

    object-fit: cover;

}



.rlz-sidebar-avatar-inicial {

    width: 100%;

    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    color: var(--rlz-green);

    font-weight: 700;

    font-size: 18px;

}



.rlz-sidebar-user-text {

    display: flex;

    flex-direction: column;

    gap: 2px;

}



.rlz-sidebar-user-name {

    font-size: 15px;

    font-weight: 600;

    color: var(--rlz-text);

}



.rlz-sidebar-user-role {

    font-size: 8px;

    line-height: 1.2;

    opacity: 0.85;

    color: var(--rlz-green);

    text-transform: uppercase;

    letter-spacing: .5px;

}



.rlz-sidebar-user-email {

    font-size: 11px;

    color: var(--rlz-text-soft);

}



/* Navegação da sidebar */

.rlz-sidebar-nav {

    padding: 14px;

    overflow-y: auto;

    flex: 1;

}



.rlz-sidebar-section {

    margin-bottom: 18px;

}



.rlz-sidebar-section-bottom {

    margin-top: auto;

}



.rlz-sidebar-section-title {

    color: var(--rlz-green);

    font-size: 12px;

    letter-spacing: .7px;

    text-transform: uppercase;

    margin-bottom: 8px;

    opacity: .8;

}



.rlz-sidebar-link {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 7px 9px;

    border-radius: 8px;

    margin-bottom: 4px;

    color: var(--rlz-text-soft);

    text-decoration: none;

    transition: background var(--rlz-transition), color var(--rlz-transition), transform var(--rlz-transition);

    font-size: 14px;

}



.rlz-sidebar-icon {

    width: 22px;

    text-align: center;

    font-size: 16px;

}



.rlz-sidebar-label {

    flex: 1;

    white-space: nowrap;

    text-overflow: ellipsis;

    overflow: hidden;

}



.rlz-sidebar-link:hover {

    background: var(--rlz-bg-hover);

    color: var(--rlz-green);

    transform: translateX(1px);

}



.rlz-sidebar-link.rlz-sidebar-link-active,

.rlz-sidebar-link.active {

    background: var(--rlz-green);

    color: #000;

    font-weight: 600;

}



/* Main / Topbar */

.rlz-main {

    flex: 1;

    display: flex;

    flex-direction: column;

}



.rlz-topbar {

    height: 54px;

    background: var(--rlz-bg2);

    border-bottom: 1px solid var(--rlz-border);

    display: flex;

    align-items: center;

    padding: 0 16px;

    gap: 12px;

}



.rlz-topbar-burger {

    font-size: 22px;

    background: none;

    border: none;

    color: var(--rlz-green);

    cursor: pointer;

}



.rlz-topbar-title {

    font-size: 19px;

    font-weight: 600;

}



/* Conteúdo */

.rlz-content {

    padding: 22px;

    overflow-y: auto;

    flex: 1;

}



/* Cards base */

.rlz-card {

    background: var(--rlz-bg2);

    border: 1px solid var(--rlz-border);

    border-radius: var(--rlz-radius);

    padding: 18px 18px;

    margin-bottom: 18px;

    box-shadow: var(--rlz-shadow);

}



/* Botões genéricos */

.rlz-btn {

    display: inline-block;

    padding: 9px 16px;

    border-radius: 8px;

    border: none;

    cursor: pointer;

    font-weight: 600;

    font-size: 14px;

    text-decoration: none;

    transition: background var(--rlz-transition), transform var(--rlz-transition), box-shadow var(--rlz-transition);

}



.rlz-btn:disabled {

    opacity: .5;

    cursor: default;

}



.rlz-btn-green {

    background: var(--rlz-green);

    color: #000;

}



.rlz-btn-green:hover:not(:disabled) {

    background: var(--rlz-green-dark);

    transform: translateY(-1px);

}



.rlz-btn-red {

    background: var(--rlz-danger);

    color: #000;

}



.rlz-btn-red:hover:not(:disabled) {

    background: var(--rlz-danger-dark);

    transform: translateY(-1px);

}



.rlz-btn-gray {

    background: #222;

    color: #eee;

}



.rlz-btn-gray:hover:not(:disabled) {

    background: #2c2c2c;

}



/* Inputs */

.rlz-input,

.rlz-select,

.rlz-textarea {

    width: 100%;

    background: #000;

    border: 1px solid var(--rlz-border);

    border-radius: 6px;

    padding: 8px 10px;

    color: var(--rlz-text);

    font-size: 14px;

    transition: border-color var(--rlz-transition), box-shadow var(--rlz-transition), background var(--rlz-transition);

}



.rlz-input:focus,

.rlz-select:focus,

.rlz-textarea:focus {

    outline: none;

    border-color: var(--rlz-green);

    box-shadow: 0 0 0 1px rgba(82,255,102,.35);

}



/* Tabelas */

.rlz-table {

    width: 100%;

    border-collapse: collapse;

    font-size: 14px;

    margin-bottom: 20px;

}



.rlz-table th,

.rlz-table td {

    padding: 9px 8px;

    border-bottom: 1px solid #222;

}



.rlz-table th {

    background: var(--rlz-bg3);

    color: var(--rlz-green);

    text-align: left;

}



.rlz-table tr:hover td {

    background: var(--rlz-bg-hover);

}



/* Logs */

.rlz-log-box {

    background: #000;

    border-radius: 6px;

    border: 1px solid var(--rlz-border-light);

    font-family: monospace;

    font-size: 12px;

    padding: 10px;

    white-space: pre-wrap;

    max-height: 280px;

    overflow-y: auto;

}



/* Títulos de seção */

.rlz-section-title {

    font-size: 18px;

    margin-bottom: 10px;

}



/* Divisor */

.rlz-divider {

    border-bottom: 1px solid var(--rlz-border-light);

    margin: 16px 0;

}



/* Responsividade */

@media (max-width: 900px) {

    .rlz-sidebar {

        position: absolute;

        left: -260px;

        top: 0;

        bottom: 0;

        z-index: 20;

    }

    .rlz-sidebar.open {

        left: 0;

    }

    .rlz-main {

        flex: 1;

    }

}





/* CONTRATO DESATIVADO PARA RESTAURAR VISUAL PADRÃO
/* ----- CARDS (melhor aparência) ---------------------------- */

.rlz-card {

    background: #151515;

    border: 1px solid #2a2a2a;

    padding: 20px;

    border-radius: 10px;

    box-shadow: 0 0 15px rgba(0,0,0,.25);

}




*/
/* ----- BOTÕES PREMIUM -------------------------------------- */

.rlz-btn {

    display: inline-block;

    padding: 10px 18px;

    border-radius: 8px;

    font-weight: 600;

    cursor: pointer;

    transition: .15s ease-out;

    text-decoration: none;

}



.rlz-btn-green {

    background: #52ff66;

    color: #000;

}

.rlz-btn-green:hover {

    background: #34cc48;

}



.rlz-btn-red {

    background: #ff3b3b;

    color: #000;

}

.rlz-btn-red:hover {

    background: #cc2e2e;

}



.rlz-btn-gray {

    background: #222;

    color: #ddd;

}

.rlz-btn-gray:hover {

    background: #2f2f2f;

}



/* ----- INPUTS PREMIUM -------------------------------------- */

.rlz-input, .rlz-select, .rlz-textarea {

    background: #000;

    border: 1px solid #2a2a2a;

    padding: 9px 12px;

    border-radius: 6px;

    color: #f1f1f1;

    width: 100%;

    transition: .15s ease-out;

}

.rlz-input:focus, .rlz-select:focus, .rlz-textarea:focus {

    border-color: #52ff66;

    outline: none;

}



/* ----- TABELAS PREMIUM ------------------------------------- */

.rlz-table {

    width: 100%;

    border-collapse: collapse;

    margin-bottom: 20px;

}



.rlz-table th {

    background: #1c1c1c;

    color: #52ff66;

    padding: 12px;

    text-align: left;

    border-bottom: 1px solid #2a2a2a;

}



.rlz-table td {

    padding: 10px;

    border-bottom: 1px solid #1a1a1a;

}



.rlz-table tr:hover td {

    background: #1e1e1e;

}



/* ----- LOGS PREMIUM ---------------------------------------- */

.rlz-log-box {

    background: #000;

    border: 1px solid #2a2a2a;

    padding: 12px;

    border-radius: 6px;

    font-family: monospace;

    font-size: 13px;

    white-space: pre-wrap;

    max-height: 300px;

    overflow-y: auto;

}



/* ----- TÍTULOS E SEÇÕES ------------------------------------ */

.rlz-section-title {

    font-size: 19px;

    font-weight: bold;

    margin-bottom: 12px;

}



.rlz-divider {

    border-bottom: 1px solid #2a2a2a;

    margin: 20px 0;

}



/* ----- SIDEBAR PREMIUM ------------------------------------- */

.rlz-sidebar-link {

    border-radius: 8px;

    transition: .15s ease-out;

}



.rlz-sidebar-link:hover {

    background: #1e1e1e;

    color: #52ff66;

}



.rlz-sidebar-link-active {

    background: #52ff66 !important;

    color: #000 !important;

    font-weight: bold;

}



/* ----- RESPONSIVIDADE -------------------------------------- */

@media (max-width: 900px) {

    .rlz-sidebar {

        position: absolute;

        z-index: 999;

        left: -260px;

        transition: left .2s ease-out;

    }

    .rlz-sidebar.open {

        left: 0;

    }

}



/* ===== Tower Update Page (v2.1.1) ===== */



.rlz-update-card {

    max-width: 900px;

    margin: 0 auto 24px auto;

}



.rlz-update-title {

    margin-bottom: 10px;

}



.rlz-update-description {

    color: #ccc;

    margin-bottom: 12px;

}



.rlz-update-form {

    margin-top: 10px;

}



.rlz-update-field {

    margin-bottom: 18px;

}



.rlz-update-input {

    width: 100%;

}



.rlz-update-buttons {

    display: flex;

    flex-wrap: wrap;

    gap: 12px;

    margin-top: 20px;

}



.rlz-update-buttons .rlz-btn {

    flex: 1;

    text-align: center;

    justify-content: center;

}



.rlz-update-btn-main {

    font-weight: bold;

}



.rlz-update-btn-warning {

    background: #e9c300;

    color: #000;

    font-weight: bold;

}



.rlz-update-btn-danger {

    background: #ff3b3b;

    color: #fff;

    font-weight: bold;

}



.rlz-update-history-card {

    margin-top: 24px;

}



.rlz-update-history-title {

    margin-bottom: 12px;

}



.rlz-update-history-empty {

    color: #888;

}



.rlz-update-history-list {

    list-style: none;

    padding: 0;

    margin: 0;

}



.rlz-update-history-item {

    padding: 8px 10px;

    border-bottom: 1px solid #222;

    color: #ddd;

    font-size: 0.95rem;

}



.rlz-update-history-item:last-child {

    border-bottom: none;

}



.rlz-update-rollback-hidden {

    display: none;

}



/* ===== Ajuste fino: largura do card de atualização ===== */

.rlz-update-card {

    width: 650px;        /* largura exata usada no 2.0 */

    max-width: 95%;      /* responsivo */

    margin: 0 auto 24px auto !important;

    padding: 20px 30px !important;

}



/* ===== Ajuste fino: botão Rollback Arquivos ===== */

.rlz-update-btn-warning {

    background: #e9c300 !important;

    color: #000 !important;

    font-weight: bold !important;

    border-radius: 6px !important;

    padding: 10px 16px !important;

    display: inline-flex !important;

    align-items: center;

    justify-content: center;

    text-decoration: none !important;

    min-width: 140px;

}



.rlz-update-btn-warning:hover {

    background: #d1ae00 !important;

}



/* Topbar alinhada corretamente após a sidebar */

.rlz-topbar {

    margin-left: 245px !important;  /* largura da sidebar */

    width: calc(100% - 240px) !important;

}



/* ====== FORM PADRÃO REALIZARE ====== */



.rlz-form {

    display: flex;

    flex-direction: column;

    gap: 18px;

    margin-top: 10px;

}



.rlz-form-grid {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 18px;

}



.rlz-form-row {

    display: flex;

    flex-direction: column;

    gap: 6px;

}



.rlz-form-row-full {

    grid-column: 1 / 3; /* ocupa as duas colunas */

}



.rlz-form-row label {

    font-size: 14px;

    color: #ccc;

}



.rlz-form-row input,

.rlz-form-row select {

    width: 100%;

    padding: 10px 12px;

    background: #0d0d0d;

    border: 1px solid #2a2a2a;

    border-radius: 6px;

    color: #fff;

}



.rlz-form-actions {

    grid-column: 1 / 3;

    display: flex;

    gap: 10px;

    margin-top: 4px;

}



/* ====== Toast Realizare – feedback de cópia de link ====== */

.rlz-toast {

    position: fixed;

    bottom: 22px;

    right: 22px;

    background: #151515;

    padding: 10px 16px;

    color: #52ff66;

    border: 1px solid #2a2a2a;

    border-radius: 8px;

    opacity: 0;

    transform: translateY(10px);

    transition: all .25s ease-out;

    z-index: 99999;

    box-shadow: 0 0 12px rgba(0,0,0,.4);

    font-weight: 600;

    font-size: 13px;

}



.rlz-toast.show {

    opacity: 1;

    transform: translateY(0);

}



/* divisor discreto entre grupos de setor na tabela de usuários */

.rlz-sector-divider {

    border-top: 1px solid #2a2a2a;

    height: 8px;

}



/* ==== REALIZARE SCROLLBAR GLOBAL ==== */

::-webkit-scrollbar {

    width: 10px;

}



::-webkit-scrollbar-track {

    background: #0a0a0a;

}



::-webkit-scrollbar-thumb {

    background: #1f1f1f;

    border-radius: 6px;

}



::-webkit-scrollbar-thumb:hover {

    background: #2e2e2e;

}



.rlz-avatar-img {

    width: 48px;

    height: 48px;

    border-radius: 50%;

    object-fit: cover;

    border: 2px solid #1eff75; /* mesmo verde do Realizare */

}



.rlz-sidebar-user {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 18px;

}



.rlz-sidebar-user-name {

    font-size: 16px;

    font-weight: bold;

    color: #fff;

}



.rlz-sidebar-user-role {

    font-size: 13px;

    color: #a7ffce;

    margin-top: 2px;

}



.rlz-sidebar-user-email {

    font-size: 12px;

    color: #ccc;

    margin-top: 4px;

}



/* Avatar real */

.rlz-avatar-img {

    width: 48px;

    height: 48px;

    border-radius: 50%;

    object-fit: cover;

}



/* Avatar fallback colorido */

.rlz-avatar-fallback {

    width: 52px;

    height: 52px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 20px;

    font-weight: 700;

    color: white;

    border: 2px solid #32ff7e;

}



.rlz-avatar-img {

    width: 48px;

    height: 48px;

    border-radius: 50%;

    object-fit: cover;

}

.rlz-timezone-selector {

    display: inline-block;

    margin-right: 8px;

}



.rlz-timezone-selector select {

    background: #111;

    color: #eee;

    border: 1px solid #333;

    padding: 6px 8px;

    border-radius: 4px;

    font-size: 13px;

}

/* Centralização da área de relatórios */
.rlz-report-center {
    max-width: 720px;
    margin: 40px auto;
}

/* Grid de datas */
.rlz-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Ações */
.rlz-report-actions {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}
.rlz-report-faq {
    max-width: 900px;
    margin: 30px auto 60px;
}

.rlz-accordion-item {
    border-bottom: 1px solid #2a2a2a;
}

.rlz-accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 14px 0;
    color: #fff;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.rlz-accordion-header::after {
    content: '+';
    float: right;
    opacity: .6;
}

.rlz-accordion-item.open .rlz-accordion-header::after {
    content: '–';
}

.rlz-accordion-body {
    display: none;
    padding-bottom: 14px;
    color: #ccc;
    font-size: 14px;
}

.rlz-accordion-item.open .rlz-accordion-body {
    display: block;
}
.rlz-section-desc {
    margin-bottom: 42px;
}
.rlz-link-muted {
    display: inline-block;
    font-size: 13px;
    color: #9aa0a6;
    text-decoration: none;
}

.rlz-link-muted:hover {
    color: #ffffff;
    text-decoration: underline;
}
/* ============================================================
   REALIZARE — VERIFICADOR OFICIAL DE RELATÓRIOS
   Melhoria de contraste e legibilidade
============================================================ */

/* Texto base */
.rlz-verify-wrapper,
.rlz-verify-wrapper p,
.rlz-verify-wrapper li {
    color: #e6e6e6;
}

/* Título principal */
.rlz-verify-wrapper h2 {
    color: #ffffff;
}

/* Subtítulos */
.rlz-verify-wrapper h3 {
    color: #f1f1f1;
}

/* Labels dos campos */
.rlz-verify-wrapper .rlz-label {
    color: #d8d8d8;
    font-weight: 500;
}

/* Texto auxiliar */
.rlz-verify-wrapper .rlz-muted {
    color: #b8b8b8;
}

/* Textarea e inputs */
.rlz-verify-wrapper textarea,
.rlz-verify-wrapper input {
    color: #ffffff;
    background-color: #000;
}

/* Placeholder */
.rlz-verify-wrapper textarea::placeholder,
.rlz-verify-wrapper input::placeholder {
    color: #8a8a8a;
}

/* Lista explicativa */
.rlz-verify-wrapper ul li {
    color: #dcdcdc;
}

/* ================================
   MENU LATERAL — AJUSTES
================================ */

.rlz-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #cfcfcf;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.rlz-nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: #ffffff;
}

.rlz-nav-link.active,
.rlz-nav-link.is-active {
    background: rgba(89, 255, 106, 0.14);
    color: #59ff6a;
    font-weight: 700;
}
.rlz-accordion-item {
    border-top: 1px solid #2a2a2a;
}

.rlz-accordion-header {
    width: 100%;
    background: none;
    border: 0;
    padding: 14px 0;
    color: #fff;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.rlz-accordion-body {
    display: none;
    padding: 0 0 14px 0;
}

.rlz-accordion-item.open .rlz-accordion-body {
    display: block;
}

/* =========================================================
   REALIZARE — ACORDEON INSTITUCIONAL
========================================================= */
.rlz-accordion {
    margin-top: 12px;
}

.rlz-accordion-item {
    border-top: 1px solid rgba(255,255,255,.08);
}

.rlz-accordion-header {
    width: 100%;
    background: none;
    border: none;
    color: #fff;
    text-align: left;
    padding: 14px 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rlz-accordion-header:hover {
    color: #7dff8b;
}

.rlz-accordion-icon {
    font-size: 18px;
    opacity: .6;
}

.rlz-accordion-body {
    display: none;
    padding: 0 6px 14px 6px;
    color: #cfcfcf;
    font-size: 14px;
    line-height: 1.55;
}

.rlz-accordion-item.open .rlz-accordion-body {
    display: block;
}

.rlz-accordion-item.open .rlz-accordion-icon {
    content: '−';
}
/* ================================
   Realizare – Form padrão
================================ */

.rlz-form {
    max-width: 720px;
}

.rlz-form-group {
    margin-bottom: 16px;
}

.rlz-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #e5e7eb;
}

.rlz-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,0.4);
    background: #020617;
    color: #e5e7eb;
    font-size: 13px;
}

.rlz-input:focus {
    outline: none;
    border-color: #22c55e;
}

.rlz-help {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #9ca3af;
}

.rlz-form-actions {
    margin-top: 20px;
}

/* ============================================================
 * MÓDULO: TREINAMENTO DA IA
 * Página: /admin/ia_treinamento.php
 * ============================================================ */
.rlz-ia-train .rlz-muted{color:#b8b8b8;line-height:1.55}
.rlz-ia-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 18px 0}
.rlz-ia-tab{background:#111;border:1px solid #2a2a2a;color:#ddd;padding:8px 12px;border-radius:10px;cursor:pointer;font-weight:700;font-size:13px}
.rlz-ia-tab:hover{border-color:#52ff66;color:#fff}
.rlz-ia-tab.active{background:rgba(82,255,102,.14);border-color:#52ff66;color:#52ff66}
.rlz-ia-tabpane{display:none}
.rlz-ia-tabpane.active{display:block}
.rlz-ia-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}
.rlz-ia-full{grid-column:1 / -1}
.rlz-ia-field label{display:block;font-size:13px;font-weight:600;margin-bottom:6px;color:#e5e7eb}
.rlz-ia-field textarea{min-height:120px}
.rlz-ia-status{margin-left:10px;font-size:12px;color:#9ca3af}
.rlz-ia-list{margin-top:18px}
.rlz-ia-item{border:1px solid #2a2a2a;background:#0b0b0b;border-radius:12px;padding:12px 14px;margin-bottom:10px}
.rlz-ia-item-title{font-weight:800;margin-bottom:6px;color:#fff}
.rlz-ia-item-meta{font-size:12px;color:#9ca3af;margin-bottom:8px}
.rlz-ia-item-actions{display:flex;gap:8px;flex-wrap:wrap}
.rlz-ia-badge{display:inline-block;font-size:11px;padding:2px 8px;border-radius:999px;border:1px solid rgba(255,255,255,.12);color:#cfcfcf}
.rlz-ia-badge.ok{border-color:rgba(82,255,102,.35);color:#52ff66}
.rlz-ia-badge.warn{border-color:rgba(255,210,0,.35);color:#ffd200}
.rlz-ia-modal-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.7);display:none;align-items:center;justify-content:center;z-index:9999}
.rlz-ia-modal-backdrop.open{display:flex}
.rlz-ia-modal{width:min(820px,92vw);max-height:86vh;overflow:auto;background:#0f0f0f;border:1px solid #2a2a2a;border-radius:16px;box-shadow:0 18px 40px rgba(0,0,0,.5);padding:16px}
.rlz-ia-modal h3{margin:0 0 10px 0}
.rlz-ia-modal .rlz-input{border-radius:10px}
.rlz-ia-modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:12px}


/* ============================================================
   IA TREINAMENTO — PADRÃO VISUAL REALIZARE
   ============================================================ */

.rlz-ia-box {
    background: #1a1a1a;          /* cinza padrão da página */
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
}

.rlz-ia-box textarea,
.rlz-ia-box input[type="text"],
.rlz-ia-box select {
    background: #111;
    border: 1px solid #2a2a2a;
    color: #eaeaea;
}

.rlz-ia-box textarea::placeholder,
.rlz-ia-box input::placeholder {
    color: #777;
}

.rlz-ia-tabs button {
    background: #1f1f1f;
    border: 1px solid #2a2a2a;
    color: #ccc;
}

.rlz-ia-tabs button.active {
    background: #2a2a2a;
    color: #fff;
    border-color: #3a3a3a;
}

/* Botão Como Usar */
.rlz-btn-help {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #fff;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.rlz-btn-help:hover {
    background: #333;
}
/* ============================================================
   MÓDULO: IA — RENDERIZAÇÃO DE RESPOSTAS
   Uso: respostas de Q&A, sugestões e explicações da IA
   ============================================================ */

.rlz-ia-response {
    background: #0e0e0e;
    border: 1px solid #2a2a2a;
    border-left: 4px solid #52ff66;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 14px;
    color: #eaeaea;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 0 10px rgba(0,0,0,.25);
}

/* Parágrafos separados */
.rlz-ia-response p {
    margin-bottom: 10px;
}

/* Listas */
.rlz-ia-response ul {
    margin: 8px 0 8px 18px;
}

.rlz-ia-response li {
    margin-bottom: 6px;
}

/* Destaques */
.rlz-ia-response strong {
    color: #52ff66;
    font-weight: 700;
}

/* Bloco de código ou trecho técnico */
.rlz-ia-response code {
    display: inline-block;
    background: #000;
    border: 1px solid #2a2a2a;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: #7dff8b;
}

/* Separador visual interno */
.rlz-ia-response hr {
    border: none;
    border-top: 1px solid #2a2a2a;
    margin: 14px 0;
}

/* ===========================================

   REALIZARE ADMIN – PREMIUM EDITION
   Paleta original: Dark + Verde #52ff66

   =========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --rlz-bg: #0f0f0f;
    --rlz-bg2: #151515;
    --rlz-bg3: #1c1c1c;
    --rlz-bg-hover: #1e1e1e;
    --rlz-border: #2a2a2a;
    --rlz-border-light: #333333;
    --rlz-green: #52ff66;
    --rlz-green-dark: #34cc48;
    --rlz-danger: #ff3b3b;
    --rlz-danger-dark: #cc2e2e;
    --rlz-text: #f1f1f1;
    --rlz-text-soft: #bfbfbf;
    --rlz-radius: 10px;
    --rlz-transition: .15s ease-out;
    --rlz-shadow: 0 0 18px rgba(0,0,0,.35);
}

/* ... [ARQUIVO ORIGINAL INTACTO, SEM REMOÇÕES OU ALTERAÇÕES] ... */

/* ============================================================
   REALIZARE — Q&A IA (AJUSTE VISUAL DISCRETO)
   ============================================================ */

.rlz-ia-card{
    background:#121212;
    border:1px solid #242424;
    border-radius:10px;
    padding:14px 16px;
    margin-bottom:14px;
}

.rlz-ia-card-h{
    display:flex;
    align-items:center;
    justify-content:space-between;
    font-weight:700;
    font-size:14px;
    color:#eaeaea;
    margin-bottom:10px;
}

.rlz-ia-card-b{
    font-size:13px;
    color:#cfcfcf;
    line-height:1.55;
}
/* FIX Q&A — remover recuo visual do conteúdo */
.rlz-ia-card-b > div {
    margin-left: 0 !important;
    padding-left: 0 !important;
}
/* FIX Q&A — compactar espaçamentos internos */
.rlz-ia-card-b {
    margin-top: 4px;
}

.rlz-ia-card-b p {
    margin-bottom: 6px;
}

.rlz-ia-card-b .rlz-muted {
    margin-top: 4px;
}
/* FIX Q&A — card mais compacto e alinhado */
.rlz-ia-card {
    padding: 12px 14px; /* menos gordura lateral */
}
.rlz-ia-card-b strong{
    color:#ffffff;
    font-weight:600;
}

.rlz-ia-card-b .rlz-muted{
    color:#9ca3af;
}

.rlz-ia-pill{
    font-size:11px;
    padding:2px 8px;
    border-radius:999px;
    background:rgba(82,255,102,.12);
    color:#52ff66;
    border:1px solid rgba(82,255,102,.35);
}

.rlz-ia-actions{
    margin-top:12px;
    display:flex;
    gap:8px;
}

.rlz-btn-xs{
    padding:6px 12px;
    font-size:12px;
    border-radius:8px;
    background:#1a1a1a;
    color:#e5e7eb;
    border:1px solid #2a2a2a;
}

.rlz-btn-xs:hover{
    background:#202020;
    color:#ffffff;
    border-color:#52ff66;
}
/* ============================================================
   FIX REALIZARE — IA TREINAMENTO
   Correção de visibilidade das abas (não alterar)
   Motivo: sobreposição de regras globais de layout
============================================================ */

.rlz-ia-train .rlz-ia-tabpane {
    display: none !important;
}

.rlz-ia-train .rlz-ia-tabpane.active {
    display: block !important;
}

/* ============================================================
 * Treinar IA — Q&A visual
 * Ajuste de alinhamento e status visual
 * ============================================================ */

/* Cabeçalho do card Q&A */
.rlz-ia-card-h {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* força esquerda */
    gap: 8px;
    text-align: left;
}

/* Ícone de pergunta já cadastrada (check) */
.rlz-qa-check {
    color: #2ecc71;            /* verde sucesso */
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

/* Modal padrão Realizare */
.rlz-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Quando aberto */
.rlz-modal-backdrop.open {
    display: flex;
}

/* Caixa do modal padrão */
.rlz-modal {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,.5);
    width: min(820px, 92vw);
    max-height: 86vh;
    overflow: auto;
}

/* Header / body / footer seguem layout existente */
.rlz-modal-header,
.rlz-modal-body,
.rlz-modal-footer {
    padding: 14px 16px;
}

.rlz-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #2a2a2a;
}

.rlz-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #2a2a2a;
}
.rlz-dropdown {
  position: relative;
  display: inline-block;
}

.rlz-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 8px;
  z-index: 50;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}

.rlz-dropdown-menu label {
  display: block;
  font-size: 12px;
  cursor: default;
}

.rlz-dropdown:hover .rlz-dropdown-menu {
  display: block;
}
/* ============================================================
   MANUAL IA — GRID PRINCIPAL
============================================================ */
.rlz-manual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}

@media (max-width: 1100px) {
    .rlz-manual-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   MANUAL IA — TOOLBAR HORIZONTAL
============================================================ */
.rlz-manual-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rlz-border);
}

.rlz-manual-toolbar .rlz-btn-xs {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #e5e7eb;
}

.rlz-manual-toolbar .rlz-btn-xs:hover {
    border-color: var(--rlz-green);
    color: #ffffff;
}


/* ============================================================
   MANUAL IA — DROPDOWNS REALIZARE
============================================================ */
.rlz-dropdown {
    position: relative;
    display: inline-block;
}

.rlz-dropdown > button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rlz-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 10px;
    z-index: 80;
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

.rlz-dropdown-menu label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #ccc;
    margin-bottom: 6px;
}

.rlz-dropdown-menu label:last-child {
    margin-bottom: 0;
}

.rlz-dropdown:hover .rlz-dropdown-menu {
    display: block;
}


/* ============================================================
   MANUAL IA — BLOCO COMPLEMENTAR
============================================================ */
.rlz-manual-complement {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.rlz-manual-complement-results {
    font-size: 13px;
    line-height: 1.55;
    max-height: 420px;
    overflow-y: auto;
    color: #cfcfcf;
}

.rlz-manual-complement-results strong {
    color: #ffffff;
    font-weight: 700;
}

.rlz-manual-complement-results a {
    font-size: 12px;
    color: var(--rlz-green);
    text-decoration: none;
}

.rlz-manual-complement-results a:hover {
    text-decoration: underline;
}


/* ============================================================
   MANUAL IA — TAGS VISUAIS
============================================================ */
.rlz-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(82,255,102,.12);
    border: 1px solid rgba(82,255,102,.35);
    color: var(--rlz-green);
    font-size: 11px;
    cursor: pointer;
}

.rlz-tag:hover {
    background: rgba(82,255,102,.2);
}


/* ============================================================
   MANUAL IA — CAMPOS DE TEXTO
============================================================ */
#manual_block textarea {
    resize: vertical;
    min-height: 90px;
}

#manual_block label {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
}


/* ============================================================
   MANUAL IA — STATUS / AVISOS
============================================================ */
#manual_status {
    font-size: 12px;
    color: #9ca3af;
}
/* ============================================================
   REALIZARE — GRID PADRÃO (CONTRATO BASE)
   Uso: layouts modulares (ex: Manual IA, futuros painéis)
   ============================================================ */
.rlz-grid {
    display: grid;
    gap: 16px;
}

/* ============================================================
   REALIZARE — MANUAL IA
   Destaque visual da explicação selecionada para refinamento
   (Classe aplicada via JS: .rlz-complement-selected)
   ============================================================ */

.rlz-complement-item {
    transition: border .15s ease-out, box-shadow .15s ease-out;
}

/* Estado selecionado */
.rlz-complement-selected {
    border: 1px solid var(--rlz-green) !important;
    box-shadow: 0 0 0 2px rgba(82,255,102,.25),
                0 8px 20px rgba(0,0,0,.35);
    position: relative;
}

/* Badge visual de confirmação */
.rlz-complement-selected::after {
    content: "Selecionado para refinamento";
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(82,255,102,.15);
    color: var(--rlz-green);
    border: 1px solid rgba(82,255,102,.45);
    font-weight: 700;
    letter-spacing: .2px;
}

/* Botão dentro do item selecionado ganha destaque */
.rlz-complement-selected .rlz-btn-xs {
    border-color: var(--rlz-green);
    color: #ffffff;
}
/* ============================================================
   MODAL — Seleção de Fontes Q&A
   ============================================================ */

#qaSourcesModal.rlz-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#qaSourcesModal.open {
  display: flex;
}

/* Caixa principal */
#qaSourcesModal .rlz-modal {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  width: 760px;
  max-width: calc(100% - 32px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
}

/* Cabeçalho */
#qaSourcesModal .rlz-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #222;
}

#qaSourcesModal .rlz-modal-header strong {
  font-size: 15px;
  color: #e5e5e5;
}

/* Corpo */
#qaSourcesModal .rlz-modal-body {
  padding: 16px 18px;
  overflow-y: auto;
}

#qaSourcesModal .rlz-modal-body .rlz-muted {
  font-size: 13px;
  color: #a8a8a8;
}

/* Títulos de grupo */
#qaSourcesModal .rlz-ia-group-title {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #cfcfcf;
}

/* Lista de fontes */
#qaSourcesModal .rlz-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #ddd;
}

#qaSourcesModal .rlz-checkbox-row:hover {
  background: #1a1a1a;
}

/* Checkbox */
#qaSourcesModal .rlz-checkbox-row input {
  accent-color: #22c55e;
}

/* Texto da fonte (URLs longas) */
#qaSourcesModal .rlz-checkbox-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 600px;
}

/* Rodapé */
#qaSourcesModal .rlz-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Botões */
#qaSourcesModal .rlz-btn {
  min-width: 140px;
}

/* ============================================================
   FIX FABRIL — MODAL CONHECIMENTO (STACKING CONTEXT)
   Motivo:
   - body.rlz-layout usa overflow:hidden
   - layout Realizare cria contextos fechados
   - modal nasce mas fica invisível
   ============================================================ */

/* Garante que o modal ignore o layout */
#kbEditBackdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important; /* acima de TODO o Realizare */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Neutraliza recorte visual do layout */
body.rlz-layout {
    overflow: visible !important;
}

/* ============================================================
   AJUSTE FINO — MODAL EDITAR CONHECIMENTO
   ============================================================ */

/* Linha de contexto + especialização */
#kbEditBackdrop .rlz-flex.gap-6 {
    gap: 8px !important;
    margin-top: 6px !important;
}

/* Selects menores (metadados) */
#kbEditBackdrop select.rlz-input-xs {
    max-width: 180px;
    padding: 6px 8px;
    font-size: 12px;
}

/* Botões de reescrita mais compactos */
#kbEditBackdrop .rlz-btn-xs {
    padding: 6px 10px;
    font-size: 12px;
}

/* Espaçamento entre seções */
#kbEditBackdrop .rlz-label {
    margin-top: 12px;
    margin-bottom: 4px;
}


/* ============================================================
   REALIZARE — FIX VISUAL CARDS (DISCRETO)
   Motivo:
   - Bordas estavam grossas/contrastadas demais
   - Sombras pesadas quebravam elegância do layout
   Contrato:
   - NÃO altera estrutura
   - Apenas suaviza visual
============================================================ */

.rlz-card {
    background: var(--rlz-bg2);
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25) !important;
}


/* ============================================================
   REALIZARE — CARD SOFT OVERRIDE (SAFE)
   Objetivo:
   - Suavizar bordas grossas observadas no Designer do Chat Cliente
   - NÃO remover regras existentes
   - NÃO afetar inputs, tabelas ou modais
   Estratégia:
   - Apenas reduzir contraste de border + shadow nos cards
   - Escopo geral (.rlz-card) e específico do designer
   ============================================================ */

/* Base: todos os cards ficam mais discretos */
.rlz-card {
  border-color: rgba(255,255,255,0.06) !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.22) !important;
}

/* Designer do Chat: ainda mais suave */
.rlz-chat-designer-v2 .rlz-card {
  border-color: rgba(255,255,255,0.05) !important;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18) !important;
}

/* Evita “borda dupla” visual em grids */
.rlz-chat-designer-v2 .rlz-card + .rlz-card {
  margin-top: 0;
}

/* Garante que inputs NÃO herdem aparência de card */
.rlz-card .rlz-input,
.rlz-card .rlz-select,
.rlz-card .rlz-textarea {
  box-shadow: none !important;
}


/* ============================================================
   REALIZARE — ELIMINAÇÃO TOTAL DE LINHAS VISUAIS (SAFE)
   Escopo:
   - Sidebars, listas, painéis, separadores
   - Remove aparência de linhas verticais/horizontais fortes
   - Mantém estrutura e usabilidade
   ============================================================ */

/* Neutraliza QUALQUER border padrão em containers de layout */
aside,
nav,
section,
header,
footer,
.rlz-sidebar,
.rlz-layout-sidebar,
.rlz-main,
.rlz-panel,
.rlz-pane,
.rlz-column,
.rlz-list,
.rlz-list-item {
  border-left-color: rgba(255,255,255,0.04) !important;
  border-right-color: rgba(255,255,255,0.04) !important;
  border-top-color: rgba(255,255,255,0.04) !important;
  border-bottom-color: rgba(255,255,255,0.04) !important;
}

/* Remove linhas internas de listas */
.rlz-list-item + .rlz-list-item {
  border-top-color: transparent !important;
}

/* Remove qualquer divisor visual baseado em pseudo-elemento */
*:before,
*:after {
  box-shadow: none !important;
}

/* Força scrollbars completamente neutras */
::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.02) !important;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.12) !important;
}

/* Firefox */
* {
  scrollbar-color: rgba(255,255,255,0.12) rgba(255,255,255,0.02);
}

/* ============================================================
   REALIZARE — INPUTS SOFT FINAL
   Objetivo: remover linhas/bordas duras de campos de formulário
   mantendo legibilidade e sem afetar layout estrutural
   ============================================================ */

/* Base para inputs, selects e textareas */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: #e5e7eb !important;
}

/* Hover suave */
input:hover,
select:hover,
textarea:hover {
    border-color: rgba(255,255,255,0.16) !important;
}

/* Focus elegante, sem contorno agressivo */
input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: rgba(0,255,170,0.45) !important;
    box-shadow: 0 0 0 1px rgba(0,255,170,0.15) !important;
    background: rgba(255,255,255,0.06) !important;
}

/* Placeholders mais sutis */
::placeholder {
    color: rgba(255,255,255,0.35) !important;
}

/* Remove linhas internas herdadas */
input,
select,
textarea {
    background-clip: padding-box !important;
}

/* Desabilitados */
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.45 !important;
    background: rgba(255,255,255,0.02) !important;
}

/* REALIZARE — SOFT COLOR PICKER & SWATCH BORDERS
   Objetivo: deixar bordas dos seletores de cor tão discretas quanto inputs
   NÃO remove funcionalidade, apenas suaviza visual
*/

input[type="color"],
.rlz-color-row input[type="color"],
.color-swatch,
.swatch,
.color-box {
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: 6px !important;
  background-color: transparent !important;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35) !important;
}

input[type="color"]:hover,
.rlz-color-row input[type="color"]:hover {
  border-color: rgba(255,255,255,0.25) !important;
}

input[type="color"]:focus,
.rlz-color-row input[type="color"]:focus {
  outline: none !important;
  border-color: rgba(255,255,255,0.35) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15) !important;
}
/* ============================================================
   REALIZARE — CHAT DESIGNER
   Campos numéricos dos cantos do chat
   Objetivo:
   - Usar o MESMO padrão visual dos outros formulários
   - Sem alterar layout, JS ou contratos existentes
   ============================================================ */

.rlz-chat-designer-v2 input[type="number"].rlz-input {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    color: #e5e7eb !important;
    text-align: center;
}

/* Hover */
.rlz-chat-designer-v2 input[type="number"].rlz-input:hover {
    border-color: rgba(255,255,255,0.25) !important;
}

/* Focus */
.rlz-chat-designer-v2 input[type="number"].rlz-input:focus {
    outline: none !important;
    border-color: rgba(82,255,102,0.6) !important;
    box-shadow: 0 0 0 1px rgba(82,255,102,0.25) !important;
    background: rgba(255,255,255,0.06) !important;
}


