/* =============================================
   SELOUVE - Componentes da marca (G3–G5)
   Estados vazios, carregamento, títulos, WhatsApp, agenda e detalhes de acabamento.
   ============================================= */

/* ---------- Títulos ---------- */
/* Sem Bootstrap CSS, h5/h6 caíam no padrão do navegador (~11px/~9px). */
h1, h2, h3, h4, h5, h6 {
    color: var(--nx-text-dark);
    line-height: 1.25;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

h1 { font-size: var(--nx-fs-2xl); }
h2 { font-size: var(--nx-fs-xl); }
h3 { font-size: var(--nx-fs-lg); }
h4 { font-size: 18px; }
h5 { font-size: var(--nx-fs-md); }
h6 { font-size: var(--nx-fs-base); }

.nx-titulo-marca {
    font-family: var(--nx-font-titulo);
    font-weight: 700;
    letter-spacing: 0.2px;
}

.modal-title {
    font-size: var(--nx-fs-md);
    font-weight: 600;
}

.text-muted,
.form-text {
    color: var(--nx-text-muted) !important;
}

small,
.small {
    font-size: var(--nx-fs-xs);
}

.text-secondary {
    color: var(--nx-text-muted) !important;
}

.bg-secondary {
    background-color: var(--nx-pedra) !important;
    color: var(--nx-papel);
}

.text-ambar {
    color: var(--nx-warning) !important;
}

.bg-areia {
    background-color: var(--nx-areia) !important;
}

::selection {
    background: color-mix(in srgb, var(--nx-ambar) 35%, transparent);
    color: var(--nx-text-dark);
}

/* ---------- Estado vazio ---------- */
.nx-vazio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 16px;
    color: var(--nx-text-muted);
    font-size: var(--nx-fs-sm);
    text-align: center;
}

.nx-vazio > i {
    font-size: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--nx-surface-muted);
    color: var(--nx-text-light);
}

.nx-vazio--compacto {
    padding: 24px 12px;
}

.nx-vazio--compacto > i {
    font-size: 20px;
    width: 44px;
    height: 44px;
}

/* ---------- Carregamento ---------- */
.nx-carregando {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    color: var(--nx-text-muted);
    font-size: var(--nx-fs-sm);
}

.kpi-loading,
.nx-esqueleto {
    background: linear-gradient(90deg, var(--nx-surface-muted) 25%, var(--nx-border-light) 50%, var(--nx-surface-muted) 75%);
    background-size: 200% 100%;
    animation: nx-esqueleto 1.4s ease-in-out infinite;
    border-radius: var(--nx-radius);
}

@keyframes nx-esqueleto {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* ---------- Formulários ---------- */
.form-control:focus,
.form-select:focus,
.select2-container--focus .select2-selection,
.select2-container--open .select2-selection {
    border-color: var(--nx-primary) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--nx-primary) 15%, transparent) !important;
}

.form-control::placeholder {
    color: var(--nx-text-light);
}

.form-check-input:checked {
    background-color: var(--nx-primary);
    border-color: var(--nx-primary);
}

/* ---------- WhatsApp ---------- */
#janela-chat.nx-chat-arrastando {
    background-color: var(--nx-primary-light) !important;
    outline: 2px dashed var(--nx-primary);
    outline-offset: -8px;
}

.nx-chat-meta {
    font-size: var(--nx-fs-xs);
    color: var(--nx-text-light);
    line-height: 1;
}

.nx-chat-status-primeiro {
    color: var(--nx-info);
}

/* ---------- Agenda (FullCalendar) ---------- */
.fc {
    --fc-border-color: var(--nx-border);
    --fc-page-bg-color: var(--nx-card-bg);
    --fc-neutral-bg-color: var(--nx-surface-muted);
    --fc-today-bg-color: color-mix(in srgb, var(--nx-ambar) 10%, transparent);
    --fc-now-indicator-color: var(--nx-primary);
    --fc-button-bg-color: var(--nx-card-bg);
    --fc-button-border-color: var(--nx-border);
    --fc-button-text-color: var(--nx-text);
    --fc-button-hover-bg-color: var(--nx-surface-muted);
    --fc-button-hover-border-color: var(--nx-border-strong);
    --fc-button-active-bg-color: var(--nx-primary);
    --fc-button-active-border-color: var(--nx-primary);
    --fc-event-text-color: #fff;
    font-size: var(--nx-fs-sm);
}

.fc .fc-toolbar-title {
    font-family: var(--nx-font-titulo);
    font-size: var(--nx-fs-lg);
    color: var(--nx-text-dark);
}

.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number {
    color: var(--nx-text);
    text-decoration: none;
}

/* ---------- Diário ---------- */
.diario-paciente-badge--novo {
    background: var(--nx-ambar);
    color: var(--nx-tinta);
}

.diario-card--nao-lida {
    background: color-mix(in srgb, var(--nx-ambar) 7%, var(--nx-card-bg));
    box-shadow: inset 3px 0 0 var(--nx-ambar);
}

.diario-card-nova {
    font-size: var(--nx-fs-xs);
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 20px;
    background: var(--nx-ambar);
    color: var(--nx-tinta);
}

.diario-card-lida {
    width: 28px;
    height: 28px;
}

/* ---------- Metas ---------- */
.nx-progresso-trilho {
    height: 8px;
    border-radius: 4px;
    background: var(--nx-surface-muted);
}
