/* =============================================
   CONSTRUTOR DE FORMULÁRIOS
   ============================================= */

/* Cards da lista de formulários */
.nx-form-card {
    background: var(--nx-card-bg);
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius-xl);
    box-shadow: var(--nx-shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow var(--nx-transition), transform var(--nx-transition);
    border-left: 4px solid var(--nx-primary);
}

.nx-form-card:hover {
    box-shadow: var(--nx-shadow-lg);
    transform: translateY(-2px);
}

.nx-form-card--inactive {
    border-left-color: var(--nx-border);
    opacity: .85;
}

.nx-form-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 0;
}

.nx-form-card__icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--nx-primary-light);
    color: var(--nx-primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--nx-fs-lg);
    flex-shrink: 0;
}

.nx-form-card__icon-wrap--inactive {
    background: var(--nx-border-light);
    color: var(--nx-text-muted);
}

.nx-form-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--nx-fs-xs);
    font-weight: 600;
    letter-spacing: .3px;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.nx-form-card__badge--active {
    background: var(--nx-success-light);
    color: var(--nx-success);
}

.nx-form-card__badge--inactive {
    background: var(--nx-border-light);
    color: var(--nx-text-muted);
}

.nx-form-card__badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.nx-form-card__body {
    padding: 12px 16px 8px;
    flex: 1;
}

.nx-form-card__title {
    font-size: var(--nx-fs-base);
    font-weight: 700;
    color: var(--nx-text-dark);
    margin: 0 0 6px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nx-form-card__desc {
    font-size: var(--nx-fs-xs);
    color: var(--nx-text-muted);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

.nx-form-card__flags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.nx-form-card__chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--nx-fs-xs);
    font-weight: 600;
    letter-spacing: .02em;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--nx-primary-light);
    color: var(--nx-primary-text);
}

.nx-form-card__chip--padrao {
    background: var(--nx-warning-light);
    color: var(--nx-warning);
}

.nx-form-card__chip i {
    font-size: var(--nx-fs-xs);
}

.nx-form-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px;
    border-top: 1px solid var(--nx-border-light);
    border-bottom: 1px solid var(--nx-border-light);
    background: var(--nx-body-bg);
}

.nx-form-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--nx-fs-xs);
    color: var(--nx-text-muted);
}

.nx-form-card__meta-item i {
    font-size: var(--nx-fs-xs);
}

.nx-form-card__meta-date {
    margin-left: auto;
}

.nx-form-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
}

.nx-form-card__btn-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: var(--nx-fs-sm);
    font-weight: 600;
    color: var(--nx-primary-text);
    background: var(--nx-primary-light);
    border: 1px solid var(--nx-primary-50);
    border-radius: var(--nx-radius);
    cursor: pointer;
    transition: background var(--nx-transition), color var(--nx-transition);
}

.nx-form-card__btn-primary:hover {
    background: var(--nx-primary);
    color: var(--nx-on-primary);
    border-color: var(--nx-primary);
}

.nx-form-card__btn-secondary-group {
    display: flex;
    gap: 6px;
}

.nx-form-card__btn-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--nx-radius);
    border: 1px solid var(--nx-border);
    background: var(--nx-card-bg);
    color: var(--nx-text-muted);
    font-size: var(--nx-fs-sm);
    cursor: pointer;
    transition: all var(--nx-transition);
}

.nx-form-card__btn-icon:hover {
    background: var(--nx-body-bg);
    color: var(--nx-text-dark);
    border-color: var(--nx-text-light);
}

.nx-form-card__btn-icon--danger:hover {
    background: var(--nx-danger-light);
    color: var(--nx-danger);
    border-color: var(--nx-danger);
}

/* Estado vazio */
.nx-empty-state {
    text-align: center;
    padding: 64px 24px;
    background: var(--nx-card-bg);
    border-radius: var(--nx-radius-xl);
    border: 2px dashed var(--nx-border);
}

.nx-empty-state__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--nx-primary-light);
    color: var(--nx-primary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--nx-fs-2xl);
    margin: 0 auto 20px;
    opacity: .8;
}

.nx-empty-state__title {
    font-size: var(--nx-fs-lg);
    font-weight: 700;
    color: var(--nx-text-dark);
    margin: 0 0 8px;
}

.nx-empty-state__desc {
    font-size: var(--nx-fs-base);
    color: var(--nx-text-muted);
    max-width: 400px;
    margin: 0 auto 24px;
}

/* Layout interno do modal do construtor — rodapé fixo, área central com scroll */
#modalConstrutor .modal-content.nx-modal-construtor {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2.5rem);
    overflow: hidden;
}

#modalConstrutor .modal-footer {
    flex-shrink: 0;
}

#modalConstrutor .modal-body.nx-construtor-body {
    overflow: hidden;
}

.nx-construtor-body {
    flex: 1 1 auto;
    min-height: 0;
    background: var(--nx-card-bg);
    overflow: hidden;
}

.nx-construtor-paleta {
    width: 280px;
    flex-shrink: 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--nx-body-bg);
    border-right: 1px solid var(--nx-border);
}

.nx-construtor-canvas-wrap {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--nx-body-bg);
}

.nx-construtor-canvas {
    min-height: 280px;
    background: var(--nx-card-bg);
    border: 2px dashed var(--nx-border);
    border-radius: var(--nx-radius);
    padding: 16px;
}

.nx-construtor-props {
    width: 300px;
    flex-shrink: 0;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--nx-card-bg);
    border-left: 1px solid var(--nx-border);
}

@media (max-width: 991.98px) {
    #modalConstrutor .nx-construtor-body {
        flex-direction: column;
    }

    .nx-construtor-paleta,
    .nx-construtor-props {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-left: none;
        border-bottom: 1px solid var(--nx-border);
    }

    .nx-construtor-props {
        border-top: 1px solid var(--nx-border);
        border-bottom: none;
    }
}

/* Paleta de campos (barra lateral do editor) */
.campo-paleta {
    cursor: grab;
    transition: all 0.2s;
    font-size: var(--nx-fs-sm);
    background: var(--nx-card-bg);
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius);
    padding: 8px 10px;
    color: var(--nx-text);
    box-shadow: var(--nx-shadow-sm);
}

.campo-paleta:hover {
    background: var(--nx-primary-light);
    border-color: var(--nx-primary);
    color: var(--nx-text-dark);
}

.campo-paleta:active {
    cursor: grabbing;
}

/* Canvas do editor */
.campo-canvas {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: var(--nx-card-bg);
    color: var(--nx-text);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.campo-canvas:hover {
    border-color: var(--nx-primary);
    box-shadow: 0 2px 8px var(--nx-primary-light);
}

.campo-canvas.selecionado {
    border-color: var(--nx-primary);
    background-color: var(--nx-primary-light);
}

.campo-canvas .campo-acoes {
    position: absolute;
    top: 8px;
    right: 8px;
    display: none;
    gap: 4px;
}

.campo-canvas:hover .campo-acoes {
    display: flex;
}

.campo-canvas .campo-acoes button {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: var(--nx-fs-xs);
}

.drag-over {
    border-color: var(--nx-primary) !important;
    background-color: var(--nx-primary-light) !important;
}

.text-purple {
    color: var(--nx-purple, var(--nx-purple));
}

.text-teal {
    color: var(--nx-info);
}

/* Tema escuro: sobrescrever placeholder de campos desabilitados que parecem
   "brancos demais" — eles herdam a cor de fundo do card */
[data-theme="dark"] .campo-canvas .form-control:disabled,
[data-theme="dark"] .campo-canvas .form-select:disabled,
[data-theme="dark"] .campo-canvas .form-control[readonly] {
    background-color: var(--nx-input-bg);
    color: var(--nx-text);
    border-color: var(--nx-border);
}

/* =============================================
   NOTIFICAÇÕES PADRONIZADAS - SweetAlert2
   ----------------------------------------------
   Padroniza fonte (Inter), tamanhos e cores em
   todos os alertas do sistema (login, módulos,
   logout, toasts, confirmações).
   ============================================= */

/* Animação spin para ícones de loading (bi-spin é usado em botões durante AJAX) */
@keyframes bi-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.bi-spin {
    display: inline-block;
    animation: bi-spin 0.8s linear infinite;
}

/* Diálogos modais (alertas, confirmações) */
.swal2-popup.nx-swal-popup {
    font-family: var(--nx-font);
    border-radius: var(--nx-radius-xl);
    padding: 22px 24px 20px;
    box-shadow: var(--nx-shadow-lg);
    border: 1px solid var(--nx-border);
    background: var(--nx-card-bg);
    max-width: 460px;
}

.swal2-popup.nx-swal-popup .swal2-icon {
    width: 56px;
    height: 56px;
    margin: 4px auto 14px;
    border-width: 3px;
}
.swal2-popup.nx-swal-popup .swal2-icon .swal2-icon-content {
    font-size: 32px;
}

.swal2-popup.nx-swal-popup .swal2-title {
    font-family: var(--nx-font);
    font-size: var(--nx-fs-md);
    font-weight: 700;
    color: var(--nx-text-dark);
    line-height: 1.35;
    padding: 0 0 4px;
    margin: 0 0 4px;
}

.swal2-popup.nx-swal-popup .swal2-html-container {
    font-family: var(--nx-font);
    font-size: var(--nx-fs-sm);
    color: var(--nx-text);
    line-height: 1.55;
    margin: 6px 0 4px;
    padding: 0 6px;
}

.swal2-popup.nx-swal-popup .swal2-actions {
    margin-top: 18px;
    gap: 8px;
}

.swal2-popup.nx-swal-popup .swal2-styled {
    font-family: var(--nx-font);
    font-size: var(--nx-fs-sm);
    font-weight: 600;
    border-radius: var(--nx-radius);
    padding: 9px 18px;
    box-shadow: none;
    transition: all var(--nx-transition);
}

.swal2-popup.nx-swal-popup .swal2-confirm {
    background: var(--nx-primary) !important;
    border: 1px solid var(--nx-primary) !important;
    color: var(--nx-on-primary) !important;
}
.swal2-popup.nx-swal-popup .swal2-confirm:hover {
    background: var(--nx-primary-hover) !important;
    border-color: var(--nx-primary-hover) !important;
    transform: translateY(-1px);
}

.swal2-popup.nx-swal-popup .swal2-cancel {
    background: var(--nx-card-bg) !important;
    border: 1px solid var(--nx-border) !important;
    color: var(--nx-text) !important;
}
.swal2-popup.nx-swal-popup .swal2-cancel:hover {
    background: var(--nx-body-bg) !important;
    color: var(--nx-text-dark) !important;
}

.swal2-popup.nx-swal-popup .swal2-deny,
.swal2-popup.nx-swal-popup .swal2-styled.swal2-confirm.swal2-danger,
.swal2-popup.nx-swal-popup .nx-swal-confirm--danger {
    background: var(--nx-danger) !important;
    border: 1px solid var(--nx-danger) !important;
    color: var(--nx-on-color) !important;
}
.swal2-popup.nx-swal-popup .nx-swal-confirm--danger:hover {
    background: var(--nx-danger) !important;
    border-color: var(--nx-danger) !important;
    transform: translateY(-1px);
}
.swal2-popup.nx-swal-popup .swal2-styled:focus {
    box-shadow: 0 0 0 3px var(--nx-primary-light) !important;
}

.swal2-popup.nx-swal-popup .swal2-input,
.swal2-popup.nx-swal-popup .swal2-textarea,
.swal2-popup.nx-swal-popup .swal2-select {
    font-family: var(--nx-font);
    font-size: var(--nx-fs-sm);
    color: var(--nx-text-dark);
    background: var(--nx-input-bg);
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius);
    padding: 10px 12px;
    box-shadow: none;
}
.swal2-popup.nx-swal-popup .swal2-input:focus,
.swal2-popup.nx-swal-popup .swal2-textarea:focus,
.swal2-popup.nx-swal-popup .swal2-select:focus {
    border-color: var(--nx-primary);
    box-shadow: 0 0 0 3px var(--nx-primary-light);
}

/* Toasts (canto superior direito) */
.swal2-popup.nx-swal-toast {
    font-family: var(--nx-font);
    background: var(--nx-card-bg) !important;
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius);
    box-shadow: var(--nx-shadow-lg);
    padding: 12px 14px;
    min-width: 280px;
    max-width: 360px;
}

.swal2-popup.nx-swal-toast .swal2-title {
    font-family: var(--nx-font);
    font-size: var(--nx-fs-sm);
    font-weight: 600;
    color: var(--nx-text-dark);
    margin: 0;
    padding: 0 0 0 4px;
    line-height: 1.4;
}

.swal2-popup.nx-swal-toast .swal2-html-container {
    font-family: var(--nx-font);
    font-size: var(--nx-fs-xs);
    color: var(--nx-text);
    margin: 2px 0 0 4px;
    padding: 0;
    line-height: 1.4;
}

.swal2-popup.nx-swal-toast .swal2-icon {
    width: 22px !important;
    height: 22px !important;
    margin: 0 8px 0 0 !important;
    border-width: 2px !important;
    flex-shrink: 0;
}
.swal2-popup.nx-swal-toast .swal2-icon .swal2-icon-content {
    font-size: var(--nx-fs-sm) !important;
}

.swal2-popup.nx-swal-toast .swal2-timer-progress-bar {
    height: 3px;
    background: var(--nx-primary);
}

.swal2-popup.nx-swal-toast.swal2-icon-success .swal2-timer-progress-bar { background: var(--nx-success); }
.swal2-popup.nx-swal-toast.swal2-icon-error   .swal2-timer-progress-bar { background: var(--nx-danger); }
.swal2-popup.nx-swal-toast.swal2-icon-warning .swal2-timer-progress-bar { background: var(--nx-warning); }
.swal2-popup.nx-swal-toast.swal2-icon-info    .swal2-timer-progress-bar { background: var(--nx-info); }

/* Cores dos ícones — bordas e símbolos */
.swal2-popup.nx-swal-popup.swal2-icon-success .swal2-success-ring,
.swal2-popup.nx-swal-toast .swal2-success-ring { border-color: var(--nx-success); }
.swal2-popup.nx-swal-popup .swal2-success-line-tip,
.swal2-popup.nx-swal-popup .swal2-success-line-long,
.swal2-popup.nx-swal-toast .swal2-success-line-tip,
.swal2-popup.nx-swal-toast .swal2-success-line-long { background-color: var(--nx-success); }

.swal2-popup.nx-swal-popup.swal2-icon-error,
.swal2-popup.nx-swal-toast.swal2-icon-error  .swal2-icon { color: var(--nx-danger) !important; border-color: var(--nx-danger) !important; }
.swal2-popup.nx-swal-popup .swal2-x-mark-line-left,
.swal2-popup.nx-swal-popup .swal2-x-mark-line-right,
.swal2-popup.nx-swal-toast .swal2-x-mark-line-left,
.swal2-popup.nx-swal-toast .swal2-x-mark-line-right { background-color: var(--nx-danger); }

.swal2-popup.nx-swal-popup .swal2-warning,
.swal2-popup.nx-swal-toast.swal2-icon-warning .swal2-icon { color: var(--nx-warning) !important; border-color: var(--nx-warning) !important; }

.swal2-popup.nx-swal-popup .swal2-info,
.swal2-popup.nx-swal-popup .swal2-question,
.swal2-popup.nx-swal-toast.swal2-icon-info     .swal2-icon,
.swal2-popup.nx-swal-toast.swal2-icon-question .swal2-icon { color: var(--nx-info) !important; border-color: var(--nx-info) !important; }

/* Backdrop suave */
.swal2-container.nx-swal-backdrop { backdrop-filter: blur(2px); }

/* Tema escuro — overrides finos para o componente padronizado */
[data-theme="dark"] .swal2-popup.nx-swal-popup,
[data-theme="dark"] .swal2-popup.nx-swal-toast {
    background: var(--nx-card-bg) !important;
    border-color: var(--nx-border);
    color: var(--nx-text);
}
[data-theme="dark"] .swal2-popup.nx-swal-popup .swal2-title,
[data-theme="dark"] .swal2-popup.nx-swal-toast .swal2-title { color: var(--nx-text-dark) !important; }
[data-theme="dark"] .swal2-popup.nx-swal-popup .swal2-html-container,
[data-theme="dark"] .swal2-popup.nx-swal-toast .swal2-html-container { color: var(--nx-text) !important; }
[data-theme="dark"] .swal2-popup.nx-swal-popup .swal2-cancel {
    background: var(--nx-input-bg) !important;
    color: var(--nx-text) !important;
    border-color: var(--nx-border) !important;
}
[data-theme="dark"] .swal2-popup.nx-swal-popup .swal2-input,
[data-theme="dark"] .swal2-popup.nx-swal-popup .swal2-textarea,
[data-theme="dark"] .swal2-popup.nx-swal-popup .swal2-select {
    background: var(--nx-input-bg) !important;
    color: var(--nx-text) !important;
    border-color: var(--nx-border) !important;
}

/* =============================================
   MÓDULO: DIÁRIO DO PACIENTE
   (consolidado de modulos/diario.php — usa tokens --nx-*)
   ============================================= */
.diario-container {
    display: flex;
    height: calc(100vh - 220px);
    min-height: 540px;
    background: var(--nx-card-bg);
    border-radius: var(--nx-radius-xl);
    overflow: hidden;
    border: 1px solid var(--nx-border);
    box-shadow: var(--nx-shadow-sm);
}

/* ── Sidebar interna (lista de pacientes) ───────────────────────── */
.diario-sidebar {
    width: 320px;
    min-width: 320px;
    border-right: 1px solid var(--nx-border);
    display: flex;
    flex-direction: column;
    background: var(--nx-body-bg);
}

.diario-sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--nx-border);
    background: var(--nx-card-bg);
}

.diario-sidebar-search {
    position: relative;
}

.diario-sidebar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nx-text-light);
    font-size: var(--nx-fs-sm);
    pointer-events: none;
}

.diario-sidebar-search input {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius);
    font-size: var(--nx-fs-sm);
    background: var(--nx-card-bg);
    color: var(--nx-text);
    transition: border-color var(--nx-transition), box-shadow var(--nx-transition);
}

.diario-sidebar-search input:focus {
    outline: none;
    border-color: var(--nx-primary);
    box-shadow: 0 0 0 3px var(--nx-primary-light);
}

.diario-sidebar-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--nx-border) transparent;
}

.diario-sidebar-list::-webkit-scrollbar { width: 6px; }
.diario-sidebar-list::-webkit-scrollbar-thumb {
    background: var(--nx-border);
    border-radius: 6px;
}

.diario-paciente-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--nx-border-light);
    transition: background var(--nx-transition);
    border-left: 3px solid transparent;
}

.diario-paciente-item:hover { background: var(--nx-card-bg); }

.diario-paciente-item.ativo {
    background: var(--nx-primary-light);
    border-left-color: var(--nx-primary);
}

.diario-paciente-item .avatar-diario {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--nx-primary);
    color: var(--nx-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--nx-fs-sm);
    flex-shrink: 0;
}

.diario-paciente-item.ativo .avatar-diario {
    box-shadow: 0 0 0 3px var(--nx-primary-light);
}

.diario-paciente-info {
    flex: 1;
    min-width: 0;
}

.diario-paciente-info .nome {
    font-weight: 600;
    font-size: var(--nx-fs-sm);
    color: var(--nx-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.diario-paciente-info .meta {
    font-size: var(--nx-fs-xs);
    color: var(--nx-text-muted);
    margin-top: 2px;
}

.diario-paciente-badge {
    background: var(--nx-primary);
    color: var(--nx-on-primary);
    border-radius: 12px;
    font-size: var(--nx-fs-2xs);
    padding: 2px 8px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Área principal ─────────────────────────────────────────────── */
.diario-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--nx-card-bg);
}

.diario-vazio {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--nx-text-muted);
    background: var(--nx-body-bg);
}

.diario-vazio i { color: var(--nx-text-light); }

.diario-header-paciente {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--nx-border);
    flex-wrap: wrap;
    gap: 12px;
    background: var(--nx-card-bg);
}

.diario-header-paciente h5 {
    color: var(--nx-text-dark);
    font-weight: 600;
    font-size: var(--nx-fs-base);
}

.diario-header-acoes {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.diario-header-acoes .form-select,
.diario-header-acoes .form-control {
    background-color: var(--nx-card-bg);
    border: 1px solid var(--nx-border);
    color: var(--nx-text);
}

.diario-header-acoes .form-select:focus,
.diario-header-acoes .form-control:focus {
    border-color: var(--nx-primary);
    box-shadow: 0 0 0 3px var(--nx-primary-light);
}

.diario-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--nx-primary);
    color: var(--nx-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--nx-fs-base);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--nx-primary-light);
}

.diario-entradas {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--nx-body-bg);
    scrollbar-width: thin;
    scrollbar-color: var(--nx-border) transparent;
}

.diario-entradas::-webkit-scrollbar { width: 8px; }
.diario-entradas::-webkit-scrollbar-thumb {
    background: var(--nx-border);
    border-radius: 6px;
}

/* ── Cards de entrada ───────────────────────────────────────────── */
.diario-card {
    background: var(--nx-card-bg);
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius-lg);
    padding: 14px 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: box-shadow var(--nx-transition), border-color var(--nx-transition), transform var(--nx-transition);
    border-left: 4px solid var(--nx-border);
}

.diario-card:hover {
    box-shadow: var(--nx-shadow);
    border-color: var(--nx-primary);
    transform: translateY(-1px);
}

.diario-card.tipo-texto      { border-left-color: var(--nx-primary); }
.diario-card.tipo-audio      { border-left-color: var(--nx-warning); }
.diario-card.tipo-imagem     { border-left-color: var(--nx-success); }
.diario-card.tipo-video      { border-left-color: var(--nx-danger); }
.diario-card.tipo-documento  { border-left-color: var(--nx-primary); }

.diario-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 10px;
}

.diario-card-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.diario-card-badge {
    font-size: var(--nx-fs-xs);
    padding: 3px 9px;
    border-radius: 999px;
    font-weight: 600;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-tipo-texto      { background: var(--nx-primary-light); color: var(--nx-primary-text); }
.badge-tipo-audio      { background: var(--nx-warning-light); color: var(--nx-warning); }
.badge-tipo-imagem     { background: var(--nx-success-light); color: var(--nx-success); }
.badge-tipo-video      { background: var(--nx-danger-light); color: var(--nx-danger); }
.badge-tipo-documento  { background: var(--nx-primary-light); color: var(--nx-primary-text); }

.badge-sentimento {
    font-size: var(--nx-fs-xs);
    padding: 3px 9px;
    border-radius: 999px;
    font-weight: 500;
    line-height: 1.2;
}

.sentimento-positivo { background: var(--nx-success-light); color: var(--nx-success); }
.sentimento-neutro   { background: var(--nx-border-light); color: var(--nx-text-muted); }
.sentimento-negativo { background: var(--nx-danger-light); color: var(--nx-danger); }
.sentimento-ansioso  { background: var(--nx-warning-light); color: var(--nx-warning); }
.sentimento-triste   { background: var(--nx-primary-light); color: var(--nx-primary-text); }

.diario-card-data {
    font-size: var(--nx-fs-xs);
    color: var(--nx-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.diario-card-conteudo {
    font-size: var(--nx-fs-sm);
    color: var(--nx-text);
    line-height: 1.55;
    max-height: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.diario-card-resumo {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--nx-border);
    font-size: var(--nx-fs-xs);
    color: var(--nx-text-muted);
    line-height: 1.5;
}

.diario-card-resumo strong {
    color: var(--nx-text-dark);
    font-weight: 600;
}

.diario-card-status {
    font-size: var(--nx-fs-xs);
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.status-pendente   { color: var(--nx-warning); }
.status-processado { color: var(--nx-success); }
.status-erro       { color: var(--nx-danger); }

.diario-paginacao {
    padding: 16px 0 8px;
    text-align: center;
}

.diario-paginacao .page-btn {
    background: var(--nx-card-bg);
    border: 1px solid var(--nx-border);
    color: var(--nx-text);
    border-radius: var(--nx-radius);
    padding: 6px 12px;
    margin: 0 3px;
    font-size: var(--nx-fs-sm);
    cursor: pointer;
    transition: all var(--nx-transition);
}

.diario-paginacao .page-btn:hover:not(:disabled) {
    background: var(--nx-primary-light);
    border-color: var(--nx-primary);
    color: var(--nx-primary-text);
}

.diario-paginacao .page-btn.active {
    background: var(--nx-primary);
    border-color: var(--nx-primary);
    color: var(--nx-on-primary);
}

.diario-paginacao .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── WhatsApp do Diário: situação do paciente, dias e resumo da IA ── */
.diario-situacao-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    margin-right: 4px;
    color: var(--nx-text-light);
    vertical-align: -1px;
}
.diario-situacao--ativo             { color: var(--nx-success); }
.diario-situacao--pausado           { color: var(--nx-warning); }
.diario-situacao--sem_consentimento { color: var(--nx-danger); }

.diario-participacao-linha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.diario-participacao-linha:empty,
.diario-part-situacao:empty { display: none; }
.diario-participacao-detalhe {
    font-size: var(--nx-fs-xs);
    color: var(--nx-text-muted);
}

.diario-dia + .diario-dia { margin-top: 18px; }
.diario-dia-titulo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    font-size: var(--nx-fs-xs);
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--nx-text-muted);
}
.diario-dia-titulo::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--nx-border);
}

.diario-resumo-dia {
    background: var(--nx-primary-light);
    border: 1px solid var(--nx-border);
    border-left: 4px solid var(--nx-primary);
    border-radius: var(--nx-radius-lg);
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: var(--nx-fs-sm);
    color: var(--nx-text);
}
.diario-resumo-dia--vazio,
.diario-resumo-dia--aguardando,
.diario-resumo-dia--erro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: var(--nx-card-bg);
    border-left-color: var(--nx-border);
    color: var(--nx-text-muted);
    font-size: var(--nx-fs-xs);
}
.diario-resumo-dia--erro { border-left-color: var(--nx-danger); }
.diario-resumo-dia__topo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.diario-resumo-dia__topo strong {
    color: var(--nx-text-dark);
    font-weight: 600;
}
.diario-resumo-dia__texto {
    margin: 0 0 8px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.diario-temas {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}
.diario-tema {
    font-size: var(--nx-fs-2xs);
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--nx-surface-muted);
    border: 1px solid var(--nx-border-light);
    color: var(--nx-text);
}
.diario-tema--mais { color: var(--nx-text-muted); }

.diario-consentimento {
    background: var(--nx-warning-light);
    border-radius: var(--nx-radius);
    padding: 10px 12px 10px 36px;
}

@media (max-width: 991.98px) {
    .diario-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }
    .diario-sidebar {
        width: 100%;
        min-width: auto;
        max-height: 320px;
        border-right: none;
        border-bottom: 1px solid var(--nx-border);
    }
    .diario-header-acoes {
        width: 100%;
    }
    .diario-header-acoes .form-select,
    .diario-header-acoes .form-control {
        flex: 1;
        min-width: 130px;
    }
}

/* =============================================
   MÓDULO: CENTRAL WHATSAPP
   (consolidado de modulos/whatsapp.php)
   ============================================= */

/* Avatar padronizado — garante proporção quadrada e corte circular sem distorção */
.nx-avatar {
    display: inline-block;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    background: var(--nx-border-light, var(--nx-surface-muted));
}
.nx-avatar-40 { width: 40px; height: 40px; }
.nx-avatar-45 { width: 45px; height: 45px; }
.nx-avatar-36 { width: 36px; height: 36px; }

/* Pré-visualização de template WhatsApp — legível em light e dark mode */
.nx-template-preview-shell {
    background: var(--nx-whatsapp-chat-bg, var(--nx-whatsapp-chat-bg));
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
}
.nx-template-preview-bubble {
    background: var(--nx-whatsapp-enviado);
    color: var(--nx-text-dark);
    font-size: var(--nx-fs-base);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.55;
    border-radius: 12px 12px 3px 12px;
    padding: 10px 14px;
    max-width: 85%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    position: relative;
}
[data-theme="dark"] .nx-template-preview-bubble {
    background: var(--nx-whatsapp-enviado, var(--nx-whatsapp-enviado));
    color: var(--nx-text-dark);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* =============================================
   CARDS DE TEMPLATES WHATSAPP
   (padrão visual nx-form-card)
   ============================================= */

.nx-tpl-card {
    background: var(--nx-card-bg);
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius-xl);
    box-shadow: var(--nx-shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow var(--nx-transition), transform var(--nx-transition);
    border-left: 4px solid var(--nx-success);
}
.nx-tpl-card:hover {
    box-shadow: var(--nx-shadow-lg);
    transform: translateY(-2px);
}
.nx-lembrete-bloco {
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius-xl);
    padding: 20px 24px 24px;
    margin-bottom: 24px;
    background: var(--nx-body-bg);
}
.nx-lembrete-bloco--sessao {
    border-left: 4px solid var(--nx-primary);
    background: var(--nx-card-bg);
}
.nx-lembrete-bloco--diario {
    border-left: 4px solid var(--nx-warning, var(--nx-warning));
    background: var(--nx-card-bg);
}
.nx-lembrete-bloco .config-aba-header {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 8px;
}

.nx-tpl-card--diario {
    border-left-color: var(--nx-warning);
}
.nx-tpl-card--inactive {
    border-left-color: var(--nx-border);
    opacity: .82;
}
.nx-tpl-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 0;
}
.nx-tpl-card__icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--nx-success-light);
    color: var(--nx-success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--nx-fs-md);
    flex-shrink: 0;
}
.nx-tpl-card__icon-wrap--diario {
    background: var(--nx-warning-light);
    color: var(--nx-warning);
}
.nx-tpl-card__icon-wrap--inactive {
    background: var(--nx-border-light);
    color: var(--nx-text-muted);
}
.nx-tpl-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--nx-fs-xs);
    font-weight: 600;
    letter-spacing: .3px;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
}
.nx-tpl-card__badge--ativo {
    background: var(--nx-success-light);
    color: var(--nx-success);
}
.nx-tpl-card__badge--inativo {
    background: var(--nx-border-light);
    color: var(--nx-text-muted);
}
.nx-tpl-card__badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}
.nx-tpl-card__body {
    padding: 10px 16px 8px;
    flex: 1;
}
.nx-tpl-card__title {
    font-size: var(--nx-fs-base);
    font-weight: 700;
    color: var(--nx-text-dark);
    margin: 0 0 4px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nx-tpl-card__tipo-badge {
    font-size: var(--nx-fs-xs);
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 10px;
}
.nx-tpl-card__preview {
    font-size: var(--nx-fs-xs);
    color: var(--nx-text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 54px;
    white-space: pre-line;
}
.nx-tpl-card__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-top: 1px solid var(--nx-border-light);
    border-bottom: 1px solid var(--nx-border-light);
    background: var(--nx-body-bg);
}
.nx-tpl-card__switch {
    margin-left: auto;
}
.nx-tpl-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
}
.nx-tpl-card__btn-edit {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: var(--nx-fs-sm);
    font-weight: 600;
    color: var(--nx-primary-text);
    background: var(--nx-primary-light);
    border: 1px solid var(--nx-primary-50);
    border-radius: var(--nx-radius);
    cursor: pointer;
    transition: background var(--nx-transition), color var(--nx-transition);
}
.nx-tpl-card__btn-edit:hover {
    background: var(--nx-primary);
    color: var(--nx-on-primary);
    border-color: var(--nx-primary);
}
.nx-tpl-card__btn-del {
    width: 33px;
    height: 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--nx-radius);
    border: 1px solid var(--nx-border);
    background: var(--nx-card-bg);
    color: var(--nx-text-muted);
    font-size: var(--nx-fs-sm);
    cursor: pointer;
    transition: all var(--nx-transition);
}
.nx-tpl-card__btn-del:hover {
    background: var(--nx-danger-light);
    color: var(--nx-danger);
    border-color: var(--nx-danger);
}

/* Dias da semana estilizados para o modal de lembrete */
.nx-dias-semana {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.nx-dia-btn {
    display: none;
}
.nx-dia-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--nx-border);
    font-size: var(--nx-fs-xs);
    font-weight: 600;
    color: var(--nx-text-muted);
    cursor: pointer;
    transition: all var(--nx-transition);
    user-select: none;
    background: var(--nx-card-bg);
}
.nx-dia-btn:checked + .nx-dia-label {
    background: var(--nx-primary);
    border-color: var(--nx-primary);
    color: var(--nx-on-primary);
}
.nx-dia-label:hover {
    border-color: var(--nx-primary);
    color: var(--nx-primary-text);
}

#janela-chat {
    background-color: var(--nx-whatsapp-chat-bg, var(--nx-whatsapp-chat-bg));
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d1d5db' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.balao-recebido {
    background-color: var(--nx-whatsapp-recebido, #ffffff);
    color: var(--nx-text-dark);
    border-radius: 0 12px 12px 12px;
    padding: 10px 15px;
    max-width: 75%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    align-self: flex-start;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 100px;
}

.balao-enviado {
    background-color: var(--nx-whatsapp-enviado, var(--nx-whatsapp-enviado));
    color: var(--nx-text-dark);
    border-radius: 12px 0 12px 12px;
    padding: 10px 15px;
    max-width: 75%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    align-self: flex-end;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    min-width: 100px;
}

.chat-list::-webkit-scrollbar,
#janela-chat::-webkit-scrollbar { width: 6px; }
.chat-list::-webkit-scrollbar-track,
#janela-chat::-webkit-scrollbar-track { background: transparent; }
.chat-list::-webkit-scrollbar-thumb,
#janela-chat::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}

.chat-item {
    cursor: pointer;
    transition: background 0.2s;
    max-width: 100%;
    overflow: hidden;
}
.chat-item:hover { background-color: var(--nx-border-light) !important; }
.chat-item.ativo {
    background-color: var(--nx-primary-light) !important;
    border-left: 3px solid var(--nx-primary) !important;
}

.chat-item-primeiro-contato {
    background-color: color-mix(in srgb, var(--nx-info) 10%, transparent) !important;
    border-left: 3px solid var(--nx-info) !important;
}
.chat-item-primeiro-contato:hover {
    background-color: color-mix(in srgb, var(--nx-info) 16%, transparent) !important;
}
.chat-item-primeiro-contato.ativo {
    background-color: color-mix(in srgb, var(--nx-info) 20%, transparent) !important;
    border-left: 3px solid var(--nx-info) !important;
}
.nx-chip-primeiro-contato {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: var(--nx-fs-xs);
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
    color: var(--nx-info);
    background: color-mix(in srgb, var(--nx-info) 18%, transparent);
    white-space: nowrap;
}
.badge-primeiro-contato {
    background: var(--nx-info) !important;
    color: var(--nx-on-color) !important;
}
.badge-primeiro-contato.badge-contato-pulse {
    animation: badgePrimeiroContatoPulse 2s ease-in-out infinite;
}
@keyframes badgePrimeiroContatoPulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--nx-info) 45%, transparent); }
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--nx-info) 0%, transparent); }
}

[data-theme="dark"] .chat-item-primeiro-contato {
    background-color: color-mix(in srgb, var(--nx-info) 12%, transparent) !important;
    border-left-color: var(--nx-info) !important;
}
[data-theme="dark"] .chat-item-primeiro-contato:hover,
[data-theme="dark"] .chat-item-primeiro-contato.ativo {
    background-color: color-mix(in srgb, var(--nx-info) 20%, transparent) !important;
}
[data-theme="dark"] .nx-chip-primeiro-contato {
    color: var(--nx-info);
    background: color-mix(in srgb, var(--nx-info) 18%, transparent);
}
[data-theme="dark"] .badge-primeiro-contato {
    background: var(--nx-info) !important;
}

.min-width-0 { min-width: 0 !important; }

.gravacao-pulso {
    width: 10px;
    height: 10px;
    background-color: var(--nx-danger);
    border-radius: 50%;
    display: inline-block;
    animation: pulsar 1s ease-in-out infinite;
}
@keyframes pulsar {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
}

.paciente-encontrado {
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 8px;
    padding: 10px;
}
.paciente-encontrado:hover { background-color: var(--nx-primary-light); }

.msg-animada { animation: msgEntrar 0.25s ease-out; }
@keyframes msgEntrar {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.msg-otimista { opacity: 0.85; }

.msg-status-icon { font-size: var(--nx-fs-xs) !important; }

.chat-item-encerrado {
    opacity: 0.6;
    position: relative;
}
.chat-item-encerrado::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.02) 10px, rgba(0,0,0,0.02) 20px);
    pointer-events: none;
}

.badge-contato-pulse { animation: badgePulse 2s ease-in-out infinite; }
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--nx-accent) 40%, transparent); }
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--nx-accent) 0%, transparent); }
}

.whatsapp-tabs .nav-link {
    font-size: var(--nx-fs-sm);
    font-weight: 600;
    color: var(--nx-text-muted, var(--nx-text-muted));
    border: none;
    border-bottom: 2px solid transparent;
    padding: 8px 6px;
    transition: all 0.2s;
}
.whatsapp-tabs .nav-link i {
    font-size: var(--nx-fs-base);
    vertical-align: -1px;
}
.whatsapp-tabs .nav-link .badge {
    font-size: var(--nx-fs-2xs);
    padding: 3px 6px;
}
.whatsapp-tabs .nav-link.active {
    color: var(--nx-success);
    border-bottom-color: var(--nx-whatsapp);
    background: transparent;
}
.whatsapp-tabs .nav-link:hover:not(.active) {
    color: var(--nx-text-dark, var(--nx-text-dark));
    border-bottom-color: var(--nx-border);
}

.contato-item {
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--nx-border-light);
}
.contato-item:hover {
    background-color: var(--nx-primary-light) !important;
}
.contato-item .contato-telefone {
    font-size: var(--nx-fs-sm);
    color: var(--nx-text-muted);
}

/* WhatsApp: filtro por etiqueta/responsável */
.chat-list .chat-item.nx-wp-oculto-filtro { display: none !important; }

/* DRE gerencial: categorias só aparecem com "Detalhar categorias" */
.nx-dre .nx-dre-cat { display: none; }
.nx-dre.nx-dre-detalhe .nx-dre-cat { display: table-row; }
.nx-dre td:first-child { white-space: nowrap; }
