/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    height: 100%;
    font-family: system-ui, -apple-system, Segoe UI, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

/* HEADER – azul marinho + dourado */
.lx-header {
    background: #0B1E39;
    color: #f9fafb;
    padding: 14px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(212,175,55,0.75);
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.lx-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* CÍRCULO LX – fundo azul marinho, borda dourada, letras douradas (Opção B) */
.lx-logo-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0B1E39;                 /* fundo azul marinho */
    border: 2px solid #D4AF37;          /* borda dourada */
    color: #FDE68A;                     /* letras douradas */
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 0 10px rgba(212,175,55,0.75);
}
.lx-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lx-header-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(90deg, #FFF6C5, #D4AF37 40%, #A67C00 100%);
    -webkit-background-clip: text;
    background-clip: text;             /* <- Adicionado para compatibilidade */
    -webkit-text-fill-color: transparent;
    color: transparent;                /* <- fallback padrão */
}
.lx-header-subtitle {
    font-size: 12px;
    color: #cbd5e1;
}
.lx-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lx-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,0.8);
}
.lx-status-text {
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #e2e8f0;
}

/* MAIN LAYOUT */
.lx-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px 28px 24px;
}
.lx-panels-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.1fr);
    gap: 20px;
}

/* CARDS */
.lx-panel { min-width: 0; }
.lx-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 18px rgba(15,23,42,0.08);
}
.lx-card-header {
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}
.lx-card-title {
    font-size: 16px;
    font-weight: 600;
}
.lx-card-pill {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.pill-secondary {
    border-color: #7dd3fc;
    background: #e0f2fe;
    color: #0369a1;
}

.lx-card-subtitle {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    padding: 12px 18px 0 18px;
}
.mt-8 { margin-top: 8px; }
.mt-24 { margin-top: 24px; }

/* ALERTA */
.lx-alert {
    margin: 12px 18px 0 18px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
}
.lx-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* CAMPOS */
.lx-field-block {
    padding: 12px 18px 4px 18px;
}
.lx-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}
.lx-help-text {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 6px;
}
.lx-input-file {
    width: 100%;
    font-size: 12px;
    color: #111827;
}
.lx-divider {
    height: 1px;
    margin: 14px 18px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
}
.lx-textarea {
    width: 100%;
    min-height: 220px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 10px 12px;
    font-size: 13px;
    resize: vertical;
}
.lx-textarea::placeholder {
    color: #9ca3af;
}
.lx-select {
    width: 100%;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 8px 10px;
    font-size: 13px;
}
.lx-inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

/* BOTÕES */
.lx-btn-primary,
.lx-btn-secondary,
.lx-btn-ghost-sm {
    border-radius: 999px;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s ease;
}
.lx-btn-primary {
    background: linear-gradient(135deg, #0B1E39, #102A50);
    color: #f9fafb;
    box-shadow: 0 8px 18px rgba(15,23,42,0.35);
}
.lx-btn-primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}
.lx-btn-secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid #d1d5db;
}
.lx-btn-secondary:hover {
    background: #eff6ff;
    border-color: #60a5fa;
}
.lx-btn-ghost-sm {
    background: transparent;
    color: #0B1E39;
    border: 1px dashed #cbd5f5;
    font-size: 12px;
    padding: 6px 12px;
}
.lx-btn-ghost-sm:hover {
    background: #eff6ff;
}
.lx-actions {
    padding: 10px 18px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lx-actions-hint {
    font-size: 11px;
    color: #6b7280;
}

/* MÓDULOS PREMIUM / RJ – BORDA DOURADA */
.lx-rj-card {
    margin: 12px 18px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid #D4AF37;
    background: #FFFAEB;
}
.lx-rj-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.lx-rj-title {
    font-size: 14px;
    font-weight: 600;
    color: #854d0e;
}
.lx-rj-pill {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid #D4AF37;
    background: #FFF3C4;
    color: #92400e;
}
.lx-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #111827;
    margin-top: 4px;
    cursor: pointer;
}
.lx-checkbox input {
    accent-color: #D4AF37;
}

/* TABS */
.lx-tabs {
    display: inline-flex;
    gap: 0;
    margin: 12px 18px 8px 18px;
    border-radius: 999px;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    padding: 3px;
}
.lx-tab-button {
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
}
.lx-tab-button.active {
    background: #0B1E39;
    color: #f9fafb;
    font-weight: 600;
}
.lx-tab-content {
    display: none;
    padding: 10px 18px 16px 18px;
}
.lx-tab-content.active {
    display: block;
}

/* PARECER & JSON */
.lx-parecer,
.lx-json-view {
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.55;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
}
.lx-json-view {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 11px;
}
.lx-placeholder {
    font-size: 13px;
    color: #6b7280;
}

/* EXPORT */
.lx-export-actions {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.lx-inline-form { display: inline-block; }

/* LOADING OVERLAY */
.lx-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
}
.lx-loading-card {
    background: #ffffff;
    padding: 18px 22px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 22px rgba(15,23,42,0.25);
    max-width: 380px;
    text-align: center;
}
.lx-loading-spinner {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #e5e7eb;
    border-top-color: #0B1E39;
    margin: 0 auto 10px auto;
    animation: lx-spin 0.8s linear infinite;
}
@keyframes lx-spin {
    to { transform: rotate(360deg); }
}
.lx-loading-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.lx-loading-subtitle {
    font-size: 12px;
    color: #6b7280;
}

/* RESPONSIVO */
@media (max-width: 1100px) {
    .lx-panels-wrapper {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 768px) {
    .lx-main {
        padding: 16px;
    }
}

/* ===========================
   CHECKLIST DE RISCOS – ESTILO
   =========================== */

/* Bloco resumo da matriz de riscos (probabilidade x impacto) */
.risk-matrix-summary {
    border: 1px dashed #9ca3af;
    padding: 8px 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    background: #f9fafb;
}

/* Cartões de risco */
.risk-item {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f9fafb;
}

/* Risco crítico – destaque visual forte */
.risk-item.critical {
    border-left: 4px solid #dc2626;
    background: #fef2f2;
}

/* Título do risco crítico */
.risk-critical {
    color: #b91c1c;
    font-weight: 700;
}

/* Meta-informações (probabilidade / impacto / prioridade) */
.risk-meta {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.85;
}

/* ===========================
   LISTA DE ANEXOS (estilo e-mail)
   =========================== */
.lx-files-list{
    margin-top: 10px;
}

.lx-files-title{
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
}

.lx-files-box{
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 12px;
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lx-file-item{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.lx-file-badge{
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    font-size: 14px;
}

.lx-file-meta{
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lx-file-name{
    font-size: 12px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 520px;
}

.lx-file-size{
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

/* =========================================================
   NOVO: BOTÃO "REMOVER" POR ARQUIVO (mantendo o mesmo tema)
   ========================================================= */
.lx-file-remove{
    margin-left: auto;                 /* empurra para o final */
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0B1E39;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.15s ease;
    white-space: nowrap;
}

.lx-file-remove:hover{
    background: #eff6ff;
    border-color: #60a5fa;
}

.lx-file-remove:active{
    transform: translateY(1px);
}

.lx-file-remove:focus{
    outline: none;
    box-shadow: 0 0 0 3px rgba(96,165,250,0.25);
}

/* No mobile, evita estourar o card: reduz max-width do nome */
@media (max-width: 768px) {
    .lx-file-name{
        max-width: 240px;
    }
}
